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
# use console backend for development | |
# https://docs.djangoproject.com/en/2.1/ref/settings/#std:setting-EMAIL_BACKEND | |
# https://docs.djangoproject.com/en/2.1/topics/email/#django.core.mail.backends.smtp.EmailBackend | |
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' | |
# use admin site to login | |
# https://docs.djangoproject.com/en/2.1/ref/settings/#std:setting-LOGIN_URL | |
LOGIN_URL = '/admin/' |
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
#!/bin/sh | |
yyyymmdd=20180701 | |
hhmm=0000 | |
fname=Z__C_RJTD_${yyyymmdd}${hhmm}00_RDR_JMAGPV__grib2 | |
tar xf ${fname}.tar | |
wgrib2 ${fname%__grib2}_Ggis1km_Prr10lv_ANAL_grib2.bin -netcdf ${hhmm}.nc |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# a: all | |
# =: reset | |
# r: read | |
# X: execute excluding files | |
# u: user (owner) | |
# +: add | |
# w: write | |
chmod -R a=rX,u+w directory |
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
# https://apple.stackexchange.com/questions/238777/how-do-i-identify-which-cpu-a-macbook-uses | |
sysctl -n machdep.cpu.brand_string | |
system_profiler SPHardwareDataType |
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
pi = acos(-1.0) | |
tau = 2 * pi | |
deg2rad = pi / 180.0 | |
rad2deg = 180.0 / pi | |
procedure lonlat2xyz(lon, lat, x, y, z) | |
begin | |
x = cos(lon) * cos(lat) | |
y = sin(lon) * cos(lat) | |
z = sin(lat) |
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
<?php | |
// https://wordpress.stackexchange.com/questions/211303/wp-cli-enabling-maintainance-mode | |
$upgrading = time(); |
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
defaults read /Library/Preferences/SystemConfiguration/autodiskmount AutomountDisksWithoutUserLogin |
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
# https://stackoverflow.com/questions/23703417/can-mayavi-render-a-figure-scene-with-a-transparent-background | |
import numpy as np | |
from mayavi import mlab | |
import matplotlib.pyplot as plt | |
d = 3 | |
n = 100 | |
x = np.arange(-d, d, 2 * d / n) | |
y = np.arange(-d, d, 2 * d / n) |