Dataset Viewer
Auto-converted to Parquet
sequence
stringlengths
902
12k
docstring
stringlengths
4
15.2k
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '12']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_buildItem'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '9']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'elem'}; {'id': '6', 'type': 'default_parameter', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '8', 'type': 'None', 'children': []}; {'id': '9', 'type': 'default_parameter', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'initpath'}; {'id': '11', 'type': 'None', 'children': []}; {'id': '12', 'type': 'block', 'children': ['13', '21', '35', '54', '69', '90', '104']}; {'id': '13', 'type': 'expression_statement', 'children': ['14']}; {'id': '14', 'type': 'assignment', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'initpath'}; {'id': '16', 'type': 'boolean_operator', 'children': ['17', '18'], 'value': 'or'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'initpath'}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': '_initpath'}; {'id': '21', 'type': 'if_statement', 'children': ['22', '25']}; {'id': '22', 'type': 'comparison_operator', 'children': ['23', '24'], 'value': 'is not'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '24', 'type': 'None', 'children': []}; {'id': '25', 'type': 'block', 'children': ['26']}; {'id': '26', 'type': 'return_statement', 'children': ['27']}; {'id': '27', 'type': 'call', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'cls'}; {'id': '29', 'type': 'argument_list', 'children': ['30', '33', '34']}; {'id': '30', 'type': 'attribute', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': '_server'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'elem'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'initpath'}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'assignment', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'etype'}; {'id': '38', 'type': 'call', 'children': ['39', '44']}; {'id': '39', 'type': 'attribute', 'children': ['40', '43']}; {'id': '40', 'type': 'attribute', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'elem'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '44', 'type': 'argument_list', 'children': ['45', '46']}; {'id': '45', 'type': 'string', 'children': [], 'value': "'type'"}; {'id': '46', 'type': 'call', 'children': ['47', '52']}; {'id': '47', 'type': 'attribute', 'children': ['48', '51']}; {'id': '48', 'type': 'attribute', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'elem'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'attrib'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '52', 'type': 'argument_list', 'children': ['53']}; {'id': '53', 'type': 'string', 'children': [], 'value': "'streamType'"}; {'id': '54', 'type': 'expression_statement', 'children': ['55']}; {'id': '55', 'type': 'assignment', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'ehash'}; {'id': '57', 'type': 'conditional_expression', 'children': ['58', '65', '66'], 'value': 'if'}; {'id': '58', 'type': 'binary_operator', 'children': ['59', '60'], 'value': '%'}; {'id': '59', 'type': 'string', 'children': [], 'value': "'%s.%s'"}; {'id': '60', 'type': 'tuple', 'children': ['61', '64']}; {'id': '61', 'type': 'attribute', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'elem'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'tag'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'etype'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'etype'}; {'id': '66', 'type': 'attribute', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'elem'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'tag'}; {'id': '69', 'type': 'expression_statement', 'children': ['70']}; {'id': '70', 'type': 'assignment', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'ecls'}; {'id': '72', 'type': 'call', 'children': ['73', '78']}; {'id': '73', 'type': 'attribute', 'children': ['74', '77']}; {'id': '74', 'type': 'attribute', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'utils'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'PLEXOBJECTS'}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '78', 'type': 'argument_list', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'ehash'}; {'id': '80', 'type': 'call', 'children': ['81', '86']}; {'id': '81', 'type': 'attribute', 'children': ['82', '85']}; {'id': '82', 'type': 'attribute', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'utils'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'PLEXOBJECTS'}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '86', 'type': 'argument_list', 'children': ['87']}; {'id': '87', 'type': 'attribute', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'elem'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'tag'}; {'id': '90', 'type': 'if_statement', 'children': ['91', '94']}; {'id': '91', 'type': 'comparison_operator', 'children': ['92', '93'], 'value': 'is not'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'ecls'}; {'id': '93', 'type': 'None', 'children': []}; {'id': '94', 'type': 'block', 'children': ['95']}; {'id': '95', 'type': 'return_statement', 'children': ['96']}; {'id': '96', 'type': 'call', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'ecls'}; {'id': '98', 'type': 'argument_list', 'children': ['99', '102', '103']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': '_server'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'elem'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'initpath'}; {'id': '104', 'type': 'raise_statement', 'children': ['105']}; {'id': '105', 'type': 'call', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'UnknownType'}; {'id': '107', 'type': 'argument_list', 'children': ['108']}; {'id': '108', 'type': 'binary_operator', 'children': ['109', '110'], 'value': '%'}; {'id': '109', 'type': 'string', 'children': [], 'value': '"Unknown library type <%s type=\'%s\'../>"'}; {'id': '110', 'type': 'tuple', 'children': ['111', '114']}; {'id': '111', 'type': 'attribute', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'elem'}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'tag'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'etype'}
Factory function to build objects based on registered PLEXOBJECTS.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'connectMSExchange'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'server'}; {'id': '5', 'type': 'block', 'children': ['6', '14', '24', '33', '42', '46', '57', '65', '80', '94', '107', '123', '131', '146', '158', '167']}; {'id': '6', 'type': 'if_statement', 'children': ['7', '9']}; {'id': '7', 'type': 'not_operator', 'children': ['8']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'sspi'}; {'id': '9', 'type': 'block', 'children': ['10']}; {'id': '10', 'type': 'return_statement', 'children': ['11']}; {'id': '11', 'type': 'expression_list', 'children': ['12', '13']}; {'id': '12', 'type': 'False', 'children': []}; {'id': '13', 'type': 'string', 'children': [], 'value': "'No sspi module found.'"}; {'id': '14', 'type': 'expression_statement', 'children': ['15']}; {'id': '15', 'type': 'assignment', 'children': ['16', '19']}; {'id': '16', 'type': 'pattern_list', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'code'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '19', 'type': 'call', 'children': ['20', '23']}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'server'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'ehlo'}; {'id': '23', 'type': 'argument_list', 'children': []}; {'id': '24', 'type': 'if_statement', 'children': ['25', '28']}; {'id': '25', 'type': 'comparison_operator', 'children': ['26', '27'], 'value': '!='}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'code'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'SMTP_EHLO_OKAY'}; {'id': '28', 'type': 'block', 'children': ['29']}; {'id': '29', 'type': 'return_statement', 'children': ['30']}; {'id': '30', 'type': 'expression_list', 'children': ['31', '32']}; {'id': '31', 'type': 'False', 'children': []}; {'id': '32', 'type': 'string', 'children': [], 'value': "'Server did not respond to EHLO command.'"}; {'id': '33', 'type': 'expression_statement', 'children': ['34']}; {'id': '34', 'type': 'assignment', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'sspi_client'}; {'id': '36', 'type': 'call', 'children': ['37', '40']}; {'id': '37', 'type': 'attribute', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'sspi'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'ClientAuth'}; {'id': '40', 'type': 'argument_list', 'children': ['41']}; {'id': '41', 'type': 'string', 'children': [], 'value': "'NTLM'"}; {'id': '42', 'type': 'expression_statement', 'children': ['43']}; {'id': '43', 'type': 'assignment', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'sec_buffer'}; {'id': '45', 'type': 'None', 'children': []}; {'id': '46', 'type': 'expression_statement', 'children': ['47']}; {'id': '47', 'type': 'assignment', 'children': ['48', '51']}; {'id': '48', 'type': 'pattern_list', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'sec_buffer'}; {'id': '51', 'type': 'call', 'children': ['52', '55']}; {'id': '52', 'type': 'attribute', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'sspi_client'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'authorize'}; {'id': '55', 'type': 'argument_list', 'children': ['56']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'sec_buffer'}; {'id': '57', 'type': 'expression_statement', 'children': ['58']}; {'id': '58', 'type': 'assignment', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'buffer'}; {'id': '60', 'type': 'attribute', 'children': ['61', '64']}; {'id': '61', 'type': 'subscript', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'sec_buffer'}; {'id': '63', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'Buffer'}; {'id': '65', 'type': 'expression_statement', 'children': ['66']}; {'id': '66', 'type': 'assignment', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'ntlm_message'}; {'id': '68', 'type': 'call', 'children': ['69', '77']}; {'id': '69', 'type': 'attribute', 'children': ['70', '76']}; {'id': '70', 'type': 'call', 'children': ['71', '74']}; {'id': '71', 'type': 'attribute', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'base64'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'encodestring'}; {'id': '74', 'type': 'argument_list', 'children': ['75']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'buffer'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '77', 'type': 'argument_list', 'children': ['78', '79']}; {'id': '78', 'type': 'string', 'children': [], 'value': "'\\n'"}; {'id': '79', 'type': 'string', 'children': [], 'value': "''"}; {'id': '80', 'type': 'expression_statement', 'children': ['81']}; {'id': '81', 'type': 'assignment', 'children': ['82', '85']}; {'id': '82', 'type': 'pattern_list', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'code'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '85', 'type': 'call', 'children': ['86', '89']}; {'id': '86', 'type': 'attribute', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'server'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'docmd'}; {'id': '89', 'type': 'argument_list', 'children': ['90', '91']}; {'id': '90', 'type': 'string', 'children': [], 'value': "'AUTH'"}; {'id': '91', 'type': 'binary_operator', 'children': ['92', '93'], 'value': '+'}; {'id': '92', 'type': 'string', 'children': [], 'value': "'NTLM '"}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'ntlm_message'}; {'id': '94', 'type': 'if_statement', 'children': ['95', '98']}; {'id': '95', 'type': 'comparison_operator', 'children': ['96', '97'], 'value': '!='}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'code'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'SMTP_AUTH_CHALLENGE'}; {'id': '98', 'type': 'block', 'children': ['99', '103']}; {'id': '99', 'type': 'expression_statement', 'children': ['100']}; {'id': '100', 'type': 'assignment', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '102', 'type': 'string', 'children': [], 'value': "'Server did not respond as expected to NTLM negotiate message'"}; {'id': '103', 'type': 'return_statement', 'children': ['104']}; {'id': '104', 'type': 'expression_list', 'children': ['105', '106']}; {'id': '105', 'type': 'False', 'children': []}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'msg'}; {'id': '107', 'type': 'expression_statement', 'children': ['108']}; {'id': '108', 'type': 'assignment', 'children': ['109', '112']}; {'id': '109', 'type': 'pattern_list', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'err'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'sec_buffer'}; {'id': '112', 'type': 'call', 'children': ['113', '116']}; {'id': '113', 'type': 'attribute', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'sspi_client'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'authorize'}; {'id': '116', 'type': 'argument_list', 'children': ['117']}; {'id': '117', 'type': 'call', 'children': ['118', '121']}; {'id': '118', 'type': 'attribute', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'base64'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'decodestring'}; {'id': '121', 'type': 'argument_list', 'children': ['122']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '123', 'type': 'expression_statement', 'children': ['124']}; {'id': '124', 'type': 'assignment', 'children': ['125', '126']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'buffer'}; {'id': '126', 'type': 'attribute', 'children': ['127', '130']}; {'id': '127', 'type': 'subscript', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'sec_buffer'}; {'id': '129', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '130', 'type': 'identifier', 'children': [], 'value': 'Buffer'}; {'id': '131', 'type': 'expression_statement', 'children': ['132']}; {'id': '132', 'type': 'assignment', 'children': ['133', '134']}; {'id': '133', 'type': 'identifier', 'children': [], 'value': 'ntlm_message'}; {'id': '134', 'type': 'call', 'children': ['135', '143']}; {'id': '135', 'type': 'attribute', 'children': ['136', '142']}; {'id': '136', 'type': 'call', 'children': ['137', '140']}; {'id': '137', 'type': 'attribute', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'base64'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'encodestring'}; {'id': '140', 'type': 'argument_list', 'children': ['141']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'buffer'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '143', 'type': 'argument_list', 'children': ['144', '145']}; {'id': '144', 'type': 'string', 'children': [], 'value': "'\\n'"}; {'id': '145', 'type': 'string', 'children': [], 'value': "''"}; {'id': '146', 'type': 'expression_statement', 'children': ['147']}; {'id': '147', 'type': 'assignment', 'children': ['148', '151']}; {'id': '148', 'type': 'pattern_list', 'children': ['149', '150']}; {'id': '149', 'type': 'identifier', 'children': [], 'value': 'code'}; {'id': '150', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '151', 'type': 'call', 'children': ['152', '155']}; {'id': '152', 'type': 'attribute', 'children': ['153', '154']}; {'id': '153', 'type': 'identifier', 'children': [], 'value': 'server'}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'docmd'}; {'id': '155', 'type': 'argument_list', 'children': ['156', '157']}; {'id': '156', 'type': 'string', 'children': [], 'value': "''"}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'ntlm_message'}; {'id': '158', 'type': 'if_statement', 'children': ['159', '162']}; {'id': '159', 'type': 'comparison_operator', 'children': ['160', '161'], 'value': '!='}; {'id': '160', 'type': 'identifier', 'children': [], 'value': 'code'}; {'id': '161', 'type': 'identifier', 'children': [], 'value': 'SMTP_AUTH_OKAY'}; {'id': '162', 'type': 'block', 'children': ['163']}; {'id': '163', 'type': 'return_statement', 'children': ['164']}; {'id': '164', 'type': 'expression_list', 'children': ['165', '166']}; {'id': '165', 'type': 'False', 'children': []}; {'id': '166', 'type': 'identifier', 'children': [], 'value': 'response'}; {'id': '167', 'type': 'return_statement', 'children': ['168']}; {'id': '168', 'type': 'expression_list', 'children': ['169', '170']}; {'id': '169', 'type': 'True', 'children': []}; {'id': '170', 'type': 'string', 'children': [], 'value': "''"}
Creates a connection for the inputted server to a Microsoft Exchange server. :param server | <smtplib.SMTP> :usage |>>> import smtplib |>>> import projex.notify |>>> smtp = smtplib.SMTP('mail.server.com') |>>> projex.notify.connectMSExchange(smtp) :return (<bool> success, <str> reason)
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'load_from_cache'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'default_parameter', 'children': ['5', '6']}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'user_path'}; {'id': '7', 'type': 'block', 'children': ['8', '13']}; {'id': '8', 'type': 'if_statement', 'children': ['9', '11']}; {'id': '9', 'type': 'not_operator', 'children': ['10']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '11', 'type': 'block', 'children': ['12']}; {'id': '12', 'type': 'return_statement', 'children': []}; {'id': '13', 'type': 'try_statement', 'children': ['14', '50']}; {'id': '14', 'type': 'block', 'children': ['15', '39']}; {'id': '15', 'type': 'with_statement', 'children': ['16', '26']}; {'id': '16', 'type': 'with_clause', 'children': ['17']}; {'id': '17', 'type': 'with_item', 'children': ['18']}; {'id': '18', 'type': 'as_pattern', 'children': ['19', '24']}; {'id': '19', 'type': 'call', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '21', 'type': 'argument_list', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '23', 'type': 'string', 'children': [], 'value': "'rb'"}; {'id': '24', 'type': 'as_pattern_target', 'children': ['25']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '26', 'type': 'block', 'children': ['27']}; {'id': '27', 'type': 'expression_statement', 'children': ['28']}; {'id': '28', 'type': 'assignment', 'children': ['29', '33']}; {'id': '29', 'type': 'pattern_list', 'children': ['30', '31', '32']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'dversion'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'mversion'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '33', 'type': 'call', 'children': ['34', '37']}; {'id': '34', 'type': 'attribute', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'pickle'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'load'}; {'id': '37', 'type': 'argument_list', 'children': ['38']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '39', 'type': 'if_statement', 'children': ['40', '47']}; {'id': '40', 'type': 'boolean_operator', 'children': ['41', '44'], 'value': 'and'}; {'id': '41', 'type': 'comparison_operator', 'children': ['42', '43'], 'value': '=='}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'dversion'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'data_version'}; {'id': '44', 'type': 'comparison_operator', 'children': ['45', '46'], 'value': '=='}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'mversion'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'module_version'}; {'id': '47', 'type': 'block', 'children': ['48']}; {'id': '48', 'type': 'return_statement', 'children': ['49']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '50', 'type': 'except_clause', 'children': ['51', '55']}; {'id': '51', 'type': 'tuple', 'children': ['52', '53', '54']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'FileNotFoundError'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'ValueError'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'EOFError'}; {'id': '55', 'type': 'block', 'children': ['56']}; {'id': '56', 'type': 'pass_statement', 'children': []}
Try to load category ranges from userlevel cache file. :param path: path to userlevel cache file :type path: str :returns: category ranges dict or None :rtype: None or dict of RangeGroup
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'convex_conj'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '17']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'conj_exp'}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'conj_exponent'}; {'id': '11', 'type': 'argument_list', 'children': ['12']}; {'id': '12', 'type': 'attribute', 'children': ['13', '16']}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'pointwise_norm'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'exponent'}; {'id': '17', 'type': 'return_statement', 'children': ['18']}; {'id': '18', 'type': 'call', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'IndicatorGroupL1UnitBall'}; {'id': '20', 'type': 'argument_list', 'children': ['21', '24']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'domain'}; {'id': '24', 'type': 'keyword_argument', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'exponent'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'conj_exp'}
The convex conjugate functional of the group L1-norm.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'extract'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '6', 'type': 'block', 'children': ['7', '11', '29', '40', '52', '60', '68', '76', '84', '92', '100', '108']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'article_candidates'}; {'id': '10', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '11', 'type': 'for_statement', 'children': ['12', '13', '16']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'extractor'}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'extractor_list'}; {'id': '16', 'type': 'block', 'children': ['17']}; {'id': '17', 'type': 'expression_statement', 'children': ['18']}; {'id': '18', 'type': 'call', 'children': ['19', '22']}; {'id': '19', 'type': 'attribute', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'article_candidates'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '22', 'type': 'argument_list', 'children': ['23']}; {'id': '23', 'type': 'call', 'children': ['24', '27']}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'extractor'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'extract'}; {'id': '27', 'type': 'argument_list', 'children': ['28']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '29', 'type': 'expression_statement', 'children': ['30']}; {'id': '30', 'type': 'assignment', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'article_candidates'}; {'id': '32', 'type': 'call', 'children': ['33', '38']}; {'id': '33', 'type': 'attribute', 'children': ['34', '37']}; {'id': '34', 'type': 'attribute', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'cleaner'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'clean'}; {'id': '38', 'type': 'argument_list', 'children': ['39']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'article_candidates'}; {'id': '40', 'type': 'expression_statement', 'children': ['41']}; {'id': '41', 'type': 'assignment', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'article'}; {'id': '43', 'type': 'call', 'children': ['44', '49']}; {'id': '44', 'type': 'attribute', 'children': ['45', '48']}; {'id': '45', 'type': 'attribute', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'comparer'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'compare'}; {'id': '49', 'type': 'argument_list', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'article_candidates'}; {'id': '52', 'type': 'expression_statement', 'children': ['53']}; {'id': '53', 'type': 'assignment', 'children': ['54', '57']}; {'id': '54', 'type': 'subscript', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '56', 'type': 'string', 'children': [], 'value': "'article_title'"}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'article'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'title'}; {'id': '60', 'type': 'expression_statement', 'children': ['61']}; {'id': '61', 'type': 'assignment', 'children': ['62', '65']}; {'id': '62', 'type': 'subscript', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '64', 'type': 'string', 'children': [], 'value': "'article_description'"}; {'id': '65', 'type': 'attribute', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'article'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'description'}; {'id': '68', 'type': 'expression_statement', 'children': ['69']}; {'id': '69', 'type': 'assignment', 'children': ['70', '73']}; {'id': '70', 'type': 'subscript', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '72', 'type': 'string', 'children': [], 'value': "'article_text'"}; {'id': '73', 'type': 'attribute', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'article'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '76', 'type': 'expression_statement', 'children': ['77']}; {'id': '77', 'type': 'assignment', 'children': ['78', '81']}; {'id': '78', 'type': 'subscript', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '80', 'type': 'string', 'children': [], 'value': "'article_image'"}; {'id': '81', 'type': 'attribute', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'article'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'topimage'}; {'id': '84', 'type': 'expression_statement', 'children': ['85']}; {'id': '85', 'type': 'assignment', 'children': ['86', '89']}; {'id': '86', 'type': 'subscript', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '88', 'type': 'string', 'children': [], 'value': "'article_author'"}; {'id': '89', 'type': 'attribute', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'article'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'author'}; {'id': '92', 'type': 'expression_statement', 'children': ['93']}; {'id': '93', 'type': 'assignment', 'children': ['94', '97']}; {'id': '94', 'type': 'subscript', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '96', 'type': 'string', 'children': [], 'value': "'article_publish_date'"}; {'id': '97', 'type': 'attribute', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'article'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'publish_date'}; {'id': '100', 'type': 'expression_statement', 'children': ['101']}; {'id': '101', 'type': 'assignment', 'children': ['102', '105']}; {'id': '102', 'type': 'subscript', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'item'}; {'id': '104', 'type': 'string', 'children': [], 'value': "'article_language'"}; {'id': '105', 'type': 'attribute', 'children': ['106', '107']}; {'id': '106', 'type': 'identifier', 'children': [], 'value': 'article'}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'language'}; {'id': '108', 'type': 'return_statement', 'children': ['109']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'item'}
Runs the HTML-response trough a list of initialized extractors, a cleaner and compares the results. :param item: NewscrawlerItem to be processed. :return: An updated NewscrawlerItem including the results of the extraction
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '4']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_get_ca_certs_paths'}; {'id': '3', 'type': 'parameters', 'children': []}; {'id': '4', 'type': 'block', 'children': ['5', '9', '27', '82', '117', '124']}; {'id': '5', 'type': 'expression_statement', 'children': ['6']}; {'id': '6', 'type': 'assignment', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'ca_certs'}; {'id': '8', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '9', 'type': 'expression_statement', 'children': ['10']}; {'id': '10', 'type': 'assignment', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'embedded_root'}; {'id': '12', 'type': 'call', 'children': ['13', '18']}; {'id': '13', 'type': 'attribute', 'children': ['14', '17']}; {'id': '14', 'type': 'attribute', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'dirname'}; {'id': '18', 'type': 'argument_list', 'children': ['19']}; {'id': '19', 'type': 'call', 'children': ['20', '25']}; {'id': '20', 'type': 'attribute', 'children': ['21', '24']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'abspath'}; {'id': '25', 'type': 'argument_list', 'children': ['26']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': '__file__'}; {'id': '27', 'type': 'for_statement', 'children': ['28', '29', '33', '75']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '29', 'type': 'call', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '31', 'type': 'argument_list', 'children': ['32']}; {'id': '32', 'type': 'integer', 'children': [], 'value': '10'}; {'id': '33', 'type': 'block', 'children': ['34', '64']}; {'id': '34', 'type': 'if_statement', 'children': ['35', '45']}; {'id': '35', 'type': 'comparison_operator', 'children': ['36', '44'], 'value': '=='}; {'id': '36', 'type': 'call', 'children': ['37', '42']}; {'id': '37', 'type': 'attribute', 'children': ['38', '41']}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'basename'}; {'id': '42', 'type': 'argument_list', 'children': ['43']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'embedded_root'}; {'id': '44', 'type': 'string', 'children': [], 'value': "'embedded'"}; {'id': '45', 'type': 'block', 'children': ['46', '63']}; {'id': '46', 'type': 'expression_statement', 'children': ['47']}; {'id': '47', 'type': 'call', 'children': ['48', '51']}; {'id': '48', 'type': 'attribute', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'ca_certs'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '51', 'type': 'argument_list', 'children': ['52']}; {'id': '52', 'type': 'call', 'children': ['53', '58']}; {'id': '53', 'type': 'attribute', 'children': ['54', '57']}; {'id': '54', 'type': 'attribute', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '58', 'type': 'argument_list', 'children': ['59', '60', '61', '62']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'embedded_root'}; {'id': '60', 'type': 'string', 'children': [], 'value': "'ssl'"}; {'id': '61', 'type': 'string', 'children': [], 'value': "'certs'"}; {'id': '62', 'type': 'string', 'children': [], 'value': "'cacert.pem'"}; {'id': '63', 'type': 'break_statement', 'children': []}; {'id': '64', 'type': 'expression_statement', 'children': ['65']}; {'id': '65', 'type': 'assignment', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'embedded_root'}; {'id': '67', 'type': 'call', 'children': ['68', '73']}; {'id': '68', 'type': 'attribute', 'children': ['69', '72']}; {'id': '69', 'type': 'attribute', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'dirname'}; {'id': '73', 'type': 'argument_list', 'children': ['74']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'embedded_root'}; {'id': '75', 'type': 'else_clause', 'children': ['76']}; {'id': '76', 'type': 'block', 'children': ['77']}; {'id': '77', 'type': 'raise_statement', 'children': ['78']}; {'id': '78', 'type': 'call', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'OSError'}; {'id': '80', 'type': 'argument_list', 'children': ['81']}; {'id': '81', 'type': 'string', 'children': [], 'value': "'Unable to locate `embedded` directory. Please specify ca_certs in your http yaml configuration file.'"}; {'id': '82', 'type': 'try_statement', 'children': ['83', '87', '91']}; {'id': '83', 'type': 'block', 'children': ['84']}; {'id': '84', 'type': 'import_statement', 'children': ['85']}; {'id': '85', 'type': 'dotted_name', 'children': ['86']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'tornado'}; {'id': '87', 'type': 'except_clause', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'ImportError'}; {'id': '89', 'type': 'block', 'children': ['90']}; {'id': '90', 'type': 'pass_statement', 'children': []}; {'id': '91', 'type': 'else_clause', 'children': ['92']}; {'id': '92', 'type': 'block', 'children': ['93']}; {'id': '93', 'type': 'expression_statement', 'children': ['94']}; {'id': '94', 'type': 'call', 'children': ['95', '98']}; {'id': '95', 'type': 'attribute', 'children': ['96', '97']}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'ca_certs'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '98', 'type': 'argument_list', 'children': ['99']}; {'id': '99', 'type': 'call', 'children': ['100', '105']}; {'id': '100', 'type': 'attribute', 'children': ['101', '104']}; {'id': '101', 'type': 'attribute', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '105', 'type': 'argument_list', 'children': ['106', '116']}; {'id': '106', 'type': 'call', 'children': ['107', '112']}; {'id': '107', 'type': 'attribute', 'children': ['108', '111']}; {'id': '108', 'type': 'attribute', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'dirname'}; {'id': '112', 'type': 'argument_list', 'children': ['113']}; {'id': '113', 'type': 'attribute', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'tornado'}; {'id': '115', 'type': 'identifier', 'children': [], 'value': '__file__'}; {'id': '116', 'type': 'string', 'children': [], 'value': "'ca-certificates.crt'"}; {'id': '117', 'type': 'expression_statement', 'children': ['118']}; {'id': '118', 'type': 'call', 'children': ['119', '122']}; {'id': '119', 'type': 'attribute', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'ca_certs'}; {'id': '121', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '122', 'type': 'argument_list', 'children': ['123']}; {'id': '123', 'type': 'string', 'children': [], 'value': "'/etc/ssl/certs/ca-certificates.crt'"}; {'id': '124', 'type': 'return_statement', 'children': ['125']}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'ca_certs'}
Get a list of possible paths containing certificates Check is installed via pip to: * Windows: embedded/lib/site-packages/datadog_checks/http_check * Linux: embedded/lib/python2.7/site-packages/datadog_checks/http_check Certificate is installed to: * embedded/ssl/certs/cacert.pem walk up to `embedded`, and back down to ssl/certs to find the certificate file
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'trigger_all_callbacks'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'callbacks'}; {'id': '7', 'type': 'None', 'children': []}; {'id': '8', 'type': 'block', 'children': ['9']}; {'id': '9', 'type': 'return_statement', 'children': ['10']}; {'id': '10', 'type': 'list_comprehension', 'children': ['11', '12', '15']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '12', 'type': 'for_in_clause', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '15', 'type': 'for_in_clause', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'ret'}; {'id': '17', 'type': 'call', 'children': ['18', '21']}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'trigger_callbacks'}; {'id': '21', 'type': 'argument_list', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '23', 'type': 'keyword_argument', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'callbacks'}; {'id': '25', 'type': 'None', 'children': []}
Trigger callbacks for all keys on all or a subset of subscribers. :param Iterable callbacks: list of callbacks or none for all subscribed :rtype: Iterable[tornado.concurrent.Future]
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_parse_log_entry'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'entry_pb'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'try_statement', 'children': ['7', '13']}; {'id': '7', 'type': 'block', 'children': ['8']}; {'id': '8', 'type': 'return_statement', 'children': ['9']}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'MessageToDict'}; {'id': '11', 'type': 'argument_list', 'children': ['12']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'entry_pb'}; {'id': '13', 'type': 'except_clause', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'TypeError'}; {'id': '15', 'type': 'block', 'children': ['16']}; {'id': '16', 'type': 'if_statement', 'children': ['17', '23', '52']}; {'id': '17', 'type': 'call', 'children': ['18', '21']}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'entry_pb'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'HasField'}; {'id': '21', 'type': 'argument_list', 'children': ['22']}; {'id': '22', 'type': 'string', 'children': [], 'value': '"proto_payload"'}; {'id': '23', 'type': 'block', 'children': ['24', '30', '37', '44', '50']}; {'id': '24', 'type': 'expression_statement', 'children': ['25']}; {'id': '25', 'type': 'assignment', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'proto_payload'}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'entry_pb'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'proto_payload'}; {'id': '30', 'type': 'expression_statement', 'children': ['31']}; {'id': '31', 'type': 'call', 'children': ['32', '35']}; {'id': '32', 'type': 'attribute', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'entry_pb'}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'ClearField'}; {'id': '35', 'type': 'argument_list', 'children': ['36']}; {'id': '36', 'type': 'string', 'children': [], 'value': '"proto_payload"'}; {'id': '37', 'type': 'expression_statement', 'children': ['38']}; {'id': '38', 'type': 'assignment', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'entry_mapping'}; {'id': '40', 'type': 'call', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'MessageToDict'}; {'id': '42', 'type': 'argument_list', 'children': ['43']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'entry_pb'}; {'id': '44', 'type': 'expression_statement', 'children': ['45']}; {'id': '45', 'type': 'assignment', 'children': ['46', '49']}; {'id': '46', 'type': 'subscript', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'entry_mapping'}; {'id': '48', 'type': 'string', 'children': [], 'value': '"protoPayload"'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'proto_payload'}; {'id': '50', 'type': 'return_statement', 'children': ['51']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'entry_mapping'}; {'id': '52', 'type': 'else_clause', 'children': ['53']}; {'id': '53', 'type': 'block', 'children': ['54']}; {'id': '54', 'type': 'raise_statement', 'children': []}
Special helper to parse ``LogEntry`` protobuf into a dictionary. The ``proto_payload`` field in ``LogEntry`` is of type ``Any``. This can be problematic if the type URL in the payload isn't in the ``google.protobuf`` registry. To help with parsing unregistered types, this function will remove ``proto_payload`` before parsing. :type entry_pb: :class:`.log_entry_pb2.LogEntry` :param entry_pb: Log entry protobuf. :rtype: dict :returns: The parsed log entry. The ``protoPayload`` key may contain the raw ``Any`` protobuf from ``entry_pb.proto_payload`` if it could not be parsed.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '31']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'ssl_context'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8', '11', '14', '17', '20', '23', '26', '29']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'verify'}; {'id': '7', 'type': 'True', 'children': []}; {'id': '8', 'type': 'default_parameter', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'cert_reqs'}; {'id': '10', 'type': 'None', 'children': []}; {'id': '11', 'type': 'default_parameter', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'check_hostname'}; {'id': '13', 'type': 'False', 'children': []}; {'id': '14', 'type': 'default_parameter', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'certfile'}; {'id': '16', 'type': 'None', 'children': []}; {'id': '17', 'type': 'default_parameter', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'keyfile'}; {'id': '19', 'type': 'None', 'children': []}; {'id': '20', 'type': 'default_parameter', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'cafile'}; {'id': '22', 'type': 'None', 'children': []}; {'id': '23', 'type': 'default_parameter', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'capath'}; {'id': '25', 'type': 'None', 'children': []}; {'id': '26', 'type': 'default_parameter', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'cadata'}; {'id': '28', 'type': 'None', 'children': []}; {'id': '29', 'type': 'dictionary_splat_pattern', 'children': ['30']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'kw'}; {'id': '31', 'type': 'block', 'children': ['32', '35', '41', '56', '97']}; {'id': '32', 'type': 'assert_statement', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'ssl'}; {'id': '34', 'type': 'string', 'children': [], 'value': "'SSL not supported'"}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'assignment', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'cafile'}; {'id': '38', 'type': 'boolean_operator', 'children': ['39', '40'], 'value': 'or'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'cafile'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'DEFAULT_CA_BUNDLE_PATH'}; {'id': '41', 'type': 'if_statement', 'children': ['42', '45']}; {'id': '42', 'type': 'comparison_operator', 'children': ['43', '44'], 'value': 'is'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'verify'}; {'id': '44', 'type': 'True', 'children': []}; {'id': '45', 'type': 'block', 'children': ['46', '52']}; {'id': '46', 'type': 'expression_statement', 'children': ['47']}; {'id': '47', 'type': 'assignment', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'cert_reqs'}; {'id': '49', 'type': 'attribute', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'ssl'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'CERT_REQUIRED'}; {'id': '52', 'type': 'expression_statement', 'children': ['53']}; {'id': '53', 'type': 'assignment', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'check_hostname'}; {'id': '55', 'type': 'True', 'children': []}; {'id': '56', 'type': 'if_statement', 'children': ['57', '62']}; {'id': '57', 'type': 'call', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '59', 'type': 'argument_list', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'verify'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '62', 'type': 'block', 'children': ['63', '69']}; {'id': '63', 'type': 'expression_statement', 'children': ['64']}; {'id': '64', 'type': 'assignment', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'cert_reqs'}; {'id': '66', 'type': 'attribute', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'ssl'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'CERT_REQUIRED'}; {'id': '69', 'type': 'if_statement', 'children': ['70', '78', '83']}; {'id': '70', 'type': 'call', 'children': ['71', '76']}; {'id': '71', 'type': 'attribute', 'children': ['72', '75']}; {'id': '72', 'type': 'attribute', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'isfile'}; {'id': '76', 'type': 'argument_list', 'children': ['77']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'verify'}; {'id': '78', 'type': 'block', 'children': ['79']}; {'id': '79', 'type': 'expression_statement', 'children': ['80']}; {'id': '80', 'type': 'assignment', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'cafile'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'verify'}; {'id': '83', 'type': 'elif_clause', 'children': ['84', '92']}; {'id': '84', 'type': 'call', 'children': ['85', '90']}; {'id': '85', 'type': 'attribute', 'children': ['86', '89']}; {'id': '86', 'type': 'attribute', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'isdir'}; {'id': '90', 'type': 'argument_list', 'children': ['91']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'verify'}; {'id': '92', 'type': 'block', 'children': ['93']}; {'id': '93', 'type': 'expression_statement', 'children': ['94']}; {'id': '94', 'type': 'assignment', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'capath'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'verify'}; {'id': '97', 'type': 'return_statement', 'children': ['98']}; {'id': '98', 'type': 'call', 'children': ['99', '102']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'ssl'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': '_create_unverified_context'}; {'id': '102', 'type': 'argument_list', 'children': ['103', '106', '109', '112', '115', '118', '121']}; {'id': '103', 'type': 'keyword_argument', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'cert_reqs'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'cert_reqs'}; {'id': '106', 'type': 'keyword_argument', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'check_hostname'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'check_hostname'}; {'id': '109', 'type': 'keyword_argument', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'certfile'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'certfile'}; {'id': '112', 'type': 'keyword_argument', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'keyfile'}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'keyfile'}; {'id': '115', 'type': 'keyword_argument', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'cafile'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'cafile'}; {'id': '118', 'type': 'keyword_argument', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'capath'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'capath'}; {'id': '121', 'type': 'keyword_argument', 'children': ['122', '123']}; {'id': '122', 'type': 'identifier', 'children': [], 'value': 'cadata'}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'cadata'}
Create a SSL context object. This method should not be called by from user code
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '14', '16']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'empty_wav'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'typed_parameter', 'children': ['5', '6']}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'wav_path'}; {'id': '6', 'type': 'type', 'children': ['7']}; {'id': '7', 'type': 'generic_type', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'Union'}; {'id': '9', 'type': 'type_parameter', 'children': ['10', '12']}; {'id': '10', 'type': 'type', 'children': ['11']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'Path'}; {'id': '12', 'type': 'type', 'children': ['13']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '14', 'type': 'type', 'children': ['15']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'bool'}; {'id': '16', 'type': 'block', 'children': ['17']}; {'id': '17', 'type': 'with_statement', 'children': ['18', '33']}; {'id': '18', 'type': 'with_clause', 'children': ['19']}; {'id': '19', 'type': 'with_item', 'children': ['20']}; {'id': '20', 'type': 'as_pattern', 'children': ['21', '31']}; {'id': '21', 'type': 'call', 'children': ['22', '25']}; {'id': '22', 'type': 'attribute', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'wave'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '25', 'type': 'argument_list', 'children': ['26', '30']}; {'id': '26', 'type': 'call', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '28', 'type': 'argument_list', 'children': ['29']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'wav_path'}; {'id': '30', 'type': 'string', 'children': [], 'value': "'rb'"}; {'id': '31', 'type': 'as_pattern_target', 'children': ['32']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'wav_f'}; {'id': '33', 'type': 'block', 'children': ['34']}; {'id': '34', 'type': 'return_statement', 'children': ['35']}; {'id': '35', 'type': 'comparison_operator', 'children': ['36', '41'], 'value': '=='}; {'id': '36', 'type': 'call', 'children': ['37', '40']}; {'id': '37', 'type': 'attribute', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'wav_f'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'getnframes'}; {'id': '40', 'type': 'argument_list', 'children': []}; {'id': '41', 'type': 'integer', 'children': [], 'value': '0'}
Check if a wav contains data
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'set_general_setting'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '6', 'type': 'default_parameter', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'qsettings'}; {'id': '8', 'type': 'None', 'children': []}; {'id': '9', 'type': 'block', 'children': ['10', '20']}; {'id': '10', 'type': 'if_statement', 'children': ['11', '13']}; {'id': '11', 'type': 'not_operator', 'children': ['12']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'qsettings'}; {'id': '13', 'type': 'block', 'children': ['14']}; {'id': '14', 'type': 'expression_statement', 'children': ['15']}; {'id': '15', 'type': 'assignment', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'qsettings'}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'QSettings'}; {'id': '19', 'type': 'argument_list', 'children': []}; {'id': '20', 'type': 'expression_statement', 'children': ['21']}; {'id': '21', 'type': 'call', 'children': ['22', '25']}; {'id': '22', 'type': 'attribute', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'qsettings'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'setValue'}; {'id': '25', 'type': 'argument_list', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '27', 'type': 'call', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'deep_convert_dict'}; {'id': '29', 'type': 'argument_list', 'children': ['30']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'value'}
Set value to QSettings based on key. :param key: Unique key for setting. :type key: basestring :param value: Value to be saved. :type value: QVariant :param qsettings: A custom QSettings to use. If it's not defined, it will use the default one. :type qsettings: qgis.PyQt.QtCore.QSettings
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'range_to_numeric'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'ranges'}; {'id': '5', 'type': 'block', 'children': ['6', '24', '45', '61', '82']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '11']}; {'id': '8', 'type': 'pattern_list', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'units'}; {'id': '11', 'type': 'call', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'zip'}; {'id': '13', 'type': 'argument_list', 'children': ['14']}; {'id': '14', 'type': 'list_splat', 'children': ['15']}; {'id': '15', 'type': 'generator_expression', 'children': ['16', '21']}; {'id': '16', 'type': 'call', 'children': ['17', '20']}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'split'}; {'id': '20', 'type': 'argument_list', 'children': []}; {'id': '21', 'type': 'for_in_clause', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'ranges'}; {'id': '24', 'type': 'expression_statement', 'children': ['25']}; {'id': '25', 'type': 'assignment', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'unit'}; {'id': '27', 'type': 'call', 'children': ['28', '33']}; {'id': '28', 'type': 'attribute', 'children': ['29', '32']}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'commonprefix'}; {'id': '33', 'type': 'argument_list', 'children': ['34']}; {'id': '34', 'type': 'list_comprehension', 'children': ['35', '42']}; {'id': '35', 'type': 'subscript', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'u'}; {'id': '37', 'type': 'slice', 'children': ['38', '39', '40']}; {'id': '38', 'type': 'colon', 'children': []}; {'id': '39', 'type': 'colon', 'children': []}; {'id': '40', 'type': 'unary_operator', 'children': ['41'], 'value': '-'}; {'id': '41', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '42', 'type': 'for_in_clause', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'u'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'units'}; {'id': '45', 'type': 'expression_statement', 'children': ['46']}; {'id': '46', 'type': 'assignment', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'prefixes'}; {'id': '48', 'type': 'generator_expression', 'children': ['49', '58']}; {'id': '49', 'type': 'subscript', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'u'}; {'id': '51', 'type': 'slice', 'children': ['52', '53']}; {'id': '52', 'type': 'colon', 'children': []}; {'id': '53', 'type': 'unary_operator', 'children': ['54'], 'value': '-'}; {'id': '54', 'type': 'call', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '56', 'type': 'argument_list', 'children': ['57']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'unit'}; {'id': '58', 'type': 'for_in_clause', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'u'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'units'}; {'id': '61', 'type': 'expression_statement', 'children': ['62']}; {'id': '62', 'type': 'assignment', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '64', 'type': 'list_comprehension', 'children': ['65', '73']}; {'id': '65', 'type': 'binary_operator', 'children': ['66', '70'], 'value': '*'}; {'id': '66', 'type': 'call', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'float'}; {'id': '68', 'type': 'argument_list', 'children': ['69']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '70', 'type': 'subscript', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'SI_PREFIX'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '73', 'type': 'for_in_clause', 'children': ['74', '77']}; {'id': '74', 'type': 'pattern_list', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'v'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'p'}; {'id': '77', 'type': 'call', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'zip'}; {'id': '79', 'type': 'argument_list', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'values'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'prefixes'}; {'id': '82', 'type': 'return_statement', 'children': ['83']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'values'}
Converts a sequence of string ranges to a sequence of floats. E.g.:: >>> range_to_numeric(['1 uV', '2 mV', '1 V']) [1E-6, 0.002, 1.0]
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'photparse'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'tab'}; {'id': '5', 'type': 'block', 'children': ['6', '22', '26', '56', '60', '79']}; {'id': '6', 'type': 'if_statement', 'children': ['7', '16']}; {'id': '7', 'type': 'comparison_operator', 'children': ['8', '9'], 'value': 'not in'}; {'id': '8', 'type': 'string', 'children': [], 'value': "'source_id'"}; {'id': '9', 'type': 'call', 'children': ['10', '15']}; {'id': '10', 'type': 'attribute', 'children': ['11', '14']}; {'id': '11', 'type': 'subscript', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'tab'}; {'id': '13', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '15', 'type': 'argument_list', 'children': []}; {'id': '16', 'type': 'block', 'children': ['17']}; {'id': '17', 'type': 'raise_statement', 'children': ['18']}; {'id': '18', 'type': 'call', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'KeyError'}; {'id': '20', 'type': 'argument_list', 'children': ['21']}; {'id': '21', 'type': 'string', 'children': [], 'value': "'phot=TRUE requires the source_id columb be included'"}; {'id': '22', 'type': 'expression_statement', 'children': ['23']}; {'id': '23', 'type': 'assignment', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'uniqueid'}; {'id': '25', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '26', 'type': 'for_statement', 'children': ['27', '28', '35']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '28', 'type': 'call', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '30', 'type': 'argument_list', 'children': ['31']}; {'id': '31', 'type': 'call', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '33', 'type': 'argument_list', 'children': ['34']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'tab'}; {'id': '35', 'type': 'block', 'children': ['36', '44']}; {'id': '36', 'type': 'expression_statement', 'children': ['37']}; {'id': '37', 'type': 'assignment', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'tmpid'}; {'id': '39', 'type': 'subscript', 'children': ['40', '43']}; {'id': '40', 'type': 'subscript', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'tab'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '43', 'type': 'string', 'children': [], 'value': "'source_id'"}; {'id': '44', 'type': 'if_statement', 'children': ['45', '48']}; {'id': '45', 'type': 'comparison_operator', 'children': ['46', '47'], 'value': 'not in'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'tmpid'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'uniqueid'}; {'id': '48', 'type': 'block', 'children': ['49']}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'call', 'children': ['51', '54']}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'uniqueid'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '54', 'type': 'argument_list', 'children': ['55']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'tmpid'}; {'id': '56', 'type': 'expression_statement', 'children': ['57']}; {'id': '57', 'type': 'assignment', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'newtab'}; {'id': '59', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '60', 'type': 'for_statement', 'children': ['61', '62', '63']}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'sourceid'}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'uniqueid'}; {'id': '63', 'type': 'block', 'children': ['64', '72']}; {'id': '64', 'type': 'expression_statement', 'children': ['65']}; {'id': '65', 'type': 'assignment', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'tmpdict'}; {'id': '67', 'type': 'call', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'photaddline'}; {'id': '69', 'type': 'argument_list', 'children': ['70', '71']}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'tab'}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'sourceid'}; {'id': '72', 'type': 'expression_statement', 'children': ['73']}; {'id': '73', 'type': 'call', 'children': ['74', '77']}; {'id': '74', 'type': 'attribute', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'newtab'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '77', 'type': 'argument_list', 'children': ['78']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'tmpdict'}; {'id': '79', 'type': 'return_statement', 'children': ['80']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'newtab'}
Parse through a photometry table to group by source_id Parameters ---------- tab: list SQL query dictionary list from running query_dict.execute() Returns ------- newtab: list Dictionary list after parsing to group together sources
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '11']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_unique_scan_parameter_combinations'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '8']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'meta_data_array'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'scan_parameters'}; {'id': '7', 'type': 'None', 'children': []}; {'id': '8', 'type': 'default_parameter', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'scan_parameter_columns_only'}; {'id': '10', 'type': 'False', 'children': []}; {'id': '11', 'type': 'block', 'children': ['12', '43', '58']}; {'id': '12', 'type': 'try_statement', 'children': ['13', '27']}; {'id': '13', 'type': 'block', 'children': ['14']}; {'id': '14', 'type': 'expression_statement', 'children': ['15']}; {'id': '15', 'type': 'assignment', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'last_not_parameter_column'}; {'id': '17', 'type': 'call', 'children': ['18', '25']}; {'id': '18', 'type': 'attribute', 'children': ['19', '24']}; {'id': '19', 'type': 'attribute', 'children': ['20', '23']}; {'id': '20', 'type': 'attribute', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'meta_data_array'}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'dtype'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '25', 'type': 'argument_list', 'children': ['26']}; {'id': '26', 'type': 'string', 'children': [], 'value': "'error_code'"}; {'id': '27', 'type': 'except_clause', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'ValueError'}; {'id': '29', 'type': 'block', 'children': ['30']}; {'id': '30', 'type': 'expression_statement', 'children': ['31']}; {'id': '31', 'type': 'assignment', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'last_not_parameter_column'}; {'id': '33', 'type': 'call', 'children': ['34', '41']}; {'id': '34', 'type': 'attribute', 'children': ['35', '40']}; {'id': '35', 'type': 'attribute', 'children': ['36', '39']}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'meta_data_array'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'dtype'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '41', 'type': 'argument_list', 'children': ['42']}; {'id': '42', 'type': 'string', 'children': [], 'value': "'error'"}; {'id': '43', 'type': 'if_statement', 'children': ['44', '56']}; {'id': '44', 'type': 'comparison_operator', 'children': ['45', '46'], 'value': '=='}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'last_not_parameter_column'}; {'id': '46', 'type': 'binary_operator', 'children': ['47', '55'], 'value': '-'}; {'id': '47', 'type': 'call', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '49', 'type': 'argument_list', 'children': ['50']}; {'id': '50', 'type': 'attribute', 'children': ['51', '54']}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'meta_data_array'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'dtype'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '55', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '56', 'type': 'block', 'children': ['57']}; {'id': '57', 'type': 'return_statement', 'children': []}; {'id': '58', 'type': 'if_statement', 'children': ['59', '62', '85']}; {'id': '59', 'type': 'comparison_operator', 'children': ['60', '61'], 'value': 'is'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'scan_parameters'}; {'id': '61', 'type': 'None', 'children': []}; {'id': '62', 'type': 'block', 'children': ['63']}; {'id': '63', 'type': 'return_statement', 'children': ['64']}; {'id': '64', 'type': 'call', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'unique_row'}; {'id': '66', 'type': 'argument_list', 'children': ['67', '68', '82']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'meta_data_array'}; {'id': '68', 'type': 'keyword_argument', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'use_columns'}; {'id': '70', 'type': 'call', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '72', 'type': 'argument_list', 'children': ['73', '74']}; {'id': '73', 'type': 'integer', 'children': [], 'value': '4'}; {'id': '74', 'type': 'call', 'children': ['75', '76']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '76', 'type': 'argument_list', 'children': ['77']}; {'id': '77', 'type': 'attribute', 'children': ['78', '81']}; {'id': '78', 'type': 'attribute', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'meta_data_array'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'dtype'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '82', 'type': 'keyword_argument', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'selected_columns_only'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'scan_parameter_columns_only'}; {'id': '85', 'type': 'else_clause', 'children': ['86']}; {'id': '86', 'type': 'block', 'children': ['87', '91', '132']}; {'id': '87', 'type': 'expression_statement', 'children': ['88']}; {'id': '88', 'type': 'assignment', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'use_columns'}; {'id': '90', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '91', 'type': 'for_statement', 'children': ['92', '93', '94']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'scan_parameter'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'scan_parameters'}; {'id': '94', 'type': 'block', 'children': ['95']}; {'id': '95', 'type': 'try_statement', 'children': ['96', '113']}; {'id': '96', 'type': 'block', 'children': ['97']}; {'id': '97', 'type': 'expression_statement', 'children': ['98']}; {'id': '98', 'type': 'call', 'children': ['99', '102']}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'use_columns'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '102', 'type': 'argument_list', 'children': ['103']}; {'id': '103', 'type': 'call', 'children': ['104', '111']}; {'id': '104', 'type': 'attribute', 'children': ['105', '110']}; {'id': '105', 'type': 'attribute', 'children': ['106', '109']}; {'id': '106', 'type': 'attribute', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'meta_data_array'}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'dtype'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'names'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '111', 'type': 'argument_list', 'children': ['112']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'scan_parameter'}; {'id': '113', 'type': 'except_clause', 'children': ['114', '115']}; {'id': '114', 'type': 'identifier', 'children': [], 'value': 'ValueError'}; {'id': '115', 'type': 'block', 'children': ['116', '127']}; {'id': '116', 'type': 'expression_statement', 'children': ['117']}; {'id': '117', 'type': 'call', 'children': ['118', '121']}; {'id': '118', 'type': 'attribute', 'children': ['119', '120']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '121', 'type': 'argument_list', 'children': ['122']}; {'id': '122', 'type': 'binary_operator', 'children': ['123', '126'], 'value': '+'}; {'id': '123', 'type': 'binary_operator', 'children': ['124', '125'], 'value': '+'}; {'id': '124', 'type': 'string', 'children': [], 'value': "'No scan parameter '"}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'scan_parameter'}; {'id': '126', 'type': 'string', 'children': [], 'value': "' found'"}; {'id': '127', 'type': 'raise_statement', 'children': ['128']}; {'id': '128', 'type': 'call', 'children': ['129', '130']}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'RuntimeError'}; {'id': '130', 'type': 'argument_list', 'children': ['131']}; {'id': '131', 'type': 'string', 'children': [], 'value': "'Scan parameter not found'"}; {'id': '132', 'type': 'return_statement', 'children': ['133']}; {'id': '133', 'type': 'call', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'unique_row'}; {'id': '135', 'type': 'argument_list', 'children': ['136', '137', '140']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'meta_data_array'}; {'id': '137', 'type': 'keyword_argument', 'children': ['138', '139']}; {'id': '138', 'type': 'identifier', 'children': [], 'value': 'use_columns'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'use_columns'}; {'id': '140', 'type': 'keyword_argument', 'children': ['141', '142']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'selected_columns_only'}; {'id': '142', 'type': 'identifier', 'children': [], 'value': 'scan_parameter_columns_only'}
Takes the numpy meta data array and returns the first rows with unique combinations of different scan parameter values for selected scan parameters. If selected columns only is true, the returned histogram only contains the selected columns. Parameters ---------- meta_data_array : numpy.ndarray scan_parameters : list of string, None Scan parameter names taken. If None all are used. selected_columns_only : bool Returns ------- numpy.Histogram
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'command'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'command'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'with_statement', 'children': ['7', '15']}; {'id': '7', 'type': 'with_clause', 'children': ['8']}; {'id': '8', 'type': 'with_item', 'children': ['9']}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'cd'}; {'id': '11', 'type': 'argument_list', 'children': ['12']}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'env'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'remote_path'}; {'id': '15', 'type': 'block', 'children': ['16']}; {'id': '16', 'type': 'expression_statement', 'children': ['17']}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'sudo'}; {'id': '19', 'type': 'argument_list', 'children': ['20', '27']}; {'id': '20', 'type': 'binary_operator', 'children': ['21', '24'], 'value': '+'}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'env'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'python'}; {'id': '24', 'type': 'binary_operator', 'children': ['25', '26'], 'value': '%'}; {'id': '25', 'type': 'string', 'children': [], 'value': "' manage.py %s'"}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'command'}; {'id': '27', 'type': 'keyword_argument', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'user'}; {'id': '29', 'type': 'attribute', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'env'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'remote_user'}
Run custom Django management command
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'are_budget_data_package_fields_filled_in'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'resource'}; {'id': '6', 'type': 'block', 'children': ['7', '15']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'fields'}; {'id': '10', 'type': 'list', 'children': ['11', '12', '13', '14'], 'value': "['country', 'currency', 'year', 'status']"}; {'id': '11', 'type': 'string', 'children': [], 'value': "'country'"}; {'id': '12', 'type': 'string', 'children': [], 'value': "'currency'"}; {'id': '13', 'type': 'string', 'children': [], 'value': "'year'"}; {'id': '14', 'type': 'string', 'children': [], 'value': "'status'"}; {'id': '15', 'type': 'return_statement', 'children': ['16']}; {'id': '16', 'type': 'call', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'all'}; {'id': '18', 'type': 'argument_list', 'children': ['19']}; {'id': '19', 'type': 'list_comprehension', 'children': ['20', '27']}; {'id': '20', 'type': 'call', 'children': ['21', '24']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'in_resource'}; {'id': '24', 'type': 'argument_list', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'resource'}; {'id': '27', 'type': 'for_in_clause', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'fields'}
Check if the budget data package fields are all filled in because if not then this can't be a budget data package
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'load_data'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'filename'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'ext'}; {'id': '7', 'type': 'block', 'children': ['8', '15', '22', '30', '38', '47', '52', '96', '116']}; {'id': '8', 'type': 'import_from_statement', 'children': ['9', '13']}; {'id': '9', 'type': 'dotted_name', 'children': ['10', '11', '12']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'spyder_kernels'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'utils'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'iofuncs'}; {'id': '13', 'type': 'dotted_name', 'children': ['14']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'iofunctions'}; {'id': '15', 'type': 'import_from_statement', 'children': ['16', '20']}; {'id': '16', 'type': 'dotted_name', 'children': ['17', '18', '19']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'spyder_kernels'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'utils'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'misc'}; {'id': '20', 'type': 'dotted_name', 'children': ['21']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'fix_reference_name'}; {'id': '22', 'type': 'expression_statement', 'children': ['23']}; {'id': '23', 'type': 'assignment', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'glbs'}; {'id': '25', 'type': 'call', 'children': ['26', '29']}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': '_mglobals'}; {'id': '29', 'type': 'argument_list', 'children': []}; {'id': '30', 'type': 'expression_statement', 'children': ['31']}; {'id': '31', 'type': 'assignment', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'load_func'}; {'id': '33', 'type': 'subscript', 'children': ['34', '37']}; {'id': '34', 'type': 'attribute', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'iofunctions'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'load_funcs'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'ext'}; {'id': '38', 'type': 'expression_statement', 'children': ['39']}; {'id': '39', 'type': 'assignment', 'children': ['40', '43']}; {'id': '40', 'type': 'pattern_list', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'error_message'}; {'id': '43', 'type': 'call', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'load_func'}; {'id': '45', 'type': 'argument_list', 'children': ['46']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'filename'}; {'id': '47', 'type': 'if_statement', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'error_message'}; {'id': '49', 'type': 'block', 'children': ['50']}; {'id': '50', 'type': 'return_statement', 'children': ['51']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'error_message'}; {'id': '52', 'type': 'for_statement', 'children': ['53', '54', '62']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '54', 'type': 'call', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '56', 'type': 'argument_list', 'children': ['57']}; {'id': '57', 'type': 'call', 'children': ['58', '61']}; {'id': '58', 'type': 'attribute', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '61', 'type': 'argument_list', 'children': []}; {'id': '62', 'type': 'block', 'children': ['63', '80']}; {'id': '63', 'type': 'expression_statement', 'children': ['64']}; {'id': '64', 'type': 'assignment', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'new_key'}; {'id': '66', 'type': 'call', 'children': ['67', '68']}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'fix_reference_name'}; {'id': '68', 'type': 'argument_list', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '70', 'type': 'keyword_argument', 'children': ['71', '72']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'blacklist'}; {'id': '72', 'type': 'call', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '74', 'type': 'argument_list', 'children': ['75']}; {'id': '75', 'type': 'call', 'children': ['76', '79']}; {'id': '76', 'type': 'attribute', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'glbs'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '79', 'type': 'argument_list', 'children': []}; {'id': '80', 'type': 'if_statement', 'children': ['81', '84']}; {'id': '81', 'type': 'comparison_operator', 'children': ['82', '83'], 'value': '!='}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'new_key'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '84', 'type': 'block', 'children': ['85']}; {'id': '85', 'type': 'expression_statement', 'children': ['86']}; {'id': '86', 'type': 'assignment', 'children': ['87', '90']}; {'id': '87', 'type': 'subscript', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'new_key'}; {'id': '90', 'type': 'call', 'children': ['91', '94']}; {'id': '91', 'type': 'attribute', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'pop'}; {'id': '94', 'type': 'argument_list', 'children': ['95']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'key'}; {'id': '96', 'type': 'try_statement', 'children': ['97', '105']}; {'id': '97', 'type': 'block', 'children': ['98']}; {'id': '98', 'type': 'expression_statement', 'children': ['99']}; {'id': '99', 'type': 'call', 'children': ['100', '103']}; {'id': '100', 'type': 'attribute', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'glbs'}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '103', 'type': 'argument_list', 'children': ['104']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '105', 'type': 'except_clause', 'children': ['106', '110']}; {'id': '106', 'type': 'as_pattern', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'Exception'}; {'id': '108', 'type': 'as_pattern_target', 'children': ['109']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '110', 'type': 'block', 'children': ['111']}; {'id': '111', 'type': 'return_statement', 'children': ['112']}; {'id': '112', 'type': 'call', 'children': ['113', '114']}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '114', 'type': 'argument_list', 'children': ['115']}; {'id': '115', 'type': 'identifier', 'children': [], 'value': 'error'}; {'id': '116', 'type': 'return_statement', 'children': ['117']}; {'id': '117', 'type': 'None', 'children': []}
Load data from filename
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'src_paths'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'return_statement', 'children': ['7']}; {'id': '7', 'type': 'set_comprehension', 'children': ['8', '9', '22']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'src'}; {'id': '9', 'type': 'for_in_clause', 'children': ['10', '13']}; {'id': '10', 'type': 'pattern_list', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'src'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'summary'}; {'id': '13', 'type': 'call', 'children': ['14', '21']}; {'id': '14', 'type': 'attribute', 'children': ['15', '20']}; {'id': '15', 'type': 'call', 'children': ['16', '19']}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': '_diff_violations'}; {'id': '19', 'type': 'argument_list', 'children': []}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '21', 'type': 'argument_list', 'children': []}; {'id': '22', 'type': 'if_clause', 'children': ['23']}; {'id': '23', 'type': 'comparison_operator', 'children': ['24', '30'], 'value': '>'}; {'id': '24', 'type': 'call', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '26', 'type': 'argument_list', 'children': ['27']}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'summary'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'measured_lines'}; {'id': '30', 'type': 'integer', 'children': [], 'value': '0'}
Return a list of source files in the diff for which we have coverage information.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'explain'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'expr'}; {'id': '6', 'type': 'default_parameter', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '8', 'type': 'None', 'children': []}; {'id': '9', 'type': 'block', 'children': ['10', '75', '84', '109']}; {'id': '10', 'type': 'if_statement', 'children': ['11', '18', '69']}; {'id': '11', 'type': 'call', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'isinstance'}; {'id': '13', 'type': 'argument_list', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'expr'}; {'id': '15', 'type': 'attribute', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'ir'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'Expr'}; {'id': '18', 'type': 'block', 'children': ['19', '32', '42', '57']}; {'id': '19', 'type': 'expression_statement', 'children': ['20']}; {'id': '20', 'type': 'assignment', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '22', 'type': 'call', 'children': ['23', '28']}; {'id': '23', 'type': 'attribute', 'children': ['24', '27']}; {'id': '24', 'type': 'attribute', 'children': ['25', '26']}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'dialect'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'make_context'}; {'id': '28', 'type': 'argument_list', 'children': ['29']}; {'id': '29', 'type': 'keyword_argument', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'params'}; {'id': '32', 'type': 'expression_statement', 'children': ['33']}; {'id': '33', 'type': 'assignment', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'query_ast'}; {'id': '35', 'type': 'call', 'children': ['36', '39']}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': '_build_ast'}; {'id': '39', 'type': 'argument_list', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'expr'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'context'}; {'id': '42', 'type': 'if_statement', 'children': ['43', '51']}; {'id': '43', 'type': 'comparison_operator', 'children': ['44', '50'], 'value': '>'}; {'id': '44', 'type': 'call', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '46', 'type': 'argument_list', 'children': ['47']}; {'id': '47', 'type': 'attribute', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'query_ast'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'queries'}; {'id': '50', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '51', 'type': 'block', 'children': ['52']}; {'id': '52', 'type': 'raise_statement', 'children': ['53']}; {'id': '53', 'type': 'call', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'Exception'}; {'id': '55', 'type': 'argument_list', 'children': ['56']}; {'id': '56', 'type': 'string', 'children': [], 'value': "'Multi-query expression'"}; {'id': '57', 'type': 'expression_statement', 'children': ['58']}; {'id': '58', 'type': 'assignment', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '60', 'type': 'call', 'children': ['61', '68']}; {'id': '61', 'type': 'attribute', 'children': ['62', '67']}; {'id': '62', 'type': 'subscript', 'children': ['63', '66']}; {'id': '63', 'type': 'attribute', 'children': ['64', '65']}; {'id': '64', 'type': 'identifier', 'children': [], 'value': 'query_ast'}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'queries'}; {'id': '66', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'compile'}; {'id': '68', 'type': 'argument_list', 'children': []}; {'id': '69', 'type': 'else_clause', 'children': ['70']}; {'id': '70', 'type': 'block', 'children': ['71']}; {'id': '71', 'type': 'expression_statement', 'children': ['72']}; {'id': '72', 'type': 'assignment', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'expr'}; {'id': '75', 'type': 'expression_statement', 'children': ['76']}; {'id': '76', 'type': 'assignment', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'statement'}; {'id': '78', 'type': 'call', 'children': ['79', '82']}; {'id': '79', 'type': 'attribute', 'children': ['80', '81']}; {'id': '80', 'type': 'string', 'children': [], 'value': "'EXPLAIN {0}'"}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '82', 'type': 'argument_list', 'children': ['83']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '84', 'type': 'with_statement', 'children': ['85', '99']}; {'id': '85', 'type': 'with_clause', 'children': ['86']}; {'id': '86', 'type': 'with_item', 'children': ['87']}; {'id': '87', 'type': 'as_pattern', 'children': ['88', '97']}; {'id': '88', 'type': 'call', 'children': ['89', '92']}; {'id': '89', 'type': 'attribute', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': '_execute'}; {'id': '92', 'type': 'argument_list', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'statement'}; {'id': '94', 'type': 'keyword_argument', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'results'}; {'id': '96', 'type': 'True', 'children': []}; {'id': '97', 'type': 'as_pattern_target', 'children': ['98']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'cur'}; {'id': '99', 'type': 'block', 'children': ['100']}; {'id': '100', 'type': 'expression_statement', 'children': ['101']}; {'id': '101', 'type': 'assignment', 'children': ['102', '103']}; {'id': '102', 'type': 'identifier', 'children': [], 'value': 'result'}; {'id': '103', 'type': 'call', 'children': ['104', '107']}; {'id': '104', 'type': 'attribute', 'children': ['105', '106']}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '106', 'type': 'identifier', 'children': [], 'value': '_get_list'}; {'id': '107', 'type': 'argument_list', 'children': ['108']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'cur'}; {'id': '109', 'type': 'return_statement', 'children': ['110']}; {'id': '110', 'type': 'call', 'children': ['111', '114']}; {'id': '111', 'type': 'attribute', 'children': ['112', '113']}; {'id': '112', 'type': 'string', 'children': [], 'value': "'Query:\\n{0}\\n\\n{1}'"}; {'id': '113', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '114', 'type': 'argument_list', 'children': ['115', '122']}; {'id': '115', 'type': 'call', 'children': ['116', '119']}; {'id': '116', 'type': 'attribute', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'util'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'indent'}; {'id': '119', 'type': 'argument_list', 'children': ['120', '121']}; {'id': '120', 'type': 'identifier', 'children': [], 'value': 'query'}; {'id': '121', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '122', 'type': 'call', 'children': ['123', '126']}; {'id': '123', 'type': 'attribute', 'children': ['124', '125']}; {'id': '124', 'type': 'string', 'children': [], 'value': "'\\n'"}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'join'}; {'id': '126', 'type': 'argument_list', 'children': ['127']}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'result'}
Query for and return the query plan associated with the indicated expression or SQL query. Returns ------- plan : string
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '17']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'DEFINE_boolean'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7', '12', '15']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'default'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '7', 'type': 'default_parameter', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'flag_values'}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': '_flagvalues'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'FLAGS'}; {'id': '12', 'type': 'default_parameter', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'module_name'}; {'id': '14', 'type': 'None', 'children': []}; {'id': '15', 'type': 'dictionary_splat_pattern', 'children': ['16']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '17', 'type': 'block', 'children': ['18']}; {'id': '18', 'type': 'expression_statement', 'children': ['19']}; {'id': '19', 'type': 'call', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'DEFINE_flag'}; {'id': '21', 'type': 'argument_list', 'children': ['22', '32', '33']}; {'id': '22', 'type': 'call', 'children': ['23', '26']}; {'id': '23', 'type': 'attribute', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': '_flag'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'BooleanFlag'}; {'id': '26', 'type': 'argument_list', 'children': ['27', '28', '29', '30']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'default'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'help'}; {'id': '30', 'type': 'dictionary_splat', 'children': ['31']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'flag_values'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'module_name'}
Registers a boolean flag. Such a boolean flag does not take an argument. If a user wants to specify a false value explicitly, the long option beginning with 'no' must be used: i.e. --noflag This flag will have a value of None, True or False. None is possible if default=None and the user does not specify the flag on the command line. Args: name: str, the flag name. default: bool|str|None, the default value of the flag. help: str, the help message. flag_values: FlagValues, the FlagValues instance with which the flag will be registered. This should almost never need to be overridden. module_name: str, the name of the Python module declaring this flag. If not provided, it will be computed using the stack trace of this call. **args: dict, the extra keyword args that are passed to Flag __init__.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'upload_file'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'abspath'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'cloud_filename'}; {'id': '7', 'type': 'block', 'children': ['8', '114', '120']}; {'id': '8', 'type': 'if_statement', 'children': ['9', '13']}; {'id': '9', 'type': 'not_operator', 'children': ['10']}; {'id': '10', 'type': 'attribute', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'test_run'}; {'id': '13', 'type': 'block', 'children': ['14', '22', '30', '38', '74']}; {'id': '14', 'type': 'expression_statement', 'children': ['15']}; {'id': '15', 'type': 'assignment', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'content'}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '19', 'type': 'argument_list', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'abspath'}; {'id': '21', 'type': 'string', 'children': [], 'value': '"rb"'}; {'id': '22', 'type': 'expression_statement', 'children': ['23']}; {'id': '23', 'type': 'assignment', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'content_type'}; {'id': '25', 'type': 'call', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'get_content_type'}; {'id': '27', 'type': 'argument_list', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'cloud_filename'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'content'}; {'id': '30', 'type': 'expression_statement', 'children': ['31']}; {'id': '31', 'type': 'assignment', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'headers'}; {'id': '33', 'type': 'call', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'get_headers'}; {'id': '35', 'type': 'argument_list', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'cloud_filename'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'content_type'}; {'id': '38', 'type': 'if_statement', 'children': ['39', '47', '61']}; {'id': '39', 'type': 'comparison_operator', 'children': ['40', '46'], 'value': '=='}; {'id': '40', 'type': 'call', 'children': ['41', '44']}; {'id': '41', 'type': 'attribute', 'children': ['42', '43']}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'headers'}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '44', 'type': 'argument_list', 'children': ['45']}; {'id': '45', 'type': 'string', 'children': [], 'value': '"Content-Encoding"'}; {'id': '46', 'type': 'string', 'children': [], 'value': '"gzip"'}; {'id': '47', 'type': 'block', 'children': ['48', '55']}; {'id': '48', 'type': 'expression_statement', 'children': ['49']}; {'id': '49', 'type': 'assignment', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'content'}; {'id': '51', 'type': 'call', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'get_gzipped_contents'}; {'id': '53', 'type': 'argument_list', 'children': ['54']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'content'}; {'id': '55', 'type': 'expression_statement', 'children': ['56']}; {'id': '56', 'type': 'assignment', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '58', 'type': 'attribute', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'content'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '61', 'type': 'else_clause', 'children': ['62']}; {'id': '62', 'type': 'block', 'children': ['63']}; {'id': '63', 'type': 'expression_statement', 'children': ['64']}; {'id': '64', 'type': 'assignment', 'children': ['65', '66']}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '66', 'type': 'attribute', 'children': ['67', '73']}; {'id': '67', 'type': 'call', 'children': ['68', '71']}; {'id': '68', 'type': 'attribute', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'stat'}; {'id': '71', 'type': 'argument_list', 'children': ['72']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'abspath'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'st_size'}; {'id': '74', 'type': 'expression_statement', 'children': ['75']}; {'id': '75', 'type': 'call', 'children': ['76', '81']}; {'id': '76', 'type': 'attribute', 'children': ['77', '80']}; {'id': '77', 'type': 'attribute', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'container'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'create'}; {'id': '81', 'type': 'argument_list', 'children': ['82', '85', '88', '91', '94', '103', '106', '111']}; {'id': '82', 'type': 'keyword_argument', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'obj_name'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'cloud_filename'}; {'id': '85', 'type': 'keyword_argument', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'content'}; {'id': '88', 'type': 'keyword_argument', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'content_type'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'content_type'}; {'id': '91', 'type': 'keyword_argument', 'children': ['92', '93']}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'content_length'}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '94', 'type': 'keyword_argument', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'content_encoding'}; {'id': '96', 'type': 'call', 'children': ['97', '100']}; {'id': '97', 'type': 'attribute', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'headers'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '100', 'type': 'argument_list', 'children': ['101', '102']}; {'id': '101', 'type': 'string', 'children': [], 'value': '"Content-Encoding"'}; {'id': '102', 'type': 'None', 'children': []}; {'id': '103', 'type': 'keyword_argument', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'headers'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'headers'}; {'id': '106', 'type': 'keyword_argument', 'children': ['107', '108']}; {'id': '107', 'type': 'identifier', 'children': [], 'value': 'ttl'}; {'id': '108', 'type': 'subscript', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'CUMULUS'}; {'id': '110', 'type': 'string', 'children': [], 'value': '"FILE_TTL"'}; {'id': '111', 'type': 'keyword_argument', 'children': ['112', '113']}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'etag'}; {'id': '113', 'type': 'None', 'children': []}; {'id': '114', 'type': 'expression_statement', 'children': ['115']}; {'id': '115', 'type': 'augmented_assignment', 'children': ['116', '119'], 'value': '+='}; {'id': '116', 'type': 'attribute', 'children': ['117', '118']}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '118', 'type': 'identifier', 'children': [], 'value': 'upload_count'}; {'id': '119', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '120', 'type': 'if_statement', 'children': ['121', '131']}; {'id': '121', 'type': 'boolean_operator', 'children': ['122', '126'], 'value': 'or'}; {'id': '122', 'type': 'not_operator', 'children': ['123']}; {'id': '123', 'type': 'attribute', 'children': ['124', '125']}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '125', 'type': 'identifier', 'children': [], 'value': 'quiet'}; {'id': '126', 'type': 'comparison_operator', 'children': ['127', '130'], 'value': '>'}; {'id': '127', 'type': 'attribute', 'children': ['128', '129']}; {'id': '128', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '129', 'type': 'identifier', 'children': [], 'value': 'verbosity'}; {'id': '130', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '131', 'type': 'block', 'children': ['132']}; {'id': '132', 'type': 'expression_statement', 'children': ['133']}; {'id': '133', 'type': 'call', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '135', 'type': 'argument_list', 'children': ['136']}; {'id': '136', 'type': 'call', 'children': ['137', '140']}; {'id': '137', 'type': 'attribute', 'children': ['138', '139']}; {'id': '138', 'type': 'string', 'children': [], 'value': '"Uploaded: {0}"'}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '140', 'type': 'argument_list', 'children': ['141']}; {'id': '141', 'type': 'identifier', 'children': [], 'value': 'cloud_filename'}
Uploads a file to the container.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'GetIndex'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '15', '46', '64', '81']}; {'id': '6', 'type': 'if_statement', 'children': ['7', '12']}; {'id': '7', 'type': 'comparison_operator', 'children': ['8', '11'], 'value': 'is'}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '11', 'type': 'None', 'children': []}; {'id': '12', 'type': 'block', 'children': ['13']}; {'id': '13', 'type': 'return_statement', 'children': ['14']}; {'id': '14', 'type': 'None', 'children': []}; {'id': '15', 'type': 'if_statement', 'children': ['16', '19']}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '19', 'type': 'block', 'children': ['20', '36']}; {'id': '20', 'type': 'expression_statement', 'children': ['21']}; {'id': '21', 'type': 'assignment', 'children': ['22', '25']}; {'id': '22', 'type': 'pattern_list', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'ui'}; {'id': '25', 'type': 'call', 'children': ['26', '29']}; {'id': '26', 'type': 'attribute', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'chmlib'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'chm_resolve_object'}; {'id': '29', 'type': 'argument_list', 'children': ['30', '33']}; {'id': '30', 'type': 'attribute', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'index'}; {'id': '36', 'type': 'if_statement', 'children': ['37', '43']}; {'id': '37', 'type': '()', 'children': ['38']}; {'id': '38', 'type': 'comparison_operator', 'children': ['39', '40'], 'value': '!='}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'res'}; {'id': '40', 'type': 'attribute', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'chmlib'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'CHM_RESOLVE_SUCCESS'}; {'id': '43', 'type': 'block', 'children': ['44']}; {'id': '44', 'type': 'return_statement', 'children': ['45']}; {'id': '45', 'type': 'None', 'children': []}; {'id': '46', 'type': 'expression_statement', 'children': ['47']}; {'id': '47', 'type': 'assignment', 'children': ['48', '51']}; {'id': '48', 'type': 'pattern_list', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '51', 'type': 'call', 'children': ['52', '55']}; {'id': '52', 'type': 'attribute', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'chmlib'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'chm_retrieve_object'}; {'id': '55', 'type': 'argument_list', 'children': ['56', '59', '60', '61']}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'file'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'ui'}; {'id': '60', 'type': 'integer', 'children': [], 'value': '0l'}; {'id': '61', 'type': 'attribute', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'ui'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'length'}; {'id': '64', 'type': 'if_statement', 'children': ['65', '69']}; {'id': '65', 'type': '()', 'children': ['66']}; {'id': '66', 'type': 'comparison_operator', 'children': ['67', '68'], 'value': '=='}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '68', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '69', 'type': 'block', 'children': ['70', '79']}; {'id': '70', 'type': 'expression_statement', 'children': ['71']}; {'id': '71', 'type': 'call', 'children': ['72', '77']}; {'id': '72', 'type': 'attribute', 'children': ['73', '76']}; {'id': '73', 'type': 'attribute', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'sys'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'stderr'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'write'}; {'id': '77', 'type': 'argument_list', 'children': ['78']}; {'id': '78', 'type': 'string', 'children': [], 'value': "'GetIndex: file size = 0\\n'"}; {'id': '79', 'type': 'return_statement', 'children': ['80']}; {'id': '80', 'type': 'None', 'children': []}; {'id': '81', 'type': 'return_statement', 'children': ['82']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'text'}
Reads and returns the index tree. This auxiliary function reads and returns the index tree file contents for the CHM archive.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'info'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '5', 'type': 'block', 'children': ['6', '14', '20', '40', '55', '69', '87']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'controller'}; {'id': '9', 'type': 'subscript', 'children': ['10', '13']}; {'id': '10', 'type': 'attribute', 'children': ['11', '12']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '13', 'type': 'string', 'children': [], 'value': "'controller'"}; {'id': '14', 'type': 'expression_statement', 'children': ['15']}; {'id': '15', 'type': 'assignment', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '17', 'type': 'attribute', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'controller'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '20', 'type': 'expression_statement', 'children': ['21']}; {'id': '21', 'type': 'call', 'children': ['22', '25']}; {'id': '22', 'type': 'attribute', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'click'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '25', 'type': 'argument_list', 'children': ['26']}; {'id': '26', 'type': 'call', 'children': ['27', '30']}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'string', 'children': [], 'value': "'OATH version: {}.{}.{}'"}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '30', 'type': 'argument_list', 'children': ['31', '34', '37']}; {'id': '31', 'type': 'subscript', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '33', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '34', 'type': 'subscript', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '36', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '37', 'type': 'subscript', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'version'}; {'id': '39', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '40', 'type': 'expression_statement', 'children': ['41']}; {'id': '41', 'type': 'call', 'children': ['42', '45']}; {'id': '42', 'type': 'attribute', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'click'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '45', 'type': 'argument_list', 'children': ['46']}; {'id': '46', 'type': 'binary_operator', 'children': ['47', '48'], 'value': '+'}; {'id': '47', 'type': 'string', 'children': [], 'value': "'Password protection '"}; {'id': '48', 'type': '()', 'children': ['49']}; {'id': '49', 'type': 'conditional_expression', 'children': ['50', '51', '54'], 'value': 'if'}; {'id': '50', 'type': 'string', 'children': [], 'value': "'enabled'"}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'controller'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'locked'}; {'id': '54', 'type': 'string', 'children': [], 'value': "'disabled'"}; {'id': '55', 'type': 'expression_statement', 'children': ['56']}; {'id': '56', 'type': 'assignment', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '58', 'type': 'call', 'children': ['59', '66']}; {'id': '59', 'type': 'attribute', 'children': ['60', '65']}; {'id': '60', 'type': 'subscript', 'children': ['61', '64']}; {'id': '61', 'type': 'attribute', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '64', 'type': 'string', 'children': [], 'value': "'settings'"}; {'id': '65', 'type': 'identifier', 'children': [], 'value': 'get'}; {'id': '66', 'type': 'argument_list', 'children': ['67', '68']}; {'id': '67', 'type': 'string', 'children': [], 'value': "'keys'"}; {'id': '68', 'type': 'dictionary', 'children': []}; {'id': '69', 'type': 'if_statement', 'children': ['70', '79']}; {'id': '70', 'type': 'boolean_operator', 'children': ['71', '74'], 'value': 'and'}; {'id': '71', 'type': 'attribute', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'controller'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'locked'}; {'id': '74', 'type': 'comparison_operator', 'children': ['75', '78'], 'value': 'in'}; {'id': '75', 'type': 'attribute', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'controller'}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'id'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '79', 'type': 'block', 'children': ['80']}; {'id': '80', 'type': 'expression_statement', 'children': ['81']}; {'id': '81', 'type': 'call', 'children': ['82', '85']}; {'id': '82', 'type': 'attribute', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'click'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '85', 'type': 'argument_list', 'children': ['86']}; {'id': '86', 'type': 'string', 'children': [], 'value': "'The password for this YubiKey is remembered by ykman.'"}; {'id': '87', 'type': 'if_statement', 'children': ['88', '95']}; {'id': '88', 'type': 'attribute', 'children': ['89', '94']}; {'id': '89', 'type': 'subscript', 'children': ['90', '93']}; {'id': '90', 'type': 'attribute', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'ctx'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'obj'}; {'id': '93', 'type': 'string', 'children': [], 'value': "'dev'"}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'is_fips'}; {'id': '95', 'type': 'block', 'children': ['96']}; {'id': '96', 'type': 'expression_statement', 'children': ['97']}; {'id': '97', 'type': 'call', 'children': ['98', '101']}; {'id': '98', 'type': 'attribute', 'children': ['99', '100']}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'click'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'echo'}; {'id': '101', 'type': 'argument_list', 'children': ['102']}; {'id': '102', 'type': 'call', 'children': ['103', '106']}; {'id': '103', 'type': 'attribute', 'children': ['104', '105']}; {'id': '104', 'type': 'string', 'children': [], 'value': "'FIPS Approved Mode: {}'"}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '106', 'type': 'argument_list', 'children': ['107']}; {'id': '107', 'type': 'conditional_expression', 'children': ['108', '109', '112'], 'value': 'if'}; {'id': '108', 'type': 'string', 'children': [], 'value': "'Yes'"}; {'id': '109', 'type': 'attribute', 'children': ['110', '111']}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'controller'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'is_in_fips_mode'}; {'id': '112', 'type': 'string', 'children': [], 'value': "'No'"}
Display status of OATH application.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'export_for_training'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'file_path'}; {'id': '7', 'type': 'string', 'children': [], 'value': "'./export.json'"}; {'id': '8', 'type': 'block', 'children': ['9', '12', '23']}; {'id': '9', 'type': 'import_statement', 'children': ['10']}; {'id': '10', 'type': 'dotted_name', 'children': ['11']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'json'}; {'id': '12', 'type': 'expression_statement', 'children': ['13']}; {'id': '13', 'type': 'assignment', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'export'}; {'id': '15', 'type': 'dictionary', 'children': ['16']}; {'id': '16', 'type': 'pair', 'children': ['17', '18']}; {'id': '17', 'type': 'string', 'children': [], 'value': "'conversations'"}; {'id': '18', 'type': 'call', 'children': ['19', '22']}; {'id': '19', 'type': 'attribute', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': '_generate_export_data'}; {'id': '22', 'type': 'argument_list', 'children': []}; {'id': '23', 'type': 'with_statement', 'children': ['24', '34']}; {'id': '24', 'type': 'with_clause', 'children': ['25']}; {'id': '25', 'type': 'with_item', 'children': ['26']}; {'id': '26', 'type': 'as_pattern', 'children': ['27', '32']}; {'id': '27', 'type': 'call', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '29', 'type': 'argument_list', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'file_path'}; {'id': '31', 'type': 'string', 'children': [], 'value': "'w+'"}; {'id': '32', 'type': 'as_pattern_target', 'children': ['33']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'jsonfile'}; {'id': '34', 'type': 'block', 'children': ['35']}; {'id': '35', 'type': 'expression_statement', 'children': ['36']}; {'id': '36', 'type': 'call', 'children': ['37', '40']}; {'id': '37', 'type': 'attribute', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'json'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'dump'}; {'id': '40', 'type': 'argument_list', 'children': ['41', '42', '43']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'export'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'jsonfile'}; {'id': '43', 'type': 'keyword_argument', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'ensure_ascii'}; {'id': '45', 'type': 'False', 'children': []}
Create a file from the database that can be used to train other chat bots.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'subtract'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'range2'}; {'id': '6', 'type': 'block', 'children': ['7', '11', '33', '55', '74', '120', '166']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'outranges'}; {'id': '10', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '11', 'type': 'if_statement', 'children': ['12', '19']}; {'id': '12', 'type': 'comparison_operator', 'children': ['13', '16'], 'value': '!='}; {'id': '13', 'type': 'attribute', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'chr'}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'range2'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'chr'}; {'id': '19', 'type': 'block', 'children': ['20', '31']}; {'id': '20', 'type': 'expression_statement', 'children': ['21']}; {'id': '21', 'type': 'call', 'children': ['22', '25']}; {'id': '22', 'type': 'attribute', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'outranges'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '25', 'type': 'argument_list', 'children': ['26']}; {'id': '26', 'type': 'call', 'children': ['27', '30']}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'copy'}; {'id': '30', 'type': 'argument_list', 'children': []}; {'id': '31', 'type': 'return_statement', 'children': ['32']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'outranges'}; {'id': '33', 'type': 'if_statement', 'children': ['34', '41']}; {'id': '34', 'type': 'not_operator', 'children': ['35']}; {'id': '35', 'type': 'call', 'children': ['36', '39']}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'overlaps'}; {'id': '39', 'type': 'argument_list', 'children': ['40']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'range2'}; {'id': '41', 'type': 'block', 'children': ['42', '53']}; {'id': '42', 'type': 'expression_statement', 'children': ['43']}; {'id': '43', 'type': 'call', 'children': ['44', '47']}; {'id': '44', 'type': 'attribute', 'children': ['45', '46']}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'outranges'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '47', 'type': 'argument_list', 'children': ['48']}; {'id': '48', 'type': 'call', 'children': ['49', '52']}; {'id': '49', 'type': 'attribute', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'copy'}; {'id': '52', 'type': 'argument_list', 'children': []}; {'id': '53', 'type': 'return_statement', 'children': ['54']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'outranges'}; {'id': '55', 'type': 'if_statement', 'children': ['56', '71']}; {'id': '56', 'type': 'boolean_operator', 'children': ['57', '64'], 'value': 'and'}; {'id': '57', 'type': 'comparison_operator', 'children': ['58', '61'], 'value': '<='}; {'id': '58', 'type': 'attribute', 'children': ['59', '60']}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'range2'}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '61', 'type': 'attribute', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '64', 'type': 'comparison_operator', 'children': ['65', '68'], 'value': '>='}; {'id': '65', 'type': 'attribute', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'range2'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '68', 'type': 'attribute', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '70', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '71', 'type': 'block', 'children': ['72']}; {'id': '72', 'type': 'return_statement', 'children': ['73']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'outranges'}; {'id': '74', 'type': 'if_statement', 'children': ['75', '82']}; {'id': '75', 'type': 'comparison_operator', 'children': ['76', '79'], 'value': '>'}; {'id': '76', 'type': 'attribute', 'children': ['77', '78']}; {'id': '77', 'type': 'identifier', 'children': [], 'value': 'range2'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '79', 'type': 'attribute', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '82', 'type': 'block', 'children': ['83', '113']}; {'id': '83', 'type': 'expression_statement', 'children': ['84']}; {'id': '84', 'type': 'assignment', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'nrng'}; {'id': '86', 'type': 'call', 'children': ['87', '91']}; {'id': '87', 'type': 'call', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '89', 'type': 'argument_list', 'children': ['90']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '91', 'type': 'argument_list', 'children': ['92', '95', '102', '107', '110']}; {'id': '92', 'type': 'attribute', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'chr'}; {'id': '95', 'type': 'binary_operator', 'children': ['96', '99'], 'value': '+'}; {'id': '96', 'type': 'attribute', 'children': ['97', '98']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '99', 'type': 'attribute', 'children': ['100', '101']}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '101', 'type': 'identifier', 'children': [], 'value': '_start_offset'}; {'id': '102', 'type': 'binary_operator', 'children': ['103', '106'], 'value': '-'}; {'id': '103', 'type': 'attribute', 'children': ['104', '105']}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'range2'}; {'id': '105', 'type': 'identifier', 'children': [], 'value': 'start'}; {'id': '106', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '107', 'type': 'attribute', 'children': ['108', '109']}; {'id': '108', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'payload'}; {'id': '110', 'type': 'attribute', 'children': ['111', '112']}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'dir'}; {'id': '113', 'type': 'expression_statement', 'children': ['114']}; {'id': '114', 'type': 'call', 'children': ['115', '118']}; {'id': '115', 'type': 'attribute', 'children': ['116', '117']}; {'id': '116', 'type': 'identifier', 'children': [], 'value': 'outranges'}; {'id': '117', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '118', 'type': 'argument_list', 'children': ['119']}; {'id': '119', 'type': 'identifier', 'children': [], 'value': 'nrng'}; {'id': '120', 'type': 'if_statement', 'children': ['121', '128']}; {'id': '121', 'type': 'comparison_operator', 'children': ['122', '125'], 'value': '<'}; {'id': '122', 'type': 'attribute', 'children': ['123', '124']}; {'id': '123', 'type': 'identifier', 'children': [], 'value': 'range2'}; {'id': '124', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '125', 'type': 'attribute', 'children': ['126', '127']}; {'id': '126', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '127', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '128', 'type': 'block', 'children': ['129', '159']}; {'id': '129', 'type': 'expression_statement', 'children': ['130']}; {'id': '130', 'type': 'assignment', 'children': ['131', '132']}; {'id': '131', 'type': 'identifier', 'children': [], 'value': 'nrng'}; {'id': '132', 'type': 'call', 'children': ['133', '137']}; {'id': '133', 'type': 'call', 'children': ['134', '135']}; {'id': '134', 'type': 'identifier', 'children': [], 'value': 'type'}; {'id': '135', 'type': 'argument_list', 'children': ['136']}; {'id': '136', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '137', 'type': 'argument_list', 'children': ['138', '141', '150', '153', '156']}; {'id': '138', 'type': 'attribute', 'children': ['139', '140']}; {'id': '139', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '140', 'type': 'identifier', 'children': [], 'value': 'chr'}; {'id': '141', 'type': 'binary_operator', 'children': ['142', '147'], 'value': '+'}; {'id': '142', 'type': 'binary_operator', 'children': ['143', '146'], 'value': '+'}; {'id': '143', 'type': 'attribute', 'children': ['144', '145']}; {'id': '144', 'type': 'identifier', 'children': [], 'value': 'range2'}; {'id': '145', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '146', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '147', 'type': 'attribute', 'children': ['148', '149']}; {'id': '148', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '149', 'type': 'identifier', 'children': [], 'value': '_start_offset'}; {'id': '150', 'type': 'attribute', 'children': ['151', '152']}; {'id': '151', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '152', 'type': 'identifier', 'children': [], 'value': 'end'}; {'id': '153', 'type': 'attribute', 'children': ['154', '155']}; {'id': '154', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '155', 'type': 'identifier', 'children': [], 'value': 'payload'}; {'id': '156', 'type': 'attribute', 'children': ['157', '158']}; {'id': '157', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '158', 'type': 'identifier', 'children': [], 'value': 'dir'}; {'id': '159', 'type': 'expression_statement', 'children': ['160']}; {'id': '160', 'type': 'call', 'children': ['161', '164']}; {'id': '161', 'type': 'attribute', 'children': ['162', '163']}; {'id': '162', 'type': 'identifier', 'children': [], 'value': 'outranges'}; {'id': '163', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '164', 'type': 'argument_list', 'children': ['165']}; {'id': '165', 'type': 'identifier', 'children': [], 'value': 'nrng'}; {'id': '166', 'type': 'return_statement', 'children': ['167']}; {'id': '167', 'type': 'identifier', 'children': [], 'value': 'outranges'}
Take another range, and list of ranges after removing range2, keep options from self :param range2: :type range2: GenomicRange :return: List of Genomic Ranges :rtype: GenomicRange[]
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'close'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'keyword_separator', 'children': []}; {'id': '6', 'type': 'default_parameter', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'force_after'}; {'id': '8', 'type': 'integer', 'children': [], 'value': '30'}; {'id': '9', 'type': 'block', 'children': ['10']}; {'id': '10', 'type': 'if_statement', 'children': ['11', '14']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'transport'}; {'id': '14', 'type': 'block', 'children': ['15', '23']}; {'id': '15', 'type': 'expression_statement', 'children': ['16']}; {'id': '16', 'type': 'call', 'children': ['17', '22']}; {'id': '17', 'type': 'attribute', 'children': ['18', '21']}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'transport'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'close'}; {'id': '22', 'type': 'argument_list', 'children': []}; {'id': '23', 'type': 'try_statement', 'children': ['24', '42']}; {'id': '24', 'type': 'block', 'children': ['25']}; {'id': '25', 'type': 'with_statement', 'children': ['26', '32']}; {'id': '26', 'type': 'with_clause', 'children': ['27']}; {'id': '27', 'type': 'with_item', 'children': ['28']}; {'id': '28', 'type': 'call', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'timeout_after'}; {'id': '30', 'type': 'argument_list', 'children': ['31']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'force_after'}; {'id': '32', 'type': 'block', 'children': ['33']}; {'id': '33', 'type': 'expression_statement', 'children': ['34']}; {'id': '34', 'type': 'await', 'children': ['35']}; {'id': '35', 'type': 'call', 'children': ['36', '41']}; {'id': '36', 'type': 'attribute', 'children': ['37', '40']}; {'id': '37', 'type': 'attribute', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'closed_event'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'wait'}; {'id': '41', 'type': 'argument_list', 'children': []}; {'id': '42', 'type': 'except_clause', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'TaskTimeout'}; {'id': '44', 'type': 'block', 'children': ['45', '51']}; {'id': '45', 'type': 'expression_statement', 'children': ['46']}; {'id': '46', 'type': 'call', 'children': ['47', '50']}; {'id': '47', 'type': 'attribute', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'abort'}; {'id': '50', 'type': 'argument_list', 'children': []}; {'id': '51', 'type': 'expression_statement', 'children': ['52']}; {'id': '52', 'type': 'await', 'children': ['53']}; {'id': '53', 'type': 'call', 'children': ['54', '59']}; {'id': '54', 'type': 'attribute', 'children': ['55', '58']}; {'id': '55', 'type': 'attribute', 'children': ['56', '57']}; {'id': '56', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'closed_event'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'wait'}; {'id': '59', 'type': 'argument_list', 'children': []}
Close the connection and return when closed.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'validate_contents'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'file_contents'}; {'id': '5', 'type': 'block', 'children': ['6', '53']}; {'id': '6', 'type': 'for_statement', 'children': ['7', '10', '15']}; {'id': '7', 'type': 'pattern_list', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'contents'}; {'id': '10', 'type': 'call', 'children': ['11', '14']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'file_contents'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'items'}; {'id': '14', 'type': 'argument_list', 'children': []}; {'id': '15', 'type': 'block', 'children': ['16', '31', '37']}; {'id': '16', 'type': 'if_statement', 'children': ['17', '29']}; {'id': '17', 'type': 'comparison_operator', 'children': ['18', '28'], 'value': '!='}; {'id': '18', 'type': 'subscript', 'children': ['19', '27']}; {'id': '19', 'type': 'call', 'children': ['20', '25']}; {'id': '20', 'type': 'attribute', 'children': ['21', '24']}; {'id': '21', 'type': 'attribute', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'os'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'splitext'}; {'id': '25', 'type': 'argument_list', 'children': ['26']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '27', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '28', 'type': 'string', 'children': [], 'value': "'.ipynb'"}; {'id': '29', 'type': 'block', 'children': ['30']}; {'id': '30', 'type': 'continue_statement', 'children': []}; {'id': '31', 'type': 'if_statement', 'children': ['32', '34']}; {'id': '32', 'type': 'not_operator', 'children': ['33']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'contents'}; {'id': '34', 'type': 'block', 'children': ['35']}; {'id': '35', 'type': 'return_statement', 'children': ['36']}; {'id': '36', 'type': 'False', 'children': []}; {'id': '37', 'type': 'try_statement', 'children': ['38', '48']}; {'id': '38', 'type': 'block', 'children': ['39']}; {'id': '39', 'type': 'expression_statement', 'children': ['40']}; {'id': '40', 'type': 'assignment', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'json_object'}; {'id': '42', 'type': 'call', 'children': ['43', '46']}; {'id': '43', 'type': 'attribute', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'json'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'loads'}; {'id': '46', 'type': 'argument_list', 'children': ['47']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'contents'}; {'id': '48', 'type': 'except_clause', 'children': ['49', '50']}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'ValueError'}; {'id': '50', 'type': 'block', 'children': ['51']}; {'id': '51', 'type': 'return_statement', 'children': ['52']}; {'id': '52', 'type': 'False', 'children': []}; {'id': '53', 'type': 'return_statement', 'children': ['54']}; {'id': '54', 'type': 'True', 'children': []}
Ensures that all ipynb files in FILE_CONTENTS are valid JSON files.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'stop_actions'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '22']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '13']}; {'id': '8', 'type': 'pattern_list', 'children': ['9', '12']}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': '_stop_actions'}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'value'}; {'id': '13', 'type': 'call', 'children': ['14', '17']}; {'id': '14', 'type': 'attribute', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'get_attr_set'}; {'id': '17', 'type': 'argument_list', 'children': ['18', '21']}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': '_stop_actions'}; {'id': '21', 'type': 'string', 'children': [], 'value': "'stop_actions'"}; {'id': '22', 'type': 'return_statement', 'children': ['23']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'value'}
Gets a list of stop actions. Valid values are `coast` and `brake`.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_gap'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'src_interval'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'tar_interval'}; {'id': '6', 'type': 'block', 'children': ['7', '16', '20', '24', '36', '48', '54', '91']}; {'id': '7', 'type': 'assert_statement', 'children': ['8', '15']}; {'id': '8', 'type': 'comparison_operator', 'children': ['9', '12'], 'value': '=='}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'src_interval'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'bits'}; {'id': '12', 'type': 'attribute', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'tar_interval'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'bits'}; {'id': '15', 'type': 'string', 'children': [], 'value': '"Number of bits should be same for operands"'}; {'id': '16', 'type': 'expression_statement', 'children': ['17']}; {'id': '17', 'type': 'assignment', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'src_interval'}; {'id': '20', 'type': 'expression_statement', 'children': ['21']}; {'id': '21', 'type': 'assignment', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'tar_interval'}; {'id': '24', 'type': 'expression_statement', 'children': ['25']}; {'id': '25', 'type': 'assignment', 'children': ['26', '29']}; {'id': '26', 'type': 'tuple_pattern', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '29', 'type': 'tuple', 'children': ['30', '33']}; {'id': '30', 'type': 'attribute', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'lower_bound'}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'upper_bound'}; {'id': '36', 'type': 'expression_statement', 'children': ['37']}; {'id': '37', 'type': 'assignment', 'children': ['38', '41']}; {'id': '38', 'type': 'tuple_pattern', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': '_'}; {'id': '41', 'type': 'tuple', 'children': ['42', '45']}; {'id': '42', 'type': 'attribute', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'lower_bound'}; {'id': '45', 'type': 'attribute', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'upper_bound'}; {'id': '48', 'type': 'expression_statement', 'children': ['49']}; {'id': '49', 'type': 'assignment', 'children': ['50', '51']}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'w'}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'bits'}; {'id': '54', 'type': 'if_statement', 'children': ['55', '72']}; {'id': '55', 'type': 'boolean_operator', 'children': ['56', '64'], 'value': 'and'}; {'id': '56', 'type': '()', 'children': ['57']}; {'id': '57', 'type': 'not_operator', 'children': ['58']}; {'id': '58', 'type': 'call', 'children': ['59', '62']}; {'id': '59', 'type': 'attribute', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 't'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': '_surrounds_member'}; {'id': '62', 'type': 'argument_list', 'children': ['63']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '64', 'type': '()', 'children': ['65']}; {'id': '65', 'type': 'not_operator', 'children': ['66']}; {'id': '66', 'type': 'call', 'children': ['67', '70']}; {'id': '67', 'type': 'attribute', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '69', 'type': 'identifier', 'children': [], 'value': '_surrounds_member'}; {'id': '70', 'type': 'argument_list', 'children': ['71']}; {'id': '71', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '72', 'type': 'block', 'children': ['73']}; {'id': '73', 'type': 'return_statement', 'children': ['74']}; {'id': '74', 'type': 'attribute', 'children': ['75', '90']}; {'id': '75', 'type': 'call', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'StridedInterval'}; {'id': '77', 'type': 'argument_list', 'children': ['78', '81', '84', '87']}; {'id': '78', 'type': 'keyword_argument', 'children': ['79', '80']}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'lower_bound'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'c'}; {'id': '81', 'type': 'keyword_argument', 'children': ['82', '83']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'upper_bound'}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'b'}; {'id': '84', 'type': 'keyword_argument', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'bits'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'w'}; {'id': '87', 'type': 'keyword_argument', 'children': ['88', '89']}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'stride'}; {'id': '89', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'complement'}; {'id': '91', 'type': 'return_statement', 'children': ['92']}; {'id': '92', 'type': 'call', 'children': ['93', '96']}; {'id': '93', 'type': 'attribute', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'StridedInterval'}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'empty'}; {'id': '96', 'type': 'argument_list', 'children': ['97']}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'w'}
Refer section 3.1; gap function. :param src_interval: first argument or interval 1 :param tar_interval: second argument or interval 2 :return: Interval representing gap between two intervals
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'calc_across_paths_textnodes'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'paths_nodes'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'dbg'}; {'id': '7', 'type': 'False', 'children': []}; {'id': '8', 'type': 'block', 'children': ['9']}; {'id': '9', 'type': 'for_statement', 'children': ['10', '11', '12']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'path_nodes'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'paths_nodes'}; {'id': '12', 'type': 'block', 'children': ['13', '24', '42', '50', '58', '68']}; {'id': '13', 'type': 'expression_statement', 'children': ['14']}; {'id': '14', 'type': 'assignment', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'cnt'}; {'id': '16', 'type': 'call', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '18', 'type': 'argument_list', 'children': ['19']}; {'id': '19', 'type': 'subscript', 'children': ['20', '23']}; {'id': '20', 'type': 'subscript', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'path_nodes'}; {'id': '22', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '23', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '24', 'type': 'expression_statement', 'children': ['25']}; {'id': '25', 'type': 'assignment', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'ttl'}; {'id': '27', 'type': 'call', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'sum'}; {'id': '29', 'type': 'argument_list', 'children': ['30']}; {'id': '30', 'type': 'list_comprehension', 'children': ['31', '35']}; {'id': '31', 'type': 'call', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '33', 'type': 'argument_list', 'children': ['34']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '35', 'type': 'for_in_clause', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '37', 'type': 'subscript', 'children': ['38', '41']}; {'id': '38', 'type': 'subscript', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'paths_nodes'}; {'id': '40', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '41', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '42', 'type': 'expression_statement', 'children': ['43']}; {'id': '43', 'type': 'assignment', 'children': ['44', '49']}; {'id': '44', 'type': 'subscript', 'children': ['45', '48']}; {'id': '45', 'type': 'subscript', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'path_nodes'}; {'id': '47', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '48', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'cnt'}; {'id': '50', 'type': 'expression_statement', 'children': ['51']}; {'id': '51', 'type': 'assignment', 'children': ['52', '57']}; {'id': '52', 'type': 'subscript', 'children': ['53', '56']}; {'id': '53', 'type': 'subscript', 'children': ['54', '55']}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'path_nodes'}; {'id': '55', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '56', 'type': 'integer', 'children': [], 'value': '2'}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'ttl'}; {'id': '58', 'type': 'expression_statement', 'children': ['59']}; {'id': '59', 'type': 'assignment', 'children': ['60', '65']}; {'id': '60', 'type': 'subscript', 'children': ['61', '64']}; {'id': '61', 'type': 'subscript', 'children': ['62', '63']}; {'id': '62', 'type': 'identifier', 'children': [], 'value': 'path_nodes'}; {'id': '63', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '64', 'type': 'integer', 'children': [], 'value': '3'}; {'id': '65', 'type': 'binary_operator', 'children': ['66', '67'], 'value': '/'}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'ttl'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'cnt'}; {'id': '68', 'type': 'if_statement', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'dbg'}; {'id': '70', 'type': 'block', 'children': ['71']}; {'id': '71', 'type': 'expression_statement', 'children': ['72']}; {'id': '72', 'type': 'call', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'print'}; {'id': '74', 'type': 'argument_list', 'children': ['75']}; {'id': '75', 'type': 'subscript', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'path_nodes'}; {'id': '77', 'type': 'integer', 'children': [], 'value': '1'}
Given a list of parent paths tupled with children textnodes, plus initialized feature values, we calculate the total and average string length of the parent's children textnodes.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'group'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '6', 'type': 'block', 'children': ['7', '17']}; {'id': '7', 'type': 'if_statement', 'children': ['8', '11']}; {'id': '8', 'type': 'comparison_operator', 'children': ['9', '10'], 'value': '<='}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '10', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '11', 'type': 'block', 'children': ['12']}; {'id': '12', 'type': 'raise_statement', 'children': ['13']}; {'id': '13', 'type': 'call', 'children': ['14', '15']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'ValueError'}; {'id': '15', 'type': 'argument_list', 'children': ['16']}; {'id': '16', 'type': 'string', 'children': [], 'value': '"n must be a positive integer"'}; {'id': '17', 'type': 'return_statement', 'children': ['18']}; {'id': '18', 'type': 'list_comprehension', 'children': ['19', '27']}; {'id': '19', 'type': 'subscript', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '21', 'type': 'slice', 'children': ['22', '23', '24']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '23', 'type': 'colon', 'children': []}; {'id': '24', 'type': 'binary_operator', 'children': ['25', '26'], 'value': '+'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '27', 'type': 'for_in_clause', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '29', 'type': 'call', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '31', 'type': 'argument_list', 'children': ['32', '33', '37']}; {'id': '32', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '33', 'type': 'call', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'len'}; {'id': '35', 'type': 'argument_list', 'children': ['36']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'text'}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'size'}
Group ``text`` into blocks of ``size``. Example: >>> group("test", 2) ['te', 'st'] Args: text (str): text to separate size (int): size of groups to split the text into Returns: List of n-sized groups of text Raises: ValueError: If n is non positive
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'destroy'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '14', '20', '31', '74']}; {'id': '6', 'type': 'if_statement', 'children': ['7', '12']}; {'id': '7', 'type': 'comparison_operator', 'children': ['8', '11'], 'value': 'is'}; {'id': '8', 'type': 'attribute', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': '_running'}; {'id': '11', 'type': 'False', 'children': []}; {'id': '12', 'type': 'block', 'children': ['13']}; {'id': '13', 'type': 'return_statement', 'children': []}; {'id': '14', 'type': 'expression_statement', 'children': ['15']}; {'id': '15', 'type': 'assignment', 'children': ['16', '19']}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': '_running'}; {'id': '19', 'type': 'False', 'children': []}; {'id': '20', 'type': 'if_statement', 'children': ['21', '26']}; {'id': '21', 'type': 'call', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'hasattr'}; {'id': '23', 'type': 'argument_list', 'children': ['24', '25']}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '25', 'type': 'string', 'children': [], 'value': "'schedule'"}; {'id': '26', 'type': 'block', 'children': ['27']}; {'id': '27', 'type': 'delete_statement', 'children': ['28']}; {'id': '28', 'type': 'attribute', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'schedule'}; {'id': '31', 'type': 'if_statement', 'children': ['32', '43']}; {'id': '32', 'type': 'boolean_operator', 'children': ['33', '38'], 'value': 'and'}; {'id': '33', 'type': 'call', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'hasattr'}; {'id': '35', 'type': 'argument_list', 'children': ['36', '37']}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '37', 'type': 'string', 'children': [], 'value': "'pub_channel'"}; {'id': '38', 'type': 'comparison_operator', 'children': ['39', '42'], 'value': 'is not'}; {'id': '39', 'type': 'attribute', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'pub_channel'}; {'id': '42', 'type': 'None', 'children': []}; {'id': '43', 'type': 'block', 'children': ['44', '53', '70']}; {'id': '44', 'type': 'expression_statement', 'children': ['45']}; {'id': '45', 'type': 'call', 'children': ['46', '51']}; {'id': '46', 'type': 'attribute', 'children': ['47', '50']}; {'id': '47', 'type': 'attribute', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '49', 'type': 'identifier', 'children': [], 'value': 'pub_channel'}; {'id': '50', 'type': 'identifier', 'children': [], 'value': 'on_recv'}; {'id': '51', 'type': 'argument_list', 'children': ['52']}; {'id': '52', 'type': 'None', 'children': []}; {'id': '53', 'type': 'if_statement', 'children': ['54', '61']}; {'id': '54', 'type': 'call', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'hasattr'}; {'id': '56', 'type': 'argument_list', 'children': ['57', '60']}; {'id': '57', 'type': 'attribute', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '59', 'type': 'identifier', 'children': [], 'value': 'pub_channel'}; {'id': '60', 'type': 'string', 'children': [], 'value': "'close'"}; {'id': '61', 'type': 'block', 'children': ['62']}; {'id': '62', 'type': 'expression_statement', 'children': ['63']}; {'id': '63', 'type': 'call', 'children': ['64', '69']}; {'id': '64', 'type': 'attribute', 'children': ['65', '68']}; {'id': '65', 'type': 'attribute', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'pub_channel'}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'close'}; {'id': '69', 'type': 'argument_list', 'children': []}; {'id': '70', 'type': 'delete_statement', 'children': ['71']}; {'id': '71', 'type': 'attribute', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'pub_channel'}; {'id': '74', 'type': 'if_statement', 'children': ['75', '80']}; {'id': '75', 'type': 'call', 'children': ['76', '77']}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'hasattr'}; {'id': '77', 'type': 'argument_list', 'children': ['78', '79']}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '79', 'type': 'string', 'children': [], 'value': "'periodic_callbacks'"}; {'id': '80', 'type': 'block', 'children': ['81']}; {'id': '81', 'type': 'for_statement', 'children': ['82', '83', '91']}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'cb'}; {'id': '83', 'type': 'call', 'children': ['84', '87']}; {'id': '84', 'type': 'attribute', 'children': ['85', '86']}; {'id': '85', 'type': 'identifier', 'children': [], 'value': 'six'}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'itervalues'}; {'id': '87', 'type': 'argument_list', 'children': ['88']}; {'id': '88', 'type': 'attribute', 'children': ['89', '90']}; {'id': '89', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'periodic_callbacks'}; {'id': '91', 'type': 'block', 'children': ['92']}; {'id': '92', 'type': 'expression_statement', 'children': ['93']}; {'id': '93', 'type': 'call', 'children': ['94', '97']}; {'id': '94', 'type': 'attribute', 'children': ['95', '96']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'cb'}; {'id': '96', 'type': 'identifier', 'children': [], 'value': 'stop'}; {'id': '97', 'type': 'argument_list', 'children': []}
Tear down the minion
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '9']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'pint_multiply'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'da'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'q'}; {'id': '6', 'type': 'default_parameter', 'children': ['7', '8']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'out_units'}; {'id': '8', 'type': 'None', 'children': []}; {'id': '9', 'type': 'block', 'children': ['10', '19', '29', '41', '49', '62']}; {'id': '10', 'type': 'expression_statement', 'children': ['11']}; {'id': '11', 'type': 'assignment', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '13', 'type': 'binary_operator', 'children': ['14', '15'], 'value': '*'}; {'id': '14', 'type': 'integer', 'children': [], 'value': '1'}; {'id': '15', 'type': 'call', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'units2pint'}; {'id': '17', 'type': 'argument_list', 'children': ['18']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'da'}; {'id': '19', 'type': 'expression_statement', 'children': ['20']}; {'id': '20', 'type': 'assignment', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '22', 'type': 'binary_operator', 'children': ['23', '24'], 'value': '*'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'a'}; {'id': '24', 'type': 'call', 'children': ['25', '28']}; {'id': '25', 'type': 'attribute', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'q'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'to_base_units'}; {'id': '28', 'type': 'argument_list', 'children': []}; {'id': '29', 'type': 'if_statement', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'out_units'}; {'id': '31', 'type': 'block', 'children': ['32']}; {'id': '32', 'type': 'expression_statement', 'children': ['33']}; {'id': '33', 'type': 'assignment', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '35', 'type': 'call', 'children': ['36', '39']}; {'id': '36', 'type': 'attribute', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'to'}; {'id': '39', 'type': 'argument_list', 'children': ['40']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'out_units'}; {'id': '41', 'type': 'expression_statement', 'children': ['42']}; {'id': '42', 'type': 'assignment', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'out'}; {'id': '44', 'type': 'binary_operator', 'children': ['45', '46'], 'value': '*'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'da'}; {'id': '46', 'type': 'attribute', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'magnitude'}; {'id': '49', 'type': 'expression_statement', 'children': ['50']}; {'id': '50', 'type': 'assignment', 'children': ['51', '56']}; {'id': '51', 'type': 'subscript', 'children': ['52', '55']}; {'id': '52', 'type': 'attribute', 'children': ['53', '54']}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'out'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'attrs'}; {'id': '55', 'type': 'string', 'children': [], 'value': "'units'"}; {'id': '56', 'type': 'call', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 'pint2cfunits'}; {'id': '58', 'type': 'argument_list', 'children': ['59']}; {'id': '59', 'type': 'attribute', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'f'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'units'}; {'id': '62', 'type': 'return_statement', 'children': ['63']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'out'}
Multiply xarray.DataArray by pint.Quantity. Parameters ---------- da : xr.DataArray Input array. q : pint.Quantity Multiplicating factor. out_units : str Units the output array should be converted into.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_to_dict'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'block', 'children': ['6', '13', '25']}; {'id': '6', 'type': 'expression_statement', 'children': ['7']}; {'id': '7', 'type': 'assignment', 'children': ['8', '9']}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'physical_prop_names'}; {'id': '9', 'type': 'call', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'find_PhysicalProperty'}; {'id': '11', 'type': 'argument_list', 'children': ['12']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'expression_statement', 'children': ['14']}; {'id': '14', 'type': 'assignment', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'physical_prop_vals'}; {'id': '16', 'type': 'list_comprehension', 'children': ['17', '22']}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'getattr'}; {'id': '19', 'type': 'argument_list', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'prop'}; {'id': '22', 'type': 'for_in_clause', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'prop'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'physical_prop_names'}; {'id': '25', 'type': 'return_statement', 'children': ['26']}; {'id': '26', 'type': 'call', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '28', 'type': 'argument_list', 'children': ['29']}; {'id': '29', 'type': 'call', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'zip'}; {'id': '31', 'type': 'argument_list', 'children': ['32', '33']}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'physical_prop_names'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'physical_prop_vals'}
Return a dictionary representation of the current object.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'category'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'dictionary_splat_pattern', 'children': ['5']}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'kwargs'}; {'id': '6', 'type': 'block', 'children': ['7', '29']}; {'id': '7', 'type': 'if_statement', 'children': ['8', '11', '23']}; {'id': '8', 'type': 'comparison_operator', 'children': ['9', '10'], 'value': 'in'}; {'id': '9', 'type': 'string', 'children': [], 'value': "'series'"}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'kwargs'}; {'id': '11', 'type': 'block', 'children': ['12', '19']}; {'id': '12', 'type': 'expression_statement', 'children': ['13']}; {'id': '13', 'type': 'call', 'children': ['14', '17']}; {'id': '14', 'type': 'attribute', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'kwargs'}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'pop'}; {'id': '17', 'type': 'argument_list', 'children': ['18']}; {'id': '18', 'type': 'string', 'children': [], 'value': "'series'"}; {'id': '19', 'type': 'expression_statement', 'children': ['20']}; {'id': '20', 'type': 'assignment', 'children': ['21', '22']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '22', 'type': 'string', 'children': [], 'value': "'series'"}; {'id': '23', 'type': 'else_clause', 'children': ['24']}; {'id': '24', 'type': 'block', 'children': ['25']}; {'id': '25', 'type': 'expression_statement', 'children': ['26']}; {'id': '26', 'type': 'assignment', 'children': ['27', '28']}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '28', 'type': 'None', 'children': []}; {'id': '29', 'type': 'return_statement', 'children': ['30']}; {'id': '30', 'type': 'call', 'children': ['31', '36']}; {'id': '31', 'type': 'attribute', 'children': ['32', '35']}; {'id': '32', 'type': 'call', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'Fred'}; {'id': '34', 'type': 'argument_list', 'children': []}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'category'}; {'id': '36', 'type': 'argument_list', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'path'}; {'id': '38', 'type': 'dictionary_splat', 'children': ['39']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'kwargs'}
Get a category.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'add_dicts'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'list_splat_pattern', 'children': ['5']}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '6', 'type': 'block', 'children': ['7', '18']}; {'id': '7', 'type': 'expression_statement', 'children': ['8']}; {'id': '8', 'type': 'assignment', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'counters'}; {'id': '10', 'type': 'list_comprehension', 'children': ['11', '15']}; {'id': '11', 'type': 'call', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'Counter'}; {'id': '13', 'type': 'argument_list', 'children': ['14']}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'arg'}; {'id': '15', 'type': 'for_in_clause', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'arg'}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'args'}; {'id': '18', 'type': 'return_statement', 'children': ['19']}; {'id': '19', 'type': 'call', 'children': ['20', '21']}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'dict'}; {'id': '21', 'type': 'argument_list', 'children': ['22']}; {'id': '22', 'type': 'call', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'reduce'}; {'id': '24', 'type': 'argument_list', 'children': ['25', '28']}; {'id': '25', 'type': 'attribute', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'operator'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'add'}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'counters'}
Adds two or more dicts together. Common keys will have their values added. For example:: >>> t1 = {'a':1, 'b':2} >>> t2 = {'b':1, 'c':3} >>> t3 = {'d':4} >>> add_dicts(t1, t2, t3) {'a': 1, 'c': 3, 'b': 3, 'd': 4}
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'rename_dimension'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'old_name'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'new_name'}; {'id': '7', 'type': 'block', 'children': ['8', '24']}; {'id': '8', 'type': 'if_statement', 'children': ['9', '14']}; {'id': '9', 'type': 'comparison_operator', 'children': ['10', '11'], 'value': 'not in'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'old_name'}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'dimension_names'}; {'id': '14', 'type': 'block', 'children': ['15']}; {'id': '15', 'type': 'raise_statement', 'children': ['16']}; {'id': '16', 'type': 'call', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'ValueError'}; {'id': '18', 'type': 'argument_list', 'children': ['19']}; {'id': '19', 'type': 'binary_operator', 'children': ['20', '21'], 'value': '%'}; {'id': '20', 'type': 'string', 'children': [], 'value': '"Shape %s does not have dimension named %s"'}; {'id': '21', 'type': 'tuple', 'children': ['22', '23']}; {'id': '22', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'old_name'}; {'id': '24', 'type': 'return_statement', 'children': ['25']}; {'id': '25', 'type': 'call', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'Shape'}; {'id': '27', 'type': 'argument_list', 'children': ['28']}; {'id': '28', 'type': 'list_comprehension', 'children': ['29', '43']}; {'id': '29', 'type': 'conditional_expression', 'children': ['30', '37', '42'], 'value': 'if'}; {'id': '30', 'type': 'call', 'children': ['31', '32']}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'Dimension'}; {'id': '32', 'type': 'argument_list', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'new_name'}; {'id': '34', 'type': 'attribute', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '37', 'type': 'comparison_operator', 'children': ['38', '41'], 'value': '=='}; {'id': '38', 'type': 'attribute', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'name'}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'old_name'}; {'id': '42', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '43', 'type': 'for_in_clause', 'children': ['44', '45']}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'd'}; {'id': '45', 'type': 'attribute', 'children': ['46', '47']}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'dims'}
Returns a copy where one dimension is renamed.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '8']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_get_dst_resolution'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'default_parameter', 'children': ['6', '7']}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'dst_res'}; {'id': '7', 'type': 'None', 'children': []}; {'id': '8', 'type': 'block', 'children': ['9', '27']}; {'id': '9', 'type': 'if_statement', 'children': ['10', '13']}; {'id': '10', 'type': 'comparison_operator', 'children': ['11', '12'], 'value': 'is'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'dst_res'}; {'id': '12', 'type': 'None', 'children': []}; {'id': '13', 'type': 'block', 'children': ['14']}; {'id': '14', 'type': 'expression_statement', 'children': ['15']}; {'id': '15', 'type': 'assignment', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'dst_res'}; {'id': '17', 'type': 'call', 'children': ['18', '19']}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'min'}; {'id': '19', 'type': 'argument_list', 'children': ['20']}; {'id': '20', 'type': 'call', 'children': ['21', '26']}; {'id': '21', 'type': 'attribute', 'children': ['22', '25']}; {'id': '22', 'type': 'attribute', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': '_res_indices'}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'keys'}; {'id': '26', 'type': 'argument_list', 'children': []}; {'id': '27', 'type': 'return_statement', 'children': ['28']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'dst_res'}
Get default resolution, i.e. the highest resolution or smallest cell size.
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '6']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'get_instance'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'payload'}; {'id': '6', 'type': 'block', 'children': ['7']}; {'id': '7', 'type': 'return_statement', 'children': ['8']}; {'id': '8', 'type': 'call', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'EventInstance'}; {'id': '10', 'type': 'argument_list', 'children': ['11', '14', '15']}; {'id': '11', 'type': 'attribute', 'children': ['12', '13']}; {'id': '12', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '13', 'type': 'identifier', 'children': [], 'value': '_version'}; {'id': '14', 'type': 'identifier', 'children': [], 'value': 'payload'}; {'id': '15', 'type': 'keyword_argument', 'children': ['16', '17']}; {'id': '16', 'type': 'identifier', 'children': [], 'value': 'workspace_sid'}; {'id': '17', 'type': 'subscript', 'children': ['18', '21']}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': '_solution'}; {'id': '21', 'type': 'string', 'children': [], 'value': "'workspace_sid'"}
Build an instance of EventInstance :param dict payload: Payload response from the API :returns: twilio.rest.taskrouter.v1.workspace.event.EventInstance :rtype: twilio.rest.taskrouter.v1.workspace.event.EventInstance
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
74