As of July 2018, Raspbian does not yet include the latest Python release, Python 3.7.4. This means we will have to build it ourselves, and here is how to do it.
- Install the required build-tools (some might already be installed on your system).
# Sebastian Raschka 09/24/2022 | |
# Create a new conda environment and packages | |
# conda create -n whisper python=3.9 | |
# conda activate whisper | |
# conda install mlxtend -c conda-forge | |
# Install ffmpeg | |
# macOS & homebrew | |
# brew install ffmpeg | |
# Ubuntu |
# install chromium, its driver, and selenium | |
!apt update | |
!apt install chromium-chromedriver | |
!pip install selenium | |
# set options to be headless, .. | |
from selenium import webdriver | |
options = webdriver.ChromeOptions() | |
options.add_argument('--headless') | |
options.add_argument('--no-sandbox') | |
options.add_argument('--disable-dev-shm-usage') |
import cv2 | |
import time | |
CONFIDENCE_THRESHOLD = 0.2 | |
NMS_THRESHOLD = 0.4 | |
COLORS = [(0, 255, 255), (255, 255, 0), (0, 255, 0), (255, 0, 0)] | |
class_names = [] | |
with open("classes.txt", "r") as f: | |
class_names = [cname.strip() for cname in f.readlines()] |
# 1. Number of times pregnant | |
# 2. Plasma glucose concentration a 2 hours in an oral glucose tolerance test | |
# 3. Diastolic blood pressure (mm Hg) | |
# 4. Triceps skin fold thickness (mm) | |
# 5. 2-Hour serum insulin (mu U/ml) | |
# 6. Body mass index (weight in kg/(height in m)^2) | |
# 7. Diabetes pedigree function | |
# 8. Age (years) | |
# 9. Class variable (0 or 1) | |
6,148,72,35,0,33.6,0.627,50,1 |
Building Tensorflow from source on Ubuntu 16.04LTS for maximum performance:
TensorFlow is now distributed under an Apache v2 open source license on GitHub.
On Ubuntu 16.04LTS+:
Step 1. Install NVIDIA CUDA:
To use TensorFlow with NVIDIA GPUs, the first step is to install the CUDA Toolkit as shown:
A running example of the code from:
Small refactorings made to original code:
This explains how to setup for GitHub projects which automatically generates Doxygen code documentation and publishes the documentation to the gh-pages
branch using Travis CI.
This way only the source files need to be pushed to GitHub and the gh-pages branch is automatically updated with the generated Doxygen documentation.
Get an account at Travis CI. Turn on Travis for your repository in question, using the Travis control panel.
To create a clean gh-pages
branch, with no commit history, from the master branch enter the code below in the Git Shell. This will create a gh-pages branch with one file, the README.md
in it. It doesn't really matter what file is uploaded in it since it will be overwritten when the automatically generated documentation is published to th
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: mosquitto | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: mosquitto MQTT v3.1 message broker | |
# Description: |