Skip to content

Instantly share code, notes, and snippets.

View aalok-sathe's full-sized avatar

Aalok | आलोक aalok-sathe

View GitHub Profile
@aalok-sathe
aalok-sathe / interleave_dataframes.py
Last active December 6, 2023 22:24 — forked from rob-med/interleave_dataframes.py
Interleaving Multiple Pandas DataFrames of equal length in a round-robin fasion
import pandas as pd
import typing
def interleave_dataframes(dfs: typing.Collection[pd.DataFrame]):
"""
interleaves entries from multiple dataframes of equal size into a single dataframe.
each row is drawn from one of the input dataframes in a round-robin fashion.
modified from: https://gist.github.com/rob-med/9f3f696cb8e174f969ed4ec784317308
modified at: https://gist.github.com/aalok-sathe/6f807f3973440710582aa1518425d3fa
@aalok-sathe
aalok-sathe / dtdotool.sh
Created October 14, 2020 18:03 — forked from craigphicks/dtdotool.sh
Used in Ubuntu 18.04 to manipulate desktops as atomic elements of an array, e.g., swapping element order, inserting and deleting empty elements.
#!/bin/bash
# Copyright (c) 2019, Craig P Hicks
# content licensed as CC BY-NC-SA
# CC BY-NC-SA details at https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
# This program depends upon 'xdotool' installed as Ubuntu 18.04 managed package
# xdotool project source can be found at:
# https://github.com/jordansissel/xdotool
# https://www.semicomplete.com/projects/xdotool/
@aalok-sathe
aalok-sathe / extensions
Last active May 20, 2020 05:32
Extensions Sync
{"timezone@jwendell":{"/org/gnome/shell/extensions/timezone/":"[/]\nconfig={'format24': true, 'showCity': false, 'showTimezone': true}\nenable-working-hours=false\npanel-position='center'\npath-to-people-json='file:///home/aalok/.timezone/people.json'\ntimezones=['America/Detroit']\nworking-hours-end=23\nworking-hours-start=1"},"user-theme@gnome-shell-extensions.gcampax.github.com":{"/org/gnome/shell/extensions/user-theme/":"[/]\nname='Yaru-dark'"},"custom-hot-corners@janrunx.gmail.com":{},"clipboard-indicator@tudmotu.com":{"/org/gnome/shell/extensions/clipboard-indicator/":"[/]\ndisplay-mode=0\nhistory-size=15\nmove-item-first=true\nnotify-on-copy=false\nstrip-text=true"},"OverviewAllWindows@amiller27":{"/org/gnome/shell/extensions/overview-all-windows/":"[/]\nreplace-overview=false"}}
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
@aalok-sathe
aalok-sathe / .vimrc
Last active May 10, 2020 17:13
my vimrc
set nocompatible " be iMproved, required
set number " show line numbers
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@aalok-sathe
aalok-sathe / roster-to-door-decs.py
Created August 19, 2019 22:22
Takes in a CSV file with names/text, one on each line, and sequentially generates ASCII art for each line content, confirming the font for that before fixing the rendered output. Use the fontlist at the beginning of the script to add/remove fonts of your choosing from the `art` python package. Give a ridiculously large number for `howmany` if yo…
#! /usr/bin/env python3
####
# A program to generate door decorations for incoming students based on their
# names using some nice ASCII (a.k.a. computer-generated) art.
# GPL 3+
# (C) 2019 Aalok S.
from art import text2art

Keybase proof

I hereby claim:

  • I am aalok-sathe on github.
  • I am aaloksathe (https://keybase.io/aaloksathe) on keybase.
  • I have a public key ASDxasJkC3KdtX7wp_IxhSgDn-_A7kSgEIwdQkkq2-pVlAo

To claim this, I am signing this object:

@aalok-sathe
aalok-sathe / .bashrc
Last active May 10, 2020 17:14
my bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac