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
#!/usr/bin/env -S gawk -f | |
# for MACOS: brew install gawk | |
# https://gist.github.com/yermulnik/7e0cf991962680d406692e1db1b551e6 | |
# Tested with GNU Awk 5.0.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.2.0) | |
# Usage: cat variables.tf | awk -f /path/to/tf_vars_sort.awk | tee sorted_variables.tf | |
# No licensing; [email protected], 2021-2022 | |
{ | |
# skip blank lines at the beginning of file | |
if (!resource_type && length($0) == 0) next |
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
#poisson solver | |
#u_xx = b(x) | |
%matplotlib inline | |
from __future__ import division | |
import numpy as np | |
from numpy import cos, sin, zeros, pi | |
from numpy.linalg import solve, norm | |
import matplotlib.pyplot as plt | |
from matplotlib import rcParams | |