Skip to content

Instantly share code, notes, and snippets.

View fedeisas's full-sized avatar
🎯

Fede Isas fedeisas

🎯
  • Buenos Aires, Argentina
View GitHub Profile
@fedeisas
fedeisas / twitter.R
Last active October 6, 2017 13:14
Wordcloud con búsqueda de tweets
# Librerias requeridas
library('httr')
library('jsonlite')
library('tm')
library('wordcloud')
library('RColorBrewer')
library("SnowballC")
# Keys de acceso (https://apps.twitter.com/)
# Cómo creo una app de Twitter: https://www.digitalocean.com/community/tutorials/how-to-create-a-twitter-app
@fedeisas
fedeisas / letras.R
Last active October 4, 2017 20:03
Wordcloud de letras de canciones
# Cargo las librerias necesarias
library('rvest') # Para scrapear paginas
library('tm') # Text Mining
library('wordcloud')
library('RColorBrewer') # Paletas de colores
library('SnowballC') # Stemming
library('GetoptLong') # qq() permite interpolar strings
# Seteo locale para no tener problemas de acentos
Sys.setlocale('LC_CTYPE', 'en_US.UTF-8')
import os
from glob import glob
import piexif
import pandas as pd
from PIL import Image
import datetime, time
import numpy as np
from multiprocessing import Pool, Process, Value, Lock, current_process
import logging
reload(logging)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fedeisas
fedeisas / decimal.ipython
Created March 21, 2017 19:12
Python Decimal
In [13]: from decimal import *
In [14]: getcontext().prec = 6
In [15]: ars_usd = Decimal(0.0641030)
In [16]: usd_ars = 1 / ars_usd
In [17]: usd_ars
Out[17]: Decimal('15.5999')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
% Define a function pieces so that pieces(N) tells you the maximum number of pieces into which you can cut a piece of paper with N cuts.
% You can see an illustration of this problem at the top of this step.
% If you’d like to take this problem further, think about the 3-dimensional case. Into how many pieces can you cut a wooden block with N saw cuts?
% Taking it even further: What is the general problem in n dimensions?
-module(howManyPieces).
-export([howManyPieces/1]).
howManyPieces(0) ->
1;