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
\documentclass{ou-assignment} | |
\student{My Name} | |
\email{[email protected]} | |
\identifier{B1234567} | |
\course{M248} | |
\tma{1} | |
\tmapart{1} | |
\date{January 20, 2011} |
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
(require plot) | |
(define (factorial n) | |
(if (< n 2) 1 (* n (factorial (- n 1))))) | |
(define (taylor-poly func n c) | |
(define (calc-coeff dfn level) | |
(/ (dfn c) (factorial level))) | |
(define (find-coeff fn level coeffs) | |
(if (= level (+ n 1)) |
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 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 () |
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/base | |
(require racket/pretty) | |
(require racket/class) | |
(require racket/gui/base) | |
(require racket/draw) | |
(require racket/match) | |
(require (only-in web-server/private/gzip gunzip/bytes)) | |
(require rnrs/bytevectors-6) |
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 unstable/dict) | |
(provide main) | |
;; Set[String] | |
(define stopwords (list->set (file->lines "./stopwords.txt"))) | |
;; String -> List[String] | |
(define (tokenize raw-text) ;; Lowercases and splits on non-letters, non-numbers. | |
(filter-not (λ (e) (set-member? stopwords e)) |
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/gui | |
; DrRacket, version 5.2.1 | |
; 情報科学類ソフトウェアサイエンス主専攻実験 | |
; M.NAKAJIMA | |
; 2012/06/29 | |
; Create a window and show message. | |
(define frame (new frame% [label "Timer"])) | |
(define msg (new message% [parent frame] |

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
;; the gaussian filter used in the racket blur. | |
;; boosted center value by 1/1000 to make sure that whites stay white. | |
(define filter '[[0.011 0.084 0.011] | |
[0.084 0.620 0.084] | |
[0.011 0.084 0.011]]) | |
;; racket-blur: blur the image using the gaussian filter | |
;; number number list-of-bytes -> vector-of-bytes | |
(define (racket-blur width height data) | |
(define data-vec (list->vector data)) |
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 send-exp racket/gui | |
(require sgl/gl) | |
(require sgl/gl-vectors) | |
(require pict) | |
(define texture% | |
(class object% | |
(init [(initial-bitmap bitmap)]) | |
(field [width 0] |
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/gui | |
(require framework) ; for keymap:get-editor | |
(define keymap (keymap:get-editor)) | |
#| ; Or define them yourself: | |
(define keymap (new keymap%)) | |
(add-text-keymap-functions keymap) |
OlderNewer