{{ message }}

Instantly share code, notes, and snippets.

🤖
Too much to do, too little time.

# Gaurav Menghani reddragon

🤖
Too much to do, too little time.
Last active Aug 9, 2022
View springer-free-maths-books.md
Last active Aug 10, 2022
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
View min-char-rnn.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 """ 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)
Created Apr 4, 2014
Tiny 2048 in C!
View 2048.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 M[16],X=16,W,k;main(){T(system("stty cbreak") );puts(W&1?"WIN":"LOSE");}K[]={2,3,1};s(f,d,i ,j,l,P){for(i=4;i--;)for(j=k=l=0;k<4;)j<4?P=M [w(d,i,j++)],W|=P>>11,l*P&&(f?M[w(d,i,k)]=l<< (l==P):0,k++),l=l?P?l-P?P:0:l:P:(f?M[w(d,i,k) ]=l:0,++k,W|=2*!l,l=0);}w(d,i,j){return d?w(d -1,j,3-i):4*i+j;}T(i){for(i=X+rand()%X;M[i%X] *i;i--);i?M[i%X]=2<
Created Nov 20, 2011
Simple TCP proxy in Golang
View proxy.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
 package main import ( "bytes" "encoding/hex" "flag" "fmt" "io" "log" "net"