Skip to content

Instantly share code, notes, and snippets.

View beosro's full-sized avatar
💭
Grabbing info!

beosro

💭
Grabbing info!
View GitHub Profile
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@Svidro
Svidro / !Classifying objects in QuPath
Last active May 15, 2024 19:01
Classification based groovy scripts for QuPath
Collection of scripts mostly from Pete, but also taken from the forums. Note you can always run a saved classifier using the
runClassifier() command, with the file path included as a string.
TOC
A simple cell classifier.groovy - One way to classify cells.
A simple classifier 2.groovy - Another way.
Annotation Classifications to Name field.groovy - Sets the Name of the annotation to its classification. Useful for applying a second
import telepot
import picamera
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
def handle(msg):
global sendPhoto
global chat_id
@beosro
beosro / ui-lovelace.yaml
Created December 18, 2018 10:26 — forked from dale3h/ui-lovelace.yaml
[Lovelace] How to Duplicate a Lovelace Card
title: Home
views:
- title: View 1
cards:
- &card1
type: entities
title: Card 1
show_header_toggle: false
entities:
- light.bedroom
@beosro
beosro / docker.sh
Created April 13, 2019 09:57 — forked from kikitux/docker.sh
Install docker-ce in odroid xu4/xu4q linux-arm arm
#!/usr/bin/env bash
set -e
apt-get update
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
apt-key fingerprint 0EBFCD88
add-apt-repository \
"deb [arch=armhf] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
@beosro
beosro / rpi3_iot_server.md
Created April 26, 2019 15:27 — forked from xoseperez/rpi3_iot_server.md
Raspberry Pi 3 with Mosquitto, Node-RED, InfluxDB, Grafana and Nginx (as a reverse proxy)
@beosro
beosro / mjpeg2.py
Created November 8, 2019 22:53 — forked from walchko/mjpeg2.py
a better mjpeg streamer in python using opencv 3.x
#!/usr/bin/env python
# MIT License
# (c) 2017 Kevin J. Walchko
from __future__ import print_function
import cv2
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import time
import argparse
@beosro
beosro / camera-ssd-threaded.py
Created January 22, 2020 23:15 — forked from jkjung-avt/camera-ssd-threaded.py
Capture live video from camera and do Single-Shot Multibox Detector (SSD) object detetion in Caffe on Jetson TX2/TX1.
# --------------------------------------------------------
# Camera Single-Shot Multibox Detector (SSD) sample code
# for Tegra X2/X1
#
# This program captures and displays video from IP CAM,
# USB webcam, or the Tegra onboard camera, and do real-time
# object detection with Single-Shot Multibox Detector (SSD)
# in Caffe. Refer to the following blog post for how to set
# up and run the code:
#
@beosro
beosro / tegra-cam-caffe-threaded.py
Created January 22, 2020 23:20 — forked from jkjung-avt/tegra-cam-caffe-threaded.py
Capture live video from camera and do Caffe image classification on Jetson TX2/TX1.
# --------------------------------------------------------
# Camera Caffe sample code for Tegra X2/X1
#
# This program captures and displays video from IP CAM,
# USB webcam, or the Tegra onboard camera, and do real-time
# image classification (inference) with Caffe. Refer to the
# following blog post for how to set up and run the code:
#
# https://jkjung-avt.github.io/camera-caffe-threaded/
#
@beosro
beosro / throttled.sh
Created January 13, 2021 16:16 — forked from aallan/throttled.sh
Script to parse the output of the 'vcgencmd get_throttled' command on a Raspberry Pi
#!/bin/bash
# https://retropie.org.uk/forum/topic/2295/runcommand-warning-if-voltage-temperature-throttling
#Flag Bits
UNDERVOLTED=0x1
CAPPED=0x2
THROTTLED=0x4
HAS_UNDERVOLTED=0x10000
HAS_CAPPED=0x20000