body_hash stringlengths 64 64 | body stringlengths 23 109k | docstring stringlengths 1 57k | path stringlengths 4 198 | name stringlengths 1 115 | repository_name stringlengths 7 111 | repository_stars float64 0 191k | lang stringclasses 1
value | body_without_docstring stringlengths 14 108k | unified stringlengths 45 133k |
|---|---|---|---|---|---|---|---|---|---|
0cbb4762846fe5b857f638ea7626bc667672a695f1b01d92d302e06aeb954cc9 | def p_names1(t):
'names : GREATEST PARA exp_list PARC\n | LEAST PARA exp_list PARC\n '
token = t.slice[1]
cadena = str(token.type)
lista = None
childsProduction = []
if (t[3] != None):
lista = t[3][0]
childsProduction.append(lista.graph_r... | names : GREATEST PARA exp_list PARC
| LEAST PARA exp_list PARC | parser/fase2/team03/grammarReview.py | p_names1 | JohnnyBro/tytus | 0 | python | def p_names1(t):
'names : GREATEST PARA exp_list PARC\n | LEAST PARA exp_list PARC\n '
token = t.slice[1]
cadena = str(token.type)
lista = None
childsProduction = []
if (t[3] != None):
lista = t[3][0]
childsProduction.append(lista.graph_r... | def p_names1(t):
'names : GREATEST PARA exp_list PARC\n | LEAST PARA exp_list PARC\n '
token = t.slice[1]
cadena = str(token.type)
lista = None
childsProduction = []
if (t[3] != None):
lista = t[3][0]
childsProduction.append(lista.graph_r... |
437a1558790c6d095aa2198055e10616eb595b19271f8794eae0575df76f0150 | def p_group_clause(t):
'group_clause : GROUP BY PARA group_list PARC\n '
childsProduction = addNotNoneChild(t, [4])
graph_ref = graph_node(str('group_clause'), [t[1], t[2], t[3], t[4], t[5]], childsProduction)
addCad("**\\<GROUP_CLAUSE>** ::= tGroup tBy '(' \\<GROUP_LIST> ')' ")
t[0] = upNodo('... | group_clause : GROUP BY PARA group_list PARC | parser/fase2/team03/grammarReview.py | p_group_clause | JohnnyBro/tytus | 0 | python | def p_group_clause(t):
'\n '
childsProduction = addNotNoneChild(t, [4])
graph_ref = graph_node(str('group_clause'), [t[1], t[2], t[3], t[4], t[5]], childsProduction)
addCad("**\\<GROUP_CLAUSE>** ::= tGroup tBy '(' \\<GROUP_LIST> ')' ")
t[0] = upNodo('token', 0, 0, graph_ref) | def p_group_clause(t):
'\n '
childsProduction = addNotNoneChild(t, [4])
graph_ref = graph_node(str('group_clause'), [t[1], t[2], t[3], t[4], t[5]], childsProduction)
addCad("**\\<GROUP_CLAUSE>** ::= tGroup tBy '(' \\<GROUP_LIST> ')' ")
t[0] = upNodo('token', 0, 0, graph_ref)<|docstring|>group_c... |
f174d63b5cdb0333f8bde8ab92a9c421f41f4d6e55a07bd7887a42695f820024 | def p_group_list(t):
'group_list : group_list COMA col_name\n | col_name'
if (len(t) == 4):
childsProduction = addNotNoneChild(t, [1, 3])
graph_ref = graph_node(str('group_list'), [t[1], t[2], t[3]], childsProduction)
addCad("**\\<GROUP_LIST>** ::= \\<GROUP_LIST> ',... | group_list : group_list COMA col_name
| col_name | parser/fase2/team03/grammarReview.py | p_group_list | JohnnyBro/tytus | 0 | python | def p_group_list(t):
'group_list : group_list COMA col_name\n | col_name'
if (len(t) == 4):
childsProduction = addNotNoneChild(t, [1, 3])
graph_ref = graph_node(str('group_list'), [t[1], t[2], t[3]], childsProduction)
addCad("**\\<GROUP_LIST>** ::= \\<GROUP_LIST> ',... | def p_group_list(t):
'group_list : group_list COMA col_name\n | col_name'
if (len(t) == 4):
childsProduction = addNotNoneChild(t, [1, 3])
graph_ref = graph_node(str('group_list'), [t[1], t[2], t[3]], childsProduction)
addCad("**\\<GROUP_LIST>** ::= \\<GROUP_LIST> ',... |
fc3573d7c33fe47d04d58dd9cf77a7cf9685d621f19b6f4ed91bd7f724d4cfcf | def p_having_clause(t):
'having_clause : HAVING logicExpression'
childsProduction = addNotNoneChild(t, [2])
graph_ref = graph_node(str('having_clause'), [t[1], t[2]], childsProduction)
addCad('**\\<HAVING_CLAUSE>** ::= tHaving \\<LOGICEXPRESSION> ')
t[0] = upNodo('token', 0, 0, graph_ref) | having_clause : HAVING logicExpression | parser/fase2/team03/grammarReview.py | p_having_clause | JohnnyBro/tytus | 0 | python | def p_having_clause(t):
childsProduction = addNotNoneChild(t, [2])
graph_ref = graph_node(str('having_clause'), [t[1], t[2]], childsProduction)
addCad('**\\<HAVING_CLAUSE>** ::= tHaving \\<LOGICEXPRESSION> ')
t[0] = upNodo('token', 0, 0, graph_ref) | def p_having_clause(t):
childsProduction = addNotNoneChild(t, [2])
graph_ref = graph_node(str('having_clause'), [t[1], t[2]], childsProduction)
addCad('**\\<HAVING_CLAUSE>** ::= tHaving \\<LOGICEXPRESSION> ')
t[0] = upNodo('token', 0, 0, graph_ref)<|docstring|>having_clause : HAVING logicExpres... |
f1f1d991e8e6a5b5510e65177391539dd8d01b3a52b72e0f7d0f51a2fb2e5fe1 | def p_case_clause(t):
'case_clause : CASE case_inner ELSE expression\n | CASE case_inner'
if (len(t) == 5):
childsProduction = addNotNoneChild(t, [2, 4])
graph_ref = graph_node(str('case_clause'), [t[1], t[2], t[3], t[4]], childsProduction)
addCad('**\\<CASE_CLAUSE>**... | case_clause : CASE case_inner ELSE expression
| CASE case_inner | parser/fase2/team03/grammarReview.py | p_case_clause | JohnnyBro/tytus | 0 | python | def p_case_clause(t):
'case_clause : CASE case_inner ELSE expression\n | CASE case_inner'
if (len(t) == 5):
childsProduction = addNotNoneChild(t, [2, 4])
graph_ref = graph_node(str('case_clause'), [t[1], t[2], t[3], t[4]], childsProduction)
addCad('**\\<CASE_CLAUSE>**... | def p_case_clause(t):
'case_clause : CASE case_inner ELSE expression\n | CASE case_inner'
if (len(t) == 5):
childsProduction = addNotNoneChild(t, [2, 4])
graph_ref = graph_node(str('case_clause'), [t[1], t[2], t[3], t[4]], childsProduction)
addCad('**\\<CASE_CLAUSE>**... |
69143604e0d8434e9924971992fb594bb14998fb725f51d2d3dff7c736c6d772 | def p_case_inner(t):
'case_inner : case_inner WHEN logicExpression THEN expression\n | WHEN logicExpression THEN expression'
if (len(t) == 6):
childsProduction = addNotNoneChild(t, [1, 3, 5])
graph_ref = graph_node(str('case_inner'), [t[1], t[2], t[3], t[4], t[5]], childsPro... | case_inner : case_inner WHEN logicExpression THEN expression
| WHEN logicExpression THEN expression | parser/fase2/team03/grammarReview.py | p_case_inner | JohnnyBro/tytus | 0 | python | def p_case_inner(t):
'case_inner : case_inner WHEN logicExpression THEN expression\n | WHEN logicExpression THEN expression'
if (len(t) == 6):
childsProduction = addNotNoneChild(t, [1, 3, 5])
graph_ref = graph_node(str('case_inner'), [t[1], t[2], t[3], t[4], t[5]], childsPro... | def p_case_inner(t):
'case_inner : case_inner WHEN logicExpression THEN expression\n | WHEN logicExpression THEN expression'
if (len(t) == 6):
childsProduction = addNotNoneChild(t, [1, 3, 5])
graph_ref = graph_node(str('case_inner'), [t[1], t[2], t[3], t[4], t[5]], childsPro... |
63151f9e7296312228a826acaef808cf9e386e74165c4148c147b91983c282bf | def p_time_ops(t):
'time_ops : EXTRACT PARA ops_from_ts FECHA_HORA PARC\n | DATE_PART PARA TEXTO COMA INTERVAL TEXTO PARC\n | TIMESTAMP TEXTO\n | CURRENT_DATE\n | CURRENT_TIME\n '
if (len(t) == 6):
token = t.slice... | time_ops : EXTRACT PARA ops_from_ts FECHA_HORA PARC
| DATE_PART PARA TEXTO COMA INTERVAL TEXTO PARC
| TIMESTAMP TEXTO
| CURRENT_DATE
| CURRENT_TIME | parser/fase2/team03/grammarReview.py | p_time_ops | JohnnyBro/tytus | 0 | python | def p_time_ops(t):
'time_ops : EXTRACT PARA ops_from_ts FECHA_HORA PARC\n | DATE_PART PARA TEXTO COMA INTERVAL TEXTO PARC\n | TIMESTAMP TEXTO\n | CURRENT_DATE\n | CURRENT_TIME\n '
if (len(t) == 6):
token = t.slice... | def p_time_ops(t):
'time_ops : EXTRACT PARA ops_from_ts FECHA_HORA PARC\n | DATE_PART PARA TEXTO COMA INTERVAL TEXTO PARC\n | TIMESTAMP TEXTO\n | CURRENT_DATE\n | CURRENT_TIME\n '
if (len(t) == 6):
token = t.slice... |
e0240f93fad763d5b1a36096c9cf7c4c02adfa683e213ac3a00edb74918e89c3 | def p_ops_from_ts(t):
'ops_from_ts : YEAR FROM TIMESTAMP\n | HOUR FROM TIMESTAMP\n | MINUTE FROM TIMESTAMP\n | SECOND FROM TIMESTAMP\n | MONTH FROM TIMESTAMP\n | DAY FROM TIMESTAMP\n '
token = t.slice[1]
cadena = s... | ops_from_ts : YEAR FROM TIMESTAMP
| HOUR FROM TIMESTAMP
| MINUTE FROM TIMESTAMP
| SECOND FROM TIMESTAMP
| MONTH FROM TIMESTAMP
| DAY FROM TIMESTAMP | parser/fase2/team03/grammarReview.py | p_ops_from_ts | JohnnyBro/tytus | 0 | python | def p_ops_from_ts(t):
'ops_from_ts : YEAR FROM TIMESTAMP\n | HOUR FROM TIMESTAMP\n | MINUTE FROM TIMESTAMP\n | SECOND FROM TIMESTAMP\n | MONTH FROM TIMESTAMP\n | DAY FROM TIMESTAMP\n '
token = t.slice[1]
cadena = s... | def p_ops_from_ts(t):
'ops_from_ts : YEAR FROM TIMESTAMP\n | HOUR FROM TIMESTAMP\n | MINUTE FROM TIMESTAMP\n | SECOND FROM TIMESTAMP\n | MONTH FROM TIMESTAMP\n | DAY FROM TIMESTAMP\n '
token = t.slice[1]
cadena = s... |
f1f5baa546fdf250e2f9b482036b30ed3873408b65e053f8de9b1f2342495531 | def p_column_list_param_opt(t):
'column_list_param_opt : PARA column_list PARC \n | empty'
if (len(t) == 4):
lista = None
childsProduction = []
if (t[2] != None):
lista = t[2][0]
childsProduction.append(lista.graph_ref)
grap... | column_list_param_opt : PARA column_list PARC
| empty | parser/fase2/team03/grammarReview.py | p_column_list_param_opt | JohnnyBro/tytus | 0 | python | def p_column_list_param_opt(t):
'column_list_param_opt : PARA column_list PARC \n | empty'
if (len(t) == 4):
lista = None
childsProduction = []
if (t[2] != None):
lista = t[2][0]
childsProduction.append(lista.graph_ref)
grap... | def p_column_list_param_opt(t):
'column_list_param_opt : PARA column_list PARC \n | empty'
if (len(t) == 4):
lista = None
childsProduction = []
if (t[2] != None):
lista = t[2][0]
childsProduction.append(lista.graph_ref)
grap... |
5164f8f49a6a3c27404e66f4194e13d17f492217c4b696500e460a3c2512c228 | def p_column_list(t):
'column_list : column_list COMA ID\n | ID'
if (len(t) == 4):
lista = None
childsProduction = []
if (t[1] != None):
lista = t[1][0]
childsProduction.append(lista.graph_ref)
graph_ref = graph_node(str('column_list'),... | column_list : column_list COMA ID
| ID | parser/fase2/team03/grammarReview.py | p_column_list | JohnnyBro/tytus | 0 | python | def p_column_list(t):
'column_list : column_list COMA ID\n | ID'
if (len(t) == 4):
lista = None
childsProduction = []
if (t[1] != None):
lista = t[1][0]
childsProduction.append(lista.graph_ref)
graph_ref = graph_node(str('column_list'),... | def p_column_list(t):
'column_list : column_list COMA ID\n | ID'
if (len(t) == 4):
lista = None
childsProduction = []
if (t[1] != None):
lista = t[1][0]
childsProduction.append(lista.graph_ref)
graph_ref = graph_node(str('column_list'),... |
ace10d1f16a8d94b1c9f29e29ad1fc9ce099655222ed490c3fb42058ad3e8926 | def p_stm_update(t):
'stm_update : UPDATE ID SET update_list where_clause\n | UPDATE ID SET update_list'
token_up = t.slice[1]
if (len(t) == 6):
lista = None
childsProduction = addNotNoneChild(t, [5])
if (t[4] != None):
lista = t[4][0]
child... | stm_update : UPDATE ID SET update_list where_clause
| UPDATE ID SET update_list | parser/fase2/team03/grammarReview.py | p_stm_update | JohnnyBro/tytus | 0 | python | def p_stm_update(t):
'stm_update : UPDATE ID SET update_list where_clause\n | UPDATE ID SET update_list'
token_up = t.slice[1]
if (len(t) == 6):
lista = None
childsProduction = addNotNoneChild(t, [5])
if (t[4] != None):
lista = t[4][0]
child... | def p_stm_update(t):
'stm_update : UPDATE ID SET update_list where_clause\n | UPDATE ID SET update_list'
token_up = t.slice[1]
if (len(t) == 6):
lista = None
childsProduction = addNotNoneChild(t, [5])
if (t[4] != None):
lista = t[4][0]
child... |
1b61f6ef89aa40c29903cbfc788592e26cac3ff26c09a21a2efa07575c1468ee | def p_update_list(t):
'update_list : update_list COMA ID IGUAL logicExpression\n | ID IGUAL logicExpression'
if (len(t) == 6):
token_up = t.slice[3]
lista = None
childsProduction = addNotNoneChild(t, [5])
if (t[1] != None):
lista = t[1][0]
... | update_list : update_list COMA ID IGUAL logicExpression
| ID IGUAL logicExpression | parser/fase2/team03/grammarReview.py | p_update_list | JohnnyBro/tytus | 0 | python | def p_update_list(t):
'update_list : update_list COMA ID IGUAL logicExpression\n | ID IGUAL logicExpression'
if (len(t) == 6):
token_up = t.slice[3]
lista = None
childsProduction = addNotNoneChild(t, [5])
if (t[1] != None):
lista = t[1][0]
... | def p_update_list(t):
'update_list : update_list COMA ID IGUAL logicExpression\n | ID IGUAL logicExpression'
if (len(t) == 6):
token_up = t.slice[3]
lista = None
childsProduction = addNotNoneChild(t, [5])
if (t[1] != None):
lista = t[1][0]
... |
59d3d6856b15da17cb450a73a31a9b58b6c82f1560058955e8fb1c8c33424464 | def p_stm_use_db(t):
'stm_use_db : USE DATABASE ID\n | USE ID'
if (len(t) == 4):
tokenID = t.slice[3]
graph_ref = graph_node(str('stm_use_db'), [t[1], t[2], t[3]], [])
addCad('**\\<STM_USE_DB>** ::= tUse tDatabase tIdentifier ')
IDAST = Identifier(tokenID.val... | stm_use_db : USE DATABASE ID
| USE ID | parser/fase2/team03/grammarReview.py | p_stm_use_db | JohnnyBro/tytus | 0 | python | def p_stm_use_db(t):
'stm_use_db : USE DATABASE ID\n | USE ID'
if (len(t) == 4):
tokenID = t.slice[3]
graph_ref = graph_node(str('stm_use_db'), [t[1], t[2], t[3]], [])
addCad('**\\<STM_USE_DB>** ::= tUse tDatabase tIdentifier ')
IDAST = Identifier(tokenID.val... | def p_stm_use_db(t):
'stm_use_db : USE DATABASE ID\n | USE ID'
if (len(t) == 4):
tokenID = t.slice[3]
graph_ref = graph_node(str('stm_use_db'), [t[1], t[2], t[3]], [])
addCad('**\\<STM_USE_DB>** ::= tUse tDatabase tIdentifier ')
IDAST = Identifier(tokenID.val... |
019748b50349661c342820d2fe30c04a25f92783193ea72c1787c7de22852247 | def p_stm_delete(t):
'stm_delete : DELETE FROM ID where_clause\n | DELETE FROM ID'
token_del = t.slice[1]
if (len(t) == 5):
childsProduction = addNotNoneChild(t, [4])
graph_ref = graph_node(str('stm_delete'), [t[1], t[2], t[3], t[4]], childsProduction)
addCad('**... | stm_delete : DELETE FROM ID where_clause
| DELETE FROM ID | parser/fase2/team03/grammarReview.py | p_stm_delete | JohnnyBro/tytus | 0 | python | def p_stm_delete(t):
'stm_delete : DELETE FROM ID where_clause\n | DELETE FROM ID'
token_del = t.slice[1]
if (len(t) == 5):
childsProduction = addNotNoneChild(t, [4])
graph_ref = graph_node(str('stm_delete'), [t[1], t[2], t[3], t[4]], childsProduction)
addCad('**... | def p_stm_delete(t):
'stm_delete : DELETE FROM ID where_clause\n | DELETE FROM ID'
token_del = t.slice[1]
if (len(t) == 5):
childsProduction = addNotNoneChild(t, [4])
graph_ref = graph_node(str('stm_delete'), [t[1], t[2], t[3], t[4]], childsProduction)
addCad('**... |
faeaf529da732c4b2b2eaa171d82fbd7b67fbdf5411768f33bca11a76996eec6 | def p_where_clause(t):
'where_clause : WHERE predicateExpression'
childsProduction = addNotNoneChild(t, [2])
graph_ref = graph_node(str('where_clause'), [t[1], t[2]], childsProduction)
addCad('**\\<WHERE_CLAUSE>** ::= tWhere \\<EXP_PREDICATE>')
t[0] = Where(t[2], t.slice[1].lineno, t.slice[1].lexpos... | where_clause : WHERE predicateExpression | parser/fase2/team03/grammarReview.py | p_where_clause | JohnnyBro/tytus | 0 | python | def p_where_clause(t):
childsProduction = addNotNoneChild(t, [2])
graph_ref = graph_node(str('where_clause'), [t[1], t[2]], childsProduction)
addCad('**\\<WHERE_CLAUSE>** ::= tWhere \\<EXP_PREDICATE>')
t[0] = Where(t[2], t.slice[1].lineno, t.slice[1].lexpos, graph_ref) | def p_where_clause(t):
childsProduction = addNotNoneChild(t, [2])
graph_ref = graph_node(str('where_clause'), [t[1], t[2]], childsProduction)
addCad('**\\<WHERE_CLAUSE>** ::= tWhere \\<EXP_PREDICATE>')
t[0] = Where(t[2], t.slice[1].lineno, t.slice[1].lexpos, graph_ref)<|docstring|>where_clause : WH... |
d8ac659548e6ae6fd1126a3fae35a14ae2e741a6593f322c956f696bdf3b4069 | def p_stm_create(t):
'stm_create : CREATE or_replace_opt DATABASE if_not_exists_opt ID owner_opt mode_opt\n | CREATE TABLE ID PARA tab_create_list PARC inherits_opt\n | CREATE TYPE ID AS ENUM PARA exp_list PARC'
token = t.slice[1]
tok = t.slice[3]
if ((len(t) == 8... | stm_create : CREATE or_replace_opt DATABASE if_not_exists_opt ID owner_opt mode_opt
| CREATE TABLE ID PARA tab_create_list PARC inherits_opt
| CREATE TYPE ID AS ENUM PARA exp_list PARC | parser/fase2/team03/grammarReview.py | p_stm_create | JohnnyBro/tytus | 0 | python | def p_stm_create(t):
'stm_create : CREATE or_replace_opt DATABASE if_not_exists_opt ID owner_opt mode_opt\n | CREATE TABLE ID PARA tab_create_list PARC inherits_opt\n | CREATE TYPE ID AS ENUM PARA exp_list PARC'
token = t.slice[1]
tok = t.slice[3]
if ((len(t) == 8... | def p_stm_create(t):
'stm_create : CREATE or_replace_opt DATABASE if_not_exists_opt ID owner_opt mode_opt\n | CREATE TABLE ID PARA tab_create_list PARC inherits_opt\n | CREATE TYPE ID AS ENUM PARA exp_list PARC'
token = t.slice[1]
tok = t.slice[3]
if ((len(t) == 8... |
16c976753f0c22641a33147b3e6c94f6beffaaf530923b9d7b1de333cfd18e21 | def p_if__not_exist_opt(t):
'if_not_exists_opt : IF NOT EXISTS\n | empty'
if (len(t) == 4):
graph_ref = graph_node(str(((((str(t[1]) + ' ') + str(t[2])) + ' ') + str(t[3]))))
addCad('**\\<IF_EXISTS_OPT>** ::= tIf tNot tExists ')
t[0] = upNodo('token', 0, 0, ... | if_not_exists_opt : IF NOT EXISTS
| empty | parser/fase2/team03/grammarReview.py | p_if__not_exist_opt | JohnnyBro/tytus | 0 | python | def p_if__not_exist_opt(t):
'if_not_exists_opt : IF NOT EXISTS\n | empty'
if (len(t) == 4):
graph_ref = graph_node(str(((((str(t[1]) + ' ') + str(t[2])) + ' ') + str(t[3]))))
addCad('**\\<IF_EXISTS_OPT>** ::= tIf tNot tExists ')
t[0] = upNodo('token', 0, 0, ... | def p_if__not_exist_opt(t):
'if_not_exists_opt : IF NOT EXISTS\n | empty'
if (len(t) == 4):
graph_ref = graph_node(str(((((str(t[1]) + ' ') + str(t[2])) + ' ') + str(t[3]))))
addCad('**\\<IF_EXISTS_OPT>** ::= tIf tNot tExists ')
t[0] = upNodo('token', 0, 0, ... |
7ee5b1b0854df5cdcc5c60f78553425cdd2ccaed501207d22863d0f2175af284 | def p_tab_create_list(t):
'tab_create_list : tab_create_list COMA ID type nullable_opt primary_key_opt \n | ID type nullable_opt primary_key_opt'
if (len(t) == 7):
lista = None
childsProduction = addNotNoneChild(t, [4, 5, 6])
if (t[1] != None):
lista =... | tab_create_list : tab_create_list COMA ID type nullable_opt primary_key_opt
| ID type nullable_opt primary_key_opt | parser/fase2/team03/grammarReview.py | p_tab_create_list | JohnnyBro/tytus | 0 | python | def p_tab_create_list(t):
'tab_create_list : tab_create_list COMA ID type nullable_opt primary_key_opt \n | ID type nullable_opt primary_key_opt'
if (len(t) == 7):
lista = None
childsProduction = addNotNoneChild(t, [4, 5, 6])
if (t[1] != None):
lista =... | def p_tab_create_list(t):
'tab_create_list : tab_create_list COMA ID type nullable_opt primary_key_opt \n | ID type nullable_opt primary_key_opt'
if (len(t) == 7):
lista = None
childsProduction = addNotNoneChild(t, [4, 5, 6])
if (t[1] != None):
lista =... |
37872b97d2b3afc1247da7861457d2f8e99e5ca640137686c5815327086c145d | def p_primary_key_opt(t):
'primary_key_opt : PRIMARY KEY\n | empty'
if (len(t) == 3):
graph_ref = graph_node(str(((t[1] + ' ') + t[2])))
addCad('**\\<PRIMARY_KEY_OPT>** ::= tPrimary tKey ')
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] = None | primary_key_opt : PRIMARY KEY
| empty | parser/fase2/team03/grammarReview.py | p_primary_key_opt | JohnnyBro/tytus | 0 | python | def p_primary_key_opt(t):
'primary_key_opt : PRIMARY KEY\n | empty'
if (len(t) == 3):
graph_ref = graph_node(str(((t[1] + ' ') + t[2])))
addCad('**\\<PRIMARY_KEY_OPT>** ::= tPrimary tKey ')
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] = None | def p_primary_key_opt(t):
'primary_key_opt : PRIMARY KEY\n | empty'
if (len(t) == 3):
graph_ref = graph_node(str(((t[1] + ' ') + t[2])))
addCad('**\\<PRIMARY_KEY_OPT>** ::= tPrimary tKey ')
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] = None<|doc... |
8dca2b3afcf9f92f5357004a27f88f6450915b6c8e093ad8687d55cbae263329 | def p_nullable(t):
'nullable : NULL\n | NOT NULL'
if (len(t) == 2):
graph_ref = graph_node(str(t[1]), [], [])
addCad('**\\<NULLABLE>** ::= tNull ')
t[0] = Nullable(True, t.slice[1].lineno, t.slice[1].lexpos, graph_ref)
else:
graph_ref = graph_node(str(((t[1] + ... | nullable : NULL
| NOT NULL | parser/fase2/team03/grammarReview.py | p_nullable | JohnnyBro/tytus | 0 | python | def p_nullable(t):
'nullable : NULL\n | NOT NULL'
if (len(t) == 2):
graph_ref = graph_node(str(t[1]), [], [])
addCad('**\\<NULLABLE>** ::= tNull ')
t[0] = Nullable(True, t.slice[1].lineno, t.slice[1].lexpos, graph_ref)
else:
graph_ref = graph_node(str(((t[1] + ... | def p_nullable(t):
'nullable : NULL\n | NOT NULL'
if (len(t) == 2):
graph_ref = graph_node(str(t[1]), [], [])
addCad('**\\<NULLABLE>** ::= tNull ')
t[0] = Nullable(True, t.slice[1].lineno, t.slice[1].lexpos, graph_ref)
else:
graph_ref = graph_node(str(((t[1] + ... |
c24d9f33543da2229ff536f3eeebe966ad25c08c164bf7f240cbf0b98d74f01a | def p_nullable_opt(t):
'nullable_opt : nullable\n | empty'
token = t.slice[1]
if (token.type == 'nullable'):
addCad('**\\<NULLABLE_OPT>** ::= <NULLABLE> ')
t[0] = t[1]
else:
t[0] = None | nullable_opt : nullable
| empty | parser/fase2/team03/grammarReview.py | p_nullable_opt | JohnnyBro/tytus | 0 | python | def p_nullable_opt(t):
'nullable_opt : nullable\n | empty'
token = t.slice[1]
if (token.type == 'nullable'):
addCad('**\\<NULLABLE_OPT>** ::= <NULLABLE> ')
t[0] = t[1]
else:
t[0] = None | def p_nullable_opt(t):
'nullable_opt : nullable\n | empty'
token = t.slice[1]
if (token.type == 'nullable'):
addCad('**\\<NULLABLE_OPT>** ::= <NULLABLE> ')
t[0] = t[1]
else:
t[0] = None<|docstring|>nullable_opt : nullable
| empty<|endoftext|> |
4418be538596b15fcaf8af526eb8c195e04555f350f3bac7ec17fd1612a1bb88 | def p_inherits_opt(t):
'inherits_opt : INHERITS PARA ID PARC\n | empty'
if (len(t) == 5):
graph_ref = graph_node(str(((((((t[1] + ' ') + str(t[2])) + ' ') + str(t[3])) + ' ') + str(t[4]))))
addCad("**\\<INHERITS_OPT>** ::= tInherits '(' tIdentifier ')' ")
token = t.sl... | inherits_opt : INHERITS PARA ID PARC
| empty | parser/fase2/team03/grammarReview.py | p_inherits_opt | JohnnyBro/tytus | 0 | python | def p_inherits_opt(t):
'inherits_opt : INHERITS PARA ID PARC\n | empty'
if (len(t) == 5):
graph_ref = graph_node(str(((((((t[1] + ' ') + str(t[2])) + ' ') + str(t[3])) + ' ') + str(t[4]))))
addCad("**\\<INHERITS_OPT>** ::= tInherits '(' tIdentifier ')' ")
token = t.sl... | def p_inherits_opt(t):
'inherits_opt : INHERITS PARA ID PARC\n | empty'
if (len(t) == 5):
graph_ref = graph_node(str(((((((t[1] + ' ') + str(t[2])) + ' ') + str(t[3])) + ' ') + str(t[4]))))
addCad("**\\<INHERITS_OPT>** ::= tInherits '(' tIdentifier ')' ")
token = t.sl... |
287ec048d0ea4444220a53a73a8578b7bbe120366d3cb4ba347650ba1f580ae9 | def p_owner_opt(t):
'owner_opt : OWNER IGUAL ID\n | OWNER IGUAL TEXTO'
graph_ref = graph_node(str(((((t[1] + ' ') + t[2]) + ' ') + t[3])))
addCad("**\\<OWNER_OPT>** ::= tOwner '=' [tTexto | tIdentifier ] ")
tokenID = t.slice[3]
t[0] = Identifier(tokenID.value, tokenID.lineno, ... | owner_opt : OWNER IGUAL ID
| OWNER IGUAL TEXTO | parser/fase2/team03/grammarReview.py | p_owner_opt | JohnnyBro/tytus | 0 | python | def p_owner_opt(t):
'owner_opt : OWNER IGUAL ID\n | OWNER IGUAL TEXTO'
graph_ref = graph_node(str(((((t[1] + ' ') + t[2]) + ' ') + t[3])))
addCad("**\\<OWNER_OPT>** ::= tOwner '=' [tTexto | tIdentifier ] ")
tokenID = t.slice[3]
t[0] = Identifier(tokenID.value, tokenID.lineno, ... | def p_owner_opt(t):
'owner_opt : OWNER IGUAL ID\n | OWNER IGUAL TEXTO'
graph_ref = graph_node(str(((((t[1] + ' ') + t[2]) + ' ') + t[3])))
addCad("**\\<OWNER_OPT>** ::= tOwner '=' [tTexto | tIdentifier ] ")
tokenID = t.slice[3]
t[0] = Identifier(tokenID.value, tokenID.lineno, ... |
683e372c1929f18c1bd2c4e7bd56964de94d1cde04c5a947a10f23c39e1501d7 | def p_owner_opt0(t):
'owner_opt : OWNER ID\n | OWNER TEXTO'
tokenID = t.slice[2]
graph_ref = graph_node(str(((t[1] + ' ') + t[2])))
addCad('**\\<OWNER_OPT>** ::= tOwner [tTexto | tIdentifier ] ')
t[0] = Identifier(tokenID.value, tokenID.lineno, tokenID.lexpos, graph_ref) | owner_opt : OWNER ID
| OWNER TEXTO | parser/fase2/team03/grammarReview.py | p_owner_opt0 | JohnnyBro/tytus | 0 | python | def p_owner_opt0(t):
'owner_opt : OWNER ID\n | OWNER TEXTO'
tokenID = t.slice[2]
graph_ref = graph_node(str(((t[1] + ' ') + t[2])))
addCad('**\\<OWNER_OPT>** ::= tOwner [tTexto | tIdentifier ] ')
t[0] = Identifier(tokenID.value, tokenID.lineno, tokenID.lexpos, graph_ref) | def p_owner_opt0(t):
'owner_opt : OWNER ID\n | OWNER TEXTO'
tokenID = t.slice[2]
graph_ref = graph_node(str(((t[1] + ' ') + t[2])))
addCad('**\\<OWNER_OPT>** ::= tOwner [tTexto | tIdentifier ] ')
t[0] = Identifier(tokenID.value, tokenID.lineno, tokenID.lexpos, graph_ref)<|docs... |
4f7ec851b404439774d85042ef6a13827a8f52e990889c7753216ed5c519eb0d | def p_owner_opt1(t):
'owner_opt : empty'
t[0] = None | owner_opt : empty | parser/fase2/team03/grammarReview.py | p_owner_opt1 | JohnnyBro/tytus | 0 | python | def p_owner_opt1(t):
t[0] = None | def p_owner_opt1(t):
t[0] = None<|docstring|>owner_opt : empty<|endoftext|> |
1ddd8c4a016ce6704787b48b79dc041b68c1c03071e94672bc6587fb3c1e8109 | def p_mode_opt(t):
'mode_opt : MODE IGUAL ENTERO'
tokenID = t.slice[3]
graph_ref = graph_node(str(((((t[1] + ' ') + t[2]) + ' ') + str(t[3]))))
addCad("**\\<MODE_OPT>** ::= tMode '=' tEntero ")
t[0] = Numeric(tokenID.value, tokenID.lineno, tokenID.lexpos, graph_ref) | mode_opt : MODE IGUAL ENTERO | parser/fase2/team03/grammarReview.py | p_mode_opt | JohnnyBro/tytus | 0 | python | def p_mode_opt(t):
tokenID = t.slice[3]
graph_ref = graph_node(str(((((t[1] + ' ') + t[2]) + ' ') + str(t[3]))))
addCad("**\\<MODE_OPT>** ::= tMode '=' tEntero ")
t[0] = Numeric(tokenID.value, tokenID.lineno, tokenID.lexpos, graph_ref) | def p_mode_opt(t):
tokenID = t.slice[3]
graph_ref = graph_node(str(((((t[1] + ' ') + t[2]) + ' ') + str(t[3]))))
addCad("**\\<MODE_OPT>** ::= tMode '=' tEntero ")
t[0] = Numeric(tokenID.value, tokenID.lineno, tokenID.lexpos, graph_ref)<|docstring|>mode_opt : MODE IGUAL ENTERO<|endoftext|> |
f5a0d0e7dad4ecec9da054711ef8c2836e3a7424d137936185ec813d601d3508 | def p_mode_opt1(t):
'mode_opt : MODE ENTERO'
tokenID = t.slice[2]
graph_ref = graph_node(str(((t[1] + ' ') + str(t[2]))))
addCad('**\\<MODE_OPT>** ::= tMode tEntero ')
t[0] = Numeric(tokenID.value, tokenID.lineno, tokenID.lexpos, graph_ref) | mode_opt : MODE ENTERO | parser/fase2/team03/grammarReview.py | p_mode_opt1 | JohnnyBro/tytus | 0 | python | def p_mode_opt1(t):
tokenID = t.slice[2]
graph_ref = graph_node(str(((t[1] + ' ') + str(t[2]))))
addCad('**\\<MODE_OPT>** ::= tMode tEntero ')
t[0] = Numeric(tokenID.value, tokenID.lineno, tokenID.lexpos, graph_ref) | def p_mode_opt1(t):
tokenID = t.slice[2]
graph_ref = graph_node(str(((t[1] + ' ') + str(t[2]))))
addCad('**\\<MODE_OPT>** ::= tMode tEntero ')
t[0] = Numeric(tokenID.value, tokenID.lineno, tokenID.lexpos, graph_ref)<|docstring|>mode_opt : MODE ENTERO<|endoftext|> |
7643b7a5006325ffa0bdcda3c11eb18f9463d3232ae3022b6963b5af1e5773f6 | def p_mode_opt2(t):
'mode_opt : empty'
t[0] = None | mode_opt : empty | parser/fase2/team03/grammarReview.py | p_mode_opt2 | JohnnyBro/tytus | 0 | python | def p_mode_opt2(t):
t[0] = None | def p_mode_opt2(t):
t[0] = None<|docstring|>mode_opt : empty<|endoftext|> |
8a62aab3644c91c2f187821f9ad20d81c315070b741e900a281bbd104c8c3def | def p_or_replace_opt(t):
'or_replace_opt : OR REPLACE\n | empty'
if (len(t) == 3):
graph_ref = graph_node(str(((t[1] + ' ') + t[2])))
addCad('**\\<OR_REPLACE_OPT>** ::= tOr tReplace ')
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] = None | or_replace_opt : OR REPLACE
| empty | parser/fase2/team03/grammarReview.py | p_or_replace_opt | JohnnyBro/tytus | 0 | python | def p_or_replace_opt(t):
'or_replace_opt : OR REPLACE\n | empty'
if (len(t) == 3):
graph_ref = graph_node(str(((t[1] + ' ') + t[2])))
addCad('**\\<OR_REPLACE_OPT>** ::= tOr tReplace ')
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] = None | def p_or_replace_opt(t):
'or_replace_opt : OR REPLACE\n | empty'
if (len(t) == 3):
graph_ref = graph_node(str(((t[1] + ' ') + t[2])))
addCad('**\\<OR_REPLACE_OPT>** ::= tOr tReplace ')
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] = None<|docstri... |
092f80faf8c0fc3bdc0cdc3f3456f05fe8c1ba2cb3e09d1b76e3843240b946e1 | def p_stm_alter(t):
'stm_alter : ALTER DATABASE ID RENAME TO ID \n | ALTER DATABASE ID OWNER TO db_owner\n'
token_alter = t.slice[4]
if (token_alter.type == 'RENAME'):
graph_ref = graph_node(str('stm_alter'), [t[1], t[2], t[3], t[4], t[5], t[6]], [])
addCad('**... | stm_alter : ALTER DATABASE ID RENAME TO ID
| ALTER DATABASE ID OWNER TO db_owner | parser/fase2/team03/grammarReview.py | p_stm_alter | JohnnyBro/tytus | 0 | python | def p_stm_alter(t):
'stm_alter : ALTER DATABASE ID RENAME TO ID \n | ALTER DATABASE ID OWNER TO db_owner\n'
token_alter = t.slice[4]
if (token_alter.type == 'RENAME'):
graph_ref = graph_node(str('stm_alter'), [t[1], t[2], t[3], t[4], t[5], t[6]], [])
addCad('**... | def p_stm_alter(t):
'stm_alter : ALTER DATABASE ID RENAME TO ID \n | ALTER DATABASE ID OWNER TO db_owner\n'
token_alter = t.slice[4]
if (token_alter.type == 'RENAME'):
graph_ref = graph_node(str('stm_alter'), [t[1], t[2], t[3], t[4], t[5], t[6]], [])
addCad('**... |
b3ed5beead4dca3c38926aa63581583085c3e68c7f0d5ab9882c97f1e5cad5e9 | def p_stm_alter0(t):
'stm_alter : ALTER TABLE ID DROP CONSTRAINT ID\n | ALTER TABLE ID DROP COLUMN ID\n'
token_alter = t.slice[5]
if (token_alter.type == 'CONSTRAINT'):
graph_ref = graph_node(str('stm_alter'), [t[1], t[2], t[3], t[4], t[5], t[6]], [])
addCad('**\\... | stm_alter : ALTER TABLE ID DROP CONSTRAINT ID
| ALTER TABLE ID DROP COLUMN ID | parser/fase2/team03/grammarReview.py | p_stm_alter0 | JohnnyBro/tytus | 0 | python | def p_stm_alter0(t):
'stm_alter : ALTER TABLE ID DROP CONSTRAINT ID\n | ALTER TABLE ID DROP COLUMN ID\n'
token_alter = t.slice[5]
if (token_alter.type == 'CONSTRAINT'):
graph_ref = graph_node(str('stm_alter'), [t[1], t[2], t[3], t[4], t[5], t[6]], [])
addCad('**\\... | def p_stm_alter0(t):
'stm_alter : ALTER TABLE ID DROP CONSTRAINT ID\n | ALTER TABLE ID DROP COLUMN ID\n'
token_alter = t.slice[5]
if (token_alter.type == 'CONSTRAINT'):
graph_ref = graph_node(str('stm_alter'), [t[1], t[2], t[3], t[4], t[5], t[6]], [])
addCad('**\\... |
4ead98ace700a4e22824d7615cbd021f1c915601dc94a0dec9c18517452c5966 | def p_stm_alter1(t):
'stm_alter : ALTER TABLE ID ADD COLUMN ID type nullable_opt\n | ALTER TABLE ID ADD CHECK PARA logicExpression PARC\n | ALTER TABLE ID ALTER COLUMN ID TYPE type param_int_opt\n'
token_alter = t.slice[6]
if ((token_alter.type == 'ID') and ... | stm_alter : ALTER TABLE ID ADD COLUMN ID type nullable_opt
| ALTER TABLE ID ADD CHECK PARA logicExpression PARC
| ALTER TABLE ID ALTER COLUMN ID TYPE type param_int_opt | parser/fase2/team03/grammarReview.py | p_stm_alter1 | JohnnyBro/tytus | 0 | python | def p_stm_alter1(t):
'stm_alter : ALTER TABLE ID ADD COLUMN ID type nullable_opt\n | ALTER TABLE ID ADD CHECK PARA logicExpression PARC\n | ALTER TABLE ID ALTER COLUMN ID TYPE type param_int_opt\n'
token_alter = t.slice[6]
if ((token_alter.type == 'ID') and ... | def p_stm_alter1(t):
'stm_alter : ALTER TABLE ID ADD COLUMN ID type nullable_opt\n | ALTER TABLE ID ADD CHECK PARA logicExpression PARC\n | ALTER TABLE ID ALTER COLUMN ID TYPE type param_int_opt\n'
token_alter = t.slice[6]
if ((token_alter.type == 'ID') and ... |
89ba943a6c476b454caa1f319af839011121403f30c8dd6094550bf27ac5348c | def p_stm_alter2(t):
'stm_alter : ALTER TABLE ID RENAME COLUMN ID TO ID\n | ALTER TABLE ID ALTER COLUMN ID SET NULL\n | ALTER TABLE ID ALTER COLUMN ID SET NOT NULL \n | ALTER TABLE ID ADD CONSTRAINT ID UNIQUE PARA ID PARC\n |... | stm_alter : ALTER TABLE ID RENAME COLUMN ID TO ID
| ALTER TABLE ID ALTER COLUMN ID SET NULL
| ALTER TABLE ID ALTER COLUMN ID SET NOT NULL
| ALTER TABLE ID ADD CONSTRAINT ID UNIQUE PARA ID PARC
| ALTER TABLE ID ADD FOREIGN KEY PARA ID PARC REFERENCES ID | parser/fase2/team03/grammarReview.py | p_stm_alter2 | JohnnyBro/tytus | 0 | python | def p_stm_alter2(t):
'stm_alter : ALTER TABLE ID RENAME COLUMN ID TO ID\n | ALTER TABLE ID ALTER COLUMN ID SET NULL\n | ALTER TABLE ID ALTER COLUMN ID SET NOT NULL \n | ALTER TABLE ID ADD CONSTRAINT ID UNIQUE PARA ID PARC\n |... | def p_stm_alter2(t):
'stm_alter : ALTER TABLE ID RENAME COLUMN ID TO ID\n | ALTER TABLE ID ALTER COLUMN ID SET NULL\n | ALTER TABLE ID ALTER COLUMN ID SET NOT NULL \n | ALTER TABLE ID ADD CONSTRAINT ID UNIQUE PARA ID PARC\n |... |
832751ed77a930451ce8351d47bac5e48eef60d0183a6d13f9c0d8e83d6e6904 | def p_param_int_opt(t):
'param_int_opt : PARA ENTERO PARC\n | empty'
if (len(t) == 4):
graph_ref = graph_node(str(((((t[1] + ' ') + t[2]) + ' ') + t[3])))
addCad("**\\<PARAM_INT_OPT>** ::= '(' tEntero ')' ")
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] =... | param_int_opt : PARA ENTERO PARC
| empty | parser/fase2/team03/grammarReview.py | p_param_int_opt | JohnnyBro/tytus | 0 | python | def p_param_int_opt(t):
'param_int_opt : PARA ENTERO PARC\n | empty'
if (len(t) == 4):
graph_ref = graph_node(str(((((t[1] + ' ') + t[2]) + ' ') + t[3])))
addCad("**\\<PARAM_INT_OPT>** ::= '(' tEntero ')' ")
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] =... | def p_param_int_opt(t):
'param_int_opt : PARA ENTERO PARC\n | empty'
if (len(t) == 4):
graph_ref = graph_node(str(((((t[1] + ' ') + t[2]) + ' ') + t[3])))
addCad("**\\<PARAM_INT_OPT>** ::= '(' tEntero ')' ")
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] =... |
8a739d2bee7282556ffb20d9f17a2465fb5b01fc8cbc41549ce63b3ebbcd589a | def p_db_owner(t):
' db_owner : ID\n | CURRENT_USER\n | SESSION_USER'
token_owner = t.slice[1]
if (token_owner.type == 'ID'):
graph_ref = graph_node(str(t[1]))
addCad('**\\<DB_OWNER>** ::= tTexto ')
t[0] = Identifier(t[1], token_owner.lineno, ... | db_owner : ID
| CURRENT_USER
| SESSION_USER | parser/fase2/team03/grammarReview.py | p_db_owner | JohnnyBro/tytus | 0 | python | def p_db_owner(t):
' db_owner : ID\n | CURRENT_USER\n | SESSION_USER'
token_owner = t.slice[1]
if (token_owner.type == 'ID'):
graph_ref = graph_node(str(t[1]))
addCad('**\\<DB_OWNER>** ::= tTexto ')
t[0] = Identifier(t[1], token_owner.lineno, ... | def p_db_owner(t):
' db_owner : ID\n | CURRENT_USER\n | SESSION_USER'
token_owner = t.slice[1]
if (token_owner.type == 'ID'):
graph_ref = graph_node(str(t[1]))
addCad('**\\<DB_OWNER>** ::= tTexto ')
t[0] = Identifier(t[1], token_owner.lineno, ... |
a90a1e96fe84ab88f0ccd69a2586dd97df8871657dabbd6120a3cb2741a7dfbd | def p_stm_drop(t):
'stm_drop : DROP DATABASE if_exists_opt ID\n | DROP TABLE ID'
token = t.slice[1]
if (len(t) == 5):
tokenID = t.slice[4]
childsProduction = addNotNoneChild(t, [3])
graph_ref = graph_node(str('stm_drop'), [t[1], t[2], t[3], t[4]], childsProduction)
... | stm_drop : DROP DATABASE if_exists_opt ID
| DROP TABLE ID | parser/fase2/team03/grammarReview.py | p_stm_drop | JohnnyBro/tytus | 0 | python | def p_stm_drop(t):
'stm_drop : DROP DATABASE if_exists_opt ID\n | DROP TABLE ID'
token = t.slice[1]
if (len(t) == 5):
tokenID = t.slice[4]
childsProduction = addNotNoneChild(t, [3])
graph_ref = graph_node(str('stm_drop'), [t[1], t[2], t[3], t[4]], childsProduction)
... | def p_stm_drop(t):
'stm_drop : DROP DATABASE if_exists_opt ID\n | DROP TABLE ID'
token = t.slice[1]
if (len(t) == 5):
tokenID = t.slice[4]
childsProduction = addNotNoneChild(t, [3])
graph_ref = graph_node(str('stm_drop'), [t[1], t[2], t[3], t[4]], childsProduction)
... |
3b494b5031042bdc12e7d7d4fed1d70717157710bf416305a661393209548801 | def p_if_exist_opt(t):
'if_exists_opt : IF EXISTS\n | empty'
if (len(t) == 3):
graph_ref = graph_node(str(((str(t[1]) + ' ') + str(t[2]))))
addCad('**\\<IF_EXISTS_OPT>** ::= tIf tExists ')
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] = None | if_exists_opt : IF EXISTS
| empty | parser/fase2/team03/grammarReview.py | p_if_exist_opt | JohnnyBro/tytus | 0 | python | def p_if_exist_opt(t):
'if_exists_opt : IF EXISTS\n | empty'
if (len(t) == 3):
graph_ref = graph_node(str(((str(t[1]) + ' ') + str(t[2]))))
addCad('**\\<IF_EXISTS_OPT>** ::= tIf tExists ')
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] = None | def p_if_exist_opt(t):
'if_exists_opt : IF EXISTS\n | empty'
if (len(t) == 3):
graph_ref = graph_node(str(((str(t[1]) + ' ') + str(t[2]))))
addCad('**\\<IF_EXISTS_OPT>** ::= tIf tExists ')
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] = None<|do... |
e3e94c409ac988b283ef182bfded9c71965810834b4363616d1b1cf5d4eba46c | def p_type(t):
' type : SMALLINT\n | INTEGER \n | BIGINT\n | DECIMAL PARA ENTERO COMA ENTERO PARC\n | NUMERIC PARA ENTERO COMA ENTERO PARC\n | REAL PARA ENTERO COMA ENTERO PARC\n | DOUBLE PRECISION PARA ENTER... | type : SMALLINT
| INTEGER
| BIGINT
| DECIMAL PARA ENTERO COMA ENTERO PARC
| NUMERIC PARA ENTERO COMA ENTERO PARC
| REAL PARA ENTERO COMA ENTERO PARC
| DOUBLE PRECISION PARA ENTERO COMA ENTERO PARC
| MONEY
| CARACTER VARYING
| VARCHAR PARA ENTERO PARC
| CHARACTER
| CHAR PARA ENTERO PARC
| TEXT
| TIMES... | parser/fase2/team03/grammarReview.py | p_type | JohnnyBro/tytus | 0 | python | def p_type(t):
' type : SMALLINT\n | INTEGER \n | BIGINT\n | DECIMAL PARA ENTERO COMA ENTERO PARC\n | NUMERIC PARA ENTERO COMA ENTERO PARC\n | REAL PARA ENTERO COMA ENTERO PARC\n | DOUBLE PRECISION PARA ENTER... | def p_type(t):
' type : SMALLINT\n | INTEGER \n | BIGINT\n | DECIMAL PARA ENTERO COMA ENTERO PARC\n | NUMERIC PARA ENTERO COMA ENTERO PARC\n | REAL PARA ENTERO COMA ENTERO PARC\n | DOUBLE PRECISION PARA ENTER... |
5495c31116856864e739d7a0736df02553568c31fc99590a0b118658345f9348 | def p_time(t):
' time : YEAR\n | MONTH\n | DAY\n | HOUR\n | MINUTE\n | SECOND'
graph_ref = graph_node(str(t[1]))
addCad(('**\\<TIME>** ::= ' + str(token.type)))
t[0] = upNodo('token', 0, 0, graph_ref) | time : YEAR
| MONTH
| DAY
| HOUR
| MINUTE
| SECOND | parser/fase2/team03/grammarReview.py | p_time | JohnnyBro/tytus | 0 | python | def p_time(t):
' time : YEAR\n | MONTH\n | DAY\n | HOUR\n | MINUTE\n | SECOND'
graph_ref = graph_node(str(t[1]))
addCad(('**\\<TIME>** ::= ' + str(token.type)))
t[0] = upNodo('token', 0, 0, graph_ref) | def p_time(t):
' time : YEAR\n | MONTH\n | DAY\n | HOUR\n | MINUTE\n | SECOND'
graph_ref = graph_node(str(t[1]))
addCad(('**\\<TIME>** ::= ' + str(token.type)))
t[0] = upNodo('token', 0, 0, graph_ref)<|docstring|>time : YEA... |
00173fabcc9afafdf94b57e3f1afac04ad55bdd3c9a43adfd8165883fd0d96d3 | def p_not_opt(t):
'not_opt : NOT\n | empty'
token = t.slice[1]
if (token.type == 'NOT'):
graph_ref = graph_node(str(t[1]))
addCad('**\\<NOT_OPT>** ::= tNot ')
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] = None | not_opt : NOT
| empty | parser/fase2/team03/grammarReview.py | p_not_opt | JohnnyBro/tytus | 0 | python | def p_not_opt(t):
'not_opt : NOT\n | empty'
token = t.slice[1]
if (token.type == 'NOT'):
graph_ref = graph_node(str(t[1]))
addCad('**\\<NOT_OPT>** ::= tNot ')
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] = None | def p_not_opt(t):
'not_opt : NOT\n | empty'
token = t.slice[1]
if (token.type == 'NOT'):
graph_ref = graph_node(str(t[1]))
addCad('**\\<NOT_OPT>** ::= tNot ')
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] = None<|docstring|>not_opt : NO... |
7647712654b9e160e1f302ac03c366d9549748dfe20178ed040da2f7c2ef2c89 | def p_percentopt(t):
'percentopt : PORCENTAJE\n | empty'
token = t.slice[1]
if (token.type == 'PORCENTAJE'):
graph_ref = graph_node(str(t[1]))
addCad("**\\<PERCENTOPT>** ::= '%' ")
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] = None | percentopt : PORCENTAJE
| empty | parser/fase2/team03/grammarReview.py | p_percentopt | JohnnyBro/tytus | 0 | python | def p_percentopt(t):
'percentopt : PORCENTAJE\n | empty'
token = t.slice[1]
if (token.type == 'PORCENTAJE'):
graph_ref = graph_node(str(t[1]))
addCad("**\\<PERCENTOPT>** ::= '%' ")
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] = None | def p_percentopt(t):
'percentopt : PORCENTAJE\n | empty'
token = t.slice[1]
if (token.type == 'PORCENTAJE'):
graph_ref = graph_node(str(t[1]))
addCad("**\\<PERCENTOPT>** ::= '%' ")
t[0] = upNodo('token', 0, 0, graph_ref)
else:
t[0] = None<|docstring|... |
b73023e73ec4bedba064ff22799ea504a07750b0e6d5e1c2dd7af67fc090dca4 | def p_stm_show0(t):
'stm_show : SHOW DATABASES\n | SHOW DATABASES LIKE TEXTO\n | SHOW DATABASES LIKE PATTERN_LIKE'
token = t.slice[1]
if (len(t) == 3):
graph_ref = graph_node(str('stm_show'), [t[1], t[2]], [])
addCad('**\\<STM_SHOW>** ::= tShow tData... | stm_show : SHOW DATABASES
| SHOW DATABASES LIKE TEXTO
| SHOW DATABASES LIKE PATTERN_LIKE | parser/fase2/team03/grammarReview.py | p_stm_show0 | JohnnyBro/tytus | 0 | python | def p_stm_show0(t):
'stm_show : SHOW DATABASES\n | SHOW DATABASES LIKE TEXTO\n | SHOW DATABASES LIKE PATTERN_LIKE'
token = t.slice[1]
if (len(t) == 3):
graph_ref = graph_node(str('stm_show'), [t[1], t[2]], [])
addCad('**\\<STM_SHOW>** ::= tShow tData... | def p_stm_show0(t):
'stm_show : SHOW DATABASES\n | SHOW DATABASES LIKE TEXTO\n | SHOW DATABASES LIKE PATTERN_LIKE'
token = t.slice[1]
if (len(t) == 3):
graph_ref = graph_node(str('stm_show'), [t[1], t[2]], [])
addCad('**\\<STM_SHOW>** ::= tShow tData... |
4ae6a19c4e5c3ac046a762cd5c94b6609d0c8580aeecdadbf4a9c3abd5462085 | def p_exp_list(t):
'exp_list : exp_list COMA expression'
lista = None
childsProduction = addNotNoneChild(t, [3])
if (t[1] != None):
lista = t[1][0]
childsProduction.append(lista.graph_ref)
graph_ref = graph_node(str('exp_list'), [lista, t[2], t[3]], childsProduction)
addCad("**\\... | exp_list : exp_list COMA expression | parser/fase2/team03/grammarReview.py | p_exp_list | JohnnyBro/tytus | 0 | python | def p_exp_list(t):
lista = None
childsProduction = addNotNoneChild(t, [3])
if (t[1] != None):
lista = t[1][0]
childsProduction.append(lista.graph_ref)
graph_ref = graph_node(str('exp_list'), [lista, t[2], t[3]], childsProduction)
addCad("**\\<EXP_LIST>** ::= <EXP_LIST> ',' \\<EX... | def p_exp_list(t):
lista = None
childsProduction = addNotNoneChild(t, [3])
if (t[1] != None):
lista = t[1][0]
childsProduction.append(lista.graph_ref)
graph_ref = graph_node(str('exp_list'), [lista, t[2], t[3]], childsProduction)
addCad("**\\<EXP_LIST>** ::= <EXP_LIST> ',' \\<EX... |
7800bfb82ff146a09286871a3e1fb63e644c0bf4435ef543a678cbdc184aabce | def p_exp_list0(t):
'exp_list : expression'
t[0] = [t[1]] | exp_list : expression | parser/fase2/team03/grammarReview.py | p_exp_list0 | JohnnyBro/tytus | 0 | python | def p_exp_list0(t):
t[0] = [t[1]] | def p_exp_list0(t):
t[0] = [t[1]]<|docstring|>exp_list : expression<|endoftext|> |
89216b911aac2cf4c5459ba30f0be43c4a44bad74db381c9cca5b9f0b2bb79d5 | def p_relExpression(t):
'relExpression : expression MENOR expression \n | expression MAYOR expression\n | expression IGUAL expression\n | expression MENORQ expression\n | expression MAYORQ expression\n ... | relExpression : expression MENOR expression
| expression MAYOR expression
| expression IGUAL expression
| expression MENORQ expression
| expression MAYORQ expression
| expression DIFERENTE expression
| expression NOT LIKE TEXTO
| expression LIKE TEXTO
| expression NOT LIKE PATTERN_LIKE
| expression LIKE PATTERN_L... | parser/fase2/team03/grammarReview.py | p_relExpression | JohnnyBro/tytus | 0 | python | def p_relExpression(t):
'relExpression : expression MENOR expression \n | expression MAYOR expression\n | expression IGUAL expression\n | expression MENORQ expression\n | expression MAYORQ expression\n ... | def p_relExpression(t):
'relExpression : expression MENOR expression \n | expression MAYOR expression\n | expression IGUAL expression\n | expression MENORQ expression\n | expression MAYORQ expression\n ... |
c362ae0bfa02bf28ab71a8df4fcb020355d7e784a19196de5b8b660c22ed0070 | def p_relExpReducExp(t):
'relExpression : expression'
t[0] = t[1]
addCad('**\\<EXP_REL>** ::= \\<EXP>') | relExpression : expression | parser/fase2/team03/grammarReview.py | p_relExpReducExp | JohnnyBro/tytus | 0 | python | def p_relExpReducExp(t):
t[0] = t[1]
addCad('**\\<EXP_REL>** ::= \\<EXP>') | def p_relExpReducExp(t):
t[0] = t[1]
addCad('**\\<EXP_REL>** ::= \\<EXP>')<|docstring|>relExpression : expression<|endoftext|> |
2b24622a57bc37ee52177ec083b9d9562ec99191f11f406ca98089b3ce4cc83b | def p_predicateExpression(t):
'predicateExpression : BETWEEN expression AND expression'
token = t.slice[1]
childsProduction = addNotNoneChild(t, [2, 4])
graph_ref = graph_node(str('EXP_PREDICATE'), [t[1], t[2], t[3], t[4]], childsProduction)
addCad('**\\<EXP_PREDICATE>** ::= tBetween \\<EXP> tAnd ... | predicateExpression : BETWEEN expression AND expression | parser/fase2/team03/grammarReview.py | p_predicateExpression | JohnnyBro/tytus | 0 | python | def p_predicateExpression(t):
token = t.slice[1]
childsProduction = addNotNoneChild(t, [2, 4])
graph_ref = graph_node(str('EXP_PREDICATE'), [t[1], t[2], t[3], t[4]], childsProduction)
addCad('**\\<EXP_PREDICATE>** ::= tBetween \\<EXP> tAnd \\<EXP> ')
t[0] = PredicateExpression(t[2], t[4], Op... | def p_predicateExpression(t):
token = t.slice[1]
childsProduction = addNotNoneChild(t, [2, 4])
graph_ref = graph_node(str('EXP_PREDICATE'), [t[1], t[2], t[3], t[4]], childsProduction)
addCad('**\\<EXP_PREDICATE>** ::= tBetween \\<EXP> tAnd \\<EXP> ')
t[0] = PredicateExpression(t[2], t[4], Op... |
2486abfed30c10700e1593f1f84004e51dfc8ecbb707dfad2397ec1a078b956e | def p_predicateExpression0(t):
'predicateExpression : logicExpression'
t[0] = t[1] | predicateExpression : logicExpression | parser/fase2/team03/grammarReview.py | p_predicateExpression0 | JohnnyBro/tytus | 0 | python | def p_predicateExpression0(t):
t[0] = t[1] | def p_predicateExpression0(t):
t[0] = t[1]<|docstring|>predicateExpression : logicExpression<|endoftext|> |
c387a737c284933cb8a1fd066e102c8317699cece7c40510c15d339365143b96 | def p_predicateExpression3(t):
'predicateExpression : logicExpression BETWEEN expression AND expression'
token = t.slice[2]
childsProduction = addNotNoneChild(t, [1, 3, 5])
graph_ref = graph_node(str('EXP_PREDICATE'), [t[1], t[2], t[3], t[4], t[5]], childsProduction)
addCad('**\\<EXP_PREDICATE>** :... | predicateExpression : logicExpression BETWEEN expression AND expression | parser/fase2/team03/grammarReview.py | p_predicateExpression3 | JohnnyBro/tytus | 0 | python | def p_predicateExpression3(t):
token = t.slice[2]
childsProduction = addNotNoneChild(t, [1, 3, 5])
graph_ref = graph_node(str('EXP_PREDICATE'), [t[1], t[2], t[3], t[4], t[5]], childsProduction)
addCad('**\\<EXP_PREDICATE>** ::= \\<EXP_LOG> tBetween \\<EXP> tAnd \\<EXP> ')
t[0] = PredicateEx... | def p_predicateExpression3(t):
token = t.slice[2]
childsProduction = addNotNoneChild(t, [1, 3, 5])
graph_ref = graph_node(str('EXP_PREDICATE'), [t[1], t[2], t[3], t[4], t[5]], childsProduction)
addCad('**\\<EXP_PREDICATE>** ::= \\<EXP_LOG> tBetween \\<EXP> tAnd \\<EXP> ')
t[0] = PredicateEx... |
cdcddb23c726bc5c3eff7e7ac938074221e4e2314ccce845543e0ed685a09bf4 | def p_predicateExpression1(t):
'predicateExpression : expression IS NULL\n | expression IS DISTINCT FROM expression\n | expression IS BOOLEAN_VALUE \n | expression IS UNKNOWN '
token = t.slice[3]
if (token.type == 'NULL'):
... | predicateExpression : expression IS NULL
| expression IS DISTINCT FROM expression
| expression IS BOOLEAN_VALUE
| expression IS UNKNOWN | parser/fase2/team03/grammarReview.py | p_predicateExpression1 | JohnnyBro/tytus | 0 | python | def p_predicateExpression1(t):
'predicateExpression : expression IS NULL\n | expression IS DISTINCT FROM expression\n | expression IS BOOLEAN_VALUE \n | expression IS UNKNOWN '
token = t.slice[3]
if (token.type == 'NULL'):
... | def p_predicateExpression1(t):
'predicateExpression : expression IS NULL\n | expression IS DISTINCT FROM expression\n | expression IS BOOLEAN_VALUE \n | expression IS UNKNOWN '
token = t.slice[3]
if (token.type == 'NULL'):
... |
d3c4aa28d91bc54fbcb74bf5624a42b93663ed4623607f4d683189b0fb8873bb | def p_predicateExpression2(t):
'predicateExpression : expression IS NOT NULL\n | expression IS NOT DISTINCT FROM expression\n | expression IS NOT BOOLEAN_VALUE \n | expression IS NOT UNKNOWN '
token = t.slice[4]
if (token.ty... | predicateExpression : expression IS NOT NULL
| expression IS NOT DISTINCT FROM expression
| expression IS NOT BOOLEAN_VALUE
| expression IS NOT UNKNOWN | parser/fase2/team03/grammarReview.py | p_predicateExpression2 | JohnnyBro/tytus | 0 | python | def p_predicateExpression2(t):
'predicateExpression : expression IS NOT NULL\n | expression IS NOT DISTINCT FROM expression\n | expression IS NOT BOOLEAN_VALUE \n | expression IS NOT UNKNOWN '
token = t.slice[4]
if (token.ty... | def p_predicateExpression2(t):
'predicateExpression : expression IS NOT NULL\n | expression IS NOT DISTINCT FROM expression\n | expression IS NOT BOOLEAN_VALUE \n | expression IS NOT UNKNOWN '
token = t.slice[4]
if (token.ty... |
3cf25b03f7c476fb41b8082fe0559ba659a1c9557af223b26ddaf3a30852147e | def p_logicExpression(t):
'logicExpression : relExpression'
t[0] = t[1]
addCad('**\\<EXP_LOG>** ::= \\<EXP_REL> ') | logicExpression : relExpression | parser/fase2/team03/grammarReview.py | p_logicExpression | JohnnyBro/tytus | 0 | python | def p_logicExpression(t):
t[0] = t[1]
addCad('**\\<EXP_LOG>** ::= \\<EXP_REL> ') | def p_logicExpression(t):
t[0] = t[1]
addCad('**\\<EXP_LOG>** ::= \\<EXP_REL> ')<|docstring|>logicExpression : relExpression<|endoftext|> |
3143520722dc4ed47f394d8e5eb2de2870ba04bf9cf61ac6e4bebf98bebae051 | def p_logicNotExpression(t):
'logicExpression : NOT logicExpression'
token = t.slice[1]
childsProduction = addNotNoneChild(t, [2])
graph_ref = graph_node(str(t[1]), [t[2]], childsProduction)
addCad('**\\<EXP_LOG>** ::= \\<EXP_LOG> tNot \\<EXP_LOG> ')
t[0] = Negation(t[2], token.lineno, token.le... | logicExpression : NOT logicExpression | parser/fase2/team03/grammarReview.py | p_logicNotExpression | JohnnyBro/tytus | 0 | python | def p_logicNotExpression(t):
token = t.slice[1]
childsProduction = addNotNoneChild(t, [2])
graph_ref = graph_node(str(t[1]), [t[2]], childsProduction)
addCad('**\\<EXP_LOG>** ::= \\<EXP_LOG> tNot \\<EXP_LOG> ')
t[0] = Negation(t[2], token.lineno, token.lexpos, graph_ref) | def p_logicNotExpression(t):
token = t.slice[1]
childsProduction = addNotNoneChild(t, [2])
graph_ref = graph_node(str(t[1]), [t[2]], childsProduction)
addCad('**\\<EXP_LOG>** ::= \\<EXP_LOG> tNot \\<EXP_LOG> ')
t[0] = Negation(t[2], token.lineno, token.lexpos, graph_ref)<|docstring|>logicExpres... |
b85446a910a6fa2c4b86132bf1667bbc46068d856123f778f103808c1888f1d0 | def p_binLogicExpression(t):
'logicExpression : logicExpression AND logicExpression\n | logicExpression OR logicExpression\n '
token = t.slice[2]
if (token.type == 'AND'):
childsProduction = addNotNoneChild(t, [1, 3])
graph_ref = graph_node(str... | logicExpression : logicExpression AND logicExpression
| logicExpression OR logicExpression | parser/fase2/team03/grammarReview.py | p_binLogicExpression | JohnnyBro/tytus | 0 | python | def p_binLogicExpression(t):
'logicExpression : logicExpression AND logicExpression\n | logicExpression OR logicExpression\n '
token = t.slice[2]
if (token.type == 'AND'):
childsProduction = addNotNoneChild(t, [1, 3])
graph_ref = graph_node(str... | def p_binLogicExpression(t):
'logicExpression : logicExpression AND logicExpression\n | logicExpression OR logicExpression\n '
token = t.slice[2]
if (token.type == 'AND'):
childsProduction = addNotNoneChild(t, [1, 3])
graph_ref = graph_node(str... |
93f5b0d32abdd56d918ee504ebcf5a59a762e3971dd244c89d09573306159933 | def p_expression(t):
' expression : expression MAS expression\n | expression MENOS expression\n | expression POR expression\n | expression DIAGONAL expression\n | expression PORCENTAJE expression\n | expression EXPONENCI... | expression : expression MAS expression
| expression MENOS expression
| expression POR expression
| expression DIAGONAL expression
| expression PORCENTAJE expression
| expression EXPONENCIANCION expression | parser/fase2/team03/grammarReview.py | p_expression | JohnnyBro/tytus | 0 | python | def p_expression(t):
' expression : expression MAS expression\n | expression MENOS expression\n | expression POR expression\n | expression DIAGONAL expression\n | expression PORCENTAJE expression\n | expression EXPONENCI... | def p_expression(t):
' expression : expression MAS expression\n | expression MENOS expression\n | expression POR expression\n | expression DIAGONAL expression\n | expression PORCENTAJE expression\n | expression EXPONENCI... |
20b5aba826353c86bd51458878a6370a0993e36697fce9b9d76ad32b720df1d1 | def p_expNotExp(t):
'expression : NOT expression'
token = t.slice[1]
addCad('**\\<EXP>** ::= tNot \\<EXP> ')
childsProduction = addNotNoneChild(t, [2])
graph_ref = graph_node(str(t[1]), [t[2]], childsProduction)
t[0] = Negation(t[1], token.lineno, token.lexpos, graph_ref) | expression : NOT expression | parser/fase2/team03/grammarReview.py | p_expNotExp | JohnnyBro/tytus | 0 | python | def p_expNotExp(t):
token = t.slice[1]
addCad('**\\<EXP>** ::= tNot \\<EXP> ')
childsProduction = addNotNoneChild(t, [2])
graph_ref = graph_node(str(t[1]), [t[2]], childsProduction)
t[0] = Negation(t[1], token.lineno, token.lexpos, graph_ref) | def p_expNotExp(t):
token = t.slice[1]
addCad('**\\<EXP>** ::= tNot \\<EXP> ')
childsProduction = addNotNoneChild(t, [2])
graph_ref = graph_node(str(t[1]), [t[2]], childsProduction)
t[0] = Negation(t[1], token.lineno, token.lexpos, graph_ref)<|docstring|>expression : NOT expression<|endofte... |
3cafeb66877f272c1d2b226fecba810d68951dcd180cb6ec8185d3bc7c9cdade | def p_expPerenteLogic(t):
'expression : PARA logicExpression PARC'
t[0] = t[2]
addCad("**\\<EXP>** ::= '(' \\<EXP_LOG> ')' ") | expression : PARA logicExpression PARC | parser/fase2/team03/grammarReview.py | p_expPerenteLogic | JohnnyBro/tytus | 0 | python | def p_expPerenteLogic(t):
t[0] = t[2]
addCad("**\\<EXP>** ::= '(' \\<EXP_LOG> ')' ") | def p_expPerenteLogic(t):
t[0] = t[2]
addCad("**\\<EXP>** ::= '(' \\<EXP_LOG> ')' ")<|docstring|>expression : PARA logicExpression PARC<|endoftext|> |
d7cffd70942c1400c63b46286b277c8746680a8e9b3f2261dcb8eb3adf787b32 | def p_trigonometric(t):
' expression : ACOS PARA expression PARC\n | ACOSD PARA expression PARC\n | ASIN PARA expression PARC\n | ASIND PARA expression PARC\n | ATAN PARA expression PARC\n | ATAND PARA expres... | expression : ACOS PARA expression PARC
| ACOSD PARA expression PARC
| ASIN PARA expression PARC
| ASIND PARA expression PARC
| ATAN PARA expression PARC
| ATAND PARA expression PARC
| ATAN2 PARA expression COMA expression PARC
| ATAN2D PARA expression COMA expression PARC
| COS PARA expression PARC
|... | parser/fase2/team03/grammarReview.py | p_trigonometric | JohnnyBro/tytus | 0 | python | def p_trigonometric(t):
' expression : ACOS PARA expression PARC\n | ACOSD PARA expression PARC\n | ASIN PARA expression PARC\n | ASIND PARA expression PARC\n | ATAN PARA expression PARC\n | ATAND PARA expres... | def p_trigonometric(t):
' expression : ACOS PARA expression PARC\n | ACOSD PARA expression PARC\n | ASIN PARA expression PARC\n | ASIND PARA expression PARC\n | ATAN PARA expression PARC\n | ATAND PARA expres... |
e917b6c3d780af8483eba7270f80e6fe4d48d02fdee40badaf022f98afb95156 | def p_aritmetic(t):
'expression : ABS PARA expression PARC \n | CBRT PARA expression PARC\n | CEIL PARA expression PARC\n | CEILING PARA expression PARC\n | DEGREES PARA expression PARC\n | DIV PARA expressio... | expression : ABS PARA expression PARC
| CBRT PARA expression PARC
| CEIL PARA expression PARC
| CEILING PARA expression PARC
| DEGREES PARA expression PARC
| DIV PARA expression COMA expression PARC
| EXP PARA expression PARC
| FACTORIAL PARA expression PARC
| FLOOR PARA expression PARC
| GCD PARA expr... | parser/fase2/team03/grammarReview.py | p_aritmetic | JohnnyBro/tytus | 0 | python | def p_aritmetic(t):
'expression : ABS PARA expression PARC \n | CBRT PARA expression PARC\n | CEIL PARA expression PARC\n | CEILING PARA expression PARC\n | DEGREES PARA expression PARC\n | DIV PARA expressio... | def p_aritmetic(t):
'expression : ABS PARA expression PARC \n | CBRT PARA expression PARC\n | CEIL PARA expression PARC\n | CEILING PARA expression PARC\n | DEGREES PARA expression PARC\n | DIV PARA expressio... |
69c1c83f9212c7bdef9a07f8d92a52d2da5f212cc512c4c11792b6babe82d92a | def p_exp_unary(t):
'expression : MENOS expression %prec UMENOS\n | MAS expression %prec UMAS '
token = t.slice[2].value
if (t[1] == '+'):
childsProduction = addNotNoneChild(t, [2])
graph_ref = graph_node(str('exp'), [t[1], t[2]], childsProduction)
addCad('**\\<EXP>*... | expression : MENOS expression %prec UMENOS
| MAS expression %prec UMAS | parser/fase2/team03/grammarReview.py | p_exp_unary | JohnnyBro/tytus | 0 | python | def p_exp_unary(t):
'expression : MENOS expression %prec UMENOS\n | MAS expression %prec UMAS '
token = t.slice[2].value
if (t[1] == '+'):
childsProduction = addNotNoneChild(t, [2])
graph_ref = graph_node(str('exp'), [t[1], t[2]], childsProduction)
addCad('**\\<EXP>*... | def p_exp_unary(t):
'expression : MENOS expression %prec UMENOS\n | MAS expression %prec UMAS '
token = t.slice[2].value
if (t[1] == '+'):
childsProduction = addNotNoneChild(t, [2])
graph_ref = graph_node(str('exp'), [t[1], t[2]], childsProduction)
addCad('**\\<EXP>*... |
e86fbaf9da6c7313f73960d2c35d9d73503b630dddb5104e4c42af3de906dc06 | def p_exp_call_function(t):
'expression : ID PARA list_param_function_opt2 PARC'
childsProduction = addNotNoneChild(t, [3])
graph_ref = graph_node(str('stm_call_function'), [t[1], t[2], t[3], t[4]], childsProduction)
addCad("**\\<EXPRESSION>** ::= tIdentifier '(' [\\<LIST_PARAM_FUNCTION_OPT>] ')' ")
... | expression : ID PARA list_param_function_opt2 PARC | parser/fase2/team03/grammarReview.py | p_exp_call_function | JohnnyBro/tytus | 0 | python | def p_exp_call_function(t):
childsProduction = addNotNoneChild(t, [3])
graph_ref = graph_node(str('stm_call_function'), [t[1], t[2], t[3], t[4]], childsProduction)
addCad("**\\<EXPRESSION>** ::= tIdentifier '(' [\\<LIST_PARAM_FUNCTION_OPT>] ')' ")
t[0] = upNodo('token', 0, 0, graph_ref) | def p_exp_call_function(t):
childsProduction = addNotNoneChild(t, [3])
graph_ref = graph_node(str('stm_call_function'), [t[1], t[2], t[3], t[4]], childsProduction)
addCad("**\\<EXPRESSION>** ::= tIdentifier '(' [\\<LIST_PARAM_FUNCTION_OPT>] ')' ")
t[0] = upNodo('token', 0, 0, graph_ref)<|docstring|... |
3d74fb3d4c2c959eb2cebc4dcbb50312d56d11e4a990a8c2c5a4ca454204ff86 | def p_list_param_function_opt2(t):
'list_param_function_opt2 : column_list \n | empty'
token = t.slice[1]
if (token.type == 'column_list'):
lista = None
childsProduction = []
if (t[1] != None):
lista = t[1][0]
childsProduction.a... | list_param_function_opt2 : column_list
| empty | parser/fase2/team03/grammarReview.py | p_list_param_function_opt2 | JohnnyBro/tytus | 0 | python | def p_list_param_function_opt2(t):
'list_param_function_opt2 : column_list \n | empty'
token = t.slice[1]
if (token.type == 'column_list'):
lista = None
childsProduction = []
if (t[1] != None):
lista = t[1][0]
childsProduction.a... | def p_list_param_function_opt2(t):
'list_param_function_opt2 : column_list \n | empty'
token = t.slice[1]
if (token.type == 'column_list'):
lista = None
childsProduction = []
if (t[1] != None):
lista = t[1][0]
childsProduction.a... |
a1eb8c442da8a3c1edfb822e7ba893d2a36733f95ffd179c6bf24629be5e1f59 | def p_exp_num(t):
'expression : numero\n | col_name'
t[0] = t[1]
token = t.slice[1]
if (token.type == 'numero'):
addCad('**\\<EXP>** ::= \\<NUMERO>')
elif (token.type == 'col_name'):
addCad('**\\<EXP>** ::= \\<COL_NAME>') | expression : numero
| col_name | parser/fase2/team03/grammarReview.py | p_exp_num | JohnnyBro/tytus | 0 | python | def p_exp_num(t):
'expression : numero\n | col_name'
t[0] = t[1]
token = t.slice[1]
if (token.type == 'numero'):
addCad('**\\<EXP>** ::= \\<NUMERO>')
elif (token.type == 'col_name'):
addCad('**\\<EXP>** ::= \\<COL_NAME>') | def p_exp_num(t):
'expression : numero\n | col_name'
t[0] = t[1]
token = t.slice[1]
if (token.type == 'numero'):
addCad('**\\<EXP>** ::= \\<NUMERO>')
elif (token.type == 'col_name'):
addCad('**\\<EXP>** ::= \\<COL_NAME>')<|docstring|>expression : numero
| col_name<... |
5770f61f4fdfe9b4b0cd59d0da44b3de02c78c0c36b988d5079c144cf16afcaf | def p_exp_val(t):
'expression : TEXTO\n | BOOLEAN_VALUE \n | NOW PARA PARC'
token = t.slice[1]
if (token.type == 'TEXTO'):
graph_ref = graph_node(str(t[1]))
addCad('**\\<EXP>** ::= tTexto')
t[0] = Text(token.value, token.lin... | expression : TEXTO
| BOOLEAN_VALUE
| NOW PARA PARC | parser/fase2/team03/grammarReview.py | p_exp_val | JohnnyBro/tytus | 0 | python | def p_exp_val(t):
'expression : TEXTO\n | BOOLEAN_VALUE \n | NOW PARA PARC'
token = t.slice[1]
if (token.type == 'TEXTO'):
graph_ref = graph_node(str(t[1]))
addCad('**\\<EXP>** ::= tTexto')
t[0] = Text(token.value, token.lin... | def p_exp_val(t):
'expression : TEXTO\n | BOOLEAN_VALUE \n | NOW PARA PARC'
token = t.slice[1]
if (token.type == 'TEXTO'):
graph_ref = graph_node(str(t[1]))
addCad('**\\<EXP>** ::= tTexto')
t[0] = Text(token.value, token.lin... |
2374e819215ab925612c7dc0c209c3eba37681f26127841aedb719c42fb741fc | def p_numero(t):
' numero : ENTERO\n | FLOAT'
token = t.slice[1]
if (token.type == 'ENTERO'):
addCad('**\\<NUMERO>** ::= tEntero')
elif (token.type == 'FLOAT'):
addCad('**\\<NUMERO>** ::= tFloat')
graph_ref = graph_node(str(t[1]))
t[0] = Numeric(token.value, token... | numero : ENTERO
| FLOAT | parser/fase2/team03/grammarReview.py | p_numero | JohnnyBro/tytus | 0 | python | def p_numero(t):
' numero : ENTERO\n | FLOAT'
token = t.slice[1]
if (token.type == 'ENTERO'):
addCad('**\\<NUMERO>** ::= tEntero')
elif (token.type == 'FLOAT'):
addCad('**\\<NUMERO>** ::= tFloat')
graph_ref = graph_node(str(t[1]))
t[0] = Numeric(token.value, token... | def p_numero(t):
' numero : ENTERO\n | FLOAT'
token = t.slice[1]
if (token.type == 'ENTERO'):
addCad('**\\<NUMERO>** ::= tEntero')
elif (token.type == 'FLOAT'):
addCad('**\\<NUMERO>** ::= tFloat')
graph_ref = graph_node(str(t[1]))
t[0] = Numeric(token.value, token... |
8e29c9be1c59e03768e469c91bb0593232631a7cf4138813c283c69189ae181b | def p_col_name(t):
' col_name : ID PUNTO ID'
token = t.slice[1]
graph_ref = graph_node(str(((((str(t[1]) + ' ') + str(t[2])) + ' ') + str(t[3]))))
addCad("**\\<COL_NAME>** ::= tIdentificador '.' tIdentificador")
t[0] = ColumnName(t[1], t[3], token.lineno, token.lexpos, graph_ref) | col_name : ID PUNTO ID | parser/fase2/team03/grammarReview.py | p_col_name | JohnnyBro/tytus | 0 | python | def p_col_name(t):
' '
token = t.slice[1]
graph_ref = graph_node(str(((((str(t[1]) + ' ') + str(t[2])) + ' ') + str(t[3]))))
addCad("**\\<COL_NAME>** ::= tIdentificador '.' tIdentificador")
t[0] = ColumnName(t[1], t[3], token.lineno, token.lexpos, graph_ref) | def p_col_name(t):
' '
token = t.slice[1]
graph_ref = graph_node(str(((((str(t[1]) + ' ') + str(t[2])) + ' ') + str(t[3]))))
addCad("**\\<COL_NAME>** ::= tIdentificador '.' tIdentificador")
t[0] = ColumnName(t[1], t[3], token.lineno, token.lexpos, graph_ref)<|docstring|>col_name : ID PUNTO ID<|endof... |
54611244e7ea96f49a28b4b7e2342ddc7061af91585fe34c2685fef097621a62 | def p_col_name1(t):
' col_name : ID '
token = t.slice[1]
graph_ref = graph_node(str(t[1]))
addCad('**\\<COL_NAME>** ::= tIdentificador')
t[0] = ColumnName(None, t[1], token.lineno, token.lexpos, graph_ref) | col_name : ID | parser/fase2/team03/grammarReview.py | p_col_name1 | JohnnyBro/tytus | 0 | python | def p_col_name1(t):
' '
token = t.slice[1]
graph_ref = graph_node(str(t[1]))
addCad('**\\<COL_NAME>** ::= tIdentificador')
t[0] = ColumnName(None, t[1], token.lineno, token.lexpos, graph_ref) | def p_col_name1(t):
' '
token = t.slice[1]
graph_ref = graph_node(str(t[1]))
addCad('**\\<COL_NAME>** ::= tIdentificador')
t[0] = ColumnName(None, t[1], token.lineno, token.lexpos, graph_ref)<|docstring|>col_name : ID<|endoftext|> |
c9eb249da7a60c4f24d67fb8e3fc0064aad35eca424eb229f9dd1ae8f412b263 | def p_empty(t):
'empty :'
pass | empty : | parser/fase2/team03/grammarReview.py | p_empty | JohnnyBro/tytus | 0 | python | def p_empty(t):
pass | def p_empty(t):
pass<|docstring|>empty :<|endoftext|> |
9b286f9acb44713d7e80c338509ec72cfbcc73d1f8deca61a727bd11560a5bc7 | def registerProducer(self, producer: Union[(IPushProducer, IPullProducer)], streaming: bool) -> None:
'Part of IConsumer interface\n\n Args:\n producer\n streaming: True if push based producer, False if pull\n based.\n '
if self._producer:
raise Excepti... | Part of IConsumer interface
Args:
producer
streaming: True if push based producer, False if pull
based. | synapse/util/file_consumer.py | registerProducer | bradjones1/synapse | 9,945 | python | def registerProducer(self, producer: Union[(IPushProducer, IPullProducer)], streaming: bool) -> None:
'Part of IConsumer interface\n\n Args:\n producer\n streaming: True if push based producer, False if pull\n based.\n '
if self._producer:
raise Excepti... | def registerProducer(self, producer: Union[(IPushProducer, IPullProducer)], streaming: bool) -> None:
'Part of IConsumer interface\n\n Args:\n producer\n streaming: True if push based producer, False if pull\n based.\n '
if self._producer:
raise Excepti... |
5850071ea67acd826fc5340685e2e92f66abc436677d4b834586b90561efed3c | def unregisterProducer(self) -> None:
'Part of IProducer interface'
self._producer = None
assert (self._finished_deferred is not None)
if (not self._finished_deferred.called):
self._bytes_queue.put_nowait(None) | Part of IProducer interface | synapse/util/file_consumer.py | unregisterProducer | bradjones1/synapse | 9,945 | python | def unregisterProducer(self) -> None:
self._producer = None
assert (self._finished_deferred is not None)
if (not self._finished_deferred.called):
self._bytes_queue.put_nowait(None) | def unregisterProducer(self) -> None:
self._producer = None
assert (self._finished_deferred is not None)
if (not self._finished_deferred.called):
self._bytes_queue.put_nowait(None)<|docstring|>Part of IProducer interface<|endoftext|> |
867091a6cfbe3567ff05ebd49f3224a94b41a66bfa94b0eaf71f71300626f104 | def write(self, write_bytes: bytes) -> None:
'Part of IProducer interface'
if self._write_exception:
raise self._write_exception
assert (self._finished_deferred is not None)
if self._finished_deferred.called:
raise Exception('consumer has closed')
self._bytes_queue.put_nowait(write_b... | Part of IProducer interface | synapse/util/file_consumer.py | write | bradjones1/synapse | 9,945 | python | def write(self, write_bytes: bytes) -> None:
if self._write_exception:
raise self._write_exception
assert (self._finished_deferred is not None)
if self._finished_deferred.called:
raise Exception('consumer has closed')
self._bytes_queue.put_nowait(write_bytes)
if (self.streaming ... | def write(self, write_bytes: bytes) -> None:
if self._write_exception:
raise self._write_exception
assert (self._finished_deferred is not None)
if self._finished_deferred.called:
raise Exception('consumer has closed')
self._bytes_queue.put_nowait(write_bytes)
if (self.streaming ... |
993f1dfd3e8b0d51819b85be5d2acf49a67629577c90322d38e1ef74148610ba | def _writer(self) -> None:
'This is run in a background thread to write to the file.'
try:
while (self._producer or (not self._bytes_queue.empty())):
if (self._producer and self._paused_producer):
if (self._bytes_queue.qsize() <= self._RESUME_ON_QUEUE_SIZE):
... | This is run in a background thread to write to the file. | synapse/util/file_consumer.py | _writer | bradjones1/synapse | 9,945 | python | def _writer(self) -> None:
try:
while (self._producer or (not self._bytes_queue.empty())):
if (self._producer and self._paused_producer):
if (self._bytes_queue.qsize() <= self._RESUME_ON_QUEUE_SIZE):
self._reactor.callFromThread(self._resume_paused_produc... | def _writer(self) -> None:
try:
while (self._producer or (not self._bytes_queue.empty())):
if (self._producer and self._paused_producer):
if (self._bytes_queue.qsize() <= self._RESUME_ON_QUEUE_SIZE):
self._reactor.callFromThread(self._resume_paused_produc... |
44ca30c091aa9b76d0807d949690ffc118285012fa6bb01295fe5deb43b2c43c | def wait(self) -> 'Deferred[None]':
'Returns a deferred that resolves when finished writing to file'
assert (self._finished_deferred is not None)
return make_deferred_yieldable(self._finished_deferred) | Returns a deferred that resolves when finished writing to file | synapse/util/file_consumer.py | wait | bradjones1/synapse | 9,945 | python | def wait(self) -> 'Deferred[None]':
assert (self._finished_deferred is not None)
return make_deferred_yieldable(self._finished_deferred) | def wait(self) -> 'Deferred[None]':
assert (self._finished_deferred is not None)
return make_deferred_yieldable(self._finished_deferred)<|docstring|>Returns a deferred that resolves when finished writing to file<|endoftext|> |
38af8e19aecbce65e5330c727511f860db102b69523d79951b4b46ada27a30b2 | def _resume_paused_producer(self) -> None:
'Gets called if we should resume producing after being paused'
if (self._paused_producer and self._producer):
self._paused_producer = False
self._producer.resumeProducing() | Gets called if we should resume producing after being paused | synapse/util/file_consumer.py | _resume_paused_producer | bradjones1/synapse | 9,945 | python | def _resume_paused_producer(self) -> None:
if (self._paused_producer and self._producer):
self._paused_producer = False
self._producer.resumeProducing() | def _resume_paused_producer(self) -> None:
if (self._paused_producer and self._producer):
self._paused_producer = False
self._producer.resumeProducing()<|docstring|>Gets called if we should resume producing after being paused<|endoftext|> |
47e16a71ce5c47d2606e45625f3ee393319e35a783960854212173aaaaab055c | def head(self, nrows=None):
'\n .head() of input dataframes\n Args:\n keys_only (bool): only print join keys\n nrows (int): number of rows to show\n print (bool): print or return df\n '
if (nrows is None):
result = {idx: dfg for (idx, dfg) in enumera... | .head() of input dataframes
Args:
keys_only (bool): only print join keys
nrows (int): number of rows to show
print (bool): print or return df | bolt4ds/join/pre.py | head | leepand/bolt4ds | 0 | python | def head(self, nrows=None):
'\n .head() of input dataframes\n Args:\n keys_only (bool): only print join keys\n nrows (int): number of rows to show\n print (bool): print or return df\n '
if (nrows is None):
result = {idx: dfg for (idx, dfg) in enumera... | def head(self, nrows=None):
'\n .head() of input dataframes\n Args:\n keys_only (bool): only print join keys\n nrows (int): number of rows to show\n print (bool): print or return df\n '
if (nrows is None):
result = {idx: dfg for (idx, dfg) in enumera... |
9b7df57180307290e81604e83a23c37a3d8016ac636b0bde040f6e977ea62bca | def describe(self, **kwargs):
'\n .describe() of input dataframes\n Args:\n kwargs (misc): to pass to .describe()\n '
result = {idx: dfg.describe(**kwargs) for (idx, dfg) in self._enumerate_dfs()}
return self._returndict(result) | .describe() of input dataframes
Args:
kwargs (misc): to pass to .describe() | bolt4ds/join/pre.py | describe | leepand/bolt4ds | 0 | python | def describe(self, **kwargs):
'\n .describe() of input dataframes\n Args:\n kwargs (misc): to pass to .describe()\n '
result = {idx: dfg.describe(**kwargs) for (idx, dfg) in self._enumerate_dfs()}
return self._returndict(result) | def describe(self, **kwargs):
'\n .describe() of input dataframes\n Args:\n kwargs (misc): to pass to .describe()\n '
result = {idx: dfg.describe(**kwargs) for (idx, dfg) in self._enumerate_dfs()}
return self._returndict(result)<|docstring|>.describe() of input dataframes
Arg... |
8354029a088e6c24273b87c1a4182f31ff3f0ed75e489e737d4a815f3b83b7c2 | def shape(self):
'\n .shape of input dataframes\n Args:\n kwargs (misc): to pass to .describe()\n '
result = {idx: dfg.shape for (idx, dfg) in self._enumerate_dfs()}
return self._returndict(result) | .shape of input dataframes
Args:
kwargs (misc): to pass to .describe() | bolt4ds/join/pre.py | shape | leepand/bolt4ds | 0 | python | def shape(self):
'\n .shape of input dataframes\n Args:\n kwargs (misc): to pass to .describe()\n '
result = {idx: dfg.shape for (idx, dfg) in self._enumerate_dfs()}
return self._returndict(result) | def shape(self):
'\n .shape of input dataframes\n Args:\n kwargs (misc): to pass to .describe()\n '
result = {idx: dfg.shape for (idx, dfg) in self._enumerate_dfs()}
return self._returndict(result)<|docstring|>.shape of input dataframes
Args:
kwargs (misc): to pass to .de... |
11fb23a6eee34438c0c634d68965581f2059afac1c17fa76b1a92f80a43947e2 | def describe_str(self, unique_count=False):
'\n Returns statistics on length of all strings and other objects in pandas dataframe. Statistics include mean, median, min, max. Optional unique count.\n Args:\n dfg (dataframe): pandas dataframe\n columns (:obj:`list`, optional): colu... | Returns statistics on length of all strings and other objects in pandas dataframe. Statistics include mean, median, min, max. Optional unique count.
Args:
dfg (dataframe): pandas dataframe
columns (:obj:`list`, optional): column names to analyze. If None analyze all
unique_count (:obj:`bool`, optional): inc... | bolt4ds/join/pre.py | describe_str | leepand/bolt4ds | 0 | python | def describe_str(self, unique_count=False):
'\n Returns statistics on length of all strings and other objects in pandas dataframe. Statistics include mean, median, min, max. Optional unique count.\n Args:\n dfg (dataframe): pandas dataframe\n columns (:obj:`list`, optional): colu... | def describe_str(self, unique_count=False):
'\n Returns statistics on length of all strings and other objects in pandas dataframe. Statistics include mean, median, min, max. Optional unique count.\n Args:\n dfg (dataframe): pandas dataframe\n columns (:obj:`list`, optional): colu... |
d28cdaa6beb4126af67a8f075148e922c84d8b2c3d82add4da5a6bab82285bb1 | def data_match(self, how=None, topn=1, ignore_value_columns=True, max_unique_pct=0.8, min_unique_count=1, min_match_rate=0.5):
'\n todo:\n order matters, sequential inner or left joins (no right or outer joins)\n jaccard 1:2 => intersection for inner, same set for left\n \n ... | todo:
order matters, sequential inner or left joins (no right or outer joins)
jaccard 1:2 => intersection for inner, same set for left | bolt4ds/join/pre.py | data_match | leepand/bolt4ds | 0 | python | def data_match(self, how=None, topn=1, ignore_value_columns=True, max_unique_pct=0.8, min_unique_count=1, min_match_rate=0.5):
'\n todo:\n order matters, sequential inner or left joins (no right or outer joins)\n jaccard 1:2 => intersection for inner, same set for left\n \n ... | def data_match(self, how=None, topn=1, ignore_value_columns=True, max_unique_pct=0.8, min_unique_count=1, min_match_rate=0.5):
'\n todo:\n order matters, sequential inner or left joins (no right or outer joins)\n jaccard 1:2 => intersection for inner, same set for left\n \n ... |
84294a6f026f22a0ff5b0109fb90bf5f94d6707d5123503aa5e25d761becb843 | def match_quality(self, rerun=False):
'\n Show prejoin statistics\n Args:\n return_results (bool): Return results as df instead of printing\n '
if ((not self.keysets) or rerun):
self._calc_keysets()
df_out = []
for key_set in self.keysets:
df_key = {}
... | Show prejoin statistics
Args:
return_results (bool): Return results as df instead of printing | bolt4ds/join/pre.py | match_quality | leepand/bolt4ds | 0 | python | def match_quality(self, rerun=False):
'\n Show prejoin statistics\n Args:\n return_results (bool): Return results as df instead of printing\n '
if ((not self.keysets) or rerun):
self._calc_keysets()
df_out = []
for key_set in self.keysets:
df_key = {}
... | def match_quality(self, rerun=False):
'\n Show prejoin statistics\n Args:\n return_results (bool): Return results as df instead of printing\n '
if ((not self.keysets) or rerun):
self._calc_keysets()
df_out = []
for key_set in self.keysets:
df_key = {}
... |
d787d368cdcb23e0737d65da1752a1fe43acc6c5a43aa39e04772b4b13365eb0 | def _show_prep_df(self, idf, mode):
'\n PRIVATE. prepare data for self.show() functions\n Args:\n idf (int): which df in self.dfs\n mode (str): matched vs unmatched\n '
if (idf == 0):
side = 'left'
elif (idf == 1):
side = 'right'
else:
r... | PRIVATE. prepare data for self.show() functions
Args:
idf (int): which df in self.dfs
mode (str): matched vs unmatched | bolt4ds/join/pre.py | _show_prep_df | leepand/bolt4ds | 0 | python | def _show_prep_df(self, idf, mode):
'\n PRIVATE. prepare data for self.show() functions\n Args:\n idf (int): which df in self.dfs\n mode (str): matched vs unmatched\n '
if (idf == 0):
side = 'left'
elif (idf == 1):
side = 'right'
else:
r... | def _show_prep_df(self, idf, mode):
'\n PRIVATE. prepare data for self.show() functions\n Args:\n idf (int): which df in self.dfs\n mode (str): matched vs unmatched\n '
if (idf == 0):
side = 'left'
elif (idf == 1):
side = 'right'
else:
r... |
2d1aa16310ff1f88784d0ca931c0cf08837e2e4e077dc8a62d84c52246cf790d | def show_unmatched(self, key, nrecords=3, nrows=3, keys_only=False, print_only=False):
'\n Show unmatched records\n Args:\n key (str): join key\n nrecords (int): number of unmatched records\n nrows (int): number of rows\n keys_only (bool): show only join key... | Show unmatched records
Args:
key (str): join key
nrecords (int): number of unmatched records
nrows (int): number of rows
keys_only (bool): show only join keys
print_only (bool): if false return results instead of printing | bolt4ds/join/pre.py | show_unmatched | leepand/bolt4ds | 0 | python | def show_unmatched(self, key, nrecords=3, nrows=3, keys_only=False, print_only=False):
'\n Show unmatched records\n Args:\n key (str): join key\n nrecords (int): number of unmatched records\n nrows (int): number of rows\n keys_only (bool): show only join key... | def show_unmatched(self, key, nrecords=3, nrows=3, keys_only=False, print_only=False):
'\n Show unmatched records\n Args:\n key (str): join key\n nrecords (int): number of unmatched records\n nrows (int): number of rows\n keys_only (bool): show only join key... |
910f1d890e8b7abd81d8767fb1c906796205ed05c4a2717c19cc81580122213b | def show_matched(self, key, nrecords=3, nrows=3, keys_only=False, print_only=False):
'\n Show matched records\n Args:\n key (str): join key\n nrecords (int): number of unmatched records\n nrows (int): number of rows\n keys_only (bool): show only join keys\n ... | Show matched records
Args:
key (str): join key
nrecords (int): number of unmatched records
nrows (int): number of rows
keys_only (bool): show only join keys
print_only (bool): if false return results instead of printing | bolt4ds/join/pre.py | show_matched | leepand/bolt4ds | 0 | python | def show_matched(self, key, nrecords=3, nrows=3, keys_only=False, print_only=False):
'\n Show matched records\n Args:\n key (str): join key\n nrecords (int): number of unmatched records\n nrows (int): number of rows\n keys_only (bool): show only join keys\n ... | def show_matched(self, key, nrecords=3, nrows=3, keys_only=False, print_only=False):
'\n Show matched records\n Args:\n key (str): join key\n nrecords (int): number of unmatched records\n nrows (int): number of rows\n keys_only (bool): show only join keys\n ... |
6a5cb8e0472eba7702b35a2b9a348e69fde2626e3dc5bdc77bb0d69205a1dfd6 | def merge(self, **kwargs):
'\n Perform merge using keys\n Args:\n kwargs (misc): parameters to pass to `pd.merge()`\n '
if (len(self.dfs) > 2):
raise NotImplementedError('Only handles 2 dataframes for now')
return self.dfs[0].merge(self.dfs[1], left_on=self.keysdf[0],... | Perform merge using keys
Args:
kwargs (misc): parameters to pass to `pd.merge()` | bolt4ds/join/pre.py | merge | leepand/bolt4ds | 0 | python | def merge(self, **kwargs):
'\n Perform merge using keys\n Args:\n kwargs (misc): parameters to pass to `pd.merge()`\n '
if (len(self.dfs) > 2):
raise NotImplementedError('Only handles 2 dataframes for now')
return self.dfs[0].merge(self.dfs[1], left_on=self.keysdf[0],... | def merge(self, **kwargs):
'\n Perform merge using keys\n Args:\n kwargs (misc): parameters to pass to `pd.merge()`\n '
if (len(self.dfs) > 2):
raise NotImplementedError('Only handles 2 dataframes for now')
return self.dfs[0].merge(self.dfs[1], left_on=self.keysdf[0],... |
78350af600d2a958cc7322f33a9926703010fad8e560e5accebbbb7687b23bb5 | def codegen_reload_data():
'\n Parameters required reload codegen for the fn_clamav package\n '
return {'package': u'fn_clamav', 'message_destinations': [u'fn_clamav'], 'functions': [u'clamav_scan_stream'], 'workflows': [u'example_clamav_scan_artifact_attachment', u'example_clamav_scan_attachment'], 'acti... | Parameters required reload codegen for the fn_clamav package | fn_clamav/fn_clamav/util/customize.py | codegen_reload_data | lizhecht/resilient-community-apps | 65 | python | def codegen_reload_data():
'\n \n '
return {'package': u'fn_clamav', 'message_destinations': [u'fn_clamav'], 'functions': [u'clamav_scan_stream'], 'workflows': [u'example_clamav_scan_artifact_attachment', u'example_clamav_scan_attachment'], 'actions': [u'Example: ClamAV scan artifact attachment', u'Exampl... | def codegen_reload_data():
'\n \n '
return {'package': u'fn_clamav', 'message_destinations': [u'fn_clamav'], 'functions': [u'clamav_scan_stream'], 'workflows': [u'example_clamav_scan_artifact_attachment', u'example_clamav_scan_attachment'], 'actions': [u'Example: ClamAV scan artifact attachment', u'Exampl... |
7344e9883ac648fba07f4f028b94940c2aedbaf79c2443e493224ede31d9a8bc | def customization_data(client=None):
'\n Returns a Generator of ImportDefinitions (Customizations).\n Install them using `resilient-circuits customize`\n\n IBM Resilient Platform Version: 41.0.6783\n\n Contents:\n - Message Destinations:\n - fn_clamav\n - Functions:\n - clamav_scan_s... | Returns a Generator of ImportDefinitions (Customizations).
Install them using `resilient-circuits customize`
IBM Resilient Platform Version: 41.0.6783
Contents:
- Message Destinations:
- fn_clamav
- Functions:
- clamav_scan_stream
- Workflows:
- example_clamav_scan_artifact_attachment
- example_clamav... | fn_clamav/fn_clamav/util/customize.py | customization_data | lizhecht/resilient-community-apps | 65 | python | def customization_data(client=None):
'\n Returns a Generator of ImportDefinitions (Customizations).\n Install them using `resilient-circuits customize`\n\n IBM Resilient Platform Version: 41.0.6783\n\n Contents:\n - Message Destinations:\n - fn_clamav\n - Functions:\n - clamav_scan_s... | def customization_data(client=None):
'\n Returns a Generator of ImportDefinitions (Customizations).\n Install them using `resilient-circuits customize`\n\n IBM Resilient Platform Version: 41.0.6783\n\n Contents:\n - Message Destinations:\n - fn_clamav\n - Functions:\n - clamav_scan_s... |
c27453c6d1649c493cb642f78453cb1c8d51fe888e18c8b3cc2a692ab9579616 | def deep_clone_dict_dict(d):
'Perform a deep copy of a dictionary of dicionaries of lists of tuples'
result = {}
for (src, dst_map) in d.items():
result[src] = {}
for (dst, depth) in dst_map.items():
result[src][dst] = [(p, v) for (p, v) in depth]
return result | Perform a deep copy of a dictionary of dicionaries of lists of tuples | BTCeArbitrage.py | deep_clone_dict_dict | chuckatkins/BTCeArbitrage | 12 | python | def deep_clone_dict_dict(d):
result = {}
for (src, dst_map) in d.items():
result[src] = {}
for (dst, depth) in dst_map.items():
result[src][dst] = [(p, v) for (p, v) in depth]
return result | def deep_clone_dict_dict(d):
result = {}
for (src, dst_map) in d.items():
result[src] = {}
for (dst, depth) in dst_map.items():
result[src][dst] = [(p, v) for (p, v) in depth]
return result<|docstring|>Perform a deep copy of a dictionary of dicionaries of lists of tuples<|en... |
4c266cbc0bc5fc34828d26bee8e21ca6794d4b185f9cf26263060e655e98eded | def traverse(src):
'Traverse the trade graph and locate all possible cycles for src node'
all_paths = []
traverse_helper(src, src, [], price_map, all_paths)
return all_paths | Traverse the trade graph and locate all possible cycles for src node | BTCeArbitrage.py | traverse | chuckatkins/BTCeArbitrage | 12 | python | def traverse(src):
all_paths = []
traverse_helper(src, src, [], price_map, all_paths)
return all_paths | def traverse(src):
all_paths = []
traverse_helper(src, src, [], price_map, all_paths)
return all_paths<|docstring|>Traverse the trade graph and locate all possible cycles for src node<|endoftext|> |
2d690fd69700c006bafd4b9428c405d84d6c302a0ff011041a3a08242f29b56f | def traverse_helper(src0, src, path, price_map, all_paths):
"Helper function to recursively traverse the trading graph\n\n src0 The root node of the path\n src The current node we're visiting\n path The path that has been traversed so far\n price_map A map of all ... | Helper function to recursively traverse the trading graph
src0 The root node of the path
src The current node we're visiting
path The path that has been traversed so far
price_map A map of all pricing / node connections
all_paths Output list of all detected cycles | BTCeArbitrage.py | traverse_helper | chuckatkins/BTCeArbitrage | 12 | python | def traverse_helper(src0, src, path, price_map, all_paths):
"Helper function to recursively traverse the trading graph\n\n src0 The root node of the path\n src The current node we're visiting\n path The path that has been traversed so far\n price_map A map of all ... | def traverse_helper(src0, src, path, price_map, all_paths):
"Helper function to recursively traverse the trading graph\n\n src0 The root node of the path\n src The current node we're visiting\n path The path that has been traversed so far\n price_map A map of all ... |
5c4738d98b34da05b0b1b4a8f7b7ca13d558a85b35babbcd4f3c1c1ab7f5a94f | def compute_path_results(trade_paths, starting_vol):
'Execute the sequence of trades across all specified paths\n\n trade_paths Collection of all viable trade paths\n starting_vol The volume to start trading with\n fee Transaction fee %\n '
path_results = []
for (s... | Execute the sequence of trades across all specified paths
trade_paths Collection of all viable trade paths
starting_vol The volume to start trading with
fee Transaction fee % | BTCeArbitrage.py | compute_path_results | chuckatkins/BTCeArbitrage | 12 | python | def compute_path_results(trade_paths, starting_vol):
'Execute the sequence of trades across all specified paths\n\n trade_paths Collection of all viable trade paths\n starting_vol The volume to start trading with\n fee Transaction fee %\n '
path_results = []
for (s... | def compute_path_results(trade_paths, starting_vol):
'Execute the sequence of trades across all specified paths\n\n trade_paths Collection of all viable trade paths\n starting_vol The volume to start trading with\n fee Transaction fee %\n '
path_results = []
for (s... |
06c0307814da1412b45a269db81c9b9fd8ed5aee9f8b9adcfb5265a5fa695654 | def execute_trade_path(path, starting_vol):
'Execute the sequence of trades and determine the result\n\n path Sequence of nodes to create a trade path\n starting_vol The volume to start trading with\n '
log.debug(' -> '.join(path))
vol = starting_vol
for i in range(0, (len... | Execute the sequence of trades and determine the result
path Sequence of nodes to create a trade path
starting_vol The volume to start trading with | BTCeArbitrage.py | execute_trade_path | chuckatkins/BTCeArbitrage | 12 | python | def execute_trade_path(path, starting_vol):
'Execute the sequence of trades and determine the result\n\n path Sequence of nodes to create a trade path\n starting_vol The volume to start trading with\n '
log.debug(' -> '.join(path))
vol = starting_vol
for i in range(0, (len... | def execute_trade_path(path, starting_vol):
'Execute the sequence of trades and determine the result\n\n path Sequence of nodes to create a trade path\n starting_vol The volume to start trading with\n '
log.debug(' -> '.join(path))
vol = starting_vol
for i in range(0, (len... |
83264cedd824c0d98236ea4cb325117d8e2feb6c3818a9253e3307884a7d7260 | def print_trade_path(path, starting_vol):
'Display the sequence of trades for a given path\n\n path Sequence of nodes to create a trade path\n starting_vol The volume to start trading with\n '
log.info(' -> '.join(path))
vol = starting_vol
for i in range(0, (len(path) - 1)... | Display the sequence of trades for a given path
path Sequence of nodes to create a trade path
starting_vol The volume to start trading with | BTCeArbitrage.py | print_trade_path | chuckatkins/BTCeArbitrage | 12 | python | def print_trade_path(path, starting_vol):
'Display the sequence of trades for a given path\n\n path Sequence of nodes to create a trade path\n starting_vol The volume to start trading with\n '
log.info(' -> '.join(path))
vol = starting_vol
for i in range(0, (len(path) - 1)... | def print_trade_path(path, starting_vol):
'Display the sequence of trades for a given path\n\n path Sequence of nodes to create a trade path\n starting_vol The volume to start trading with\n '
log.info(' -> '.join(path))
vol = starting_vol
for i in range(0, (len(path) - 1)... |
b7e8ea1364b4ebcad34074f365d184a92680321ece66e4520e09fd11b7330967 | def get_trade_fee_retry(pair, retries=10):
'Call the getTradeFee call using a persistent connection'
global btce_conn
while (retries > 0):
try:
return btceapi.public.getTradeFee(pair, btce_conn)
except:
retries -= 1
log.debug(('getTradeFee failed. Reconne... | Call the getTradeFee call using a persistent connection | BTCeArbitrage.py | get_trade_fee_retry | chuckatkins/BTCeArbitrage | 12 | python | def get_trade_fee_retry(pair, retries=10):
global btce_conn
while (retries > 0):
try:
return btceapi.public.getTradeFee(pair, btce_conn)
except:
retries -= 1
log.debug(('getTradeFee failed. Reconnecting with %d tries remaining.' % retries))
b... | def get_trade_fee_retry(pair, retries=10):
global btce_conn
while (retries > 0):
try:
return btceapi.public.getTradeFee(pair, btce_conn)
except:
retries -= 1
log.debug(('getTradeFee failed. Reconnecting with %d tries remaining.' % retries))
b... |
a44f66dcbd721394f176b5ab0a25f25b69c789e79420e8c07c1711f999d1348f | def download_fee_map():
'Retrieve the fee schedule for all trading pairs'
f_map = {}
for pair in btceapi.common.all_pairs:
[src, dst] = pair.split('_')
if (src not in f_map):
f_map[src] = {}
if (dst not in f_map):
f_map[dst] = {}
log.debug(('Downloadin... | Retrieve the fee schedule for all trading pairs | BTCeArbitrage.py | download_fee_map | chuckatkins/BTCeArbitrage | 12 | python | def download_fee_map():
f_map = {}
for pair in btceapi.common.all_pairs:
[src, dst] = pair.split('_')
if (src not in f_map):
f_map[src] = {}
if (dst not in f_map):
f_map[dst] = {}
log.debug(('Downloading trade fee for %s' % pair))
fee = (float... | def download_fee_map():
f_map = {}
for pair in btceapi.common.all_pairs:
[src, dst] = pair.split('_')
if (src not in f_map):
f_map[src] = {}
if (dst not in f_map):
f_map[dst] = {}
log.debug(('Downloading trade fee for %s' % pair))
fee = (float... |
01ead473098694b96cfd264c8e462387c68f2e311b02173d3a7acc7fb9b6ad55 | def get_depth_retry(pair, retries=10):
'Call the getDepth call using a persistent connection'
global btce_conn
while (retries > 0):
try:
return btceapi.public.getDepth(pair, btce_conn)
except:
retries -= 1
log.debug(('getDepth failed. Reconnecting with %d... | Call the getDepth call using a persistent connection | BTCeArbitrage.py | get_depth_retry | chuckatkins/BTCeArbitrage | 12 | python | def get_depth_retry(pair, retries=10):
global btce_conn
while (retries > 0):
try:
return btceapi.public.getDepth(pair, btce_conn)
except:
retries -= 1
log.debug(('getDepth failed. Reconnecting with %d tries remaining.' % retries))
btce_conn =... | def get_depth_retry(pair, retries=10):
global btce_conn
while (retries > 0):
try:
return btceapi.public.getDepth(pair, btce_conn)
except:
retries -= 1
log.debug(('getDepth failed. Reconnecting with %d tries remaining.' % retries))
btce_conn =... |
990538d5151ccd9d8a6d58352dab308bda66bc4d267a68750c4b1db35d66f1fa | def download_price_map():
'Retrieve the map of all pricing information from BTCe'
p_map = {}
for pair in btceapi.common.all_pairs:
[src, dst] = pair.split('_')
if (src not in p_map):
p_map[src] = {}
if (dst not in p_map):
p_map[dst] = {}
log.debug(('Do... | Retrieve the map of all pricing information from BTCe | BTCeArbitrage.py | download_price_map | chuckatkins/BTCeArbitrage | 12 | python | def download_price_map():
p_map = {}
for pair in btceapi.common.all_pairs:
[src, dst] = pair.split('_')
if (src not in p_map):
p_map[src] = {}
if (dst not in p_map):
p_map[dst] = {}
log.debug(('Downloading order depth for %s' % pair))
(asks, b... | def download_price_map():
p_map = {}
for pair in btceapi.common.all_pairs:
[src, dst] = pair.split('_')
if (src not in p_map):
p_map[src] = {}
if (dst not in p_map):
p_map[dst] = {}
log.debug(('Downloading order depth for %s' % pair))
(asks, b... |
45ae1e8ae9be998785df1ff7a7b0c796ed211d7eea96c5fa68b3c66594b3ba18 | def test_backwards_compatibility_read():
'This is a backwards compatibility test.\n If it fails, your edits must be changed to make this test pass.\n If the hera_pspec team decides to move forward and break\n compatibility, this file can be overwritten\n and the date of the file changed in the comment b... | This is a backwards compatibility test.
If it fails, your edits must be changed to make this test pass.
If the hera_pspec team decides to move forward and break
compatibility, this file can be overwritten
and the date of the file changed in the comment below. | hera_pspec/tests/test_uvpspec.py | test_backwards_compatibility_read | adeliegorce/hera_pspec | 10 | python | def test_backwards_compatibility_read():
'This is a backwards compatibility test.\n If it fails, your edits must be changed to make this test pass.\n If the hera_pspec team decides to move forward and break\n compatibility, this file can be overwritten\n and the date of the file changed in the comment b... | def test_backwards_compatibility_read():
'This is a backwards compatibility test.\n If it fails, your edits must be changed to make this test pass.\n If the hera_pspec team decides to move forward and break\n compatibility, this file can be overwritten\n and the date of the file changed in the comment b... |
b6de88327b8f9ad171d6c9e5d250f708592942412d87f949423e689ced65989c | def _add_optionals(self, uvp):
'add dummy optional cov_array and stats_array to uvp'
uvp.cov_array_real = odict()
uvp.cov_array_imag = odict()
uvp.cov_model = 'empirical'
stat = 'noise_err'
uvp.stats_array = odict({stat: odict()})
for spw in uvp.spw_array:
ndlys = uvp.get_spw_ranges(... | add dummy optional cov_array and stats_array to uvp | hera_pspec/tests/test_uvpspec.py | _add_optionals | adeliegorce/hera_pspec | 10 | python | def _add_optionals(self, uvp):
uvp.cov_array_real = odict()
uvp.cov_array_imag = odict()
uvp.cov_model = 'empirical'
stat = 'noise_err'
uvp.stats_array = odict({stat: odict()})
for spw in uvp.spw_array:
ndlys = uvp.get_spw_ranges(spw)[0][(- 1)]
uvp.cov_array_real[spw] = np.e... | def _add_optionals(self, uvp):
uvp.cov_array_real = odict()
uvp.cov_array_imag = odict()
uvp.cov_model = 'empirical'
stat = 'noise_err'
uvp.stats_array = odict({stat: odict()})
for spw in uvp.spw_array:
ndlys = uvp.get_spw_ranges(spw)[0][(- 1)]
uvp.cov_array_real[spw] = np.e... |
292eb64f80899c56bdcea15a216a7a0ec881819a5732879c639cc4874505970a | def start(self, *args, **kwargs):
' build up a new FSM based on the arguments '
if self.is_child:
raise ValueError('already started as a child thread')
if (self.end_state is not None):
raise ValueError('already started')
frame = inspect.currentframe()
self.start_frame = frame.f_back
... | build up a new FSM based on the arguments | venv/Lib/site-packages/veriloggen/thread/thread.py | start | SweetSourPeter/violin | 232 | python | def start(self, *args, **kwargs):
' '
if self.is_child:
raise ValueError('already started as a child thread')
if (self.end_state is not None):
raise ValueError('already started')
frame = inspect.currentframe()
self.start_frame = frame.f_back
self.fsm = FSM(self.m, self.name, sel... | def start(self, *args, **kwargs):
' '
if self.is_child:
raise ValueError('already started as a child thread')
if (self.end_state is not None):
raise ValueError('already started')
frame = inspect.currentframe()
self.start_frame = frame.f_back
self.fsm = FSM(self.m, self.name, sel... |
2f50d0cfdc01c57f9a82bc4ba5a626eb07ed3c1714f5fade1ed4b92dfe6e1ccc | def extend(self, fsm, *args, **kwargs):
' extend a given thread FSM '
frame = inspect.currentframe()
self.start_frame = frame.f_back
self._synthesize_start_fsm(args, kwargs, fsm)
return fsm | extend a given thread FSM | venv/Lib/site-packages/veriloggen/thread/thread.py | extend | SweetSourPeter/violin | 232 | python | def extend(self, fsm, *args, **kwargs):
' '
frame = inspect.currentframe()
self.start_frame = frame.f_back
self._synthesize_start_fsm(args, kwargs, fsm)
return fsm | def extend(self, fsm, *args, **kwargs):
' '
frame = inspect.currentframe()
self.start_frame = frame.f_back
self._synthesize_start_fsm(args, kwargs, fsm)
return fsm<|docstring|>extend a given thread FSM<|endoftext|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.