duplicates = multiple editions
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
A Classical Introduction to Modern Number Theory, Kenneth Ireland Michael Rosen
| import boto.ec2 | |
| import sys | |
| import datetime | |
| from time import gmtime, strftime, sleep | |
| import toml | |
| # expects ec2 instance tag: power-off | |
| # values should be in 24hr clock from:to | |
| # eg 2400:0400 | |
| # would result in midnight to 4am |
| import boto.ec2 | |
| import sys | |
| def get_snaps (desc, vol,conn): | |
| snapshots = conn.get_all_snapshots(owner='id...', | |
| filters={'description':'*'+desc+'*'}) | |
| return snapshots | |
| def op_snaps (vols,max_snaps,conn): |
| use std::comm::{Receiver, channel}; | |
| use std::io; | |
| use std::mem::replace; | |
| use std::task::spawn; | |
| struct Future<'a, A> { | |
| state: FutureState<'a, A> | |
| } |
| use std::mem; | |
| use std::intrinsics::TypeId; | |
| // Val | |
| struct Val { | |
| value: i32 | |
| } | |
| impl Val { |
| #!/usr/bin/env python | |
| """ | |
| Consumer example to use the shared object created in Rust. | |
| Ref: http://blog.skylight.io/bending-the-curve-writing-safe-fast-native-gems-with-rust/ | |
| Rust program: points.rs | |
| use std::num::pow; | |
| pub struct Point { x: int, y: int } | |
| struct Line { p1: Point, p2: Point } |
| (use 'clojure.core.async) | |
| ;this is the function you want to use | |
| (defn lazy-channels [chs] | |
| (lazy-seq (cons (let [ [v _] (alts!! chs)] v) (lazy-channels chs)))) | |
| ;now for the tesging | |
| (def chs [ (chan) (chan) (chan) ]) ; the channels can come from anywhere, here we are using three channels for testing |
| #!/bin/bash | |
| set -e | |
| SCRIPT_DIR=$( cd "$( dirname "$0" )" && pwd ) | |
| # the location of a clean racket repo which will be copied to avoid "git clone"-ing | |
| REPO=$SCRIPT_DIR/../tools/racket | |
| PLATFORM=linux-x86_64 |
Created from the plain text reference card on orgmode.org Download this file, and open it in Emacs org-mode!
| #lang racket | |
| (require parser-tools/lex | |
| (prefix-in re- parser-tools/lex-sre) | |
| parser-tools/yacc) | |
| (provide (all-defined-out)) | |
| (define-tokens a (NUM VAR)) | |
| (define-empty-tokens b (+ - EOF LET IN)) | |
| (define-lex-trans number | |
| (syntax-rules () |