View novo_mes.gs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var planilhas = { | |
"meu": { | |
calcCol: "F", | |
}, | |
"kassia": { | |
calcCol: "G", | |
}, | |
"casal": { | |
calcCol: "H", | |
}, |
View calcula_tempo_trabalho.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime, timedelta | |
def format_time(element): | |
return str(element) if element >=10 else "0"+str(element) | |
def hours_to_str(time): | |
hour = format_time(time.hour) | |
minute = format_time(time.minute) | |
return hour+":"+minute |
View ansi_or_utf8_text_processing.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
try: | |
FILE_PATH =sys.argv[1] | |
except IndexError: | |
print("need pass a file as input parameter\npython my_script.py my_csv_file.csv") | |
exit() | |
def predict_encoding(file_path, n_lines=20): | |
'''Predict a file's encoding using chardet''' | |
import chardet |
View ansi_text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
La Coupe du monde de football ou Coupe du monde de la FIFA est une compétition internationale de football qui se déroule ordinairement tous les quatre ans. Cette compétition, créée en 1928 en France, sous l'impulsion de Jules Rimet alors président de la FIFA, est ouverte à toutes les fédérations reconnues par la Fédération internationale de football association (FIFA). La première édition se déroule en 1930 en Uruguay, dont l'équipe nationale sort vainqueur. À l'exception de la Coupe du monde de 1930, la compétition se tient en deux phases. Organisée par les confédérations continentales, la phase préliminaire permet aux meilleures sélections de chaque continent de se qualifier pour la phase finale qui se déroule dans un pays organisateur. Le format actuel de la phase finale fait s'affronter trente-deux équipes nationales masculines pendant une période d'environ un mois. Seules huit nations sont au palmarès de la Coupe du monde. Le Brésil, seule équipe à avoir disputé toutes les phases finales de compétition, |
View compara_termos.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
# verifica se alguma palavra de alguma instancia da coluna1 está contida em alguma palavra de alguma instância na coluna2 | |
# com isso se tem um indicador de possível correlação entre as instâncias. | |
# o contexto é limitar o escopo de busca para verificar se existem instâncias da coluna 1 que tem o mesmo significado que a coluna2 | |
import re | |
def compile_stopwords_to_regex(arr): | |
orRegexSign = "|" |
View csv_campo_livre_algoritmo.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# algoritmo para tratar \r\n de textos livres em tabelas csv. | |
# requirimentos | |
# delimitador = ";" | |
# newline =\r\n | |
# a ultima coluna(antes do new line) precisa estar garantido não ter \r\n, para garantir a saida do loop | |
with open("abc.csv", "rb") as fr: | |
h = fr.read().strip() |
View recoverAppVersion.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('https'); | |
var cheerio = require('cheerio'); | |
http.get('https://play.google.com/store/apps/details?id=com.totvs.globo2777&hl=en', (res) => { | |
const { statusCode } = res; | |
const contentType = res.headers['content-type']; | |
let error; | |
// if (statusCode !== 200) { | |
// error = new Error(`Request Failed.\n` + |
View SQL_gist_collections.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- checking intregrity of foreign key restriction | |
select f.foreign_key | |
from foreignTable f left join primaryTable p | |
on p.primary_key = f.foreign_key | |
where p is null; | |
View zip_brute_force.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- coding: utf-8 -*- | |
import sys | |
from zipfile import * | |
from itertools import chain, tee, product | |
#TODO recebe path ou nome do arquivo atraves do args | |
#TODO: verifica se eh path, se for faz o bind do arquivo, se for sรณ arquivo pega o path onde se encontra o arquivo e faz o bind | |
zipname = "flag.zip" | |
zip = ZipFile(zipname) | |
i =1 |
View python_shred.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# recebe uma funcao default que retorna True | |
# a funcao pode ser alterada para receber um predicado | |
def a(filter=lambda x: True, *args): | |
return filter(args) | |
a(lambda x: x[0] < x[1] , 3,4) |
NewerOlder