Skip to content

Instantly share code, notes, and snippets.

View baljanak's full-sized avatar
🎯
Focusing

Balaji Janakiram baljanak

🎯
Focusing
View GitHub Profile
@Boerworz
Boerworz / main.go
Last active August 14, 2024 06:41
Capturing the HTTP status code from http.ResponseWriter
package main
import (
"fmt"
"log"
"net/http"
)
func main() {
// We need to cast handleRoot to a http.HandlerFunc since wrapHandlerWithLogging
@karpathy
karpathy / min-char-rnn.py
Last active November 19, 2024 09:09
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)
@baljanak
baljanak / ServerRack.py
Created September 18, 2012 10:40 — forked from denik/ServerRack.py
class for managing multiple servers in gevent
# Class for managing multiple servers or anything with start() and stop() methods
class ServerRack(object):
def __init__(self, servers):
self.servers = servers
def start(self):
started = []
try: