my net house


Hacker’s way to Build of Block-Chain!(Purely-Pythonic+HyperLedger)

What is Block-Chain?

it is just a DB and it is immutable. DB has access with multiple users and they can only create new entries.

What are the potentials behind Block-Chain?

-Cross-Question->Dude! Talk to a salesman who know how to sell comb to bald. I just write code.


How block chain works?  No Idea, Let’s build ONE!!


Objective: We will use IBM hyperledger and Python-flask to create a wrapper around it and this wrapper  will be able to make REST calls to hyperledger. Bingo-Bascially we will hack Hyper-ledger from Pythonic way!


  1. Create your Business-Network.

Understanding of .bna file is really important! (You can download )

Before a business network definition can be deployed it must be packaged into a Business Network Archive (.bna) file.

Create your model file, You can use Online Playground:


We’re assuming each Entity (i.e. Factory), will make use of RFID tags to store information on the food, and will scan that tag as it’s received. This information, such as timestamp, the date, and state (production, freezing, packaging, distribution) is stored on the Block-chain.


Script File From here, you will define the transaction processor functions, these are the functions that will execute when the transactions are invoked.The ChangeStateToProduction function will change the state of the current food to Production.


“Access Control” from the left pane. From here, you can determine which participants of the business network have access to which assets and transactions.

These are the important Parts of .bna file for Hyperledger-Composer! One need to understand these three very well to get to know more about “A Smart Contract!”

1. Setting up the Environment(On Ubuntu 16.04 )

Download and install all required Pre-requisites:

curl -O

Run the script:


2. Installing the Development Environment

Essential CLI tools

npm install -g composer-cli

Utility for running a REST Server on your machine to expose your business networks as RESTful APIs:

npm install -g composer-rest-server

Useful utility for generating application assets:

npm install -g generator-hyperledger-composer

Yeoman is a tool for generating applications, which utilises generator-hyperledger-composer:

npm install -g generator-hyperledger-composer

npm install yeoman-generator

npm install -g yo

Install Playground

npm install -g composer-playground

Install Hyperledger Fabric

This step gives you a local Hyperledger Fabric runtime to deploy your business networks to.

  1. In a directory of your choice (we will assume ~/fabric-tools), get the .zip file that contains the tools to install Hyperledger Fabric:

mkdir ~/fabric-tools && cd ~/fabric-tools

curl -O


A tar.gz is also available if you prefer: just replace the .zip file with fabric-dev-servers.tar.gz1 and the unzip command with a tar xvzf command in the above snippet.

  1. Use the scripts you just downloaded and extracted to download a local Hyperledger Fabric runtime:

cd ~/fabric-tools ./

Start Hyperledger Fabric

Start the fabric:


Generate a PeerAdmin card:


You can start and stop your runtime using ~/fabric-tools/, and start it again with ~/fabric-tools/

At the end of your development session, you run ~/fabric-tools/ and then ~/fabric-tools/ Note that if you’ve run the teardown script, the next time you start the runtime, you’ll need to create a new PeerAdmin card just like you did on first time startup.

Deploying the Business Network

After creating the .bna file, the business network can be deployed to the instance of Hyperledger Fabric. Normally, information from the Fabric administrator is required to create a PeerAdmin identity, with privileges to deploy chaincode to the peer. However, as part of the development environment installation, a PeerAdmin identity has been created already.

After the runtime has been installed, a business network can be deployed to the peer. For best practice, a new identity should be created to administrate the business network after deployment. This identity is referred to as a network admin.

Retrieving the Correct Credentials

A PeerAdmin business network card with the correct credentials is already created as part of development environment installation.

Deploying the Business Network

Deploying a business network to the Hyperledger Fabric requires the Hyperledger Composer chaincode to be installed on the peer, then the business network archive (.bna) must be sent to the peer, and a new participant, identity, and associated card must be created to be the network administrator. Finally, the network administrator business network card must be imported for use, and the network can then be pinged to check it is responding.

  1. To install the composer runtime, run the following command:

composer runtime install --card PeerAdmin@hlfv1 --businessNetworkName pizza-on-the-blockchain

The composer runtime install command requires a PeerAdmin business network card (in this case one has been created and imported in advance), and the name of the business network.

  1. To deploy the business network, from the pizza-on-the-blockchain directory, run the following command:

composer network start --card PeerAdmin@hlfv1 --networkAdmin
admin --networkAdminEnrollSecret adminpw --archiveFile
pizza-on-the-blockchain@0.0.1.bna --file networkadmin.card

The composer network start command requires a business network card, as well as the name of the admin identity for the business network, the file path of the .bna and the name of the file to be created ready to import as a business network card.

  1. To import the network administrator identity as a usable business network card, run the following command:

composer card import --file networkadmin.card

The composer card import command requires the filename specified in composer network start to create a card.

  1. To check that the business network has been deployed successfully, run the following command to ping the network:

composer network ping --card admin@pizza-on-the-blockchain

The composer network ping command requires a business network card to identify the network to ping.

Generating a REST Server

Hyperledger Composer can generate a bespoke REST API based on a business network. For developing a web application, the REST API provides a useful layer of language-neutral abstraction.

  1. To create the REST API, navigate to the pizza-on-the-blockchain directory and run the following command:


  1. Enter admin@pizza-on-the-blockchain as the card name.
  2. Select never use namespaces when asked whether to use namespaces in the generated API.
  3. Select No when asked whether to secure the generated API.
  4. Select Yes when asked whether to enable event publication.
  5. Select No when asked whether to enable TLS security.

The generated API is connected to the deployed blockchain and business network.

Once the REST server is up and running, head over to https://localhost:3000/explorer

Running the Application

  1. Ensure Python is installed on your local environment (Both Python 2 and Python 3 are supported).
  2. Install the requirements using the command pip install -r requirements.txt.
  3. Run the application as: python
  4. Point your web browser to the address localhost:<port>.

One may Enjoy Different parts of My Application here.








Laws of Power(48 or more may be!)

Power:- Hmm, what it is and how we define power and how we are able to acquire and what are those things behind it’s existence those make humans more crazy about it. Knowledge is Power? Or Money is Power Or self-Awareness is power? Physical strength and Muscular body are also great examples of Power But what is real scenario behind power that lead Humans towards total destruction or behind great achievement.

images (1)

There is interesting saying of Robert Kiyosaki that explain many things about Power when you are young and how you can attain it or how you might be attaining it:

48 Laws of power could be Evil if you are not able to understand the real meaning behind the book. Now here are some practical aspects of book those many of readers might find attractive or really evil if someone is hungry for power and someone is desperate to learn how to acquire power.

1. Never Outshine the master:
Those who are above you always make them Great and Prosperous because you have to learn so much stuff from them.

2. Never Put Too much Trust in Friends, Learn to use Enemies!
In real way yo are always alone and you need to understand that loneliness is solitude and that solitude is the key to overcome your mental abilities. Most of the times when someone is too much surrounded by friends/Yes-Mans He or She gets too comfortable but on the other hand uncomfortable Environment with Enemies lead you to grow more!

3. Stay Mysterious as much as you can, There must be only one person in the whole world who must be knowing your true goal/mark and that person is you and only you! You must remember only one thing that you are at war and only you must be knowing your Next Move!

4. Speak Less but speak Effective whenever you are going to speak something.  Say less that means you would be able to get caught less about stuff that you are going to say about yourself.

5. Your reputation is the only thing that can help you to get unlimited power even when you are not working on it, It is so powerful law but you have to invest small chunks of time everyday to work on this law.

6. Don’t be attention seeker but learn to get attention whenever you are required to have it.

7. You must know or learn to know how Others will work for you and how you must make others realise that they would be doing great not for you but for themselves. All the time make people believe that they are competing against you or they might be doing things those might effect you because the people who are working for you are your enemies and that those enemies of yours will work so much for you only because they want to feel/make you low but in reality you know when you have to cut them and inherit all the stuff they did and make your wrapper around whole work your enemies have done for you. 🙂

8. If you need to force someone to come to you then you are already lost.:)
The force that you will apply on someone else will only make you week and look desperate and that desperation of yours could make someone scary. You never need to force someone all your energy should be around inventing the bait and that bait is the real way for someone to fall for you.

9. Arguments will only make your mind into less peace and more towards the complications and envy. Your arguments will make things more into deep where hope to make stuff happen move towards in less space. Although you might be cool and go towards your work and actions those could prove one to do things which are not on the real scenario but at end you will feel that when others were busy at arguments you took the lead and made the things happen. 🙂

10. Reality is that if there are positivism and affection resides inside the world there are also Negative thoughts and great amount of un-luckyness. Run from such people as much as you can and never look at them at all. If you will find the people in your life those are pulling you backward then you will never get ahead. Such people could also be your relatives or Loved-ones.

11. The more you will teach someone more he or she will go towards independence and more they will come to attack you back or will go so far away from you that you would never be able to get required benefits from them, Such cases are so common that most of the BIG industries follow those rules, Campus Placements are one example of such Law of Power. 😉

12. Learn to know where you have to apply honesty and how much it would effect your circumstances, Be nice to people when you have to be because then you would be able to make things more into realistic for your work, More nice and honest you will be towards other people for certain situations more you will be able to get their side for yourself.

13. Lure them for more and more things in those are for their self interest and they will only come to you when they will find that they are attracted towards you.

14. You are always nice to everyone and all the time you need to learn and understand how someone is behaving with you, in each case you must be going through many levels of layers when you are going to reveal about someone.

15. Wounded lion is far more dangerous than Healthy one, If you got your enemies into the world where they have lost from you once or twice than all you need to do kill them, Crush them properly because at any case if you will leave them un-touched you will regret at the END, Very MUCH!

16. Too much Availability is curse and If they get used to you they will never realise your true Value and that make them think and feel less about you, so use your presence only when it is effective most.

17. Stay Mysterious because that is the Ultimate gift you can give yourself. All the time they should be in-confusion that what would be your next move or how you are going to perform in next 3-4 days or what next you could say about stuff and things. Air of Mystery about you is the way they will never be able to understand your true Potential and your true findings. Less predictable you are less vulnerable you will be.

18. Sometimes just stay in the group and you will find that you have very good amount of Surroundings and security that will make you not shining like a Gold, That make sense because shining and shining alone all the time could cause huge amount of attraction towards you and you would be the one who anyone could be able to make a hit, Prevent yourself from attacks. Never Get ISOlated.

19. You must be knowing whom you are attacking before you are going to attack, Someone out there with really normal outlook could be super dangerous from outside, If you are mysterious anyone else could be as well, So learn to know that whom you are going to attack and how much loss that would cause you, So each time whenever you meet a mysterious person either stay away from that or be-aware very much before calling him out.


20. Your Real commitment should be only towards yourself and yourself only, your commitment to others could be more dangerous for both parties, one is your too much availability and other is how your availability towards others could decrease your time and at last but not least is your commitment to one side could also lead you to be enemy of OTHER-SIDE! either way you should avoid creating enemies of yours.

21. You are fool one ever anyone has seen, That should make them to think about you Because only then you would be able to know that what actually the other person is and how he/she is attack-able. 😉

22. Sometimes you have to tell them or make them believe strongly that you are lost and you are going to surrender yourself now, Only then you would be able to re-gain power and make yourself be more consistent. Re-gain your power and you will be able to attack again and this time you would be able to attack again and this time they will believe that only you would be able to loyal to them but actually you are having greater plans this time. 🙂

23. There is so much noise all the time around you, Most of the time this noise is major cause for you to loose focus on real things and waste HUGE amount of Energy, Time and money on such things could be great productivity killer for you, So each time you need to have focus on most important task and energy thing.

24. You must be the one who is the best if anyone asks something for advise but you are or should be only good to advice to those who are have the Designation of King.

25. Power of Re-Invention and Revolt is the most interesting power you can have for yourself, Each time society and surroundings tries to box you up into certain kind of Image and someone at some point you accept that live that kind of boaring life, All you need to do is always get out of the box and re-Invent yourself because It’s your game, your life and you must be the only one who should be controlling it!

26. Never get caught, Learn to make a good amount of balance and you would get to know that you can grow anywhere and you can move everywhere. You do the bad things but you should never be the one who actually performed such things! 😉

27. Be the one whom others feel that is the one that is desired most, Nobody takes care of your causes and things, All you need to do is make them realise that you are helping them not they are helping you to reach your goal.

28. Your Boldness is the key to make believe that whatever you are going to perform had great potential and you believe in that action. That is the only way you are going to rock each time, There is one more catch in this situation and that is if you are un-sure about something that you feel could be not that good to perform then you are good to go along with someone else who has much more idea of what we are about to do!

29. End goal is the most important you must be knowing and that END-GOal is everything, Because you need to fight and along the fight you need to know where you have to stop.

30. Be Cool! No be just Super-COOL! if they would be knowing that you are only doing stuff that is making you week the you are already vulnerable.

31. You are the one who must be controlling the main point or the centre source of Power and let others Play with small things and believe that they are the one who are actually controlling the situation.

32. Never be the one who is delivering bad News and in this whole point you must be the one who is not delivering TRUE BAD news, Learn to please people and learn to make them the one who want to listen only great news.

33. Learn to find out other’s Weakness and learn to Exploit them on that particular Weakness and moreover learn to Penetrate into other’s mind, There could be many weaknesses of someone and those could be Desperation,Fear, Loneliness, Charm, Drugs and Knowledge.

34. You are Amazing, Awesome, Att, Ghaint, Siraa and you are the one who is ruling the World, Live life king Size, You are the ALpha and you must Un-leash this thing in your life because that is what you are made to do. You are Lone wolf, Wolf on the top of the Hill is Never as Hungry as Wolf on climbing the hill.

35. Stay Calm Stay Cool, Work is Never Ending Process, Fight is Never Ending Process, Each day is War and you are not fighting to Survive now it’s your Attitude to Survive so that has very simple meaning and that simple meaning is You are cool enough. Your Hurryness is your Best Exploiting point and you can always get Exploited by someone at any level.

36. There is an art and that is: “Subtle art of Not Giving a Fuck!!” You must not give any kind of attention to your enemies and that less-attention makes them Crazy for you.

37. If you have to explain yourself your power is already in question. Your search for power depends on shortcuts. You must always circumvent people’s suspicions, their perverse desire to resist your will. Images are an extremely effective shortcut: Bypassing the head, the seat of doubt and resistance, they aim straight for the heart. Overwhelming the eyes, they create powerful associations, bringing people together and stirring their emotions. With the white light of the moon in their eyes, your targets are blinded to the deceptions you practice

38. Never Fight the Environment and all time just do your work under the hood, Never complain against the Crazy Mob, just do the stuff that you think+believe is great!

39 Make them know that they are the only one who will loose and that makes them desperate and Crazy to go against you, and the craziness will cause huge amount of imbalance for them, When they are angry and imbalanced that is your time to Rock!!

40. If it is free It is Dangerous.

41. Live away the Shadow of Great People! No matter how great you are doing or How amazing you could be, Each time you just have to remember that You need to make your own Existence. And that Existence of yours helps to create you your own things, Your Own world and your Own Treasure.

42. Do not wait for the troubles they cause to multiply, do not try to negotiate with them – they are irredeemable. Neutralize their influence by isolating or banishing them. Strike at the source of the trouble and the sheep will scatter.

43. Understanding that one alienated, disaffected soul can spark a blaze of discontent, you too must constantly win over more allies on all levels—a time will inevitably come when you will need them.

44. Do as what they do, That will make them to that you are not against there will or may be you are just doing what they are thinking to do, That will only make them crazy enough to fall for you ar make so much crazy and Entitled.

45. Turn the tables but do it slowly, At the end you know that real power is to run your own show, and to run your own show you don’t need to do things as fast as possible, So to have that possibility you need to act fine and accordingly.

46. You are not perfect and never appear the one, Too much shine cause too much attraction and that much attraction cause too much Evils of others.

47. Excess of Everything is Bad and that bad you need to identify. You need to know that when you have won and Do push things sometimes below the required limits.

48. Be Water My Friend! Be water. Flow like a water, Act like a water, Roll like a water. Stability is an illusion.

wooooo hooooo!!

images (2)

Required MySQL commands and stuff

TPOT Python Example to Build Pipeline for AAPL

This is  just first Quick and Fast Post.

TPOT Research  Paper:

import datetime
import numpy as np
import pandas as pd
import sklearn
from pandas_datareader import data as read_data
from tpot import TPOTClassifier
from sklearn.model_selection import train_test_split

apple_data = read_data.get_data_yahoo("AAPL")
df = pd.DataFrame(index=apple_data.index)
df['multiple_day_returns'] =  df['price'].pct_change(3)
df['rolling_mean'] = df['daily_returns'].rolling(window = 4,center=False).mean()

df['time_lagged'] = df['price']-df['price'].shift(-2)

df['direction'] = np.sign(df['daily_returns'])
Y = df['direction']

X_train, X_test, y_train, y_test = train_test_split(X,Y,train_size=0.75, test_size=0.25)

tpot = TPOTClassifier(generations=50, population_size=50, verbosity=2), y_train)
print(tpot.score(X_test, y_test))

The Python file It returned: Which is real Code one can use to Create Trading Strategy. TPOT helped to Selected Algorithms and Value of It’s features. right now we have only provided ‘price’,’daily_returns’,’multiple_day_returns’,’rolling_mean’ to predict Target. One can use multiple features and implement as per the requirement.

import numpy as np
import pandas as pd
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.model_selection import train_test_split

# NOTE: Make sure that the class is labeled 'target' in the data file
tpot_data = pd.read_csv('PATH/TO/DATA/FILE', sep='COLUMN_SEPARATOR', dtype=np.float64)
features = tpot_data.drop('target', axis=1).values
training_features, testing_features, training_target, testing_target = \
            train_test_split(features, tpot_data['target'].values, random_state=42)

# Score on the training set was:1.0
exported_pipeline = GradientBoostingClassifier(learning_rate=0.5, max_depth=7, max_features=0.7500000000000001, min_samples_leaf=11, min_samples_split=12, n_estimators=100, subsample=0.7500000000000001), training_target)
results = exported_pipeline.predict(testing_features)

Socket Programming and have fun with Python

Client Socket and Server Socket:

Client Computer like your browser or any piece of code you want to talk to your server uses client socket and Server uses both client and server socket.

Sockets are great for Cross-Platform communication.

Following is minimal Example of Socket and stuff:

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("", 80))

What is INET?What is Sock_Stream?

Almost that is all happened on client side, When connect is completed socket that is ‘s’ we just created can be used to send and request the specific text page requested. This socket will be read and reply, after that it will be destroyed. Client sockets are normally only used for one exchange (or a small set of sequential exchanges).

Now let’s look what is happening at server side:

# create an INET, STREAMing socket
serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# bind the socket to a public host, and a well-known port
serversocket.bind((socket.gethostname(), 80))
# become a server socket


Generators, Context-Managers and Coroutines:(Completing course)

Generator Pipelines:

  1. Several Pipelines can be linked together.
  2. Items flows one by one through the entire Pipeline.
  3. Pipeline Functionality can be packaged into callable functions.

One Example of Generator pipeline:

def seprate_names():

for full_name in names:

for name in full_name.split(‘ ‘):

yield name

full_names = name.strip() for name in open(‘names.txt’)

names = seprate_names(full_names)

lengths = ((name,len(name))for name in names)

longest  = max(lengths,key=lambda x:x[1])

Another approach is as follows is one wants to use using Function name: anotherapproac



Why we need context-Manager?

‘with’ statement in Python that we use to do file operations is Context-manager. It is something like to “Have the state and open that state and with-in that state to do things”. using with in Python we open file and till the file is open we do some good things and after doing all good things we close the file. So ‘with’ is a context Manager using that we make the state of file open and after that we do all the things we need to do with file.

Other useful cases of Context-manager:

Close/Open File/Socket(Even it crashes)

Commit/Fetch (Even if crashes)

release the lock (Even it crashes)

When you really need Context-Managers?

At last fun not least, If I will be creating a Chat-BOT in Python then I would be able to use Context-Manager in Python so I would be doing some stuff and after completing that stuff I can go out and have fun.


So we use @staticmethod in Python class,  that means no matter what happens we will be able to run this method at any cost.

That is just using decorator. Now if we want to create a context manager using decorator?

So what is Context-manager?

  1. I have to go to a particular directory, list all files with .txt extension, then come-back to current location (Simple use case)


  1. I have to load specific ML model, I have to predict against several parameters and get results, Return at specific state(un-load the model)
  2. I have to open Socket connection, Read various kind of data, close Socket connection.

On the other way we can also write it like:




Context-managers are powerful tool to make code more modular and Succinct.

Now What if we have to use Context-manager as Yielded value?


May be little-bit  more about COntext-managers-

What are Coroutines and how we have to handle those?

  1. Receive Values
  2. May not return anything
  3. Not for iteration

What is the design of Co-routine:

  1. Receive Input
  2. Process that Input
  3. Stop at yield statement

send() method is used to send value to coroutines.


More uses of Co-routines:

Coroutines are really powerful for Data-Processing Operations. and Multi-Processing)

One of most important course about Co-Routines/Concurrency and really interesting way to handle multiprocessing: —think win win—-


RUN parallel commands on your linux system Using Python

This is really simple Python script that would run on your system if You have to run parallel commands, All you just has to do is Open multiple tabs and run commandson each ab as per your requirement.

#!/usr/bin/env python
import subprocess

command = 'ping .'
terminal = ['gnome-terminal']

for host in ('server1', 'server2'):
    terminal.extend(['--tab', '-e', '''
        bash -c '
            echo "%(host)s$ %(command)s"
            ssh -t %(host)s "%(command)s"
    ''' % locals()])

Common Regular Expressions

Find line in multiple files:

grep -rnw '/home/ubuntu/workspace/tools-tpn-ops/' -e 'import os'

case insensitive: grep -i "Aditi" helloaditi

case ins and separate existance: grep -iw "is" helloaditi

match and show three lines after that: grep -A 3 -i "am" helloaditi

case of exclusion: grep -v -e "arsh" -e "honey" helloaditi

find position of word in file: grep -o -b "aditi" helloaditi

find line number of matching text: grep -n "sharma" helloaditi

read a specified line number: if you exactly know the line number then do

lets say you want to read line 84
head -84 a.txt| tail -1

Engineer’s Guide to Julia Programming

Engineer’s Guide to Julia Programming

Finally the moment has come when I can say that I can be productive as well as my solution can be Parallel,Optimize-able,Customizable and at last but not least glue-able. Yes those are the fantastic features I believe one can rely on while Learning any New Programming language and Developing a Very High Quality AI/ML Embedded Software Solution.


Julia Solves Two Language Problem.

Important Disclaimer for Newbies: I am Pythonista by choice and over the last few years I have Developed Projects using Python and it’s sister technologies to provide the solutions those are related to

Automation(Python -Scripting)


Data Analysis(SageMath,Sympy,Paraview,Spread-Sheets,Matplotlib,Numpy,Scipy,SKLearn)


3D Modeling(FreeCad, BIM,IFC), and Cluster Computing(Rock’s Cluster).

Now I just wanted a tool that would allow me to write Pure-mathematical expressions(using required signs not variable names) and write Machine-Learning/Artificial-Intelligence/Deep-Learning code where I would find myself on core layer of abstraction not like Tensor-Flow, Pytorch, or Numpy/Pandas. I am not against these libraries those helped me “soooo” much over the years but I have no idea that what kind of things are happening under the hood and may be I will never be allowed to change the working internals of Numpy/Pandas/Cython or anything that is related to Scientific Python only because there could be large amount of Fortran/C++ or Pascal kind things and crunching numbers as well.

Stuff that an Engineer need to perform for various kinds of jobs in Julia-Programming Language can be described as follows:

Solving a Simple Mathematical Equation in Julia:

A = randn(4,4)
x = rand(4)
b = A*x
x̂ = A\b # here we have written x-hat Symbol
@show norm(A*x̂ - b)

Doing Matirx Operations in Julia

A = randn(4,4) |> w -> w + w' # pipe A through map A -> A + A' to symmetrize it
λ = eigmax(A); # have you checked the lambda?
@show det(A - λ*I)

Performing Integration:

Performing integration might be one of the most important task one would be doing in Day to day if someone is involved with problems related to modeling and designing a solution using CAS(Compute Algebraic System) like Matlab or Sage-Math but designing a solution using CAS and then finding various ways to implement it into production is kind of “LOt of WoRk” I assume that only come with Either Experience or Lots of Extra Brain cells. 😉 See here Julia Plays an important role: “Solving two Language Problem”.

# Integrating Lorenz equations
using ODE
using PyPlot
# define Lorenz equations
function f(t, x)
σ = 10
β = 8/3
ρ = 28
[σ*(x[2]-x[1]); x[1]*(ρ-x[3]); x[1]*x[2] - β*x[3]]

# run f once
f(0, [0; 0; 0])

# integrate
t = 0:0.01:20.0
x₀ = [0.1; 0.0; 0.0]
t,x = ode45(f, x₀, t)

x = hcat(x…)’ # rearrange storage of x

# Side-Note::: What … is doing in Julia? (Remember *args and **kwargs in Python?)
# for more see:

# plot
plot3D(x[:,1], x[:,2], x[:,3], “b-”)

Really interesting Dynamic Type System()::

This is one of the most interesting part for me to have so much fun with Julia and it’s GREAT! Type System, You know why? Because It knows how long that bone is and how much Calcium will be there:

### Built-in numeric types

Julia’s built-in numeric types include a wide range of
1. integers: Int16, Int32, Int64 (and unsigned ints), and arbitrary-precision BigInts
2. floating-points: Float16, Float32, Float64, and arbitrary-precision BigFloats
3. rationals using the integer types
4. complex numbers formed from above
5. vectors, matrices, linear algebra on above

Ok let’s Have The Fun!

I encourage you to run following code into Jupyter Notebook that is running With Julia-Kernel.


typeof(π)# it will return irrational. Beacuse pi is irrational Number? 😉

Let’ Hack Julia’s Type System on Much deeper level!(Because it is much more than classes)

What else we need to know about it?

Define new Parametric Type in Julia:

type vector_3d{T<:Integer}

# can we call x any as Data-Members as like as C++ Data-Members?

type_call = vector_3d{25,25} # this is how we call it.

Let’s Just make Types more interesting: (and immutable)

immutable GF{P,T<:Integer} <: Number
function GF(x::Integer)
return new(mod(x, P))

Deep Learning and Machine Learning in Julia:

In the real eye Julia is developed to write “Mathematical Functions” by just using Native Language Syntax. It is more like if you want to do linear regression rather than installing a New_library and calling inbuilt Linear function of that library those could be written in C, C++ or Fortran may be or More or less Optimized Cython-Python Magic. But Julia responsibly provides static inbuilt and Really fast code methods to write your Own linear regression as easy as Python and as Fast as C++/Fortran.

Available Machine-Larning Packages in Julia:

Scikit-Learn in Julia:

ScikitLearn.jl implements the popular scikit-learn interface and algorithms in Julia. It supports both models from the Julia ecosystem and those of the scikit-learn library (via PyCall.jl).

Text Analysis in Julia:

The basic unit of text analysis is a document. The TextAnalysis package allows one to work with documents stored in a variety of formats:

  • FileDocument: A document represented using a plain text file on disk
  • StringDocument: A document represented using a UTF8 String stored in RAM
  • TokenDocument: A document represented as a sequence of UTF8 tokens
  • NGramDocument: A document represented as a bag of n-grams, which are UTF8 n-grams that map to counts

Machine-Learning Package with name Machine_learning:

The MachineLearning package represents the very beginnings of an attempt to consolidate common machine learning algorithms written in pure Julia and presenting a consistent API. Initially, the package will be targeted towards the machine learning practitioner, working with a dataset that fits in memory on a single machine. Longer term, I hope this will both target much larger datasets and be valuable for state of the art machine learning research as well.

Deep Learning in Julia:

Mocha is a Deep Learning framework for Julia, inspired by the C++ framework Caffe. Efficient implementations of general stochastic gradient solvers and common layers in Mocha can be used to train deep / shallow (convolutional) neural networks, with (optional) unsupervised pre-training via (stacked) auto-encoders. Some highlights:

Deep Learning with Automatic Differentiation:(What is automatic Differentiation?)

Knet (pronounced “kay-net”) is the Koç University deep learning framework implemented in Julia by Deniz Yuret and collaborators. It supports GPU operation and automatic differentiation using dynamic computational graphs for models defined in plain Julia. This document is a tutorial introduction to Knet. Check out the full documentation and Examples for more information. If you need help or would like to request a feature, please consider joining the knet-users mailing list. If you find a bug, please open a GitHub issue. If you would like to contribute to Knet development, check out the knet-dev mailing list and Tips for developers.

More resources on Julia Programing:

Feel free to clap and Have fun with Julia. Stay connected.

Programmer’s or Entrepreneur’s life Guide(How to live!)

I just completed Audio version ofSoft Skills: The software developer’s life manualand same after completing of new-skills/books/courses I go with a blog-post, Because I always feel that you can never observer whole book by reading it once and you always need to re-learn things over time because sometimes to learn really new things, you also have to forget  some of  the stuff to learn some of new things as well, And I guess that is one of the most important thing I learned over last few years after my College. So writing a Blog-Post is one of thing I do to Enhance/Validate/Preserve new learnings.

When I first saw John Z. Sonmez on Youtube My first thought was like ” He is so fit, Is he really Software-Engineer” 🙂 How wrong I was.

You can get connected with John here.


Ok here comes the Validation of Knowledge about the book mentioned above. You can also use this blog-post to get Excited about book and add it to your Reading List. I am sure you will feel that here is something so common but fresh-about this book, As I am feeling right now that may be I will always read/listen this book at-least once a year.

Be a Specialist: Special Skill is like Brahmanda Astra.

it really does not matter how much you are curios about new technologies but there must be one skill that you will be so good that you can represent yourself at top 1% in your Area/Geo-location/Company/Industry and make sure while doing good amount of work using that skill your produce more Quality than quantity. Alongside that special-skill you must be knowing about sister technologies of that particular skill. There is one more another important thing to remember and that is “Don’t get religious about any particular Technology. “

Learn to Sell yourself High Enough.

Selling yourself only means “Be so great so that nobody can ignore you” but that also does not mean you must write code and build great-softwares by sitting 18-20 hours for day in your basement. You must have off-line as well as on-line good circle of Professional and Merchants in your life. You must have good amount of blog post about the skills you you have learned over time alongside the skills you are learning now due to that you would be so connected with the outside world and most of the people would be knowing that what you really are doing in life.

 Salary Negotiation: It’s always good to negotiate because your Employer know that “It’s good to bargain”

When it comes to salary negotiation it is true that you must be able to know how much you are worth as well as how much more money you need except from your living Expenses. No doubt if you have reached at the level of Salary-Negotiation that means you have already know how much Employer could offer but it never hurts to take that “Moment into bit more negotiation”, Now may be A question could be arise in your mind and that is How really I have to do that? Believe me I am not the guy who can explain it so good as John has descried in the book. So read the book. If you are fan of Audio-Books then Let me know, I will send you Audio version of that book But you will only able to get it free if this is your first book on

Investment and Saving: Let your money work for you and you just be sit around to see it is growing. 🙂

So It is really easy to do actually, You just need to understand How much you are able to save and how much you really can do with that saving, Confusing? Money sitting in Bank has no value until or unless you are able to make more of that than Banks do make, and how is that thing possible? There are Wide range of options one can go for like Options-Trading, Futures-Trading, Real State Investment, Making/Investing in one of your own Software Product and many other things. 🙂

For more information about Stocks and Futures please follow the following Articles:

View story at

Body and Mental Fitness: The way you look, The way your brain does lot of work for you. 😉


There must be really good work-out routine we have to follow/do unless or until you really are not interested growing your brain over the time, Yes that is true only because you have Pump your blood almost everyday and you also have to burn fat, So start running and going to Gym because it is the only way you can not just make your body healthy but also sharp your mind over time.

Diet and Nutrition: You are what you consume.

There is nothing much to say about Diet and eating habits, But make sure you are eating less calories whole day because you have to sit for the most of the day. 🙂

Power of Persistence: Hang in there!

Things work as much as you are staying there for things to make work. Sometimes it takes some time for the results to show up but at some level you have to wait more and let the things fall into the place.

Special One: How money Works.

I never expected John will also talk about great things about Money and Capitalism as well, To understand this you  must have to learn so much stuff and I might not be the person to tell you on this short post that how money works and how you should take it into account. Simple thing about Money is Banks are creating lots of vitalized clusters to generate/initiate the flow of money among different countries and different inside different industries.

%d bloggers like this: