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
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
Error: No such file or directory @ rb_sysopen - /Users/Jorge/hdhfghfg
[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
node * insert(node * root, int value) {
if (!root){
node *newLeaf;
newLeaf->data = value;
newLeaf->left = NULL;
newLeaf->right = NULL;
root = newLeaf;
}
else {
@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)
@ferreiro
ferreiro / api.js
Created September 17, 2016 16:56 — forked from fwielstra/api.js
An example NodeJS / Mongoose / Express application based on their respective tutorials
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');
@ferreiro
ferreiro / 1237
Created September 30, 2016 00:11
import sys
elements = []
total_cases = int(input())
for i in range(0, total_cases):
db_size = int(input())
for j in range(0, db_size):
@ferreiro
ferreiro / UdacityDownload.py
Created October 2, 2016 00:15 — forked from vinovator/UdacityDownload.py
Python program to download course content for multiple Udacity courses neatly arranged within a folder structure
# UdacityDownload.py
# Python 2.7.6
"""
Python script to download course content from udacity courses
- Creates folders as per course names
- Downloads all the zip files
- Extract content from zip file
- Finally delete the zip file
Multiple course content can be downloaded from list
@ferreiro
ferreiro / problem1.py
Created October 10, 2016 23:39
Problem 1237
# python version: 3
# how to execute? In a bash shell: python3 problem1.py < testCases.txt > testCases.mio
import sys
total_cases = int(input()) # reads the total cases from stdin
solution = ""
for i in range(0, total_cases):
#include <iostream>
using namespace std;
const int MAX_DB_SIZE = 10000;
struct Car {
string name;
int lowPrice;
int highPrice;
};