Skip to content

Instantly share code, notes, and snippets.

View simin75simin's full-sized avatar

simin75simin

View GitHub Profile
@simin75simin
simin75simin / CMakeLists.txt
Created December 9, 2021 02:14
hxfr cmake modified
# also change 3dscan path in 430 dir
# also copy dj's 430 dir if needed
cmake_minimum_required(VERSION 2.8.12)
project(hxfr C CXX)
set(PROJECT_VERSION_MAJOR 0)
set(PROJECT_VERSION_MINOR 5)
set(PROJECT_VERSION_PATCH 0)
set(PROJECT_VERSION_TWEAK 0)
@simin75simin
simin75simin / 52-himax-usb-camera-sensor.rules
Created December 9, 2021 02:23
device rules modification template
# Himax CX3 USB dongle - NIR/Depth 940 gray camera sensor
SUBSYSTEM=="usb", ATTR{idVendor}=="<uid>", ATTR{idProduct}=="<gid>", MODE:="0666", OWNER:="root", GROUP:="root"
# Himax CX3 USB dongle - RGB color camera sensor
#SUBSYSTEM=="usb", ATTR{idVendor}=="1080", ATTR{idProduct}=="1245", MODE:="0666", OWNER:="root", GROUP:="video"
@simin75simin
simin75simin / clear.sh
Created December 9, 2021 02:37
3DScan directory cleaning program
rm -rf /home/<username>/3DScan/depth
rm -rf /home/<username>/3DScan/color
mkdir /home/<username>/3DScan/depth
mkdir /home/<username>/3DScan/color
from tqdm import tqdm
import subprocess
import sys
import os
from multiprocessing import Pool, cpu_count, Manager
from time import perf_counter
if len(sys.argv) != 3:
print('usage: gen_res.py /path/to/image /path/to/output')
@simin75simin
simin75simin / pointcloud_align_pair.py
Last active June 5, 2022 08:01
pointcloud verifier
from icecream import ic
import open3d as o3d
import sys
import os
import numpy as np
import pickle
from copy import deepcopy
if len(sys.argv) != 4:
# base folder, image 1, image 2
@simin75simin
simin75simin / lemmy_top_comment.js
Created September 20, 2023 11:49
lemmy show top comment userscript
// ==UserScript==
// @name lemmy show top comment
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @include https://lemmy.*/post*
// @icon https://www.google.com/s2/favicons?sz=64&domain=lemmy.world
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
@simin75simin
simin75simin / euler271.ipynb
Last active June 10, 2024 13:00
solves projectEuler 271
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@simin75simin
simin75simin / peoeis.ipynb
Last active August 4, 2024 10:04
PE-oeis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@simin75simin
simin75simin / my_agent.py
Created October 11, 2024 13:11
simple 2048 agent with 80 percent winrate by simulation
# to use, pip install gymnasium-2048 first then replace the second file in the package
from typing import List
import gymnasium as gym
from tqdm import trange
import numpy as np
np.random.seed(0)
import pandas as pd
from copy import deepcopy
from multiprocessing import Pool, cpu_count
@simin75simin
simin75simin / vim-social-media.js
Created October 27, 2024 07:36
vim keybindings to navigate social media (currently 9gag, new reddit). j to go down, k to go up, l to like, d to downvote.
// ==UserScript==
// @name Post Navigation with J, K, L, and D (Reddit & 9GAG)
// @namespace http://tampermonkey.net/
// @version 1.3
// @description Use J and K keys to navigate, L to like, and D to downvote posts on Reddit (new layout) and 9GAG
// @match https://www.reddit.com/*
// @match https://9gag.com/*
// @grant none
// ==/UserScript==