Skip to content

Instantly share code, notes, and snippets.

View chunibyo-wly's full-sized avatar
🏠
Working from home

Longyong Wu chunibyo-wly

🏠
Working from home
View GitHub Profile
@ebraminio
ebraminio / mingw-w64-x86_64.cmake
Last active October 24, 2024 23:55 — forked from peterspackman/mingw-w64-x86_64.cmake
cmake toolchain file for mingw-w64 x86_64 builds on Ubuntu
# Sample toolchain file for building for Windows from an Ubuntu Linux system.
#
# Typical usage:
# *) install cross compiler: `sudo apt-get install mingw-w64` or `brew install mingw-w64` on macOS
# *) cmake -DCMAKE_TOOLCHAIN_FILE=~/mingw-w64-x86_64.cmake -G Ninja -B build -S .
# *) ninja -C build
set(CMAKE_SYSTEM_NAME Windows)
set(TOOLCHAIN_PREFIX x86_64-w64-mingw32)
@andelf
andelf / crop-blue30.py
Last active April 12, 2024 12:56
Generate Chinese font for waveshare-epd
from PIL import Image, ImageDraw, ImageFont, ImageFilter
im = Image.open("./blue30.png")
POS = (1, 4)
X = POS[0] * 80
Y = POS[1] * 80
im1 = im.crop((X, Y, X + 30, Y + 30))
@travishsu
travishsu / coco2labelme.py
Last active July 19, 2024 01:51
Convert COCO format segmentation annotation to LabelMe format
import os
import json
import subprocess
import numpy as np
import pandas as pd
from skimage.measure import find_contours
class CocoDatasetHandler:
def __init__(self, jsonpath, imgpath):
@rikumi
rikumi / iconsur.sh
Last active October 24, 2023 06:46
My personal iconsur setup
# See https://github.com/rikumi/iconsur
yarn global add iconsur
sudo iconsur set /Applications/Android\ File\ Transfer.app -k Airdroid
sudo iconsur set /Applications/Android\ Studio.app/ -l -c 7a5 -s 0.8
sudo iconsur set /Applications/DaisyDisk.app/ -l
sudo iconsur set /Applications/Decompressor.app/ -l
sudo iconsur set /Applications/Discord.app/
sudo iconsur set /Applications/Google\ Chrome.app/
sudo iconsur set /Applications/IINA.app/ -l -c 161d22
@shubhamwagh
shubhamwagh / TexturedMeshSteps.md
Last active October 9, 2024 09:32
Steps to create textured mesh from point cloud using Meshlab

Steps to create Textured Mesh from Point Cloud using Meshlab

Get your PointCloud into MeshLab

  • Import the pointcloud file in ".ply" file format in Meshlab. Before importing make sure you do some pre-processing / cleaning on point cloud so as to ease the process of meshing.

Point Cloud Simplification and Normals Computation

  • Next we need to reduce the number of point samples for smooth meshing.
    • So go to Filters -> Point Set -> Point Cloud Simplification. Enter Number of samples circa 5% of original number of points. Make sure Best Sample Heuristic is checked.
  • After point cloud simplification, make sure to select Simplified point cloud in the Show Layer Dialog on the right hand side. If not visible, it can be opened by navigating to View -> Show Layer Dialog. Now we need to compute normals for point set.
  • So go to Filters -> Point Set -> Compute normals for point sets . Enter Neighbour num between 10 - 100. Initially try with 10 and
@mrnkr
mrnkr / prod-cons.swift
Created October 24, 2018 01:54
Producer-Consumer problem implemented in Swift using Semaphores
import UIKit
class Semaphore {
var n: Int
init(n: Int) {
self.n = n
}
func P() {
@WesThorburn
WesThorburn / 1.Instructions.md
Last active September 11, 2024 07:17
Linux: Compile C++ to WebAssembly and JavaScript using Emscripten and CMake

Linux: Compile C++ to WebAssembly and JavaScript using Emscripten and CMake

Download and Install Emscripten

  • My preferred installation location is /home/user
  • Get the latest sdk: git clone https://github.com/emscripten-core/emsdk.git
  • Enter the cloned directory: cd emsdk
  • Checkout main: git checkout main
  • Install the lastest sdk tools: ./emsdk install latest
  • Activate the latest sdk tools: ./emsdk activate latest
  • Activate path variables: source ./emsdk_env.sh
@ihipop
ihipop / frp systemd.md
Last active November 5, 2024 02:15
FRP systemd 启动脚本 FRP systemd init config
@assafrabin
assafrabin / ply2obj.py
Last active December 7, 2023 03:07 — forked from randomize/ply2obj.py
Python script to convert *.ply to *.obj (3D formats)
"""
Simple script to convert ply to obj models
"""
import os
from argparse import ArgumentParser
from plyfile import PlyData
def parse_args():
import bpy
import bmesh
import numpy as np
import time
import os
import colorsys
import random
import yaml
import sys