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
Created from the plain text reference card on orgmode.org Download this file, and open it in Emacs org-mode!
(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 |
#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 () |
use std::comm::{Receiver, channel}; | |
use std::io; | |
use std::mem::replace; | |
use std::task::spawn; | |
struct Future<'a, A> { | |
state: FutureState<'a, A> | |
} |
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): |
#!/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 |
; Released under the Apache License, Version 2.0 | |
; http://www.apache.org/licenses/LICENSE-2.0.html | |
(defmacro try-let | |
"A combination of try and let such that exceptions thrown in the binding or | |
body can be handled by catch clauses in the body, and all bindings are | |
available to the catch and finally clauses. If an exception is thrown while | |
evaluating a binding value, it and all subsequent binding values will be nil. | |
Example: |
use std::mem; | |
use std::intrinsics::TypeId; | |
// Val | |
struct Val { | |
value: i32 | |
} | |
impl Val { |