- References
- Dependency
unittest2
#!/bin/bash | |
#script: Morse | |
#Written by Ole-Jørgen Næss Kolsrud | |
#Thanks to crunchbangers damo, ehde and aibo! | |
#Also, thank you, Internet=P | |
#Dependencies: bash, beep |
// based on the code of the coding challenge | |
// by Daniel Shiffman, accessed on: | |
// https://youtu.be/kKT0v3qhIQY | |
// needs to be run on Processing (https://processing.org/) | |
Tree tree; | |
float min_dist = 5; | |
float max_dist = 800; | |
boolean arboriza = false; |
import argparse | |
parser = argparse.ArgumentParser() | |
### Positional | |
parser.add_argument('positional1') | |
parser.add_argument('positional2', help="positional argument 2") | |
parser.add_argument('positional3', help="positional argument 3 type int", type=int) | |
### Optional | |
parser.add_argument("--optional1", help="optional argument 1") | |
parser.add_argument("--optional2", help="optional argument 2", action="store_true") |
# Proof of undecidability of halting problem: | |
from Turing import will_halt | |
# will_halt(program, input) -> does_halt | |
def loop_forever(garbage_input): | |
return loop_forever(garbage_input) | |
def square_root(n): | |
return n ** 0.5 |
unittest2
A Lindenmayer system that draws a sequence of growing Hilbert curves following a spiral layout.
Like in the previous experiment, a repetition rule is added to the Hilbert rules (A
and B
) to obtain the sequence. In order to produce the spiral layout, the rule contains some turns and different repetitions of the Hilbert rules A
and B
.
The objective is to find a layout that starts from a central point and grows spiraling away from it. The layout is intended to be used for creating a jigsaw treemap, so a naive spiral layout (like this one) is out of the question because of the elongated regions it would produce.
By leveraging the locality properties of the Hilbert curve, the layout presented in this example should somehow manage to both spiral away from a central point and have regions with good as
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <X11/Xlib.h> | |
#include <X11/Xutil.h> | |
int main(int argc, char *argv[]) | |
{ | |
unsigned long value; | |
char *terminatedAt; |
// | |
// Author: Jonathan Blow | |
// Version: 1 | |
// Date: 31 August, 2018 | |
// | |
// This code is released under the MIT license, which you can find at | |
// | |
// https://opensource.org/licenses/MIT | |
// | |
// |
#!/bin/sh | |
AMOUNT=5 | |
WHAT=paras | |
START=false | |
while getopts ":n:wpbls" opt; do | |
case $opt in | |
n) | |
AMOUNT=$OPTARG |