Skip to content

Instantly share code, notes, and snippets.

View mtc-20's full-sized avatar

Mamen Thomas Chembakasseril mtc-20

View GitHub Profile
@mtc-20
mtc-20 / README.md
Last active September 6, 2021 11:28
A sample Gamepad class using the inputs library, just refer README for more info

Sample Gamepad Class

A simple Gamepad class in Python for receiving and reacting to inputs from almost any Gamepad. It runs in its own thread.

Requirements

 pip install inputs

Editing Button Mapping

Refer #L12-L16 for finding more button map keys and add it to the key_map dictionary as required.

@mtc-20
mtc-20 / OpenCV-4-5-1-TX2.sh
Last active January 15, 2024 10:38
Basic shell script to build OpenCV 4.5.1 on Jetson TX2(Jetpack 4.6)
#!/bin/bash
echo "Installing OpenCV 4.5.1 on your Jetson TX2"
echo "It will take 2 hours !"
# reveal the CUDA location
cd ~
sudo sh -c "echo '/usr/local/cuda/lib64' >> /etc/ld.so.conf.d/nvidia-tegra.conf"
sudo ldconfig
# install the dependencies
@mtc-20
mtc-20 / Cam_test.py
Created October 3, 2020 19:23
Basic Camera testing and image capturing snippet
import cv2
cap = cv2.VideoCapture(0) # Try 1 for USB cameras
ctr = 0
while True:
ret, frame = cap.read()
if not ret:
print("[WARN] No feed found!")
print("[INFO] Closing...")
@mtc-20
mtc-20 / README-Template.md
Last active October 3, 2020 19:28 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

a cute cat saying hi

A sample screenshot goes here