This file contains 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
alias kc='kubectl' | |
alias kclf='kubectl logs --tail=200 -f' | |
alias kcgs='kubectl get service -o wide' | |
alias kcgd='kubectl get deployment -o wide' | |
alias kcgp='kubectl get pod -o wide' | |
alias kcgn='kubectl get node -o wide' | |
alias kcdp='kubectl describe pod' | |
alias kcds='kubectl describe service' | |
alias kcdd='kubectl describe deployment' | |
alias kcdf='kubectl delete -f' |
This file contains 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 unittest | |
def find_rotation_point(words): | |
first_word = words[0] | |
floor_index = 0 | |
ceiling_index = len(words) - 1 | |
while floor_index < ceiling_index: | |
This file contains 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 highest_product_of_3(list_of_ints): | |
if len(list_of_ints) < 3: | |
raise ValueError('Less than 3 items!') | |
# We're going to start at the 3rd item (at index 2) | |
# so pre-populate highests and lowests based on the first 2 items. | |
# We could also start these as None and check below if they're set | |
# but this is arguably cleaner | |
highest = max(list_of_ints[0], list_of_ints[1]) |
This file contains 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 unittest | |
def merge_lists(my_list, alices_list): | |
merged_list_size = len(my_list) + len(alices_list) | |
merged_list = [None] * merged_list_size | |
current_index_alices = 0 | |
current_index_mine = 0 | |
current_index_merged = 0 |