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
| #include <iostream> | |
| #include <string> | |
| // | |
| // a class for computing the n-bit sequences with no adjacent 1's | |
| // | |
| // Approach taken was to search the entire solution space for all n-bit | |
| // sequences that satisfy the criteria | |
| // An small optimization was made to prune the solution space by not checking | |
| // the lower bits of a sequence if |
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
| ./letsencrypt-auto certonly -a manual --rsa-key-size 2048 --email [email protected] -d shop.rhubarbfood.org.au |
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
| #include <string> | |
| #include <iostream> | |
| #include <stdexcept> | |
| #include <ctype.h> | |
| #include <utility> | |
| #include <vector> | |
| #include <queue> | |
| #include <algorithm> | |
| using namespace std; |
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
| -- caesarsolver.hs | |
| -- this is part one of the optional programming assignment for the | |
| -- Stanford Univerity Introduction to Artificial Intelligence class | |
| -- it solves a rotating or caesar cypher by using the probabilities | |
| -- of three letter trigrams for the english language. | |
| -- All 26 rotations are generated, scored and the top 3 most likely | |
| -- candidates are displayed. Apologies for the Haskell, it's my first program | |
| -- | |
| -- source for trigram data is here: http://home.ccil.org/~cowan/trigrams | |
| -- the trigram data is read from input |
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 urllib2 | |
| import json | |
| # make sure you put your api key in the request string | |
| def getWeatherFromWunderground(country, city): | |
| request = 'http://api.wunderground.com/api/YOUR_API_KEY_HERE/geolookup/conditions/forecast/q/%s/%s.json' % (country, city) | |
| f = urllib2.urlopen(request) | |
| json_string = f.read() |