Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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() |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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))))))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
one_obvious = 'more than one' | |
print(f'There should be {one_obvious} way to do it.') |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(require rsound) | |
(define *midi-notes* (range 38 85)) | |
(define (choice lst) | |
(list-ref lst (random (length lst)))) | |
(define (sublist lst midpoint width) |