Skip to content

Instantly share code, notes, and snippets.

View adhiraj2001's full-sized avatar

Adhiraj Deshmukh adhiraj2001

View GitHub Profile
@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)
@byhemechi
byhemechi / flick.lua
Last active September 13, 2023 16:56
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)
@kyo-takano
kyo-takano / few-shot-learning-on-function-calling.ipynb
Last active January 9, 2024 17:41
few-shot-learning-on-function-calling.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@denguir
denguir / cuda_install.md
Last active July 23, 2024 20:00
Installation procedure for CUDA & cuDNN

How to install CUDA & cuDNN on Ubuntu 22.04

Install NVIDIA drivers

Update & upgrade

sudo apt update && sudo apt upgrade

Remove previous NVIDIA installation

@TheProjectsGuy
TheProjectsGuy / csinteractive.sh
Last active October 23, 2023 08:15
A helpful SLURM utility. Get node allocation using salloc and run an interactive shell session on it. This, plus many more bells and whistles.
#!/bin/bash
# Copyright (C) 2022 Avneesh Mishra - GNU GPLv3
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@Sazoji
Sazoji / colmap2poses.py
Last active December 18, 2023 05:08
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/"
# Creating Nodes for intensities
def buildNodes(self):
for key in self.prob_dict:
leaf = Node(key, self.prob_dict[key], 1)
self.allNodes.append(leaf)
# comparator function for sorting
def prob_key(self, e):
return e.prob
@fuadnafiz98
fuadnafiz98 / transparent.vim
Last active April 18, 2023 07:26
vim transparent background
" for transparent background
function! AdaptColorscheme()
highlight clear CursorLine
highlight Normal ctermbg=none
highlight LineNr ctermbg=none
highlight Folded ctermbg=none
highlight NonText ctermbg=none
highlight SpecialKey ctermbg=none
highlight VertSplit ctermbg=none
highlight SignColumn ctermbg=none
@albertored11
albertored11 / yaycache
Last active August 25, 2023 16:49
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
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active July 25, 2024 17:06
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