Skip to content

Instantly share code, notes, and snippets.

View adhiraj2001's full-sized avatar

Adhiraj Deshmukh adhiraj2001

View GitHub Profile
@adhiraj2001
adhiraj2001 / colmap2poses.py
Created December 18, 2023 05:08 — forked from Sazoji/colmap2poses.py
colmap2poses is simple! make sure you have opencv (and rembg if you wish to mask). The only thing required is a path to the dataset folder, containing a "images" subfolder. Avoid weird filenames.
# most of the code is refactored colmap parsing from LLFF, a GPLv3 project.
# this is meant to be comparable to instant-ngp's colmap2nerf.py, and uses the
# same arguments, with additional functions for masking and LLFF format poses.
# LLFF format .npy files will always be made, remove if you ONLY want NeRF format
#~~~provide a dataset folder path with another "image" subfolder with the pics~~~
# ~~~colmap can be installed to PATH or linked as an argument (--colmap_path)~~~
# usage: (for LLFF format, nvdiffrec)
# colmap2poses.py --mask "/path/to/dataset/"
@adhiraj2001
adhiraj2001 / Guide to setup the homeserver from scratch (Lucy).md
Created September 20, 2023 19:34
Guide to setup the homeserver from scratch (Lucy)

Guide to setup the homeserver from scratch

calibre-web

    calibre-web:
        image: lscr.io/linuxserver/calibre-web:amd64-latest
        container_name: calibre-web
        environment:
            - PUID=1000
 - PGID=1000
@adhiraj2001
adhiraj2001 / Info.md
Created September 11, 2023 10:51 — forked from tdgunes/Info.md
ExampleAgent for Genius 7.1.6
@adhiraj2001
adhiraj2001 / flick.lua
Created September 8, 2023 19:55 — forked from byhemechi/flick.lua
Logitech Mouse Flick Lua script
function OnEvent(event, arg)
if (event == "MOUSE_BUTTON_PRESSED" and arg == 3) then
distance = 512
Sleep(200)
MoveMouseRelative(-distance, 0)
Sleep(500)
MoveMouseRelative(distance, 0)
PressAndReleaseMouseButton(1)
MoveMouseRelative(distance, 0)
Sleep(500)
@adhiraj2001
adhiraj2001 / hand-modify-pdf.md
Created September 5, 2023 08:11 — forked from senderle/hand-modify-pdf.md
So you want to modify the text of a PDF by hand

So you want to modify the text of a PDF by hand...

If you, like me, resent every dollar spent on commercial PDF tools, you might want to know how to change the text content of a PDF without having to pay for Adobe Acrobat or another PDF tool. I didn't see an obvious open-source tool that lets you dig into PDF internals, but I did discover a few useful facts about how PDFs are structured that I think may prove useful to others (or myself) in the future. They are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.

@adhiraj2001
adhiraj2001 / yaycache
Created August 25, 2023 16:49 — forked from albertored11/yaycache
Script and hook to clean pacman and yay cache
#!/usr/bin/env bash
# Assuming yay is run by user with UID 1000
admin="$(id -nu 1000)"
cachedir="/home/$admin/.cache/yay"
removed="$(comm -23 <(basename -a $(find $cachedir -mindepth 1 -maxdepth 1 -type d) | sort) <(pacman -Qqm) | xargs -r printf "$cachedir/%s\n")"
# Remove yay cache for foreign packages that are not installed anymore
rm -rf $removed
@adhiraj2001
adhiraj2001 / tmux-cheatsheet.markdown
Created August 18, 2023 10:14 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@adhiraj2001
adhiraj2001 / grokking_to_leetcode.md
Created July 5, 2023 03:47 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@adhiraj2001
adhiraj2001 / programming-as-theory-building.md
Created March 5, 2023 07:35 — forked from onlurking/programming-as-theory-building.md
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct