Skip to content

Instantly share code, notes, and snippets.

View Laeeth's full-sized avatar

Laeeth Isharc Laeeth

View GitHub Profile

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@Khady
Khady / config.el
Last active February 27, 2023 12:25
OCaml and Reasonml emacs configuration
(use-package company
:ensure t
:custom
(company-quickhelp-delay 0)
(company-tooltip-align-annotations t)
:hook
((prog-mode utop-mode) . company-mode)
:config
(company-quickhelp-mode 1)
:bind
@MIvanchev
MIvanchev / article.md
Last active April 4, 2023 13:39
Ever wondered what it takes to run Windows software on ARM? Then this article might be for you!
@stain
stain / .notmuch-config
Last active November 13, 2023 08:17
NotMuch hooks for selectively sorting to inbox, moving archived messages to other folder. offlineimap syncs to /home/USER/mail/company and /home/USER/mail/org1
[database]
path=/home/USER/mail
[user]
name=MyName MySurname
primary_email=me@example.com
other_email=me@example.org
@elliottmorris
elliottmorris / historical_approval.R
Last active July 29, 2023 14:00
historical presidential approval ratings
rm(list = ls()) #reset the environment
library(tidyverse)
library(lubridate)
library(mgcv)
exponent_weight <- function(i) {
exp(-0.04*i)
}
TODAY_DAY <- difftime(Sys.Date(),as.Date("2017-01-21"))
@schveiguy
schveiguy / get_recursive.d
Created February 21, 2020 17:49
Another recursive range possibility, using simple linked-list stack.
import std.range;
struct StackFrame(T)
{
StackFrame* prev;
T range;
}
struct StackRange(T, alias recurse) if (isInputRange!(typeof(recurse(T.init))))
{
@vedang
vedang / hey_notmuch!
Last active March 29, 2024 17:48
Notmuch configuration for Hey.com Style workflows.
- Specific Notmuch filters (and saved-searches) for:
+ The Feed (newsletters, blogs)
+ The Paper trail (receipts, ledger)
+ Screened Inbox (mail from folks you actually want to read)
+ Previously Seen (important mail that you've already read)
+ Unscreened Inbox (potential spam / stuff you don't want)
- Elisp Functions to move / categorize emails from a particular sender.
+ Adds tags needed by filters defined above to all email sent by a particular sender
+ Creates an entry in a DB file, which is used by the Notmuch post-new script when indexing new email, to auto-add the relevant tags.
@Laeeth
Laeeth / OVERLAYFS
Created April 8, 2021 01:02 — forked from mutability/OVERLAYFS
readonly root via overlayfs
- install the two shellscripts into the appropriate places under /etc/initramfs-tools
- run update-initramfs
- put "overlay=yes" on the kernel command line
- reboot
With the overlay in place, the real root is mounted readonly on /ro.
Only the root fs is changed, other filesystems are mounted normally.
Remove "overlay=yes" (or change it to something other than yes) and reboot to go back to readwrite.
(This probably means that you want the commandline config to live somewhere other than on the root fs, e.g. under /boot)
@veekaybee
veekaybee / chatgpt.md
Last active April 12, 2024 20:16
Everything I understand about chatgpt

ChatGPT Resources

Context

ChatGPT appeared like an explosion on all my social media timelines in early December 2022. While I keep up with machine learning as an industry, I wasn't focused so much on this particular corner, and all the screenshots seemed like they came out of nowhere. What was this model? How did the chat prompting work? What was the context of OpenAI doing this work and collecting my prompts for training data?

I decided to do a quick investigation. Here's all the information I've found so far. I'm aggregating and synthesizing it as I go, so it's currently changing pretty frequently.

Model Architecture

@NaxAlpha
NaxAlpha / long_gpt.py
Last active October 15, 2023 11:21
Training script for LongGPT; Fine-tunes GPT-2 (335M) on The Pile Dataset with a context size of 8k tokens. (requires > 16GB RAM)
import time
from contextlib import suppress
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.backends.cuda as cuda
from torch.utils.data import DataLoader, IterableDataset