View gist:fdc7830cddd98d5aa51cb1afa5b9c180
<h1>India from 20050000 to 20100000</h1>
query = select *,(select shortname from datasets where datasets.url = database_url) as shortname from data where region = ? and odate between ? and ? and metric = ? having not (shortname REGEXP '^ted')
<br/>parameters to query: region = India, start_date = 20050000, end_date = 20100000, metric = GDP
<br/>Reading a row from data
<br/>Reading a row from data
<br/>Reading a row from data
<br/>Reading a row from data
<br/>Reading a row from data
<br/>Reading a row from data
View README.md

Instructions for converting model code to a hyperlinked SVG

  1. Copy the model code in causes.txt to the "Model code" box in http://www.dagitty.net/dags.html and update the model.

  2. In the top menu, click "Model" then "Export as SVG".

  3. Open the model SVG in Vim and run the following commands:

    %!tidy -xml -q -i -w 0
View gist:278bdf870fd667bc3f324d1ba656490c
Martin_Garrix 2004_Summer_Olympics link 99
other-search 2004_Summer_Olympics_national_flag_bearers external 174
other-empty 2004_Summer_Olympics_national_flag_bearers external 311
2016_Summer_Olympics_Parade_of_Nations 2004_Summer_Olympics_national_flag_bearers link 26
2004_Summer_Olympics_opening_ceremony 2004_Summer_Olympics_national_flag_bearers link 379
2000_Summer_Olympics_national_flag_bearers 2004_Summer_Olympics_national_flag_bearers link 43
2008_Summer_Olympics_Parade_of_Nations 2004_Summer_Olympics_national_flag_bearers link 45
Main_Page 2004_Summer_Olympics other 205
June_11 2004_Summer_Olympics other 28
other-external 2004_Summer_Paralympics external 115
View gist:bb129cff0cae8f0989928842bc5dfe63
mysql> select donor,donee,influencer from donations where influencer REGEXP ',';
+------------------------------------------------------------------------+--------------------------------------+--------------------------------------------+
| donor | donee | influencer |
+------------------------------------------------------------------------+--------------------------------------+--------------------------------------------+
| Open Philanthropy Project | Beth Israel Deaconess Medical Center | Chris Somerville,Heather Youngs |
| Open Philanthropy Project | Urban Institute | Luke Muehlhauser,Alexander Berger |
| Open Philanthropy Project | 80,000 Hours | Nick Beckstead,Nicole Ross
View Makefile
read:
mysql $(MYSQL_ARGS) $(DATABASE) < sql/documents/documents-schema.sql
mysql $(MYSQL_ARGS) $(DATABASE) < sql/donations/donations-schema.sql
mysql $(MYSQL_ARGS) $(DATABASE) < sql/donees/donees-schema.sql
mysql $(MYSQL_ARGS) $(DATABASE) < sql/donors/donors-schema.sql
mysql $(MYSQL_ARGS) $(DATABASE) < sql/disclosures/disclosures-schema.sql
# mysql $(MYSQL_ARGS) $(DATABASE) < sql/disclosures/open-phil-disclosures.sql
mysql $(MYSQL_ARGS) $(DATABASE) < sql/documents/80k-docs.sql
mysql $(MYSQL_ARGS) $(DATABASE) < sql/documents/ace-docs.sql
mysql $(MYSQL_ARGS) $(DATABASE) < sql/documents/cea-docs.sql
View weights_network.gv
# License: CC0 https://creativecommons.org/publicdomain/zero/1.0/
# Output produced using `dot -Tpng -O weights_network.gv`
digraph G {
rankdir=LR
splines=line
subgraph cluster_0 {
color=white;
node [style=solid, color=blue4, shape=circle];
View simple_network.gv
# License: CC0 https://creativecommons.org/publicdomain/zero/1.0/
# Output produced using `dot -Tpng -O simple_network.gv`
digraph G {
rankdir=LR
splines=line
subgraph cluster_0 {
color=white;
node [style=solid, color=blue4, shape=circle];
View check.py
#!/usr/bin/env python3
# Run this like: ls -1 | ./check.py
import sys
ignored = [
"Free cities.page",
"UI Design.page",
"Artificial intelligence.page",
View plot.py
#!/usr/bin/env python3
import sys
import pandas as pd
import matplotlib.pyplot as plt
calls = 0
data = []
with open(sys.argv[1], "r") as f:
for line in f:
View gist:54fb59943819395704e3d053b6c3d7e0
Array
(
[Query_ID] => 10
[Duration] => 0.59338725
[Query] => select
case when influencer is NULL
then 'Unclassified'
else influencer
end as influencer,
count(distinct donee) as numDonees,