Skip to content

Instantly share code, notes, and snippets.

View CS-savvy's full-sized avatar

Mukul Kumar CS-savvy

View GitHub Profile
@iitzco
iitzco / coco_label_map.py
Created June 15, 2018 19:01
Class label map for COCO dataset
LABEL_MAP = {
0: "unlabeled",
1: "person",
2: "bicycle",
3: "car",
4: "motorcycle",
5: "airplane",
6: "bus",
7: "train",
8: "truck",
@karpathy
karpathy / min-char-rnn.py
Last active May 21, 2024 03:56
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)
@igniteflow
igniteflow / redis-producer-consumer.py
Created February 20, 2012 16:37
A very simple implementation of a Redis producer-consumer messaging queue in Python
import redis
import time
import sys
def producer():
r = redis.Redis()
i = 0
while True:
r.rpush('queue', 'Message %d' % i)