Restart USB ports after a power overdraw (error -110). Unplug all devices prior to running script.
References:
Restart USB ports after a power overdraw (error -110). Unplug all devices prior to running script.
References:
echo 'export PATH="${HOME}/.local/bin:$PATH"' >> ~/.bashrc
| def rgb_from_prob(value, minimum=0, maximum=1): | |
| ''' | |
| Based on: https://stackoverflow.com/a/20792531/3450793 | |
| ''' | |
| minimum, maximum = float(minimum), float(maximum) | |
| ratio = 2 * (value-minimum) / (maximum - minimum) | |
| g = int(max(0, 255*(1 - ratio))) | |
| r = int(max(0, 255*(ratio - 1))) | |
| b = 255 - g - r | |
| import pyrealsense2 as rs | |
| import numpy as np | |
| ''' | |
| Intrincs and Exrinsic information available from command line with RealSense SDK | |
| $ rs-enumerate-devices -c | |
| ''' | |
| config = rs.config() | |
| config.enable_stream(rs.stream.depth, 1280, 720, rs.format.z16, 30) | |
| config.enable_stream(rs.stream.color, 1920, 1080, rs.format.bgr8, 30) |
| #!/usr/bin/env bash | |
| # PCL | |
| sudo apt install libpcl-dev | |
| # VTK | |
| # Ref: https://discourse.vtk.org/t/installing-vtk-in-ubuntu-18-04/2147/4 | |
| sudo apt install cmake \ |
References:
https://stackoverflow.com/a/22376126/3450793
You can get what you want by assigning to warnings.showwarning. The warnings module documentation itself recommends that you do that, so it's not that you're being tempted by the dark side of the source. :)
You may replace this function with an alternative implementation by assigning to
warnings.showwarning.
| # Retry a command up to a specific numer of times until it exits successfully, | |
| # with exponential back off. | |
| # | |
| # $ retry 5 echo Hello | |
| # Hello | |
| # | |
| # $ retry 5 false | |
| # Retry 1/5 exited 1, retrying in 1 seconds... | |
| # Retry 2/5 exited 1, retrying in 2 seconds... | |
| # Retry 3/5 exited 1, retrying in 4 seconds... |