Skip to content

Instantly share code, notes, and snippets.

@RodrigoPrior
RodrigoPrior / Vagrantfile
Created January 27, 2012 00:31
Vagrant PHP Dev
Vagrant::Config.run do |config|
config.vm.customize do |vm|
vm.name = "PHP dev"
vm.memory_size = 512
end
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "ubuntu32"
# Assign this VM to a host only network IP, allowing you to access it
@RodrigoPrior
RodrigoPrior / list_regex_id.py
Created November 9, 2012 03:35
retrieve multiple pages and find string in it
#!/usr/bin/python
import re,urllib2,urllib
list_ids = ( '1', '2', '3')
url = 'https://<url>/<path>/file.php?id='
regex = '[0-9]{2}\/[0-9]{11}\-[0-9]'
@RodrigoPrior
RodrigoPrior / .gitignore
Created November 26, 2012 18:04 — forked from claudiosanches/.gitignore
GIT: Include empty directories
# Ignore everything in this directory
*
# Except this file
!.gitignore
#!/bin/sh
##
# basic script to backup entire drive and backup securely
# backup a mysql database using lvm snapshot tool
##
# stop mysql
/usr/sbin/service mysql stop
#!/bin/sh
# This script will migrate schema and data from a SQLite3 database to PostgreSQL.
# Schema translation based on http://stackoverflow.com/a/4581921/1303625.
# Some column types are not handled (e.g blobs).
SQLITE_DB_PATH=$1
PG_DB_NAME=$2
PG_USER_NAME=$3
@RodrigoPrior
RodrigoPrior / ipython_install.md
Last active July 18, 2017 18:16
Setup Ambiente - Ipython - Computer Vision

Setup de ambiente Ipython

Ambiente: Ubuntu 14.04

sudo apt-get install git  
sudo apt-get install python-scipy  
sudo apt-get install python-numpy  
sudo apt-get install python-skimage  
sudo apt-get install python-pandas  

sudo apt-get install python-opencv

@RodrigoPrior
RodrigoPrior / pandas_df_to_numpy_array_in_HDF5.ipynb
Created September 7, 2014 00:55
Tutorial: Pandas Dataframe to Numpy Array and store in HDF5
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@RodrigoPrior
RodrigoPrior / h5py_create_image_dataset.py
Created September 7, 2014 15:13
Create a dataset respecting the HDF5 image specification
# images to hdf5
# https://groups.google.com/forum/#!topic/h5py/9sA18XbC_ao
# https://github.com/h5py/h5py/issues/268
import h5py
import numpy
def create_image_dataset(group, dataset_name, image, **kwargs):
"""
Create a dataset respecting the HDF5 image specification
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.