Skip to content

Instantly share code, notes, and snippets.

View jontxu's full-sized avatar

Jon J. jontxu

  • Astronomisches Rechen-Institut
  • Heidelberg, Germany
View GitHub Profile
@jontxu
jontxu / HRD.ipynb
Last active November 12, 2015 22:14
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 -*-
from pylab import *
from math import *
from numpy import exp, log
from scipy.integrate import quad
from sys import argv
# Q: standard cumulative distribution function for a normally distributed variable
def Q(z):
@jontxu
jontxu / base_62_converter.py
Last active December 28, 2015 22:59 — forked from bhelx/base_62_converter.py
More understandable
#!/usr/bin/env python
#
# Converts any integer into a base [BASE] number. I have chosen 62
# as it is meant to represent the integers using all the alphanumeric
# characters, [no special characters] = {0..9}, {A..Z}, {a..z}
#
# I plan on using this to shorten the representation of possibly long ids,
# a la url shortenters
#
@jontxu
jontxu / readme_install_node
Last active December 28, 2015 14:59 — forked from x-Code-x/readme_install_node
Tested with Debian Wheezy in 2013-11-17
# Quick cp from http://sekati.com/etc/install-nodejs-on-debian-squeeze
#
# Needed to install TileMill from MapBox
#
# Installs node.js which has npm bundled
#
# Build Dependencies (the -y flag avoids [Y/n] menus)
sudo apt-get update -y && sudo apt-get install git-core curl build-essential openssl libssl-dev -y