Create a Shortcut with two steps:
- select photos
- get contents from url
- set method to
post - set request body to
form - use
magic variableto set file as result of last step
| [extensions] | |
| # enable color extension | |
| color = | |
| # enable extdiff extension (Extended Diff) | |
| hgext.extdiff = | |
| [extdiff] | |
| # configure extended diff to use colordiff (requires colordiff installed in your system) | |
| cmd.cdiff = colordiff | |
| opts.cdiff = -uprN |
| % To remove a Matlab trailing whitespace in the editor | |
| % Original Author: Sam Roberts | |
| % Improved by: Simone Gaiarin <simgunz@gmail.com> | |
| % http://stackoverflow.com/questions/19770347/how-to-auto-remove-trailing-whitespaces-on-save-in-matlab | |
| % Modified by Mark Harfouche to remember cursor location | |
| % | |
| % | |
| % Temp variable for shortcut. Give it an unusual name so it's unlikely to | |
| % conflict with anything in the workspace. | |
| shtcutwh__ = struct; |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import matplotlib as mpl | |
| from matplotlib.widgets import Slider | |
| import iofuncs as iof | |
| import plotfuncs as plf | |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| """ | |
| import os | |
| import numpy as np | |
| import pandas as pd |
Create a Shortcut with two steps:
postformmagic variable to set file as result of last stepThis logging setup configures Structlog to output pretty logs in development, and JSON log lines in production.
Then, you can use Structlog loggers or standard logging loggers, and they both will be processed by the Structlog pipeline (see the hello() endpoint for reference). That way any log generated by your dependencies will also be processed and enriched, even if they know nothing about Structlog!
Requests are assigned a correlation ID with the asgi-correlation-id middleware (either captured from incoming request or generated on the fly).
All logs are linked to the correlation ID, and to the Datadog trace/span if instrumented.
This data "global to the request" is stored in context vars, and automatically added to all logs produced during the request thanks to Structlog.
You can add to these "global local variables" at any point in an endpoint with `structlog.contextvars.bind_contextvars(custom
| #!/usr/bin/env node | |
| const fs = require('fs'); | |
| function convertProtonPassToJson(protonPassJson) { | |
| // Parse the JSON input | |
| const data = JSON.parse(protonPassJson); | |
| // Define an array to hold CSV lines | |
| let csvLines = []; |