This file contains hidden or 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
% 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 | |
% |
This file contains hidden or 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
templates: | |
global: | |
pathscrub: windows | |
transmission: | |
enabled: yes | |
host: localhost | |
port: 9091 | |
ratio: 1 | |
tv: | |
content_filter: |
This file contains hidden or 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
#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)] |
This file contains hidden or 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
#!/usr/bin/env python | |
#-*- coding:utf-8 -*- | |
import os | |
import urllib | |
import urllib2 | |
import subprocess | |
def speak(text, language, filename): | |
""" |
This file contains hidden or 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
;;; 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) |
This file contains hidden or 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
(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] |