A udev rule fix for when Chrome can pair with your Keychron keyboard on usevia.app / launcher.keychron.com but fails to actually open it with:
NotAllowedError: Failed to open the device.
A udev rule fix for when Chrome can pair with your Keychron keyboard on usevia.app / launcher.keychron.com but fails to actually open it with:
NotAllowedError: Failed to open the device.
// Taken from: https://blog.summercat.com/configuring-mixed-dpi-monitors-with-xrandr.html
Dual monitors
When I want to use both monitors, this is the command I run:
xrandr --dpi 276 --fb 7040x3960 \
--output eDP-1 --mode 3200x1800 \
--output DP-1-2 --scale 2x2 --pos 3200x0 --panning 3840x2160+3200+0
Here's an explanation of the options:
Use the following to build functional usable inpage anchors
div-class-name {
/* This is for a cleaner, and better positioning for the anchor tag */
display: inline-block;
padding-top: 100px;
margin-top: -100px;
height: 0;
width: 0;| import cv2 | |
| image = cv2.imread('test.jpg') | |
| overlay = image.copy() | |
| x, y, w, h = 10, 10, 10, 10 # Rectangle parameters | |
| cv2.rectangle(overlay, (x, y), (x+w, y+h), (0, 200, 0), -1) # A filled rectangle | |
| alpha = 0.4 # Transparency factor. |
| # Thanks to http://tsaith.github.io/record-video-with-python-3-opencv-3-on-osx.html | |
| import numpy as np | |
| import cv2 | |
| cap = cv2.VideoCapture(0) # Capture video from camera | |
| # Get the width and height of frame | |
| width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH) + 0.5) | |
| height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT) + 0.5) |
cding to dirs!| """The celery worker has to be started to handle the tasks of celery. | |
| This pattern is followed because we're instantiating the flask application through | |
| flask's application factory. The context of the application is required. | |
| """ | |
| from project import create_app # Flask application factory is used. | |
| from project import celery # This is the celery instance that needs to be instantiated when a flask app is created. | |
| import logging | |
| logger = logging.getLogger('celery') |
This document is a simple resource to create sphinx documentation for projects with python(or not). This isn't exhaustive, but it'll help us get started without much hassle, (which, is typical for sphinx generated documenting)
For better results, ensure that you're inside a virtual env. This document assumes you're in a Pipenv based environment. Update it later to include other python package management tools (hopefully poetry)
| # https://editorconfig.org/ | |
| # NOTE: This is the editor config of python's django project. :) Thanks to them. | |
| root = true | |
| [*] | |
| indent_style = space | |
| indent_size = 4 | |
| insert_final_newline = true | |
| trim_trailing_whitespace = true |