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
|
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
# https://bit.ly/4b9xkgI | |
# run with: | |
# powershell -Command "(New-Object Net.WebClient).DownloadString('https://bit.ly/4b9xkgI') | python" | |
# you may wish to change "python" to a specific version/env of python, e.g. | |
# powershell -Command "(New-Object Net.WebClient).DownloadString('https://bit.ly/4b9xkgI') | C:\Users\User\miniforge3\envs\mm\python.exe" | |
# or without powershell, if you have curl | |
# curl -L -o install_mm.py https://bit.ly/4b9xkgI && python install_mm.py && del install_mm.py | |
import urllib.request |
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 math | |
import pint | |
AVOGADRO = pint.Quantity("6.02214076e23 /mol") | |
PLANCK = pint.Quantity("6.62607015e-34 J*s") | |
C = pint.Quantity("299792458 m/s") | |
def _ensure_quantity(value: str | float | pint.Quantity, units: str) -> pint.Quantity: | |
quant = pint.Quantity(value) |
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
#!/bin/bash | |
# output to the current directory if no argument is given | |
if [[ $# -eq 0 ]]; then | |
OUTPUT=$(pwd) | |
else | |
OUTPUT=$1 | |
fi | |
packages=("autoconf" "automake" "libtool" "boost") |
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
from turtle import position | |
from typing import Sequence | |
import scipy.special | |
import numpy as np | |
from matplotlib import pyplot as plt | |
from matplotlib import patches | |
from matplotlib.animation import FuncAnimation | |
import warnings | |
from scipy.fft import fft, fftshift, ifftshift, fftfreq |
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 scipy.special | |
import numpy as np | |
from matplotlib import pyplot as plt | |
from matplotlib import patches | |
from matplotlib.animation import FuncAnimation | |
WF_FWHM = 0.8436843684368438 | |
WF_MAX = 2199.5516151207426 | |
WF_INTEGRAL = 1300.2494235915415 |
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
name: Deploy | |
# this job will be triggered whenever you push to main, or push a tag | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from graphviz import Digraph | |
from vispy import scene | |
def trace(root): | |
nodes, edges = set(), set() | |
def build(v): | |
if v not in nodes: | |
nodes.add(v) | |
for child in v.children: | |
edges.add((child, v)) |
NewerOlder