Skip to content

Instantly share code, notes, and snippets.

View daveliepmann's full-sized avatar

Dave Liepmann daveliepmann

View GitHub Profile
@daveliepmann
daveliepmann / ultimate-s&c.md
Last active January 24, 2025 13:50
ultimate frisbee s&c brainstorming

S&C targets for an Ultimate (Frisbee) player

Each athlete must decide which areas of interest get prioritized in a particular training block. Note that exercises like RDLs and lunges are useful for multiple goals.

[Performance, pre-hab] Plyometrics & Sprints

These are of the highest importance. Consider them almost mandatory. Bouncing, jumping, bounding, skipping, and maximal sprints are critical to develop tissue resilience and to maintain or improve the athletic qualities most important in Ultimate.

Winter training conditions might make it tough to find a place to run, so plyometrics must take up the slack by being part of every workout.

Train them in multiple directions, not just straight forward. Most plyometrics should be extensive, not intensive. Stay fresh; never try to train these through fatigue.

@daveliepmann
daveliepmann / assert-or-not.md
Last active March 2, 2025 12:24
A guide to orthodox use of assertions in Clojure.

When to use assert?

In JVM Clojure, Exceptions are for operating errors ("something went wrong") and Assertions are for programmer and correctness errors ("this program is wrong").

An assert might be the right tool if throwing an Exception isn't enough. Use them when the assertion failing means

  • there's a bug in this program (not a caller)
  • what happens next is undefined
@daveliepmann
daveliepmann / load_edn.cljd
Created September 11, 2023 13:11
clojuredart mvp of loading edn from asset file
(ns sample.load-edn
"Load EDN from asset on startup"
(:require
["package:flutter/material.dart" :as m]
["package:flutter/widgets.dart" :as f.widgets]
["package:flutter/services.dart" :as f.services]
[cljd.flutter :as f]
[cljd.reader]))

Speech at the American Legion

Hans Liepmann, circa 1946-8


During the long weary days and nights I spent in the Army, I had ample time to think about my American citizenship. I knew Germany under the Kaiser, during the Weimar Republic, in the beginning of Hitler’s regime and I saw it again at the end of it. Therefore, I had quite some occasion to compare it with America and maybe some of my experiences and observations will be interesting for you to hear. I consider it a great honor to be asked by the American Legion to talk to you and I thank the chairman very much.

You heard in the introduction a short outline of my story but I may be permitted to say a few more words about it. In 1933, when Hitler was chancellor, I received a letter from the government that from the next day on I, being a Jewish physician, was not permitted any longer to take care of patients who were members of the medical insurance companies. That was not so terribly bad in itself. But at that

@daveliepmann
daveliepmann / tensor-with-placeholders.clj
Last active April 16, 2018 13:52
"Construction of a trivial graph to add two float tensors and then repeated invocation of the single graph using placeholders", from https://github.com/tensorflow/tensorflow/issues/6781#issuecomment-271888411 in Clojure based on the original Java
;; make sure your ns has `(:import [org.tensorflow DataType Graph Output Session Tensor])`
;; or if in REPL, evaluate `(import [org.tensorflow DataType Graph Output Session Tensor])` first
;; Construct a graph to add two float Tensors, using placeholders.
(let [g (Graph.)
s (Session. g)
x (-> (.opBuilder g "Placeholder" "x")
(.setAttr "dtype" DataType/FLOAT)
(.build)
(.output 0))
@daveliepmann
daveliepmann / java-interop2.md
Last active April 26, 2021 03:03
Java interop for the Clojurists who haven't done Java and who need to translate Java code to Clojure
;; 300x300 seems to be about where performance starts to degrade.
(let [i (cell (interval :frame inc))]
(cell
(apply layer
(for [x (range 0 300 20)
y (range 0 300 20)]
(let [angle (* (/ 3.14 180) (+ @i x y))]
(position (+ x (* 15 (Math/cos angle)))
(+ y (* 15 (Math/sin angle)))
;; # One-Rep-Maximum Calculator
;; People who strength train often want to predict the maximum weight they could lift for one repetition. This is because actually making a maximal attempt is tiring, slightly risky, and difficult to repeat. Let's see how to guess our "1RM" using sub-maximal attempts.
;; If you need to re-evaluate one of the code blocks below, put your cursor in it and press `Control-Shift-Enter` (`Command-Shift-Enter` on Mac).
;; ## Equations
;; There are many equations used to predict one-repetition maximum based on the greatest weight lifted for two to ten reps. All are unavoidably inexact. One popular method for determining your 1RM comes from Baechle, Earle, and Wathen (2000):
@daveliepmann
daveliepmann / clojurebridge_02_data_structures.cljs
Last active August 5, 2017 07:40
ClojureBridge Berlin curriculum 2: Data Structures
;; # Data Structures
;;
;; So far, we've dealt with discrete pieces of data: one number, one
;; string, one value. When programming, it is more often the case that
;; you want to work with groups of data.
;;
;; Clojure has great facilities for working with these groups, or
;; *collections*, of data. Not only does it provide four different types
;; of collections, but it also provides a uniform way to use all of these
@daveliepmann
daveliepmann / gallery.cljs
Last active August 14, 2017 11:56
Gallery of example expressions, for Maria