Brief was to “make sure that all values displayed are consistent”. What's going on in this page (particularly the SQL and subsequent query hacking?)
Setting up is fairly straightforward
| --CREATE SCHEMA sandbox; | |
| CREATE TABLE IF NOT EXISTS sandbox.test(id serial, geom geometry); | |
| TRUNCATE sandbox.test; | |
| CREATE OR REPLACE FUNCTION sandbox.split_geometry(ageom geometry, OUT the_geom geometry) | |
| RETURNS SETOF geometry AS | |
| $$ | |
| -- If polygon bbox is longer in the East-West direction, split by a North-South | |
| -- line at the center of the polygon |
| db.instances.update( | |
| {"formhub/uuid" : "faec0c656d1e4665b92b9f3c63eb4913"}, | |
| { $set: { | |
| _xform_id_string : "2_Vizita_No_Atividade_Mentor_Nian", | |
| _userform_id: "edu_2_Vizita_No_Atividade_Mentor_Nian", | |
| "formhub/uuid": "72b5006f97234e029942358be11969c6" | |
| }}, | |
| { multi: true } ) |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
from decimal import Decimal
master = [{'name': 'Transport and storage', 'code': 210, 'pretty': '1.51B', 'value': 1506413922.22},
{'name': 'Energy generation and supply', 'code': 230, 'pretty': '1.38B', 'value': 1381037466.9900002},
{'name': 'Agriculture', 'code': 311, 'pretty': '873.91M', 'value': 873910810.5349958},
{'name': 'Other multisector', 'code': 430, 'pretty': '775.72M', 'value': 775723989.434992},
{'name': 'Government and civil society, general', 'code': 151, 'pretty': '562.41M',
'value': 562410511.788092},
{'name': 'Water and sanitation', 'code': 140, 'pretty': '541.16M', 'value': 541161168.5014064},| # parser.py | |
| # Requires "beautifulsoup4", pip install it | |
| from bs4 import BeautifulSoup | |
| import urllib.request | |
| class SupersetRefPuller: | |
| def __init__(self, url="https://superset-myeqip.catalpa.build/chart/list/"): | |
| self.url = url |
| #!/bin/bash | |
| DOWNLOADS=~projectbank/mimu | |
| PROJECT_DIR=/var/www/projectbank/source/projectbank | |
| SCHEMA="mimu" | |
| cd ${DOWNLOADS} | |
| for file in *.zip | |
| do | |
| unzip -o ${file} |
| #!/usr/bin/env python | |
| import docker | |
| import logging | |
| from docker import DockerClient | |
| import time | |
| import subprocess | |
| import sys | |
| from dataclasses import dataclass |