Design a site like this with WordPress.com
Get started
Featured

My First Post on this Blog

I am going to capture my journey here!

Be yourself; Everyone else is already taken.

— Oscar Wilde.

I am going to document everything here on this blog. I am an Engineering Student who loves to code and play competitive video games. I contribute to open-source regularly. I am currently in my forth year. I try to improve everyday. That’s my way of living.

I write code in Python. I have coded in Python for 2 years. I have worked on great frameworks like Django, Flask, etc. I recently worked with a startup called Vkarma Pvt. Ltd. I made their entire website using Django framework. The website is currently live on http://www.vkarma.in.

I am going to share my experiences which I gained by working in Internships and contributing to Open-Source.This Page is like a small introduction to my blog.

This is my first blog. I don’t have any experience in writing blogs. I have only one thing in mind that I will improve it by learning from my mistakes. This page is really special to me because this is my very first post. This post will reflect that I started from this point.

Like this blog? Don’t forget to share and return back!

Advertisement

Advantages Of Docker


Docker - Visual Studio Marketplace

Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers.

Containers

A way to package application with all the necessary dependencies and configuration.

CSC Plate for Shipping Containers | Why is it important?

They are portable artifact , easily shared and moved around. It makes development and deployment very easy.

Application Development (Before and After Containers)

Application Deployment (Before and After Containers)

My Visit To Google DevFest 2019

I recently went to Gurgaon with Shubham Chinda to attend the  Google Developer Group DevFest 2019 organized by the amazing people of GDG Mumbai.

At DevFest Wall

The conference was held at the Westin,Gurgaon. Kudos to the organizers for selecting such an awesome venue.

This was a 1-day event with 8 simultaneously running tracks: AI/ML , Mobile , Web , Cloud , Design , AR/VR , Pro , and Grow your Career .

Floor Plan

Here’s a short TL;DR on each of the talks that I was able to attend. Since all 8 tracks were running simultaneously, I was only able attend the talks from AI/ML and ‘Grow your career’ path .

Note: I will also be adding the link to the videos of all the talks as soon as they are uploaded.

What Are GDG DevFests?

GDG DevFests are large, community-run developer events happening around the world focused on community building and learning about Google’s technologies. GDG DevFests happen in most of the major cities around the globe.

The events cover multiple products of Google, such as Android, Firebase, Google Cloud Platform, Google Assistant, Flutter, machine learning with TensorFlow, and Mobile Web.

The main objective of this event is to provide developers and designers with a platform to celebrate and share their work.

It’s also a great place for startups to look for right people and for Open Source authors to show-off their latest creations.

Beginning

I entered the event venue it was filled with tons of developer talking about their work and achievements. I felt really great as it was the perfect opportunity for me to do networking but first I had to go to the registration table to register my presence.

They asked me to show my Qr Code for getting a recyclable band and a cap that said “I am also a developer”

After showing my Qr Code I got:

I thought it was really funny.

The place was really packed and full of great people

I decided to take the AI/ML track because I was already developing applications and content in Web and Augmented Reality so I thought this might a good time to get a simple idea about AI/ML.

Starting The Track

The first talk was given by Pankaj Kanwar who was working with Google for the past 8 years. He was currently working with Google Brain Engineering Team.

The talk that he gave was really great and he displayed us that how easy Tensorflow was and anyone with some skills in Python can easily create their own models. He also introduced the concept of Google Cloud Program about which I had no idea.

The second talk was about Reinforcement Learning – Applications and Challenges in Robotics

In this talk they explained how a simple robot is programmed to pick up objects using Reinforcement Learning . It was really informative and really like the session.

Third Talk Cognitive biases in AI: Detection and mitigation

This talk was about XAI(Explainable Artificial Intelligence)

Explainable AI (XAI) refers to methods and techniques in the application of artificial intelligence technology (AI) such that the results of the solution can be understood by human experts. It contrasts with the concept of the “black box” in machine learning where even their designers cannot explain why the AI arrived at a specific decision. XAI is an implemention of the social right to explanation. Some claim that transparency rarely comes for free and that there are often trade-offs between the accuracy and the explanaibility of a solution .

The technical challenge of explaining AI decisions is sometimes known as the interpretability problem was discussed in this session. It was really good as expected.

After this I did networking and attended the session of Open-Source I knew everything about Open-Source so I didn’t gain anything from that session

Closing Keynote

Everyone gathered in a big hall and appreciated the efforts of the speakers , organizers and volunteers who gave their best in making the event successful.

We were given lots of stickers and a T-shirt of Google DevFest 2019

Lastly, I would like to say that the experience was really great.

Regex Cheatsheet

Regular expressions (regex or regexp) are extremely useful in extracting information from any text by searching for one or more matches of a specific search pattern (i.e. a specific sequence of ASCII or unicode characters).

Image result for regex

Fields of application range from validation to parsing/replacing strings, passing through translating data to other formats and web scraping.

One of the most interesting features is that once you’ve learned the syntax, you can actually use this tool in (almost) all programming languages ​​(JavaScript, Java, VB, C #, C / C++, Python, Perl, Ruby, Delphi, R, Tcl, and many others) with the slightest distinctions about the support of the most advanced features and syntax versions supported by the engines).

Let’s start by looking at some examples and explanations.

Basic topics

Anchors — ^ and $

^The        matches any string that starts with The 
end$        matches a string that ends with end
^The end$   exact string match (starts and ends with The end)
roar        matches any string that has the text roar in it

Quantifiers — * + ? and {}

abc*        matches a string that has ab followed by zero or more c 
abc+        matches a string that has ab followed by one or more c
abc?        matches a string that has ab followed by zero or one c
abc{2}      matches a string that has ab followed by 2 c
abc{2,}     matches a string that has ab followed by 2 or more c
abc{2,5}    matches a string that has ab followed by 2 up to 5 c
a(bc)*      matches a string that has a followed by zero or more copies of the sequence bc
a(bc){2,5}  matches a string that has a followed by 2 up to 5 copies of the sequence bc

OR operator — | or []

a(b|c)     matches a string that has a followed by b or c 
a[bc]      same as previous

Character classes — \d \w \s and .

\d         matches a single character that is a digit
\w         matches a word character (alphanumeric character plus underscore) 
\s         matches a whitespace character (includes tabs and line breaks)
.          matches any character 

Use the . operator carefully since often class or negated character class (which we’ll cover next) are faster and more precise.

\d\w and \s also present their negations with \D\W and \S respectively.

For example, \D will perform the inverse match with respect to that obtained with \d.

\D         matches a single non-digit character 

In order to be taken literally, you must escape the characters ^.[$()|*+?{\with a backslash \ as they have special meaning.

\$\d       matches a string that has a $ before one digit 

Notice that you can match also non-printable characters like tabs \t, new-lines \n, carriage returns \r.

Flags

We are learning how to construct a regex but forgetting a fundamental concept: flags.

A regex usually comes within this form /abc/, where the search pattern is delimited by two slash characters /. At the end we can specify a flag with these values (we can also combine them each other):

  • (global) does not return after the first match, restarting the subsequent searches from the end of the previous match
  • m (multi-line) when enabled ^ and $ will match the start and end of a line, instead of the whole string
  • i (insensitive) makes the whole expression case-insensitive (for instance /aBc/i would match AbC)

Intermediate topics

Grouping and capturing — ()

a(bc)           parentheses create a capturing group with value bc 
a(?:bc)*        using ?: we disable the capturing group 
a(?<foo>bc)     using ?<foo> we put a name to the group 

This operator is very useful when we need to extract information from strings or data using your preferred programming language. Any multiple occurrences captured by several groups will be exposed in the form of a classical array: we will access their values specifying using an index on the result of the match.

If we choose to put a name to the groups (using (?<foo>...)) we will be able to retrieve the group values using the match result like a dictionary where the keys will be the name of each group.

Bracket expressions — []

[abc]            matches a string that has either an a or a b or a c ->is the same as a|b|c 
[a-c]            same as previous
[a-fA-F0-9]      a string that represents a single hexadecimal digit, case insensitively 
[0-9]%           a string that has a character from 0 to 9 before a % sign
[^a-zA-Z]        a string that has not a letter from a to z or from A to Z. In this case the ^ is used as negation of the expression 

Remember that inside bracket expressions all special characters (including the backslash \) lose their special powers: thus we will not apply the “escape rule”.

Greedy and Lazy match

The quantifiers ( * + {}) are greedy operators, so they expand the match as far as they can through the provided text.

For example, <.+> matches 

simple div
 in This is a 
simple div
 test
. In order to catch only the div tag we can use a ? to make it lazy:

<.+?>            matches any character one or more times included inside < and >, expanding as needed 

Notice that a better solution should avoid the usage of . in favor of a more strict regex:

<[^<>]+>         matches any character except < or > one or more times included inside < and > 

Advanced topics

Boundaries — \b and \B

\babc\b          performs a "whole words only" search 

\b represents an anchor like caret (it is similar to $ and ^) matching positions where one side is a word character (like \w) and the other side is not a word character (for instance it may be the beginning of the string or a space character).

It comes with its negation\B. This matches all positions where \b doesn’t match and could be if we want to find a search pattern fully surrounded by word characters.

\Babc\B          matches only if the pattern is fully surrounded by word characters 

Back-references — \1

([abc])\1              using \1 it matches the same text that was matched by the first capturing group 
([abc])([de])\2\1      we can use \2 (\3, \4, etc.) to identify the same text that was matched by the second (third, fourth, etc.) capturing group 
(?<foo>[abc])\k<foo>   we put the name foo to the group and we reference it later (\k<foo>). The result is the same of the first regex 

Look-ahead and Look-behind — (?=) and (?<=)

d(?=r)       matches a d only if is followed by r, but r will not be part of the overall regex match 
(?<=r)d      matches a d only if is preceded by an r, but r will not be part of the overall regex match 

You can use also the negation operator!

d(?!r)       matches a d only if is not followed by r, but r will not be part of the overall regex match 
(?<!r)d      matches a d only if is not preceded by an r, but r will not be part of the overall regex match 

Summary

As you’ve seen, the application fields of regex can be multiple and I’m sure that you’ve recognized at least one of these tasks among those seen in your developer career, here a quick list:

  • data validation (for example check if a time string i well-formed)
  • data scraping (especially web scraping, find all pages that contain a certain set of words eventually in a specific order)
  • data wrangling (transform data from “raw” to another format)
  • string parsing (for example catch all URL GET parameters, capture text inside a set of parenthesis)
  • string replacement (for example, even during a code session using a common IDE to translate a Java or C# class in the respective JSON object — replace “;” with “,” make it lowercase, avoid type declaration, etc.)
  • syntax highlighting, file renaming, packet sniffing and many other applications involving strings (where data need not be textual)

How to contribute to Open-Source Projects?

It’s never been easy to learn programming. But despite tons of ways to learn how to code, we believe that the best way to improve your skills is by contributing to open source projects.

The open source community provides a great opportunity for aspiring programmers to distinguish themselves; and by contributing to various projects, developers can improve their skills and get inspiration and support from like-minded people. But most importantly, they can prove that they can build fantastic experiences that people love.

Everyone wants to work on big projects and contribute to them so that they can learn and help others who need them. The problem with everyone is that no one is able to find the projects or the repositories that are compatible with them. Sometimes, even after finding the right project or repositories they won’t find any issue that might be suitable for them.Something that they might not be able to solve at that moment.

Prerequisites

  1. A strong understanding of Git and Github.
  2. A intermediate level in any programming language that you are comfortable with.

These are all the things that are required to work on Open-Source.

Why contribute to Open-Source Projects?

There are a number of reasons to contribute to Open-Source.

First, there are a lot of programmers who simply believe that code should be open. They’re idealists who want to make the world a better place, and it drives them to contribute code. The desire to share can be a powerful motivator.

Second, OS(Open-Source) gives you a great start to the beginners. Beginners might start by fixing minor things, such as a bug in a library, sending a pull request, or even writing a piece of documentation. However, beginner developers can also learn to write so-called “clean code” – code that is readable and maintainable – while contributing to open source projects. When developers realize that their code is exposed to the world, it makes them focus on making that code easy to understand and support. Programmers stick to generally accepted rules within a team, which include norms for indents, descriptions of methods and classes, variable names, and following the don’t-repeat-yourself rule(DRY). In a nutshell, when contributing to free projects you’re obliged to conform to the norms of a project.

Third, you get the chance to be part of an active open source community where you can meet like-minded people and supporters. Moreover, if you’re a freelancer and actively contribute to open source projects, you increase your chances of being noticed by potential employers.

The main reasons why developers go for free-for-modification projects are to be recognized, to sharpen their programming skills, and to become part of the vibrant community. Now let’s look at what you should consider before you start contributing.

How to Start?

1. Create your own open source project

Every project should start with an identified need. If you feel that existing projects on GitHub or Bitbucket don’t offer the functionality you would like to build, then create your own open source solution. Besides an initial project draft, you should consider the following set of questions:

  1. What skills do you need for your project?
  2. How much time are you willing to spend on your project?
  3. What problem(s) does your software solve?
  4. How many potential users are there for your product?

2. Create open source alternatives to commercial software

Today’s commercial projects actively engage open source solutions. Many companies base their projects on free tools. When there’s a huge selection of software, you don’t need to reinvent the wheel. This is why it’s useful to play around with free software that can replace similar proprietary software, or that fixes an issue you’ve recently faced.

Another reason for replacing commercial solutions with open source software is eagerness for real innovation and growth. Commercial software claims to be innovative, but its final goal is turning a profit. Open source software unites best practices, great quality of code and passionate developers willing to code just because they like to.

3. Contribute to existing open source projects

You can find many projects you are free to participate in on GitHub – a developer-oriented platform with a simple but essential set of functionality. GitHub attracts developers with public APIs, a sleek and frequently updated UI, gists (Git repositories) that allow you to share pieces of code or even whole applications, and much more. You can contribute to free software in many ways. Developers can fork projects, make changes to code, and send pull requests. And quality assurance is always appreciated. Sometimes developers are too busy or too lazy to check the quality of their code. So go ahead and report a bug or try to fix it – your help is appreciated.

You can reach the hottest GitHub projects by following the “Trending” link. And in order to make your search more relevant, use advanced search: select the language you would like to code in and choose “best match” criteria. Best match ranks projects according to relevance, taking into account the number of forks (which represents how actively the project is updated) and stars (“likes”, in the language of Facebook). Most projects have known issues (however, some don’t) with labels like “bug”, “discussion”, “security”, or “refactor”, or other labels according to the level of difficulty: “easy”, “medium”, “hard.”

How to find bugs/issues in Open-Source Projects?

There are various websites that help you finding bugs throughout the Github.One of them is Issuehub.io

issuehub.io

On this website you can easily find issues. You just have to select a label and enter the language you want to work on. It will give you all the issues that are present with that label. It saves a lot of time and also helps me in exploring various repositories at the same time.

Join The Developer Community

You can easily join an open source project by subscribing to the mailing list for that project. You can find mailing lists on official websites or on GitHub pages. After being accepted to the list, you can communicate with team members and get support if necessary. Thanks to the vibrant communities present in nearly every Open-Source project, you are likely to get quick replies to your questions.

Open source projects bring many benefits to those who participate in them, and such experience is great for your CV. By joining a community of like-minded people and polishing up your skills, you can give yourself a step up as an aspiring developer. We’ve listed common reasons why people contribute to Open-Source projects, and described various ways to get started. If you would like to read more about contributing to Open-Source projects, check out our previous articles about how open source projects penetrate the IT market and about the security of free software.

How to Create Your Own E-commerce Website in a few hours?

The title seems like a click-bait but it’s actually possible. If you have a little knowledge about HTML and Python. You can create a website that is fully functional and at par with all the existing E-commerce websites.

Saleor Logo

Through Saleor we can create an E-commerce website in a jiffy. Now you are thinking that What is Saleor?, How to use it ?, Where to get it?, Is it free?

What is Saleor?

Saleor is a modular, high performance e-commerce storefront built with Python, GraphQL, Django, and ReactJS. The code for the E-commerce website is already written for you. You just have to change the name and setting of the website according to your needs. Saleor makes it really simple and easy for those who are trying to move their business online or are trying to make a presence online.

Features of Saleor

Admin View of Saleor
  • PWA (Progressive Web App) storefront allows users to browse and purchase products across devices and platforms, providing engaging shopping experiences
  • A GraphQL API, utilizing React, shifts Saleor into headless e-commerce and moves the solution to a future-proof platform for development teams
  • Modularity from the GraphQL API allows administrators to keep the backend up-to-date with no or minimal changes in the frontend
  • A new dashboard keeps the best functionalities of the previous version but draws on the most desirable features of experiences like Shopify

It Provides so much functionality.What is it’s cost ?

It is an Open-Source project made by MiruMee anyone can use their code until it doesn’t violate the rules that are set by the company. You can download their project from https://github.com/mirumee/saleor or you can go to their website and ask for their assistance.

How to do it ?

All commands need to be performed in either PowerShell or a Command Shell.

1. Clone the repository (replace the URL with your own fork where needed)

git clone https://github.com/mirumee/saleor.git

2. Enter the directory

cd saleor/

3. Install all dependencies

I strongly recommend creating a virtual environment before installing any Python packages.

python -m pip install -r requirements.txt

4. Set SECRET_KEY environment variable

$env:SECRET_KEY = "<mysecretkey>"

5. Create a PostgreSQL user

Use the pgAdmin tool that came with your PostgreSQL installation to create a database user for your store

6. Create a PostgreSQL database

See PostgreSQL’s createdb command for details.

7. Prepare the database

python manage.py migrate

8. Install front-end dependencies

npm install

9. Prepare front-end assets

npm run build-assets

10. Compile e-mails

npm run build-emails

11. Start the development server:

python manage.py runserver

After all the steps are performed your website will look like this!

E-commerce Website made by Saleor

After this to change the look of the website you just need to change the template of the website. The files in /templates/ should be changed to your needs.

This is how you make your E-commerce website in a jiffy. This can be deployed on any platform and can be used to sell real items online.

Selling Items using Saleor

The website also has automated E-mails which are sent using Django-Templated-Email.

Extensions and Plugins

Saleor has implemented extensions architecture. It includes hooks for most basic operations like calculation of prices in the checkout or calling some actions when an order has been created.

Saleor has some plugins implemented by default. These plugins are located in saleor.core.extensions.plugins. The ExtensionManager needs to receive a list of enabled plugins. It can be done by including the Python plugin path in the settings.PLUGINS list. You can also write your own plugin.

This is how you can create you own E-commerce website in a Jiffy.

My First Contribution To Open-Source (Mozilla)

I was in my third year. I was doing great at learning React.js. During the learning phase, I learned a lot of things but I felt like something was missing from the learning that was really. All the things that I learned throughout my college days and the React.js that I was learning was not helping me to work on some real-time projects. The real-time projects are different there we have to work on its speed, test cases, integration tests, etc. These things were never taught in my college. Also, I observed that it was a really important aspect that needed to be considered while running a huge project.

As I was saying earlier I felt that something was missing from the learning process. One day my friend Rishabh told me about Open-Source projects and companies. He explained to me how these companies work and also how to contribute to them. When he told me everything I got excited and went to Github. I made a GitHub account when I was in coding blocks studying Django Framework. Well, After the course got finished I never touched my Github account. After like 1 year I opened my Github account. It was empty I had no contributions in the last year. I felt that I must start pushing/posting my work on Github. I was filled with motivation and wanted to do some work. Also, I was excited about Open-Source. I went to Mozilla Page on Github. There were like 2000+ repositories. I had no idea where should I start from. My python skills were of a decent level so I started looking for python repositories and I found Mozilla/Addons-Server. I felt really lucky when I found it as the addons-server worked on Django which I learned a few months back. There were many issues in the repositories. I knew that fixing one of them would get me 1 contribution in Mozilla. I started looking into the issues there were many easy and difficult issues. To differentiate those issues there were various labels like component:aAPI, contrib: welcome, etc. I was new there so contrib: welcome seemed like a valid option. I found various issues then I decided to take the first issue in the contrib: welcome label. I commented on the issue “Please. Can I work on this? Someone said yes you can work on it.

My First Comment On One of Mozilla’s Issue

He explained to me where I had to write the code. I begin working on it. First, I had to set up the project locally on my device. I read the documentation of addons-server. It took me some time understanding as I had to learn about docker first because of the reason that every large scale project use docker. When everything was ready I started working on the issues. Same day, I came up with the solution to the issue.I had a bit of problem using Github. I forgot how it worked then I brushed up my knowledge on Github. I really enjoyed the process till now because everything that I was doing was going to affect a real project that is live. I proceeded and made a Pull Request. After a few hours, a member of Mozilla reviewed my pull request. He told me that the test cases are failing because you used a wrong symbol. He told me to change that as I was really excited I made the requested changes in like 2 minutes of the comment.

After that, the best thing happened that the Pull request got merged and everyone thanked me for it. Everyone said thanks to a newbie who just contributed. I was really happy as I was new there but still, they gave me a lot of appreciation. It felt like I had done something great.

I didn’t know who “caitmuenster” was she just commented on my pull request and said thanks for the patch. On some research, I found she was the head of the addons-server team and she said Thanks to me. I felt real joy at that moment because everyone on the team was noticing my work. This gave me a lot of motivation to work in Open-Source projects.

Also, She told me she was going to vouch for me on Mozillians.org. I was filled with joy at that moment and created my account immediately asked her to vouch. She vouched for me. Well, I was on another level when I got vouched by a person who was head of addons-server.

My name was also added to their Contrib Wiki Page. I felt really great about that. I was given recognition by such a big company. My actions were acknowledged by everyone in the community.

This was the story of my first contribution to open source. After this I continued to contribute to open-source I do it every day. I feel really great and joyous when I contribute to Open-Source Projects. To this date, I have made many contributions to various organization like Intel, Adobe, Workday, Yelp and many more. I will continue contributing to Open-Source.

Introduce Yourself (Example Post)

This is an example post, originally published as part of Blogging University. Enroll in one of our ten programs, and start your blog right.

You’re going to publish a post today. Don’t worry about how your blog looks. Don’t worry if you haven’t given it a name yet, or you’re feeling overwhelmed. Just click the “New Post” button, and tell us why you’re here.

Why do this?

  • Because it gives new readers context. What are you about? Why should they read your blog?
  • Because it will help you focus you own ideas about your blog and what you’d like to do with it.

The post can be short or long, a personal intro to your life or a bloggy mission statement, a manifesto for the future or a simple outline of your the types of things you hope to publish.

To help you get started, here are a few questions:

  • Why are you blogging publicly, rather than keeping a personal journal?
  • What topics do you think you’ll write about?
  • Who would you love to connect with via your blog?
  • If you blog successfully throughout the next year, what would you hope to have accomplished?

You’re not locked into any of this; one of the wonderful things about blogs is how they constantly evolve as we learn, grow, and interact with one another — but it’s good to know where and why you started, and articulating your goals may just give you a few other post ideas.

Can’t think how to get started? Just write the first thing that pops into your head. Anne Lamott, author of a book on writing we love, says that you need to give yourself permission to write a “crappy first draft”. Anne makes a great point — just start writing, and worry about editing it later.

When you’re ready to publish, give your post three to five tags that describe your blog’s focus — writing, photography, fiction, parenting, food, cars, movies, sports, whatever. These tags will help others who care about your topics find you in the Reader. Make sure one of the tags is “zerotohero,” so other new bloggers can find you, too.