This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from scipy.io import wavfile | |
import scipy.signal as sps | |
import numpy as np | |
if __name__ == '__main__': | |
dir = 'train/audio/' | |
newdir = 'trainnew/audio/' | |
files = os.listdir(dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import numpy as np | |
import scipy.io.wavfile | |
import scipy.signal | |
if __name__ == '__main__': | |
dir = 'test/audio/' | |
newdir = 'testnew/audio/' | |
files = os.listdir(dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install dependencies | |
sudo apt install curl wget git | |
# Install zsh and oh-my zsh | |
sudo apt install zsh | |
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | |
# Install Spaceship theme | |
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1 | |
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python dependencies | |
sudo apt install python3-dev python3-pip | |
pip3 install numpy | |
pip3 install opencv-python | |
pip3 install blosc | |
pip3 install scikit-image | |
pip3 install torch==1.7.0 torchvision==0.8.0 | |
pip3 install face_alignment | |
pip3 install pyzmq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import os | |
desired_size = (540,960) | |
path = "" | |
path2 = "" | |
files = os.listdir(path) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include "timer.h" | |
#include "check.h" | |
#define SOFTENING 1e-9f | |
/* | |
* Each body contains x, y, and z coordinate positions, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@apiVersion": "1.0", | |
"name": "InferencingWithHttpExtension", | |
"properties": { | |
"description": "Analyzing live video using HTTP Extension to send images to an external inference engine", | |
"parameters": [ | |
{ | |
"name": "rtspUrl", | |
"type": "String", | |
"description": "rtsp Url" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CUDA | |
export PATH=/usr/local/cuda-10.1/bin${PATH:+:${PATH}} | |
export CUDA_PATH=/usr/local/cuda-10.1 | |
export CUDA_HOME=/usr/local/cuda-10.1 | |
export LIBRARY_PATH=$CUDA_HOME/lib64:$LIBRARY_PATH | |
export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} | |
export LD_LIBRARY_PATH=/usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH | |
export NVCC=/usr/local/cuda-10.1/bin/nvcc | |
export CFLAGS="-I$CUDA_HOME/include $CFLAGS" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ffmpeg -i video.mp4 -v 0 -vcodec mpeg4 -f mpegts udp://192.168.0.101:23000 | |
import os | |
cap = cv2.VideoCapture('udp://192.168.0.101:23000?overrun_nonfatal=1&fifo_size=50000000') | |
# cap = cv2.VideoCapture('rtsp://192.168.0.101') | |
os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"] = "udp_transport;0" | |
# os.environ["OPENCV_FFMPEG_CAPTURE_OPTIONS"] = "rtsp_transport;0" | |
while cap.isOpened(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import signal | |
import sys | |
def signal_handler(signal, frame): | |
# Perform your actions here | |
print('Ctrl+c occured') | |
signal.signal(signal.SIGINT, signal_handler) |
NewerOlder