sequence
stringlengths 902
12k
| docstring
stringlengths 4
15.2k
|
---|---|
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '20', '22']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'relation_completions'}; {'id': '3', 'type': 'parameters', 'children': ['4', '8', '12', '16']}; {'id': '4', 'type': 'typed_parameter', 'children': ['5', '6']}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'completion_text'}; {'id': '6', 'type': 'type', 'children': ['7']}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '8', 'type': 'typed_parameter', 'children': ['9', '10']}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'bel_spec'}; {'id': '10', 'type': 'type', 'children': ['11']}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'BELSpec'}; {'id': '12', 'type': 'typed_parameter', 'children': ['13', '14']}; {'id': '13', 'type': 'identifier', 'children': [], 'value': 'bel_fmt'}; {'id': '14', 'type': 'type', 'children': ['15']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '16', 'type': 'typed_parameter', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'size'}; {'id': '18', 'type': 'type', 'children': ['19']}; {'id': '19', 'type': 'identifier', 'children': [], 'value': 'int'}; {'id': '20', 'type': 'type', 'children': ['21']}; {'id': '21', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '22', 'type': 'block', 'children': ['23', '46', '50', '70', '74', '107']}; {'id': '23', 'type': 'if_statement', 'children': ['24', '27', '36']}; {'id': '24', 'type': 'comparison_operator', 'children': ['25', '26'], 'value': '=='}; {'id': '25', 'type': 'identifier', 'children': [], 'value': 'bel_fmt'}; {'id': '26', 'type': 'string', 'children': [], 'value': '"short"'}; {'id': '27', 'type': 'block', 'children': ['28']}; {'id': '28', 'type': 'expression_statement', 'children': ['29']}; {'id': '29', 'type': 'assignment', 'children': ['30', '31']}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'relation_list'}; {'id': '31', 'type': 'subscript', 'children': ['32', '35']}; {'id': '32', 'type': 'subscript', 'children': ['33', '34']}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'bel_spec'}; {'id': '34', 'type': 'string', 'children': [], 'value': '"relations"'}; {'id': '35', 'type': 'string', 'children': [], 'value': '"list_short"'}; {'id': '36', 'type': 'else_clause', 'children': ['37']}; {'id': '37', 'type': 'block', 'children': ['38']}; {'id': '38', 'type': 'expression_statement', 'children': ['39']}; {'id': '39', 'type': 'assignment', 'children': ['40', '41']}; {'id': '40', 'type': 'identifier', 'children': [], 'value': 'relation_list'}; {'id': '41', 'type': 'subscript', 'children': ['42', '45']}; {'id': '42', 'type': 'subscript', 'children': ['43', '44']}; {'id': '43', 'type': 'identifier', 'children': [], 'value': 'bel_spec'}; {'id': '44', 'type': 'string', 'children': [], 'value': '"relations"'}; {'id': '45', 'type': 'string', 'children': [], 'value': '"list_long"'}; {'id': '46', 'type': 'expression_statement', 'children': ['47']}; {'id': '47', 'type': 'assignment', 'children': ['48', '49']}; {'id': '48', 'type': 'identifier', 'children': [], 'value': 'matches'}; {'id': '49', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '50', 'type': 'for_statement', 'children': ['51', '52', '53']}; {'id': '51', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'relation_list'}; {'id': '53', 'type': 'block', 'children': ['54']}; {'id': '54', 'type': 'if_statement', 'children': ['55', '62']}; {'id': '55', 'type': 'call', 'children': ['56', '59']}; {'id': '56', 'type': 'attribute', 'children': ['57', '58']}; {'id': '57', 'type': 'identifier', 'children': [], 'value': 're'}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '59', 'type': 'argument_list', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'completion_text'}; {'id': '61', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '62', 'type': 'block', 'children': ['63']}; {'id': '63', 'type': 'expression_statement', 'children': ['64']}; {'id': '64', 'type': 'call', 'children': ['65', '68']}; {'id': '65', 'type': 'attribute', 'children': ['66', '67']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'matches'}; {'id': '67', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '68', 'type': 'argument_list', 'children': ['69']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'r'}; {'id': '70', 'type': 'expression_statement', 'children': ['71']}; {'id': '71', 'type': 'assignment', 'children': ['72', '73']}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'replace_list'}; {'id': '73', 'type': 'list', 'children': [], 'value': '[]'}; {'id': '74', 'type': 'for_statement', 'children': ['75', '76', '77']}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': 'matches'}; {'id': '77', 'type': 'block', 'children': ['78', '88']}; {'id': '78', 'type': 'expression_statement', 'children': ['79']}; {'id': '79', 'type': 'assignment', 'children': ['80', '81']}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'highlight'}; {'id': '81', 'type': 'call', 'children': ['82', '85']}; {'id': '82', 'type': 'attribute', 'children': ['83', '84']}; {'id': '83', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'replace'}; {'id': '85', 'type': 'argument_list', 'children': ['86', '87']}; {'id': '86', 'type': 'identifier', 'children': [], 'value': 'completion_text'}; {'id': '87', 'type': 'string', 'children': [], 'value': 'f"<em>{completion_text}</em>"'}; {'id': '88', 'type': 'expression_statement', 'children': ['89']}; {'id': '89', 'type': 'call', 'children': ['90', '93']}; {'id': '90', 'type': 'attribute', 'children': ['91', '92']}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'replace_list'}; {'id': '92', 'type': 'identifier', 'children': [], 'value': 'append'}; {'id': '93', 'type': 'argument_list', 'children': ['94']}; {'id': '94', 'type': 'dictionary', 'children': ['95', '98', '101', '104']}; {'id': '95', 'type': 'pair', 'children': ['96', '97']}; {'id': '96', 'type': 'string', 'children': [], 'value': '"replacement"'}; {'id': '97', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '98', 'type': 'pair', 'children': ['99', '100']}; {'id': '99', 'type': 'string', 'children': [], 'value': '"label"'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'match'}; {'id': '101', 'type': 'pair', 'children': ['102', '103']}; {'id': '102', 'type': 'string', 'children': [], 'value': '"highlight"'}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'highlight'}; {'id': '104', 'type': 'pair', 'children': ['105', '106']}; {'id': '105', 'type': 'string', 'children': [], 'value': '"type"'}; {'id': '106', 'type': 'string', 'children': [], 'value': '"Relation"'}; {'id': '107', 'type': 'return_statement', 'children': ['108']}; {'id': '108', 'type': 'subscript', 'children': ['109', '110']}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'replace_list'}; {'id': '110', 'type': 'slice', 'children': ['111', '112']}; {'id': '111', 'type': 'colon', 'children': []}; {'id': '112', 'type': 'identifier', 'children': [], 'value': 'size'}
|
Filter BEL relations by prefix
Args:
prefix: completion string
bel_fmt: short, medium, long BEL formats
spec: BEL specification
Returns:
list: list of BEL relations that match prefix
|
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '5']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'msg_debug'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '5', 'type': 'block', 'children': ['6']}; {'id': '6', 'type': 'if_statement', 'children': ['7', '12']}; {'id': '7', 'type': 'comparison_operator', 'children': ['8', '9'], 'value': '=='}; {'id': '8', 'type': 'identifier', 'children': [], 'value': '_log_lvl'}; {'id': '9', 'type': 'attribute', 'children': ['10', '11']}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'logging'}; {'id': '11', 'type': 'identifier', 'children': [], 'value': 'DEBUG'}; {'id': '12', 'type': 'block', 'children': ['13', '28']}; {'id': '13', 'type': 'expression_statement', 'children': ['14']}; {'id': '14', 'type': 'call', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'to_stdout'}; {'id': '16', 'type': 'argument_list', 'children': ['17', '25']}; {'id': '17', 'type': 'call', 'children': ['18', '21']}; {'id': '18', 'type': 'attribute', 'children': ['19', '20']}; {'id': '19', 'type': 'string', 'children': [], 'value': '" (*) {message}"'}; {'id': '20', 'type': 'identifier', 'children': [], 'value': 'format'}; {'id': '21', 'type': 'argument_list', 'children': ['22']}; {'id': '22', 'type': 'keyword_argument', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '24', 'type': 'identifier', 'children': [], 'value': 'message'}; {'id': '25', 'type': 'keyword_argument', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'colorf'}; {'id': '27', 'type': 'identifier', 'children': [], 'value': 'cyan'}; {'id': '28', 'type': 'if_statement', 'children': ['29', '30']}; {'id': '29', 'type': 'identifier', 'children': [], 'value': '_logger'}; {'id': '30', 'type': 'block', 'children': ['31']}; {'id': '31', 'type': 'expression_statement', 'children': ['32']}; {'id': '32', 'type': 'call', 'children': ['33', '36']}; {'id': '33', 'type': 'attribute', 'children': ['34', '35']}; {'id': '34', 'type': 'identifier', 'children': [], 'value': '_logger'}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'debug'}; {'id': '36', 'type': 'argument_list', 'children': ['37']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'message'}
|
Log a debug message
:param message: the message to be logged
|
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '7']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': 'load_session'}; {'id': '3', 'type': 'parameters', 'children': ['4']}; {'id': '4', 'type': 'default_parameter', 'children': ['5', '6']}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'fname'}; {'id': '6', 'type': 'None', 'children': []}; {'id': '7', 'type': 'block', 'children': ['8', '19', '66', '78', '84', '91', '96']}; {'id': '8', 'type': 'if_statement', 'children': ['9', '12']}; {'id': '9', 'type': 'comparison_operator', 'children': ['10', '11'], 'value': 'is'}; {'id': '10', 'type': 'identifier', 'children': [], 'value': 'fname'}; {'id': '11', 'type': 'None', 'children': []}; {'id': '12', 'type': 'block', 'children': ['13']}; {'id': '13', 'type': 'expression_statement', 'children': ['14']}; {'id': '14', 'type': 'assignment', 'children': ['15', '16']}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'fname'}; {'id': '16', 'type': 'attribute', 'children': ['17', '18']}; {'id': '17', 'type': 'identifier', 'children': [], 'value': 'conf'}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'session'}; {'id': '19', 'type': 'try_statement', 'children': ['20', '40']}; {'id': '20', 'type': 'block', 'children': ['21']}; {'id': '21', 'type': 'expression_statement', 'children': ['22']}; {'id': '22', 'type': 'assignment', 'children': ['23', '24']}; {'id': '23', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '24', 'type': 'call', 'children': ['25', '32']}; {'id': '25', 'type': 'attribute', 'children': ['26', '31']}; {'id': '26', 'type': 'attribute', 'children': ['27', '30']}; {'id': '27', 'type': 'attribute', 'children': ['28', '29']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'six'}; {'id': '29', 'type': 'identifier', 'children': [], 'value': 'moves'}; {'id': '30', 'type': 'identifier', 'children': [], 'value': 'cPickle'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'load'}; {'id': '32', 'type': 'argument_list', 'children': ['33']}; {'id': '33', 'type': 'call', 'children': ['34', '37']}; {'id': '34', 'type': 'attribute', 'children': ['35', '36']}; {'id': '35', 'type': 'identifier', 'children': [], 'value': 'gzip'}; {'id': '36', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '37', 'type': 'argument_list', 'children': ['38', '39']}; {'id': '38', 'type': 'identifier', 'children': [], 'value': 'fname'}; {'id': '39', 'type': 'string', 'children': [], 'value': '"rb"'}; {'id': '40', 'type': 'except_clause', 'children': ['41', '42']}; {'id': '41', 'type': 'identifier', 'children': [], 'value': 'IOError'}; {'id': '42', 'type': 'block', 'children': ['43']}; {'id': '43', 'type': 'try_statement', 'children': ['44', '62']}; {'id': '44', 'type': 'block', 'children': ['45']}; {'id': '45', 'type': 'expression_statement', 'children': ['46']}; {'id': '46', 'type': 'assignment', 'children': ['47', '48']}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '48', 'type': 'call', 'children': ['49', '56']}; {'id': '49', 'type': 'attribute', 'children': ['50', '55']}; {'id': '50', 'type': 'attribute', 'children': ['51', '54']}; {'id': '51', 'type': 'attribute', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'six'}; {'id': '53', 'type': 'identifier', 'children': [], 'value': 'moves'}; {'id': '54', 'type': 'identifier', 'children': [], 'value': 'cPickle'}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'load'}; {'id': '56', 'type': 'argument_list', 'children': ['57']}; {'id': '57', 'type': 'call', 'children': ['58', '59']}; {'id': '58', 'type': 'identifier', 'children': [], 'value': 'open'}; {'id': '59', 'type': 'argument_list', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'fname'}; {'id': '61', 'type': 'string', 'children': [], 'value': '"rb"'}; {'id': '62', 'type': 'except_clause', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'IOError'}; {'id': '64', 'type': 'block', 'children': ['65']}; {'id': '65', 'type': 'raise_statement', 'children': []}; {'id': '66', 'type': 'expression_statement', 'children': ['67']}; {'id': '67', 'type': 'assignment', 'children': ['68', '69']}; {'id': '68', 'type': 'identifier', 'children': [], 'value': 'scapy_session'}; {'id': '69', 'type': 'subscript', 'children': ['70', '77']}; {'id': '70', 'type': 'attribute', 'children': ['71', '76']}; {'id': '71', 'type': 'attribute', 'children': ['72', '75']}; {'id': '72', 'type': 'attribute', 'children': ['73', '74']}; {'id': '73', 'type': 'identifier', 'children': [], 'value': 'six'}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'moves'}; {'id': '75', 'type': 'identifier', 'children': [], 'value': 'builtins'}; {'id': '76', 'type': 'identifier', 'children': [], 'value': '__dict__'}; {'id': '77', 'type': 'string', 'children': [], 'value': '"scapy_session"'}; {'id': '78', 'type': 'expression_statement', 'children': ['79']}; {'id': '79', 'type': 'call', 'children': ['80', '83']}; {'id': '80', 'type': 'attribute', 'children': ['81', '82']}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'scapy_session'}; {'id': '82', 'type': 'identifier', 'children': [], 'value': 'clear'}; {'id': '83', 'type': 'argument_list', 'children': []}; {'id': '84', 'type': 'expression_statement', 'children': ['85']}; {'id': '85', 'type': 'call', 'children': ['86', '89']}; {'id': '86', 'type': 'attribute', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'scapy_session'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': 'update'}; {'id': '89', 'type': 'argument_list', 'children': ['90']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 's'}; {'id': '91', 'type': 'expression_statement', 'children': ['92']}; {'id': '92', 'type': 'call', 'children': ['93', '94']}; {'id': '93', 'type': 'identifier', 'children': [], 'value': 'update_ipython_session'}; {'id': '94', 'type': 'argument_list', 'children': ['95']}; {'id': '95', 'type': 'identifier', 'children': [], 'value': 'scapy_session'}; {'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': 'log_loading'}; {'id': '100', 'type': 'identifier', 'children': [], 'value': 'info'}; {'id': '101', 'type': 'argument_list', 'children': ['102']}; {'id': '102', 'type': 'binary_operator', 'children': ['103', '104'], 'value': '%'}; {'id': '103', 'type': 'string', 'children': [], 'value': '"Loaded session [%s]"'}; {'id': '104', 'type': 'identifier', 'children': [], 'value': 'fname'}
|
Load current Scapy session from the file specified in the fname arg.
This will erase any existing session.
params:
- fname: file to load the scapy session from
|
{'id': '0', 'type': 'module', 'children': ['1']}; {'id': '1', 'type': 'function_definition', 'children': ['2', '3', '10']}; {'id': '2', 'type': 'function_name', 'children': [], 'value': '_convert_data'}; {'id': '3', 'type': 'parameters', 'children': ['4', '5', '6', '7', '8', '9']}; {'id': '4', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '5', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '6', 'type': 'identifier', 'children': [], 'value': 'data_type'}; {'id': '7', 'type': 'identifier', 'children': [], 'value': 'num_recs'}; {'id': '8', 'type': 'identifier', 'children': [], 'value': 'num_values'}; {'id': '9', 'type': 'identifier', 'children': [], 'value': 'num_elems'}; {'id': '10', 'type': 'block', 'children': ['11']}; {'id': '11', 'type': 'if_statement', 'children': ['12', '20', '48']}; {'id': '12', 'type': '()', 'children': ['13']}; {'id': '13', 'type': 'boolean_operator', 'children': ['14', '17'], 'value': 'or'}; {'id': '14', 'type': 'comparison_operator', 'children': ['15', '16'], 'value': '=='}; {'id': '15', 'type': 'identifier', 'children': [], 'value': 'data_type'}; {'id': '16', 'type': 'integer', 'children': [], 'value': '51'}; {'id': '17', 'type': 'comparison_operator', 'children': ['18', '19'], 'value': '=='}; {'id': '18', 'type': 'identifier', 'children': [], 'value': 'data_type'}; {'id': '19', 'type': 'integer', 'children': [], 'value': '52'}; {'id': '20', 'type': 'block', 'children': ['21']}; {'id': '21', 'type': 'return_statement', 'children': ['22']}; {'id': '22', 'type': 'list_comprehension', 'children': ['23', '36']}; {'id': '23', 'type': 'call', 'children': ['24', '34']}; {'id': '24', 'type': 'attribute', 'children': ['25', '33']}; {'id': '25', 'type': 'subscript', 'children': ['26', '27']}; {'id': '26', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '27', 'type': 'slice', 'children': ['28', '29', '30']}; {'id': '28', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '29', 'type': 'colon', 'children': []}; {'id': '30', 'type': 'binary_operator', 'children': ['31', '32'], 'value': '+'}; {'id': '31', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '32', 'type': 'identifier', 'children': [], 'value': 'num_elems'}; {'id': '33', 'type': 'identifier', 'children': [], 'value': 'decode'}; {'id': '34', 'type': 'argument_list', 'children': ['35']}; {'id': '35', 'type': 'string', 'children': [], 'value': "'utf-8'"}; {'id': '36', 'type': 'for_in_clause', 'children': ['37', '38']}; {'id': '37', 'type': 'identifier', 'children': [], 'value': 'i'}; {'id': '38', 'type': 'call', 'children': ['39', '40']}; {'id': '39', 'type': 'identifier', 'children': [], 'value': 'range'}; {'id': '40', 'type': 'argument_list', 'children': ['41', '42', '47']}; {'id': '41', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '42', 'type': 'binary_operator', 'children': ['43', '46'], 'value': '*'}; {'id': '43', 'type': 'binary_operator', 'children': ['44', '45'], 'value': '*'}; {'id': '44', 'type': 'identifier', 'children': [], 'value': 'num_recs'}; {'id': '45', 'type': 'identifier', 'children': [], 'value': 'num_values'}; {'id': '46', 'type': 'identifier', 'children': [], 'value': 'num_elems'}; {'id': '47', 'type': 'identifier', 'children': [], 'value': 'num_elems'}; {'id': '48', 'type': 'else_clause', 'children': ['49']}; {'id': '49', 'type': 'block', 'children': ['50', '58', '67', '82', '92']}; {'id': '50', 'type': 'expression_statement', 'children': ['51']}; {'id': '51', 'type': 'assignment', 'children': ['52', '53']}; {'id': '52', 'type': 'identifier', 'children': [], 'value': 'tofrom'}; {'id': '53', 'type': 'call', 'children': ['54', '57']}; {'id': '54', 'type': 'attribute', 'children': ['55', '56']}; {'id': '55', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '56', 'type': 'identifier', 'children': [], 'value': '_convert_option'}; {'id': '57', 'type': 'argument_list', 'children': []}; {'id': '58', 'type': 'expression_statement', 'children': ['59']}; {'id': '59', 'type': 'assignment', 'children': ['60', '61']}; {'id': '60', 'type': 'identifier', 'children': [], 'value': 'dt_string'}; {'id': '61', 'type': 'call', 'children': ['62', '65']}; {'id': '62', 'type': 'attribute', 'children': ['63', '64']}; {'id': '63', 'type': 'identifier', 'children': [], 'value': 'self'}; {'id': '64', 'type': 'identifier', 'children': [], 'value': '_convert_type'}; {'id': '65', 'type': 'argument_list', 'children': ['66']}; {'id': '66', 'type': 'identifier', 'children': [], 'value': 'data_type'}; {'id': '67', 'type': 'expression_statement', 'children': ['68']}; {'id': '68', 'type': 'assignment', 'children': ['69', '70']}; {'id': '69', 'type': 'identifier', 'children': [], 'value': 'form'}; {'id': '70', 'type': 'binary_operator', 'children': ['71', '81'], 'value': '+'}; {'id': '71', 'type': 'binary_operator', 'children': ['72', '73'], 'value': '+'}; {'id': '72', 'type': 'identifier', 'children': [], 'value': 'tofrom'}; {'id': '73', 'type': 'call', 'children': ['74', '75']}; {'id': '74', 'type': 'identifier', 'children': [], 'value': 'str'}; {'id': '75', 'type': 'argument_list', 'children': ['76']}; {'id': '76', 'type': 'binary_operator', 'children': ['77', '80'], 'value': '*'}; {'id': '77', 'type': 'binary_operator', 'children': ['78', '79'], 'value': '*'}; {'id': '78', 'type': 'identifier', 'children': [], 'value': 'num_recs'}; {'id': '79', 'type': 'identifier', 'children': [], 'value': 'num_values'}; {'id': '80', 'type': 'identifier', 'children': [], 'value': 'num_elems'}; {'id': '81', 'type': 'identifier', 'children': [], 'value': 'dt_string'}; {'id': '82', 'type': 'expression_statement', 'children': ['83']}; {'id': '83', 'type': 'assignment', 'children': ['84', '85']}; {'id': '84', 'type': 'identifier', 'children': [], 'value': 'value_len'}; {'id': '85', 'type': 'call', 'children': ['86', '89']}; {'id': '86', 'type': 'attribute', 'children': ['87', '88']}; {'id': '87', 'type': 'identifier', 'children': [], 'value': 'CDF'}; {'id': '88', 'type': 'identifier', 'children': [], 'value': '_type_size'}; {'id': '89', 'type': 'argument_list', 'children': ['90', '91']}; {'id': '90', 'type': 'identifier', 'children': [], 'value': 'data_type'}; {'id': '91', 'type': 'identifier', 'children': [], 'value': 'num_elems'}; {'id': '92', 'type': 'return_statement', 'children': ['93']}; {'id': '93', 'type': 'call', 'children': ['94', '95']}; {'id': '94', 'type': 'identifier', 'children': [], 'value': 'list'}; {'id': '95', 'type': 'argument_list', 'children': ['96']}; {'id': '96', 'type': 'call', 'children': ['97', '100']}; {'id': '97', 'type': 'attribute', 'children': ['98', '99']}; {'id': '98', 'type': 'identifier', 'children': [], 'value': 'struct'}; {'id': '99', 'type': 'identifier', 'children': [], 'value': 'unpack_from'}; {'id': '100', 'type': 'argument_list', 'children': ['101', '102']}; {'id': '101', 'type': 'identifier', 'children': [], 'value': 'form'}; {'id': '102', 'type': 'subscript', 'children': ['103', '104']}; {'id': '103', 'type': 'identifier', 'children': [], 'value': 'data'}; {'id': '104', 'type': 'slice', 'children': ['105', '106', '107']}; {'id': '105', 'type': 'integer', 'children': [], 'value': '0'}; {'id': '106', 'type': 'colon', 'children': []}; {'id': '107', 'type': 'binary_operator', 'children': ['108', '111'], 'value': '*'}; {'id': '108', 'type': 'binary_operator', 'children': ['109', '110'], 'value': '*'}; {'id': '109', 'type': 'identifier', 'children': [], 'value': 'num_recs'}; {'id': '110', 'type': 'identifier', 'children': [], 'value': 'num_values'}; {'id': '111', 'type': 'identifier', 'children': [], 'value': 'value_len'}
|
Converts data to the appropriate type using the struct.unpack method,
rather than using numpy.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.