Skip to content

Instantly share code, notes, and snippets.

View hedonhermdev's full-sized avatar

Tirth Jain hedonhermdev

View GitHub Profile
@hedonhermdev
hedonhermdev / lib.rs
Created May 17, 2021 18:59
Iterator Exercises
use std::{char, iter::once};
use itertools::Itertools;
/// Return the dot product of s1 by s2.
///
/// # Example:
///
/// ```
/// use base::dot_product;
"" GENERAL OPTIONS --------------------------------------
filetype indent on " Enable file-type specific indentation
filetype plugin on " Enable plugins
syntax on
set title
" Tab == 4 spaces
@hedonhermdev
hedonhermdev / init.vim
Last active May 21, 2020 10:25
The init.vim I use for NeoVim
"" INIT STUFF----------------------------------------------------------------
filetype indent on
set termguicolors
set mouse=a
set encoding=utf-8
set nohidden
set termguicolors
""" PYTHON
let g:python3_host_prog="/Users/hedonhermdev/VirtualEnvironments/nvim3/bin/python3.8"
import pickle
tables = ['Micro_mstCampus', 'Micro_mstContent', 'Micro_mstContentModule', 'Micro_mstContentModuleItem', 'Micro_mstMicroSite', 'Micro_mstModule', 'Micro_mstTemplate', 'Micro_tblAcademicCampus', 'Micro_tblCampusMenu', 'Micro_tblContentBlock', 'Micro_tblContentModuleMapping', 'Micro_tblGallery', 'Micro_tblMenu', 'Micro_tblModuleRole', 'Micro_tblQuicklinksSEOname', 'Micro_tblSections', 'mstAcademicNavigation', 'mstAcivity', 'mstBanner', 'mstBlock', 'mstCampus', 'mstContent', 'mstContentModule', 'mstContentModuleItem', 'mstModule', 'mstRole', 'mstTemplate', 'mstUser']
with open('db_pickle', 'rb') as pickle_file:
db_list = pickle.load(pickle_file)
def search_db(search_term):
@hedonhermdev
hedonhermdev / .zshrc
Created November 6, 2019 17:48
My .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH="/Users/hedonherm/.local/bin:/anaconda3/bin:/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands"
# Path to your oh-my-zsh installation.
export ZSH="/Users/hedonherm/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@hedonhermdev
hedonhermdev / .zshrc
Created November 6, 2019 17:48
My .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH="/Users/hedonherm/.local/bin:/anaconda3/bin:/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands"
# Path to your oh-my-zsh installation.
export ZSH="/Users/hedonherm/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@hedonhermdev
hedonhermdev / .vimrc
Created November 6, 2019 17:44
My .vimrc
set nocompatible
filetype on
" Setup Vundle
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" plugins
class Signal:
def __init__(self, value, label):
self.value = value
self.label = label
H = Signal(1, "High") # High
L = Signal(0, "Low") # Low