Skip to content

Instantly share code, notes, and snippets.

View franktoffel's full-sized avatar

Fran Navarro franktoffel

View GitHub Profile
@fperez
fperez / README.md
Last active July 1, 2021 04:43
Polyglot Data Science with IPython

Polyglot Data Science with IPython & friends

Author: Fernando Pérez.

A demonstration of how to use Python, Julia, Fortran and R cooperatively to analyze data, in the same process.

This is supported by the IPython kernel and a few extensions that take advantage of IPython's magic system to provide low-level integration between Python and other languages.

See the companion notebook for data preparation and setup.

@astrojuanlu
astrojuanlu / generate.py
Created March 21, 2016 16:34
Generate AeroPython certificates
from datetime import datetime
from lxml import etree
from natural.number import ordinal
def main(source_fname, names):
with open(source_fname, 'r') as fh:
doc = etree.parse(fh)
@jakevdp
jakevdp / discrete_cmap.py
Last active March 8, 2024 14:54
Small utility to create a discrete matplotlib colormap
# By Jake VanderPlas
# License: BSD-style
import matplotlib.pyplot as plt
import numpy as np
def discrete_cmap(N, base_cmap=None):
"""Create an N-bin discrete colormap from the specified input map"""
@macd
macd / gist:10562695
Last active September 5, 2016 19:55
Chapter 1 A Brief Tutorial. A direct translation of Chapter 1 of D.J. Higham and N.J. Higham, MATLAB Guide (2005)
{
"metadata": {
"name": "",
"signature": "sha256:0936e15ccb28902d87415df9f98f757654d0c61a7c74400c92c0553c6bbcf91d"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@kynan
kynan / helmholtz_demo.py
Created September 20, 2011 18:59
DOLFIN demo to solve the Helmholtz equation on a unit square
"""This demo program solves Helmholtz's equation
- div grad u(x, y) + u(x,y) = f(x, y)
on the unit square with source f given by
f(x, y) = (1.0 + 8.0*pi**2)*cos(x[0]*2*pi)*cos(x[1]*2*pi)
and the analytical solution