Skip to content

Instantly share code, notes, and snippets.

View cvramanan's full-sized avatar

Venkataramanan Chockalingam cvramanan

View GitHub Profile
/***************************************************************************
This is a library for the BMP280 humidity, temperature & pressure sensor
This example shows how to take Sensor Events instead of direct readings
Designed specifically to work with the Adafruit BMP280 Breakout
----> http://www.adafruit.com/products/2651
These sensors use I2C or SPI to communicate, 2 or 4 pins are required
to interface.
import subprocess
import time
cmd = [ 'nvidia-smi', '--query-gpu=utilization.gpu,utilization.memory', '--format=csv' ]
while True:
time.sleep(1)
output = subprocess.Popen( cmd, stdout=subprocess.PIPE ).communicate()[0]
print(output.decode('utf-8').strip())
#update
apt update
#installing overlay root
apt-get install -y overlayroot
#add the following to turn on overlayroot overlayroot=”tmpfs:swap=1,recurse=0″ on /etc/overlayroot.conf
#installing fuse overlay
apt install -y fuse-overlayfs
#installing curl
apt install -y curl
#installing docker
# -----------------------------------------------------------------------------
# Copyright (c) 2022, Lucid Vision Labs, Inc.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
import cv2
import cv2
import numpy as np
import time
class Conedetection:
def __init__(self):
self.previousSum = 0
#include <Watchdog.h>
//wdt obj
Watchdog watchdog;
//global variables declarations
#define ACTUATOR_PIN1 4
#define ACTUATOR_PIN2 5
#define ACTUATOR_PIN3 6
import pyautogui
import time
import cv2
cap = cv2.VideoCapture(0,cv2.CAP_DSHOW)
cap.set(cv2.CAP_PROP_SETTINGS, 1)
time.sleep(1)
title = "Logitech BRIO Properties"
import requests
import os
import json
ip = "http://localhost:8080"
#!/usr/bin/env python3
import os
import sys
import json
import base64
inputDir = sys.argv[1]
files = os.listdir(inputDir)
import os
import time
import cv2
import numpy as np
import base64
class Camera:
def __init__(self, camID):
"""
Class used to Find camera,setting camera parameters,Fetch conetip camera frames.