Skip to content

Instantly share code, notes, and snippets.

View dgerosa's full-sized avatar

Davide Gerosa dgerosa

View GitHub Profile
dgerosa /
Created June 27, 2021 19:58
Simple parallel jobs in python
import numpy as np
import multiprocessing, pathos.multiprocessing
from tqdm import tqdm
import os
# I want to execute a function...
def fun(a,b):
dgerosa / writeapaper.yml
Last active May 6, 2023 11:36
Github workflow to compile and deploy latex
# Github workflow to compile latex and deploy the pdf to an orphan branch.
# The latest compiled pdf is at available at e.g.
# Davide Gerosa (2021)
name: writeapaper
on: [push]
runs-on: ubuntu-latest
dgerosa /
Created December 14, 2018 06:32
Calculate the volume of the n-dimensional spehere a function of the dimension using a simple hit-or-miss Monte Carlo.
from __future__ import print_function, division
import numpy as np
import scipy.special
import pylab as plt
import time