Skip to content

Instantly share code, notes, and snippets.

View marcelino-m's full-sized avatar

Marcelo M. A. marcelino-m

View GitHub Profile
@marcelino-m
marcelino-m / gist:2ca638c06460a065e88edf6218c26704
Created January 11, 2018 06:10 — forked from drorata/gist:b05bfd59c45eec0470f6
Nice output of pandas.DataFrame in org-mode
import pandas as pd
import numpy as np
from tabulate import tabulate

df = pd.DataFrame(np.random.random((4,3)), columns=['A','B','C'])
print("foo")
return(tabulate(df, headers="keys", tablefmt="orgtbl"))
@marcelino-m
marcelino-m / interpolate.R
Created December 18, 2017 05:44 — forked from andrie/interpolate.R
Interpolation and smoothing functions in R
# Generate data in the form of a sine wave
set.seed(1)
n <- 1e3
dat <- data.frame(
x = 1:n,
y = sin(seq(0, 5*pi, length.out = n)) + rnorm(n=n, mean = 0, sd=0.1)
)
approxData <- data.frame(
@marcelino-m
marcelino-m / cx_oracle.md
Last active August 31, 2016 04:05 — forked from kimus/cx_oracle.md
Installing python cx_oracle on Ubuntu

First of all, it just seems like doing anything with Oracle is obnoxiously painful for no good reason. It's the nature of the beast I suppose. cx_oracle is a python module that allows you to connect to an Oracle Database and issue queries, inserts, updates..usual jazz.

Linux

Step 1:

sudo apt-get install build-essential unzip python-dev libaio-dev

Step 2. Click here to download the appropriate zip files required for this. You'll need: