SELECT cab_type,
count(*)
FROM trips
GROUP BY cab_type
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
| \set PROMPT1 '%[%033[1;33m%]%M:%>%[%033[1;32m%] %n@%/%R%[%033[0m%]%# ' | |
| \set PROMPT2 ' %R > ' | |
| \x auto | |
| \timing | |
| \set HISTFILE ~/.psql_history- :DBNAME | |
| \set HISTCONTROL ignoredups | |
| \set COMP_KEYWORD_CASE upper | |
| \pset null '¤' |
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
| // See: https://imgur.com/gafDVW5 | |
| package com.example.mark.myapplication; | |
| import android.os.Bundle; | |
| import android.support.design.widget.FloatingActionButton; | |
| import android.support.design.widget.Snackbar; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.support.v7.widget.Toolbar; | |
| import android.view.View; |
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
| // See: https://imgur.com/6o6DP4Q | |
| package com.example.mark.myapplication; | |
| import android.os.Bundle; | |
| import android.support.design.widget.FloatingActionButton; | |
| import android.support.design.widget.Snackbar; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.support.v7.widget.Toolbar; | |
| import android.view.View; |
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
| -- From: http://michael.otacoo.com/postgresql-2/postgres-9-5-feature-highlight-brin-indexes/ | |
| CREATE TABLE brin_example AS SELECT generate_series(1,100000000) AS id; | |
| CREATE INDEX btree_index ON brin_example(id); | |
| -- By default, the block size is 128 pages. This resolution can be increased or decreased using the pages_per_range | |
| CREATE INDEX brin_index ON brin_example USING brin(id); | |
| CREATE INDEX brin_index_64 ON brin_example USING brin(id) WITH (pages_per_range = 64); | |
| CREATE INDEX brin_index_256 ON brin_example USING brin(id) WITH (pages_per_range = 256); | |
| CREATE INDEX brin_index_512 ON brin_example USING brin(id) WITH (pages_per_range = 512); | |
| -- The lower the pages per block, the more space the index will occupy, but the less lossy the index will be, i.e. it will need to discard fewer rows. |
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
| trip_id integer | |
| vendor_id string | |
| pickup_datetime TIMESTAMP | |
| dropoff_datetime TIMESTAMP | |
| store_and_fwd_flag string | |
| rate_code_id integer | |
| pickup_longitude float | |
| pickup_latitude float | |
| dropoff_longitude float | |
| dropoff_latitude float |
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
| $ (echo -e "PRAGMA synchronous=OFF; PRAGMA count_changes=OFF;\n.mode csv\n.separator ,\n.import /dev/stdin trips"; | |
| gunzip -c ~/taxi-data/*.csv.gz) | \ | |
| sqlite3 trips.db |
See GitHub for the source code and TensorFlow on a GTX 1080 for installation notes.
$ python fizz_buzz.py \
--hidden_units 500 \
--iterations 4000 \
--learning_rate 0.04
- Inexplicable perversity of human nature.
- The clever machinations of MongoDB's marketing people.
- The AGPL license killed it.
- We spent too long development before monetizing.
- Bad performance.
- Numeric types limited to a 64-bit `float`.
- Great product, but didn't/couldn't translate to revenue.
- Bad business model.
- Failure in timezones/timestamp nuances.
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
| git clone https://github.com/Smerity/cc-mrjob.git ~/cc-mrjob && cd ~/cc-mrjob | |
| pip install -r requirements.txt | |
| pip install awscli | |
| aws configure | |
| curl -O https://commoncrawl.s3.amazonaws.com/crawl-data/CC-MAIN-2017-04/wat.paths.gz | |
| gunzip wat.paths.gz | |
| python server_analysis.py \ | |
| -r emr \ | |
| --conf-path mrjob.conf \ |