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
""" | |
usage: mdiew.py [-h] [--bind ADDRESS] [--file FILE] [--open] [port] | |
positional arguments: | |
port Specify alternate port [default: 8000] | |
optional arguments: | |
-h, --help show this help message and exit | |
--bind ADDRESS, -b ADDRESS | |
Specify alternate bind address [default: loopback |
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
open System | |
let ledNums = [ | |
[" _ "; "| |"; "|_|"] | |
[" "; " |"; " |"] | |
[" _ "; " _|"; "|_ "] | |
[" _ "; " _|"; " _|"] | |
[" "; "|_|"; " |"] | |
[" _ "; "|_ "; " _|"] | |
[" _ "; " _|"; "|_|"] |
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
#![feature(core)] | |
#![feature(unicode)] | |
extern crate core; | |
use std::io; | |
use std::io::Write; | |
use core::str::FromStr; | |
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 os | |
led_nums = [ | |
[" _ ", "| |", "|_|"], | |
[" ", " |", " |"], | |
[" _ ", " _|", "|_ "], | |
[" _ ", " _|", " _|"], | |
[" ", "|_|", " |"], | |
[" _ ", "|_ ", " _|"], |
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
set -e | |
rustc -o $1.rso $1 | |
./$1.rso ${@:2:$#-1} |
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 struct | |
class InvalidArgumentException(Exception): | |
pass | |
class Color: | |
def __init__(self, r, g, b): | |
self.red = r |
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
mod tokenizer { | |
#[derive(Eq, PartialEq, Show)] | |
pub enum Token { | |
Open, Close, | |
String(String), | |
Number(String), | |
Symbol(String), | |
} | |
/// LISPのS式を字句解析する |
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
(ns sheep.core | |
(:require [quil.core :as q]) | |
(:require [quil.middleware :as m]) | |
(:require [sheep.delaunay :as d])) | |
(def next-color! | |
(let [current (atom 50) | |
hue (atom 150)] | |
(fn [] (let [b (swap! current (fn [_] (+ 70 (rand-int 30)))) | |
hue (swap! hue (fn [_] (+ 150 (rand-int 40))))] |
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
(ns twinkle.core | |
(:require [quil.core :as q]) | |
(:require [quil.middleware :as m])) | |
(def sky-size {:w 640 :h 350}) | |
(def star-size {:w 30 :h 30}) | |
(def min-radius 10) | |
(def max-radius 20) | |
;-- point ---------------------------- |
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
// https://gist.github.com/tako2/7734472 I was reffering. | |
open System | |
open System.Net.Sockets | |
open System.Text | |
type Result<'a, 'b> = | |
| Success of 'a | |
| Failure of 'b | |
type MaybeBuilder() = |