Skip to content

Instantly share code, notes, and snippets.

View avivajpeyi's full-sized avatar
🦥

Avi Vajpeyi avivajpeyi

🦥
View GitHub Profile
"""
Match the error with the function
a. TypeError
b. AttributeError
c. IndexError
d. ValueError (error 1)
e. ZeroDivisionError
f. IndentationError
More error types:
from stack import Stack
def lecuture_test_1():
out_string = ""
int_stack = Stack()
int_stack.push(1)
int_stack.push(2)
out_string += f"{int_stack.pop()} , "
int_stack.push(3)
@avivajpeyi
avivajpeyi / waveform_plotting.py
Last active July 1, 2020 06:31
Python script to plot gravitational wave waveforms.
"""Module to plot Gravitational Wave Templates
Can be used to test if a waveform approximant works or not.
"""
from __future__ import division, print_function
import bilby
import matplotlib.pyplot as plt
@avivajpeyi
avivajpeyi / .bash_prompt.sh
Created November 25, 2019 23:37 — forked from miki725/.bash_prompt.sh
Custom bash prompt which displays: (virtualenv) user:/path (git-branch)
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch of the current git/mercurial repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.