SIMD (single instruction, multiple data)

Numpy Python
Numpy Python
Photo by Timothy Dykes on Unsplash

In previous decades, the rise of ML (DL) draw everyone from different background, many academia (logicians, mathematicians, neurologist etc), scientists/engineers (computing on Matlab, Octave) and especially programmers. Google the term “AI hype cycle” and you’ll see how Artificial General Intelligence(AGI) flip the coin & now we had narrow/weak ML or should i say Deep Artificial Neural Networks everywhere. In order to emerge complex systems, we need more than that, pattern formation, collective behavior, nonlinear dynamics, evolution & adaptation just to name a few. …

Photo by Markus Spiske on Unsplash

In this part we gonna explore basic arithmetic for matrices and explore octave lib for better productivity.

Arithmetic operation

a = [1 2; 3 4];
b = [4 5; 6 7];
a + b
5 7
9 11
a - b
-3 -3
-3 -3
a * b % matrix multiplication
16 19
36 43
a .* b % element-by-element multiplication
4 10
18 28
a / b % (inverse (b') * a')'
2.5000 -1.5000
1.5000 -0.5000
-a % negation
-1 -2
-3 -4
a' % transpose, change row into column
1 3
2 4
a ^ 2 or mpower(a,2)

SSMD & maths

  1. REPL & self help, if you want to change primary prompt string just type, put anything you want to be as a cursor.
PS1('$ ')  % changing primary prompt string to $% this is just a comment
# this one too
help command_name;
% place any command to get help doc offline
% command clears out all declared variables

2. SSMD, You knew it if you’d programmed in any programming language at all, but will repeat it here anyway.

1 + 1  % sum
1 - 2 % subtraction
3 * 4 % multiplication
9 / 3…

Scientific Programming Language

What’s Octave? According to the website —

  • Powerful mathematics-oriented syntax with built-in 2D/3D plotting and visualization tools
  • Free software, runs on GNU/Linux, macOS, BSD, and Microsoft Windows
  • Drop-in compatible with many Matlab scripts (largely compatible with Matlab)

Download from official website and let’s get started. In this short article we gonna explore what Octave can do.

2D plott

x = -2:0.5:2;
y = x .^ 2;
title("Simple 2-D Plot");
2D plotting with Octave
2D plotting with Octave
2D plotting with Octave

Beginner note: as soon as you use plot() method, a diagram will appear on GUI, then keep labeling the diagram and it will sync automatically.

3D plot

x = linspace(-2,2,50);
y = linspace(-2,2,50);

Image source

These days everything related with Data Science & AI in general you know the drill, you need python. MacOS come with python 2.7^ something, you can install python3 via Homebrew. Pip is the default package manager but we need more don’t we? here is their differences. Yep we don’t have time so here is what i’d read. If you’re curious mind want to know about what’s this all about, the rest of you it’s simple

Package, dependency and environment management for Python

Different between Conda and PIP


  • It’s in binary meaning does not require compiler & can check dependencies.
  • Any package type such as…

Photo by Hitesh Choudhary on Unsplash

MacOS ship with default python under /usr/bin/python we normal user don’t need to use that one shipped with or managed by our default OS. We can install python either from their official website or via brew. We will go with latter approach —

brew install python3

Here we are assuming you’ve install brew, this will download latest python3.* to your macOS under /usr/local/bin/python3 but you won’t find pip anywhere. Previous MacOS versions can install pip like this —

sudo easy_install pip

After getting python3 we will go with official instructions to get pip, first download via curl

curl …

Photo by Samuel Zeller on Unsplash
Photo by Samuel Zeller on Unsplash
Photo by Samuel Zeller on Unsplash
Enter password: 
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

Yes, fresh install.

MySQL root user account allow you to have full access on MySQL database. You need to have superuser(root) access in unix environment or Administrator access on Windows to manipulate with mysql services via cli.

We’ve all been there, but on my Mac Catalina i can’t access root account no matter which source i downloaded from. There are plenty of online Q&A about using “ALTER USER” “SET PASSWORD” & suggestion to config my.cnf file etc or even using mysqladmin command. …

Aung Zan Baw

Full stack developer, base in Myanmar. Turn coffee into code, a husband, a father, a reader.

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