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 <stdio.h> | |
#include <iostream> | |
#include "Windows.h" | |
#include "HCNetSDK.h" | |
using namespace std; | |
int saveRecordFile(int userId,char * srcfile,char * destfile) | |
{ | |
int bRes = 1; | |
int hPlayback = 0; | |
if( (hPlayback = NET_DVR_GetFileByName(userId, srcfile, destfile)) =0; nPos = NET_DVR_GetDownloadPos(hPlayback)) |
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
def accessible_to(db, name, table, record_id=0): | |
"""accessible_query inverse | |
parameters: | |
db: DAL instance | |
name: permission name | |
table: table name or table object | |
record_id: record id | |
retorna: Query |
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
echo "SECRET_KEY=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 512 | head -n 1`" > .env |
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
from io import BytesIO | |
import base64 | |
import numpy as np | |
def decode_capture_out_put(data: str) -> np.array: | |
bytes_data = base64.decodebytes(data.encode('utf-8')) | |
stream = BytesIO(bytes_data) | |
return np.load(stream, allow_pickle=True) |