Skip to content

Instantly share code, notes, and snippets.

View mpettis's full-sized avatar

Matt Pettis mpettis

  • Personal
  • Minneapolis, MN
View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active May 4, 2024 21:03
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

@arcaravaggi
arcaravaggi / update_migrate.R
Last active May 3, 2024 16:26
Update R and migrate R packages to new installation from within the console
#From https://stackoverflow.com/questions/1401904/painless-way-to-install-a-new-version-of-r
# Run in the old version of R (or via RStudio)
setwd("C:/Temp/")
packages <- installed.packages()[,"Package"]
save(packages, file="Rpackages")
# INSTALL NEW R VERSION
if(!require(installr)) { install.packages("installr"); require(installr)} #load / install+load installr
# See here for more on installr: https://www.r-statistics.com/2013/03/updating-r-from-r-on-windows-using-the-installr-package/
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
inoremap <silent> <Bar> <Bar><Esc>:call <SID>align()<CR>a
function! s:align()
let p = '^\s*|\s.*\s|\s*$'
if exists(':Tabularize') && getline('.') =~# '^\s*|' && (getline(line('.')-1) =~# p || getline(line('.')+1) =~# p)
let column = strlen(substitute(getline('.')[0:col('.')],'[^|]','','g'))
let position = strlen(matchstr(getline('.')[0:col('.')],'.*|\s*\zs.*'))
Tabularize/|/l1
normal! 0
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
@zehnpaard
zehnpaard / simple-compojure.core.clj
Created October 30, 2016 06:03
Simple Compojure Demo with GET/POST forms
(ns simple-compojure.core
(require
[ring.adapter.jetty :refer [run-jetty]]
[ring.middleware.params :as p]
[simple-compojure.middleware :as m]
[simple-compojure.routes :as r]
))
(def app
(-> r/routes
@rossta
rossta / ruby-resources.md
Last active January 26, 2024 19:58
Resources I recommend for learning Ruby and Rails

Resources I recommend to learn Ruby and Rails

New? Start here

I like jumping into tutorials first.

"How to write Ruby" Books

@darkuncle
darkuncle / The_Rules.md
Last active January 17, 2024 23:18
The Rules - guidelines learned through hard experience in operations

(subject to additions, but rarely changes)

rule 0: It has to work.

rule 1: As simple as possible.

rule 2: Use the right tool for the job.

rule 3: Everything is a tradeoff. (see Rule 41)

@EderSantana
EderSantana / CATCH_Keras_RL.md
Last active October 16, 2023 08:32
Keras plays catch - a single file Reinforcement Learning example
@drsimonj
drsimonj / multiple_lags.R
Last active July 8, 2022 14:53
Example of creating multiple lags with dplyr
library(dplyr)
d <- data_frame(x = seq_len(100))
d
#> # A tibble: 100 x 1
#> x
#> <int>
#> 1 1
#> 2 2
#> 3 3

Kim's Very Long and Boring Email Text File about File Versioning and Servers.

Hello all.

This is A Very Long and Boring Email Text File about File Versioning and Servers.

Please feel free to point and laugh, but this is all stuff that I've learnt the hard way, and that we should start to do as we get bigger. It doesn't take long for all this to become a habit; something you don't even think about doing. When it's working properly, it offloads a load of organisational stuff from your brain, too - which is nice, and what computers should help you do.