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
{"title": "title from file", | |
"properties": {"prop1": {"title": "sub property title in base.json"}, | |
"prop2": {"$ref": "#/properties/prop1"}, | |
"prop3": {"$ref": "other.json"}, | |
"prop4": {"$ref": "other.json#/properties/prop1"}, | |
"prop5": {"$ref": "other.json#/properties/prop2"} | |
} | |
} |
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
{"title": "title from url"} |
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 jsonlines | |
import flatterer | |
from pathlib import Path | |
import subprocess | |
def flatten_iterator(statement_type): | |
with jsonlines.open('statements.2021-08-31T08 14 34Z.jsonl') as f: | |
for object in f: | |
if object["statementType"] == statement_type: | |
yield object |
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
############################################################################## | |
# | |
# Simple Python program to benchmark several Python Excel writing modules. | |
# | |
# python bench_excel_writers.py [num_rows] [num_cols] | |
# | |
# Copyright 2013-2018, John McNamara, Charlie Clark | |
# | |
import os | |
import sys |
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 csv | |
import click | |
import json | |
import json_merge_patch | |
@click.command() | |
@click.argument("file") | |
@click.option("-s", "--schema") | |
def csv_to_schema(file, schema=None): |
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
SELECT *, pg_size_pretty(total_bytes) AS total | |
, pg_size_pretty(index_bytes) AS index | |
, pg_size_pretty(toast_bytes) AS toast | |
, pg_size_pretty(table_bytes) AS table | |
FROM ( | |
SELECT *, total_bytes-index_bytes-coalesce(toast_bytes,0) AS table_bytes FROM ( | |
SELECT c.oid,nspname AS table_schema, relname AS table_name | |
, c.reltuples AS row_estimate | |
, pg_total_relation_size(c.oid) AS total_bytes |
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
GB-GOV-1 does not use capital-spend at activity hierarchy 1 | |
GB-GOV-1 does not use budget\|planned-disbursement at activity hierarchy 1 |
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
var asana_api_key = 'personal_access_token' | |
var gmail_address = '[email protected]' | |
var asana_project = '922286080685111' | |
var asana_tag = '930213334200619' | |
var labels = { | |
"HIGH": 0, |
This file has been truncated, but you can view the full file.
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
{ | |
"uri": "http://d.com", | |
"publisher": { | |
"name": "dolore", | |
"scheme": "officia in", | |
"uri": "http://ptkQI.com", | |
"uid": "et Ut" | |
}, | |
"publishedDate": "5044-06-01T16:44:16.284Z", | |
"releases": [ |
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 sys | |
from lxml import etree | |
root = etree.parse(sys.argv[1]) | |
actual_results = {} | |
for num, result in enumerate(list(root.iter("result"))): | |
title = num |