Skip to content

Instantly share code, notes, and snippets.

@joshskidmore
joshskidmore / img-url-exif.sh
Last active February 15, 2024 15:14
img-url-exif.sh
#!/usr/bin/env bash
# Josh Skidmore <josh@josh.sc>
# Basic example of using an HTTP range header to extract EXIF data
# from a JPEG file without having to download the entire image.
# This has no error handling and assumes the EXIF data is embedded
# within the first $KB_TO_DOWNLOAD kilobytes of the image
# Requirements:
# * curl
@karpathy
karpathy / min-char-rnn.py
Last active May 6, 2024 08:47
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)
@tracker1
tracker1 / 01-directory-structure.md
Last active May 4, 2024 19:55
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used