Skip to content

Instantly share code, notes, and snippets.

@alex-hhh
alex-hhh / plot-interactive-overlay-demo.rkt
Last active February 7, 2018 08:57
Plot interactive overlay demo
#lang racket
;; Updated plot library required, https://github.com/alex-hhh/plot/tree/ah/interactive-overlays
(require plot pict)
;; Helper function to add a pict as a plot overlay -- don't want to add "pict"
;; as a dependency to the "plot" package
(define (add-pict-overlay plot-snip x y pict)
(send plot-snip add-general-overlay x y
(lambda (dc x y) (draw-pict pict dc x y))
(pict-width pict)
@alex-hhh
alex-hhh / ef-temperature.rkt
Last active February 12, 2020 23:55
efficiency-factor-and-temperature
#lang racket
;; See https://alex-hhh.github.io/2017/12/running-and-outdoor-temperature.html
;; You will need to clone https://github.com/alex-hhh/ActivityLog2 and fix the
;; require below to point to the al-interactive.rkt file. You will also need
;; to update the session ids as they reference activities in my own database.
(require plot)
(require "../../ActivityLog2/etc/al-interactive.rkt")
@alex-hhh
alex-hhh / run-analysis.rkt
Created December 4, 2017 12:42
fatigue and running form scripts
#lang racket
;; You will need to clone https://github.com/alex-hhh/ActivityLog2 and fix the
;; require below to point to the al-interactive.rkt file. You will also need
;; to update the session ids and season names as they reference activities in
;; my own database.
(require "../../ActivityLog2/etc/al-interactive.rkt"
"../../ActivityLog2/rkt/data-frame.rkt"
"../../ActivityLog2/rkt/fmt-util.rkt")
#lang racket
;; Script used to generate plots for the blog post below:
;;
;; https://alex-hhh.github.io/2017/11/quantifying-fatigue.html
;; You will need to clone https://github.com/alex-hhh/ActivityLog2 and fix the
;; require below to point to the al-interactive.rkt file. You will also need
;; to update the session ids as they reference activities in my own database.
@alex-hhh
alex-hhh / issue17.rkt
Created October 20, 2017 23:47
sample code for issue 17
#lang racket
;; https://github.com/alex-hhh/ActivityLog2/issues/17
(require plot
racket/draw)
(require "al-interactive.rkt"
"../rkt/metrics.rkt"
"../rkt/series-meta.rkt")
(define candidates