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/bash | |
# This is assuming you have the password accessible via `pass` (1st line) | |
# and the OATH secret as the second word of a line starting with "Secret: " | |
# can't pass an EOF directly because that would be hogging stdin (from ssh) | |
script=$(cat <<EOF | |
spawn ssh $@ | |
expect "oath" | |
send -- "$(oathtool --totp -b $(pass PASSWORDNAME |grep Secret: | cut -d ' ' -f2))\r" |
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 python | |
""" | |
Pandoc filter to convert text of form [@foo,@bar] to citations. | |
Handy for e.g. word documents... | |
""" | |
import re | |
from pandocfilters import toJSONFilter, Str |
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
# CASE 1: 'ODV.nc' exported from ODV. | |
import xarray as xr | |
ds = xr.open_dataset('ODV.nc') | |
ds.rename({v: ds[v].long_name for v in ds if hasattr(ds[v], 'long_name')}) | |
# CASE 2: 'ODV.txt' in the tabular ODV text format. | |
import pandas as pd |