Skip to content

Instantly share code, notes, and snippets.

View Jason-Young-AI's full-sized avatar
💯
Striving

Jason Young Jason-Young-AI

💯
Striving
View GitHub Profile
@karpathy
karpathy / min-char-rnn.py
Last active November 16, 2024 23:10
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)
@stramel
stramel / HOWTO.md
Last active November 14, 2024 09:13
Installing Powerline fonts on Windows 10

Installing Powerline fonts on Windows 10

Steps

  1. Download and extract zip from here
  2. Press Windows + x
  3. Press a (Selects PowerShell (Admin))
  4. Navigate to directory where fonts were extracted to (cd ${HOME}\Downloads\fonts-master\fonts-master)
  5. Set Execution Policy Set-ExecutionPolicy RemoteSigned [1]
  6. Press y then Enter to accept
import os, argparse
import tensorflow as tf
"""
This script converts a checkpoint to a pb file without needing to know
the names of the input and output nodes. This then allows you to use the
Tensorflow tool summarize_graph to identify potential input/output nodes.
Usage:
@gokman
gokman / multiple angular app configuration for nginx
Created December 30, 2019 11:48
multiple angular app configuration for nginx
1. build app1 project with prod flag
ng build --prod
2. copy files under dist folder to the server
scp -r dist/app1/* {username}@{ip address of server}:/var/www/app1/
3. set base href of application (app1 works on /)
<base href="/">
4. build app2 project with prod flag
from math import comb
# Implementation of DAG counter
def dagcount(n):
a = {}
a[0] = 1
for h in range(1,n+1):
a[h] = 0
for k in range(1,h+1):
a[h] += (-1)**(k+1) * comb(h,k) * 2**(k*(h-k)) * a[h-k]