This file contains hidden or 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
\usepackage{libertine} | |
\usepackage{libertinust1math} |
This file contains hidden or 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.Array (Array, array, (!), assocs) | |
import Data.List (transpose, foldl') | |
interleave :: [a] -> [a] -> [a] | |
interleave xs ys = concat . transpose $ [xs, ys] | |
pent :: [Int] -> [Int] | |
pent = map (\x -> div (3*x^2 - x) 2) | |
pentagonals :: [Int] |
This file contains hidden or 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
un :: Rational -> Rational | |
un 1 = -2 | |
un x = (2 * (un (pred x) ^^ 2) + 5 * (un (pred x)) - 7)^^(1 % 3) | |
main :: IO() | |
main = do | |
print $ un $ 10 |
This file contains hidden or 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
/* | |
* Nanopond is just what it says: a very very small and simple artificial | |
* life virtual machine. | |
* | |
* It is a "small evolving program" based artificial life system of the same | |
* general class as Tierra, Avida, and Archis. It is written in very tight | |
* and efficient C code to make it as fast as possible, and is so small that | |
* it consists of only one .c file. | |
* | |
* How Nanopond works: |
This file contains hidden or 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 math | |
def prod(arr, index): | |
tot = 1 | |
for i in range(index): | |
tot *= arr[i] | |
return tot | |
def check_inequality(arr, x): | |
return math.log(prod(arr, x), 2.4) < arr[x+1] # whether prod primes < (2.4)^n, change the 2.4 in the log to check for different bases |
This file contains hidden or 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" standalone="no"?> | |
<fontconfig> | |
<dir>~/.fonts</dir> | |
<match> | |
<test name="family"> | |
<string>sans-serif</string> | |
</test> | |
<edit binding="strong" mode="prepend" name="family"> | |
<string>Lucida Grande</string> | |
</edit> |
This file contains hidden or 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 { ActionTypes } from '../createStore'; | |
import isPlainObject from '../utils/isPlainObject'; | |
import mapValues from '../utils/mapValues'; | |
import pick from '../utils/pick'; | |
/* eslint-disable no-console quotes no-unused-vars */ | |
function getErrorMessage(key, action) { | |
var actionType = action && action.type; | |
var actionName = actionType && ('"${actionType.toString()}"') || ('an action'); |