This file contains hidden or 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
from setuptools import Extension, setup | |
from setuptools.command.build_ext import build_ext | |
from importlib.machinery import EXTENSION_SUFFIXES | |
import os | |
import shutil | |
import sys | |
import subprocess | |
import sysconfig | |
This file contains hidden or 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 concurrent.futures | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import time, random | |
def do_stuff(a): # these are examples. | |
x = np.linspace(1,10) | |
plt.plot(x, np.cos(a*x)) | |
plt.savefig('{}.png'.format(a)) | |
time.sleep(random.random()) |
This file contains hidden or 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 matplotlib.pyplot as plt | |
import matplotlib.tri as mpltri | |
import meshio # von https://github.com/nschloe/meshio | |
mesh = meshio.read('any_known_mesh_format.msh') | |
tria = mpltri.Triangulation(mesh.points[:,0], mesh.points[:,1], mesh.cells['triangle']) | |
for k in range(nplots): | |
plt.figure() | |
plt.tricontourf(tria, plot_data[k]) |