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
phrase = input("Type in: ") | |
phrase = list(phrase) | |
u, l = 0, 0 | |
for i in phrase: | |
if i.isupper(): | |
u = u + 1 | |
if i.islower(): | |
l = l + 1 | |
else: |
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
#Write a program which will find all such numbers which are divisible | |
# by 7 but are not a multiple of 5, | |
#between 2000 and 3200 (both included). | |
#The numbers obtained should be printed in a comma-separated sequence | |
#on a single line. | |
by7_notby5 = [i for i in range(2000, 3201) if (i % 7 == 0) and (i % 5 != 0)] | |
print(by7_notby5) |
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 math | |
x, y = 0, 0 | |
while True: | |
step = input("Type in UP/DOWN/LEFT/RIGHT #step number: ") | |
if step == "": | |
break |
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 math | |
x, y = 0, 0 | |
while True: | |
step = input("Type in UP/DOWN/LEFT/RIGHT #step number: ") | |
if step == "": | |
break |
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
Pre-Reqs | |
--- | |
1) CDK | |
2) NPM | |
3) A Github repository | |
1. Run this command | |
export CDK_NEW_BOOTSTRAP=1 | |
npx cdk bootstrap aws://<YOUR_ACCONT_ID>/<YOUR_REGION> --cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess aws://<YOUR_ACCONT_ID>/<YOUR_REGION> |
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
Pre-Reqs | |
--- | |
1) CDK | |
2) NPM | |
3) A Github repository | |
1. Run this command | |
export CDK_NEW_BOOTSTRAP=1 | |
npx cdk bootstrap aws://<YOUR_ACCONT_ID>/<YOUR_REGION> --cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess aws://<YOUR_ACCONT_ID>/<YOUR_REGION> |
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
# Assumes that subscription manager has been registered and repos added | |
sudo yum -y install wget git net-tools bind-utils iptables-services bridge-utils bash-completion kexec-tools sos psacct | |
sudo yum -y update | |
sudo yum -y install atomic-openshift-utils | |
sudo yum -y install docker |
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
apt-get update && apt-get install -y apt-transport-https curl | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list | |
deb https://apt.kubernetes.io/ kubernetes-stretch main | |
EOF | |
apt-get update | |
apt-get install -y kubelet kubeadm kubectl | |
apt-mark hold kubelet kubeadm kubectl |
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
# Install Docker from Ubuntu's repositories: | |
sudo apt-get update | |
sudo apt-get install -y docker.io | |
# or install Docker CE 18.06 from Docker's repositories for Ubuntu or Debian: | |
## Install prerequisites. | |
sudo apt-get update && apt-get install apt-transport-https ca-certificates curl software-properties-common -y | |
## Download GPG key. |