This file contains hidden or 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
| #pip install pandas | |
| import json | |
| from datetime import datetime | |
| import pandas as pd | |
| sheet = [ | |
| { | |
| "face": { | |
| "id": "1", |
This file contains hidden or 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 | |
| url = "rtsp camera url" | |
| cap = cv2.VideoCapture(url) | |
| fourcc = cv2.VideoWriter_fourcc(*'vp80') | |
| fps = cap.get(cv2.CAP_PROP_FPS) | |
| width, height = int(cap.get(3)), int(cap.get(4)) | |
| print(fps,width, height) |
This file contains hidden or 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
| And With good information to COE2k14 | |
| 2) Install : | |
| :~$ sudo apt update && sudo apt install git dkms | |
| :~$ cd Downloads |
This file contains hidden or 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
| const options = { | |
| year: 'numeric', | |
| month: 'numeric', | |
| day: 'numeric', | |
| hour: 'numeric', | |
| minute: 'numeric', | |
| second: 'numeric' | |
| } | |
| new Intl.DateTimeFormat('en-US', options).format(date) //"7/22/2018, 7:22:13 AM" |
This file contains hidden or 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
| from alpine:latest | |
| RUN apk add --no-cache python3-dev \ | |
| && pip3 install --upgrade pip | |
| WORKDIR /app | |
| COPY . /app | |
| RUN pip3 --no-cache-dir install -r requirements.txt |
This file contains hidden or 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
| mongoexport --db meghna --collection recognitions --out recognitions.csv |
This file contains hidden or 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
| from distutils.core import setup | |
| from distutils.extension import Extension | |
| from Cython.Distutils import build_ext | |
| from Cython.Build import cythonize | |
| ext_modules = [ | |
| Extension("test", ["test.py"]), | |
| ] |
This file contains hidden or 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
| #add those in bashrc | |
| export GOROOT=/usr/local/go | |
| export GOPATH=$HOME/go | |
| export PATH=$GOPATH/bin:$GOROOT/bin:$PATH |
This file contains hidden or 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
| curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.7.0rc2/protoc-3.7.0-rc-2-linux-x86_64.zip | |
| # Unzip | |
| unzip protoc-3.7.0-rc-2-linux-x86_64.zip -d protoc3 | |
| # Move protoc to /usr/local/bin/ | |
| sudo mv protoc3/bin/* /usr/local/bin/ | |
| # Move protoc3/include to /usr/local/include/ |
This file contains hidden or 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 | |
| SAVE_DIR = os.path.dirname(os.path.abspath(__file__)) | |
| def base64_to_image(filename): | |
| path = os.path.join(SAVE_DIR, 'images/') | |
| if not os.path.isdir(path): | |
| os.mkdir(path) | |
| data = base64.b64decode(filename) | |
| filename = 'frame' + str(datetime.datetime.now().microsecond) + '.jpg' | |
| destination = "/".join([path, filename]) |