I hereby claim:
- I am shearichard on github.
- I am shearichard (https://keybase.io/shearichard) on keybase.
- I have a public key ASCKcJcZyVLFtzoyRULd8VTK-bdsgW7FmiiHRnNWNvj-zQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
''' | |
The same functionality expressed as decorators and Depends | |
''' | |
from fastapi import FastAPI, Request, Depends | |
import logging | |
app = FastAPI() | |
# Set up logging |
The following assumes that :
curl 'https://raw.githubusercontent.com/ryangrose/easy-pandoc-templates/master/copy_templates.sh' | bash
///////////////////////////////////////////////////////////////////// | |
// This component was written in haste and has not been tested | |
///////////////////////////////////////////////////////////////////// | |
import React, { useState, useEffect } from 'react'; | |
const SearchContacts = () => { | |
const [query, setQuery] = useState(''); | |
const [results, setResults] = useState([]); | |
const [loading, setLoading] = useState(false); | |
const [error, setError] = useState(null); |
# Found at https://stackoverflow.com/a/45928164/364088 | |
# | |
# Not flawless | |
# | |
import base64 | |
# | |
def isBase64(sb): | |
try: | |
if isinstance(sb, str): | |
# If there's any unicode here, an exception will be |
#0 19.60 Downloading gunicorn-19.8.1-py2.py3-none-any.whl (112 kB) | |
#0 19.61 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 112.9/112.9 KB 10.8 MB/s eta 0:00:00 | |
#0 19.67 INFO: pip is looking at multiple versions of gunicorn to determine which version is compatible with other requirements. This could take a while. | |
#0 19.71 Downloading gunicorn-19.8.0-py2.py3-none-any.whl (112 kB) | |
#0 19.73 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 112.8/112.8 KB 10.3 MB/s eta 0:00:00 | |
#0 19.83 Downloading gunicorn-19.7.1-py2.py3-none-any.whl (111 kB) | |
#0 19.85 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 112.0/112.0 KB 12.0 MB/s eta 0:00:00 | |
#0 19.93 Downloading gunicorn-19.7.0-py2.py3-none-any.whl (112 kB) | |
#0 19.94 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 112.1/112.1 KB 10.5 MB/s eta 0:00:00 | |
#0 20.03 Downloading gunicorn-19.6.0-py2.py3-none-any.whl (114 kB) |
#!/bin/sh | |
# | |
# Pipe output from another command into this shell script | |
# and find the resulting output in a date/time stamped file | |
# in the tmp directory | |
# | |
# Eg | |
# | |
# $ ls -l | ./pipetotmp.sh | |
# |
#!/bin/bash | |
# WF 2018-09-20 | |
# This script isn't mine, I found it at https://stackoverflow.com/a/47609921/1497139 | |
#ansi colors | |
#http://www.csc.uvic.ca/~sae/seng265/fall04/tips/s265s047-tips/bash-using-colors.html | |
blue='\033[0;34m' | |
red='\033[0;31m' | |
green='\033[0;32m' # '\e[1;32m' is too bright for white bg. | |
endColor='\033[0m' |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
</head> | |
<body> | |
<cite>https://html.spec.whatwg.org/#details-notification-task-steps</cite | |
<section class="progress window"> | |
<h2>An example of using the 'details' HTML tag</h2> |
######################################################################################################## | |
# Python 3.10. | |
# The 'SetValueEx' doesn't work due to permissions issues. It appears that the answer to that | |
# is here https://stackoverflow.com/a/41871758 but I haven't tried it. | |
# | |
# I found this https://www.blog.pythonlibrary.org/2010/03/20/pythons-_winreg-editing-the-windows-registry/ | |
# to be useful. | |
# | |
######################################################################################################## |