sudo apt update
sudo apt install valgrind
hello_valgrind.c
# With this script you can easily share a folder from your PC to the local network. | |
# The script creates an HTTP server protected by credentials. Basic auth only: encryption certificate not included. | |
# The server stops after a timeout is triggered (default: 1h). | |
# | |
# Example | |
# ------- | |
# python http_server_auth.py --username u53r --password p4Sw0rd --directory ~/Public | |
# | |
# Anyone on the local network can access your Public folder in your home, typing your local address+port in a browser (eg. 157.27.93.172:8000). | |
# |
# Samsung A3 | |
# Front camera: 8 MP, f/2.4, 31mm (standard), AF | |
width: 4128 | |
height: 2322 | |
focal: 3.6 | |
rms: 1.6153361028439144 | |
camera_mtx: |
#!/bin/bash | |
# Tested on | |
# ------------------------------ | |
# OS Ubuntu 18.04 | |
# Platform x86_64, aarch64 | |
# Python 3.6 | |
if [ $# != 1 ]; then | |
echo -e "Usage:\n\t./build_opencv.sh VERSION\n\nExample:\n\t./build_opencv.sh 4.2.0" |
def load_nv12_as_bgr(filename, shape, dtype=np.uint8): | |
with open(filename, "rb") as fp: | |
data = fp.read() | |
image = np.frombuffer(data, dtype=dtype).reshape(shape) | |
image = cv2.cvtColor(image, cv2.COLOR_YUV2BGR_NV12) | |
return image |
#!/bin/bash | |
EXTENSION=$1 | |
PATTERN=$2 | |
grep --include="*.${EXTENSION}" -nRHI "${PATTERN}" * |
function [Y,U,V] = cvtRGB2YUV(R,G,B) | |
R = double(R); | |
G = double(G); | |
B = double(B); | |
Y = 0.257 * R + 0.504 * G + 0.098 * B + 16; | |
U = -0.148 * R - 0.291 * G + 0.439 * B + 128; | |
V = 0.439 * R - 0.368 * G - 0.071 * B + 128; | |
/* | |
* Convert a cv::Mat frame to a QPixmap and show it in a Qt object. | |
* | |
* Parameters | |
* ---------- | |
* frame : cv::Mat | |
* Input image in BGR format. | |
*/ | |
void updateImageFrameToQLabel(cv::Mat& frame) | |
{ |
import sys | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from wordcloud import WordCloud | |
filename = sys.argv[1] | |
print(filename) | |
text = open(filename, "r").read() |