Skip to content

Instantly share code, notes, and snippets.

View mariomeissner's full-sized avatar
💻
Building things!

Johannes Mario Meissner mariomeissner

💻
Building things!
View GitHub Profile
@lukestanley
lukestanley / alpaca.py
Created March 23, 2023 20:33
WIP Alpaca LangChain Python LLM Class with streaming
# Credit to https://github.com/nsarrazin/serge - this is heavily copied from the API there and not very well yet but it might work.w
from typing import List, Optional
from uuid import UUID, uuid4
from pydantic import BaseModel, Field
from datetime import datetime
import subprocess, os
import asyncio
@rajesh-s
rajesh-s / note-link-janitor-gh-action-workflow.yml
Last active January 2, 2023 06:22
Github Workflow to automatically run note-link-janitor on each push
@karpathy
karpathy / min-char-rnn.py
Last active April 24, 2025 19:17
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@gmenard
gmenard / WordFrequencies.java
Last active February 12, 2017 12:28
Given an arbitrary text document written in English, this solution will generate an alphabetical list of all word occurrences with their frequencies and the sentence numbers in which they appear.
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.text.BreakIterator;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Map;
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@davidandrzej
davidandrzej / py3simplex.py
Created April 24, 2011 20:11
3-simplex triangular scatter plot
"""
Visualize points on the 3-simplex (eg, the parameters of a
3-dimensional multinomial distributions) as a scatter plot
contained within a 2D triangle.
David Andrzejewski ([email protected])
"""
import numpy as NP
import matplotlib.pyplot as P
import matplotlib.ticker as MT