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
test_data = '1¦2¦"Blah\nBlah\nBlah"\n4¦5¦6' | |
in_quote = False | |
data = [] | |
row = [] | |
cell = [] | |
for char in test_data: | |
if char != '¦': | |
if char == '"': | |
in_quote = not in_quote | |
elif char == '\n': |
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
(ns ann.core) | |
; usage: | |
; (train-many (generate-neural-network 2 3 1) [[0 0] [1 1] [1 0] [0 1]] [[0] [0] [1] [1]] 0.1 900000) | |
; for XOR | |
(defn sum | |
[col] | |
(reduce + col)) |
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
import System.Environment | |
import Control.Monad.State | |
import Data.Char (ord, chr) | |
data BFState = BFState [Int] Int [Int] | |
type BFT a = StateT BFState IO a | |
sanitise [] = [] | |
sanitise (x:xs) |