Basic Numpy Operations #Root

Basic Numpy Operations

import numpy as np

a = np.arange(15).reshape(3, 5)

print(a)

print(a.shape)

print(a.ndim)

print(a.dtype.name)

print(a.itemsize)

print(a.size)

print(type(a))

b = np.array([6, 7, 8])

print(b)

type(b)

#

From: https://sitestree.com/basic-numpy-operations/
Categories:Root
Tags:
Post Data:2019-01-05 15:20:17

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Implement Gradient Descend: #Root

"

Gradient descent is a first-order iterative optimization algorithm for finding the minimum of a function. To find a local minimum of a function usinggradient descent, one takes steps proportional to the negative of the gradient (or approximategradient) of the function at the current point.

Gradient descent – Wikipedia


https://en.wikipedia.org/wiki/Gradient_descent

"

Gradient Descend

# From calculation, it is expected that the local minimum occurs at x=9/4

"""

cur_x = 6 # The algorithm starts at x=6

gamma = 0.01 # step size multiplier

precision = 0.00001

previous_step_size = 1

max_iters = 10000 # maximum number of iterations

iters = 0 #iteration counter

df = lambda x: 4 * x**3 – 9 * x**2

while previous_step_size > precision and iters < max_iters:

prev_x = cur_x

cur_x -= gamma * df(prev_x)

previous_step_size = abs(cur_x – prev_x)

iters+=1

print("The local minimum occurs at", cur_x)

#The output for the above will be: (‘The local minimum occurs at’, 2.2499646074278457)

"""

#—-

print(‘my part’)

co_ef = 6

iter = 0

max_iter = 1000

gamma = 0.001

step = 1

precision = 0.0000001

df = lambda x: 4 * x * x * x – 9 * x * x

while (iter <= max_iter) or (step >= precision ) :

prev_co_ef = co_ef

co_ef -= gamma * df (prev_co_ef)

step = abs (prev_co_ef – co_ef)

print(co_ef)

From: https://sitestree.com/implement-gradient-descend/
Categories:Root
Tags:
Post Data:2019-01-05 15:17:29

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Future Startup Weekly #Root

FS Weekly

Please find the updates that you missed from FS in last 7 days. If you enjoy them, please share the mail with others.

Green Delta Digital Insurance: Insurance Made Simple, Now at Your Fingertips

Green Delta Digital Insurance makes it easy for anyone to buy insurance from anywhere. It fixes one of the critical barriers to access insurance. Today, if you want to buy your travel insurance in the last minute, you can simply go to Green Delta Insurance website sitting in the airport and buy one and get your insurance documents in your email with a few clicks.

Music Streaming Startup Imagine Radio Launches With Ambitious Goals

Imagine Radio, a new on-demand audio streaming startup that aims to build a platform for musicians and artists while offering an exciting experience to music listeners, has launched in Dhaka in a launch event held at DevoTech Technology Park office on 17th December

Ecommerce Startup Evaly Launches With Big Ambition

Evaly, a new ecommerce startup that aims to offer largest collection of products to users in a single platform, ensure fastest delivery in metros and empower retailers by offering a direct digital storefront for their offline shop, has formally launched in Dhaka on 16th December in a lunch event held at Le Meridien Dhaka and participated by industry insiders and eCommerce enthusiasts.

The Fascinating Story Of Shohoz: An Interview With Maliha M Quadir, Founder and MD, Shohoz

Shohoz Founder and Managing Director, Maliha M Quadir, has a fascinating story. She was born and brought up in Dhaka. Studied in the US: Smith College and Harvard University. Worked at some of the top institutions, Morgan Stanley, Standard Chartered, Nokia, and Vistaprint, spanning multiple countries, US, Singapore, India, and Indonesia.

Toward the end of 2013, she decided that she is finally ready to pursue her lifelong dream. Starting her own tech company in Bangladesh. She left her job, raised a few million in seed investment and moved back to Bangladesh. Shohoz was born in 2014.

Future Startup, Holding No: 81, 3rd Floor, Bosila, Mohammadpur, Dhaka, Dhaka, 1207, Bangladesh, https://futurestartup.com

You Received this email because you have subscribed to our list. Please unsubscribe if you don't want to receive email.

From: http://sitestree.com/future-startup-weekly-3/
Categories:Root
Tags:
Post Data:2018-12-21 10:42:41

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Pyspark Development Environment #Root

Using Hortonworks HDP:
[https://github.com/sayedjustetc/TechnicalArticlesAndCode/blob/Pyspark/pyspark-development-environment]
–comes with pyspark
However, default python version for Pyspark is 2.7
To change Python version for Pyspark use:
export PYSPARK_PYTHON=’/usr/bin/python3.6′
To make the export permanent, change it on .bash_profile file
vi .bash_profile
the put the folowing line on .bash_profile
export PYSPARK_PYTHON=’/usr/bin/python3.6′
—-
your HDP by default will not have Python3.6. Install as below:

To install Python3.6, you can use

yum install python36 [or similar will work]

If it does not work, first try
yum upgrade
the
yum -y install python36
or
yum -y install python36*


You can try to change your System python to 3.6 by using [soft link, verify the order of paths in the command]
ln -fs /usr/bin/python3.6 /usr/bin/python
[ref: https://cmdlinetips.com/2011/07/how-to-create-a-soft-link-to-a-directory-in-linuxmac-os-x/]

If you want to use packages such as numpy or networkx inside pyspark, you will need to install them.
pip install numpy
python3.6 -m pip install numpy
or similar might/should work.

By default HDP does not come with pip or numpy or networkx installed.
You will need to install pip first
yum install pip
yum install python-pip
yum install python36-pip
yum install python27-pip
or similar will work
—-
then you can use pip to install numpy or networkx or similar

For installing numpy or networkx or scipy or similar libraries on HDP and to work inside Pyspark,
You can also get : get-pip.py first then use this to install pip

wget https://bootstrap.pypa.io/get-pip.py
python3.6 get-pip.py
python3.6 -m pip install numpy


You might need to run the following, if you see Python issues while installing numpy
yum install python36-devel

[Reference: https://stackoverflow.com/questions/17443354/install-numpy-on-python3-3-install-pip-for-python3] From: http://sitestree.com/?p=12341
Categories:Root
Tags:
Post Data:2018-12-09 23:43:33

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Introduction to Machine Learning #Root

Embedding is enabled on the actual video. Hence, assumed, embedding is alright.

[youtube https://www.youtube.com/watch?v=gKZBw3ef2Jo?list=PLauepKFT6DK_1_plY78bXMDj-bshv7UsQ&w=761&h=428] From: http://sitestree.com/?p=12314
Categories:Root
Tags:
Post Data:2018-09-30 23:28:33

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

These Startups Want To Shake Up Primary Education, Fashion, Real Estate Buying, Travel, And What Food You Consume In Dhaka #Root

These Startups Want To Shake Up Primary Education, Fashion, Real Estate Buying, Travel, And What Food You Consume In Dhaka

These Startups Want To Shake Up Primary Education, Fashion, Real Estate Buying, Travel, And What Food You Consume In Dhaka

FS Weekly Digest: The Insights You Missed Last Week (Late)

From: http://sitestree.com/these-startups-want-to-shake-up-primary-education-fashion-real-estate-buying-travel-and-what-food-you-consume-in-dhaka/
Categories:Root
Tags:
Post Data:2018-08-31 09:20:30

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Building Serverless Web Applications with AWS Amplify #Root

An AWS Online Tech Talk.

Webinar: Building Serverless Web Applications with AWS Amplify

From: http://sitestree.com/building-serverless-web-applications-with-aws-amplify/
Categories:Root
Tags:
Post Data:2018-08-30 11:57:30

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Migrating Microsoft Workloads Like an Expert #Root

an AWS Online Tech Talk.

Webinar: Migrating Microsoft Workloads Like an Expert

From: http://sitestree.com/migrating-microsoft-workloads-like-an-expert/
Categories:Root
Tags:
Post Data:2018-08-30 11:55:56

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Empower Your Organization with Alexa for Business #Root

an AWS Online Tech Talk.

Webinar: Empower Your Organization with Alexa for Business

From: http://sitestree.com/empower-your-organization-with-alexa-for-business/
Categories:Root
Tags:
Post Data:2018-08-30 11:54:02

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Automate Threat Mitigation Using AWS WAF and Amazon GuardDuty #Root

AWS Online Tech Talk.

Webinar: Automate Threat Mitigation Using AWS WAF and Amazon GuardDuty

rmeuaotk?d=[UNIQUE]

From: https://sitestree.com/automate-threat-mitigation-using-aws-waf-and-amazon-guardduty/
Categories:Root
Tags:
Post Data:2018-08-27 20:03:24

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada