teleren/devto huggingface dataset:
Blind75: Introduction
Tags: codinginterview, problemsolving, cpp, leetcode
Published: 2020-05-11 11:50:31

---
title: Blind75: Introduction
published: true
description: TeamBlind released a curated list of Top 75 LeetCode Questions to save our time.
tags: coding-interview, problem-solving, cpp, leetcode
series: Blind75
cover_image: https://images.unsplash.com/photo-1506452819137-0422416856b8?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1566&q=80
---

In Dec 2018, TeamBlind released [this article](https://www.teamblind.com/post/New-Year-Gift---Curated-List-of-Top-75-LeetCode-Questions-to-Save-Your-Time-OaM1orEU) saying -

> New Year Gift to every fellow time-constrained engineer out there looking for a job, here's a list of the best LeetCode questions that teach you to core concepts and techniques for each category/type of problems! Many other LeetCode questions are a mash of the techniques from these individual questions. I used this list in my last job hunt to only do the important questions.

In this series, I'll be solving each of the problems from Blind75 and post the solution approach and the thought process behind each coding problem that I'll attempt to do. Also, I'll add complexity(time, space) analysis of the solutions. I'll use `c++` as my programming language to solve these but the main idea is to gather the solution thought process and by that, you can solve the problems in any language you want!
Why can't AUTOMATIC post throttling be instituted for new accounts
Tags: abuse, discuss
Published: 2020-05-11 11:44:52

---
title: Why can't AUTOMATIC post throttling be instituted for new accounts
published: true
description: 
tags: abuse, help, discussion
---

I hadn't posted anything in 3 months until today, AND IT WAS THE SAME THING ALL OVER AGAIN.  When I was posting more regularly about 3-6 months ago, more than once I complained about new users spamming tags such as Vue or PHP with dozens of submissions within days of joining the site.

So I post something in the Go tag this morning, then navigate to the tag for the page, and somebody who joined the site less than a week ago is spamming the tag, including several posts in just the past 24 hours.  

It is not fair to others to have their content pushed down.  I brought up the need for automatic throttling a few months ago, I even offered to help, but that didn't get prioritized.

Until it does get prioritized, I'll hardly considering using this platform any more.
Interview: The Performance of Python
Tags: interview, python
Published: 2020-05-12 15:37:53

---
title: Interview: The Performance of Python
published: true
date: 2020-05-11 11:40:56 UTC
tags: Interview,Python
canonical_url: https://julien.danjou.info/interview-the-performance-of-python/
---

![Interview: The Performance of Python](https://julien.danjou.info/content/images/2020/05/performance-python.png)

Earlier this year, I was supposed to participate to [dotPy](https://dotpy.io), a one-day Python conference happening in Paris. This event has unfortunately been cancelled due to the COVID-19 pandemic.

Both Victor Stinner and me were supposed to attend that event. Victor had prepared a presentation about Python performances, while I was planning on talking about profiling.

Rather than being completely discouraged, Victor and I sat down (remotely) with Anne Laure from [Behind the Code](https://www.welcometothejungle.com/en/collections/behind-the-code) (a blog ran by Welcome to the Jungle, the organizers of the [dotPy](https://dotpy.io) conference).

We discuss Python performance, profiling, speed, projects, problems, analysis, optimization and the GIL.

[You can read the interview here.](https://www.welcometothejungle.com/en/articles/btc-performance-python)

![Interview: The Performance of Python](https://julien.danjou.info/content/images/2020/05/image-5.png)
Infinite Scroll with React.js
Tags: react, infinitescroll, api
Published: 2020-05-11 11:32:28

---
title: Infinite Scroll with React.js
published: true
description: I just made a React app with infinite scrolling
tags: react.js, infinite scroll, api
cover_image: https://res.cloudinary.com/dgo7trcso/image/upload/v1589196634/demo/cover_1.jpg
---
As part of my react app series I just finished "Infinite scrolling with React.js" app. Check it out [here](https://heuristic-tesla-2575dc.netlify.app/)
First SO Go Question 😜
Tags: stackoverflow, go
Published: 2020-05-11 11:27:48

---
title: First SO Go Question 😜
published: true
description: 
tags: stackoverflow, go, golang
---

Have been working with Go for a few weeks now and have finally posted a question to Stack-overflow.  I've got a work around but would like to know a better way:

https://stackoverflow.com/questions/61728420/would-like-to-work-with-same-file-content-passed-to-library-without-opening-fil (without opening file twice)
A tip on unstructured data in AI 
Tags: python, ai, deeplearnin, machinelearning
Published: 2020-05-11 11:24:04

Training neural networks is not as hard as it used to be 40 years ago, nevertheless, it is as much as art as it is science, thus practice makes the master. Deep learning is a very powerful tool for someone who wants to apply AI to unstructured data, but **unstructured data** has the tendency to be unstructured, in other words, every piece of data might have a different size and shape. An example of this might be a text, a song, or images. As a programmer, you need to face this difficulty and find solutions. In this post, I'll show you two ways to handle **variable-shaped** input, when training neural networks. 

# Padding 
The most simple way to do it is by padding every input to the same size. It is straightforward since you only need to find the **biggest** tensor in a batch of data and pad every other tensor in the batch to that size. Mmm, that does not seem very efficient, you are using a lot of empty space, and you are making the training harder for the neural network.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/tp80ai1ngz5s4nygomq6.png)

# Bucketing 
A better way would be to **sort** the data in ascending order and create batches that minimize the padding between tensors. This way you make training faster and avoid unused data. You might still encounter an over-padded situation but it is definitely better than the naive solution. A problem with this solution is that the batches you train with will always be the same, which might cause **overfitting** but it shouldn't be much of an issue. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/72roth8c94mmvyl9blmw.png)

# Conclusion 
This is a simple tip I wanted to share for deep learning enthusiasts. Comment your favorite way to handle variable-shaped data!
spaCy and grammar go hand in hand!!! What do you think of it??
Tags: discuss, help, machinelearning, datascience
Published: 2020-05-11 11:20:03

Wow I was studying spaCy and found out how brilliantly it understands the difference between read in two differnt tenses

```
doc = nlp(u'I read books on NLP.')
r = doc[1]

print(f'{r.text:{10}} {r.pos_:{8}} {r.tag_:{6}} {spacy.explain(r.tag_)}')
```

**Output-read       VERB     VBP    verb, non-3rd person singular present**

```
doc = nlp(u'I read a book on NLP.')
r = doc[1]

print(f'{r.text:{10}} {r.pos_:{8}} {r.tag_:{6}} {spacy.explain(r.tag_)}')
```

**Output-read       VERB     VBD    verb, past tense**

In the first example, with no other cues to work from, spaCy assumed that read was present tense.

In the second example the present tense form would be I am reading a book, so spaCy assigned the past tense.

Wow that is something incredible I guess!!

**What is your story of spaCy and what brilliance did you experience do let me know????**
Eliminate SpringBoot Hibernate N+1 Queries
Tags: java, opensource, hibernate, springboot
Published: 2020-05-11 11:19:40

Hibernate is a famous ORM for Java applications. In this article, I show you how to improve performance eliminating the Hibernate N+1 Queries.
After some months on my first complex project with Spring and Hibernate, I needed to improve the performance to meet my users’ needs. That’s when I discovered the N+1 queries problem and its huge impact on the performance of my requests.

For example, because of the Hibernate N+1 queries, a request to get the 20 last messages was triggering 218 queries to the database. After having solved them, the number of queries went down to 7 and the processing time went down from 3 seconds to 400ms!

To help you achieve similar results, I will first explain what is the Hibernate N+1 queries problem. Then I will show how to detect it easily using spring-hibernate-query-utils. And finally, I will give solutions to fix the N+1 queries.

See the full article here: https://medium.com/sipios/eliminate-spring-hibernate-n-plus-1-queries-f0bcf6a83de2?source=friends_link&sk=5ba0f2493af1d8496a46d5f116effa96
How to detect API bugs in watchOS apps
Tags: watchos, ios, bugs, mobile
Published: 2020-05-11 10:58:02

Most of the watchOS apps will have a cloud back that they connect using APIs. Any failure in API calls results in bad ux. It is important to get notified about any such API call issues once the app has gone live.

This is where Finotes comes in.

https://www.blog.finotes.com/post/how-to-detect-api-issues-in-watchos-apps
Checklist to Review Your CV
Tags: career, cv, writing, review
Published: 2020-05-11 10:56:30

I recently published my first article on "Checklist to Review Your CV". It is a quick checklist with some do's, don'ts and commonly overlooked aspects of a CV. You can refer it in case you are writing your first CV or updating your CV or you are reviewing it for a friend.

[https://medium.com/@soorajshajahan/checklist-to-review-your-cv-5cb2a4e2ed0d](https://medium.com/@soorajshajahan/checklist-to-review-your-cv-5cb2a4e2ed0d)

Have a read and let me know what you feel.. :-)
How a developer should handle Code reviewer?
Tags: java, csharp
Published: 2020-05-11 10:46:15

Hi all, For those who don't me I'm Divakar, Passionate developer with 5 years of experience in web and mobile development. I learned software development the hard way, following lots of confusing tutorials, failing to understand core concepts and finally having no idea how things work. So I wanted to help the community to 
understand it in a better way without any hassle.

I would suggest you to read my previous post before getting into this topic . check here for my previous post 

{% link https://dev.to/divakarkumar/how-to-become-a-better-code-reviewer-part-1-code-review-32fp %}

Having said that now you get to know the mindset of a Code Reviewer , so as a developer/ author of the code let's see what are various responsibilities for us in order to deliver a product successfully.


##**Handling Code Reviewers:**

- **<h3><strong>Don't take it personal:</strong></h3>**

We have a clear idea of how a mindset of a code reviewer is , the goal of him is to maintain our code base quality. So when he/she provides a review comment of your code, think of it as their attempt to help you, the codebase, and Company, rather than as a personal attack on you or your abilities.

<img src="https://media.tenor.com/images/8069e0d2913284d7301bab50c4262dbf/tenor.gif" width="4096" />

1) Don't respond in anger to review comments.
2) If a reviewer's comment is not in a professional or polite or constructive way then talk to him in person or send a private mail to have a discussion about it. 

-------------

- **<h3><strong>Fix:</strong></h3>**

<img src="https://media.tenor.com/images/e5326ce5da905085c2e64d4b8f009573/tenor.gif" width="4096" />


If a reviewer doesn't understand a particular piece of code it is obvious that other developers who is gonna work in this code base maybe in future will get to feel the same way. so rather than adding comments in the tool do fix the code. Try to find a simpler way to achieve the functionality.

-------------

- **<h3><strong>Think:</strong></h3>**

<img src="https://media1.tenor.com/images/eb4ba488503a0199a5ea35859da56060/tenor.gif?itemid=8487001" width="4096" />

No matter how certain you are if a reviewer made a suggestion on your code base take a step back. Think about “Is the reviewer correct?”

If you can’t answer that question, it’s likely the reviewer needs to clarify their comments.

If you have considered it and think that you are right then respond with an explanation that why your way of approaching the solution would be better.

-------------

**<h3><strong>Thanks ! Leave a comment :</strong></h3>**

<img src="https://media.tenor.com/images/a22a51ec2a7b6f777a6270bbea4ac828/tenor.gif" width="4096" />

Thanks all for reading through this topic. Please leave a comment about your way of handling a code reviewer.
How I can log the deployment script output into aws cloudwatch?
Tags: help, aws, codeploy
Published: 2020-05-11 10:45:31

Hello can you help me with that:

https://devops.stackexchange.com/q/11584/4396

What I want is to log the output of each phase of my deployment in aws cloudwach in a similar fashion that aws codebuild does. Therefore by placing extra commands such as `ls -l` will allow my to have an image of my application on each deployment phase without needing to ssh on each machine in case that something goes wrong.

Do you have any idea how?
Understanding Kubernetes: part 21 – Useful tools - part 4 - security
Tags: kubernetes, devops, docker, beginners
Published: 2020-05-11 10:42:06

---
title: Understanding Kubernetes: part 21 – Useful tools - part 4 - security
published: true
description: Serie of sketchnotes about Kubernetes. Explaining in a visual way Kubernetes principles.
tags: Kubernetes, DevOps, Docker, beginners
series: Understanding Kubernetes in sketchnotes
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/qifnd24l09qchmivd5jp.jpg
---

Understanding Kubernetes can be difficult or time-consuming. In order to spread knowledges about Cloud technologies I started to create sketchnotes about Kubernetes. I think it could be a good way, more visual, to explain Kubernetes (and others technologies).

We continue the serie of Sketchnotes about Kubernetes, with some useful tools to know.
In this fourth part we will see: [Trivy](https://github.com/aquasecurity/trivy) (an Aqua tool).
This tool is not directly linked to Kubernetes but it concerned the security, an important aspect.

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

If you are interested, I published all the sketchnotes on Kubernetes (and new ones!) to make a "book" of 120 pages: ["Understanding Kubernetes in a visual way"](https://gumroad.com/aurelievache#uCxcr).

As usual, if you like theses sketchnotes, you can follow me, and tell me what do you think. I will publish others sketchs shortly :-).
Thoughts on Utility-first CSS and Tailwind CSS
Tags: css
Published: 2020-05-11 10:31:51

Utility-first CSS, lead by Tailwind CSS, goes almost directly against the initial designing premise of CSS. Yet it works very well, and is gaining popularity.

The premise of CSS is in its name: Cascading Style Sheet. It is responsible for styling; it is a sheet; it applies the styling in a cascading way. The cascading algorithm is quite complicated. You can read [LogRocket's blog post about it](https://blog.logrocket.com/how-css-works-understanding-the-cascade-d181cd89a4d8/).

Utility-first CSS breaks two of those. It still is responsible for styling, of course. But it is not a sheet, and it doesn't cascade. Utility-first CSS applies all styles as classes directly to the elements. It doesn't cascade because all rules are applied as classes. It doesn't use inheritance either.

Why?

Cascading makes CSS unpredictable. Hunting down exactly which rule is preventing your rule from working requires intimate knowledge of the cascading algorithm. While the algorithm is necessary to make the browsers apply the styles consistently, it is additional mental load for graphic or UI designers. When you are drawing, what you see is what you get. Getting rid of cascading makes styling on the web closer to that: what you see in the class list is what you get.

Being a separate sheet makes CSS unnecessarily detached. The design of user interface is three intertwining concerns: semantics, layout, and theme. The goal was that HTML handles the semantics, while CSS handles layout and theme. But in reality they are not separable. The semantics of the UI element determines both its layout and on which axes its theme can be customized.

If we look at all the GUI development kits before the Web, no one chose to separate layout and theme from semantics. In contrast, almost everyone chose "widget" as their central abstraction. A widget is an independent piece of UI semantics, together with its derived layout and theme options.

We are seeing the Web coming around to this, with React, Vue, and the Web Component standard. Riding on this wave, Utility-first CSS is integrating styling back into HTML, realizing that CSS classes are not the right place for abstraction.
Can I run a python program on my website?
Tags: beginners, help, python, javascript
Published: 2020-05-11 10:30:29

I just joined the dev.to community a couple of days ago and was wondering what I should write about as my first post. This question has been bugging me for a while now so I thought this might be a good way to get answers. 

So say I created a game using python and I want users on my website to play my game online. Is there a way to implement this or will I have to recreate the game using a web programming language like JavaScript. 

Thank You In Advance
Journey into Web Monetization - day 2
Tags: gftwhackathon, webmonetization
Published: 2020-05-11 10:15:18

After yesterdays ideas I couldn't decide which one to pursue. I realized I needed a better and deeper understanding of how it works. 

Here's what I found out:
- WebMonetization (WM) is both push- and pull-based payments. So instead of you push payment from your credit-card you can have websites pull money from your wallet.
- Users need wallets. Right now there are only a few options: Coil, Xpring, Stronghold, GateHub and XrpTipbot. No native browser support, only Coil extension.
- Payment pointers are urls to wallets (`$` instead of `https://`)
- Privacy focused not to leak personal data
- OpenPayments is a specification similar to OAuth2 in how wallets should work (API endpoints, `.well-know/open-payments` manifest etc).
```json
{
  "issuer": "https://wallet.example",
  "authorization_issuer": "https://auth.wallet.example",
  "authorization_endpoint": "https://auth.wallet.example/authorize",
  "invoices_endpoint": "https://wallet.example/invoices",
  "mandates_endpoint": "https://wallet.example/mandates",
  "assets_supported": [
    {"code": "USD", "scale": 2},
    {"code": "EUR", "scale": 2}
  ]
}
```
- When a wallet receive a request from a client (`GET $wallet.example/alice`) it connects to the ILP network and returns STREAM credentials:
```json
{
  "ilpAddress": "example.ilpdemo.red.bob",
  "sharedSecret": "6jR5iNIVRvqeasJeCty6C+YB5X9FhSOUPCL/5nha5Vs="
}
```
- These credentials are used to start the STREAM (Interledger transport protocol)
- "Similar to how the Internet routes packets information, Interledger routes packets of value"
- Other names for wallets (SPSP server/client, WM receiver/sender (or provider), acquirer/issuer)
- You can set `sendMax` on clients and `receiveMax` on servers to end the stream and connection when these are reached.
- Right now the eco-system is limited to XRP and USD.
- Connectors can be (has been?) built to connect to other ledgers (ETH, BTC etc)

I found these links helpful:
- https://interledger.org/overview.html
- https://docs.openpayments.dev/web-monetization
- https://webmonetization.org/docs/explainer#flow-overview

It's quite a lot to take in.

- As a developer it's quite difficult to know where to get started.
- As a user it should be easier for me to set up a new wallet and use in my browsers
- As a creator it should be easy to publish new content with payment pointers, both on established platforms as well as self-hosted

How could one help reduce the friction for users to start using these technologies?

- How to make it easier for content creators to create a wallet and get a payment pointer?
- How to make it easier for developers to start building with these technologies?
- How to make it easier for users to access paid content?
Quotes Calendar
Published: 2020-05-11 09:56:30

A while ago I made an API for IT Quotes (https://lnkd.in/dQf6gKw)



At the same I was thinking why not use those quotes to bring a smile or an aha on peoples faces expecially during these times of virus and isolation.



With that I made made a little Calendar https://lnkd.in/dHCxJee 



Feel free to scrool it, read it and most importantly to smile.
Dockerize your project - Understand docker in simple terminology
Tags: docker, dockerization, container, devops
Published: 2020-05-11 09:47:50

Ever wondered what Docker is all about! Here in this article, I tried to explain docker in layman terms. Please take a glance and give a thumbs up if you found it useful.
https://www.linkedin.com/pulse/containerize-your-project-docker-harsit-mohapatra
Easy Py tasks from CMD with Invoke
Tags: python, linux, devops
Published: 2020-05-11 09:38:44


I'm usually using Makefile to do automation within my project.

Invoke is a simple tool to make command line mapping to python code. 
You write python tasks/functions and the Invoke library maps to shell commands and arguments. 

http://www.pyinvoke.org

you create `tasks.py` file in the top directory where you run your project and your command with the library models very easily.

a good tutorial is on youtube https://www.youtube.com/watch?v=fqS2TBcxoeA