Skip to content

Instantly share code, notes, and snippets.

View toby-p's full-sized avatar

toby petty toby-p

  • New York
View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active July 21, 2024 13:28
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

@dlaptev
dlaptev / push_notifications_to_telegram.md
Last active July 5, 2024 21:22
Programmatically send push notifications to telegram from python
  1. Create a new Telegram bot:
    1. start a chat with BotFather;
    2. type /newbot, select a name (to be shown in chats) and handle for your bot;
    3. note the bot token to access HTTP API - a long string with a colon in the middle (later referred to as <token>);
    4. optionally /setdescription and /setuserpic.
  2. Add the bot to the chat/channel and note its id:
    1. add the bot to a new or existing chat or group - this is where your bot will send notifications to;
    2. go to https://api.telegram.org/bot<token>/getUpdates (replace <token> with your token);
    3. within the chat part, find and note the id field - a positive or negative number (later referred to as <chat_id>).
  3. Programmatically send notifications:
@BIGBALLON
BIGBALLON / extract_ILSVRC.sh
Created May 13, 2018 20:09
script for ImageNet data extract.
#!/bin/bash
#
# script to extract ImageNet dataset
# ILSVRC2012_img_train.tar (about 138 GB)
# ILSVRC2012_img_val.tar (about 6.3 GB)
# make sure ILSVRC2012_img_train.tar & ILSVRC2012_img_val.tar in your current directory
#
# https://github.com/facebook/fb.resnet.torch/blob/master/INSTALL.md
#
# train/
@anthonydouc
anthonydouc / index.html
Created September 27, 2017 12:35
Example bokeh server application - stock text display with streaming values
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
{{ bokeh_css }}
{{ bokeh_js }}
<link rel="stylesheet" href="stocktext/static/css/styles.css"/>
</head>
<body>
{{ plot_div|indent(8) }}
@teasherm
teasherm / s3_multipart_upload.py
Last active July 3, 2024 15:45
boto3 S3 Multipart Upload
import argparse
import os
import boto3
class S3MultipartUpload(object):
# AWS throws EntityTooSmall error for parts smaller than 5 MB
PART_MINIMUM = int(5e6)
@michaellihs
michaellihs / tmux-cheat-sheet.md
Last active July 19, 2024 16:11
tmux Cheat Sheet
@ax3l
ax3l / matplotlib.md
Last active October 11, 2019 00:07
Matplotlib: Axes vs Axis vs Figure vs ...
@nanusdad
nanusdad / git_new_local_branch.md
Last active June 16, 2024 06:56
Git - create new local branch push to GitHub
@karpathy
karpathy / min-char-rnn.py
Last active July 22, 2024 04:44
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)
@hunterowens
hunterowens / connect_and_load.py
Last active December 9, 2023 16:27
Pandas and MSSQL
import pymssql
import pandas as pd
## instance a python db connection object- same form as psycopg2/python-mysql drivers also
conn = pymssql.connect(server="172.0.0.1", user="howens",password="some_fake_password", port=63642) # You can lookup the port number inside SQL server.
## Hey Look, college data
stmt = "SELECT * FROM AlumniMirror..someTable"
# Excute Query here
df = pd.read_sql(stmt,conn)