Skip to content

Instantly share code, notes, and snippets.

View heethesh's full-sized avatar

Heethesh Vhavle heethesh

View GitHub Profile
key-mon --backgroundless -t oblivion --scale 2
import numpy as np
import open3d as o3d
from tqdm import tqdm
def visualize_sequence(args):
# Setup for Open3D visualization.
first = True
pcd = o3d.geometry.PointCloud()
visualizer = o3d.visualization.Visualizer()
visualizer.create_window('Point Cloud Visualizer')
@heethesh
heethesh / ffmpeg_utils.sh
Last active September 17, 2021 23:02
FFMPEG Commands
# Convert sequences images to video
ffmpeg -f image2 -r 10 -i folder/%*.png -vb 100M -codec:v libx264 output.mp4
ffmpeg -framerate 10 -i folder/%06d.png -vb 100M -codec:v libx264 output.mp4
ffmpeg -r 10 -i folder/%06d.png -vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,format=yuv420p" -codec:v libx264 output.mp4
# 2x2 grid from videos
ffmpeg -i 1.mp4 -i 2.mp4 -i 3.mp4 -i 4.mp4 -filter_complex "[0:v][1:v]hstack[top];[2:v][3:v]hstack[bottom];[top][bottom]vstack,format=yuv420p[v]" -map "[v]" output.mp4
# Horizontal stack videos
ffmpeg -i input0.mp4 -i input1.mp4 -filter_complex hstack=inputs=2 horizontal-stacked-output.mp4
@heethesh
heethesh / terminator-config
Last active February 4, 2024 06:20
Terminator Config
[global_config]
dbus = False
focus = system
handle_size = 4
inactive_color_offset = 1.0
inactive_bg_color_offset = 0.6
enabled_plugins = LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
suppress_multiple_term_dialog = True
[keybindings]
[profiles]
@heethesh
heethesh / mailer.py
Last active May 5, 2020 09:26
Script to email the system's public IP address
#!/usr/bin/python
import smtplib
from requests import get
TO = 'TO_EMAIL_ID' ###### <---- UPDATE
FROM = 'FROM_EMAIL_ID' ###### <---- UPDATE
# Get public IP
ip = get('https://api.ipify.org').text
@heethesh
heethesh / monokai.json
Last active October 29, 2020 19:09
Monokai theme for Windows Terminal
"fontFace" : "Ubuntu Mono",
"fontSize" : 12,
"colorScheme": "Monokai",
"copyOnSelect": true,
"confirmCloseAllTabs": false
"schemes":
[
{
"name": "Monokai",
@heethesh
heethesh / monokai_terminal_profile
Created April 3, 2019 21:29
Gnome Terminal Profile - Monokai Theme
[/]
foreground-color='rgb(248,248,242)'
palette=['rgb(39,40,34)', 'rgb(249,38,114)', 'rgb(117,158,34)', 'rgb(253,151,31)', 'rgb(102,217,239)', 'rgb(174,129,255)', 'rgb(230,219,116)', 'rgb(117,113,94)', 'rgb(39,40,34)', 'rgb(249,38,114)', 'rgb(166,226,46)', 'rgb(253,151,31)', 'rgb(102,217,239)', 'rgb(174,129,255)', 'rgb(230,219,116)', 'rgb(117,113,94)']
use-system-font=false
use-custom-command=false
use-theme-colors=false
use-transparent-background=true
font='Ubuntu Mono 13'
use-theme-transparency=false
bold-color-same-as-fg=true
gsettings set com.canonical.Unity integrated-menus true
gsettings set com.canonical.Unity.Launcher favorites "['unity://running-apps', 'unity://devices', 'application://gnome-terminal.desktop', 'application://google-chrome.desktop', 'application://org.gnome.Nautilus.desktop', 'application://gedit.desktop', 'application://sublime_text.desktop', 'application://unity-control-center.desktop', 'application://gnome-system-monitor.desktop']"
import os
import sys
def block_printing(func):
def func_wrapper(*args, **kwargs):
# Block all printing to the console
sys.stdout = open(os.devnull, 'w')
sys.stderr = open(os.devnull, 'w')
# Function call
@heethesh
heethesh / bashrc.sh
Last active September 15, 2020 07:59
Bash RC Extensions
# Terminal logs
test "$(ps -ocommand= -p $PPID | awk '{print $1}')" == 'script' || (script -f $HOME/.terminal_logs/$(date +"%d-%b-%y_%H-%M-%S")_terminal.log)
# Same pwd new terminal tab
# Save current working dir
PROMPT_COMMAND='pwd > "${HOME}/.cwd"'
# Change to saved working dir
[[ -f "${HOME}/.cwd" ]] && cd "$(< ${HOME}/.cwd)"
# CUDA