Wednesday, September 26, 2018

multiple termnial at the same screen - Ubuntu

I started using multiple screen in my office to do multiple tasking. I thought it was not going to save my time  and efficiency. But I experienced that it was highly improving my work efficiency. I was able to finish my tasks quickly without much tiring when doing multi-tasking.

But when i reach home and open the laptop, its highly difficult for me switch between screens.

So I was searching for a tool where i can create multi-terminal on the same screen.

you can use terminator

the installation is simple

apt-get install terminator

open a terminal and type
$terminator 

you will get a terminal open by terminator , then you can split it using ctrl +shift +o





Monday, August 6, 2018

Rust on Amazon EC2

Amazon EC2 is very popular nowadays. So wanted to try something with EC2., not sure how much its going to cost me .Usually I stop amazon experiments when I reach the credit card page. :-)

This time really wanted to try what is EC2.

I took the basic plan and lauched a Ubuntu server and installed Rustc, cargo and gcc.

Its really exciting to login to remote machine and experiment some really  installation and programming as we do in our local machine.


Tuesday, July 17, 2018

managed to write a file from terminal input - Rust

My Text editor program in Rust programming language managed to get input characters from screen terminal as created a file once program ends.

Read the code here
https://github.com/davnav/RustEditor/blob/master/main.rs


If I started writing this in C, i would have end up in "Segmentation fault". But even though Rust compiler makes you learn the syntax and new concepts ( mutation,scope,borrow etc) . But once we managed to compile the code, the program produces the output as we expected.(won't go to the buffer overflows or pointer problems)

Terminal is not pointing to left most position when I hit enter, looks like I need to handle this manually.




I have not build any 'struct' for 'Editor' or 'Rows'. Not sure much syntax for 'struct' in Rust.  Reading more this now.


 I think I can move to the 'text viewer' pages in the below documentation.
https://viewsourcecode.org/snaptoken/kilo/04.aTextViewer.html

Monday, July 9, 2018

Finally refreshed the terminal screen

It was always a big question in me that all schooling/engineering  programming  courses( C or assembly)  teach Fibonacci series or some tough logic program ( something like for a given number 'N' search the subset bla bla .. ) . But when I looked at the computer , I wondered how they build these screens/commands and applications.. is it with Maths ?  is it with Fibonacci series /prime numbers? (They are not, it made up of simple logics.. but its like a 'building blocks' game)

My expectation from computer classes was  to build some screens or applications ,  ( but generally I got bored with theory . there was my fault too , i admit ) . Computer applications/commands  did not look like mathematical problem ,But computer subjects seems to me as  mathematics subject. ( I know they really need maths, when we deep dive).

But as a beginner, I misunderstood that someone who knows deep maths can only do something with computer .. but actually that is not the case.

Whatever programs I studied/taught to  do something with stdin ( standard input) or stdout( standard /the screen), are something like 'reverse string' or 'search character', but they did not generate any motivation to build some real world applications, rather I got scared even to attempt/read big programs, thinking it might require big logical algorithms that my brain can't digest.  but as student I always wanted to build something like 'vi' (editor) or some commands or something having windows (not Microsoft windows) screen. At least I wanted to know how these functionalities are coming in the screen.
When I build some functionality that actual 'vi' editor has , I feels like I am writing programs as a professional (Really its not the case)

Having said all these story :-)  as a hobby project , I am  trying to build an editor based on the documentation https://viewsourcecode.org/snaptoken/kilo/03.rawInputAndOutput.html

I am learning lot of things when I wanted my program to do some functionality that 'vi' editor does.

More over I am trying to build this in Rust language  which is a new generation  computer programming language , capable of replacing 'C' language. Every system programmers should try to learn it as per http://web.stanford.edu/class/cs140e/

:-)


My text editor draft , just refreshed the screen :-)
https://github.com/davnav/RustEditor



The clear screen functionality can be easily built with below code, but it was never known to me ( as I know only Fibonacci ... :-) )

// Refresh the screen by writing "x1b[2J" byte to screen
io::stdout().write(b"\x1b[2J");
println!();

// align the cursor to the left top by writing  "\x1b[H" byte to screen
io::stdout().write(b"\x1b[H");



but be aware , Rust compiler is ruthless :-) . it makes us read the documentation thoroughly.










Wednesday, July 4, 2018

do we need to take care 'String' type carefully ?

When I tried to do something with "Strings" in C programming language, either it won't give the desired result or I end up in 'Segmentation fault'. Lot of books in C show "Strings" manipulating with pointers. I like C in the sense  that we can access the characters with the memory where they sit. But when  I compile the full program, it compiles without any error , but finally  when I run it , normally I endup in "Segmentation fault".


So thought of learning some string manipulation/Methods in Rust Programming language.

https://doc.rust-lang.org/std/string/struct.String.html#method.from




Friday, May 25, 2018

Rust-lang learning continuation...

I tried to start again to read on the Rust-Lang tutorials . I thought , i can start with web development in Rust. Usually I directly jump to advanced side of a language and stop it in a few days :-).  Most of the languages I tried that way are ok to start, But Rust is a little more difficult .

For Rust , directly jumping to web development is really tough without understanding the basics. But I am not going to change that method.( really its like ,going back and forth )


Rocket is similar to Flask or Django .. but Rust syntax is killing me.. I can't blame Rust, as it is trying implement safe code.  Rust compiler is so rude, seems like  it won't allow me to compile a single program :-)

Todays learning:




&'static str

"This basically reads as "a reference to a string slice with the lifetime of static", which means that the string has a lifetime of the global scope"

& is familar symbol for programmers, it is used to reference a variable. Generally to get the address of variable .

just refreshed here - https://www.cs.fsu.edu/~myers/c++/notes/references.html

But what is  ' symbol , this is something new to me. it is the lifetime. other programming languages have the scope of the variable. But those languages compilers are not always smart enough to understand the scope of the variables or in other words Rust-lang push to define the life time of the variables for each functions. ( From this, I hope compiler can do the garbage collection by itself)

read more: https://www.quora.com/What-is-the-meaning-of-in-Rust









Sunday, January 21, 2018

Crates and Modules in Rust Language

I was trying to jump into Rust programming language through Rocket web framework. I know it might be a tough attend to directly start with Rocket without much understanding on the Rust syntax.

I believe I have a minimum understanding on Rust syntax and I thought let learn it reverse way , whenever something comes strange or unknown ,let go reverse and goto the basics.

 So, with that strategy when I jump to Rocket , I came across lot of new things.. Ofcourse Rust has lot of new syntax , terminologies. But since I had some prior knowledge on Flask,Django web frameworks, I did not stunt by the folder structures and initial quick start steps.

but it is really fun learning it in reverse way, lot of new things to understand.

One thing was Crates and Modules. It not a new idea, but it a new term and building it in Rust is quite easy.

We have a good documentation from these from Rust developers.

As per my understanding,

If you know python, we will be using packages there. Similar way we can use Crates to build modules and import them into our program.

I hope below documentation will be enough to read through it and try it.

https://doc.rust-lang.org/book/first-edition/crates-and-modules.html

https://rustbyexample.com/attribute/crate.html

Saturday, January 20, 2018

Books reading as a Hobby

First of all, I haven't read any book completely apart from normal curricular. But I read online computer articles and blogs very seriously last a few years. I am finding it as a brain taking process.But its worth reading those technical articles and understanding them. Mostly I follow youtube, I need some demo to start with something rather than just reading and understanding.

I don't know I need take other books like literature,fiction,philosophy as well or stick with (focus) more on the technical stuff alone. I bit confused , but i believe now its essential for me to start reading some other(non technical books) as well ( because not sure how to spend time).

But I know, diverting the focus from technical articles and blogs will be disaster for me.

Wednesday, November 1, 2017

How to get the Steemit 'followers' for an account using Python Piston module

You can get steemit followers using python program.This is fun and learning experience to understand steemit and blockchain. Read more technical details here. https://steemit.com/steemit-dev/@naveendavisv/4-how-to-build-steemit-applications-with-piston-python-module

Monday, October 16, 2017

Bitcoin/crypto currency JSON format data extract using python programming

This progarm we try to extract the data on every 15min from https://coinmarketcap.com/api/  to mysql database using python program.

How to get bitcoin json data using python

1.https://coinmarketcap.com/api/
Get the api details
2. create a python program


json object format:




Bitcoinurl.py







3. create table in mysql

if you need to know more about mysql go through https://dev.mysql.com/doc/refman/5.7/en/creating-tables.html





4.crontab to schedule every 15min. You have to identify user python program location and give



Watch the video tutorial below.

Thursday, October 12, 2017

Started a steemit

Started a steemit blog @naveedavisv too, that doesn't mean that I am moving out from here.
I have started reading more about decentralized applications and crypto currencies,so thought doing some articles in steemit.
I will keep doing my technical posts here too.

Sunday, September 17, 2017

Anaconda tensorflow installation and set up environment through command...

Python + Anaconda+tensorflow in Linux

I would say that the best way to learn datascience and machine learning is through installing Anaconda in your linux system.

You can set up your tensorflow very easily .It is very easy to setup anaconda environment through command line.


Friday, August 4, 2017

Android application development

You can take android application development as a hobby because there are lot of new concepts, I can assure that it is a good learning experience. I thought good java knowledge is needed to start it, but with minimum java knowledge you can start with it and in fact that will improve your java/xml knowledge once you start developing applications from different tutorials available..

Wednesday, July 26, 2017

Naveen Davis youtube Channel

How to make video tutorial for Free:



step1: In Ubunutu ,first install 'RecordMydesktop' software

step2: install 'Cheese' software , you can install it through ubuntu software center. This will show your face/video in the corner while recording Desktop

step3:Install 'Audacity' software , to remove noise in the recordings.


step4:Install Pitivi(video editor) , if you want to combine/merge the video file and audio file (noise removed) together.







Friday, July 21, 2017

Mobile computing android -Introduction lecture 1

Why isn't int = 16 bits in C language always?

I know C is machine dependent or compiler dependent . The sizeof(int) might returns different in different machines or hardware ? Is it really hard to make machine independent C ? we need to really have jvm concept ? why there is no CVM( C virtual machine) :-) ???

Sunday, July 9, 2017

Google Android App using Android Studio

This is just took 5 mins to map my place in a simple Android application. Android studio is something everybody should try...



watch below videos to start with..

Saturday, July 8, 2017

Building android app

I think 'Android studio' is a good tool to play around. It can build some application within hours.

I drag and dropped some button in minutes (but no functionality for the buttons :-) )and simulated Nexus 5 android device.






Wednesday, June 7, 2017

Super key


If you are using Linux, you know what is 'Super key' ? It is your 'Windows' symbol key. (Now onwards don't call it as "Windows" key)

Wednesday, May 10, 2017

1. Algorithmic Thinking, Peak Finding

Watching this course .... looks interesting,But Theta looks confusing to me :-)





h

Thursday, April 27, 2017

Malayalam Python e-book

I am going dead slow in Python book translation :-)..

https://github.com/davnav/MalayalamPythonebook

I don't know someone else want to join in this Project.. Please free to comment..


Wednesday, April 12, 2017

Malayalam Python tutorial





I made some more progress in the document - Malayalam Python e-book

I am just trying a Malayalam translation for the book written by  Swaroop CH (https://python.swaroopch.com/installation.html)




Tuesday, April 11, 2017

Malayalam article on python programming ..

I just started with translating some of the tutorials about python programming into Malayalam. it is difficult to find the Malayalam letters in Ubuntu.. Below video helped me to start with it. I tried  Latex to configure with Malayalam , but
not succeeded .







Screenshot of First page:t

This page built using LibreOffice writer.

Monday, April 10, 2017

à´ªൈà´¤്തൺ (à´ª്à´°ോà´—്à´°ാà´®ിà´™്à´™് à´­ാà´·)

à´ªൈà´¤്തൺ à´ª്à´°ോà´—്à´°ാà´®ിà´™്à´™് à´­ാà´· മലയാളത്à´¤ിà´²്‍ à´ªുà´¸്തകം à´Žà´´ുà´¤ാൻ à´’à´°ു à´¶്à´°à´®ം.

Installing texlive in My ubuntu Machine

I want to try translating some computer programming books to malayalam...
texlive -latex full packages will give you an opportunity write good looking books.

installation in Ubuntu:

apt-get install texlive-full

I don't think texlive support malayalam fonts,but let me see whether I can copy-paste from some translator.


Wednesday, March 22, 2017

numPy Python module - Revisit

I know that there is a module called 'numPy' in python  from long time before, but I did not care that one much, thinking it is just library for math functions.

If you try to learn Machine learning, then it is important to learn the numPy module as a prerequisite for ML. The calculation in Machine learning functions are build with matrix or column vector manipulations.

I remember that how difficult is it to do matrix manipulations in C programming. Usually it will come as a lab exam in college :-) ( that skill is needed),but if you are really focusing on applications or functionalities , the calculations part should be minimal and easy. Numpy module gives that freedom to focus on the applications part.


from numPy import *

matrix = array([[1,2,3],[3,4,5]])

the above single statement give you a matrix 2 columns and 3 raws.  how cool it is !!!

you can get the matrix dimension with following python statement

matrix.shape

Matrix addition - looks so simple as shown below






if you check the data type for 'matrix' you will get the below -

>>> type(matrix)
"<"class numpy.ndarray="">

Tuesday, March 21, 2017

5 things I find very useful and new in Python programming

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/

 










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 ?'