Speaker: Mike Walfish
Reccomended reading: http://www.eecs.harvard.edu/htk/phdadvice/
| P1←(1≠(×⊣))⌽↑{⊆⍺⍵}↓ | |
| P2←(128∘>∨191∘<)⊂⊢ | |
| P3←26⊥⎕A∘⍳ | |
| P4←≠⌿0=400 100 4∘.|⊢ | |
| P5←⊢{⍵,⍵-(××⍳∘|)-/⍺}⊃ | |
| P6←(⊣(⌿⍨)(+⌿=))⍪~⍨ | |
| P7←{⍺=2⊥∧/(2∘⊥⍣¯1)⍺⍵} | |
| P8←¯1∧.=2×/(×2-/10∘⊥⍣¯1) | |
| P9←{1∧.=≢∘∪¨⊆⍨2@(¯1∘=)×0~⍨(+\⍣¯1)⍵} | |
| P10←↑((⊢⍴⍨(×/⍴))~((⊂' '⍴⍨(⍴⊃))))∘(↓(↑⍕¨)) |
| ⍝ PROBLEM 9.1, array-oriented solution, faster for the 3 examples provided. | |
| Weights ← { | |
| (⎕IO ⎕ML ⎕WX) ← 0 1 3 | |
| ⍝ Reads the mobile data from the file ⍵ and returns its weights. | |
| ⍝ Monadic function expecting a character vector and returning an integer vector. | |
| ⍝ Returns the weights ordered from left to right, top to bottom. | |
| ⍝ How it works: | |
| ⍝ We will build a square coefficient matrix where each variable is the weight of a left (┌) or right (┐) corner. | |
| ⍝ Let's say n is the number of leafs in the mobile; then n is also the number of pivots and by the lengths of the arms |
Speaker: Mike Walfish
Reccomended reading: http://www.eecs.harvard.edu/htk/phdadvice/
| """ | |
| 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) |
| ; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32 | |
| global start | |
| section .text | |
| start: | |
| push dword msg.len | |
| push dword msg | |
| push dword 1 | |
| mov eax, 4 |
| /* | |
| * A simple, non-optimizing brainfuck to C translator. | |
| * 2010-08-31 - Version 1.0 (Cory Burgett) | |
| * | |
| * This code is hereby placed into the public domain. | |
| * | |
| * Originally located at: http://www4.ncsu.edu/~cmburget/brainfucc.c | |
| */ | |
| #include <stdio.h> |