This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import multiprocessing, pathos.multiprocessing | |
from tqdm import tqdm | |
import os | |
#print(os.getpid()) | |
# I want to execute a function... | |
def fun(a,b): | |
#print(os.getpid()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Github workflow to compile latex and deploy the pdf to an orphan branch. | |
# The latest compiled pdf is at available at e.g. | |
# https://github.com/dgerosa/reponame/blob/build/filename.pdf | |
# Davide Gerosa (2021) https://github.com/dgerosa | |
name: writeapaper | |
on: [push] | |
jobs: | |
paper: | |
runs-on: ubuntu-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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 |