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
256b94aa7fabb02dfc8ec6f91b97ffce1b1c2f4a
19
py
Python
src/oceandata/export_production/__init__.py
brorfred/oceandata
831e0691223da1aa6a6e97175e8c2d7874bf60cd
[ "MIT" ]
1
2020-07-04T13:55:58.000Z
2020-07-04T13:55:58.000Z
src/oceandata/export_production/__init__.py
brorfred/oceandata
831e0691223da1aa6a6e97175e8c2d7874bf60cd
[ "MIT" ]
null
null
null
src/oceandata/export_production/__init__.py
brorfred/oceandata
831e0691223da1aa6a6e97175e8c2d7874bf60cd
[ "MIT" ]
null
null
null
from . import mouw
9.5
18
0.736842
3
19
4.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.210526
19
2
18
9.5
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
c27167c73d3f6a0b026499939d798ad5e9bbfe72
9,834
py
Python
pkgs/sdk-pkg/src/genie/libs/sdk/triggers/shutnoshut/vxlan/nxos/shutnoshut.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
94
2018-04-30T20:29:15.000Z
2022-03-29T13:40:31.000Z
pkgs/sdk-pkg/src/genie/libs/sdk/triggers/shutnoshut/vxlan/nxos/shutnoshut.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
67
2018-12-06T21:08:09.000Z
2022-03-29T18:00:46.000Z
pkgs/sdk-pkg/src/genie/libs/sdk/triggers/shutnoshut/vxlan/nxos/shutnoshut.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
49
2018-06-29T18:59:03.000Z
2022-03-10T02:07:59.000Z
'''Nxos Implementation for Vxlan shutnoshut triggers''' # ats from genie.libs.sdk.libs.utils.mapping import Mapping from genie.libs.sdk.triggers.shutnoshut.shutnoshut import TriggerShutNoShut # Which key to exclude for Vlan Ops comparison interface_exclude = ['maker', 'last_change','in_rate','in_rate_pkts', 'out_rate', 'out_rate_pkts', 'in_octets', 'in_pkts', 'in_unicast_pkts', 'out_octets', 'out_pkts', 'out_unicast_pkts', 'out_multicast_pkts', 'in_multicast_pkts', 'last_clear', 'in_broadcast_pkts', 'out_broadcast_pkts', 'accounting'] multisite_exclude = ['elapsedtime','keepalive', 'keepaliverecvd','keepalivesent','lastread','lastwrite', 'msgrecvd','msgsent','neighbortableversion', 'tableversion','rtrefreshsent','updatesrecvd','updatessent', 'bytessent','bytesrecvd','localport','remoteport','connsdropped', 'connsestablished','fd','opensrecvd','openssent','prefixversion', 'bestpathnr','pathnr','advertisedto','tx_id','bytesattrs','memoryused','prefixreceived'] nve_exclude = ['maker', 'uptime','up_time'] l2route_exclude = ['total_memory','memory'] class TriggerShutNoShutNveOverlayInterface(TriggerShutNoShut): """Shut and unshut the dynamically learned Nve onverlay interface(s).""" __description__ = """Shut and unshut the dynamically learned Nve onverlay interface(s). trigger_datafile: Mandatory: timeout: max_time (`int`): Maximum wait time for the trigger, in second. Default: 180 interval (`int`): Wait time between iteration when looping is needed, in second. Default: 15 Optional: tgn_timeout (`int`): Maximum wait time for all traffic threads to be restored to the reference rate, in second. Default: 60 tgn_delay (`int`): Wait time between each poll to verify if traffic is resumed, in second. Default: 10 timeout_recovery: Buffer recovery timeout make sure devices are recovered at the end of the trigger execution. Used when previous timeouts have been exhausted. max_time (`int`): Maximum wait time for the last step of the trigger, in second. Default: 180 interval (`int`): Wait time between iteration when looping is needed, in second. Default: 15 static: The keys below are dynamically learnt by default. However, they can also be set to a custom value when provided in the trigger datafile. nve_name: `str` (e.g) interface: '(?P<interface>Ethernet1*)' (Regex supported) OR interface: 'Ethernet1/1/1' (Specific value) steps: 1. Learn VxLan Ops object and verify if has any "up" Nve interface(s), otherwise, SKIP the trigger 2. Shut the learned Nve interface(s) from step 1 with Interface Conf object 3. Verify the state of learned Nve interface(s) from step 2 is "down" 4. Unshut the Nve interface(s) with Interface Conf object 5. Learn VxLan Ops again and verify it is the same as the Ops in step 1 """ # Mapping of Information between Ops and Conf # Also permit to dictate which key to verify mapping = Mapping(requirements={'ops.vxlan.vxlan.Vxlan': { 'requirements': [['nve', '(?P<nve_name>.*)', 'if_state', 'up']], 'kwargs': {'attributes': [ 'nve[(.*)][if_state]', 'nve[(.*)][vni][(.*)][vni]','l2route']}, 'exclude': nve_exclude + ['peer_id','tx_id','total_memory','mac','prefix', 'memory','objects','total_mem','total_obj']}}, config_info={'conf.interface.Interface': { 'requirements': [['enabled', False]], 'verify_conf': False, 'kwargs': {'mandatory': {'name': '(?P<nve_name>.*)', 'attach': False}}}}, verify_ops={'ops.vxlan.vxlan.Vxlan': { 'requirements': [['nve', '(?P<nve_name>.*)', 'if_state', 'down']], 'kwargs': {'attributes': [ 'nve[(.*)][if_state]', 'nve[(.*)][vni][(.*)][vni]','l2route']}, 'exclude': nve_exclude + ['l2route']}}, num_values={'nve_name': 1}) class TriggerShutNoShutNveLoopbackInterface(TriggerShutNoShut): """Shut and unshut the dynamically learned Nve loopback interface(s).""" __description__ = """Shut and unshut the dynamically learned Nve loopback interface(s). trigger_datafile: Mandatory: timeout: max_time (`int`): Maximum wait time for the trigger, in second. Default: 180 interval (`int`): Wait time between iteration when looping is needed, in second. Default: 15 Optional: tgn_timeout (`int`): Maximum wait time for all traffic threads to be restored to the reference rate, in second. Default: 60 tgn_delay (`int`): Wait time between each poll to verify if traffic is resumed, in second. Default: 10 timeout_recovery: Buffer recovery timeout make sure devices are recovered at the end of the trigger execution. Used when previous timeouts have been exhausted. max_time (`int`): Maximum wait time for the last step of the trigger, in second. Default: 180 interval (`int`): Wait time between iteration when looping is needed, in second. Default: 15 static: The keys below are dynamically learnt by default. However, they can also be set to a custom value when provided in the trigger datafile. nve_name: `str` source_if: `str` (e.g) interface: '(?P<interface>Ethernet1*)' (Regex supported) OR interface: 'Ethernet1/1/1' (Specific value) steps: 1. Learn VxLan Ops object and verify if has any "up" Nve interface(s), otherwise, SKIP the trigger 2. Shut the learned Nve interface(s) from step 1 with Interface Conf object 3. Verify the state of learned Nve interface(s) from step 2 is "down" 4. Unshut the Nve interface(s) with Interface Conf object 5. Learn VxLan Ops again and verify it is the same as the Ops in step 1 """ # Mapping of Information between Ops and Conf # Also permit to dictate which key to verify mapping = Mapping(requirements={'ops.vxlan.vxlan.Vxlan': { 'requirements': [[['nve', '(?P<nve_name>.*)', 'src_if_state', 'up']], [['nve', '(?P<nve_name>.*)', 'source_if', '(?P<source_if>(L|l)oopback.*)']]], 'all_keys': True, 'kwargs': {'attributes': ['nve', 'l2route', 'bgp_l2vpn_evpn']}, 'exclude': nve_exclude + multisite_exclude + l2route_exclude + ['peer_id','resetreason','resettime','totalpaths']}}, config_info={'conf.interface.Interface': { 'requirements': [['enabled', False]], 'verify_conf': False, 'kwargs': {'mandatory': {'name': '(?P<source_if>.*)', 'attach': False}}}}, verify_ops={'ops.vxlan.vxlan.Vxlan': { 'requirements': [['nve', '(?P<nve_name>.*)', 'src_if_state', 'down'], ['nve', '(?P<nve_name>.*)', 'if_state', 'down'], ['nve', '(?P<nve_name>.*)', 'multisite_bgw_if_oper_state', 'down'], ['nve', '(?P<nve_name>.*)', 'sm_state', 'nve-intf-init'], ['nve', '(?P<nve_name>.*)', 'vni', '(.*)', 'vni_state', 'down'], ['nve', 'vni', 'summary', 'cp_vni_up', 0]], 'kwargs': {'attributes': ['nve', 'l2route', 'bgp_l2vpn_evpn']}, 'exclude': nve_exclude + ['l2route', 'bgp_l2vpn_evpn','cp_vni_down'] }}, num_values={'nve_name': 'all', 'source_if': 1})
59.240964
156
0.482815
930
9,834
4.980645
0.24086
0.021157
0.03886
0.021373
0.734024
0.734024
0.729706
0.720855
0.713515
0.713515
0
0.011346
0.408481
9,834
165
157
59.6
0.784941
0.041387
0
0.686567
0
0
0.6229
0.031044
0
0
0
0
0
1
0
false
0
0.014925
0
0.059701
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
6c0dcf510344ed7c988888321d3aedf7e9433e16
15,828
py
Python
tests/test_matching_cost_zncc.py
njimenezd/Pandora
9e3c2054415301edac6da7510056af0136790277
[ "Apache-2.0" ]
14
2020-09-18T14:11:59.000Z
2020-11-18T14:10:07.000Z
tests/test_matching_cost_zncc.py
njimenezd/Pandora
9e3c2054415301edac6da7510056af0136790277
[ "Apache-2.0" ]
1
2020-09-29T10:35:45.000Z
2020-09-29T10:35:45.000Z
tests/test_matching_cost_zncc.py
njimenezd/Pandora
9e3c2054415301edac6da7510056af0136790277
[ "Apache-2.0" ]
1
2020-09-29T09:29:41.000Z
2020-09-29T09:29:41.000Z
# type:ignore #!/usr/bin/env python # coding: utf8 # # Copyright (c) 2020 Centre National d'Etudes Spatiales (CNES). # # This file is part of PANDORA # # https://github.com/CNES/Pandora_pandora # # 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. # """ This module contains functions to test the cost volume measure step. """ import unittest import numpy as np import xarray as xr from pandora import matching_cost import tests.common as common class TestMatchingCost(unittest.TestCase): """ TestMatchingCost class allows to test all the methods in the class MatchingCost, and the plugins pixel_wise, zncc """ def setUp(self): """ Method called to prepare the test fixture """ self.left, self.right = common.matching_cost_tests_setup() def test_zncc_cost(self): """ Test the zncc_cost method """ # Compute the cost volume for the images self.left, self.right, # with zncc measure, disp = -1, 1 window size = 5 and subpix = 1 matching_cost_matcher = matching_cost.AbstractMatchingCost( **{"matching_cost_method": "zncc", "window_size": 5, "subpix": 1} ) cost_volume_zncc = matching_cost_matcher.compute_cost_volume(self.left, self.right, disp_min=-1, disp_max=1) matching_cost_matcher.cv_masked(self.left, self.right, cost_volume_zncc, -1, 1) # Ground truth zncc cost for the disparity -1 row = self.left["im"].data[:, 1:] col = self.right["im"].data[:, :5] ground_truth = np.array( ( [ np.nan, np.nan, np.nan, (np.mean(row * col) - (np.mean(row) * np.mean(col))) / (np.std(row) * np.std(col)), np.nan, np.nan, ] ) ) # Check if the calculated cost volume for the disparity -1 is equal to the ground truth np.testing.assert_allclose(cost_volume_zncc["cost_volume"].data[2, :, 0], ground_truth, rtol=1e-05) # Ground truth zncc cost for the disparity 1 row = self.left["im"].data[:, :5] col = self.right["im"].data[:, 1:] ground_truth = np.array( ( [ np.nan, np.nan, (np.mean(row * col) - (np.mean(row) * np.mean(col))) / (np.std(row) * np.std(col)), np.nan, np.nan, np.nan, ] ) ) # Check if the calculated cost volume # Check if the calculated cost volume for the disparity 1 is equal to the ground truth np.testing.assert_allclose(cost_volume_zncc["cost_volume"].data[2, :, 2], ground_truth, rtol=1e-05) @staticmethod def test_subpixel_offset(): """ Test the cost volume method with 2 subpixel disparity """ # Create a matching_cost object with simple images data = np.array(([7, 8, 1, 0, 2], [4, 5, 2, 1, 0], [8, 9, 10, 0, 0]), dtype=np.float64) left = xr.Dataset( {"im": (["row", "col"], data)}, coords={"row": np.arange(data.shape[0]), "col": np.arange(data.shape[1])} ) left.attrs = common.img_attrs data = np.array(([1, 5, 6, 3, 4], [2, 5, 10, 6, 9], [0, 7, 5, 3, 1]), dtype=np.float64) right = xr.Dataset( {"im": (["row", "col"], data)}, coords={"row": np.arange(data.shape[0]), "col": np.arange(data.shape[1])} ) right.attrs = common.img_attrs # Computes the cost volume for disp min -2 disp max 2 and subpix = 2 matching_cost_matcher = matching_cost.AbstractMatchingCost( **{"matching_cost_method": "sad", "window_size": 3, "subpix": 2} ) cv_zncc_subpixel = matching_cost_matcher.compute_cost_volume(left, right, disp_min=-2, disp_max=2) matching_cost_matcher.cv_masked(left, right, cv_zncc_subpixel, -2, 1) # Test the disparity range disparity_range_compute = cv_zncc_subpixel.coords["disp"].data disparity_range_ground_truth = [-2, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, 2] # Check if the calculated disparity range is equal to the ground truth (same shape and all elements equals) np.testing.assert_array_equal(disparity_range_compute, disparity_range_ground_truth) # Cost volume ground truth with subpixel precision 0.5 cost_volume_ground_truth = np.array( [ [ [np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan], ], [ [np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, 39, 32.5, 28, 34.5, 41], [np.nan, np.nan, 49, 41.5, 34, 35.5, 37, np.nan, np.nan], [45, 42.5, 40, 40.5, 41, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan], ], [ [np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan, np.nan], ], ] ) # Check if the calculated cost volume is equal to the ground truth (same shape and all elements equals) np.testing.assert_array_equal(cv_zncc_subpixel["cost_volume"].data, cost_volume_ground_truth) @staticmethod def test_masks_invalid_pixels(): """ Test the method masks_invalid_pixels """ # ------------ Test the method with a left mask ( right mask contains valid pixels ) ------------ # Mask convention # cfg['image']['valid_pixels'] = 0 # cfg['image']['no_data'] = 1 # invalid_pixels all other values data = np.array(([1, 1, 1, 3, 4], [1, 2, 1, 0, 2], [2, 1, 0, 1, 2], [1, 1, 1, 1, 4]), dtype=np.float64) mask = np.array(([0, 0, 2, 0, 1], [0, 2, 0, 0, 0], [0, 0, 0, 0, 0], [1, 0, 0, 0, 2]), dtype=np.int16) left = xr.Dataset( {"im": (["row", "col"], data), "msk": (["row", "col"], mask)}, coords={"row": np.arange(data.shape[0]), "col": np.arange(data.shape[1])}, ) left.attrs = common.img_attrs data = np.array(([5, 1, 2, 3, 4], [1, 2, 1, 0, 2], [2, 2, 0, 1, 4], [1, 1, 1, 1, 2]), dtype=np.float64) # right mask contains valid pixels mask = np.zeros((4, 5), dtype=np.int16) right = xr.Dataset( {"im": (["row", "col"], data), "msk": (["row", "col"], mask)}, coords={"row": np.arange(data.shape[0]), "col": np.arange(data.shape[1])}, ) right.attrs = common.img_attrs # ------------ Test the method with a left and right mask with window size 3 and ZNCC ------------ # Mask convention # cfg['image']['valid_pixels'] = 0 # cfg['image']['no_data'] = 1 # invalid_pixels all other values data = np.array(([1, 1, 1, 3, 4], [1, 2, 1, 0, 2], [2, 1, 0, 1, 2], [1, 1, 1, 1, 4]), dtype=np.float64) # left mask contains valid pixels mask = np.array(([1, 0, 0, 2, 0], [0, 0, 0, 0, 0], [0, 0, 2, 0, 0], [2, 0, 0, 0, 1]), dtype=np.int16) left = xr.Dataset( {"im": (["row", "col"], data), "msk": (["row", "col"], mask)}, coords={"row": np.arange(data.shape[0]), "col": np.arange(data.shape[1])}, ) left.attrs = common.img_attrs data = np.array(([5, 1, 2, 3, 4], [1, 2, 1, 0, 2], [2, 2, 0, 1, 4], [1, 1, 1, 1, 2]), dtype=np.float64) mask = np.array(([0, 2, 0, 0, 1], [0, 0, 0, 0, 0], [0, 0, 0, 2, 0], [1, 0, 2, 0, 0]), dtype=np.int16) right = xr.Dataset( {"im": (["row", "col"], data), "msk": (["row", "col"], mask)}, coords={"row": np.arange(data.shape[0]), "col": np.arange(data.shape[1])}, ) right.attrs = common.img_attrs matching_cost_ = matching_cost.AbstractMatchingCost( **{"matching_cost_method": "zncc", "window_size": 3, "subpix": 1} ) # Compute the cost volume and invalidate pixels if need cv = matching_cost_.compute_cost_volume(img_left=left, img_right=right, disp_min=-1, disp_max=1) matching_cost_.cv_masked(img_left=left, img_right=right, cost_volume=cv, disp_min=-1, disp_max=1) # Cost volume ground truth after invalidation cv_ground_truth = np.array( [ [ [np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan], ], [ [np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan], [0.02146693953705469, 0.8980265101338747, np.nan], [0.40624999999999994, np.nan, np.nan], [np.nan, np.nan, np.nan], ], [ [np.nan, np.nan, np.nan], [np.nan, np.nan, 0.2941742027072762], [np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan], ], [ [np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan], ], ], dtype=np.float32, ) # Check if the calculated cost volume is equal to the ground truth (same shape and all elements equals) np.testing.assert_array_equal(cv["cost_volume"], cv_ground_truth) @staticmethod def test_masks_invalid_pixels_subpixel(): """ Test the method masks_invalid_pixels with subpixel precision """ # ------------ Test the method with a right mask with window size 1 subpixel 2 ------------ # Mask convention # cfg['image']['valid_pixels'] = 0 # cfg['image']['no_data'] = 1 # invalid_pixels all other values data = np.array(([1, 1, 1, 3, 4], [1, 1, 1, 1, 4]), dtype=np.float64) # left mask contains valid pixels mask = np.array(([0, 0, 0, 0, 0], [0, 0, 0, 0, 0]), dtype=np.int16) left = xr.Dataset( {"im": (["row", "col"], data), "msk": (["row", "col"], mask)}, coords={"row": np.arange(data.shape[0]), "col": np.arange(data.shape[1])}, ) left.attrs = common.img_attrs data = np.array(([5, 1, 2, 3, 4], [1, 1, 1, 1, 2]), dtype=np.float64) mask = np.array(([0, 0, 0, 0, 1], [1, 0, 2, 0, 0]), dtype=np.int16) right = xr.Dataset( {"im": (["row", "col"], data), "msk": (["row", "col"], mask)}, coords={"row": np.arange(data.shape[0]), "col": np.arange(data.shape[1])}, ) right.attrs = common.img_attrs dmin = -1 dmax = 1 # ------------ Test the method with a left and right mask with window size 3 and ZNCC ------------ data = np.array(([1, 1, 1, 3, 4], [1, 2, 1, 0, 2], [2, 1, 0, 1, 2], [1, 1, 1, 1, 4]), dtype=np.float64) # left mask contains valid pixels mask = np.array(([1, 0, 0, 2, 0], [0, 0, 0, 0, 0], [0, 0, 2, 0, 0], [2, 0, 0, 0, 1]), dtype=np.int16) left = xr.Dataset( {"im": (["row", "col"], data), "msk": (["row", "col"], mask)}, coords={"row": np.arange(data.shape[0]), "col": np.arange(data.shape[1])}, ) left.attrs = common.img_attrs data = np.array(([5, 1, 2, 3, 4], [1, 2, 1, 0, 2], [2, 2, 0, 1, 4], [1, 1, 1, 1, 2]), dtype=np.float64) mask = np.array(([0, 2, 0, 0, 1], [0, 0, 0, 0, 0], [0, 0, 0, 2, 0], [1, 0, 2, 0, 0]), dtype=np.int16) right = xr.Dataset( {"im": (["row", "col"], data), "msk": (["row", "col"], mask)}, coords={"row": np.arange(data.shape[0]), "col": np.arange(data.shape[1])}, ) right.attrs = common.img_attrs dmin = -1 dmax = 1 matching_cost_ = matching_cost.AbstractMatchingCost( **{"matching_cost_method": "zncc", "window_size": 3, "subpix": 2} ) # Compute the cost volume and invalidate pixels if need cv = matching_cost_.compute_cost_volume(img_left=left, img_right=right, disp_min=dmin, disp_max=dmax) matching_cost_.cv_masked(img_left=left, img_right=right, cost_volume=cv, disp_min=dmin, disp_max=dmax) # Cost volume ground truth after invalidation cv_ground_truth = np.array( [ [ [np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan], ], [ [np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan], [0.02146693953705469, 0.5486081, 0.8980265101338747, np.nan, np.nan], [0.40624999999999994, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan], ], [ [np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, 0.2941742027072762], [np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan], ], [ [np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan], [np.nan, np.nan, np.nan, np.nan, np.nan], ], ], dtype=np.float32, ) # Check if the calculated cost volume is equal to the ground truth (same shape and all elements equals) np.testing.assert_array_equal(cv["cost_volume"], cv_ground_truth) if __name__ == "__main__": common.setup_logging() unittest.main()
43.128065
117
0.510425
2,267
15,828
3.482576
0.097927
0.177961
0.236732
0.335655
0.764155
0.741102
0.701963
0.70057
0.688284
0.659531
0
0.05799
0.32234
15,828
366
118
43.245902
0.678072
0.199773
0
0.587234
0
0
0.036118
0
0
0
0
0
0.025532
1
0.021277
false
0
0.021277
0
0.046809
0
0
0
0
null
0
1
1
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
6c11c80451e93b53b5b41b4720a65324548b2e03
269,699
py
Python
test/python/sample/stdlib/test_platform.py
esoma/woosh
4cd58eb93c69c48040ff1e25159e48def54c3111
[ "MIT" ]
null
null
null
test/python/sample/stdlib/test_platform.py
esoma/woosh
4cd58eb93c69c48040ff1e25159e48def54c3111
[ "MIT" ]
null
null
null
test/python/sample/stdlib/test_platform.py
esoma/woosh
4cd58eb93c69c48040ff1e25159e48def54c3111
[ "MIT" ]
null
null
null
# this file was generated using test/python/sample/generate.py # python import io import pathlib # pytest import pytest # woosh import woosh def tokenize_file_like(source): return list(woosh.tokenize(io.BytesIO(source))) def tokenize_bytes(source): return list(woosh.tokenize(source)) SAMPLE_DIR = pathlib.Path(__file__).parent.absolute() / '../../' / '../../' / 'sample' @pytest.mark.parametrize('tokenize', [tokenize_file_like, tokenize_bytes]) def test(tokenize): with open(SAMPLE_DIR / 'stdlib/platform.py', 'rb') as f: tokens = tokenize(f.read()) for token, expected in zip(tokens, EXPECTED): assert token == expected EXPECTED = [ woosh.Token(woosh.ENCODING, 'utf-8', 1, 0, 1, 0), woosh.Token(woosh.COMMENT, '#!/usr/bin/env python3', 1, 0, 1, 22), woosh.Token(woosh.STRING, '""" This module tries to retrieve as much platform-identifying data as\r\n possible. It makes this information available via function APIs.\r\n\r\n If called from the command line, it prints the platform\r\n information concatenated as single string to stdout. The output\r\n format is useable as part of a filename.\r\n\r\n"""', 3, 0, 10, 3), woosh.Token(woosh.NEWLINE, '\r\n', 10, 3, 11, 0), woosh.Token(woosh.COMMENT, '# This module is maintained by Marc-Andre Lemburg <mal@egenix.com>.', 11, 0, 11, 70), woosh.Token(woosh.COMMENT, '# If you find problems, please submit bug reports/patches via the', 12, 0, 12, 68), woosh.Token(woosh.COMMENT, '# Python bug tracker (http://bugs.python.org) and assign them to "lemburg".', 13, 0, 13, 78), woosh.Token(woosh.COMMENT, '#', 14, 0, 14, 1), woosh.Token(woosh.COMMENT, '# Still needed:', 15, 0, 15, 18), woosh.Token(woosh.COMMENT, '# * support for MS-DOS (PythonDX ?)', 16, 0, 16, 38), woosh.Token(woosh.COMMENT, '# * support for Amiga and other still unsupported platforms running Python', 17, 0, 17, 77), woosh.Token(woosh.COMMENT, '# * support for additional Linux distributions', 18, 0, 18, 49), woosh.Token(woosh.COMMENT, '#', 19, 0, 19, 1), woosh.Token(woosh.COMMENT, '# Many thanks to all those who helped adding platform-specific', 20, 0, 20, 65), woosh.Token(woosh.COMMENT, '# checks (in no particular order):', 21, 0, 21, 37), woosh.Token(woosh.COMMENT, '#', 22, 0, 22, 1), woosh.Token(woosh.COMMENT, '# Charles G Waldman, David Arnold, Gordon McMillan, Ben Darnell,', 23, 0, 23, 69), woosh.Token(woosh.COMMENT, '# Jeff Bauer, Cliff Crawford, Ivan Van Laningham, Josef', 24, 0, 24, 60), woosh.Token(woosh.COMMENT, '# Betancourt, Randall Hopper, Karl Putland, John Farrell, Greg', 25, 0, 25, 67), woosh.Token(woosh.COMMENT, '# Andruk, Just van Rossum, Thomas Heller, Mark R. Levinson, Mark', 26, 0, 26, 69), woosh.Token(woosh.COMMENT, '# Hammond, Bill Tutt, Hans Nowak, Uwe Zessin (OpenVMS support),', 27, 0, 27, 68), woosh.Token(woosh.COMMENT, '# Colin Kong, Trent Mick, Guido van Rossum, Anthony Baxter, Steve', 28, 0, 28, 70), woosh.Token(woosh.COMMENT, '# Dower', 29, 0, 29, 12), woosh.Token(woosh.COMMENT, '#', 30, 0, 30, 1), woosh.Token(woosh.COMMENT, '# History:', 31, 0, 31, 13), woosh.Token(woosh.COMMENT, '#', 32, 0, 32, 1), woosh.Token(woosh.COMMENT, '# <see CVS and SVN checkin messages for history>', 33, 0, 33, 51), woosh.Token(woosh.COMMENT, '#', 34, 0, 34, 1), woosh.Token(woosh.COMMENT, '# 1.0.8 - changed Windows support to read version from kernel32.dll', 35, 0, 35, 70), woosh.Token(woosh.COMMENT, '# 1.0.7 - added DEV_NULL', 36, 0, 36, 27), woosh.Token(woosh.COMMENT, '# 1.0.6 - added linux_distribution()', 37, 0, 37, 39), woosh.Token(woosh.COMMENT, '# 1.0.5 - fixed Java support to allow running the module on Jython', 38, 0, 38, 69), woosh.Token(woosh.COMMENT, '# 1.0.4 - added IronPython support', 39, 0, 39, 37), woosh.Token(woosh.COMMENT, '# 1.0.3 - added normalization of Windows system name', 40, 0, 40, 55), woosh.Token(woosh.COMMENT, '# 1.0.2 - added more Windows support', 41, 0, 41, 39), woosh.Token(woosh.COMMENT, '# 1.0.1 - reformatted to make doc.py happy', 42, 0, 42, 45), woosh.Token(woosh.COMMENT, '# 1.0.0 - reformatted a bit and checked into Python CVS', 43, 0, 43, 58), woosh.Token(woosh.COMMENT, '# 0.8.0 - added sys.version parser and various new access', 44, 0, 44, 60), woosh.Token(woosh.COMMENT, '# APIs (python_version(), python_compiler(), etc.)', 45, 0, 45, 61), woosh.Token(woosh.COMMENT, '# 0.7.2 - fixed architecture() to use sizeof(pointer) where available', 46, 0, 46, 72), woosh.Token(woosh.COMMENT, '# 0.7.1 - added support for Caldera OpenLinux', 47, 0, 47, 48), woosh.Token(woosh.COMMENT, '# 0.7.0 - some fixes for WinCE; untabified the source file', 48, 0, 48, 61), woosh.Token(woosh.COMMENT, '# 0.6.2 - support for OpenVMS - requires version 1.5.2-V006 or higher and', 49, 0, 49, 76), woosh.Token(woosh.COMMENT, '# vms_lib.getsyi() configured', 50, 0, 50, 40), woosh.Token(woosh.COMMENT, "# 0.6.1 - added code to prevent 'uname -p' on platforms which are", 51, 0, 51, 68), woosh.Token(woosh.COMMENT, '# known not to support it', 52, 0, 52, 36), woosh.Token(woosh.COMMENT, '# 0.6.0 - fixed win32_ver() to hopefully work on Win95,98,NT and Win2k;', 53, 0, 53, 74), woosh.Token(woosh.COMMENT, '# did some cleanup of the interfaces - some APIs have changed', 54, 0, 54, 72), woosh.Token(woosh.COMMENT, '# 0.5.5 - fixed another type in the MacOS code... should have', 55, 0, 55, 64), woosh.Token(woosh.COMMENT, '# used more coffee today ;-)', 56, 0, 56, 39), woosh.Token(woosh.COMMENT, '# 0.5.4 - fixed a few typos in the MacOS code', 57, 0, 57, 48), woosh.Token(woosh.COMMENT, '# 0.5.3 - added experimental MacOS support; added better popen()', 58, 0, 58, 67), woosh.Token(woosh.COMMENT, '# workarounds in _syscmd_ver() -- still not 100% elegant', 59, 0, 59, 67), woosh.Token(woosh.COMMENT, '# though', 60, 0, 60, 19), woosh.Token(woosh.COMMENT, "# 0.5.2 - fixed uname() to return '' instead of 'unknown' in all", 61, 0, 61, 67), woosh.Token(woosh.COMMENT, '# return values (the system uname command tends to return', 62, 0, 62, 68), woosh.Token(woosh.COMMENT, "# 'unknown' instead of just leaving the field empty)", 63, 0, 63, 63), woosh.Token(woosh.COMMENT, '# 0.5.1 - included code for slackware dist; added exception handlers', 64, 0, 64, 71), woosh.Token(woosh.COMMENT, "# to cover up situations where platforms don't have os.popen", 65, 0, 65, 71), woosh.Token(woosh.COMMENT, '# (e.g. Mac) or fail on socket.gethostname(); fixed libc', 66, 0, 66, 67), woosh.Token(woosh.COMMENT, '# detection RE', 67, 0, 67, 25), woosh.Token(woosh.COMMENT, '# 0.5.0 - changed the API names referring to system commands to *syscmd*;', 68, 0, 68, 76), woosh.Token(woosh.COMMENT, '# added java_ver(); made syscmd_ver() a private', 69, 0, 69, 58), woosh.Token(woosh.COMMENT, '# API (was system_ver() in previous versions) -- use uname()', 70, 0, 70, 71), woosh.Token(woosh.COMMENT, '# instead; extended the win32_ver() to also return processor', 71, 0, 71, 71), woosh.Token(woosh.COMMENT, '# type information', 72, 0, 72, 29), woosh.Token(woosh.COMMENT, '# 0.4.0 - added win32_ver() and modified the platform() output for WinXX', 73, 0, 73, 75), woosh.Token(woosh.COMMENT, '# 0.3.4 - fixed a bug in _follow_symlinks()', 74, 0, 74, 46), woosh.Token(woosh.COMMENT, '# 0.3.3 - fixed popen() and "file" command invocation bugs', 75, 0, 75, 61), woosh.Token(woosh.COMMENT, '# 0.3.2 - added architecture() API and support for it in platform()', 76, 0, 76, 70), woosh.Token(woosh.COMMENT, '# 0.3.1 - fixed syscmd_ver() RE to support Windows NT', 77, 0, 77, 56), woosh.Token(woosh.COMMENT, '# 0.3.0 - added system alias support', 78, 0, 78, 39), woosh.Token(woosh.COMMENT, "# 0.2.3 - removed 'wince' again... oh well.", 79, 0, 79, 46), woosh.Token(woosh.COMMENT, "# 0.2.2 - added 'wince' to syscmd_ver() supported platforms", 80, 0, 80, 62), woosh.Token(woosh.COMMENT, '# 0.2.1 - added cache logic and changed the platform string format', 81, 0, 81, 69), woosh.Token(woosh.COMMENT, '# 0.2.0 - changed the API to use functions instead of module globals', 82, 0, 82, 71), woosh.Token(woosh.COMMENT, '# since some action take too long to be run on module import', 83, 0, 83, 71), woosh.Token(woosh.COMMENT, '# 0.1.0 - first release', 84, 0, 84, 26), woosh.Token(woosh.COMMENT, '#', 85, 0, 85, 1), woosh.Token(woosh.COMMENT, '# You can always get the latest version of this module at:', 86, 0, 86, 61), woosh.Token(woosh.COMMENT, '#', 87, 0, 87, 1), woosh.Token(woosh.COMMENT, '# http://www.egenix.com/files/python/platform.py', 88, 0, 88, 60), woosh.Token(woosh.COMMENT, '#', 89, 0, 89, 1), woosh.Token(woosh.COMMENT, '# If that URL should fail, try contacting the author.', 90, 0, 90, 56), woosh.Token(woosh.NAME, '__copyright__', 92, 0, 92, 13), woosh.Token(woosh.OP, '=', 92, 14, 92, 15), woosh.Token(woosh.STRING, '"""\r\n Copyright (c) 1999-2000, Marc-Andre Lemburg; mailto:mal@lemburg.com\r\n Copyright (c) 2000-2010, eGenix.com Software GmbH; mailto:info@egenix.com\r\n\r\n Permission to use, copy, modify, and distribute this software and its\r\n documentation for any purpose and without fee or royalty is hereby granted,\r\n provided that the above copyright notice appear in all copies and that\r\n both that copyright notice and this permission notice appear in\r\n supporting documentation or portions thereof, including modifications,\r\n that you make.\r\n\r\n EGENIX.COM SOFTWARE GMBH DISCLAIMS ALL WARRANTIES WITH REGARD TO\r\n THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\r\n FITNESS, IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL,\r\n INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING\r\n FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,\r\n NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION\r\n WITH THE USE OR PERFORMANCE OF THIS SOFTWARE !\r\n\r\n"""', 92, 16, 111, 3), woosh.Token(woosh.NEWLINE, '\r\n', 111, 3, 112, 0), woosh.Token(woosh.NAME, '__version__', 113, 0, 113, 11), woosh.Token(woosh.OP, '=', 113, 12, 113, 13), woosh.Token(woosh.STRING, "'1.0.8'", 113, 14, 113, 21), woosh.Token(woosh.NEWLINE, '\r\n', 113, 21, 114, 0), woosh.Token(woosh.NAME, 'import', 115, 0, 115, 6), woosh.Token(woosh.NAME, 'collections', 115, 7, 115, 18), woosh.Token(woosh.NEWLINE, '\r\n', 115, 18, 116, 0), woosh.Token(woosh.NAME, 'import', 116, 0, 116, 6), woosh.Token(woosh.NAME, 'os', 116, 7, 116, 9), woosh.Token(woosh.NEWLINE, '\r\n', 116, 9, 117, 0), woosh.Token(woosh.NAME, 'import', 117, 0, 117, 6), woosh.Token(woosh.NAME, 're', 117, 7, 117, 9), woosh.Token(woosh.NEWLINE, '\r\n', 117, 9, 118, 0), woosh.Token(woosh.NAME, 'import', 118, 0, 118, 6), woosh.Token(woosh.NAME, 'sys', 118, 7, 118, 10), woosh.Token(woosh.NEWLINE, '\r\n', 118, 10, 119, 0), woosh.Token(woosh.NAME, 'import', 119, 0, 119, 6), woosh.Token(woosh.NAME, 'subprocess', 119, 7, 119, 17), woosh.Token(woosh.NEWLINE, '\r\n', 119, 17, 120, 0), woosh.Token(woosh.NAME, 'import', 120, 0, 120, 6), woosh.Token(woosh.NAME, 'functools', 120, 7, 120, 16), woosh.Token(woosh.NEWLINE, '\r\n', 120, 16, 121, 0), woosh.Token(woosh.NAME, 'import', 121, 0, 121, 6), woosh.Token(woosh.NAME, 'itertools', 121, 7, 121, 16), woosh.Token(woosh.NEWLINE, '\r\n', 121, 16, 122, 0), woosh.Token(woosh.COMMENT, '### Globals & Constants', 123, 0, 123, 23), woosh.Token(woosh.COMMENT, '# Helper for comparing two version number strings.', 125, 0, 125, 50), woosh.Token(woosh.COMMENT, "# Based on the description of the PHP's version_compare():", 126, 0, 126, 58), woosh.Token(woosh.COMMENT, '# http://php.net/manual/en/function.version-compare.php', 127, 0, 127, 55), woosh.Token(woosh.NAME, '_ver_stages', 129, 0, 129, 11), woosh.Token(woosh.OP, '=', 129, 12, 129, 13), woosh.Token(woosh.OP, '{', 129, 14, 129, 15), woosh.Token(woosh.COMMENT, '# any string not found in this dict, will get 0 assigned', 130, 4, 130, 60), woosh.Token(woosh.STRING, "'dev'", 131, 4, 131, 9), woosh.Token(woosh.OP, ':', 131, 9, 131, 10), woosh.Token(woosh.NUMBER, '10', 131, 11, 131, 13), woosh.Token(woosh.OP, ',', 131, 13, 131, 14), woosh.Token(woosh.STRING, "'alpha'", 132, 4, 132, 11), woosh.Token(woosh.OP, ':', 132, 11, 132, 12), woosh.Token(woosh.NUMBER, '20', 132, 13, 132, 15), woosh.Token(woosh.OP, ',', 132, 15, 132, 16), woosh.Token(woosh.STRING, "'a'", 132, 17, 132, 20), woosh.Token(woosh.OP, ':', 132, 20, 132, 21), woosh.Token(woosh.NUMBER, '20', 132, 22, 132, 24), woosh.Token(woosh.OP, ',', 132, 24, 132, 25), woosh.Token(woosh.STRING, "'beta'", 133, 4, 133, 10), woosh.Token(woosh.OP, ':', 133, 10, 133, 11), woosh.Token(woosh.NUMBER, '30', 133, 12, 133, 14), woosh.Token(woosh.OP, ',', 133, 14, 133, 15), woosh.Token(woosh.STRING, "'b'", 133, 16, 133, 19), woosh.Token(woosh.OP, ':', 133, 19, 133, 20), woosh.Token(woosh.NUMBER, '30', 133, 21, 133, 23), woosh.Token(woosh.OP, ',', 133, 23, 133, 24), woosh.Token(woosh.STRING, "'c'", 134, 4, 134, 7), woosh.Token(woosh.OP, ':', 134, 7, 134, 8), woosh.Token(woosh.NUMBER, '40', 134, 9, 134, 11), woosh.Token(woosh.OP, ',', 134, 11, 134, 12), woosh.Token(woosh.STRING, "'RC'", 135, 4, 135, 8), woosh.Token(woosh.OP, ':', 135, 8, 135, 9), woosh.Token(woosh.NUMBER, '50', 135, 10, 135, 12), woosh.Token(woosh.OP, ',', 135, 12, 135, 13), woosh.Token(woosh.STRING, "'rc'", 135, 14, 135, 18), woosh.Token(woosh.OP, ':', 135, 18, 135, 19), woosh.Token(woosh.NUMBER, '50', 135, 20, 135, 22), woosh.Token(woosh.OP, ',', 135, 22, 135, 23), woosh.Token(woosh.COMMENT, '# number, will get 100 assigned', 136, 4, 136, 35), woosh.Token(woosh.STRING, "'pl'", 137, 4, 137, 8), woosh.Token(woosh.OP, ':', 137, 8, 137, 9), woosh.Token(woosh.NUMBER, '200', 137, 10, 137, 13), woosh.Token(woosh.OP, ',', 137, 13, 137, 14), woosh.Token(woosh.STRING, "'p'", 137, 15, 137, 18), woosh.Token(woosh.OP, ':', 137, 18, 137, 19), woosh.Token(woosh.NUMBER, '200', 137, 20, 137, 23), woosh.Token(woosh.OP, ',', 137, 23, 137, 24), woosh.Token(woosh.OP, '}', 138, 0, 138, 1), woosh.Token(woosh.NEWLINE, '\r\n', 138, 1, 139, 0), woosh.Token(woosh.NAME, '_component_re', 140, 0, 140, 13), woosh.Token(woosh.OP, '=', 140, 14, 140, 15), woosh.Token(woosh.NAME, 're', 140, 16, 140, 18), woosh.Token(woosh.OP, '.', 140, 18, 140, 19), woosh.Token(woosh.NAME, 'compile', 140, 19, 140, 26), woosh.Token(woosh.OP, '(', 140, 26, 140, 27), woosh.Token(woosh.STRING, "r'([0-9]+|[._+-])'", 140, 27, 140, 45), woosh.Token(woosh.OP, ')', 140, 45, 140, 46), woosh.Token(woosh.NEWLINE, '\r\n', 140, 46, 141, 0), woosh.Token(woosh.NAME, 'def', 142, 0, 142, 3), woosh.Token(woosh.NAME, '_comparable_version', 142, 4, 142, 23), woosh.Token(woosh.OP, '(', 142, 23, 142, 24), woosh.Token(woosh.NAME, 'version', 142, 24, 142, 31), woosh.Token(woosh.OP, ')', 142, 31, 142, 32), woosh.Token(woosh.OP, ':', 142, 32, 142, 33), woosh.Token(woosh.NEWLINE, '\r\n', 142, 33, 143, 0), woosh.Token(woosh.INDENT, ' ', 143, 0, 143, 4), woosh.Token(woosh.NAME, 'result', 143, 4, 143, 10), woosh.Token(woosh.OP, '=', 143, 11, 143, 12), woosh.Token(woosh.OP, '[', 143, 13, 143, 14), woosh.Token(woosh.OP, ']', 143, 14, 143, 15), woosh.Token(woosh.NEWLINE, '\r\n', 143, 15, 144, 0), woosh.Token(woosh.NAME, 'for', 144, 4, 144, 7), woosh.Token(woosh.NAME, 'v', 144, 8, 144, 9), woosh.Token(woosh.NAME, 'in', 144, 10, 144, 12), woosh.Token(woosh.NAME, '_component_re', 144, 13, 144, 26), woosh.Token(woosh.OP, '.', 144, 26, 144, 27), woosh.Token(woosh.NAME, 'split', 144, 27, 144, 32), woosh.Token(woosh.OP, '(', 144, 32, 144, 33), woosh.Token(woosh.NAME, 'version', 144, 33, 144, 40), woosh.Token(woosh.OP, ')', 144, 40, 144, 41), woosh.Token(woosh.OP, ':', 144, 41, 144, 42), woosh.Token(woosh.NEWLINE, '\r\n', 144, 42, 145, 0), woosh.Token(woosh.INDENT, ' ', 145, 0, 145, 8), woosh.Token(woosh.NAME, 'if', 145, 8, 145, 10), woosh.Token(woosh.NAME, 'v', 145, 11, 145, 12), woosh.Token(woosh.NAME, 'not', 145, 13, 145, 16), woosh.Token(woosh.NAME, 'in', 145, 17, 145, 19), woosh.Token(woosh.STRING, "'._+-'", 145, 20, 145, 26), woosh.Token(woosh.OP, ':', 145, 26, 145, 27), woosh.Token(woosh.NEWLINE, '\r\n', 145, 27, 146, 0), woosh.Token(woosh.INDENT, ' ', 146, 0, 146, 12), woosh.Token(woosh.NAME, 'try', 146, 12, 146, 15), woosh.Token(woosh.OP, ':', 146, 15, 146, 16), woosh.Token(woosh.NEWLINE, '\r\n', 146, 16, 147, 0), woosh.Token(woosh.INDENT, ' ', 147, 0, 147, 16), woosh.Token(woosh.NAME, 'v', 147, 16, 147, 17), woosh.Token(woosh.OP, '=', 147, 18, 147, 19), woosh.Token(woosh.NAME, 'int', 147, 20, 147, 23), woosh.Token(woosh.OP, '(', 147, 23, 147, 24), woosh.Token(woosh.NAME, 'v', 147, 24, 147, 25), woosh.Token(woosh.OP, ',', 147, 25, 147, 26), woosh.Token(woosh.NUMBER, '10', 147, 27, 147, 29), woosh.Token(woosh.OP, ')', 147, 29, 147, 30), woosh.Token(woosh.NEWLINE, '\r\n', 147, 30, 148, 0), woosh.Token(woosh.NAME, 't', 148, 16, 148, 17), woosh.Token(woosh.OP, '=', 148, 18, 148, 19), woosh.Token(woosh.NUMBER, '100', 148, 20, 148, 23), woosh.Token(woosh.NEWLINE, '\r\n', 148, 23, 149, 0), woosh.Token(woosh.DEDENT, ' ', 149, 0, 149, 12), woosh.Token(woosh.NAME, 'except', 149, 12, 149, 18), woosh.Token(woosh.NAME, 'ValueError', 149, 19, 149, 29), woosh.Token(woosh.OP, ':', 149, 29, 149, 30), woosh.Token(woosh.NEWLINE, '\r\n', 149, 30, 150, 0), woosh.Token(woosh.INDENT, ' ', 150, 0, 150, 16), woosh.Token(woosh.NAME, 't', 150, 16, 150, 17), woosh.Token(woosh.OP, '=', 150, 18, 150, 19), woosh.Token(woosh.NAME, '_ver_stages', 150, 20, 150, 31), woosh.Token(woosh.OP, '.', 150, 31, 150, 32), woosh.Token(woosh.NAME, 'get', 150, 32, 150, 35), woosh.Token(woosh.OP, '(', 150, 35, 150, 36), woosh.Token(woosh.NAME, 'v', 150, 36, 150, 37), woosh.Token(woosh.OP, ',', 150, 37, 150, 38), woosh.Token(woosh.NUMBER, '0', 150, 39, 150, 40), woosh.Token(woosh.OP, ')', 150, 40, 150, 41), woosh.Token(woosh.NEWLINE, '\r\n', 150, 41, 151, 0), woosh.Token(woosh.DEDENT, ' ', 151, 0, 151, 12), woosh.Token(woosh.NAME, 'result', 151, 12, 151, 18), woosh.Token(woosh.OP, '.', 151, 18, 151, 19), woosh.Token(woosh.NAME, 'extend', 151, 19, 151, 25), woosh.Token(woosh.OP, '(', 151, 25, 151, 26), woosh.Token(woosh.OP, '(', 151, 26, 151, 27), woosh.Token(woosh.NAME, 't', 151, 27, 151, 28), woosh.Token(woosh.OP, ',', 151, 28, 151, 29), woosh.Token(woosh.NAME, 'v', 151, 30, 151, 31), woosh.Token(woosh.OP, ')', 151, 31, 151, 32), woosh.Token(woosh.OP, ')', 151, 32, 151, 33), woosh.Token(woosh.NEWLINE, '\r\n', 151, 33, 152, 0), woosh.Token(woosh.DEDENT, ' ', 152, 0, 152, 4), woosh.Token(woosh.DEDENT, '', 152, 4, 152, 4), woosh.Token(woosh.NAME, 'return', 152, 4, 152, 10), woosh.Token(woosh.NAME, 'result', 152, 11, 152, 17), woosh.Token(woosh.NEWLINE, '\r\n', 152, 17, 153, 0), woosh.Token(woosh.COMMENT, '### Platform specific APIs', 154, 0, 154, 26), woosh.Token(woosh.DEDENT, '', 156, 0, 156, 0), woosh.Token(woosh.NAME, '_libc_search', 156, 0, 156, 12), woosh.Token(woosh.OP, '=', 156, 13, 156, 14), woosh.Token(woosh.NAME, 're', 156, 15, 156, 17), woosh.Token(woosh.OP, '.', 156, 17, 156, 18), woosh.Token(woosh.NAME, 'compile', 156, 18, 156, 25), woosh.Token(woosh.OP, '(', 156, 25, 156, 26), woosh.Token(woosh.STRING, "b'(__libc_init)'", 156, 26, 156, 42), woosh.Token(woosh.STRING, "b'|'", 157, 26, 157, 30), woosh.Token(woosh.STRING, "b'(GLIBC_([0-9.]+))'", 158, 26, 158, 46), woosh.Token(woosh.STRING, "b'|'", 159, 26, 159, 30), woosh.Token(woosh.STRING, "br'(libc(_\\w+)?\\.so(?:\\.(\\d[0-9.]*))?)'", 160, 26, 160, 65), woosh.Token(woosh.OP, ',', 160, 65, 160, 66), woosh.Token(woosh.NAME, 're', 160, 67, 160, 69), woosh.Token(woosh.OP, '.', 160, 69, 160, 70), woosh.Token(woosh.NAME, 'ASCII', 160, 70, 160, 75), woosh.Token(woosh.OP, ')', 160, 75, 160, 76), woosh.Token(woosh.NEWLINE, '\r\n', 160, 76, 161, 0), woosh.Token(woosh.NAME, 'def', 162, 0, 162, 3), woosh.Token(woosh.NAME, 'libc_ver', 162, 4, 162, 12), woosh.Token(woosh.OP, '(', 162, 12, 162, 13), woosh.Token(woosh.NAME, 'executable', 162, 13, 162, 23), woosh.Token(woosh.OP, '=', 162, 23, 162, 24), woosh.Token(woosh.NAME, 'None', 162, 24, 162, 28), woosh.Token(woosh.OP, ',', 162, 28, 162, 29), woosh.Token(woosh.NAME, 'lib', 162, 30, 162, 33), woosh.Token(woosh.OP, '=', 162, 33, 162, 34), woosh.Token(woosh.STRING, "''", 162, 34, 162, 36), woosh.Token(woosh.OP, ',', 162, 36, 162, 37), woosh.Token(woosh.NAME, 'version', 162, 38, 162, 45), woosh.Token(woosh.OP, '=', 162, 45, 162, 46), woosh.Token(woosh.STRING, "''", 162, 46, 162, 48), woosh.Token(woosh.OP, ',', 162, 48, 162, 49), woosh.Token(woosh.NAME, 'chunksize', 162, 50, 162, 59), woosh.Token(woosh.OP, '=', 162, 59, 162, 60), woosh.Token(woosh.NUMBER, '16384', 162, 60, 162, 65), woosh.Token(woosh.OP, ')', 162, 65, 162, 66), woosh.Token(woosh.OP, ':', 162, 66, 162, 67), woosh.Token(woosh.NEWLINE, '\r\n', 162, 67, 163, 0), woosh.Token(woosh.INDENT, ' ', 164, 0, 164, 4), woosh.Token(woosh.STRING, '""" Tries to determine the libc version that the file executable\r\n (which defaults to the Python interpreter) is linked against.\r\n\r\n Returns a tuple of strings (lib,version) which default to the\r\n given parameters in case the lookup fails.\r\n\r\n Note that the function has intimate knowledge of how different\r\n libc versions add symbols to the executable and thus is probably\r\n only useable for executables compiled using gcc.\r\n\r\n The file is read and scanned in chunks of chunksize bytes.\r\n\r\n """', 164, 4, 176, 7), woosh.Token(woosh.NEWLINE, '\r\n', 176, 7, 177, 0), woosh.Token(woosh.NAME, 'if', 177, 4, 177, 6), woosh.Token(woosh.NAME, 'executable', 177, 7, 177, 17), woosh.Token(woosh.NAME, 'is', 177, 18, 177, 20), woosh.Token(woosh.NAME, 'None', 177, 21, 177, 25), woosh.Token(woosh.OP, ':', 177, 25, 177, 26), woosh.Token(woosh.NEWLINE, '\r\n', 177, 26, 178, 0), woosh.Token(woosh.INDENT, ' ', 178, 0, 178, 8), woosh.Token(woosh.NAME, 'try', 178, 8, 178, 11), woosh.Token(woosh.OP, ':', 178, 11, 178, 12), woosh.Token(woosh.NEWLINE, '\r\n', 178, 12, 179, 0), woosh.Token(woosh.INDENT, ' ', 179, 0, 179, 12), woosh.Token(woosh.NAME, 'ver', 179, 12, 179, 15), woosh.Token(woosh.OP, '=', 179, 16, 179, 17), woosh.Token(woosh.NAME, 'os', 179, 18, 179, 20), woosh.Token(woosh.OP, '.', 179, 20, 179, 21), woosh.Token(woosh.NAME, 'confstr', 179, 21, 179, 28), woosh.Token(woosh.OP, '(', 179, 28, 179, 29), woosh.Token(woosh.STRING, "'CS_GNU_LIBC_VERSION'", 179, 29, 179, 50), woosh.Token(woosh.OP, ')', 179, 50, 179, 51), woosh.Token(woosh.NEWLINE, '\r\n', 179, 51, 180, 0), woosh.Token(woosh.COMMENT, "# parse 'glibc 2.28' as ('glibc', '2.28')", 180, 12, 180, 53), woosh.Token(woosh.NAME, 'parts', 181, 12, 181, 17), woosh.Token(woosh.OP, '=', 181, 18, 181, 19), woosh.Token(woosh.NAME, 'ver', 181, 20, 181, 23), woosh.Token(woosh.OP, '.', 181, 23, 181, 24), woosh.Token(woosh.NAME, 'split', 181, 24, 181, 29), woosh.Token(woosh.OP, '(', 181, 29, 181, 30), woosh.Token(woosh.NAME, 'maxsplit', 181, 30, 181, 38), woosh.Token(woosh.OP, '=', 181, 38, 181, 39), woosh.Token(woosh.NUMBER, '1', 181, 39, 181, 40), woosh.Token(woosh.OP, ')', 181, 40, 181, 41), woosh.Token(woosh.NEWLINE, '\r\n', 181, 41, 182, 0), woosh.Token(woosh.NAME, 'if', 182, 12, 182, 14), woosh.Token(woosh.NAME, 'len', 182, 15, 182, 18), woosh.Token(woosh.OP, '(', 182, 18, 182, 19), woosh.Token(woosh.NAME, 'parts', 182, 19, 182, 24), woosh.Token(woosh.OP, ')', 182, 24, 182, 25), woosh.Token(woosh.OP, '==', 182, 26, 182, 28), woosh.Token(woosh.NUMBER, '2', 182, 29, 182, 30), woosh.Token(woosh.OP, ':', 182, 30, 182, 31), woosh.Token(woosh.NEWLINE, '\r\n', 182, 31, 183, 0), woosh.Token(woosh.INDENT, ' ', 183, 0, 183, 16), woosh.Token(woosh.NAME, 'return', 183, 16, 183, 22), woosh.Token(woosh.NAME, 'tuple', 183, 23, 183, 28), woosh.Token(woosh.OP, '(', 183, 28, 183, 29), woosh.Token(woosh.NAME, 'parts', 183, 29, 183, 34), woosh.Token(woosh.OP, ')', 183, 34, 183, 35), woosh.Token(woosh.NEWLINE, '\r\n', 183, 35, 184, 0), woosh.Token(woosh.DEDENT, ' ', 184, 0, 184, 8), woosh.Token(woosh.DEDENT, '', 184, 8, 184, 8), woosh.Token(woosh.NAME, 'except', 184, 8, 184, 14), woosh.Token(woosh.OP, '(', 184, 15, 184, 16), woosh.Token(woosh.NAME, 'AttributeError', 184, 16, 184, 30), woosh.Token(woosh.OP, ',', 184, 30, 184, 31), woosh.Token(woosh.NAME, 'ValueError', 184, 32, 184, 42), woosh.Token(woosh.OP, ',', 184, 42, 184, 43), woosh.Token(woosh.NAME, 'OSError', 184, 44, 184, 51), woosh.Token(woosh.OP, ')', 184, 51, 184, 52), woosh.Token(woosh.OP, ':', 184, 52, 184, 53), woosh.Token(woosh.NEWLINE, '\r\n', 184, 53, 185, 0), woosh.Token(woosh.COMMENT, '# os.confstr() or CS_GNU_LIBC_VERSION value not available', 185, 12, 185, 69), woosh.Token(woosh.INDENT, ' ', 186, 0, 186, 12), woosh.Token(woosh.NAME, 'pass', 186, 12, 186, 16), woosh.Token(woosh.NEWLINE, '\r\n', 186, 16, 187, 0), woosh.Token(woosh.DEDENT, ' ', 188, 0, 188, 8), woosh.Token(woosh.NAME, 'executable', 188, 8, 188, 18), woosh.Token(woosh.OP, '=', 188, 19, 188, 20), woosh.Token(woosh.NAME, 'sys', 188, 21, 188, 24), woosh.Token(woosh.OP, '.', 188, 24, 188, 25), woosh.Token(woosh.NAME, 'executable', 188, 25, 188, 35), woosh.Token(woosh.NEWLINE, '\r\n', 188, 35, 189, 0), woosh.Token(woosh.DEDENT, ' ', 190, 0, 190, 4), woosh.Token(woosh.NAME, 'V', 190, 4, 190, 5), woosh.Token(woosh.OP, '=', 190, 6, 190, 7), woosh.Token(woosh.NAME, '_comparable_version', 190, 8, 190, 27), woosh.Token(woosh.NEWLINE, '\r\n', 190, 27, 191, 0), woosh.Token(woosh.NAME, 'if', 191, 4, 191, 6), woosh.Token(woosh.NAME, 'hasattr', 191, 7, 191, 14), woosh.Token(woosh.OP, '(', 191, 14, 191, 15), woosh.Token(woosh.NAME, 'os', 191, 15, 191, 17), woosh.Token(woosh.OP, '.', 191, 17, 191, 18), woosh.Token(woosh.NAME, 'path', 191, 18, 191, 22), woosh.Token(woosh.OP, ',', 191, 22, 191, 23), woosh.Token(woosh.STRING, "'realpath'", 191, 24, 191, 34), woosh.Token(woosh.OP, ')', 191, 34, 191, 35), woosh.Token(woosh.OP, ':', 191, 35, 191, 36), woosh.Token(woosh.NEWLINE, '\r\n', 191, 36, 192, 0), woosh.Token(woosh.COMMENT, '# Python 2.2 introduced os.path.realpath(); it is used', 192, 8, 192, 62), woosh.Token(woosh.COMMENT, '# here to work around problems with Cygwin not being', 193, 8, 193, 60), woosh.Token(woosh.COMMENT, '# able to open symlinks for reading', 194, 8, 194, 43), woosh.Token(woosh.INDENT, ' ', 195, 0, 195, 8), woosh.Token(woosh.NAME, 'executable', 195, 8, 195, 18), woosh.Token(woosh.OP, '=', 195, 19, 195, 20), woosh.Token(woosh.NAME, 'os', 195, 21, 195, 23), woosh.Token(woosh.OP, '.', 195, 23, 195, 24), woosh.Token(woosh.NAME, 'path', 195, 24, 195, 28), woosh.Token(woosh.OP, '.', 195, 28, 195, 29), woosh.Token(woosh.NAME, 'realpath', 195, 29, 195, 37), woosh.Token(woosh.OP, '(', 195, 37, 195, 38), woosh.Token(woosh.NAME, 'executable', 195, 38, 195, 48), woosh.Token(woosh.OP, ')', 195, 48, 195, 49), woosh.Token(woosh.NEWLINE, '\r\n', 195, 49, 196, 0), woosh.Token(woosh.DEDENT, ' ', 196, 0, 196, 4), woosh.Token(woosh.NAME, 'with', 196, 4, 196, 8), woosh.Token(woosh.NAME, 'open', 196, 9, 196, 13), woosh.Token(woosh.OP, '(', 196, 13, 196, 14), woosh.Token(woosh.NAME, 'executable', 196, 14, 196, 24), woosh.Token(woosh.OP, ',', 196, 24, 196, 25), woosh.Token(woosh.STRING, "'rb'", 196, 26, 196, 30), woosh.Token(woosh.OP, ')', 196, 30, 196, 31), woosh.Token(woosh.NAME, 'as', 196, 32, 196, 34), woosh.Token(woosh.NAME, 'f', 196, 35, 196, 36), woosh.Token(woosh.OP, ':', 196, 36, 196, 37), woosh.Token(woosh.NEWLINE, '\r\n', 196, 37, 197, 0), woosh.Token(woosh.INDENT, ' ', 197, 0, 197, 8), woosh.Token(woosh.NAME, 'binary', 197, 8, 197, 14), woosh.Token(woosh.OP, '=', 197, 15, 197, 16), woosh.Token(woosh.NAME, 'f', 197, 17, 197, 18), woosh.Token(woosh.OP, '.', 197, 18, 197, 19), woosh.Token(woosh.NAME, 'read', 197, 19, 197, 23), woosh.Token(woosh.OP, '(', 197, 23, 197, 24), woosh.Token(woosh.NAME, 'chunksize', 197, 24, 197, 33), woosh.Token(woosh.OP, ')', 197, 33, 197, 34), woosh.Token(woosh.NEWLINE, '\r\n', 197, 34, 198, 0), woosh.Token(woosh.NAME, 'pos', 198, 8, 198, 11), woosh.Token(woosh.OP, '=', 198, 12, 198, 13), woosh.Token(woosh.NUMBER, '0', 198, 14, 198, 15), woosh.Token(woosh.NEWLINE, '\r\n', 198, 15, 199, 0), woosh.Token(woosh.NAME, 'while', 199, 8, 199, 13), woosh.Token(woosh.NAME, 'pos', 199, 14, 199, 17), woosh.Token(woosh.OP, '<', 199, 18, 199, 19), woosh.Token(woosh.NAME, 'len', 199, 20, 199, 23), woosh.Token(woosh.OP, '(', 199, 23, 199, 24), woosh.Token(woosh.NAME, 'binary', 199, 24, 199, 30), woosh.Token(woosh.OP, ')', 199, 30, 199, 31), woosh.Token(woosh.OP, ':', 199, 31, 199, 32), woosh.Token(woosh.NEWLINE, '\r\n', 199, 32, 200, 0), woosh.Token(woosh.INDENT, ' ', 200, 0, 200, 12), woosh.Token(woosh.NAME, 'if', 200, 12, 200, 14), woosh.Token(woosh.STRING, "b'libc'", 200, 15, 200, 22), woosh.Token(woosh.NAME, 'in', 200, 23, 200, 25), woosh.Token(woosh.NAME, 'binary', 200, 26, 200, 32), woosh.Token(woosh.NAME, 'or', 200, 33, 200, 35), woosh.Token(woosh.STRING, "b'GLIBC'", 200, 36, 200, 44), woosh.Token(woosh.NAME, 'in', 200, 45, 200, 47), woosh.Token(woosh.NAME, 'binary', 200, 48, 200, 54), woosh.Token(woosh.OP, ':', 200, 54, 200, 55), woosh.Token(woosh.NEWLINE, '\r\n', 200, 55, 201, 0), woosh.Token(woosh.INDENT, ' ', 201, 0, 201, 16), woosh.Token(woosh.NAME, 'm', 201, 16, 201, 17), woosh.Token(woosh.OP, '=', 201, 18, 201, 19), woosh.Token(woosh.NAME, '_libc_search', 201, 20, 201, 32), woosh.Token(woosh.OP, '.', 201, 32, 201, 33), woosh.Token(woosh.NAME, 'search', 201, 33, 201, 39), woosh.Token(woosh.OP, '(', 201, 39, 201, 40), woosh.Token(woosh.NAME, 'binary', 201, 40, 201, 46), woosh.Token(woosh.OP, ',', 201, 46, 201, 47), woosh.Token(woosh.NAME, 'pos', 201, 48, 201, 51), woosh.Token(woosh.OP, ')', 201, 51, 201, 52), woosh.Token(woosh.NEWLINE, '\r\n', 201, 52, 202, 0), woosh.Token(woosh.DEDENT, ' ', 202, 0, 202, 12), woosh.Token(woosh.NAME, 'else', 202, 12, 202, 16), woosh.Token(woosh.OP, ':', 202, 16, 202, 17), woosh.Token(woosh.NEWLINE, '\r\n', 202, 17, 203, 0), woosh.Token(woosh.INDENT, ' ', 203, 0, 203, 16), woosh.Token(woosh.NAME, 'm', 203, 16, 203, 17), woosh.Token(woosh.OP, '=', 203, 18, 203, 19), woosh.Token(woosh.NAME, 'None', 203, 20, 203, 24), woosh.Token(woosh.NEWLINE, '\r\n', 203, 24, 204, 0), woosh.Token(woosh.DEDENT, ' ', 204, 0, 204, 12), woosh.Token(woosh.NAME, 'if', 204, 12, 204, 14), woosh.Token(woosh.NAME, 'not', 204, 15, 204, 18), woosh.Token(woosh.NAME, 'm', 204, 19, 204, 20), woosh.Token(woosh.NAME, 'or', 204, 21, 204, 23), woosh.Token(woosh.NAME, 'm', 204, 24, 204, 25), woosh.Token(woosh.OP, '.', 204, 25, 204, 26), woosh.Token(woosh.NAME, 'end', 204, 26, 204, 29), woosh.Token(woosh.OP, '(', 204, 29, 204, 30), woosh.Token(woosh.OP, ')', 204, 30, 204, 31), woosh.Token(woosh.OP, '==', 204, 32, 204, 34), woosh.Token(woosh.NAME, 'len', 204, 35, 204, 38), woosh.Token(woosh.OP, '(', 204, 38, 204, 39), woosh.Token(woosh.NAME, 'binary', 204, 39, 204, 45), woosh.Token(woosh.OP, ')', 204, 45, 204, 46), woosh.Token(woosh.OP, ':', 204, 46, 204, 47), woosh.Token(woosh.NEWLINE, '\r\n', 204, 47, 205, 0), woosh.Token(woosh.INDENT, ' ', 205, 0, 205, 16), woosh.Token(woosh.NAME, 'chunk', 205, 16, 205, 21), woosh.Token(woosh.OP, '=', 205, 22, 205, 23), woosh.Token(woosh.NAME, 'f', 205, 24, 205, 25), woosh.Token(woosh.OP, '.', 205, 25, 205, 26), woosh.Token(woosh.NAME, 'read', 205, 26, 205, 30), woosh.Token(woosh.OP, '(', 205, 30, 205, 31), woosh.Token(woosh.NAME, 'chunksize', 205, 31, 205, 40), woosh.Token(woosh.OP, ')', 205, 40, 205, 41), woosh.Token(woosh.NEWLINE, '\r\n', 205, 41, 206, 0), woosh.Token(woosh.NAME, 'if', 206, 16, 206, 18), woosh.Token(woosh.NAME, 'chunk', 206, 19, 206, 24), woosh.Token(woosh.OP, ':', 206, 24, 206, 25), woosh.Token(woosh.NEWLINE, '\r\n', 206, 25, 207, 0), woosh.Token(woosh.INDENT, ' ', 207, 0, 207, 20), woosh.Token(woosh.NAME, 'binary', 207, 20, 207, 26), woosh.Token(woosh.OP, '=', 207, 27, 207, 28), woosh.Token(woosh.NAME, 'binary', 207, 29, 207, 35), woosh.Token(woosh.OP, '[', 207, 35, 207, 36), woosh.Token(woosh.NAME, 'max', 207, 36, 207, 39), woosh.Token(woosh.OP, '(', 207, 39, 207, 40), woosh.Token(woosh.NAME, 'pos', 207, 40, 207, 43), woosh.Token(woosh.OP, ',', 207, 43, 207, 44), woosh.Token(woosh.NAME, 'len', 207, 45, 207, 48), woosh.Token(woosh.OP, '(', 207, 48, 207, 49), woosh.Token(woosh.NAME, 'binary', 207, 49, 207, 55), woosh.Token(woosh.OP, ')', 207, 55, 207, 56), woosh.Token(woosh.OP, '-', 207, 57, 207, 58), woosh.Token(woosh.NUMBER, '1000', 207, 59, 207, 63), woosh.Token(woosh.OP, ')', 207, 63, 207, 64), woosh.Token(woosh.OP, ':', 207, 64, 207, 65), woosh.Token(woosh.OP, ']', 207, 65, 207, 66), woosh.Token(woosh.OP, '+', 207, 67, 207, 68), woosh.Token(woosh.NAME, 'chunk', 207, 69, 207, 74), woosh.Token(woosh.NEWLINE, '\r\n', 207, 74, 208, 0), woosh.Token(woosh.NAME, 'pos', 208, 20, 208, 23), woosh.Token(woosh.OP, '=', 208, 24, 208, 25), woosh.Token(woosh.NUMBER, '0', 208, 26, 208, 27), woosh.Token(woosh.NEWLINE, '\r\n', 208, 27, 209, 0), woosh.Token(woosh.NAME, 'continue', 209, 20, 209, 28), woosh.Token(woosh.NEWLINE, '\r\n', 209, 28, 210, 0), woosh.Token(woosh.DEDENT, ' ', 210, 0, 210, 16), woosh.Token(woosh.NAME, 'if', 210, 16, 210, 18), woosh.Token(woosh.NAME, 'not', 210, 19, 210, 22), woosh.Token(woosh.NAME, 'm', 210, 23, 210, 24), woosh.Token(woosh.OP, ':', 210, 24, 210, 25), woosh.Token(woosh.NEWLINE, '\r\n', 210, 25, 211, 0), woosh.Token(woosh.INDENT, ' ', 211, 0, 211, 20), woosh.Token(woosh.NAME, 'break', 211, 20, 211, 25), woosh.Token(woosh.NEWLINE, '\r\n', 211, 25, 212, 0), woosh.Token(woosh.DEDENT, ' ', 212, 0, 212, 12), woosh.Token(woosh.DEDENT, '', 212, 12, 212, 12), woosh.Token(woosh.NAME, 'libcinit', 212, 12, 212, 20), woosh.Token(woosh.OP, ',', 212, 20, 212, 21), woosh.Token(woosh.NAME, 'glibc', 212, 22, 212, 27), woosh.Token(woosh.OP, ',', 212, 27, 212, 28), woosh.Token(woosh.NAME, 'glibcversion', 212, 29, 212, 41), woosh.Token(woosh.OP, ',', 212, 41, 212, 42), woosh.Token(woosh.NAME, 'so', 212, 43, 212, 45), woosh.Token(woosh.OP, ',', 212, 45, 212, 46), woosh.Token(woosh.NAME, 'threads', 212, 47, 212, 54), woosh.Token(woosh.OP, ',', 212, 54, 212, 55), woosh.Token(woosh.NAME, 'soversion', 212, 56, 212, 65), woosh.Token(woosh.OP, '=', 212, 66, 212, 67), woosh.Token(woosh.OP, '[', 212, 68, 212, 69), woosh.Token(woosh.NAME, 's', 213, 16, 213, 17), woosh.Token(woosh.OP, '.', 213, 17, 213, 18), woosh.Token(woosh.NAME, 'decode', 213, 18, 213, 24), woosh.Token(woosh.OP, '(', 213, 24, 213, 25), woosh.Token(woosh.STRING, "'latin1'", 213, 25, 213, 33), woosh.Token(woosh.OP, ')', 213, 33, 213, 34), woosh.Token(woosh.NAME, 'if', 213, 35, 213, 37), woosh.Token(woosh.NAME, 's', 213, 38, 213, 39), woosh.Token(woosh.NAME, 'is', 213, 40, 213, 42), woosh.Token(woosh.NAME, 'not', 213, 43, 213, 46), woosh.Token(woosh.NAME, 'None', 213, 47, 213, 51), woosh.Token(woosh.NAME, 'else', 213, 52, 213, 56), woosh.Token(woosh.NAME, 's', 213, 57, 213, 58), woosh.Token(woosh.NAME, 'for', 214, 16, 214, 19), woosh.Token(woosh.NAME, 's', 214, 20, 214, 21), woosh.Token(woosh.NAME, 'in', 214, 22, 214, 24), woosh.Token(woosh.NAME, 'm', 214, 25, 214, 26), woosh.Token(woosh.OP, '.', 214, 26, 214, 27), woosh.Token(woosh.NAME, 'groups', 214, 27, 214, 33), woosh.Token(woosh.OP, '(', 214, 33, 214, 34), woosh.Token(woosh.OP, ')', 214, 34, 214, 35), woosh.Token(woosh.OP, ']', 214, 35, 214, 36), woosh.Token(woosh.NEWLINE, '\r\n', 214, 36, 215, 0), woosh.Token(woosh.NAME, 'if', 215, 12, 215, 14), woosh.Token(woosh.NAME, 'libcinit', 215, 15, 215, 23), woosh.Token(woosh.NAME, 'and', 215, 24, 215, 27), woosh.Token(woosh.NAME, 'not', 215, 28, 215, 31), woosh.Token(woosh.NAME, 'lib', 215, 32, 215, 35), woosh.Token(woosh.OP, ':', 215, 35, 215, 36), woosh.Token(woosh.NEWLINE, '\r\n', 215, 36, 216, 0), woosh.Token(woosh.INDENT, ' ', 216, 0, 216, 16), woosh.Token(woosh.NAME, 'lib', 216, 16, 216, 19), woosh.Token(woosh.OP, '=', 216, 20, 216, 21), woosh.Token(woosh.STRING, "'libc'", 216, 22, 216, 28), woosh.Token(woosh.NEWLINE, '\r\n', 216, 28, 217, 0), woosh.Token(woosh.DEDENT, ' ', 217, 0, 217, 12), woosh.Token(woosh.NAME, 'elif', 217, 12, 217, 16), woosh.Token(woosh.NAME, 'glibc', 217, 17, 217, 22), woosh.Token(woosh.OP, ':', 217, 22, 217, 23), woosh.Token(woosh.NEWLINE, '\r\n', 217, 23, 218, 0), woosh.Token(woosh.INDENT, ' ', 218, 0, 218, 16), woosh.Token(woosh.NAME, 'if', 218, 16, 218, 18), woosh.Token(woosh.NAME, 'lib', 218, 19, 218, 22), woosh.Token(woosh.OP, '!=', 218, 23, 218, 25), woosh.Token(woosh.STRING, "'glibc'", 218, 26, 218, 33), woosh.Token(woosh.OP, ':', 218, 33, 218, 34), woosh.Token(woosh.NEWLINE, '\r\n', 218, 34, 219, 0), woosh.Token(woosh.INDENT, ' ', 219, 0, 219, 20), woosh.Token(woosh.NAME, 'lib', 219, 20, 219, 23), woosh.Token(woosh.OP, '=', 219, 24, 219, 25), woosh.Token(woosh.STRING, "'glibc'", 219, 26, 219, 33), woosh.Token(woosh.NEWLINE, '\r\n', 219, 33, 220, 0), woosh.Token(woosh.NAME, 'version', 220, 20, 220, 27), woosh.Token(woosh.OP, '=', 220, 28, 220, 29), woosh.Token(woosh.NAME, 'glibcversion', 220, 30, 220, 42), woosh.Token(woosh.NEWLINE, '\r\n', 220, 42, 221, 0), woosh.Token(woosh.DEDENT, ' ', 221, 0, 221, 16), woosh.Token(woosh.NAME, 'elif', 221, 16, 221, 20), woosh.Token(woosh.NAME, 'V', 221, 21, 221, 22), woosh.Token(woosh.OP, '(', 221, 22, 221, 23), woosh.Token(woosh.NAME, 'glibcversion', 221, 23, 221, 35), woosh.Token(woosh.OP, ')', 221, 35, 221, 36), woosh.Token(woosh.OP, '>', 221, 37, 221, 38), woosh.Token(woosh.NAME, 'V', 221, 39, 221, 40), woosh.Token(woosh.OP, '(', 221, 40, 221, 41), woosh.Token(woosh.NAME, 'version', 221, 41, 221, 48), woosh.Token(woosh.OP, ')', 221, 48, 221, 49), woosh.Token(woosh.OP, ':', 221, 49, 221, 50), woosh.Token(woosh.NEWLINE, '\r\n', 221, 50, 222, 0), woosh.Token(woosh.INDENT, ' ', 222, 0, 222, 20), woosh.Token(woosh.NAME, 'version', 222, 20, 222, 27), woosh.Token(woosh.OP, '=', 222, 28, 222, 29), woosh.Token(woosh.NAME, 'glibcversion', 222, 30, 222, 42), woosh.Token(woosh.NEWLINE, '\r\n', 222, 42, 223, 0), woosh.Token(woosh.DEDENT, ' ', 223, 0, 223, 12), woosh.Token(woosh.DEDENT, '', 223, 12, 223, 12), woosh.Token(woosh.NAME, 'elif', 223, 12, 223, 16), woosh.Token(woosh.NAME, 'so', 223, 17, 223, 19), woosh.Token(woosh.OP, ':', 223, 19, 223, 20), woosh.Token(woosh.NEWLINE, '\r\n', 223, 20, 224, 0), woosh.Token(woosh.INDENT, ' ', 224, 0, 224, 16), woosh.Token(woosh.NAME, 'if', 224, 16, 224, 18), woosh.Token(woosh.NAME, 'lib', 224, 19, 224, 22), woosh.Token(woosh.OP, '!=', 224, 23, 224, 25), woosh.Token(woosh.STRING, "'glibc'", 224, 26, 224, 33), woosh.Token(woosh.OP, ':', 224, 33, 224, 34), woosh.Token(woosh.NEWLINE, '\r\n', 224, 34, 225, 0), woosh.Token(woosh.INDENT, ' ', 225, 0, 225, 20), woosh.Token(woosh.NAME, 'lib', 225, 20, 225, 23), woosh.Token(woosh.OP, '=', 225, 24, 225, 25), woosh.Token(woosh.STRING, "'libc'", 225, 26, 225, 32), woosh.Token(woosh.NEWLINE, '\r\n', 225, 32, 226, 0), woosh.Token(woosh.NAME, 'if', 226, 20, 226, 22), woosh.Token(woosh.NAME, 'soversion', 226, 23, 226, 32), woosh.Token(woosh.NAME, 'and', 226, 33, 226, 36), woosh.Token(woosh.OP, '(', 226, 37, 226, 38), woosh.Token(woosh.NAME, 'not', 226, 38, 226, 41), woosh.Token(woosh.NAME, 'version', 226, 42, 226, 49), woosh.Token(woosh.NAME, 'or', 226, 50, 226, 52), woosh.Token(woosh.NAME, 'V', 226, 53, 226, 54), woosh.Token(woosh.OP, '(', 226, 54, 226, 55), woosh.Token(woosh.NAME, 'soversion', 226, 55, 226, 64), woosh.Token(woosh.OP, ')', 226, 64, 226, 65), woosh.Token(woosh.OP, '>', 226, 66, 226, 67), woosh.Token(woosh.NAME, 'V', 226, 68, 226, 69), woosh.Token(woosh.OP, '(', 226, 69, 226, 70), woosh.Token(woosh.NAME, 'version', 226, 70, 226, 77), woosh.Token(woosh.OP, ')', 226, 77, 226, 78), woosh.Token(woosh.OP, ')', 226, 78, 226, 79), woosh.Token(woosh.OP, ':', 226, 79, 226, 80), woosh.Token(woosh.NEWLINE, '\r\n', 226, 80, 227, 0), woosh.Token(woosh.INDENT, ' ', 227, 0, 227, 24), woosh.Token(woosh.NAME, 'version', 227, 24, 227, 31), woosh.Token(woosh.OP, '=', 227, 32, 227, 33), woosh.Token(woosh.NAME, 'soversion', 227, 34, 227, 43), woosh.Token(woosh.NEWLINE, '\r\n', 227, 43, 228, 0), woosh.Token(woosh.DEDENT, ' ', 228, 0, 228, 20), woosh.Token(woosh.NAME, 'if', 228, 20, 228, 22), woosh.Token(woosh.NAME, 'threads', 228, 23, 228, 30), woosh.Token(woosh.NAME, 'and', 228, 31, 228, 34), woosh.Token(woosh.NAME, 'version', 228, 35, 228, 42), woosh.Token(woosh.OP, '[', 228, 42, 228, 43), woosh.Token(woosh.OP, '-', 228, 43, 228, 44), woosh.Token(woosh.NAME, 'len', 228, 44, 228, 47), woosh.Token(woosh.OP, '(', 228, 47, 228, 48), woosh.Token(woosh.NAME, 'threads', 228, 48, 228, 55), woosh.Token(woosh.OP, ')', 228, 55, 228, 56), woosh.Token(woosh.OP, ':', 228, 56, 228, 57), woosh.Token(woosh.OP, ']', 228, 57, 228, 58), woosh.Token(woosh.OP, '!=', 228, 59, 228, 61), woosh.Token(woosh.NAME, 'threads', 228, 62, 228, 69), woosh.Token(woosh.OP, ':', 228, 69, 228, 70), woosh.Token(woosh.NEWLINE, '\r\n', 228, 70, 229, 0), woosh.Token(woosh.INDENT, ' ', 229, 0, 229, 24), woosh.Token(woosh.NAME, 'version', 229, 24, 229, 31), woosh.Token(woosh.OP, '=', 229, 32, 229, 33), woosh.Token(woosh.NAME, 'version', 229, 34, 229, 41), woosh.Token(woosh.OP, '+', 229, 42, 229, 43), woosh.Token(woosh.NAME, 'threads', 229, 44, 229, 51), woosh.Token(woosh.NEWLINE, '\r\n', 229, 51, 230, 0), woosh.Token(woosh.DEDENT, ' ', 230, 0, 230, 12), woosh.Token(woosh.DEDENT, '', 230, 12, 230, 12), woosh.Token(woosh.DEDENT, '', 230, 12, 230, 12), woosh.Token(woosh.NAME, 'pos', 230, 12, 230, 15), woosh.Token(woosh.OP, '=', 230, 16, 230, 17), woosh.Token(woosh.NAME, 'm', 230, 18, 230, 19), woosh.Token(woosh.OP, '.', 230, 19, 230, 20), woosh.Token(woosh.NAME, 'end', 230, 20, 230, 23), woosh.Token(woosh.OP, '(', 230, 23, 230, 24), woosh.Token(woosh.OP, ')', 230, 24, 230, 25), woosh.Token(woosh.NEWLINE, '\r\n', 230, 25, 231, 0), woosh.Token(woosh.DEDENT, ' ', 231, 0, 231, 4), woosh.Token(woosh.DEDENT, '', 231, 4, 231, 4), woosh.Token(woosh.NAME, 'return', 231, 4, 231, 10), woosh.Token(woosh.NAME, 'lib', 231, 11, 231, 14), woosh.Token(woosh.OP, ',', 231, 14, 231, 15), woosh.Token(woosh.NAME, 'version', 231, 16, 231, 23), woosh.Token(woosh.NEWLINE, '\r\n', 231, 23, 232, 0), woosh.Token(woosh.DEDENT, '', 233, 0, 233, 0), woosh.Token(woosh.NAME, 'def', 233, 0, 233, 3), woosh.Token(woosh.NAME, '_norm_version', 233, 4, 233, 17), woosh.Token(woosh.OP, '(', 233, 17, 233, 18), woosh.Token(woosh.NAME, 'version', 233, 18, 233, 25), woosh.Token(woosh.OP, ',', 233, 25, 233, 26), woosh.Token(woosh.NAME, 'build', 233, 27, 233, 32), woosh.Token(woosh.OP, '=', 233, 32, 233, 33), woosh.Token(woosh.STRING, "''", 233, 33, 233, 35), woosh.Token(woosh.OP, ')', 233, 35, 233, 36), woosh.Token(woosh.OP, ':', 233, 36, 233, 37), woosh.Token(woosh.NEWLINE, '\r\n', 233, 37, 234, 0), woosh.Token(woosh.INDENT, ' ', 235, 0, 235, 4), woosh.Token(woosh.STRING, '""" Normalize the version and build strings and return a single\r\n version string using the format major.minor.build (or patchlevel).\r\n """', 235, 4, 237, 7), woosh.Token(woosh.NEWLINE, '\r\n', 237, 7, 238, 0), woosh.Token(woosh.NAME, 'l', 238, 4, 238, 5), woosh.Token(woosh.OP, '=', 238, 6, 238, 7), woosh.Token(woosh.NAME, 'version', 238, 8, 238, 15), woosh.Token(woosh.OP, '.', 238, 15, 238, 16), woosh.Token(woosh.NAME, 'split', 238, 16, 238, 21), woosh.Token(woosh.OP, '(', 238, 21, 238, 22), woosh.Token(woosh.STRING, "'.'", 238, 22, 238, 25), woosh.Token(woosh.OP, ')', 238, 25, 238, 26), woosh.Token(woosh.NEWLINE, '\r\n', 238, 26, 239, 0), woosh.Token(woosh.NAME, 'if', 239, 4, 239, 6), woosh.Token(woosh.NAME, 'build', 239, 7, 239, 12), woosh.Token(woosh.OP, ':', 239, 12, 239, 13), woosh.Token(woosh.NEWLINE, '\r\n', 239, 13, 240, 0), woosh.Token(woosh.INDENT, ' ', 240, 0, 240, 8), woosh.Token(woosh.NAME, 'l', 240, 8, 240, 9), woosh.Token(woosh.OP, '.', 240, 9, 240, 10), woosh.Token(woosh.NAME, 'append', 240, 10, 240, 16), woosh.Token(woosh.OP, '(', 240, 16, 240, 17), woosh.Token(woosh.NAME, 'build', 240, 17, 240, 22), woosh.Token(woosh.OP, ')', 240, 22, 240, 23), woosh.Token(woosh.NEWLINE, '\r\n', 240, 23, 241, 0), woosh.Token(woosh.DEDENT, ' ', 241, 0, 241, 4), woosh.Token(woosh.NAME, 'try', 241, 4, 241, 7), woosh.Token(woosh.OP, ':', 241, 7, 241, 8), woosh.Token(woosh.NEWLINE, '\r\n', 241, 8, 242, 0), woosh.Token(woosh.INDENT, ' ', 242, 0, 242, 8), woosh.Token(woosh.NAME, 'ints', 242, 8, 242, 12), woosh.Token(woosh.OP, '=', 242, 13, 242, 14), woosh.Token(woosh.NAME, 'map', 242, 15, 242, 18), woosh.Token(woosh.OP, '(', 242, 18, 242, 19), woosh.Token(woosh.NAME, 'int', 242, 19, 242, 22), woosh.Token(woosh.OP, ',', 242, 22, 242, 23), woosh.Token(woosh.NAME, 'l', 242, 24, 242, 25), woosh.Token(woosh.OP, ')', 242, 25, 242, 26), woosh.Token(woosh.NEWLINE, '\r\n', 242, 26, 243, 0), woosh.Token(woosh.DEDENT, ' ', 243, 0, 243, 4), woosh.Token(woosh.NAME, 'except', 243, 4, 243, 10), woosh.Token(woosh.NAME, 'ValueError', 243, 11, 243, 21), woosh.Token(woosh.OP, ':', 243, 21, 243, 22), woosh.Token(woosh.NEWLINE, '\r\n', 243, 22, 244, 0), woosh.Token(woosh.INDENT, ' ', 244, 0, 244, 8), woosh.Token(woosh.NAME, 'strings', 244, 8, 244, 15), woosh.Token(woosh.OP, '=', 244, 16, 244, 17), woosh.Token(woosh.NAME, 'l', 244, 18, 244, 19), woosh.Token(woosh.NEWLINE, '\r\n', 244, 19, 245, 0), woosh.Token(woosh.DEDENT, ' ', 245, 0, 245, 4), woosh.Token(woosh.NAME, 'else', 245, 4, 245, 8), woosh.Token(woosh.OP, ':', 245, 8, 245, 9), woosh.Token(woosh.NEWLINE, '\r\n', 245, 9, 246, 0), woosh.Token(woosh.INDENT, ' ', 246, 0, 246, 8), woosh.Token(woosh.NAME, 'strings', 246, 8, 246, 15), woosh.Token(woosh.OP, '=', 246, 16, 246, 17), woosh.Token(woosh.NAME, 'list', 246, 18, 246, 22), woosh.Token(woosh.OP, '(', 246, 22, 246, 23), woosh.Token(woosh.NAME, 'map', 246, 23, 246, 26), woosh.Token(woosh.OP, '(', 246, 26, 246, 27), woosh.Token(woosh.NAME, 'str', 246, 27, 246, 30), woosh.Token(woosh.OP, ',', 246, 30, 246, 31), woosh.Token(woosh.NAME, 'ints', 246, 32, 246, 36), woosh.Token(woosh.OP, ')', 246, 36, 246, 37), woosh.Token(woosh.OP, ')', 246, 37, 246, 38), woosh.Token(woosh.NEWLINE, '\r\n', 246, 38, 247, 0), woosh.Token(woosh.DEDENT, ' ', 247, 0, 247, 4), woosh.Token(woosh.NAME, 'version', 247, 4, 247, 11), woosh.Token(woosh.OP, '=', 247, 12, 247, 13), woosh.Token(woosh.STRING, "'.'", 247, 14, 247, 17), woosh.Token(woosh.OP, '.', 247, 17, 247, 18), woosh.Token(woosh.NAME, 'join', 247, 18, 247, 22), woosh.Token(woosh.OP, '(', 247, 22, 247, 23), woosh.Token(woosh.NAME, 'strings', 247, 23, 247, 30), woosh.Token(woosh.OP, '[', 247, 30, 247, 31), woosh.Token(woosh.OP, ':', 247, 31, 247, 32), woosh.Token(woosh.NUMBER, '3', 247, 32, 247, 33), woosh.Token(woosh.OP, ']', 247, 33, 247, 34), woosh.Token(woosh.OP, ')', 247, 34, 247, 35), woosh.Token(woosh.NEWLINE, '\r\n', 247, 35, 248, 0), woosh.Token(woosh.NAME, 'return', 248, 4, 248, 10), woosh.Token(woosh.NAME, 'version', 248, 11, 248, 18), woosh.Token(woosh.NEWLINE, '\r\n', 248, 18, 249, 0), woosh.Token(woosh.DEDENT, '', 250, 0, 250, 0), woosh.Token(woosh.NAME, '_ver_output', 250, 0, 250, 11), woosh.Token(woosh.OP, '=', 250, 12, 250, 13), woosh.Token(woosh.NAME, 're', 250, 14, 250, 16), woosh.Token(woosh.OP, '.', 250, 16, 250, 17), woosh.Token(woosh.NAME, 'compile', 250, 17, 250, 24), woosh.Token(woosh.OP, '(', 250, 24, 250, 25), woosh.Token(woosh.STRING, "r'(?:([\\w ]+) ([\\w.]+) '", 250, 25, 250, 49), woosh.Token(woosh.STRING, "r'.*'", 251, 25, 251, 30), woosh.Token(woosh.STRING, "r'\\[.* ([\\d.]+)\\])'", 252, 25, 252, 44), woosh.Token(woosh.OP, ')', 252, 44, 252, 45), woosh.Token(woosh.NEWLINE, '\r\n', 252, 45, 253, 0), woosh.Token(woosh.COMMENT, '# Examples of VER command output:', 254, 0, 254, 33), woosh.Token(woosh.COMMENT, '#', 255, 0, 255, 1), woosh.Token(woosh.COMMENT, '# Windows 2000: Microsoft Windows 2000 [Version 5.00.2195]', 256, 0, 256, 61), woosh.Token(woosh.COMMENT, '# Windows XP: Microsoft Windows XP [Version 5.1.2600]', 257, 0, 257, 58), woosh.Token(woosh.COMMENT, '# Windows Vista: Microsoft Windows [Version 6.0.6002]', 258, 0, 258, 55), woosh.Token(woosh.COMMENT, '#', 259, 0, 259, 1), woosh.Token(woosh.COMMENT, '# Note that the "Version" string gets localized on different', 260, 0, 260, 60), woosh.Token(woosh.COMMENT, '# Windows versions.', 261, 0, 261, 19), woosh.Token(woosh.NAME, 'def', 263, 0, 263, 3), woosh.Token(woosh.NAME, '_syscmd_ver', 263, 4, 263, 15), woosh.Token(woosh.OP, '(', 263, 15, 263, 16), woosh.Token(woosh.NAME, 'system', 263, 16, 263, 22), woosh.Token(woosh.OP, '=', 263, 22, 263, 23), woosh.Token(woosh.STRING, "''", 263, 23, 263, 25), woosh.Token(woosh.OP, ',', 263, 25, 263, 26), woosh.Token(woosh.NAME, 'release', 263, 27, 263, 34), woosh.Token(woosh.OP, '=', 263, 34, 263, 35), woosh.Token(woosh.STRING, "''", 263, 35, 263, 37), woosh.Token(woosh.OP, ',', 263, 37, 263, 38), woosh.Token(woosh.NAME, 'version', 263, 39, 263, 46), woosh.Token(woosh.OP, '=', 263, 46, 263, 47), woosh.Token(woosh.STRING, "''", 263, 47, 263, 49), woosh.Token(woosh.OP, ',', 263, 49, 263, 50), woosh.Token(woosh.NAME, 'supported_platforms', 265, 15, 265, 34), woosh.Token(woosh.OP, '=', 265, 34, 265, 35), woosh.Token(woosh.OP, '(', 265, 35, 265, 36), woosh.Token(woosh.STRING, "'win32'", 265, 36, 265, 43), woosh.Token(woosh.OP, ',', 265, 43, 265, 44), woosh.Token(woosh.STRING, "'win16'", 265, 45, 265, 52), woosh.Token(woosh.OP, ',', 265, 52, 265, 53), woosh.Token(woosh.STRING, "'dos'", 265, 54, 265, 59), woosh.Token(woosh.OP, ')', 265, 59, 265, 60), woosh.Token(woosh.OP, ')', 265, 60, 265, 61), woosh.Token(woosh.OP, ':', 265, 61, 265, 62), woosh.Token(woosh.NEWLINE, '\r\n', 265, 62, 266, 0), woosh.Token(woosh.INDENT, ' ', 267, 0, 267, 4), woosh.Token(woosh.STRING, '""" Tries to figure out the OS version used and returns\r\n a tuple (system, release, version).\r\n\r\n It uses the "ver" shell command for this which is known\r\n to exists on Windows, DOS. XXX Others too ?\r\n\r\n In case this fails, the given parameters are used as\r\n defaults.\r\n\r\n """', 267, 4, 276, 7), woosh.Token(woosh.NEWLINE, '\r\n', 276, 7, 277, 0), woosh.Token(woosh.NAME, 'if', 277, 4, 277, 6), woosh.Token(woosh.NAME, 'sys', 277, 7, 277, 10), woosh.Token(woosh.OP, '.', 277, 10, 277, 11), woosh.Token(woosh.NAME, 'platform', 277, 11, 277, 19), woosh.Token(woosh.NAME, 'not', 277, 20, 277, 23), woosh.Token(woosh.NAME, 'in', 277, 24, 277, 26), woosh.Token(woosh.NAME, 'supported_platforms', 277, 27, 277, 46), woosh.Token(woosh.OP, ':', 277, 46, 277, 47), woosh.Token(woosh.NEWLINE, '\r\n', 277, 47, 278, 0), woosh.Token(woosh.INDENT, ' ', 278, 0, 278, 8), woosh.Token(woosh.NAME, 'return', 278, 8, 278, 14), woosh.Token(woosh.NAME, 'system', 278, 15, 278, 21), woosh.Token(woosh.OP, ',', 278, 21, 278, 22), woosh.Token(woosh.NAME, 'release', 278, 23, 278, 30), woosh.Token(woosh.OP, ',', 278, 30, 278, 31), woosh.Token(woosh.NAME, 'version', 278, 32, 278, 39), woosh.Token(woosh.NEWLINE, '\r\n', 278, 39, 279, 0), woosh.Token(woosh.COMMENT, '# Try some common cmd strings', 280, 4, 280, 33), woosh.Token(woosh.DEDENT, ' ', 281, 0, 281, 4), woosh.Token(woosh.NAME, 'import', 281, 4, 281, 10), woosh.Token(woosh.NAME, 'subprocess', 281, 11, 281, 21), woosh.Token(woosh.NEWLINE, '\r\n', 281, 21, 282, 0), woosh.Token(woosh.NAME, 'for', 282, 4, 282, 7), woosh.Token(woosh.NAME, 'cmd', 282, 8, 282, 11), woosh.Token(woosh.NAME, 'in', 282, 12, 282, 14), woosh.Token(woosh.OP, '(', 282, 15, 282, 16), woosh.Token(woosh.STRING, "'ver'", 282, 16, 282, 21), woosh.Token(woosh.OP, ',', 282, 21, 282, 22), woosh.Token(woosh.STRING, "'command /c ver'", 282, 23, 282, 39), woosh.Token(woosh.OP, ',', 282, 39, 282, 40), woosh.Token(woosh.STRING, "'cmd /c ver'", 282, 41, 282, 53), woosh.Token(woosh.OP, ')', 282, 53, 282, 54), woosh.Token(woosh.OP, ':', 282, 54, 282, 55), woosh.Token(woosh.NEWLINE, '\r\n', 282, 55, 283, 0), woosh.Token(woosh.INDENT, ' ', 283, 0, 283, 8), woosh.Token(woosh.NAME, 'try', 283, 8, 283, 11), woosh.Token(woosh.OP, ':', 283, 11, 283, 12), woosh.Token(woosh.NEWLINE, '\r\n', 283, 12, 284, 0), woosh.Token(woosh.INDENT, ' ', 284, 0, 284, 12), woosh.Token(woosh.NAME, 'info', 284, 12, 284, 16), woosh.Token(woosh.OP, '=', 284, 17, 284, 18), woosh.Token(woosh.NAME, 'subprocess', 284, 19, 284, 29), woosh.Token(woosh.OP, '.', 284, 29, 284, 30), woosh.Token(woosh.NAME, 'check_output', 284, 30, 284, 42), woosh.Token(woosh.OP, '(', 284, 42, 284, 43), woosh.Token(woosh.NAME, 'cmd', 284, 43, 284, 46), woosh.Token(woosh.OP, ',', 284, 46, 284, 47), woosh.Token(woosh.NAME, 'stderr', 285, 43, 285, 49), woosh.Token(woosh.OP, '=', 285, 49, 285, 50), woosh.Token(woosh.NAME, 'subprocess', 285, 50, 285, 60), woosh.Token(woosh.OP, '.', 285, 60, 285, 61), woosh.Token(woosh.NAME, 'DEVNULL', 285, 61, 285, 68), woosh.Token(woosh.OP, ',', 285, 68, 285, 69), woosh.Token(woosh.NAME, 'text', 286, 43, 286, 47), woosh.Token(woosh.OP, '=', 286, 47, 286, 48), woosh.Token(woosh.NAME, 'True', 286, 48, 286, 52), woosh.Token(woosh.OP, ',', 286, 52, 286, 53), woosh.Token(woosh.NAME, 'shell', 287, 43, 287, 48), woosh.Token(woosh.OP, '=', 287, 48, 287, 49), woosh.Token(woosh.NAME, 'True', 287, 49, 287, 53), woosh.Token(woosh.OP, ')', 287, 53, 287, 54), woosh.Token(woosh.NEWLINE, '\r\n', 287, 54, 288, 0), woosh.Token(woosh.DEDENT, ' ', 288, 0, 288, 8), woosh.Token(woosh.NAME, 'except', 288, 8, 288, 14), woosh.Token(woosh.OP, '(', 288, 15, 288, 16), woosh.Token(woosh.NAME, 'OSError', 288, 16, 288, 23), woosh.Token(woosh.OP, ',', 288, 23, 288, 24), woosh.Token(woosh.NAME, 'subprocess', 288, 25, 288, 35), woosh.Token(woosh.OP, '.', 288, 35, 288, 36), woosh.Token(woosh.NAME, 'CalledProcessError', 288, 36, 288, 54), woosh.Token(woosh.OP, ')', 288, 54, 288, 55), woosh.Token(woosh.NAME, 'as', 288, 56, 288, 58), woosh.Token(woosh.NAME, 'why', 288, 59, 288, 62), woosh.Token(woosh.OP, ':', 288, 62, 288, 63), woosh.Token(woosh.NEWLINE, '\r\n', 288, 63, 289, 0), woosh.Token(woosh.COMMENT, "#print('Command %s failed: %s' % (cmd, why))", 289, 12, 289, 56), woosh.Token(woosh.INDENT, ' ', 290, 0, 290, 12), woosh.Token(woosh.NAME, 'continue', 290, 12, 290, 20), woosh.Token(woosh.NEWLINE, '\r\n', 290, 20, 291, 0), woosh.Token(woosh.DEDENT, ' ', 291, 0, 291, 8), woosh.Token(woosh.NAME, 'else', 291, 8, 291, 12), woosh.Token(woosh.OP, ':', 291, 12, 291, 13), woosh.Token(woosh.NEWLINE, '\r\n', 291, 13, 292, 0), woosh.Token(woosh.INDENT, ' ', 292, 0, 292, 12), woosh.Token(woosh.NAME, 'break', 292, 12, 292, 17), woosh.Token(woosh.NEWLINE, '\r\n', 292, 17, 293, 0), woosh.Token(woosh.DEDENT, ' ', 293, 0, 293, 4), woosh.Token(woosh.DEDENT, '', 293, 4, 293, 4), woosh.Token(woosh.NAME, 'else', 293, 4, 293, 8), woosh.Token(woosh.OP, ':', 293, 8, 293, 9), woosh.Token(woosh.NEWLINE, '\r\n', 293, 9, 294, 0), woosh.Token(woosh.INDENT, ' ', 294, 0, 294, 8), woosh.Token(woosh.NAME, 'return', 294, 8, 294, 14), woosh.Token(woosh.NAME, 'system', 294, 15, 294, 21), woosh.Token(woosh.OP, ',', 294, 21, 294, 22), woosh.Token(woosh.NAME, 'release', 294, 23, 294, 30), woosh.Token(woosh.OP, ',', 294, 30, 294, 31), woosh.Token(woosh.NAME, 'version', 294, 32, 294, 39), woosh.Token(woosh.NEWLINE, '\r\n', 294, 39, 295, 0), woosh.Token(woosh.COMMENT, '# Parse the output', 296, 4, 296, 22), woosh.Token(woosh.DEDENT, ' ', 297, 0, 297, 4), woosh.Token(woosh.NAME, 'info', 297, 4, 297, 8), woosh.Token(woosh.OP, '=', 297, 9, 297, 10), woosh.Token(woosh.NAME, 'info', 297, 11, 297, 15), woosh.Token(woosh.OP, '.', 297, 15, 297, 16), woosh.Token(woosh.NAME, 'strip', 297, 16, 297, 21), woosh.Token(woosh.OP, '(', 297, 21, 297, 22), woosh.Token(woosh.OP, ')', 297, 22, 297, 23), woosh.Token(woosh.NEWLINE, '\r\n', 297, 23, 298, 0), woosh.Token(woosh.NAME, 'm', 298, 4, 298, 5), woosh.Token(woosh.OP, '=', 298, 6, 298, 7), woosh.Token(woosh.NAME, '_ver_output', 298, 8, 298, 19), woosh.Token(woosh.OP, '.', 298, 19, 298, 20), woosh.Token(woosh.NAME, 'match', 298, 20, 298, 25), woosh.Token(woosh.OP, '(', 298, 25, 298, 26), woosh.Token(woosh.NAME, 'info', 298, 26, 298, 30), woosh.Token(woosh.OP, ')', 298, 30, 298, 31), woosh.Token(woosh.NEWLINE, '\r\n', 298, 31, 299, 0), woosh.Token(woosh.NAME, 'if', 299, 4, 299, 6), woosh.Token(woosh.NAME, 'm', 299, 7, 299, 8), woosh.Token(woosh.NAME, 'is', 299, 9, 299, 11), woosh.Token(woosh.NAME, 'not', 299, 12, 299, 15), woosh.Token(woosh.NAME, 'None', 299, 16, 299, 20), woosh.Token(woosh.OP, ':', 299, 20, 299, 21), woosh.Token(woosh.NEWLINE, '\r\n', 299, 21, 300, 0), woosh.Token(woosh.INDENT, ' ', 300, 0, 300, 8), woosh.Token(woosh.NAME, 'system', 300, 8, 300, 14), woosh.Token(woosh.OP, ',', 300, 14, 300, 15), woosh.Token(woosh.NAME, 'release', 300, 16, 300, 23), woosh.Token(woosh.OP, ',', 300, 23, 300, 24), woosh.Token(woosh.NAME, 'version', 300, 25, 300, 32), woosh.Token(woosh.OP, '=', 300, 33, 300, 34), woosh.Token(woosh.NAME, 'm', 300, 35, 300, 36), woosh.Token(woosh.OP, '.', 300, 36, 300, 37), woosh.Token(woosh.NAME, 'groups', 300, 37, 300, 43), woosh.Token(woosh.OP, '(', 300, 43, 300, 44), woosh.Token(woosh.OP, ')', 300, 44, 300, 45), woosh.Token(woosh.NEWLINE, '\r\n', 300, 45, 301, 0), woosh.Token(woosh.COMMENT, '# Strip trailing dots from version and release', 301, 8, 301, 54), woosh.Token(woosh.NAME, 'if', 302, 8, 302, 10), woosh.Token(woosh.NAME, 'release', 302, 11, 302, 18), woosh.Token(woosh.OP, '[', 302, 18, 302, 19), woosh.Token(woosh.OP, '-', 302, 19, 302, 20), woosh.Token(woosh.NUMBER, '1', 302, 20, 302, 21), woosh.Token(woosh.OP, ']', 302, 21, 302, 22), woosh.Token(woosh.OP, '==', 302, 23, 302, 25), woosh.Token(woosh.STRING, "'.'", 302, 26, 302, 29), woosh.Token(woosh.OP, ':', 302, 29, 302, 30), woosh.Token(woosh.NEWLINE, '\r\n', 302, 30, 303, 0), woosh.Token(woosh.INDENT, ' ', 303, 0, 303, 12), woosh.Token(woosh.NAME, 'release', 303, 12, 303, 19), woosh.Token(woosh.OP, '=', 303, 20, 303, 21), woosh.Token(woosh.NAME, 'release', 303, 22, 303, 29), woosh.Token(woosh.OP, '[', 303, 29, 303, 30), woosh.Token(woosh.OP, ':', 303, 30, 303, 31), woosh.Token(woosh.OP, '-', 303, 31, 303, 32), woosh.Token(woosh.NUMBER, '1', 303, 32, 303, 33), woosh.Token(woosh.OP, ']', 303, 33, 303, 34), woosh.Token(woosh.NEWLINE, '\r\n', 303, 34, 304, 0), woosh.Token(woosh.DEDENT, ' ', 304, 0, 304, 8), woosh.Token(woosh.NAME, 'if', 304, 8, 304, 10), woosh.Token(woosh.NAME, 'version', 304, 11, 304, 18), woosh.Token(woosh.OP, '[', 304, 18, 304, 19), woosh.Token(woosh.OP, '-', 304, 19, 304, 20), woosh.Token(woosh.NUMBER, '1', 304, 20, 304, 21), woosh.Token(woosh.OP, ']', 304, 21, 304, 22), woosh.Token(woosh.OP, '==', 304, 23, 304, 25), woosh.Token(woosh.STRING, "'.'", 304, 26, 304, 29), woosh.Token(woosh.OP, ':', 304, 29, 304, 30), woosh.Token(woosh.NEWLINE, '\r\n', 304, 30, 305, 0), woosh.Token(woosh.INDENT, ' ', 305, 0, 305, 12), woosh.Token(woosh.NAME, 'version', 305, 12, 305, 19), woosh.Token(woosh.OP, '=', 305, 20, 305, 21), woosh.Token(woosh.NAME, 'version', 305, 22, 305, 29), woosh.Token(woosh.OP, '[', 305, 29, 305, 30), woosh.Token(woosh.OP, ':', 305, 30, 305, 31), woosh.Token(woosh.OP, '-', 305, 31, 305, 32), woosh.Token(woosh.NUMBER, '1', 305, 32, 305, 33), woosh.Token(woosh.OP, ']', 305, 33, 305, 34), woosh.Token(woosh.NEWLINE, '\r\n', 305, 34, 306, 0), woosh.Token(woosh.COMMENT, '# Normalize the version and build strings (eliminating additional', 306, 8, 306, 73), woosh.Token(woosh.COMMENT, '# zeros)', 307, 8, 307, 16), woosh.Token(woosh.DEDENT, ' ', 308, 0, 308, 8), woosh.Token(woosh.NAME, 'version', 308, 8, 308, 15), woosh.Token(woosh.OP, '=', 308, 16, 308, 17), woosh.Token(woosh.NAME, '_norm_version', 308, 18, 308, 31), woosh.Token(woosh.OP, '(', 308, 31, 308, 32), woosh.Token(woosh.NAME, 'version', 308, 32, 308, 39), woosh.Token(woosh.OP, ')', 308, 39, 308, 40), woosh.Token(woosh.NEWLINE, '\r\n', 308, 40, 309, 0), woosh.Token(woosh.DEDENT, ' ', 309, 0, 309, 4), woosh.Token(woosh.NAME, 'return', 309, 4, 309, 10), woosh.Token(woosh.NAME, 'system', 309, 11, 309, 17), woosh.Token(woosh.OP, ',', 309, 17, 309, 18), woosh.Token(woosh.NAME, 'release', 309, 19, 309, 26), woosh.Token(woosh.OP, ',', 309, 26, 309, 27), woosh.Token(woosh.NAME, 'version', 309, 28, 309, 35), woosh.Token(woosh.NEWLINE, '\r\n', 309, 35, 310, 0), woosh.Token(woosh.DEDENT, '', 311, 0, 311, 0), woosh.Token(woosh.NAME, '_WIN32_CLIENT_RELEASES', 311, 0, 311, 22), woosh.Token(woosh.OP, '=', 311, 23, 311, 24), woosh.Token(woosh.OP, '{', 311, 25, 311, 26), woosh.Token(woosh.OP, '(', 312, 4, 312, 5), woosh.Token(woosh.NUMBER, '5', 312, 5, 312, 6), woosh.Token(woosh.OP, ',', 312, 6, 312, 7), woosh.Token(woosh.NUMBER, '0', 312, 8, 312, 9), woosh.Token(woosh.OP, ')', 312, 9, 312, 10), woosh.Token(woosh.OP, ':', 312, 10, 312, 11), woosh.Token(woosh.STRING, '"2000"', 312, 12, 312, 18), woosh.Token(woosh.OP, ',', 312, 18, 312, 19), woosh.Token(woosh.OP, '(', 313, 4, 313, 5), woosh.Token(woosh.NUMBER, '5', 313, 5, 313, 6), woosh.Token(woosh.OP, ',', 313, 6, 313, 7), woosh.Token(woosh.NUMBER, '1', 313, 8, 313, 9), woosh.Token(woosh.OP, ')', 313, 9, 313, 10), woosh.Token(woosh.OP, ':', 313, 10, 313, 11), woosh.Token(woosh.STRING, '"XP"', 313, 12, 313, 16), woosh.Token(woosh.OP, ',', 313, 16, 313, 17), woosh.Token(woosh.COMMENT, '# Strictly, 5.2 client is XP 64-bit, but platform.py historically', 314, 4, 314, 69), woosh.Token(woosh.COMMENT, '# has always called it 2003 Server', 315, 4, 315, 38), woosh.Token(woosh.OP, '(', 316, 4, 316, 5), woosh.Token(woosh.NUMBER, '5', 316, 5, 316, 6), woosh.Token(woosh.OP, ',', 316, 6, 316, 7), woosh.Token(woosh.NUMBER, '2', 316, 8, 316, 9), woosh.Token(woosh.OP, ')', 316, 9, 316, 10), woosh.Token(woosh.OP, ':', 316, 10, 316, 11), woosh.Token(woosh.STRING, '"2003Server"', 316, 12, 316, 24), woosh.Token(woosh.OP, ',', 316, 24, 316, 25), woosh.Token(woosh.OP, '(', 317, 4, 317, 5), woosh.Token(woosh.NUMBER, '5', 317, 5, 317, 6), woosh.Token(woosh.OP, ',', 317, 6, 317, 7), woosh.Token(woosh.NAME, 'None', 317, 8, 317, 12), woosh.Token(woosh.OP, ')', 317, 12, 317, 13), woosh.Token(woosh.OP, ':', 317, 13, 317, 14), woosh.Token(woosh.STRING, '"post2003"', 317, 15, 317, 25), woosh.Token(woosh.OP, ',', 317, 25, 317, 26), woosh.Token(woosh.OP, '(', 319, 4, 319, 5), woosh.Token(woosh.NUMBER, '6', 319, 5, 319, 6), woosh.Token(woosh.OP, ',', 319, 6, 319, 7), woosh.Token(woosh.NUMBER, '0', 319, 8, 319, 9), woosh.Token(woosh.OP, ')', 319, 9, 319, 10), woosh.Token(woosh.OP, ':', 319, 10, 319, 11), woosh.Token(woosh.STRING, '"Vista"', 319, 12, 319, 19), woosh.Token(woosh.OP, ',', 319, 19, 319, 20), woosh.Token(woosh.OP, '(', 320, 4, 320, 5), woosh.Token(woosh.NUMBER, '6', 320, 5, 320, 6), woosh.Token(woosh.OP, ',', 320, 6, 320, 7), woosh.Token(woosh.NUMBER, '1', 320, 8, 320, 9), woosh.Token(woosh.OP, ')', 320, 9, 320, 10), woosh.Token(woosh.OP, ':', 320, 10, 320, 11), woosh.Token(woosh.STRING, '"7"', 320, 12, 320, 15), woosh.Token(woosh.OP, ',', 320, 15, 320, 16), woosh.Token(woosh.OP, '(', 321, 4, 321, 5), woosh.Token(woosh.NUMBER, '6', 321, 5, 321, 6), woosh.Token(woosh.OP, ',', 321, 6, 321, 7), woosh.Token(woosh.NUMBER, '2', 321, 8, 321, 9), woosh.Token(woosh.OP, ')', 321, 9, 321, 10), woosh.Token(woosh.OP, ':', 321, 10, 321, 11), woosh.Token(woosh.STRING, '"8"', 321, 12, 321, 15), woosh.Token(woosh.OP, ',', 321, 15, 321, 16), woosh.Token(woosh.OP, '(', 322, 4, 322, 5), woosh.Token(woosh.NUMBER, '6', 322, 5, 322, 6), woosh.Token(woosh.OP, ',', 322, 6, 322, 7), woosh.Token(woosh.NUMBER, '3', 322, 8, 322, 9), woosh.Token(woosh.OP, ')', 322, 9, 322, 10), woosh.Token(woosh.OP, ':', 322, 10, 322, 11), woosh.Token(woosh.STRING, '"8.1"', 322, 12, 322, 17), woosh.Token(woosh.OP, ',', 322, 17, 322, 18), woosh.Token(woosh.OP, '(', 323, 4, 323, 5), woosh.Token(woosh.NUMBER, '6', 323, 5, 323, 6), woosh.Token(woosh.OP, ',', 323, 6, 323, 7), woosh.Token(woosh.NAME, 'None', 323, 8, 323, 12), woosh.Token(woosh.OP, ')', 323, 12, 323, 13), woosh.Token(woosh.OP, ':', 323, 13, 323, 14), woosh.Token(woosh.STRING, '"post8.1"', 323, 15, 323, 24), woosh.Token(woosh.OP, ',', 323, 24, 323, 25), woosh.Token(woosh.OP, '(', 325, 4, 325, 5), woosh.Token(woosh.NUMBER, '10', 325, 5, 325, 7), woosh.Token(woosh.OP, ',', 325, 7, 325, 8), woosh.Token(woosh.NUMBER, '0', 325, 9, 325, 10), woosh.Token(woosh.OP, ')', 325, 10, 325, 11), woosh.Token(woosh.OP, ':', 325, 11, 325, 12), woosh.Token(woosh.STRING, '"10"', 325, 13, 325, 17), woosh.Token(woosh.OP, ',', 325, 17, 325, 18), woosh.Token(woosh.OP, '(', 326, 4, 326, 5), woosh.Token(woosh.NUMBER, '10', 326, 5, 326, 7), woosh.Token(woosh.OP, ',', 326, 7, 326, 8), woosh.Token(woosh.NAME, 'None', 326, 9, 326, 13), woosh.Token(woosh.OP, ')', 326, 13, 326, 14), woosh.Token(woosh.OP, ':', 326, 14, 326, 15), woosh.Token(woosh.STRING, '"post10"', 326, 16, 326, 24), woosh.Token(woosh.OP, ',', 326, 24, 326, 25), woosh.Token(woosh.OP, '}', 327, 0, 327, 1), woosh.Token(woosh.NEWLINE, '\r\n', 327, 1, 328, 0), woosh.Token(woosh.COMMENT, '# Server release name lookup will default to client names if necessary', 329, 0, 329, 70), woosh.Token(woosh.NAME, '_WIN32_SERVER_RELEASES', 330, 0, 330, 22), woosh.Token(woosh.OP, '=', 330, 23, 330, 24), woosh.Token(woosh.OP, '{', 330, 25, 330, 26), woosh.Token(woosh.OP, '(', 331, 4, 331, 5), woosh.Token(woosh.NUMBER, '5', 331, 5, 331, 6), woosh.Token(woosh.OP, ',', 331, 6, 331, 7), woosh.Token(woosh.NUMBER, '2', 331, 8, 331, 9), woosh.Token(woosh.OP, ')', 331, 9, 331, 10), woosh.Token(woosh.OP, ':', 331, 10, 331, 11), woosh.Token(woosh.STRING, '"2003Server"', 331, 12, 331, 24), woosh.Token(woosh.OP, ',', 331, 24, 331, 25), woosh.Token(woosh.OP, '(', 333, 4, 333, 5), woosh.Token(woosh.NUMBER, '6', 333, 5, 333, 6), woosh.Token(woosh.OP, ',', 333, 6, 333, 7), woosh.Token(woosh.NUMBER, '0', 333, 8, 333, 9), woosh.Token(woosh.OP, ')', 333, 9, 333, 10), woosh.Token(woosh.OP, ':', 333, 10, 333, 11), woosh.Token(woosh.STRING, '"2008Server"', 333, 12, 333, 24), woosh.Token(woosh.OP, ',', 333, 24, 333, 25), woosh.Token(woosh.OP, '(', 334, 4, 334, 5), woosh.Token(woosh.NUMBER, '6', 334, 5, 334, 6), woosh.Token(woosh.OP, ',', 334, 6, 334, 7), woosh.Token(woosh.NUMBER, '1', 334, 8, 334, 9), woosh.Token(woosh.OP, ')', 334, 9, 334, 10), woosh.Token(woosh.OP, ':', 334, 10, 334, 11), woosh.Token(woosh.STRING, '"2008ServerR2"', 334, 12, 334, 26), woosh.Token(woosh.OP, ',', 334, 26, 334, 27), woosh.Token(woosh.OP, '(', 335, 4, 335, 5), woosh.Token(woosh.NUMBER, '6', 335, 5, 335, 6), woosh.Token(woosh.OP, ',', 335, 6, 335, 7), woosh.Token(woosh.NUMBER, '2', 335, 8, 335, 9), woosh.Token(woosh.OP, ')', 335, 9, 335, 10), woosh.Token(woosh.OP, ':', 335, 10, 335, 11), woosh.Token(woosh.STRING, '"2012Server"', 335, 12, 335, 24), woosh.Token(woosh.OP, ',', 335, 24, 335, 25), woosh.Token(woosh.OP, '(', 336, 4, 336, 5), woosh.Token(woosh.NUMBER, '6', 336, 5, 336, 6), woosh.Token(woosh.OP, ',', 336, 6, 336, 7), woosh.Token(woosh.NUMBER, '3', 336, 8, 336, 9), woosh.Token(woosh.OP, ')', 336, 9, 336, 10), woosh.Token(woosh.OP, ':', 336, 10, 336, 11), woosh.Token(woosh.STRING, '"2012ServerR2"', 336, 12, 336, 26), woosh.Token(woosh.OP, ',', 336, 26, 336, 27), woosh.Token(woosh.OP, '(', 337, 4, 337, 5), woosh.Token(woosh.NUMBER, '6', 337, 5, 337, 6), woosh.Token(woosh.OP, ',', 337, 6, 337, 7), woosh.Token(woosh.NAME, 'None', 337, 8, 337, 12), woosh.Token(woosh.OP, ')', 337, 12, 337, 13), woosh.Token(woosh.OP, ':', 337, 13, 337, 14), woosh.Token(woosh.STRING, '"post2012ServerR2"', 337, 15, 337, 33), woosh.Token(woosh.OP, ',', 337, 33, 337, 34), woosh.Token(woosh.OP, '}', 338, 0, 338, 1), woosh.Token(woosh.NEWLINE, '\r\n', 338, 1, 339, 0), woosh.Token(woosh.NAME, 'def', 340, 0, 340, 3), woosh.Token(woosh.NAME, 'win32_is_iot', 340, 4, 340, 16), woosh.Token(woosh.OP, '(', 340, 16, 340, 17), woosh.Token(woosh.OP, ')', 340, 17, 340, 18), woosh.Token(woosh.OP, ':', 340, 18, 340, 19), woosh.Token(woosh.NEWLINE, '\r\n', 340, 19, 341, 0), woosh.Token(woosh.INDENT, ' ', 341, 0, 341, 4), woosh.Token(woosh.NAME, 'return', 341, 4, 341, 10), woosh.Token(woosh.NAME, 'win32_edition', 341, 11, 341, 24), woosh.Token(woosh.OP, '(', 341, 24, 341, 25), woosh.Token(woosh.OP, ')', 341, 25, 341, 26), woosh.Token(woosh.NAME, 'in', 341, 27, 341, 29), woosh.Token(woosh.OP, '(', 341, 30, 341, 31), woosh.Token(woosh.STRING, "'IoTUAP'", 341, 31, 341, 39), woosh.Token(woosh.OP, ',', 341, 39, 341, 40), woosh.Token(woosh.STRING, "'NanoServer'", 341, 41, 341, 53), woosh.Token(woosh.OP, ',', 341, 53, 341, 54), woosh.Token(woosh.STRING, "'WindowsCoreHeadless'", 341, 55, 341, 76), woosh.Token(woosh.OP, ',', 341, 76, 341, 77), woosh.Token(woosh.STRING, "'IoTEdgeOS'", 341, 78, 341, 89), woosh.Token(woosh.OP, ')', 341, 89, 341, 90), woosh.Token(woosh.NEWLINE, '\r\n', 341, 90, 342, 0), woosh.Token(woosh.DEDENT, '', 343, 0, 343, 0), woosh.Token(woosh.NAME, 'def', 343, 0, 343, 3), woosh.Token(woosh.NAME, 'win32_edition', 343, 4, 343, 17), woosh.Token(woosh.OP, '(', 343, 17, 343, 18), woosh.Token(woosh.OP, ')', 343, 18, 343, 19), woosh.Token(woosh.OP, ':', 343, 19, 343, 20), woosh.Token(woosh.NEWLINE, '\r\n', 343, 20, 344, 0), woosh.Token(woosh.INDENT, ' ', 344, 0, 344, 4), woosh.Token(woosh.NAME, 'try', 344, 4, 344, 7), woosh.Token(woosh.OP, ':', 344, 7, 344, 8), woosh.Token(woosh.NEWLINE, '\r\n', 344, 8, 345, 0), woosh.Token(woosh.INDENT, ' ', 345, 0, 345, 8), woosh.Token(woosh.NAME, 'try', 345, 8, 345, 11), woosh.Token(woosh.OP, ':', 345, 11, 345, 12), woosh.Token(woosh.NEWLINE, '\r\n', 345, 12, 346, 0), woosh.Token(woosh.INDENT, ' ', 346, 0, 346, 12), woosh.Token(woosh.NAME, 'import', 346, 12, 346, 18), woosh.Token(woosh.NAME, 'winreg', 346, 19, 346, 25), woosh.Token(woosh.NEWLINE, '\r\n', 346, 25, 347, 0), woosh.Token(woosh.DEDENT, ' ', 347, 0, 347, 8), woosh.Token(woosh.NAME, 'except', 347, 8, 347, 14), woosh.Token(woosh.NAME, 'ImportError', 347, 15, 347, 26), woosh.Token(woosh.OP, ':', 347, 26, 347, 27), woosh.Token(woosh.NEWLINE, '\r\n', 347, 27, 348, 0), woosh.Token(woosh.INDENT, ' ', 348, 0, 348, 12), woosh.Token(woosh.NAME, 'import', 348, 12, 348, 18), woosh.Token(woosh.NAME, '_winreg', 348, 19, 348, 26), woosh.Token(woosh.NAME, 'as', 348, 27, 348, 29), woosh.Token(woosh.NAME, 'winreg', 348, 30, 348, 36), woosh.Token(woosh.NEWLINE, '\r\n', 348, 36, 349, 0), woosh.Token(woosh.DEDENT, ' ', 349, 0, 349, 4), woosh.Token(woosh.DEDENT, '', 349, 4, 349, 4), woosh.Token(woosh.NAME, 'except', 349, 4, 349, 10), woosh.Token(woosh.NAME, 'ImportError', 349, 11, 349, 22), woosh.Token(woosh.OP, ':', 349, 22, 349, 23), woosh.Token(woosh.NEWLINE, '\r\n', 349, 23, 350, 0), woosh.Token(woosh.INDENT, ' ', 350, 0, 350, 8), woosh.Token(woosh.NAME, 'pass', 350, 8, 350, 12), woosh.Token(woosh.NEWLINE, '\r\n', 350, 12, 351, 0), woosh.Token(woosh.DEDENT, ' ', 351, 0, 351, 4), woosh.Token(woosh.NAME, 'else', 351, 4, 351, 8), woosh.Token(woosh.OP, ':', 351, 8, 351, 9), woosh.Token(woosh.NEWLINE, '\r\n', 351, 9, 352, 0), woosh.Token(woosh.INDENT, ' ', 352, 0, 352, 8), woosh.Token(woosh.NAME, 'try', 352, 8, 352, 11), woosh.Token(woosh.OP, ':', 352, 11, 352, 12), woosh.Token(woosh.NEWLINE, '\r\n', 352, 12, 353, 0), woosh.Token(woosh.INDENT, ' ', 353, 0, 353, 12), woosh.Token(woosh.NAME, 'cvkey', 353, 12, 353, 17), woosh.Token(woosh.OP, '=', 353, 18, 353, 19), woosh.Token(woosh.STRING, "r'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'", 353, 20, 353, 67), woosh.Token(woosh.NEWLINE, '\r\n', 353, 67, 354, 0), woosh.Token(woosh.NAME, 'with', 354, 12, 354, 16), woosh.Token(woosh.NAME, 'winreg', 354, 17, 354, 23), woosh.Token(woosh.OP, '.', 354, 23, 354, 24), woosh.Token(woosh.NAME, 'OpenKeyEx', 354, 24, 354, 33), woosh.Token(woosh.OP, '(', 354, 33, 354, 34), woosh.Token(woosh.NAME, 'winreg', 354, 34, 354, 40), woosh.Token(woosh.OP, '.', 354, 40, 354, 41), woosh.Token(woosh.NAME, 'HKEY_LOCAL_MACHINE', 354, 41, 354, 59), woosh.Token(woosh.OP, ',', 354, 59, 354, 60), woosh.Token(woosh.NAME, 'cvkey', 354, 61, 354, 66), woosh.Token(woosh.OP, ')', 354, 66, 354, 67), woosh.Token(woosh.NAME, 'as', 354, 68, 354, 70), woosh.Token(woosh.NAME, 'key', 354, 71, 354, 74), woosh.Token(woosh.OP, ':', 354, 74, 354, 75), woosh.Token(woosh.NEWLINE, '\r\n', 354, 75, 355, 0), woosh.Token(woosh.INDENT, ' ', 355, 0, 355, 16), woosh.Token(woosh.NAME, 'return', 355, 16, 355, 22), woosh.Token(woosh.NAME, 'winreg', 355, 23, 355, 29), woosh.Token(woosh.OP, '.', 355, 29, 355, 30), woosh.Token(woosh.NAME, 'QueryValueEx', 355, 30, 355, 42), woosh.Token(woosh.OP, '(', 355, 42, 355, 43), woosh.Token(woosh.NAME, 'key', 355, 43, 355, 46), woosh.Token(woosh.OP, ',', 355, 46, 355, 47), woosh.Token(woosh.STRING, "'EditionId'", 355, 48, 355, 59), woosh.Token(woosh.OP, ')', 355, 59, 355, 60), woosh.Token(woosh.OP, '[', 355, 60, 355, 61), woosh.Token(woosh.NUMBER, '0', 355, 61, 355, 62), woosh.Token(woosh.OP, ']', 355, 62, 355, 63), woosh.Token(woosh.NEWLINE, '\r\n', 355, 63, 356, 0), woosh.Token(woosh.DEDENT, ' ', 356, 0, 356, 8), woosh.Token(woosh.DEDENT, '', 356, 8, 356, 8), woosh.Token(woosh.NAME, 'except', 356, 8, 356, 14), woosh.Token(woosh.NAME, 'OSError', 356, 15, 356, 22), woosh.Token(woosh.OP, ':', 356, 22, 356, 23), woosh.Token(woosh.NEWLINE, '\r\n', 356, 23, 357, 0), woosh.Token(woosh.INDENT, ' ', 357, 0, 357, 12), woosh.Token(woosh.NAME, 'pass', 357, 12, 357, 16), woosh.Token(woosh.NEWLINE, '\r\n', 357, 16, 358, 0), woosh.Token(woosh.DEDENT, ' ', 359, 0, 359, 4), woosh.Token(woosh.DEDENT, '', 359, 4, 359, 4), woosh.Token(woosh.NAME, 'return', 359, 4, 359, 10), woosh.Token(woosh.NAME, 'None', 359, 11, 359, 15), woosh.Token(woosh.NEWLINE, '\r\n', 359, 15, 360, 0), woosh.Token(woosh.DEDENT, '', 361, 0, 361, 0), woosh.Token(woosh.NAME, 'def', 361, 0, 361, 3), woosh.Token(woosh.NAME, 'win32_ver', 361, 4, 361, 13), woosh.Token(woosh.OP, '(', 361, 13, 361, 14), woosh.Token(woosh.NAME, 'release', 361, 14, 361, 21), woosh.Token(woosh.OP, '=', 361, 21, 361, 22), woosh.Token(woosh.STRING, "''", 361, 22, 361, 24), woosh.Token(woosh.OP, ',', 361, 24, 361, 25), woosh.Token(woosh.NAME, 'version', 361, 26, 361, 33), woosh.Token(woosh.OP, '=', 361, 33, 361, 34), woosh.Token(woosh.STRING, "''", 361, 34, 361, 36), woosh.Token(woosh.OP, ',', 361, 36, 361, 37), woosh.Token(woosh.NAME, 'csd', 361, 38, 361, 41), woosh.Token(woosh.OP, '=', 361, 41, 361, 42), woosh.Token(woosh.STRING, "''", 361, 42, 361, 44), woosh.Token(woosh.OP, ',', 361, 44, 361, 45), woosh.Token(woosh.NAME, 'ptype', 361, 46, 361, 51), woosh.Token(woosh.OP, '=', 361, 51, 361, 52), woosh.Token(woosh.STRING, "''", 361, 52, 361, 54), woosh.Token(woosh.OP, ')', 361, 54, 361, 55), woosh.Token(woosh.OP, ':', 361, 55, 361, 56), woosh.Token(woosh.NEWLINE, '\r\n', 361, 56, 362, 0), woosh.Token(woosh.INDENT, ' ', 362, 0, 362, 4), woosh.Token(woosh.NAME, 'try', 362, 4, 362, 7), woosh.Token(woosh.OP, ':', 362, 7, 362, 8), woosh.Token(woosh.NEWLINE, '\r\n', 362, 8, 363, 0), woosh.Token(woosh.INDENT, ' ', 363, 0, 363, 8), woosh.Token(woosh.NAME, 'from', 363, 8, 363, 12), woosh.Token(woosh.NAME, 'sys', 363, 13, 363, 16), woosh.Token(woosh.NAME, 'import', 363, 17, 363, 23), woosh.Token(woosh.NAME, 'getwindowsversion', 363, 24, 363, 41), woosh.Token(woosh.NEWLINE, '\r\n', 363, 41, 364, 0), woosh.Token(woosh.DEDENT, ' ', 364, 0, 364, 4), woosh.Token(woosh.NAME, 'except', 364, 4, 364, 10), woosh.Token(woosh.NAME, 'ImportError', 364, 11, 364, 22), woosh.Token(woosh.OP, ':', 364, 22, 364, 23), woosh.Token(woosh.NEWLINE, '\r\n', 364, 23, 365, 0), woosh.Token(woosh.INDENT, ' ', 365, 0, 365, 8), woosh.Token(woosh.NAME, 'return', 365, 8, 365, 14), woosh.Token(woosh.NAME, 'release', 365, 15, 365, 22), woosh.Token(woosh.OP, ',', 365, 22, 365, 23), woosh.Token(woosh.NAME, 'version', 365, 24, 365, 31), woosh.Token(woosh.OP, ',', 365, 31, 365, 32), woosh.Token(woosh.NAME, 'csd', 365, 33, 365, 36), woosh.Token(woosh.OP, ',', 365, 36, 365, 37), woosh.Token(woosh.NAME, 'ptype', 365, 38, 365, 43), woosh.Token(woosh.NEWLINE, '\r\n', 365, 43, 366, 0), woosh.Token(woosh.DEDENT, ' ', 367, 0, 367, 4), woosh.Token(woosh.NAME, 'winver', 367, 4, 367, 10), woosh.Token(woosh.OP, '=', 367, 11, 367, 12), woosh.Token(woosh.NAME, 'getwindowsversion', 367, 13, 367, 30), woosh.Token(woosh.OP, '(', 367, 30, 367, 31), woosh.Token(woosh.OP, ')', 367, 31, 367, 32), woosh.Token(woosh.NEWLINE, '\r\n', 367, 32, 368, 0), woosh.Token(woosh.NAME, 'maj', 368, 4, 368, 7), woosh.Token(woosh.OP, ',', 368, 7, 368, 8), woosh.Token(woosh.NAME, 'min', 368, 9, 368, 12), woosh.Token(woosh.OP, ',', 368, 12, 368, 13), woosh.Token(woosh.NAME, 'build', 368, 14, 368, 19), woosh.Token(woosh.OP, '=', 368, 20, 368, 21), woosh.Token(woosh.NAME, 'winver', 368, 22, 368, 28), woosh.Token(woosh.OP, '.', 368, 28, 368, 29), woosh.Token(woosh.NAME, 'platform_version', 368, 29, 368, 45), woosh.Token(woosh.NAME, 'or', 368, 46, 368, 48), woosh.Token(woosh.NAME, 'winver', 368, 49, 368, 55), woosh.Token(woosh.OP, '[', 368, 55, 368, 56), woosh.Token(woosh.OP, ':', 368, 56, 368, 57), woosh.Token(woosh.NUMBER, '3', 368, 57, 368, 58), woosh.Token(woosh.OP, ']', 368, 58, 368, 59), woosh.Token(woosh.NEWLINE, '\r\n', 368, 59, 369, 0), woosh.Token(woosh.NAME, 'version', 369, 4, 369, 11), woosh.Token(woosh.OP, '=', 369, 12, 369, 13), woosh.Token(woosh.STRING, "'{0}.{1}.{2}'", 369, 14, 369, 27), woosh.Token(woosh.OP, '.', 369, 27, 369, 28), woosh.Token(woosh.NAME, 'format', 369, 28, 369, 34), woosh.Token(woosh.OP, '(', 369, 34, 369, 35), woosh.Token(woosh.NAME, 'maj', 369, 35, 369, 38), woosh.Token(woosh.OP, ',', 369, 38, 369, 39), woosh.Token(woosh.NAME, 'min', 369, 40, 369, 43), woosh.Token(woosh.OP, ',', 369, 43, 369, 44), woosh.Token(woosh.NAME, 'build', 369, 45, 369, 50), woosh.Token(woosh.OP, ')', 369, 50, 369, 51), woosh.Token(woosh.NEWLINE, '\r\n', 369, 51, 370, 0), woosh.Token(woosh.NAME, 'release', 371, 4, 371, 11), woosh.Token(woosh.OP, '=', 371, 12, 371, 13), woosh.Token(woosh.OP, '(', 371, 14, 371, 15), woosh.Token(woosh.NAME, '_WIN32_CLIENT_RELEASES', 371, 15, 371, 37), woosh.Token(woosh.OP, '.', 371, 37, 371, 38), woosh.Token(woosh.NAME, 'get', 371, 38, 371, 41), woosh.Token(woosh.OP, '(', 371, 41, 371, 42), woosh.Token(woosh.OP, '(', 371, 42, 371, 43), woosh.Token(woosh.NAME, 'maj', 371, 43, 371, 46), woosh.Token(woosh.OP, ',', 371, 46, 371, 47), woosh.Token(woosh.NAME, 'min', 371, 48, 371, 51), woosh.Token(woosh.OP, ')', 371, 51, 371, 52), woosh.Token(woosh.OP, ')', 371, 52, 371, 53), woosh.Token(woosh.NAME, 'or', 371, 54, 371, 56), woosh.Token(woosh.NAME, '_WIN32_CLIENT_RELEASES', 372, 15, 372, 37), woosh.Token(woosh.OP, '.', 372, 37, 372, 38), woosh.Token(woosh.NAME, 'get', 372, 38, 372, 41), woosh.Token(woosh.OP, '(', 372, 41, 372, 42), woosh.Token(woosh.OP, '(', 372, 42, 372, 43), woosh.Token(woosh.NAME, 'maj', 372, 43, 372, 46), woosh.Token(woosh.OP, ',', 372, 46, 372, 47), woosh.Token(woosh.NAME, 'None', 372, 48, 372, 52), woosh.Token(woosh.OP, ')', 372, 52, 372, 53), woosh.Token(woosh.OP, ')', 372, 53, 372, 54), woosh.Token(woosh.NAME, 'or', 372, 55, 372, 57), woosh.Token(woosh.NAME, 'release', 373, 15, 373, 22), woosh.Token(woosh.OP, ')', 373, 22, 373, 23), woosh.Token(woosh.NEWLINE, '\r\n', 373, 23, 374, 0), woosh.Token(woosh.COMMENT, '# getwindowsversion() reflect the compatibility mode Python is', 375, 4, 375, 66), woosh.Token(woosh.COMMENT, '# running under, and so the service pack value is only going to be', 376, 4, 376, 70), woosh.Token(woosh.COMMENT, '# valid if the versions match.', 377, 4, 377, 34), woosh.Token(woosh.NAME, 'if', 378, 4, 378, 6), woosh.Token(woosh.NAME, 'winver', 378, 7, 378, 13), woosh.Token(woosh.OP, '[', 378, 13, 378, 14), woosh.Token(woosh.OP, ':', 378, 14, 378, 15), woosh.Token(woosh.NUMBER, '2', 378, 15, 378, 16), woosh.Token(woosh.OP, ']', 378, 16, 378, 17), woosh.Token(woosh.OP, '==', 378, 18, 378, 20), woosh.Token(woosh.OP, '(', 378, 21, 378, 22), woosh.Token(woosh.NAME, 'maj', 378, 22, 378, 25), woosh.Token(woosh.OP, ',', 378, 25, 378, 26), woosh.Token(woosh.NAME, 'min', 378, 27, 378, 30), woosh.Token(woosh.OP, ')', 378, 30, 378, 31), woosh.Token(woosh.OP, ':', 378, 31, 378, 32), woosh.Token(woosh.NEWLINE, '\r\n', 378, 32, 379, 0), woosh.Token(woosh.INDENT, ' ', 379, 0, 379, 8), woosh.Token(woosh.NAME, 'try', 379, 8, 379, 11), woosh.Token(woosh.OP, ':', 379, 11, 379, 12), woosh.Token(woosh.NEWLINE, '\r\n', 379, 12, 380, 0), woosh.Token(woosh.INDENT, ' ', 380, 0, 380, 12), woosh.Token(woosh.NAME, 'csd', 380, 12, 380, 15), woosh.Token(woosh.OP, '=', 380, 16, 380, 17), woosh.Token(woosh.STRING, "'SP{}'", 380, 18, 380, 24), woosh.Token(woosh.OP, '.', 380, 24, 380, 25), woosh.Token(woosh.NAME, 'format', 380, 25, 380, 31), woosh.Token(woosh.OP, '(', 380, 31, 380, 32), woosh.Token(woosh.NAME, 'winver', 380, 32, 380, 38), woosh.Token(woosh.OP, '.', 380, 38, 380, 39), woosh.Token(woosh.NAME, 'service_pack_major', 380, 39, 380, 57), woosh.Token(woosh.OP, ')', 380, 57, 380, 58), woosh.Token(woosh.NEWLINE, '\r\n', 380, 58, 381, 0), woosh.Token(woosh.DEDENT, ' ', 381, 0, 381, 8), woosh.Token(woosh.NAME, 'except', 381, 8, 381, 14), woosh.Token(woosh.NAME, 'AttributeError', 381, 15, 381, 29), woosh.Token(woosh.OP, ':', 381, 29, 381, 30), woosh.Token(woosh.NEWLINE, '\r\n', 381, 30, 382, 0), woosh.Token(woosh.INDENT, ' ', 382, 0, 382, 12), woosh.Token(woosh.NAME, 'if', 382, 12, 382, 14), woosh.Token(woosh.NAME, 'csd', 382, 15, 382, 18), woosh.Token(woosh.OP, '[', 382, 18, 382, 19), woosh.Token(woosh.OP, ':', 382, 19, 382, 20), woosh.Token(woosh.NUMBER, '13', 382, 20, 382, 22), woosh.Token(woosh.OP, ']', 382, 22, 382, 23), woosh.Token(woosh.OP, '==', 382, 24, 382, 26), woosh.Token(woosh.STRING, "'Service Pack '", 382, 27, 382, 42), woosh.Token(woosh.OP, ':', 382, 42, 382, 43), woosh.Token(woosh.NEWLINE, '\r\n', 382, 43, 383, 0), woosh.Token(woosh.INDENT, ' ', 383, 0, 383, 16), woosh.Token(woosh.NAME, 'csd', 383, 16, 383, 19), woosh.Token(woosh.OP, '=', 383, 20, 383, 21), woosh.Token(woosh.STRING, "'SP'", 383, 22, 383, 26), woosh.Token(woosh.OP, '+', 383, 27, 383, 28), woosh.Token(woosh.NAME, 'csd', 383, 29, 383, 32), woosh.Token(woosh.OP, '[', 383, 32, 383, 33), woosh.Token(woosh.NUMBER, '13', 383, 33, 383, 35), woosh.Token(woosh.OP, ':', 383, 35, 383, 36), woosh.Token(woosh.OP, ']', 383, 36, 383, 37), woosh.Token(woosh.NEWLINE, '\r\n', 383, 37, 384, 0), woosh.Token(woosh.COMMENT, '# VER_NT_SERVER = 3', 385, 4, 385, 23), woosh.Token(woosh.DEDENT, ' ', 386, 0, 386, 4), woosh.Token(woosh.DEDENT, '', 386, 4, 386, 4), woosh.Token(woosh.DEDENT, '', 386, 4, 386, 4), woosh.Token(woosh.NAME, 'if', 386, 4, 386, 6), woosh.Token(woosh.NAME, 'getattr', 386, 7, 386, 14), woosh.Token(woosh.OP, '(', 386, 14, 386, 15), woosh.Token(woosh.NAME, 'winver', 386, 15, 386, 21), woosh.Token(woosh.OP, ',', 386, 21, 386, 22), woosh.Token(woosh.STRING, "'product_type'", 386, 23, 386, 37), woosh.Token(woosh.OP, ',', 386, 37, 386, 38), woosh.Token(woosh.NAME, 'None', 386, 39, 386, 43), woosh.Token(woosh.OP, ')', 386, 43, 386, 44), woosh.Token(woosh.OP, '==', 386, 45, 386, 47), woosh.Token(woosh.NUMBER, '3', 386, 48, 386, 49), woosh.Token(woosh.OP, ':', 386, 49, 386, 50), woosh.Token(woosh.NEWLINE, '\r\n', 386, 50, 387, 0), woosh.Token(woosh.INDENT, ' ', 387, 0, 387, 8), woosh.Token(woosh.NAME, 'release', 387, 8, 387, 15), woosh.Token(woosh.OP, '=', 387, 16, 387, 17), woosh.Token(woosh.OP, '(', 387, 18, 387, 19), woosh.Token(woosh.NAME, '_WIN32_SERVER_RELEASES', 387, 19, 387, 41), woosh.Token(woosh.OP, '.', 387, 41, 387, 42), woosh.Token(woosh.NAME, 'get', 387, 42, 387, 45), woosh.Token(woosh.OP, '(', 387, 45, 387, 46), woosh.Token(woosh.OP, '(', 387, 46, 387, 47), woosh.Token(woosh.NAME, 'maj', 387, 47, 387, 50), woosh.Token(woosh.OP, ',', 387, 50, 387, 51), woosh.Token(woosh.NAME, 'min', 387, 52, 387, 55), woosh.Token(woosh.OP, ')', 387, 55, 387, 56), woosh.Token(woosh.OP, ')', 387, 56, 387, 57), woosh.Token(woosh.NAME, 'or', 387, 58, 387, 60), woosh.Token(woosh.NAME, '_WIN32_SERVER_RELEASES', 388, 19, 388, 41), woosh.Token(woosh.OP, '.', 388, 41, 388, 42), woosh.Token(woosh.NAME, 'get', 388, 42, 388, 45), woosh.Token(woosh.OP, '(', 388, 45, 388, 46), woosh.Token(woosh.OP, '(', 388, 46, 388, 47), woosh.Token(woosh.NAME, 'maj', 388, 47, 388, 50), woosh.Token(woosh.OP, ',', 388, 50, 388, 51), woosh.Token(woosh.NAME, 'None', 388, 52, 388, 56), woosh.Token(woosh.OP, ')', 388, 56, 388, 57), woosh.Token(woosh.OP, ')', 388, 57, 388, 58), woosh.Token(woosh.NAME, 'or', 388, 59, 388, 61), woosh.Token(woosh.NAME, 'release', 389, 19, 389, 26), woosh.Token(woosh.OP, ')', 389, 26, 389, 27), woosh.Token(woosh.NEWLINE, '\r\n', 389, 27, 390, 0), woosh.Token(woosh.DEDENT, ' ', 391, 0, 391, 4), woosh.Token(woosh.NAME, 'try', 391, 4, 391, 7), woosh.Token(woosh.OP, ':', 391, 7, 391, 8), woosh.Token(woosh.NEWLINE, '\r\n', 391, 8, 392, 0), woosh.Token(woosh.INDENT, ' ', 392, 0, 392, 8), woosh.Token(woosh.NAME, 'try', 392, 8, 392, 11), woosh.Token(woosh.OP, ':', 392, 11, 392, 12), woosh.Token(woosh.NEWLINE, '\r\n', 392, 12, 393, 0), woosh.Token(woosh.INDENT, ' ', 393, 0, 393, 12), woosh.Token(woosh.NAME, 'import', 393, 12, 393, 18), woosh.Token(woosh.NAME, 'winreg', 393, 19, 393, 25), woosh.Token(woosh.NEWLINE, '\r\n', 393, 25, 394, 0), woosh.Token(woosh.DEDENT, ' ', 394, 0, 394, 8), woosh.Token(woosh.NAME, 'except', 394, 8, 394, 14), woosh.Token(woosh.NAME, 'ImportError', 394, 15, 394, 26), woosh.Token(woosh.OP, ':', 394, 26, 394, 27), woosh.Token(woosh.NEWLINE, '\r\n', 394, 27, 395, 0), woosh.Token(woosh.INDENT, ' ', 395, 0, 395, 12), woosh.Token(woosh.NAME, 'import', 395, 12, 395, 18), woosh.Token(woosh.NAME, '_winreg', 395, 19, 395, 26), woosh.Token(woosh.NAME, 'as', 395, 27, 395, 29), woosh.Token(woosh.NAME, 'winreg', 395, 30, 395, 36), woosh.Token(woosh.NEWLINE, '\r\n', 395, 36, 396, 0), woosh.Token(woosh.DEDENT, ' ', 396, 0, 396, 4), woosh.Token(woosh.DEDENT, '', 396, 4, 396, 4), woosh.Token(woosh.NAME, 'except', 396, 4, 396, 10), woosh.Token(woosh.NAME, 'ImportError', 396, 11, 396, 22), woosh.Token(woosh.OP, ':', 396, 22, 396, 23), woosh.Token(woosh.NEWLINE, '\r\n', 396, 23, 397, 0), woosh.Token(woosh.INDENT, ' ', 397, 0, 397, 8), woosh.Token(woosh.NAME, 'pass', 397, 8, 397, 12), woosh.Token(woosh.NEWLINE, '\r\n', 397, 12, 398, 0), woosh.Token(woosh.DEDENT, ' ', 398, 0, 398, 4), woosh.Token(woosh.NAME, 'else', 398, 4, 398, 8), woosh.Token(woosh.OP, ':', 398, 8, 398, 9), woosh.Token(woosh.NEWLINE, '\r\n', 398, 9, 399, 0), woosh.Token(woosh.INDENT, ' ', 399, 0, 399, 8), woosh.Token(woosh.NAME, 'try', 399, 8, 399, 11), woosh.Token(woosh.OP, ':', 399, 11, 399, 12), woosh.Token(woosh.NEWLINE, '\r\n', 399, 12, 400, 0), woosh.Token(woosh.INDENT, ' ', 400, 0, 400, 12), woosh.Token(woosh.NAME, 'cvkey', 400, 12, 400, 17), woosh.Token(woosh.OP, '=', 400, 18, 400, 19), woosh.Token(woosh.STRING, "r'SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'", 400, 20, 400, 67), woosh.Token(woosh.NEWLINE, '\r\n', 400, 67, 401, 0), woosh.Token(woosh.NAME, 'with', 401, 12, 401, 16), woosh.Token(woosh.NAME, 'winreg', 401, 17, 401, 23), woosh.Token(woosh.OP, '.', 401, 23, 401, 24), woosh.Token(woosh.NAME, 'OpenKeyEx', 401, 24, 401, 33), woosh.Token(woosh.OP, '(', 401, 33, 401, 34), woosh.Token(woosh.NAME, 'winreg', 401, 34, 401, 40), woosh.Token(woosh.OP, '.', 401, 40, 401, 41), woosh.Token(woosh.NAME, 'HKEY_LOCAL_MACHINE', 401, 41, 401, 59), woosh.Token(woosh.OP, ',', 401, 59, 401, 60), woosh.Token(woosh.NAME, 'cvkey', 401, 61, 401, 66), woosh.Token(woosh.OP, ')', 401, 66, 401, 67), woosh.Token(woosh.NAME, 'as', 401, 68, 401, 70), woosh.Token(woosh.NAME, 'key', 401, 71, 401, 74), woosh.Token(woosh.OP, ':', 401, 74, 401, 75), woosh.Token(woosh.NEWLINE, '\r\n', 401, 75, 402, 0), woosh.Token(woosh.INDENT, ' ', 402, 0, 402, 16), woosh.Token(woosh.NAME, 'ptype', 402, 16, 402, 21), woosh.Token(woosh.OP, '=', 402, 22, 402, 23), woosh.Token(woosh.NAME, 'winreg', 402, 24, 402, 30), woosh.Token(woosh.OP, '.', 402, 30, 402, 31), woosh.Token(woosh.NAME, 'QueryValueEx', 402, 31, 402, 43), woosh.Token(woosh.OP, '(', 402, 43, 402, 44), woosh.Token(woosh.NAME, 'key', 402, 44, 402, 47), woosh.Token(woosh.OP, ',', 402, 47, 402, 48), woosh.Token(woosh.STRING, "'CurrentType'", 402, 49, 402, 62), woosh.Token(woosh.OP, ')', 402, 62, 402, 63), woosh.Token(woosh.OP, '[', 402, 63, 402, 64), woosh.Token(woosh.NUMBER, '0', 402, 64, 402, 65), woosh.Token(woosh.OP, ']', 402, 65, 402, 66), woosh.Token(woosh.NEWLINE, '\r\n', 402, 66, 403, 0), woosh.Token(woosh.DEDENT, ' ', 403, 0, 403, 8), woosh.Token(woosh.DEDENT, '', 403, 8, 403, 8), woosh.Token(woosh.NAME, 'except', 403, 8, 403, 14), woosh.Token(woosh.NAME, 'OSError', 403, 15, 403, 22), woosh.Token(woosh.OP, ':', 403, 22, 403, 23), woosh.Token(woosh.NEWLINE, '\r\n', 403, 23, 404, 0), woosh.Token(woosh.INDENT, ' ', 404, 0, 404, 12), woosh.Token(woosh.NAME, 'pass', 404, 12, 404, 16), woosh.Token(woosh.NEWLINE, '\r\n', 404, 16, 405, 0), woosh.Token(woosh.DEDENT, ' ', 406, 0, 406, 4), woosh.Token(woosh.DEDENT, '', 406, 4, 406, 4), woosh.Token(woosh.NAME, 'return', 406, 4, 406, 10), woosh.Token(woosh.NAME, 'release', 406, 11, 406, 18), woosh.Token(woosh.OP, ',', 406, 18, 406, 19), woosh.Token(woosh.NAME, 'version', 406, 20, 406, 27), woosh.Token(woosh.OP, ',', 406, 27, 406, 28), woosh.Token(woosh.NAME, 'csd', 406, 29, 406, 32), woosh.Token(woosh.OP, ',', 406, 32, 406, 33), woosh.Token(woosh.NAME, 'ptype', 406, 34, 406, 39), woosh.Token(woosh.NEWLINE, '\r\n', 406, 39, 407, 0), woosh.Token(woosh.DEDENT, '', 409, 0, 409, 0), woosh.Token(woosh.NAME, 'def', 409, 0, 409, 3), woosh.Token(woosh.NAME, '_mac_ver_xml', 409, 4, 409, 16), woosh.Token(woosh.OP, '(', 409, 16, 409, 17), woosh.Token(woosh.OP, ')', 409, 17, 409, 18), woosh.Token(woosh.OP, ':', 409, 18, 409, 19), woosh.Token(woosh.NEWLINE, '\r\n', 409, 19, 410, 0), woosh.Token(woosh.INDENT, ' ', 410, 0, 410, 4), woosh.Token(woosh.NAME, 'fn', 410, 4, 410, 6), woosh.Token(woosh.OP, '=', 410, 7, 410, 8), woosh.Token(woosh.STRING, "'/System/Library/CoreServices/SystemVersion.plist'", 410, 9, 410, 59), woosh.Token(woosh.NEWLINE, '\r\n', 410, 59, 411, 0), woosh.Token(woosh.NAME, 'if', 411, 4, 411, 6), woosh.Token(woosh.NAME, 'not', 411, 7, 411, 10), woosh.Token(woosh.NAME, 'os', 411, 11, 411, 13), woosh.Token(woosh.OP, '.', 411, 13, 411, 14), woosh.Token(woosh.NAME, 'path', 411, 14, 411, 18), woosh.Token(woosh.OP, '.', 411, 18, 411, 19), woosh.Token(woosh.NAME, 'exists', 411, 19, 411, 25), woosh.Token(woosh.OP, '(', 411, 25, 411, 26), woosh.Token(woosh.NAME, 'fn', 411, 26, 411, 28), woosh.Token(woosh.OP, ')', 411, 28, 411, 29), woosh.Token(woosh.OP, ':', 411, 29, 411, 30), woosh.Token(woosh.NEWLINE, '\r\n', 411, 30, 412, 0), woosh.Token(woosh.INDENT, ' ', 412, 0, 412, 8), woosh.Token(woosh.NAME, 'return', 412, 8, 412, 14), woosh.Token(woosh.NAME, 'None', 412, 15, 412, 19), woosh.Token(woosh.NEWLINE, '\r\n', 412, 19, 413, 0), woosh.Token(woosh.DEDENT, ' ', 414, 0, 414, 4), woosh.Token(woosh.NAME, 'try', 414, 4, 414, 7), woosh.Token(woosh.OP, ':', 414, 7, 414, 8), woosh.Token(woosh.NEWLINE, '\r\n', 414, 8, 415, 0), woosh.Token(woosh.INDENT, ' ', 415, 0, 415, 8), woosh.Token(woosh.NAME, 'import', 415, 8, 415, 14), woosh.Token(woosh.NAME, 'plistlib', 415, 15, 415, 23), woosh.Token(woosh.NEWLINE, '\r\n', 415, 23, 416, 0), woosh.Token(woosh.DEDENT, ' ', 416, 0, 416, 4), woosh.Token(woosh.NAME, 'except', 416, 4, 416, 10), woosh.Token(woosh.NAME, 'ImportError', 416, 11, 416, 22), woosh.Token(woosh.OP, ':', 416, 22, 416, 23), woosh.Token(woosh.NEWLINE, '\r\n', 416, 23, 417, 0), woosh.Token(woosh.INDENT, ' ', 417, 0, 417, 8), woosh.Token(woosh.NAME, 'return', 417, 8, 417, 14), woosh.Token(woosh.NAME, 'None', 417, 15, 417, 19), woosh.Token(woosh.NEWLINE, '\r\n', 417, 19, 418, 0), woosh.Token(woosh.DEDENT, ' ', 419, 0, 419, 4), woosh.Token(woosh.NAME, 'with', 419, 4, 419, 8), woosh.Token(woosh.NAME, 'open', 419, 9, 419, 13), woosh.Token(woosh.OP, '(', 419, 13, 419, 14), woosh.Token(woosh.NAME, 'fn', 419, 14, 419, 16), woosh.Token(woosh.OP, ',', 419, 16, 419, 17), woosh.Token(woosh.STRING, "'rb'", 419, 18, 419, 22), woosh.Token(woosh.OP, ')', 419, 22, 419, 23), woosh.Token(woosh.NAME, 'as', 419, 24, 419, 26), woosh.Token(woosh.NAME, 'f', 419, 27, 419, 28), woosh.Token(woosh.OP, ':', 419, 28, 419, 29), woosh.Token(woosh.NEWLINE, '\r\n', 419, 29, 420, 0), woosh.Token(woosh.INDENT, ' ', 420, 0, 420, 8), woosh.Token(woosh.NAME, 'pl', 420, 8, 420, 10), woosh.Token(woosh.OP, '=', 420, 11, 420, 12), woosh.Token(woosh.NAME, 'plistlib', 420, 13, 420, 21), woosh.Token(woosh.OP, '.', 420, 21, 420, 22), woosh.Token(woosh.NAME, 'load', 420, 22, 420, 26), woosh.Token(woosh.OP, '(', 420, 26, 420, 27), woosh.Token(woosh.NAME, 'f', 420, 27, 420, 28), woosh.Token(woosh.OP, ')', 420, 28, 420, 29), woosh.Token(woosh.NEWLINE, '\r\n', 420, 29, 421, 0), woosh.Token(woosh.DEDENT, ' ', 421, 0, 421, 4), woosh.Token(woosh.NAME, 'release', 421, 4, 421, 11), woosh.Token(woosh.OP, '=', 421, 12, 421, 13), woosh.Token(woosh.NAME, 'pl', 421, 14, 421, 16), woosh.Token(woosh.OP, '[', 421, 16, 421, 17), woosh.Token(woosh.STRING, "'ProductVersion'", 421, 17, 421, 33), woosh.Token(woosh.OP, ']', 421, 33, 421, 34), woosh.Token(woosh.NEWLINE, '\r\n', 421, 34, 422, 0), woosh.Token(woosh.NAME, 'versioninfo', 422, 4, 422, 15), woosh.Token(woosh.OP, '=', 422, 16, 422, 17), woosh.Token(woosh.OP, '(', 422, 18, 422, 19), woosh.Token(woosh.STRING, "''", 422, 19, 422, 21), woosh.Token(woosh.OP, ',', 422, 21, 422, 22), woosh.Token(woosh.STRING, "''", 422, 23, 422, 25), woosh.Token(woosh.OP, ',', 422, 25, 422, 26), woosh.Token(woosh.STRING, "''", 422, 27, 422, 29), woosh.Token(woosh.OP, ')', 422, 29, 422, 30), woosh.Token(woosh.NEWLINE, '\r\n', 422, 30, 423, 0), woosh.Token(woosh.NAME, 'machine', 423, 4, 423, 11), woosh.Token(woosh.OP, '=', 423, 12, 423, 13), woosh.Token(woosh.NAME, 'os', 423, 14, 423, 16), woosh.Token(woosh.OP, '.', 423, 16, 423, 17), woosh.Token(woosh.NAME, 'uname', 423, 17, 423, 22), woosh.Token(woosh.OP, '(', 423, 22, 423, 23), woosh.Token(woosh.OP, ')', 423, 23, 423, 24), woosh.Token(woosh.OP, '.', 423, 24, 423, 25), woosh.Token(woosh.NAME, 'machine', 423, 25, 423, 32), woosh.Token(woosh.NEWLINE, '\r\n', 423, 32, 424, 0), woosh.Token(woosh.NAME, 'if', 424, 4, 424, 6), woosh.Token(woosh.NAME, 'machine', 424, 7, 424, 14), woosh.Token(woosh.NAME, 'in', 424, 15, 424, 17), woosh.Token(woosh.OP, '(', 424, 18, 424, 19), woosh.Token(woosh.STRING, "'ppc'", 424, 19, 424, 24), woosh.Token(woosh.OP, ',', 424, 24, 424, 25), woosh.Token(woosh.STRING, "'Power Macintosh'", 424, 26, 424, 43), woosh.Token(woosh.OP, ')', 424, 43, 424, 44), woosh.Token(woosh.OP, ':', 424, 44, 424, 45), woosh.Token(woosh.NEWLINE, '\r\n', 424, 45, 425, 0), woosh.Token(woosh.COMMENT, '# Canonical name', 425, 8, 425, 24), woosh.Token(woosh.INDENT, ' ', 426, 0, 426, 8), woosh.Token(woosh.NAME, 'machine', 426, 8, 426, 15), woosh.Token(woosh.OP, '=', 426, 16, 426, 17), woosh.Token(woosh.STRING, "'PowerPC'", 426, 18, 426, 27), woosh.Token(woosh.NEWLINE, '\r\n', 426, 27, 427, 0), woosh.Token(woosh.DEDENT, ' ', 428, 0, 428, 4), woosh.Token(woosh.NAME, 'return', 428, 4, 428, 10), woosh.Token(woosh.NAME, 'release', 428, 11, 428, 18), woosh.Token(woosh.OP, ',', 428, 18, 428, 19), woosh.Token(woosh.NAME, 'versioninfo', 428, 20, 428, 31), woosh.Token(woosh.OP, ',', 428, 31, 428, 32), woosh.Token(woosh.NAME, 'machine', 428, 33, 428, 40), woosh.Token(woosh.NEWLINE, '\r\n', 428, 40, 429, 0), woosh.Token(woosh.DEDENT, '', 431, 0, 431, 0), woosh.Token(woosh.NAME, 'def', 431, 0, 431, 3), woosh.Token(woosh.NAME, 'mac_ver', 431, 4, 431, 11), woosh.Token(woosh.OP, '(', 431, 11, 431, 12), woosh.Token(woosh.NAME, 'release', 431, 12, 431, 19), woosh.Token(woosh.OP, '=', 431, 19, 431, 20), woosh.Token(woosh.STRING, "''", 431, 20, 431, 22), woosh.Token(woosh.OP, ',', 431, 22, 431, 23), woosh.Token(woosh.NAME, 'versioninfo', 431, 24, 431, 35), woosh.Token(woosh.OP, '=', 431, 35, 431, 36), woosh.Token(woosh.OP, '(', 431, 36, 431, 37), woosh.Token(woosh.STRING, "''", 431, 37, 431, 39), woosh.Token(woosh.OP, ',', 431, 39, 431, 40), woosh.Token(woosh.STRING, "''", 431, 41, 431, 43), woosh.Token(woosh.OP, ',', 431, 43, 431, 44), woosh.Token(woosh.STRING, "''", 431, 45, 431, 47), woosh.Token(woosh.OP, ')', 431, 47, 431, 48), woosh.Token(woosh.OP, ',', 431, 48, 431, 49), woosh.Token(woosh.NAME, 'machine', 431, 50, 431, 57), woosh.Token(woosh.OP, '=', 431, 57, 431, 58), woosh.Token(woosh.STRING, "''", 431, 58, 431, 60), woosh.Token(woosh.OP, ')', 431, 60, 431, 61), woosh.Token(woosh.OP, ':', 431, 61, 431, 62), woosh.Token(woosh.NEWLINE, '\r\n', 431, 62, 432, 0), woosh.Token(woosh.INDENT, ' ', 433, 0, 433, 4), woosh.Token(woosh.STRING, '""" Get macOS version information and return it as tuple (release,\r\n versioninfo, machine) with versioninfo being a tuple (version,\r\n dev_stage, non_release_version).\r\n\r\n Entries which cannot be determined are set to the parameter values\r\n which default to \'\'. All tuple entries are strings.\r\n """', 433, 4, 439, 7), woosh.Token(woosh.NEWLINE, '\r\n', 439, 7, 440, 0), woosh.Token(woosh.COMMENT, '# First try reading the information from an XML file which should', 441, 4, 441, 69), woosh.Token(woosh.COMMENT, '# always be present', 442, 4, 442, 23), woosh.Token(woosh.NAME, 'info', 443, 4, 443, 8), woosh.Token(woosh.OP, '=', 443, 9, 443, 10), woosh.Token(woosh.NAME, '_mac_ver_xml', 443, 11, 443, 23), woosh.Token(woosh.OP, '(', 443, 23, 443, 24), woosh.Token(woosh.OP, ')', 443, 24, 443, 25), woosh.Token(woosh.NEWLINE, '\r\n', 443, 25, 444, 0), woosh.Token(woosh.NAME, 'if', 444, 4, 444, 6), woosh.Token(woosh.NAME, 'info', 444, 7, 444, 11), woosh.Token(woosh.NAME, 'is', 444, 12, 444, 14), woosh.Token(woosh.NAME, 'not', 444, 15, 444, 18), woosh.Token(woosh.NAME, 'None', 444, 19, 444, 23), woosh.Token(woosh.OP, ':', 444, 23, 444, 24), woosh.Token(woosh.NEWLINE, '\r\n', 444, 24, 445, 0), woosh.Token(woosh.INDENT, ' ', 445, 0, 445, 8), woosh.Token(woosh.NAME, 'return', 445, 8, 445, 14), woosh.Token(woosh.NAME, 'info', 445, 15, 445, 19), woosh.Token(woosh.NEWLINE, '\r\n', 445, 19, 446, 0), woosh.Token(woosh.COMMENT, "# If that also doesn't work return the default values", 447, 4, 447, 57), woosh.Token(woosh.DEDENT, ' ', 448, 0, 448, 4), woosh.Token(woosh.NAME, 'return', 448, 4, 448, 10), woosh.Token(woosh.NAME, 'release', 448, 11, 448, 18), woosh.Token(woosh.OP, ',', 448, 18, 448, 19), woosh.Token(woosh.NAME, 'versioninfo', 448, 20, 448, 31), woosh.Token(woosh.OP, ',', 448, 31, 448, 32), woosh.Token(woosh.NAME, 'machine', 448, 33, 448, 40), woosh.Token(woosh.NEWLINE, '\r\n', 448, 40, 449, 0), woosh.Token(woosh.DEDENT, '', 450, 0, 450, 0), woosh.Token(woosh.NAME, 'def', 450, 0, 450, 3), woosh.Token(woosh.NAME, '_java_getprop', 450, 4, 450, 17), woosh.Token(woosh.OP, '(', 450, 17, 450, 18), woosh.Token(woosh.NAME, 'name', 450, 18, 450, 22), woosh.Token(woosh.OP, ',', 450, 22, 450, 23), woosh.Token(woosh.NAME, 'default', 450, 24, 450, 31), woosh.Token(woosh.OP, ')', 450, 31, 450, 32), woosh.Token(woosh.OP, ':', 450, 32, 450, 33), woosh.Token(woosh.NEWLINE, '\r\n', 450, 33, 451, 0), woosh.Token(woosh.INDENT, ' ', 452, 0, 452, 4), woosh.Token(woosh.NAME, 'from', 452, 4, 452, 8), woosh.Token(woosh.NAME, 'java', 452, 9, 452, 13), woosh.Token(woosh.OP, '.', 452, 13, 452, 14), woosh.Token(woosh.NAME, 'lang', 452, 14, 452, 18), woosh.Token(woosh.NAME, 'import', 452, 19, 452, 25), woosh.Token(woosh.NAME, 'System', 452, 26, 452, 32), woosh.Token(woosh.NEWLINE, '\r\n', 452, 32, 453, 0), woosh.Token(woosh.NAME, 'try', 453, 4, 453, 7), woosh.Token(woosh.OP, ':', 453, 7, 453, 8), woosh.Token(woosh.NEWLINE, '\r\n', 453, 8, 454, 0), woosh.Token(woosh.INDENT, ' ', 454, 0, 454, 8), woosh.Token(woosh.NAME, 'value', 454, 8, 454, 13), woosh.Token(woosh.OP, '=', 454, 14, 454, 15), woosh.Token(woosh.NAME, 'System', 454, 16, 454, 22), woosh.Token(woosh.OP, '.', 454, 22, 454, 23), woosh.Token(woosh.NAME, 'getProperty', 454, 23, 454, 34), woosh.Token(woosh.OP, '(', 454, 34, 454, 35), woosh.Token(woosh.NAME, 'name', 454, 35, 454, 39), woosh.Token(woosh.OP, ')', 454, 39, 454, 40), woosh.Token(woosh.NEWLINE, '\r\n', 454, 40, 455, 0), woosh.Token(woosh.NAME, 'if', 455, 8, 455, 10), woosh.Token(woosh.NAME, 'value', 455, 11, 455, 16), woosh.Token(woosh.NAME, 'is', 455, 17, 455, 19), woosh.Token(woosh.NAME, 'None', 455, 20, 455, 24), woosh.Token(woosh.OP, ':', 455, 24, 455, 25), woosh.Token(woosh.NEWLINE, '\r\n', 455, 25, 456, 0), woosh.Token(woosh.INDENT, ' ', 456, 0, 456, 12), woosh.Token(woosh.NAME, 'return', 456, 12, 456, 18), woosh.Token(woosh.NAME, 'default', 456, 19, 456, 26), woosh.Token(woosh.NEWLINE, '\r\n', 456, 26, 457, 0), woosh.Token(woosh.DEDENT, ' ', 457, 0, 457, 8), woosh.Token(woosh.NAME, 'return', 457, 8, 457, 14), woosh.Token(woosh.NAME, 'value', 457, 15, 457, 20), woosh.Token(woosh.NEWLINE, '\r\n', 457, 20, 458, 0), woosh.Token(woosh.DEDENT, ' ', 458, 0, 458, 4), woosh.Token(woosh.NAME, 'except', 458, 4, 458, 10), woosh.Token(woosh.NAME, 'AttributeError', 458, 11, 458, 25), woosh.Token(woosh.OP, ':', 458, 25, 458, 26), woosh.Token(woosh.NEWLINE, '\r\n', 458, 26, 459, 0), woosh.Token(woosh.INDENT, ' ', 459, 0, 459, 8), woosh.Token(woosh.NAME, 'return', 459, 8, 459, 14), woosh.Token(woosh.NAME, 'default', 459, 15, 459, 22), woosh.Token(woosh.NEWLINE, '\r\n', 459, 22, 460, 0), woosh.Token(woosh.DEDENT, '', 461, 0, 461, 0), woosh.Token(woosh.DEDENT, '', 461, 0, 461, 0), woosh.Token(woosh.NAME, 'def', 461, 0, 461, 3), woosh.Token(woosh.NAME, 'java_ver', 461, 4, 461, 12), woosh.Token(woosh.OP, '(', 461, 12, 461, 13), woosh.Token(woosh.NAME, 'release', 461, 13, 461, 20), woosh.Token(woosh.OP, '=', 461, 20, 461, 21), woosh.Token(woosh.STRING, "''", 461, 21, 461, 23), woosh.Token(woosh.OP, ',', 461, 23, 461, 24), woosh.Token(woosh.NAME, 'vendor', 461, 25, 461, 31), woosh.Token(woosh.OP, '=', 461, 31, 461, 32), woosh.Token(woosh.STRING, "''", 461, 32, 461, 34), woosh.Token(woosh.OP, ',', 461, 34, 461, 35), woosh.Token(woosh.NAME, 'vminfo', 461, 36, 461, 42), woosh.Token(woosh.OP, '=', 461, 42, 461, 43), woosh.Token(woosh.OP, '(', 461, 43, 461, 44), woosh.Token(woosh.STRING, "''", 461, 44, 461, 46), woosh.Token(woosh.OP, ',', 461, 46, 461, 47), woosh.Token(woosh.STRING, "''", 461, 48, 461, 50), woosh.Token(woosh.OP, ',', 461, 50, 461, 51), woosh.Token(woosh.STRING, "''", 461, 52, 461, 54), woosh.Token(woosh.OP, ')', 461, 54, 461, 55), woosh.Token(woosh.OP, ',', 461, 55, 461, 56), woosh.Token(woosh.NAME, 'osinfo', 461, 57, 461, 63), woosh.Token(woosh.OP, '=', 461, 63, 461, 64), woosh.Token(woosh.OP, '(', 461, 64, 461, 65), woosh.Token(woosh.STRING, "''", 461, 65, 461, 67), woosh.Token(woosh.OP, ',', 461, 67, 461, 68), woosh.Token(woosh.STRING, "''", 461, 69, 461, 71), woosh.Token(woosh.OP, ',', 461, 71, 461, 72), woosh.Token(woosh.STRING, "''", 461, 73, 461, 75), woosh.Token(woosh.OP, ')', 461, 75, 461, 76), woosh.Token(woosh.OP, ')', 461, 76, 461, 77), woosh.Token(woosh.OP, ':', 461, 77, 461, 78), woosh.Token(woosh.NEWLINE, '\r\n', 461, 78, 462, 0), woosh.Token(woosh.INDENT, ' ', 463, 0, 463, 4), woosh.Token(woosh.STRING, '""" Version interface for Jython.\r\n\r\n Returns a tuple (release, vendor, vminfo, osinfo) with vminfo being\r\n a tuple (vm_name, vm_release, vm_vendor) and osinfo being a\r\n tuple (os_name, os_version, os_arch).\r\n\r\n Values which cannot be determined are set to the defaults\r\n given as parameters (which all default to \'\').\r\n\r\n """', 463, 4, 472, 7), woosh.Token(woosh.NEWLINE, '\r\n', 472, 7, 473, 0), woosh.Token(woosh.COMMENT, '# Import the needed APIs', 473, 4, 473, 28), woosh.Token(woosh.NAME, 'try', 474, 4, 474, 7), woosh.Token(woosh.OP, ':', 474, 7, 474, 8), woosh.Token(woosh.NEWLINE, '\r\n', 474, 8, 475, 0), woosh.Token(woosh.INDENT, ' ', 475, 0, 475, 8), woosh.Token(woosh.NAME, 'import', 475, 8, 475, 14), woosh.Token(woosh.NAME, 'java', 475, 15, 475, 19), woosh.Token(woosh.OP, '.', 475, 19, 475, 20), woosh.Token(woosh.NAME, 'lang', 475, 20, 475, 24), woosh.Token(woosh.NEWLINE, '\r\n', 475, 24, 476, 0), woosh.Token(woosh.DEDENT, ' ', 476, 0, 476, 4), woosh.Token(woosh.NAME, 'except', 476, 4, 476, 10), woosh.Token(woosh.NAME, 'ImportError', 476, 11, 476, 22), woosh.Token(woosh.OP, ':', 476, 22, 476, 23), woosh.Token(woosh.NEWLINE, '\r\n', 476, 23, 477, 0), woosh.Token(woosh.INDENT, ' ', 477, 0, 477, 8), woosh.Token(woosh.NAME, 'return', 477, 8, 477, 14), woosh.Token(woosh.NAME, 'release', 477, 15, 477, 22), woosh.Token(woosh.OP, ',', 477, 22, 477, 23), woosh.Token(woosh.NAME, 'vendor', 477, 24, 477, 30), woosh.Token(woosh.OP, ',', 477, 30, 477, 31), woosh.Token(woosh.NAME, 'vminfo', 477, 32, 477, 38), woosh.Token(woosh.OP, ',', 477, 38, 477, 39), woosh.Token(woosh.NAME, 'osinfo', 477, 40, 477, 46), woosh.Token(woosh.NEWLINE, '\r\n', 477, 46, 478, 0), woosh.Token(woosh.DEDENT, ' ', 479, 0, 479, 4), woosh.Token(woosh.NAME, 'vendor', 479, 4, 479, 10), woosh.Token(woosh.OP, '=', 479, 11, 479, 12), woosh.Token(woosh.NAME, '_java_getprop', 479, 13, 479, 26), woosh.Token(woosh.OP, '(', 479, 26, 479, 27), woosh.Token(woosh.STRING, "'java.vendor'", 479, 27, 479, 40), woosh.Token(woosh.OP, ',', 479, 40, 479, 41), woosh.Token(woosh.NAME, 'vendor', 479, 42, 479, 48), woosh.Token(woosh.OP, ')', 479, 48, 479, 49), woosh.Token(woosh.NEWLINE, '\r\n', 479, 49, 480, 0), woosh.Token(woosh.NAME, 'release', 480, 4, 480, 11), woosh.Token(woosh.OP, '=', 480, 12, 480, 13), woosh.Token(woosh.NAME, '_java_getprop', 480, 14, 480, 27), woosh.Token(woosh.OP, '(', 480, 27, 480, 28), woosh.Token(woosh.STRING, "'java.version'", 480, 28, 480, 42), woosh.Token(woosh.OP, ',', 480, 42, 480, 43), woosh.Token(woosh.NAME, 'release', 480, 44, 480, 51), woosh.Token(woosh.OP, ')', 480, 51, 480, 52), woosh.Token(woosh.NEWLINE, '\r\n', 480, 52, 481, 0), woosh.Token(woosh.NAME, 'vm_name', 481, 4, 481, 11), woosh.Token(woosh.OP, ',', 481, 11, 481, 12), woosh.Token(woosh.NAME, 'vm_release', 481, 13, 481, 23), woosh.Token(woosh.OP, ',', 481, 23, 481, 24), woosh.Token(woosh.NAME, 'vm_vendor', 481, 25, 481, 34), woosh.Token(woosh.OP, '=', 481, 35, 481, 36), woosh.Token(woosh.NAME, 'vminfo', 481, 37, 481, 43), woosh.Token(woosh.NEWLINE, '\r\n', 481, 43, 482, 0), woosh.Token(woosh.NAME, 'vm_name', 482, 4, 482, 11), woosh.Token(woosh.OP, '=', 482, 12, 482, 13), woosh.Token(woosh.NAME, '_java_getprop', 482, 14, 482, 27), woosh.Token(woosh.OP, '(', 482, 27, 482, 28), woosh.Token(woosh.STRING, "'java.vm.name'", 482, 28, 482, 42), woosh.Token(woosh.OP, ',', 482, 42, 482, 43), woosh.Token(woosh.NAME, 'vm_name', 482, 44, 482, 51), woosh.Token(woosh.OP, ')', 482, 51, 482, 52), woosh.Token(woosh.NEWLINE, '\r\n', 482, 52, 483, 0), woosh.Token(woosh.NAME, 'vm_vendor', 483, 4, 483, 13), woosh.Token(woosh.OP, '=', 483, 14, 483, 15), woosh.Token(woosh.NAME, '_java_getprop', 483, 16, 483, 29), woosh.Token(woosh.OP, '(', 483, 29, 483, 30), woosh.Token(woosh.STRING, "'java.vm.vendor'", 483, 30, 483, 46), woosh.Token(woosh.OP, ',', 483, 46, 483, 47), woosh.Token(woosh.NAME, 'vm_vendor', 483, 48, 483, 57), woosh.Token(woosh.OP, ')', 483, 57, 483, 58), woosh.Token(woosh.NEWLINE, '\r\n', 483, 58, 484, 0), woosh.Token(woosh.NAME, 'vm_release', 484, 4, 484, 14), woosh.Token(woosh.OP, '=', 484, 15, 484, 16), woosh.Token(woosh.NAME, '_java_getprop', 484, 17, 484, 30), woosh.Token(woosh.OP, '(', 484, 30, 484, 31), woosh.Token(woosh.STRING, "'java.vm.version'", 484, 31, 484, 48), woosh.Token(woosh.OP, ',', 484, 48, 484, 49), woosh.Token(woosh.NAME, 'vm_release', 484, 50, 484, 60), woosh.Token(woosh.OP, ')', 484, 60, 484, 61), woosh.Token(woosh.NEWLINE, '\r\n', 484, 61, 485, 0), woosh.Token(woosh.NAME, 'vminfo', 485, 4, 485, 10), woosh.Token(woosh.OP, '=', 485, 11, 485, 12), woosh.Token(woosh.NAME, 'vm_name', 485, 13, 485, 20), woosh.Token(woosh.OP, ',', 485, 20, 485, 21), woosh.Token(woosh.NAME, 'vm_release', 485, 22, 485, 32), woosh.Token(woosh.OP, ',', 485, 32, 485, 33), woosh.Token(woosh.NAME, 'vm_vendor', 485, 34, 485, 43), woosh.Token(woosh.NEWLINE, '\r\n', 485, 43, 486, 0), woosh.Token(woosh.NAME, 'os_name', 486, 4, 486, 11), woosh.Token(woosh.OP, ',', 486, 11, 486, 12), woosh.Token(woosh.NAME, 'os_version', 486, 13, 486, 23), woosh.Token(woosh.OP, ',', 486, 23, 486, 24), woosh.Token(woosh.NAME, 'os_arch', 486, 25, 486, 32), woosh.Token(woosh.OP, '=', 486, 33, 486, 34), woosh.Token(woosh.NAME, 'osinfo', 486, 35, 486, 41), woosh.Token(woosh.NEWLINE, '\r\n', 486, 41, 487, 0), woosh.Token(woosh.NAME, 'os_arch', 487, 4, 487, 11), woosh.Token(woosh.OP, '=', 487, 12, 487, 13), woosh.Token(woosh.NAME, '_java_getprop', 487, 14, 487, 27), woosh.Token(woosh.OP, '(', 487, 27, 487, 28), woosh.Token(woosh.STRING, "'java.os.arch'", 487, 28, 487, 42), woosh.Token(woosh.OP, ',', 487, 42, 487, 43), woosh.Token(woosh.NAME, 'os_arch', 487, 44, 487, 51), woosh.Token(woosh.OP, ')', 487, 51, 487, 52), woosh.Token(woosh.NEWLINE, '\r\n', 487, 52, 488, 0), woosh.Token(woosh.NAME, 'os_name', 488, 4, 488, 11), woosh.Token(woosh.OP, '=', 488, 12, 488, 13), woosh.Token(woosh.NAME, '_java_getprop', 488, 14, 488, 27), woosh.Token(woosh.OP, '(', 488, 27, 488, 28), woosh.Token(woosh.STRING, "'java.os.name'", 488, 28, 488, 42), woosh.Token(woosh.OP, ',', 488, 42, 488, 43), woosh.Token(woosh.NAME, 'os_name', 488, 44, 488, 51), woosh.Token(woosh.OP, ')', 488, 51, 488, 52), woosh.Token(woosh.NEWLINE, '\r\n', 488, 52, 489, 0), woosh.Token(woosh.NAME, 'os_version', 489, 4, 489, 14), woosh.Token(woosh.OP, '=', 489, 15, 489, 16), woosh.Token(woosh.NAME, '_java_getprop', 489, 17, 489, 30), woosh.Token(woosh.OP, '(', 489, 30, 489, 31), woosh.Token(woosh.STRING, "'java.os.version'", 489, 31, 489, 48), woosh.Token(woosh.OP, ',', 489, 48, 489, 49), woosh.Token(woosh.NAME, 'os_version', 489, 50, 489, 60), woosh.Token(woosh.OP, ')', 489, 60, 489, 61), woosh.Token(woosh.NEWLINE, '\r\n', 489, 61, 490, 0), woosh.Token(woosh.NAME, 'osinfo', 490, 4, 490, 10), woosh.Token(woosh.OP, '=', 490, 11, 490, 12), woosh.Token(woosh.NAME, 'os_name', 490, 13, 490, 20), woosh.Token(woosh.OP, ',', 490, 20, 490, 21), woosh.Token(woosh.NAME, 'os_version', 490, 22, 490, 32), woosh.Token(woosh.OP, ',', 490, 32, 490, 33), woosh.Token(woosh.NAME, 'os_arch', 490, 34, 490, 41), woosh.Token(woosh.NEWLINE, '\r\n', 490, 41, 491, 0), woosh.Token(woosh.NAME, 'return', 492, 4, 492, 10), woosh.Token(woosh.NAME, 'release', 492, 11, 492, 18), woosh.Token(woosh.OP, ',', 492, 18, 492, 19), woosh.Token(woosh.NAME, 'vendor', 492, 20, 492, 26), woosh.Token(woosh.OP, ',', 492, 26, 492, 27), woosh.Token(woosh.NAME, 'vminfo', 492, 28, 492, 34), woosh.Token(woosh.OP, ',', 492, 34, 492, 35), woosh.Token(woosh.NAME, 'osinfo', 492, 36, 492, 42), woosh.Token(woosh.NEWLINE, '\r\n', 492, 42, 493, 0), woosh.Token(woosh.COMMENT, '### System name aliasing', 494, 0, 494, 24), woosh.Token(woosh.DEDENT, '', 496, 0, 496, 0), woosh.Token(woosh.NAME, 'def', 496, 0, 496, 3), woosh.Token(woosh.NAME, 'system_alias', 496, 4, 496, 16), woosh.Token(woosh.OP, '(', 496, 16, 496, 17), woosh.Token(woosh.NAME, 'system', 496, 17, 496, 23), woosh.Token(woosh.OP, ',', 496, 23, 496, 24), woosh.Token(woosh.NAME, 'release', 496, 25, 496, 32), woosh.Token(woosh.OP, ',', 496, 32, 496, 33), woosh.Token(woosh.NAME, 'version', 496, 34, 496, 41), woosh.Token(woosh.OP, ')', 496, 41, 496, 42), woosh.Token(woosh.OP, ':', 496, 42, 496, 43), woosh.Token(woosh.NEWLINE, '\r\n', 496, 43, 497, 0), woosh.Token(woosh.INDENT, ' ', 498, 0, 498, 4), woosh.Token(woosh.STRING, '""" Returns (system, release, version) aliased to common\r\n marketing names used for some systems.\r\n\r\n It also does some reordering of the information in some cases\r\n where it would otherwise cause confusion.\r\n\r\n """', 498, 4, 504, 7), woosh.Token(woosh.NEWLINE, '\r\n', 504, 7, 505, 0), woosh.Token(woosh.NAME, 'if', 505, 4, 505, 6), woosh.Token(woosh.NAME, 'system', 505, 7, 505, 13), woosh.Token(woosh.OP, '==', 505, 14, 505, 16), woosh.Token(woosh.STRING, "'SunOS'", 505, 17, 505, 24), woosh.Token(woosh.OP, ':', 505, 24, 505, 25), woosh.Token(woosh.NEWLINE, '\r\n', 505, 25, 506, 0), woosh.Token(woosh.COMMENT, "# Sun's OS", 506, 8, 506, 18), woosh.Token(woosh.INDENT, ' ', 507, 0, 507, 8), woosh.Token(woosh.NAME, 'if', 507, 8, 507, 10), woosh.Token(woosh.NAME, 'release', 507, 11, 507, 18), woosh.Token(woosh.OP, '<', 507, 19, 507, 20), woosh.Token(woosh.STRING, "'5'", 507, 21, 507, 24), woosh.Token(woosh.OP, ':', 507, 24, 507, 25), woosh.Token(woosh.NEWLINE, '\r\n', 507, 25, 508, 0), woosh.Token(woosh.COMMENT, '# These releases use the old name SunOS', 508, 12, 508, 51), woosh.Token(woosh.INDENT, ' ', 509, 0, 509, 12), woosh.Token(woosh.NAME, 'return', 509, 12, 509, 18), woosh.Token(woosh.NAME, 'system', 509, 19, 509, 25), woosh.Token(woosh.OP, ',', 509, 25, 509, 26), woosh.Token(woosh.NAME, 'release', 509, 27, 509, 34), woosh.Token(woosh.OP, ',', 509, 34, 509, 35), woosh.Token(woosh.NAME, 'version', 509, 36, 509, 43), woosh.Token(woosh.NEWLINE, '\r\n', 509, 43, 510, 0), woosh.Token(woosh.COMMENT, '# Modify release (marketing release = SunOS release - 3)', 510, 8, 510, 64), woosh.Token(woosh.DEDENT, ' ', 511, 0, 511, 8), woosh.Token(woosh.NAME, 'l', 511, 8, 511, 9), woosh.Token(woosh.OP, '=', 511, 10, 511, 11), woosh.Token(woosh.NAME, 'release', 511, 12, 511, 19), woosh.Token(woosh.OP, '.', 511, 19, 511, 20), woosh.Token(woosh.NAME, 'split', 511, 20, 511, 25), woosh.Token(woosh.OP, '(', 511, 25, 511, 26), woosh.Token(woosh.STRING, "'.'", 511, 26, 511, 29), woosh.Token(woosh.OP, ')', 511, 29, 511, 30), woosh.Token(woosh.NEWLINE, '\r\n', 511, 30, 512, 0), woosh.Token(woosh.NAME, 'if', 512, 8, 512, 10), woosh.Token(woosh.NAME, 'l', 512, 11, 512, 12), woosh.Token(woosh.OP, ':', 512, 12, 512, 13), woosh.Token(woosh.NEWLINE, '\r\n', 512, 13, 513, 0), woosh.Token(woosh.INDENT, ' ', 513, 0, 513, 12), woosh.Token(woosh.NAME, 'try', 513, 12, 513, 15), woosh.Token(woosh.OP, ':', 513, 15, 513, 16), woosh.Token(woosh.NEWLINE, '\r\n', 513, 16, 514, 0), woosh.Token(woosh.INDENT, ' ', 514, 0, 514, 16), woosh.Token(woosh.NAME, 'major', 514, 16, 514, 21), woosh.Token(woosh.OP, '=', 514, 22, 514, 23), woosh.Token(woosh.NAME, 'int', 514, 24, 514, 27), woosh.Token(woosh.OP, '(', 514, 27, 514, 28), woosh.Token(woosh.NAME, 'l', 514, 28, 514, 29), woosh.Token(woosh.OP, '[', 514, 29, 514, 30), woosh.Token(woosh.NUMBER, '0', 514, 30, 514, 31), woosh.Token(woosh.OP, ']', 514, 31, 514, 32), woosh.Token(woosh.OP, ')', 514, 32, 514, 33), woosh.Token(woosh.NEWLINE, '\r\n', 514, 33, 515, 0), woosh.Token(woosh.DEDENT, ' ', 515, 0, 515, 12), woosh.Token(woosh.NAME, 'except', 515, 12, 515, 18), woosh.Token(woosh.NAME, 'ValueError', 515, 19, 515, 29), woosh.Token(woosh.OP, ':', 515, 29, 515, 30), woosh.Token(woosh.NEWLINE, '\r\n', 515, 30, 516, 0), woosh.Token(woosh.INDENT, ' ', 516, 0, 516, 16), woosh.Token(woosh.NAME, 'pass', 516, 16, 516, 20), woosh.Token(woosh.NEWLINE, '\r\n', 516, 20, 517, 0), woosh.Token(woosh.DEDENT, ' ', 517, 0, 517, 12), woosh.Token(woosh.NAME, 'else', 517, 12, 517, 16), woosh.Token(woosh.OP, ':', 517, 16, 517, 17), woosh.Token(woosh.NEWLINE, '\r\n', 517, 17, 518, 0), woosh.Token(woosh.INDENT, ' ', 518, 0, 518, 16), woosh.Token(woosh.NAME, 'major', 518, 16, 518, 21), woosh.Token(woosh.OP, '=', 518, 22, 518, 23), woosh.Token(woosh.NAME, 'major', 518, 24, 518, 29), woosh.Token(woosh.OP, '-', 518, 30, 518, 31), woosh.Token(woosh.NUMBER, '3', 518, 32, 518, 33), woosh.Token(woosh.NEWLINE, '\r\n', 518, 33, 519, 0), woosh.Token(woosh.NAME, 'l', 519, 16, 519, 17), woosh.Token(woosh.OP, '[', 519, 17, 519, 18), woosh.Token(woosh.NUMBER, '0', 519, 18, 519, 19), woosh.Token(woosh.OP, ']', 519, 19, 519, 20), woosh.Token(woosh.OP, '=', 519, 21, 519, 22), woosh.Token(woosh.NAME, 'str', 519, 23, 519, 26), woosh.Token(woosh.OP, '(', 519, 26, 519, 27), woosh.Token(woosh.NAME, 'major', 519, 27, 519, 32), woosh.Token(woosh.OP, ')', 519, 32, 519, 33), woosh.Token(woosh.NEWLINE, '\r\n', 519, 33, 520, 0), woosh.Token(woosh.NAME, 'release', 520, 16, 520, 23), woosh.Token(woosh.OP, '=', 520, 24, 520, 25), woosh.Token(woosh.STRING, "'.'", 520, 26, 520, 29), woosh.Token(woosh.OP, '.', 520, 29, 520, 30), woosh.Token(woosh.NAME, 'join', 520, 30, 520, 34), woosh.Token(woosh.OP, '(', 520, 34, 520, 35), woosh.Token(woosh.NAME, 'l', 520, 35, 520, 36), woosh.Token(woosh.OP, ')', 520, 36, 520, 37), woosh.Token(woosh.NEWLINE, '\r\n', 520, 37, 521, 0), woosh.Token(woosh.DEDENT, ' ', 521, 0, 521, 8), woosh.Token(woosh.DEDENT, '', 521, 8, 521, 8), woosh.Token(woosh.NAME, 'if', 521, 8, 521, 10), woosh.Token(woosh.NAME, 'release', 521, 11, 521, 18), woosh.Token(woosh.OP, '<', 521, 19, 521, 20), woosh.Token(woosh.STRING, "'6'", 521, 21, 521, 24), woosh.Token(woosh.OP, ':', 521, 24, 521, 25), woosh.Token(woosh.NEWLINE, '\r\n', 521, 25, 522, 0), woosh.Token(woosh.INDENT, ' ', 522, 0, 522, 12), woosh.Token(woosh.NAME, 'system', 522, 12, 522, 18), woosh.Token(woosh.OP, '=', 522, 19, 522, 20), woosh.Token(woosh.STRING, "'Solaris'", 522, 21, 522, 30), woosh.Token(woosh.NEWLINE, '\r\n', 522, 30, 523, 0), woosh.Token(woosh.DEDENT, ' ', 523, 0, 523, 8), woosh.Token(woosh.NAME, 'else', 523, 8, 523, 12), woosh.Token(woosh.OP, ':', 523, 12, 523, 13), woosh.Token(woosh.NEWLINE, '\r\n', 523, 13, 524, 0), woosh.Token(woosh.COMMENT, '# XXX Whatever the new SunOS marketing name is...', 524, 12, 524, 61), woosh.Token(woosh.INDENT, ' ', 525, 0, 525, 12), woosh.Token(woosh.NAME, 'system', 525, 12, 525, 18), woosh.Token(woosh.OP, '=', 525, 19, 525, 20), woosh.Token(woosh.STRING, "'Solaris'", 525, 21, 525, 30), woosh.Token(woosh.NEWLINE, '\r\n', 525, 30, 526, 0), woosh.Token(woosh.DEDENT, ' ', 527, 0, 527, 4), woosh.Token(woosh.DEDENT, '', 527, 4, 527, 4), woosh.Token(woosh.NAME, 'elif', 527, 4, 527, 8), woosh.Token(woosh.NAME, 'system', 527, 9, 527, 15), woosh.Token(woosh.OP, '==', 527, 16, 527, 18), woosh.Token(woosh.STRING, "'IRIX64'", 527, 19, 527, 27), woosh.Token(woosh.OP, ':', 527, 27, 527, 28), woosh.Token(woosh.NEWLINE, '\r\n', 527, 28, 528, 0), woosh.Token(woosh.COMMENT, '# IRIX reports IRIX64 on platforms with 64-bit support; yet it', 528, 8, 528, 70), woosh.Token(woosh.COMMENT, '# is really a version and not a different platform, since 32-bit', 529, 8, 529, 72), woosh.Token(woosh.COMMENT, '# apps are also supported..', 530, 8, 530, 35), woosh.Token(woosh.INDENT, ' ', 531, 0, 531, 8), woosh.Token(woosh.NAME, 'system', 531, 8, 531, 14), woosh.Token(woosh.OP, '=', 531, 15, 531, 16), woosh.Token(woosh.STRING, "'IRIX'", 531, 17, 531, 23), woosh.Token(woosh.NEWLINE, '\r\n', 531, 23, 532, 0), woosh.Token(woosh.NAME, 'if', 532, 8, 532, 10), woosh.Token(woosh.NAME, 'version', 532, 11, 532, 18), woosh.Token(woosh.OP, ':', 532, 18, 532, 19), woosh.Token(woosh.NEWLINE, '\r\n', 532, 19, 533, 0), woosh.Token(woosh.INDENT, ' ', 533, 0, 533, 12), woosh.Token(woosh.NAME, 'version', 533, 12, 533, 19), woosh.Token(woosh.OP, '=', 533, 20, 533, 21), woosh.Token(woosh.NAME, 'version', 533, 22, 533, 29), woosh.Token(woosh.OP, '+', 533, 30, 533, 31), woosh.Token(woosh.STRING, "' (64bit)'", 533, 32, 533, 42), woosh.Token(woosh.NEWLINE, '\r\n', 533, 42, 534, 0), woosh.Token(woosh.DEDENT, ' ', 534, 0, 534, 8), woosh.Token(woosh.NAME, 'else', 534, 8, 534, 12), woosh.Token(woosh.OP, ':', 534, 12, 534, 13), woosh.Token(woosh.NEWLINE, '\r\n', 534, 13, 535, 0), woosh.Token(woosh.INDENT, ' ', 535, 0, 535, 12), woosh.Token(woosh.NAME, 'version', 535, 12, 535, 19), woosh.Token(woosh.OP, '=', 535, 20, 535, 21), woosh.Token(woosh.STRING, "'64bit'", 535, 22, 535, 29), woosh.Token(woosh.NEWLINE, '\r\n', 535, 29, 536, 0), woosh.Token(woosh.DEDENT, ' ', 537, 0, 537, 4), woosh.Token(woosh.DEDENT, '', 537, 4, 537, 4), woosh.Token(woosh.NAME, 'elif', 537, 4, 537, 8), woosh.Token(woosh.NAME, 'system', 537, 9, 537, 15), woosh.Token(woosh.NAME, 'in', 537, 16, 537, 18), woosh.Token(woosh.OP, '(', 537, 19, 537, 20), woosh.Token(woosh.STRING, "'win32'", 537, 20, 537, 27), woosh.Token(woosh.OP, ',', 537, 27, 537, 28), woosh.Token(woosh.STRING, "'win16'", 537, 29, 537, 36), woosh.Token(woosh.OP, ')', 537, 36, 537, 37), woosh.Token(woosh.OP, ':', 537, 37, 537, 38), woosh.Token(woosh.NEWLINE, '\r\n', 537, 38, 538, 0), woosh.Token(woosh.COMMENT, '# In case one of the other tricks', 538, 8, 538, 41), woosh.Token(woosh.INDENT, ' ', 539, 0, 539, 8), woosh.Token(woosh.NAME, 'system', 539, 8, 539, 14), woosh.Token(woosh.OP, '=', 539, 15, 539, 16), woosh.Token(woosh.STRING, "'Windows'", 539, 17, 539, 26), woosh.Token(woosh.NEWLINE, '\r\n', 539, 26, 540, 0), woosh.Token(woosh.COMMENT, "# bpo-35516: Don't replace Darwin with macOS since input release and", 541, 4, 541, 72), woosh.Token(woosh.COMMENT, '# version arguments can be different than the currently running version.', 542, 4, 542, 76), woosh.Token(woosh.DEDENT, ' ', 544, 0, 544, 4), woosh.Token(woosh.NAME, 'return', 544, 4, 544, 10), woosh.Token(woosh.NAME, 'system', 544, 11, 544, 17), woosh.Token(woosh.OP, ',', 544, 17, 544, 18), woosh.Token(woosh.NAME, 'release', 544, 19, 544, 26), woosh.Token(woosh.OP, ',', 544, 26, 544, 27), woosh.Token(woosh.NAME, 'version', 544, 28, 544, 35), woosh.Token(woosh.NEWLINE, '\r\n', 544, 35, 545, 0), woosh.Token(woosh.COMMENT, '### Various internal helpers', 546, 0, 546, 28), woosh.Token(woosh.DEDENT, '', 548, 0, 548, 0), woosh.Token(woosh.NAME, 'def', 548, 0, 548, 3), woosh.Token(woosh.NAME, '_platform', 548, 4, 548, 13), woosh.Token(woosh.OP, '(', 548, 13, 548, 14), woosh.Token(woosh.OP, '*', 548, 14, 548, 15), woosh.Token(woosh.NAME, 'args', 548, 15, 548, 19), woosh.Token(woosh.OP, ')', 548, 19, 548, 20), woosh.Token(woosh.OP, ':', 548, 20, 548, 21), woosh.Token(woosh.NEWLINE, '\r\n', 548, 21, 549, 0), woosh.Token(woosh.INDENT, ' ', 550, 0, 550, 4), woosh.Token(woosh.STRING, '""" Helper to format the platform string in a filename\r\n compatible format e.g. "system-version-machine".\r\n """', 550, 4, 552, 7), woosh.Token(woosh.NEWLINE, '\r\n', 552, 7, 553, 0), woosh.Token(woosh.COMMENT, '# Format the platform string', 553, 4, 553, 32), woosh.Token(woosh.NAME, 'platform', 554, 4, 554, 12), woosh.Token(woosh.OP, '=', 554, 13, 554, 14), woosh.Token(woosh.STRING, "'-'", 554, 15, 554, 18), woosh.Token(woosh.OP, '.', 554, 18, 554, 19), woosh.Token(woosh.NAME, 'join', 554, 19, 554, 23), woosh.Token(woosh.OP, '(', 554, 23, 554, 24), woosh.Token(woosh.NAME, 'x', 554, 24, 554, 25), woosh.Token(woosh.OP, '.', 554, 25, 554, 26), woosh.Token(woosh.NAME, 'strip', 554, 26, 554, 31), woosh.Token(woosh.OP, '(', 554, 31, 554, 32), woosh.Token(woosh.OP, ')', 554, 32, 554, 33), woosh.Token(woosh.NAME, 'for', 554, 34, 554, 37), woosh.Token(woosh.NAME, 'x', 554, 38, 554, 39), woosh.Token(woosh.NAME, 'in', 554, 40, 554, 42), woosh.Token(woosh.NAME, 'filter', 554, 43, 554, 49), woosh.Token(woosh.OP, '(', 554, 49, 554, 50), woosh.Token(woosh.NAME, 'len', 554, 50, 554, 53), woosh.Token(woosh.OP, ',', 554, 53, 554, 54), woosh.Token(woosh.NAME, 'args', 554, 55, 554, 59), woosh.Token(woosh.OP, ')', 554, 59, 554, 60), woosh.Token(woosh.OP, ')', 554, 60, 554, 61), woosh.Token(woosh.NEWLINE, '\r\n', 554, 61, 555, 0), woosh.Token(woosh.COMMENT, '# Cleanup some possible filename obstacles...', 556, 4, 556, 49), woosh.Token(woosh.NAME, 'platform', 557, 4, 557, 12), woosh.Token(woosh.OP, '=', 557, 13, 557, 14), woosh.Token(woosh.NAME, 'platform', 557, 15, 557, 23), woosh.Token(woosh.OP, '.', 557, 23, 557, 24), woosh.Token(woosh.NAME, 'replace', 557, 24, 557, 31), woosh.Token(woosh.OP, '(', 557, 31, 557, 32), woosh.Token(woosh.STRING, "' '", 557, 32, 557, 35), woosh.Token(woosh.OP, ',', 557, 35, 557, 36), woosh.Token(woosh.STRING, "'_'", 557, 37, 557, 40), woosh.Token(woosh.OP, ')', 557, 40, 557, 41), woosh.Token(woosh.NEWLINE, '\r\n', 557, 41, 558, 0), woosh.Token(woosh.NAME, 'platform', 558, 4, 558, 12), woosh.Token(woosh.OP, '=', 558, 13, 558, 14), woosh.Token(woosh.NAME, 'platform', 558, 15, 558, 23), woosh.Token(woosh.OP, '.', 558, 23, 558, 24), woosh.Token(woosh.NAME, 'replace', 558, 24, 558, 31), woosh.Token(woosh.OP, '(', 558, 31, 558, 32), woosh.Token(woosh.STRING, "'/'", 558, 32, 558, 35), woosh.Token(woosh.OP, ',', 558, 35, 558, 36), woosh.Token(woosh.STRING, "'-'", 558, 37, 558, 40), woosh.Token(woosh.OP, ')', 558, 40, 558, 41), woosh.Token(woosh.NEWLINE, '\r\n', 558, 41, 559, 0), woosh.Token(woosh.NAME, 'platform', 559, 4, 559, 12), woosh.Token(woosh.OP, '=', 559, 13, 559, 14), woosh.Token(woosh.NAME, 'platform', 559, 15, 559, 23), woosh.Token(woosh.OP, '.', 559, 23, 559, 24), woosh.Token(woosh.NAME, 'replace', 559, 24, 559, 31), woosh.Token(woosh.OP, '(', 559, 31, 559, 32), woosh.Token(woosh.STRING, "'\\\\'", 559, 32, 559, 36), woosh.Token(woosh.OP, ',', 559, 36, 559, 37), woosh.Token(woosh.STRING, "'-'", 559, 38, 559, 41), woosh.Token(woosh.OP, ')', 559, 41, 559, 42), woosh.Token(woosh.NEWLINE, '\r\n', 559, 42, 560, 0), woosh.Token(woosh.NAME, 'platform', 560, 4, 560, 12), woosh.Token(woosh.OP, '=', 560, 13, 560, 14), woosh.Token(woosh.NAME, 'platform', 560, 15, 560, 23), woosh.Token(woosh.OP, '.', 560, 23, 560, 24), woosh.Token(woosh.NAME, 'replace', 560, 24, 560, 31), woosh.Token(woosh.OP, '(', 560, 31, 560, 32), woosh.Token(woosh.STRING, "':'", 560, 32, 560, 35), woosh.Token(woosh.OP, ',', 560, 35, 560, 36), woosh.Token(woosh.STRING, "'-'", 560, 37, 560, 40), woosh.Token(woosh.OP, ')', 560, 40, 560, 41), woosh.Token(woosh.NEWLINE, '\r\n', 560, 41, 561, 0), woosh.Token(woosh.NAME, 'platform', 561, 4, 561, 12), woosh.Token(woosh.OP, '=', 561, 13, 561, 14), woosh.Token(woosh.NAME, 'platform', 561, 15, 561, 23), woosh.Token(woosh.OP, '.', 561, 23, 561, 24), woosh.Token(woosh.NAME, 'replace', 561, 24, 561, 31), woosh.Token(woosh.OP, '(', 561, 31, 561, 32), woosh.Token(woosh.STRING, "';'", 561, 32, 561, 35), woosh.Token(woosh.OP, ',', 561, 35, 561, 36), woosh.Token(woosh.STRING, "'-'", 561, 37, 561, 40), woosh.Token(woosh.OP, ')', 561, 40, 561, 41), woosh.Token(woosh.NEWLINE, '\r\n', 561, 41, 562, 0), woosh.Token(woosh.NAME, 'platform', 562, 4, 562, 12), woosh.Token(woosh.OP, '=', 562, 13, 562, 14), woosh.Token(woosh.NAME, 'platform', 562, 15, 562, 23), woosh.Token(woosh.OP, '.', 562, 23, 562, 24), woosh.Token(woosh.NAME, 'replace', 562, 24, 562, 31), woosh.Token(woosh.OP, '(', 562, 31, 562, 32), woosh.Token(woosh.STRING, '\'"\'', 562, 32, 562, 35), woosh.Token(woosh.OP, ',', 562, 35, 562, 36), woosh.Token(woosh.STRING, "'-'", 562, 37, 562, 40), woosh.Token(woosh.OP, ')', 562, 40, 562, 41), woosh.Token(woosh.NEWLINE, '\r\n', 562, 41, 563, 0), woosh.Token(woosh.NAME, 'platform', 563, 4, 563, 12), woosh.Token(woosh.OP, '=', 563, 13, 563, 14), woosh.Token(woosh.NAME, 'platform', 563, 15, 563, 23), woosh.Token(woosh.OP, '.', 563, 23, 563, 24), woosh.Token(woosh.NAME, 'replace', 563, 24, 563, 31), woosh.Token(woosh.OP, '(', 563, 31, 563, 32), woosh.Token(woosh.STRING, "'('", 563, 32, 563, 35), woosh.Token(woosh.OP, ',', 563, 35, 563, 36), woosh.Token(woosh.STRING, "'-'", 563, 37, 563, 40), woosh.Token(woosh.OP, ')', 563, 40, 563, 41), woosh.Token(woosh.NEWLINE, '\r\n', 563, 41, 564, 0), woosh.Token(woosh.NAME, 'platform', 564, 4, 564, 12), woosh.Token(woosh.OP, '=', 564, 13, 564, 14), woosh.Token(woosh.NAME, 'platform', 564, 15, 564, 23), woosh.Token(woosh.OP, '.', 564, 23, 564, 24), woosh.Token(woosh.NAME, 'replace', 564, 24, 564, 31), woosh.Token(woosh.OP, '(', 564, 31, 564, 32), woosh.Token(woosh.STRING, "')'", 564, 32, 564, 35), woosh.Token(woosh.OP, ',', 564, 35, 564, 36), woosh.Token(woosh.STRING, "'-'", 564, 37, 564, 40), woosh.Token(woosh.OP, ')', 564, 40, 564, 41), woosh.Token(woosh.NEWLINE, '\r\n', 564, 41, 565, 0), woosh.Token(woosh.COMMENT, "# No need to report 'unknown' information...", 566, 4, 566, 48), woosh.Token(woosh.NAME, 'platform', 567, 4, 567, 12), woosh.Token(woosh.OP, '=', 567, 13, 567, 14), woosh.Token(woosh.NAME, 'platform', 567, 15, 567, 23), woosh.Token(woosh.OP, '.', 567, 23, 567, 24), woosh.Token(woosh.NAME, 'replace', 567, 24, 567, 31), woosh.Token(woosh.OP, '(', 567, 31, 567, 32), woosh.Token(woosh.STRING, "'unknown'", 567, 32, 567, 41), woosh.Token(woosh.OP, ',', 567, 41, 567, 42), woosh.Token(woosh.STRING, "''", 567, 43, 567, 45), woosh.Token(woosh.OP, ')', 567, 45, 567, 46), woosh.Token(woosh.NEWLINE, '\r\n', 567, 46, 568, 0), woosh.Token(woosh.COMMENT, "# Fold '--'s and remove trailing '-'", 569, 4, 569, 40), woosh.Token(woosh.NAME, 'while', 570, 4, 570, 9), woosh.Token(woosh.NUMBER, '1', 570, 10, 570, 11), woosh.Token(woosh.OP, ':', 570, 11, 570, 12), woosh.Token(woosh.NEWLINE, '\r\n', 570, 12, 571, 0), woosh.Token(woosh.INDENT, ' ', 571, 0, 571, 8), woosh.Token(woosh.NAME, 'cleaned', 571, 8, 571, 15), woosh.Token(woosh.OP, '=', 571, 16, 571, 17), woosh.Token(woosh.NAME, 'platform', 571, 18, 571, 26), woosh.Token(woosh.OP, '.', 571, 26, 571, 27), woosh.Token(woosh.NAME, 'replace', 571, 27, 571, 34), woosh.Token(woosh.OP, '(', 571, 34, 571, 35), woosh.Token(woosh.STRING, "'--'", 571, 35, 571, 39), woosh.Token(woosh.OP, ',', 571, 39, 571, 40), woosh.Token(woosh.STRING, "'-'", 571, 41, 571, 44), woosh.Token(woosh.OP, ')', 571, 44, 571, 45), woosh.Token(woosh.NEWLINE, '\r\n', 571, 45, 572, 0), woosh.Token(woosh.NAME, 'if', 572, 8, 572, 10), woosh.Token(woosh.NAME, 'cleaned', 572, 11, 572, 18), woosh.Token(woosh.OP, '==', 572, 19, 572, 21), woosh.Token(woosh.NAME, 'platform', 572, 22, 572, 30), woosh.Token(woosh.OP, ':', 572, 30, 572, 31), woosh.Token(woosh.NEWLINE, '\r\n', 572, 31, 573, 0), woosh.Token(woosh.INDENT, ' ', 573, 0, 573, 12), woosh.Token(woosh.NAME, 'break', 573, 12, 573, 17), woosh.Token(woosh.NEWLINE, '\r\n', 573, 17, 574, 0), woosh.Token(woosh.DEDENT, ' ', 574, 0, 574, 8), woosh.Token(woosh.NAME, 'platform', 574, 8, 574, 16), woosh.Token(woosh.OP, '=', 574, 17, 574, 18), woosh.Token(woosh.NAME, 'cleaned', 574, 19, 574, 26), woosh.Token(woosh.NEWLINE, '\r\n', 574, 26, 575, 0), woosh.Token(woosh.DEDENT, ' ', 575, 0, 575, 4), woosh.Token(woosh.NAME, 'while', 575, 4, 575, 9), woosh.Token(woosh.NAME, 'platform', 575, 10, 575, 18), woosh.Token(woosh.OP, '[', 575, 18, 575, 19), woosh.Token(woosh.OP, '-', 575, 19, 575, 20), woosh.Token(woosh.NUMBER, '1', 575, 20, 575, 21), woosh.Token(woosh.OP, ']', 575, 21, 575, 22), woosh.Token(woosh.OP, '==', 575, 23, 575, 25), woosh.Token(woosh.STRING, "'-'", 575, 26, 575, 29), woosh.Token(woosh.OP, ':', 575, 29, 575, 30), woosh.Token(woosh.NEWLINE, '\r\n', 575, 30, 576, 0), woosh.Token(woosh.INDENT, ' ', 576, 0, 576, 8), woosh.Token(woosh.NAME, 'platform', 576, 8, 576, 16), woosh.Token(woosh.OP, '=', 576, 17, 576, 18), woosh.Token(woosh.NAME, 'platform', 576, 19, 576, 27), woosh.Token(woosh.OP, '[', 576, 27, 576, 28), woosh.Token(woosh.OP, ':', 576, 28, 576, 29), woosh.Token(woosh.OP, '-', 576, 29, 576, 30), woosh.Token(woosh.NUMBER, '1', 576, 30, 576, 31), woosh.Token(woosh.OP, ']', 576, 31, 576, 32), woosh.Token(woosh.NEWLINE, '\r\n', 576, 32, 577, 0), woosh.Token(woosh.DEDENT, ' ', 578, 0, 578, 4), woosh.Token(woosh.NAME, 'return', 578, 4, 578, 10), woosh.Token(woosh.NAME, 'platform', 578, 11, 578, 19), woosh.Token(woosh.NEWLINE, '\r\n', 578, 19, 579, 0), woosh.Token(woosh.DEDENT, '', 580, 0, 580, 0), woosh.Token(woosh.NAME, 'def', 580, 0, 580, 3), woosh.Token(woosh.NAME, '_node', 580, 4, 580, 9), woosh.Token(woosh.OP, '(', 580, 9, 580, 10), woosh.Token(woosh.NAME, 'default', 580, 10, 580, 17), woosh.Token(woosh.OP, '=', 580, 17, 580, 18), woosh.Token(woosh.STRING, "''", 580, 18, 580, 20), woosh.Token(woosh.OP, ')', 580, 20, 580, 21), woosh.Token(woosh.OP, ':', 580, 21, 580, 22), woosh.Token(woosh.NEWLINE, '\r\n', 580, 22, 581, 0), woosh.Token(woosh.INDENT, ' ', 582, 0, 582, 4), woosh.Token(woosh.STRING, '""" Helper to determine the node name of this machine.\r\n """', 582, 4, 583, 7), woosh.Token(woosh.NEWLINE, '\r\n', 583, 7, 584, 0), woosh.Token(woosh.NAME, 'try', 584, 4, 584, 7), woosh.Token(woosh.OP, ':', 584, 7, 584, 8), woosh.Token(woosh.NEWLINE, '\r\n', 584, 8, 585, 0), woosh.Token(woosh.INDENT, ' ', 585, 0, 585, 8), woosh.Token(woosh.NAME, 'import', 585, 8, 585, 14), woosh.Token(woosh.NAME, 'socket', 585, 15, 585, 21), woosh.Token(woosh.NEWLINE, '\r\n', 585, 21, 586, 0), woosh.Token(woosh.DEDENT, ' ', 586, 0, 586, 4), woosh.Token(woosh.NAME, 'except', 586, 4, 586, 10), woosh.Token(woosh.NAME, 'ImportError', 586, 11, 586, 22), woosh.Token(woosh.OP, ':', 586, 22, 586, 23), woosh.Token(woosh.NEWLINE, '\r\n', 586, 23, 587, 0), woosh.Token(woosh.COMMENT, '# No sockets...', 587, 8, 587, 23), woosh.Token(woosh.INDENT, ' ', 588, 0, 588, 8), woosh.Token(woosh.NAME, 'return', 588, 8, 588, 14), woosh.Token(woosh.NAME, 'default', 588, 15, 588, 22), woosh.Token(woosh.NEWLINE, '\r\n', 588, 22, 589, 0), woosh.Token(woosh.DEDENT, ' ', 589, 0, 589, 4), woosh.Token(woosh.NAME, 'try', 589, 4, 589, 7), woosh.Token(woosh.OP, ':', 589, 7, 589, 8), woosh.Token(woosh.NEWLINE, '\r\n', 589, 8, 590, 0), woosh.Token(woosh.INDENT, ' ', 590, 0, 590, 8), woosh.Token(woosh.NAME, 'return', 590, 8, 590, 14), woosh.Token(woosh.NAME, 'socket', 590, 15, 590, 21), woosh.Token(woosh.OP, '.', 590, 21, 590, 22), woosh.Token(woosh.NAME, 'gethostname', 590, 22, 590, 33), woosh.Token(woosh.OP, '(', 590, 33, 590, 34), woosh.Token(woosh.OP, ')', 590, 34, 590, 35), woosh.Token(woosh.NEWLINE, '\r\n', 590, 35, 591, 0), woosh.Token(woosh.DEDENT, ' ', 591, 0, 591, 4), woosh.Token(woosh.NAME, 'except', 591, 4, 591, 10), woosh.Token(woosh.NAME, 'OSError', 591, 11, 591, 18), woosh.Token(woosh.OP, ':', 591, 18, 591, 19), woosh.Token(woosh.NEWLINE, '\r\n', 591, 19, 592, 0), woosh.Token(woosh.COMMENT, '# Still not working...', 592, 8, 592, 30), woosh.Token(woosh.INDENT, ' ', 593, 0, 593, 8), woosh.Token(woosh.NAME, 'return', 593, 8, 593, 14), woosh.Token(woosh.NAME, 'default', 593, 15, 593, 22), woosh.Token(woosh.NEWLINE, '\r\n', 593, 22, 594, 0), woosh.Token(woosh.DEDENT, '', 595, 0, 595, 0), woosh.Token(woosh.DEDENT, '', 595, 0, 595, 0), woosh.Token(woosh.NAME, 'def', 595, 0, 595, 3), woosh.Token(woosh.NAME, '_follow_symlinks', 595, 4, 595, 20), woosh.Token(woosh.OP, '(', 595, 20, 595, 21), woosh.Token(woosh.NAME, 'filepath', 595, 21, 595, 29), woosh.Token(woosh.OP, ')', 595, 29, 595, 30), woosh.Token(woosh.OP, ':', 595, 30, 595, 31), woosh.Token(woosh.NEWLINE, '\r\n', 595, 31, 596, 0), woosh.Token(woosh.INDENT, ' ', 597, 0, 597, 4), woosh.Token(woosh.STRING, '""" In case filepath is a symlink, follow it until a\r\n real file is reached.\r\n """', 597, 4, 599, 7), woosh.Token(woosh.NEWLINE, '\r\n', 599, 7, 600, 0), woosh.Token(woosh.NAME, 'filepath', 600, 4, 600, 12), woosh.Token(woosh.OP, '=', 600, 13, 600, 14), woosh.Token(woosh.NAME, 'os', 600, 15, 600, 17), woosh.Token(woosh.OP, '.', 600, 17, 600, 18), woosh.Token(woosh.NAME, 'path', 600, 18, 600, 22), woosh.Token(woosh.OP, '.', 600, 22, 600, 23), woosh.Token(woosh.NAME, 'abspath', 600, 23, 600, 30), woosh.Token(woosh.OP, '(', 600, 30, 600, 31), woosh.Token(woosh.NAME, 'filepath', 600, 31, 600, 39), woosh.Token(woosh.OP, ')', 600, 39, 600, 40), woosh.Token(woosh.NEWLINE, '\r\n', 600, 40, 601, 0), woosh.Token(woosh.NAME, 'while', 601, 4, 601, 9), woosh.Token(woosh.NAME, 'os', 601, 10, 601, 12), woosh.Token(woosh.OP, '.', 601, 12, 601, 13), woosh.Token(woosh.NAME, 'path', 601, 13, 601, 17), woosh.Token(woosh.OP, '.', 601, 17, 601, 18), woosh.Token(woosh.NAME, 'islink', 601, 18, 601, 24), woosh.Token(woosh.OP, '(', 601, 24, 601, 25), woosh.Token(woosh.NAME, 'filepath', 601, 25, 601, 33), woosh.Token(woosh.OP, ')', 601, 33, 601, 34), woosh.Token(woosh.OP, ':', 601, 34, 601, 35), woosh.Token(woosh.NEWLINE, '\r\n', 601, 35, 602, 0), woosh.Token(woosh.INDENT, ' ', 602, 0, 602, 8), woosh.Token(woosh.NAME, 'filepath', 602, 8, 602, 16), woosh.Token(woosh.OP, '=', 602, 17, 602, 18), woosh.Token(woosh.NAME, 'os', 602, 19, 602, 21), woosh.Token(woosh.OP, '.', 602, 21, 602, 22), woosh.Token(woosh.NAME, 'path', 602, 22, 602, 26), woosh.Token(woosh.OP, '.', 602, 26, 602, 27), woosh.Token(woosh.NAME, 'normpath', 602, 27, 602, 35), woosh.Token(woosh.OP, '(', 602, 35, 602, 36), woosh.Token(woosh.NAME, 'os', 603, 12, 603, 14), woosh.Token(woosh.OP, '.', 603, 14, 603, 15), woosh.Token(woosh.NAME, 'path', 603, 15, 603, 19), woosh.Token(woosh.OP, '.', 603, 19, 603, 20), woosh.Token(woosh.NAME, 'join', 603, 20, 603, 24), woosh.Token(woosh.OP, '(', 603, 24, 603, 25), woosh.Token(woosh.NAME, 'os', 603, 25, 603, 27), woosh.Token(woosh.OP, '.', 603, 27, 603, 28), woosh.Token(woosh.NAME, 'path', 603, 28, 603, 32), woosh.Token(woosh.OP, '.', 603, 32, 603, 33), woosh.Token(woosh.NAME, 'dirname', 603, 33, 603, 40), woosh.Token(woosh.OP, '(', 603, 40, 603, 41), woosh.Token(woosh.NAME, 'filepath', 603, 41, 603, 49), woosh.Token(woosh.OP, ')', 603, 49, 603, 50), woosh.Token(woosh.OP, ',', 603, 50, 603, 51), woosh.Token(woosh.NAME, 'os', 603, 52, 603, 54), woosh.Token(woosh.OP, '.', 603, 54, 603, 55), woosh.Token(woosh.NAME, 'readlink', 603, 55, 603, 63), woosh.Token(woosh.OP, '(', 603, 63, 603, 64), woosh.Token(woosh.NAME, 'filepath', 603, 64, 603, 72), woosh.Token(woosh.OP, ')', 603, 72, 603, 73), woosh.Token(woosh.OP, ')', 603, 73, 603, 74), woosh.Token(woosh.OP, ')', 603, 74, 603, 75), woosh.Token(woosh.NEWLINE, '\r\n', 603, 75, 604, 0), woosh.Token(woosh.DEDENT, ' ', 604, 0, 604, 4), woosh.Token(woosh.NAME, 'return', 604, 4, 604, 10), woosh.Token(woosh.NAME, 'filepath', 604, 11, 604, 19), woosh.Token(woosh.NEWLINE, '\r\n', 604, 19, 605, 0), woosh.Token(woosh.DEDENT, '', 607, 0, 607, 0), woosh.Token(woosh.NAME, 'def', 607, 0, 607, 3), woosh.Token(woosh.NAME, '_syscmd_file', 607, 4, 607, 16), woosh.Token(woosh.OP, '(', 607, 16, 607, 17), woosh.Token(woosh.NAME, 'target', 607, 17, 607, 23), woosh.Token(woosh.OP, ',', 607, 23, 607, 24), woosh.Token(woosh.NAME, 'default', 607, 25, 607, 32), woosh.Token(woosh.OP, '=', 607, 32, 607, 33), woosh.Token(woosh.STRING, "''", 607, 33, 607, 35), woosh.Token(woosh.OP, ')', 607, 35, 607, 36), woosh.Token(woosh.OP, ':', 607, 36, 607, 37), woosh.Token(woosh.NEWLINE, '\r\n', 607, 37, 608, 0), woosh.Token(woosh.INDENT, ' ', 609, 0, 609, 4), woosh.Token(woosh.STRING, '""" Interface to the system\'s file command.\r\n\r\n The function uses the -b option of the file command to have it\r\n omit the filename in its output. Follow the symlinks. It returns\r\n default in case the command should fail.\r\n\r\n """', 609, 4, 615, 7), woosh.Token(woosh.NEWLINE, '\r\n', 615, 7, 616, 0), woosh.Token(woosh.NAME, 'if', 616, 4, 616, 6), woosh.Token(woosh.NAME, 'sys', 616, 7, 616, 10), woosh.Token(woosh.OP, '.', 616, 10, 616, 11), woosh.Token(woosh.NAME, 'platform', 616, 11, 616, 19), woosh.Token(woosh.NAME, 'in', 616, 20, 616, 22), woosh.Token(woosh.OP, '(', 616, 23, 616, 24), woosh.Token(woosh.STRING, "'dos'", 616, 24, 616, 29), woosh.Token(woosh.OP, ',', 616, 29, 616, 30), woosh.Token(woosh.STRING, "'win32'", 616, 31, 616, 38), woosh.Token(woosh.OP, ',', 616, 38, 616, 39), woosh.Token(woosh.STRING, "'win16'", 616, 40, 616, 47), woosh.Token(woosh.OP, ')', 616, 47, 616, 48), woosh.Token(woosh.OP, ':', 616, 48, 616, 49), woosh.Token(woosh.NEWLINE, '\r\n', 616, 49, 617, 0), woosh.Token(woosh.COMMENT, '# XXX Others too ?', 617, 8, 617, 26), woosh.Token(woosh.INDENT, ' ', 618, 0, 618, 8), woosh.Token(woosh.NAME, 'return', 618, 8, 618, 14), woosh.Token(woosh.NAME, 'default', 618, 15, 618, 22), woosh.Token(woosh.NEWLINE, '\r\n', 618, 22, 619, 0), woosh.Token(woosh.DEDENT, ' ', 620, 0, 620, 4), woosh.Token(woosh.NAME, 'import', 620, 4, 620, 10), woosh.Token(woosh.NAME, 'subprocess', 620, 11, 620, 21), woosh.Token(woosh.NEWLINE, '\r\n', 620, 21, 621, 0), woosh.Token(woosh.NAME, 'target', 621, 4, 621, 10), woosh.Token(woosh.OP, '=', 621, 11, 621, 12), woosh.Token(woosh.NAME, '_follow_symlinks', 621, 13, 621, 29), woosh.Token(woosh.OP, '(', 621, 29, 621, 30), woosh.Token(woosh.NAME, 'target', 621, 30, 621, 36), woosh.Token(woosh.OP, ')', 621, 36, 621, 37), woosh.Token(woosh.NEWLINE, '\r\n', 621, 37, 622, 0), woosh.Token(woosh.COMMENT, '# "file" output is locale dependent: force the usage of the C locale', 622, 4, 622, 72), woosh.Token(woosh.COMMENT, '# to get deterministic behavior.', 623, 4, 623, 36), woosh.Token(woosh.NAME, 'env', 624, 4, 624, 7), woosh.Token(woosh.OP, '=', 624, 8, 624, 9), woosh.Token(woosh.NAME, 'dict', 624, 10, 624, 14), woosh.Token(woosh.OP, '(', 624, 14, 624, 15), woosh.Token(woosh.NAME, 'os', 624, 15, 624, 17), woosh.Token(woosh.OP, '.', 624, 17, 624, 18), woosh.Token(woosh.NAME, 'environ', 624, 18, 624, 25), woosh.Token(woosh.OP, ',', 624, 25, 624, 26), woosh.Token(woosh.NAME, 'LC_ALL', 624, 27, 624, 33), woosh.Token(woosh.OP, '=', 624, 33, 624, 34), woosh.Token(woosh.STRING, "'C'", 624, 34, 624, 37), woosh.Token(woosh.OP, ')', 624, 37, 624, 38), woosh.Token(woosh.NEWLINE, '\r\n', 624, 38, 625, 0), woosh.Token(woosh.NAME, 'try', 625, 4, 625, 7), woosh.Token(woosh.OP, ':', 625, 7, 625, 8), woosh.Token(woosh.NEWLINE, '\r\n', 625, 8, 626, 0), woosh.Token(woosh.COMMENT, '# -b: do not prepend filenames to output lines (brief mode)', 626, 8, 626, 67), woosh.Token(woosh.INDENT, ' ', 627, 0, 627, 8), woosh.Token(woosh.NAME, 'output', 627, 8, 627, 14), woosh.Token(woosh.OP, '=', 627, 15, 627, 16), woosh.Token(woosh.NAME, 'subprocess', 627, 17, 627, 27), woosh.Token(woosh.OP, '.', 627, 27, 627, 28), woosh.Token(woosh.NAME, 'check_output', 627, 28, 627, 40), woosh.Token(woosh.OP, '(', 627, 40, 627, 41), woosh.Token(woosh.OP, '[', 627, 41, 627, 42), woosh.Token(woosh.STRING, "'file'", 627, 42, 627, 48), woosh.Token(woosh.OP, ',', 627, 48, 627, 49), woosh.Token(woosh.STRING, "'-b'", 627, 50, 627, 54), woosh.Token(woosh.OP, ',', 627, 54, 627, 55), woosh.Token(woosh.NAME, 'target', 627, 56, 627, 62), woosh.Token(woosh.OP, ']', 627, 62, 627, 63), woosh.Token(woosh.OP, ',', 627, 63, 627, 64), woosh.Token(woosh.NAME, 'stderr', 628, 41, 628, 47), woosh.Token(woosh.OP, '=', 628, 47, 628, 48), woosh.Token(woosh.NAME, 'subprocess', 628, 48, 628, 58), woosh.Token(woosh.OP, '.', 628, 58, 628, 59), woosh.Token(woosh.NAME, 'DEVNULL', 628, 59, 628, 66), woosh.Token(woosh.OP, ',', 628, 66, 628, 67), woosh.Token(woosh.NAME, 'env', 629, 41, 629, 44), woosh.Token(woosh.OP, '=', 629, 44, 629, 45), woosh.Token(woosh.NAME, 'env', 629, 45, 629, 48), woosh.Token(woosh.OP, ')', 629, 48, 629, 49), woosh.Token(woosh.NEWLINE, '\r\n', 629, 49, 630, 0), woosh.Token(woosh.DEDENT, ' ', 630, 0, 630, 4), woosh.Token(woosh.NAME, 'except', 630, 4, 630, 10), woosh.Token(woosh.OP, '(', 630, 11, 630, 12), woosh.Token(woosh.NAME, 'OSError', 630, 12, 630, 19), woosh.Token(woosh.OP, ',', 630, 19, 630, 20), woosh.Token(woosh.NAME, 'subprocess', 630, 21, 630, 31), woosh.Token(woosh.OP, '.', 630, 31, 630, 32), woosh.Token(woosh.NAME, 'CalledProcessError', 630, 32, 630, 50), woosh.Token(woosh.OP, ')', 630, 50, 630, 51), woosh.Token(woosh.OP, ':', 630, 51, 630, 52), woosh.Token(woosh.NEWLINE, '\r\n', 630, 52, 631, 0), woosh.Token(woosh.INDENT, ' ', 631, 0, 631, 8), woosh.Token(woosh.NAME, 'return', 631, 8, 631, 14), woosh.Token(woosh.NAME, 'default', 631, 15, 631, 22), woosh.Token(woosh.NEWLINE, '\r\n', 631, 22, 632, 0), woosh.Token(woosh.DEDENT, ' ', 632, 0, 632, 4), woosh.Token(woosh.NAME, 'if', 632, 4, 632, 6), woosh.Token(woosh.NAME, 'not', 632, 7, 632, 10), woosh.Token(woosh.NAME, 'output', 632, 11, 632, 17), woosh.Token(woosh.OP, ':', 632, 17, 632, 18), woosh.Token(woosh.NEWLINE, '\r\n', 632, 18, 633, 0), woosh.Token(woosh.INDENT, ' ', 633, 0, 633, 8), woosh.Token(woosh.NAME, 'return', 633, 8, 633, 14), woosh.Token(woosh.NAME, 'default', 633, 15, 633, 22), woosh.Token(woosh.NEWLINE, '\r\n', 633, 22, 634, 0), woosh.Token(woosh.COMMENT, '# With the C locale, the output should be mostly ASCII-compatible.', 634, 4, 634, 70), woosh.Token(woosh.COMMENT, '# Decode from Latin-1 to prevent Unicode decode error.', 635, 4, 635, 58), woosh.Token(woosh.DEDENT, ' ', 636, 0, 636, 4), woosh.Token(woosh.NAME, 'return', 636, 4, 636, 10), woosh.Token(woosh.NAME, 'output', 636, 11, 636, 17), woosh.Token(woosh.OP, '.', 636, 17, 636, 18), woosh.Token(woosh.NAME, 'decode', 636, 18, 636, 24), woosh.Token(woosh.OP, '(', 636, 24, 636, 25), woosh.Token(woosh.STRING, "'latin-1'", 636, 25, 636, 34), woosh.Token(woosh.OP, ')', 636, 34, 636, 35), woosh.Token(woosh.NEWLINE, '\r\n', 636, 35, 637, 0), woosh.Token(woosh.COMMENT, '### Information about the used architecture', 638, 0, 638, 43), woosh.Token(woosh.COMMENT, '# Default values for architecture; non-empty strings override the', 640, 0, 640, 65), woosh.Token(woosh.COMMENT, '# defaults given as parameters', 641, 0, 641, 30), woosh.Token(woosh.DEDENT, '', 642, 0, 642, 0), woosh.Token(woosh.NAME, '_default_architecture', 642, 0, 642, 21), woosh.Token(woosh.OP, '=', 642, 22, 642, 23), woosh.Token(woosh.OP, '{', 642, 24, 642, 25), woosh.Token(woosh.STRING, "'win32'", 643, 4, 643, 11), woosh.Token(woosh.OP, ':', 643, 11, 643, 12), woosh.Token(woosh.OP, '(', 643, 13, 643, 14), woosh.Token(woosh.STRING, "''", 643, 14, 643, 16), woosh.Token(woosh.OP, ',', 643, 16, 643, 17), woosh.Token(woosh.STRING, "'WindowsPE'", 643, 18, 643, 29), woosh.Token(woosh.OP, ')', 643, 29, 643, 30), woosh.Token(woosh.OP, ',', 643, 30, 643, 31), woosh.Token(woosh.STRING, "'win16'", 644, 4, 644, 11), woosh.Token(woosh.OP, ':', 644, 11, 644, 12), woosh.Token(woosh.OP, '(', 644, 13, 644, 14), woosh.Token(woosh.STRING, "''", 644, 14, 644, 16), woosh.Token(woosh.OP, ',', 644, 16, 644, 17), woosh.Token(woosh.STRING, "'Windows'", 644, 18, 644, 27), woosh.Token(woosh.OP, ')', 644, 27, 644, 28), woosh.Token(woosh.OP, ',', 644, 28, 644, 29), woosh.Token(woosh.STRING, "'dos'", 645, 4, 645, 9), woosh.Token(woosh.OP, ':', 645, 9, 645, 10), woosh.Token(woosh.OP, '(', 645, 11, 645, 12), woosh.Token(woosh.STRING, "''", 645, 12, 645, 14), woosh.Token(woosh.OP, ',', 645, 14, 645, 15), woosh.Token(woosh.STRING, "'MSDOS'", 645, 16, 645, 23), woosh.Token(woosh.OP, ')', 645, 23, 645, 24), woosh.Token(woosh.OP, ',', 645, 24, 645, 25), woosh.Token(woosh.OP, '}', 646, 0, 646, 1), woosh.Token(woosh.NEWLINE, '\r\n', 646, 1, 647, 0), woosh.Token(woosh.NAME, 'def', 648, 0, 648, 3), woosh.Token(woosh.NAME, 'architecture', 648, 4, 648, 16), woosh.Token(woosh.OP, '(', 648, 16, 648, 17), woosh.Token(woosh.NAME, 'executable', 648, 17, 648, 27), woosh.Token(woosh.OP, '=', 648, 27, 648, 28), woosh.Token(woosh.NAME, 'sys', 648, 28, 648, 31), woosh.Token(woosh.OP, '.', 648, 31, 648, 32), woosh.Token(woosh.NAME, 'executable', 648, 32, 648, 42), woosh.Token(woosh.OP, ',', 648, 42, 648, 43), woosh.Token(woosh.NAME, 'bits', 648, 44, 648, 48), woosh.Token(woosh.OP, '=', 648, 48, 648, 49), woosh.Token(woosh.STRING, "''", 648, 49, 648, 51), woosh.Token(woosh.OP, ',', 648, 51, 648, 52), woosh.Token(woosh.NAME, 'linkage', 648, 53, 648, 60), woosh.Token(woosh.OP, '=', 648, 60, 648, 61), woosh.Token(woosh.STRING, "''", 648, 61, 648, 63), woosh.Token(woosh.OP, ')', 648, 63, 648, 64), woosh.Token(woosh.OP, ':', 648, 64, 648, 65), woosh.Token(woosh.NEWLINE, '\r\n', 648, 65, 649, 0), woosh.Token(woosh.INDENT, ' ', 650, 0, 650, 4), woosh.Token(woosh.STRING, '""" Queries the given executable (defaults to the Python interpreter\r\n binary) for various architecture information.\r\n\r\n Returns a tuple (bits, linkage) which contains information about\r\n the bit architecture and the linkage format used for the\r\n executable. Both values are returned as strings.\r\n\r\n Values that cannot be determined are returned as given by the\r\n parameter presets. If bits is given as \'\', the sizeof(pointer)\r\n (or sizeof(long) on Python version < 1.5.2) is used as\r\n indicator for the supported pointer size.\r\n\r\n The function relies on the system\'s "file" command to do the\r\n actual work. This is available on most if not all Unix\r\n platforms. On some non-Unix platforms where the "file" command\r\n does not exist and the executable is set to the Python interpreter\r\n binary defaults from _default_architecture are used.\r\n\r\n """', 650, 4, 668, 7), woosh.Token(woosh.NEWLINE, '\r\n', 668, 7, 669, 0), woosh.Token(woosh.COMMENT, '# Use the sizeof(pointer) as default number of bits if nothing', 669, 4, 669, 66), woosh.Token(woosh.COMMENT, '# else is given as default.', 670, 4, 670, 31), woosh.Token(woosh.NAME, 'if', 671, 4, 671, 6), woosh.Token(woosh.NAME, 'not', 671, 7, 671, 10), woosh.Token(woosh.NAME, 'bits', 671, 11, 671, 15), woosh.Token(woosh.OP, ':', 671, 15, 671, 16), woosh.Token(woosh.NEWLINE, '\r\n', 671, 16, 672, 0), woosh.Token(woosh.INDENT, ' ', 672, 0, 672, 8), woosh.Token(woosh.NAME, 'import', 672, 8, 672, 14), woosh.Token(woosh.NAME, 'struct', 672, 15, 672, 21), woosh.Token(woosh.NEWLINE, '\r\n', 672, 21, 673, 0), woosh.Token(woosh.NAME, 'size', 673, 8, 673, 12), woosh.Token(woosh.OP, '=', 673, 13, 673, 14), woosh.Token(woosh.NAME, 'struct', 673, 15, 673, 21), woosh.Token(woosh.OP, '.', 673, 21, 673, 22), woosh.Token(woosh.NAME, 'calcsize', 673, 22, 673, 30), woosh.Token(woosh.OP, '(', 673, 30, 673, 31), woosh.Token(woosh.STRING, "'P'", 673, 31, 673, 34), woosh.Token(woosh.OP, ')', 673, 34, 673, 35), woosh.Token(woosh.NEWLINE, '\r\n', 673, 35, 674, 0), woosh.Token(woosh.NAME, 'bits', 674, 8, 674, 12), woosh.Token(woosh.OP, '=', 674, 13, 674, 14), woosh.Token(woosh.NAME, 'str', 674, 15, 674, 18), woosh.Token(woosh.OP, '(', 674, 18, 674, 19), woosh.Token(woosh.NAME, 'size', 674, 19, 674, 23), woosh.Token(woosh.OP, '*', 674, 24, 674, 25), woosh.Token(woosh.NUMBER, '8', 674, 26, 674, 27), woosh.Token(woosh.OP, ')', 674, 27, 674, 28), woosh.Token(woosh.OP, '+', 674, 29, 674, 30), woosh.Token(woosh.STRING, "'bit'", 674, 31, 674, 36), woosh.Token(woosh.NEWLINE, '\r\n', 674, 36, 675, 0), woosh.Token(woosh.COMMENT, "# Get data from the 'file' system command", 676, 4, 676, 45), woosh.Token(woosh.DEDENT, ' ', 677, 0, 677, 4), woosh.Token(woosh.NAME, 'if', 677, 4, 677, 6), woosh.Token(woosh.NAME, 'executable', 677, 7, 677, 17), woosh.Token(woosh.OP, ':', 677, 17, 677, 18), woosh.Token(woosh.NEWLINE, '\r\n', 677, 18, 678, 0), woosh.Token(woosh.INDENT, ' ', 678, 0, 678, 8), woosh.Token(woosh.NAME, 'fileout', 678, 8, 678, 15), woosh.Token(woosh.OP, '=', 678, 16, 678, 17), woosh.Token(woosh.NAME, '_syscmd_file', 678, 18, 678, 30), woosh.Token(woosh.OP, '(', 678, 30, 678, 31), woosh.Token(woosh.NAME, 'executable', 678, 31, 678, 41), woosh.Token(woosh.OP, ',', 678, 41, 678, 42), woosh.Token(woosh.STRING, "''", 678, 43, 678, 45), woosh.Token(woosh.OP, ')', 678, 45, 678, 46), woosh.Token(woosh.NEWLINE, '\r\n', 678, 46, 679, 0), woosh.Token(woosh.DEDENT, ' ', 679, 0, 679, 4), woosh.Token(woosh.NAME, 'else', 679, 4, 679, 8), woosh.Token(woosh.OP, ':', 679, 8, 679, 9), woosh.Token(woosh.NEWLINE, '\r\n', 679, 9, 680, 0), woosh.Token(woosh.INDENT, ' ', 680, 0, 680, 8), woosh.Token(woosh.NAME, 'fileout', 680, 8, 680, 15), woosh.Token(woosh.OP, '=', 680, 16, 680, 17), woosh.Token(woosh.STRING, "''", 680, 18, 680, 20), woosh.Token(woosh.NEWLINE, '\r\n', 680, 20, 681, 0), woosh.Token(woosh.DEDENT, ' ', 682, 0, 682, 4), woosh.Token(woosh.NAME, 'if', 682, 4, 682, 6), woosh.Token(woosh.NAME, 'not', 682, 7, 682, 10), woosh.Token(woosh.NAME, 'fileout', 682, 11, 682, 18), woosh.Token(woosh.NAME, 'and', 682, 19, 682, 22), woosh.Token(woosh.NAME, 'executable', 683, 7, 683, 17), woosh.Token(woosh.OP, '==', 683, 18, 683, 20), woosh.Token(woosh.NAME, 'sys', 683, 21, 683, 24), woosh.Token(woosh.OP, '.', 683, 24, 683, 25), woosh.Token(woosh.NAME, 'executable', 683, 25, 683, 35), woosh.Token(woosh.OP, ':', 683, 35, 683, 36), woosh.Token(woosh.NEWLINE, '\r\n', 683, 36, 684, 0), woosh.Token(woosh.COMMENT, '# "file" command did not return anything; we\'ll try to provide', 684, 8, 684, 70), woosh.Token(woosh.COMMENT, '# some sensible defaults then...', 685, 8, 685, 40), woosh.Token(woosh.INDENT, ' ', 686, 0, 686, 8), woosh.Token(woosh.NAME, 'if', 686, 8, 686, 10), woosh.Token(woosh.NAME, 'sys', 686, 11, 686, 14), woosh.Token(woosh.OP, '.', 686, 14, 686, 15), woosh.Token(woosh.NAME, 'platform', 686, 15, 686, 23), woosh.Token(woosh.NAME, 'in', 686, 24, 686, 26), woosh.Token(woosh.NAME, '_default_architecture', 686, 27, 686, 48), woosh.Token(woosh.OP, ':', 686, 48, 686, 49), woosh.Token(woosh.NEWLINE, '\r\n', 686, 49, 687, 0), woosh.Token(woosh.INDENT, ' ', 687, 0, 687, 12), woosh.Token(woosh.NAME, 'b', 687, 12, 687, 13), woosh.Token(woosh.OP, ',', 687, 13, 687, 14), woosh.Token(woosh.NAME, 'l', 687, 15, 687, 16), woosh.Token(woosh.OP, '=', 687, 17, 687, 18), woosh.Token(woosh.NAME, '_default_architecture', 687, 19, 687, 40), woosh.Token(woosh.OP, '[', 687, 40, 687, 41), woosh.Token(woosh.NAME, 'sys', 687, 41, 687, 44), woosh.Token(woosh.OP, '.', 687, 44, 687, 45), woosh.Token(woosh.NAME, 'platform', 687, 45, 687, 53), woosh.Token(woosh.OP, ']', 687, 53, 687, 54), woosh.Token(woosh.NEWLINE, '\r\n', 687, 54, 688, 0), woosh.Token(woosh.NAME, 'if', 688, 12, 688, 14), woosh.Token(woosh.NAME, 'b', 688, 15, 688, 16), woosh.Token(woosh.OP, ':', 688, 16, 688, 17), woosh.Token(woosh.NEWLINE, '\r\n', 688, 17, 689, 0), woosh.Token(woosh.INDENT, ' ', 689, 0, 689, 16), woosh.Token(woosh.NAME, 'bits', 689, 16, 689, 20), woosh.Token(woosh.OP, '=', 689, 21, 689, 22), woosh.Token(woosh.NAME, 'b', 689, 23, 689, 24), woosh.Token(woosh.NEWLINE, '\r\n', 689, 24, 690, 0), woosh.Token(woosh.DEDENT, ' ', 690, 0, 690, 12), woosh.Token(woosh.NAME, 'if', 690, 12, 690, 14), woosh.Token(woosh.NAME, 'l', 690, 15, 690, 16), woosh.Token(woosh.OP, ':', 690, 16, 690, 17), woosh.Token(woosh.NEWLINE, '\r\n', 690, 17, 691, 0), woosh.Token(woosh.INDENT, ' ', 691, 0, 691, 16), woosh.Token(woosh.NAME, 'linkage', 691, 16, 691, 23), woosh.Token(woosh.OP, '=', 691, 24, 691, 25), woosh.Token(woosh.NAME, 'l', 691, 26, 691, 27), woosh.Token(woosh.NEWLINE, '\r\n', 691, 27, 692, 0), woosh.Token(woosh.DEDENT, ' ', 692, 0, 692, 8), woosh.Token(woosh.DEDENT, '', 692, 8, 692, 8), woosh.Token(woosh.NAME, 'return', 692, 8, 692, 14), woosh.Token(woosh.NAME, 'bits', 692, 15, 692, 19), woosh.Token(woosh.OP, ',', 692, 19, 692, 20), woosh.Token(woosh.NAME, 'linkage', 692, 21, 692, 28), woosh.Token(woosh.NEWLINE, '\r\n', 692, 28, 693, 0), woosh.Token(woosh.DEDENT, ' ', 694, 0, 694, 4), woosh.Token(woosh.NAME, 'if', 694, 4, 694, 6), woosh.Token(woosh.STRING, "'executable'", 694, 7, 694, 19), woosh.Token(woosh.NAME, 'not', 694, 20, 694, 23), woosh.Token(woosh.NAME, 'in', 694, 24, 694, 26), woosh.Token(woosh.NAME, 'fileout', 694, 27, 694, 34), woosh.Token(woosh.NAME, 'and', 694, 35, 694, 38), woosh.Token(woosh.STRING, "'shared object'", 694, 39, 694, 54), woosh.Token(woosh.NAME, 'not', 694, 55, 694, 58), woosh.Token(woosh.NAME, 'in', 694, 59, 694, 61), woosh.Token(woosh.NAME, 'fileout', 694, 62, 694, 69), woosh.Token(woosh.OP, ':', 694, 69, 694, 70), woosh.Token(woosh.NEWLINE, '\r\n', 694, 70, 695, 0), woosh.Token(woosh.COMMENT, '# Format not supported', 695, 8, 695, 30), woosh.Token(woosh.INDENT, ' ', 696, 0, 696, 8), woosh.Token(woosh.NAME, 'return', 696, 8, 696, 14), woosh.Token(woosh.NAME, 'bits', 696, 15, 696, 19), woosh.Token(woosh.OP, ',', 696, 19, 696, 20), woosh.Token(woosh.NAME, 'linkage', 696, 21, 696, 28), woosh.Token(woosh.NEWLINE, '\r\n', 696, 28, 697, 0), woosh.Token(woosh.COMMENT, '# Bits', 698, 4, 698, 10), woosh.Token(woosh.DEDENT, ' ', 699, 0, 699, 4), woosh.Token(woosh.NAME, 'if', 699, 4, 699, 6), woosh.Token(woosh.STRING, "'32-bit'", 699, 7, 699, 15), woosh.Token(woosh.NAME, 'in', 699, 16, 699, 18), woosh.Token(woosh.NAME, 'fileout', 699, 19, 699, 26), woosh.Token(woosh.OP, ':', 699, 26, 699, 27), woosh.Token(woosh.NEWLINE, '\r\n', 699, 27, 700, 0), woosh.Token(woosh.INDENT, ' ', 700, 0, 700, 8), woosh.Token(woosh.NAME, 'bits', 700, 8, 700, 12), woosh.Token(woosh.OP, '=', 700, 13, 700, 14), woosh.Token(woosh.STRING, "'32bit'", 700, 15, 700, 22), woosh.Token(woosh.NEWLINE, '\r\n', 700, 22, 701, 0), woosh.Token(woosh.DEDENT, ' ', 701, 0, 701, 4), woosh.Token(woosh.NAME, 'elif', 701, 4, 701, 8), woosh.Token(woosh.STRING, "'N32'", 701, 9, 701, 14), woosh.Token(woosh.NAME, 'in', 701, 15, 701, 17), woosh.Token(woosh.NAME, 'fileout', 701, 18, 701, 25), woosh.Token(woosh.OP, ':', 701, 25, 701, 26), woosh.Token(woosh.NEWLINE, '\r\n', 701, 26, 702, 0), woosh.Token(woosh.COMMENT, '# On Irix only', 702, 8, 702, 22), woosh.Token(woosh.INDENT, ' ', 703, 0, 703, 8), woosh.Token(woosh.NAME, 'bits', 703, 8, 703, 12), woosh.Token(woosh.OP, '=', 703, 13, 703, 14), woosh.Token(woosh.STRING, "'n32bit'", 703, 15, 703, 23), woosh.Token(woosh.NEWLINE, '\r\n', 703, 23, 704, 0), woosh.Token(woosh.DEDENT, ' ', 704, 0, 704, 4), woosh.Token(woosh.NAME, 'elif', 704, 4, 704, 8), woosh.Token(woosh.STRING, "'64-bit'", 704, 9, 704, 17), woosh.Token(woosh.NAME, 'in', 704, 18, 704, 20), woosh.Token(woosh.NAME, 'fileout', 704, 21, 704, 28), woosh.Token(woosh.OP, ':', 704, 28, 704, 29), woosh.Token(woosh.NEWLINE, '\r\n', 704, 29, 705, 0), woosh.Token(woosh.INDENT, ' ', 705, 0, 705, 8), woosh.Token(woosh.NAME, 'bits', 705, 8, 705, 12), woosh.Token(woosh.OP, '=', 705, 13, 705, 14), woosh.Token(woosh.STRING, "'64bit'", 705, 15, 705, 22), woosh.Token(woosh.NEWLINE, '\r\n', 705, 22, 706, 0), woosh.Token(woosh.COMMENT, '# Linkage', 707, 4, 707, 13), woosh.Token(woosh.DEDENT, ' ', 708, 0, 708, 4), woosh.Token(woosh.NAME, 'if', 708, 4, 708, 6), woosh.Token(woosh.STRING, "'ELF'", 708, 7, 708, 12), woosh.Token(woosh.NAME, 'in', 708, 13, 708, 15), woosh.Token(woosh.NAME, 'fileout', 708, 16, 708, 23), woosh.Token(woosh.OP, ':', 708, 23, 708, 24), woosh.Token(woosh.NEWLINE, '\r\n', 708, 24, 709, 0), woosh.Token(woosh.INDENT, ' ', 709, 0, 709, 8), woosh.Token(woosh.NAME, 'linkage', 709, 8, 709, 15), woosh.Token(woosh.OP, '=', 709, 16, 709, 17), woosh.Token(woosh.STRING, "'ELF'", 709, 18, 709, 23), woosh.Token(woosh.NEWLINE, '\r\n', 709, 23, 710, 0), woosh.Token(woosh.DEDENT, ' ', 710, 0, 710, 4), woosh.Token(woosh.NAME, 'elif', 710, 4, 710, 8), woosh.Token(woosh.STRING, "'PE'", 710, 9, 710, 13), woosh.Token(woosh.NAME, 'in', 710, 14, 710, 16), woosh.Token(woosh.NAME, 'fileout', 710, 17, 710, 24), woosh.Token(woosh.OP, ':', 710, 24, 710, 25), woosh.Token(woosh.NEWLINE, '\r\n', 710, 25, 711, 0), woosh.Token(woosh.COMMENT, '# E.g. Windows uses this format', 711, 8, 711, 39), woosh.Token(woosh.INDENT, ' ', 712, 0, 712, 8), woosh.Token(woosh.NAME, 'if', 712, 8, 712, 10), woosh.Token(woosh.STRING, "'Windows'", 712, 11, 712, 20), woosh.Token(woosh.NAME, 'in', 712, 21, 712, 23), woosh.Token(woosh.NAME, 'fileout', 712, 24, 712, 31), woosh.Token(woosh.OP, ':', 712, 31, 712, 32), woosh.Token(woosh.NEWLINE, '\r\n', 712, 32, 713, 0), woosh.Token(woosh.INDENT, ' ', 713, 0, 713, 12), woosh.Token(woosh.NAME, 'linkage', 713, 12, 713, 19), woosh.Token(woosh.OP, '=', 713, 20, 713, 21), woosh.Token(woosh.STRING, "'WindowsPE'", 713, 22, 713, 33), woosh.Token(woosh.NEWLINE, '\r\n', 713, 33, 714, 0), woosh.Token(woosh.DEDENT, ' ', 714, 0, 714, 8), woosh.Token(woosh.NAME, 'else', 714, 8, 714, 12), woosh.Token(woosh.OP, ':', 714, 12, 714, 13), woosh.Token(woosh.NEWLINE, '\r\n', 714, 13, 715, 0), woosh.Token(woosh.INDENT, ' ', 715, 0, 715, 12), woosh.Token(woosh.NAME, 'linkage', 715, 12, 715, 19), woosh.Token(woosh.OP, '=', 715, 20, 715, 21), woosh.Token(woosh.STRING, "'PE'", 715, 22, 715, 26), woosh.Token(woosh.NEWLINE, '\r\n', 715, 26, 716, 0), woosh.Token(woosh.DEDENT, ' ', 716, 0, 716, 4), woosh.Token(woosh.DEDENT, '', 716, 4, 716, 4), woosh.Token(woosh.NAME, 'elif', 716, 4, 716, 8), woosh.Token(woosh.STRING, "'COFF'", 716, 9, 716, 15), woosh.Token(woosh.NAME, 'in', 716, 16, 716, 18), woosh.Token(woosh.NAME, 'fileout', 716, 19, 716, 26), woosh.Token(woosh.OP, ':', 716, 26, 716, 27), woosh.Token(woosh.NEWLINE, '\r\n', 716, 27, 717, 0), woosh.Token(woosh.INDENT, ' ', 717, 0, 717, 8), woosh.Token(woosh.NAME, 'linkage', 717, 8, 717, 15), woosh.Token(woosh.OP, '=', 717, 16, 717, 17), woosh.Token(woosh.STRING, "'COFF'", 717, 18, 717, 24), woosh.Token(woosh.NEWLINE, '\r\n', 717, 24, 718, 0), woosh.Token(woosh.DEDENT, ' ', 718, 0, 718, 4), woosh.Token(woosh.NAME, 'elif', 718, 4, 718, 8), woosh.Token(woosh.STRING, "'MS-DOS'", 718, 9, 718, 17), woosh.Token(woosh.NAME, 'in', 718, 18, 718, 20), woosh.Token(woosh.NAME, 'fileout', 718, 21, 718, 28), woosh.Token(woosh.OP, ':', 718, 28, 718, 29), woosh.Token(woosh.NEWLINE, '\r\n', 718, 29, 719, 0), woosh.Token(woosh.INDENT, ' ', 719, 0, 719, 8), woosh.Token(woosh.NAME, 'linkage', 719, 8, 719, 15), woosh.Token(woosh.OP, '=', 719, 16, 719, 17), woosh.Token(woosh.STRING, "'MSDOS'", 719, 18, 719, 25), woosh.Token(woosh.NEWLINE, '\r\n', 719, 25, 720, 0), woosh.Token(woosh.DEDENT, ' ', 720, 0, 720, 4), woosh.Token(woosh.NAME, 'else', 720, 4, 720, 8), woosh.Token(woosh.OP, ':', 720, 8, 720, 9), woosh.Token(woosh.NEWLINE, '\r\n', 720, 9, 721, 0), woosh.Token(woosh.COMMENT, '# XXX the A.OUT format also falls under this class...', 721, 8, 721, 61), woosh.Token(woosh.INDENT, ' ', 722, 0, 722, 8), woosh.Token(woosh.NAME, 'pass', 722, 8, 722, 12), woosh.Token(woosh.NEWLINE, '\r\n', 722, 12, 723, 0), woosh.Token(woosh.DEDENT, ' ', 724, 0, 724, 4), woosh.Token(woosh.NAME, 'return', 724, 4, 724, 10), woosh.Token(woosh.NAME, 'bits', 724, 11, 724, 15), woosh.Token(woosh.OP, ',', 724, 15, 724, 16), woosh.Token(woosh.NAME, 'linkage', 724, 17, 724, 24), woosh.Token(woosh.NEWLINE, '\r\n', 724, 24, 725, 0), woosh.Token(woosh.DEDENT, '', 727, 0, 727, 0), woosh.Token(woosh.NAME, 'def', 727, 0, 727, 3), woosh.Token(woosh.NAME, '_get_machine_win32', 727, 4, 727, 22), woosh.Token(woosh.OP, '(', 727, 22, 727, 23), woosh.Token(woosh.OP, ')', 727, 23, 727, 24), woosh.Token(woosh.OP, ':', 727, 24, 727, 25), woosh.Token(woosh.NEWLINE, '\r\n', 727, 25, 728, 0), woosh.Token(woosh.COMMENT, '# Try to use the PROCESSOR_* environment variables', 728, 4, 728, 54), woosh.Token(woosh.COMMENT, '# available on Win XP and later; see', 729, 4, 729, 40), woosh.Token(woosh.COMMENT, '# http://support.microsoft.com/kb/888731 and', 730, 4, 730, 48), woosh.Token(woosh.COMMENT, '# http://www.geocities.com/rick_lively/MANUALS/ENV/MSWIN/PROCESSI.HTM', 731, 4, 731, 73), woosh.Token(woosh.COMMENT, '# WOW64 processes mask the native architecture', 733, 4, 733, 50), woosh.Token(woosh.INDENT, ' ', 734, 0, 734, 4), woosh.Token(woosh.NAME, 'return', 734, 4, 734, 10), woosh.Token(woosh.OP, '(', 734, 11, 734, 12), woosh.Token(woosh.NAME, 'os', 735, 8, 735, 10), woosh.Token(woosh.OP, '.', 735, 10, 735, 11), woosh.Token(woosh.NAME, 'environ', 735, 11, 735, 18), woosh.Token(woosh.OP, '.', 735, 18, 735, 19), woosh.Token(woosh.NAME, 'get', 735, 19, 735, 22), woosh.Token(woosh.OP, '(', 735, 22, 735, 23), woosh.Token(woosh.STRING, "'PROCESSOR_ARCHITEW6432'", 735, 23, 735, 47), woosh.Token(woosh.OP, ',', 735, 47, 735, 48), woosh.Token(woosh.STRING, "''", 735, 49, 735, 51), woosh.Token(woosh.OP, ')', 735, 51, 735, 52), woosh.Token(woosh.NAME, 'or', 735, 53, 735, 55), woosh.Token(woosh.NAME, 'os', 736, 8, 736, 10), woosh.Token(woosh.OP, '.', 736, 10, 736, 11), woosh.Token(woosh.NAME, 'environ', 736, 11, 736, 18), woosh.Token(woosh.OP, '.', 736, 18, 736, 19), woosh.Token(woosh.NAME, 'get', 736, 19, 736, 22), woosh.Token(woosh.OP, '(', 736, 22, 736, 23), woosh.Token(woosh.STRING, "'PROCESSOR_ARCHITECTURE'", 736, 23, 736, 47), woosh.Token(woosh.OP, ',', 736, 47, 736, 48), woosh.Token(woosh.STRING, "''", 736, 49, 736, 51), woosh.Token(woosh.OP, ')', 736, 51, 736, 52), woosh.Token(woosh.OP, ')', 737, 4, 737, 5), woosh.Token(woosh.NEWLINE, '\r\n', 737, 5, 738, 0), woosh.Token(woosh.DEDENT, '', 740, 0, 740, 0), woosh.Token(woosh.NAME, 'class', 740, 0, 740, 5), woosh.Token(woosh.NAME, '_Processor', 740, 6, 740, 16), woosh.Token(woosh.OP, ':', 740, 16, 740, 17), woosh.Token(woosh.NEWLINE, '\r\n', 740, 17, 741, 0), woosh.Token(woosh.INDENT, ' ', 741, 0, 741, 4), woosh.Token(woosh.OP, '@', 741, 4, 741, 5), woosh.Token(woosh.NAME, 'classmethod', 741, 5, 741, 16), woosh.Token(woosh.NEWLINE, '\r\n', 741, 16, 742, 0), woosh.Token(woosh.NAME, 'def', 742, 4, 742, 7), woosh.Token(woosh.NAME, 'get', 742, 8, 742, 11), woosh.Token(woosh.OP, '(', 742, 11, 742, 12), woosh.Token(woosh.NAME, 'cls', 742, 12, 742, 15), woosh.Token(woosh.OP, ')', 742, 15, 742, 16), woosh.Token(woosh.OP, ':', 742, 16, 742, 17), woosh.Token(woosh.NEWLINE, '\r\n', 742, 17, 743, 0), woosh.Token(woosh.INDENT, ' ', 743, 0, 743, 8), woosh.Token(woosh.NAME, 'func', 743, 8, 743, 12), woosh.Token(woosh.OP, '=', 743, 13, 743, 14), woosh.Token(woosh.NAME, 'getattr', 743, 15, 743, 22), woosh.Token(woosh.OP, '(', 743, 22, 743, 23), woosh.Token(woosh.NAME, 'cls', 743, 23, 743, 26), woosh.Token(woosh.OP, ',', 743, 26, 743, 27), woosh.Token(woosh.STRING, "f'get_{sys.platform}'", 743, 28, 743, 49), woosh.Token(woosh.OP, ',', 743, 49, 743, 50), woosh.Token(woosh.NAME, 'cls', 743, 51, 743, 54), woosh.Token(woosh.OP, '.', 743, 54, 743, 55), woosh.Token(woosh.NAME, 'from_subprocess', 743, 55, 743, 70), woosh.Token(woosh.OP, ')', 743, 70, 743, 71), woosh.Token(woosh.NEWLINE, '\r\n', 743, 71, 744, 0), woosh.Token(woosh.NAME, 'return', 744, 8, 744, 14), woosh.Token(woosh.NAME, 'func', 744, 15, 744, 19), woosh.Token(woosh.OP, '(', 744, 19, 744, 20), woosh.Token(woosh.OP, ')', 744, 20, 744, 21), woosh.Token(woosh.NAME, 'or', 744, 22, 744, 24), woosh.Token(woosh.STRING, "''", 744, 25, 744, 27), woosh.Token(woosh.NEWLINE, '\r\n', 744, 27, 745, 0), woosh.Token(woosh.DEDENT, ' ', 746, 0, 746, 4), woosh.Token(woosh.NAME, 'def', 746, 4, 746, 7), woosh.Token(woosh.NAME, 'get_win32', 746, 8, 746, 17), woosh.Token(woosh.OP, '(', 746, 17, 746, 18), woosh.Token(woosh.OP, ')', 746, 18, 746, 19), woosh.Token(woosh.OP, ':', 746, 19, 746, 20), woosh.Token(woosh.NEWLINE, '\r\n', 746, 20, 747, 0), woosh.Token(woosh.INDENT, ' ', 747, 0, 747, 8), woosh.Token(woosh.NAME, 'return', 747, 8, 747, 14), woosh.Token(woosh.NAME, 'os', 747, 15, 747, 17), woosh.Token(woosh.OP, '.', 747, 17, 747, 18), woosh.Token(woosh.NAME, 'environ', 747, 18, 747, 25), woosh.Token(woosh.OP, '.', 747, 25, 747, 26), woosh.Token(woosh.NAME, 'get', 747, 26, 747, 29), woosh.Token(woosh.OP, '(', 747, 29, 747, 30), woosh.Token(woosh.STRING, "'PROCESSOR_IDENTIFIER'", 747, 30, 747, 52), woosh.Token(woosh.OP, ',', 747, 52, 747, 53), woosh.Token(woosh.NAME, '_get_machine_win32', 747, 54, 747, 72), woosh.Token(woosh.OP, '(', 747, 72, 747, 73), woosh.Token(woosh.OP, ')', 747, 73, 747, 74), woosh.Token(woosh.OP, ')', 747, 74, 747, 75), woosh.Token(woosh.NEWLINE, '\r\n', 747, 75, 748, 0), woosh.Token(woosh.DEDENT, ' ', 749, 0, 749, 4), woosh.Token(woosh.NAME, 'def', 749, 4, 749, 7), woosh.Token(woosh.NAME, 'get_OpenVMS', 749, 8, 749, 19), woosh.Token(woosh.OP, '(', 749, 19, 749, 20), woosh.Token(woosh.OP, ')', 749, 20, 749, 21), woosh.Token(woosh.OP, ':', 749, 21, 749, 22), woosh.Token(woosh.NEWLINE, '\r\n', 749, 22, 750, 0), woosh.Token(woosh.INDENT, ' ', 750, 0, 750, 8), woosh.Token(woosh.NAME, 'try', 750, 8, 750, 11), woosh.Token(woosh.OP, ':', 750, 11, 750, 12), woosh.Token(woosh.NEWLINE, '\r\n', 750, 12, 751, 0), woosh.Token(woosh.INDENT, ' ', 751, 0, 751, 12), woosh.Token(woosh.NAME, 'import', 751, 12, 751, 18), woosh.Token(woosh.NAME, 'vms_lib', 751, 19, 751, 26), woosh.Token(woosh.NEWLINE, '\r\n', 751, 26, 752, 0), woosh.Token(woosh.DEDENT, ' ', 752, 0, 752, 8), woosh.Token(woosh.NAME, 'except', 752, 8, 752, 14), woosh.Token(woosh.NAME, 'ImportError', 752, 15, 752, 26), woosh.Token(woosh.OP, ':', 752, 26, 752, 27), woosh.Token(woosh.NEWLINE, '\r\n', 752, 27, 753, 0), woosh.Token(woosh.INDENT, ' ', 753, 0, 753, 12), woosh.Token(woosh.NAME, 'pass', 753, 12, 753, 16), woosh.Token(woosh.NEWLINE, '\r\n', 753, 16, 754, 0), woosh.Token(woosh.DEDENT, ' ', 754, 0, 754, 8), woosh.Token(woosh.NAME, 'else', 754, 8, 754, 12), woosh.Token(woosh.OP, ':', 754, 12, 754, 13), woosh.Token(woosh.NEWLINE, '\r\n', 754, 13, 755, 0), woosh.Token(woosh.INDENT, ' ', 755, 0, 755, 12), woosh.Token(woosh.NAME, 'csid', 755, 12, 755, 16), woosh.Token(woosh.OP, ',', 755, 16, 755, 17), woosh.Token(woosh.NAME, 'cpu_number', 755, 18, 755, 28), woosh.Token(woosh.OP, '=', 755, 29, 755, 30), woosh.Token(woosh.NAME, 'vms_lib', 755, 31, 755, 38), woosh.Token(woosh.OP, '.', 755, 38, 755, 39), woosh.Token(woosh.NAME, 'getsyi', 755, 39, 755, 45), woosh.Token(woosh.OP, '(', 755, 45, 755, 46), woosh.Token(woosh.STRING, "'SYI$_CPU'", 755, 46, 755, 56), woosh.Token(woosh.OP, ',', 755, 56, 755, 57), woosh.Token(woosh.NUMBER, '0', 755, 58, 755, 59), woosh.Token(woosh.OP, ')', 755, 59, 755, 60), woosh.Token(woosh.NEWLINE, '\r\n', 755, 60, 756, 0), woosh.Token(woosh.NAME, 'return', 756, 12, 756, 18), woosh.Token(woosh.STRING, "'Alpha'", 756, 19, 756, 26), woosh.Token(woosh.NAME, 'if', 756, 27, 756, 29), woosh.Token(woosh.NAME, 'cpu_number', 756, 30, 756, 40), woosh.Token(woosh.OP, '>=', 756, 41, 756, 43), woosh.Token(woosh.NUMBER, '128', 756, 44, 756, 47), woosh.Token(woosh.NAME, 'else', 756, 48, 756, 52), woosh.Token(woosh.STRING, "'VAX'", 756, 53, 756, 58), woosh.Token(woosh.NEWLINE, '\r\n', 756, 58, 757, 0), woosh.Token(woosh.DEDENT, ' ', 758, 0, 758, 4), woosh.Token(woosh.DEDENT, '', 758, 4, 758, 4), woosh.Token(woosh.NAME, 'def', 758, 4, 758, 7), woosh.Token(woosh.NAME, 'from_subprocess', 758, 8, 758, 23), woosh.Token(woosh.OP, '(', 758, 23, 758, 24), woosh.Token(woosh.OP, ')', 758, 24, 758, 25), woosh.Token(woosh.OP, ':', 758, 25, 758, 26), woosh.Token(woosh.NEWLINE, '\r\n', 758, 26, 759, 0), woosh.Token(woosh.INDENT, ' ', 759, 0, 759, 8), woosh.Token(woosh.STRING, '"""\r\n Fall back to `uname -p`\r\n """', 759, 8, 761, 11), woosh.Token(woosh.NEWLINE, '\r\n', 761, 11, 762, 0), woosh.Token(woosh.NAME, 'try', 762, 8, 762, 11), woosh.Token(woosh.OP, ':', 762, 11, 762, 12), woosh.Token(woosh.NEWLINE, '\r\n', 762, 12, 763, 0), woosh.Token(woosh.INDENT, ' ', 763, 0, 763, 12), woosh.Token(woosh.NAME, 'return', 763, 12, 763, 18), woosh.Token(woosh.NAME, 'subprocess', 763, 19, 763, 29), woosh.Token(woosh.OP, '.', 763, 29, 763, 30), woosh.Token(woosh.NAME, 'check_output', 763, 30, 763, 42), woosh.Token(woosh.OP, '(', 763, 42, 763, 43), woosh.Token(woosh.OP, '[', 764, 16, 764, 17), woosh.Token(woosh.STRING, "'uname'", 764, 17, 764, 24), woosh.Token(woosh.OP, ',', 764, 24, 764, 25), woosh.Token(woosh.STRING, "'-p'", 764, 26, 764, 30), woosh.Token(woosh.OP, ']', 764, 30, 764, 31), woosh.Token(woosh.OP, ',', 764, 31, 764, 32), woosh.Token(woosh.NAME, 'stderr', 765, 16, 765, 22), woosh.Token(woosh.OP, '=', 765, 22, 765, 23), woosh.Token(woosh.NAME, 'subprocess', 765, 23, 765, 33), woosh.Token(woosh.OP, '.', 765, 33, 765, 34), woosh.Token(woosh.NAME, 'DEVNULL', 765, 34, 765, 41), woosh.Token(woosh.OP, ',', 765, 41, 765, 42), woosh.Token(woosh.NAME, 'text', 766, 16, 766, 20), woosh.Token(woosh.OP, '=', 766, 20, 766, 21), woosh.Token(woosh.NAME, 'True', 766, 21, 766, 25), woosh.Token(woosh.OP, ',', 766, 25, 766, 26), woosh.Token(woosh.OP, ')', 767, 12, 767, 13), woosh.Token(woosh.OP, '.', 767, 13, 767, 14), woosh.Token(woosh.NAME, 'strip', 767, 14, 767, 19), woosh.Token(woosh.OP, '(', 767, 19, 767, 20), woosh.Token(woosh.OP, ')', 767, 20, 767, 21), woosh.Token(woosh.NEWLINE, '\r\n', 767, 21, 768, 0), woosh.Token(woosh.DEDENT, ' ', 768, 0, 768, 8), woosh.Token(woosh.NAME, 'except', 768, 8, 768, 14), woosh.Token(woosh.OP, '(', 768, 15, 768, 16), woosh.Token(woosh.NAME, 'OSError', 768, 16, 768, 23), woosh.Token(woosh.OP, ',', 768, 23, 768, 24), woosh.Token(woosh.NAME, 'subprocess', 768, 25, 768, 35), woosh.Token(woosh.OP, '.', 768, 35, 768, 36), woosh.Token(woosh.NAME, 'CalledProcessError', 768, 36, 768, 54), woosh.Token(woosh.OP, ')', 768, 54, 768, 55), woosh.Token(woosh.OP, ':', 768, 55, 768, 56), woosh.Token(woosh.NEWLINE, '\r\n', 768, 56, 769, 0), woosh.Token(woosh.INDENT, ' ', 769, 0, 769, 12), woosh.Token(woosh.NAME, 'pass', 769, 12, 769, 16), woosh.Token(woosh.NEWLINE, '\r\n', 769, 16, 770, 0), woosh.Token(woosh.DEDENT, '', 772, 0, 772, 0), woosh.Token(woosh.DEDENT, '', 772, 0, 772, 0), woosh.Token(woosh.DEDENT, '', 772, 0, 772, 0), woosh.Token(woosh.NAME, 'def', 772, 0, 772, 3), woosh.Token(woosh.NAME, '_unknown_as_blank', 772, 4, 772, 21), woosh.Token(woosh.OP, '(', 772, 21, 772, 22), woosh.Token(woosh.NAME, 'val', 772, 22, 772, 25), woosh.Token(woosh.OP, ')', 772, 25, 772, 26), woosh.Token(woosh.OP, ':', 772, 26, 772, 27), woosh.Token(woosh.NEWLINE, '\r\n', 772, 27, 773, 0), woosh.Token(woosh.INDENT, ' ', 773, 0, 773, 4), woosh.Token(woosh.NAME, 'return', 773, 4, 773, 10), woosh.Token(woosh.STRING, "''", 773, 11, 773, 13), woosh.Token(woosh.NAME, 'if', 773, 14, 773, 16), woosh.Token(woosh.NAME, 'val', 773, 17, 773, 20), woosh.Token(woosh.OP, '==', 773, 21, 773, 23), woosh.Token(woosh.STRING, "'unknown'", 773, 24, 773, 33), woosh.Token(woosh.NAME, 'else', 773, 34, 773, 38), woosh.Token(woosh.NAME, 'val', 773, 39, 773, 42), woosh.Token(woosh.NEWLINE, '\r\n', 773, 42, 774, 0), woosh.Token(woosh.COMMENT, '### Portable uname() interface', 776, 0, 776, 30), woosh.Token(woosh.DEDENT, '', 778, 0, 778, 0), woosh.Token(woosh.NAME, 'class', 778, 0, 778, 5), woosh.Token(woosh.NAME, 'uname_result', 778, 6, 778, 18), woosh.Token(woosh.OP, '(', 778, 18, 778, 19), woosh.Token(woosh.NAME, 'collections', 779, 4, 779, 15), woosh.Token(woosh.OP, '.', 779, 15, 779, 16), woosh.Token(woosh.NAME, 'namedtuple', 779, 16, 779, 26), woosh.Token(woosh.OP, '(', 779, 26, 779, 27), woosh.Token(woosh.STRING, '"uname_result_base"', 780, 8, 780, 27), woosh.Token(woosh.OP, ',', 780, 27, 780, 28), woosh.Token(woosh.STRING, '"system node release version machine"', 781, 8, 781, 45), woosh.Token(woosh.OP, ')', 781, 45, 781, 46), woosh.Token(woosh.OP, ')', 782, 8, 782, 9), woosh.Token(woosh.OP, ':', 782, 9, 782, 10), woosh.Token(woosh.NEWLINE, '\r\n', 782, 10, 783, 0), woosh.Token(woosh.INDENT, ' ', 783, 0, 783, 4), woosh.Token(woosh.STRING, '"""\r\n A uname_result that\'s largely compatible with a\r\n simple namedtuple except that \'platform\' is\r\n resolved late and cached to avoid calling "uname"\r\n except when needed.\r\n """', 783, 4, 788, 7), woosh.Token(woosh.NEWLINE, '\r\n', 788, 7, 789, 0), woosh.Token(woosh.OP, '@', 790, 4, 790, 5), woosh.Token(woosh.NAME, 'functools', 790, 5, 790, 14), woosh.Token(woosh.OP, '.', 790, 14, 790, 15), woosh.Token(woosh.NAME, 'cached_property', 790, 15, 790, 30), woosh.Token(woosh.NEWLINE, '\r\n', 790, 30, 791, 0), woosh.Token(woosh.NAME, 'def', 791, 4, 791, 7), woosh.Token(woosh.NAME, 'processor', 791, 8, 791, 17), woosh.Token(woosh.OP, '(', 791, 17, 791, 18), woosh.Token(woosh.NAME, 'self', 791, 18, 791, 22), woosh.Token(woosh.OP, ')', 791, 22, 791, 23), woosh.Token(woosh.OP, ':', 791, 23, 791, 24), woosh.Token(woosh.NEWLINE, '\r\n', 791, 24, 792, 0), woosh.Token(woosh.INDENT, ' ', 792, 0, 792, 8), woosh.Token(woosh.NAME, 'return', 792, 8, 792, 14), woosh.Token(woosh.NAME, '_unknown_as_blank', 792, 15, 792, 32), woosh.Token(woosh.OP, '(', 792, 32, 792, 33), woosh.Token(woosh.NAME, '_Processor', 792, 33, 792, 43), woosh.Token(woosh.OP, '.', 792, 43, 792, 44), woosh.Token(woosh.NAME, 'get', 792, 44, 792, 47), woosh.Token(woosh.OP, '(', 792, 47, 792, 48), woosh.Token(woosh.OP, ')', 792, 48, 792, 49), woosh.Token(woosh.OP, ')', 792, 49, 792, 50), woosh.Token(woosh.NEWLINE, '\r\n', 792, 50, 793, 0), woosh.Token(woosh.DEDENT, ' ', 794, 0, 794, 4), woosh.Token(woosh.NAME, 'def', 794, 4, 794, 7), woosh.Token(woosh.NAME, '__iter__', 794, 8, 794, 16), woosh.Token(woosh.OP, '(', 794, 16, 794, 17), woosh.Token(woosh.NAME, 'self', 794, 17, 794, 21), woosh.Token(woosh.OP, ')', 794, 21, 794, 22), woosh.Token(woosh.OP, ':', 794, 22, 794, 23), woosh.Token(woosh.NEWLINE, '\r\n', 794, 23, 795, 0), woosh.Token(woosh.INDENT, ' ', 795, 0, 795, 8), woosh.Token(woosh.NAME, 'return', 795, 8, 795, 14), woosh.Token(woosh.NAME, 'itertools', 795, 15, 795, 24), woosh.Token(woosh.OP, '.', 795, 24, 795, 25), woosh.Token(woosh.NAME, 'chain', 795, 25, 795, 30), woosh.Token(woosh.OP, '(', 795, 30, 795, 31), woosh.Token(woosh.NAME, 'super', 796, 12, 796, 17), woosh.Token(woosh.OP, '(', 796, 17, 796, 18), woosh.Token(woosh.OP, ')', 796, 18, 796, 19), woosh.Token(woosh.OP, '.', 796, 19, 796, 20), woosh.Token(woosh.NAME, '__iter__', 796, 20, 796, 28), woosh.Token(woosh.OP, '(', 796, 28, 796, 29), woosh.Token(woosh.OP, ')', 796, 29, 796, 30), woosh.Token(woosh.OP, ',', 796, 30, 796, 31), woosh.Token(woosh.OP, '(', 797, 12, 797, 13), woosh.Token(woosh.NAME, 'self', 797, 13, 797, 17), woosh.Token(woosh.OP, '.', 797, 17, 797, 18), woosh.Token(woosh.NAME, 'processor', 797, 18, 797, 27), woosh.Token(woosh.OP, ',', 797, 27, 797, 28), woosh.Token(woosh.OP, ')', 797, 28, 797, 29), woosh.Token(woosh.OP, ')', 798, 8, 798, 9), woosh.Token(woosh.NEWLINE, '\r\n', 798, 9, 799, 0), woosh.Token(woosh.DEDENT, ' ', 800, 0, 800, 4), woosh.Token(woosh.NAME, 'def', 800, 4, 800, 7), woosh.Token(woosh.NAME, '__getitem__', 800, 8, 800, 19), woosh.Token(woosh.OP, '(', 800, 19, 800, 20), woosh.Token(woosh.NAME, 'self', 800, 20, 800, 24), woosh.Token(woosh.OP, ',', 800, 24, 800, 25), woosh.Token(woosh.NAME, 'key', 800, 26, 800, 29), woosh.Token(woosh.OP, ')', 800, 29, 800, 30), woosh.Token(woosh.OP, ':', 800, 30, 800, 31), woosh.Token(woosh.NEWLINE, '\r\n', 800, 31, 801, 0), woosh.Token(woosh.INDENT, ' ', 801, 0, 801, 8), woosh.Token(woosh.NAME, 'return', 801, 8, 801, 14), woosh.Token(woosh.NAME, 'tuple', 801, 15, 801, 20), woosh.Token(woosh.OP, '(', 801, 20, 801, 21), woosh.Token(woosh.NAME, 'iter', 801, 21, 801, 25), woosh.Token(woosh.OP, '(', 801, 25, 801, 26), woosh.Token(woosh.NAME, 'self', 801, 26, 801, 30), woosh.Token(woosh.OP, ')', 801, 30, 801, 31), woosh.Token(woosh.OP, ')', 801, 31, 801, 32), woosh.Token(woosh.OP, '[', 801, 32, 801, 33), woosh.Token(woosh.NAME, 'key', 801, 33, 801, 36), woosh.Token(woosh.OP, ']', 801, 36, 801, 37), woosh.Token(woosh.NEWLINE, '\r\n', 801, 37, 802, 0), woosh.Token(woosh.DEDENT, ' ', 803, 0, 803, 4), woosh.Token(woosh.NAME, 'def', 803, 4, 803, 7), woosh.Token(woosh.NAME, '__len__', 803, 8, 803, 15), woosh.Token(woosh.OP, '(', 803, 15, 803, 16), woosh.Token(woosh.NAME, 'self', 803, 16, 803, 20), woosh.Token(woosh.OP, ')', 803, 20, 803, 21), woosh.Token(woosh.OP, ':', 803, 21, 803, 22), woosh.Token(woosh.NEWLINE, '\r\n', 803, 22, 804, 0), woosh.Token(woosh.INDENT, ' ', 804, 0, 804, 8), woosh.Token(woosh.NAME, 'return', 804, 8, 804, 14), woosh.Token(woosh.NAME, 'len', 804, 15, 804, 18), woosh.Token(woosh.OP, '(', 804, 18, 804, 19), woosh.Token(woosh.NAME, 'tuple', 804, 19, 804, 24), woosh.Token(woosh.OP, '(', 804, 24, 804, 25), woosh.Token(woosh.NAME, 'iter', 804, 25, 804, 29), woosh.Token(woosh.OP, '(', 804, 29, 804, 30), woosh.Token(woosh.NAME, 'self', 804, 30, 804, 34), woosh.Token(woosh.OP, ')', 804, 34, 804, 35), woosh.Token(woosh.OP, ')', 804, 35, 804, 36), woosh.Token(woosh.OP, ')', 804, 36, 804, 37), woosh.Token(woosh.NEWLINE, '\r\n', 804, 37, 805, 0), woosh.Token(woosh.DEDENT, '', 807, 0, 807, 0), woosh.Token(woosh.DEDENT, '', 807, 0, 807, 0), woosh.Token(woosh.NAME, '_uname_cache', 807, 0, 807, 12), woosh.Token(woosh.OP, '=', 807, 13, 807, 14), woosh.Token(woosh.NAME, 'None', 807, 15, 807, 19), woosh.Token(woosh.NEWLINE, '\r\n', 807, 19, 808, 0), woosh.Token(woosh.NAME, 'def', 810, 0, 810, 3), woosh.Token(woosh.NAME, 'uname', 810, 4, 810, 9), woosh.Token(woosh.OP, '(', 810, 9, 810, 10), woosh.Token(woosh.OP, ')', 810, 10, 810, 11), woosh.Token(woosh.OP, ':', 810, 11, 810, 12), woosh.Token(woosh.NEWLINE, '\r\n', 810, 12, 811, 0), woosh.Token(woosh.INDENT, ' ', 812, 0, 812, 4), woosh.Token(woosh.STRING, '""" Fairly portable uname interface. Returns a tuple\r\n of strings (system, node, release, version, machine, processor)\r\n identifying the underlying platform.\r\n\r\n Note that unlike the os.uname function this also returns\r\n possible processor information as an additional tuple entry.\r\n\r\n Entries which cannot be determined are set to \'\'.\r\n\r\n """', 812, 4, 821, 7), woosh.Token(woosh.NEWLINE, '\r\n', 821, 7, 822, 0), woosh.Token(woosh.NAME, 'global', 822, 4, 822, 10), woosh.Token(woosh.NAME, '_uname_cache', 822, 11, 822, 23), woosh.Token(woosh.NEWLINE, '\r\n', 822, 23, 823, 0), woosh.Token(woosh.NAME, 'if', 824, 4, 824, 6), woosh.Token(woosh.NAME, '_uname_cache', 824, 7, 824, 19), woosh.Token(woosh.NAME, 'is', 824, 20, 824, 22), woosh.Token(woosh.NAME, 'not', 824, 23, 824, 26), woosh.Token(woosh.NAME, 'None', 824, 27, 824, 31), woosh.Token(woosh.OP, ':', 824, 31, 824, 32), woosh.Token(woosh.NEWLINE, '\r\n', 824, 32, 825, 0), woosh.Token(woosh.INDENT, ' ', 825, 0, 825, 8), woosh.Token(woosh.NAME, 'return', 825, 8, 825, 14), woosh.Token(woosh.NAME, '_uname_cache', 825, 15, 825, 27), woosh.Token(woosh.NEWLINE, '\r\n', 825, 27, 826, 0), woosh.Token(woosh.COMMENT, '# Get some infos from the builtin os.uname API...', 827, 4, 827, 53), woosh.Token(woosh.DEDENT, ' ', 828, 0, 828, 4), woosh.Token(woosh.NAME, 'try', 828, 4, 828, 7), woosh.Token(woosh.OP, ':', 828, 7, 828, 8), woosh.Token(woosh.NEWLINE, '\r\n', 828, 8, 829, 0), woosh.Token(woosh.INDENT, ' ', 829, 0, 829, 8), woosh.Token(woosh.NAME, 'system', 829, 8, 829, 14), woosh.Token(woosh.OP, ',', 829, 14, 829, 15), woosh.Token(woosh.NAME, 'node', 829, 16, 829, 20), woosh.Token(woosh.OP, ',', 829, 20, 829, 21), woosh.Token(woosh.NAME, 'release', 829, 22, 829, 29), woosh.Token(woosh.OP, ',', 829, 29, 829, 30), woosh.Token(woosh.NAME, 'version', 829, 31, 829, 38), woosh.Token(woosh.OP, ',', 829, 38, 829, 39), woosh.Token(woosh.NAME, 'machine', 829, 40, 829, 47), woosh.Token(woosh.OP, '=', 829, 48, 829, 49), woosh.Token(woosh.NAME, 'infos', 829, 50, 829, 55), woosh.Token(woosh.OP, '=', 829, 56, 829, 57), woosh.Token(woosh.NAME, 'os', 829, 58, 829, 60), woosh.Token(woosh.OP, '.', 829, 60, 829, 61), woosh.Token(woosh.NAME, 'uname', 829, 61, 829, 66), woosh.Token(woosh.OP, '(', 829, 66, 829, 67), woosh.Token(woosh.OP, ')', 829, 67, 829, 68), woosh.Token(woosh.NEWLINE, '\r\n', 829, 68, 830, 0), woosh.Token(woosh.DEDENT, ' ', 830, 0, 830, 4), woosh.Token(woosh.NAME, 'except', 830, 4, 830, 10), woosh.Token(woosh.NAME, 'AttributeError', 830, 11, 830, 25), woosh.Token(woosh.OP, ':', 830, 25, 830, 26), woosh.Token(woosh.NEWLINE, '\r\n', 830, 26, 831, 0), woosh.Token(woosh.INDENT, ' ', 831, 0, 831, 8), woosh.Token(woosh.NAME, 'system', 831, 8, 831, 14), woosh.Token(woosh.OP, '=', 831, 15, 831, 16), woosh.Token(woosh.NAME, 'sys', 831, 17, 831, 20), woosh.Token(woosh.OP, '.', 831, 20, 831, 21), woosh.Token(woosh.NAME, 'platform', 831, 21, 831, 29), woosh.Token(woosh.NEWLINE, '\r\n', 831, 29, 832, 0), woosh.Token(woosh.NAME, 'node', 832, 8, 832, 12), woosh.Token(woosh.OP, '=', 832, 13, 832, 14), woosh.Token(woosh.NAME, '_node', 832, 15, 832, 20), woosh.Token(woosh.OP, '(', 832, 20, 832, 21), woosh.Token(woosh.OP, ')', 832, 21, 832, 22), woosh.Token(woosh.NEWLINE, '\r\n', 832, 22, 833, 0), woosh.Token(woosh.NAME, 'release', 833, 8, 833, 15), woosh.Token(woosh.OP, '=', 833, 16, 833, 17), woosh.Token(woosh.NAME, 'version', 833, 18, 833, 25), woosh.Token(woosh.OP, '=', 833, 26, 833, 27), woosh.Token(woosh.NAME, 'machine', 833, 28, 833, 35), woosh.Token(woosh.OP, '=', 833, 36, 833, 37), woosh.Token(woosh.STRING, "''", 833, 38, 833, 40), woosh.Token(woosh.NEWLINE, '\r\n', 833, 40, 834, 0), woosh.Token(woosh.NAME, 'infos', 834, 8, 834, 13), woosh.Token(woosh.OP, '=', 834, 14, 834, 15), woosh.Token(woosh.OP, '(', 834, 16, 834, 17), woosh.Token(woosh.OP, ')', 834, 17, 834, 18), woosh.Token(woosh.NEWLINE, '\r\n', 834, 18, 835, 0), woosh.Token(woosh.DEDENT, ' ', 836, 0, 836, 4), woosh.Token(woosh.NAME, 'if', 836, 4, 836, 6), woosh.Token(woosh.NAME, 'not', 836, 7, 836, 10), woosh.Token(woosh.NAME, 'any', 836, 11, 836, 14), woosh.Token(woosh.OP, '(', 836, 14, 836, 15), woosh.Token(woosh.NAME, 'infos', 836, 15, 836, 20), woosh.Token(woosh.OP, ')', 836, 20, 836, 21), woosh.Token(woosh.OP, ':', 836, 21, 836, 22), woosh.Token(woosh.NEWLINE, '\r\n', 836, 22, 837, 0), woosh.Token(woosh.COMMENT, '# uname is not available', 837, 8, 837, 32), woosh.Token(woosh.COMMENT, '# Try win32_ver() on win32 platforms', 839, 8, 839, 44), woosh.Token(woosh.INDENT, ' ', 840, 0, 840, 8), woosh.Token(woosh.NAME, 'if', 840, 8, 840, 10), woosh.Token(woosh.NAME, 'system', 840, 11, 840, 17), woosh.Token(woosh.OP, '==', 840, 18, 840, 20), woosh.Token(woosh.STRING, "'win32'", 840, 21, 840, 28), woosh.Token(woosh.OP, ':', 840, 28, 840, 29), woosh.Token(woosh.NEWLINE, '\r\n', 840, 29, 841, 0), woosh.Token(woosh.INDENT, ' ', 841, 0, 841, 12), woosh.Token(woosh.NAME, 'release', 841, 12, 841, 19), woosh.Token(woosh.OP, ',', 841, 19, 841, 20), woosh.Token(woosh.NAME, 'version', 841, 21, 841, 28), woosh.Token(woosh.OP, ',', 841, 28, 841, 29), woosh.Token(woosh.NAME, 'csd', 841, 30, 841, 33), woosh.Token(woosh.OP, ',', 841, 33, 841, 34), woosh.Token(woosh.NAME, 'ptype', 841, 35, 841, 40), woosh.Token(woosh.OP, '=', 841, 41, 841, 42), woosh.Token(woosh.NAME, 'win32_ver', 841, 43, 841, 52), woosh.Token(woosh.OP, '(', 841, 52, 841, 53), woosh.Token(woosh.OP, ')', 841, 53, 841, 54), woosh.Token(woosh.NEWLINE, '\r\n', 841, 54, 842, 0), woosh.Token(woosh.NAME, 'machine', 842, 12, 842, 19), woosh.Token(woosh.OP, '=', 842, 20, 842, 21), woosh.Token(woosh.NAME, 'machine', 842, 22, 842, 29), woosh.Token(woosh.NAME, 'or', 842, 30, 842, 32), woosh.Token(woosh.NAME, '_get_machine_win32', 842, 33, 842, 51), woosh.Token(woosh.OP, '(', 842, 51, 842, 52), woosh.Token(woosh.OP, ')', 842, 52, 842, 53), woosh.Token(woosh.NEWLINE, '\r\n', 842, 53, 843, 0), woosh.Token(woosh.COMMENT, "# Try the 'ver' system command available on some", 844, 8, 844, 56), woosh.Token(woosh.COMMENT, '# platforms', 845, 8, 845, 19), woosh.Token(woosh.DEDENT, ' ', 846, 0, 846, 8), woosh.Token(woosh.NAME, 'if', 846, 8, 846, 10), woosh.Token(woosh.NAME, 'not', 846, 11, 846, 14), woosh.Token(woosh.OP, '(', 846, 15, 846, 16), woosh.Token(woosh.NAME, 'release', 846, 16, 846, 23), woosh.Token(woosh.NAME, 'and', 846, 24, 846, 27), woosh.Token(woosh.NAME, 'version', 846, 28, 846, 35), woosh.Token(woosh.OP, ')', 846, 35, 846, 36), woosh.Token(woosh.OP, ':', 846, 36, 846, 37), woosh.Token(woosh.NEWLINE, '\r\n', 846, 37, 847, 0), woosh.Token(woosh.INDENT, ' ', 847, 0, 847, 12), woosh.Token(woosh.NAME, 'system', 847, 12, 847, 18), woosh.Token(woosh.OP, ',', 847, 18, 847, 19), woosh.Token(woosh.NAME, 'release', 847, 20, 847, 27), woosh.Token(woosh.OP, ',', 847, 27, 847, 28), woosh.Token(woosh.NAME, 'version', 847, 29, 847, 36), woosh.Token(woosh.OP, '=', 847, 37, 847, 38), woosh.Token(woosh.NAME, '_syscmd_ver', 847, 39, 847, 50), woosh.Token(woosh.OP, '(', 847, 50, 847, 51), woosh.Token(woosh.NAME, 'system', 847, 51, 847, 57), woosh.Token(woosh.OP, ')', 847, 57, 847, 58), woosh.Token(woosh.NEWLINE, '\r\n', 847, 58, 848, 0), woosh.Token(woosh.COMMENT, '# Normalize system to what win32_ver() normally returns', 848, 12, 848, 67), woosh.Token(woosh.COMMENT, '# (_syscmd_ver() tends to return the vendor name as well)', 849, 12, 849, 69), woosh.Token(woosh.NAME, 'if', 850, 12, 850, 14), woosh.Token(woosh.NAME, 'system', 850, 15, 850, 21), woosh.Token(woosh.OP, '==', 850, 22, 850, 24), woosh.Token(woosh.STRING, "'Microsoft Windows'", 850, 25, 850, 44), woosh.Token(woosh.OP, ':', 850, 44, 850, 45), woosh.Token(woosh.NEWLINE, '\r\n', 850, 45, 851, 0), woosh.Token(woosh.INDENT, ' ', 851, 0, 851, 16), woosh.Token(woosh.NAME, 'system', 851, 16, 851, 22), woosh.Token(woosh.OP, '=', 851, 23, 851, 24), woosh.Token(woosh.STRING, "'Windows'", 851, 25, 851, 34), woosh.Token(woosh.NEWLINE, '\r\n', 851, 34, 852, 0), woosh.Token(woosh.DEDENT, ' ', 852, 0, 852, 12), woosh.Token(woosh.NAME, 'elif', 852, 12, 852, 16), woosh.Token(woosh.NAME, 'system', 852, 17, 852, 23), woosh.Token(woosh.OP, '==', 852, 24, 852, 26), woosh.Token(woosh.STRING, "'Microsoft'", 852, 27, 852, 38), woosh.Token(woosh.NAME, 'and', 852, 39, 852, 42), woosh.Token(woosh.NAME, 'release', 852, 43, 852, 50), woosh.Token(woosh.OP, '==', 852, 51, 852, 53), woosh.Token(woosh.STRING, "'Windows'", 852, 54, 852, 63), woosh.Token(woosh.OP, ':', 852, 63, 852, 64), woosh.Token(woosh.NEWLINE, '\r\n', 852, 64, 853, 0), woosh.Token(woosh.COMMENT, '# Under Windows Vista and Windows Server 2008,', 853, 16, 853, 62), woosh.Token(woosh.COMMENT, '# Microsoft changed the output of the ver command. The', 854, 16, 854, 70), woosh.Token(woosh.COMMENT, '# release is no longer printed. This causes the', 855, 16, 855, 64), woosh.Token(woosh.COMMENT, '# system and release to be misidentified.', 856, 16, 856, 57), woosh.Token(woosh.INDENT, ' ', 857, 0, 857, 16), woosh.Token(woosh.NAME, 'system', 857, 16, 857, 22), woosh.Token(woosh.OP, '=', 857, 23, 857, 24), woosh.Token(woosh.STRING, "'Windows'", 857, 25, 857, 34), woosh.Token(woosh.NEWLINE, '\r\n', 857, 34, 858, 0), woosh.Token(woosh.NAME, 'if', 858, 16, 858, 18), woosh.Token(woosh.STRING, "'6.0'", 858, 19, 858, 24), woosh.Token(woosh.OP, '==', 858, 25, 858, 27), woosh.Token(woosh.NAME, 'version', 858, 28, 858, 35), woosh.Token(woosh.OP, '[', 858, 35, 858, 36), woosh.Token(woosh.OP, ':', 858, 36, 858, 37), woosh.Token(woosh.NUMBER, '3', 858, 37, 858, 38), woosh.Token(woosh.OP, ']', 858, 38, 858, 39), woosh.Token(woosh.OP, ':', 858, 39, 858, 40), woosh.Token(woosh.NEWLINE, '\r\n', 858, 40, 859, 0), woosh.Token(woosh.INDENT, ' ', 859, 0, 859, 20), woosh.Token(woosh.NAME, 'release', 859, 20, 859, 27), woosh.Token(woosh.OP, '=', 859, 28, 859, 29), woosh.Token(woosh.STRING, "'Vista'", 859, 30, 859, 37), woosh.Token(woosh.NEWLINE, '\r\n', 859, 37, 860, 0), woosh.Token(woosh.DEDENT, ' ', 860, 0, 860, 16), woosh.Token(woosh.NAME, 'else', 860, 16, 860, 20), woosh.Token(woosh.OP, ':', 860, 20, 860, 21), woosh.Token(woosh.NEWLINE, '\r\n', 860, 21, 861, 0), woosh.Token(woosh.INDENT, ' ', 861, 0, 861, 20), woosh.Token(woosh.NAME, 'release', 861, 20, 861, 27), woosh.Token(woosh.OP, '=', 861, 28, 861, 29), woosh.Token(woosh.STRING, "''", 861, 30, 861, 32), woosh.Token(woosh.NEWLINE, '\r\n', 861, 32, 862, 0), woosh.Token(woosh.COMMENT, "# In case we still don't know anything useful, we'll try to", 863, 8, 863, 67), woosh.Token(woosh.COMMENT, '# help ourselves', 864, 8, 864, 24), woosh.Token(woosh.DEDENT, ' ', 865, 0, 865, 8), woosh.Token(woosh.DEDENT, '', 865, 8, 865, 8), woosh.Token(woosh.DEDENT, '', 865, 8, 865, 8), woosh.Token(woosh.NAME, 'if', 865, 8, 865, 10), woosh.Token(woosh.NAME, 'system', 865, 11, 865, 17), woosh.Token(woosh.NAME, 'in', 865, 18, 865, 20), woosh.Token(woosh.OP, '(', 865, 21, 865, 22), woosh.Token(woosh.STRING, "'win32'", 865, 22, 865, 29), woosh.Token(woosh.OP, ',', 865, 29, 865, 30), woosh.Token(woosh.STRING, "'win16'", 865, 31, 865, 38), woosh.Token(woosh.OP, ')', 865, 38, 865, 39), woosh.Token(woosh.OP, ':', 865, 39, 865, 40), woosh.Token(woosh.NEWLINE, '\r\n', 865, 40, 866, 0), woosh.Token(woosh.INDENT, ' ', 866, 0, 866, 12), woosh.Token(woosh.NAME, 'if', 866, 12, 866, 14), woosh.Token(woosh.NAME, 'not', 866, 15, 866, 18), woosh.Token(woosh.NAME, 'version', 866, 19, 866, 26), woosh.Token(woosh.OP, ':', 866, 26, 866, 27), woosh.Token(woosh.NEWLINE, '\r\n', 866, 27, 867, 0), woosh.Token(woosh.INDENT, ' ', 867, 0, 867, 16), woosh.Token(woosh.NAME, 'if', 867, 16, 867, 18), woosh.Token(woosh.NAME, 'system', 867, 19, 867, 25), woosh.Token(woosh.OP, '==', 867, 26, 867, 28), woosh.Token(woosh.STRING, "'win32'", 867, 29, 867, 36), woosh.Token(woosh.OP, ':', 867, 36, 867, 37), woosh.Token(woosh.NEWLINE, '\r\n', 867, 37, 868, 0), woosh.Token(woosh.INDENT, ' ', 868, 0, 868, 20), woosh.Token(woosh.NAME, 'version', 868, 20, 868, 27), woosh.Token(woosh.OP, '=', 868, 28, 868, 29), woosh.Token(woosh.STRING, "'32bit'", 868, 30, 868, 37), woosh.Token(woosh.NEWLINE, '\r\n', 868, 37, 869, 0), woosh.Token(woosh.DEDENT, ' ', 869, 0, 869, 16), woosh.Token(woosh.NAME, 'else', 869, 16, 869, 20), woosh.Token(woosh.OP, ':', 869, 20, 869, 21), woosh.Token(woosh.NEWLINE, '\r\n', 869, 21, 870, 0), woosh.Token(woosh.INDENT, ' ', 870, 0, 870, 20), woosh.Token(woosh.NAME, 'version', 870, 20, 870, 27), woosh.Token(woosh.OP, '=', 870, 28, 870, 29), woosh.Token(woosh.STRING, "'16bit'", 870, 30, 870, 37), woosh.Token(woosh.NEWLINE, '\r\n', 870, 37, 871, 0), woosh.Token(woosh.DEDENT, ' ', 871, 0, 871, 12), woosh.Token(woosh.DEDENT, '', 871, 12, 871, 12), woosh.Token(woosh.NAME, 'system', 871, 12, 871, 18), woosh.Token(woosh.OP, '=', 871, 19, 871, 20), woosh.Token(woosh.STRING, "'Windows'", 871, 21, 871, 30), woosh.Token(woosh.NEWLINE, '\r\n', 871, 30, 872, 0), woosh.Token(woosh.DEDENT, ' ', 873, 0, 873, 8), woosh.Token(woosh.NAME, 'elif', 873, 8, 873, 12), woosh.Token(woosh.NAME, 'system', 873, 13, 873, 19), woosh.Token(woosh.OP, '[', 873, 19, 873, 20), woosh.Token(woosh.OP, ':', 873, 20, 873, 21), woosh.Token(woosh.NUMBER, '4', 873, 21, 873, 22), woosh.Token(woosh.OP, ']', 873, 22, 873, 23), woosh.Token(woosh.OP, '==', 873, 24, 873, 26), woosh.Token(woosh.STRING, "'java'", 873, 27, 873, 33), woosh.Token(woosh.OP, ':', 873, 33, 873, 34), woosh.Token(woosh.NEWLINE, '\r\n', 873, 34, 874, 0), woosh.Token(woosh.INDENT, ' ', 874, 0, 874, 12), woosh.Token(woosh.NAME, 'release', 874, 12, 874, 19), woosh.Token(woosh.OP, ',', 874, 19, 874, 20), woosh.Token(woosh.NAME, 'vendor', 874, 21, 874, 27), woosh.Token(woosh.OP, ',', 874, 27, 874, 28), woosh.Token(woosh.NAME, 'vminfo', 874, 29, 874, 35), woosh.Token(woosh.OP, ',', 874, 35, 874, 36), woosh.Token(woosh.NAME, 'osinfo', 874, 37, 874, 43), woosh.Token(woosh.OP, '=', 874, 44, 874, 45), woosh.Token(woosh.NAME, 'java_ver', 874, 46, 874, 54), woosh.Token(woosh.OP, '(', 874, 54, 874, 55), woosh.Token(woosh.OP, ')', 874, 55, 874, 56), woosh.Token(woosh.NEWLINE, '\r\n', 874, 56, 875, 0), woosh.Token(woosh.NAME, 'system', 875, 12, 875, 18), woosh.Token(woosh.OP, '=', 875, 19, 875, 20), woosh.Token(woosh.STRING, "'Java'", 875, 21, 875, 27), woosh.Token(woosh.NEWLINE, '\r\n', 875, 27, 876, 0), woosh.Token(woosh.NAME, 'version', 876, 12, 876, 19), woosh.Token(woosh.OP, '=', 876, 20, 876, 21), woosh.Token(woosh.STRING, "', '", 876, 22, 876, 26), woosh.Token(woosh.OP, '.', 876, 26, 876, 27), woosh.Token(woosh.NAME, 'join', 876, 27, 876, 31), woosh.Token(woosh.OP, '(', 876, 31, 876, 32), woosh.Token(woosh.NAME, 'vminfo', 876, 32, 876, 38), woosh.Token(woosh.OP, ')', 876, 38, 876, 39), woosh.Token(woosh.NEWLINE, '\r\n', 876, 39, 877, 0), woosh.Token(woosh.NAME, 'if', 877, 12, 877, 14), woosh.Token(woosh.NAME, 'not', 877, 15, 877, 18), woosh.Token(woosh.NAME, 'version', 877, 19, 877, 26), woosh.Token(woosh.OP, ':', 877, 26, 877, 27), woosh.Token(woosh.NEWLINE, '\r\n', 877, 27, 878, 0), woosh.Token(woosh.INDENT, ' ', 878, 0, 878, 16), woosh.Token(woosh.NAME, 'version', 878, 16, 878, 23), woosh.Token(woosh.OP, '=', 878, 24, 878, 25), woosh.Token(woosh.NAME, 'vendor', 878, 26, 878, 32), woosh.Token(woosh.NEWLINE, '\r\n', 878, 32, 879, 0), woosh.Token(woosh.COMMENT, '# System specific extensions', 880, 4, 880, 32), woosh.Token(woosh.DEDENT, ' ', 881, 0, 881, 4), woosh.Token(woosh.DEDENT, '', 881, 4, 881, 4), woosh.Token(woosh.DEDENT, '', 881, 4, 881, 4), woosh.Token(woosh.NAME, 'if', 881, 4, 881, 6), woosh.Token(woosh.NAME, 'system', 881, 7, 881, 13), woosh.Token(woosh.OP, '==', 881, 14, 881, 16), woosh.Token(woosh.STRING, "'OpenVMS'", 881, 17, 881, 26), woosh.Token(woosh.OP, ':', 881, 26, 881, 27), woosh.Token(woosh.NEWLINE, '\r\n', 881, 27, 882, 0), woosh.Token(woosh.COMMENT, '# OpenVMS seems to have release and version mixed up', 882, 8, 882, 60), woosh.Token(woosh.INDENT, ' ', 883, 0, 883, 8), woosh.Token(woosh.NAME, 'if', 883, 8, 883, 10), woosh.Token(woosh.NAME, 'not', 883, 11, 883, 14), woosh.Token(woosh.NAME, 'release', 883, 15, 883, 22), woosh.Token(woosh.NAME, 'or', 883, 23, 883, 25), woosh.Token(woosh.NAME, 'release', 883, 26, 883, 33), woosh.Token(woosh.OP, '==', 883, 34, 883, 36), woosh.Token(woosh.STRING, "'0'", 883, 37, 883, 40), woosh.Token(woosh.OP, ':', 883, 40, 883, 41), woosh.Token(woosh.NEWLINE, '\r\n', 883, 41, 884, 0), woosh.Token(woosh.INDENT, ' ', 884, 0, 884, 12), woosh.Token(woosh.NAME, 'release', 884, 12, 884, 19), woosh.Token(woosh.OP, '=', 884, 20, 884, 21), woosh.Token(woosh.NAME, 'version', 884, 22, 884, 29), woosh.Token(woosh.NEWLINE, '\r\n', 884, 29, 885, 0), woosh.Token(woosh.NAME, 'version', 885, 12, 885, 19), woosh.Token(woosh.OP, '=', 885, 20, 885, 21), woosh.Token(woosh.STRING, "''", 885, 22, 885, 24), woosh.Token(woosh.NEWLINE, '\r\n', 885, 24, 886, 0), woosh.Token(woosh.COMMENT, '# normalize name', 887, 4, 887, 21), woosh.Token(woosh.DEDENT, ' ', 888, 0, 888, 4), woosh.Token(woosh.DEDENT, '', 888, 4, 888, 4), woosh.Token(woosh.NAME, 'if', 888, 4, 888, 6), woosh.Token(woosh.NAME, 'system', 888, 7, 888, 13), woosh.Token(woosh.OP, '==', 888, 14, 888, 16), woosh.Token(woosh.STRING, "'Microsoft'", 888, 17, 888, 28), woosh.Token(woosh.NAME, 'and', 888, 29, 888, 32), woosh.Token(woosh.NAME, 'release', 888, 33, 888, 40), woosh.Token(woosh.OP, '==', 888, 41, 888, 43), woosh.Token(woosh.STRING, "'Windows'", 888, 44, 888, 53), woosh.Token(woosh.OP, ':', 888, 53, 888, 54), woosh.Token(woosh.NEWLINE, '\r\n', 888, 54, 889, 0), woosh.Token(woosh.INDENT, ' ', 889, 0, 889, 8), woosh.Token(woosh.NAME, 'system', 889, 8, 889, 14), woosh.Token(woosh.OP, '=', 889, 15, 889, 16), woosh.Token(woosh.STRING, "'Windows'", 889, 17, 889, 26), woosh.Token(woosh.NEWLINE, '\r\n', 889, 26, 890, 0), woosh.Token(woosh.NAME, 'release', 890, 8, 890, 15), woosh.Token(woosh.OP, '=', 890, 16, 890, 17), woosh.Token(woosh.STRING, "'Vista'", 890, 18, 890, 25), woosh.Token(woosh.NEWLINE, '\r\n', 890, 25, 891, 0), woosh.Token(woosh.DEDENT, ' ', 892, 0, 892, 4), woosh.Token(woosh.NAME, 'vals', 892, 4, 892, 8), woosh.Token(woosh.OP, '=', 892, 9, 892, 10), woosh.Token(woosh.NAME, 'system', 892, 11, 892, 17), woosh.Token(woosh.OP, ',', 892, 17, 892, 18), woosh.Token(woosh.NAME, 'node', 892, 19, 892, 23), woosh.Token(woosh.OP, ',', 892, 23, 892, 24), woosh.Token(woosh.NAME, 'release', 892, 25, 892, 32), woosh.Token(woosh.OP, ',', 892, 32, 892, 33), woosh.Token(woosh.NAME, 'version', 892, 34, 892, 41), woosh.Token(woosh.OP, ',', 892, 41, 892, 42), woosh.Token(woosh.NAME, 'machine', 892, 43, 892, 50), woosh.Token(woosh.NEWLINE, '\r\n', 892, 50, 893, 0), woosh.Token(woosh.COMMENT, "# Replace 'unknown' values with the more portable ''", 893, 4, 893, 56), woosh.Token(woosh.NAME, '_uname_cache', 894, 4, 894, 16), woosh.Token(woosh.OP, '=', 894, 17, 894, 18), woosh.Token(woosh.NAME, 'uname_result', 894, 19, 894, 31), woosh.Token(woosh.OP, '(', 894, 31, 894, 32), woosh.Token(woosh.OP, '*', 894, 32, 894, 33), woosh.Token(woosh.NAME, 'map', 894, 33, 894, 36), woosh.Token(woosh.OP, '(', 894, 36, 894, 37), woosh.Token(woosh.NAME, '_unknown_as_blank', 894, 37, 894, 54), woosh.Token(woosh.OP, ',', 894, 54, 894, 55), woosh.Token(woosh.NAME, 'vals', 894, 56, 894, 60), woosh.Token(woosh.OP, ')', 894, 60, 894, 61), woosh.Token(woosh.OP, ')', 894, 61, 894, 62), woosh.Token(woosh.NEWLINE, '\r\n', 894, 62, 895, 0), woosh.Token(woosh.NAME, 'return', 895, 4, 895, 10), woosh.Token(woosh.NAME, '_uname_cache', 895, 11, 895, 23), woosh.Token(woosh.NEWLINE, '\r\n', 895, 23, 896, 0), woosh.Token(woosh.COMMENT, '### Direct interfaces to some of the uname() return values', 897, 0, 897, 58), woosh.Token(woosh.DEDENT, '', 899, 0, 899, 0), woosh.Token(woosh.NAME, 'def', 899, 0, 899, 3), woosh.Token(woosh.NAME, 'system', 899, 4, 899, 10), woosh.Token(woosh.OP, '(', 899, 10, 899, 11), woosh.Token(woosh.OP, ')', 899, 11, 899, 12), woosh.Token(woosh.OP, ':', 899, 12, 899, 13), woosh.Token(woosh.NEWLINE, '\r\n', 899, 13, 900, 0), woosh.Token(woosh.INDENT, ' ', 901, 0, 901, 4), woosh.Token(woosh.STRING, '""" Returns the system/OS name, e.g. \'Linux\', \'Windows\' or \'Java\'.\r\n\r\n An empty string is returned if the value cannot be determined.\r\n\r\n """', 901, 4, 905, 7), woosh.Token(woosh.NEWLINE, '\r\n', 905, 7, 906, 0), woosh.Token(woosh.NAME, 'return', 906, 4, 906, 10), woosh.Token(woosh.NAME, 'uname', 906, 11, 906, 16), woosh.Token(woosh.OP, '(', 906, 16, 906, 17), woosh.Token(woosh.OP, ')', 906, 17, 906, 18), woosh.Token(woosh.OP, '.', 906, 18, 906, 19), woosh.Token(woosh.NAME, 'system', 906, 19, 906, 25), woosh.Token(woosh.NEWLINE, '\r\n', 906, 25, 907, 0), woosh.Token(woosh.DEDENT, '', 908, 0, 908, 0), woosh.Token(woosh.NAME, 'def', 908, 0, 908, 3), woosh.Token(woosh.NAME, 'node', 908, 4, 908, 8), woosh.Token(woosh.OP, '(', 908, 8, 908, 9), woosh.Token(woosh.OP, ')', 908, 9, 908, 10), woosh.Token(woosh.OP, ':', 908, 10, 908, 11), woosh.Token(woosh.NEWLINE, '\r\n', 908, 11, 909, 0), woosh.Token(woosh.INDENT, ' ', 910, 0, 910, 4), woosh.Token(woosh.STRING, '""" Returns the computer\'s network name (which may not be fully\r\n qualified)\r\n\r\n An empty string is returned if the value cannot be determined.\r\n\r\n """', 910, 4, 915, 7), woosh.Token(woosh.NEWLINE, '\r\n', 915, 7, 916, 0), woosh.Token(woosh.NAME, 'return', 916, 4, 916, 10), woosh.Token(woosh.NAME, 'uname', 916, 11, 916, 16), woosh.Token(woosh.OP, '(', 916, 16, 916, 17), woosh.Token(woosh.OP, ')', 916, 17, 916, 18), woosh.Token(woosh.OP, '.', 916, 18, 916, 19), woosh.Token(woosh.NAME, 'node', 916, 19, 916, 23), woosh.Token(woosh.NEWLINE, '\r\n', 916, 23, 917, 0), woosh.Token(woosh.DEDENT, '', 918, 0, 918, 0), woosh.Token(woosh.NAME, 'def', 918, 0, 918, 3), woosh.Token(woosh.NAME, 'release', 918, 4, 918, 11), woosh.Token(woosh.OP, '(', 918, 11, 918, 12), woosh.Token(woosh.OP, ')', 918, 12, 918, 13), woosh.Token(woosh.OP, ':', 918, 13, 918, 14), woosh.Token(woosh.NEWLINE, '\r\n', 918, 14, 919, 0), woosh.Token(woosh.INDENT, ' ', 920, 0, 920, 4), woosh.Token(woosh.STRING, '""" Returns the system\'s release, e.g. \'2.2.0\' or \'NT\'\r\n\r\n An empty string is returned if the value cannot be determined.\r\n\r\n """', 920, 4, 924, 7), woosh.Token(woosh.NEWLINE, '\r\n', 924, 7, 925, 0), woosh.Token(woosh.NAME, 'return', 925, 4, 925, 10), woosh.Token(woosh.NAME, 'uname', 925, 11, 925, 16), woosh.Token(woosh.OP, '(', 925, 16, 925, 17), woosh.Token(woosh.OP, ')', 925, 17, 925, 18), woosh.Token(woosh.OP, '.', 925, 18, 925, 19), woosh.Token(woosh.NAME, 'release', 925, 19, 925, 26), woosh.Token(woosh.NEWLINE, '\r\n', 925, 26, 926, 0), woosh.Token(woosh.DEDENT, '', 927, 0, 927, 0), woosh.Token(woosh.NAME, 'def', 927, 0, 927, 3), woosh.Token(woosh.NAME, 'version', 927, 4, 927, 11), woosh.Token(woosh.OP, '(', 927, 11, 927, 12), woosh.Token(woosh.OP, ')', 927, 12, 927, 13), woosh.Token(woosh.OP, ':', 927, 13, 927, 14), woosh.Token(woosh.NEWLINE, '\r\n', 927, 14, 928, 0), woosh.Token(woosh.INDENT, ' ', 929, 0, 929, 4), woosh.Token(woosh.STRING, '""" Returns the system\'s release version, e.g. \'#3 on degas\'\r\n\r\n An empty string is returned if the value cannot be determined.\r\n\r\n """', 929, 4, 933, 7), woosh.Token(woosh.NEWLINE, '\r\n', 933, 7, 934, 0), woosh.Token(woosh.NAME, 'return', 934, 4, 934, 10), woosh.Token(woosh.NAME, 'uname', 934, 11, 934, 16), woosh.Token(woosh.OP, '(', 934, 16, 934, 17), woosh.Token(woosh.OP, ')', 934, 17, 934, 18), woosh.Token(woosh.OP, '.', 934, 18, 934, 19), woosh.Token(woosh.NAME, 'version', 934, 19, 934, 26), woosh.Token(woosh.NEWLINE, '\r\n', 934, 26, 935, 0), woosh.Token(woosh.DEDENT, '', 936, 0, 936, 0), woosh.Token(woosh.NAME, 'def', 936, 0, 936, 3), woosh.Token(woosh.NAME, 'machine', 936, 4, 936, 11), woosh.Token(woosh.OP, '(', 936, 11, 936, 12), woosh.Token(woosh.OP, ')', 936, 12, 936, 13), woosh.Token(woosh.OP, ':', 936, 13, 936, 14), woosh.Token(woosh.NEWLINE, '\r\n', 936, 14, 937, 0), woosh.Token(woosh.INDENT, ' ', 938, 0, 938, 4), woosh.Token(woosh.STRING, '""" Returns the machine type, e.g. \'i386\'\r\n\r\n An empty string is returned if the value cannot be determined.\r\n\r\n """', 938, 4, 942, 7), woosh.Token(woosh.NEWLINE, '\r\n', 942, 7, 943, 0), woosh.Token(woosh.NAME, 'return', 943, 4, 943, 10), woosh.Token(woosh.NAME, 'uname', 943, 11, 943, 16), woosh.Token(woosh.OP, '(', 943, 16, 943, 17), woosh.Token(woosh.OP, ')', 943, 17, 943, 18), woosh.Token(woosh.OP, '.', 943, 18, 943, 19), woosh.Token(woosh.NAME, 'machine', 943, 19, 943, 26), woosh.Token(woosh.NEWLINE, '\r\n', 943, 26, 944, 0), woosh.Token(woosh.DEDENT, '', 945, 0, 945, 0), woosh.Token(woosh.NAME, 'def', 945, 0, 945, 3), woosh.Token(woosh.NAME, 'processor', 945, 4, 945, 13), woosh.Token(woosh.OP, '(', 945, 13, 945, 14), woosh.Token(woosh.OP, ')', 945, 14, 945, 15), woosh.Token(woosh.OP, ':', 945, 15, 945, 16), woosh.Token(woosh.NEWLINE, '\r\n', 945, 16, 946, 0), woosh.Token(woosh.INDENT, ' ', 947, 0, 947, 4), woosh.Token(woosh.STRING, '""" Returns the (true) processor name, e.g. \'amdk6\'\r\n\r\n An empty string is returned if the value cannot be\r\n determined. Note that many platforms do not provide this\r\n information or simply return the same value as for machine(),\r\n e.g. NetBSD does this.\r\n\r\n """', 947, 4, 954, 7), woosh.Token(woosh.NEWLINE, '\r\n', 954, 7, 955, 0), woosh.Token(woosh.NAME, 'return', 955, 4, 955, 10), woosh.Token(woosh.NAME, 'uname', 955, 11, 955, 16), woosh.Token(woosh.OP, '(', 955, 16, 955, 17), woosh.Token(woosh.OP, ')', 955, 17, 955, 18), woosh.Token(woosh.OP, '.', 955, 18, 955, 19), woosh.Token(woosh.NAME, 'processor', 955, 19, 955, 28), woosh.Token(woosh.NEWLINE, '\r\n', 955, 28, 956, 0), woosh.Token(woosh.COMMENT, '### Various APIs for extracting information from sys.version', 957, 0, 957, 60), woosh.Token(woosh.DEDENT, '', 959, 0, 959, 0), woosh.Token(woosh.NAME, '_sys_version_parser', 959, 0, 959, 19), woosh.Token(woosh.OP, '=', 959, 20, 959, 21), woosh.Token(woosh.NAME, 're', 959, 22, 959, 24), woosh.Token(woosh.OP, '.', 959, 24, 959, 25), woosh.Token(woosh.NAME, 'compile', 959, 25, 959, 32), woosh.Token(woosh.OP, '(', 959, 32, 959, 33), woosh.Token(woosh.STRING, "r'([\\w.+]+)\\s*'", 960, 4, 960, 19), woosh.Token(woosh.COMMENT, '# "version<space>"', 960, 21, 960, 39), woosh.Token(woosh.STRING, "r'\\(#?([^,]+)'", 961, 4, 961, 18), woosh.Token(woosh.COMMENT, '# "(#buildno"', 961, 20, 961, 33), woosh.Token(woosh.STRING, "r'(?:,\\s*([\\w ]*)'", 962, 4, 962, 22), woosh.Token(woosh.COMMENT, '# ", builddate"', 962, 24, 962, 39), woosh.Token(woosh.STRING, "r'(?:,\\s*([\\w :]*))?)?\\)\\s*'", 963, 4, 963, 32), woosh.Token(woosh.COMMENT, '# ", buildtime)<space>"', 963, 34, 963, 57), woosh.Token(woosh.STRING, "r'\\[([^\\]]+)\\]?'", 964, 4, 964, 20), woosh.Token(woosh.OP, ',', 964, 20, 964, 21), woosh.Token(woosh.NAME, 're', 964, 22, 964, 24), woosh.Token(woosh.OP, '.', 964, 24, 964, 25), woosh.Token(woosh.NAME, 'ASCII', 964, 25, 964, 30), woosh.Token(woosh.OP, ')', 964, 30, 964, 31), woosh.Token(woosh.COMMENT, '# "[compiler]"', 964, 33, 964, 47), woosh.Token(woosh.NEWLINE, '\r\n', 964, 47, 965, 0), woosh.Token(woosh.NAME, '_ironpython_sys_version_parser', 966, 0, 966, 30), woosh.Token(woosh.OP, '=', 966, 31, 966, 32), woosh.Token(woosh.NAME, 're', 966, 33, 966, 35), woosh.Token(woosh.OP, '.', 966, 35, 966, 36), woosh.Token(woosh.NAME, 'compile', 966, 36, 966, 43), woosh.Token(woosh.OP, '(', 966, 43, 966, 44), woosh.Token(woosh.STRING, "r'IronPython\\s*'", 967, 4, 967, 20), woosh.Token(woosh.STRING, "r'([\\d\\.]+)'", 968, 4, 968, 16), woosh.Token(woosh.STRING, "r'(?: \\(([\\d\\.]+)\\))?'", 969, 4, 969, 26), woosh.Token(woosh.STRING, "r' on (.NET [\\d\\.]+)'", 970, 4, 970, 25), woosh.Token(woosh.OP, ',', 970, 25, 970, 26), woosh.Token(woosh.NAME, 're', 970, 27, 970, 29), woosh.Token(woosh.OP, '.', 970, 29, 970, 30), woosh.Token(woosh.NAME, 'ASCII', 970, 30, 970, 35), woosh.Token(woosh.OP, ')', 970, 35, 970, 36), woosh.Token(woosh.NEWLINE, '\r\n', 970, 36, 971, 0), woosh.Token(woosh.COMMENT, '# IronPython covering 2.6 and 2.7', 972, 0, 972, 33), woosh.Token(woosh.NAME, '_ironpython26_sys_version_parser', 973, 0, 973, 32), woosh.Token(woosh.OP, '=', 973, 33, 973, 34), woosh.Token(woosh.NAME, 're', 973, 35, 973, 37), woosh.Token(woosh.OP, '.', 973, 37, 973, 38), woosh.Token(woosh.NAME, 'compile', 973, 38, 973, 45), woosh.Token(woosh.OP, '(', 973, 45, 973, 46), woosh.Token(woosh.STRING, "r'([\\d.]+)\\s*'", 974, 4, 974, 18), woosh.Token(woosh.STRING, "r'\\(IronPython\\s*'", 975, 4, 975, 22), woosh.Token(woosh.STRING, "r'[\\d.]+\\s*'", 976, 4, 976, 16), woosh.Token(woosh.STRING, "r'\\(([\\d.]+)\\) on ([\\w.]+ [\\d.]+(?: \\(\\d+-bit\\))?)\\)'", 977, 4, 977, 57), woosh.Token(woosh.OP, ')', 978, 0, 978, 1), woosh.Token(woosh.NEWLINE, '\r\n', 978, 1, 979, 0), woosh.Token(woosh.NAME, '_pypy_sys_version_parser', 980, 0, 980, 24), woosh.Token(woosh.OP, '=', 980, 25, 980, 26), woosh.Token(woosh.NAME, 're', 980, 27, 980, 29), woosh.Token(woosh.OP, '.', 980, 29, 980, 30), woosh.Token(woosh.NAME, 'compile', 980, 30, 980, 37), woosh.Token(woosh.OP, '(', 980, 37, 980, 38), woosh.Token(woosh.STRING, "r'([\\w.+]+)\\s*'", 981, 4, 981, 19), woosh.Token(woosh.STRING, "r'\\(#?([^,]+),\\s*([\\w ]+),\\s*([\\w :]+)\\)\\s*'", 982, 4, 982, 48), woosh.Token(woosh.STRING, "r'\\[PyPy [^\\]]+\\]?'", 983, 4, 983, 23), woosh.Token(woosh.OP, ')', 983, 23, 983, 24), woosh.Token(woosh.NEWLINE, '\r\n', 983, 24, 984, 0), woosh.Token(woosh.NAME, '_sys_version_cache', 985, 0, 985, 18), woosh.Token(woosh.OP, '=', 985, 19, 985, 20), woosh.Token(woosh.OP, '{', 985, 21, 985, 22), woosh.Token(woosh.OP, '}', 985, 22, 985, 23), woosh.Token(woosh.NEWLINE, '\r\n', 985, 23, 986, 0), woosh.Token(woosh.NAME, 'def', 987, 0, 987, 3), woosh.Token(woosh.NAME, '_sys_version', 987, 4, 987, 16), woosh.Token(woosh.OP, '(', 987, 16, 987, 17), woosh.Token(woosh.NAME, 'sys_version', 987, 17, 987, 28), woosh.Token(woosh.OP, '=', 987, 28, 987, 29), woosh.Token(woosh.NAME, 'None', 987, 29, 987, 33), woosh.Token(woosh.OP, ')', 987, 33, 987, 34), woosh.Token(woosh.OP, ':', 987, 34, 987, 35), woosh.Token(woosh.NEWLINE, '\r\n', 987, 35, 988, 0), woosh.Token(woosh.INDENT, ' ', 989, 0, 989, 4), woosh.Token(woosh.STRING, '""" Returns a parsed version of Python\'s sys.version as tuple\r\n (name, version, branch, revision, buildno, builddate, compiler)\r\n referring to the Python implementation name, version, branch,\r\n revision, build number, build date/time as string and the compiler\r\n identification string.\r\n\r\n Note that unlike the Python sys.version, the returned value\r\n for the Python version will always include the patchlevel (it\r\n defaults to \'.0\').\r\n\r\n The function returns empty strings for tuple entries that\r\n cannot be determined.\r\n\r\n sys_version may be given to parse an alternative version\r\n string, e.g. if the version was read from a different Python\r\n interpreter.\r\n\r\n """', 989, 4, 1006, 7), woosh.Token(woosh.NEWLINE, '\r\n', 1006, 7, 1007, 0), woosh.Token(woosh.COMMENT, '# Get the Python version', 1007, 4, 1007, 28), woosh.Token(woosh.NAME, 'if', 1008, 4, 1008, 6), woosh.Token(woosh.NAME, 'sys_version', 1008, 7, 1008, 18), woosh.Token(woosh.NAME, 'is', 1008, 19, 1008, 21), woosh.Token(woosh.NAME, 'None', 1008, 22, 1008, 26), woosh.Token(woosh.OP, ':', 1008, 26, 1008, 27), woosh.Token(woosh.NEWLINE, '\r\n', 1008, 27, 1009, 0), woosh.Token(woosh.INDENT, ' ', 1009, 0, 1009, 8), woosh.Token(woosh.NAME, 'sys_version', 1009, 8, 1009, 19), woosh.Token(woosh.OP, '=', 1009, 20, 1009, 21), woosh.Token(woosh.NAME, 'sys', 1009, 22, 1009, 25), woosh.Token(woosh.OP, '.', 1009, 25, 1009, 26), woosh.Token(woosh.NAME, 'version', 1009, 26, 1009, 33), woosh.Token(woosh.NEWLINE, '\r\n', 1009, 33, 1010, 0), woosh.Token(woosh.COMMENT, '# Try the cache first', 1011, 4, 1011, 25), woosh.Token(woosh.DEDENT, ' ', 1012, 0, 1012, 4), woosh.Token(woosh.NAME, 'result', 1012, 4, 1012, 10), woosh.Token(woosh.OP, '=', 1012, 11, 1012, 12), woosh.Token(woosh.NAME, '_sys_version_cache', 1012, 13, 1012, 31), woosh.Token(woosh.OP, '.', 1012, 31, 1012, 32), woosh.Token(woosh.NAME, 'get', 1012, 32, 1012, 35), woosh.Token(woosh.OP, '(', 1012, 35, 1012, 36), woosh.Token(woosh.NAME, 'sys_version', 1012, 36, 1012, 47), woosh.Token(woosh.OP, ',', 1012, 47, 1012, 48), woosh.Token(woosh.NAME, 'None', 1012, 49, 1012, 53), woosh.Token(woosh.OP, ')', 1012, 53, 1012, 54), woosh.Token(woosh.NEWLINE, '\r\n', 1012, 54, 1013, 0), woosh.Token(woosh.NAME, 'if', 1013, 4, 1013, 6), woosh.Token(woosh.NAME, 'result', 1013, 7, 1013, 13), woosh.Token(woosh.NAME, 'is', 1013, 14, 1013, 16), woosh.Token(woosh.NAME, 'not', 1013, 17, 1013, 20), woosh.Token(woosh.NAME, 'None', 1013, 21, 1013, 25), woosh.Token(woosh.OP, ':', 1013, 25, 1013, 26), woosh.Token(woosh.NEWLINE, '\r\n', 1013, 26, 1014, 0), woosh.Token(woosh.INDENT, ' ', 1014, 0, 1014, 8), woosh.Token(woosh.NAME, 'return', 1014, 8, 1014, 14), woosh.Token(woosh.NAME, 'result', 1014, 15, 1014, 21), woosh.Token(woosh.NEWLINE, '\r\n', 1014, 21, 1015, 0), woosh.Token(woosh.COMMENT, '# Parse it', 1016, 4, 1016, 14), woosh.Token(woosh.DEDENT, ' ', 1017, 0, 1017, 4), woosh.Token(woosh.NAME, 'if', 1017, 4, 1017, 6), woosh.Token(woosh.STRING, "'IronPython'", 1017, 7, 1017, 19), woosh.Token(woosh.NAME, 'in', 1017, 20, 1017, 22), woosh.Token(woosh.NAME, 'sys_version', 1017, 23, 1017, 34), woosh.Token(woosh.OP, ':', 1017, 34, 1017, 35), woosh.Token(woosh.NEWLINE, '\r\n', 1017, 35, 1018, 0), woosh.Token(woosh.COMMENT, '# IronPython', 1018, 8, 1018, 20), woosh.Token(woosh.INDENT, ' ', 1019, 0, 1019, 8), woosh.Token(woosh.NAME, 'name', 1019, 8, 1019, 12), woosh.Token(woosh.OP, '=', 1019, 13, 1019, 14), woosh.Token(woosh.STRING, "'IronPython'", 1019, 15, 1019, 27), woosh.Token(woosh.NEWLINE, '\r\n', 1019, 27, 1020, 0), woosh.Token(woosh.NAME, 'if', 1020, 8, 1020, 10), woosh.Token(woosh.NAME, 'sys_version', 1020, 11, 1020, 22), woosh.Token(woosh.OP, '.', 1020, 22, 1020, 23), woosh.Token(woosh.NAME, 'startswith', 1020, 23, 1020, 33), woosh.Token(woosh.OP, '(', 1020, 33, 1020, 34), woosh.Token(woosh.STRING, "'IronPython'", 1020, 34, 1020, 46), woosh.Token(woosh.OP, ')', 1020, 46, 1020, 47), woosh.Token(woosh.OP, ':', 1020, 47, 1020, 48), woosh.Token(woosh.NEWLINE, '\r\n', 1020, 48, 1021, 0), woosh.Token(woosh.INDENT, ' ', 1021, 0, 1021, 12), woosh.Token(woosh.NAME, 'match', 1021, 12, 1021, 17), woosh.Token(woosh.OP, '=', 1021, 18, 1021, 19), woosh.Token(woosh.NAME, '_ironpython_sys_version_parser', 1021, 20, 1021, 50), woosh.Token(woosh.OP, '.', 1021, 50, 1021, 51), woosh.Token(woosh.NAME, 'match', 1021, 51, 1021, 56), woosh.Token(woosh.OP, '(', 1021, 56, 1021, 57), woosh.Token(woosh.NAME, 'sys_version', 1021, 57, 1021, 68), woosh.Token(woosh.OP, ')', 1021, 68, 1021, 69), woosh.Token(woosh.NEWLINE, '\r\n', 1021, 69, 1022, 0), woosh.Token(woosh.DEDENT, ' ', 1022, 0, 1022, 8), woosh.Token(woosh.NAME, 'else', 1022, 8, 1022, 12), woosh.Token(woosh.OP, ':', 1022, 12, 1022, 13), woosh.Token(woosh.NEWLINE, '\r\n', 1022, 13, 1023, 0), woosh.Token(woosh.INDENT, ' ', 1023, 0, 1023, 12), woosh.Token(woosh.NAME, 'match', 1023, 12, 1023, 17), woosh.Token(woosh.OP, '=', 1023, 18, 1023, 19), woosh.Token(woosh.NAME, '_ironpython26_sys_version_parser', 1023, 20, 1023, 52), woosh.Token(woosh.OP, '.', 1023, 52, 1023, 53), woosh.Token(woosh.NAME, 'match', 1023, 53, 1023, 58), woosh.Token(woosh.OP, '(', 1023, 58, 1023, 59), woosh.Token(woosh.NAME, 'sys_version', 1023, 59, 1023, 70), woosh.Token(woosh.OP, ')', 1023, 70, 1023, 71), woosh.Token(woosh.NEWLINE, '\r\n', 1023, 71, 1024, 0), woosh.Token(woosh.DEDENT, ' ', 1025, 0, 1025, 8), woosh.Token(woosh.NAME, 'if', 1025, 8, 1025, 10), woosh.Token(woosh.NAME, 'match', 1025, 11, 1025, 16), woosh.Token(woosh.NAME, 'is', 1025, 17, 1025, 19), woosh.Token(woosh.NAME, 'None', 1025, 20, 1025, 24), woosh.Token(woosh.OP, ':', 1025, 24, 1025, 25), woosh.Token(woosh.NEWLINE, '\r\n', 1025, 25, 1026, 0), woosh.Token(woosh.INDENT, ' ', 1026, 0, 1026, 12), woosh.Token(woosh.NAME, 'raise', 1026, 12, 1026, 17), woosh.Token(woosh.NAME, 'ValueError', 1026, 18, 1026, 28), woosh.Token(woosh.OP, '(', 1026, 28, 1026, 29), woosh.Token(woosh.STRING, "'failed to parse IronPython sys.version: %s'", 1027, 16, 1027, 60), woosh.Token(woosh.OP, '%', 1027, 61, 1027, 62), woosh.Token(woosh.NAME, 'repr', 1028, 16, 1028, 20), woosh.Token(woosh.OP, '(', 1028, 20, 1028, 21), woosh.Token(woosh.NAME, 'sys_version', 1028, 21, 1028, 32), woosh.Token(woosh.OP, ')', 1028, 32, 1028, 33), woosh.Token(woosh.OP, ')', 1028, 33, 1028, 34), woosh.Token(woosh.NEWLINE, '\r\n', 1028, 34, 1029, 0), woosh.Token(woosh.DEDENT, ' ', 1030, 0, 1030, 8), woosh.Token(woosh.NAME, 'version', 1030, 8, 1030, 15), woosh.Token(woosh.OP, ',', 1030, 15, 1030, 16), woosh.Token(woosh.NAME, 'alt_version', 1030, 17, 1030, 28), woosh.Token(woosh.OP, ',', 1030, 28, 1030, 29), woosh.Token(woosh.NAME, 'compiler', 1030, 30, 1030, 38), woosh.Token(woosh.OP, '=', 1030, 39, 1030, 40), woosh.Token(woosh.NAME, 'match', 1030, 41, 1030, 46), woosh.Token(woosh.OP, '.', 1030, 46, 1030, 47), woosh.Token(woosh.NAME, 'groups', 1030, 47, 1030, 53), woosh.Token(woosh.OP, '(', 1030, 53, 1030, 54), woosh.Token(woosh.OP, ')', 1030, 54, 1030, 55), woosh.Token(woosh.NEWLINE, '\r\n', 1030, 55, 1031, 0), woosh.Token(woosh.NAME, 'buildno', 1031, 8, 1031, 15), woosh.Token(woosh.OP, '=', 1031, 16, 1031, 17), woosh.Token(woosh.STRING, "''", 1031, 18, 1031, 20), woosh.Token(woosh.NEWLINE, '\r\n', 1031, 20, 1032, 0), woosh.Token(woosh.NAME, 'builddate', 1032, 8, 1032, 17), woosh.Token(woosh.OP, '=', 1032, 18, 1032, 19), woosh.Token(woosh.STRING, "''", 1032, 20, 1032, 22), woosh.Token(woosh.NEWLINE, '\r\n', 1032, 22, 1033, 0), woosh.Token(woosh.DEDENT, ' ', 1034, 0, 1034, 4), woosh.Token(woosh.NAME, 'elif', 1034, 4, 1034, 8), woosh.Token(woosh.NAME, 'sys', 1034, 9, 1034, 12), woosh.Token(woosh.OP, '.', 1034, 12, 1034, 13), woosh.Token(woosh.NAME, 'platform', 1034, 13, 1034, 21), woosh.Token(woosh.OP, '.', 1034, 21, 1034, 22), woosh.Token(woosh.NAME, 'startswith', 1034, 22, 1034, 32), woosh.Token(woosh.OP, '(', 1034, 32, 1034, 33), woosh.Token(woosh.STRING, "'java'", 1034, 33, 1034, 39), woosh.Token(woosh.OP, ')', 1034, 39, 1034, 40), woosh.Token(woosh.OP, ':', 1034, 40, 1034, 41), woosh.Token(woosh.NEWLINE, '\r\n', 1034, 41, 1035, 0), woosh.Token(woosh.COMMENT, '# Jython', 1035, 8, 1035, 16), woosh.Token(woosh.INDENT, ' ', 1036, 0, 1036, 8), woosh.Token(woosh.NAME, 'name', 1036, 8, 1036, 12), woosh.Token(woosh.OP, '=', 1036, 13, 1036, 14), woosh.Token(woosh.STRING, "'Jython'", 1036, 15, 1036, 23), woosh.Token(woosh.NEWLINE, '\r\n', 1036, 23, 1037, 0), woosh.Token(woosh.NAME, 'match', 1037, 8, 1037, 13), woosh.Token(woosh.OP, '=', 1037, 14, 1037, 15), woosh.Token(woosh.NAME, '_sys_version_parser', 1037, 16, 1037, 35), woosh.Token(woosh.OP, '.', 1037, 35, 1037, 36), woosh.Token(woosh.NAME, 'match', 1037, 36, 1037, 41), woosh.Token(woosh.OP, '(', 1037, 41, 1037, 42), woosh.Token(woosh.NAME, 'sys_version', 1037, 42, 1037, 53), woosh.Token(woosh.OP, ')', 1037, 53, 1037, 54), woosh.Token(woosh.NEWLINE, '\r\n', 1037, 54, 1038, 0), woosh.Token(woosh.NAME, 'if', 1038, 8, 1038, 10), woosh.Token(woosh.NAME, 'match', 1038, 11, 1038, 16), woosh.Token(woosh.NAME, 'is', 1038, 17, 1038, 19), woosh.Token(woosh.NAME, 'None', 1038, 20, 1038, 24), woosh.Token(woosh.OP, ':', 1038, 24, 1038, 25), woosh.Token(woosh.NEWLINE, '\r\n', 1038, 25, 1039, 0), woosh.Token(woosh.INDENT, ' ', 1039, 0, 1039, 12), woosh.Token(woosh.NAME, 'raise', 1039, 12, 1039, 17), woosh.Token(woosh.NAME, 'ValueError', 1039, 18, 1039, 28), woosh.Token(woosh.OP, '(', 1039, 28, 1039, 29), woosh.Token(woosh.STRING, "'failed to parse Jython sys.version: %s'", 1040, 16, 1040, 56), woosh.Token(woosh.OP, '%', 1040, 57, 1040, 58), woosh.Token(woosh.NAME, 'repr', 1041, 16, 1041, 20), woosh.Token(woosh.OP, '(', 1041, 20, 1041, 21), woosh.Token(woosh.NAME, 'sys_version', 1041, 21, 1041, 32), woosh.Token(woosh.OP, ')', 1041, 32, 1041, 33), woosh.Token(woosh.OP, ')', 1041, 33, 1041, 34), woosh.Token(woosh.NEWLINE, '\r\n', 1041, 34, 1042, 0), woosh.Token(woosh.DEDENT, ' ', 1042, 0, 1042, 8), woosh.Token(woosh.NAME, 'version', 1042, 8, 1042, 15), woosh.Token(woosh.OP, ',', 1042, 15, 1042, 16), woosh.Token(woosh.NAME, 'buildno', 1042, 17, 1042, 24), woosh.Token(woosh.OP, ',', 1042, 24, 1042, 25), woosh.Token(woosh.NAME, 'builddate', 1042, 26, 1042, 35), woosh.Token(woosh.OP, ',', 1042, 35, 1042, 36), woosh.Token(woosh.NAME, 'buildtime', 1042, 37, 1042, 46), woosh.Token(woosh.OP, ',', 1042, 46, 1042, 47), woosh.Token(woosh.NAME, '_', 1042, 48, 1042, 49), woosh.Token(woosh.OP, '=', 1042, 50, 1042, 51), woosh.Token(woosh.NAME, 'match', 1042, 52, 1042, 57), woosh.Token(woosh.OP, '.', 1042, 57, 1042, 58), woosh.Token(woosh.NAME, 'groups', 1042, 58, 1042, 64), woosh.Token(woosh.OP, '(', 1042, 64, 1042, 65), woosh.Token(woosh.OP, ')', 1042, 65, 1042, 66), woosh.Token(woosh.NEWLINE, '\r\n', 1042, 66, 1043, 0), woosh.Token(woosh.NAME, 'if', 1043, 8, 1043, 10), woosh.Token(woosh.NAME, 'builddate', 1043, 11, 1043, 20), woosh.Token(woosh.NAME, 'is', 1043, 21, 1043, 23), woosh.Token(woosh.NAME, 'None', 1043, 24, 1043, 28), woosh.Token(woosh.OP, ':', 1043, 28, 1043, 29), woosh.Token(woosh.NEWLINE, '\r\n', 1043, 29, 1044, 0), woosh.Token(woosh.INDENT, ' ', 1044, 0, 1044, 12), woosh.Token(woosh.NAME, 'builddate', 1044, 12, 1044, 21), woosh.Token(woosh.OP, '=', 1044, 22, 1044, 23), woosh.Token(woosh.STRING, "''", 1044, 24, 1044, 26), woosh.Token(woosh.NEWLINE, '\r\n', 1044, 26, 1045, 0), woosh.Token(woosh.DEDENT, ' ', 1045, 0, 1045, 8), woosh.Token(woosh.NAME, 'compiler', 1045, 8, 1045, 16), woosh.Token(woosh.OP, '=', 1045, 17, 1045, 18), woosh.Token(woosh.NAME, 'sys', 1045, 19, 1045, 22), woosh.Token(woosh.OP, '.', 1045, 22, 1045, 23), woosh.Token(woosh.NAME, 'platform', 1045, 23, 1045, 31), woosh.Token(woosh.NEWLINE, '\r\n', 1045, 31, 1046, 0), woosh.Token(woosh.DEDENT, ' ', 1047, 0, 1047, 4), woosh.Token(woosh.NAME, 'elif', 1047, 4, 1047, 8), woosh.Token(woosh.STRING, '"PyPy"', 1047, 9, 1047, 15), woosh.Token(woosh.NAME, 'in', 1047, 16, 1047, 18), woosh.Token(woosh.NAME, 'sys_version', 1047, 19, 1047, 30), woosh.Token(woosh.OP, ':', 1047, 30, 1047, 31), woosh.Token(woosh.NEWLINE, '\r\n', 1047, 31, 1048, 0), woosh.Token(woosh.COMMENT, '# PyPy', 1048, 8, 1048, 14), woosh.Token(woosh.INDENT, ' ', 1049, 0, 1049, 8), woosh.Token(woosh.NAME, 'name', 1049, 8, 1049, 12), woosh.Token(woosh.OP, '=', 1049, 13, 1049, 14), woosh.Token(woosh.STRING, '"PyPy"', 1049, 15, 1049, 21), woosh.Token(woosh.NEWLINE, '\r\n', 1049, 21, 1050, 0), woosh.Token(woosh.NAME, 'match', 1050, 8, 1050, 13), woosh.Token(woosh.OP, '=', 1050, 14, 1050, 15), woosh.Token(woosh.NAME, '_pypy_sys_version_parser', 1050, 16, 1050, 40), woosh.Token(woosh.OP, '.', 1050, 40, 1050, 41), woosh.Token(woosh.NAME, 'match', 1050, 41, 1050, 46), woosh.Token(woosh.OP, '(', 1050, 46, 1050, 47), woosh.Token(woosh.NAME, 'sys_version', 1050, 47, 1050, 58), woosh.Token(woosh.OP, ')', 1050, 58, 1050, 59), woosh.Token(woosh.NEWLINE, '\r\n', 1050, 59, 1051, 0), woosh.Token(woosh.NAME, 'if', 1051, 8, 1051, 10), woosh.Token(woosh.NAME, 'match', 1051, 11, 1051, 16), woosh.Token(woosh.NAME, 'is', 1051, 17, 1051, 19), woosh.Token(woosh.NAME, 'None', 1051, 20, 1051, 24), woosh.Token(woosh.OP, ':', 1051, 24, 1051, 25), woosh.Token(woosh.NEWLINE, '\r\n', 1051, 25, 1052, 0), woosh.Token(woosh.INDENT, ' ', 1052, 0, 1052, 12), woosh.Token(woosh.NAME, 'raise', 1052, 12, 1052, 17), woosh.Token(woosh.NAME, 'ValueError', 1052, 18, 1052, 28), woosh.Token(woosh.OP, '(', 1052, 28, 1052, 29), woosh.Token(woosh.STRING, '"failed to parse PyPy sys.version: %s"', 1052, 29, 1052, 67), woosh.Token(woosh.OP, '%', 1052, 68, 1052, 69), woosh.Token(woosh.NAME, 'repr', 1053, 29, 1053, 33), woosh.Token(woosh.OP, '(', 1053, 33, 1053, 34), woosh.Token(woosh.NAME, 'sys_version', 1053, 34, 1053, 45), woosh.Token(woosh.OP, ')', 1053, 45, 1053, 46), woosh.Token(woosh.OP, ')', 1053, 46, 1053, 47), woosh.Token(woosh.NEWLINE, '\r\n', 1053, 47, 1054, 0), woosh.Token(woosh.DEDENT, ' ', 1054, 0, 1054, 8), woosh.Token(woosh.NAME, 'version', 1054, 8, 1054, 15), woosh.Token(woosh.OP, ',', 1054, 15, 1054, 16), woosh.Token(woosh.NAME, 'buildno', 1054, 17, 1054, 24), woosh.Token(woosh.OP, ',', 1054, 24, 1054, 25), woosh.Token(woosh.NAME, 'builddate', 1054, 26, 1054, 35), woosh.Token(woosh.OP, ',', 1054, 35, 1054, 36), woosh.Token(woosh.NAME, 'buildtime', 1054, 37, 1054, 46), woosh.Token(woosh.OP, '=', 1054, 47, 1054, 48), woosh.Token(woosh.NAME, 'match', 1054, 49, 1054, 54), woosh.Token(woosh.OP, '.', 1054, 54, 1054, 55), woosh.Token(woosh.NAME, 'groups', 1054, 55, 1054, 61), woosh.Token(woosh.OP, '(', 1054, 61, 1054, 62), woosh.Token(woosh.OP, ')', 1054, 62, 1054, 63), woosh.Token(woosh.NEWLINE, '\r\n', 1054, 63, 1055, 0), woosh.Token(woosh.NAME, 'compiler', 1055, 8, 1055, 16), woosh.Token(woosh.OP, '=', 1055, 17, 1055, 18), woosh.Token(woosh.STRING, '""', 1055, 19, 1055, 21), woosh.Token(woosh.NEWLINE, '\r\n', 1055, 21, 1056, 0), woosh.Token(woosh.DEDENT, ' ', 1057, 0, 1057, 4), woosh.Token(woosh.NAME, 'else', 1057, 4, 1057, 8), woosh.Token(woosh.OP, ':', 1057, 8, 1057, 9), woosh.Token(woosh.NEWLINE, '\r\n', 1057, 9, 1058, 0), woosh.Token(woosh.COMMENT, '# CPython', 1058, 8, 1058, 17), woosh.Token(woosh.INDENT, ' ', 1059, 0, 1059, 8), woosh.Token(woosh.NAME, 'match', 1059, 8, 1059, 13), woosh.Token(woosh.OP, '=', 1059, 14, 1059, 15), woosh.Token(woosh.NAME, '_sys_version_parser', 1059, 16, 1059, 35), woosh.Token(woosh.OP, '.', 1059, 35, 1059, 36), woosh.Token(woosh.NAME, 'match', 1059, 36, 1059, 41), woosh.Token(woosh.OP, '(', 1059, 41, 1059, 42), woosh.Token(woosh.NAME, 'sys_version', 1059, 42, 1059, 53), woosh.Token(woosh.OP, ')', 1059, 53, 1059, 54), woosh.Token(woosh.NEWLINE, '\r\n', 1059, 54, 1060, 0), woosh.Token(woosh.NAME, 'if', 1060, 8, 1060, 10), woosh.Token(woosh.NAME, 'match', 1060, 11, 1060, 16), woosh.Token(woosh.NAME, 'is', 1060, 17, 1060, 19), woosh.Token(woosh.NAME, 'None', 1060, 20, 1060, 24), woosh.Token(woosh.OP, ':', 1060, 24, 1060, 25), woosh.Token(woosh.NEWLINE, '\r\n', 1060, 25, 1061, 0), woosh.Token(woosh.INDENT, ' ', 1061, 0, 1061, 12), woosh.Token(woosh.NAME, 'raise', 1061, 12, 1061, 17), woosh.Token(woosh.NAME, 'ValueError', 1061, 18, 1061, 28), woosh.Token(woosh.OP, '(', 1061, 28, 1061, 29), woosh.Token(woosh.STRING, "'failed to parse CPython sys.version: %s'", 1062, 16, 1062, 57), woosh.Token(woosh.OP, '%', 1062, 58, 1062, 59), woosh.Token(woosh.NAME, 'repr', 1063, 16, 1063, 20), woosh.Token(woosh.OP, '(', 1063, 20, 1063, 21), woosh.Token(woosh.NAME, 'sys_version', 1063, 21, 1063, 32), woosh.Token(woosh.OP, ')', 1063, 32, 1063, 33), woosh.Token(woosh.OP, ')', 1063, 33, 1063, 34), woosh.Token(woosh.NEWLINE, '\r\n', 1063, 34, 1064, 0), woosh.Token(woosh.DEDENT, ' ', 1064, 0, 1064, 8), woosh.Token(woosh.NAME, 'version', 1064, 8, 1064, 15), woosh.Token(woosh.OP, ',', 1064, 15, 1064, 16), woosh.Token(woosh.NAME, 'buildno', 1064, 17, 1064, 24), woosh.Token(woosh.OP, ',', 1064, 24, 1064, 25), woosh.Token(woosh.NAME, 'builddate', 1064, 26, 1064, 35), woosh.Token(woosh.OP, ',', 1064, 35, 1064, 36), woosh.Token(woosh.NAME, 'buildtime', 1064, 37, 1064, 46), woosh.Token(woosh.OP, ',', 1064, 46, 1064, 47), woosh.Token(woosh.NAME, 'compiler', 1064, 48, 1064, 56), woosh.Token(woosh.OP, '=', 1064, 57, 1064, 58), woosh.Token(woosh.NAME, 'match', 1065, 14, 1065, 19), woosh.Token(woosh.OP, '.', 1065, 19, 1065, 20), woosh.Token(woosh.NAME, 'groups', 1065, 20, 1065, 26), woosh.Token(woosh.OP, '(', 1065, 26, 1065, 27), woosh.Token(woosh.OP, ')', 1065, 27, 1065, 28), woosh.Token(woosh.NEWLINE, '\r\n', 1065, 28, 1066, 0), woosh.Token(woosh.NAME, 'name', 1066, 8, 1066, 12), woosh.Token(woosh.OP, '=', 1066, 13, 1066, 14), woosh.Token(woosh.STRING, "'CPython'", 1066, 15, 1066, 24), woosh.Token(woosh.NEWLINE, '\r\n', 1066, 24, 1067, 0), woosh.Token(woosh.NAME, 'if', 1067, 8, 1067, 10), woosh.Token(woosh.NAME, 'builddate', 1067, 11, 1067, 20), woosh.Token(woosh.NAME, 'is', 1067, 21, 1067, 23), woosh.Token(woosh.NAME, 'None', 1067, 24, 1067, 28), woosh.Token(woosh.OP, ':', 1067, 28, 1067, 29), woosh.Token(woosh.NEWLINE, '\r\n', 1067, 29, 1068, 0), woosh.Token(woosh.INDENT, ' ', 1068, 0, 1068, 12), woosh.Token(woosh.NAME, 'builddate', 1068, 12, 1068, 21), woosh.Token(woosh.OP, '=', 1068, 22, 1068, 23), woosh.Token(woosh.STRING, "''", 1068, 24, 1068, 26), woosh.Token(woosh.NEWLINE, '\r\n', 1068, 26, 1069, 0), woosh.Token(woosh.DEDENT, ' ', 1069, 0, 1069, 8), woosh.Token(woosh.NAME, 'elif', 1069, 8, 1069, 12), woosh.Token(woosh.NAME, 'buildtime', 1069, 13, 1069, 22), woosh.Token(woosh.OP, ':', 1069, 22, 1069, 23), woosh.Token(woosh.NEWLINE, '\r\n', 1069, 23, 1070, 0), woosh.Token(woosh.INDENT, ' ', 1070, 0, 1070, 12), woosh.Token(woosh.NAME, 'builddate', 1070, 12, 1070, 21), woosh.Token(woosh.OP, '=', 1070, 22, 1070, 23), woosh.Token(woosh.NAME, 'builddate', 1070, 24, 1070, 33), woosh.Token(woosh.OP, '+', 1070, 34, 1070, 35), woosh.Token(woosh.STRING, "' '", 1070, 36, 1070, 39), woosh.Token(woosh.OP, '+', 1070, 40, 1070, 41), woosh.Token(woosh.NAME, 'buildtime', 1070, 42, 1070, 51), woosh.Token(woosh.NEWLINE, '\r\n', 1070, 51, 1071, 0), woosh.Token(woosh.DEDENT, ' ', 1072, 0, 1072, 4), woosh.Token(woosh.DEDENT, '', 1072, 4, 1072, 4), woosh.Token(woosh.NAME, 'if', 1072, 4, 1072, 6), woosh.Token(woosh.NAME, 'hasattr', 1072, 7, 1072, 14), woosh.Token(woosh.OP, '(', 1072, 14, 1072, 15), woosh.Token(woosh.NAME, 'sys', 1072, 15, 1072, 18), woosh.Token(woosh.OP, ',', 1072, 18, 1072, 19), woosh.Token(woosh.STRING, "'_git'", 1072, 20, 1072, 26), woosh.Token(woosh.OP, ')', 1072, 26, 1072, 27), woosh.Token(woosh.OP, ':', 1072, 27, 1072, 28), woosh.Token(woosh.NEWLINE, '\r\n', 1072, 28, 1073, 0), woosh.Token(woosh.INDENT, ' ', 1073, 0, 1073, 8), woosh.Token(woosh.NAME, '_', 1073, 8, 1073, 9), woosh.Token(woosh.OP, ',', 1073, 9, 1073, 10), woosh.Token(woosh.NAME, 'branch', 1073, 11, 1073, 17), woosh.Token(woosh.OP, ',', 1073, 17, 1073, 18), woosh.Token(woosh.NAME, 'revision', 1073, 19, 1073, 27), woosh.Token(woosh.OP, '=', 1073, 28, 1073, 29), woosh.Token(woosh.NAME, 'sys', 1073, 30, 1073, 33), woosh.Token(woosh.OP, '.', 1073, 33, 1073, 34), woosh.Token(woosh.NAME, '_git', 1073, 34, 1073, 38), woosh.Token(woosh.NEWLINE, '\r\n', 1073, 38, 1074, 0), woosh.Token(woosh.DEDENT, ' ', 1074, 0, 1074, 4), woosh.Token(woosh.NAME, 'elif', 1074, 4, 1074, 8), woosh.Token(woosh.NAME, 'hasattr', 1074, 9, 1074, 16), woosh.Token(woosh.OP, '(', 1074, 16, 1074, 17), woosh.Token(woosh.NAME, 'sys', 1074, 17, 1074, 20), woosh.Token(woosh.OP, ',', 1074, 20, 1074, 21), woosh.Token(woosh.STRING, "'_mercurial'", 1074, 22, 1074, 34), woosh.Token(woosh.OP, ')', 1074, 34, 1074, 35), woosh.Token(woosh.OP, ':', 1074, 35, 1074, 36), woosh.Token(woosh.NEWLINE, '\r\n', 1074, 36, 1075, 0), woosh.Token(woosh.INDENT, ' ', 1075, 0, 1075, 8), woosh.Token(woosh.NAME, '_', 1075, 8, 1075, 9), woosh.Token(woosh.OP, ',', 1075, 9, 1075, 10), woosh.Token(woosh.NAME, 'branch', 1075, 11, 1075, 17), woosh.Token(woosh.OP, ',', 1075, 17, 1075, 18), woosh.Token(woosh.NAME, 'revision', 1075, 19, 1075, 27), woosh.Token(woosh.OP, '=', 1075, 28, 1075, 29), woosh.Token(woosh.NAME, 'sys', 1075, 30, 1075, 33), woosh.Token(woosh.OP, '.', 1075, 33, 1075, 34), woosh.Token(woosh.NAME, '_mercurial', 1075, 34, 1075, 44), woosh.Token(woosh.NEWLINE, '\r\n', 1075, 44, 1076, 0), woosh.Token(woosh.DEDENT, ' ', 1076, 0, 1076, 4), woosh.Token(woosh.NAME, 'else', 1076, 4, 1076, 8), woosh.Token(woosh.OP, ':', 1076, 8, 1076, 9), woosh.Token(woosh.NEWLINE, '\r\n', 1076, 9, 1077, 0), woosh.Token(woosh.INDENT, ' ', 1077, 0, 1077, 8), woosh.Token(woosh.NAME, 'branch', 1077, 8, 1077, 14), woosh.Token(woosh.OP, '=', 1077, 15, 1077, 16), woosh.Token(woosh.STRING, "''", 1077, 17, 1077, 19), woosh.Token(woosh.NEWLINE, '\r\n', 1077, 19, 1078, 0), woosh.Token(woosh.NAME, 'revision', 1078, 8, 1078, 16), woosh.Token(woosh.OP, '=', 1078, 17, 1078, 18), woosh.Token(woosh.STRING, "''", 1078, 19, 1078, 21), woosh.Token(woosh.NEWLINE, '\r\n', 1078, 21, 1079, 0), woosh.Token(woosh.COMMENT, '# Add the patchlevel version if missing', 1080, 4, 1080, 43), woosh.Token(woosh.DEDENT, ' ', 1081, 0, 1081, 4), woosh.Token(woosh.NAME, 'l', 1081, 4, 1081, 5), woosh.Token(woosh.OP, '=', 1081, 6, 1081, 7), woosh.Token(woosh.NAME, 'version', 1081, 8, 1081, 15), woosh.Token(woosh.OP, '.', 1081, 15, 1081, 16), woosh.Token(woosh.NAME, 'split', 1081, 16, 1081, 21), woosh.Token(woosh.OP, '(', 1081, 21, 1081, 22), woosh.Token(woosh.STRING, "'.'", 1081, 22, 1081, 25), woosh.Token(woosh.OP, ')', 1081, 25, 1081, 26), woosh.Token(woosh.NEWLINE, '\r\n', 1081, 26, 1082, 0), woosh.Token(woosh.NAME, 'if', 1082, 4, 1082, 6), woosh.Token(woosh.NAME, 'len', 1082, 7, 1082, 10), woosh.Token(woosh.OP, '(', 1082, 10, 1082, 11), woosh.Token(woosh.NAME, 'l', 1082, 11, 1082, 12), woosh.Token(woosh.OP, ')', 1082, 12, 1082, 13), woosh.Token(woosh.OP, '==', 1082, 14, 1082, 16), woosh.Token(woosh.NUMBER, '2', 1082, 17, 1082, 18), woosh.Token(woosh.OP, ':', 1082, 18, 1082, 19), woosh.Token(woosh.NEWLINE, '\r\n', 1082, 19, 1083, 0), woosh.Token(woosh.INDENT, ' ', 1083, 0, 1083, 8), woosh.Token(woosh.NAME, 'l', 1083, 8, 1083, 9), woosh.Token(woosh.OP, '.', 1083, 9, 1083, 10), woosh.Token(woosh.NAME, 'append', 1083, 10, 1083, 16), woosh.Token(woosh.OP, '(', 1083, 16, 1083, 17), woosh.Token(woosh.STRING, "'0'", 1083, 17, 1083, 20), woosh.Token(woosh.OP, ')', 1083, 20, 1083, 21), woosh.Token(woosh.NEWLINE, '\r\n', 1083, 21, 1084, 0), woosh.Token(woosh.NAME, 'version', 1084, 8, 1084, 15), woosh.Token(woosh.OP, '=', 1084, 16, 1084, 17), woosh.Token(woosh.STRING, "'.'", 1084, 18, 1084, 21), woosh.Token(woosh.OP, '.', 1084, 21, 1084, 22), woosh.Token(woosh.NAME, 'join', 1084, 22, 1084, 26), woosh.Token(woosh.OP, '(', 1084, 26, 1084, 27), woosh.Token(woosh.NAME, 'l', 1084, 27, 1084, 28), woosh.Token(woosh.OP, ')', 1084, 28, 1084, 29), woosh.Token(woosh.NEWLINE, '\r\n', 1084, 29, 1085, 0), woosh.Token(woosh.COMMENT, '# Build and cache the result', 1086, 4, 1086, 32), woosh.Token(woosh.DEDENT, ' ', 1087, 0, 1087, 4), woosh.Token(woosh.NAME, 'result', 1087, 4, 1087, 10), woosh.Token(woosh.OP, '=', 1087, 11, 1087, 12), woosh.Token(woosh.OP, '(', 1087, 13, 1087, 14), woosh.Token(woosh.NAME, 'name', 1087, 14, 1087, 18), woosh.Token(woosh.OP, ',', 1087, 18, 1087, 19), woosh.Token(woosh.NAME, 'version', 1087, 20, 1087, 27), woosh.Token(woosh.OP, ',', 1087, 27, 1087, 28), woosh.Token(woosh.NAME, 'branch', 1087, 29, 1087, 35), woosh.Token(woosh.OP, ',', 1087, 35, 1087, 36), woosh.Token(woosh.NAME, 'revision', 1087, 37, 1087, 45), woosh.Token(woosh.OP, ',', 1087, 45, 1087, 46), woosh.Token(woosh.NAME, 'buildno', 1087, 47, 1087, 54), woosh.Token(woosh.OP, ',', 1087, 54, 1087, 55), woosh.Token(woosh.NAME, 'builddate', 1087, 56, 1087, 65), woosh.Token(woosh.OP, ',', 1087, 65, 1087, 66), woosh.Token(woosh.NAME, 'compiler', 1087, 67, 1087, 75), woosh.Token(woosh.OP, ')', 1087, 75, 1087, 76), woosh.Token(woosh.NEWLINE, '\r\n', 1087, 76, 1088, 0), woosh.Token(woosh.NAME, '_sys_version_cache', 1088, 4, 1088, 22), woosh.Token(woosh.OP, '[', 1088, 22, 1088, 23), woosh.Token(woosh.NAME, 'sys_version', 1088, 23, 1088, 34), woosh.Token(woosh.OP, ']', 1088, 34, 1088, 35), woosh.Token(woosh.OP, '=', 1088, 36, 1088, 37), woosh.Token(woosh.NAME, 'result', 1088, 38, 1088, 44), woosh.Token(woosh.NEWLINE, '\r\n', 1088, 44, 1089, 0), woosh.Token(woosh.NAME, 'return', 1089, 4, 1089, 10), woosh.Token(woosh.NAME, 'result', 1089, 11, 1089, 17), woosh.Token(woosh.NEWLINE, '\r\n', 1089, 17, 1090, 0), woosh.Token(woosh.DEDENT, '', 1091, 0, 1091, 0), woosh.Token(woosh.NAME, 'def', 1091, 0, 1091, 3), woosh.Token(woosh.NAME, 'python_implementation', 1091, 4, 1091, 25), woosh.Token(woosh.OP, '(', 1091, 25, 1091, 26), woosh.Token(woosh.OP, ')', 1091, 26, 1091, 27), woosh.Token(woosh.OP, ':', 1091, 27, 1091, 28), woosh.Token(woosh.NEWLINE, '\r\n', 1091, 28, 1092, 0), woosh.Token(woosh.INDENT, ' ', 1093, 0, 1093, 4), woosh.Token(woosh.STRING, '""" Returns a string identifying the Python implementation.\r\n\r\n Currently, the following implementations are identified:\r\n \'CPython\' (C implementation of Python),\r\n \'IronPython\' (.NET implementation of Python),\r\n \'Jython\' (Java implementation of Python),\r\n \'PyPy\' (Python implementation of Python).\r\n\r\n """', 1093, 4, 1101, 7), woosh.Token(woosh.NEWLINE, '\r\n', 1101, 7, 1102, 0), woosh.Token(woosh.NAME, 'return', 1102, 4, 1102, 10), woosh.Token(woosh.NAME, '_sys_version', 1102, 11, 1102, 23), woosh.Token(woosh.OP, '(', 1102, 23, 1102, 24), woosh.Token(woosh.OP, ')', 1102, 24, 1102, 25), woosh.Token(woosh.OP, '[', 1102, 25, 1102, 26), woosh.Token(woosh.NUMBER, '0', 1102, 26, 1102, 27), woosh.Token(woosh.OP, ']', 1102, 27, 1102, 28), woosh.Token(woosh.NEWLINE, '\r\n', 1102, 28, 1103, 0), woosh.Token(woosh.DEDENT, '', 1104, 0, 1104, 0), woosh.Token(woosh.NAME, 'def', 1104, 0, 1104, 3), woosh.Token(woosh.NAME, 'python_version', 1104, 4, 1104, 18), woosh.Token(woosh.OP, '(', 1104, 18, 1104, 19), woosh.Token(woosh.OP, ')', 1104, 19, 1104, 20), woosh.Token(woosh.OP, ':', 1104, 20, 1104, 21), woosh.Token(woosh.NEWLINE, '\r\n', 1104, 21, 1105, 0), woosh.Token(woosh.INDENT, ' ', 1106, 0, 1106, 4), woosh.Token(woosh.STRING, '""" Returns the Python version as string \'major.minor.patchlevel\'\r\n\r\n Note that unlike the Python sys.version, the returned value\r\n will always include the patchlevel (it defaults to 0).\r\n\r\n """', 1106, 4, 1111, 7), woosh.Token(woosh.NEWLINE, '\r\n', 1111, 7, 1112, 0), woosh.Token(woosh.NAME, 'return', 1112, 4, 1112, 10), woosh.Token(woosh.NAME, '_sys_version', 1112, 11, 1112, 23), woosh.Token(woosh.OP, '(', 1112, 23, 1112, 24), woosh.Token(woosh.OP, ')', 1112, 24, 1112, 25), woosh.Token(woosh.OP, '[', 1112, 25, 1112, 26), woosh.Token(woosh.NUMBER, '1', 1112, 26, 1112, 27), woosh.Token(woosh.OP, ']', 1112, 27, 1112, 28), woosh.Token(woosh.NEWLINE, '\r\n', 1112, 28, 1113, 0), woosh.Token(woosh.DEDENT, '', 1114, 0, 1114, 0), woosh.Token(woosh.NAME, 'def', 1114, 0, 1114, 3), woosh.Token(woosh.NAME, 'python_version_tuple', 1114, 4, 1114, 24), woosh.Token(woosh.OP, '(', 1114, 24, 1114, 25), woosh.Token(woosh.OP, ')', 1114, 25, 1114, 26), woosh.Token(woosh.OP, ':', 1114, 26, 1114, 27), woosh.Token(woosh.NEWLINE, '\r\n', 1114, 27, 1115, 0), woosh.Token(woosh.INDENT, ' ', 1116, 0, 1116, 4), woosh.Token(woosh.STRING, '""" Returns the Python version as tuple (major, minor, patchlevel)\r\n of strings.\r\n\r\n Note that unlike the Python sys.version, the returned value\r\n will always include the patchlevel (it defaults to 0).\r\n\r\n """', 1116, 4, 1122, 7), woosh.Token(woosh.NEWLINE, '\r\n', 1122, 7, 1123, 0), woosh.Token(woosh.NAME, 'return', 1123, 4, 1123, 10), woosh.Token(woosh.NAME, 'tuple', 1123, 11, 1123, 16), woosh.Token(woosh.OP, '(', 1123, 16, 1123, 17), woosh.Token(woosh.NAME, '_sys_version', 1123, 17, 1123, 29), woosh.Token(woosh.OP, '(', 1123, 29, 1123, 30), woosh.Token(woosh.OP, ')', 1123, 30, 1123, 31), woosh.Token(woosh.OP, '[', 1123, 31, 1123, 32), woosh.Token(woosh.NUMBER, '1', 1123, 32, 1123, 33), woosh.Token(woosh.OP, ']', 1123, 33, 1123, 34), woosh.Token(woosh.OP, '.', 1123, 34, 1123, 35), woosh.Token(woosh.NAME, 'split', 1123, 35, 1123, 40), woosh.Token(woosh.OP, '(', 1123, 40, 1123, 41), woosh.Token(woosh.STRING, "'.'", 1123, 41, 1123, 44), woosh.Token(woosh.OP, ')', 1123, 44, 1123, 45), woosh.Token(woosh.OP, ')', 1123, 45, 1123, 46), woosh.Token(woosh.NEWLINE, '\r\n', 1123, 46, 1124, 0), woosh.Token(woosh.DEDENT, '', 1125, 0, 1125, 0), woosh.Token(woosh.NAME, 'def', 1125, 0, 1125, 3), woosh.Token(woosh.NAME, 'python_branch', 1125, 4, 1125, 17), woosh.Token(woosh.OP, '(', 1125, 17, 1125, 18), woosh.Token(woosh.OP, ')', 1125, 18, 1125, 19), woosh.Token(woosh.OP, ':', 1125, 19, 1125, 20), woosh.Token(woosh.NEWLINE, '\r\n', 1125, 20, 1126, 0), woosh.Token(woosh.INDENT, ' ', 1127, 0, 1127, 4), woosh.Token(woosh.STRING, '""" Returns a string identifying the Python implementation\r\n branch.\r\n\r\n For CPython this is the SCM branch from which the\r\n Python binary was built.\r\n\r\n If not available, an empty string is returned.\r\n\r\n """', 1127, 4, 1135, 7), woosh.Token(woosh.NEWLINE, '\r\n', 1135, 7, 1136, 0), woosh.Token(woosh.NAME, 'return', 1137, 4, 1137, 10), woosh.Token(woosh.NAME, '_sys_version', 1137, 11, 1137, 23), woosh.Token(woosh.OP, '(', 1137, 23, 1137, 24), woosh.Token(woosh.OP, ')', 1137, 24, 1137, 25), woosh.Token(woosh.OP, '[', 1137, 25, 1137, 26), woosh.Token(woosh.NUMBER, '2', 1137, 26, 1137, 27), woosh.Token(woosh.OP, ']', 1137, 27, 1137, 28), woosh.Token(woosh.NEWLINE, '\r\n', 1137, 28, 1138, 0), woosh.Token(woosh.DEDENT, '', 1139, 0, 1139, 0), woosh.Token(woosh.NAME, 'def', 1139, 0, 1139, 3), woosh.Token(woosh.NAME, 'python_revision', 1139, 4, 1139, 19), woosh.Token(woosh.OP, '(', 1139, 19, 1139, 20), woosh.Token(woosh.OP, ')', 1139, 20, 1139, 21), woosh.Token(woosh.OP, ':', 1139, 21, 1139, 22), woosh.Token(woosh.NEWLINE, '\r\n', 1139, 22, 1140, 0), woosh.Token(woosh.INDENT, ' ', 1141, 0, 1141, 4), woosh.Token(woosh.STRING, '""" Returns a string identifying the Python implementation\r\n revision.\r\n\r\n For CPython this is the SCM revision from which the\r\n Python binary was built.\r\n\r\n If not available, an empty string is returned.\r\n\r\n """', 1141, 4, 1149, 7), woosh.Token(woosh.NEWLINE, '\r\n', 1149, 7, 1150, 0), woosh.Token(woosh.NAME, 'return', 1150, 4, 1150, 10), woosh.Token(woosh.NAME, '_sys_version', 1150, 11, 1150, 23), woosh.Token(woosh.OP, '(', 1150, 23, 1150, 24), woosh.Token(woosh.OP, ')', 1150, 24, 1150, 25), woosh.Token(woosh.OP, '[', 1150, 25, 1150, 26), woosh.Token(woosh.NUMBER, '3', 1150, 26, 1150, 27), woosh.Token(woosh.OP, ']', 1150, 27, 1150, 28), woosh.Token(woosh.NEWLINE, '\r\n', 1150, 28, 1151, 0), woosh.Token(woosh.DEDENT, '', 1152, 0, 1152, 0), woosh.Token(woosh.NAME, 'def', 1152, 0, 1152, 3), woosh.Token(woosh.NAME, 'python_build', 1152, 4, 1152, 16), woosh.Token(woosh.OP, '(', 1152, 16, 1152, 17), woosh.Token(woosh.OP, ')', 1152, 17, 1152, 18), woosh.Token(woosh.OP, ':', 1152, 18, 1152, 19), woosh.Token(woosh.NEWLINE, '\r\n', 1152, 19, 1153, 0), woosh.Token(woosh.INDENT, ' ', 1154, 0, 1154, 4), woosh.Token(woosh.STRING, '""" Returns a tuple (buildno, builddate) stating the Python\r\n build number and date as strings.\r\n\r\n """', 1154, 4, 1157, 7), woosh.Token(woosh.NEWLINE, '\r\n', 1157, 7, 1158, 0), woosh.Token(woosh.NAME, 'return', 1158, 4, 1158, 10), woosh.Token(woosh.NAME, '_sys_version', 1158, 11, 1158, 23), woosh.Token(woosh.OP, '(', 1158, 23, 1158, 24), woosh.Token(woosh.OP, ')', 1158, 24, 1158, 25), woosh.Token(woosh.OP, '[', 1158, 25, 1158, 26), woosh.Token(woosh.NUMBER, '4', 1158, 26, 1158, 27), woosh.Token(woosh.OP, ':', 1158, 27, 1158, 28), woosh.Token(woosh.NUMBER, '6', 1158, 28, 1158, 29), woosh.Token(woosh.OP, ']', 1158, 29, 1158, 30), woosh.Token(woosh.NEWLINE, '\r\n', 1158, 30, 1159, 0), woosh.Token(woosh.DEDENT, '', 1160, 0, 1160, 0), woosh.Token(woosh.NAME, 'def', 1160, 0, 1160, 3), woosh.Token(woosh.NAME, 'python_compiler', 1160, 4, 1160, 19), woosh.Token(woosh.OP, '(', 1160, 19, 1160, 20), woosh.Token(woosh.OP, ')', 1160, 20, 1160, 21), woosh.Token(woosh.OP, ':', 1160, 21, 1160, 22), woosh.Token(woosh.NEWLINE, '\r\n', 1160, 22, 1161, 0), woosh.Token(woosh.INDENT, ' ', 1162, 0, 1162, 4), woosh.Token(woosh.STRING, '""" Returns a string identifying the compiler used for compiling\r\n Python.\r\n\r\n """', 1162, 4, 1165, 7), woosh.Token(woosh.NEWLINE, '\r\n', 1165, 7, 1166, 0), woosh.Token(woosh.NAME, 'return', 1166, 4, 1166, 10), woosh.Token(woosh.NAME, '_sys_version', 1166, 11, 1166, 23), woosh.Token(woosh.OP, '(', 1166, 23, 1166, 24), woosh.Token(woosh.OP, ')', 1166, 24, 1166, 25), woosh.Token(woosh.OP, '[', 1166, 25, 1166, 26), woosh.Token(woosh.NUMBER, '6', 1166, 26, 1166, 27), woosh.Token(woosh.OP, ']', 1166, 27, 1166, 28), woosh.Token(woosh.NEWLINE, '\r\n', 1166, 28, 1167, 0), woosh.Token(woosh.COMMENT, '### The Opus Magnum of platform strings :-)', 1168, 0, 1168, 43), woosh.Token(woosh.DEDENT, '', 1170, 0, 1170, 0), woosh.Token(woosh.NAME, '_platform_cache', 1170, 0, 1170, 15), woosh.Token(woosh.OP, '=', 1170, 16, 1170, 17), woosh.Token(woosh.OP, '{', 1170, 18, 1170, 19), woosh.Token(woosh.OP, '}', 1170, 19, 1170, 20), woosh.Token(woosh.NEWLINE, '\r\n', 1170, 20, 1171, 0), woosh.Token(woosh.NAME, 'def', 1172, 0, 1172, 3), woosh.Token(woosh.NAME, 'platform', 1172, 4, 1172, 12), woosh.Token(woosh.OP, '(', 1172, 12, 1172, 13), woosh.Token(woosh.NAME, 'aliased', 1172, 13, 1172, 20), woosh.Token(woosh.OP, '=', 1172, 20, 1172, 21), woosh.Token(woosh.NUMBER, '0', 1172, 21, 1172, 22), woosh.Token(woosh.OP, ',', 1172, 22, 1172, 23), woosh.Token(woosh.NAME, 'terse', 1172, 24, 1172, 29), woosh.Token(woosh.OP, '=', 1172, 29, 1172, 30), woosh.Token(woosh.NUMBER, '0', 1172, 30, 1172, 31), woosh.Token(woosh.OP, ')', 1172, 31, 1172, 32), woosh.Token(woosh.OP, ':', 1172, 32, 1172, 33), woosh.Token(woosh.NEWLINE, '\r\n', 1172, 33, 1173, 0), woosh.Token(woosh.INDENT, ' ', 1174, 0, 1174, 4), woosh.Token(woosh.STRING, '""" Returns a single string identifying the underlying platform\r\n with as much useful information as possible (but no more :).\r\n\r\n The output is intended to be human readable rather than\r\n machine parseable. It may look different on different\r\n platforms and this is intended.\r\n\r\n If "aliased" is true, the function will use aliases for\r\n various platforms that report system names which differ from\r\n their common names, e.g. SunOS will be reported as\r\n Solaris. The system_alias() function is used to implement\r\n this.\r\n\r\n Setting terse to true causes the function to return only the\r\n absolute minimum information needed to identify the platform.\r\n\r\n """', 1174, 4, 1190, 7), woosh.Token(woosh.NEWLINE, '\r\n', 1190, 7, 1191, 0), woosh.Token(woosh.NAME, 'result', 1191, 4, 1191, 10), woosh.Token(woosh.OP, '=', 1191, 11, 1191, 12), woosh.Token(woosh.NAME, '_platform_cache', 1191, 13, 1191, 28), woosh.Token(woosh.OP, '.', 1191, 28, 1191, 29), woosh.Token(woosh.NAME, 'get', 1191, 29, 1191, 32), woosh.Token(woosh.OP, '(', 1191, 32, 1191, 33), woosh.Token(woosh.OP, '(', 1191, 33, 1191, 34), woosh.Token(woosh.NAME, 'aliased', 1191, 34, 1191, 41), woosh.Token(woosh.OP, ',', 1191, 41, 1191, 42), woosh.Token(woosh.NAME, 'terse', 1191, 43, 1191, 48), woosh.Token(woosh.OP, ')', 1191, 48, 1191, 49), woosh.Token(woosh.OP, ',', 1191, 49, 1191, 50), woosh.Token(woosh.NAME, 'None', 1191, 51, 1191, 55), woosh.Token(woosh.OP, ')', 1191, 55, 1191, 56), woosh.Token(woosh.NEWLINE, '\r\n', 1191, 56, 1192, 0), woosh.Token(woosh.NAME, 'if', 1192, 4, 1192, 6), woosh.Token(woosh.NAME, 'result', 1192, 7, 1192, 13), woosh.Token(woosh.NAME, 'is', 1192, 14, 1192, 16), woosh.Token(woosh.NAME, 'not', 1192, 17, 1192, 20), woosh.Token(woosh.NAME, 'None', 1192, 21, 1192, 25), woosh.Token(woosh.OP, ':', 1192, 25, 1192, 26), woosh.Token(woosh.NEWLINE, '\r\n', 1192, 26, 1193, 0), woosh.Token(woosh.INDENT, ' ', 1193, 0, 1193, 8), woosh.Token(woosh.NAME, 'return', 1193, 8, 1193, 14), woosh.Token(woosh.NAME, 'result', 1193, 15, 1193, 21), woosh.Token(woosh.NEWLINE, '\r\n', 1193, 21, 1194, 0), woosh.Token(woosh.COMMENT, '# Get uname information and then apply platform specific cosmetics', 1195, 4, 1195, 70), woosh.Token(woosh.COMMENT, '# to it...', 1196, 4, 1196, 14), woosh.Token(woosh.DEDENT, ' ', 1197, 0, 1197, 4), woosh.Token(woosh.NAME, 'system', 1197, 4, 1197, 10), woosh.Token(woosh.OP, ',', 1197, 10, 1197, 11), woosh.Token(woosh.NAME, 'node', 1197, 12, 1197, 16), woosh.Token(woosh.OP, ',', 1197, 16, 1197, 17), woosh.Token(woosh.NAME, 'release', 1197, 18, 1197, 25), woosh.Token(woosh.OP, ',', 1197, 25, 1197, 26), woosh.Token(woosh.NAME, 'version', 1197, 27, 1197, 34), woosh.Token(woosh.OP, ',', 1197, 34, 1197, 35), woosh.Token(woosh.NAME, 'machine', 1197, 36, 1197, 43), woosh.Token(woosh.OP, ',', 1197, 43, 1197, 44), woosh.Token(woosh.NAME, 'processor', 1197, 45, 1197, 54), woosh.Token(woosh.OP, '=', 1197, 55, 1197, 56), woosh.Token(woosh.NAME, 'uname', 1197, 57, 1197, 62), woosh.Token(woosh.OP, '(', 1197, 62, 1197, 63), woosh.Token(woosh.OP, ')', 1197, 63, 1197, 64), woosh.Token(woosh.NEWLINE, '\r\n', 1197, 64, 1198, 0), woosh.Token(woosh.NAME, 'if', 1198, 4, 1198, 6), woosh.Token(woosh.NAME, 'machine', 1198, 7, 1198, 14), woosh.Token(woosh.OP, '==', 1198, 15, 1198, 17), woosh.Token(woosh.NAME, 'processor', 1198, 18, 1198, 27), woosh.Token(woosh.OP, ':', 1198, 27, 1198, 28), woosh.Token(woosh.NEWLINE, '\r\n', 1198, 28, 1199, 0), woosh.Token(woosh.INDENT, ' ', 1199, 0, 1199, 8), woosh.Token(woosh.NAME, 'processor', 1199, 8, 1199, 17), woosh.Token(woosh.OP, '=', 1199, 18, 1199, 19), woosh.Token(woosh.STRING, "''", 1199, 20, 1199, 22), woosh.Token(woosh.NEWLINE, '\r\n', 1199, 22, 1200, 0), woosh.Token(woosh.DEDENT, ' ', 1200, 0, 1200, 4), woosh.Token(woosh.NAME, 'if', 1200, 4, 1200, 6), woosh.Token(woosh.NAME, 'aliased', 1200, 7, 1200, 14), woosh.Token(woosh.OP, ':', 1200, 14, 1200, 15), woosh.Token(woosh.NEWLINE, '\r\n', 1200, 15, 1201, 0), woosh.Token(woosh.INDENT, ' ', 1201, 0, 1201, 8), woosh.Token(woosh.NAME, 'system', 1201, 8, 1201, 14), woosh.Token(woosh.OP, ',', 1201, 14, 1201, 15), woosh.Token(woosh.NAME, 'release', 1201, 16, 1201, 23), woosh.Token(woosh.OP, ',', 1201, 23, 1201, 24), woosh.Token(woosh.NAME, 'version', 1201, 25, 1201, 32), woosh.Token(woosh.OP, '=', 1201, 33, 1201, 34), woosh.Token(woosh.NAME, 'system_alias', 1201, 35, 1201, 47), woosh.Token(woosh.OP, '(', 1201, 47, 1201, 48), woosh.Token(woosh.NAME, 'system', 1201, 48, 1201, 54), woosh.Token(woosh.OP, ',', 1201, 54, 1201, 55), woosh.Token(woosh.NAME, 'release', 1201, 56, 1201, 63), woosh.Token(woosh.OP, ',', 1201, 63, 1201, 64), woosh.Token(woosh.NAME, 'version', 1201, 65, 1201, 72), woosh.Token(woosh.OP, ')', 1201, 72, 1201, 73), woosh.Token(woosh.NEWLINE, '\r\n', 1201, 73, 1202, 0), woosh.Token(woosh.DEDENT, ' ', 1203, 0, 1203, 4), woosh.Token(woosh.NAME, 'if', 1203, 4, 1203, 6), woosh.Token(woosh.NAME, 'system', 1203, 7, 1203, 13), woosh.Token(woosh.OP, '==', 1203, 14, 1203, 16), woosh.Token(woosh.STRING, "'Darwin'", 1203, 17, 1203, 25), woosh.Token(woosh.OP, ':', 1203, 25, 1203, 26), woosh.Token(woosh.NEWLINE, '\r\n', 1203, 26, 1204, 0), woosh.Token(woosh.COMMENT, '# macOS (darwin kernel)', 1204, 8, 1204, 31), woosh.Token(woosh.INDENT, ' ', 1205, 0, 1205, 8), woosh.Token(woosh.NAME, 'macos_release', 1205, 8, 1205, 21), woosh.Token(woosh.OP, '=', 1205, 22, 1205, 23), woosh.Token(woosh.NAME, 'mac_ver', 1205, 24, 1205, 31), woosh.Token(woosh.OP, '(', 1205, 31, 1205, 32), woosh.Token(woosh.OP, ')', 1205, 32, 1205, 33), woosh.Token(woosh.OP, '[', 1205, 33, 1205, 34), woosh.Token(woosh.NUMBER, '0', 1205, 34, 1205, 35), woosh.Token(woosh.OP, ']', 1205, 35, 1205, 36), woosh.Token(woosh.NEWLINE, '\r\n', 1205, 36, 1206, 0), woosh.Token(woosh.NAME, 'if', 1206, 8, 1206, 10), woosh.Token(woosh.NAME, 'macos_release', 1206, 11, 1206, 24), woosh.Token(woosh.OP, ':', 1206, 24, 1206, 25), woosh.Token(woosh.NEWLINE, '\r\n', 1206, 25, 1207, 0), woosh.Token(woosh.INDENT, ' ', 1207, 0, 1207, 12), woosh.Token(woosh.NAME, 'system', 1207, 12, 1207, 18), woosh.Token(woosh.OP, '=', 1207, 19, 1207, 20), woosh.Token(woosh.STRING, "'macOS'", 1207, 21, 1207, 28), woosh.Token(woosh.NEWLINE, '\r\n', 1207, 28, 1208, 0), woosh.Token(woosh.NAME, 'release', 1208, 12, 1208, 19), woosh.Token(woosh.OP, '=', 1208, 20, 1208, 21), woosh.Token(woosh.NAME, 'macos_release', 1208, 22, 1208, 35), woosh.Token(woosh.NEWLINE, '\r\n', 1208, 35, 1209, 0), woosh.Token(woosh.DEDENT, ' ', 1210, 0, 1210, 4), woosh.Token(woosh.DEDENT, '', 1210, 4, 1210, 4), woosh.Token(woosh.NAME, 'if', 1210, 4, 1210, 6), woosh.Token(woosh.NAME, 'system', 1210, 7, 1210, 13), woosh.Token(woosh.OP, '==', 1210, 14, 1210, 16), woosh.Token(woosh.STRING, "'Windows'", 1210, 17, 1210, 26), woosh.Token(woosh.OP, ':', 1210, 26, 1210, 27), woosh.Token(woosh.NEWLINE, '\r\n', 1210, 27, 1211, 0), woosh.Token(woosh.COMMENT, '# MS platforms', 1211, 8, 1211, 22), woosh.Token(woosh.INDENT, ' ', 1212, 0, 1212, 8), woosh.Token(woosh.NAME, 'rel', 1212, 8, 1212, 11), woosh.Token(woosh.OP, ',', 1212, 11, 1212, 12), woosh.Token(woosh.NAME, 'vers', 1212, 13, 1212, 17), woosh.Token(woosh.OP, ',', 1212, 17, 1212, 18), woosh.Token(woosh.NAME, 'csd', 1212, 19, 1212, 22), woosh.Token(woosh.OP, ',', 1212, 22, 1212, 23), woosh.Token(woosh.NAME, 'ptype', 1212, 24, 1212, 29), woosh.Token(woosh.OP, '=', 1212, 30, 1212, 31), woosh.Token(woosh.NAME, 'win32_ver', 1212, 32, 1212, 41), woosh.Token(woosh.OP, '(', 1212, 41, 1212, 42), woosh.Token(woosh.NAME, 'version', 1212, 42, 1212, 49), woosh.Token(woosh.OP, ')', 1212, 49, 1212, 50), woosh.Token(woosh.NEWLINE, '\r\n', 1212, 50, 1213, 0), woosh.Token(woosh.NAME, 'if', 1213, 8, 1213, 10), woosh.Token(woosh.NAME, 'terse', 1213, 11, 1213, 16), woosh.Token(woosh.OP, ':', 1213, 16, 1213, 17), woosh.Token(woosh.NEWLINE, '\r\n', 1213, 17, 1214, 0), woosh.Token(woosh.INDENT, ' ', 1214, 0, 1214, 12), woosh.Token(woosh.NAME, 'platform', 1214, 12, 1214, 20), woosh.Token(woosh.OP, '=', 1214, 21, 1214, 22), woosh.Token(woosh.NAME, '_platform', 1214, 23, 1214, 32), woosh.Token(woosh.OP, '(', 1214, 32, 1214, 33), woosh.Token(woosh.NAME, 'system', 1214, 33, 1214, 39), woosh.Token(woosh.OP, ',', 1214, 39, 1214, 40), woosh.Token(woosh.NAME, 'release', 1214, 41, 1214, 48), woosh.Token(woosh.OP, ')', 1214, 48, 1214, 49), woosh.Token(woosh.NEWLINE, '\r\n', 1214, 49, 1215, 0), woosh.Token(woosh.DEDENT, ' ', 1215, 0, 1215, 8), woosh.Token(woosh.NAME, 'else', 1215, 8, 1215, 12), woosh.Token(woosh.OP, ':', 1215, 12, 1215, 13), woosh.Token(woosh.NEWLINE, '\r\n', 1215, 13, 1216, 0), woosh.Token(woosh.INDENT, ' ', 1216, 0, 1216, 12), woosh.Token(woosh.NAME, 'platform', 1216, 12, 1216, 20), woosh.Token(woosh.OP, '=', 1216, 21, 1216, 22), woosh.Token(woosh.NAME, '_platform', 1216, 23, 1216, 32), woosh.Token(woosh.OP, '(', 1216, 32, 1216, 33), woosh.Token(woosh.NAME, 'system', 1216, 33, 1216, 39), woosh.Token(woosh.OP, ',', 1216, 39, 1216, 40), woosh.Token(woosh.NAME, 'release', 1216, 41, 1216, 48), woosh.Token(woosh.OP, ',', 1216, 48, 1216, 49), woosh.Token(woosh.NAME, 'version', 1216, 50, 1216, 57), woosh.Token(woosh.OP, ',', 1216, 57, 1216, 58), woosh.Token(woosh.NAME, 'csd', 1216, 59, 1216, 62), woosh.Token(woosh.OP, ')', 1216, 62, 1216, 63), woosh.Token(woosh.NEWLINE, '\r\n', 1216, 63, 1217, 0), woosh.Token(woosh.DEDENT, ' ', 1218, 0, 1218, 4), woosh.Token(woosh.DEDENT, '', 1218, 4, 1218, 4), woosh.Token(woosh.NAME, 'elif', 1218, 4, 1218, 8), woosh.Token(woosh.NAME, 'system', 1218, 9, 1218, 15), woosh.Token(woosh.NAME, 'in', 1218, 16, 1218, 18), woosh.Token(woosh.OP, '(', 1218, 19, 1218, 20), woosh.Token(woosh.STRING, "'Linux'", 1218, 20, 1218, 27), woosh.Token(woosh.OP, ',', 1218, 27, 1218, 28), woosh.Token(woosh.OP, ')', 1218, 28, 1218, 29), woosh.Token(woosh.OP, ':', 1218, 29, 1218, 30), woosh.Token(woosh.NEWLINE, '\r\n', 1218, 30, 1219, 0), woosh.Token(woosh.COMMENT, '# check for libc vs. glibc', 1219, 8, 1219, 34), woosh.Token(woosh.INDENT, ' ', 1220, 0, 1220, 8), woosh.Token(woosh.NAME, 'libcname', 1220, 8, 1220, 16), woosh.Token(woosh.OP, ',', 1220, 16, 1220, 17), woosh.Token(woosh.NAME, 'libcversion', 1220, 18, 1220, 29), woosh.Token(woosh.OP, '=', 1220, 30, 1220, 31), woosh.Token(woosh.NAME, 'libc_ver', 1220, 32, 1220, 40), woosh.Token(woosh.OP, '(', 1220, 40, 1220, 41), woosh.Token(woosh.OP, ')', 1220, 41, 1220, 42), woosh.Token(woosh.NEWLINE, '\r\n', 1220, 42, 1221, 0), woosh.Token(woosh.NAME, 'platform', 1221, 8, 1221, 16), woosh.Token(woosh.OP, '=', 1221, 17, 1221, 18), woosh.Token(woosh.NAME, '_platform', 1221, 19, 1221, 28), woosh.Token(woosh.OP, '(', 1221, 28, 1221, 29), woosh.Token(woosh.NAME, 'system', 1221, 29, 1221, 35), woosh.Token(woosh.OP, ',', 1221, 35, 1221, 36), woosh.Token(woosh.NAME, 'release', 1221, 37, 1221, 44), woosh.Token(woosh.OP, ',', 1221, 44, 1221, 45), woosh.Token(woosh.NAME, 'machine', 1221, 46, 1221, 53), woosh.Token(woosh.OP, ',', 1221, 53, 1221, 54), woosh.Token(woosh.NAME, 'processor', 1221, 55, 1221, 64), woosh.Token(woosh.OP, ',', 1221, 64, 1221, 65), woosh.Token(woosh.STRING, "'with'", 1222, 29, 1222, 35), woosh.Token(woosh.OP, ',', 1222, 35, 1222, 36), woosh.Token(woosh.NAME, 'libcname', 1223, 29, 1223, 37), woosh.Token(woosh.OP, '+', 1223, 37, 1223, 38), woosh.Token(woosh.NAME, 'libcversion', 1223, 38, 1223, 49), woosh.Token(woosh.OP, ')', 1223, 49, 1223, 50), woosh.Token(woosh.NEWLINE, '\r\n', 1223, 50, 1224, 0), woosh.Token(woosh.DEDENT, ' ', 1224, 0, 1224, 4), woosh.Token(woosh.NAME, 'elif', 1224, 4, 1224, 8), woosh.Token(woosh.NAME, 'system', 1224, 9, 1224, 15), woosh.Token(woosh.OP, '==', 1224, 16, 1224, 18), woosh.Token(woosh.STRING, "'Java'", 1224, 19, 1224, 25), woosh.Token(woosh.OP, ':', 1224, 25, 1224, 26), woosh.Token(woosh.NEWLINE, '\r\n', 1224, 26, 1225, 0), woosh.Token(woosh.COMMENT, '# Java platforms', 1225, 8, 1225, 24), woosh.Token(woosh.INDENT, ' ', 1226, 0, 1226, 8), woosh.Token(woosh.NAME, 'r', 1226, 8, 1226, 9), woosh.Token(woosh.OP, ',', 1226, 9, 1226, 10), woosh.Token(woosh.NAME, 'v', 1226, 11, 1226, 12), woosh.Token(woosh.OP, ',', 1226, 12, 1226, 13), woosh.Token(woosh.NAME, 'vminfo', 1226, 14, 1226, 20), woosh.Token(woosh.OP, ',', 1226, 20, 1226, 21), woosh.Token(woosh.OP, '(', 1226, 22, 1226, 23), woosh.Token(woosh.NAME, 'os_name', 1226, 23, 1226, 30), woosh.Token(woosh.OP, ',', 1226, 30, 1226, 31), woosh.Token(woosh.NAME, 'os_version', 1226, 32, 1226, 42), woosh.Token(woosh.OP, ',', 1226, 42, 1226, 43), woosh.Token(woosh.NAME, 'os_arch', 1226, 44, 1226, 51), woosh.Token(woosh.OP, ')', 1226, 51, 1226, 52), woosh.Token(woosh.OP, '=', 1226, 53, 1226, 54), woosh.Token(woosh.NAME, 'java_ver', 1226, 55, 1226, 63), woosh.Token(woosh.OP, '(', 1226, 63, 1226, 64), woosh.Token(woosh.OP, ')', 1226, 64, 1226, 65), woosh.Token(woosh.NEWLINE, '\r\n', 1226, 65, 1227, 0), woosh.Token(woosh.NAME, 'if', 1227, 8, 1227, 10), woosh.Token(woosh.NAME, 'terse', 1227, 11, 1227, 16), woosh.Token(woosh.NAME, 'or', 1227, 17, 1227, 19), woosh.Token(woosh.NAME, 'not', 1227, 20, 1227, 23), woosh.Token(woosh.NAME, 'os_name', 1227, 24, 1227, 31), woosh.Token(woosh.OP, ':', 1227, 31, 1227, 32), woosh.Token(woosh.NEWLINE, '\r\n', 1227, 32, 1228, 0), woosh.Token(woosh.INDENT, ' ', 1228, 0, 1228, 12), woosh.Token(woosh.NAME, 'platform', 1228, 12, 1228, 20), woosh.Token(woosh.OP, '=', 1228, 21, 1228, 22), woosh.Token(woosh.NAME, '_platform', 1228, 23, 1228, 32), woosh.Token(woosh.OP, '(', 1228, 32, 1228, 33), woosh.Token(woosh.NAME, 'system', 1228, 33, 1228, 39), woosh.Token(woosh.OP, ',', 1228, 39, 1228, 40), woosh.Token(woosh.NAME, 'release', 1228, 41, 1228, 48), woosh.Token(woosh.OP, ',', 1228, 48, 1228, 49), woosh.Token(woosh.NAME, 'version', 1228, 50, 1228, 57), woosh.Token(woosh.OP, ')', 1228, 57, 1228, 58), woosh.Token(woosh.NEWLINE, '\r\n', 1228, 58, 1229, 0), woosh.Token(woosh.DEDENT, ' ', 1229, 0, 1229, 8), woosh.Token(woosh.NAME, 'else', 1229, 8, 1229, 12), woosh.Token(woosh.OP, ':', 1229, 12, 1229, 13), woosh.Token(woosh.NEWLINE, '\r\n', 1229, 13, 1230, 0), woosh.Token(woosh.INDENT, ' ', 1230, 0, 1230, 12), woosh.Token(woosh.NAME, 'platform', 1230, 12, 1230, 20), woosh.Token(woosh.OP, '=', 1230, 21, 1230, 22), woosh.Token(woosh.NAME, '_platform', 1230, 23, 1230, 32), woosh.Token(woosh.OP, '(', 1230, 32, 1230, 33), woosh.Token(woosh.NAME, 'system', 1230, 33, 1230, 39), woosh.Token(woosh.OP, ',', 1230, 39, 1230, 40), woosh.Token(woosh.NAME, 'release', 1230, 41, 1230, 48), woosh.Token(woosh.OP, ',', 1230, 48, 1230, 49), woosh.Token(woosh.NAME, 'version', 1230, 50, 1230, 57), woosh.Token(woosh.OP, ',', 1230, 57, 1230, 58), woosh.Token(woosh.STRING, "'on'", 1231, 33, 1231, 37), woosh.Token(woosh.OP, ',', 1231, 37, 1231, 38), woosh.Token(woosh.NAME, 'os_name', 1232, 33, 1232, 40), woosh.Token(woosh.OP, ',', 1232, 40, 1232, 41), woosh.Token(woosh.NAME, 'os_version', 1232, 42, 1232, 52), woosh.Token(woosh.OP, ',', 1232, 52, 1232, 53), woosh.Token(woosh.NAME, 'os_arch', 1232, 54, 1232, 61), woosh.Token(woosh.OP, ')', 1232, 61, 1232, 62), woosh.Token(woosh.NEWLINE, '\r\n', 1232, 62, 1233, 0), woosh.Token(woosh.DEDENT, ' ', 1234, 0, 1234, 4), woosh.Token(woosh.DEDENT, '', 1234, 4, 1234, 4), woosh.Token(woosh.NAME, 'else', 1234, 4, 1234, 8), woosh.Token(woosh.OP, ':', 1234, 8, 1234, 9), woosh.Token(woosh.NEWLINE, '\r\n', 1234, 9, 1235, 0), woosh.Token(woosh.COMMENT, '# Generic handler', 1235, 8, 1235, 25), woosh.Token(woosh.INDENT, ' ', 1236, 0, 1236, 8), woosh.Token(woosh.NAME, 'if', 1236, 8, 1236, 10), woosh.Token(woosh.NAME, 'terse', 1236, 11, 1236, 16), woosh.Token(woosh.OP, ':', 1236, 16, 1236, 17), woosh.Token(woosh.NEWLINE, '\r\n', 1236, 17, 1237, 0), woosh.Token(woosh.INDENT, ' ', 1237, 0, 1237, 12), woosh.Token(woosh.NAME, 'platform', 1237, 12, 1237, 20), woosh.Token(woosh.OP, '=', 1237, 21, 1237, 22), woosh.Token(woosh.NAME, '_platform', 1237, 23, 1237, 32), woosh.Token(woosh.OP, '(', 1237, 32, 1237, 33), woosh.Token(woosh.NAME, 'system', 1237, 33, 1237, 39), woosh.Token(woosh.OP, ',', 1237, 39, 1237, 40), woosh.Token(woosh.NAME, 'release', 1237, 41, 1237, 48), woosh.Token(woosh.OP, ')', 1237, 48, 1237, 49), woosh.Token(woosh.NEWLINE, '\r\n', 1237, 49, 1238, 0), woosh.Token(woosh.DEDENT, ' ', 1238, 0, 1238, 8), woosh.Token(woosh.NAME, 'else', 1238, 8, 1238, 12), woosh.Token(woosh.OP, ':', 1238, 12, 1238, 13), woosh.Token(woosh.NEWLINE, '\r\n', 1238, 13, 1239, 0), woosh.Token(woosh.INDENT, ' ', 1239, 0, 1239, 12), woosh.Token(woosh.NAME, 'bits', 1239, 12, 1239, 16), woosh.Token(woosh.OP, ',', 1239, 16, 1239, 17), woosh.Token(woosh.NAME, 'linkage', 1239, 18, 1239, 25), woosh.Token(woosh.OP, '=', 1239, 26, 1239, 27), woosh.Token(woosh.NAME, 'architecture', 1239, 28, 1239, 40), woosh.Token(woosh.OP, '(', 1239, 40, 1239, 41), woosh.Token(woosh.NAME, 'sys', 1239, 41, 1239, 44), woosh.Token(woosh.OP, '.', 1239, 44, 1239, 45), woosh.Token(woosh.NAME, 'executable', 1239, 45, 1239, 55), woosh.Token(woosh.OP, ')', 1239, 55, 1239, 56), woosh.Token(woosh.NEWLINE, '\r\n', 1239, 56, 1240, 0), woosh.Token(woosh.NAME, 'platform', 1240, 12, 1240, 20), woosh.Token(woosh.OP, '=', 1240, 21, 1240, 22), woosh.Token(woosh.NAME, '_platform', 1240, 23, 1240, 32), woosh.Token(woosh.OP, '(', 1240, 32, 1240, 33), woosh.Token(woosh.NAME, 'system', 1240, 33, 1240, 39), woosh.Token(woosh.OP, ',', 1240, 39, 1240, 40), woosh.Token(woosh.NAME, 'release', 1240, 41, 1240, 48), woosh.Token(woosh.OP, ',', 1240, 48, 1240, 49), woosh.Token(woosh.NAME, 'machine', 1240, 50, 1240, 57), woosh.Token(woosh.OP, ',', 1240, 57, 1240, 58), woosh.Token(woosh.NAME, 'processor', 1241, 33, 1241, 42), woosh.Token(woosh.OP, ',', 1241, 42, 1241, 43), woosh.Token(woosh.NAME, 'bits', 1241, 44, 1241, 48), woosh.Token(woosh.OP, ',', 1241, 48, 1241, 49), woosh.Token(woosh.NAME, 'linkage', 1241, 50, 1241, 57), woosh.Token(woosh.OP, ')', 1241, 57, 1241, 58), woosh.Token(woosh.NEWLINE, '\r\n', 1241, 58, 1242, 0), woosh.Token(woosh.DEDENT, ' ', 1243, 0, 1243, 4), woosh.Token(woosh.DEDENT, '', 1243, 4, 1243, 4), woosh.Token(woosh.NAME, '_platform_cache', 1243, 4, 1243, 19), woosh.Token(woosh.OP, '[', 1243, 19, 1243, 20), woosh.Token(woosh.OP, '(', 1243, 20, 1243, 21), woosh.Token(woosh.NAME, 'aliased', 1243, 21, 1243, 28), woosh.Token(woosh.OP, ',', 1243, 28, 1243, 29), woosh.Token(woosh.NAME, 'terse', 1243, 30, 1243, 35), woosh.Token(woosh.OP, ')', 1243, 35, 1243, 36), woosh.Token(woosh.OP, ']', 1243, 36, 1243, 37), woosh.Token(woosh.OP, '=', 1243, 38, 1243, 39), woosh.Token(woosh.NAME, 'platform', 1243, 40, 1243, 48), woosh.Token(woosh.NEWLINE, '\r\n', 1243, 48, 1244, 0), woosh.Token(woosh.NAME, 'return', 1244, 4, 1244, 10), woosh.Token(woosh.NAME, 'platform', 1244, 11, 1244, 19), woosh.Token(woosh.NEWLINE, '\r\n', 1244, 19, 1245, 0), woosh.Token(woosh.COMMENT, '### Command line interface', 1246, 0, 1246, 26), woosh.Token(woosh.DEDENT, '', 1248, 0, 1248, 0), woosh.Token(woosh.NAME, 'if', 1248, 0, 1248, 2), woosh.Token(woosh.NAME, '__name__', 1248, 3, 1248, 11), woosh.Token(woosh.OP, '==', 1248, 12, 1248, 14), woosh.Token(woosh.STRING, "'__main__'", 1248, 15, 1248, 25), woosh.Token(woosh.OP, ':', 1248, 25, 1248, 26), woosh.Token(woosh.NEWLINE, '\r\n', 1248, 26, 1249, 0), woosh.Token(woosh.COMMENT, '# Default is to print the aliased verbose platform string', 1249, 4, 1249, 61), woosh.Token(woosh.INDENT, ' ', 1250, 0, 1250, 4), woosh.Token(woosh.NAME, 'terse', 1250, 4, 1250, 9), woosh.Token(woosh.OP, '=', 1250, 10, 1250, 11), woosh.Token(woosh.OP, '(', 1250, 12, 1250, 13), woosh.Token(woosh.STRING, "'terse'", 1250, 13, 1250, 20), woosh.Token(woosh.NAME, 'in', 1250, 21, 1250, 23), woosh.Token(woosh.NAME, 'sys', 1250, 24, 1250, 27), woosh.Token(woosh.OP, '.', 1250, 27, 1250, 28), woosh.Token(woosh.NAME, 'argv', 1250, 28, 1250, 32), woosh.Token(woosh.NAME, 'or', 1250, 33, 1250, 35), woosh.Token(woosh.STRING, "'--terse'", 1250, 36, 1250, 45), woosh.Token(woosh.NAME, 'in', 1250, 46, 1250, 48), woosh.Token(woosh.NAME, 'sys', 1250, 49, 1250, 52), woosh.Token(woosh.OP, '.', 1250, 52, 1250, 53), woosh.Token(woosh.NAME, 'argv', 1250, 53, 1250, 57), woosh.Token(woosh.OP, ')', 1250, 57, 1250, 58), woosh.Token(woosh.NEWLINE, '\r\n', 1250, 58, 1251, 0), woosh.Token(woosh.NAME, 'aliased', 1251, 4, 1251, 11), woosh.Token(woosh.OP, '=', 1251, 12, 1251, 13), woosh.Token(woosh.OP, '(', 1251, 14, 1251, 15), woosh.Token(woosh.NAME, 'not', 1251, 15, 1251, 18), woosh.Token(woosh.STRING, "'nonaliased'", 1251, 19, 1251, 31), woosh.Token(woosh.NAME, 'in', 1251, 32, 1251, 34), woosh.Token(woosh.NAME, 'sys', 1251, 35, 1251, 38), woosh.Token(woosh.OP, '.', 1251, 38, 1251, 39), woosh.Token(woosh.NAME, 'argv', 1251, 39, 1251, 43), woosh.Token(woosh.NAME, 'and', 1251, 44, 1251, 47), woosh.Token(woosh.NAME, 'not', 1251, 48, 1251, 51), woosh.Token(woosh.STRING, "'--nonaliased'", 1251, 52, 1251, 66), woosh.Token(woosh.NAME, 'in', 1251, 67, 1251, 69), woosh.Token(woosh.NAME, 'sys', 1251, 70, 1251, 73), woosh.Token(woosh.OP, '.', 1251, 73, 1251, 74), woosh.Token(woosh.NAME, 'argv', 1251, 74, 1251, 78), woosh.Token(woosh.OP, ')', 1251, 78, 1251, 79), woosh.Token(woosh.NEWLINE, '\r\n', 1251, 79, 1252, 0), woosh.Token(woosh.NAME, 'print', 1252, 4, 1252, 9), woosh.Token(woosh.OP, '(', 1252, 9, 1252, 10), woosh.Token(woosh.NAME, 'platform', 1252, 10, 1252, 18), woosh.Token(woosh.OP, '(', 1252, 18, 1252, 19), woosh.Token(woosh.NAME, 'aliased', 1252, 19, 1252, 26), woosh.Token(woosh.OP, ',', 1252, 26, 1252, 27), woosh.Token(woosh.NAME, 'terse', 1252, 28, 1252, 33), woosh.Token(woosh.OP, ')', 1252, 33, 1252, 34), woosh.Token(woosh.OP, ')', 1252, 34, 1252, 35), woosh.Token(woosh.NEWLINE, '\r\n', 1252, 35, 1253, 0), woosh.Token(woosh.NAME, 'sys', 1253, 4, 1253, 7), woosh.Token(woosh.OP, '.', 1253, 7, 1253, 8), woosh.Token(woosh.NAME, 'exit', 1253, 8, 1253, 12), woosh.Token(woosh.OP, '(', 1253, 12, 1253, 13), woosh.Token(woosh.NUMBER, '0', 1253, 13, 1253, 14), woosh.Token(woosh.OP, ')', 1253, 14, 1253, 15), woosh.Token(woosh.NEWLINE, '\r\n', 1253, 15, 1254, 0), woosh.Token(woosh.DEDENT, '', 1254, 0, 1254, 0), woosh.Token(woosh.EOF, '', 1254, 0, 1254, 0), ]
54.52871
1,138
0.62496
45,869
269,699
3.665787
0.043014
0.292424
0.438637
0.170965
0.718316
0.300566
0.119176
0.017134
0.012555
0.012555
0
0.209931
0.134976
269,699
4,945
1,139
54.539737
0.51081
0.000297
0
0.003445
1
0.036279
0.354734
0.116408
0
0
0
0
0.000203
1
0.000608
false
0.001824
0.007094
0.000405
0.008107
0.001013
0
0
0
null
1
1
1
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
666b73a46fb22e68a200fb906f5e5256fa079fa3
2,159
py
Python
test/test_nn.py
epignatelli/helx
3dbbf228a63b79169e80f890b97db3d7473e956e
[ "Apache-2.0" ]
1
2021-07-27T00:03:47.000Z
2021-07-27T00:03:47.000Z
test/test_nn.py
epignatelli/helx
3dbbf228a63b79169e80f890b97db3d7473e956e
[ "Apache-2.0" ]
10
2021-06-16T08:42:25.000Z
2021-07-05T08:41:51.000Z
test/test_nn.py
epignatelli/helx
3dbbf228a63b79169e80f890b97db3d7473e956e
[ "Apache-2.0" ]
null
null
null
import jax from helx.nn import rnn def test_lstm_cell(): rng = jax.random.PRNGKey(0) input_shape = (8,) lstm = rnn.LSTMCell(16) x = jax.random.normal(rng, input_shape) out_shape, (params, prev_state) = lstm.init(rng, input_shape) outputs, state = lstm.apply(params, x, prev_state=prev_state) print(outputs.shape, state.h.shape, state.c.shape) jax.jit(lstm.apply)(params, x, prev_state=prev_state) jax.grad(lambda l: sum(lstm.apply(params, x, prev_state=prev_state)[0]))(1.0) def test_lstm(): rng = jax.random.PRNGKey(0) SEQ_LEN = 5 INPUT_FEATURES = 8 HIDDEN_SIZE = 16 input_shape = (SEQ_LEN, INPUT_FEATURES) lstm = rnn.LSTM(HIDDEN_SIZE) x = jax.random.normal(rng, input_shape) out_shape, (params, prev_state) = lstm.init(rng, input_shape) outputs, prev_state = lstm.apply(params, x, prev_state=prev_state) print(outputs.shape) jax.jit(lstm.apply)(params, x, prev_state=prev_state) jax.grad(lambda l: sum(sum(lstm.apply(params, x, prev_state=prev_state)[0])))(1.0) def test_gru_cell(): rng = jax.random.PRNGKey(0) input_shape = (8,) gru = rnn.LSTMCell(16) x = jax.random.normal(rng, input_shape) out_shape, (params, prev_state) = gru.init(rng, input_shape) outputs, state = gru.apply(params, x, prev_state=prev_state) print(outputs.shape, state.h.shape, state.c.shape) jax.jit(gru.apply)(params, x, prev_state=prev_state) jax.grad(lambda l: sum(gru.apply(params, x, prev_state=prev_state)[0]))(1.0) def test_gru(): rng = jax.random.PRNGKey(0) SEQ_LEN = 5 INPUT_FEATURES = 8 HIDDEN_SIZE = 16 input_shape = (SEQ_LEN, INPUT_FEATURES) gru = rnn.LSTM(HIDDEN_SIZE) x = jax.random.normal(rng, input_shape) out_shape, (params, prev_state) = gru.init(rng, input_shape) outputs, hidden_state = gru.apply(params, x, prev_state=prev_state) print(outputs.shape) jax.jit(gru.apply)(params, x, prev_state=prev_state) jax.grad(lambda l: sum(sum(gru.apply(params, x, prev_state=prev_state)[0])))(1.0) if __name__ == "__main__": test_lstm_cell() test_lstm() test_gru_cell() test_gru()
34.269841
86
0.68365
348
2,159
4.017241
0.135057
0.186695
0.103004
0.137339
0.91774
0.91774
0.91774
0.91774
0.91774
0.867668
0
0.016816
0.173692
2,159
63
87
34.269841
0.766816
0
0
0.566038
0
0
0.003704
0
0
0
0
0
0
1
0.075472
false
0
0.037736
0
0.113208
0.075472
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
66abe5461aed511781e99d53d09500ee531c5809
72
py
Python
PyFileCP/__init__.py
re-mc/PyFileCP
abe8219cc11b99d47f31205bcd18dfb3d340bb85
[ "MIT" ]
null
null
null
PyFileCP/__init__.py
re-mc/PyFileCP
abe8219cc11b99d47f31205bcd18dfb3d340bb85
[ "MIT" ]
null
null
null
PyFileCP/__init__.py
re-mc/PyFileCP
abe8219cc11b99d47f31205bcd18dfb3d340bb85
[ "MIT" ]
null
null
null
import PyFileCP.replacetool import PyFileCP.copyfile import PyFileCP.run
24
27
0.888889
9
72
7.111111
0.555556
0.65625
0
0
0
0
0
0
0
0
0
0
0.069444
72
3
28
24
0.955224
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
66e94902c5a97f604028c2f5f2394865ec0f7161
228
py
Python
test/test_cron.py
tgbugs/sparc-curation
d5f9942e26dc780e2584a9944ab1e639e249f85b
[ "MIT" ]
null
null
null
test/test_cron.py
tgbugs/sparc-curation
d5f9942e26dc780e2584a9944ab1e639e249f85b
[ "MIT" ]
1
2019-02-27T23:47:28.000Z
2019-02-27T23:47:28.000Z
test/test_cron.py
tgbugs/sparc-curation
d5f9942e26dc780e2584a9944ab1e639e249f85b
[ "MIT" ]
null
null
null
import unittest class TestCron(unittest.TestCase): def test_import(self): from sparcur import sparcron def test_sheet_update(self): from sparcur import sparcron sparcron.check_sheet_updates()
19
38
0.710526
27
228
5.814815
0.555556
0.089172
0.191083
0.267516
0.369427
0
0
0
0
0
0
0
0.232456
228
11
39
20.727273
0.897143
0
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.571429
0
1
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
6
dd5e6f9890d5b234c44bb6b9c8a1ef0712f257fe
3,072
py
Python
tests/test_blind.py
RaphiOriginal/blindAutomation
47f087be0ef33983cfc372abe09760c9a64f1849
[ "MIT" ]
1
2020-08-20T19:43:14.000Z
2020-08-20T19:43:14.000Z
tests/test_blind.py
RaphiOriginal/blindAutomation
47f087be0ef33983cfc372abe09760c9a64f1849
[ "MIT" ]
null
null
null
tests/test_blind.py
RaphiOriginal/blindAutomation
47f087be0ef33983cfc372abe09760c9a64f1849
[ "MIT" ]
null
null
null
import unittest from blind_automation.building.blind.blind import Blind from blind_automation.building.state import State from tests.mock.device import DeviceMock class BlindDegreeCase(unittest.TestCase): def test_tilt_calculation_initial(self): mock = DeviceMock('👨‍🏫') blind = Blind('👨‍🎓', 10, 20, mock, [], []) blind.override_tilt_duration(90) # Makes calculation for checks much more easy =) # starting from 90 blind.tilt(0) self.assertEqual(90, mock.time) self.assertEqual('open', mock.direction) def test_tilt_calculation_open(self): mock = DeviceMock('👨‍🏫') blind = Blind('👨‍🎓', 10, 20, mock, [], []) blind.override_tilt_duration(90) # Makes calculation for checks much more easy =) blind.open() self.assertEqual(State.OPEN, mock.stats()) blind.tilt(0) self.assertEqual(0, mock.time) self.assertEqual('close', mock.direction) def test_tilt_calculation_close(self): mock = DeviceMock('👨‍🏫') blind = Blind('👨‍🎓', 10, 20, mock, [], []) blind.override_tilt_duration(90) # Makes calculation for checks much more easy =) blind.close() self.assertEqual(State.CLOSED, mock.stats()) blind.tilt(0) self.assertEqual(90, mock.time) self.assertEqual('open', mock.direction) def test_tilt_calculation_45(self): mock = DeviceMock('👨‍🏫') blind = Blind('👨‍🎓', 10, 20, mock, [], []) blind.override_tilt_duration(90) # Makes calculation for checks much more easy =) # starting from 90 blind.tilt(45) self.assertEqual(45, mock.time) self.assertEqual('open', mock.direction) def test_tilt_calculation_90(self): mock = DeviceMock('👨‍🏫') blind = Blind('👨‍🎓', 10, 20, mock, [], []) blind.override_tilt_duration(90) # Makes calculation for checks much more easy =) # starting from 90 blind.tilt(90) self.assertEqual(0, mock.time) self.assertEqual('close', mock.direction) def test_tilt_calculation_30_60(self): mock = DeviceMock('👨‍🏫') blind = Blind('👨‍🎓', 10, 20, mock, [], []) blind.override_tilt_duration(90) # Makes calculation for checks much more easy =) # starting from 90 blind.tilt(30) self.assertEqual(60, mock.time) self.assertEqual('open', mock.direction) blind.tilt(60) self.assertEqual(30, mock.time) self.assertEqual('close', mock.direction) def test_tilt_calculation_60_30(self): mock = DeviceMock('👨‍🏫') blind = Blind('👨‍🎓', 10, 20, mock, [], []) blind.override_tilt_duration(90) # Makes calculation for checks much more easy =) # starting from 90 blind.tilt(60) self.assertEqual(30, mock.time) self.assertEqual('open', mock.direction) blind.tilt(30) self.assertEqual(30, mock.time) self.assertEqual('open', mock.direction) if __name__ == '__main__': unittest.main()
37.012048
90
0.616536
371
3,072
5.091644
0.12938
0.158814
0.057173
0.109582
0.825304
0.815246
0.815246
0.800424
0.800424
0.774484
0
0.041072
0.24707
3,072
82
91
37.463415
0.757458
0.13444
0
0.666667
0
0
0.033636
0
0
0
0
0
0.30303
1
0.106061
false
0
0.060606
0
0.181818
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
dd928a336bd2d7bc499e25f12126081574b3702f
61
py
Python
jaraco/tidelift/__init__.py
hugovk/jaraco.tidelift
39a0a9362e08fd5d7404c537655e476336fdbdd4
[ "MIT" ]
1
2019-05-17T23:43:34.000Z
2019-05-17T23:43:34.000Z
jaraco/tidelift/__init__.py
hugovk/jaraco.tidelift
39a0a9362e08fd5d7404c537655e476336fdbdd4
[ "MIT" ]
3
2019-06-05T13:28:57.000Z
2022-03-19T06:47:05.000Z
jaraco/tidelift/__init__.py
hugovk/jaraco.tidelift
39a0a9362e08fd5d7404c537655e476336fdbdd4
[ "MIT" ]
2
2021-09-25T07:13:13.000Z
2021-11-16T07:33:26.000Z
from . import banner def setup(app): banner.setup(app)
10.166667
21
0.672131
9
61
4.555556
0.666667
0.390244
0
0
0
0
0
0
0
0
0
0
0.213115
61
5
22
12.2
0.854167
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
6
06c3ac5956b41d1e1544fc570872b8a7a0072e58
157
py
Python
shorturl/shorturl/doctype/shorturl_settings/test_shorturl_settings.py
Senwize/frappe-shorturl
b6d3aeb21926e8f17a86dea5b1335347866c4d3d
[ "MIT" ]
null
null
null
shorturl/shorturl/doctype/shorturl_settings/test_shorturl_settings.py
Senwize/frappe-shorturl
b6d3aeb21926e8f17a86dea5b1335347866c4d3d
[ "MIT" ]
null
null
null
shorturl/shorturl/doctype/shorturl_settings/test_shorturl_settings.py
Senwize/frappe-shorturl
b6d3aeb21926e8f17a86dea5b1335347866c4d3d
[ "MIT" ]
null
null
null
# Copyright (c) 2022, Senwize B.V. and Contributors # See license.txt # import frappe import unittest class TestShortURLSettings(unittest.TestCase): pass
17.444444
51
0.77707
20
157
6.1
0.9
0
0
0
0
0
0
0
0
0
0
0.02963
0.140127
157
8
52
19.625
0.874074
0.503185
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
06cf30c46ef8ec10cfabac88206c35f15b3283a5
879
py
Python
pybytom/assets.py
meherett/btmhdw
6929750edb7747a9937806272127c98db86e4c98
[ "MIT" ]
3
2019-06-02T06:31:06.000Z
2019-06-16T20:46:38.000Z
pybytom/assets.py
meherett/btmhdw
6929750edb7747a9937806272127c98db86e4c98
[ "MIT" ]
3
2020-09-10T04:40:58.000Z
2021-06-25T15:38:35.000Z
pybytom/assets.py
meherett/btmhdw
6929750edb7747a9937806272127c98db86e4c98
[ "MIT" ]
1
2020-08-11T07:48:19.000Z
2020-08-11T07:48:19.000Z
#!/usr/bin/env python3 from typing import List # Bytom asset BTM: str = "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff" # Bitcoin asset BTC: str = "bda946b3110fa46fd94346ce3f05f0760f1b9de72e238835bc4d19f9d64f1742" # Dai Stablecoin asset DAI: str = "25f2069140fa3ff4d6e0dc1d0fcaa11ace01eb721f115f0f1a5a3782db597fb1" # Ethereum asset ETH: str = "78de44ffa1bce37b757c9eae8925b5f199dc4621b412ef0f3f46168865284a93" # Litecoin asset LTC: str = "011a24f9da7551d4cd9ae0f194aa1d1691e22a173edf7d81aabd9a97ca386252" # SUP asset SUP: str = "47fcd4d7c22d1d38931a6cd7767156babbd5f05bbbb3f7d3900635b56eb1b67e" # USD Coin asset USDC: str = "c4644dd6643475d57ed624f63129ab815f282b61f4bb07646d73423a6e1a1563" # Tether asset USDT: str = "184e1cc4ee4845023888810a79eed7a42c02c544cf2c61ceac05e176d575bd46" __all__: List[str] = [ BTM, BTC, DAI, ETH, LTC, SUP, USDC, USDT ]
33.807692
78
0.836177
61
879
11.983607
0.57377
0
0
0
0
0
0
0
0
0
0
0.354351
0.097838
879
25
79
35.16
0.567465
0.154721
0
0
0
0
0.697548
0.697548
0
1
0
0
0
1
0
true
0
0.083333
0
0.083333
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
1
null
1
0
0
0
0
0
1
0
0
0
0
0
0
6
06e16e839ef730e2363c729d4c0a10b3bf03ef77
37
py
Python
nineml/abstraction/randomdistribution/__init__.py
INCF/nineml-python
062a2ac8a9be97cee4dad02938e3858e051cf07c
[ "BSD-3-Clause" ]
6
2017-12-26T14:15:28.000Z
2021-10-10T22:45:51.000Z
nineml/abstraction/randomdistribution/__init__.py
INCF/nineml-python
062a2ac8a9be97cee4dad02938e3858e051cf07c
[ "BSD-3-Clause" ]
25
2017-07-05T03:53:53.000Z
2021-01-19T14:14:05.000Z
nineml/abstraction/randomdistribution/__init__.py
INCF/nineml-python
062a2ac8a9be97cee4dad02938e3858e051cf07c
[ "BSD-3-Clause" ]
5
2017-12-26T14:15:12.000Z
2021-10-10T22:45:39.000Z
from .base import RandomDistribution
18.5
36
0.864865
4
37
8
1
0
0
0
0
0
0
0
0
0
0
0
0.108108
37
1
37
37
0.969697
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
661bd7c982245e5655b7af16bbb85ebc0d6d403f
39
py
Python
hatstats.py
daveygit2050/hattrick-stats
b368ba10dd21d02ed302057c21bbf02c99034d85
[ "Apache-2.0" ]
null
null
null
hatstats.py
daveygit2050/hattrick-stats
b368ba10dd21d02ed302057c21bbf02c99034d85
[ "Apache-2.0" ]
null
null
null
hatstats.py
daveygit2050/hattrick-stats
b368ba10dd21d02ed302057c21bbf02c99034d85
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import hatstats
9.75
21
0.74359
6
39
4.833333
1
0
0
0
0
0
0
0
0
0
0
0
0.128205
39
3
22
13
0.852941
0.512821
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
664d1c65d81bb6c668bc8a88d91f032ea34b025e
79
py
Python
TicTacToeRL/tests/board_tests.py
HarrisonBacordo/TicTacToeRL
da0463948b21ce1995dc5883d08d864e19d94b7d
[ "Apache-2.0" ]
null
null
null
TicTacToeRL/tests/board_tests.py
HarrisonBacordo/TicTacToeRL
da0463948b21ce1995dc5883d08d864e19d94b7d
[ "Apache-2.0" ]
null
null
null
TicTacToeRL/tests/board_tests.py
HarrisonBacordo/TicTacToeRL
da0463948b21ce1995dc5883d08d864e19d94b7d
[ "Apache-2.0" ]
null
null
null
from TicTacToeRL.game import Board board = Board.Board() board = board.start()
19.75
34
0.759494
11
79
5.454545
0.545455
0.833333
1
1
0.5
0
0
0
0
0
0
0
0.126582
79
4
35
19.75
0.869565
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
6
9ffe14a553d28c937bb791f9e585d41834746118
10,206
py
Python
apis/nb/clients/policy_manager_client/V2ContractApi.py
CiscoDevNet/APIC-EM-Generic-Scripts-
74211d9488f1e77cf56ef86dba20ec8e8eb49cc1
[ "ECL-2.0", "Apache-2.0" ]
45
2016-06-09T15:41:25.000Z
2019-08-06T17:13:11.000Z
apis/nb/clients/policy_manager_client/V2ContractApi.py
CiscoDevNet/APIC-EM-Generic-Scripts
74211d9488f1e77cf56ef86dba20ec8e8eb49cc1
[ "ECL-2.0", "Apache-2.0" ]
36
2016-06-12T03:03:56.000Z
2017-03-13T18:20:11.000Z
apis/nb/clients/policy_manager_client/V2ContractApi.py
CiscoDevNet/APIC-EM-Generic-Scripts
74211d9488f1e77cf56ef86dba20ec8e8eb49cc1
[ "ECL-2.0", "Apache-2.0" ]
15
2016-06-22T03:51:37.000Z
2019-07-10T10:06:02.000Z
#!/usr/bin/env python #pylint: skip-file # This source code is licensed under the Apache license found in the # LICENSE file in the root directory of this project. import sys import os import urllib.request, urllib.parse, urllib.error from .models import * class V2ContractApi(object): def __init__(self, apiClient): self.apiClient = apiClient def getContractByFilters(self, **kwargs): """Retrieves contracts based on a given filter Args: name, str: Retrieve contracts for a given name (required) accessAction, str: Retrieve contracts for a given accessAction (required) offset, str: Starting index of the resources (1 based) (required) limit, str: Number of resources to return (required) Returns: ContractListResult """ allParams = ['name', 'accessAction', 'offset', 'limit'] params = locals() for (key, val) in list(params['kwargs'].items()): if key not in allParams: raise TypeError("Got an unexpected keyword argument '%s' to method getContractByFilters" % key) params[key] = val del params['kwargs'] resourcePath = '/v2/contract' resourcePath = resourcePath.replace('{format}', 'json') method = 'GET' queryParams = {} headerParams = {} formParams = {} files = {} bodyParam = None headerParams['Accept'] = 'application/json' headerParams['Content-Type'] = 'application/json' if ('name' in params): queryParams['name'] = self.apiClient.toPathValue(params['name']) if ('accessAction' in params): queryParams['accessAction'] = self.apiClient.toPathValue(params['accessAction']) if ('offset' in params): queryParams['offset'] = self.apiClient.toPathValue(params['offset']) if ('limit' in params): queryParams['limit'] = self.apiClient.toPathValue(params['limit']) postData = (formParams if formParams else bodyParam) response = self.apiClient.callAPI(resourcePath, method, queryParams, postData, headerParams, files=files) if not response: return None responseObject = self.apiClient.deserialize(response, 'ContractListResult') return responseObject def update(self, **kwargs): """Update contract(s) Args: contractDTOs, list[ContractDTO]: Contract Object(s) (required) Returns: TaskIdResult """ allParams = ['contractDTOs'] params = locals() for (key, val) in list(params['kwargs'].items()): if key not in allParams: raise TypeError("Got an unexpected keyword argument '%s' to method update" % key) params[key] = val del params['kwargs'] resourcePath = '/v2/contract' resourcePath = resourcePath.replace('{format}', 'json') method = 'PUT' queryParams = {} headerParams = {} formParams = {} files = {} bodyParam = None headerParams['Accept'] = 'application/json' headerParams['Content-Type'] = 'application/json' if ('contractDTOs' in params): bodyParam = params['contractDTOs'] postData = (formParams if formParams else bodyParam) response = self.apiClient.callAPI(resourcePath, method, queryParams, postData, headerParams, files=files) if not response: return None responseObject = self.apiClient.deserialize(response, 'TaskIdResult') return responseObject def add(self, **kwargs): """Create contract(s) Args: contractDTOs, list[ContractDTO]: Contract Object(s) (required) Returns: TaskIdResult """ allParams = ['contractDTOs'] params = locals() for (key, val) in list(params['kwargs'].items()): if key not in allParams: raise TypeError("Got an unexpected keyword argument '%s' to method add" % key) params[key] = val del params['kwargs'] resourcePath = '/v2/contract' resourcePath = resourcePath.replace('{format}', 'json') method = 'POST' queryParams = {} headerParams = {} formParams = {} files = {} bodyParam = None headerParams['Accept'] = 'application/json' headerParams['Content-Type'] = 'application/json' if ('contractDTOs' in params): bodyParam = params['contractDTOs'] postData = (formParams if formParams else bodyParam) response = self.apiClient.callAPI(resourcePath, method, queryParams, postData, headerParams, files=files) if not response: return None responseObject = self.apiClient.deserialize(response, 'TaskIdResult') return responseObject def getCount(self, **kwargs): """Return total count of contracts Args: Returns: CountResult """ allParams = [] params = locals() for (key, val) in list(params['kwargs'].items()): if key not in allParams: raise TypeError("Got an unexpected keyword argument '%s' to method getCount" % key) params[key] = val del params['kwargs'] resourcePath = '/v2/contract/count' resourcePath = resourcePath.replace('{format}', 'json') method = 'GET' queryParams = {} headerParams = {} formParams = {} files = {} bodyParam = None headerParams['Accept'] = 'application/json' headerParams['Content-Type'] = 'application/json' postData = (formParams if formParams else bodyParam) response = self.apiClient.callAPI(resourcePath, method, queryParams, postData, headerParams, files=files) if not response: return None responseObject = self.apiClient.deserialize(response, 'CountResult') return responseObject def getById(self, **kwargs): """Retrieves a contract based on its id Args: id, str: id (required) Returns: ContractResult """ allParams = ['id'] params = locals() for (key, val) in list(params['kwargs'].items()): if key not in allParams: raise TypeError("Got an unexpected keyword argument '%s' to method getById" % key) params[key] = val del params['kwargs'] resourcePath = '/v2/contract/{id}' resourcePath = resourcePath.replace('{format}', 'json') method = 'GET' queryParams = {} headerParams = {} formParams = {} files = {} bodyParam = None headerParams['Accept'] = 'application/json' headerParams['Content-Type'] = 'application/json' if ('id' in params): replacement = str(self.apiClient.toPathValue(params['id'])) replacement = urllib.parse.quote(replacement) resourcePath = resourcePath.replace('{' + 'id' + '}', replacement) postData = (formParams if formParams else bodyParam) response = self.apiClient.callAPI(resourcePath, method, queryParams, postData, headerParams, files=files) if not response: return None responseObject = self.apiClient.deserialize(response, 'ContractResult') return responseObject def delete(self, **kwargs): """Deletes a contract by its id Args: id, str: id (required) Returns: TaskIdResult """ allParams = ['id'] params = locals() for (key, val) in list(params['kwargs'].items()): if key not in allParams: raise TypeError("Got an unexpected keyword argument '%s' to method delete" % key) params[key] = val del params['kwargs'] resourcePath = '/v2/contract/{id}' resourcePath = resourcePath.replace('{format}', 'json') method = 'DELETE' queryParams = {} headerParams = {} formParams = {} files = {} bodyParam = None headerParams['Accept'] = 'application/json' headerParams['Content-Type'] = 'application/json' if ('id' in params): replacement = str(self.apiClient.toPathValue(params['id'])) replacement = urllib.parse.quote(replacement) resourcePath = resourcePath.replace('{' + 'id' + '}', replacement) postData = (formParams if formParams else bodyParam) response = self.apiClient.callAPI(resourcePath, method, queryParams, postData, headerParams, files=files) if not response: return None responseObject = self.apiClient.deserialize(response, 'TaskIdResult') return responseObject
24.711864
111
0.517833
828
10,206
6.378019
0.155797
0.049233
0.046961
0.020451
0.768604
0.768604
0.757622
0.757622
0.745881
0.745881
0
0.001275
0.385264
10,206
412
112
24.771845
0.840453
0.106604
0
0.798883
0
0
0.136858
0
0
0
0
0
0
1
0.039106
false
0
0.022346
0
0.134078
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
b051f10a435215bf2ca9c10772296cbe40fa7c8e
46
py
Python
scraper/spiders/accounts/__init__.py
Darshan-AS/dopagent_scraper
3457dda8b66e01cdce56e11425fc82f6db163005
[ "MIT" ]
null
null
null
scraper/spiders/accounts/__init__.py
Darshan-AS/dopagent_scraper
3457dda8b66e01cdce56e11425fc82f6db163005
[ "MIT" ]
12
2020-11-07T16:41:58.000Z
2021-01-24T09:58:29.000Z
scraper/spiders/accounts/__init__.py
Darshan-AS/dopagent_scraper
3457dda8b66e01cdce56e11425fc82f6db163005
[ "MIT" ]
null
null
null
# flake8: noqa from .accounts_spider import *
15.333333
30
0.76087
6
46
5.666667
1
0
0
0
0
0
0
0
0
0
0
0.025641
0.152174
46
2
31
23
0.846154
0.26087
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
b05327041417524d008023b72a08d808fce5991d
142
py
Python
tests/blueprints/test_stockprofile.py
fffergal/walterego
e01d4185c88fcbd571cf47799a2d866d0eb72cff
[ "Apache-2.0" ]
null
null
null
tests/blueprints/test_stockprofile.py
fffergal/walterego
e01d4185c88fcbd571cf47799a2d866d0eb72cff
[ "Apache-2.0" ]
null
null
null
tests/blueprints/test_stockprofile.py
fffergal/walterego
e01d4185c88fcbd571cf47799a2d866d0eb72cff
[ "Apache-2.0" ]
null
null
null
from walterego.blueprints import stockprofile def test_stock_profiles_data_path(): assert stockprofile.STOCK_PROFILE_DATA_PATH.exists()
23.666667
56
0.84507
18
142
6.277778
0.777778
0.141593
0
0
0
0
0
0
0
0
0
0
0.098592
142
5
57
28.4
0.882813
0
0
0
0
0
0
0
0
0
0
0
0.333333
1
0.333333
true
0
0.333333
0
0.666667
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
6
c685976cff64f81bf4e50e72190204d6f3797345
9,015
py
Python
tests/spotify_lights_sync_test.py
2t0m/ad-spotify-mood-lights-sync
8d147c7c99757d9e508bc7276f8797876c222187
[ "MIT" ]
9
2021-02-09T23:17:58.000Z
2022-03-15T17:05:59.000Z
tests/spotify_lights_sync_test.py
2t0m/ad-spotify-mood-lights-sync
8d147c7c99757d9e508bc7276f8797876c222187
[ "MIT" ]
7
2021-02-09T23:42:03.000Z
2022-03-29T10:21:02.000Z
tests/spotify_lights_sync_test.py
2t0m/ad-spotify-mood-lights-sync
8d147c7c99757d9e508bc7276f8797876c222187
[ "MIT" ]
3
2021-02-23T04:13:28.000Z
2022-03-18T09:17:14.000Z
import contextlib import os from appdaemontestframework import automation_fixture from apps.spotify_mood_lights_sync.spotify_mood_lights_sync import SpotifyMoodLightsSync from spotipy import Spotify from unittest.mock import patch from test_utils import * @automation_fixture(SpotifyMoodLightsSync) def uut(given_that): given_that.passed_arg('client_id').is_set_to("_") given_that.passed_arg('client_secret').is_set_to("_") given_that.passed_arg('media_player').is_set_to('media_player.spotify_test') given_that.passed_arg('light').is_set_to('light.test_light') given_that.state_of('light.test_light').is_set_to('on', attributes={'color': (255, 255, 255)}) @automation_fixture(SpotifyMoodLightsSync) def uut_empty(): pass @pytest.fixture def update_passed_args(uut): @contextlib.contextmanager def update_and_init(): yield uut.initialize() return update_and_init @pytest.fixture def media_player(uut, given_that): class UpdateState: def __init__(self, entity): self.entity = entity self.old_uri = None def update_state(self, state, attributes): given_that.state_of(self.entity).is_set_to(state, attributes) new_uri = attributes.get('media_content_id', None) uut.sync_lights_from_spotify(self.entity, 'media_content_id', self.old_uri, new_uri, None) self.old_uri = new_uri return UpdateState class TestCallbacksAreSet: def test_min_config(self, given_that, uut, assert_that): assert_that(uut). \ listens_to.state('media_player.spotify_test', attribute='media_content_id'). \ with_callback(uut.sync_lights_from_spotify) def test_custom_config(self, given_that, uut, assert_that, update_passed_args): with update_passed_args(): given_that.passed_arg('color_profile').is_set_to('custom') given_that.passed_arg('custom_profile').is_set_to(CUSTOM_PROFILE) assert_that(uut). \ listens_to.state('media_player.spotify_test', attribute='media_content_id'). \ with_callback(uut.sync_lights_from_spotify) class TestColorChange: @patch.object(Spotify, 'audio_features', new=mock_audio_features) def test_change(self, given_that, media_player, assert_that, uut): media_player('media_player.spotify_test').update_state('playing', {'media_content_id': 'min_min'}) color1 = uut.color_for_point(track_to_point('min_min')) assert_that('light.test_light').was.turned_on(rgb_color=color1) given_that.mock_functions_are_cleared() media_player('media_player.spotify_test').update_state('playing', {'media_content_id': 'min_max'}) color2 = uut.color_for_point(track_to_point('min_max')) assert_that('light.test_light').was.turned_on(rgb_color=color2) assert color1 != color2 @patch.object(Spotify, 'audio_features', new=mock_audio_features) def test_skip_on_same_attribute(self, hass_mocks, given_that, media_player): player = media_player('media_player.spotify_test') player.update_state('playing', {'media_content_id': 'min_min'}) player.update_state('playing', {'media_content_id': 'min_min'}) player.update_state('playing', {'media_content_id': 'min_min'}) assert len(hass_mocks.hass_functions["turn_on"].call_args_list) == 1 @patch.object(Spotify, 'audio_features', new=mock_audio_features) def test_turn_off(self, hass_mocks, given_that, media_player, assert_that): player = media_player('media_player.spotify_test') player.update_state('playing', {'media_content_id': 'min_min'}) assert len(hass_mocks.hass_functions["turn_on"].call_args_list) == 1 given_that.mock_functions_are_cleared() player.update_state('off', {}) assert_that('light.test_light').was_not.turned_on() # assert_that('light.test_light').was.turned_on(rgb_color=(255, 255, 255)) @patch.object(Spotify, 'audio_features', new=mock_audio_features) def test_custom_color_profile(self, given_that, media_player, assert_that, update_passed_args): with update_passed_args(): given_that.passed_arg('color_profile').is_set_to('custom') given_that.passed_arg('custom_profile').is_set_to(CUSTOM_PROFILE) media_player('media_player.spotify_test').update_state('playing', {'media_content_id': 'min_min'}) assert_that('light.test_light').was.turned_on(rgb_color=(0, 0, 255)) given_that.mock_functions_are_cleared() media_player('media_player.spotify_test').update_state('playing', {'media_content_id': 'min_max'}) assert_that('light.test_light').was.turned_on(rgb_color=(255, 0, 0)) # TODO: find a way to check that the callback was _not_ registered class TestSetupErrors: @pytest.fixture def update_passed_args_empty(self, uut_empty): @contextlib.contextmanager def update_and_init(): yield uut_empty.initialize() return update_and_init def test_missing_client_id(self, given_that, assert_that, update_passed_args_empty, hass_errors): with update_passed_args_empty(): given_that.passed_arg('client_secret').is_set_to('_') given_that.passed_arg('media_player').is_set_to('media_player.spotify_test') given_that.passed_arg('light').is_set_to('light.test_light') assert len(hass_errors()) == 1 def test_missing_client_secret(self, given_that, assert_that, update_passed_args_empty, hass_errors): with update_passed_args_empty(): given_that.passed_arg('client_id').is_set_to('_') given_that.passed_arg('media_player').is_set_to('media_player.spotify_test') given_that.passed_arg('light').is_set_to('light.test_light') assert len(hass_errors()) == 1 def test_missing_media_player(self, given_that, assert_that, update_passed_args_empty, hass_errors): with update_passed_args_empty(): given_that.passed_arg('client_id').is_set_to('_') given_that.passed_arg('client_secret').is_set_to('_') given_that.passed_arg('light').is_set_to('light.test_light') assert len(hass_errors()) == 1 def test_missing_light(self, given_that, assert_that, update_passed_args_empty, hass_errors): with update_passed_args_empty(): given_that.passed_arg('client_id').is_set_to('_') given_that.passed_arg('client_secret').is_set_to('_') given_that.passed_arg('media_player').is_set_to('media_player.spotify_test') assert len(hass_errors()) == 1 @patch.object(Spotify, 'audio_features', new=mock_audio_features) def test_direct_mode_with_wrong_media_content_id(self, given_that, assert_that, hass_errors, media_player): media_player('media_player.spotify_test').update_state('playing', {'media_content_id': 'not_found'}) assert len(hass_errors()) == 1 class TestImageOutput: def test_default_output(self, given_that, update_passed_args): with update_passed_args(): given_that.passed_arg('color_map_image').is_set_to({'size': 50, 'location': './out.png'}) assert os.path.isfile('./out.png') if os.path.isfile('./out.png'): os.remove('./out.png') class TestRetries: @patch.object(Spotify, 'audio_features', new=mock_audio_features) def test_retries_default(self, media_player): NETWORK_STATE.turn_on_errors() media_player('media_player.spotify_test').update_state('playing', {'media_content_id': 'min_min'}) assert NETWORK_STATE.tries == 2 @patch.object(Spotify, 'audio_features', new=mock_audio_features) def test_retries_custom(self, given_that, update_passed_args, media_player): with update_passed_args(): given_that.passed_arg('max_retries').is_set_to(4) NETWORK_STATE.turn_on_errors() media_player('media_player.spotify_test').update_state('playing', {'media_content_id': 'min_min'}) assert NETWORK_STATE.tries == 5 @patch.object(Spotify, 'audio_features', new=mock_audio_features) def test_retries_zero(self, given_that, update_passed_args, media_player): with update_passed_args(): given_that.passed_arg('max_retries').is_set_to(0) NETWORK_STATE.turn_on_errors() media_player('media_player.spotify_test').update_state('playing', {'media_content_id': 'min_min'}) assert NETWORK_STATE.tries == 1 @patch.object(Spotify, 'audio_features', new=mock_audio_features) def test_retries_pass(self, given_that, update_passed_args, media_player): with update_passed_args(): given_that.passed_arg('max_retries').is_set_to(4) NETWORK_STATE.turn_on_errors(n_errors=2) media_player('media_player.spotify_test').update_state('playing', {'media_content_id': 'min_min'}) assert NETWORK_STATE.tries == 3
41.736111
111
0.712923
1,229
9,015
4.790887
0.1131
0.070313
0.03091
0.07337
0.809952
0.761039
0.732337
0.701087
0.675272
0.675272
0
0.006815
0.169939
9,015
215
112
41.930233
0.780035
0.015197
0
0.551948
0
0
0.172507
0.047887
0
0
0
0.004651
0.194805
1
0.162338
false
0.305195
0.045455
0
0.266234
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
6
c6879de71c71e3a7479bb58ba012eb83801d8147
558
py
Python
keras/applications/mobilenet_v2.py
PJmouraocs/keras
7a39b6c62d43c25472b2c2476bd2a8983ae4f682
[ "MIT" ]
300
2018-04-04T05:01:21.000Z
2022-02-25T18:56:04.000Z
keras/applications/mobilenet_v2.py
PJmouraocs/keras
7a39b6c62d43c25472b2c2476bd2a8983ae4f682
[ "MIT" ]
163
2018-04-03T17:41:22.000Z
2021-09-03T16:44:04.000Z
keras/applications/mobilenet_v2.py
PJmouraocs/keras
7a39b6c62d43c25472b2c2476bd2a8983ae4f682
[ "MIT" ]
94
2016-02-17T20:59:27.000Z
2021-04-19T08:18:16.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from keras_applications import mobilenet_v2 from . import keras_modules_injection @keras_modules_injection def MobileNetV2(*args, **kwargs): return mobilenet_v2.MobileNetV2(*args, **kwargs) @keras_modules_injection def decode_predictions(*args, **kwargs): return mobilenet_v2.decode_predictions(*args, **kwargs) @keras_modules_injection def preprocess_input(*args, **kwargs): return mobilenet_v2.preprocess_input(*args, **kwargs)
25.363636
59
0.810036
68
558
6.191176
0.323529
0.142518
0.199525
0.171021
0.353919
0.16152
0
0
0
0
0
0.012048
0.107527
558
21
60
26.571429
0.833333
0
0
0.214286
0
0
0
0
0
0
0
0
0
1
0.214286
true
0
0.357143
0.214286
0.785714
0.071429
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
1
0
0
0
6
c69de00cd893bded53257278f8f19478f2f38554
21,570
py
Python
pirates/leveleditor/worldData/interior_shanty_store_clothing.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
3
2021-02-25T06:38:13.000Z
2022-03-22T07:00:15.000Z
pirates/leveleditor/worldData/interior_shanty_store_clothing.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
null
null
null
pirates/leveleditor/worldData/interior_shanty_store_clothing.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
1
2021-02-25T06:38:17.000Z
2021-02-25T06:38:17.000Z
# uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: pirates.leveleditor.worldData.interior_shanty_store_clothing from pandac.PandaModules import Point3, VBase3, Vec4, Vec3 objectStruct = {'Objects': {'1156268617.43dzlu0z': {'Type': 'Building Interior', 'Name': '', 'Instanced': True, 'Objects': {'1167780096.44kmuller': {'Type': 'Prop_Groups', 'DisableCollision': False, 'Hpr': VBase3(11.301, 0.0, 0.0), 'Pos': Point3(38.194, 25.733, 12.07), 'Scale': VBase3(0.689, 0.689, 0.689), 'Visual': {'Model': 'models/props/prop_group_C'}}, '1167782443.0kmuller': {'Type': 'Prop_Groups', 'DisableCollision': False, 'Hpr': VBase3(-178.549, 0.0, 0.0), 'Pos': Point3(14.354, 29.304, 12.07), 'Scale': VBase3(0.568, 0.568, 0.568), 'Visual': {'Model': 'models/props/prop_group_G'}}, '1167782540.07kmuller': {'Type': 'Crate', 'DisableCollision': False, 'Hpr': VBase3(-13.809, 0.0, 0.0), 'Pos': Point3(24.357, 28.658, 12.07), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.72, 0.7, 0.59, 1.0), 'Model': 'models/props/crate'}}, '1167782751.35kmuller': {'Type': 'Furniture', 'DisableCollision': True, 'Hpr': VBase3(86.779, 0.0, 0.0), 'Pos': Point3(1.51, -6.711, 0.209), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.8, 0.8, 0.8, 1.0), 'Model': 'models/props/cabinet_shanty'}}, '1167784962.05kmuller': {'Type': 'Trunks', 'DisableCollision': True, 'Hpr': VBase3(95.414, 0.0, 0.0), 'Pos': Point3(3.37, 5.558, 0.0), 'Scale': VBase3(1.328, 1.328, 1.328), 'Visual': {'Model': 'models/props/Trunk_square'}}, '1167785011.94kmuller': {'Type': 'Trunks', 'DisableCollision': True, 'Hpr': VBase3(102.087, 0.0, 0.0), 'Pos': Point3(2.82, 9.429, 0.0), 'Scale': VBase3(1.328, 1.328, 1.328), 'Visual': {'Color': (0.800000011920929, 0.7900000214576721, 0.8299999833106995, 1.0), 'Model': 'models/props/Trunk_square'}}, '1167785099.21kmuller': {'Type': 'Trunks', 'DisableCollision': True, 'Hpr': VBase3(86.244, 0.0, 0.0), 'Pos': Point3(2.848, 6.854, 2.641), 'Scale': VBase3(1.212, 1.212, 1.212), 'Visual': {'Model': 'models/props/Trunk_rounded_2'}}, '1167785202.19kmuller': {'Type': 'Prop_Groups', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-13.186, -25.221, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.35, 0.35, 0.35, 1.0), 'Model': 'models/props/prop_group_G'}}, '1167785325.35kmuller': {'Type': 'Prop_Groups', 'DisableCollision': False, 'Hpr': VBase3(0.0, 0.0, 0.0), 'Pos': Point3(-5.251, 8.176, 12.07), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/prop_group_A'}}, '1167785354.14kmuller': {'Type': 'Prop_Groups', 'DisableCollision': False, 'Hpr': VBase3(104.949, 0.0, 0.0), 'Pos': Point3(-6.18, -15.155, 12.07), 'Scale': VBase3(0.724, 0.724, 0.724), 'Visual': {'Color': (0.78, 0.7, 0.59, 1.0), 'Model': 'models/props/prop_group_G'}}, '1167785512.3kmuller': {'Type': 'Interior_furnishings', 'DisableCollision': True, 'Hpr': VBase3(92.178, 0.0, 0.0), 'Pos': Point3(3.098, 0.68, 0.0), 'Scale': VBase3(1.89, 1.89, 1.89), 'Visual': {'Model': 'models/props/stove_potbelly'}}, '1167785607.47kmuller': {'Type': 'Furniture', 'DisableCollision': False, 'Hpr': VBase3(-4.102, 0.0, 0.0), 'Pos': Point3(15.064, 29.499, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.49000000953674316, 0.47999998927116394, 0.4000000059604645, 1.0), 'Model': 'models/props/cabinet_shanty'}}, '1167785669.93kmuller': {'Type': 'Furniture', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(24.255, 29.866, 0.005), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.59, 0.59, 0.49, 1.0), 'Model': 'models/props/table_shanty'}}, '1167785733.82kmuller': {'Type': 'Furniture', 'DisableCollision': False, 'Hpr': VBase3(-73.849, 0.0, 0.0), 'Pos': Point3(24.887, 27.495, -0.038), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/chair_shanty'}}, '1167785799.32kmuller': {'Type': 'Crate', 'DisableCollision': True, 'Hpr': VBase3(-33.083, 0.0, 0.0), 'Pos': Point3(-16.959, 26.878, 12.07), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.5899999737739563, 0.5899999737739563, 0.49000000953674316, 1.0), 'Model': 'models/props/crates_group_1'}}, '1167785908.85kmuller': {'Type': 'Tools', 'DisableCollision': False, 'Hpr': VBase3(0.748, 6.607, -6.475), 'Pos': Point3(20.373, -30.67, 0.22), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.800000011920929, 0.7900000214576721, 0.8299999833106995, 1.0), 'Model': 'models/props/broom'}}, '1167785969.36kmuller': {'Type': 'Crate', 'DisableCollision': True, 'Hpr': VBase3(93.5, 0.0, 0.0), 'Pos': Point3(-2.559, -29.914, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.44999998807907104, 0.46000000834465027, 0.5099999904632568, 1.0), 'Model': 'models/props/crates_group_1'}}, '1167786054.93kmuller': {'Type': 'Furniture', 'DisableCollision': True, 'Hpr': VBase3(-141.425, 3.579, 4.475), 'Pos': Point3(4.487, -2.466, 0.302), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/chair_shanty'}}, '1167786166.41kmuller': {'Type': 'Crate', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Objects': {'1167786189.04kmuller': {'Type': 'Trunks', 'DisableCollision': True, 'Hpr': VBase3(-113.151, 0.0, 0.0), 'Pos': Point3(0.696, 0.25, 6.191), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/Trunk_rounded_2'}}}, 'Pos': Point3(38.107, -28.85, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/crates_group_2'}}, '1167786176.07kmuller': {'Type': 'Crate', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Objects': {'1167786198.72kmuller': {'Type': 'Trunks', 'DisableCollision': True, 'Hpr': VBase3(-91.163, 0.0, 0.0), 'Pos': Point3(0.905, -0.641, 2.74), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.85, 0.79, 1.0, 1.0), 'Model': 'models/props/Trunk_rounded'}}}, 'Pos': Point3(40.275, -25.249, -0.015), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.800000011920929, 0.7900000214576721, 0.8299999833106995, 1.0), 'Model': 'models/props/crate'}}, '1167786208.66kmuller': {'Type': 'Trunks', 'DisableCollision': True, 'Hpr': VBase3(-145.519, 0.0, 0.0), 'Pos': Point3(34.734, -29.301, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/Trunk_rounded'}}, '1167786359.93kmuller': {'Type': 'Crate', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-5.052, -8.153, 12.112), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/crates_group_2'}}, '1167786376.6kmuller': {'Type': 'Crate', 'DisableCollision': False, 'Hpr': VBase3(9.654, 0.0, 0.0), 'Objects': {}, 'Pos': Point3(-5.948, 9.523, 12.07), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.5899999737739563, 0.5899999737739563, 0.49000000953674316, 1.0), 'Model': 'models/props/crate_04'}}, '1167866790.57kmuller': {'Type': 'Furniture', 'DisableCollision': True, 'Holiday': '', 'Hpr': VBase3(90.126, 0.0, 0.0), 'Pos': Point3(14.134, -4.896, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Color': (0.8999999761581421, 0.8999999761581421, 0.699999988079071, 1.0), 'Model': 'models/props/counter_shanty'}}, '1167866812.07kmuller': {'Type': 'Furniture', 'DisableCollision': True, 'Hpr': VBase3(89.428, 0.0, 0.0), 'Pos': Point3(14.133, 5.559, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (0.8999999761581421, 0.8999999761581421, 0.699999988079071, 1.0), 'Model': 'models/props/counter_shanty'}}, '1167866949.6kmuller': {'Type': 'Crate', 'DisableCollision': True, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(3.993, -25.609, 0.002), 'Scale': VBase3(0.77, 0.77, 0.77), 'Visual': {'Color': (0.699999988079071, 0.699999988079071, 0.699999988079071, 1.0), 'Model': 'models/props/crates_group_2'}}, '1167867134.67kmuller': {'Type': 'Prop_Groups', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-14.119, 22.598, 0.0), 'Scale': VBase3(0.918, 0.918, 0.918), 'Visual': {'Color': (0.37, 0.35, 0.35, 1.0), 'Model': 'models/props/prop_group_G'}}, '1167951025.38kmuller': {'Type': 'Interior_furnishings', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-0.484, -0.234, 0.0), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/interior_wall_shanty'}}, '1167970781.36kmuller': {'Type': 'Light_Fixtures', 'DisableCollision': False, 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(13.146, 1.41, 16.96), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/chandelier_jail'}}, '1167970845.8kmuller': {'Type': 'Light_Fixtures', 'DisableCollision': False, 'Hpr': VBase3(-90.787, 0.0, 0.0), 'Pos': Point3(-1.74, 5.115, 4.943), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/lamp_candle'}}, '1167970934.47kmuller': {'Type': 'Light_Fixtures', 'DisableCollision': False, 'Hpr': VBase3(173.499, 0.0, 0.0), 'Pos': Point3(19.116, -28.833, 10.855), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/lamp_candle'}}, '1174678243.43dzlu': {'Type': 'Light - Dynamic', 'Attenuation': '0.005', 'ConeAngle': '60.0000', 'DropOff': '0.0000', 'FlickRate': 0.5, 'Flickering': True, 'Hpr': VBase3(52.322, -39.411, -26.119), 'Intensity': '0.9697', 'LightType': 'DIRECTIONAL', 'Pos': Point3(38.519, -4.522, 9.634), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (1, 1, 1, 1), 'Model': 'models/props/light_tool_bulb'}}, '1174678336.35dzlu': {'Type': 'Light - Dynamic', 'Attenuation': '0.005', 'ConeAngle': '60.0000', 'DropOff': '0.0000', 'FlickRate': 0.5, 'Flickering': True, 'Hpr': VBase3(177.382, -43.236, -9.914), 'Intensity': '0.4545', 'LightType': 'DIRECTIONAL', 'Pos': Point3(28.883, 22.108, 9.972), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Color': (1, 1, 1, 1), 'Model': 'models/props/light_tool_bulb'}}, '1185409859.14kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(50.85, 0.0, 0.0), 'Pos': Point3(-15.275, 25.187, 11.578), 'Scale': VBase3(2.101, 2.101, 2.101), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1185409943.56kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(0.0, 0.0, 0.0), 'Pos': Point3(2.564, 1.041, -0.68), 'Scale': VBase3(1.0, 4.213, 2.062), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_cube'}}, '1185410005.71kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(0.0, 0.0, 0.0), 'Pos': Point3(14.164, 0.218, -0.335), 'Scale': VBase3(0.797, 4.272, 1.0), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_cube'}}, '1185410087.71kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-136.712, 0.0, 0.0), 'Pos': Point3(36.76, -25.861, -0.235), 'Scale': VBase3(1.671, 1.507, 1.507), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1185410136.21kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-72.882, 0.0, 0.0), 'Pos': Point3(8.884, 30.327, 11.762), 'Scale': VBase3(0.377, 1.0, 1.0), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1185410197.79kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-131.292, 0.0, 0.0), 'Pos': Point3(-8.46, -8.085, 11.538), 'Scale': VBase3(0.583, 1.0, 1.079), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1185410250.46kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(-15.111, 0.0, 0.0), 'Pos': Point3(-7.712, -21.201, 11.826), 'Scale': VBase3(0.416, 1.0, 1.162), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1185410321.0kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(162.788, 0.0, 0.0), 'Pos': Point3(-13.021, -17.989, -0.142), 'Scale': VBase3(1.724, 1.442, 1.442), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1185410366.92kmuller': {'Type': 'Collision Barrier', 'DisableCollision': False, 'Hpr': VBase3(89.735, 0.0, 0.0), 'Pos': Point3(-10.749, 29.389, -0.519), 'Scale': VBase3(0.417, 1.0, 1.543), 'Visual': {'Model': 'models/misc/pir_m_prp_lev_cambarrier_plane'}}, '1257816816.97caoconno': {'Type': 'Door Locator Node', 'Name': 'door_locator', 'Hpr': VBase3(90.0, 0.0, 0.0), 'Pos': Point3(41.986, -7.423, 0.079), 'Scale': VBase3(1.0, 1.0, 1.0)}, '1257816894.69caoconno': {'Type': 'Holiday', 'DisableCollision': False, 'Holiday': 'WinterFestival', 'Hpr': VBase3(86.69, 0.0, 0.0), 'Pos': Point3(0.939, -11.586, 8.859), 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Model': 'models/props/pir_m_prp_hol_decoSwag_winter08'}}, '1257816960.16caoconno': {'Type': 'Holiday', 'DisableCollision': False, 'Holiday': 'WinterFestival', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(31.115, 21.163, 8.859), 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Model': 'models/props/pir_m_prp_hol_decoSwag_winter08'}}, '1257817043.88caoconno': {'Type': 'Holiday', 'DisableCollision': False, 'Holiday': 'WinterFestival', 'Hpr': VBase3(86.69, 0.0, 0.0), 'Pos': Point3(0.99, 11.935, 8.859), 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Model': 'models/props/pir_m_prp_hol_decoSwag_winter08'}}, '1257817076.3caoconno': {'Type': 'Holiday', 'DisableCollision': False, 'Holiday': 'WinterFestival', 'Hpr': VBase3(9.327, 0.0, 0.0), 'Pos': Point3(1.849, -5.05, 8.825), 'Scale': VBase3(0.548, 0.548, 0.548), 'VisSize': '', 'Visual': {'Color': (0.9300000071525574, 0.75, 1.0, 1.0), 'Model': 'models/props/pir_m_prp_hol_decoGift01_winter08'}}, '1257817102.41caoconno': {'Type': 'Holiday', 'DisableCollision': False, 'Holiday': 'WinterFestival', 'Hpr': VBase3(-2.396, 0.0, 0.0), 'Pos': Point3(1.767, -5.172, 5.685), 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Color': (1.0, 0.800000011920929, 0.800000011920929, 1.0), 'Model': 'models/props/pir_m_prp_hol_decoGift04_winter08'}}, '1257817129.64caoconno': {'Type': 'Holiday', 'DisableCollision': False, 'Holiday': 'WinterFestival', 'Hpr': VBase3(-42.609, 0.0, 0.0), 'Pos': Point3(1.46, -6.4, 8.825), 'Scale': VBase3(0.848, 0.848, 0.848), 'VisSize': '', 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/props/pir_m_prp_hol_decoGift01_winter08'}}, '1257817179.86caoconno': {'Type': 'Holiday', 'DisableCollision': False, 'Holiday': 'WinterFestival', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(1.46, -8.095, 8.863), 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Model': 'models/props/pir_m_prp_hol_decoGift01_winter08'}}, '1257817213.33caoconno': {'Type': 'Holiday', 'DisableCollision': False, 'Holiday': 'WinterFestival', 'Hpr': VBase3(-2.396, 0.0, 0.0), 'Pos': Point3(1.643, -8.147, 5.685), 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Color': (1.0, 0.800000011920929, 0.800000011920929, 1.0), 'Model': 'models/props/pir_m_prp_hol_decoGift04_winter08'}}, '1257817216.0caoconno': {'Type': 'Holiday', 'DisableCollision': False, 'Holiday': 'WinterFestival', 'Hpr': VBase3(-2.396, 0.0, 0.0), 'Pos': Point3(1.703, -6.692, 5.685), 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Color': (1.0, 0.800000011920929, 0.800000011920929, 1.0), 'Model': 'models/props/pir_m_prp_hol_decoGift04_winter08'}}, '1257817253.33caoconno': {'Type': 'Holiday', 'DisableCollision': False, 'Holiday': 'WinterFestival', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(14.61, -6.849, 3.585), 'Scale': VBase3(1.478, 1.478, 1.478), 'VisSize': '', 'Visual': {'Color': (0.6000000238418579, 0.800000011920929, 1.0, 1.0), 'Model': 'models/props/pir_m_prp_hol_decoGift02_winter08'}}, '1257817324.8caoconno': {'Type': 'Holiday', 'DisableCollision': False, 'Holiday': 'WinterFestival', 'Hpr': VBase3(174.295, 2.868, 0.0), 'Pos': Point3(19.01, -29.411, 9.2), 'Scale': VBase3(1.0, 1.0, 1.0), 'VisSize': '', 'Visual': {'Model': 'models/props/pir_m_prp_hol_decoSwag_winter08'}}}, 'Visual': {'Model': 'models/buildings/interior_shanty_store'}}}, 'Node Links': [], 'Layers': {}, 'ObjectIds': {'1156268617.43dzlu0z': '["Objects"]["1156268617.43dzlu0z"]', '1167780096.44kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167780096.44kmuller"]', '1167782443.0kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167782443.0kmuller"]', '1167782540.07kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167782540.07kmuller"]', '1167782751.35kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167782751.35kmuller"]', '1167784962.05kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167784962.05kmuller"]', '1167785011.94kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167785011.94kmuller"]', '1167785099.21kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167785099.21kmuller"]', '1167785202.19kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167785202.19kmuller"]', '1167785325.35kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167785325.35kmuller"]', '1167785354.14kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167785354.14kmuller"]', '1167785512.3kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167785512.3kmuller"]', '1167785607.47kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167785607.47kmuller"]', '1167785669.93kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167785669.93kmuller"]', '1167785733.82kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167785733.82kmuller"]', '1167785799.32kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167785799.32kmuller"]', '1167785908.85kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167785908.85kmuller"]', '1167785969.36kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167785969.36kmuller"]', '1167786054.93kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167786054.93kmuller"]', '1167786166.41kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167786166.41kmuller"]', '1167786176.07kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167786176.07kmuller"]', '1167786189.04kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167786166.41kmuller"]["Objects"]["1167786189.04kmuller"]', '1167786198.72kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167786176.07kmuller"]["Objects"]["1167786198.72kmuller"]', '1167786208.66kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167786208.66kmuller"]', '1167786359.93kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167786359.93kmuller"]', '1167786376.6kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167786376.6kmuller"]', '1167866790.57kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167866790.57kmuller"]', '1167866812.07kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167866812.07kmuller"]', '1167866949.6kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167866949.6kmuller"]', '1167867134.67kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167867134.67kmuller"]', '1167951025.38kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167951025.38kmuller"]', '1167970781.36kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167970781.36kmuller"]', '1167970845.8kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167970845.8kmuller"]', '1167970934.47kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1167970934.47kmuller"]', '1174678243.43dzlu': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1174678243.43dzlu"]', '1174678336.35dzlu': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1174678336.35dzlu"]', '1185409859.14kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1185409859.14kmuller"]', '1185409943.56kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1185409943.56kmuller"]', '1185410005.71kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1185410005.71kmuller"]', '1185410087.71kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1185410087.71kmuller"]', '1185410136.21kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1185410136.21kmuller"]', '1185410197.79kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1185410197.79kmuller"]', '1185410250.46kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1185410250.46kmuller"]', '1185410321.0kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1185410321.0kmuller"]', '1185410366.92kmuller': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1185410366.92kmuller"]', '1257816816.97caoconno': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1257816816.97caoconno"]', '1257816894.69caoconno': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1257816894.69caoconno"]', '1257816960.16caoconno': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1257816960.16caoconno"]', '1257817043.88caoconno': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1257817043.88caoconno"]', '1257817076.3caoconno': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1257817076.3caoconno"]', '1257817102.41caoconno': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1257817102.41caoconno"]', '1257817129.64caoconno': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1257817129.64caoconno"]', '1257817179.86caoconno': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1257817179.86caoconno"]', '1257817213.33caoconno': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1257817213.33caoconno"]', '1257817216.0caoconno': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1257817216.0caoconno"]', '1257817253.33caoconno': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1257817253.33caoconno"]', '1257817324.8caoconno': '["Objects"]["1156268617.43dzlu0z"]["Objects"]["1257817324.8caoconno"]'}} extraInfo = {'camPos': Point3(0, -14, 0), 'camHpr': VBase3(0, 0, 0), 'focalLength': 0.7921423316, 'skyState': -2, 'fog': 0}
3,081.428571
21,142
0.667269
2,966
21,570
4.797033
0.166217
0.028395
0.028254
0.023053
0.57176
0.488473
0.415589
0.344462
0.319019
0.31424
0
0.275597
0.070422
21,570
7
21,143
3,081.428571
0.433993
0.010941
0
0
0
0
0.548711
0.285701
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
6
c6bd7dd57eb1c83aa87d9f71a887a057b46dfdca
202
py
Python
pypy/module/faulthandler/test/test_ztranslation.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
381
2018-08-18T03:37:22.000Z
2022-02-06T23:57:36.000Z
pypy/module/faulthandler/test/test_ztranslation.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
16
2018-09-22T18:12:47.000Z
2022-02-22T20:03:59.000Z
pypy/module/faulthandler/test/test_ztranslation.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
55
2015-08-16T02:41:30.000Z
2022-03-20T20:33:35.000Z
from pypy.objspace.fake.checkmodule import checkmodule def test_faulthandler_translates(): import pypy.module._vmprof.interp_vmprof # register_code_object_class() checkmodule('faulthandler')
33.666667
77
0.811881
23
202
6.826087
0.73913
0
0
0
0
0
0
0
0
0
0
0
0.108911
202
5
78
40.4
0.872222
0.138614
0
0
0
0
0.069767
0
0
0
0
0
0
1
0.25
true
0
0.5
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
6
c6c9f259eefcaaf590d56519cba920993211f218
61
py
Python
model/__init__.py
IsaacChanghau/SequenceToSequence
2f84a0d825b01161dbb03671727dbf3bf4857bc8
[ "MIT" ]
12
2018-05-16T17:54:29.000Z
2021-04-06T14:33:33.000Z
model/__init__.py
IsaacChanghau/SequenceToSequence
2f84a0d825b01161dbb03671727dbf3bf4857bc8
[ "MIT" ]
3
2019-02-18T05:46:24.000Z
2021-03-16T14:09:39.000Z
model/__init__.py
IsaacChanghau/SequenceToSequence
2f84a0d825b01161dbb03671727dbf3bf4857bc8
[ "MIT" ]
4
2018-07-12T09:14:29.000Z
2019-10-11T04:45:23.000Z
from model.config import * from model.seq2seq_model import *
20.333333
33
0.803279
9
61
5.333333
0.555556
0.375
0
0
0
0
0
0
0
0
0
0.018868
0.131148
61
2
34
30.5
0.886792
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
05aec27066eaac5db64d249bdc47980214680ac6
138
py
Python
matrx/objects/__init__.py
matrx-software/matrx
5b36ef1018e85172dc88cd7467e3087ef94c58ba
[ "MIT" ]
6
2020-03-02T10:42:34.000Z
2021-05-16T12:21:25.000Z
matrx/objects/__init__.py
matrx-software/matrx
5b36ef1018e85172dc88cd7467e3087ef94c58ba
[ "MIT" ]
262
2020-02-27T13:37:40.000Z
2022-03-29T11:44:57.000Z
matrx/objects/__init__.py
matrx-software/matrx
5b36ef1018e85172dc88cd7467e3087ef94c58ba
[ "MIT" ]
3
2020-02-27T12:59:22.000Z
2021-12-10T13:53:58.000Z
from matrx.objects.agent_body import AgentBody from matrx.objects.env_object import EnvObject from matrx.objects.standard_objects import *
46
46
0.869565
20
138
5.85
0.55
0.230769
0.410256
0
0
0
0
0
0
0
0
0
0.07971
138
3
47
46
0.92126
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
af01d602a50f62c3750a21271c599ab38490efa0
10,773
py
Python
modules/dbnd/test_dbnd/tracking/user_commands/test_log_dataset_op.py
dmytrostriletskyi/dbnd
d4a5f5167523e80439c9d64182cdc87b40cbc48f
[ "Apache-2.0" ]
null
null
null
modules/dbnd/test_dbnd/tracking/user_commands/test_log_dataset_op.py
dmytrostriletskyi/dbnd
d4a5f5167523e80439c9d64182cdc87b40cbc48f
[ "Apache-2.0" ]
null
null
null
modules/dbnd/test_dbnd/tracking/user_commands/test_log_dataset_op.py
dmytrostriletskyi/dbnd
d4a5f5167523e80439c9d64182cdc87b40cbc48f
[ "Apache-2.0" ]
null
null
null
import itertools import json import os import pandas as pd import pytest from more_itertools import one from dbnd import task from dbnd._core.constants import DbndDatasetOperationType from dbnd._core.tracking.metrics import log_dataset_op from dbnd.api.tracking_api import LogDatasetArgs from dbnd.testing.helpers_mocks import set_tracking_context from test_dbnd.tracking.tracking_helpers import get_log_datasets, get_log_metrics THIS_DIR = os.path.dirname(os.path.abspath(__file__)) @pytest.mark.usefixtures(set_tracking_context.__name__) class TestLogDataSetOpMetrics(object): @pytest.mark.parametrize( "preview,schema", # repeat the tests for each combination of the flags -> 2^2 tests == 4 tests!! list(itertools.product([False, True], repeat=2)), ) def test_log_dataset_op_nested_json_data( self, mock_channel_tracker, preview, schema, ): with open(THIS_DIR + "/nested_data.json", encoding="utf-8-sig") as f: nested_json = pd.json_normalize(json.load(f)) @task() def task_log_dataset_op_nested_json_data(): log_dataset_op( op_path="/my/path/to/nested_data.json", op_type=DbndDatasetOperationType.read, data=nested_json, with_schema=schema, with_preview=preview, with_histograms=True, with_partition=False, ) task_log_dataset_op_nested_json_data() metrics_info = list(get_log_metrics(mock_channel_tracker)) map_metrics = { metric_info["metric"].key: metric_info["metric"] for metric_info in metrics_info } print( "preview={preview}, schema={schema}".format(preview=preview, schema=schema,) ) for m in metrics_info: print(m["metric"], m["metric"].value) assert "my.path.to.nested_data.json.shape0" in map_metrics assert map_metrics["my.path.to.nested_data.json.shape0"].value == 3 assert "my.path.to.nested_data.json.shape1" in map_metrics assert map_metrics["my.path.to.nested_data.json.shape1"].value == 22 # Tests for schema # ------------------ # Only report schema if the schema flag is on, the schema source is the user. assert if_and_only_if( schema, ( "my.path.to.nested_data.json.schema" in map_metrics and map_metrics["my.path.to.nested_data.json.schema"].source == "user" ), ) # # Size flag is used only with schema flag # together they add a size.bytes calculation in the schema value assert if_and_only_if( schema, ( "my.path.to.nested_data.json.schema" in map_metrics and "size.bytes" in map_metrics["my.path.to.nested_data.json.schema"].value ), ) # Tests for preview # ------------------ # When preview is on we expect to have a the value sent with a preview assert if_and_only_if( preview, ( "my.path.to.nested_data.json" in map_metrics and "value_preview" in map_metrics["my.path.to.nested_data.json"].value ), ) # # When we have both preview and schema we expect to have a schema part of the value metric assert if_and_only_if( (preview and schema), ( "my.path.to.nested_data.json" in map_metrics and "schema" in map_metrics["my.path.to.nested_data.json"].value ), ) # # When we preview, schema and size we expect the the preview inside the schema inside the value # would have size.bytes value assert if_and_only_if( (preview and schema), ( "my.path.to.nested_data.json" in map_metrics and "schema" in map_metrics["my.path.to.nested_data.json"].value and "size.bytes" in map_metrics["my.path.to.nested_data.json"].value["schema"] ), ) # # Only report columns if the schema flag is on, the schema columns is expected. expected_columns = { "greeting", "longitude", "eyeColor", "address", "name", "age", "isActive", "tags", "guid", "about", "index", "balance", "email", "phone", "registered", "latitude", "_id", "favoriteFruit", "picture", "gender", "friends", "company", } if schema: assert set( map_metrics["my.path.to.nested_data.json.schema"].value["columns"] ) == set(expected_columns) @pytest.mark.parametrize( "preview,schema", # repeat the tests for each combination of the flags -> 2^2 tests == 4 tests!! list(itertools.product([False, True], repeat=2)), ) def test_log_dataset_op_flat_json_data( self, mock_channel_tracker, preview, schema, ): with open(THIS_DIR + "/flat_data.json", encoding="utf-8-sig") as f: flat_json = json.load(f) @task() def task_log_dataset_op_flat_json_data(): log_dataset_op( op_path="/my/path/to/flat_data.json", op_type=DbndDatasetOperationType.read, data=flat_json, with_schema=schema, with_preview=preview, with_histograms=False, with_partition=False, ) task_log_dataset_op_flat_json_data() metrics_info = list(get_log_metrics(mock_channel_tracker)) map_metrics = { metric_info["metric"].key: metric_info["metric"] for metric_info in metrics_info } print( "preview={preview}, schema={schema}".format(preview=preview, schema=schema,) ) for m in metrics_info: print(m["metric"], m["metric"].value) assert "my.path.to.flat_data.json.shape0" in map_metrics assert map_metrics["my.path.to.flat_data.json.shape0"].value == 6 assert "my.path.to.flat_data.json.shape1" in map_metrics assert map_metrics["my.path.to.flat_data.json.shape1"].value == 5 # Tests for schema # ------------------ # Only report schema if the schema flag is on, the schema source is the user. assert if_and_only_if( schema, ( "my.path.to.flat_data.json.schema" in map_metrics and map_metrics["my.path.to.flat_data.json.schema"].source == "user" ), ) # # Size flag is used only with schema flag # together they add a size.bytes calculation in the schema value assert if_and_only_if( schema, ( "my.path.to.flat_data.json.schema" in map_metrics and "size.bytes" in map_metrics["my.path.to.flat_data.json.schema"].value ), ) # Tests for preview # ------------------ # When preview is on we expect to have a the value sent with a preview assert if_and_only_if( preview, ( "my.path.to.flat_data.json" in map_metrics and "value_preview" in map_metrics["my.path.to.flat_data.json"].value ), ) # # When we have both preview and schema we expect to have a schema part of the value metric assert if_and_only_if( (preview and schema), ( "my.path.to.flat_data.json" in map_metrics and "schema" in map_metrics["my.path.to.flat_data.json"].value ), ) # # When we preview, schema and size we expect the the preview inside the schema inside the value # would have size.bytes value assert if_and_only_if( (preview and schema), ( "my.path.to.flat_data.json" in map_metrics and "schema" in map_metrics["my.path.to.flat_data.json"].value and "size.bytes" in map_metrics["my.path.to.flat_data.json"].value["schema"] ), ) # Only report columns if the schema flag is on, the schema columns is expected. expected_columns = { "Leave", "Serial Number", "Employee Markme", "Description", "Company Name", } if schema: assert ( set(map_metrics["my.path.to.flat_data.json.schema"].value["columns"]) == expected_columns ) @pytest.mark.parametrize( "with_histograms,with_stats", # repeat the tests for each combination of the flags -> 2^2 tests == 4 tests!! list(itertools.product([False, True], repeat=2)), ) def test_log_dataset_op_histograms_stats_flags( self, mock_channel_tracker, with_histograms, with_stats, ): # Test with_histograms/with_stats flag for pandas dataframe with open(THIS_DIR + "/nested_data.json", encoding="utf-8-sig") as f: nested_json = pd.json_normalize(json.load(f)) @task() def task_log_dataset_op_nested_json_data(): log_dataset_op( op_path="/my/path/to/nested_data.json", op_type=DbndDatasetOperationType.write, data=nested_json, with_histograms=with_histograms, with_stats=with_stats, ) task_log_dataset_op_nested_json_data() log_dataset_arg: LogDatasetArgs = one(get_log_datasets(mock_channel_tracker)) metrics_info = list(get_log_metrics(mock_channel_tracker)) histograms_metrics = list( filter(lambda m: m["metric"].key.endswith("histograms"), metrics_info) ) if with_histograms and with_stats: assert histograms_metrics assert log_dataset_arg.columns_stats elif with_histograms: assert histograms_metrics assert not log_dataset_arg.columns_stats elif with_stats: assert not histograms_metrics assert log_dataset_arg.columns_stats else: assert not histograms_metrics assert not log_dataset_arg.columns_stats def if_and_only_if(left, right): return not (left ^ right)
34.977273
103
0.572821
1,293
10,773
4.54679
0.129157
0.051709
0.047627
0.042864
0.803198
0.78908
0.786698
0.748597
0.727845
0.665249
0
0.003885
0.331013
10,773
307
104
35.091205
0.81185
0.13998
0
0.485356
0
0
0.176075
0.115505
0
0
0
0
0.117155
1
0.029289
false
0
0.050209
0.004184
0.087866
0.016736
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
af21232ae0ccf6350641c94b57d309c5ca627cf3
245
py
Python
gym_fishing/envs/__init__.py
Ardor-Wu/gym_fishing
db8b9e52c603cab94669e6922855a62c6521f19d
[ "MIT" ]
null
null
null
gym_fishing/envs/__init__.py
Ardor-Wu/gym_fishing
db8b9e52c603cab94669e6922855a62c6521f19d
[ "MIT" ]
null
null
null
gym_fishing/envs/__init__.py
Ardor-Wu/gym_fishing
db8b9e52c603cab94669e6922855a62c6521f19d
[ "MIT" ]
null
null
null
from gym_fishing.envs.fishing_env import FishingEnv from gym_fishing.envs.fishing_cts_env import FishingCtsEnv from gym_fishing.envs.fishing_tipping_env import FishingTippingEnv from gym_fishing.envs.fishing_model_error import FishingModelError
49
66
0.902041
35
245
6
0.4
0.133333
0.266667
0.342857
0.47619
0
0
0
0
0
0
0
0.065306
245
4
67
61.25
0.917031
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
af74a254232e925636839626c226924974370793
203
py
Python
webapp.py
NicolasAbroad/wnscraper
87d5aa8e3a26aa0846a289d378848e1eb1d13304
[ "Apache-2.0" ]
null
null
null
webapp.py
NicolasAbroad/wnscraper
87d5aa8e3a26aa0846a289d378848e1eb1d13304
[ "Apache-2.0" ]
null
null
null
webapp.py
NicolasAbroad/wnscraper
87d5aa8e3a26aa0846a289d378848e1eb1d13304
[ "Apache-2.0" ]
null
null
null
from app import app, db, cli from app.models import users, requesthistory @app.shell_context_processor def make_shell_context(): return {'db': db, 'users': users, 'requesthistory': requesthistory}
25.375
71
0.758621
27
203
5.555556
0.518519
0.093333
0
0
0
0
0
0
0
0
0
0
0.133005
203
7
72
29
0.852273
0
0
0
0
0
0.103448
0
0
0
0
0
0
1
0.2
true
0
0.4
0.2
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
1
1
0
0
6
afabb4c72f1e1e74c2e64f72b683231931a85093
12,831
py
Python
DataCollectors/extract_relevant_papers_from_json.py
mabergerx/SDP500_expert_search
1bbb98e878e935bbd8d3201c0ba555c608e7cc62
[ "CC-BY-4.0" ]
6
2020-10-20T17:22:24.000Z
2021-06-06T08:45:40.000Z
DataCollectors/extract_relevant_papers_from_json.py
mabergerx/SDP500_expert_search
1bbb98e878e935bbd8d3201c0ba555c608e7cc62
[ "CC-BY-4.0" ]
null
null
null
DataCollectors/extract_relevant_papers_from_json.py
mabergerx/SDP500_expert_search
1bbb98e878e935bbd8d3201c0ba555c608e7cc62
[ "CC-BY-4.0" ]
1
2021-11-01T12:37:18.000Z
2021-11-01T12:37:18.000Z
# ============================================================================ # These functions were used to extract relevant paper ID's from a a single OAG # json file, based on a supplied list of relevant paper ID's. # No docstrings or comments are provided as this is a purely data-prep script. # # (c) Mark Berger # ============================================================================ import orjson import pickle import json def load(line): try: return orjson.loads(line) except: return None with open("all_ids_with_collabs_and_refs.pkl", "rb") as f: all_ids = pickle.load(f) with open('0.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('0_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 0.") with open('1.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('1_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 1.") with open('2.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('2_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 2.") with open('3.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('3_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 3.") with open('4.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('4_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 4.") with open('5.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('5_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 5.") with open('6.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('6_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 6.") with open('7.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('7_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 7.") with open('8.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('8_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 8.") with open('9.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('9_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 9.") with open('10.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('10_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 10.") with open('11.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('11_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 11.") with open('12.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('12_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 12.") with open('13.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('13_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 13.") with open('14.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('14_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 14.") with open('15.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('15_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 15.") with open('16.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('16_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 16.") with open('17.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('17_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 17.") with open('18.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('18_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 18.") with open('19.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('19_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 19.") with open('20.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('20_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 20.") with open('21.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('21_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 21.") with open('22.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('22_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 22.") with open('23.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('23_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 23.") with open('24.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('24_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 24.") with open('25.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('25_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 25.") with open('26.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('26_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 26.") with open('27.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('27_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 27.") with open('28.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('28_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 28.") with open('29.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('29_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 29.") with open('30.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('30_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 30.") with open('31.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('31_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 31.") with open('32.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('32_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 32.") with open('33.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('33_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 33.") with open('34.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('34_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 34.") with open('35.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('35_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 35.") with open('36.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('36_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 36.") with open('37.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('37_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 37.") with open('38.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('38_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 38.") with open('39.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('39_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 39.") with open('40.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('40_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 40.") with open('41.json', 'rb') as fin: lines = fin.readlines() json_lines = [ll for ll in [load(l) for l in lines] if ll] rel_lines = [l for l in json_lines if l["id"] in all_ids] with open('41_relevant.json', 'w') as outfile: json.dump(rel_lines, outfile) print("Done with 41.") print("Done all files!")
21.243377
78
0.643286
2,392
12,831
3.342809
0.048077
0.085043
0.052526
0.073537
0.887694
0.887694
0.887694
0.887694
0.887694
0.887694
0
0.021476
0.194373
12,831
603
79
21.278607
0.752056
0.02985
0
0.55082
0
0
0.140032
0.002653
0
0
0
0
0
1
0.003279
false
0
0.009836
0
0.019672
0.140984
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
afd289e75f320d9a943c4ead3179e1197eead5cf
46
py
Python
microbit/__init__.py
whaleygeek/mb-sensor
36bbda2bfb3d75825ef58497c17756eb2e55eb0e
[ "MIT" ]
7
2017-06-20T22:34:24.000Z
2019-07-22T09:49:14.000Z
microbit/__init__.py
whaleygeek/mb-sensor
36bbda2bfb3d75825ef58497c17756eb2e55eb0e
[ "MIT" ]
1
2018-03-15T23:11:04.000Z
2018-03-16T11:22:50.000Z
microbit/__init__.py
whaleygeek/mb-sensor
36bbda2bfb3d75825ef58497c17756eb2e55eb0e
[ "MIT" ]
3
2018-06-26T20:50:15.000Z
2020-03-16T15:34:14.000Z
# __init__.py from .microbit import * # END
7.666667
23
0.673913
6
46
4.5
1
0
0
0
0
0
0
0
0
0
0
0
0.217391
46
5
24
9.2
0.75
0.326087
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
bbe480ea9259f2c4a3b9f60d680faf87c9f34958
21
py
Python
Scripts/caller.py
hasauino/Python
c94ea3a15f8310c95b7aaabaaa82f59dbf748a85
[ "MIT" ]
null
null
null
Scripts/caller.py
hasauino/Python
c94ea3a15f8310c95b7aaabaaa82f59dbf748a85
[ "MIT" ]
null
null
null
Scripts/caller.py
hasauino/Python
c94ea3a15f8310c95b7aaabaaa82f59dbf748a85
[ "MIT" ]
null
null
null
import h print h.hh
5.25
10
0.714286
5
21
3
0.8
0
0
0
0
0
0
0
0
0
0
0
0.238095
21
3
11
7
0.9375
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.5
null
null
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
1
0
0
0
1
0
0
1
0
6
a542561ed4bb2c440be5ed00ab1c4a1c6a0b1813
20,777
py
Python
tests/light_scene_generation_test.py
Robert1991/appdaemon
ba346d5b79d24ae7684390e717c1030e317d7600
[ "Unlicense" ]
null
null
null
tests/light_scene_generation_test.py
Robert1991/appdaemon
ba346d5b79d24ae7684390e717c1030e317d7600
[ "Unlicense" ]
null
null
null
tests/light_scene_generation_test.py
Robert1991/appdaemon
ba346d5b79d24ae7684390e717c1030e317d7600
[ "Unlicense" ]
null
null
null
from apps.lights.scene_generation.light_scene_generation import LightSceneGeneration from apps.lights.scene_generation.light_scene_generation import HSColorState from apps.lights.scene_generation.light_scene_generation import XYColorState from apps.lights.scene_generation.light_scene_generation import RGBColorState from apps.lights.scene_generation.light_scene_generation import LightState from apps.lights.scene_generation.light_scene_generation import LightScene from appdaemontestframework import automation_fixture from unittest.mock import patch, mock_open from mock import Mock @automation_fixture(LightSceneGeneration) def scene_generator(given_that): given_that.passed_arg('homeassistant_base_dir') \ .is_set_to('/path/to/ha_config') given_that.passed_arg('input_select_base_dir') \ .is_set_to('dir/in/ha_config/input_select') given_that.passed_arg('input_number_base_dir') \ .is_set_to('dir/in/ha_config/input_number') def test_create_scene(scene_generator, given_that, assert_that, time_travel): stored_light_scenes = [{"name": "Bedroom Test Scene", "entities": {"light.test_light": {"state": "off"}}}] given_that.state_of("light.group").is_set_to( "on", {"entity_id": ["light.1", "light.2"]}) given_that.state_of("light.1").is_set_to( "on", {"brightness": 200, "xy_color": [0.5, 0.7], "hs_color": [0.1, 0.44]}) given_that.state_of("light.2").is_set_to("off") with patch('builtins.open', mock_open(read_data="data")) as open_file_mock: with patch('yaml.full_load', side_effect=[stored_light_scenes]): with patch('yaml.dump') as yaml_dump_patch: with patch('os.path.isfile', side_effect=[False]): event_attributes = {"scene_name": "New Scene", "scene_group_prefix": "Bedroom", "light_group": "light.group", "event_name": "CREATE_SCENE"} scene_generator.delegate_scene_creator_event( "SCENE_CREATOR", event_attributes, None) assert_scene_file_written(open_file_mock, yaml_dump_patch, assert_that, [{"name": "Bedroom Test Scene", "entities": {"light.test_light": {"state": "off"}}}, {"name": "Bedroom New Scene", "entities": {"light.1": {"state": "on", "brightness": 200, "xy_color": [0.5, 0.7], "hs_color": [0.1, 0.44]}, "light.2": {"state": "off"}}}]) assert_input_select_written(open_file_mock, yaml_dump_patch, assert_that, {"bedroom_automatic_light_scene_generated": {"options": ["New Scene", "Test Scene"]}, "bedroom_light_scene_generated": {"options": ["New Scene", "Test Scene"]}, "bedroom_scene_generator_light_scene_generated": {"options": ["New Scene", "Test Scene"]}}) def test_create_scene_with_light_intensity_control_and_time_based_scene_control(scene_generator, given_that, assert_that, time_travel): stored_light_scenes = [{"name": "Bedroom Test Scene", "entities": {"light.test_light": {"state": "off"}}}] stored_light_scene_light_intensitys = { "bedroom_test_scene_light_intensity": {"initial": 10, "max": 100, "min": 0, "step": 1}} given_that.state_of("light.group").is_set_to( "on", {"entity_id": ["light.1", "light.2"]}) given_that.state_of("light.1").is_set_to( "on", {"brightness": 200, "xy_color": [0.5, 0.7], "hs_color": [0.1, 0.44]}) given_that.state_of("light.2").is_set_to("off") given_that.state_of( "input_number.light_intensity_control").is_set_to("45.0") given_that.state_of( "input_select.time_based_scene_control").is_set_to("45.0") given_that.state_of('input_select.time_based_scene_control') \ .is_set_to('work_light_start_time/Work Light', {'options': ['work_light_start_time/work_light_input_select', 'night_light_start_time/night_light_input_select']}) with patch('builtins.open', mock_open(read_data="data")) as open_file_mock: with patch('yaml.full_load', side_effect=[stored_light_scenes, stored_light_scene_light_intensitys]): with patch('yaml.dump') as yaml_dump_mock: with patch('os.path.isfile', side_effect=[True]): event_attributes = {"scene_name": "New Scene", "scene_group_prefix": "Bedroom", "light_group": "light.group", "light_intensity_control": "input_number.light_intensity_control", "timebased_scene_config": "input_select.time_based_scene_control", "event_name": "CREATE_SCENE"} scene_generator.delegate_scene_creator_event( "SCENE_CREATOR", event_attributes, None) assert_scene_file_written(open_file_mock, yaml_dump_mock, assert_that, [{"name": "Bedroom Test Scene", "entities": {"light.test_light": {"state": "off"}}}, {"name": "Bedroom New Scene", "entities": {"light.1": {"state": "on", "brightness": 200, "xy_color": [0.5, 0.7], "hs_color": [0.1, 0.44]}, "light.2": {"state": "off"}, "input_number.light_intensity_control": "45"}}]) assert_input_select_written(open_file_mock, yaml_dump_mock, assert_that, {"bedroom_automatic_light_scene_generated": {"options": ["New Scene", "Test Scene"]}, "bedroom_light_scene_generated": {"options": ["New Scene", "Test Scene"]}, "bedroom_scene_generator_light_scene_generated": {"options": ["New Scene", "Test Scene"]}, "work_light_input_select": {"options": ["New Scene", "Test Scene"]}, "night_light_input_select": {"options": ["New Scene", "Test Scene"]}}) assert_input_numbers_written(open_file_mock, yaml_dump_mock, assert_that, {"bedroom_test_scene_light_intensity": {"initial": 10, "max": 100, "min": 0, "step": 1}, "bedroom_new_scene_light_intensity": {"initial": 45, "max": 100, "min": 0, "step": 1}}) def test_delete_scene(scene_generator, given_that, assert_that, time_travel): stored_light_scenes = [{"name": "Bedroom Test Scene", "entities": {"light.test_light": {"state": "off"}}}, {"name": "Bedroom To Be Kept", "entities": {"light.test_light": {"state": "on", "brightness": 80}}, "light.other_light": {"state": "on", "brightness": 80, "xy_color": [0.701, 0.299]}}] with patch('builtins.open', mock_open(read_data="data")) as open_file_mock: with patch('yaml.full_load', side_effect=[stored_light_scenes]): with patch('yaml.dump') as yaml_dump_patch: with patch('os.path.isfile', side_effect=[False]) as is_file_path: event_attributes = {"scene_name": "Test Scene", "scene_group_prefix": "Bedroom", "event_name": "DELETE_SCENE"} scene_generator.delegate_scene_creator_event( "SCENE_CREATOR", event_attributes, None) assert_scene_file_written(open_file_mock, yaml_dump_patch, assert_that, [{"name": "Bedroom To Be Kept", "entities": {"light.test_light": {"state": "on", "brightness": 80}}, "light.other_light": {"state": "on", "brightness": 80, "xy_color": [0.701, 0.299]}}]) assert_input_select_written(open_file_mock, yaml_dump_patch, assert_that, {"bedroom_automatic_light_scene_generated": {"options": ["To Be Kept"]}, "bedroom_light_scene_generated": {"options": ["To Be Kept"]}, "bedroom_scene_generator_light_scene_generated": {"options": ["To Be Kept"]}}) is_file_path.assert_called_once_with( "/path/to/ha_config/dir/in/ha_config/input_number/bedroom_generated.yaml") assert_that("input_number/reload").was_not.called() def test_update_scene(scene_generator, given_that, assert_that, time_travel): stored_light_scenes = [{"name": "Bedroom Test Scene", "entities": {"light.1": {"state": "off"}}}, {"name": "Bedroom To Be Updated", "entities": {"light.1": {"state": "on", "brightness": 80}, "light.2": {"state": "on", "brightness": 80, "xy_color": [0.701, 0.299]}}}] with patch('builtins.open', mock_open(read_data="data")) as open_file_mock: with patch('yaml.full_load', side_effect=[stored_light_scenes]): with patch('yaml.dump') as yaml_dump_patch: with patch('os.path.isfile', side_effect=[False]): given_that.state_of("light.group").is_set_to( "on", {"entity_id": ["light.1", "light.2"]}) given_that.state_of("light.1").is_set_to( "on", {"brightness": 200, "xy_color": [0.5, 0.7], "hs_color": [0.1, 0.44]}) given_that.state_of("light.2").is_set_to("off") event_attributes = {"scene_name": "To Be Updated", "scene_group_prefix": "Bedroom", "light_group": "light.group", "light_intensity_control": "", "event_name": "UPDATE_SCENE"} scene_generator.delegate_scene_creator_event( "SCENE_CREATOR", event_attributes, None) assert_scene_file_written(open_file_mock, yaml_dump_patch, assert_that, [{"name": "Bedroom Test Scene", "entities": {"light.1": {"state": "off"}}}, {"name": "Bedroom To Be Updated", "entities": {"light.1": {"state": "on", "brightness": 200, "xy_color": [0.5, 0.7], "hs_color": [0.1, 0.44]}, "light.2": {"state": "off"}}}]) def test_update_scene_with_light_intensity_control(scene_generator, given_that, assert_that, time_travel): stored_light_scenes = [{"name": "Bedroom Test Scene", "entities": {"light.1": {"state": "off"}, "input_number.light_intensity_control": "10.0"}}, {"name": "Bedroom To Be Updated", "entities": {"light.1": {"state": "on", "brightness": 80}, "light.2": { "state": "on", "brightness": 80, "xy_color": [0.701, 0.299]}, "input_number.light_intensity_control": "70.0"}}] stored_light_scene_light_intensitys = { "bedroom_test_scene_light_intensity": {"initial": 10, "max": 100, "min": 0, "step": 1}, "bedroom_to_be_updated_light_intensity": {"initial": 22, "max": 100, "min": 0, "step": 1}} given_that.state_of( "input_number.light_intensity_control").is_set_to("45.0") with patch('builtins.open', mock_open(read_data="data")) as open_file_mock: with patch('yaml.full_load', side_effect=[stored_light_scenes, stored_light_scene_light_intensitys]): with patch('yaml.dump') as yaml_dump_mock: with patch('os.path.isfile', side_effect=[True]): with patch('appdaemon.plugins.hass.hassapi.Hass.set_value') as set_value_mock: given_that.state_of("light.group").is_set_to( "on", {"entity_id": ["light.1", "light.2"]}) given_that.state_of("light.1").is_set_to( "on", {"brightness": 200, "xy_color": [0.5, 0.7], "hs_color": [0.1, 0.44]}) given_that.state_of("light.2").is_set_to("off") event_attributes = {"scene_name": "To Be Updated", "scene_group_prefix": "Bedroom", "light_group": "light.group", "light_intensity_control": "input_number.light_intensity_control", "event_name": "UPDATE_SCENE"} scene_generator.delegate_scene_creator_event( "SCENE_CREATOR", event_attributes, None) assert_scene_file_written(open_file_mock, yaml_dump_mock, assert_that, [{"name": "Bedroom Test Scene", "entities": {"light.1": {"state": "off"}, "input_number.light_intensity_control": "10.0"}}, {"name": "Bedroom To Be Updated", "entities": {"light.1": {"state": "on", "brightness": 200, "xy_color": [0.5, 0.7], "hs_color": [0.1, 0.44]}, "light.2": {"state": "off"}, "input_number.light_intensity_control": "45"}}]) assert_input_numbers_written(open_file_mock, yaml_dump_mock, assert_that, {"bedroom_test_scene_light_intensity": {"initial": 10, "max": 100, "min": 0, "step": 1}, "bedroom_to_be_updated_light_intensity": {"initial": 45, "max": 100, "min": 0, "step": 1}}, 1) set_value_mock.assert_called_once_with( "input_number.bedroom_to_be_updated_light_intensity", 45) def assert_input_numbers_written(open_file_mock, yaml_dump_mock, assert_that, expected_input_numbers, input_file_write_call_index=2): assert open_file_mock.call_args_list[input_file_write_call_index + 1][0][0] \ == "/path/to/ha_config/dir/in/ha_config/input_number/bedroom_generated.yaml" assert yaml_dump_mock.call_args_list[input_file_write_call_index][0][0] == expected_input_numbers assert_that("input_number/reload").was.called() def assert_scene_file_written(open_file_mock, yaml_dump_mock, assert_that, expected_scene): assert open_file_mock.call_args_list[0][0][0] == "/path/to/ha_config/bedroom/scenes.yaml" assert open_file_mock.call_args_list[1][0][0] == "/path/to/ha_config/bedroom/scenes.yaml" assert yaml_dump_mock.call_args_list[0][0][0] == expected_scene assert_that("scene/reload").was.called() def assert_input_select_written(open_file_mock, yaml_dump_patch, assert_that, exected_input_select, input_file_write_call_index=2): assert open_file_mock.call_args_list[input_file_write_call_index][0][0] \ == "/path/to/ha_config/dir/in/ha_config/input_select/bedroom_generated.yaml" assert yaml_dump_patch.call_args_list[1][0][0] == exected_input_select assert_that("input_select/reload").was.called() def test_light_scene_to_dict(): firstLightState = LightState("light.foo", "on", [RGBColorState( 200, 100, 200), XYColorState(0.01, 0.15)], None, None) secondLightState = LightState("light.foo2", "on", [], 25, 100) actual_scene_dict = LightScene("Test Scene", "Living Room", [ firstLightState, secondLightState]).to_dict() expected_scene_dict = {"name": "Living Room Test Scene", "entities": {}} expected_scene_dict["entities"].update(firstLightState.to_dict_value()) expected_scene_dict["entities"].update(secondLightState.to_dict_value()) assert actual_scene_dict == expected_scene_dict def test_light_scene_to_dict_empty_states(): assert LightScene("Test Scene", "Living Room", []).to_dict() == { "name": "Living Room Test Scene", "entities": {}} def test_light_scene_get_light_scene_name(): assert LightScene("Test Scene", "Living Room", [] ).get_light_scene_name() == "Living Room Test Scene" def test_light_scene_get_name_normalized(): assert LightScene("Test Scene", "Living Room", [] ).get_name_normalized() == "test_scene" def test_light_scene_get_group_normalized(): assert LightScene("Test Scene", "Living Room", [] ).get_group_normalized() == "living_room" def test_light_scene_create_light_scene_input_select_name(): assert LightScene("Test Scene", "bedroom", []).create_light_scene_input_select_name( "post Fix") == "bedroom_post_fix" def test_light_scene_create_light_scene_path(): assert LightScene("Test Scene", "bedroom", []).create_light_scene_path( "hass/conf") == "hass/conf/bedroom/scenes.yaml" def test_light_state_create_light_state_with_color_state_and_brightness(): state_data = {"entity_id": "light.foo", "state": "on", "attributes": {"xy_color": [0.01, 0.15], "brightness": 125}} assert LightState.create_light_state(state_data).to_dict_value( ) == {"light.foo": {"state": "on", "xy_color": [0.01, 0.15], "brightness": 125}} def test_light_state_create_light_state(): state_data = {"entity_id": "light.foo", "state": "on", "attributes": {}} assert LightState.create_light_state(state_data).to_dict_value() == { "light.foo": {"state": "on"}} def test_light_state_to_dict_value(): assert LightState("light.foo", "on", [RGBColorState(200, 100, 200), XYColorState(0.01, 0.15)], None, None).to_dict_value() \ == {"light.foo": {"state": "on", "rgb_color": [200, 100, 200], "xy_color": [0.01, 0.15]}} def test_light_state_to_dict_value_with_no_brightness(): assert LightState("light.foo", "on", [RGBColorState(200, 100, 200)], None, None).to_dict_value() \ == {"light.foo": {"state": "on", "rgb_color": [200, 100, 200]}} def test_light_state_to_dict_value_with_brightness_and_empty_color_states(): assert LightState("light.foo", "on", [], 25, None).to_dict_value() == { "light.foo": {"state": "on", "brightness": 25}} def test_light_state_to_dict_value_with_brightness_and_color_temp(): assert LightState("light.foo", "on", [], 25, 100).to_dict_value() == { "light.foo": {"state": "on", "brightness": 25, "color_temp" : 100}} def test_light_state_to_dict_value_with_no_brightness_and_empty_color_states(): assert LightState("light.foo", "on", [], None, None).to_dict_value() == { "light.foo": {"state": "on"}} def test_light_state_to_dict_value_with_no_brightness_and_None_color_states(): assert LightState("light.foo", "on", None, None, None).to_dict_value() == { "light.foo": {"state": "on"}} def test_color_state_rgb_color_to_dict_value(): assert RGBColorState(200, 100, 200).to_dict_value() == { "rgb_color": [200, 100, 200]} def test_color_state_xy_color_to_dict_value(): assert XYColorState(0.01, 0.15).to_dict_value() == { "xy_color": [0.01, 0.15]} def test_color_state_hs_color_to_dict_value(): assert HSColorState(0.01, 0.15).to_dict_value() == { "hs_color": [0.01, 0.15]}
62.020896
162
0.561005
2,351
20,777
4.58188
0.068482
0.027571
0.024508
0.023765
0.877182
0.838377
0.803101
0.760026
0.718344
0.663479
0
0.028633
0.304086
20,777
334
163
62.206587
0.71637
0
0
0.505576
0
0
0.254368
0.087019
0
0
0
0
0.182156
1
0.100372
false
0.011152
0.033457
0
0.133829
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
a5a08684e564d307439e2e963774e29911058af4
40
py
Python
line_token_sample.py
STomoya/NetworkConnectionChecker
dd6596a257aeedabe0bd1e2a4b2bbf256fb92b92
[ "MIT" ]
null
null
null
line_token_sample.py
STomoya/NetworkConnectionChecker
dd6596a257aeedabe0bd1e2a4b2bbf256fb92b92
[ "MIT" ]
null
null
null
line_token_sample.py
STomoya/NetworkConnectionChecker
dd6596a257aeedabe0bd1e2a4b2bbf256fb92b92
[ "MIT" ]
null
null
null
LINE_TOKEN = 'THEoTOKENoFORoLINEoNOTIFY'
40
40
0.875
3
40
11.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.05
40
1
40
40
0.894737
0
0
0
0
0
0.609756
0.609756
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
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
3c4ea5934355fcd2e15507f4ee8f6c47aeb549e9
80
py
Python
sources/of2005_1305_ca.py
kueda/underfoot
b9d1a05fced70c494e582280c577bf5e16b73f77
[ "MIT" ]
4
2018-10-12T18:48:55.000Z
2022-03-10T05:30:18.000Z
sources/of2005_1305_ca.py
kueda/underfoot
b9d1a05fced70c494e582280c577bf5e16b73f77
[ "MIT" ]
4
2020-07-16T09:44:48.000Z
2020-11-21T08:09:53.000Z
sources/of2005_1305_ca.py
kueda/underfoot
b9d1a05fced70c494e582280c577bf5e16b73f77
[ "MIT" ]
null
null
null
from of2005_1305 import process_usgs_states process_usgs_states(states=["CA"])
20
43
0.8375
12
80
5.166667
0.666667
0.354839
0.548387
0
0
0
0
0
0
0
0
0.108108
0.075
80
3
44
26.666667
0.72973
0
0
0
0
0
0.025
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
b1fdf0e10628966d5fd0662e5ee3a8c7b78254cc
675
py
Python
airwaveapiclient/__init__.py
bp/airwaveapiclient
00b229ccc8d887010f9afcc1937813f32402d29c
[ "MIT" ]
28
2015-12-21T15:36:38.000Z
2021-08-14T18:21:24.000Z
airwaveapiclient/__init__.py
bp/airwaveapiclient
00b229ccc8d887010f9afcc1937813f32402d29c
[ "MIT" ]
5
2017-06-28T19:07:31.000Z
2019-12-02T00:12:41.000Z
airwaveapiclient/__init__.py
bp/airwaveapiclient
00b229ccc8d887010f9afcc1937813f32402d29c
[ "MIT" ]
13
2016-04-25T21:54:23.000Z
2020-11-19T06:56:32.000Z
# -*- coding: utf-8 -*- """airwaveapiclient.""" import sys # pylint: disable=unused-import,import-error,relative-import,no-name-in-module if sys.version_info.major == 2: from airwaveapiclient import AirWaveAPIClient from airwaveapiclient import APList from airwaveapiclient import APDetail from airwaveapiclient import Report from ap_graph import APGraph else: from airwaveapiclient.airwaveapiclient import AirWaveAPIClient from airwaveapiclient.airwaveapiclient import APList from airwaveapiclient.airwaveapiclient import APDetail from airwaveapiclient.airwaveapiclient import Report from airwaveapiclient.ap_graph import APGraph
32.142857
78
0.794074
72
675
7.402778
0.388889
0.371482
0.195122
0.315197
0.525328
0
0
0
0
0
0
0.003478
0.148148
675
20
79
33.75
0.923478
0.173333
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.846154
0
0.846154
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
594613030f576463afaa56dff3ed6ecfdc6094c8
42
py
Python
fml/__init__.py
aliciawyy/financial_machine_learning
00c20c250976104dd8ea1484697064272c8231b7
[ "MIT" ]
null
null
null
fml/__init__.py
aliciawyy/financial_machine_learning
00c20c250976104dd8ea1484697064272c8231b7
[ "MIT" ]
null
null
null
fml/__init__.py
aliciawyy/financial_machine_learning
00c20c250976104dd8ea1484697064272c8231b7
[ "MIT" ]
null
null
null
from .label import * from .utils import *
14
20
0.714286
6
42
5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.190476
42
2
21
21
0.882353
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
3cf629cf31669cbb4aef1282e2981b5e486b94d4
84
py
Python
utils/models/__init__.py
rogerwangcs/Predicting-BOLD-Signal
c73293f547dfe8aed645ebffbe0800b50226f43c
[ "MIT" ]
null
null
null
utils/models/__init__.py
rogerwangcs/Predicting-BOLD-Signal
c73293f547dfe8aed645ebffbe0800b50226f43c
[ "MIT" ]
null
null
null
utils/models/__init__.py
rogerwangcs/Predicting-BOLD-Signal
c73293f547dfe8aed645ebffbe0800b50226f43c
[ "MIT" ]
null
null
null
from SimpleConvAE import * from SimpleConvAESmall import * from FeatureNet import *
21
31
0.821429
9
84
7.666667
0.555556
0.289855
0
0
0
0
0
0
0
0
0
0
0.142857
84
3
32
28
0.958333
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
59b52cf17f3e59b94e065ebb874621d403a1f4df
184
py
Python
test/torchscript_consistency_cuda_test.py
Nayef211/audio
241ab1e8284e589262f510ee9411baf2bc374ded
[ "BSD-2-Clause" ]
null
null
null
test/torchscript_consistency_cuda_test.py
Nayef211/audio
241ab1e8284e589262f510ee9411baf2bc374ded
[ "BSD-2-Clause" ]
null
null
null
test/torchscript_consistency_cuda_test.py
Nayef211/audio
241ab1e8284e589262f510ee9411baf2bc374ded
[ "BSD-2-Clause" ]
null
null
null
from common_utils import define_test_suites from torchscript_consistency_impl import Functional, Transforms define_test_suites(globals(), [Functional, Transforms], devices=['cuda'])
30.666667
73
0.836957
22
184
6.681818
0.681818
0.136054
0.217687
0
0
0
0
0
0
0
0
0
0.081522
184
5
74
36.8
0.869822
0
0
0
0
0
0.021739
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
ab6771af1a7d882daa48991d60f462c443b57ee2
36
py
Python
wing-database/wing_database/__init__.py
drongo-framework/feathers
6bc8300f03efcd10df26edadb15d509242e5baf2
[ "MIT" ]
1
2017-05-15T17:10:26.000Z
2017-05-15T17:10:26.000Z
wing-database/wing_database/__init__.py
drongo-framework/feathers
6bc8300f03efcd10df26edadb15d509242e5baf2
[ "MIT" ]
null
null
null
wing-database/wing_database/__init__.py
drongo-framework/feathers
6bc8300f03efcd10df26edadb15d509242e5baf2
[ "MIT" ]
null
null
null
from .module import Database, MONGO
18
35
0.805556
5
36
5.8
1
0
0
0
0
0
0
0
0
0
0
0
0.138889
36
1
36
36
0.935484
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
abbb101b5368e99621e9f7f54a32055cacd961b1
29
py
Python
qiki/version.py
BobStein/qiki-python
e3050a158c4514a053ae04cc080671aae2f80b30
[ "CC0-1.0" ]
null
null
null
qiki/version.py
BobStein/qiki-python
e3050a158c4514a053ae04cc080671aae2f80b30
[ "CC0-1.0" ]
null
null
null
qiki/version.py
BobStein/qiki-python
e3050a158c4514a053ae04cc080671aae2f80b30
[ "CC0-1.0" ]
null
null
null
"""0.0.1.2021.1126.1746.06"""
29
29
0.586207
7
29
2.428571
0.857143
0
0
0
0
0
0
0
0
0
0
0.586207
0
29
1
29
29
0
0.793103
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
6
abdff24140f332f146c2089ca6188bc942415cd3
440
py
Python
peakondrake/__init__.py
tommbendall/peakondrake
27cfd2a9d5fa8d05b235e35d009237830cda246f
[ "MIT" ]
null
null
null
peakondrake/__init__.py
tommbendall/peakondrake
27cfd2a9d5fa8d05b235e35d009237830cda246f
[ "MIT" ]
null
null
null
peakondrake/__init__.py
tommbendall/peakondrake
27cfd2a9d5fa8d05b235e35d009237830cda246f
[ "MIT" ]
null
null
null
from peakondrake.diagnostic_equations import * # noqa from peakondrake.equations import * # noqa from peakondrake.experiment import * # noqa from peakondrake.initial_conditions import * # noqa from peakondrake.outputting import * # noqa from peakondrake.simulation import * # noqa from peakondrake.stochastic_functions import * # noqa from peakondrake.peakon_equations import * # noqa
48.888889
54
0.711364
44
440
7.022727
0.318182
0.38835
0.317152
0.566343
0.220065
0
0
0
0
0
0
0
0.234091
440
8
55
55
0.916914
0.088636
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
6
f9f3a3a42787f651308c0f15825f1cdaa1c116ee
88
py
Python
src/sicpy/circuit/__init__.py
shawwn/sicpy
9d48130fcfc4971c4e21dc4a4b8891778c946ee5
[ "MIT" ]
2
2022-02-21T21:03:23.000Z
2022-02-21T21:03:28.000Z
src/sicpy/circuit/__init__.py
shawwn/sicpy
9d48130fcfc4971c4e21dc4a4b8891778c946ee5
[ "MIT" ]
null
null
null
src/sicpy/circuit/__init__.py
shawwn/sicpy
9d48130fcfc4971c4e21dc4a4b8891778c946ee5
[ "MIT" ]
null
null
null
from .wire import * from .agenda import * from .constants import * from .gates import *
17.6
24
0.727273
12
88
5.333333
0.5
0.46875
0
0
0
0
0
0
0
0
0
0
0.181818
88
4
25
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
e6242f1a8548d341fd9d765490de0e76105087c8
231
py
Python
app/logout-trigger.py
TanmayC2001/Serverin-Devops-Integration
5aeb0ea249a8e87c4a8aa12c0c7165636ce9d44d
[ "MIT" ]
null
null
null
app/logout-trigger.py
TanmayC2001/Serverin-Devops-Integration
5aeb0ea249a8e87c4a8aa12c0c7165636ce9d44d
[ "MIT" ]
null
null
null
app/logout-trigger.py
TanmayC2001/Serverin-Devops-Integration
5aeb0ea249a8e87c4a8aa12c0c7165636ce9d44d
[ "MIT" ]
null
null
null
profile = 'docker' if profile == 'aws': from . import control_aws_logout elif profile == 'docker': from . import control_dock_logout elif profile == 'hadoop': from . import control_hadoop_logout else: pass
23.1
40
0.670996
28
231
5.321429
0.464286
0.201342
0.342282
0
0
0
0
0
0
0
0
0
0.233766
231
9
41
25.666667
0.841808
0
0
0
0
0
0.094595
0
0
0
0
0
0
1
0
false
0.111111
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
0
1
1
0
0
0
0
6
e634ae8612f8870b0df55eca49855794820c1e28
48
py
Python
BotErrors/NonExistentKeywordError.py
juanamari94/FlaqueadorV2Bot
21f1b473df0687190c3e9bf394152be35a64aa45
[ "MIT" ]
null
null
null
BotErrors/NonExistentKeywordError.py
juanamari94/FlaqueadorV2Bot
21f1b473df0687190c3e9bf394152be35a64aa45
[ "MIT" ]
null
null
null
BotErrors/NonExistentKeywordError.py
juanamari94/FlaqueadorV2Bot
21f1b473df0687190c3e9bf394152be35a64aa45
[ "MIT" ]
null
null
null
class NonExistentKeywordError(Exception): pass
16
41
0.854167
4
48
10.25
1
0
0
0
0
0
0
0
0
0
0
0
0.083333
48
2
42
24
0.931818
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
6
5537d5df154437e54ac1044dd6f48f0550ba7236
3,325
py
Python
scripts/artifacts/smyFiles.py
deagler4n6/ALEAPP
c25692dac34e2382d1a8d51e5fbb2a39998dc638
[ "MIT" ]
187
2020-02-22T23:35:32.000Z
2022-03-31T13:46:24.000Z
scripts/artifacts/smyFiles.py
deagler4n6/ALEAPP
c25692dac34e2382d1a8d51e5fbb2a39998dc638
[ "MIT" ]
65
2020-02-25T18:22:47.000Z
2022-03-27T21:41:21.000Z
scripts/artifacts/smyFiles.py
deagler4n6/ALEAPP
c25692dac34e2382d1a8d51e5fbb2a39998dc638
[ "MIT" ]
47
2020-02-24T22:33:35.000Z
2022-03-11T05:19:42.000Z
import sqlite3 import textwrap from scripts.artifact_report import ArtifactHtmlReport from scripts.ilapfuncs import logfunc, tsv, timeline, is_platform_windows, open_sqlite_db_readonly def get_smyFiles(files_found, report_folder, seeker, wrap_text): for file_found in files_found: file_found = str(file_found) if file_found.endswith('.db'): break db = open_sqlite_db_readonly(file_found) cursor = db.cursor() try: cursor.execute(''' select datetime(mDate / 1000, 'unixepoch'), mName, mFullPath, mIsHidden, mTrashed, _source, _description, _from_s_browser from download_history ''') all_rows = cursor.fetchall() usageentries = len(all_rows) except: usageentries = 0 if usageentries > 0: report = ArtifactHtmlReport('My Files DB - Download History') report.start_artifact_report(report_folder, 'My Files DB - Download History') report.add_script() data_headers = ('Timestamp','Name','Full Path','Is Hidden','Trashed?', 'Source', 'Description', 'From S Browser?' ) # Don't remove the comma, that is required to make this a tuple as there is only 1 element data_list = [] for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7])) report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = f'My Files db - Download History' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = f'My Files DB - Download History' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No My Files DB Download History data available') try: cursor.execute(''' select datetime(mDate / 1000, 'unixepoch'), mName, mFullPath, mIsHidden, mTrashed, _source, _description, _from_s_browser from recent_files ''') all_rows = cursor.fetchall() usageentries = len(all_rows) except: usageentries = 0 if usageentries > 0: report = ArtifactHtmlReport('My Files DB - Recent Files') report.start_artifact_report(report_folder, 'My Files DB - Recent Files') report.add_script() data_headers = ('Timestamp','Name','Full Path','Is Hidden','Trashed?', 'Source', 'Description', 'From S Browser?' ) # Don't remove the comma, that is required to make this a tuple as there is only 1 element data_list = [] for row in all_rows: data_list.append((row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7])) report.write_artifact_data_table(data_headers, data_list, file_found) report.end_artifact_report() tsvname = f'My Files db - Recent Files' tsv(report_folder, data_headers, data_list, tsvname) tlactivity = f'My Files DB - Recent Files' timeline(report_folder, tlactivity, data_list, data_headers) else: logfunc('No My Files DB Recent Files data available') db.close() return
34.635417
214
0.615639
402
3,325
4.895522
0.273632
0.035569
0.045732
0.043191
0.802846
0.789634
0.736789
0.736789
0.736789
0.690041
0
0.013091
0.28782
3,325
96
215
34.635417
0.81799
0.053233
0
0.683544
0
0
0.292753
0
0
0
0
0
0
1
0.012658
false
0
0.050633
0
0.075949
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
e971a08986857c2da6cfb6e3462b09239a5c7c02
2,523
py
Python
test.py
gautierdag/pytorch-attentive-lm
d08ce1813a5ee575c0aac86773cd95aa174ab5e1
[ "MIT" ]
16
2019-01-28T16:39:52.000Z
2021-12-25T11:07:55.000Z
test.py
MarkWuCL/pytorch-attentive-lm
d08ce1813a5ee575c0aac86773cd95aa174ab5e1
[ "MIT" ]
1
2021-09-14T22:14:28.000Z
2021-09-15T16:12:43.000Z
test.py
MarkWuCL/pytorch-attentive-lm
d08ce1813a5ee575c0aac86773cd95aa174ab5e1
[ "MIT" ]
6
2019-01-25T00:08:33.000Z
2022-02-15T06:47:54.000Z
from main import main # Reproduces results from paper params_merity = ["--embedding-size", '400', '--hidden-size', '400', '--n-layers', '3', '--batch-size', '20', '--epochs', '500', '--seed', '123', '--log-interval', '200', '--patience', '5', '--lr', '30.0', '--rnn-dropout', '0.25', '--tie-weights', '--input-dropout', '0.4', '--file-name', 'merity', '--no-positional-attention'] main(params_merity) params_attentive_lm = ["--embedding-size", '400', '--hidden-size', '400', '--n-layers', '2', '--batch-size', '32', '--epochs', '500', '--seed', '123', '--log-interval', '200', '--patience', '6', '--lr', '30.0', '--rnn-dropout', '0.2', '--tie-weights', '--file-name', 'salton', '--attention', '--no-positional-attention'] main(params_attentive_lm) positional_lm = ["--embedding-size", '400', '--hidden-size', '400', '--n-layers', '2', '--batch-size', '32', '--epochs', '500', '--seed', '123', '--rnn-dropout', '0.2', '--log-interval', '200', '--lr', '30.0', '--tie-weights', '--file-name', 'positional', '--patience', '5'] main(positional_lm) params_merity = ["--embedding-size", '400', '--hidden-size', '400', '--n-layers', '3', '--batch-size', '20', '--epochs', '750', '--seed', '123', '--log-interval', '200', '--patience', '5', '--lr', '30.0', '--rnn-dropout', '0.2', '--tie-weights', '--file-name', 'wiki_merity', '--no-positional-attention', '--dataset', 'wiki-02'] main(params_merity) params_attentive_lm = ["--embedding-size", '400', '--hidden-size', '400', '--n-layers', '2', '--batch-size', '32', '--epochs', '500', '--seed', '123', '--log-interval', '200', '--patience', '6', '--lr', '30.0', '--rnn-dropout', '0.2', '--tie-weights', '--file-name', 'wiki_salton', '--attention', '--no-positional-attention', '--dataset', 'wiki-02'] main(params_attentive_lm) positional_lm = ["--embedding-size", '400', '--hidden-size', '400', '--n-layers', '2', '--batch-size', '32', '--epochs', '500', '--seed', '123', '--rnn-dropout', '0.2', '--log-interval', '200', '--lr', '30.0', '--tie-weights', '--file-name', 'wiki_positional', '--patience', '5', '--dataset', 'wiki-02'] main(positional_lm)
54.847826
99
0.473642
270
2,523
4.355556
0.188889
0.071429
0.081633
0.112245
0.85034
0.785714
0.785714
0.785714
0.72534
0.72534
0
0.079979
0.241776
2,523
45
100
56.066667
0.534762
0.011494
0
0.628571
0
0
0.47512
0.040128
0
0
0
0
0
1
0
false
0
0.028571
0
0.028571
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
e9959e6abca7aa8179c39b04de4060b0bf8136ff
34
py
Python
tagging/__init__.py
supunkamburugamuva/xblock-tagging
9ade4ab9ebd61f901b93cd3a3eaf358d318f70f1
[ "MIT" ]
null
null
null
tagging/__init__.py
supunkamburugamuva/xblock-tagging
9ade4ab9ebd61f901b93cd3a3eaf358d318f70f1
[ "MIT" ]
null
null
null
tagging/__init__.py
supunkamburugamuva/xblock-tagging
9ade4ab9ebd61f901b93cd3a3eaf358d318f70f1
[ "MIT" ]
null
null
null
from .tagging import TaggingXBlock
34
34
0.882353
4
34
7.5
1
0
0
0
0
0
0
0
0
0
0
0
0.088235
34
1
34
34
0.967742
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
e9b38ef48da94088238b2e4a92afe8df563bb2a2
141
py
Python
run.py
Ylyndar-Fajor/Ylyndar-Fajor-cat
5ef6a8ddf51710910f3974380d69074676e5d1cb
[ "MIT" ]
null
null
null
run.py
Ylyndar-Fajor/Ylyndar-Fajor-cat
5ef6a8ddf51710910f3974380d69074676e5d1cb
[ "MIT" ]
null
null
null
run.py
Ylyndar-Fajor/Ylyndar-Fajor-cat
5ef6a8ddf51710910f3974380d69074676e5d1cb
[ "MIT" ]
null
null
null
import subprocess subprocess.call("wget -O code.sh https://gitlab.com/isekai2robe/18-8-2021/-/raw/main/code.sh && bash code.sh", shell=True)
47
122
0.744681
24
141
4.375
0.791667
0.171429
0
0
0
0
0
0
0
0
0
0.061069
0.070922
141
2
123
70.5
0.740458
0
0
0
0
0.5
0.64539
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
6
e9c14addc2d04ab5f14f3dd7b80bbb8490ac8435
116
py
Python
siteDjango/views.py
ledroid/gitDjango
cef6096a3e309bfc94b2b8586cf96de07abc36b0
[ "MIT" ]
null
null
null
siteDjango/views.py
ledroid/gitDjango
cef6096a3e309bfc94b2b8586cf96de07abc36b0
[ "MIT" ]
null
null
null
siteDjango/views.py
ledroid/gitDjango
cef6096a3e309bfc94b2b8586cf96de07abc36b0
[ "MIT" ]
null
null
null
from django.shortcuts import render def post_list(request): return render(request, 'django/post_list.html', {})
29
55
0.758621
16
116
5.375
0.6875
0.186047
0
0
0
0
0
0
0
0
0
0
0.12069
116
4
55
29
0.843137
0
0
0
0
0
0.179487
0.179487
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
75836bcde1745a032a642e96b16aff4b4335f038
2,760
py
Python
amo2kinto/tests/test_kinto.py
Mozilla-GitHub-Standards/9856eb0fa59d2f9b39dc3c83d0f31961057b7f0ddf57ba213fd01b9b0f99c4cc
abbd2d8874b79fc12a0d8b6570593c8a6dbc2e68
[ "Apache-2.0" ]
5
2016-07-06T21:35:06.000Z
2019-05-15T22:36:24.000Z
amo2kinto/tests/test_kinto.py
Mozilla-GitHub-Standards/9856eb0fa59d2f9b39dc3c83d0f31961057b7f0ddf57ba213fd01b9b0f99c4cc
abbd2d8874b79fc12a0d8b6570593c8a6dbc2e68
[ "Apache-2.0" ]
63
2016-05-11T09:15:16.000Z
2021-10-15T16:44:23.000Z
amo2kinto/tests/test_kinto.py
mozilla-services/kinto2xml
ae8aee28c9a2b15e19a21553eb031ae32f673de2
[ "Apache-2.0" ]
6
2018-02-01T14:13:04.000Z
2020-07-13T05:36:57.000Z
import mock from kinto_http.exceptions import KintoException from amo2kinto.kinto import get_kinto_records def test_get_kinto_records_try_to_create_the_bucket(): kinto_client = mock.MagicMock() kinto_client.create_collection.return_value.status_code = 201 get_kinto_records(kinto_client, mock.sentinel.bucket, mock.sentinel.collection, mock.sentinel.permissions) kinto_client.create_bucket.assert_called_with(id=mock.sentinel.bucket, if_not_exists=True) def test_get_kinto_records_try_to_create_the_bucket_and_keep_going_on_403(): kinto_client = mock.MagicMock() Http403 = mock.MagicMock() Http403.response.status_code = 403 kinto_client.create_bucket.side_effect = KintoException(exception=Http403) get_kinto_records(kinto_client, mock.sentinel.bucket, mock.sentinel.collection, mock.sentinel.permissions) kinto_client.create_bucket.assert_called_with(id=mock.sentinel.bucket, if_not_exists=True) kinto_client.create_collection.assert_called_with( id=mock.sentinel.collection, bucket=mock.sentinel.bucket, permissions=mock.sentinel.permissions, if_not_exists=True) def test_get_kinto_records_try_to_create_the_collection_with_permissions(): kinto_client = mock.MagicMock() kinto_client.create_collection.return_value.status_code = 201 get_kinto_records(kinto_client, mock.sentinel.bucket, mock.sentinel.collection, mock.sentinel.permissions) kinto_client.create_collection.assert_called_with( id=mock.sentinel.collection, bucket=mock.sentinel.bucket, permissions=mock.sentinel.permissions, if_not_exists=True) def test_get_kinto_records_try_to_create_the_collection_and_keep_going_on_403(): kinto_client = mock.MagicMock() Http403 = mock.MagicMock() Http403.response.status_code = 403 kinto_client.create_collection.side_effect = KintoException(exception=Http403) get_kinto_records(kinto_client, mock.sentinel.bucket, mock.sentinel.collection, mock.sentinel.permissions) kinto_client.get_records.assert_called_with(bucket=mock.sentinel.bucket, collection=mock.sentinel.collection) def test_get_kinto_records_gets_a_list_of_records(): kinto_client = mock.MagicMock() kinto_client.create_collection.return_value.status_code = 201 get_kinto_records(kinto_client, mock.sentinel.bucket, mock.sentinel.collection, mock.sentinel.permissions) kinto_client.get_records.assert_called_with( bucket=mock.sentinel.bucket, collection=mock.sentinel.collection)
44.516129
84
0.739855
334
2,760
5.733533
0.146707
0.169191
0.086162
0.084595
0.926371
0.914883
0.914883
0.914883
0.914883
0.914883
0
0.017809
0.186232
2,760
61
85
45.245902
0.834817
0
0
0.695652
0
0
0
0
0
0
0
0
0.130435
1
0.108696
false
0
0.065217
0
0.173913
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
7584936690887b12697715092648edb5eafa258d
247
py
Python
main.py
jrappen/sublime-wkhtmltopdf
f474f48004520c60bf98de19a8f10968c4345b64
[ "0BSD" ]
2
2016-09-11T15:19:58.000Z
2017-03-21T07:19:53.000Z
main.py
jrappen/sublime-wkhtmltopdf
f474f48004520c60bf98de19a8f10968c4345b64
[ "0BSD" ]
2
2016-07-25T15:13:14.000Z
2018-11-23T18:11:15.000Z
main.py
jrappen/sublime-wkhtmltopdf
f474f48004520c60bf98de19a8f10968c4345b64
[ "0BSD" ]
2
2020-04-29T14:54:31.000Z
2022-02-26T20:14:39.000Z
#!/usr/bin/env python # coding: utf-8 from .src import * def plugin_loaded(): from .src.wkhtmltopdf import load_settings load_settings() def plugin_unloaded(): from .src.wkhtmltopdf import unload_settings unload_settings()
13.722222
48
0.712551
32
247
5.3125
0.5625
0.123529
0.211765
0.282353
0
0
0
0
0
0
0
0.005
0.190283
247
17
49
14.529412
0.845
0.137652
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
true
0
0.428571
0
0.714286
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
6
75e482314adf1ffe678d6de1a4525beaeee15591
159
py
Python
Stage_0_Leye.py
jravimicro/team-rosalind-project
4700ef6722c909ce9f5c48d4008ddaaf29d47d46
[ "MIT" ]
22
2020-08-01T22:30:15.000Z
2021-11-16T10:22:22.000Z
Stage_0_Leye.py
jravimicro/team-rosalind-project
4700ef6722c909ce9f5c48d4008ddaaf29d47d46
[ "MIT" ]
1
2020-08-05T10:34:20.000Z
2020-08-05T18:38:56.000Z
Stage_0_Leye.py
jravimicro/team-rosalind-project
4700ef6722c909ce9f5c48d4008ddaaf29d47d46
[ "MIT" ]
21
2020-08-02T03:23:02.000Z
2021-08-06T19:39:36.000Z
#Hacbio first task print("NAME: Olaleye Teslim Olutunde \nE-MAIL: oluola2018@gmail.com \nUSED LANGUAGE: PYTHON \nBIOSTACK: Genomics \nSLACK USERNAME: @Leye")
39.75
138
0.773585
21
159
5.857143
1
0
0
0
0
0
0
0
0
0
0
0.028369
0.113208
159
3
139
53
0.843972
0.106918
0
0
0
1
0.914894
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
6
f937a9740365e5baf298f4eb42c4e0e05a38bcd7
32,615
py
Python
tests/unit/test_remote_environment_with_slurm.py
AntaresSimulatorTeam/antares-launcher
8915f4ef0ce88565bd130b1230574247a9685a65
[ "Apache-2.0" ]
null
null
null
tests/unit/test_remote_environment_with_slurm.py
AntaresSimulatorTeam/antares-launcher
8915f4ef0ce88565bd130b1230574247a9685a65
[ "Apache-2.0" ]
8
2021-04-02T12:16:28.000Z
2021-09-17T08:19:56.000Z
tests/unit/test_remote_environment_with_slurm.py
AntaresSimulatorTeam/antares-launcher
8915f4ef0ce88565bd130b1230574247a9685a65
[ "Apache-2.0" ]
1
2021-03-11T09:08:43.000Z
2021-03-11T09:08:43.000Z
import getpass import socket from pathlib import Path from unittest import mock import pytest from antareslauncher.remote_environnement.iremote_environment import ( NoRemoteBaseDirException, NoLaunchScriptFoundException, KillJobErrorException, SubmitJobErrorException, GetJobStateErrorException, GetJobStateOutputException, ) from antareslauncher.remote_environnement.remote_environment_with_slurm import ( RemoteEnvironmentWithSlurm, ) from antareslauncher.remote_environnement.slurm_script_features import ( SlurmScriptFeatures, ScriptParametersDTO, ) from antareslauncher.study_dto import Modes, StudyDTO class TestRemoteEnvironmentWithSlurm: """ Review all the tests for the Class RemoteEnvironmentWithSlurm Test the get_all_job_state_flags() method: 2 given a study the output obtained from the SLURM command should be correctly interpreted (different tests should be created, one for each treated state): the return values of the methods should be correct 3 given a study an exception should be raised (to be created in iremote_environment.py) if the execute_command fails 4 given a study where study.submitted is not True we should define a return value (for example (false, false, false)) 5 given a study, if execute_command return an error then an exception should be raised 6 if execute command return an output of length <=0 the same exception should be raised """ @pytest.fixture(scope="function") def study(self): study = StudyDTO( time_limit=60, path="study path", n_cpu=42, zipfile_path="zipfile_path", antares_version=700, local_final_zipfile_path="local_final_zipfile_path", run_mode=Modes.antares, ) return study @pytest.fixture(scope="function") def my_remote_env_with_slurm_mock(self): remote_home_dir = "remote_home_dir" connection = mock.Mock() connection.home_dir = remote_home_dir slurm_script_features = SlurmScriptFeatures("slurm_script_path") return RemoteEnvironmentWithSlurm(connection, slurm_script_features) @pytest.mark.unit_test def test_initialise_remote_path_calls_connection_make_dir_with_correct_arguments( self, ): # given remote_home_dir = "remote_home_dir" remote_base_dir = ( str(remote_home_dir) + "/REMOTE_" + getpass.getuser() + "_" + socket.gethostname() ) connection = mock.Mock() connection.home_dir = remote_home_dir connection.make_dir = mock.Mock(return_value=True) connection.check_file_not_empty = mock.Mock(return_value=True) slurm_script_features = SlurmScriptFeatures("slurm_script_path") # when RemoteEnvironmentWithSlurm(connection, slurm_script_features) # then connection.make_dir.assert_called_with(remote_base_dir) @pytest.mark.unit_test def test_when_constructor_is_called_and_remote_base_path_cannot_be_created_then_exception_is_raised( self, ): # given connection = mock.Mock() slurm_script_features = SlurmScriptFeatures("slurm_script_path") # when connection.make_dir = mock.Mock(return_value=False) # then with pytest.raises(NoRemoteBaseDirException): RemoteEnvironmentWithSlurm(connection, slurm_script_features) @pytest.mark.unit_test def test_when_constructor_is_called_then_connection_check_file_not_empty_is_called_with_correct_arguments( self, ): # given connection = mock.Mock() connection.make_dir = mock.Mock(return_value=True) connection.check_file_not_empty = mock.Mock(return_value=True) slurm_script_features = SlurmScriptFeatures("slurm_script_path") # when RemoteEnvironmentWithSlurm(connection, slurm_script_features) # then remote_script_antares = "slurm_script_path" connection.check_file_not_empty.assert_called_with(remote_script_antares) @pytest.mark.unit_test def test_when_constructor_is_called_and_connection_check_file_not_empty_is_false_then_exception_is_raised( self, ): # given remote_home_dir = "/applis/antares/" connection = mock.Mock() connection.home_dir = remote_home_dir connection.make_dir = mock.Mock(return_value=True) slurm_script_features = SlurmScriptFeatures("slurm_script_path") # when connection.check_file_not_empty = mock.Mock(return_value=False) # then with pytest.raises(NoLaunchScriptFoundException): RemoteEnvironmentWithSlurm(connection, slurm_script_features) @pytest.mark.unit_test def test_get_queue_info_calls_connection_execute_command_with_correct_argument( self, my_remote_env_with_slurm_mock ): # given username = "username" host = "host" my_remote_env_with_slurm_mock.connection.username = username my_remote_env_with_slurm_mock.connection.host = host command = f"squeue -u {username} --Format=name:40,state:12,starttime:22,TimeUsed:12,timelimit:12" output = "output" error = None # when my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=(output, error) ) # then assert ( my_remote_env_with_slurm_mock.get_queue_info() == f"{username}@{host}\n" + output ) my_remote_env_with_slurm_mock.connection.execute_command.assert_called_with( command ) @pytest.mark.unit_test def test_when_connection_exec_command_has_an_error_then_get_queue_info_returns_the_error_string( self, my_remote_env_with_slurm_mock ): # given username = "username" my_remote_env_with_slurm_mock.connection.username = username # when output = None error = "error" my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=(output, error) ) # then assert my_remote_env_with_slurm_mock.get_queue_info() is "error" @pytest.mark.unit_test def test_kill_remote_job_execute_scancel_command( self, my_remote_env_with_slurm_mock ): job_id = 42 output = None error = None my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=(output, error) ) command = f"scancel {job_id}" my_remote_env_with_slurm_mock.kill_remote_job(job_id) my_remote_env_with_slurm_mock.connection.execute_command.assert_called_with( command ) @pytest.mark.unit_test def test_when_kill_remote_job_is_called_and_exec_command_returns_error_exception_is_raised( self, my_remote_env_with_slurm_mock ): # when output = None error = "error" my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=(output, error) ) # then with pytest.raises(KillJobErrorException): my_remote_env_with_slurm_mock.kill_remote_job(42) @pytest.mark.unit_test def test_when_submit_job_is_called_then_execute_command_is_called_with_specific_slurm_command( self, my_remote_env_with_slurm_mock, study ): # when output = "output" error = None my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=(output, error) ) my_remote_env_with_slurm_mock.submit_job(study) # then script_params = ScriptParametersDTO( study_dir_name=Path(study.path).name, input_zipfile_name=Path(study.zipfile_path).name, time_limit=60 // 60, n_cpu=study.n_cpu, antares_version=study.antares_version, run_mode=study.run_mode, post_processing=study.post_processing, ) command = ( my_remote_env_with_slurm_mock.slurm_script_features.compose_launch_command( my_remote_env_with_slurm_mock.remote_base_path, script_params ) ) my_remote_env_with_slurm_mock.connection.execute_command.assert_called_with( command ) @pytest.mark.unit_test def test_when_submit_job_is_called_and_receives_submitted_420_returns_job_id_420( self, my_remote_env_with_slurm_mock, study ): # when output = "Submitted 420" error = None my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=(output, error) ) # then assert my_remote_env_with_slurm_mock.submit_job(study) == 420 @pytest.mark.unit_test def test_when_submit_job_is_called_and_receives_error_then_exception_is_raised( self, my_remote_env_with_slurm_mock, study ): # when output = "" error = "error" my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=(output, error) ) # then with pytest.raises(SubmitJobErrorException): my_remote_env_with_slurm_mock.submit_job(study) @pytest.mark.unit_test def test_when_check_job_state_is_called_then_execute_command_is_called_with_correct_command( self, my_remote_env_with_slurm_mock, study ): # given output = "output" error = "" study.submitted = True study.job_id = 42 my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=(output, error) ) # when my_remote_env_with_slurm_mock.get_job_state_flags(study) # then expected_command = ( f"sacct -j {study.job_id} -n --format=state | head -1 " + "| awk -F\" \" '{print $1}'" ) my_remote_env_with_slurm_mock.connection.execute_command.assert_called_with( expected_command ) @pytest.mark.unit_test def test_given_submitted_study__when_check_job_state_gets_empty_output_it_tries_5_times_then_raises_exception( self, my_remote_env_with_slurm_mock, study ): # given output = "" error = "" study.submitted = True study.job_id = 42 # when my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=(output, error) ) # then with pytest.raises(GetJobStateOutputException): my_remote_env_with_slurm_mock.get_job_state_flags(study) tries_number = ( my_remote_env_with_slurm_mock.connection.execute_command.call_count ) assert tries_number == 5 @pytest.mark.unit_test def test_given_a_submitted_study_when_execute_command_returns_an_error_then_an_exception_is_raised( self, my_remote_env_with_slurm_mock, study ): # given output = "output" error = "error" study.submitted = True study.job_id = 42 # when my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=(output, error) ) # then with pytest.raises(GetJobStateErrorException): my_remote_env_with_slurm_mock.get_job_state_flags(study) @pytest.mark.unit_test @pytest.mark.parametrize( "output,expected_started, expected_finished, expected_with_error", [ ("PENDING", False, False, False), ("RUNNING", True, False, False), ("CANCELLED BY DUMMY", True, True, True), ("TIMEOUT", True, True, True), ("COMPLETED", True, True, False), ("FAILED DUMMYWORD", True, True, True), ], ) def test_given_state_when_get_job_state_flags_is_called_then_started_and_finished_and_with_error_are_correct( self, my_remote_env_with_slurm_mock, study, output, expected_started, expected_finished, expected_with_error, ): # given error = "" study.submitted = True study.job_id = 42 my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=(output, error) ) # when ( started, finished, with_error, ) = my_remote_env_with_slurm_mock.get_job_state_flags(study) # then assert started is expected_started assert finished is expected_finished assert with_error is expected_with_error @pytest.mark.unit_test def test_given_a_not_started_study_when_list_remote_logs_is_called_then_returns_empty_list( self, my_remote_env_with_slurm_mock, study ): # given study.started = False my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=("", "") ) # when output = my_remote_env_with_slurm_mock._list_remote_logs(study) # then assert output == [] @pytest.mark.unit_test def test_given_a_started_study_when_list_remote_logs_is_called_then_connection_execute_command_is_called_with_right_argument( self, my_remote_env_with_slurm_mock, study ): # given study.job_id = 24 study.started = True my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=("", "") ) command = ( f"ls {my_remote_env_with_slurm_mock.remote_base_path}/*{study.job_id}*.txt" ) # when my_remote_env_with_slurm_mock._list_remote_logs(study.job_id) # then my_remote_env_with_slurm_mock.connection.execute_command.assert_called_once_with( command ) @pytest.mark.unit_test def test_given_a_started_study_when_list_remote_logs_is_called_and_execute_command_produces_error_then_returns_empty_list( self, my_remote_env_with_slurm_mock, study ): # given study.started = True my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=("output", "error") ) # when output = my_remote_env_with_slurm_mock._list_remote_logs(study) # then assert output == [] @pytest.mark.unit_test def test_given_a_started_study_when_list_remote_logs_is_called_and_execute_command_produces_no_output_then_returns_empty_list( self, my_remote_env_with_slurm_mock, study ): # given study.started = True my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=("", "") ) # when output = my_remote_env_with_slurm_mock._list_remote_logs(study) # then assert output == [] @pytest.mark.unit_test def test_given_a_started_study_when_list_remote_logs_is_called_then_returns_not_empty_list( self, my_remote_env_with_slurm_mock, study ): # given study.started = True my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=("output", "") ) # when output = my_remote_env_with_slurm_mock._list_remote_logs(study) # then assert output @pytest.mark.unit_test def test_given_a_study_when_download_logs_is_called_then_list_remote_logs_is_called( self, my_remote_env_with_slurm_mock, study ): # given my_remote_env_with_slurm_mock._list_remote_logs = mock.Mock(return_value=[]) # when my_remote_env_with_slurm_mock.download_logs(study) # then my_remote_env_with_slurm_mock._list_remote_logs.assert_called_once_with( study.job_id ) @pytest.mark.unit_test def test_given_an_empty_file_list_when_download_logs_is_called_then_connection_download_files_is_not_called( self, my_remote_env_with_slurm_mock, study ): # given my_remote_env_with_slurm_mock._list_remote_logs = mock.Mock(return_value=[]) my_remote_env_with_slurm_mock.connection.download_file = mock.Mock() # when return_flag = my_remote_env_with_slurm_mock.download_logs(study) # then my_remote_env_with_slurm_mock.connection.download_file.assert_not_called() assert return_flag is False @pytest.mark.unit_test def test_given_a_file_list_when_download_logs_is_called_then_connection_download_files_is_called_with_correct_arguments( self, my_remote_env_with_slurm_mock, study ): # given study.job_log_dir = "job_log_dir" file_path = "file" my_remote_env_with_slurm_mock._list_remote_logs = mock.Mock( return_value=[file_path] ) my_remote_env_with_slurm_mock.connection.download_file = mock.Mock() src = my_remote_env_with_slurm_mock.remote_base_path + "/" + file_path dst = str(Path(study.job_log_dir) / file_path) # when my_remote_env_with_slurm_mock.download_logs(study) # then my_remote_env_with_slurm_mock.connection.download_file.assert_called_once_with( src, dst ) @pytest.mark.unit_test def test_given_a_not_clean_study_and_a_file_list_with_two_elements_when_download_logs_is_called_then_connection_download_files_is_called_twice( self, my_remote_env_with_slurm_mock, study ): # given study.remote_server_is_clean = False study.job_log_dir = "job_log_dir" my_remote_env_with_slurm_mock._list_remote_logs = mock.Mock( return_value=["file_path", "file_path2"] ) my_remote_env_with_slurm_mock.connection.download_file = mock.Mock( return_value=True ) # when return_flag = my_remote_env_with_slurm_mock.download_logs(study) # then my_remote_env_with_slurm_mock.connection.download_file.assert_called() assert my_remote_env_with_slurm_mock.connection.download_file.call_count == 2 assert return_flag is True @pytest.mark.unit_test def test_given_a_not_finished_study_when_check_final_zip_not_empty_then_returns_false( self, my_remote_env_with_slurm_mock, study ): # given study.finished = False final_zip_name = "final_zip_name" # when return_flag = my_remote_env_with_slurm_mock.check_final_zip_not_empty( study, final_zip_name ) # then assert return_flag is False @pytest.mark.unit_test def test_given_a_finished_study_when_check_final_zip_not_empty_then_check_file_not_empty_is_called( self, my_remote_env_with_slurm_mock, study ): # given study.finished = True final_zip_name = "final_zip_name" my_remote_env_with_slurm_mock.connection.check_file_not_empty = mock.Mock() # when my_remote_env_with_slurm_mock.check_final_zip_not_empty(study, final_zip_name) # then my_remote_env_with_slurm_mock.connection.check_file_not_empty.assert_called_once() @pytest.mark.unit_test def test_given_a_finished_study_with_empty_file_when_check_final_zip_not_empty_then_return_false( self, my_remote_env_with_slurm_mock, study ): # given study.finished = True final_zip_name = "final_zip_name" my_remote_env_with_slurm_mock.connection.check_file_not_empty = mock.Mock( return_value=False ) # when return_flag = my_remote_env_with_slurm_mock.check_final_zip_not_empty( study, final_zip_name ) # then assert return_flag is False @pytest.mark.unit_test def test_given_a_finished_study_with_not_empty_file_when_check_final_zip_not_empty_then_return_true( self, my_remote_env_with_slurm_mock, study ): # given study.finished = True final_zip_name = "final_zip_name" my_remote_env_with_slurm_mock.connection.check_file_not_empty = mock.Mock( return_value=True ) # when return_flag = my_remote_env_with_slurm_mock.check_final_zip_not_empty( study, final_zip_name ) # then assert return_flag is True @pytest.mark.unit_test def test_given_a_study_when_download_final_zip_is_called_then_check_final_zip_not_empty_is_called_with_correct_argument( self, my_remote_env_with_slurm_mock, study ): # given study.path = "path" study.job_id = 1234 final_zip_name = "finished_" + study.name + "_" + str(study.job_id) + ".zip" my_remote_env_with_slurm_mock.check_final_zip_not_empty = mock.Mock() # when my_remote_env_with_slurm_mock.download_final_zip(study) # then my_remote_env_with_slurm_mock.check_final_zip_not_empty.assert_called_once_with( study, final_zip_name ) @pytest.mark.unit_test def test_given_a_study_with_empty_final_zip_when_download_final_zip_is_called_then_return_none( self, study, my_remote_env_with_slurm_mock ): # given study.path = "path" study.job_id = 1234 my_remote_env_with_slurm_mock.connection.check_file_not_empty = mock.Mock( return_value=False ) # when return_value = my_remote_env_with_slurm_mock.download_final_zip(study) # then assert return_value is None @pytest.mark.unit_test def test_given_a_study_with_final_zip_already_downloaded_when_download_final_zip_is_called_then_return_local_final_zipfile_path( self, study, my_remote_env_with_slurm_mock ): # given study.path = "path" study.job_id = 1234 study.local_final_zipfile_path = "local_final_zipfile_path" my_remote_env_with_slurm_mock.check_final_zip_not_empty = mock.Mock( return_value=True ) # when return_value = my_remote_env_with_slurm_mock.download_final_zip(study) # then assert return_value == study.local_final_zipfile_path @pytest.mark.unit_test def test_given_a_study_with_final_zip_when_download_final_zip_is_called_then_download_file_is_called_with_correct_argument( self, study, my_remote_env_with_slurm_mock ): # given study.finished = True study.job_id = 1234 study.local_final_zipfile_path = "" final_zip_name = ( "finished_" + Path(study.path).name + "_" + str(study.job_id) + ".zip" ) my_remote_env_with_slurm_mock.connection.check_file_not_empty = mock.Mock( return_value=True ) my_remote_env_with_slurm_mock.connection.download_file = mock.Mock() local_final_zipfile_path = str(Path(study.output_dir) / final_zip_name) src = my_remote_env_with_slurm_mock.remote_base_path + "/" + final_zip_name dst = str(local_final_zipfile_path) # when my_remote_env_with_slurm_mock.download_final_zip(study) # then my_remote_env_with_slurm_mock.connection.download_file.assert_called_once_with( src, dst ) @pytest.mark.unit_test def test_given_a_study_with_final_zip_when_download_final_zip_is_called_and_file_is_not_downloaded_then_returns_none( self, study, my_remote_env_with_slurm_mock ): # given study.path = "path" study.job_id = 1234 study.local_final_zipfile_path = "" my_remote_env_with_slurm_mock.check_file_not_empty = mock.Mock( return_value=True ) my_remote_env_with_slurm_mock.connection.download_file = mock.Mock( return_value=False ) # when return_value = my_remote_env_with_slurm_mock.download_final_zip(study) # then assert return_value is None @pytest.mark.unit_test def test_given_a_study_with_final_zip_when_download_final_zip_is_called_and_file_is_downloaded_then_returns_local_zipfile_path( self, study, my_remote_env_with_slurm_mock ): # given study.finished = True study.job_id = 1234 final_zip_name = ( "finished_" + Path(study.path).name + "_" + str(study.job_id) + ".zip" ) local_final_zipfile_path = str(Path(study.output_dir) / final_zip_name) study.local_final_zipfile_path = "" my_remote_env_with_slurm_mock.connection.check_file_not_empty = mock.Mock( return_value=True ) my_remote_env_with_slurm_mock.connection.download_file = mock.Mock( return_value=True ) # when return_value = my_remote_env_with_slurm_mock.download_final_zip(study) # then assert return_value == local_final_zipfile_path @pytest.mark.unit_test def test_given_a_study_with_input_zipfile_removed_when_remove_input_zipfile_then_return_true( self, my_remote_env_with_slurm_mock, study ): # given study.input_zipfile_removed = True # when output = my_remote_env_with_slurm_mock.remove_input_zipfile(study) # then assert output is True @pytest.mark.unit_test def test_given_a_study_when_remove_input_zipfile_then_connection_remove_file_is_called( self, my_remote_env_with_slurm_mock, study ): # given study.input_zipfile_removed = False study.zipfile_path = "zipfile_path" zip_name = Path(study.zipfile_path).name command = f"{my_remote_env_with_slurm_mock.remote_base_path}/{zip_name}" # when my_remote_env_with_slurm_mock.remove_input_zipfile(study) # then my_remote_env_with_slurm_mock.connection.remove_file.assert_called_once_with( command ) @pytest.mark.unit_test def test_given_a_study_when_input_zipfile_not_removed_and_connection_successfully_removed_file_then_return_true( self, my_remote_env_with_slurm_mock, study ): # given study.input_zipfile_removed = False study.zipfile_path = "zipfile_path" my_remote_env_with_slurm_mock.connection.remove_file = mock.Mock( return_value=True ) # when output = my_remote_env_with_slurm_mock.remove_input_zipfile(study) # then assert output is True @pytest.mark.unit_test def test_given_a_study_when_remove_remote_final_zipfile_then_connection_remove_file_is_called( self, my_remote_env_with_slurm_mock, study ): # given study.input_zipfile_removed = False study.zipfile_path = "zipfile_path" command = f"{my_remote_env_with_slurm_mock.remote_base_path}/{Path(study.local_final_zipfile_path).name}" my_remote_env_with_slurm_mock.connection.execute_command = mock.Mock( return_value=("", "") ) # when my_remote_env_with_slurm_mock.remove_remote_final_zipfile(study) # then my_remote_env_with_slurm_mock.connection.remove_file.assert_called_once_with( command ) @pytest.mark.unit_test def test_given_a_study_with_clean_remote_server_when_clean_remote_server_called_then_return_false( self, my_remote_env_with_slurm_mock, study ): # given study.remote_server_is_clean = True # when output = my_remote_env_with_slurm_mock.clean_remote_server(study) # then assert output is False @pytest.mark.unit_test def test_given_a_study_when_clean_remote_server_called_then_remove_zip_methods_are_called( self, my_remote_env_with_slurm_mock, study ): # given study.remote_server_is_clean = False my_remote_env_with_slurm_mock.remove_remote_final_zipfile = mock.Mock( return_value=False ) my_remote_env_with_slurm_mock.remove_input_zipfile = mock.Mock( return_value=False ) # when my_remote_env_with_slurm_mock.clean_remote_server(study) # then my_remote_env_with_slurm_mock.remove_remote_final_zipfile.assert_called_once_with( study ) my_remote_env_with_slurm_mock.remove_input_zipfile.assert_called_once_with( study ) @pytest.mark.unit_test def test_given_a_study_when_clean_remote_server_called_then_return_correct_result( self, my_remote_env_with_slurm_mock, study ): # given study.remote_server_is_clean = False my_remote_env_with_slurm_mock.remove_remote_final_zipfile = mock.Mock( return_value=False ) my_remote_env_with_slurm_mock.remove_input_zipfile = mock.Mock( return_value=False ) # when output = my_remote_env_with_slurm_mock.clean_remote_server(study) # then assert output is False # given study.remote_server_is_clean = False my_remote_env_with_slurm_mock.remove_remote_final_zipfile = mock.Mock( return_value=True ) my_remote_env_with_slurm_mock.remove_input_zipfile = mock.Mock( return_value=False ) # when output = my_remote_env_with_slurm_mock.clean_remote_server(study) # then assert output is False # given study.remote_server_is_clean = False my_remote_env_with_slurm_mock.remove_remote_final_zipfile = mock.Mock( return_value=False ) my_remote_env_with_slurm_mock.remove_input_zipfile = mock.Mock( return_value=True ) # when output = my_remote_env_with_slurm_mock.clean_remote_server(study) # then assert output is False # given study.remote_server_is_clean = False my_remote_env_with_slurm_mock.remove_remote_final_zipfile = mock.Mock( return_value=True ) my_remote_env_with_slurm_mock.remove_input_zipfile = mock.Mock( return_value=True ) # when output = my_remote_env_with_slurm_mock.clean_remote_server(study) # then assert output is True @pytest.mark.unit_test def test_given_time_limit_lower_than_min_duration_when_convert_time_is_called_return_min_duration( self, ): # given time_lim_sec = 42 # when output = RemoteEnvironmentWithSlurm.convert_time_limit_from_seconds_to_minutes( time_lim_sec ) # then assert output == 1 @pytest.mark.parametrize( "job_type,mode,post_processing", [ ("ANTARES_XPANSION", Modes.xpansion, True), ("ANTARES", Modes.antares, True), ("ANTARES_XPANSION", Modes.xpansion, False), ("ANTARES", Modes.antares, False), ], ) @pytest.mark.unit_test def test_compose_launch_command( self, my_remote_env_with_slurm_mock, job_type, mode, post_processing, study, ): # given filename_launch_script = ( my_remote_env_with_slurm_mock.slurm_script_features.solver_script_path ) # when study.run_mode = mode study.post_processing = post_processing script_params = ScriptParametersDTO( study_dir_name=Path(study.path).name, input_zipfile_name=Path(study.zipfile_path).name, time_limit=1, n_cpu=study.n_cpu, antares_version=study.antares_version, run_mode=study.run_mode, post_processing=study.post_processing, ) command = my_remote_env_with_slurm_mock.compose_launch_command(script_params) # then change_dir = f"cd {my_remote_env_with_slurm_mock.remote_base_path}" reference_submit_command = f'sbatch --job-name="{Path(study.path).name}" --time={study.time_limit//60} --cpus-per-task={study.n_cpu} {filename_launch_script} "{Path(study.zipfile_path).name}" {study.antares_version} {job_type} {post_processing}' reference_command = change_dir + " && " + reference_submit_command assert command.split() == reference_command.split() assert command == reference_command
36.40067
253
0.683949
4,135
32,615
4.865538
0.059976
0.070679
0.085839
0.117054
0.809732
0.781351
0.760873
0.742532
0.721308
0.665341
0
0.003649
0.252185
32,615
895
254
36.441341
0.821238
0.043692
0
0.592647
0
0.002941
0.046041
0.019538
0
0
0
0
0.072059
1
0.066176
false
0.002941
0.013235
0
0.083824
0.001471
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
f967cc266c165702b13a486eccb49a5cd71d4b42
76
py
Python
merchantconfig.py
italia/18app-python-sdk
e21f0560a49754d2d583182212321d3302502ebd
[ "BSD-3-Clause" ]
2
2018-05-15T08:54:09.000Z
2019-01-24T12:17:29.000Z
merchantconfig.py
italia/18app-python-sdk
e21f0560a49754d2d583182212321d3302502ebd
[ "BSD-3-Clause" ]
2
2017-10-07T14:57:35.000Z
2019-03-13T15:59:54.000Z
merchantconfig.py
italia/18app-python-example
e21f0560a49754d2d583182212321d3302502ebd
[ "BSD-3-Clause" ]
2
2017-10-07T14:56:35.000Z
2019-01-23T18:55:10.000Z
class MerchantConfig: def wsdl(): return 'VerificaVoucher.wsdl'
19
37
0.671053
7
76
7.285714
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.236842
76
3
38
25.333333
0.87931
0
0
0
0
0
0.263158
0
0
0
0
0
0
1
0.333333
true
0
0
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
1
0
0
6
f9822c204ccf067d355101c6e2d9a9f5448d9088
40
py
Python
berticle/predictor/__init__.py
SavchenkoValeriy/berticle
7d99dab4d090b002c81c6a751ac0411d3e43f7b3
[ "MIT" ]
null
null
null
berticle/predictor/__init__.py
SavchenkoValeriy/berticle
7d99dab4d090b002c81c6a751ac0411d3e43f7b3
[ "MIT" ]
null
null
null
berticle/predictor/__init__.py
SavchenkoValeriy/berticle
7d99dab4d090b002c81c6a751ac0411d3e43f7b3
[ "MIT" ]
null
null
null
from .predictor import ArticlePredictor
20
39
0.875
4
40
8.75
1
0
0
0
0
0
0
0
0
0
0
0
0.1
40
1
40
40
0.972222
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
f9ddabe1a714831551bccd96d9e6a7c2cabca1f3
136
py
Python
callbackQuery/__init__.py
flifloo/teleexit
b0e64a571e590c2fac692703f12a2bd481a7c127
[ "MIT" ]
1
2022-01-31T19:27:05.000Z
2022-01-31T19:27:05.000Z
callbackQuery/__init__.py
flifloo/teleexit
b0e64a571e590c2fac692703f12a2bd481a7c127
[ "MIT" ]
null
null
null
callbackQuery/__init__.py
flifloo/teleexit
b0e64a571e590c2fac692703f12a2bd481a7c127
[ "MIT" ]
null
null
null
from callbackQuery.main import callback_query_handler from main import updater updater.dispatcher.add_handler(callback_query_handler)
22.666667
54
0.882353
18
136
6.388889
0.555556
0.173913
0.347826
0
0
0
0
0
0
0
0
0
0.080882
136
5
55
27.2
0.92
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
6
ddc57a3d94603455f15b71ee267bfdd9d8bf9cad
191
bzl
Python
google/cloud/firestore/firestore_client_version.bzl
AVaksman/google-cloud-cpp
86ccde498987e240024f6e850f3b53eafff383b5
[ "Apache-2.0" ]
null
null
null
google/cloud/firestore/firestore_client_version.bzl
AVaksman/google-cloud-cpp
86ccde498987e240024f6e850f3b53eafff383b5
[ "Apache-2.0" ]
null
null
null
google/cloud/firestore/firestore_client_version.bzl
AVaksman/google-cloud-cpp
86ccde498987e240024f6e850f3b53eafff383b5
[ "Apache-2.0" ]
null
null
null
# DO NOT EDIT -- GENERATED BY CMake -- Change the CMakeLists.txt file if needed FIRESTORE_CLIENT_VERSION_MAJOR = "0" FIRESTORE_CLIENT_VERSION_MINOR = "0" FIRESTORE_CLIENT_VERSION_PATCH = "1"
38.2
79
0.795812
28
191
5.107143
0.75
0.314685
0.461538
0.321678
0
0
0
0
0
0
0
0.017964
0.125654
191
4
80
47.75
0.838323
0.403141
0
0
1
0
0.026786
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
dded260739a21043db44aa169579d77a441710e0
226
py
Python
erica/infrastructure/sqlalchemy/BaseSchema.py
punknoir101/erica-1
675a6280d38ca5b56946af6f3ed7e295ba896db0
[ "MIT" ]
null
null
null
erica/infrastructure/sqlalchemy/BaseSchema.py
punknoir101/erica-1
675a6280d38ca5b56946af6f3ed7e295ba896db0
[ "MIT" ]
null
null
null
erica/infrastructure/sqlalchemy/BaseSchema.py
punknoir101/erica-1
675a6280d38ca5b56946af6f3ed7e295ba896db0
[ "MIT" ]
null
null
null
import sqlalchemy from sqlalchemy import Column, String class AuditedSchemaMixin(object): created_at = Column(sqlalchemy.types.DateTime) updated_at = Column(sqlalchemy.types.DateTime) creator_id = Column(String)
25.111111
50
0.783186
26
226
6.692308
0.576923
0.137931
0.206897
0.264368
0.356322
0
0
0
0
0
0
0
0.141593
226
8
51
28.25
0.896907
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
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
0
0
1
0
1
0
0
6
ddee4171e5a560aef568d8de96b78fe4639d0f65
36
py
Python
rule_engine/__init__.py
CUrW-SL/DSS-Framework
43a39b322ffb0eb92dd116e77cf9a8479357a121
[ "MIT" ]
null
null
null
rule_engine/__init__.py
CUrW-SL/DSS-Framework
43a39b322ffb0eb92dd116e77cf9a8479357a121
[ "MIT" ]
null
null
null
rule_engine/__init__.py
CUrW-SL/DSS-Framework
43a39b322ffb0eb92dd116e77cf9a8479357a121
[ "MIT" ]
null
null
null
from .rule_executor import RuleStore
36
36
0.888889
5
36
6.2
1
0
0
0
0
0
0
0
0
0
0
0
0.083333
36
1
36
36
0.939394
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
348ed4e639802047b0575226399a33d35ab8a19b
19
py
Python
calculator/view/__init__.py
haehn/CS410firststeps
63b6c7384ea96994f5bdf03e6b6d172fa0f25916
[ "MIT" ]
null
null
null
calculator/view/__init__.py
haehn/CS410firststeps
63b6c7384ea96994f5bdf03e6b6d172fa0f25916
[ "MIT" ]
null
null
null
calculator/view/__init__.py
haehn/CS410firststeps
63b6c7384ea96994f5bdf03e6b6d172fa0f25916
[ "MIT" ]
null
null
null
from .ui import UI
9.5
18
0.736842
4
19
3.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.210526
19
1
19
19
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
348fce59d5644c35c1b2d0e79da53b5a3930d5cb
4,684
py
Python
tests/events/eventReportsDeepSummaryTest.py
nathanielwarner/seatsio-python
e731ed0c37f2496c620b40e38527a58bf3b9a9b2
[ "MIT" ]
2
2018-03-29T18:21:01.000Z
2022-02-08T10:49:47.000Z
tests/events/eventReportsDeepSummaryTest.py
nathanielwarner/seatsio-python
e731ed0c37f2496c620b40e38527a58bf3b9a9b2
[ "MIT" ]
7
2018-09-03T12:31:52.000Z
2022-02-01T08:25:09.000Z
tests/events/eventReportsDeepSummaryTest.py
nathanielwarner/seatsio-python
e731ed0c37f2496c620b40e38527a58bf3b9a9b2
[ "MIT" ]
2
2020-12-22T09:51:07.000Z
2021-12-13T15:37:14.000Z
from seatsio import Channel from seatsio.events.objectProperties import ObjectProperties from tests.seatsioClientTest import SeatsioClientTest from tests.util.asserts import assert_that class EventReportsDeepSummaryTest(SeatsioClientTest): def test_deepSummaryByStatus(self): chart_key = self.create_test_chart() event = self.client.events.create(chart_key) self.client.events.book(event.key, [ObjectProperties("A-1", ticket_type="tt1")], order_id="order1") report = self.client.events.reports.deep_summary_by_status(event.key) assert_that(report.get("booked").get("count")).is_equal_to(1) assert_that(report.get("booked").get("bySection").get("NO_SECTION").get("count")).is_equal_to(1) assert_that(report.get("booked").get("bySection").get("NO_SECTION").get("bySelectability").get("not_selectable")).is_equal_to(1) def test_deepSummaryByObjectType(self): chart_key = self.create_test_chart() event = self.client.events.create(chart_key) report = self.client.events.reports.deep_summary_by_object_type(event.key) assert_that(report.get("seat").get("count")).is_equal_to(32) assert_that(report.get("seat").get("bySection").get("NO_SECTION").get("count")).is_equal_to(32) assert_that(report.get("seat").get("bySection").get("NO_SECTION").get("bySelectability").get("selectable")).is_equal_to(32) def test_deepSummaryByCategoryKey(self): chart_key = self.create_test_chart() event = self.client.events.create(chart_key) self.client.events.book(event.key, [ObjectProperties("A-1", ticket_type="tt1")], order_id="order1") report = self.client.events.reports.deep_summary_by_category_key(event.key) assert_that(report.get("9").get("count")).is_equal_to(116) assert_that(report.get("9").get("bySection").get("NO_SECTION").get("count")).is_equal_to(116) assert_that(report.get("9").get("bySection").get("NO_SECTION").get("bySelectability").get("not_selectable")).is_equal_to(1) def test_deepSummaryByCategoryLabel(self): chart_key = self.create_test_chart() event = self.client.events.create(chart_key) self.client.events.book(event.key, [ObjectProperties("A-1", ticket_type="tt1")], order_id="order1") report = self.client.events.reports.deep_summary_by_category_label(event.key) assert_that(report.get("Cat1").get("count")).is_equal_to(116) assert_that(report.get("Cat1").get("bySection").get("NO_SECTION").get("count")).is_equal_to(116) assert_that(report.get("Cat1").get("bySection").get("NO_SECTION").get("bySelectability").get("not_selectable")).is_equal_to(1) def test_deepSummaryBySection(self): chart_key = self.create_test_chart() event = self.client.events.create(chart_key) self.client.events.book(event.key, [ObjectProperties("A-1", ticket_type="tt1")], order_id="order1") report = self.client.events.reports.deep_summary_by_section(event.key) assert_that(report.get("NO_SECTION").get("count")).is_equal_to(232) assert_that(report.get("NO_SECTION").get("byCategoryLabel").get("Cat1").get("count")).is_equal_to(116) assert_that(report.get("NO_SECTION").get("byCategoryLabel").get("Cat1").get("bySelectability").get("not_selectable")).is_equal_to(1) def test_deepSummaryBySelectability(self): chart_key = self.create_test_chart() event = self.client.events.create(chart_key) self.client.events.book(event.key, [ObjectProperties("A-1", ticket_type="tt1")], order_id="order1") report = self.client.events.reports.deep_summary_by_selectability(event.key) assert_that(report.get("not_selectable").get("count")).is_equal_to(1) assert_that(report.get("not_selectable").get("byCategoryLabel").get("Cat1").get("count")).is_equal_to(1) assert_that(report.get("not_selectable").get("byCategoryLabel").get("Cat1").get("bySection").get("NO_SECTION")).is_equal_to(1) def test_deepSummaryByChannel(self): chart_key = self.create_test_chart() event = self.client.events.create(chart_key) self.client.events.book(event.key, [ObjectProperties("A-1", ticket_type="tt1")], order_id="order1") report = self.client.events.reports.deep_summary_by_channel(event.key) assert_that(report.get("NO_CHANNEL").get("count")).is_equal_to(232) assert_that(report.get("NO_CHANNEL").get("byCategoryLabel").get("Cat1").get("count")).is_equal_to(116) assert_that(report.get("NO_CHANNEL").get("byCategoryLabel").get("Cat1").get("bySection").get("NO_SECTION")).is_equal_to(116)
52.044444
140
0.710077
638
4,684
4.965517
0.105016
0.069444
0.106061
0.125947
0.854798
0.854798
0.813131
0.784091
0.761364
0.761364
0
0.017548
0.124039
4,684
89
141
52.629213
0.75457
0
0
0.333333
0
0
0.156704
0
0
0
0
0
0.366667
1
0.116667
false
0
0.066667
0
0.2
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
34d11f391afb3fb954725b658a36b4437c962920
41
py
Python
opm/forcast_index/__init__.py
Open-Prose-Metrics/open_prose_metrics_app-core
9df65edfe9ee9af0a0731c3f2e21ea25bced250c
[ "MIT" ]
null
null
null
opm/forcast_index/__init__.py
Open-Prose-Metrics/open_prose_metrics_app-core
9df65edfe9ee9af0a0731c3f2e21ea25bced250c
[ "MIT" ]
4
2021-04-30T21:38:10.000Z
2022-01-13T03:32:33.000Z
opm/forcast_index/__init__.py
Open-Prose-Metrics/open_prose_metrics_app-core
9df65edfe9ee9af0a0731c3f2e21ea25bced250c
[ "MIT" ]
1
2021-03-21T14:08:28.000Z
2021-03-21T14:08:28.000Z
from forcast_index.forcast import forcast
41
41
0.902439
6
41
6
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.073171
41
1
41
41
0.947368
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
34f0ae2c4b1eb5203fc13b141975bf2354b117b7
267
py
Python
mysite/home/views.py
Rudancy/My_Business
f2c5f51e697214a2699b40d37f206307d19af84b
[ "MIT" ]
null
null
null
mysite/home/views.py
Rudancy/My_Business
f2c5f51e697214a2699b40d37f206307d19af84b
[ "MIT" ]
null
null
null
mysite/home/views.py
Rudancy/My_Business
f2c5f51e697214a2699b40d37f206307d19af84b
[ "MIT" ]
null
null
null
from django.shortcuts import render, HttpResponse from .models import home_page # Create your views here. def home_page_values(request): home_page_values = home_page.objects.all() return render(request, 'home.html', {"home_page_values": home_page_values})
26.7
79
0.775281
38
267
5.184211
0.526316
0.243655
0.284264
0.182741
0.22335
0
0
0
0
0
0
0
0.131086
267
9
80
29.666667
0.849138
0.086142
0
0
0
0
0.103306
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.8
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
6
55165aead1d02422969b3bc8c1c1e5f0f19e02c1
31
py
Python
Frontend/__init__.py
BloodyRookieStefan/Albatros_AutoReservation
ed2519b523f1388de9ae0475e26a4001f3ee5b98
[ "MIT" ]
1
2021-05-15T21:03:39.000Z
2021-05-15T21:03:39.000Z
Frontend/__init__.py
BloodyRookieStefan/Albatros_AutoReservation
ed2519b523f1388de9ae0475e26a4001f3ee5b98
[ "MIT" ]
1
2021-05-18T13:26:06.000Z
2021-05-22T07:59:22.000Z
Frontend/__init__.py
BloodyRookieStefan/Albatros_AutoReservation
ed2519b523f1388de9ae0475e26a4001f3ee5b98
[ "MIT" ]
null
null
null
from .index import thread_init
15.5
30
0.83871
5
31
5
1
0
0
0
0
0
0
0
0
0
0
0
0.129032
31
1
31
31
0.925926
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
9b88bd04b3c4e38651e5fd5c870d1aa914ac597f
4,377
py
Python
.github/workflows/script.py
konveyor/crane-plugin-imagestream
e45a84e501b63a6c55d032812cbb14657967c2c1
[ "Apache-2.0" ]
null
null
null
.github/workflows/script.py
konveyor/crane-plugin-imagestream
e45a84e501b63a6c55d032812cbb14657967c2c1
[ "Apache-2.0" ]
null
null
null
.github/workflows/script.py
konveyor/crane-plugin-imagestream
e45a84e501b63a6c55d032812cbb14657967c2c1
[ "Apache-2.0" ]
1
2021-12-13T19:13:43.000Z
2021-12-13T19:13:43.000Z
import os import yaml import sys os.makedirs('plugins/ImageStream', exist_ok=True) if os.path.exists("index.yaml"): file = open("index.yaml","r") not_present = 1 index = yaml.safe_load(file) for plugin in index['plugins']: if plugin['name'] == 'ImageStreamPlugin': not_present = 0 break if not_present: index['plugins'].append({"name": "ImageStreamPlugin", "path": "https://github.com/%s/crane-plugins/raw/main/plugins/ImageStream/index.yaml"%sys.argv[2]}) file = open("index.yaml","w") yaml.dump(index, file) file.close() else: file = open("index.yaml","a+") index = yaml.safe_load(file) index = {} index['kind'] = 'PluginIndex' index['apiVersion'] = 'crane.konveyor.io/v1alpha1' index['plugins'] = [] index['plugins'].append({"name": "ImageStreamPlugin", "path": "https://github.com/%s/crane-plugins/raw/main/plugins/ImageStream/index.yaml"%sys.argv[2]}) yaml.dump(index, file) file.close() # create or append in plugin index if os.path.exists('plugins/ImageStream/index.yaml'): file = open("plugins/ImageStream/index.yaml","r") index = yaml.safe_load(file) index['versions'].append({}) index['versions'][-1] = { 'name': 'ImageStreamPlugin', 'shortDescription': 'ImageStreamPlugin', 'description': 'this is ImageStreamPlugin', 'version': sys.argv[1], 'binaries': [ { 'os': 'linux', 'arch': 'amd64', 'uri': "https://github.com/%s/releases/download/%s/amd64-linux-imagestreamplugin-%s"%(sys.argv[3], sys.argv[1],sys.argv[1]), }, { 'os': 'darwin', 'arch': 'amd64', 'uri': "https://github.com/%s/releases/download/%s/amd64-darwin-imagestreamplugin-%s"%(sys.argv[3], sys.argv[1],sys.argv[1]), }, { 'os': 'darwin', 'arch': 'arm64', 'uri': "https://github.com/%s/releases/download/%s/arm64-darwin-imagestreamplugin-%s"%(sys.argv[3], sys.argv[1],sys.argv[1]), }, ], 'optionalFields': [ { 'flagName': "registry-replacement", 'help': "Map of image registry paths to swap on transform, in the format original-registry1=target-registry1,original-registry2=target-registry2...", 'example': "docker-registry.default.svc:5000=image-registry.openshift-image-registry.svc:5000,docker.io/foo=quay.io/bar", }, ] } file = open("plugins/ImageStream/index.yaml","w") yaml.dump(index, file) file.close() else: file = open("plugins/ImageStream/index.yaml","a+") index = yaml.safe_load(file) index = {} index['kind'] = 'Plugin' index['apiVersion'] = 'crane.konveyor.io/v1alpha1' index['versions'] = [] index['versions'].append({}) index['versions'][0] = { 'name': 'ImageStreamPlugin', 'shortDescription': 'ImageStreamPlugin', 'description': 'this is ImageStreamPlugin', 'version': sys.argv[1], 'binaries': [ { 'os': 'linux', 'arch': 'amd64', 'uri': "https://github.com/%s/releases/download/%s/amd64-linux-imagestreamplugin-%s"%(sys.argv[3], sys.argv[1],sys.argv[1]), }, { 'os': 'darwin', 'arch': 'amd64', 'uri': "https://github.com/%s/releases/download/%s/amd64-darwin-imagestreamplugin-%s"%(sys.argv[3], sys.argv[1],sys.argv[1]), }, { 'os': 'darwin', 'arch': 'arm64', 'uri': "https://github.com/%s/releases/download/%s/arm64-darwin-imagestreamplugin-%s"%(sys.argv[3], sys.argv[1],sys.argv[1]), }, ], 'optionalFields': [ { 'flagName': "registry-replacement", 'help': "Map of image registry paths to swap on transform, in the format original-registry1=target-registry1,original-registry2=target-registry2...", 'example': "docker-registry.default.svc:5000=image-registry.openshift-image-registry.svc:5000,docker.io/foo=quay.io/bar", }, ] } yaml.dump(index, file) file.close()
35.585366
169
0.551062
476
4,377
5.05042
0.201681
0.06406
0.046589
0.049917
0.871464
0.838186
0.772879
0.737105
0.737105
0.737105
0
0.024352
0.26822
4,377
123
170
35.585366
0.726194
0.007311
0
0.576923
0
0.115385
0.449125
0.122928
0
0
0
0
0
1
0
false
0
0.028846
0
0.028846
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
9bbe4e5713b894005ffb861ca1ae1fc6f024c69d
125
py
Python
cwrapper/__init__.py
futatuki/pycwrapper
4528e3040f55086e2ae92ad3a942330eb1d4ff08
[ "BSD-2-Clause" ]
null
null
null
cwrapper/__init__.py
futatuki/pycwrapper
4528e3040f55086e2ae92ad3a942330eb1d4ff08
[ "BSD-2-Clause" ]
1
2018-05-14T01:26:26.000Z
2018-05-14T01:26:26.000Z
cwrapper/__init__.py
futatuki/pycwrapper
4528e3040f55086e2ae92ad3a942330eb1d4ff08
[ "BSD-2-Clause" ]
null
null
null
# not empty file from __future__ import absolute_import from .cobj import * from .primptr import * from .genprimptr import *
20.833333
38
0.784
17
125
5.470588
0.588235
0.322581
0
0
0
0
0
0
0
0
0
0
0.16
125
5
39
25
0.885714
0.112
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
32e58a4e05cf52f2945f33b68bb8b0259fac2ec3
21
py
Python
example_project/some_modules/third_modules/a167.py
Yuriy-Leonov/cython_imports_limit_issue
2f9e7c02798fb52185dabfe6ce3811c439ca2839
[ "MIT" ]
null
null
null
example_project/some_modules/third_modules/a167.py
Yuriy-Leonov/cython_imports_limit_issue
2f9e7c02798fb52185dabfe6ce3811c439ca2839
[ "MIT" ]
null
null
null
example_project/some_modules/third_modules/a167.py
Yuriy-Leonov/cython_imports_limit_issue
2f9e7c02798fb52185dabfe6ce3811c439ca2839
[ "MIT" ]
null
null
null
class A167: pass
7
11
0.619048
3
21
4.333333
1
0
0
0
0
0
0
0
0
0
0
0.214286
0.333333
21
2
12
10.5
0.714286
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
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
fd0875c528be888a682e0a9b45f4ceeb96652c4d
67
py
Python
sapextractor/utils/main_domnames/__init__.py
aarkue/sap-meta-explorer
613bf657bbaa72a3781a84664e5de7626516532f
[ "Apache-2.0" ]
2
2021-02-10T08:09:35.000Z
2021-05-21T06:25:34.000Z
sapextractor/utils/main_domnames/__init__.py
aarkue/sap-meta-explorer
613bf657bbaa72a3781a84664e5de7626516532f
[ "Apache-2.0" ]
null
null
null
sapextractor/utils/main_domnames/__init__.py
aarkue/sap-meta-explorer
613bf657bbaa72a3781a84664e5de7626516532f
[ "Apache-2.0" ]
3
2021-11-22T13:27:00.000Z
2022-03-16T22:08:51.000Z
from sapextractor.utils.main_domnames import extract_main_domnames
33.5
66
0.910448
9
67
6.444444
0.777778
0.413793
0
0
0
0
0
0
0
0
0
0
0.059701
67
1
67
67
0.920635
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
fd1710ed5e5d1ce6032c980a0a46daa1d58ca8da
12,534
py
Python
src/models/models.py
aildnont/HIFIS-model
ee077ee96e20f8473f5d5628873d58a1f0521344
[ "MIT" ]
10
2020-10-20T22:14:17.000Z
2022-03-10T18:13:57.000Z
src/models/models.py
aildnont/HIFIS-model
ee077ee96e20f8473f5d5628873d58a1f0521344
[ "MIT" ]
3
2020-11-13T17:51:01.000Z
2021-02-18T13:42:00.000Z
src/models/models.py
aildnont/HIFIS-model
ee077ee96e20f8473f5d5628873d58a1f0521344
[ "MIT" ]
3
2020-10-08T02:44:36.000Z
2021-05-10T14:55:41.000Z
from tensorflow.keras import Sequential, Model from tensorflow.keras.layers import Dense, Dropout, Input, LSTM, Reshape, concatenate, Flatten from tensorflow.keras.regularizers import l2 from tensorflow.keras.optimizers import Adam, SGD from tensorflow.keras.initializers import Constant from tensorflow import convert_to_tensor, split, reshape, transpose from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model import LogisticRegression from sklearn.metrics import roc_auc_score, precision_score, recall_score, f1_score, accuracy_score, log_loss from xgboost import XGBClassifier import numpy as np from src.custom.losses import f1_loss def hifis_mlp(cfg, input_dim=None, metrics=None, metadata=None, output_bias=None, hparams=None): ''' Defines a Keras model for HIFIS multi-layer perceptron model (i.e. HIFIS-v2) :param cfg: A dictionary of parameters associated with the model architecture :param input_dim: The shape of the model input :param metrics: Metrics to track model's performance :param metadata: Dict containing prediction horizon :param output_bias: initial bias applied to output layer :param hparams: dict of hyperparameters :return: a Keras model object with the architecture defined in this method ''' # Set hyperparameters if hparams is None: nodes_dense0 = cfg['NODES']['DENSE0'] nodes_dense1 = cfg['NODES']['DENSE1'] layers = cfg['LAYERS'] dropout = cfg['DROPOUT'] l2_lambda = cfg['L2_LAMBDA'] lr = cfg['LR'] optimizer = Adam(learning_rate=lr) else: nodes_dense0 = hparams['NODES0'] nodes_dense1 = hparams['NODES1'] layers = hparams['LAYERS'] dropout = hparams['DROPOUT'] lr = 10 ** hparams['LR'] # Random sampling on logarithmic scale beta_1 = 1 - 10 ** hparams['BETA_1'] beta_2 = 1 - 10 ** hparams['BETA_2'] l2_lambda = 10 ** hparams['L2_LAMBDA'] if hparams['OPTIMIZER'] == 'adam': optimizer = Adam(learning_rate=lr, beta_1=beta_1, beta_2=beta_2) elif hparams['OPTIMIZER'] == 'sgd': optimizer = SGD(learning_rate=lr) if output_bias is not None: output_bias = Constant(output_bias) # Define model architecture. model = Sequential(name='HIFIS-mlp_' + str(metadata['N_WEEKS']) + '-weeks') model.add(Dense(nodes_dense0, input_shape=input_dim, activation='relu', kernel_regularizer=l2(l2_lambda), bias_regularizer=l2(l2_lambda), name="dense0")) model.add(Dropout(dropout, name='dropout0')) for i in range(1, layers): model.add(Dense(nodes_dense1, activation='relu', kernel_regularizer=l2(l2_lambda), bias_regularizer=l2(l2_lambda), name='dense%d'%i)) model.add(Dropout(dropout, name='dropout%d'%i)) model.add(Dense(1, activation='sigmoid', name="output", bias_initializer=output_bias)) # Set model loss function, optimizer, metrics. model.compile(loss='binary_crossentropy', optimizer=optimizer, metrics=metrics) # Print summary of model and return model object if hparams is None: model.summary() return model def hifis_rnn_mlp(cfg, input_dim=None, metrics=None, metadata=None, output_bias=None, hparams=None): ''' Defines a Keras model for HIFIS hybrid recurrent neural network and multilayer perceptron model (i.e. HIFIS-v3) :param cfg: A dictionary of parameters associated with the model architecture :param input_dim: The shape of the model input :param metrics: Metrics to track model's performance :param metadata: Dict containing prediction horizon, time series feature info :param output_bias: initial bias applied to output layer :param hparams: dict of hyperparameters :return: a Keras model object with the architecture defined in this method ''' # Set hyperparameters if hparams is None: nodes_dense0 = cfg['DENSE']['DENSE0'] nodes_dense1 = cfg['DENSE']['DENSE1'] layers = cfg['LAYERS'] dropout = cfg['DROPOUT'] l2_lambda = cfg['L2_LAMBDA'] lr = cfg['LR'] optimizer = Adam(learning_rate=lr) lstm_units = cfg['LSTM']['UNITS'] else: nodes_dense0 = hparams['NODES0'] nodes_dense1 = hparams['NODES1'] layers = hparams['LAYERS'] dropout = hparams['DROPOUT'] lr = 10 ** hparams['LR'] # Random sampling on logarithmic scale beta_1 = 1 - 10 ** hparams['BETA_1'] beta_2 = 1 - 10 ** hparams['BETA_2'] l2_lambda = 10 ** hparams['L2_LAMBDA'] lstm_units = hparams['LSTM_UNITS'] if hparams['OPTIMIZER'] == 'adam': optimizer = Adam(learning_rate=lr, beta_1=beta_1, beta_2=beta_2) elif hparams['OPTIMIZER'] == 'sgd': optimizer = SGD(learning_rate=lr) if output_bias is not None: output_bias = Constant(output_bias) # Receive input to model and split into 2 tensors containing dynamic and static features respectively X_input = Input(shape=input_dim) split_idx = metadata['NUM_TS_FEATS'] * metadata['T_X'] X_dynamic, X_static = split(X_input, [split_idx, X_input.shape[1] - split_idx], axis=1) # Define RNN component of model using LSTM cells. LSTM input shape is [batch_size, timesteps, features] lstm_input_shape = (metadata['T_X'], metadata['NUM_TS_FEATS']) X_dynamic = Reshape(lstm_input_shape)(X_dynamic) X_dynamic = LSTM(lstm_units, activation='tanh', return_sequences=True)(X_dynamic) X_dynamic = Flatten()(X_dynamic) # Define MLP component of model X = concatenate([X_dynamic, X_static]) # Combine output of LSTM with static features X = Dense(nodes_dense0, input_shape=input_dim, activation='relu', kernel_regularizer=l2(l2_lambda), bias_regularizer=l2(l2_lambda), name="dense0")(X) X = Dropout(dropout, name='dropout0')(X) for i in range(1, layers): X = Dense(nodes_dense1, activation='relu', kernel_regularizer=l2(l2_lambda), bias_regularizer=l2(l2_lambda), name='dense%d'%i)(X) X = Dropout(dropout, name='dropout%d'%i)(X) Y = Dense(1, activation='sigmoid', name="output", bias_initializer=output_bias)(X) # Define model with inputs and outputs model = Model(inputs=X_input, outputs=Y, name='HIFIS-rnn-mlp_' + str(metadata['N_WEEKS']) + '-weeks') # Set model loss function, optimizer, metrics. model.compile(loss=f1_loss(4.5), optimizer=optimizer, metrics=metrics) # Print summary of model and return model object if hparams is None: model.summary() return model class logistic_regression: def __init__(self, cfg, metrics=[], **kwargs): self.cfg = cfg self.metrics = [None] + [m for m in metrics if not isinstance(m, str)] self.metrics_names = ['loss'] + [m.name for m in metrics if not isinstance(m, str)] def fit(self, X_train, Y_train, class_weight=None, **kwargs): self.model = LogisticRegression(class_weight=class_weight) self.model.fit(X_train, Y_train) def evaluate(self, X_test, Y_test): test_preds = self.model.predict(X_test) test_probs = self.model.predict_proba(X_test)[:, 1] test_metrics = [] for i in range(len(self.metrics_names)): if self.metrics_names[i] in ['precision', 'recall', 'f1score']: scores = [] for t in self.metrics[i].thresholds: preds = (test_probs >= t).astype(int) if self.metrics_names[i] == 'precision': scores.append(precision_score(Y_test, preds)) elif self.metrics_names[i] == 'recall': scores.append(recall_score(Y_test, preds)) elif self.metrics_names[i] == 'f1score': scores.append(f1_score(Y_test, preds)) if len(scores) == 1: scores = scores[0] test_metrics.append(np.array(scores)) elif self.metrics_names[i] == 'auc': test_metrics.append(roc_auc_score(Y_test, test_probs)) elif self.metrics_names[i] == 'loss': test_metrics.append(log_loss(Y_test, test_probs)) elif self.metrics_names[i] == 'accuracy': test_metrics.append(accuracy_score(Y_test, test_preds)) return test_metrics def predict(self, X_test, **kwargs): return self.model.predict_proba(X_test)[:, 1] class random_forest: def __init__(self, cfg, metrics=[], **kwargs): self.cfg = cfg self.metrics = [None] + [m for m in metrics if not isinstance(m, str)] self.metrics_names = ['loss'] + [m.name for m in metrics if not isinstance(m, str)] def fit(self, X_train, Y_train, class_weight=None, **kwargs): self.model = RandomForestClassifier(n_estimators=self.cfg['N_ESTIMATORS'], class_weight=class_weight) self.model.fit(X_train, Y_train) def evaluate(self, X_test, Y_test): test_preds = self.model.predict(X_test) test_probs = self.model.predict_proba(X_test)[:, 1] test_metrics = [] for i in range(len(self.metrics_names)): if self.metrics_names[i] in ['precision', 'recall', 'f1score']: scores = [] for t in self.metrics[i].thresholds: preds = (test_probs >= t).astype(int) if self.metrics_names[i] == 'precision': scores.append(precision_score(Y_test, preds)) elif self.metrics_names[i] == 'recall': scores.append(recall_score(Y_test, preds)) elif self.metrics_names[i] == 'f1score': scores.append(f1_score(Y_test, preds)) if len(scores) == 1: scores = scores[0] test_metrics.append(np.array(scores)) elif self.metrics_names[i] == 'auc': test_metrics.append(roc_auc_score(Y_test, test_probs)) elif self.metrics_names[i] == 'loss': test_metrics.append(log_loss(Y_test, test_probs)) elif self.metrics_names[i] == 'accuracy': test_metrics.append(accuracy_score(Y_test, test_preds)) return test_metrics def predict(self, X_test, **kwargs): return self.model.predict_proba(X_test)[:, 1] class xgboost_model: def __init__(self, cfg, metrics=[], **kwargs): self.cfg = cfg self.metrics = [None] + [m for m in metrics if not isinstance(m, str)] self.metrics_names = ['loss'] + [m.name for m in metrics if not isinstance(m, str)] def fit(self, X_train, Y_train, class_weight=None, **kwargs): if class_weight is not None: scale_pos_weight = class_weight[1] / class_weight[0] else: scale_pos_weight = None self.model = XGBClassifier(n_estimators=self.cfg['N_ESTIMATORS'], scale_pos_weight=scale_pos_weight) self.model.fit(X_train, Y_train) def evaluate(self, X_test, Y_test): test_preds = self.model.predict(X_test) test_probs = self.model.predict_proba(X_test)[:, 1] test_metrics = [] for i in range(len(self.metrics_names)): if self.metrics_names[i] in ['precision', 'recall', 'f1score']: scores = [] for t in self.metrics[i].thresholds: preds = (test_probs >= t).astype(int) if self.metrics_names[i] == 'precision': scores.append(precision_score(Y_test, preds)) elif self.metrics_names[i] == 'recall': scores.append(recall_score(Y_test, preds)) elif self.metrics_names[i] == 'f1score': scores.append(f1_score(Y_test, preds)) if len(scores) == 1: scores = scores[0] test_metrics.append(np.array(scores)) elif self.metrics_names[i] == 'auc': test_metrics.append(roc_auc_score(Y_test, test_probs)) elif self.metrics_names[i] == 'loss': test_metrics.append(log_loss(Y_test, test_probs)) elif self.metrics_names[i] == 'accuracy': test_metrics.append(accuracy_score(Y_test, test_preds)) return test_metrics def predict(self, X_test, **kwargs): return self.model.predict_proba(X_test)[:, 1]
46.250923
115
0.634035
1,629
12,534
4.688766
0.129527
0.047526
0.056559
0.04674
0.77756
0.764467
0.738544
0.738544
0.738544
0.724928
0
0.013024
0.252673
12,534
271
116
46.250923
0.802391
0.1322
0
0.731707
0
0
0.062628
0
0
0
0
0
0
1
0.068293
false
0
0.058537
0.014634
0.180488
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
fd1946dcd59f321a59c23b6364a3e4baaf472d60
15,191
py
Python
tests/test_remote_commands.py
G-Two/subarulink
00a7bc18880719ed4c7a4ac5a11fb6dceb44e7ea
[ "Apache-2.0" ]
40
2020-05-04T14:53:04.000Z
2022-03-26T16:30:32.000Z
tests/test_remote_commands.py
G-Two/subarulink
00a7bc18880719ed4c7a4ac5a11fb6dceb44e7ea
[ "Apache-2.0" ]
41
2020-05-12T01:16:27.000Z
2022-03-27T19:37:02.000Z
tests/test_remote_commands.py
G-Two/subarulink
00a7bc18880719ed4c7a4ac5a11fb6dceb44e7ea
[ "Apache-2.0" ]
6
2020-05-08T03:33:12.000Z
2022-02-20T19:36:55.000Z
"""Tests for subarulink remote commands.""" import asyncio import time import pytest import subarulink.const as sc from subarulink.exceptions import ( InvalidPIN, PINLockoutProtect, RemoteServiceFailure, SubaruException, VehicleNotSupported, ) from tests.api_responses import ( GET_CLIMATE_SETTINGS_G2, LOCATE_G1_EXECUTE, LOCATE_G1_STARTED, LOGIN_MULTI_REGISTERED, REMOTE_CMD_INVALID_PIN, REMOTE_SERVICE_EXECUTE, REMOTE_SERVICE_STATUS_FINISHED_FAIL, REMOTE_SERVICE_STATUS_FINISHED_SUCCESS, REMOTE_SERVICE_STATUS_STARTED, SAVE_CLIMATE_SETTINGS, SELECT_VEHICLE_2, SELECT_VEHICLE_3, SELECT_VEHICLE_5, VALIDATE_SESSION_FAIL, VALIDATE_SESSION_SUCCESS, ) from tests.conftest import ( TEST_VIN_2_EV, TEST_VIN_3_G2, TEST_VIN_4_SAFETY_PLUS, TEST_VIN_5_G1_SECURITY, server_js_response, ) @pytest.mark.asyncio async def test_remote_cmds_g2_ev(test_server, multi_vehicle_controller): cmd_list = [ { "command": multi_vehicle_controller.horn(TEST_VIN_2_EV), "path": sc.API_HORN_LIGHTS, }, { "command": multi_vehicle_controller.horn_stop(TEST_VIN_2_EV), "path": sc.API_HORN_LIGHTS_STOP, }, { "command": multi_vehicle_controller.lights(TEST_VIN_2_EV), "path": sc.API_LIGHTS, }, { "command": multi_vehicle_controller.lights_stop(TEST_VIN_2_EV), "path": sc.API_LIGHTS_STOP, }, { "command": multi_vehicle_controller.lock(TEST_VIN_2_EV), "path": sc.API_LOCK, }, { "command": multi_vehicle_controller.unlock(TEST_VIN_2_EV), "path": sc.API_UNLOCK, }, { "command": multi_vehicle_controller.charge_start(TEST_VIN_2_EV), "path": sc.API_EV_CHARGE_NOW, }, { "command": multi_vehicle_controller.remote_stop(TEST_VIN_2_EV), "path": sc.API_G2_REMOTE_ENGINE_STOP, }, ] for cmd in cmd_list: task = asyncio.create_task(cmd["command"]) await server_js_response(test_server, VALIDATE_SESSION_FAIL, path=sc.API_VALIDATE_SESSION) await server_js_response(test_server, LOGIN_MULTI_REGISTERED, path=sc.API_LOGIN) await server_js_response( test_server, SELECT_VEHICLE_2, path=sc.API_SELECT_VEHICLE, query={"vin": TEST_VIN_2_EV, "_": str(int(time.time()))}, ) await server_js_response( test_server, REMOTE_SERVICE_EXECUTE, path=cmd["path"], ) await server_js_response( test_server, REMOTE_SERVICE_STATUS_STARTED, path=sc.API_REMOTE_SVC_STATUS, ) await server_js_response( test_server, REMOTE_SERVICE_STATUS_FINISHED_SUCCESS, path=sc.API_REMOTE_SVC_STATUS, ) assert await task @pytest.mark.asyncio async def test_remote_cmds_g1(test_server, multi_vehicle_controller): cmd_list = [ { "command": multi_vehicle_controller.horn(TEST_VIN_5_G1_SECURITY), "path": sc.API_HORN_LIGHTS, "status_url": sc.API_G1_HORN_LIGHTS_STATUS, }, { "command": multi_vehicle_controller.horn_stop(TEST_VIN_5_G1_SECURITY), "path": sc.API_HORN_LIGHTS_STOP, "status_url": sc.API_G1_HORN_LIGHTS_STATUS, }, { "command": multi_vehicle_controller.lights(TEST_VIN_5_G1_SECURITY), "path": sc.API_LIGHTS, "status_url": sc.API_G1_HORN_LIGHTS_STATUS, }, { "command": multi_vehicle_controller.lights_stop(TEST_VIN_5_G1_SECURITY), "path": sc.API_LIGHTS_STOP, "status_url": sc.API_G1_HORN_LIGHTS_STATUS, }, { "command": multi_vehicle_controller.lock(TEST_VIN_5_G1_SECURITY), "path": sc.API_LOCK, "status_url": sc.API_REMOTE_SVC_STATUS, }, { "command": multi_vehicle_controller.unlock(TEST_VIN_5_G1_SECURITY), "path": sc.API_UNLOCK, "status_url": sc.API_REMOTE_SVC_STATUS, }, ] for cmd in cmd_list: task = asyncio.create_task(cmd["command"]) await server_js_response(test_server, VALIDATE_SESSION_FAIL, path=sc.API_VALIDATE_SESSION) await server_js_response(test_server, LOGIN_MULTI_REGISTERED, path=sc.API_LOGIN) await server_js_response( test_server, SELECT_VEHICLE_5, path=sc.API_SELECT_VEHICLE, query={"vin": TEST_VIN_5_G1_SECURITY, "_": str(int(time.time()))}, ) await server_js_response( test_server, REMOTE_SERVICE_EXECUTE, path=cmd["path"], ) await server_js_response(test_server, REMOTE_SERVICE_STATUS_STARTED, path=cmd["status_url"]) await server_js_response( test_server, REMOTE_SERVICE_STATUS_FINISHED_SUCCESS, path=cmd["status_url"], ) assert await task @pytest.mark.asyncio async def test_remote_cmds_unsupported(multi_vehicle_controller): cmd_list = [ multi_vehicle_controller.horn(TEST_VIN_4_SAFETY_PLUS), multi_vehicle_controller.horn_stop(TEST_VIN_4_SAFETY_PLUS), multi_vehicle_controller.lights(TEST_VIN_4_SAFETY_PLUS), multi_vehicle_controller.lights_stop(TEST_VIN_4_SAFETY_PLUS), multi_vehicle_controller.lock(TEST_VIN_4_SAFETY_PLUS), multi_vehicle_controller.unlock(TEST_VIN_4_SAFETY_PLUS), multi_vehicle_controller.charge_start(TEST_VIN_4_SAFETY_PLUS), multi_vehicle_controller.remote_stop(TEST_VIN_4_SAFETY_PLUS), multi_vehicle_controller.get_climate_settings(TEST_VIN_4_SAFETY_PLUS), multi_vehicle_controller.save_climate_settings(TEST_VIN_4_SAFETY_PLUS, None), multi_vehicle_controller.remote_start(TEST_VIN_4_SAFETY_PLUS), multi_vehicle_controller.update(TEST_VIN_4_SAFETY_PLUS), ] for cmd in cmd_list: task = asyncio.create_task(cmd) with pytest.raises(VehicleNotSupported): assert not await task @pytest.mark.asyncio async def test_vehicle_remote_cmd_invalid_pin(test_server, multi_vehicle_controller): task = asyncio.create_task(multi_vehicle_controller.lights(TEST_VIN_3_G2)) assert not multi_vehicle_controller.invalid_pin_entered() await server_js_response(test_server, VALIDATE_SESSION_SUCCESS, path=sc.API_VALIDATE_SESSION) await server_js_response( test_server, SELECT_VEHICLE_3, path=sc.API_SELECT_VEHICLE, query={"vin": TEST_VIN_3_G2, "_": str(int(time.time()))}, ) await server_js_response(test_server, REMOTE_CMD_INVALID_PIN, path=sc.API_LIGHTS) with pytest.raises(InvalidPIN): assert not await task assert multi_vehicle_controller.invalid_pin_entered() @pytest.mark.asyncio async def test_vehicle_remote_cmd_invalid_pin_twice(test_server, multi_vehicle_controller): task = asyncio.create_task(multi_vehicle_controller.lights(TEST_VIN_3_G2)) assert not multi_vehicle_controller.invalid_pin_entered() await server_js_response(test_server, VALIDATE_SESSION_SUCCESS, path=sc.API_VALIDATE_SESSION) await server_js_response( test_server, SELECT_VEHICLE_3, path=sc.API_SELECT_VEHICLE, query={"vin": TEST_VIN_3_G2, "_": str(int(time.time()))}, ) await server_js_response( test_server, REMOTE_CMD_INVALID_PIN, path=sc.API_LIGHTS, ) with pytest.raises(InvalidPIN): assert not await task assert multi_vehicle_controller.invalid_pin_entered() task = asyncio.create_task(multi_vehicle_controller.lights(TEST_VIN_3_G2)) with pytest.raises(PINLockoutProtect): await task @pytest.mark.asyncio async def test_remote_cmd_failure(test_server, multi_vehicle_controller): task = asyncio.create_task(multi_vehicle_controller.lights(TEST_VIN_3_G2)) await server_js_response(test_server, VALIDATE_SESSION_SUCCESS, path=sc.API_VALIDATE_SESSION) await server_js_response( test_server, SELECT_VEHICLE_3, path=sc.API_SELECT_VEHICLE, query={"vin": TEST_VIN_3_G2, "_": str(int(time.time()))}, ) await server_js_response( test_server, REMOTE_SERVICE_EXECUTE, path=sc.API_LIGHTS, ) await server_js_response( test_server, REMOTE_SERVICE_STATUS_STARTED, path=sc.API_REMOTE_SVC_STATUS, ) await server_js_response( test_server, REMOTE_SERVICE_STATUS_FINISHED_FAIL, path=sc.API_REMOTE_SVC_STATUS, ) with pytest.raises(RemoteServiceFailure): assert not await task @pytest.mark.asyncio async def test_remote_cmd_timeout_g2(test_server, multi_vehicle_controller): task = asyncio.create_task(multi_vehicle_controller.lights(TEST_VIN_3_G2)) await server_js_response(test_server, VALIDATE_SESSION_SUCCESS, path=sc.API_VALIDATE_SESSION) await server_js_response( test_server, SELECT_VEHICLE_3, path=sc.API_SELECT_VEHICLE, query={"vin": TEST_VIN_3_G2, "_": str(int(time.time()))}, ) await server_js_response( test_server, REMOTE_SERVICE_EXECUTE, path=sc.API_LIGHTS, ) for _ in range(0, 20): await server_js_response( test_server, REMOTE_SERVICE_STATUS_STARTED, path=sc.API_REMOTE_SVC_STATUS, ) with pytest.raises(RemoteServiceFailure): assert not await task @pytest.mark.asyncio async def test_remote_cmd_timeout_g1(test_server, multi_vehicle_controller): task = asyncio.create_task(multi_vehicle_controller.lights(TEST_VIN_5_G1_SECURITY)) await server_js_response(test_server, VALIDATE_SESSION_SUCCESS, path=sc.API_VALIDATE_SESSION) await server_js_response( test_server, LOCATE_G1_EXECUTE, path=sc.API_LIGHTS, ) for _ in range(0, 20): await server_js_response(test_server, LOCATE_G1_STARTED, path=sc.API_G1_HORN_LIGHTS_STATUS) with pytest.raises(RemoteServiceFailure): assert not await task @pytest.mark.asyncio async def test_get_climate_settings(test_server, multi_vehicle_controller): task = asyncio.create_task(multi_vehicle_controller.get_climate_settings(TEST_VIN_3_G2)) await server_js_response(test_server, VALIDATE_SESSION_SUCCESS, path=sc.API_VALIDATE_SESSION) await server_js_response( test_server, SELECT_VEHICLE_3, path=sc.API_SELECT_VEHICLE, query={"vin": TEST_VIN_3_G2, "_": str(int(time.time()))}, ) await server_js_response( test_server, GET_CLIMATE_SETTINGS_G2, path=sc.API_G2_FETCH_CLIMATE_SETTINGS, ) assert await task @pytest.mark.asyncio async def test_validate_climate_settings(multi_vehicle_controller): form_data = { sc.REAR_AC: None, sc.MODE: None, sc.FAN_SPEED: None, sc.TEMP_F: "100", sc.REAR_DEFROST: None, sc.HEAT_SEAT_LEFT: None, sc.HEAT_SEAT_RIGHT: None, sc.RECIRCULATE: None, sc.RUNTIME: None, sc.START_CONFIG: None, } task = asyncio.create_task(multi_vehicle_controller.save_climate_settings(TEST_VIN_3_G2, form_data)) with pytest.raises(SubaruException): assert not await task @pytest.mark.asyncio async def test_save_climate_settings(test_server, multi_vehicle_controller): form_data = { sc.REAR_AC: "false", sc.MODE: "AUTO", sc.FAN_SPEED: "AUTO", sc.TEMP_F: "71", sc.REAR_DEFROST: sc.REAR_DEFROST_OFF, sc.HEAT_SEAT_LEFT: "OFF", sc.HEAT_SEAT_RIGHT: "OFF", sc.RECIRCULATE: "outsideAir", sc.RUNTIME: "10", sc.START_CONFIG: "start_Climate_Control_only_allow_key_in_ignition", } task = asyncio.create_task(multi_vehicle_controller.save_climate_settings(TEST_VIN_2_EV, form_data)) await server_js_response(test_server, VALIDATE_SESSION_SUCCESS, path=sc.API_VALIDATE_SESSION) await server_js_response( test_server, SELECT_VEHICLE_2, path=sc.API_SELECT_VEHICLE, query={"vin": TEST_VIN_2_EV, "_": str(int(time.time()))}, ) await server_js_response( test_server, SAVE_CLIMATE_SETTINGS, path=sc.API_G2_SAVE_CLIMATE_SETTINGS, ) assert await task @pytest.mark.asyncio async def test_remote_start_no_args(test_server, multi_vehicle_controller): task = asyncio.create_task(multi_vehicle_controller.remote_start(TEST_VIN_3_G2)) await server_js_response(test_server, VALIDATE_SESSION_SUCCESS, path=sc.API_VALIDATE_SESSION) await server_js_response( test_server, SELECT_VEHICLE_3, path=sc.API_SELECT_VEHICLE, query={"vin": TEST_VIN_3_G2, "_": str(int(time.time()))}, ) await server_js_response( test_server, GET_CLIMATE_SETTINGS_G2, path=sc.API_G2_FETCH_CLIMATE_SETTINGS, ) await server_js_response(test_server, VALIDATE_SESSION_SUCCESS, path=sc.API_VALIDATE_SESSION) await server_js_response( test_server, REMOTE_SERVICE_EXECUTE, path=sc.API_G2_REMOTE_ENGINE_START, ) await server_js_response( test_server, REMOTE_SERVICE_STATUS_STARTED, path=sc.API_REMOTE_SVC_STATUS, ) await server_js_response( test_server, REMOTE_SERVICE_STATUS_FINISHED_SUCCESS, path=sc.API_REMOTE_SVC_STATUS, ) assert await task @pytest.mark.asyncio async def test_remote_start_bad_args(multi_vehicle_controller): task = asyncio.create_task(multi_vehicle_controller.remote_start(TEST_VIN_3_G2, {"Bad": "Params"})) with pytest.raises(SubaruException): await task @pytest.mark.asyncio async def test_remote_start_good_args(test_server, multi_vehicle_controller): form_data = { sc.REAR_AC: "false", sc.MODE: "AUTO", sc.FAN_SPEED: "AUTO", sc.TEMP_F: "71", sc.REAR_DEFROST: sc.REAR_DEFROST_OFF, sc.HEAT_SEAT_LEFT: "OFF", sc.HEAT_SEAT_RIGHT: "OFF", sc.RECIRCULATE: "outsideAir", } task = asyncio.create_task(multi_vehicle_controller.remote_start(TEST_VIN_3_G2, form_data)) await server_js_response(test_server, VALIDATE_SESSION_SUCCESS, path=sc.API_VALIDATE_SESSION) await server_js_response( test_server, SELECT_VEHICLE_3, path=sc.API_SELECT_VEHICLE, query={"vin": TEST_VIN_3_G2, "_": str(int(time.time()))}, ) await server_js_response( test_server, REMOTE_SERVICE_EXECUTE, path=sc.API_G2_REMOTE_ENGINE_START, ) await server_js_response( test_server, REMOTE_SERVICE_STATUS_STARTED, path=sc.API_REMOTE_SVC_STATUS, ) await server_js_response( test_server, REMOTE_SERVICE_STATUS_FINISHED_SUCCESS, path=sc.API_REMOTE_SVC_STATUS, ) assert await task
33.2407
104
0.687447
1,935
15,191
4.92093
0.069251
0.033606
0.05482
0.10586
0.887314
0.870195
0.859903
0.81758
0.76276
0.717076
0
0.011033
0.230334
15,191
456
105
33.313596
0.80337
0.002436
0
0.609337
0
0
0.027726
0.003169
0
0
0
0
0.041769
1
0
false
0
0.017199
0
0.017199
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
fd476dc3fdb2f9c3f6e7715f932ab5214a409067
145
py
Python
whatsapp/tasks/signals.py
jaobernardi/robosdocovid
e620b2951e5bdd9046f81abf38e767080a9695f4
[ "Apache-2.0" ]
1
2021-05-08T22:38:18.000Z
2021-05-08T22:38:18.000Z
whatsapp/tasks/signals.py
jaobernardi/robosdocovid
e620b2951e5bdd9046f81abf38e767080a9695f4
[ "Apache-2.0" ]
2
2021-05-06T09:19:06.000Z
2021-05-06T09:19:39.000Z
chatpls/tasks/signals.py
jaobernardi/chatpls
eaf79b72466cdfbf8168b8e059859c707cfde8df
[ "MIT" ]
null
null
null
import signal import sys from .methods import processes import os import logging signal.signal(signal.SIGINT, (lambda sig, frame: sys.exit()))
16.111111
61
0.77931
21
145
5.380952
0.619048
0.212389
0
0
0
0
0
0
0
0
0
0
0.131034
145
8
62
18.125
0.896825
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.833333
0
0.833333
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
b5c7c13f02ba6c7eea8a72abd390d18b7f0efa87
45
py
Python
mrtopo/structures/__init__.py
FaizChishtie/MrTopo
e6a674738d8b0a0c56edde2be0ae272ea9e62f1a
[ "MIT" ]
1
2021-01-26T11:01:32.000Z
2021-01-26T11:01:32.000Z
mrtopo/structures/__init__.py
FaizChishtie/MrTopo
e6a674738d8b0a0c56edde2be0ae272ea9e62f1a
[ "MIT" ]
null
null
null
mrtopo/structures/__init__.py
FaizChishtie/MrTopo
e6a674738d8b0a0c56edde2be0ae272ea9e62f1a
[ "MIT" ]
1
2020-12-23T22:01:09.000Z
2020-12-23T22:01:09.000Z
from .config import * from .topology import *
22.5
23
0.755556
6
45
5.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.155556
45
2
23
22.5
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
b5c7eb47ec5aa1b060cb62f7885300c5eb386de9
4,476
py
Python
pybold/convolution.py
hcherkaoui/pybold
54e5b074a614ea11fe439707263351d93340499a
[ "BSD-3-Clause" ]
4
2019-11-03T10:12:11.000Z
2020-10-10T23:42:02.000Z
pybold/convolution.py
CherkaouiHamza/pybold
54e5b074a614ea11fe439707263351d93340499a
[ "BSD-3-Clause" ]
null
null
null
pybold/convolution.py
CherkaouiHamza/pybold
54e5b074a614ea11fe439707263351d93340499a
[ "BSD-3-Clause" ]
1
2021-05-18T04:52:10.000Z
2021-05-18T04:52:10.000Z
# coding: utf-8 """ This module gathers convolution functions. """ import numpy as np from numpy.fft import rfft, irfft from .padding import custom_padd, unpadd def spectral_convolve(k, x): """ Return k.conv(x). Parameters: ----------- k : 1d np.ndarray, kernel. x : 1d np.ndarray, signal. Results: -------- k_conv_x : 1d np.ndarray, the convolved signal. """ x, p = custom_padd(x) N = len(x) fft_k = rfft(k, n=N, norm=None) padded_h_conv_x = irfft(fft_k * rfft(x, n=N, norm=None), norm=None) k_conv_x = unpadd(padded_h_conv_x, p) return k_conv_x def spectral_retro_convolve(k, x): """ Return k_t.conv(x). Parameters: ----------- k : 1d np.ndarray, kernel. x : 1d np.ndarray, signal. Results: -------- k_conv_x : 1d np.ndarray, the convolved signal. """ x, p = custom_padd(x) N = len(x) fft_k = rfft(k, n=N, norm=None).conj() padded_k_conv_x = irfft(fft_k * rfft(x, n=N, norm=None), norm=None) k_conv_x = unpadd(padded_k_conv_x, p) return k_conv_x def spectral_deconvolve(k, x): """ Return k.conv(x). Parameters: ----------- k : 1d np.ndarray, kernel. x : 1d np.ndarray, signal. Results: -------- k_conv_x : 1d np.ndarray, the convolved signal. """ x, p = custom_padd(x) N = len(x) fft_k = 1.0 / rfft(k, n=N, norm=None) padded_h_conv_x = irfft(fft_k * rfft(x, n=N, norm=None), norm=None) k_conv_x = unpadd(padded_h_conv_x, p) return k_conv_x def spectral_retro_deconvolve(k, x): """ Return k.conv(x). Parameters: ----------- k : 1d np.ndarray, kernel. x : 1d np.ndarray, signal. Results: -------- k_conv_x : 1d np.ndarray, the convolved signal. """ x, p = custom_padd(x) N = len(x) fft_k = (1.0 / rfft(k, n=N, norm=None)).conj() padded_h_conv_x = irfft(fft_k * rfft(x, n=N, norm=None), norm=None) k_conv_x = unpadd(padded_h_conv_x, p) return k_conv_x def toeplitz_from_kernel(k, dim_in, dim_out=None): """ Return the Toeplitz matrix that correspond to k.conv(.). Parameters: ----------- k : 1d np.ndarray, kernel. dim_in : int, dimension of the input vector (dim of x in y = k.conv(x)). dim_out : int (default None), dimension of the ouput vector (dim of y in y = in k.conv(x)). If None dim_out = dim_in. Results: -------- K : 2d np.ndarray, the Toeplitz matrix corresponding to the convolution specified. """ if dim_out is None: dim_out = dim_in padded_k = np.hstack([np.zeros(dim_in), np.flipud(k), np.zeros(dim_in)]) K = np.empty((dim_out, dim_in)) for i in range(dim_out): start_idx = (dim_in + len(k) - 1) - i K[i, :] = padded_k[start_idx: start_idx + dim_in] return K def simple_convolve(k, x, dim_out=None): """ Return k.conv(x). Parameters: ----------- k : 1d np.ndarray, kernel. x : 1d np.ndarray, signal. dim_out : int (default None), dimension of the ouput vector (dim of y in y = in k.conv(x)). If None d = len(x). Results: -------- k_conv_x : 1d np.ndarray, the convolved signal. """ if dim_out is None: dim_out = len(x) dim_in = len(x) padded_k = np.hstack([np.zeros(dim_in), np.flipud(k), np.zeros(dim_in)]) k_conv_x = np.empty(dim_out) for i in range(dim_out): start_idx = (dim_in + len(k) - 1) - i k_conv_x[i] = (padded_k[start_idx: start_idx + dim_in] * x).sum() return k_conv_x def simple_retro_convolve(k, x, dim_out=None): """ Return k_t.conv(x). Parameters: ----------- k : 1d np.ndarray, kernel x : 1d np.ndarray, signal. dim_out : int (default None), dimension of the ouput vector (dim of y in y = in k.conv(x)). If None d = len(x). Results: -------- k_conv_x : 1d np.ndarray, the convolved signal. """ if dim_out is None: dim_out = len(x) dim_in = len(x) padded_k = np.hstack([np.zeros(dim_out - 1), k, np.zeros(dim_out - 1)]) k_conv_x = np.empty(dim_out) for i in range(dim_out): start_idx = dim_out - 1 - i k_conv_x[i] = (padded_k[start_idx: start_idx + dim_in] * x).sum() return k_conv_x
22.720812
77
0.558534
713
4,476
3.30575
0.113604
0.080611
0.076368
0.061095
0.837505
0.821807
0.801867
0.793381
0.770471
0.745863
0
0.009455
0.291108
4,476
196
78
22.836735
0.733375
0.39723
0
0.633333
0
0
0
0
0
0
0
0
0
1
0.116667
false
0
0.05
0
0.283333
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
b5db40c671abdf95a26fbfb81c1c8faddaeb7b95
13,968
py
Python
pymatflow/cp2k/base/eip.py
DeqiTang/pymatflow
bd8776feb40ecef0e6704ee898d9f42ded3b0186
[ "MIT" ]
6
2020-03-06T16:13:08.000Z
2022-03-09T07:53:34.000Z
pymatflow/cp2k/base/eip.py
DeqiTang/pymatflow
bd8776feb40ecef0e6704ee898d9f42ded3b0186
[ "MIT" ]
1
2021-10-02T02:23:08.000Z
2021-11-08T13:29:37.000Z
pymatflow/cp2k/base/eip.py
DeqiTang/pymatflow
bd8776feb40ecef0e6704ee898d9f42ded3b0186
[ "MIT" ]
1
2021-07-10T16:28:14.000Z
2021-07-10T16:28:14.000Z
#!/usr/bin/evn python # _*_ coding: utf-8 _*_ import numpy as np import sys import os import shutil # ============================================ # CP2K / EIP #============================================= class cp2k_eip_print_coord_avg_each: """ """ def __init__(self): self.params = { } self.status = False # basic setting def to_input(self, fout): """ fout: a file stream for writing """ fout.write("\t\t\t\t&EACH\n") for item in self.params: if self.params[item] is not None: fout.write("\t\t\t\t\t%s %s\n" % (item, self.params[item])) fout.write("\t\t\t\t&END EACH\n") def set_params(self, params): for item in params: if len(item.split("-")) == 5: self.params[item.split("-")[-1]] = params[item] else: pass class cp2k_eip_print_coord_avg: """ """ def __init__(self): self.params = { } self.status = False self.each = cp2k_eip_print_coord_avg_each() # basic setting def to_input(self, fout): """ fout: a file stream for writing """ fout.write("\t\t\t&COORD_AVG\n") for item in self.params: if self.params[item] is not None: fout.write("\t\t\t\t%s %s\n" % (item, self.params[item])) if self.each.status == True: self.each.to_input(fout) fout.write("\t\t\t&END COORD_AVG\n") def set_params(self, params): for item in params: if len(item.split("-")) == 4: self.params[item.split("-")[-1]] = params[item] elif item.split("-")[3] == "EACH": self.each.set_params({item: params[item]}) else: pass class cp2k_eip_print_coord_var_each: """ """ def __init__(self): self.params = { } self.status = False # basic setting def to_input(self, fout): """ fout: a file stream for writing """ fout.write("\t\t\t\t&EACH\n") for item in self.params: if self.params[item] is not None: fout.write("\t\t\t\t\t%s %s\n" % (item, self.params[item])) fout.write("\t\t\t\t&END EACH\n") def set_params(self, params): for item in params: if len(item.split("-")) == 5: self.params[item.split("-")[-1]] = params[item] else: pass class cp2k_eip_print_coord_var: """ """ def __init__(self): self.params = { } self.status = False self.each = cp2k_eip_print_coord_var_each() # basic setting def to_input(self, fout): """ fout: a file stream for writing """ fout.write("\t\t\t&COORD_VAR\n") for item in self.params: if self.params[item] is not None: fout.write("\t\t\t\t%s %s\n" % (item, self.params[item])) if self.each.status == True: self.each.to_input(fout) fout.write("\t\t\t&END COORD_VAR\n") def set_params(self, params): for item in params: if len(item.split("-")) == 4: self.params[item.split("-")[-1]] = params[item] elif item.split("-")[3] == "EACH": self.each.set_params({item: params[item]}) else: pass class cp2k_eip_print_count_each: """ """ def __init__(self): self.params = { } self.status = False # basic setting def to_input(self, fout): """ fout: a file stream for writing """ fout.write("\t\t\t\t&EACH\n") for item in self.params: if self.params[item] is not None: fout.write("\t\t\t\t\t%s %s\n" % (item, self.params[item])) fout.write("\t\t\t\t&END EACH\n") def set_params(self, params): for item in params: if len(item.split("-")) == 5: self.params[item.split("-")[-1]] = params[item] else: pass class cp2k_eip_print_count: """ """ def __init__(self): self.params = { } self.status = False self.each = cp2k_eip_print_count_each() # basic setting def to_input(self, fout): """ fout: a file stream for writing """ fout.write("\t\t\t&COUNT\n") for item in self.params: if self.params[item] is not None: fout.write("\t\t\t\t%s %s\n" % (item, self.params[item])) if self.each.status == True: self.each.to_input(fout) fout.write("\t\t\t&END COUNT\n") def set_params(self, params): for item in params: if len(item.split("-")) == 4: self.params[item.split("-")[-1]] = params[item] elif item.split("-")[3] == "EACH": self.each.set_params({item: params[item]}) else: pass class cp2k_eip_print_energies_each: """ """ def __init__(self): self.params = { } self.status = False # basic setting def to_input(self, fout): """ fout: a file stream for writing """ fout.write("\t\t\t\t&EACH\n") for item in self.params: if self.params[item] is not None: fout.write("\t\t\t\t\t%s %s\n" % (item, self.params[item])) fout.write("\t\t\t\t&END EACH\n") def set_params(self, params): for item in params: if len(item.split("-")) == 5: self.params[item.split("-")[-1]] = params[item] else: pass class cp2k_eip_print_energies: """ """ def __init__(self): self.params = { } self.status = False self.each = cp2k_eip_print_energies_each() # basic setting def to_input(self, fout): """ fout: a file stream for writing """ fout.write("\t\t\t&ENERGIES\n") for item in self.params: if self.params[item] is not None: fout.write("\t\t\t\t%s %s\n" % (item, self.params[item])) if self.each.status == True: self.each.to_input(fout) fout.write("\t\t\t&END ENERGIES\n") def set_params(self, params): for item in params: if len(item.split("-")) == 4: self.params[item.split("-")[-1]] = params[item] elif item.split("-")[3] == "EACH": self.each.set_params({item: params[item]}) else: pass class cp2k_eip_print_energies_var_each: """ """ def __init__(self): self.params = { } self.status = False # basic setting def to_input(self, fout): """ fout: a file stream for writing """ fout.write("\t\t\t\t&EACH\n") for item in self.params: if self.params[item] is not None: fout.write("\t\t\t\t\t%s %s\n" % (item, self.params[item])) fout.write("\t\t\t\t&END EACH\n") def set_params(self, params): for item in params: if len(item.split("-")) == 5: self.params[item.split("-")[-1]] = params[item] else: pass class cp2k_eip_print_energies_var: """ """ def __init__(self): self.params = { } self.status = False self.each = cp2k_eip_print_energies_var_each() # basic setting def to_input(self, fout): """ fout: a file stream for writing """ fout.write("\t\t\t&ENERGIES_VAR\n") for item in self.params: if self.params[item] is not None: fout.write("\t\t\t\t%s %s\n" % (item, self.params[item])) if self.each.status == True: self.each.to_input(fout) fout.write("\t\t\t&END ENERGIES_VAR\n") def set_params(self, params): for item in params: if len(item.split("-")) == 4: self.params[item.split("-")[-1]] = params[item] elif item.split("-")[3] == "EACH": self.each.set_params({item: params[item]}) else: pass class cp2k_eip_print_forces_each: """ """ def __init__(self): self.params = { } self.status = False # basic setting def to_input(self, fout): """ fout: a file stream for writing """ fout.write("\t\t\t\t&EACH\n") for item in self.params: if self.params[item] is not None: fout.write("\t\t\t\t\t%s %s\n" % (item, self.params[item])) fout.write("\t\t\t\t&END EACH\n") def set_params(self, params): for item in params: if len(item.split("-")) == 5: self.params[item.split("-")[-1]] = params[item] else: pass class cp2k_eip_print_forces: """ """ def __init__(self): self.params = { } self.status = False self.each = cp2k_eip_print_forces_each() # basic setting def to_input(self, fout): """ fout: a file stream for writing """ fout.write("\t\t\t&FORCES\n") for item in self.params: if self.params[item] is not None: fout.write("\t\t\t\t%s %s\n" % (item, self.params[item])) if self.each.status == True: self.each.to_input(fout) fout.write("\t\t\t&END FORCES\n") def set_params(self, params): for item in params: if len(item.split("-")) == 4: self.params[item.split("-")[-1]] = params[item] elif item.split("-")[3] == "EACH": self.each.set_params({item: params[item]}) else: pass class cp2k_eip_print: """ """ def __init__(self): self.params = { } self.status = False self.coord_avg = cp2k_eip_print_coord_avg() self.coord_var = cp2k_eip_print_coord_var() self.count = cp2k_eip_print_count() self.energies = cp2k_eip_print_energies() self.energies_var = cp2k_eip_print_energies_var() self.forces = cp2k_eip_print_forces() # basic setting def to_input(self, fout): """ fout: a file stream for writing """ fout.write("\t\t&PRINT\n") for item in self.params: if self.params[item] is not None: fout.write("\t\t\t%s %s\n" % (item, self.params[item])) if self.coord_avg.status == True: self.coord_avg.to_input(fout) if self.coord_var.status == True: self.coord_var.to_input(fout) if self.count.status == True: self.count.to_input(fout) if self.energies.status == True: self.energies.to_input(fout) if self.energies_var.status == True: self.energies_var.to_input(fout) if self.forces.status == True: self.forces.to_input(fout) fout.write("\t\t&END PRINT\n") def set_params(self, params): for item in params: if len(item.split("-")) == 3: self.params[item.split("-")[-1]] = params[item] elif item.split("-")[2] == "COORD_AVG": self.coord_avg.set_params({item: params[item]}) elif item.split("-")[2] == "COORD_VAR": self.coord_var.set_params({item: params[item]}) elif item.split("-")[2] == "COUNT": self.count.set_params({item: params[item]}) elif item.split("-")[2] == "ENERGIES": self.energies.set_params({item: params[item]}) elif item.split("-")[2] == "ENERGIES_VAR": self.energies_var.set_params({item: params[item]}) elif item.split("-")[2] == "FORCES": self.forces.set_params({item: params[item]}) else: pass class cp2k_eip: """ """ def __init__(self): self.params = { } self.status = False self.printout = cp2k_eip_print() # basic setting def to_input(self, fout): """ fout: a file stream for writing """ fout.write("\t&EIP\n") for item in self.params: if self.params[item] is not None: fout.write("\t\t%s %s\n" % (item, self.params[item])) if self.printout.status == True: self.printout.to_input(fout) fout.write("\t&END EIP\n") def set_params(self, params): for item in params: if len(item.split("-")) == 2: self.params[item.split("-")[-1]] = params[item] elif item.split("-")[1] == "PRINT": self.printout.set_params({item: params[item]}) else: pass
29.039501
76
0.465707
1,679
13,968
3.73377
0.038714
0.034136
0.032063
0.070187
0.911469
0.896953
0.874302
0.864093
0.864093
0.841921
0
0.008195
0.388459
13,968
480
77
29.1
0.725708
0.056343
0
0.697068
0
0
0.067011
0.001722
0
0
0
0
0
1
0.136808
false
0.045603
0.013029
0
0.19544
0.094463
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
bd50489f89f99fbbf62eb44f57c093fea4c7eb32
60
py
Python
parser/__init__.py
bfu4/mdis
fac5ec078ffeaa9339df4b31b9b71140563f4f14
[ "MIT" ]
13
2021-05-17T06:38:50.000Z
2022-03-27T15:39:57.000Z
parser/__init__.py
bfu4/mdis
fac5ec078ffeaa9339df4b31b9b71140563f4f14
[ "MIT" ]
null
null
null
parser/__init__.py
bfu4/mdis
fac5ec078ffeaa9339df4b31b9b71140563f4f14
[ "MIT" ]
null
null
null
from .hex_dump_parser import * from .opcode_parser import *
20
30
0.8
9
60
5
0.666667
0.533333
0
0
0
0
0
0
0
0
0
0
0.133333
60
2
31
30
0.865385
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
1fb6d9a45a917d4f97df9f659c7d2435bb540349
162
py
Python
tests/test_undos/__init__.py
joshmeranda/undo
f54581223c0c157702dda6124691bb40fa2e2b31
[ "MIT" ]
null
null
null
tests/test_undos/__init__.py
joshmeranda/undo
f54581223c0c157702dda6124691bb40fa2e2b31
[ "MIT" ]
null
null
null
tests/test_undos/__init__.py
joshmeranda/undo
f54581223c0c157702dda6124691bb40fa2e2b31
[ "MIT" ]
null
null
null
import logging from .test_coreutils import * logging.disable(logging.CRITICAL) # logging.basicConfig(format="[%(levelname)s] %(message)s", level=logging.DEBUG)
23.142857
80
0.771605
20
162
6.2
0.7
0.209677
0
0
0
0
0
0
0
0
0
0
0.080247
162
6
81
27
0.832215
0.481481
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
1
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
1fb9533146006dc38e05b7fb2942d5a6390e72d9
137
py
Python
solutions/00_08.py
glemaitre/IBIOM-M2-deep-learning
001bf7834e57a7357326087d31049fc91ab8967f
[ "MIT" ]
null
null
null
solutions/00_08.py
glemaitre/IBIOM-M2-deep-learning
001bf7834e57a7357326087d31049fc91ab8967f
[ "MIT" ]
null
null
null
solutions/00_08.py
glemaitre/IBIOM-M2-deep-learning
001bf7834e57a7357326087d31049fc91ab8967f
[ "MIT" ]
null
null
null
from sklearn.pipeline import make_pipeline from sklearn.preprocessing import MinMaxScaler from sklearn.linear_model import SGDClassifier
34.25
46
0.890511
17
137
7.058824
0.588235
0.275
0
0
0
0
0
0
0
0
0
0
0.087591
137
3
47
45.666667
0.96
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
1f2ca05965cb46a10f6a0d425209b308b02957ad
137
py
Python
Python/Minha_Biblioteca/criar_menu/pessoas.py
Brun0C/projeto_python
ac544bfeb27447e820e4e2b0bd936de00d8b3348
[ "MIT" ]
null
null
null
Python/Minha_Biblioteca/criar_menu/pessoas.py
Brun0C/projeto_python
ac544bfeb27447e820e4e2b0bd936de00d8b3348
[ "MIT" ]
null
null
null
Python/Minha_Biblioteca/criar_menu/pessoas.py
Brun0C/projeto_python
ac544bfeb27447e820e4e2b0bd936de00d8b3348
[ "MIT" ]
null
null
null
def cadastrar_pessoa(): print('Pessoa cadastrada com sucesso.') def listar_pessoas(): print('Operação realizada com sucesso')
17.125
43
0.722628
16
137
6.0625
0.6875
0.206186
0
0
0
0
0
0
0
0
0
0
0.167883
137
7
44
19.571429
0.850877
0
0
0
0
0
0.441176
0
0
0
0
0
0
1
0.5
true
0
0
0
0.5
0.5
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
1
0
0
0
0
1
0
6
1f42ebcfd078cc5eedc055aab4ab073ca8762ea1
184
py
Python
examples/http/tornado_basic.py
viatoriche/microservices
3510563edd15dc6131b8a948d6062856cd904ac7
[ "MIT" ]
18
2016-04-04T03:01:37.000Z
2020-08-18T03:03:40.000Z
examples/http/tornado_basic.py
viatoriche/microservices
3510563edd15dc6131b8a948d6062856cd904ac7
[ "MIT" ]
7
2016-05-06T14:23:16.000Z
2019-11-20T11:16:35.000Z
examples/http/tornado_basic.py
viatoriche/microservices
3510563edd15dc6131b8a948d6062856cd904ac7
[ "MIT" ]
5
2016-05-06T08:20:40.000Z
2019-07-13T01:34:38.000Z
from microservices.http.runners import tornado_run from basic import microservice from microservices.utils import set_logging set_logging() tornado_run(microservice, use_gevent=True)
26.285714
50
0.86413
25
184
6.16
0.6
0.220779
0
0
0
0
0
0
0
0
0
0
0.086957
184
7
51
26.285714
0.916667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.6
0
0.6
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
1f48df0960e9fa04ca1e8496ebb2be996fea5d87
19
py
Python
filehandlers/__init__.py
raspberry9/tinypost
6e4b4bf764e93f6d344fbdb9369f326f08146d00
[ "MIT" ]
null
null
null
filehandlers/__init__.py
raspberry9/tinypost
6e4b4bf764e93f6d344fbdb9369f326f08146d00
[ "MIT" ]
null
null
null
filehandlers/__init__.py
raspberry9/tinypost
6e4b4bf764e93f6d344fbdb9369f326f08146d00
[ "MIT" ]
null
null
null
from . import file
9.5
18
0.736842
3
19
4.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.210526
19
1
19
19
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
2f61bb04c8ea2f8e1f3b48d36d4f7316a3a9efb0
125
py
Python
taglets/active/__init__.py
BatsResearch/taglets
0fa9ebeccc9177069aa09b2da84746b7532e3495
[ "Apache-2.0" ]
13
2021-11-10T13:17:10.000Z
2022-03-30T22:56:52.000Z
taglets/active/__init__.py
BatsResearch/taglets
0fa9ebeccc9177069aa09b2da84746b7532e3495
[ "Apache-2.0" ]
1
2021-11-10T16:01:47.000Z
2021-11-10T16:01:47.000Z
taglets/active/__init__.py
BatsResearch/taglets
0fa9ebeccc9177069aa09b2da84746b7532e3495
[ "Apache-2.0" ]
2
2022-02-14T22:40:29.000Z
2022-02-27T04:27:48.000Z
""" Classes related to active learning. """ from .active_learning import RandomActiveLearning, LeastConfidenceActiveLearning
25
80
0.832
11
125
9.363636
0.818182
0.271845
0
0
0
0
0
0
0
0
0
0
0.096
125
4
81
31.25
0.911504
0.28
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
2f75059ee7f54a7ba21090fab1f144659d1d377e
277
py
Python
wwshc/__init__.py
J0J0HA/realeses
903783244e183418c8ddf91c6a0cbac3c2d40fdb
[ "MIT" ]
2
2022-02-20T13:23:14.000Z
2022-02-28T15:56:40.000Z
wwshc/__init__.py
J0J0HA/realeses
903783244e183418c8ddf91c6a0cbac3c2d40fdb
[ "MIT" ]
null
null
null
wwshc/__init__.py
J0J0HA/realeses
903783244e183418c8ddf91c6a0cbac3c2d40fdb
[ "MIT" ]
null
null
null
from .references import * print("WWSHC is still in production. Please report any errors, problems and suggestions on https://github.com/J0J0HA/wwshc/issues") print("Please be aware that WWSHC needs to be the only browser logged in to WWS to support window-events completely!")
69.25
131
0.790614
44
277
4.977273
0.818182
0
0
0
0
0
0
0
0
0
0
0.008333
0.133574
277
3
132
92.333333
0.904167
0
0
0
0
0.666667
0.833935
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0.666667
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
6
c82e29ae1a10fd098d7c71346da4be7b1bbbe37b
96
py
Python
venv/lib/python3.8/site-packages/future/moves/subprocess.py
GiulianaPola/select_repeats
17a0d053d4f874e42cf654dd142168c2ec8fbd11
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/future/moves/subprocess.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/future/moves/subprocess.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/a2/a4/52/31f15993133831792dde80f937a781c26989eab43d28f86f490293fe13
96
96
0.895833
9
96
9.555556
1
0
0
0
0
0
0
0
0
0
0
0.489583
0
96
1
96
96
0.40625
0
0
0
0
0
0
0
0
1
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
1
0
0
0
1
0
0
0
0
0
0
0
0
6
c857764486082ac2cbdb15e626652a7c696666d5
75
py
Python
apps/admin/fail_login/tests/test_fail_login.py
MySmile/mysmile
5abe4baa7970674d1f8365d875519283c2e29dae
[ "BSD-3-Clause" ]
5
2015-05-03T09:51:32.000Z
2019-05-21T14:19:02.000Z
apps/admin/fail_login/tests/test_fail_login.py
MySmile/mysmile
5abe4baa7970674d1f8365d875519283c2e29dae
[ "BSD-3-Clause" ]
24
2015-04-05T16:28:08.000Z
2022-03-11T23:36:56.000Z
apps/admin/fail_login/tests/test_fail_login.py
MySmile/mysmile
5abe4baa7970674d1f8365d875519283c2e29dae
[ "BSD-3-Clause" ]
null
null
null
from django.test import TestCase class FailLoginTest(TestCase): pass
12.5
32
0.773333
9
75
6.444444
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.173333
75
5
33
15
0.935484
0
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
c08ddc885b9f3a69e9381ef23592e9ea1a430ce0
62
py
Python
static/code/backpropagation/gradtanh.py
navivokaj/deepcourse
c5385e7a7b8417fe1017f1057e8e5d32b4a24bb5
[ "Apache-2.0" ]
91
2021-08-28T05:03:36.000Z
2022-01-27T09:46:36.000Z
static/code/backpropagation/gradtanh.py
faisalbi/deepcourse
fe26314e43896013d195955d16fc4f215e39a53a
[ "Apache-2.0" ]
8
2021-09-14T13:21:56.000Z
2021-12-28T19:45:51.000Z
static/code/backpropagation/gradtanh.py
faisalbi/deepcourse
fe26314e43896013d195955d16fc4f215e39a53a
[ "Apache-2.0" ]
10
2021-08-28T22:32:19.000Z
2022-03-16T11:13:02.000Z
def grad_tanh(tanh_results): return 1 - tanh_results ** 2
20.666667
32
0.709677
10
62
4.1
0.7
0.536585
0
0
0
0
0
0
0
0
0
0.04
0.193548
62
2
33
31
0.78
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
1
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
c0c34466d3e0c6e3a81a4ba07236d405ae09eb90
96,241
py
Python
pysnmp-with-texts/CISCO-VISM-TRAPS-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/CISCO-VISM-TRAPS-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/CISCO-VISM-TRAPS-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module CISCO-VISM-TRAPS-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-VISM-TRAPS-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:18:45 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # ObjectIdentifier, OctetString, Integer = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "OctetString", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint") moduleSlotNumber, functionModuleType, moduleTrapAlarmSeverity = mibBuilder.importSymbols("BASIS-GENERIC-MIB", "moduleSlotNumber", "functionModuleType", "moduleTrapAlarmSeverity") basis, = mibBuilder.importSymbols("BASIS-MIB", "basis") shelfNodeName, shelfNum = mibBuilder.importSymbols("BASIS-SHELF-MIB", "shelfNodeName", "shelfNum") vismAal2CidFailReason, vismAal2CidState, vismAal2CidNum, vismAal2CidAdminState, vismAal2CidLcn = mibBuilder.importSymbols("CISCO-VISM-ATM-TRUNK-MIB", "vismAal2CidFailReason", "vismAal2CidState", "vismAal2CidNum", "vismAal2CidAdminState", "vismAal2CidLcn") networkCacConfigState, vismChanNum = mibBuilder.importSymbols("CISCO-VISM-CAC-MIB", "networkCacConfigState", "vismChanNum") vismCasVariantState, vismCasFileName, vismCasVariantName = mibBuilder.importSymbols("CISCO-VISM-CAS-MIB", "vismCasVariantState", "vismCasFileName", "vismCasVariantName") vismChanPortNum, vismChanReroute, vismChanLockingState, vismChanActivityState, vismChanRowStatus, vismCnfChanNum, vismChanStatusBitMap = mibBuilder.importSymbols("CISCO-VISM-CONN-MIB", "vismChanPortNum", "vismChanReroute", "vismChanLockingState", "vismChanActivityState", "vismChanRowStatus", "vismCnfChanNum", "vismChanStatusBitMap") vismFreeDs0Count, = mibBuilder.importSymbols("CISCO-VISM-DSX0-MIB", "vismFreeDs0Count") vismHdlcChanNum, = mibBuilder.importSymbols("CISCO-VISM-HDLC-MIB", "vismHdlcChanNum") vismCPUUtilization, vismFeatureBitMap, vismMemoryUtilization, vismAal2SubcellMuxing, vismIpAddress, vismConfigChangeTypeBitMap, vismTrapIntIndex2, vismFreeDs0Threshold, vismMode, vismCPUUtilizationThreshold, vismAppliedTemplate, vismTrapStrIndex1, vismMemoryUtilizationThreshold, vismTrapIntIndex1 = mibBuilder.importSymbols("CISCO-VISM-MODULE-MIB", "vismCPUUtilization", "vismFeatureBitMap", "vismMemoryUtilization", "vismAal2SubcellMuxing", "vismIpAddress", "vismConfigChangeTypeBitMap", "vismTrapIntIndex2", "vismFreeDs0Threshold", "vismMode", "vismCPUUtilizationThreshold", "vismAppliedTemplate", "vismTrapStrIndex1", "vismMemoryUtilizationThreshold", "vismTrapIntIndex1") vismPortNum, vismPortState, vismPortDs0ConfigBitMap, vismPortType = mibBuilder.importSymbols("CISCO-VISM-PORT-MIB", "vismPortNum", "vismPortState", "vismPortDs0ConfigBitMap", "vismPortType") vismSessionGrpNum, vismSessionSetState, vismSessionSetNum, vismRudpSessionState, vismSessionGrpState, vismRudpSessionNum = mibBuilder.importSymbols("CISCO-VISM-SESSION-MIB", "vismSessionGrpNum", "vismSessionSetState", "vismSessionSetNum", "vismRudpSessionState", "vismSessionGrpState", "vismRudpSessionNum") cvcmCasTemplateName, = mibBuilder.importSymbols("CISCO-VOICE-CAS-MODULE-MIB", "cvcmCasTemplateName") cwAnnFileCodec, cwAnnFileName, cwAnnFileStatus = mibBuilder.importSymbols("CISCO-WAN-ANNOUNCEMENT-MIB", "cwAnnFileCodec", "cwAnnFileName", "cwAnnFileStatus") vismLapdDlcLinkState, vismLapdDlcTei, vismLapdDlcSapi, vismLapdTrunkState, vismLapdDlcIndex, vismLapdIndex = mibBuilder.importSymbols("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdDlcLinkState", "vismLapdDlcTei", "vismLapdDlcSapi", "vismLapdTrunkState", "vismLapdDlcIndex", "vismLapdIndex") mgcResolutionIpAddress, mgAdministrativeState, mgcAssociationState, mgEndpointState, mgcResolutionCommState, mgEndpointChannelMap, mgEndpointLineNumber, mgDnsResolutionType, mgcResolutionName, mgcName, mgDomainName = mibBuilder.importSymbols("CISCO-WAN-MG-MIB", "mgcResolutionIpAddress", "mgAdministrativeState", "mgcAssociationState", "mgEndpointState", "mgcResolutionCommState", "mgEndpointChannelMap", "mgEndpointLineNumber", "mgDnsResolutionType", "mgcResolutionName", "mgcName", "mgDomainName") mgcRedundancyGrpActState, = mibBuilder.importSymbols("CISCO-WAN-MGC-REDUN-MIB", "mgcRedundancyGrpActState") persistentXgcpEventName, = mibBuilder.importSymbols("CISCO-WAN-PERSISTENT-XGCP-EVENTS-MIB", "persistentXgcpEventName") vismRtpFailReason, vismRtpConnAlarmState, vismRtpLcn = mibBuilder.importSymbols("CISCO-WAN-RTP-CONN-MIB", "vismRtpFailReason", "vismRtpConnAlarmState", "vismRtpLcn") srcpPeerTimeSinceHeartbeat, srcpPeerGrpTimeSinceHeartbeat = mibBuilder.importSymbols("CISCO-WAN-SRCP-MIB", "srcpPeerTimeSinceHeartbeat", "srcpPeerGrpTimeSinceHeartbeat") tonePlanRegionName, vismEventCode, tonePlanFileName, tonePlanVersionNumber, vismFrequency2, vismFrequency1 = mibBuilder.importSymbols("CISCO-WAN-VISM-TONE-PLAN-MIB", "tonePlanRegionName", "vismEventCode", "tonePlanFileName", "tonePlanVersionNumber", "vismFrequency2", "vismFrequency1") genericTimeStamp, genericLineType, genericLineNum = mibBuilder.importSymbols("GENERICOBJECT-MIB", "genericTimeStamp", "genericLineType", "genericLineNum") intSrvFlowStatus, = mibBuilder.importSymbols("INT-SERV-MIB", "intSrvFlowStatus") rsvpSessionDestAddr, rsvpResvFwdStatus, rsvpResvStatus, rsvpSenderStatus = mibBuilder.importSymbols("RSVP-MIB", "rsvpSessionDestAddr", "rsvpResvFwdStatus", "rsvpResvStatus", "rsvpSenderStatus") lastSequenceNumber, = mibBuilder.importSymbols("RTM-MIB", "lastSequenceNumber") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") MibScalar, MibTable, MibTableRow, MibTableColumn, Counter64, NotificationType, Counter32, IpAddress, ModuleIdentity, Unsigned32, MibIdentifier, NotificationType, Integer32, TimeTicks, Bits, iso, Gauge32, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter64", "NotificationType", "Counter32", "IpAddress", "ModuleIdentity", "Unsigned32", "MibIdentifier", "NotificationType", "Integer32", "TimeTicks", "Bits", "iso", "Gauge32", "ObjectIdentity") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") trapVismIpAddressChanged = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50700)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismIpAddress")) if mibBuilder.loadTexts: trapVismIpAddressChanged.setDescription("Sent when the card's IP address is changed. vismIpAddress contains the new IP address.") trapVismChanActive = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50709)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("CISCO-VISM-CONN-MIB", "vismCnfChanNum"), ("CISCO-VISM-CONN-MIB", "vismChanPortNum")) if mibBuilder.loadTexts: trapVismChanActive.setDescription('Sent when a channel becomes active. genericLineNum is always set to 0 on the VISM card since it is not applicable to VISM. vismCnfChanNum specifies the channel number and vismChanPortNum specifies the port number where the channel is configured.') trapVismChanDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50710)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("CISCO-VISM-CONN-MIB", "vismCnfChanNum"), ("CISCO-VISM-CONN-MIB", "vismChanPortNum")) if mibBuilder.loadTexts: trapVismChanDeleted.setDescription('Sent when a channel is deleted. genericLineNum is always set to 0 on the VISM card since it is not applicable to VISM. vismCnfChanNum specifies the channel number and vismChanPortNum specifies the port number where the channel is configured.') trapVismPortAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50711)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("GENERICOBJECT-MIB", "genericLineType"), ("CISCO-VISM-PORT-MIB", "vismPortNum"), ("CISCO-VISM-PORT-MIB", "vismPortDs0ConfigBitMap"), ("CISCO-VISM-PORT-MIB", "vismPortType")) if mibBuilder.loadTexts: trapVismPortAdded.setDescription('Indicates that a port with port number vismPortNum was added with type vismPortType.') trapVismPortActive = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50712)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("GENERICOBJECT-MIB", "genericLineType"), ("CISCO-VISM-PORT-MIB", "vismPortNum"), ("CISCO-VISM-PORT-MIB", "vismPortDs0ConfigBitMap"), ("CISCO-VISM-PORT-MIB", "vismPortType")) if mibBuilder.loadTexts: trapVismPortActive.setDescription('Indicates port with port number vismPortNum went active. The type of port is specified in vismPortType.') trapVismPortFailed = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50713)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("GENERICOBJECT-MIB", "genericLineType"), ("CISCO-VISM-PORT-MIB", "vismPortNum"), ("CISCO-VISM-PORT-MIB", "vismPortDs0ConfigBitMap"), ("CISCO-VISM-PORT-MIB", "vismPortType"), ("CISCO-VISM-PORT-MIB", "vismPortState")) if mibBuilder.loadTexts: trapVismPortFailed.setDescription('Indicates port with port number vismPortNum failed. The new state of the port is specified in vismPortState.') trapProtectedChanActive = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50714)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("CISCO-VISM-CONN-MIB", "vismCnfChanNum"), ("CISCO-VISM-CONN-MIB", "vismChanPortNum"), ("CISCO-VISM-CONN-MIB", "vismChanActivityState")) if mibBuilder.loadTexts: trapProtectedChanActive.setDescription('Sent when the channel on port number vismChanPortNum with a channel number vismCnfChanNum transitions to active as specified by vismChanActivityState .') trapProtectedChanStandby = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50715)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("CISCO-VISM-CONN-MIB", "vismCnfChanNum"), ("CISCO-VISM-CONN-MIB", "vismChanPortNum"), ("CISCO-VISM-CONN-MIB", "vismChanActivityState")) if mibBuilder.loadTexts: trapProtectedChanStandby.setDescription('Sent when the channel on port number vismChanPortNum with a channel number vismCnfChanNum transitions to standby as specified by vismChanActivityState.') trapProtectedChanFailed = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50716)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("CISCO-VISM-CONN-MIB", "vismCnfChanNum"), ("CISCO-VISM-CONN-MIB", "vismChanPortNum"), ("CISCO-VISM-CONN-MIB", "vismChanActivityState")) if mibBuilder.loadTexts: trapProtectedChanFailed.setDescription('Sent when the channel on port number vismChanPortNum with a channel number vismCnfChanNum transitions to failed as specified by vismChanActivityState.') trapProtectedChanLocked = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50717)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("CISCO-VISM-CONN-MIB", "vismCnfChanNum"), ("CISCO-VISM-CONN-MIB", "vismChanPortNum"), ("CISCO-VISM-CONN-MIB", "vismChanLockingState")) if mibBuilder.loadTexts: trapProtectedChanLocked.setDescription('Sent when the channel on port number vismChanPortNum with a channel number vismCnfChanNum transitions to locked as specified by vismChanLockingState.') trapProtectedChanUnlocked = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50718)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("CISCO-VISM-CONN-MIB", "vismCnfChanNum"), ("CISCO-VISM-CONN-MIB", "vismChanPortNum"), ("CISCO-VISM-CONN-MIB", "vismChanLockingState")) if mibBuilder.loadTexts: trapProtectedChanUnlocked.setDescription('Sent when the channel on port number vismChanPortNum with a channel number vismCnfChanNum transitions to unlocked as specified by vismChanLockingState.') trapVismCasVariantAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50739)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-CAS-MIB", "vismCasVariantName"), ("CISCO-VISM-CAS-MIB", "vismCasFileName"), ("CISCO-VISM-CAS-MIB", "vismCasVariantState")) if mibBuilder.loadTexts: trapVismCasVariantAdded.setDescription('Indicates that an entry has been added to vismCasVariantTable. vismCasVariantName is user defined and associated with vismCasFileName. vismCasFileName can be chosen from predefined filenames describing a CAS protocol. vismCasVariantState specifies whether the CAS variant is configured or not configured. ') trapVismCasVariantDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50740)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-CAS-MIB", "vismCasVariantName")) if mibBuilder.loadTexts: trapVismCasVariantDeleted.setDescription('Indicates that an entry with a name vismCasVariantName has been deleted from vismCasVariantTable.') trapVismCasVariantConfigured = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50741)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-CAS-MIB", "vismCasVariantName")) if mibBuilder.loadTexts: trapVismCasVariantConfigured.setDescription('Indicates that vismCasVariantState transitioned to configured.') trapVismCasVariantNotConfigured = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50742)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-CAS-MIB", "vismCasVariantName")) if mibBuilder.loadTexts: trapVismCasVariantNotConfigured.setDescription('Indicates that vismCasVariantState transitioned to not configured.') trapVismScalarChange = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50745)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismConfigChangeTypeBitMap")) if mibBuilder.loadTexts: trapVismScalarChange.setDescription('Sent when a scalar object/objects changes. The bit map indicates the group to which the changed object/objects belong. For a single set operation, a single trap will be sent per group, regardless of how many objects got changed in in that group.') trapVismTableChange = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50746)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismConfigChangeTypeBitMap"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex2"), ("CISCO-VISM-MODULE-MIB", "vismTrapStrIndex1")) if mibBuilder.loadTexts: trapVismTableChange.setDescription('Sent when a table config has changed. The bit map tells which table got changed. and vismTrapIntIndex1 shows the index of the table entry which got changed. If there are 2 index values, the 2nd index will be contained in vismTrapIntIndex2. If the table has a string index, the index value will be contained in vismTrapStrIndex1.') trapVismCodecTemplateChanged = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50743)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismAppliedTemplate")) if mibBuilder.loadTexts: trapVismCodecTemplateChanged.setDescription('Indicates that the VISM Codec template has been changed. vismAppliedTemplate is the new template number.') trapVismModeChanged = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50744)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismMode")) if mibBuilder.loadTexts: trapVismModeChanged.setDescription('Indicates that the mode has been changed on the card. vismMode specifies the new mode of the card.') trapVismAal2CidAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50747)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-ATM-TRUNK-MIB", "vismAal2CidNum"), ("CISCO-VISM-ATM-TRUNK-MIB", "vismAal2CidLcn")) if mibBuilder.loadTexts: trapVismAal2CidAdded.setDescription('Indicates that a CID vismAal2CidNum has been added to an LCN vismAal2CidLcn thereby creating an entry in the vismAal2CidCnfTable.') trapVismAal2CidDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50748)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-ATM-TRUNK-MIB", "vismAal2CidNum"), ("CISCO-VISM-ATM-TRUNK-MIB", "vismAal2CidLcn")) if mibBuilder.loadTexts: trapVismAal2CidDeleted.setDescription('Indicates that a CID vismAal2CidNum has been deleted from an LCN vismAal2CidLcn thereby deleting the corresponding entry from the table vismAal2CidCnfTable.') trapVismHdlcChanAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50752)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-HDLC-MIB", "vismHdlcChanNum")) if mibBuilder.loadTexts: trapVismHdlcChanAdded.setDescription('Indicates that an entry with HDLC channel number vismHdlcChanNum has been added to the table vismHdlcChanTable.') trapVismHdlcChanDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50753)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-HDLC-MIB", "vismHdlcChanNum")) if mibBuilder.loadTexts: trapVismHdlcChanDeleted.setDescription('Indicates that an entry with HDLC channel number vismHdlcChanNum has been deleted from the table vismHdlcChanTable.') trapVismPortDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50754)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("GENERICOBJECT-MIB", "genericLineType"), ("CISCO-VISM-PORT-MIB", "vismPortNum"), ("CISCO-VISM-PORT-MIB", "vismPortDs0ConfigBitMap"), ("CISCO-VISM-PORT-MIB", "vismPortType")) if mibBuilder.loadTexts: trapVismPortDeleted.setDescription('Indicates port with port number vismPortNum has been deleted.') trapVismChanAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50755)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("CISCO-VISM-CONN-MIB", "vismCnfChanNum"), ("CISCO-VISM-CONN-MIB", "vismChanPortNum")) if mibBuilder.loadTexts: trapVismChanAdded.setDescription('Sent when a VISM Channel is added, genericLineNum is always set to 0 since it is not applicable to VISM.') trapVismChanFailed = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50756)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("CISCO-VISM-CONN-MIB", "vismCnfChanNum"), ("CISCO-VISM-CONN-MIB", "vismChanPortNum"), ("CISCO-VISM-CONN-MIB", "vismChanStatusBitMap")) if mibBuilder.loadTexts: trapVismChanFailed.setDescription('Sent when a VISM Channel fails, genericLineNum is always set to 0 since it is not applicable to VISM.') trapVismConDown = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50757)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("CISCO-VISM-CONN-MIB", "vismCnfChanNum"), ("CISCO-VISM-CONN-MIB", "vismChanRowStatus"), ("CISCO-VISM-CONN-MIB", "vismChanStatusBitMap")) if mibBuilder.loadTexts: trapVismConDown.setDescription('Sent when a PVC is brought down.') trapVismConUp = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50758)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("CISCO-VISM-CONN-MIB", "vismCnfChanNum"), ("CISCO-VISM-CONN-MIB", "vismChanRowStatus"), ("CISCO-VISM-CONN-MIB", "vismChanStatusBitMap")) if mibBuilder.loadTexts: trapVismConUp.setDescription('Sent when a PVC is brought up from down. The previous vismChanRowStatus of this channel must be outOfService.') trapVismChanReroute = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50759)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("GENERICOBJECT-MIB", "genericLineNum"), ("CISCO-VISM-CONN-MIB", "vismCnfChanNum"), ("CISCO-VISM-CONN-MIB", "vismChanReroute")) if mibBuilder.loadTexts: trapVismChanReroute.setDescription('Sent when a VISM Channel is rerouted.') trapVismAal2Muxing = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50760)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismAal2SubcellMuxing")) if mibBuilder.loadTexts: trapVismAal2Muxing.setDescription('Sent when aal2 muxing type is changed. vismAal2SubcellMuxing will represent whether subcell muxing is enabled or disabled.') trapVismCidState = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50785)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-ATM-TRUNK-MIB", "vismAal2CidNum"), ("CISCO-VISM-ATM-TRUNK-MIB", "vismAal2CidLcn"), ("CISCO-VISM-ATM-TRUNK-MIB", "vismAal2CidState"), ("CISCO-VISM-ATM-TRUNK-MIB", "vismAal2CidFailReason")) if mibBuilder.loadTexts: trapVismCidState.setDescription('Sent when there is a state change on vismAal2CidNum in the LCN specified by vismAal2CidLcn to a new state specified in vismAal2CidState with the reason vismAal2CidFailReason. For example, if a PVC alarm is generated on the remote end for vismAal2CidLcn, all vismAal2CidNum within this LCN with transition to a failed state as specified in vismAal2CidState.') trapNetworkCacConfigState = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50788)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-CAC-MIB", "vismChanNum"), ("CISCO-VISM-CAC-MIB", "networkCacConfigState")) if mibBuilder.loadTexts: trapNetworkCacConfigState.setDescription('This trap is sent when networkCacConfigState changes.') trapVismFeatureChanged = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50790)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismFeatureBitMap")) if mibBuilder.loadTexts: trapVismFeatureChanged.setDescription('By changing the mode of the card you can change the usable feature set on the card. This trap is sent when the vismFeatureBitMap has been changed on the card.') trapAvailFreeDs0Low = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50680)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-VISM-MODULE-MIB", "vismFreeDs0Threshold"), ("CISCO-VISM-DSX0-MIB", "vismFreeDs0Count")) if mibBuilder.loadTexts: trapAvailFreeDs0Low.setDescription('Indicates available free DS0 on the card are low.') trapCpuUtilExceeded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50681)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-VISM-MODULE-MIB", "vismCPUUtilizationThreshold"), ("CISCO-VISM-MODULE-MIB", "vismCPUUtilization")) if mibBuilder.loadTexts: trapCpuUtilExceeded.setDescription('Indicates CPU utilization exceeded threshold.') trapMemoryUtilExceeded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50682)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-VISM-MODULE-MIB", "vismMemoryUtilizationThreshold"), ("CISCO-VISM-MODULE-MIB", "vismMemoryUtilization")) if mibBuilder.loadTexts: trapMemoryUtilExceeded.setDescription('Indicates memory utilization exceeded threshold.') mgAdministrativeStateLocked = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50719)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-WAN-MG-MIB", "mgAdministrativeState")) if mibBuilder.loadTexts: mgAdministrativeStateLocked.setDescription("Triggered when mgAdministrativeState transitions to locked. The transition may be from unlocked to locked or from 'gracefulOutOfService' to locked.") mgAdministrativeStateUnlocked = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50720)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-WAN-MG-MIB", "mgAdministrativeState")) if mibBuilder.loadTexts: mgAdministrativeStateUnlocked.setDescription('Triggered when mgAdministrativeState transitions from locked to unlocked.') mgAdministrativeStateShuttingDown = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50721)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-WAN-MG-MIB", "mgAdministrativeState")) if mibBuilder.loadTexts: mgAdministrativeStateShuttingDown.setDescription("Triggered when mgAdministrativeState transitions from unlocked to 'gracefulOutOfService'.") mgcAssociated = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50722)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgcName"), ("CISCO-WAN-MG-MIB", "mgcAssociationState")) if mibBuilder.loadTexts: mgcAssociated.setDescription('Triggered when mgAssociationState transitions to associated. The transition may be from unassociated to associated or from associatedCommLoss to associated. The value of vismTrapIntIndex1 gives the value of mgcNumber.') mgcUnassociated = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50723)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgcName"), ("CISCO-WAN-MG-MIB", "mgcAssociationState")) if mibBuilder.loadTexts: mgcUnassociated.setDescription('Triggered when mgAssociationState transitions to Unassociated. The transition may be from associated to Unassociated or from associatedCommLoss to Unassociated. The value of vismTrapIntIndex1 gives the value of mgcNumber.') mgcAssociatedCommLoss = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50724)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgcName"), ("CISCO-WAN-MG-MIB", "mgcAssociationState")) if mibBuilder.loadTexts: mgcAssociatedCommLoss.setDescription('Triggered when mgAssociationState transitions from associated to associatedCommLoss. The value of vismTrapIntIndex1 gives the value of mgcNumber.') mgcCommStateActive = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50725)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgcResolutionIpAddress"), ("CISCO-WAN-MG-MIB", "mgcResolutionCommState")) if mibBuilder.loadTexts: mgcCommStateActive.setDescription('Triggered when mgcResolutionCommState transitions from inactive to active. Indicates that an IP address of an MGC has become active. The value of vismTrapIntIndex1 gives the value of mgcResolutionIndex.') mgcCommStateInactive = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50726)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgcResolutionIpAddress"), ("CISCO-WAN-MG-MIB", "mgcResolutionCommState")) if mibBuilder.loadTexts: mgcCommStateInactive.setDescription('Triggered when mgcResolutionCommState transitions from active to inactive. Indicates that an IP address of an MGC has become inactive. The value of vismTrapIntIndex1 gives the value of mgcResolutionIndex.') mgEndpointCreated = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50727)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgEndpointLineNumber"), ("CISCO-WAN-MG-MIB", "mgEndpointChannelMap")) if mibBuilder.loadTexts: mgEndpointCreated.setDescription('Triggered by creation of an endpoint. The value of vismTrapIntIndex1 gives the value of mgEndpointNumber.') mgEndpointDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50728)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgEndpointLineNumber"), ("CISCO-WAN-MG-MIB", "mgEndpointChannelMap")) if mibBuilder.loadTexts: mgEndpointDeleted.setDescription('Triggered by deletion of an endpoint. The value of vismTrapIntIndex1 gives the value of mgEndpointNumber.') mgEndpointActive = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50729)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgEndpointLineNumber"), ("CISCO-WAN-MG-MIB", "mgEndpointChannelMap"), ("CISCO-WAN-MG-MIB", "mgEndpointState")) if mibBuilder.loadTexts: mgEndpointActive.setDescription('Triggered when mgEndpointState transitions from failed/degraded to active. The value of vismTrapIntIndex1 gives the value of mgEndpointNumber.') mgEndpointFailed = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50730)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgEndpointLineNumber"), ("CISCO-WAN-MG-MIB", "mgEndpointChannelMap"), ("CISCO-WAN-MG-MIB", "mgEndpointState")) if mibBuilder.loadTexts: mgEndpointFailed.setDescription('Triggered when mgEndpointState transitions from active to failed/degraded. The value of vismTrapIntIndex1 gives the value of mgEndpointNumber.') mgcAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50731)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgcName")) if mibBuilder.loadTexts: mgcAdded.setDescription('Indicates that an entry is added to mgcTable. The value of vismTrapIntIndex1 gives the value of mgcNumber.') mgcDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50732)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgcName")) if mibBuilder.loadTexts: mgcDeleted.setDescription('Indicates that an entry is deleted from mgcTable. The value of vismTrapIntIndex1 gives the value of mgcNumber.') mgcProtocolAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50733)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex2")) if mibBuilder.loadTexts: mgcProtocolAdded.setDescription('Indicates that an entry is added to mgcProtocolTable. The value of vismTrapIntIndex1 gives the value of mgcNumber. The value of vismTrapIntIndex2 gives the value of mgProtocolNumber.') mgcProtocolDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50734)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex2")) if mibBuilder.loadTexts: mgcProtocolDeleted.setDescription('Indicates that an entry is deleted from mgcProtocolTable. The value of vismTrapIntIndex1 gives the value of mgcNumber. The value of vismTrapIntIndex2 gives the value of mgProtocolNumber.') mgcResolutionAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50735)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgcResolutionName"), ("CISCO-WAN-MG-MIB", "mgcResolutionIpAddress")) if mibBuilder.loadTexts: mgcResolutionAdded.setDescription('Indicates that an entry is added to mgcResolutionTable. The value of vismTrapIntIndex1 gives the value of mgcResolutionIndex.') mgcResolutionDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50736)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgcResolutionName"), ("CISCO-WAN-MG-MIB", "mgcResolutionIpAddress")) if mibBuilder.loadTexts: mgcResolutionDeleted.setDescription('Indicates that an entry is deleted from mgcResolutionTable. The value of vismTrapIntIndex1 gives the value of mgcResolutionIndex.') peerHeartbeatLost = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50737)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-SRCP-MIB", "srcpPeerTimeSinceHeartbeat")) if mibBuilder.loadTexts: peerHeartbeatLost.setDescription('This notification indicates that the system failed to receive a heartbeat from a specific peer. The notification is sent when srcpPeerTimeSinceHeartbeat crosses the srcpPeerHeartbeatInterval threshold. The value of vismTrapIntIndex1 gives the value of srcpPeerId.') peerHeartbeatDetected = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50738)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-SRCP-MIB", "srcpPeerTimeSinceHeartbeat")) if mibBuilder.loadTexts: peerHeartbeatDetected.setDescription('This notification indicates that the system detected a heartbeat from a specific peer after it had been lost. The notification is sent when srcpPeerTimeSinceHeartbeat which had exceeded the threshold, resets to 0 due to receipt of a heartbeat. The value of vismTrapIntIndex1 gives the value of srcpPeerId.') trapLapdAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50761)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdIndex")) if mibBuilder.loadTexts: trapLapdAdded.setDescription('Indicates that an entry has been added to vismLapdTable with an index vismLapdIndex.') trapLapdDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50762)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdIndex")) if mibBuilder.loadTexts: trapLapdDeleted.setDescription('Indicates that the entry with index vismLapdIndex has been deleted from vismLapdTable.') trapSessionSetAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50763)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismSessionSetNum")) if mibBuilder.loadTexts: trapSessionSetAdded.setDescription('Indicates that an entry has been added to vismSessionSetTable.') trapSessionSetDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50764)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismSessionSetNum")) if mibBuilder.loadTexts: trapSessionSetDeleted.setDescription('Indicates that an entry has been deleted from vismSessionSetTable.') trapSessionGrpAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50765)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismSessionGrpNum")) if mibBuilder.loadTexts: trapSessionGrpAdded.setDescription('Indicates that an entry has been added to vismSessionGrpTable.') trapSessionGrpDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50766)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismSessionGrpNum")) if mibBuilder.loadTexts: trapSessionGrpDeleted.setDescription('Indicates that an entry has been deleted from vismSessionGrpTable.') trapRudpSessionAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50767)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismRudpSessionNum")) if mibBuilder.loadTexts: trapRudpSessionAdded.setDescription('Indicates that an entry has been added to vismRudpSessionCnfTable.') trapRudpSessionDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50768)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismRudpSessionNum")) if mibBuilder.loadTexts: trapRudpSessionDeleted.setDescription('Indicates that an entry has been deleted from vismRudpSessionCnfTable.') trapRudpSessionOos = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50769)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismRudpSessionNum"), ("CISCO-VISM-SESSION-MIB", "vismRudpSessionState")) if mibBuilder.loadTexts: trapRudpSessionOos.setDescription("When a session loses communication with the MGC the state changes to 'Out Of Service' and sends out this trap. The severity of this trap should be minor severity.") trapRudpSessionIs = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50770)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismRudpSessionNum"), ("CISCO-VISM-SESSION-MIB", "vismRudpSessionState")) if mibBuilder.loadTexts: trapRudpSessionIs.setDescription("When a session state changes to 'In Service' this trap is sent out. The severity should be informational.") trapRudpSessionPrimaryIs = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50771)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismRudpSessionNum"), ("CISCO-VISM-SESSION-MIB", "vismRudpSessionState")) if mibBuilder.loadTexts: trapRudpSessionPrimaryIs.setDescription("This trap is sent out when the session state is changed to 'Primary In Service'. The severity should be informational.") trapRudpSessionActive = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50772)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismRudpSessionNum"), ("CISCO-VISM-SESSION-MIB", "vismRudpSessionState")) if mibBuilder.loadTexts: trapRudpSessionActive.setDescription("When a 'Primary In Service' session in a group receives active message from the MGC this trap will be sent out. The severity should be informational.") trapSessionGrpOos = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50773)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismSessionGrpNum"), ("CISCO-VISM-SESSION-MIB", "vismSessionGrpState")) if mibBuilder.loadTexts: trapSessionGrpOos.setDescription("When all the sessions in the group have changed to 'Out Of Service' state, the state of this group is changed to 'Out Of Service' and this trap will be sent out. The severity should be 'minor', no alarm.") trapSessionGrpIs = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50774)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismSessionGrpNum"), ("CISCO-VISM-SESSION-MIB", "vismSessionGrpState")) if mibBuilder.loadTexts: trapSessionGrpIs.setDescription("When the state of this group is changed to 'In Service' this trap will be sent out. The severity should be informational.") trapSessionSetOos = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50775)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismSessionSetNum"), ("CISCO-VISM-SESSION-MIB", "vismSessionSetState")) if mibBuilder.loadTexts: trapSessionSetOos.setDescription("When the session set state is changed to 'Out Of Service' this trap will be sent out. The severity should be 'minor', no alarm.") trapSessionSetActiveIs = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50776)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismSessionSetNum"), ("CISCO-VISM-SESSION-MIB", "vismSessionSetState")) if mibBuilder.loadTexts: trapSessionSetActiveIs.setDescription("When the session set state is changed to 'Active In Service' state this trap will be sent out. The severity should be informational.") trapSessionSetStandbyIs = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50777)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismSessionSetNum"), ("CISCO-VISM-SESSION-MIB", "vismSessionSetState")) if mibBuilder.loadTexts: trapSessionSetStandbyIs.setDescription("When the session set state is changed to 'Standby In Service' state this trap will be sent out. The severity should be informational.") trapSessionSetFullIs = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50778)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-SESSION-MIB", "vismSessionSetNum"), ("CISCO-VISM-SESSION-MIB", "vismSessionSetState")) if mibBuilder.loadTexts: trapSessionSetFullIs.setDescription("When the session set state is changed from other state to 'Full In Service' state this trap will be sent out. The severity should be informational.") trapLapdDlcAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50779)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdDlcIndex"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdDlcSapi"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdDlcTei")) if mibBuilder.loadTexts: trapLapdDlcAdded.setDescription('Indicates that an entry has been added to vismLapdDlcTable.') trapLapdDlcDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50780)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdDlcIndex"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdDlcSapi"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdDlcTei")) if mibBuilder.loadTexts: trapLapdDlcDeleted.setDescription('Indicates that an entry has been deleted from vismLapdDlcTable.') trapLapdDlcUp = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50781)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdDlcIndex"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdDlcSapi"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdDlcTei"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdDlcLinkState")) if mibBuilder.loadTexts: trapLapdDlcUp.setDescription('Indicates that the linking state between TDM and DLC on a specific D-channel changes to up.') trapLapdDlcDown = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50782)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdDlcIndex"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdDlcSapi"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdDlcTei"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdDlcLinkState")) if mibBuilder.loadTexts: trapLapdDlcDown.setDescription('Indicates that the linking state between TDM and DLC on a specific D-channel changes to down.') persistentXgcpEventCreated = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50786)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-PERSISTENT-XGCP-EVENTS-MIB", "persistentXgcpEventName")) if mibBuilder.loadTexts: persistentXgcpEventCreated.setDescription('Indicates that an entry is added to persistantXgcpEvents table. The value of vismTrapIntIndex1 gives the value of persistentXgcpEventNum. persistentXgcpEventName gives the name associated with that event num.') persistentXgcpEventDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50787)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-PERSISTENT-XGCP-EVENTS-MIB", "persistentXgcpEventName")) if mibBuilder.loadTexts: persistentXgcpEventDeleted.setDescription('Indicates that an entry is deleted from persistantXgcpEvents table. The value of vismTrapIntIndex1 gives the value of persistantXgcpEventNum. The varbind persistantXgcpEventName gives the name associated with that event num.') mgDomainNameAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50791)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgDomainName"), ("CISCO-WAN-MG-MIB", "mgDnsResolutionType")) if mibBuilder.loadTexts: mgDomainNameAdded.setDescription('Indicates that an entry is added to mgDomainNameTable.') mgDomainNameDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50789)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1")) if mibBuilder.loadTexts: mgDomainNameDeleted.setDescription('Indicates that an entry is deleted from mgDomainNameTable. vismTrapIntIndex1 specifies the mgDomainNameIndex.') vismTonePlanAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50798)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-VISM-TONE-PLAN-MIB", "tonePlanRegionName"), ("CISCO-WAN-VISM-TONE-PLAN-MIB", "tonePlanVersionNumber"), ("CISCO-WAN-VISM-TONE-PLAN-MIB", "tonePlanFileName")) if mibBuilder.loadTexts: vismTonePlanAdded.setDescription('Indicates that an entry is added to vismTonePlanTable. The value of vismTrapIntIndex1 gives the value of tonePlanIndex.') vismTonePlanDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50799)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-VISM-TONE-PLAN-MIB", "tonePlanRegionName"), ("CISCO-WAN-VISM-TONE-PLAN-MIB", "tonePlanVersionNumber"), ("CISCO-WAN-VISM-TONE-PLAN-MIB", "tonePlanFileName")) if mibBuilder.loadTexts: vismTonePlanDeleted.setDescription('Indicates that an entry is deleted from vismTonePlanTable. The value of vismTrapIntIndex1 gives the value of tonePlanIndex.') vismRtpConnAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50650)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-RTP-CONN-MIB", "vismRtpLcn")) if mibBuilder.loadTexts: vismRtpConnAdded.setDescription(' Indicates that an entry has been added to vismRtpConnGrpTable with vismRtpLcn. The value of vismTrapIntIndex1 gives the vismRtpConnNum.') vismRtpConnDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50651)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-RTP-CONN-MIB", "vismRtpLcn")) if mibBuilder.loadTexts: vismRtpConnDeleted.setDescription('Indicates that an entry with Lcn vismRtpLcn has been deleted from vismRtpConnGrpTable. The value of vismTrapIntIndex1 gives the vismRtpConnNum.') vismRtpConnStateChg = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50652)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-RTP-CONN-MIB", "vismRtpConnAlarmState"), ("CISCO-WAN-RTP-CONN-MIB", "vismRtpLcn"), ("CISCO-WAN-RTP-CONN-MIB", "vismRtpFailReason")) if mibBuilder.loadTexts: vismRtpConnStateChg.setDescription('Indicates that the alarm state of the entry in vismRtpConnGrpTable with LCN vismRtpLcn changed. The value of vismTrapIntIndex1 gives the vismRtpConnNum.') vismLapdTrStateIs = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50653)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdTrunkState")) if mibBuilder.loadTexts: vismLapdTrStateIs.setDescription("Indicates that the LAPD Trunk state has changed to 'In Service'. The value of vismTrapIntIndex1 gives the value of vismLapdTrunkNum.") vismLapdTrStateOos = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50654)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-LAPD-TRUNK-MIB", "vismLapdTrunkState")) if mibBuilder.loadTexts: vismLapdTrStateOos.setDescription("Indicates that the LAPD Trunk state has changed to 'Out Of Service'. The value of vismTrapIntIndex1 gives the value of vismLapdTrunkNum.") vismLapdTrunkAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50655)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1")) if mibBuilder.loadTexts: vismLapdTrunkAdded.setDescription('Indicates that a new entry has been added to the vismLapdTrunkGrpTable. The value of vismTrapIntIndex1 gives the value of vismLapdTrunkNum.') vismLapdTrunkDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50656)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1")) if mibBuilder.loadTexts: vismLapdTrunkDeleted.setDescription('Indicates that an existing entry has been deleted from the vismLapdTrunkGrpTable. The value of vismTrapIntIndex1 gives the value of vismLapdTrunkNum.') mgcRedundancyGrpAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50657)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex2")) if mibBuilder.loadTexts: mgcRedundancyGrpAdded.setDescription('Indicates that an entry has been added in the mgcRedundancyGrptable. The value of vismTrapIntIndex1 gives the value of mgcRedundancyGrpNum and vismTrapIntIndex2 gives the value of mgcNumber.') mgcRedundancyGrpDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50658)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex2")) if mibBuilder.loadTexts: mgcRedundancyGrpDeleted.setDescription('Indicates that an entry has been deleted from the mgcRedudancyGrpTable. The value of vismTrapIntIndex1 gives the value of mgcRedundancyGrpNum and vismTrapIntIndex2 gives the value of mgcNumber.') mgcRedundancyGrpCommOk = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50659)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1")) if mibBuilder.loadTexts: mgcRedundancyGrpCommOk.setDescription("Triggered when the communication state of the MGC redundancy group transitions to 'commOk' state. The transition will be from 'commLoss' to 'commOk' when communication between the gateway and the call agent is established. The value of vismTrapIntIndex1 gives the value of mgcRedundancyGrpNum.") mgcRedundancyGrpCommLoss = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50660)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1")) if mibBuilder.loadTexts: mgcRedundancyGrpCommLoss.setDescription("Triggered when the communication state of the MGC redundancy group transitions to 'commLoss'. The transition will be from 'commOk' to 'commLoss' when the callagent does not respond to gateway initiated messages. The value of vismTrapIntIndex1 gives the value of mgcRedundancyGrpNum.") mgcActiveInGrp = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50665)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex2"), ("CISCO-WAN-MGC-REDUN-MIB", "mgcRedundancyGrpActState")) if mibBuilder.loadTexts: mgcActiveInGrp.setDescription('Triggered when the MGC in an MGC Redundancy Group transitions from inactive to active state. Indicates the active MGC in an MGC Redundancy group. The value of vismTrapIntIndex1 gives the value of mgcRedundancyGrpNum. The value of vismTrapIntIndex2 gives the value of mgcNumber.') mgcInactiveInGrp = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50666)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex2"), ("CISCO-WAN-MGC-REDUN-MIB", "mgcRedundancyGrpActState")) if mibBuilder.loadTexts: mgcInactiveInGrp.setDescription('Triggered when the MGC in an MGC Redundancy Group transitions from active to inactive state. The value of vismTrapIntIndex1 gives the value of mgcRedundancyGrpNum. The value of vismTrapIntIndex2 gives the value of mgcNumber.') mgcRedundancyGrpProtocolAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50661)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex2")) if mibBuilder.loadTexts: mgcRedundancyGrpProtocolAdded.setDescription('Indicates that an entry is added to the mgcRedundancyGrpProtocolTable. The value of vismTrapIntIndex1 gives the value of mgcRedundancyGrpNum. The value of vismTrapIntIndex2 gives the value of mgProtocolNumber.') mgcRedundancyGrpProtocolDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50662)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex2")) if mibBuilder.loadTexts: mgcRedundancyGrpProtocolDeleted.setDescription('Indicates that an entry is deleted from the mgcRedundancyGrpProtocolTable. The value of vismTrapIntIndex1 gives the value of mgcRedundancyGrpNum. The value of vismTrapIntIndex2 gives the value of mgProtocolNumber.') peerGrpHeartbeatLost = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50663)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-SRCP-MIB", "srcpPeerGrpTimeSinceHeartbeat")) if mibBuilder.loadTexts: peerGrpHeartbeatLost.setDescription('This notification indicates that the system failed to receive a heartbeat from a specific peer group. The notification is sent when srcpPeerGrpTimeSinceHeartbeat crosses the srcpPeerGrpHeartbeatInterval threshold. The value of vismTrapIntIndex1 gives the value of mgcRedundancyGrpNum.') peerGrpHeartbeatDetected = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50664)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-SRCP-MIB", "srcpPeerGrpTimeSinceHeartbeat")) if mibBuilder.loadTexts: peerGrpHeartbeatDetected.setDescription('This notification indicates that the system detected a heartbeat from a specific peer group after it had been lost. The notification is sent when srcpPeerGrpTimeSinceHeartbeat which had exceeded the threshold, resets to 0 due to receipt of a heartbeat. The value of vismTrapIntIndex1 gives the value of mgcRedundancyGrpNum.') mgcRedundancyGrpParamEntryAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50668)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1")) if mibBuilder.loadTexts: mgcRedundancyGrpParamEntryAdded.setDescription('Indicates that an entry has been added in the mgcRedundancyGrpParamTable. The value of vismTrapIntIndex1 gives the value of mgcRedundancyGrpNum. The entries in the mgcRedundancyGrpParamTable are implicitly added when the first entry for that mgcRedundancyGrpNum is added into the mgcRedundancyGrpTable by the user.') mgcRedundancyGrpParamEntryDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50669)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1")) if mibBuilder.loadTexts: mgcRedundancyGrpParamEntryDeleted.setDescription('Indicates that an entry has been deleted from the mgcRedundancyGrpParamTable. The value of vismTrapIntIndex1 gives the value of mgcRedundancyGrpNum. The entries in the mgcRedundancyGrpParamTable are implicitly deleted when the last entry for that mgcRedundancyGrpNum is removed from the mgcRedundancyGrpTable by the user.') srcpPeerGrpParamEntryAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50670)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1")) if mibBuilder.loadTexts: srcpPeerGrpParamEntryAdded.setDescription('Indicates that an entry has been added to the srcpPeerGrpParamTable. The value of vismTrapIntIndex1 gives the value of mgcRedundancyGrpNum. The entries in the srcpPeerGrpParamTable are implicitly created when SRCP protocol is added for the MGC Redundancy Group.') srcpPeerGrpParamEntryDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50671)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1")) if mibBuilder.loadTexts: srcpPeerGrpParamEntryDeleted.setDescription('Indicates that an entry has been deleted from the srcpPeerGrpParamTable. The value of vismTrapIntIndex1 gives the value of mgcRedundancyGrpNum. The entries in the srcpPeerGrpParamTable are implicitly deleted when the SRCP protocol configured for the Mgc Redundancy Group is deleted.') cwAnnFileAddStarted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50674)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-ANNOUNCEMENT-MIB", "cwAnnFileName"), ("CISCO-WAN-ANNOUNCEMENT-MIB", "cwAnnFileCodec"), ("CISCO-WAN-ANNOUNCEMENT-MIB", "cwAnnFileStatus")) if mibBuilder.loadTexts: cwAnnFileAddStarted.setDescription('Indicates that an attempt was made to add an entry to the cwAnnounceTable. This trap will not be generated at card reset time when all of previously configured permanent files are downloaded to bring the card up to date. The value of vismTrapIntIndex1 gives the value of cwAnnounceIndex.') cwAnnFileLoadComplete = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50675)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-ANNOUNCEMENT-MIB", "cwAnnFileName"), ("CISCO-WAN-ANNOUNCEMENT-MIB", "cwAnnFileCodec"), ("CISCO-WAN-ANNOUNCEMENT-MIB", "cwAnnFileStatus")) if mibBuilder.loadTexts: cwAnnFileLoadComplete.setDescription('Indicates that an attempt to add an entry to the cwAnnounceTable has been successfully completed. The value of vismTrapIntIndex1 gives the value of cwAnnounceIndex.') cwAnnFileLoadFailed = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50676)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-ANNOUNCEMENT-MIB", "cwAnnFileName"), ("CISCO-WAN-ANNOUNCEMENT-MIB", "cwAnnFileCodec"), ("CISCO-WAN-ANNOUNCEMENT-MIB", "cwAnnFileStatus")) if mibBuilder.loadTexts: cwAnnFileLoadFailed.setDescription('Indicates that an attempt to add an entry to the cwAnnounceTable has failed. The value of vismTrapIntIndex1 gives the value of cwAnnounceIndex.') cwAnnFileDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50677)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1")) if mibBuilder.loadTexts: cwAnnFileDeleted.setDescription('Indicates that an entry is deleted from cwAnnounceTable. The value of vismTrapIntIndex1 gives the value of cwAnnounceIndex.') newFlow = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50672)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("INT-SERV-MIB", "intSrvFlowStatus"), ("RSVP-MIB", "rsvpSessionDestAddr"), ("RSVP-MIB", "rsvpResvFwdStatus"), ("RSVP-MIB", "rsvpResvStatus"), ("RSVP-MIB", "rsvpSenderStatus")) if mibBuilder.loadTexts: newFlow.setDescription('The newFlow trap indicates that the originating system has installed a new flow in its classifier, or (when reservation authorization is in view) is prepared to install such a flow in the classifier and is requesting authorization. The objects included with the notification may be used to read further information using the Integrated Services and RSVP MIBs. Authorization or non- authorization may be enacted by a write to the variable intSrvFlowStatus.') lostFlow = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50673)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("INT-SERV-MIB", "intSrvFlowStatus"), ("RSVP-MIB", "rsvpSessionDestAddr"), ("RSVP-MIB", "rsvpResvFwdStatus"), ("RSVP-MIB", "rsvpResvStatus"), ("RSVP-MIB", "rsvpSenderStatus")) if mibBuilder.loadTexts: lostFlow.setDescription('The lostFlow trap indicates that the originating system has removed a flow from its classifier.') dspRASEndpointFailed = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50678)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgEndpointLineNumber"), ("CISCO-WAN-MG-MIB", "mgEndpointChannelMap")) if mibBuilder.loadTexts: dspRASEndpointFailed.setDescription('Triggered by DSP channel failure associated with an endpoint. The value of vismTrapIntIndex1 gives the value of mgEndpointNumber.') dspRASEndpointActive = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50679)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-MG-MIB", "mgEndpointLineNumber"), ("CISCO-WAN-MG-MIB", "mgEndpointChannelMap")) if mibBuilder.loadTexts: dspRASEndpointActive.setDescription('Triggered by DSP channel associated with an endpoint after a channel failure corrected by the DSP. The value of vismTrapIntIndex1 gives the value of mgEndpointNumber.') vismConfigToneDetectAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50683)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-VISM-TONE-PLAN-MIB", "vismEventCode"), ("CISCO-WAN-VISM-TONE-PLAN-MIB", "vismFrequency1"), ("CISCO-WAN-VISM-TONE-PLAN-MIB", "vismFrequency2")) if mibBuilder.loadTexts: vismConfigToneDetectAdded.setDescription('Indicates that an entry is added to vismConfigToneDetectTable. The value of vismTrapIntIndex1 gives the value of vismConfigToneDetectNum.') vismConfigToneDetectDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50684)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-WAN-VISM-TONE-PLAN-MIB", "vismEventCode"), ("CISCO-WAN-VISM-TONE-PLAN-MIB", "vismFrequency1"), ("CISCO-WAN-VISM-TONE-PLAN-MIB", "vismFrequency2")) if mibBuilder.loadTexts: vismConfigToneDetectDeleted.setDescription('Indicates that an entry is deleted from vismConfigToneDetectTable. The value of vismTrapIntIndex1 gives the value of vismConfigToneDetectNum.') trapCidAdministrativeStateChange = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50784)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-ATM-TRUNK-MIB", "vismAal2CidAdminState"), ("CISCO-VISM-ATM-TRUNK-MIB", "vismAal2CidNum"), ("CISCO-VISM-ATM-TRUNK-MIB", "vismAal2CidLcn")) if mibBuilder.loadTexts: trapCidAdministrativeStateChange.setDescription('Indicates that the CID or bearer connection has either changed state from CidInService to CidCommandedOutOfService or vice versa. ') vismCasTransTblAdded = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50685)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex2"), ("CISCO-VOICE-CAS-MODULE-MIB", "cvcmCasTemplateName")) if mibBuilder.loadTexts: vismCasTransTblAdded.setDescription('Indicates that an entry is added to the cvcmABCDBitTemplateConfigTable. vismTrapIntIndex1 will contain the cvcmCasTemplateIndex and vismTrapIntIndex2 will contain the cvcmABCDPatternIndex. cvcmCasTemplateName will indicate the name of the CAS template added. ') vismCasTranTblDeleted = NotificationType((1, 3, 6, 1, 4, 1, 351, 110) + (0,50686)).setObjects(("RTM-MIB", "lastSequenceNumber"), ("BASIS-SHELF-MIB", "shelfNodeName"), ("BASIS-SHELF-MIB", "shelfNum"), ("BASIS-GENERIC-MIB", "moduleSlotNumber"), ("BASIS-GENERIC-MIB", "moduleTrapAlarmSeverity"), ("BASIS-GENERIC-MIB", "functionModuleType"), ("GENERICOBJECT-MIB", "genericTimeStamp"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex1"), ("CISCO-VISM-MODULE-MIB", "vismTrapIntIndex2"), ("CISCO-VOICE-CAS-MODULE-MIB", "cvcmCasTemplateName")) if mibBuilder.loadTexts: vismCasTranTblDeleted.setDescription('Indicates that an entry is deleted from the cvcmABCDBitTemplateConfigTable. vismTrapIntIndex1 will contain the cvcmCasTemplateIndex and vismTrapIntIndex2 will contain the cvcmABCDPatternIndex. cvcmCasTemplateName will indicate the name of the CAS template deleted. ') mibBuilder.exportSymbols("CISCO-VISM-TRAPS-MIB", mgcAssociatedCommLoss=mgcAssociatedCommLoss, trapProtectedChanActive=trapProtectedChanActive, trapVismAal2Muxing=trapVismAal2Muxing, peerGrpHeartbeatDetected=peerGrpHeartbeatDetected, trapVismModeChanged=trapVismModeChanged, peerGrpHeartbeatLost=peerGrpHeartbeatLost, mgAdministrativeStateLocked=mgAdministrativeStateLocked, trapProtectedChanFailed=trapProtectedChanFailed, vismTonePlanDeleted=vismTonePlanDeleted, trapVismChanAdded=trapVismChanAdded, vismCasTranTblDeleted=vismCasTranTblDeleted, trapNetworkCacConfigState=trapNetworkCacConfigState, cwAnnFileAddStarted=cwAnnFileAddStarted, mgEndpointDeleted=mgEndpointDeleted, trapSessionSetAdded=trapSessionSetAdded, trapVismChanActive=trapVismChanActive, mgcRedundancyGrpCommLoss=mgcRedundancyGrpCommLoss, mgcRedundancyGrpProtocolAdded=mgcRedundancyGrpProtocolAdded, trapVismCasVariantAdded=trapVismCasVariantAdded, mgcDeleted=mgcDeleted, trapCidAdministrativeStateChange=trapCidAdministrativeStateChange, trapSessionGrpAdded=trapSessionGrpAdded, vismConfigToneDetectAdded=vismConfigToneDetectAdded, trapVismPortActive=trapVismPortActive, vismRtpConnStateChg=vismRtpConnStateChg, trapRudpSessionOos=trapRudpSessionOos, mgcInactiveInGrp=mgcInactiveInGrp, trapVismCasVariantNotConfigured=trapVismCasVariantNotConfigured, mgDomainNameDeleted=mgDomainNameDeleted, mgcAdded=mgcAdded, trapVismCodecTemplateChanged=trapVismCodecTemplateChanged, peerHeartbeatDetected=peerHeartbeatDetected, trapVismScalarChange=trapVismScalarChange, mgcCommStateActive=mgcCommStateActive, mgcResolutionAdded=mgcResolutionAdded, persistentXgcpEventCreated=persistentXgcpEventCreated, lostFlow=lostFlow, trapRudpSessionDeleted=trapRudpSessionDeleted, trapLapdDlcDown=trapLapdDlcDown, trapSessionSetDeleted=trapSessionSetDeleted, mgcRedundancyGrpParamEntryAdded=mgcRedundancyGrpParamEntryAdded, trapAvailFreeDs0Low=trapAvailFreeDs0Low, trapRudpSessionActive=trapRudpSessionActive, cwAnnFileLoadComplete=cwAnnFileLoadComplete, mgAdministrativeStateShuttingDown=mgAdministrativeStateShuttingDown, dspRASEndpointActive=dspRASEndpointActive, trapVismPortFailed=trapVismPortFailed, vismLapdTrunkDeleted=vismLapdTrunkDeleted, mgcUnassociated=mgcUnassociated, trapSessionSetActiveIs=trapSessionSetActiveIs, trapLapdDlcAdded=trapLapdDlcAdded, mgcActiveInGrp=mgcActiveInGrp, mgcRedundancyGrpParamEntryDeleted=mgcRedundancyGrpParamEntryDeleted, cwAnnFileDeleted=cwAnnFileDeleted, vismLapdTrStateIs=vismLapdTrStateIs, trapVismCidState=trapVismCidState, trapVismPortDeleted=trapVismPortDeleted, vismCasTransTblAdded=vismCasTransTblAdded, trapVismChanReroute=trapVismChanReroute, trapSessionGrpDeleted=trapSessionGrpDeleted, trapSessionGrpOos=trapSessionGrpOos, vismConfigToneDetectDeleted=vismConfigToneDetectDeleted, trapVismAal2CidDeleted=trapVismAal2CidDeleted, trapMemoryUtilExceeded=trapMemoryUtilExceeded, trapSessionSetOos=trapSessionSetOos, vismLapdTrStateOos=vismLapdTrStateOos, trapRudpSessionAdded=trapRudpSessionAdded, vismTonePlanAdded=vismTonePlanAdded, trapVismTableChange=trapVismTableChange, trapLapdDlcUp=trapLapdDlcUp, mgEndpointActive=mgEndpointActive, trapLapdDeleted=trapLapdDeleted, vismLapdTrunkAdded=vismLapdTrunkAdded, dspRASEndpointFailed=dspRASEndpointFailed, mgcProtocolDeleted=mgcProtocolDeleted, trapVismHdlcChanAdded=trapVismHdlcChanAdded, trapCpuUtilExceeded=trapCpuUtilExceeded, trapProtectedChanLocked=trapProtectedChanLocked, mgAdministrativeStateUnlocked=mgAdministrativeStateUnlocked, mgcRedundancyGrpCommOk=mgcRedundancyGrpCommOk, mgEndpointFailed=mgEndpointFailed, trapVismIpAddressChanged=trapVismIpAddressChanged, trapVismConDown=trapVismConDown, trapLapdAdded=trapLapdAdded, trapVismCasVariantConfigured=trapVismCasVariantConfigured, mgcCommStateInactive=mgcCommStateInactive, trapVismCasVariantDeleted=trapVismCasVariantDeleted, trapVismFeatureChanged=trapVismFeatureChanged, mgcRedundancyGrpDeleted=mgcRedundancyGrpDeleted, persistentXgcpEventDeleted=persistentXgcpEventDeleted, trapLapdDlcDeleted=trapLapdDlcDeleted, trapVismChanDeleted=trapVismChanDeleted, mgcProtocolAdded=mgcProtocolAdded, trapRudpSessionIs=trapRudpSessionIs, mgcRedundancyGrpProtocolDeleted=mgcRedundancyGrpProtocolDeleted, mgcRedundancyGrpAdded=mgcRedundancyGrpAdded, mgDomainNameAdded=mgDomainNameAdded, trapRudpSessionPrimaryIs=trapRudpSessionPrimaryIs, trapSessionSetStandbyIs=trapSessionSetStandbyIs, peerHeartbeatLost=peerHeartbeatLost, srcpPeerGrpParamEntryDeleted=srcpPeerGrpParamEntryDeleted, trapVismConUp=trapVismConUp, mgcAssociated=mgcAssociated, mgEndpointCreated=mgEndpointCreated, vismRtpConnDeleted=vismRtpConnDeleted, srcpPeerGrpParamEntryAdded=srcpPeerGrpParamEntryAdded, trapSessionSetFullIs=trapSessionSetFullIs, newFlow=newFlow, trapVismAal2CidAdded=trapVismAal2CidAdded, vismRtpConnAdded=vismRtpConnAdded, cwAnnFileLoadFailed=cwAnnFileLoadFailed, trapVismHdlcChanDeleted=trapVismHdlcChanDeleted, mgcResolutionDeleted=mgcResolutionDeleted, trapProtectedChanUnlocked=trapProtectedChanUnlocked, trapSessionGrpIs=trapSessionGrpIs, trapProtectedChanStandby=trapProtectedChanStandby, trapVismChanFailed=trapVismChanFailed, trapVismPortAdded=trapVismPortAdded)
348.699275
5,156
0.766981
10,032
96,241
7.357955
0.075658
0.057712
0.07214
0.049976
0.750159
0.72698
0.701592
0.68879
0.675202
0.649705
0
0.027081
0.071498
96,241
275
5,157
349.967273
0.798959
0.00347
0
0
0
0.242537
0.596676
0.097812
0
0
0
0
0
1
0
false
0
0.115672
0
0.115672
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
1
1
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
c0cf439ab3aedd615ca28ed65d4077417dfb617d
160
py
Python
flask_blog/lib/utils.py
kshoji6011/serverless-application
a2dbbb318d95ba505117295acd2152317ed99552
[ "Apache-2.0" ]
null
null
null
flask_blog/lib/utils.py
kshoji6011/serverless-application
a2dbbb318d95ba505117295acd2152317ed99552
[ "Apache-2.0" ]
null
null
null
flask_blog/lib/utils.py
kshoji6011/serverless-application
a2dbbb318d95ba505117295acd2152317ed99552
[ "Apache-2.0" ]
null
null
null
from flask_blog.models.users import User def setup_auth(login_manager): @login_manager.user_loader def load_user(user_id): return User(user_id)
26.666667
40
0.75625
25
160
4.52
0.64
0.212389
0.176991
0
0
0
0
0
0
0
0
0
0.16875
160
6
41
26.666667
0.849624
0
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0.2
0.2
0.8
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
7b3135d503137a37ecf083debb18bc2435d0d5bc
44
py
Python
src/template.py
DarkCat5501/win-cman
60d11a0224b6c6317f21d718d4c3039006a5bade
[ "MIT" ]
null
null
null
src/template.py
DarkCat5501/win-cman
60d11a0224b6c6317f21d718d4c3039006a5bade
[ "MIT" ]
null
null
null
src/template.py
DarkCat5501/win-cman
60d11a0224b6c6317f21d718d4c3039006a5bade
[ "MIT" ]
null
null
null
import os from dataclasses import dataclass
14.666667
33
0.863636
6
44
6.333333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.136364
44
2
34
22
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
9e38670aae3d510087d903cf9ba607856fae3158
3,398
py
Python
vidispine/search.py
newmediaresearch/vidispine-adapter
95d5b1956c3767ff9ff0626048f52628d5322cab
[ "MIT" ]
null
null
null
vidispine/search.py
newmediaresearch/vidispine-adapter
95d5b1956c3767ff9ff0626048f52628d5322cab
[ "MIT" ]
1
2021-03-16T11:02:59.000Z
2021-03-16T11:02:59.000Z
vidispine/search.py
newmediaresearch/vidispine-adapter
95d5b1956c3767ff9ff0626048f52628d5322cab
[ "MIT" ]
null
null
null
from vidispine.base import EntityBase from vidispine.errors import InvalidInput from vidispine.typing import BaseJson class Search(EntityBase): """Search Search Vidispine objects. :vidispine_docs:`Vidispine doc reference <collection>` """ entity = 'search' def __call__(self, *args, **kwargs) -> BaseJson: """Browses items and collections :param metadata: Optional metadata (search document) supplied to perform a shared search query. :param params: Optional query parameters. :param matrix_params: Optional matrix parameters. :return: JSON response from the request. :rtype: vidispine.typing.BaseJson. """ return self._search(*args, **kwargs) def _search( self, metadata: dict = None, params: dict = None, matrix_params: dict = None ) -> BaseJson: if metadata is None: return self._search_without_search_doc(params, matrix_params) else: return self._search_with_search_doc( metadata, params, matrix_params ) def _search_with_search_doc( self, metadata: dict, params: dict = None, matrix_params: dict = None ) -> BaseJson: if not metadata: raise InvalidInput('Please supply metadata.') if params is None: params = {} endpoint = self._build_url(matrix_params=matrix_params) return self.client.put(endpoint, json=metadata, params=params) def _search_without_search_doc( self, params: dict = None, matrix_params: dict = None ) -> BaseJson: if params is None: params = {} endpoint = self._build_url(matrix_params=matrix_params) return self.client.get(endpoint, params=params) def shape( self, metadata: dict = None, params: dict = None, matrix_params: dict = None ) -> BaseJson: """Searches shapes :param metadata: Optional metadata (shape document) supplied to perform a search query. :param params: Optional query parameters. :param matrix_params: Optional matrix parameters. :return: JSON response from the request. :rtype: vidispine.typing.BaseJson. """ if metadata is None: return self._search_shapes_without_search_doc( params, matrix_params ) else: return self._search_shapes_with_search_doc( metadata, params, matrix_params ) def _search_shapes_without_search_doc( self, params: dict = None, matrix_params: dict = None ) -> BaseJson: if params is None: params = {} endpoint = self._build_url('shape', matrix_params=matrix_params) return self.client.get(endpoint, params=params) def _search_shapes_with_search_doc( self, metadata: dict, params: dict = None, matrix_params: dict = None ) -> BaseJson: if not metadata: raise InvalidInput('Please supply metadata.') if params is None: params = {} endpoint = self._build_url('shape', matrix_params=matrix_params) return self.client.put(endpoint, json=metadata, params=params)
26.341085
73
0.605062
356
3,398
5.575843
0.182584
0.120907
0.084635
0.060453
0.797985
0.756675
0.756675
0.756675
0.725441
0.676071
0
0
0.315774
3,398
128
74
26.546875
0.853763
0.196292
0
0.72
0
0
0.023985
0
0
0
0
0
0
1
0.093333
false
0
0.04
0
0.28
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
6
9e67f4fc26c82ed3be8e1b8dea1ce280e33bb4c6
46
py
Python
ambition_utils/transaction/__init__.py
jaredlewis/ambition-utils
f001f7582953020a7b554d9c7afab9161d968b9b
[ "MIT" ]
3
2018-05-01T21:43:45.000Z
2021-03-14T15:25:52.000Z
ambition_utils/transaction/__init__.py
jaredlewis/ambition-utils
f001f7582953020a7b554d9c7afab9161d968b9b
[ "MIT" ]
9
2018-02-05T16:12:41.000Z
2022-02-17T15:20:39.000Z
ambition_utils/transaction/__init__.py
jaredlewis/ambition-utils
f001f7582953020a7b554d9c7afab9161d968b9b
[ "MIT" ]
8
2018-01-03T15:49:50.000Z
2020-03-19T16:12:10.000Z
from .decorators import durable # noqa: F401
23
45
0.76087
6
46
5.833333
1
0
0
0
0
0
0
0
0
0
0
0.078947
0.173913
46
1
46
46
0.842105
0.217391
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
9e7f3aec6d3b7aaaeb9f17a7282e9e0d4119a88f
92
py
Python
python/geo-ip.py
tbedford/code-snippets
9afe36c2726829f14fa5ec11acb8214bed704938
[ "MIT" ]
null
null
null
python/geo-ip.py
tbedford/code-snippets
9afe36c2726829f14fa5ec11acb8214bed704938
[ "MIT" ]
null
null
null
python/geo-ip.py
tbedford/code-snippets
9afe36c2726829f14fa5ec11acb8214bed704938
[ "MIT" ]
1
2018-10-09T02:03:12.000Z
2018-10-09T02:03:12.000Z
# GeoIP2-python # https://github.com/maxmind/GeoIP2-python # https://ipstack.com/product
13.142857
42
0.728261
12
92
5.583333
0.666667
0.358209
0.507463
0
0
0
0
0
0
0
0
0.024096
0.097826
92
6
43
15.333333
0.783133
0.891304
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
6
7b6cd1e80d5900fdb4272d7744ee040a16d38419
48
py
Python
gimini/__init__.py
nikochaffin/PyAesthetique
f724e19bfabe1c273c9530664c46871ae6055bef
[ "MIT" ]
6
2018-03-27T00:12:02.000Z
2021-11-17T09:48:22.000Z
gimini/__init__.py
nikochaffin/PyAesthetique
f724e19bfabe1c273c9530664c46871ae6055bef
[ "MIT" ]
null
null
null
gimini/__init__.py
nikochaffin/PyAesthetique
f724e19bfabe1c273c9530664c46871ae6055bef
[ "MIT" ]
1
2018-04-05T22:59:49.000Z
2018-04-05T22:59:49.000Z
from .gimei import Gimei from .name import Name
16
24
0.791667
8
48
4.75
0.5
0
0
0
0
0
0
0
0
0
0
0
0.166667
48
2
25
24
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
7bba51ef240e429418f0bc2efa938bfcc754cf33
140
py
Python
utils.py
lilbowser/Package_Tracking_Alerter
306810def58831c6fe5c3d3c54c3d2dc361162f3
[ "MIT" ]
2
2017-07-02T06:06:47.000Z
2022-03-15T15:34:26.000Z
utils.py
lilbowser/Package_Tracking_Alerter
306810def58831c6fe5c3d3c54c3d2dc361162f3
[ "MIT" ]
null
null
null
utils.py
lilbowser/Package_Tracking_Alerter
306810def58831c6fe5c3d3c54c3d2dc361162f3
[ "MIT" ]
null
null
null
import yaml def load_api_config(config_file_name): with open(config_file_name) as config: return yaml.load(config)["api_keys"]
23.333333
44
0.742857
22
140
4.409091
0.590909
0.206186
0.28866
0
0
0
0
0
0
0
0
0
0.164286
140
6
44
23.333333
0.82906
0
0
0
0
0
0.056738
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
6
c8919012469fdcda759c2900615004780bca4a33
147
py
Python
Functions/link_functions.py
jajajang/efalb
b561596989f8fc0131fc9e9cd18341e154432b9f
[ "Apache-2.0" ]
2
2019-08-11T22:50:49.000Z
2021-04-21T17:48:20.000Z
Functions/link_functions.py
jajajang/efalb
b561596989f8fc0131fc9e9cd18341e154432b9f
[ "Apache-2.0" ]
null
null
null
Functions/link_functions.py
jajajang/efalb
b561596989f8fc0131fc9e9cd18341e154432b9f
[ "Apache-2.0" ]
2
2019-08-11T22:52:57.000Z
2021-09-18T05:31:32.000Z
import numpy as np def logit(x): return 1/(1. + np.exp(-x)) def identity(x): return x def logistic(x): return np.log(1 + np.exp(x))
13.363636
32
0.591837
28
147
3.107143
0.464286
0.241379
0.137931
0.16092
0
0
0
0
0
0
0
0.026786
0.238095
147
11
32
13.363636
0.75
0
0
0
0
0
0
0
0
0
0
0
0
1
0.428571
false
0
0.142857
0.428571
1
0
1
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
6
c8f7733298c63c6d4cb7e0ba07dc8d22b926669a
80
py
Python
Chapter 1/ArithmeticOperations.py
PacktPublishing/Beaglebone-By-Example
cff008bf41267e64a45078a97271f40c86719f37
[ "MIT" ]
5
2017-12-28T20:17:41.000Z
2021-11-23T14:26:21.000Z
Chapter 1/ArithmeticOperations.py
PacktPublishing/Beaglebone-By-Example
cff008bf41267e64a45078a97271f40c86719f37
[ "MIT" ]
2
2018-07-02T08:55:10.000Z
2020-07-06T10:29:59.000Z
Chapter 1/ArithmeticOperations.py
PacktPublishing/Beaglebone-By-Example
cff008bf41267e64a45078a97271f40c86719f37
[ "MIT" ]
7
2016-09-15T10:14:27.000Z
2021-04-19T05:10:37.000Z
A = 20 B = 30 C = B + A D = B - A print "A + B is", C print "A - B is", D
11.428571
20
0.4
20
80
1.6
0.4
0.125
0.4375
0.5625
0
0
0
0
0
0
0
0.086957
0.425
80
6
21
13.333333
0.608696
0
0
0
0
0
0.216216
0
0
0
0
0
0
0
null
null
0
0
null
null
0.333333
1
0
1
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
0
0
0
0
0
6
b53f0c0ca4e391dffd5ef73af3ace7eb66e64c0d
4,992
py
Python
Scripts/Dataset_generation/xmlParse.py
ArvindReddyC/malware_detection
f1b89b27409d966fb59c2c7b9de11da9cae27ecb
[ "Apache-2.0" ]
null
null
null
Scripts/Dataset_generation/xmlParse.py
ArvindReddyC/malware_detection
f1b89b27409d966fb59c2c7b9de11da9cae27ecb
[ "Apache-2.0" ]
null
null
null
Scripts/Dataset_generation/xmlParse.py
ArvindReddyC/malware_detection
f1b89b27409d966fb59c2c7b9de11da9cae27ecb
[ "Apache-2.0" ]
null
null
null
import xml.etree.ElementTree as ET import pandas as pd import os import glob import pickle ''' Version 1 ''' # i = 1 # dict = {} # goodfiles = [] # badfiles = [] # #,'meta-data','category','activity' # #['uses-permission','action','receiver','service','provider'] # def get_items(root,class_lab): # _list = {} # for item in ['uses-permission','action','service']: # for each_i in root.iter(item): # action = each_i.get('{http://schemas.android.com/apk/res/android}name') # if action: # _list[action] = 1 # if(class_lab): # _list['class_label'] = class_lab # return _list # for file in glob.glob("/Users/arvindchandrasekarreddy/Desktop/AndroidMalwareDetection/Files/2500_good/*.xml"): # goodfiles.append(file) # for each in goodfiles: # print(each) # tree = ET.parse(each) # root = tree.getroot() # li = get_items(root,0) # dict[each.split('/')[-1].split('.')[0]] = li # i = i +1 # for file in glob.glob("/Users/arvindchandrasekarreddy/Desktop/AndroidMalwareDetection/Files/2500_bad/*.xml"): # badfiles.append(file) # for each in badfiles: # print(each) # tree = ET.parse(each) # root = tree.getroot() # li = get_items(root,1) # dict[each.split('/')[-1].split('.')[0]] = li # i = i +1 # df = pd.DataFrame.from_dict(dict, orient='index' ) # df.fillna(0,inplace=True) # intDf = df.astype(int) # intDf.to_csv('only_permissions_actions_service.csv') # print(intDf.shape) # #with open('AllDict.pickle', 'wb') as handle: # #pickle.dump(dict, handle, protocol=pickle.HIGHEST_PROTOCOL) # # for uses_permission in root.findall('uses-permission'): # # print(uses_permission.attrib) # # perm = uses_permission.get('{http://schemas.android.com/apk/res/android}name') # # permisssion_list.append(perm) # # for child in root: # # print(child.tag, child.attrib) ''' Version 2 ''' i = 1 dict = {} goodfiles = [] badfiles = [] #,'meta-data','category','activity' #['uses-permission','action','receiver','service','provider'] def get_items(root,class_lab,sub_class): _list = {} for item in ['uses-permission','action','service']: for each_i in root.iter(item): action = each_i.get('{http://schemas.android.com/apk/res/android}name') if action: _list[action] = 1 if(class_lab): _list['class_label'] = class_lab _list['sub_class'] = sub_class return _list for file in glob.glob("/Users/arvindchandrasekarreddy/Desktop/AndroidMalwareDetection/Files/2500_good/*.xml"): goodfiles.append(file) for each in goodfiles: print(each) tree = ET.parse(each) root = tree.getroot() li = get_items(root,0,0) dict[each.split('/')[-1].split('.')[0]] = li i = i +1 goodfiles.clear() for file in glob.glob("/Users/arvindchandrasekarreddy/Desktop/t3_SIT724/Androzoo_Meta data/xmls/*.xml"): goodfiles.append(file) for each in goodfiles: print(each) tree = ET.parse(each) root = tree.getroot() li = get_items(root,0,0) dict[each.split('/')[-1].split('.')[0]] = li i = i +1 #Adware for file in glob.glob("/Users/arvindchandrasekarreddy/Desktop/PythonProjects/malware_detection/APKs_from_CICDroid/Adware/XMLs/*.xml"): badfiles.append(file) for each in badfiles[:1000]: print(each) tree = ET.parse(each) root = tree.getroot() li = get_items(root,1,1) dict[each.split('/')[-1].split('.')[0]] = li i = i +1 badfiles.clear() #Banking for file in glob.glob("/Users/arvindchandrasekarreddy/Desktop/PythonProjects/malware_detection/APKs_from_CICDroid/Banking/XMLs/*.xml"): badfiles.append(file) for each in badfiles[:1000]: print(each) tree = ET.parse(each) root = tree.getroot() li = get_items(root,1,2) dict[each.split('/')[-1].split('.')[0]] = li i = i +1 badfiles.clear() #Sms for file in glob.glob("/Users/arvindchandrasekarreddy/Desktop/PythonProjects/malware_detection/APKs_from_CICDroid/SMS/XMLs/*.xml"): badfiles.append(file) for each in badfiles[:1000]: print(each) tree = ET.parse(each) root = tree.getroot() li = get_items(root,1,3) dict[each.split('/')[-1].split('.')[0]] = li i = i +1 df = pd.DataFrame.from_dict(dict, orient='index' ) df.fillna(0,inplace=True) intDf = df.astype(int) intDf.to_csv('/Users/arvindchandrasekarreddy/Desktop/PythonProjects/malware_detection/Evaluating_dataset/OneR_dataset/permissions+actions+service.csv') print(intDf.shape) #with open('AllDict.pickle', 'wb') as handle: #pickle.dump(dict, handle, protocol=pickle.HIGHEST_PROTOCOL) # for uses_permission in root.findall('uses-permission'): # print(uses_permission.attrib) # perm = uses_permission.get('{http://schemas.android.com/apk/res/android}name') # permisssion_list.append(perm) # for child in root: # print(child.tag, child.attrib)
26
151
0.64383
661
4,992
4.760968
0.177005
0.053384
0.034318
0.028916
0.926915
0.926915
0.90626
0.90626
0.877661
0.877661
0
0.016995
0.186699
4,992
191
152
26.136126
0.758128
0.437099
0
0.534247
0
0.013699
0.27017
0.223168
0
0
0
0
0
1
0.013699
false
0
0.068493
0
0.09589
0.082192
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
a90eff465fe8593890e2a6a7c6fd31f0599c1a49
152
py
Python
lcodev/ecom/api/views.py
ShahSau/Amina-s
bb57e138b2256f064eb9bc5d44aa1b19300c029a
[ "MIT" ]
null
null
null
lcodev/ecom/api/views.py
ShahSau/Amina-s
bb57e138b2256f064eb9bc5d44aa1b19300c029a
[ "MIT" ]
null
null
null
lcodev/ecom/api/views.py
ShahSau/Amina-s
bb57e138b2256f064eb9bc5d44aa1b19300c029a
[ "MIT" ]
null
null
null
from django.http import JsonResponse # Create your views here. def home(request): return JsonResponse({'info': 'djgango shop', 'name': 'saurov'})
21.714286
67
0.710526
19
152
5.684211
0.947368
0
0
0
0
0
0
0
0
0
0
0
0.151316
152
7
67
21.714286
0.837209
0.151316
0
0
0
0
0.203125
0
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
a94845c01ffca6a4c1496587ddaf71d0afcdb907
11,498
py
Python
tests/test_command_line.py
LINXNet/pyOCNOS
fa52c86aebf3504030367e5bdf36c0a85e237885
[ "Apache-2.0" ]
4
2018-03-21T14:46:36.000Z
2020-05-21T13:48:42.000Z
tests/test_command_line.py
LINXNet/pyOCNOS
fa52c86aebf3504030367e5bdf36c0a85e237885
[ "Apache-2.0" ]
1
2019-04-05T13:14:37.000Z
2019-04-05T13:14:37.000Z
tests/test_command_line.py
LINXNet/pyOCNOS
fa52c86aebf3504030367e5bdf36c0a85e237885
[ "Apache-2.0" ]
4
2018-10-26T16:33:22.000Z
2020-05-08T14:17:33.000Z
from __future__ import unicode_literals import os import sys from unittest import TestCase import mock from pyocnos.command_line import main from pyocnos.command_line import parse_and_get_args from pyocnos.command_line import process current_path = os.path.dirname(os.path.realpath(__file__)) ocnos_class_path = 'pyocnos.command_line.OCNOS' class TestParseAndGetArgsFunction(TestCase): """ Command line tests """ def test_fail_when_config_file_name_hostname_and_actions_missing(self): with mock.patch.object(sys, 'argv', ['prog']): self.assertRaises(SystemExit, parse_and_get_args) def test_fail_when_hostname_and_actions_missing(self): with mock.patch.object(sys, 'argv', ['prog', 'test/user-details.ini']): self.assertRaises(SystemExit, parse_and_get_args) def test_fail_when_actions_missing(self): with mock.patch.object(sys, 'argv', ['prog', 'test/user-details.ini', 'foo.com']): self.assertRaises(SystemExit, parse_and_get_args) def test_fail_when_actions_not_from_choices(self): with mock.patch.object(sys, 'argv', ['prog', 'test/user-details.ini', 'foo.com', 'apple']): self.assertRaises(SystemExit, parse_and_get_args) def test_success_when_one_actions_given(self): with mock.patch.object(sys, 'argv', ['prog', 'test/user-details.ini', 'foo.com', 'running']): args = parse_and_get_args() self.assertEqual('test/user-details.ini', args.config_file_path) self.assertEqual('foo.com', args.hostname) self.assertEqual(['running'], args.actions) def test_success_when_multiple_actions_given(self): with mock.patch.object(sys, 'argv', ['prog', 'test/user-details.ini', 'foo.com', 'running', 'connection']): args = parse_and_get_args() self.assertEqual('test/user-details.ini', args.config_file_path) self.assertEqual('foo.com', args.hostname) self.assertEqual(['running', 'connection'], args.actions) def test_success_optional_file_name_argument_save_config_file_path_with_short_option(self): with mock.patch.object(sys, 'argv', ['prog', 'test.ini', 'foo.com', 'running', '-s', 'running-new']): args = parse_and_get_args() self.assertEqual('running-new', args.save_config_file_path) def test_success_optional_file_name_argument_save_config_file_path_with_long_option(self): with mock.patch.object( sys, 'argv', ['prog', 'test.ini', 'foo.com', 'running', '--save-config-file-path', 'running-new']): args = parse_and_get_args() self.assertEqual('running-new', args.save_config_file_path) def test_fail_when_actions_contains_diff_and_no_candidate_file_path_given(self): with mock.patch.object(sys, 'argv', ['prog', 'test.ini', 'foo.com', 'diff']): self.assertRaises(SystemExit, parse_and_get_args) def test_fail_when_actions_contains_replace_and_no_candidate_file_path_given(self): with mock.patch.object(sys, 'argv', ['prog', 'test.ini', 'foo.com', 'replace']): self.assertRaises(SystemExit, parse_and_get_args) def test_fail_when_actions_contains_merge_and_no_candidate_file_path_given(self): with mock.patch.object(sys, 'argv', ['prog', 'test.ini', 'foo.com', 'merge']): self.assertRaises(SystemExit, parse_and_get_args) def test_fail_when_actions_contains_diff_and_no_candidate_file_path_given(self): with mock.patch.object(sys, 'argv', ['prog', 'test.ini', 'foo.com', 'diff']): self.assertRaises(SystemExit, parse_and_get_args) def test_success_when_actions_contains_replace_and_candidate_file_path_given_with_short_option(self): with mock.patch.object(sys, 'argv', ['prog', 'test.ini', 'foo.com', 'replace', '-c', 'can-new']): args = parse_and_get_args() self.assertEqual('can-new', args.candidate_file_path) def test_success_when_actions_contains_merge_and_candidate_file_path_given_with_short_option(self): with mock.patch.object(sys, 'argv', ['prog', 'test.ini', 'foo.com', 'merge', '-c', 'can-new']): args = parse_and_get_args() self.assertEqual('can-new', args.candidate_file_path) def test_success_when_actions_contains_diff_and_candidate_file_path_given_with_short_option(self): with mock.patch.object(sys, 'argv', ['prog', 'test.ini', 'foo.com', 'diff', '-c', 'can-new']): args = parse_and_get_args() self.assertEqual('can-new', args.candidate_file_path) def test_success_when_actions_contains_replace_and_candidate_file_path_given_with_long_option(self): arguments = ['prog', 'test.ini', 'foo.com', 'replace', '--candidate-file-path', 'can-new-file'] with mock.patch.object(sys, 'argv', arguments): args = parse_and_get_args() self.assertEqual('can-new-file', args.candidate_file_path) def test_success_when_actions_contains_merge_and_candidate_file_path_given_with_long_option(self): arguments = ['prog', 'test.ini', 'foo.com', 'merge', '--candidate-file-path', 'can-new-file'] with mock.patch.object(sys, 'argv', arguments): args = parse_and_get_args() self.assertEqual('can-new-file', args.candidate_file_path) def test_success_when_actions_contains_diff_and_candidate_file_path_given_with_long_option(self): arguments = ['prog', 'test.ini', 'foo.com', 'diff', '--candidate-file-path', 'can-new-file'] with mock.patch.object(sys, 'argv', arguments): args = parse_and_get_args() self.assertEqual('can-new-file', args.candidate_file_path) class TestProcessFunction(TestCase): def test_fail_when_config_does_not_exist(self): with self.assertRaises(IOError): process( config_file_path='foo.yml', hostname='foo.com', actions=[], save_config_file_path=None, candidate_file_path=None ) @mock.patch(ocnos_class_path) def test_success_connection(self, mock_ocnos): process( config_file_path=os.path.join(current_path, 'user-details.yml.example'), hostname='foobar.com', actions=[], save_config_file_path=None, candidate_file_path=None ) mock_ocnos.assert_called_once_with(hostname='foobar.com', username='username', password='password', timeout=30) @mock.patch(ocnos_class_path, autospec=True) def test_success_connection_action(self, mock_ocnos): # As the OCNOS class is used in a context manager, # we need to mock the response from __enter__ which # is returned by the context manager. ocnos_instance = mock_ocnos.return_value.__enter__.return_value process( config_file_path=os.path.join(current_path, 'user-details.yml.example'), hostname='foobar.com', actions=['connection'], save_config_file_path=None, candidate_file_path=None ) ocnos_instance.is_alive.assert_called_once() @mock.patch(ocnos_class_path, autospec=True) def test_success_running_action(self, mock_ocnos): ocnos_instance = mock_ocnos.return_value.__enter__.return_value ocnos_instance.get_config.return_value = {'running': 'Running config'} file_path = os.path.join(current_path, 'running.xml') process( config_file_path=os.path.join(current_path, 'user-details.yml.example'), hostname='foobar.com', actions=['running'], save_config_file_path=file_path, candidate_file_path=None ) ocnos_instance.get_config.assert_called_once_with('running') os.remove(file_path) @mock.patch(ocnos_class_path, autospec=True) def test_success_startup_action(self, mock_ocnos): ocnos_instance = mock_ocnos.return_value.__enter__.return_value ocnos_instance.get_config.return_value = {'startup': 'Startup config'} file_path = os.path.join(current_path, 'startup.xml') process( config_file_path=os.path.join(current_path, 'user-details.yml.example'), hostname='foobar.com', actions=['startup'], save_config_file_path=file_path, candidate_file_path=None ) ocnos_instance.get_config.assert_called_once_with('startup') os.remove(file_path) @mock.patch(ocnos_class_path, autospec=True) def test_success_diff_action(self, mock_ocnos): ocnos_instance = mock_ocnos.return_value.__enter__.return_value process( config_file_path=os.path.join(current_path, 'user-details.yml.example'), hostname='foobar.com', actions=['diff'], save_config_file_path=None, candidate_file_path='candidate.xml' ) ocnos_instance.load_candidate_config.assert_called_once_with(filename='candidate.xml') ocnos_instance.compare_config.assert_called_once() @mock.patch(ocnos_class_path, autospec=True) def test_success_replace_action(self, mock_ocnos): ocnos_instance = mock_ocnos.return_value.__enter__.return_value process( config_file_path=os.path.join(current_path, 'user-details.yml.example'), hostname='foobar.com', actions=['replace'], save_config_file_path=None, candidate_file_path='candidate.xml' ) ocnos_instance.load_candidate_config.assert_called_once_with(filename='candidate.xml') ocnos_instance.commit_config.assert_called_once() @mock.patch(ocnos_class_path, autospec=True) def test_success_merge_action(self, mock_ocnos): ocnos_instance = mock_ocnos.return_value.__enter__.return_value process( config_file_path=os.path.join(current_path, 'user-details.yml.example'), hostname='foobar.com', actions=['merge'], save_config_file_path=None, candidate_file_path='candidate.xml' ) ocnos_instance.load_candidate_config.assert_called_once_with(filename='candidate.xml') ocnos_instance.commit_config.assert_called_once() @mock.patch(ocnos_class_path, autospec=True) def test_success_when_two_actions_passed(self, mock_ocnos): ocnos_instance = mock_ocnos.return_value.__enter__.return_value process( config_file_path=os.path.join(current_path, 'user-details.yml.example'), hostname='foobar.com', actions=['replace', 'diff'], save_config_file_path=None, candidate_file_path='candidate.xml' ) ocnos_instance.load_candidate_config.assert_has_calls( calls=[ mock.call(filename='candidate.xml'), mock.call(filename='candidate.xml') ] ) ocnos_instance.commit_config.assert_called_once() class TestMainFunction(TestCase): @mock.patch(ocnos_class_path, autospec=True) def test_success(self, mock_ocnos): config_file = os.path.join(current_path, 'user-details.yml.example') with mock.patch.object(sys, 'argv', ['prog', config_file, 'foo.com', 'connection']): ocnos_instance = mock_ocnos.return_value.__enter__.return_value main() ocnos_instance.is_alive.assert_called_once()
45.090196
119
0.680727
1,458
11,498
4.989712
0.088477
0.06488
0.06543
0.039175
0.875189
0.840275
0.838076
0.826254
0.816632
0.798213
0
0.000218
0.202383
11,498
254
120
45.267717
0.793043
0.013394
0
0.53202
0
0
0.13394
0.041939
0
0
0
0
0.17734
1
0.137931
false
0.009852
0.039409
0
0.192118
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
a962e215ab76beac7a8a2bc5acccc1300a2ea509
34
py
Python
pyEX/tests/test_all.py
andrescevp/pyEX
4c8daa411b01133a292d341a78f6e1b80cc2be99
[ "Apache-2.0" ]
31
2017-11-06T00:45:23.000Z
2021-11-12T11:16:47.000Z
pyEX/tests/test_all.py
andrescevp/pyEX
4c8daa411b01133a292d341a78f6e1b80cc2be99
[ "Apache-2.0" ]
18
2018-01-02T17:02:01.000Z
2020-12-29T17:32:28.000Z
pyEX/tests/test_all.py
andrescevp/pyEX
4c8daa411b01133a292d341a78f6e1b80cc2be99
[ "Apache-2.0" ]
7
2018-01-02T10:36:47.000Z
2021-10-06T19:43:15.000Z
# for Coverage from pyEX import *
11.333333
18
0.735294
5
34
5
1
0
0
0
0
0
0
0
0
0
0
0
0.205882
34
2
19
17
0.925926
0.352941
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
a9753ff686fe1f7f8e474a51e5d066c297af075b
35
py
Python
gisdem/osm.py
jsa4000/Spatial-Module-Python
a00db842a43183db4b48e3e223bccfb65809d121
[ "Apache-2.0" ]
null
null
null
gisdem/osm.py
jsa4000/Spatial-Module-Python
a00db842a43183db4b48e3e223bccfb65809d121
[ "Apache-2.0" ]
null
null
null
gisdem/osm.py
jsa4000/Spatial-Module-Python
a00db842a43183db4b48e3e223bccfb65809d121
[ "Apache-2.0" ]
null
null
null
from downloader import download
7
31
0.8
4
35
7
1
0
0
0
0
0
0
0
0
0
0
0
0.2
35
4
32
8.75
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
a98f3937355b4e279e401138e29bb4d9d3d8c5a4
42
py
Python
moontracker/views/home/__init__.py
Thenerdstation/MoonTracker
15e5cebc15fe69074f8257b4fcaf1606d87dc3e6
[ "MIT" ]
4
2018-02-26T23:18:01.000Z
2018-04-21T01:48:59.000Z
moontracker/views/home/__init__.py
Thenerdstation/MoonTracker
15e5cebc15fe69074f8257b4fcaf1606d87dc3e6
[ "MIT" ]
33
2018-02-05T01:02:39.000Z
2018-04-30T16:05:08.000Z
moontracker/__init__.py
Thenerdstation/MoonTracker
15e5cebc15fe69074f8257b4fcaf1606d87dc3e6
[ "MIT" ]
1
2022-02-27T22:58:50.000Z
2022-02-27T22:58:50.000Z
"""Moontracker package initialization."""
21
41
0.761905
3
42
10.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.071429
42
1
42
42
0.820513
0.833333
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
6
8d29051e5ba00477eee8ae93ab5ae6c168e516c2
97
py
Python
torch_warmup/__init__.py
Nemexur/pytorch_warmup
d02b5bc6709f071648e4c3bf49bfff40f9f071ec
[ "Apache-2.0" ]
null
null
null
torch_warmup/__init__.py
Nemexur/pytorch_warmup
d02b5bc6709f071648e4c3bf49bfff40f9f071ec
[ "Apache-2.0" ]
null
null
null
torch_warmup/__init__.py
Nemexur/pytorch_warmup
d02b5bc6709f071648e4c3bf49bfff40f9f071ec
[ "Apache-2.0" ]
null
null
null
from .combine_scheduler import CombineLRSchedulers from .warmup_scheduler import WarmUpScheduler
32.333333
50
0.896907
10
97
8.5
0.7
0.352941
0
0
0
0
0
0
0
0
0
0
0.082474
97
2
51
48.5
0.955056
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