Skip to content

Instantly share code, notes, and snippets.

@karpathy
karpathy / min-char-rnn.py
Last active May 19, 2024 14:00
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)
@mbhutton
mbhutton / workflowy-find-popup.js
Last active May 19, 2024 14:00
Tampermonkey script for searching using a popup dialog, as an alternative to find-as-you-type
// ==UserScript==
// @name Workflowy: Search shortcut
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Workflowy customisations
// @author Matt Hutton
// @match https://workflowy.com*
// @grant none
// @run-at document-end
// ==/UserScript==
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active May 19, 2024 13:59
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@ausfestivus
ausfestivus / AzureRegionData.md
Last active May 19, 2024 13:59
A list of the Azure regions

List of Azure Regions

A list of all the region names and locations for Azure

Creating the list

You can recreate the list anytime using this command:

az account list-locations -o table
2070 Paradigm Shift Transcript
Transcribed by Edwin Finch
Sam, you're a legend. Enjoy
==============================
Whew.
Hey.
@VirtuosoChris
VirtuosoChris / HelloOpenVR_GLFW.cpp
Last active May 19, 2024 13:56
Minimal OpenVR + GLFW Example
/**** Minimal OpenVR example : outputs textures to the headset, a different color in each eye. No head tracking or input anywhere. Bare minimum. ****/
/// header only extension loader and object oriented bindings -- ref : https://github.com/VirtuosoChris/glhpp
#define GL_ALT_GL_API 1
#define GL_ALT_GLES_API 2
#include <glalt/gl4.5.h> // opengl api
#include <glalt/glext.h>
#include <opengl.hpp> // object oriented bindings
@adrianhajdin
adrianhajdin / demo_properties.csv
Created July 21, 2023 09:11
Build and Deploy a Fully Responsive App 10x Faster with AI | Next.js 13
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 3 columns, instead of 2. in line 6.
name,image,price
Riverside Retreat in Sydney,https://images.unsplash.com/photo-1580587771525-78b9dba3b914?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1074&q=80,25000
New York Cozy Cottage,https://images.unsplash.com/photo-1555636222-cae831e670b3?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1477&q=80,120000
Luxury Penthouse in Dubai Marina,https://images.unsplash.com/photo-1505843513577-22bb7d21e455?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1632&q=80,450000
Premium Home in Berlin,https://images.unsplash.com/photo-1560185009-dddeb820c7b7?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80,357000
Seafront Home in Chicago,https://images.unsplash.com/photo-1635108201747-976f7d4ba453?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80,650000
Cozy Cottage,
@increpare
increpare / toki pona corpus sentences + paragraphs from pu
Last active May 19, 2024 13:53
All Toki Pona sentences + paragraphs from the book Toki Pona: The Language of Good. COPYRIGHT NOTICE this collection of sentences is copyright of Sonja Lang.
mi open lon nimi sewi.
toki pona li tan seme? tenpo pini la mi wile sona e kon ale kepeken nimi lili.
mi lukin e kon mi. mi kama sona e toki mute. mi musi. mi pali e nasin toki lili. ona li pona e toki insa mi.
mi pana e toki lili mi tawa jan ale lon ilo lipu lon tenpo pini. kulupu lili li kama. ona li olin e toki pona.
pu la mi wile pana e selo pini pi toki pona. nasin ni la mi kepeken toki pona.
ijo li ijo.
ni li jan.
ni li kili.
lipu li ijo.
jan li meli.
@lsloan
lsloan / pycon_pdf_to_png.py
Last active May 19, 2024 13:52
A small program to convert the PDF of the PyCon US 2024 venue map to individual PNG images.
from io import BytesIO
import pymupdf # pip install PyMuPDF
import requests # pip install requests
online = False
if online is True:
pdfStream = requests.get(
'https://pycon-assets.s3.amazonaws.com/2024/media/'
@jtsiomb
jtsiomb / xsection.c
Last active May 19, 2024 13:50
Example of rendering cross-sections of closed geometry with OpenGL
/* Example of rendering cross-sections of closed non-self-intersecting geometry
* with the stencil buffer. See draw_cross_section for details.
*
* Controls:
* - rotate object by dragging with the left mouse button
* - move cross-section plane back and forth by dragging up/down with the right
* mouse button
*
* Compile with: cc -o xsection xsection.c -lGL -lGLU -lglut
*