Skip to content

Instantly share code, notes, and snippets.

View jcreinhold's full-sized avatar

Jacob Reinhold jcreinhold

View GitHub Profile
@MMesch
MMesch / score-illustration.ipynb
Created December 7, 2020 19:55
Illustration of Monad-Bayes score function
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MMesch
MMesch / MonadBayesImplementation.ipynb
Created January 13, 2020 15:07
monad-bayes walkthrough
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@expelledboy
expelledboy / uninstall-nix-osx.sh
Last active November 26, 2023 15:53
Trying Nix
#!/bin/bash
# !!WARNING!!
# This will DELETE all efforts you have put into configuring nix
# Have a look through everything that gets deleted / copied over
nix-env -e '.*'
rm -rf $HOME/.nix-*
rm -rf $HOME/.config/nixpkgs
@ForgottenUmbrella
ForgottenUmbrella / using_conan_cpp.md
Last active April 15, 2024 07:08
How to use Conan, a C++ package manager, for beginners

Package Management in C++ with Conan for Beginners

C++ package management can be complicated.

Below are some key tools involved:

Make

Make runs commands defined in a Makefile, for example, to build and install programs with the compiler and linker. For our purposes, we won't worry about what this looks like; you only need to understand its purpose in relation to CMake.

@sj26
sj26 / LICENSE.md
Last active March 8, 2024 18:31
Bash retry function

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit

@MikeInnes
MikeInnes / startup.jl
Last active February 5, 2023 12:54
Some useful macros for Julia
# Repeat an operation n times, e.g.
# @dotimes 100 println("hi")
macro dotimes(n, body)
quote
for i = 1:$(esc(n))
$(esc(body))
end
end
end
@jboner
jboner / latency.txt
Last active May 6, 2024 07:06
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD