Skip to content

Instantly share code, notes, and snippets.

View restrepo's full-sized avatar

Diego Restrepo restrepo

View GitHub Profile
@folkertdev
folkertdev / lagrangePolynomial.py
Created September 27, 2015 14:12
A sympy-based Lagrange polynomial constructor
"""
A sympy-based Lagrange polynomial constructor.
Given a set of function inputs and outputs, the lagrangePolynomial function will construct an
expression that for every input gives the corresponding output. For intermediate values,
the polynomial interpolates (giving varying results based on the shape of your input).
This is useful when the result needs to be used outside of Python, because the
expression can easily be copied. To convert the expression to a python function object,
use sympy.lambdify.
"""
@restrepo
restrepo / ubuntu.sh
Last active November 16, 2021 03:25
Ubuntu postinstall
#!/usr/bin/env bash
#Postinstall for Ubuntu 9.10 -- 14.04
#Install as root!
#after sudo su
echo "================================================================"
echo "Update and upgrade the system"
sudo apt-get install aptitude
sudo aptitude update
sudo aptitude -y safe-upgrade
echo "================================================================"