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 Data.Set (Set) | |
import qualified Data.Set as S | |
import Data.EnumMap (EnumMap) | |
import qualified Data.EnumMap as EM | |
import Data.EnumSet (EnumSet) | |
import qualified Data.EnumSet as ES | |
data Priors = Priors { aLambda :: Double |
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 OverloadedStrings #-} | |
import Data.ByteString.Char8 (ByteString) | |
import qualified Data.ByteString.Char8 as BS | |
import Data.Serialize | |
import Control.Monad | |
import System.IO | |
import Database.Redis | |
import Data.List.Split |
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 qualified Data.Array as A | |
import Data.Tuple (swap) | |
import Data.List (nub, (\\)) | |
import Data.Graph | |
type Path = [Vertex] | |
type Givens = [Vertex] | |
adjacent :: Graph -> Vertex -> [Vertex] | |
adjacent = (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
# | |
# Automatically generated file; DO NOT EDIT. | |
# Linux/arm 3.3.0-rc5 Kernel Configuration | |
# | |
CONFIG_ARM=y | |
CONFIG_SYS_SUPPORTS_APM_EMULATION=y | |
CONFIG_HAVE_SCHED_CLOCK=y | |
CONFIG_GENERIC_GPIO=y | |
# CONFIG_ARCH_USES_GETTIMEOFFSET is not set | |
CONFIG_GENERIC_CLOCKEVENTS=y |
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
#!/bin/bash | |
nchunks=$1 | |
file=$2 | |
nlines=$(wc -l $file) | |
let n=$nlines/$nchunks | |
for i in $(seq 1 $nchunks); do | |
let startline=$i*$n | |
tail -n +$startline $file | head -n $n > $file.$i | |
done; |
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
-- Turing machine | |
-- Author: Ben Gamari | |
import Graphics.Gloss | |
import Data.List | |
import Data.Function | |
type Symbol = Int | |
type Position = Int | |
type Tape = [(Position, Symbol)] |
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
class HasBox a box | a -> box where | |
getBox :: a -> box | |
class HasImplicit a obj | a -> obj where | |
getImplicit :: a -> obj | |
type Obj2 = (Double,Double) -> Double | |
type Obj3 = (Double,Double) -> Double | |
data ImplicitObj obj = forall a. HasImplicit a obj => ImplicitObj 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
#0 abort () at gcc4mbed/src/gcc4mbed.c:87 | |
#1 0x0001ffb8 in operator new(unsigned int) () | |
#2 0x0000a2c0 in allocate (__n=<optimized out>, this=<optimized out>) | |
at /home/ben/reprap/repos/Smoothie/gcc4mbed/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/include/c++/4.6.2/ext/new_allocator.h:92 | |
#3 _M_allocate (__n=<optimized out>, this=<optimized out>) | |
at /home/ben/reprap/repos/Smoothie/gcc4mbed/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/include/c++/4.6.2/bits/stl_vector.h:150 | |
#4 std::vector<Gcode, std::allocator<Gcode> >::_M_insert_aux<Gcode const&>(__gnu_cxx::__normal_iterator<Gcode*, std::vector<Gcode, std::allocator<Gcode> > >, Gcode const&&&) (this=0x10005600, __position=...) | |
at /home/ben/reprap/repos/Smoothie/gcc4mbed/gcc-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/4.6.2/../../../../arm-none-eabi/include/c++/4.6.2/bits/vector.tcc:324 | |
#5 0x0000a504 in push_back (__x=..., this=0x10005600) | |
at /home/ben/reprap/repos/Smoothie |
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
Continuing. | |
Breakpoint 1, 0x0002b694 in malloc () | |
#0 0x0002b694 in malloc () | |
#1 0x00028948 in operator new(unsigned int) () | |
#2 0x00028168 in std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator<char> const&) () | |
#3 0x00028376 in std::string::_Rep::_M_clone(std::allocator<char> const&, unsigned int) () | |
#4 0x00028416 in std::string::reserve(unsigned int) () | |
#5 0x0000d9b2 in SerialConsole::on_main_loop (this=0x10001ef0, argument=0x10001600) at src/modules/communication/SerialConsole.cpp:53 | |
#6 0x00007cee in Kernel::call_event (this=0x10001600, id_event=ON_MAIN_LOOP) at src/libs/Kernel.cpp:133 |
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
Continuing. | |
Breakpoint 3, 0x0002b694 in malloc () | |
#0 0x0002b694 in malloc () | |
#1 0x00028948 in operator new(unsigned int) () | |
#2 0x00028168 in std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator<char> const&) () | |
#3 0x00028376 in std::string::_Rep::_M_clone(std::allocator<char> const&, unsigned int) () | |
#4 0x00028416 in std::string::reserve(unsigned int) () | |
#5 0x0000d9b2 in SerialConsole::on_main_loop (this=0x10001ef0, argument=0x10001600) at src/modules/communication/SerialConsole.cpp:53 | |
#6 0x00007cee in Kernel::call_event (this=0x10001600, id_event=ON_MAIN_LOOP) at src/libs/Kernel.cpp:133 |
OlderNewer