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
import numpy, Image | |
i = Image.open('lena.jpg') | |
a = numpy.asarray(i) # a is readonly | |
i = Image.fromarray(a) |
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
\setlength{\oddsidemargin}{1.4cm} | |
\setlength{\evensidemargin}{1.4cm} | |
\setlength{\textwidth}{15cm} | |
\setlength{\topmargin}{10pt} | |
\setlength{\headheight}{0pt} | |
\setlength{\headsep}{0pt} | |
\setlength{\textheight}{23cm} | |
\setlength{\parindent}{0pt} | |
\setlength{\parskip}{\baselineskip} |
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 | |
from scipy.io import mio | |
x = mio.loadmat('test.mat') | |
lon = x['lon'] | |
lat = x['lat'] | |
# one-liner to read a single variable | |
lon = mio.loadmat('test.mat')['lon'] |
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
export LC_CTYPE=en_US.UTF-8 | |
mkdir -p ~/Library/Application Support/TextMate/Bundles | |
cd ~/Library/Application Support/TextMate/Bundles | |
svn co http://macromates.com/svn/Bundles/trunk/Bundles/Matlab.tmbundle |
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 ruby | |
# Quick script to create a movie from PNGs. | |
# Matt Foster | |
input = ARGV.shift || nil | |
if input == nil | |
puts "Usage: #{ARGV[0]} input_image_01.png [output_filename.mov]" | |
puts "Create a QuickTime Movie from an image sequence." | |
puts "Uses PNG image compression, and no audio." |
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
\usepackage{fancyhdr} % Go for customized headings | |
\usepackage{titlesec} | |
\usepackage{sectsty} | |
\setlength{\oddsidemargin}{1.4cm} | |
\setlength{\evensidemargin}{1.4cm} | |
\setlength{\textwidth}{15cm} | |
\setlength{\topmargin}{10pt} | |
% Need these: |
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
\setlength{\oddsidemargin}{1.4cm} | |
\setlength{\evensidemargin}{1.4cm} | |
\setlength{\textwidth}{15cm} | |
\setlength{\topmargin}{15mm} | |
\addtolength{\voffset}{-1in} | |
\setlength{\headheight}{14pt} | |
\setlength{\headsep}{20pt} | |
\setlength{\textheight}{24cm} | |
\setlength{\parindent}{0pt} | |
\setlength{\parskip}{\baselineskip} |
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
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html | |
Hi everyone, I'm Chris Wanstrath. | |
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But | |
then I took a few moments and thought, Wait, why? Why me? What am I supposed | |
to say that's interesting? Something about Ruby, perhaps. Maybe the | |
future of it. The future of something, at least. That sounds | |
keynote-y. | |
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
% Given TEC data already resides in Ne.... | |
Grid = setgrid('Rad', Ne.Rad, 'Lat', Ne.Lat, 'Lon', Ne.Lon); |
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
for f (geo*) mv $f $f:s/geo_// | |
OlderNewer