sudo apt update && sudo apt upgrade
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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.
NewerOlder