chromium-browser --proxy-server="http://localhost:8080"uvx --with beautifulsoup4 mitmproxy --anticache -s update_oli.py| const lang = { | |
| lang: { | |
| oli: { | |
| baseMapsTitle: "Base maps", | |
| deviceLocation: { | |
| showLocation: "Show your location", | |
| }, | |
| fullScreen: { | |
| tipLabel: "Toggle full-screen", | |
| }, |
I've found reading and writing a UTF-8 encoded XML file with Python ElementTree harder than expected so I thought I'd pull together this demo.
The trick is to open the source and destination files with an explicit encoding instead of relying on ElementTree.parse and ElementTree.write.
Naïve Quicksort implementation in Python inspired by Computerphile's Quicksort in 5 lines of code
Place the files in a directory. Serve the files via a web server such as the built-in python http server.
Open index.html in your browser, open the DevTools Console and reload.
| import { Parser } from '@robojones/nginx-log-parser'; | |
| import fs from 'fs'; | |
| import { createReadStream } from 'fs'; | |
| import zlib from 'zlib'; | |
| import readline from 'readline'; | |
| import path from 'path'; | |
| async function* processFile(filePath, filter) { | |
| const extension = path.extname(filePath); | |
| let readStream; |
Matt Walker mattwalker@astuntechnology.com, x.com/_walkermatt
Improved availability and visibility
| -- Raises an exception with `failure_message` if `sql_text` does not throw an exception at all. | |
| -- If an exception is thrown but it's SQLSTATE doesn't match `expected_sql_state` then that | |
| -- exception is RE-RAISED | |
| CREATE OR REPLACE FUNCTION pg_temp.test__throws_exception(sql_text text, expected_sql_state text, failure_message text) RETURNS void AS $$ | |
| DECLARE | |
| sql_state text; | |
| BEGIN | |
| EXECUTE sql_text; | |
| RAISE EXCEPTION '%', failure_message; | |
| EXCEPTION WHEN OTHERS THEN GET STACKED DIAGNOSTICS sql_state = RETURNED_SQLSTATE; |
| Description | Entity | Preview |
|---|---|---|
| A With Acute, Latin Capital Letter | Á | Á |
| A With Acute, Latin Small Letter | á | á |
| A With Breve, Latin Small Letter | ă | ă |
| A With Caron, Latin Small Letter | ǎ | ǎ |
| A With Circumflex, Latin Capital Letter | Â | Â |
| A With Circumflex, Latin Small Letter | â | â |