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 | |
| '''Crop an image to just the portions containing text. | |
| Usage: | |
| ./crop_morphology.py path/to/image.jpg | |
| This will place the cropped image in path/to/image.crop.png. | |
| For details on the methodology, see |
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
| # A trivial code for solving the Colossal Cue Adventure | |
| # URL: http://adventure.cueup.com/ | |
| # Level 1: The VAX's MTH$RANDOM % 36 Roulette | |
| def vax_rng_next(x): | |
| """Generate the next pseudo-random number.""" | |
| a, c, m = 69069, 1, 2**32 | |
| return (a * x + c) % m |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
| <style type="text/css"> | |
| body { | |
| background: #888; | |
| } |