Skip to content

Instantly share code, notes, and snippets.

View suprnrdy's full-sized avatar

suprnrdy suprnrdy

View GitHub Profile
@suprnrdy
suprnrdy / decodeAxioma.js
Created March 25, 2022 04:27 — forked from Alkarex/decodeAxioma.js
Node-RED function to decode Axioma water meter payloads.
/* jshint esversion:6, bitwise:false, node:true, strict:true */
/* globals msg */
"use strict";
/**
* Node-RED function to decode Axioma water meter payloads.
* Example assuming that msg.req.body contains an HTTP POST callback from The Things Networks.
*/
function statusAxiomaShort(s) {
const messages = [];
{
"SX130x_conf": {
"spidev_path": "/dev/spidev0.0",
"lorawan_public": true,
"clksrc": 0,
"antenna_gain": 0, /* antenna gain, in dBi */
"full_duplex": false,
"precision_timestamp": {
"enable": false,
"max_ts_metrics": 255,
@suprnrdy
suprnrdy / smooth_pose_data.py
Created January 18, 2020 06:25 — forked from smeschke/smooth_pose_data.py
Smooth Pose Estimation Data
import pandas as pd
import numpy as np
import cv2, os
import scipy
from scipy import signal
import csv
circle_color, line_color = (255,255,0), (0,0,255)
window_length, polyorder = 13, 2
sd = "workout"
@suprnrdy
suprnrdy / swap_body_parts.py
Created January 18, 2020 06:25 — forked from smeschke/swap_body_parts.py
Ensure that body parts are always in the right places
import pandas as pd
import numpy as np
import cv2, os
import csv
input_source = "/home/stephen/Desktop/me.MP4"
cap = cv2.VideoCapture(input_source)
frame_number = 0
font, scale, colorText, thick = cv2.FONT_HERSHEY_SIMPLEX, .5, (234,234,234), 1
size, color, thickness = 5, (255,255,255), 5
@suprnrdy
suprnrdy / save_pose_data.py
Created January 18, 2020 06:25 — forked from smeschke/save_pose_data.py
Saving pose data from video using OpenPose
import cv2, numpy as np, csv
#https://github.com/opencv/opencv/blob/master/samples/dnn/openpose.py
outfile_path = '/home/stephen/Desktop/workout.csv'
protoFile = "/home/stephen/pose/mpi/pose_deploy_linevec_faster_4_stages.prototxt"
weightsFile = "/home/stephen/pose/mpi/pose_iter_160000.caffemodel"
net = cv2.dnn.readNetFromCaffe(protoFile, weightsFile)
data, input_width, input_height, threshold, frame_number = [], 368, 386, 0.1, 0

Keybase proof

I hereby claim:

  • I am suprnrdy on github.
  • I am suprnrdy (https://keybase.io/suprnrdy) on keybase.
  • I have a public key ASDjLy8rwFmgXBRZLaaKL0MvOoOunDme25DVH0dvVc4L_Ao

To claim this, I am signing this object:

@suprnrdy
suprnrdy / excavator-driver.py
Created January 5, 2018 19:19 — forked from YoRyan/excavator-driver.py
Cross-platform controller for NiceHash Excavator for Nvidia.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Cross-platform controller for NiceHash Excavator for Nvidia."""
# Example usage:
# $ excavator -p 3456 &
# $ sleep 5
# $ python3 excavator-driver.py
@suprnrdy
suprnrdy / states_hash.json
Created March 17, 2016 00:28 — forked from mshafrir/states_hash.json
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",