✨ The little ASGI framework that shines. ✨
# ========== (c) JP Hwang 27/7/20 ========== | |
from shared_funcs import load_fig | |
fig = load_fig() | |
import dash | |
import dash_html_components as html | |
import dash_core_components as dcc | |
from dash.dependencies import Input, Output | |
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] |
Python build finished successfully! | |
The necessary bits to build these optional modules were not found: | |
_dbm _gdbm _lzma | |
_sqlite3 _tkinter readline | |
To find the necessary bits, look in setup.py in detect_modules() for the module's name. | |
so. | |
sudo yum install gdbm-devel tk-devel xz-devel sqlite-devel readline-devel bzip2-devel ncurses-devel zlib=devel |
# after appcleaner does his magic, do this | |
sudo rm -rf "/Library/Application Support/Paragon Software/" | |
sudo rm /Library/LaunchDaemons/com.paragon-software.installer.plist | |
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfs.loader.plist | |
sudo rm /Library/LaunchDaemons/com.paragon-software.ntfsd.plist | |
sudo rm /Library/LaunchAgents/com.paragon-software.ntfs.notification-agent.plist | |
sudo rm -rf /Library/Filesystems/ufsd_NTFS.fs/ | |
sudo rm -rf /Library/PrivilegedHelperTools/com.paragon-software.installer | |
sudo rm -rf /Library/Extensions/ufsd_NTFS.kext/ |
mkfifo reply | |
ncat -kl 8765 < reply | ncat 127.0.0.1 4567 > reply # listens on port 8765 and redirects to localhost:4567. Runs until C-c. | |
rm reply # cleanup after end |
var active = false; | |
function changeRefer(details) { | |
if (!active) return; | |
for (var i = 0; i < details.requestHeaders.length; ++i) { | |
if (details.requestHeaders[i].name === 'Referer') { | |
details.requestHeaders[i].value = 'http://www.google.com/'; | |
break; | |
} |
routes
– an array of route objects
request
- configuration of a request.
response
- configuration of the response.
resourcePath
- relative path of the resource to serve, if the request was matched.contentType
- optional an override for the resource content type. By default it's automatically deduced from the file MIME type.Before writing any in-house code, it is wise to check if there already exists a published library for the task at hand. If you're interacting with a service, chances are the developers of the service had taken time to develop official libraries for the more popular programming languages. If it's a task that you suspect is a solved problem, chances are someone has taken the initiative to open source their solution.
Here are the resources to discover libraries and tools for your programming task.
pip search
+ grep
, e.g.# run with sudo user privileges | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' | |
sudo chmod 644 /etc/apt/sources.list.d/google-chrome.list | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable |
""" | |
IAM boto examples: | |
In this example we create a group that provides access | |
to all EC2 and S3 resources and actions and then add a | |
user to that group. | |
""" | |
import boto | |
# | |
# First create a connection to the IAM service |