Skip to content

Instantly share code, notes, and snippets.

View tarsisazevedo's full-sized avatar

Tarsis Azevedo tarsisazevedo

View GitHub Profile
import re
titles = ['Deputado Federal ', 'General ', 'Ex-presidente ', 'Senadora ', 'Senador ', 'do Exército', 'Tenente-Brigadeiro']
novas_linhas = []
for _, row in agenda2016_limpa_final.iterrows():
nova_linha = [row["oque"], row["onde"], row["ano"], row["mes"], row["dia"], row["hora"]]
pessoas = [re.sub('|'.join(titles),'',i.split(', ')[0]) for i in row["oque"].split('; ')]
for pessoa in pessoas:
linha_com_pessoa = nova_linha[:] # o lista[:] eh para copiar a lista
linha_com_pessoa.append(pessoa)
novas_linhas.append(linha_com_pessoa)
@tarsisazevedo
tarsisazevedo / robot.js
Created December 4, 2012 13:22 — forked from fabiopimentel/robot.js
Optimus Prime
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.clone();
@tarsisazevedo
tarsisazevedo / robot.js
Created December 3, 2012 13:11
Woot Sucks
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
//robot.turnGunRight(90);
robot.clone();
this.direction = 1;
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(1);
if (robot.parentId) {
@tarsisazevedo
tarsisazevedo / robot.js
Created December 3, 2012 13:03 — forked from fabiomcosta/robot.js
Staticker, The clone
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.rotateCannon(360);
@tarsisazevedo
tarsisazevedo / removetrailling.sh
Created October 4, 2011 14:43 — forked from bernardobarreto/removetrailling.sh
Remove trailling caracters from all files in the folder
for f in $(find -name \*.py | xargs egrep -r -l '\s+$') ; do
sed -r -i 's/\s+$//' $f ;
done
By Klaus Wuestefeld
1) Torne-se excelente.
Seja realmente bom em alguma coisa. Não fique só choramingando ou
querendo progredir às custas dos outros. Não pense q pq vc sentou 4
anos numa faculdade ouvindo um professor falar sobre software q vc
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo
aula. Ele pratica. Instrumentistas geniais nao aprendem a tocar tendo
aula. Eles praticam. Pratique. Chegue em casa depois do trabalho e da