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 cmd | |
import textwrap | |
import matplotlib.pyplot as plt | |
from stylo import __version__ | |
from stylo.color import FillColor | |
from stylo.image import LayeredImage | |
from stylo.shape import Circle, Square | |
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 turtle | |
def run_system(seed, rule, iterations): | |
""" | |
Given the inital seed for the system and the rule function | |
run the system for the given number of iterations | |
""" | |
string = seed |
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 bpy | |
import csv | |
# This file is an attempt to work out the code needed to map | |
# results from Ciw to an animation in blender | |
# It requires the existence of objects with the following names | |
# in a blender scene: | |
# - Customer | |
# - Wait | |
# - Queue 1 Arrive |
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 System.Environment (getArgs) | |
countLines :: String -> IO Int | |
countLines file = do | |
contents <- readFile file | |
return (length $ lines contents) | |
main :: IO () | |
main = do | |
args <- getArgs |
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
main :: IO () | |
main = putStrLn "Hello, World!" |
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
#include <stdio.h> | |
#include <stdbool.h> | |
int main(int argc, char* argv[]) | |
{ | |
// Check that enough arguments were given | |
if(argc != 2) | |
{ | |
fprintf(stderr, "Usage:\n\tcount_lines <filename>\n"); | |
return 1; |
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
#include <stdio.h> | |
int main (int argc, char* argv[]) | |
{ | |
printf("Hello, World!\n"); | |
return 0; | |
} |