This is a short guide for common database setup for a django app using DJ-Database-URL. This is focused on setting up a development environment. Production will be similar but instead of using the default DB location and credentials, you should use the location of the actual DB server and you really ought to be using a secret password.
| zcat dump.gz | egrep -v "(idle_in_transaction_session_timeout|row_security|AS integer)" | psql postgresql://... |
| SAVEIFS=$IFS | |
| IFS=$(echo -en "\n\b") | |
| for resource in `curl 'localhost/api/3/action/package_search?q=+organization:"national-treasury"+vocab_financial_years:"2018-19"'|jq -r '.result.results[]|.resources[].id'` | |
| do ckanapi -r http://localhost -a lalala action resource_delete id=$resource | |
| done | |
| IFS=$SAVEIFS |
Find SuperWEB 2 http://interactive2.statssa.gov.za/webapi/jsf/login.xhtml via StatsSA Interactive Data http://www.statssa.gov.za/?page_id=1417
Use the Guest login
Find Census 2011 (2016 boundaries) via Community Profiles > Census 2011 (2016 boundaries)
Expand Labour Force and select the Labour Force database item.
Click on New Table
| title: Estimates of National Expenditure of South Africa 2017-18-testy | |
| dataset-name: estimates-of-national-expenditure-south-africa-2017-18-testy | |
| resource-name: estimates-of-national-expenditure-south-africa-2017-18-testy | |
| sources: | |
| - url: "dupe-test.csv" | |
| headers: 1 | |
| name: ene-2017-18 | |
| cache: True |
This is the app to learn programming on your phone. I recommend you start with HTML, CSS and Javascript https://play.google.com/store/apps/details?id=com.sololearn
it teaches you stuff, then you have quizes where you can test what you've learned, and you can actually write some code and test it see it working
python is also a good one to learn after javascript
this can teach you basics of becoming a freelance website developer https://www.smashingmagazine.com/2009/07/the-roadmap-to-becoming-a-professional-freelance-web-designer/
some of it might not perfectly fit south africa or khayelitsha but you can imagine how it connects to the businesses around you
| SAVEIFS=$IFS; IFS=$(echo -en "\n\b"); for f in `ls */*/*.xlsm`; do echo soffice --headless --convert-to xlsx \"$f\" --outdir \"$(dirname $f)\"; done; IFS=$SAVEIFS |
I hereby claim:
- I am jbothma on github.
- I am jbothma (https://keybase.io/jbothma) on keybase.
- I have a public key whose fingerprint is 1016 1320 E0BC FDD7 5F5F 48C2 B410 8474 DEE2 7D69
To claim this, I am signing this object:
| # usage: ocr-pdf scanned.pdf | |
| set -euf -o pipefail -o xtrace | |
| INFILE=$1 | |
| BASENAME=$(basename "$1" .pdf) | |
| TIFFFILE=$BASENAME.tiff | |
| OCRDPDFNOEXT=$BASENAME-OCRd-big | |
| OCRDPDF=$OCRDPDFNOEXT.pdf | |
| SMALLEROCRDPDF=$BASENAME-OCRd.pdf |
| CREATE TEMPORARY TABLE voter_turnout | |
| ( | |
| province TEXT, | |
| muni TEXT, | |
| ward TEXT, | |
| registeredvoters TEXT, | |
| mec7votes TEXT, | |
| voterturnout TEXT, | |
| percentvoterturnout TEXT |