Skip to content

Instantly share code, notes, and snippets.

View jvrsgsty's full-sized avatar

jvrsgsty

View GitHub Profile
@jvrsgsty
jvrsgsty / Conda Cheatsheet.md
Last active October 3, 2018 17:39
Conda Cheatsheet

Notes on Conda envs and Jupyter kernels

General conda commands

conda env list
conda env remove --name some-env

Creating new conda envs

I like specifying the python version, since it will install an env-local version of

@jvrsgsty
jvrsgsty / test.rb
Created June 6, 2017 00:03
Attempted test case of Active Record Query bug
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
gem "rails",'5.0.0.1'
@jvrsgsty
jvrsgsty / optimize-images.sh
Last active September 23, 2016 17:58
Optimize PNGs and JPGs in a directory using pngcrush and jpegtran
#!/bin/bash
for f in *.png; do pngcrush -rem alla -reduce -brute $f $f.new; done;
for f in *.jpg; do jpegtran -copy none -optimize $f > $f.new; done;
rm *.png
rm *.jpg
for f in *.new; do mv $f ${f%.*}; done;
@jvrsgsty
jvrsgsty / Browse.oz
Created March 23, 2014 18:57
Oz Tutorial
{Browse 'Hello World'}
declare W H
{Browse foo(width:W height:H surface:thread W*H end)}
W=3
H=5
@jvrsgsty
jvrsgsty / fibonacci.py
Created March 12, 2014 16:16
Ejemplos Python 1
import numpy as np
import optparse
import time
def fibo(n):
if n<= 1:
return n
return fibo(n-1)+fibo(n-2)
def fiboTD(n, tabla):
@jvrsgsty
jvrsgsty / Lista 4 (rls).ipynb
Created February 28, 2014 01:09
Lista 4 (rls)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jvrsgsty
jvrsgsty / Lista 2 (rlm).ipynb
Last active August 29, 2015 13:56
Lista 2 (rlm)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# -*- coding: utf-8 -*-
# Javier Sagastuy
# Last revision: Feb 21, 2014
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as stats
from statsmodels.stats.anova import anova_lm
import statsmodels.formula.api as sm
@jvrsgsty
jvrsgsty / Lista 9.ipynb
Last active December 29, 2015 23:29
Lista 9 de Estadística Aplicada II
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jvrsgsty
jvrsgsty / Lista 5.ipynb
Last active December 29, 2015 21:09
Lista 5 de Estadística Aplicada II
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.