Pre-1996 models only. The format of their serial numbers is:
YYWWCNNNNN
where:
- YY is the year number
- WW is the week number
import numpy as np | |
import simpleaudio as sa | |
import os, sys, termios, time, tty | |
# Key mapping: | |
# W E T I U | |
# A S D F G H J K | |
# | |
# Which translates to: | |
# C#D# F#G#A# |
local lpeg = require'lpeg' | |
local P, R, S = lpeg.P, lpeg.R, lpeg.S --patterns | |
local C, Ct = lpeg.C, lpeg.Ct --capture | |
local V = lpeg.V --variable | |
local parser = P { | |
'program', -- initial rule | |
program = Ct(V'sexpr' ^ 0), | |
wspace = S' \n\r\t' ^ 0, | |
atom = V'boolean' + V'integer' + V'string' + V'symbol', |
grade <- function(score) { | |
levels <- c("F", "D", "C", "B", "A") | |
return( levels[(score>80)+(score>60)+(score>40)+(score>20)+(score>0)] ) | |
} |
sum({*range(3, 1000, 3), *range(5, 1000, 5)}) |
import types | |
the_empty_stream = () | |
def cons(x, y): | |
return (x, y) | |
def cons_stream(x, y): | |
assert isinstance(y, types.LambdaType) | |
return cons(x, y) |
def divide(n, d): | |
while True: | |
yield n // d | |
n = (n % d) * 10 | |
def next_n(n, g): | |
return [next(g) for _ in range(n)] | |
def input(number): | |
pi = divide(355, 113) |
class ElasticsearchAT56 < Formula | |
desc "Distributed search & analytics engine" | |
homepage "https://www.elastic.co/products/elasticsearch" | |
url "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.16.tar.gz" | |
sha256 "6b035a59337d571ab70cea72cc55225c027ad142fbb07fd8984e54261657c77f" | |
bottle :unneeded | |
keg_only :versioned_formula |
(load "rand.scm") | |
(load "monte-carlo.scm") | |
(define (make-dice sides) | |
(lambda () (+ (modulo (rand) sides) 1))) | |
;; rolling a 7 and activating the robber | |
(define (catan-robber-activation) | |
(let ((d1 (make-dice 6)) | |
(d2 (make-dice 6))) |
;; Representing dense polynomials | |
(define (make-dense* var term-list) | |
(cons var term-list)) | |
(define var car) | |
(define term-list cdr) | |
(define (make-term-list term-list min-order) | |
(if (>= (order term-list) min-order) |