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
import os | |
import subprocess | |
import random | |
def new_color(): | |
base16_shell = os.environ['BASE16_SHELL'] | |
proc = subprocess.run(['ls', '{}/scripts'.format(base16_shell)], capture_output=True) | |
out = proc.stdout.split() | |
cmd = random.choice(out).decode('utf-8').split('.sh')[0].replace('-','_',1) |
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/zsh | |
zmodload zsh/mathfunc | |
theta=${1:-0} | |
# Check if input is a number, from [1] | |
re='^[+-]?[0-9]+([.][0-9]+)?$' | |
if ! [[ $theta =~ $re ]] ; then | |
echo "error: Usage: $ rotate_touchpad.sh [number]" >&2; exit 1 |
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 | |
ACTIVEWINDOW=$(xdotool getactivewindow) | |
eval $(xdotool getwindowgeometry --shell $ACTIVEWINDOW) | |
HALF_WIDTH="$(($WIDTH / 2 + 10))" | |
HALF_HEIGHT="$(($HEIGHT / 2))" | |
xdotool mousemove --window $ACTIVEWINDOW $HALF_WIDTH $HALF_HEIGHT keydown ctrl click 1 keyup ctrl |
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
import numpy as np | |
import matplotlib.pyplot as plt | |
from scipy.constants import physical_constants | |
from uncertainties import ufloat as uncfloat | |
uMeV = physical_constants['atomic mass constant energy equivalent in MeV'][0] | |
un = uncfloat(1008664.91582, 0.00049) * 1e-6 # in atomic mass units | |
u1H = uncfloat(1007825.03224, 0.00009) * 1e-6 | |
u2H = uncfloat(2014101.77811, 0.00012) * 1e-6 | |
u3He = uncfloat(3016029.32265, 0.00022) * 1e-6 |
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.
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.
NewerOlder