The first thing to do is create a file ~/.pydistutils.cfg
with the
following content:
[install]
install_lib = ~/py-lib
install_scripts = ~/bin
(defstruct bet :name :amount :guess :rate) | |
(defn pool-amount | |
"Returns the sum of all bets' amounts." | |
[poolseq] | |
(reduce + (map :amount poolseq))) | |
(defn pool-rates | |
"Returns the list of bets with their corresponding earning rates." | |
[poolseq] |
;;; Based on this gist: http://gist.github.com/439264 | |
(defstruct bet name amount guess rate) | |
(defun pool-amount (pool) | |
(reduce #'+ (mapcar #'bet-amount pool))) | |
(defun pool-rates (pool) | |
(let ((sum (pool-amount pool))) | |
(mapcar (lambda (bet) |
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
import os | |
import urllib | |
import urllib2 | |
import subprocess | |
def speak(text, language, filename): | |
""" |
#lang racket | |
(require (planet "rope.ss" ("dyoo" "rope.plt" 3))) | |
;; Boyer-Moore-Horspool algorithm for rope.plt | |
;; http://en.wikipedia.org/wiki/Boyer-Moore-Horspool_algorithm | |
;; http://planet.racket-lang.org/display.ss?package=rope.plt&owner=dyoo | |
(define (build-skip-table subrope) | |
(let ([sublen (rope-length subrope)] | |
[bcs (make-weak-hash)] |
templates: | |
global: | |
pathscrub: windows | |
transmission: | |
enabled: yes | |
host: localhost | |
port: 9091 | |
ratio: 1 | |
tv: | |
content_filter: |
% Returns a matrix that represents an image of the Mandelbrot with the | |
% given parameters. More info: http://en.wikipedia.org/wiki/Mandelbrot_set | |
% | |
% Depends on: parallel | |
% | |
% Usage: | |
% | |
% % Processes the fractal in parallel using 4 workers | |
% M = mandelbrot (-0.75+0.1i, 200, 512, 600, 600, 4); % Seahorse valley | |
% |