Addition and Multiplication of Matrix in Python 3

Addition and Multiplication of Matrix in Python 3

=========

m1 = [[1,2,3],[4,5,6],[7,8,9],[10,11,12]]

m2 = [[1,2,3],[4,5,6],[7,8,9],[10,11,12]]
m3 = [[1,2,3],[4,5,6],[7,8,9],[10,11,12]]
m4 = [[1,2,3,4],[4,5,6,7],[7,8,9,0]]
class TwoDimMatrixOp:
def __init__(self, m1, m2):
self._m1 = m1
self._m2 = m2
self._result = [ [0]*(len(m1)-1) for _ in xrange(len(m2)) ]
def sum(self):
# iterate through rows
for i in range(len(self._m1)):
# iterate through columns
for j in range(len(self._m1[i])):
self._result[i][j] = self._m1[i][j] + self._m2[i][j]
for r in self._result:
print(r)
def multi(self):
self._result_mult = [ [0]*(len(m1)) for _ in xrange(len(m2[0])+1) ]
# iterate through rows of X
for i in range(len(self._m1)):
# iterate through columns of Y
for j in range(len(self._m2[0])):
# iterate through rows of Y
for k in range(len(self._m2)):
self._result_mult[i][j] += self._m1[i][k] * self._m2[k][j]
for r in self._result_mult:
print(r)
TwoDimMatrixOp(m1, m2).sum()
TwoDimMatrixOp(m3, m4).multi()

Topics in Linux Terminal working

Symbolic Links building & Extracting zip keeping perm origin

============

1

Scenario: You installed in Ubuntu Eclipse IDE but to run needed JDK/JRE (Java) being installed in Ec;ipse dir /home/leonidassavvides/Documents/eclipse/jre/bin/java , instead of install JAva in this directory you install in default directory and create a symbolic link at /home/leonidassavvides/Documents/eclipse/jre/bin/java .

# create directories that needed
leonidassavvides@ubuntu:~$ mkdir -p /home/leonidassavvides/Documents/eclipse/jre/bin

# link directories java to java/eclipse
leonidassavvides@ubuntu:~$ ln -s /usr/lib/jvm/jdk-11.0.3/bin/java /home/leonidassavvides/Documents/eclipse/jre/bin/java

now Eclipse IDE should work

2

Scenario: Extract Prestashop zip archive keeping origin before extract files/folders permissions the same

coming soon

 

 

My Reading list for Summer 2019 – Data Science

My Reading list for Summer 2019 – Data Science

I took a ZENVA course in Data Science in May 2019 so my reading list is as here – along some programming books in [advanced in Data Structures & Design Patterns] Python/C++/PHP/Java NOT referred here…

 

Laura Igual • Santi Seguí Introduction to Data Science , Springer A Python Approach to Concepts, Techniques and Applications For this reason all the code examples and data in this book are available to download at https://github. com/DataScienceUB/introduction-datascience-python-book

=====

José Unpingco Python for Probability, Statistics, and Machine Learning , Springer

=====

Python Web Scraping , Packt Second Edition Hands-on data scraping and crawling using PyQT, Selnium, HTML and Python Katharine Jarmul, Richard Lawson

=====

PROBABILITY AND STATISTICS FOR COMPUTER SCIENTISTS SECOND EDITION Michael Baron CRC Press, Taylor & Francis Group

=====

IPython Interactive Computing and Visualization Cookbook , Packt Copyright © 2014 Packt Publishing

=====

Software Architecture with Python , Packt Design and architect highly scalable, robust, clean, and high performance applications in Python Anand Balachandran Pillai