Skip to content

Instantly share code, notes, and snippets.

View ycheng517's full-sized avatar

Yifei Cheng ycheng517

View GitHub Profile
@m1k1o
m1k1o / ubuntu-cuda-gstreamer.Dockerfile
Last active August 3, 2025 19:07
Ubuntu Cuda Gstreamer Dockerfile (with nvcodec support)
ARG UBUNTU_RELEASE=20.04
ARG CUDA_VERSION=11.4.2
ARG GSTREAMER_VERSION=1.22
#
# Stage 1
#
FROM nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_RELEASE} AS gstreamer-builder
ARG GSTREAMER_VERSION
@minhhieutruong0705
minhhieutruong0705 / OpenCV_Build-Guide.md
Last active November 8, 2025 18:32
Guide to build OpenCV from Source with GPU support (CUDA and cuDNN)

Guide to build OpenCV from source with GPU support (CUDA and cuDNN)

Feb 22nd, 2022

System specification

  • Operating system: Ubuntu 20.04 x84_64 (64-bit)
  • Architecture: amd64
  • GPU: NVIDIA GeForce RTX 3090
  • Python 3.8

Install dependencies and recommeneded packages

@xiaket
xiaket / lifecycle_policy.json
Last active November 15, 2024 09:58
ECR Lifecycle Policy example with explanations
{
"rules": [
{
"rulePriority": 10,
"description": "For `latest` tag, keep last 5 images",
"selection": {
"tagStatus": "tagged",
"tagPrefixList": ["latest"],
"countType": "imageCountMoreThan",
"countNumber": 5
@ialhashim
ialhashim / fitting3D.cpp
Created November 14, 2014 23:17
Fitting 3D points to a plane or a line
template<class Vector3>
std::pair<Vector3, Vector3> best_plane_from_points(const std::vector<Vector3> & c)
{
// copy coordinates to matrix in Eigen format
size_t num_atoms = c.size();
Eigen::Matrix< Vector3::Scalar, Eigen::Dynamic, Eigen::Dynamic > coord(3, num_atoms);
for (size_t i = 0; i < num_atoms; ++i) coord.col(i) = c[i];
// calculate centroid
Vector3 centroid(coord.row(0).mean(), coord.row(1).mean(), coord.row(2).mean());
@RustingSword
RustingSword / fitPlane.py
Created September 7, 2014 12:33
least square plane fitting of 3d points
import numpy as np
import scipy.optimize
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.gca(projection='3d')
def fitPlaneLTSQ(XYZ):