Skip to content

Instantly share code, notes, and snippets.

@andrenarchy
Last active January 2, 2016 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrenarchy/8272518 to your computer and use it in GitHub Desktop.
Save andrenarchy/8272518 to your computer and use it in GitHub Desktop.
One liner or very short code snippets
  • Get a list of all installed openwrt packages containing 'libremap'.

    opkg list-installed | grep libremap | awk '{ print $1 }' | tr '\n' ' '
    
  • pretty plots in matplotlib with mpltools:

    from mpltools import style
    style.use('ggplot')
    
    # for contour plot:
    pyplot.contour(..., colors=pyplot.rcParams['axes.color_cycle'])
  • get key with minimal value in python (source)

    min(d, key=d.get)
  • get word list with counts in a LaTeX document:

    detex -w main.tex | sort | uniq -c | sort -n
    ``
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment