words
A few notes :
I've set up accounts at csmarlboro.org
for everyone. If you don't already know have one,
I emailed you a password last night.
If it doesn't work or you don't know it,
find me and I can reset it.
$ ssh username@csmarlboro.org
password: ****
See the "command line" links on the
resources page.
interpreters (control-D to exit) & compilers
installed on csmarlboro.org :
$ python (or ipython)
>>> print "Hi"
$ node # javascript
> console.log("Hi")
$ irb # ruby
> puts "Hi"
$ perl -de1 # perl
> print "Hi";
$ clisp # common lisp
> (print "Hi")
$ racket # scheme
> (print "Hi")
$ clojure # (lisp on JVM)
> (print "hi")
$ php -a # web
> print("hi");
$ R # statistics etc
> print("Hi")
$ julia # newish numerics
> print("hi")
# compiled languages :
$ ghc --help # Haskell (functional city)
$ gcc --help # C (unix systems)
$ cpp --help # C++
$ java, javac # (object overdose)
$ gmcs, mono # C# ( .NET framework)
$ go # (google's newest)
$ gfortran # (science!)
IPython is exceptionally cool.
Particularly the notebook mode.
Pretty simple to install via Anaconda.
I'll do a demo.
Your GitHub account names?
manipulations of words
google things like "python download file http", "unix words file"
import urllib2
url = 'http://www.cs.duke.edu/~ola/ap/linuxwords'
text = urllib2.urlopen(url).read()
words = text.split()
print len(words)
print words[0:10]
So ... you decide where to go from here ...
Sam recommends python "requests" as *the* python internet library of choice.
$ pip install requests
or maybe
$ easyinstall requests