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
| """ | |
| Web Mercator Scale and Resolution Calculations | |
| Python implementation of the formulas at http://msdn.microsoft.com/en-us/library/bb259689.aspx | |
| """ | |
| import math | |
| def meters_per_pixel(zoom, lat): | |
| """ | |
| ground resolution = cos(latitude * pi/180) * earth circumference / map width | |
| """ |
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 | |
| import ctypes | |
| import wave | |
| import sys | |
| pa = ctypes.cdll.LoadLibrary('libpulse-simple.so.0') | |
| PA_STREAM_PLAYBACK = 1 | |
| PA_SAMPLE_S16LE = 3 |
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 'socket' | |
| webserver = TCPServer.new('127.0.0.1', 7777) | |
| puts "Iniciando servidor." | |
| while (session = webserver.accept) | |
| session.print "HTTP/1.1 200/OK\r\nContent-type:text/html\r\n\r\n" | |
| begin |
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
| (ns com.wangdera.slideshow | |
| (:use [clojure.contrib.test-is]) | |
| (:import (java.io File) | |
| (javax.imageio ImageIO) | |
| (javax.swing JFrame JPanel Timer) | |
| (java.awt Dimension Frame Color) | |
| (java.awt.event ActionListener WindowAdapter))) | |
| (def imagelist (atom [])) | |
| (def current-image (atom nil)) |
NewerOlder