We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 25 columns, instead of 15 in line 4.
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
Agglomeration,Number of communes,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013 | |
Aarau ,17 ,76.5 ,76.7 ,77.6 ,77.7 ,78.1 ,78.2 ,78.2 ,78.3 ,78.7 ,79.1 ,79.7 ,80.3 ,81.0 ,81.8 ,82.3 ,83.1 ,83.8 ,85.1 ,86.4 ,88.0 ,89.3 ,90.7 ,91.7 | |
Amriswil-Romanshorn ,5 ,22.6 ,22.9 ,23.3 ,23.6 ,24.0 ,24.0 ,24.2 ,24.0 ,24.0 ,24.1 ,24.0 ,24.2 ,24.4 ,24.6 ,24.7 ,24.8 ,25.0 ,25.4 ,25.8 ,26.3 ,26.8 ,27.3 ,27.7 | |
Arbon-Rorschach ,11 ,54.6 ,54.9 ,55.3 ,55.6 ,55.7 ,55.7 ,55.6 ,56.0 ,56.0 ,56.1 ,56.2 ,56.4 ,56.6 ,56.7 ,56.7 ,57.0 ,57.8 ,58.5 ,59.0 ,59.4 ,59.7 ,60.1 ,60.6 | |
Baden-Brugg ,22 ,100.9 ,101.6 ,102.5 ,102.8 ,103.5 ,103.7 ,103.8 ,104.2 ,104.8 ,105.7 ,107.3 ,108.2 , |
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
-------------------------- | |
-- CORE LIBRARY IMPORTS -- | |
-------------------------- | |
import Task exposing (Task, ThreadID, andThen, sequence, succeed, spawn) | |
import Json.Decode exposing (Decoder, list, int, string, (:=), map, object2) | |
import Signal exposing (Signal, Mailbox, mailbox, send) | |
import List | |
--------------------------------- | |
-- THIRD PARTY LIBRARY IMPORTS -- |
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 Signal | |
import Graphics.Element exposing (Element, show) | |
import Task exposing (Task) | |
main : Signal Element | |
main = | |
Signal.map show contentMailbox.signal | |
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 Graphics.Element (..) | |
import Signal (Signal, map, map2, sampleOn) | |
import Mouse | |
import Text (asText) | |
import Window | |
main : Signal Element | |
main = map asText mousePos | |
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 Mouse | |
import Window | |
main : Signal Element | |
main = lift2 scene Window.dimensions lastClickLocation | |
input : Signal (Int, Int) | |
input = sampleOn Mouse.clicks Mouse.position |
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 Mouse | |
import Window | |
import Signal as S | |
import Color exposing (..) | |
import List exposing (..) | |
import Graphics.Collage exposing (..) | |
main = S.map2 draws Window.dimensions stateSignal | |
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 Safe (readMay) | |
display maybeAge = | |
case maybeAge of | |
Nothing -> putStrLn "Could not read input." | |
Just age -> putStrLn $ "In 2020, you will be: " ++ show age | |
yearToAge age = 2020 - age | |
main = do |
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
-- Read the whole book and save it to input_lines | |
input_lines = LOAD 'alice-im-wunderland.txt' using TextLoader() as (line:chararray); | |
-- Extract words from each line and put them into a pig bag | |
-- datatype, then flatten the bag to get one word on each row | |
words = foreach input_lines generate flatten(TOKENIZE(line)) AS word; | |
-- filter out any words that are just white spaces | |
filtered_words = FILTER words by word MATCHES '\\w+'; |
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
square : Path | |
square = path [ (50,50), (50,-50), (-50,-50), (-50,50), (50,50) ] | |
blueSquare : Form | |
blueSquare = traced (dashed blue) square | |
rotateSquareBy : Float -> Form | |
rotateSquareBy deg = rotate deg blueSquare | |
degrees : [number] |
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 'dart:io'; | |
import 'dart:async'; | |
import 'dart:convert'; | |
import 'dart:collection'; | |
void main() { | |
print("Please, enter 'first name' and 'last name' finish with a empty line\n"); | |
Stream cmdLine = stdin | |
.transform(UTF8.decoder) | |
.transform(new LineSplitter()); |