teleren/devto huggingface dataset:
What inspires you to review Pull Requests?
Tags: discuss, career, watercooler
Published: 2021-01-06 12:28:18

Not only is it part of most jobs, but pull requests by their nature allow for group analysis of contributions. Programmers love to write code, but for some reason, aren't as motivated to review them.

Trying to get someone to review your PR can feel like pulling teeth. It can take a lot of back and forth to finally getting your feature merged.

I tend to reserve my mornings for PR's. The idea is if done earlier in the day, the rest of the day could be for discussions, revisions, and anything else that comes up. 

Do you make time specifically to review your teammates pull request?
Who is using ESBUILD?
Published: 2021-01-06 12:05:55

Hi my fellow devs, I am making a research work for a little and local community we are beginning here in Castellón, Spain.

And I have a really simple question.

## Who uses ESBUILD?

If you have a project and you are using ESBUILD pls share with us! I find it really interesting but I cannot find any info about it, and I think its crucial to make it stand out.

Thanks a lot, I love this community.
Download Kalender 2021 spesial One Piece
Published: 2021-01-06 11:44:47

Template kalender ini kami desain menggunakan aplikasi coreldraw x7, gunakan aplikasi yang sama atau diatasnya ya agar file ini dapat terbuka dengan sempurna.

Jika berminat silahkan kunjungi kami pada alamat berikut

http://www.4corel.com/2020/12/download-kalender-2021-spesial-one-piece.html
How Online Food Ordering System Helps Your Restaurant Thrive
Tags: android, ios, mobile
Published: 2021-01-06 11:36:14

Thriving eCommerce and on-demand economy have changed the way we live. Across the world, people tend to order online for their favorite foods, groceries, and other household products. Whether you own a startup or running small to medium-sized restaurants, technology can free up your hands to manage the quality and taste of food by handling ordering and billing processes. Yes, an online food ordering system is designed to meet this objective effectively.

The restaurant food ordering software with the necessary features can help you grow your business by managing orders online and serving many customers at once. What’s more, you can run your restaurant business in any part of the world with a readymade restaurant online ordering system. A PC or even a smartphone with an Internet connection is all you need to give your business a boost by managing orders.

Let’s make a list of the benefits of a restaurant online ordering system for your business. It is fair to mention that such a system can take your business to a new level with increased efficiency.

Top Ten Benefits of Restaurant Online Ordering System

No queues, ever- This is the biggest benefit of the online food ordering system. Your customers can easily give orders online in the comfort of their homes. Even during holidays or peak hours, there is no need for your customers to wait for their turn to place an order. The order counter always remains free for other important tasks and the restaurant ordering system manages the orders effectively.

No customer is missed- How about accepting orders even when your restaurant is closed? A restaurant online ordering system makes it possible for 24*7*365, and you just cannot miss any order. It results in higher rates of customer acquisition and retention. You can keep on doing business during the odd hours and your customers will certainly welcome it.

Visit us: https://www.suriainternational.com/how-online-food-ordering-system-helps-your-restaurant-thrive/
Creating Cyberpunk 2077 logo animation with GSAP
Tags: html, css, javascript, showdev
Published: 2021-01-06 11:19:23

Hello, in this article I am going to show you how I managed to create a similar logo animation from the video game Cyberpunk 2077  which was one of my favorite games of this year. I really like the futuristic theme of the game and it really encouraged me to create this :smile: .Also I thought this is a great exercise to improve my skills with the Greensock library since I am still a newbie. 

{% codepen https://codepen.io/ishankadsenevirathne/pen/MWjEVvM %}

##Step 1: Creating index.html
*(refer the html file on the codepen above)*

I gave the page title **Cyberpunk 2077** and a **div** element is created to add the **svg** logo element. I have imported the **CDN** library of **GSAP** to my project, also linked the **CSS** and **Javascript** file to my html page which I am about to create in the following steps. 

##Step 2: Creating main.css
*(refer the css file on the codepen above)*

All browser defaults(margins and paddings) were set to 0 and the page height was given such that it will take screen height. The content was centered and a background color was given by giving css attributes to the **body** element. Using the **logo** class I have made the logo responsive.

##Step 3:Creating the app.js and animating the logo
The animation has the following Timeline Structure

![Timeline Hierachy](https://raw.githubusercontent.com/IshankaDSenevirathne/Cyberpunk_2077/main/Timeline_hierarchy.jpg)

*The svg file and all the Id's for the svg parts used in the tweens can be found on the Cyberpunk2077.ai file in the link below*

[Cyberpunk2077.ai](https://github.com/IshankaDSenevirathne/Cyberpunk_2077/blob/main/Cyberpunk2077.ai)

**Animating Cyberpunk**
*(refer the js file in the codepen above)*

The word **Cyberpunk** is animated using the following **cyberpunk** function in the app.js .

**Animating 2077**
*(refer the js file in the codepen above)*

The timeline that animates number 2077 and its background is returned by the **n2077** function in the app.js.

**Master Timeline**
*(refer the js file in the codepen above)*

A master timeline is created and both timelines returned by the above functions is added to it and initiated.

```javascript
//Creating the master timeline
var masterTimeline = new TimelineMax();
//adding cyberpunk and n2077 timeline to master timeline and initiating
masterTimeline
    .add(cyberpunk())
    .add(n2077(),'+=0.2');
```
**Usefull Links**
[Codepen ](https://codepen.io/ishankadsenevirathne/pen/MWjEVvM)
[Github Repo](https://github.com/IshankaDSenevirathne/Cyberpunk_2077)
[Greensock Docs](https://greensock.com/docs/)

So that's it guys hope you liked this article and thank you very much for reading it. This is my first post on dev I am still trying to get familiar with the platform so if you have any tips/questions regarding the project or the article please be sure to post a comment.
Best Few Gaming Devices According to Me
Tags: bestgamingdevices, bestgamingpc, bestgaminglaptop, bestgamingsetupng
Published: 2021-01-06 11:09:09

In recent past 7yrs, I have been gaming, playing various genre games, early days got introduced to gaming as a kid by my brothers, when I used to go to their place and often get fascinated by what they play, from their my eagerness grew to play and strive for more for gaming.

started from contra, playing with my brother to now we are online and can play anywhere from any corner of the world. I always have admired gamer and developer putting their heart and soul into creating games. As a child with a limited money supply, I would save money to buy the best headphones out of my reach just to taste the quality. 

My first gaming device was 

Razer Elektra
for some, it's a cheap headset but for me, it was months of saving, Razer Elektra had overall outlook and quality for a gaming headset as well as a headset you can listen to music. tbh it sounded so much good on music. Bliss
It lasted for like 4yrs.

2nd one was 

Roccat kone xtd
This mouse was like studying rocket science though I'm from a management background so yeah, half or more than half features I could barely use or I never used. that mouse had everything - precision, adding extra weight, highest dpi (even though I never played it on a higher resolution monitor or tv). But yeah overall good quality.
It lasted for like 4yrs.

then came Logitech G502 after my mouse went all haywire with clicks not working properly, Roccat kone xtd you served me well

Logitech felt so right on my palm, being a claw style holder, same was kone xtd. but Logitech looked simple yet the quality was a little good more than Roccat and don't forget the 2yrs warranty for the mouse. that saved my mouse from my carelessness. so yeah, one problem I found with my Logitech mouse is Idk whether it's because of my hand style or what but while playing the dpi button always gets clicked, yeah there's an option to change the dpi option but too lazy. What's the point if that button gonna get hit the entire time, right?
been 3yrs to still using

then comes redgear membrane keyboard
I swear I have never treated any of my products as bad as I did to my redgear keyboard, but it still works fine. it's sturdy, it lights and jazz and it serves the purpose. the best buy at such a low price range.
2yrs to still using

my latest addition was jbl700 bt
Unlike my Elektra which was loud and made me all groovy, jbl 700 had the perfect balance of everything. It's handy, foldable, wireless, wired! xD charges 2hrs of battery time in 5goddamn minutes and lasts for 27whoohoo hrs.
except it's not much comfortable for long hours and the mic quality is like below avg, so I wouldn't suggest if you are mostly on TeamSpeak, discord talking with your friends, cuz chances are your friends that might have muted you every time when you come to talk with em.

So these are the review of some <a href="https://fingerskilz.tv/">best gaming devices</a>  used by me.
Copyright Clutter Everywhere!
Tags: copyright, habits, discuss
Published: 2021-01-06 11:04:07

---
title: Copyright Clutter Everywhere!
published: true
description: Rant: why do I have to scroll down _every_ file?
tags: copyright, habits, discuss
//cover_image: https://direct_url_to_image.jpg
---

```python
#!/usr/bin/env python3
# **********************************************/
#  Copyright (c) ThisCompany. All rights are
#  reserved.  Reproduction in whole or in part
#  is prohibited without the prior written
#  consent of the copyright owner.
#
#  This software and any compilation or derivative
#  thereof is and shall remain the proprietary
#  information of ThisCompany and is highly
#  confidential in nature.
# ***********************************************/

def here_the_code_begins():
  """but why isn't it at the top???"""
```

Only 10 lines of clutter.  _On Every Single Source File_.  I've seen it in every company I worked in, even though the files are stored in a private repository behind seven firewalls, encrypted, password protected and are not intended for publication whatsoever.

Only 10 lines of clutter.  _On Every Single Source File_.

Am I the developer one outraged by this dead code in my code?  Who is fed up with having to scroll down half a page everytime they open up a file?

Is a single LICENSE.txt file in the root of the project not enough?

Does anyone know why we're doing this?  An old habit?

Does anyone know a better way to protect intellectual property?
Custom Google Maps styles, with night mode! 🌒
Tags: javascript, react, webdev, html
Published: 2021-01-06 10:50:25

Dark mode has become a trend in modern day websites (pun intended, i'm so funny 🤪). Recently, I worked on a project where we had a highly customized Google Map. There were a lot of Map and DOM interactions along with styling. A lot went into it. 🥴

While studying how to style Google Maps, I stumbled across a very good resource that gives you readymade Google Maps styles, including `Night Mode`.

Introducing, [Google Maps Styling Wizard](https://mapstyle.withgoogle.com/)! 🎊🎉

## How To 🐱‍👓

Literally, select any style you want and click on the `Finish` button. It gives styles for the selected map theme in JSON format. After that, all you have to do is this.

```javascript
const map = new google.maps.Map(element, {
  styles: [...], // Paste your styles here!
});
```

Of course, make sure to set appropriate zoom level, position coordinates and API keys etc.

PS, the JSON formats are also a good way to learn how to style your maps. For more info, look into the official [Google Map styling guide](https://developers.google.com/maps/documentation/javascript/styling).
Plesk Linux Sunucularda Toplu IP Değiştirme
Published: 2021-01-06 10:42:25

Eğer sunucunuzda birden fazla web sitesi barındırıyorsanız ya da olası bir sunucu değişikliğinde, tüm sitelerin ip adreslerini tek tek değiştirmeye çalışmak çok zahmetli olacaktır.

Plesk Linux Sunucularda Toplu IP Değiştirme
Not: IP adresini değiştirmeden önce, yeni ip adresini sunucuya eklememelisiniz.

Aşağıdaki komutla Plesk’in IP haritasını bir dosyaya yazdıralım.

plesk bin reconfigurator /root/ip_map_dosyasi
Bu komut /root dizinine ip_map_dosyasi isminde bir dosya oluşturacak. Bu dosyayı vi ya da nano gibi bir editörle açıp aşağıdaki şekilde değiştirin.

Eski IP adresimiz 127.0.0.1 ve yeni ip adresimiz de 127.0.0.2 olsun. 

Değişimden önce örneğin şu şekilde görülmeli:

ens32 127.0.0.1 255.255.255.0 -> venet0 127.0.0.2 255.255.255.0<

ve şimdi bu şekilde değiştirin:

ens32 127.0.0.1 255.255.255.0 -> venet0 127.0.0.2 255.255.255.0

CTRL+X ile dosyayı kaydedelim ve son olarak aşağıdaki komutu çalıştıralım.

plesk bin reconfigurator /root/ip_map_dosyasi
Şimdi tüm IP’ler değişmiş olmalıdır.

https://dizaynsunucum.org/
Backup Postgres to S3
Tags: postgres, aws, linux, sql
Published: 2021-01-06 10:42:03

This article describes an easy way to backup a Postgres database to Amazon S3 using s3cmd and crontab in Linux environment.

## Install S3cmd

S3cmd is a command-line utility for managing data in AWS S3.

For Debian/Ubuntu

```bash
apt-get install s3cmd
```

For RedHat/CentOS

```bash
yum install s3cmd
```

For OSX

```bash
brew install s3cmd
```

Set Amazon access id & secret keys using the `--configure` option. Enable encryption for data transferring as well as HTTPS.

```bash
s3cmd --configure
```

### Backup the database

```bash
pg_dump -v --format=c -h localhost -U YOUR_USER YOUR_DB > backup.dump
```

### Push to S3

```bash
s3cmd put backup.dump s3://YOUR_BUCKET_NAME --encrypt
```

## Automate the process

Create a new bash file in the root directory.

```bash
#!/usr/bin/env bash

DB_NAME=$1
DB_USER=$2
DB_PASS=$3

BUCKET_NAME=<YOUR_NAME_HERE>

TIMESTAMP=$(date +%F_%T | tr ':' '-')
TEMP_FILE=$(mktemp tmp.XXXXXXXXXX)
S3_FILE="s3://$BUCKET_NAME/backup-$TIMESTAMP"

PGPASSWORD=$DB_PASS pg_dump -Fc --no-acl -h localhost -U $DB_USER $DB_NAME > $TEMP_FILE
s3cmd put $TEMP_FILE $S3_FILE --encrypt
rm "$TEMP_FILE"
```

Change file permission to be executable using `chmod +x` and test the file using:

```bash
./FILE_NAME.sh DATABASE_NAME USER_NAME DATABASE_PASSWORD
```

It should upload the backup to the S3 configured earlier.

### Attach to a cron job

```bash
crontab -e
```

Edit the file to execute the script at (say) every sunday at midnight:

```bash
0 0 * * 0 /home/ubuntu/FILE_NAME.sh DATABASE_NAME USER_NAME DATABASE_PASSWORD
```

Save the file and check the cron logs in `/var/log/syslog` file.
Check if a binary tree is a subtree of another binary tree
Tags: programming
Published: 2021-01-06 10:38:28

Everything which is a descendant of a tree is known as a subtree. 
A binary tree(s) is said to be a subtree of another binary tree(t) if s is a descendant of t and follows exact order same as in s. The tree t could also be considered as a subtree of itself.
```
    7
   / \
  4   8
 / \
3  6
```
For the above tree
```
   4                   |           4                                
  / \                  |          / 
 3   6                 |         3
                       |
This is a subtree      |       This is not a subtree
                       |        
```
---
If you're curious to solve this problem before checking out the solution. Try it out in [Leetcode](https://leetcode.com/problems/subtree-of-another-tree/) 😉 .

You can find my solutions to other leetcode problems at https://github.com/harsha-sam/Leetcode-Solutions.

---

## Solution
I'll be using the boilerplate code from leetcode. You can directly submit the solution and verify, once you understand how the algorithm works.

<mark>Comparing Nodes Approach</mark>:
- Depth-First Search the tree T and whenever you find a node that has the same value as the root node of the tree S, Compare both tree T and S from this corresponding node of T and check for equality by comparing all nodes of both trees.

``` python

# Definition for a binary tree node.
# class TreeNode:
#     def __init__(self, val=0, left=None, right=None):
#         self.val = val
#         self.left = left
#         self.right = right

class Solution:
    def isSubtree(self, s: TreeNode, t: TreeNode) -> bool:
        '''
        Depth first searches both trees and compares 
        all nodes. 
        Returns False whenever two different nodes 
        encountered
        Returns True when both trees are completely 
        explored and equal.
        '''
        def check_equal(tree1, tree2):
            if tree1 and not tree2 or tree2 and not tree1:
                return False
            elif tree1 and tree2:
                if tree1.val != tree2.val:
                    return False
                if not check_equal(tree1.left, tree2.left):
                    return False
                if not check_equal(tree1.right, tree2.right):
                    return False
            return True

        def explore(curr, t):
            if curr:
                # if a node which has same value as root s is encountered, we check for quality
                if curr.val == t.val and check_equal(curr, t):
                    return True
                if explore(curr.left, t):
                    return True
                if explore(curr.right, t):
                    return True

        return explore(s, t)
```
---
`Time Complexity: O(N * M) - Where M = number of nodes in subtree t and N = number of nodes in tree s`
`Space Complexity: O(N) - Depth in recursion can go upto n nodes. n refers to number of nodes in s.`
Windows desktop app (Golang) triggers antivirus
Tags: desktop, go, windows, help
Published: 2021-01-06 10:24:20

Windows Defender on Windows 10, to be exact.

This happens both when cross-compiled from Linux with XGO and when compiled natively on Windows.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8ciu27xjtjpiuqk6uugh.jpg)

This repo, to be exact.

{% github zhquiz/go-zhquiz no-readme %}
How to Start with Programming as a beginner?
Tags: 100daysofcode, javascript, codenewbie, webdev
Published: 2021-01-06 10:08:59

This post is about a guy who had no interest in coding to a guy who now loves it and is very passionate about it, so it started with a documentary about AI on youtube and that video changed the perspective about programming, earlier I had studied computer science but never knew that it has such superpowers, so then I researched more about AI and Ml and at last, I found Lex Fridman(If you have interest in AI I bet you know this name) he has fantastic podcast on youtube  where he talks about Ai researches and data science, there I saw one video of him and his words stuck in my mind "To Learn New things you should focus on routine, Motivation comes and goes, doing things daily compounds."  
Then I decided to start the #100DaysOfCode Challenge, and also made a routine for myself, which made me super productive, things like cold showers and daily meditation are something that enhances the result. Right now I am at Day 25 of #100DaysOfCode and I know that I have not reached that far but really I want to tell all the people who want to start coding to achieve their dreams that this method is just amazing and soo powerful, from my experience I have tried many times to start new skills but this skill has a lot of potentials and just applying this simple steps to every aspect can make a lot of change in you.
Assignment Operators in python
Tags: python, programming, beginners, tutorial
Published: 2021-01-06 09:43:00

Assignment operators are used to assigning values to variables.

That is to store values in variables we use `=` assignment operator.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/suvm5dg0a7deu6t5z7wx.png)
Output:
```
3.14
```
OK, now comes the real fun.
Have ever been tired to use `x = x + 5`, where we type the variable x twice?
There's actually a shortcut for this called **Augmented assignment operators**.

*Augmented assignment operators* can be used as a replacement as follows:

```
x += 3	   --->	   x = x + 3	
x -= 3	   --->	   x = x - 3	
x *= 3	   --->	   x = x * 3	
x /= 3	   --->	   x = x / 3	
x %= 3	   --->	   x = x % 3	
x //= 3	   --->	   x = x // 3	
x **= 3	   --->	   x = x ** 3	
x &= 3	   --->	   x = x & 3	
x |= 3	   --->	   x = x | 3	
x ^= 3	   --->	   x = x ^ 3	
x >>= 3	   --->	   x = x >> 3	
x <<= 3	   --->	   x = x << 3
```
## Here's the Code and Output

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/m06p70zukbkszx1v3idd.png)
```
9
6
18
6.0
```


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0rrm332uuwdnfs6wdhwe.png)
```
64
1
0
```


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/yhvrfs2geb1wn5n9yl4z.png)
```
2
3
```


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/j93ngv49xkrczeq1yl47.png)
```
0
3
24
```

**Quick Note**: The code snippets reuses the same variable to assign with different [arithmetic operations](https://dev.to/aswin2001barath/arithmetic-operators-in-python-3lgc) / [bitwise operations](https://dev.to/aswin2001barath/bitwise-operators-in-python-4pii) / [shift operations](https://dev.to/aswin2001barath/bitwise-operators-in-python-4pii).

So, while coding makes sure you practice to use print statements after each operation.

### Best Resources

- [Python Blog Series](https://dev.to/aswin2001barath/series/10416) : A Blog series where I will be learning and sharing my knowledge on each of the above topics.

- [Learn Python for Free, Get Hired, and (maybe) Change the World!](https://academy.zerotomastery.io/a/aff_tz1t0tpx/external?affcode=441520_dcwk-s8s) : A detailed roadmap blog by Jayson Lennon (a Senior Software Engineer) with links to free resources.

- **Zero To Mastery Course** - [Complete Python Developer](https://academy.zerotomastery.io/a/aff_9khypm7v/external?affcode=441520_dcwk-s8s) : A comprehensive course by Andrei Neagoie (a Senior Developer) that covers all of the above topics.

**Who Am I?**

I’m Aswin Barath, a Software Engineering Nerd who loves building Web Applications, now sharing my knowledge through [Blogging](https://medium.com/techsoftware) during the busy time of my freelancing work life. Here’s the link to all of my socials categorized by platforms under one place: https://linktr.ee/AswinBarath

**Thank you** so much for reading my blog🙂.