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).
import redis | |
r = redis.Redis(host='localhost', port=6379, db=0) | |
lua_script = """ | |
local queue_length = redis.call('llen', KEYS[1]) | |
if queue_length > 0 then | |
-- get the last number | |
local last_number = redis.call('lindex', KEYS[1], -1) | |
local new_number = tonumber(last_number) + 1 |
function loadSRT(url, callback) { | |
var httpRequest = new XMLHttpRequest(); | |
httpRequest.onreadystatechange = function () { | |
if (httpRequest.readyState === XMLHttpRequest.DONE) { | |
if (httpRequest.status === 200) { | |
var subtitles = parseSRT(httpRequest.responseText); | |
callback(subtitles); | |
} else { | |
console.error( |
# 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()] |
<div id='product-component-1601022034033'></div> | |
<script type="text/javascript"> | |
/*<![CDATA[*/ | |
(function () { | |
var scriptURL = 'https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js'; | |
if (window.ShopifyBuy) { | |
if (window.ShopifyBuy.UI) { | |
ShopifyBuyInit(); | |
} else { | |
loadScript(); |
# 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 |
#!/bin/bash | |
# | |
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. | |
# | |
# NVIDIA Corporation and its licensors retain all intellectual property | |
# and proprietary rights in and to this software, related documentation | |
# and any modifications thereto. Any use, reproduction, disclosure or | |
# distribution of this software and related documentation without an express | |
# license agreement from NVIDIA Corporation is strictly prohibited. | |
# |