Posts by Hawksec • 49 points
8 posts
-
0
votes2
answers897
views -
1
votes3
answers431
views -
1
votes1
answer1067
views -
0
votes2
answers699
viewsQ: Regex Python Searching dates
resultado_limpo = ((busca.find_all(string=re.compile(r'\d{2}\/\d{2}\/\d{4}\n\t\t\t\t\t\t\t\t')))) I am trying to find dates in dd/mm/yyyy format need search with year only 2016 and have how I put…
-
0
votes1
answer117
viewsA: Problems copy "dns" package in Python
import dns.resolver def lista_mx(hosts): return ['\n'.join(map(str,[resul for resul in [dns.resolver.query(host, 'MX') for host in hosts][i]])) for i in range(hosts.__len__())] if __name__ ==…
-
2
votes3
answers37709
viewsA: Remove element from a list by key (key) and by value (value)
removes all desired occurrences 1+x... def remove_item(my_list,*args): deletar = list(args) for item in deletar: while item in my_list: my_list.remove(item) return my_list my_list =…
-
-1
votes1
answer594
viewsA: How do I print the location (row and column) of the highest value within an array?
def maior(matriz): maior, linha, coluna = 0,0,0 for i in range(len(matriz)): for j in range(len(matriz)): if matriz[i][j] > maior: linha = i coluna = j maior = matriz[i][j] return "Maior Valor %d…
-
1
votes1
answer1327
viewsA: Compare values of two arrays
def converte(dados): # retorna uma nova lista de dict para DADOS, com os item para INT novo = [] for i in dados: for j in i: i[j] = int(i[j]) novo.append(i) if len(novo)%2 == 0: return novo[::2]…