This file contains hidden or 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
starting_salary = int(input("Enter the starting salary: ")) | |
semi_annual_rise = 0.07 | |
annual_return = 0.04 | |
total_cost = 1000000 | |
portion_down_payment = total_cost * 0.25 | |
months = 36 | |
min_rate = 0 # 0% | |
max_rate = 10000 # 100% |
This file contains hidden or 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
sudo apt-get install zsh | |
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh | |
chsh -s `which zsh` | |
# Restart the terminal | |
# ZSHRC file | |
https://gist.github.com/techedlaksh/4a95495fcdce492713201fd2f9b6c2dd |
This file contains hidden or 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
export DEFAULT_USER="laksh" | |
export TERM="xterm-256color" | |
export ZSH=/home/laksh/.oh-my-zsh | |
POWERLEVEL9K_MODE="awesome-fontconfig" | |
ZSH_THEME="powerlevel9k/powerlevel9k" | |
POWERLEVEL9K_FOLDER_ICON='' | |
#POWERLEVEL9K_HOME_SUB_ICON='$(print_icon HOME_ICON)' |
This file contains hidden or 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
import scipy.io | |
import pandas as pd | |
mat = scipy.io.loadmat('file.mat') | |
mat = {k:v for k, v in mat.items() if k[0] != '_'} | |
data = pd.DataFrame({k: pd.Series(v[0]) for k, v in mat.iteritems()}) | |
data.to_csv("example.csv") |
This file contains hidden or 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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH=/home/laksh/.oh-my-zsh | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
# ZSH_THEME="robbyrussell" |
This file contains hidden or 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
def rotateImage(image, angle): | |
image_center = tuple(np.array(image.shape)[:2]/2) | |
rot_mat = cv2.getRotationMatrix2D(image_center,angle,1.0) | |
result = cv2.warpAffine(image, rot_mat, image.shape[:2],flags=cv2.INTER_LINEAR) | |
return result |
This file contains hidden or 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
conda install -c https://conda.binstar.org/menpo opencv | |
This file contains hidden or 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
sudo add-apt-repository "deb http://archive.canonical.com/ precise partner" | |
sudo apt-get update | |
sudo apt install adobereader-enu | |
######################################## | |
Make Adobe Reader as Default Application | |
sudo gedit /etc/gnome/defaults.list |
This file contains hidden or 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
""" | |
Three ways of computing the Hellinger distance between two discrete | |
probability distributions using NumPy and SciPy. | |
""" | |
import numpy as np | |
from scipy.linalg import norm | |
from scipy.spatial.distance import euclidean | |
This file contains hidden or 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
{"Result":1,"Items":[{"TemplateId":"\"BADGE_BATTLE_ATTACK_WON\"","Badge":{"BadgeType":"BADGE_BATTLE_ATTACK_WON","BadgeRanks":4,"Targets":"\"\\nd\\350\\007\""}},{"TemplateId":"\"BADGE_BATTLE_TRAINING_WON\"","Badge":{"BadgeType":"BADGE_BATTLE_TRAINING_WON","BadgeRanks":4,"Targets":"\"\\nd\\350\\007\""}},{"TemplateId":"\"BADGE_BIG_MAGIKARP\"","Badge":{"BadgeType":"BADGE_BIG_MAGIKARP","BadgeRanks":4,"Targets":"\"\\0032\\254\\002\""}},{"TemplateId":"\"BADGE_CAPTURE_TOTAL\"","Badge":{"BadgeType":"BADGE_CAPTURE_TOTAL","BadgeRanks":4,"Targets":"\"\\036\\364\\003\\320\\017\""}},{"TemplateId":"\"BADGE_EVOLVED_TOTAL\"","Badge":{"BadgeType":"BADGE_EVOLVED_TOTAL","BadgeRanks":4,"Targets":"\"\\003\\024\\310\\001\""}},{"TemplateId":"\"BADGE_HATCHED_TOTAL\"","Badge":{"BadgeType":"BADGE_HATCHED_TOTAL","BadgeRanks":4,"Targets":"\"\\nd\\364\\003\""}},{"TemplateId":"\"BADGE_PIKACHU\"","Badge":{"BadgeType":"BADGE_PIKACHU","BadgeRanks":4,"Targets":"\"\\0032\\254\\002\""}},{"TemplateId":"\"BADGE_POKEDEX_ENTRIES\"","Badge":{"BadgeTy |