AWS Learn VPC (* only missing concept is NACL)

Learn Terraform (* module )

When AWS creates the default VPC, it:

  • Creates a VPC with a size /16 IPv4 CIDR block (172.31.0.0/16). This provides up to 65,536 private IPv4 addresses.
  • Creates a size /20 default subnet in each Availability Zone. This provides up to 4,096 addresses per subnet, a few of which are reserved for our use.
  • Creates an internet gateway and connect it to your default VPC.
  • Creates a main route table for your default VPC with a rule that sends all IPv4 traffic destined for the internet to the internet gateway.
  • Creates a default security…

Type code   C Type             Minimum size in bytes
'b' signed integer 1
'B' unsigned integer 1
'u' Unicode character 2 (see note)
'h' signed integer 2
'H' unsigned integer 2
'i' signed integer 2
'I' unsigned integer 2
'l' signed integer 4
'L' unsigned integer 4
'q' signed integer 8 (see note)
'Q' unsigned integer 8 (see note)
'f' floating point 4
'd' floating point 8
NOTE: The 'u' typecode corresponds to Python's unicode character. On
narrow builds this is 2-bytes on wide builds this is 4-bytes.

NOTE: The 'q' and 'Q' type codes are only available if the platform
C compiler used to build Python supports 'long long', or, on Windows,
'__int64'.


This article is focused on the type of machine learning where we build models in order to make predictions on new data called predictive modeling.

Model = Algorithms(Data)

There is also error (e) that is independent of the input data (X).

Y = f(X) + e

This error might be error such as not having enough attributes to sufficiently characterize the best mapping from X to Y . This error is called irreducible error because no matter how good we get at estimating the target function (f), we cannot reduce this error. This is to say, that the problem of…


A question to keep in mind is what kind of defects would this test catch. If each test is written thoughtfully to improve software reliability, and if tests are removed when they no longer have value then the specific testing approach that delivers the most value for a particular project will be discovered over time.

In summary:
• Keep regression tests around for up to a year — but most of
those will be system-level tests rather than unit tests.
• Keep unit tests that test key algorithms for which there is a
broad, formal, independent oracle of correctness, and for
which there is ascribable…


The instructions below are for mac

It’s recommended to use python virtual environment when working on python project. Couple of important reasons

not populate the default python (yes, most operating systems installation come with python builtin). this can potentially break programs that depend on python

to isolate your project with correct versions of libraries/dependencies

python -V
brew install pyenv
pyenv install 3.8.2
pyenv local 3.8.2

# should return 3.8.2
python -V

mkdir pydo
python -m venv venv380
source venv380/bin/activate
#ready for devpython -m venv env
source env/bin/activate
pip install -r requirements.txt && python setup.py install
pyenv rehash # rehash pyenv shims (run this after installing executables)
alias venv='python -m venv env'
alias actv='source env/bin/activate'
alias dctv=deactivate
alias pyclean='find . -type f -name '\''*.py[co]'\'' -delete -o -type d -name __pycache__ -delete -o -type f -name '\''.coverage.*'\'' -delete'

How to run multiple agents on a single jenkins pipeline

set agent to none

inside each stage define desired agent

see an example below

properties([
parameters([
string(name: 'GERRIT_REFSPEC'),
])
])

def get_yaml() {
node {
sh 'env'
echo GERRIT_PATCHSET_REVISION
echo "${GERRIT_PATCHSET_REVISION}"
return """
apiVersion: v1
kind: Pod
metadata:
labels:
some-label: some-label-value
spec:
containers:
- name: simplekube
image: dhub.net/jenkins/simplekube:${GERRIT_PATCHSET_REVISION}
command:
- cat
tty: true
securityContext…


Python

Data structures

How it works under the hood

  • List
  • Set
  • Tuple
  • Dictionary

These are examples of sequence and they have membership test e.g. in or not in. Apple in fruits.

For list and tuple these are O(n)

For set and dict it’s O(1) since they use hashing

There are three control flow statements in Python — if, for and while.

The continue statement is used to tell Python to skip the rest of the statements in the current loop block and to continue to the next iteration of the loop.

The break statement is used to break out of…


Follow the below steps

  1. Install docker & k8s. Follow until step 6. You may have to add a docker group and add current $USER to the group https://phoenixnap.com/kb/install-kubernetes-on-ubuntu
  2. Install minikube https://minikube.sigs.k8s.io/docs/start/
  3. Install kustomize https://kubectl.docs.kubernetes.io/installation/kustomize/binaries/
  4. Install go lang. you may have use sudo to untar https://golang.org/doc/install
  5. Install K6 https://k6.io/docs/getting-started/installation/

Now follow the “cloning the repo step” https://k6.io/blog/running-distributed-tests-on-k8s/

\o/

easy script

sudo apt-get update
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
sudo apt-get install docker.io
sudo systemctl enable docker
sudo systemctl status docker
sudo systemctl start docker
docker ––version
docker run hello-world
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add
sudo apt-get install curl -y
sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main"
sudo apt-get…

Natarajan Santhosh

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store