$ docker-machine restart default
Restarting "default"...
(default) Check network to re-create if needed...
(default) Waiting for an IP...
Waiting for SSH to be available...
Detecting the provisioner...
Restarted machines may have new IP addresses. You may need to re-run the `docker-machine env` command.
$ docker-machine env default
View htmldiff-Copilot
This file contains 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
from lxml import etree | |
from lxml.etree import XMLParser | |
from lxml import html | |
from lxml.html.diff import htmldiff | |
def diffXMLContent(file1, file2): | |
parser = XMLParser(remove_blank_text=True) | |
tree1 = etree.parse(file1, parser) | |
tree2 = etree.parse(file2, parser) |
View missing_file_ending.sh
This file contains 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
#!/bin/bash | |
# Get list of files ending with -extracted.json | |
files_extracted=$(ls *-extracted.json) | |
# Use for loop to iterate over list of files ending with -extracted.json | |
for file in $files_extracted; do | |
# Check if file with -fullresults.json ending exists | |
if [ ! -f ${file%-extracted.json}-fullresults.json ]; then | |
# Print the filename if it doesn't exist |
View options.js mur
This file contains 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
{ | |
// Selectors for mapping sections in document: | |
// `key` is a selector to match section | |
// `value` is an array of element selectors to exclude | |
// from matched section content. Pass empty array or `null` | |
// to include full content | |
match: ['part', 'title', 'subtitle', 'chapter', 'section', 'toc', 'tocItem', 'preface', 'level', 'table', 'recital', 'resolutions', 'conclusions', 'preamble', 'regulation', 'schedule', 'article', 'docTitle', 'docNum'], | |
// Selectors to ignore sections matched by `match` option | |
ignore: ['paragraph//paragraph', 'level//paragraph', 'level//level'], |
View options xcdiff
This file contains 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
{ | |
// Selectors for mapping sections in document: | |
// `key` is a selector to match section | |
// `value` is an array of element selectors to exclude | |
// from matched section content. Pass empty array or `null` | |
// to include full content | |
match: ['xml-meta', 'division', 'part', 'title', 'subtitle', 'chapter', 'section', 'intermediatelevel', 'majorlevel'], | |
//match: ['part', 'title', 'subtitle', 'chapter', 'section', 'toc', 'tocItem', 'docTitle', 'preamble', 'level', 'recital', 'resolutions', 'conclusions', 'regulation', 'table'], | |
// Selectors to ignore sections matched by `match` option | |
ignore : ['section//section', 'section//division', 'section//part', 'section//title', 'section//subtitle', 'section//chapter'], |
View docker-volume-inspect.txt
This file contains 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
podman volume inspect <volumename> |
View billsumaries-idea.txt
This file contains 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
One long-term idea that would be very interesting and valuable is to train a model to produce bill summaries. | |
The bill summaries are in XML in bulk at this site: | |
https://www.govinfo.gov/bulkdata/BILLSUM/117/hr | |
For example: https://www.govinfo.gov/bulkdata/BILLSUM/117/hr/BILLSUM-117hr1177.xml | |
In the `summary-text` element, within <![CDATA[ ]]> |
View catalog.xml
This file contains 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
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> | |
<!-- DTD --> | |
<system systemId="res.dtd" uri="schemas/res.dtd"/> | |
<system systemId="C:\Program Files (x86)\JustSystems\rules\bill.dtd" uri="schemas/bill.dtd"/> | |
<system systemId="http://xml.house.gov/bill.dtd" uri="schemas/bill.dtd"/> | |
<system systemId="http://xml.house.gov/amend.dtd" uri="schemas/amend.dtd"/> | |
<public publicId="-//US Congress//DTDs/bill.dtd//EN" uri="schemas/bill.dtd"/> | |
<public publicId="-//US Congress//DTDs/res.dtd//EN" uri="schemas/res.dtd"/> | |
<public publicId="-//US Congress//DTDs/bill v2.8 20020720//EN" uri="schemas/bill.dtd"/> |
View files_bigger_than
This file contains 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
files_bigger_than() { | |
local file_path="$1" | |
local size="$2" | |
local file_size=$(stat -c%s "$file_path") | |
if [ "$file_size" -gt "$size" ]; then | |
echo "$file_path" | |
fi | |
} |
View mac-docker.adoc
View createdirs.adoc
$ mkdir -p bills/{111..117}/{pdf,dtd,uslm,compare}
$ tree bills
bills
├── 111
│ ├── compare
│ ├── dtd
│ ├── pdf
NewerOlder