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
fib = 0 : scanl (+) 1 fib -- counting revisions? |
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 Tensor -- http://www.volkerschatz.com/haskell/tensor.hs | |
(+) :: Num a => Tensor a -> Tensor a -> Tensor a | |
(+) = tenBinOp (+) | |
(—) :: Num a => Tensor a -> Tensor a -> Tensor a | |
(—) = tenBinOp (-) | |
(•) :: Num a => Tensor a -> Tensor a -> Tensor a | |
(•) = tenBinOp (*) | |
(×) :: Num a => Tensor a -> Tensor a -> Tensor a | |
(×) a b = vectorhead $ (contract [(1,2)]) ((transpose . Vector . return) a) b where |
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 UserClassifier: | |
""" YOU are the classifier, dude! """ | |
def prepare (this, stack, buff, heads): | |
return sentence[stack[-1]]+' '+sentence[buff[-1]] | |
def train(this, pairs): | |
for i, o in pairs: | |
print 'remember: ', i, ' is ', o |
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
SHOULD CONTAIN CONVERTED ASCII VECTORS FROM https://drive.google.com/file/d/0B7XkCwpI5KDYNlNUTTlSS21pQmM/edit?usp=sharing BUT LESS OF THEM |
This file has been truncated, but you can view the full file.
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<adlibXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="http://www.adlibsoft.com/adlibXML.xsd"> | |
<recordList> | |
<record> | |
<priref>667</priref><institution.name>Centraal Museum</institution.name><collection>beeldende kunst</collection><collection>stadsgeschiedenis</collection><collection>prenten en tekeningen</collection><collection>kostuums</collection><object_name>prent</object_name><object_name>reproduktie</object_name><title>De modese Waayer</title><creator>Anoniem etser (18e eeuw)</creator><creator.qualifier/><dimension.type>hoogte (met lijstje)</dimension.type><dimension.type>breedte (met lijstje)</dimension.type><dimension.value>15.8</dimension.value><dimension.value>13.2</dimension.value><dimension.unit>cm</dimension.unit><dimension.unit>cm</dimension.unit><techniek.vrije.tekst>fotomechanische reproductie</techniek.vrije.tekst><material>papier</material><object_number>2127</object_number><production.date.start>1800</production. |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:318a10e455756a3d0f198c56152557074951feccc91cf32902b8e3b5a4601c91" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
from MCFParser import Parser | |
# https://github.com/heatherleaf/MCFParser.py | |
grammar = [('f', 'S', ['A'], [[(0,0), (0,1)]]), | |
('g', 'A', ['A'], [['a', (0,0), 'b'], ['c', (0,1), 'd']]), | |
('h', 'A', [], [['a', 'b'], ['c', 'd']])] | |
parser = Parser(grammar, ['S']) | |
for tree in parser.parse("a a a b b b c c c d d d".split()): | |
print tree |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<style> | |
path { fill: none; stroke: #000; stroke-width: 1px; } | |
</style> | |
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<script src="https://raw.githubusercontent.com/worrydream/Tangle/master/Tangle.js"></script> | |
<script type="text/javascript" |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<style> | |
path { fill: none; stroke: red; stroke-width: 1px; } | |
polygon { fill: red; } | |
</style> | |
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> | |
<script type="text/javascript" src="https://rawgit.com/worrydream/Tangle/master/Tangle.js"></script> |
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
// Visit http://www.johndcook.com/stand_alone_code.html for the source of this code and more like it. | |
// Note that the functions Gamma and LogGamma are mutually dependent. | |
function gamma | |
( | |
x // We require x > 0 | |
) | |
{ | |
//if (x <= 0.0) |
OlderNewer