dgplug member blogs


Read the latest posts from dgplug member blogs.

from mrinalraj

Today I am very much excited to share with you my first song video on the Dgplug platform via YouTube 'Zara Zara'.

Do you know what gives more satisfaction in life? Is it academics or getting an engineering degree? ;D Mostly it is Nurturing your skills and finding a platform to present yourself.

For me publishing my song gives me more satisfaction. In the end, when the time will come to retire it will not be the CGPAs but the risky path in chasing your passion and the crazy things we did with friends that will keep us smiling :)


from pradhvan

I have been writing Go on and off again for some months. Never got into writing full time or at least daily. At my day job, I write Python, and most of the time besides office I end up writing/reading Python again.

Recently saw Parthvi Vala's twitter posts around #100daysofGo and I did like the idea to follow it myself.

Here are some rules that I would follow for the next 100 days:

  1. Write go for at least 15 min day.
  2. Read go for at least 15 min a day.
  3. Rule 1 can be taken separately for 30 min a day.
  4. Rule 2 cannot be taken separately for 30 min a day.
  5. Update the blog with daily progress.
  6. Update Github repo, TheWayOfGO with daily code updates.

Day – 1 : 6, October 2020

Picked Learn Go with Tests started with the Hello World program. Also wrote some tests and subtests for the program.

Day – 2 : 7, October 2020

Learned various data types and wrote some code around iterations. Added tests for iterations and a basic benchmarking test.

8, October 2020 Skipped: Had gone out couldn't manage time. Need to better plan the day

Day – 3 : 9, October 2020

Read about array and slices. Wrote some basic programs around counting the sum of array and slices with some basic tests for the program.

Day – 4 : 10, October 2020

Read The Go Programming Language chapter on composite types. Finished Arrays, Slices, and Structs. Wrote some basic programs involving composite data types.

11, October 2020 Skipped: Did not plan out the weekend well. Created a work journal entry about #100daysofGO so hopefully will be regular at it.


from mrinalraj

Yesterday on 1st October was the Foundation Day of The Scriptink. I always imagined how easy it seems to maintain the project made apart from the idea of any normal college projects. The audience always sees only the result and not the path. Coming to the point, Me being in Scriptink I came to know how hard is it to keep maintaining the consistency. U may be wondering, consistency in what way.

Definitely, You would be following our Scriptink through the app, youtube LinkedIn page. More than 2 years of consistency in posting the monthly short videos is a great achievement in itself. This is what the audience sees. But inside a team is working day and night to make this 2 min short video possible.

Not much to say, but Scriptink is all about us and not about I.

Click on this to experience the 2 years journey with us


from mrinalraj

It was one of the best decisions to invest some time with DGPLUG summer training 2019 as I partially owe them my job.

During my virtual on-campus interview, I mentioned what I did during my summer vacation and bonus skills like blogging, helped me land an offer in a multinational company with a networking role.

I was asked what are my hobbies. Mostly everyone begins to answer like I love to sing and so on... I began explaining to them about my blogging and to prove them I briefly shared the story about Edward Snowden and the Internet's Own Boy, Aaron Swartz, which gave me an edge over other participants.

Once again, Thanks DGPLUG :)

Would love to connect with you.


from mrinalraj

Every year JPMorgan Chase & Co. conducts Code for Good Hackathon at a large scale to hire fresh graduates from the engineering college which every student keeps an eye on...

Luckily, I was one of the shortlisted candidates for the current Code for Good Hackathon 2020. This article is for my friends who are waiting for some insights on their upcoming CFG Hackathon.



Key Points:

  • The first day was mainly for jelling up with teammates. You need to express what you are good at and decide among teammates to come up on the same page.
  • The ** second-day**, I liked it the most. That was a workshop on technical skills like a web page and Git usage. Also, it's better if you have early knowledge of git and you should at least have an idea on how to solve the merge conflict.
  • NOW, the third day, THE D-Day, Basically the main Hackathon where you will Brainstorm + Code will be of only 24 hours.

Try to focus on developing the main requirement posed by the non-profit NGO's. Keep on updating about your work to your teammates and mentors so that they can help you if you get stuck on it for more time.


Schedule for 3 days Hackathon

Skills to focus:

  • Communicate effectively with teammates and mentors. As we all the sailors with a common goal to reach the surface.
  • Knowledge of HTML, CSS, Bootstrap + any app-related knowledge is plus.
  • Knowledge of SQL and XAMP server.
  • Basic knowledge of git push, git pull, git merge, and ability to solve the merge conflict. It is advisable to try collaborating on a dummy file with your friend before entering into the hackathon.

Our Presentation on The Nudge Foundation: Click here for Presentation and Demo


Hackathon is not only for hacking into problems but also knowing new faces, sharing stories, and building memories.

The End is the new beginning


from pradhvan

Last weekend I attended EuroPython sprints that were virtually conducted. The communication platform for the conference was discord and was kept the same for the sprints too. It served a good platform as we were able to pair program with the maintainer by sharing our screens.

Day 1

Sprints opened at 12:30 PM IST and started with its first round of project introduction. A total of 12 projects that took part in this year's sprint. Though the project maintainers were from varied timezone and timezones are difficult to handle. The first opening of sprints only had a few maintainers of the project to talk about their project.

The project that I started off in the day one of the sprints was terminusdb. I primarily contributed to terminudb's python client which had Cheuk Ting Ho and Kevin Chekov Feeney to help us out. Kevin had coded the JS Client of the project and was here to work on the Python Client.

The issue I picked up was increasing the test coverage of the project and while working on that issue I also discovered some other issues. Some depreciated function was still being used in the client and the make file did not have a command to generate coverage HTML of the project.

By the end of day one, I had moved the coverage of terminusdb_client/woqlclient/connectionConfig.py to 70% from 62% with a PR to remove the deprecated function from the client. Doing that I learned about graph databases and how terminusdb has git like features for the database.

Day 2

I started late on the second day and continued to work on the test coverage PR. I fixed some minor flake8 errors in my test coverage PR and pushed to coverage to 75% and created a PR for that make file command. A lot of people in sprints were confused in setup of project. So opened up a documentation issue for writing the wiki for setup instructions and contributions guidelines for new/first time contributors.

Just an hour before the first closing session I moved to scanapi which is maintained by Camila Maia. I picked up some good first issues and got them merged in no time. I saw this project at the closing of the day-1 and found it very interesting.

The other projects that I really found interesting but could not contribute to were Hypothesis, strawberry GraphQL and commitizen.

Overall I had a really fun weekend and I am excited to contribute more to those projects.


from sandeepk

Today go through the commands to monitor processes and how to handle them

  • ps – It reports the snapshot of the current process
  • init- It the parent process of all the processes.
  • pstree – Same as ps but list the process in form of tree with more details.
  • top- List down all the process running, update the snapshot after a while.
  • Kill – it signals the process
    • INT – 2 -Interrupt, stop running
    • TERM – 15 – ask a process to exit gracefully
    • KILL – 9 – force the process to stop running
    • TSTP – 18 – request the process to stop temporarily
    • HUP – 1 – Hang up
  • nice – Every process run has priority and with nice we can control this priority, it ranges from +19(very nice) to -20(not very nice) decreased niceness higher the priority
  • renice- change the priority of the existing process

>> top
PID  User  PR  NI  VIRT     RES     SHR     S  %CPU %MEM Time+ Command
3911 user  20   0 2855988 206872 141304 S  72.2  2.6   7:15.09 Web Content                                                                       
31980 user  20   0 3703988 509176 188188 S  33.3  6.3  49:36.10 firefox                                                                           
 2839 user  20   0 2834092 191744 128268 S  27.8  2.4  16:13.39 Web Content    

  PID TTY          TIME CMD
 2418 pts/2    00:00:00 zsh
 4318 pts/2    00:00:00 ps

>> pstree | less
        |                |-dnsmasq---dnsmasq
        |                |-{gdbus}
        |                `-{gmain}
        |                 `-{gmain}
        |-at-spi-bus-laun-+-{dconf worker}
        |                 |-{gdbus}
        |                 `-{gmain}
>> nice -n 10 long-running-command &
>>renice 20 2984
>>renice 15 -u mike # changing  niceness for all process of mike user
>> kill -9 PID

#shell #dgplug #ilugc


from sandeepk

Today was the day with the commands grep and sed.

  • grep – command used for the patter matching it have many useful options

    • -i: to make case-insensitive search
    • -r: search through the file in dire recursively
    • – l: print the name of the file with matching string
    • -c: print the counts of match
    • -n: numbers the matching lines in the output
    • -v: it's like not condition, print the reverse of the condition
  • sed – its read the input lines, run script on them, and writes them to stdout. This command is good for the string replacement and editing of the files.

Both these commands can be used with regex for the pattern matching.

>> grep -nv  ^# \| ^$  /etc/services |less
# will list all the lines from the file with do not start with *#* and ends with an empty line.

>>sed ``s/UNIX/LINUX` file.txt

# sed command will replace the occurrence of the *UNIX* word with the *LINUX*

#shellrun #dgplug #ilugc


from sandeepk

Today was the day of basic File Management, Pipes, and Redirects. So let's jump to the command's

  • mkdir – create a directory for you, -p will create the parent directory if it does not exist.
  • rmdir – remove the empty directory
  • rm – remove the files and directory with -r.
  • pushd & popd – this one is the new command I came across, it let you save the previous command and you can pop that command with popd when you require. Dirs let you list down the directories you can pop back too.
  • file – tells you about the format of the file
  • ?, * – these are the wildcards which help in pattern matching, '*' for any number of character and whereas ? for only one character
  • | – called as pipe, it takes the output of one program and gives as an input to another program
  • Redirection (<, >) – < this indicates to file to read input from, > this indicates the file to write output to.
  • >> – Appends the output to the end of the file, If the file does not exist it creates a new one.
  • File Descriptors – Standard Input(0), Standard Output (1), Standard Error (2), make sure to check the example below to see how you can use them
  • xargs- it read a text and pass them as input to the following command
  • tee – is a combination of > and | and let you copy data from the input to the output or a file

Now let see these commands in action

>> mkdir -p chess/pieces/board # create an directory for you.
>> rmdir -p chess/pieces/board # will delete whole path if no other file or dir exist
>> pushd /media/USB # will let you save this path
... # any command you run b/w
>> popd # this will get you back to the pushed path
>> dirs # list all the dir path saved
~/bash-trail ~ / ~/Code/tranzact ~/bash-trail/program

>> file shopping_list 
shopping_list: ASCII text

>> whoami | rev # will reverse the output from the *whoami* output

>> last > last-login.txt # will save the output of login user to the file

>> wc < last-login.txt # will pass the text from the file as input to the *wc* command
>> program 2> file # will write the Standard error from the program to the file. **File Descriptor**

>> find /media/USB | xargs -l 3 rm -f  # this will pass files for USB dir and xargs will pass the 3 filenames at a time to remove them.

>> last | tee everyone.txt | grep bob > bob.txt
#  To save details of everyone’s logins and save Bob’s in files also.

#shellrun #dgplug #ilugc


from sandeepk

Today run through the commands to process the Text streams from the shell.

  • less – command let you show less content from the file you are viewing.
  • sort – helps you sort the output, -f let you do sort case-insensitive and -n numerical sort.
  • cut – help to select the fields(-f)/character(-c)
  • fmt – format the output of the file, you can specify the width with -w
  • tac – similar to the cat command but in reverse
  • sed- this command use to process each line of file with a script

let see these command in action

>> less hello.txt
Hello World
THis is a text file
hello.txt (END)

>> cat shopping_list 
fish fingers

>> sort shopping_list         
fish fingers

Thu Jul  9 00:21:17 IST 2020

>>date | cut -d " " -f1

>>cat COPYING |  less  
The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed

>> cat COPYING |  less  | fmt -w 30
The GNU General Public
  License does not permit
  incorporating your program

>>cat copybump.py
#! /usr/bin/env python3

import datetime
import os
import re
import stat
import sys
if __name__ == '__main__':

>> tac copybump.py
if __name__ == '__main__':
import sys
import stat
import re
import os
import datetime

#! /usr/bin/env python3

>> sed -f spelling.sed < report.txt > corrected.txt # correct the spellling mistake in report.txt and output the correct text in corrected.txt

#shellrun #dgplug #ilugc


from sandeepk

This post and the continuing post will be post/notes to share my journey of going through the shell to brush the commands which I forget and to learn some new ones.

So here one or more things I learned today. * !! – will show you the previous command. * ! String- show's the last command with the given string. * !$– will give the last argument of the previous command * !^ – will give you the first argument of the previous command * ^String^replacement- will replace the first occurrence of the * String* with the replacement string. * Ctrl + A – will get you to the start of the line. * Ctrl + E – will get you to the end of the line. * Ctrl + D – will delete the current character, even can close your shell session :). * For loop – yup we can write for loop to certain repetitive actions. * Locate – can help you to search for the file/s in the drive. * file – it not only help you with the file search just not based on the name but has many options to perform on the result and you can use regex for the file search also.

Now let's dive into some cool example

>> ls
>> clear
>>!! # will refer to the previous command
>> clear
>> !l # refers to the previous command start with a given string in our case `l`
>> ls
>> cd Documents
>> echo !$ # will refer to the *Documents* args from the previous command, same will be the case with *!^*  which refer the first args of the previous command
>> ls
>> echo !$
>> echo ls
>> echo Documents
>>for file in *; echo ${file}; done # try to run this in the shell to see the output


#shellrun #dgplug #ilugc


from pradhvan

I recently stumbled across a very peculiar topic called Bit Manipulation. In most of my programming days, I haven't actually relied on the binary operation to get me the result, I know under the hood everything is converted into 0's and 1's but it was all abstraction to me.

The case was different here. While working with Bit Manipulation, I had to actually rely on arithmetic bit operations to get me to the result. So it became real interesting real soon.

Bitwise operators

Basic operation done on bits are done with bitwise operators. Since we primarily work on bits these operations are fast and are optimized to reduce time complexity.

The first three &, | and ~ are fairly straightforward. So I would briefly go over it.

&: if both bits are of equal size than & operator would compare each position and would return True/1 if input bits are True/1. Similarly for False/0.

    6       : 1 1 0
    5       : 1 0 1
            -------- &
              1 0 0

|: if both bits are of equal size than & operator would compare each position and would return True/1 if input bits differ. Similarly for False/0.

     5       : 1 0 0
     3       : 0 1 1
            --------  |
              1 1 1

~: Not operator just compliments the bit it gets. In fancy computer lingo it gives one’s complement of a number.

    5       : 1 0 1
            -------- ~
              0 1 0

Now coming to more interesting operators:

Operator Name
>> Right Shift
<< Left Shift

If two bits are of two equal-size ^ of both bits in the compared position would be 1 if compared bits are of different binary and would be 0 if bot the compared bits are the same.

    6       : 1 1 0
    5       : 1 0 1
            -------- ^
              0 1 1
  • XOR of a number with itself is 0

    x = "Any int number"
    (x ^ x) == 0
  • XOR of a number with 0 is number itself.

    (x ^ 0) == 0
  • Ordering in XOR does not matter, both will give the same output.

    output = (7 ^ 3) ^ (5 ^ 4 ^ 5) ^ (3 ^ 4)
    output = 7 ^ (3 ^ (5 ^ 4 ^ 5)) ^ (3 ^ 4)

While discussing Left Shift,<< and Right Shift, >> we will be talking about arithmetic shifts.

Left shift <<

  • Left shift shifts the binary digits by n, pads 0’s on the right.
  • Left shift is equivalent to multiplying the bit pattern with 2 power k( if we are shifting k bits )
1 << 1 = 2 = 1 * (2  ** 1) 
1 << 2 = 4 = 1 *(2  ** 2) 
1 << 3 = 8 = 1 * (2  ** 3)
1 << 4 = 16 = 1* (2  ** 4)
1 << n = 2n

Right shift >>

  • Shifts the binary digits by n, pads 0's on the left.
  • Right shift is equivalent to dividing the bit pattern with 2k ( if we are shifting k bits ).
4 >> 1 = 2
6 >> 1 = 3
5 >> 1 = 2
16 >> 4 = 1

Both Right shift and Left shift operators come real handy in masking.

Masking allows the user to check/change a particular bit at a particular position.

Some of the common functions associated with masking are:

Set Bit
  • The set bit method is generally used to SET a particular with 1.
  • To achieve this we would need to create a mask at the particular position where we want to SET
  • The mask can be created with the help of the << if the left shift operator.
def set_bit(x, position):
    mask = 1 << position
    return x | mask

  • In the above code snippet we are SETing the bit at 0th index.
    masking = 1 << 0 = 1 * (2 ** 0) 
    6       : 1 1 0
    1 << 0  : 0 0 1
            -------- |
              1 1 1
def is_bit_set(x, position):
    shifted = x >> position
    return shifted & 1
Clearing Bit
def clear_bit(x, position):
    mask = 1 << position
    return x & ~mask
Flip Bit
def flip_bit(x, position):
    mask = 1 << position
    return x ^ mask
Modify Bit
def modify_bit(x, position, state):
    state is param that tells us to set a bit 
    or clear a bit
    mask = 1 << position
    return (x & ~mask) | (-state & mask)


Bit manipulation can be used to solve problems that you are familiar with but necessarily don't know about. Here are some of my observations that I noted while using bit manipulation.

To check if the number is even
  • & ANDing the number with 1 gives 0 or 1 — 0 if it's even — 1 if it's odd
x = "Any int number here"
(x & 1) == 0

Practice Question

To check if the number is a power of two
  • If a number is x binary representation of (x-1) can be obtained by simply flipping all the bits to the right of rightmost 1 in x and also including the rightmost 1.
Let, x = 4 = (100)2
x - 1 = 3 = (011)2
Let, x = 6 = (110)2
x - 1 = 5 = (101)2
  • x & (x-1) will have all the bits equal to the x except for the rightmost 1 in x. In the given example below the values enclosed in || are the same for both the x and x-1 if x is not the power of 2.
  • If the number is neither zero nor a power of two, it will have 1 in more than one place.
Let, x = 6 = 1|1|0
(x- 1) = 5 = 1|0|1

Let,x = 16 = |1|0000
(x-1) = 15 = |0|1111

Let,x = 8 = |1|000
(x-1) = 7 = |0|111

Let,x = 23 = 1011|1|
(x-1) = 22 = 1011|0|
x = "Any int number here"
(x & x-1) == 0

There are a lot more things that can be done with just bits and are definitely not limited to the above observations. Try to find your own observations. Happy coding!


from pradhvan

I recently finished reading Python Testing with Pytest by Brian Okken and I am glad I picked this up rather than jumping into the docs. It's definitely a good introduction for people who haven't had their share of testing a python codebase, let alone be with Pytest.

The book introduces a python CLI called Tasks and takes this as a base for writing all of its tests throughout the course of the book. Though eventually, the tests become more complex when you get into the latter half of the book.

The pros of the book are that it covers almost every section of the framework from fixtures, plugins, custom pytest configuration and even using pytest with tools like coverage and mock. But if you're someone like me who hasn't had his share of testing a python codebase you might find yourself with a bit of information overload at times.

I did find the book a bit of overwhelming on chapters like writing your own plugin, custom configuration and using pytest with Jenkins because these are the features that I wouldn't be using right out of the box. I would definitely be coming back to these chapters in the future if I need any of the features.

Overall the book is really well-written keeping in mind beginners who are just picking up pytest as their first testing framework and also for folks who are moving towards pytest from any other testing framework. Exercises at the back of every chapter make sure you also get some hands-on experience of writing tests.

Just a personal tip for anyone who is picking this up and has less experience with pytest. Feel free to skip chapters or skim chapters that aren't useful right out of the box. You can always come back to them when you need those features.


from pradhvan

2019 has been a year of new beginnings both personally and professionally. This was the year I got my first job, the first salary and on the contrary to that, I did give my first resignation. Yeah, that was fun!

This blog just highlights most of the things I did in the previous year.

Blog Posts

I did post out 8 blogs this year. I know it's not that much. Initially, I had planned one blog a month. But by the end of the year during the time I was giving interviews for the new job things started to fall and I could not commit to one blog a month.

The plan for this year is to blog more or at least be consistent with writing. Stick to at least one blog per month.


The previous year was a good reading year compared to the last few years. The Kindle I bought came real handy during the long metro rides. Plus I got some tech books cheap compared to their paperback prices so I did finish some of them too.

This year I started to take up reading non-tech books a bit more seriously. So I am picking up a book a month and finishing it slowly. Keeping in consideration that the book is less than 800-1000 pages for the initial months just to help in making a momentum.

Recently finished Parliamental and will be moving to The Elephant Vanishes.


I did give one talk at PyConf Hyderabad 2019 one of my favorite regional conferences in India. I also did submit one for a PyDelhi meetup but sadly by the time, it was scheduled I had already relocated. More on that later.

Open Source Contributions

One of the major things that I want to work towards this year is towards making more upstream contributions.

Last year I did submit two document patches to one org aio-libs . The project was aiopg, async version of Postgres but that happened by sheer luck. As I was going through the documentation I found some of the documentation to be using old-styled decorator based coroutines instead of new async def function. So I submitted a patch to update them.


from abbisk

Free Software

“Free” software “is software that can be used, studied, and modified,” copied, changed with little or no restriction, and which can be copied and redistributed in modified or unmodified form. Free software is available gratis (free of charge) in most cases. “In practice, for software to be distributed as free software, the human-readable form of the program (the source code) must be made available” along “ with a notice granting the” user permission to further adapt the code and continue its redistribution for free. This notice either grants a “free software license”, or releases the source code into the public domain.

Open-Source Software

In the beginning, all software was free in the 1960s, when IBM and others sold the first large-scale computers, these machines came with software which was free. This software could be freely shared among users, The software came written in a programming language (source code available), and it could be improved and modified. Manufacturers were happy that people were writing software that made their machines useful. Then proprietary software dominated the software landscape as manufacturers removed access to the source code. IBM and others realized that most users couldn’t or didn’t want to “fix” their own software and There was money to be made in leasing or licensing software. By the mid-1970s almost all software was proprietary “Proprietary software is software that is owned by an individual or a company (usually the one that developed it). There are almost always major restrictions on its use, and its source code is almost always kept secret.” users were not allowed to redistribute it, source code is not available users cannot modify the programs. Software is an additional product that was for sale In 1980 US copyright law was modified to include software In late 1970s and early 1980s, two different groups started what became known as the open-source software movement: East coast, Richard Stallman (1985), formerly a programmer at the MIT AI Lab, launched the GNU Project and the Free Software Foundation. “to satisfy the need for and give the benefit of ‘software freedom’ to computer users ultimate goal of the GNU Project was to build a free operating system the GNU General Public License (GPL) was designed to ensure that the software produced by GNU will remain free, and to promote the production of more and more free software.


from mrinalraj

GroupPhoto Give respect to what you love and you will find the way to get it out to the world. Today I want to share with you my journey conducting WRITOFEST 2k19.

  • Establishment of app : We had a very solid idea but an uneven path on how we will implement this idea which was to make a platform for the readers. Our idea was unique as there were no such platforms where through the app users can get a quality quote and Shayari as the market was operating on the users' content.

  • Came up with daily writing contest idea As it was obvious that we had to face low user engagement in the beginning so we came up with the idea of “Daily Writing Contest” which gives the users a chance of getting featured on the wall of the Scriptink app under the title “Best writing of the day”. Fortunately, it worked, writings started coming. It was at this time we came in touch with various writers whose writings could become a part of the Scriptink Family.

  • Getting recognized as college group. There was a lot of confusion about whether opening a college group will distract us from our objective but in the end, we formed it intending to build a team that will continuously work for improving the product.

  • Came up with Writing competition. After being recognized as a college group first we need to conduct an event to establish our existence in the college. The “WRITOFEST 2K19” was our first National level Literary Fest.

  • Came up with the idea of including Poets Scriptink started walking on the path less traveled by. Including the events featuring famous poets was one of our masterpieces. But the path was not as easy as always. Contacting distinguished poets like Javed Akthar, Chetan Bhagat was full of fun and was like getting goosebumps every second with the excitement that we had talked with these celebrities.

  • Digital marketing Our digital marketing was damn too good. We somehow managed to get it posted on the INSTA and FB pages of Jai Ojha sir who had followers nationally. It was like WOW moments for us.

  • Sponsorship Some part of our event was college-sponsored but our budget requirement was much more. So we needed sponsorships. At some places, we got disappointment where they were ready to give support but later it didn't correspond with our college terms.

  • Conducted the event successfully The 10-day rigorous reach-out campaign resulted in having Jai Ojha sir(Poet), Alok Puranik (Satirist), Parameshwaran PS(Ted Speaker) as our chief guest. And the event went smoothly the better than we expected.

Our team spirit made impossible things possible. To which we will always pat ourselves.