Skip to content

Instantly share code, notes, and snippets.

View Gastove's full-sized avatar

Ross Donaldson Gastove

View GitHub Profile

Modules

In python, a "module" is a set of related code. We work with modules every time we use import:

import datetime #  <- `datetime` is totally a module
            

Keybase proof

I hereby claim:

  • I am gastove on github.
  • I am gastove (https://keybase.io/gastove) on keybase.
  • I have a public key ASCTvWE2Ovl-OSC-Ullc6bMhQrY8JzjdIouo7rwsqGEm8wo

To claim this, I am signing this object:

Convert JSON for Kara

We wanna go from:

[{"id":"B390","name":"Peanut butter"},{"id":"B204","name":"Flour"},{"id":"B090","name":"Coconut water"}]

Ye Packing List

  • [ ] Camera and charger
  • [ ] Tablet and charger
  • [ ] ebook and charger
  • [ ] satchel
  • [ ] headphones
  • [ ] two-headphones-at-once dingus
  • [ ] Tiny foam roller
  • [ ] lacrosse ball

In a glass, combine:

  1. 1oz bourbon whiskey
  2. 1oz whiskey
  3. 1oz bourbon
  4. 2oz bourbon whiskey

Apply to face.

Export file + pandoc

This document – which has several characters that… usually fail to typeset well – should export nicely, I hope.

ls -la | grep rc

This document -- which has several characters that... usually fail to typeset well -- should export nicely, I hope.

ls -la | grep rc
rossdonaldson@becon λ ~/Dropbox/org-docs
$ cat demo.org
# Created 2017-01-31 Tue 10:03
#+TITLE: Export file + pandoc
#+AUTHOR: Ross Donaldson
This document -- which has several characters that... usually fail to typeset
well -- should export nicely, I hope.
#+BEGIN_SRC sh
ls -la | grep rc
(defun rabbit/python-shell-send-region (start end &optional send-main msg)
"Send the region delimited by START and END to inferior Python process.
When optional argument SEND-MAIN is non-nil, allow execution of
code inside blocks delimited by \"if __name__== \\='__main__\\=':\".
When called interactively SEND-MAIN defaults to nil, unless it's
called with prefix argument. When optional argument MSG is
non-nil, forces display of a user-friendly message if there's no
process running; defaults to t when called interactively."
(interactive
(list (region-beginning) (region-end) current-prefix-arg t))
I met an engineer from an antique stack
Who said: "Two vast and headless instances of stone
Stand in the datacenter. Near them, on the JVM,
Half sunk, a shattered disk image lies, whose frown,
And wrinkled lip, and sneer of cold command,
Tell that it's developer well those pages read
Which yet survive, stamped on these lifeless UIs,
The hand that mocked them and the heart that fed:
And on the git log these words appear: