We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 11 columns, instead of 2. in line 7.
This file contains 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
Category Food Food Energy (kJ per 100g) Saturated fat (g per 100g) NME sugar (g per 100g) Sodium (mg per 100g) Calcium (mg per 100g) Iron (mg per 100g) n-3 fatty acids (g per 100g) Fruit and vegetable content* * Fruit and vegetable content has been estimated due to lack of recipe information. The foods in the database were assigned one of the following five values: | |
Bread, other cereals and potatoes French fries 1174 5.8 1.3 310 14 1 0 10 10% Between 0 and 20% fruit and vegetables (by weight) | |
Bread, other cereals and potatoes Corn flakes 1601 0.2 8.2 1000 5 7.9 0 10 30% Between 20 and 40% | |
Bread, other cereals and potatoes Cream crackers 1746 5.4 0 610 110 1.7 0 10 50% Between 40 and 60% | |
Bread, other cereals and potatoes Crispbread 1312 0.1 3.2 220 45 3.5 0 10 70% Between 60 and 80% | |
Bread, other cereals and potatoes Crunchy nut corn flakes 1721 0.7 37.7 600 15 7.9 0 10 90% Between 80 and 100% | |
Bread, other cereals and potatoes Currant buns 1185 1.9 16 317 110 1.9 0 10 | |
Bread, other cereals and potatoes Malt lo |
This file contains 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 | |
require 'rubygems' | |
require 'sinatra' | |
set :public_folder, 'public' | |
get '/' do | |
"Serve.rb" | |
end |
This file contains 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
128.12.16.0/255 Stanford.Res.Mirrielees | |
128.12.21.0/255 Stanford.Res.Manzanita.Lantana | |
128.12.22.0/255 Stanford.Res.Manzanita.KimballRF | |
128.12.23.0/255 Stanford.Res.Manzanita.Kimball | |
128.12.42.0/255 Stanford.Res.Fraternity.KappaAlphaTheta | |
128.12.43.0/255 Stanford.Res.Sorority.DeltaDeltaDelta | |
128.12.45.0/255 Stanford.Res.Wilbur.Soto | |
128.12.47.0/255 Stanford.Res.Wilbur.Otero | |
128.12.48.0/255 Stanford.Res.Wilbur.Okada | |
128.12.49.0/255 Stanford.Res.Wilbur.Junipero |
This file contains 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
;; lwu .emacs 2008 (CarbonEmacs) | |
;; paths and directories | |
(add-to-list 'load-path "~/src/elisp") | |
(custom-set-variables) | |
(custom-set-faces) | |
; (require 'tramp) | |
(setq tramp-default-method "ssh") |
This file contains 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
// This class implements a simple way of displaying point-based data in Mapnik | |
// (It has yet to be tested as Mapnik r729's memory_featureset is commented out now.) | |
// | |
class point_datasource : public mapnik::memory_datasource { | |
public: | |
point_datasource() : feat_id(0) {} | |
void add_point(double x, double y, const char* key, const char* value); | |
int type() const { return mapnik::datasource::Raster; } | |
private: |
This file contains 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
# Shoes got you down? DebugShoes won't fail silently on ya... | |
# | |
class DebugShoes < Shoes | |
def self.app(*args, &blk) | |
super(*args) do | |
begin | |
self.instance_eval(&blk) | |
rescue => e | |
error(e) # log the error and inform the user! | |
@err_bar = flow :width => 1.0, :height => 32, :top => self.height-32, :left => 0 do |
This file contains 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
My first Shoes app! Shoes is a "Tiny Toolkit" for informal graphics and windowing: | |
http://code.whytheluckystiff.net/shoes/ | |
I wanted to be able to easily edit Mapnik stylesheets, hit render, and see the result | |
right away. While this isn't a great solution -- the prototype shells out to a C++ binary to | |
re-render the map -- it works for the time being. | |
A screenshot of the resulting application can be seen here: | |
http://farm4.static.flickr.com/3095/2801694916_1a051349b4_b.jpg | |
(http://flickr.com/photos/wu_135/2801694916/sizes/l/) |
This file contains 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
This Python code snippet demonstrates basic use of the proposed "PointDatasource" | |
object exposed by the Mapnik patch attached here: http://trac.mapnik.org/ticket/113 | |
To run this code, you will need to grab a copy of Mapnik from trunk, apply this patch, | |
and also download the style.xml file below. |
This file contains 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 | |
%w[open-uri hpricot].each {|lib| require lib } | |
YAHOO_APP_ID = "[yourappidhere]" | |
FLICKR_KEY = "[yourapikeyhere]" | |
raise "alarms" if YAHOO_APP_ID =~ /here/ | |
raise "no query arg specified" if ARGV.empty? | |
# command line query => Y! where query => Flickr getInfo query => wget shapefile => ogr2ogr to KML |
This file contains 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 | |
%w[open-uri hpricot].each {|lib| require lib } | |
# get KML bbox and grab OSM XML | |
raise "no query arg specified" if ARGV.empty? | |
kml_filename = ARGV[0] | |
doc = Hpricot(open(kml_filename)) | |
coords = (doc/"coordinates")[0].inner_html.split.map { |x| x.split(',').map {|s| s.to_f } } | |
longs = coords.transpose[0] |
OlderNewer