Hack script to convert a PDF of Tiers 2 and 5 sponsors into a tab-separated value format file, reproduced here under the terms of the Open Government Licence and loaded as a Google Doc.
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
| #!/usr/bin/env perl | |
| # | |
| # convert .tiddler into .tid format files | |
| # | |
| use strict; | |
| use File::Slurp; | |
| foreach my $file (@ARGV) { |
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 json | |
| from esridump.dumper import EsriDumper | |
| url = 'https://services-eu1.arcgis.com/ZOdPfBS3aqqDYPUQ/arcgis/rest/services/National_Heritage_List_for_England_NHLE_v02_VIEW/FeatureServer/0/' | |
| dumper = EsriDumper(url, fields=None) | |
| response = dumper._request("GET", url) | |
| dumper.get_metadata() |
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
| endpoint.csv |
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
| .PRECIOUS: pages.txt | |
| index.md: pages.txt index.sh | |
| bash index.sh < $< > $@ | |
| pages.txt: pages.sh | |
| bash pages.sh > $@ |
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
| {40: 858, 41: 873, 42: 888, 43: 903, 44: 919, 45: 936, 46: 953, 47: 971, 48: 989, 49: 1008, 50: 1028, 51: 1049} | |
| 1060 +--------------------------------------------------------------------+ | |
| | ** | | |
| 1040 | ** | | |
| | *** | | |
| 1020 | *** | | |
| | *** | | |
| 1000 | *** | | |
| | ***** | |
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
| map $query_string $new_url { | |
| ~a=1 http://www.gov.uk/1; | |
| ~a=2 http://www.gov.uk/2; | |
| ~a=3&b=1|b=1&a=3 http://www.gov.uk/31; | |
| ~\ba=4\b.*\bb=2\b|\bb=2\b.*\ba=4\b http://www.gov.uk/42; | |
| } | |
| server { | |
| server_name lrc.businesslink.gov.uk; |
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
| intervention | organisation | |
|---|---|---|
| software | local-authority:BKM | |
| software | local-authority:DAC | |
| software | local-authority:DNC | |
| software | local-authority:GLO | |
| software | local-authority:CMD | |
| software | local-authority:LBH | |
| software | local-authority:SWK | |
| software | local-authority:MDW | |
| software | local-authority:NET |
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
| $ python3.10 -m venv --prompt . .venv --clear --upgrade-deps && workon | |
| Requirement already satisfied: pip in ./.venv/lib/python3.10/site-packages (22.2.2) | |
| Collecting pip | |
| Using cached pip-24.2-py3-none-any.whl (1.8 MB) | |
| Requirement already satisfied: setuptools in ./.venv/lib/python3.10/site-packages (63.2.0) | |
| Collecting setuptools | |
| Using cached setuptools-75.1.0-py3-none-any.whl (1.2 MB) | |
| Installing collected packages: setuptools, pip | |
| Attempting uninstall: setuptools |
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
| #!/usr/bin/env python | |
| import sys | |
| import json | |
| from esridump.dumper import EsriDumper | |
| url = sys.argv[1] | |
| dumper = EsriDumper(url, fields=None) |
NewerOlder