Skip to content

Instantly share code, notes, and snippets.

🌴
Hiking the Pacific Crest Trail

Kyle Barron kylebarron

Block or report user

Report or block kylebarron

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am kylebarron on github.
  • I am kylebarron (https://keybase.io/kylebarron) on keybase.
  • I have a public key whose fingerprint is 8AE7 20E6 5E4A BE32 7004 32BD 4E42 1C70 00D0 AAB2

To claim this, I am signing this object:

View hcpcs_scrape.py
#! /usr/bin/env python3
"""
---------------------------------------------------------------------
Program: hcpcs_scrape.py
Author: Kyle Barron <barronk@mit.edu>
Created: 2/5/2018
Updated: 2/5/2018
Purpose: Scrape HCPCS codes from the internet
"""
@kylebarron
kylebarron / teach-yourself-cs-setup.sh
Created Feb 22, 2018
Set up folder and download materials for teachyourselfcs.com
View teach-yourself-cs-setup.sh
#! /usr/bin/env bash
mkdir teach-yourself-cs
cd teach-yourself-cs
# Create directory structure
mkdir 1_programming
mkdir 2_computer-architecture
mkdir 3_algorithms-and-data
mkdir 4_math-for-cs
@kylebarron
kylebarron / bigmem.py
Last active Jul 30, 2018
Email user with notification if he/she is using all memory on a node
View bigmem.py
#! /usr/bin/env python3
"""
---------------------------------------------------------------------
Program: bigmem.py
Author: Kyle Barron <barronk@mit.edu>
Created: 3/21/2018, 11:56:17 AM
Updated: 3/21/2018, 11:56:20 AM
Purpose: Email user with notification if he/she is using all memory on a node
"""
@kylebarron
kylebarron / statab
Last active Jun 28, 2018 — forked from pschumm/statab
Wrapper for "stata -b" which issues an informative error msg and appropriate (i.e., non-zero) return code
View statab
#! /usr/bin/env bash
# Wrapper for "stata -b" which issues an informative error msg and appropriate
# (i.e., non-zero) return code
# The basic idea for this script (including grepping the log file to determine
# whether there was an error) was taken from a similar script posted by Brendan
# Halpin on his blog at http://teaching.sociology.ul.ie/bhalpin/wordpress/?p=122
# This script was forked from https://gist.github.com/pschumm/b967dfc7f723507ac4be
@kylebarron
kylebarron / showload.sh
Last active Aug 6, 2018
showload on NBER server from local computer
View showload.sh
#! /usr/bin/env bash
ssh barronk@age4.nber.org \
-o LogLevel=QUIET \
-t $'showload | sed -n \'/-----/,$p\' | sed -r \'/afserver|gruber|miller|sas|age8|age11|age12/d\' | sed -e \'/It might/,$d\''
@kylebarron
kylebarron / myjobs.sh
Last active May 1, 2018
List jobs using >= 1GB of memory on remote servers
View myjobs.sh
#! /usr/bin/env bash
# This depends on `smem`, a memory reporting tool, being available on the remote server
# The following two commands will put the smem executable in your current directory
# wget https://selenic.com/repo/smem/archive/tip.tar.gz
# tar -xzvf tip.tar.gz --wildcards "smem-*/smem" --strip-components 1
#
# You then need to change `smem_path` to the path on the remote server of smem
smem_path="/disk/homedirs/barronk-dua51929/local/bin/smem"
@kylebarron
kylebarron / stata_desc.py
Created May 11, 2018
Create Markdown file with description of Stata dta file
View stata_desc.py
#! /usr/bin/env python3
"""
---------------------------------------------------------------------
Program: stata_desc.py
Author: Kyle Barron <barronk@mit.edu>
Created: 5/11/2018, 2:01:13 PM
Purpose: Generate markdown data codebooks for documentation
The command line input should be the path to the `.dta` file.
@kylebarron
kylebarron / pandoc-svg.py
Last active Jun 6, 2018 — forked from jeromerobert/pandoc-svg.py
Pandoc filter to create PDF files from SVG
View pandoc-svg.py
#! /usr/bin/env python
"""
Pandoc filter to convert svg files to pdf as suggested at:
https://github.com/jgm/pandoc/issues/265#issuecomment-27317316
rsvg-convert or inkscape must be installed
"""
__author__ = "Jerome Robert"
@kylebarron
kylebarron / whitney_scrape.py
Last active Jun 22, 2018
Scrape Mt. Whitney permits and email me if one is available
View whitney_scrape.py
#! /usr/bin/env python3
"""
---------------------------------------------------------------------
Program: recreation_gov_scrape.py
Author: Kyle Barron <barronk@mit.edu>
Created: 6/15/2018, 9:38:50 PM
Updated: 6/15/2018, 9:38:50 PM
Purpose: Scrape Mt. Whitney permits and email me if one is available
"""
You can’t perform that action at this time.