Skip to content

Instantly share code, notes, and snippets.

View twolodzko's full-sized avatar

Timothy Wolodzko twolodzko

View GitHub Profile
@OrionReed
OrionReed / dom3d.js
Last active June 18, 2024 17:13
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@veekaybee
veekaybee / normcore-llm.md
Last active June 18, 2024 17:30
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@sts10
sts10 / rust-command-line-utilities.markdown
Last active June 20, 2024 16:22
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@ryancdotorg
ryancdotorg / wzip.py
Last active April 8, 2024 14:20
Partial/streaming zip downloader
#!/usr/bin/env python3
# SPDX-License-Identifier: 0BSD or CC0-1.0 or MIT-0 or Unlicense
# Copyright (c) 2023, Ryan Castellucci, No Rights Reserved
import io, sys
import datetime
import argparse
import requests
import operator
import struct
@kar9222
kar9222 / pfizer_vaccine_effectiveness_simulation.md
Last active December 31, 2020 03:22
Pfizer's vaccine effectiveness simulation

Pfizer's vaccine effectiveness simulation

Just for fun 😄. I saw this post about Pfizer's Vaccine Effectiveness Simulation. So I simply translate the Bayesian model (implemented in Stan) into my favorite Julia library Turing.jl. For details, please read the link.

Very briefly, from Vaccine Effectiveness Simulation

NYT reports a 44 thousand person trial with half of the people going to treatment and half to control. They further report that 162 people developed COVID in the control group and 8 where in the vaccine group. What is the probability that the vaccine is effective and what is the uncertainty in that probability? The Pfizer protocol defines vaccine effectiveness as follows:

equation

@Dimitreee
Dimitreee / iterm2-solarized.md
Created September 21, 2020 07:17 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@inesusvet
inesusvet / 20-complexity.py
Last active October 9, 2020 08:59
Pre-commit hook for Cyclomatic Complexity check
from __future__ import print_function
"""
Pre-commit hook for Cyclomatic Complexity check
Works well with radon==2.2.0
"""
__author__ = 'Ivan Styazhkin <ivan@nesusvet.com>'
import subprocess
@AustinRochford
AustinRochford / data-philly-april-2018-bayes-bandits.ipynb
Created March 25, 2018 01:47
Data Philly April 2018 - Two Years of Bayesian Bandits for E-Commerce
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jeremyjordan
jeremyjordan / lr_finder.py
Last active March 3, 2022 08:46
Keras Callback for finding the optimal range of learning rates
import matplotlib.pyplot as plt
import keras.backend as K
from keras.callbacks import Callback
class LRFinder(Callback):
'''
A simple callback for finding the optimal learning rate range for your model + dataset.
@maxim5
maxim5 / pretrained_word2vec_lstm_gen.py
Last active July 2, 2023 10:40
Text generator based on LSTM model with pre-trained Word2Vec embeddings in Keras
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
__author__ = 'maxim'
import numpy as np
import gensim
import string