Skip to content

Instantly share code, notes, and snippets.

View vietanhdev's full-sized avatar
🎯
Work Hard. Build More. Share Your Story.

Viet-Anh NGUYEN (Andrew) vietanhdev

🎯
Work Hard. Build More. Share Your Story.
View GitHub Profile
@vietanhdev
vietanhdev / ch.mj
Created November 23, 2023 02:14
ch.mj
import time
from python import Python
@register_passable("trivial")
struct Move:
var i: Int
var j: Int
var prom: Int
fn __init__(i: Int, j: Int, prom: Int) -> Move:
@vietanhdev
vietanhdev / create_users.py
Created March 29, 2023 04:04
Create ubuntu users with python
import os
users = """
john
dummy
vietanhdev
"""
for user in users.split("\n"):
user = user.strip()
if user:
@vietanhdev
vietanhdev / index.html
Created September 18, 2022 05:06
MediaPipe - Pose
<body>
<style>
.square-box {
width: 33%;
height: 0;
padding-top: 33%;
position: absolute;
right: 20px;
top: 20px;
}
@vietanhdev
vietanhdev / install_opencv.sh
Created September 17, 2021 00:56
Install OpenCV on Ubuntu 18.04
######################################
# INSTALL OPENCV ON UBUNTU OR DEBIAN #
######################################
# -------------------------------------------------------------------- |
# SCRIPT OPTIONS |
# ---------------------------------------------------------------------|
OPENCV_VERSION='4.5.1' # Version to be installed
OPENCV_CONTRIB='YES' # Install OpenCV's extra modules (YES/NO)
# -------------------------------------------------------------------- |
@vietanhdev
vietanhdev / install_realvnc_server.sh
Last active December 4, 2023 15:57
Install RealVNC Ubuntu - Raspberry Pi 4
#!/bin/bash
mkdir realvncserversetup && cd realvncserversetup
echo Add armhf arch
sudo dpkg --add-architecture armhf && sudo apt update
echo Download and install RealVNC server
wget -nv https://downloads.realvnc.com/download/file/vnc.files/VNC-Server-6.11.0-Linux-ARM.deb && sudo apt install ./VNC-Server-6.11.0-Linux-ARM.deb
echo Download and install dependencies
@vietanhdev
vietanhdev / main.cpp
Last active August 12, 2024 00:59
C++ OpenCV Image classification from ONNX model
#include <chrono>
#include <cmath>
#include <exception>
#include <fstream>
#include <iostream>
#include <limits>
#include <numeric>
#include <opencv2/dnn/dnn.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/imgproc.hpp>
@vietanhdev
vietanhdev / build-apollo.md
Created February 16, 2021 11:17 — forked from tinntt/build-apollo.md
Build Apollo 2.5 with visualizer
@vietanhdev
vietanhdev / sh
Last active January 17, 2021 18:42
Ubuntu setup
sudo apt update && sudo apt full-upgrade
sudo apt install -y p7zip-full unrar gparted wget build-essential curl git
# Java
sudo apt install default-jre
# Email
snap install mailspring