Skip to content

Instantly share code, notes, and snippets.

#!/bin/env python
# coding: utf-8
from multiprocessing import Pool
import time
import subprocess as sp
def print_names(liste_noms):
for nom in liste_noms:
time.sleep(1)

Keybase proof

I hereby claim:

  • I am tbelahi on github.
  • I am tbelahi (https://keybase.io/tbelahi) on keybase.
  • I have a public key ASBVLaXsQFFJfazpJidVpHAsPuggnr_61TG08Tb3_NLsRAo

To claim this, I am signing this object:

@tbelahi
tbelahi / colorbar_and_ImageGrid.py
Last active July 5, 2016 11:23
A way to overcome the difficulty of matplotib to deal with aspect ratio of images and their corresponding colorbars is to use ImageGrid. Here is an example to show how one can use ImageGrid to nicely add a vertical colorbar to an image.
#!/usr/bin/env python
# coding: utf-8
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.axes_grid1 import ImageGrid
"""
an example to show how one can use ImageGrid to nicely add a vertical colorbar to an image.
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Fortran namelist parser. Converts nameslists to python dictionaries.
Should be fairly robust. Cannot be used for verifying fortran namelists as it
is rather forgiving.
Error messages during parsing are kind of messy right now.
{
"metadata": {
"name": "effect_of_dispersion.ipynb"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{