Skip to content

Instantly share code, notes, and snippets.

View ferreiro's full-sized avatar
👨‍🎤
Dancing in the rain

Jorge Ferreiro ferreiro

👨‍🎤
Dancing in the rain
View GitHub Profile
@ferreiro
ferreiro / Extraer emails
Created April 26, 2016 22:54
Script para mi charla donde extraigo emails
import pandas as pd
import numpy as np
import csv as csv
# Filesname
output_file = 'emails.txt'
file_descriptor = open(output_file, 'w')
df = pd.read_csv('registers.csv', header=0) # Load the test file into a dataframe
df = df.drop(["#","name","experience","start","submit","network"], axis=1)
node * insert(node * root, int value) {
if (!root){
node *newLeaf;
newLeaf->data = value;
newLeaf->left = NULL;
newLeaf->right = NULL;
root = newLeaf;
}
else {
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = https://gitlab.com/ferreiro/new-dotfiles.git
pushurl = https://gitlab.com/ferreiro/new-dotfiles.git
Error: No such file or directory @ rb_sysopen - /Users/Jorge/hdhfghfg
class CracklePop(object):
def __init__(self, left, right):
self.left = left # Left index
self.right = right # Right index
# Private methods
def valid_bounds(self):
"""
Checks that the left and right bounds
class CracklePop(object):
def __init__(self, left, right):
self.left = left
self.right = right
# Private methods
def valid_bounds(self):
left = self.left
right = self.right
@ferreiro
ferreiro / Git-shortcuts
Created March 1, 2016 17:02
Github commands
log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow) %d%C(reset)' --all
git config --global alias.superlog "PONER LO DE ARRIBA"
git config credentials.helper osxkeychain
@ferreiro
ferreiro / GenerateGames.py
Created February 7, 2016 23:22
Generate a list of games as prolog deffacts using a simple python program.
from random import randint
games = [] # It's a list og games where each element is a dictionary {'name': '', 'type':'', 'used': False|True}
cons_type = ['inteligencia','deporte','aventura','familiar']
cons_numPlayers = ['uno', 'dos', 'MasDeDos']
cons_difficulty = ['facil', 'media', 'dificil']
cons_time = ['poco', 'medio', 'mucho']
cons_age = ['TP', 'Mas13', 'Mas18']
# Subject classs. That has a constructor (__init__) and a method (getSubjectInfo)
class Subject:
def __init__(self, name, teacher, year, degree):
self.name = name
self.teacher = teacher
self.year = year
self.degree = degree
def getSubjectInfo(self):
info = "-------------------------------------\n"