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
module Minecraft.NBT (findTag, indexTag, mapTag, parseNBT, Tag(..)) where | |
import qualified Data.ByteString.Char8 as BC | |
import qualified Data.ByteString.Lazy as BL | |
import qualified Codec.Compression.Zlib as ZL | |
import qualified Codec.Compression.GZip as GZ | |
import qualified Data.Map as M | |
import Data.Attoparsec.Lazy as AP | |
import Data.Attoparsec.Binary | |
import Data.Word |
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
{-# LANGUAGE TemplateHaskell, Rank2Types #-} | |
module NeuralNetwork where | |
import Control.Lens | |
import Control.Monad (mapM_) | |
import Control.Monad.State | |
import qualified Data.Vector as V | |
import Data.Vector.Lens | |
type NetworkState a = State Network a |
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
struct TestData { | |
x: int | |
} | |
impl TestData { | |
pub fn addition(&mut self) { | |
self.x += 10; | |
} | |
} |
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 Image | |
# I apologise to the Python Gods. I was in a rush. This should all be one string and therefore one line! | |
data = '000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000 000000000000000000000000001000000000000000000000000000111 000000000000000000000000000000000000000000000000000000000 000000000000111100000000000000000000001101000000000000000 000000000000000000000000000000000000000000000000000000001 001100000000000000000011001000000000000000000000000000000 000000000000000000000000000000000000000000010001000000111 100000110000100000000000000 |
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
use std::cmp::Eq; | |
use std::collections::HashMap; | |
use std::hash::Hash; | |
#[derive(Debug)] | |
struct Counter<V> | |
where | |
V: Eq + Hash, | |
{ | |
map: HashMap<V, i32>, |