Sunday, 23 October 2016

Comprehension in Python

Comprehension

1. They are easy to write, concise and powerful way of data transformation.
2. They are one of the most powerful and useful feature of python.

Example as below

Square = [i**2 for i in range(50) if i % 3 == 0)

The same would need more lines of code if we use traditional for loop.

                            
                        

                                                                  -- Notes from classes of Michele Vallisneri

Python Dictionary

Dictionary in Python:

1. Dictionary in python maps name to values. Names are called keys. It can also be a number or any object which is hashable (can be converted to number).

2. Dictionary have keys and values. It can be looped in three ways.
On dict.keys , dict.values , or dict.items

3.  Keys and values don't come in alphabetical order. Which means index is not guaranteed for
Python dictionary.

4. They are widely used to collect data items of different kind and where sequence or order is not expected.

5. Denoted by { }


                                                                          -- Notes from classes of Michele Vallisneri

Python Lists

Lists in Python:

1. Python lists are very useful. You see them everywhere.
2. They are flexible and can contain heterogeneous data.
3. They are indexed with c style indexing (First element starts with zero index).
4. They are used where order of the elements matter.
5. Slicing can be applied on lists to create sublists.
6. Appropriately used when data is of same type.
7. Denoted by [ ]


                                                                               -- Notes from classes of Michele Vallisneri

Saturday, 8 October 2016

The five frames of Organizational Performance and Health

Transformation stages - The five frames of Performance and Health


Aspire - 
Where do we want to go?

Assess -
How ready are we to go there ?

Architect -
What do we need to do to get there ?

Act -
How do we manage the journey ?

Advance -
How do we keep moving forward ?


In performance, these challenges and approaches are :


Aspire -
How do we develop a change vision and targets (the strategic objectives)

Assess -
How to identify and diagnose an organisation's ability to achieve its vision and targets (the capability platform)

Architect -
How to develop a concrete, balanced set of initiatives to improve performance (the portfolio of initiatives)

Act -
How to determine and execute the right scaling up approach for each initiative in the portfolio (the delivery model)

Advance -
How to make the transition from a transformation focussed on a one time step change to an era of ongoing improvement efforts (the continuous improvement infrastructure)


And in health, the challenges and approaches are :


Aspire -
How to determine what 'healthy' looks like for an organisation (the health essentials)

Assess -
How to uncover the root-cause mindsets that drive organisational health (the discovery process)

Architect -
How to reshape the work environment to influence healthy mindsets (the influence model)

Act -
How to ensure that energy for change is continually infused and unleashed (the change engine)

Advance -
How to lead transformation and sustain high performance from core of self-mastery (entered leadership)


                                                                               -- Learnings from the book 'Beyond Performance'


Tuesday, 10 May 2016

The Milky Way

Do we ever wonder about our galaxy. How vast and enormous it is. There are several of galaxies. Whats good is they follow certain patterns. They can be either elliptical or spiral. Earth is believed to be in spiral galaxy. 

Its very difficult to see the picture of our entire galaxy. Several thousands of pictures are taken and then merged together to understand and study our galaxy. Spectacular it is , with billions and billions of stars. 

Stars being thousand of light years away from us, can be still be seen through naked eyes from earth. These are the ones closer. Those stars shine bright. we have dust and gas which forms a dust cloud which hides the stars. However to study this, astronomers have found a wonderful trick and techniques to look deeper into the stars. First the galaxy images are taken with infrared camera. Infrared camera can detect opaque objects through sensing the heat. This reduces the view of thick dust clouds. And after this if an Xray image is taken, then we can get clear view of stars, minimising all the dust cloud.

Stars are made of gases. What happens is, hydrogen gases tries to expand, while gravity tries to pull it. this fight goes on until gravity wins and gases become denser and denser. Hydrogen gases turns to helium. Produces explosion and thus due to nuclear energy stars shine and its surrounding gases disperse.

 A human life is too short to witness a star’s birth. They are born and they die with dangerous and violent explosions. 
Adaptive optics gives relative clear vision to study the stars movement, which would otherwise be blurred without using this technology.

Saturday, 13 February 2016

Algorithm Analysis

Algorithms are used to solve problems.
There may be different ways to solve an instance of a problem.
And this brings the challenge to compare the algorithms against each other.

A program is an algorithm which is encoded into some programming language.
This means we can have many programs for the same algorithms depending upon the programmer and the programming language used. It is easier and more meaningful to compare the algorithms when the problem size is large.

The two factors which can help to find efficient algorithm are space and time complexity.
Space complexity is to use the resources efficiently or use less resources.

Time complexity talks about the running time of an algorithm.
But this again depends upon the computer clock speed, the operating system, platform, the programming language and other factors.

To overcome this, Big O notation is used which ignores the other factors like computational speed and programming language. It only considers the number of steps taken/done to solve the problem. Like the number of assignment operations done. Big O is also called order of magnitude.

When the performance varies with the size of the program, we say algorithm has performance of O(n).

However, when the performance is dependent on the value of the data and not on the size of problem, then we measure the performance in Worst case, Best case scenarios and calculate Average cases.

Github Link: https://github.com/SmushBall/Algo

Tuesday, 26 January 2016

Python for web - Journey with Flask

Hello Everyone. I am Deepak. I work as a software engineer. I have been mostly working on the backend systems writing packages and sqr. Professionally, I work on Peoplesoft HRMS. Recently, out of curiosity and obvious need, I have been trying to learn python and plan to use it for web development.

Python is awesome. You can do almost anything. There are a whole lot of library and modules which supports so many features in numerous fields. To start with, I am currently learning flask and hoping to share more news as I move far.

One is never too old to learn.