Posts

Python : Is Just a Hype ?

Image
Python : Is Just a Hype ? Python continues to climb the ranks of the world's most popular programming languages. Following last year's finding by developer hub Stack Overflow that Python was the world's fastest-growing programming language, Python has now claimed fourth place in the TIOBE index for the first time. By the survey conducted by Jetbrains on overall python Developers all over the world many of them use it as a Main Language and also as a secondary language .   Over 9,500 developers from almost 150 different countries participated to help us map out an accurate landscape of the Python community. Python Climbs the tower higher and higher as its versatality is been growing wide .  From the survey we are came to know about that many of the Python Developers are using it in the following order ,  1. Web Development :     It provides a many web frameworks such as      Django  (https://www.djangoproject.com)     Flask (http

Version Control System : about Git , Gogs , Gitea .

Image
Hello World , I am Lazy Swapper , today We conducted Glug meet about Version Control System . What is “version control” , and why should you care? Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. For the examples in this book, you will use software source code as the files being version controlled, though in reality you can do this with nearly any type of file on a computer. Consider you a part of a team creating website for your college event . you have been given a task to complete the frontend for a particular event . At the same time other members of the team will concentrate on some other work . When you complete the system , you will share the folder with your team leader. He will be collecting it from you and from all others for their respective tasks . So there are many copies of the files occur in our system . Which may cause a mess with project . Also consider a si

Backup your data using TAR .

Backing up your data might be a nightmare . While we creating a tarball , we may added another file in to it , Also its a dream to extract a  specific file from it , but its not true , Linux is like a wand with all spells in it . 1 . tar -cf  outputfilename.tar  source_files      eg : tar -cf output.tar *    This will create a tar ball of the files that are present in the current directory . 2 . tar -tf output.tar This will list all the files that are been presented in the tar file . tar -tvf output.tar - to list files with more details 3 . tar -xf output.tar  To extract the files from the tarball . 4 . tar -xvf output.tar filename - filename corresponds to the file in output.tar . 5 . tar -xf output.tar -C location - to extract files in to the location [directory] 6 . tar -rvf output.tar file.pdf - Its simple to add another file into a tarball . 7 . tar -tf -u output.tar file.pdf - -u is for checking the duplicates in the file . So that while using the above comm

TCP Client Server Communication

Image
How do you communicate through internet ? what protocol do you use ? How the connection is established ? Well , today we are going to see about establishing a simple tcp connection between client and the server . In the client side , we are gonna to establish a connection with server (send a request ) For that we need to do 3 things , 1.socket() -- create a socket . 2.connect() -- make a connection with the server . 3.recv() -- for receving data from server .   below picture tells the needs for tcp client . In tcp server , we are going get the response from the client and response to it . For establishing a tcp server connection we need to do 4 things , 1: socket() -- create a socket connection . 2: bind() -- bind with ip , server_address , port . 3: listen() -- listen for any connections that are active . 4: accept() -- for accepting the client request . For video reference : tcp client tcp server

Find Command and its attribute in Linux .

Finding a File inside a collection of files made tough . sometimes you may forgotten the filename , but you remember that you have accessed or modified by last 7 days . You can also find files that you have edited before or after accessed or modifed file . 1 ) To list the files in current Directory .       find . -print This will print all the files in the current directory (mentioned by . ) 2 )Find command is a powerful command line tool and its armed with a variety of interesting options -name argument specifies a matching string for the filename . 3 ) If we want to match either of the multiple criteria , we can use OR option (-o) 4 )  The -path argument can be used to match the wildcards. 5 )To find all files other than some files . 6 ) while finding some files , it will list all of the files that are available in the current directory and all of its sub directory . so we can control it by using maxdepth and mindepth . 7) Finding files using their types either

Dangerous commands in linux that you should never try .

W ait what did you say , Nothing Serious ...... ;-) linux provides its users all permissions some are dangerous in the sense we can't return from executed command . Some of them are been listed below + rm -rf : Easiest way to delete your entire system files and just everything , everything . rm -rf / - deletes everything in the root directory . rm -rf * - deletes everything in the current directory and sub folders . To be safe from it , create an alias 'rm' as 'rm -i'  in .bashrc file in home directory . + Fork bomb :   :(){:|:&};: This piece of code is capable of freezing your system .It create an infinite no of process calling itself . This could be also been implemented using fork() function in C .  While(1) { fork(); }  + mv folder /dev/null :   /dev/null is a BLACK HOLE . Anything goes in it will never come back . We can't retrieve the lost data . + > filename : Just deletes all the content of the file . + s

Download an entire website using wget .

Take a deep breathe , take in , take out ...... ok now you are ready , Downloading an entire website from internet is always been a mirage . we are not able to download the files altogether , But linux is always there to save us and make our work easier . It has something for u , for us ,               Yeah its wget . using wget we are able to download an entire website including its css , js and all static files . Command to execute is wget --recursive --html-extension --no-clobber --convert-html --page-requisites <fileurl> eg : wget --recursive --html-extension --no-clobber --convert-html --page-requisites http://www.fsftn.org it will download all the files and put them in a directory .refer  video