Skip to content

Instantly share code, notes, and snippets.

View jboynyc's full-sized avatar
🍜

John Boy jboynyc

🍜
View GitHub Profile
@jboynyc
jboynyc / sci-fi influences.ipynb
Created March 5, 2020 20:46
sci-fi influences
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jboynyc
jboynyc / programming_language_lattice.ipynb
Created February 17, 2020 22:29
Understanding the field of programming languages using a concept lattice
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jboynyc
jboynyc / test.py
Created February 6, 2020 11:39
using `guix environment` as a shebang
#!/usr/bin/env -S guix environment --ad-hoc python python-pandas python-numpy -- python3
import pandas as pd
def main():
df = pd.util.testing.makeDataFrame()
print(df.T)
main()
@jboynyc
jboynyc / guix-jupyter_test.ipynb
Last active January 28, 2020 10:43
Guix-Jupyter for reproducible and reusable notebooks!
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jboynyc
jboynyc / ta.scm
Created March 11, 2019 14:10
toggle active script
#!/usr/bin/env guile
!#
;; Toggle symlink to current directory on and off in a directory of "active"
;; directories. Unless otherwise specified by a $ACTIVE_DIR environment
;; variable, the active directory is assumed to be located in ~/Active.
(use-modules (ice-9 ftw))
(define (symlink? path)
@jboynyc
jboynyc / hiri-nix.log
Last active December 19, 2018 14:10
Attempting to package Hiri using autopatchelf
$ env NIXPKGS_ALLOW_UNFREE=1 nix-shell hiri.nix
these derivations will be built:
/nix/store/s0acr6j9hv15p41l3pmvrybh0l6mc8iy-hiri-1.4.0.5.drv
building '/nix/store/s0acr6j9hv15p41l3pmvrybh0l6mc8iy-hiri-1.4.0.5.drv'...
unpacking sources
unpacking source archive /nix/store/dwrg6rn3gi8hy57ib0sjf49283mblpp1-Hiri.tar.gz
source root is hiri_1.4.0.5
setting SOURCE_DATE_EPOCH to timestamp 1534767164 of file hiri_1.4.0.5/hirimain
patching sources
configuring
@jboynyc
jboynyc / get-in.rkt
Created August 12, 2018 18:08
`get-in` for racket
#lang racket
(define (get-in h . path)
(foldl (λ (p h) (hash-ref h p)) h path))
(define nested-dict #hash((foo .
#hash((bar .
#hash((spam .
#hash((eggs . 1)))))))))
one_obvious = 'more than one'
print(f'There should be {one_obvious} way to do it.')
@jboynyc
jboynyc / trumptown_networks.ipynb
Created April 13, 2018 09:07
Networks of Trump Town
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jboynyc
jboynyc / soundbots.rkt
Created April 4, 2018 22:51
robots making sounds
#lang racket
(require rsound)
(define *midi-notes* (range 38 85))
(define (choice lst)
(list-ref lst (random (length lst))))
(define (sublist lst midpoint width)