1. List - (a list of values. Each one of them is numbered, starting from zero )
I find it very handy in Python programming language , because looping through list and reading each values are very easy in List.
num = [3,4,5,6]
items = ['desk','pen','pencil']
you can read through List very easily as below -
2. split function
You can split a string with any seperator and put into a list very easily with this function.
3.Map function
Map applies a function to all the items in an input_list.
Output:
{1,4,9,16]
4. Reduce Function:
Reduce is a really useful function for performing some computation on
a list and returning the result.
Below example we are passing the 'sum' function to inbuild 'reduce' function and getting the total sum for the list of numbers.
Output:
14
5.Some thing you find very strange in Python ( Mutable and Immutable objects)
I thought it was bug, but its not ..
eg:
First Lets me create a list as below.
a = [1,2]
then simply create another list 'b' and assign 'a' + [3]
b= a;
b+=[3]
what you will expect on 'b' .. obviously .. [1,2,3]
But what you expect on 'a'... I thought that i didn't change anything in 'a' , so it should be same, but what actually 'print a' become [1,2,3]
read below link for more details - http://book.pythontips.com/en/latest/mutation.html
https://codehabitude.com/2013/12/24/python-objects-mutable-vs-immutable/
Tuesday, March 21, 2017
Is ML(Machine Learning) a Programming Style ?
I remember that I started programming with declaring variables and doing multiplication, addition , 'for/while' loops etc.. Suddenly one day my Plus1 computer teacher started writing functions, those days I didn't know that I was moving to a new programming style . Functions were looks very natural and nothing surprising to me. But when I came to know that some of programming languages only running with functions(but it took years to realize that :-)) ..check this link Functional Programming
I came to know that this can be adopted as a programming style.
When I moved to Plus 2 standard, I think that is time when I started hearing about about objects oriented programming. I felt so surprising that "Why the teacher is taking me to different different words/concepts like inheritance,polymorphism ,abtraction etc.." ok I just bi-hearted them to pass the exams. But I can remember that my teacher was trying to understand me that 'object oriented programming' is new programming style.
Now I started going through some of the ML(machine learning) tutorials, I am getting same doubt like 'Is it going to be a new programming style or Is it the future programming method ?'
I came to know that this can be adopted as a programming style.
When I moved to Plus 2 standard, I think that is time when I started hearing about about objects oriented programming. I felt so surprising that "Why the teacher is taking me to different different words/concepts like inheritance,polymorphism ,abtraction etc.." ok I just bi-hearted them to pass the exams. But I can remember that my teacher was trying to understand me that 'object oriented programming' is new programming style.
Now I started going through some of the ML(machine learning) tutorials, I am getting same doubt like 'Is it going to be a new programming style or Is it the future programming method ?'
Monday, March 20, 2017
Machine Learning with Python
Machine learning is coming as an easy programming technique in these days.I thought it requires lot of maths to do something on ML.But what I understand is that it becomes very easy with python tools. With python programming sci-kit and pandas libraries, we can makes some cool applications very easily.
But still I am in the learning process now.
These tutorials helps me a lot to keep updated with ML.
But still I am in the learning process now.
These tutorials helps me a lot to keep updated with ML.