Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
@qmahoney
qmahoney / header.bash
Last active December 18, 2020 20:12
Fake Athena header page
#!/bin/bash
# Copy banner.ps and owl.ps from:
# http://athena10.mit.edu/trac/browser/trunk/third/lprng/athena?rev=13556
echo "/user (`whoami`) def" > vars.ps
echo "/host (`hostname`) def" >> vars.ps
echo "/queuejob () def" >> vars.ps
echo "/date (`date +"%A, %e %B %Y %H:%M:%S"`) def" >> vars.ps
echo "/motd () def" >> vars.ps
@bsweger
bsweger / useful_pandas_snippets.md
Last active June 14, 2025 19:01
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)