Skip to content

Instantly share code, notes, and snippets.

View puckvg's full-sized avatar

Puck van Gerwen puckvg

  • EPFL
  • Lausanne, Switzerland
View GitHub Profile
@puckvg
puckvg / parallel.py
Created January 27, 2021 11:25
Multiprocessing in python
import multiprocessing
from multiprocessing import Pool
from tqdm import tqdm
import functools
import time
def square_and_add(x, y=5):
# function to multiprocess
time.sleep(0.1)
@puckvg
puckvg / 1.xyz
Created January 27, 2021 11:20
read stdin in python
3
C 0. 0. 0.
H 1. 1. 1.
H 2. 3. 1.