Skip to content

Instantly share code, notes, and snippets.

@jamm1985
jamm1985 / .muttrc
Last active Aug 23, 2021
Mutt configuration file with multiple gmail accounts (mbsync), folders, sidebar and notmuch mail search
View .muttrc
# import secrets
source "gpg -dq $HOME/.mutt/pwd_file.txt.gpg |"
# mailbox type
set mbox_type = Maildir
# read/new is good enough for me
unset mark_old
# insert the user aget header
set user_agent
# download folder
macro attach s <save-entry><bol>/Users/jamm/Downloads/mail/<eol>
@jamm1985
jamm1985 / landslide_rainfall_logit.py
Last active Aug 16, 2021
Perform logistic regression for landslide prediction based on rainfall measurements
View landslide_rainfall_logit.py
"""
File: landslide_rainfall_logit.py
Author: Andrey Stepnov
Email: a.stepnov@geophystech.ru, myjamm@gmail.com
Github: https://github.com/jamm1985
Description: Perform logistic regression for landslide prediction
based on rainfall measurements.
Classification tests, plots and metrics!
"""
@jamm1985
jamm1985 / rainfall_regression.py
Created Jul 24, 2020
Gets data from XLSX, does explanatory analysis and performs OLS regression
View rainfall_regression.py
"""
File: rainfall_regression.py
Author: Andrey Stepnov
Email: a.stepnov@geophystech.ru, myjamm@gmail.com
Github: https://github.com/jamm1985
Description: Gets data from XLSX, does explanatory analysis and performs OLS regression
"""
import matplotlib.pylab as plt
import pandas as pd
@jamm1985
jamm1985 / wave_plots.py
Last active Jul 25, 2020
Simple waveforms (from various earthquakes) plot with trace differentiation, normalization.
View wave_plots.py
"""
File: wave_plots.py
Author: Andrey Stepnov
Email: a.stepnov@geophystech.ru, myjamm@gmail.com
Github: https://github.com/jamm1985
Description: puts waveforms from different earthquakes in single plot using obspy and matplotlib
"""
from obspy import read
from obspy import UTCDateTime
@jamm1985
jamm1985 / vimrc
Last active Nov 29, 2020
Vim configuration as Python IDE (and also C, tex/latex and Julia)
View vimrc
"colors
syntax enable
colorscheme vimbrains
"modern vim
set nocompatible
set backspace=indent,eol,start
" folding for python style
au BufNewFile,BufRead *.py set foldmethod=indent
@jamm1985
jamm1985 / catalog.py
Last active Jul 24, 2020
Aggregate (count) catalog data by year/month and plot it
View catalog.py
"""
File: catalog.py
Author: Andrey Stepnov
Email: myjamm@gmail.com, a.stepnov@geophystech.ru
Github: https://github.com/jamm1985
Description: Aggregate (count) catalog data by year/month and plot it
Catalog sources: https://earthquake.usgs.gov, https://eqalert.ru
"""