- Enviroment
- Ubuntu 20.04
- Intellij IDEA 2020
Discover gists
import RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BCM) | |
RUNNING = True | |
green = 27 | |
red = 17 | |
blue = 22 |
Last updated March 13, 2024
This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.
Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.
For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.
#!/usr/bin/env python | |
import cv2 | |
import sys | |
def drawBoundingBoxes(imageData, imageOutputPath, inferenceResults, color): | |
"""Draw bounding boxes on an image. | |
imageData: image data in numpy array format | |
imageOutputPath: output image file path | |
inferenceResults: inference results array off object (l,t,w,h) | |
colorMap: Bounding box color candidates, list of RGB tuples. |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
FlowMap: An Optimal Technology Mapping Algorithm for Delay Optimization in Lookup-Table Based FPGA Designs
- the classic paper
- compute LUT mappings through maximum-flow
- produces optimal depth designs
- but needs major area recovery, e.g. flow-pack
- implemented in the Yosys
flowmap
pass.
- relaxing requirement of one logic gate to one LUT allows area recovery
- duplicates logic to produce more LUT mapping opportunities
function is( obj, type ) { | |
return typeof obj === type; | |
} | |
var isEventSupported = (function() { | |
var TAGNAMES = { | |
'select': 'input', 'change': 'input', | |
'submit': 'form', 'reset': 'form', | |
'error': 'img', 'load': 'img', 'abort': 'img' |
A quick cheatsheet of useful snippet for Flutter
A widget is the basic type of controller in Flutter Material.
There are two type of basic Widget we can extend our classes: StatefulWidget
or StatelessWidget
.
StatefulWidget are all the widget that interally have a dynamic value that can change during usage. It can receive an input value in the constructor or reference to functions. You need to create two classes like: