teleren/devto huggingface dataset:
Lesson learned: How UpWork disabled my account
Tags: freelance, upwork
Published: 2021-01-08 05:02:58

Recently I decided to increase my rating on UpWork and boost my visibility on the platform.

I decided to make my UpWork profile specifically targeted on Scraping/Crawling/Data extraction, since I’ve got a lot of experience with it. So I updated my profile like this:

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

I also lowered my rate to $20/hr, since I wanted to get as much gigs as possible to earn more reviews from each.

After that I went on Reddit and [wrote a post](https://www.reddit.com/r/stocks/comments/kqj7ox/i_will_automate_data_extractionscrapingcrawling/) offering my automation help in exchange for reviews:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/uzku5lkkpozli5nclw9n.png)

**Results:** the post got 9 upvotes and 5 comments.

The post took me 5 minutes to write.

And even though moderators removed the post:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2fqon7w85fvya4ilh4ju.png)

… I still got private messages from Reddit users who read the post and were interested:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rzbjcgvkiw3twe2zeae7.png)

**Results:** 4 potential clients to work with via UpWork.

Some clients wanted to pay, and some wanted to work in exchange for a review. Nice :)

So I was really happy with how a simple post got me the clients. But the next day I’ve got a “happy” email from UpWork notifying me that my account was suspended:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4yz3dzayu42ohgihfuu9.png)

It was such a disappointment to lose my profile since I’ve earned $30k solely from the UpWork.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fne4a7i748uh08ab9vvb.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/yufirlyh90v746dl1817.png)

So it turns out UpWork is monitoring the Internet and looking for people who try to do work in exchange for reviews.

**Takeaways?**

Never offer your work in exchange for reviews publicly. That’s my mistake that I wanted to share with you. Learn from it and don’t risk your own account.

Want to hear more from me about freelancing and getting to financial freedom as software developer? You can [follow me on Twitter](https://twitter.com/AlexBezhan) as I will continue documenting my journey.

P.S. If you liked this, give me some hearts for good luck :)
Nullish Coalescing Operator
Tags: javascript, webdev
Published: 2021-01-08 04:33:46

The nullish coalescing operator `??` is a logical operator that returns its right-hand side operand when its left-hand side operand is `null` or `undefined`, and otherwise returns its left-hand side operand.

```
const nullValue = null;

const val1 = nullValue ?? "default";

console.log(val1); // "default"
```

It is similar to the traditional 'or' logical operator `||`, but the difference is that `||` will return the right-hand side operand with any falsy value, such as an empty string, 0 or `NaN`, not only `null` or `undefined`.  

For example:
```
const val = null ?? 'default';
console.log(val);
// logs "default"

const val2 = 0 ?? 88;
console.log(val2);
// logs 0 because it is falsy
```

It is possible to use the nullish coalescing operator in combination with the traditional AND `&&` and OR `||` operators, but the statements that include those logical operators must be enclosed in parentheses, or it will raise a syntax error.  For example:

```
null || undefined ?? "value"; // SyntaxError
false || undefined ?? "value"; // SyntaxError

(null || undefined) ?? "value"; // returns "value"
```

A common pattern is to use the nullish coalescing operator with the optional chaining operator `?.`, which is useful to access a property of an object which may be `null` or `undefined`.

```
const obj = { prop1: "hello" };

console.log(obj.prop1?.toUpperCase() ?? "error"); // "HELLO"
console.log(obj.prop2?.toUpperCase() ?? "error"); // "error"
```
Udacity Deep Learning Nanodegree Review in 2021
Tags: deeplearning, machinelearning, datascience, career
Published: 2021-01-08 04:45:54

Do you have a question, **“How Good is Udacity Deep Learning Nanodegree“?** If yes, then read this article and clear your doubts. In this article, I will share my learning journey and experience with Udacity Deep Learning Nanodegree.

Now without further ado, let’s get started-

Before I discuss the Nanodegree program, I would like to tell you-

##**How I had Chosen this Nanodegree program?**

I am a Research scholar and my research topic is- **“Depression Detection from Social Media“.**

So I started my machine learning journey by watching **Sentdex, freeCodeCamp, and various other popular YouTube channels.**

Because as a beginner, we don’t want to pay huge money to any course. And these YouTube channels helped me to understand the machine learning basics.

But I thought this information is not enough for my research work, then I took **[Machine Learning A-Z™: Hands-On Python & R In Data Science](https://click.linksynergy.com/deeplink?id=Vrr1tRSwXGM&mid=39197&murl=https%3A%2F%2Fwww.udemy.com%2Fcourse%2Fmachinelearning%2F)** course on Udemy.

In this course, Kirill taught me Machine Learning algorithms such as **Regression, Classification, Clustering, Association rule learning, Reinforcement learning, NLP basics, and Deep Learning basics.** This course was really a brilliant entry point into the world of machine learning for me.

After learning deep learning basics in this course, I had finalized that I have to learn more advanced concepts of deep learning.

So I studied various books such as Neural Networks and Deep Learning by Michael Nielsen, etc. But I was looking for something that teaches me deep learning in a practical way.

Because I am planning to learn deep learning for my Research work. And I believe you can’t get 100% from theoretical knowledge until you apply your learning to real problems.

And then I heard about the **Udacity Deep Learning Nanodegree program** that this program has practice-based courses. So I thought to enroll in this Nanodegree program.

But the next challenge for me was-

##**Udacity Deep Learning Nanodegree program Cost**

Udacity Deep Learning Nanodegree program costs around **$399 per month.** For me, it was too expensive. So I was in doubt to spend that much amount on any course. But during this **Covid-19 pandemic**, they are offering **[financial support](https://imp.i115008.net/9v0k3)**

So I filled the form. In the form they asked me to provide some background information like-
**[Click to continue reading...](https://www.mltut.com/how-good-is-udacity-deep-learning-nanodegree/#udacity-deep-learning-nanodegree-program-cost)**
Name your variables carefully, don't fall in the "cnt" trap
Tags: programming, variables
Published: 2021-01-08 04:15:57

I'd like to share a thing about my programming experience with you guys. A long time ago, being a lazy programmer, I used to name variables in a generic manner without much care for detailing. For example, `cnt` will be a standard thing when I want to store a running total inside a loop:

    var cnt =0;
    ..
    ..
    cnt++; //inside a loop
    ..
    ..
    console.log("Total processed:", cnt);

But what if I needed another counter inside an inner loop? So, that become `tcnt` (short for "temporary counter"!):

    var tcnt = 0;

And if I needed more, it will be `ttcnt`, `tttcnt`, etc. and so on. This approached worked for getting the code up and running in a short time but the problem occurred when I needed to change this code in future. If I needed to add a loop or some other construct somewhere and required a numeric variable, I'd add yet another `cnt` and the whole thing would fail in testing (because there already was another `cnt` which was now rewritten due to this new variable)!

After a few times this happened, I realized that I'd be a much wiser strategy to name the variables depending on what they actually did rather than some numeric name. For example, `tot_processed`, `cnt_pending`, `cnt_updated`, etc. This will give you a good idea of "what" this counter is holding, so there is less chance of it getting confused with another variable in code later.
Don't Give Up
Tags: productivity, motivation, writing
Published: 2021-01-08 03:55:47



We tend to forget why we started

We then create our own route misleading to somewhere we didn’t expect . Frustrating ourselves, even up to the point blaming ourselves, calling our hardworking selves _STUPID_.

![stupid](https://media.giphy.com/media/XeLcgh8gT8o0F5SQ8i/giphy.gif)

Not saying its bad to change plans when necessary

But sometimes we forget why we started and cut short to a inch away of achieving our goal.

As a I wise teacher once told me “ a person who doesn't plan, plans to fail”.


As a practitioner of Martial Arts, there are days where it seems I haven’t gain any improvement, which can be frustrating sometimes, I mean all the times. 

But little did I know that improvements can be any size or any shape. 

That's why we have test or we like to call sparring so we can look back on the things we learned and and see where we are. 

We are hard working people especially you yourself. No one will ever know how hard you work,but only yourself. So you need to congratulate yourself, by going on a food trip, play some video games, simply **TAKE A BREAK!**

![break time](https://media.giphy.com/media/muCo9BLS7vjErTON27/giphy.gif)

Appreciate every small victory you conquered. 

>  It don't matter if you win by an inch or a mile. Winning's winning - **Dominic Toretto**

![f&f race](https://media.giphy.com/media/u5bbqJE63sBGM/giphy.gif)

### Tip #1:
 try Bullet Journal and list down the achievements you accomplished, so that one day if you think you haven't made any progress you can just flip to that page and see how far you went. 

### Tip #2:
 keep your goal written, visibly close to you everyday. 

#Conclusion
When you feel like giving up remember why you started. And remember you may not be there but you were closer than yesterday.
Updates to GitHub Markdown - Making it easier for you to build amazing things
Tags: github, opensource
Published: 2021-01-08 03:28:10

If you tuned into [GitHub Universe](https://www.youtube.com/watch?v=2m9nUP-e8Co&ab_channel=GitHub) or saw Nat Friedman's amazing keynote, you may have noticed one of my favourite quotes of GitHub:

"At GitHub, the thing we care about the most in the world is developer experience... our job is to make it easier for you to build amazing things".

Highly recommend watching this keynote if you haven't already. It's only 15 minutes long and totally worth it.

{% youtube 2m9nUP-e8Co %}

As Nat said, what we really care about is developer experience and making it easier for you to do the things you want to do.

So we wanted to make things a little better for you and shipped a few key dates to issues, comments, and Discussion comments:

✔️ Ability to add videos to issues and comments
✔️ Markdown list auto-completion
✔️ Multi-word reference searching

{% twitter 1346864512603926528 %}

The ability to upload *.mp4 and *.mov files is a big game changer. You can add files up to 10MB and allows you to be more creative and visual when writing issues and comments. This includes comments in Discussions.

Auto list complete and multi-word allows you to work a little faster. Instead of having to type out each kind of list (bullets, numbers, and checklists), when you go to the next line, you'll automatically have the next point ready for you.

Using # when searching for a comment, issue, or Discussion to reference now allows you to search using multiple keyboards. This will help you find things quicker so you can get to working on the things that matter most.

Do you like these new updates? Let us know what you think in the comments below.
Juegos muy interesantes para aprender CSS
Tags: css, flexbox, cssgrid
Published: 2021-01-08 03:13:42

Si estas empezando en el mundo del desarrollo web, es muy probable que tengas todo el entusiasmo del mundo por personalizar cada vez mas tus sitios.

Si por el contrario vienes del mundo del backend pero no realizas mucho trabajo de frontend, este post igualmente es para ti.

Y es que todos en nuestra carrera como programadores nos topamos con algún diseño "marciano" (Saludos a mis amigos diseñadores hehe), ante lo cual debemos posicionar algun elemento de forma compleja.

Bueno hoy traigo dos recursos increibles para aprender a trabajar con CSS, sin sufrir en el intento (o al menos no mucho).

## [Flexbox froggy](https://flexboxfroggy.com/#es)

Es un excelente juego para aprender a dominar Flexbox, ?sabes posicionar un elemento centrado vertical y horizontalmente?, pues dejame decirte que Flexbox nos permite hacer muchas mas cosas, puedes aprender de forma muy divertida y ademas esta muy bien para una reta con tus amigos programadores un viernes ;)

## [Grid garden](https://cssgridgarden.com/#es)

Aprovechando que estamos hablando de aprender jugando, esta es otra muy buena opción, CSS grid nos ofrece una excelente solución para encolumnar elementos, esta es otra muy buena opción para cambiar el típico aprendizaje y pasar un muy buen rato aprendiendo CSS Grid.

Espero que las recomendaciones les parezcan útiles y entretenidas!
Mengatasi Apache Tidak Bisa Start di XAMPP
Tags: opensource, programming, productivity
Published: 2021-01-08 03:11:58

###Mengatasi Error Port pada Apache
Mengatasi Apache Tidak Bisa Start di Windows

**Langkah 1 – Buka file httpd.conf.**
Buka file tersebut menggunakan aplikasi editor, Anda bisa menggunakan notepad, sublime, atau lainnya.

**Langkah 2 – Ganti beberapa atribut.**
 >`‘Listen 80’ diubah menjadi ‘Listen 8080’`
 >`‘ServerName localhost:80’ diubah menjadi ‘ServerName localhost:8080’`

Kemudian simpan.

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

**Langkah 3 – Buka file httpd-ssl.conf**
File httpd-ssl.conf berada di folder C:\xampp\apache\conf\extra\.

**Langkah 4 – Ganti beberapa atribut berikut:**
>`‘Listen 443’ diubah menjadi ‘Listen 4499’‘
>Virtualhost_default_:443’ diubah menjadi ‘4499’`

Kemudian simpan.

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

**Langkah 5 – Jalankan XAMPP Control Panel**
Jalankan XAMPP Control Panel dan jalankan Apache menggunakan tombol start.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/5kra9nksrfcgevrzu2pl.png)

**Langkah 6 – Lakukan pengecekan.**
Buka browser, kemudian Anda coba lakukan akses ke http://localhost:8080/xampp, jika pengaturan berhasil maka Web Service Apache berjalan pada port 8080.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/zznn8vnzk3w3xsodijnd.png)
Shared Modules in Angular
Published: 2021-01-08 03:11:17

Using Angular Material in your app.module.ts file causes too much clutter. Why not create a shared module which only contains material modules.

From your root type in 
```code
ng g m matshared
```

Then import the Material Modules needed and export them.

```javascript
import { CommonModule } from '@angular/common';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatChipsModule } from '@angular/material/chips';
import { MatIconModule } from '@angular/material/icon';
import { MatMenuModule } from '@angular/material/menu';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatTableModule } from '@angular/material/table';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatTooltipModule } from '@angular/material/tooltip';
import { NgModule } from '@angular/core';

@NgModule({
  imports: [
  // Leave this blank
  ],
  exports: [
    MatButtonModule,
    MatCardModule,
    MatChipsModule,
    MatIconModule,
    MatMenuModule,
    MatPaginatorModule,
    MatTableModule,
    MatToolbarModule,
    MatTooltipModule,
  ],
})
export class MatSharedModule {}
```
Now go back to the app.module.

```javascript
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { BrowserModule } from '@angular/platform-browser';
 
import { MatSharedModule } from './matshared.module';
import { NgModule } from '@angular/core';

 

@NgModule({
  declarations: [AppComponent, MainComponent],
  imports: [
    AppRoutingModule,
    BrowserAnimationsModule,
    BrowserModule,
    MatSharedModule,
  
  ],
  exports: [MatSharedModule,],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}
```

Other feature modules can share this matSharedModule too. Just import and put entry into imports array to use.
```javascript
import { MatSharedModule } from '../matshared.module';

imports: [
 CommonModule,
 MatSharedModule,   
],
```

Simple, when we know how. 

JWP2021
Postgres up and running in less than 3 minutes with docker-compose 🚀
Tags: docker, postgres, devops
Published: 2021-01-08 02:47:30


# Run Postgres using "docker-compose"

### Create a local directory called "postgres"

```shell
$ mkdir postgres
$ cd ./postgres
```

### Create a "pgdata" directory inside "postgres" directory

```shell
$ cd ./postgres
$ mkdir ./pgdata
```

👉 As a docker container is **"stateless"** we must create the directory "pgdata" to keep the data when the container is shut down.

### Create a file called "docker-compose.yml" in "postgres" directory

```shell
$ touch ./docker-compose.yml
```

#### 📄 docker-compose.yml file

```yml
version: "3.8"
services:
  db:
    image: "postgres:13"
    ports:
      - "5432:5432"
    volumes:
      - ./pgdata:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=dbuser
      - POSTGRES_PASSWORD=admin2021
      - POSTGRES_DB=todoapp
```

- This file creates a host called "db" from a Postgres version 13 image. The TCP port 5432 (postgres) of the host "db" is exposed externally as TCP port 5432.

- The local directory "./pgdata" is mapped as "/var/lib/postprogressql/data" inside the "db" host

- The username, password and database name are exposed as an environment variable

## Run the container in detached mode

```shell
$ docker-compose up -d
```

## List of running docker containers

```shell
$ docker-compose ps
```

## Run command inside the container

```shell
$ docker-compose run db bash
```

## Connect postgres inside the host

```shell
$ psql  --host=db --username=dbuser --dbname=todoapp
```

### Connect to "postgres" from outside

```shell
$ psql --host=localhost --username=dbuser --dbname=todoapp
```

### stop container

```shell
$ docker-compose down
```

Et voilà 🎉 !
Different Types of SQL JOINs
Tags: sql
Published: 2021-01-08 02:39:02

A SQL Join statement is used to connect rows from two or more tables, based on a related column between them. There are four types of JOINs, an Inner Join, Left Outer Join, Right Outer Join and Full Outer Join.

An Inner Join selects all rows from both the tables as long as the data matches. The Inner Join will combine all rows from both the tables where the columns match.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/o5uax52w59y62i9m3k9u.png)

A Left Outer Join returns all the rows of the table on the left side of the join and matching rows for the table on the right side of the join. The rows for which there is no matching row on the right side.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/9q7wshoxvjyj5s8laahe.png)

A Right Outer Join is the opposite of a Left Outer Join. This join returns all the rows of the table on the right side of the join and matching rows for the table on the left side of the join.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/90htos5sg0wjtqlercgb.png)

Finally,  a Full Outer Join returns all the rows from both tables. This Join creates the result-set by combining the result of both Left Outer Join and Right Outer Join.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/90htos5sg0wjtqlercgb.png)

When working on SSRS reports involving stored procedures, I found myself having to reteach myself the different types of JOINs in SQL. They are pretty simple once understood but can help with SQL queries quite a bit! I hope you enjoyed this post, thanks for stopping by!
Find a co-founder
Published: 2021-01-08 02:35:47

Hey all, one of the first questions I get when talking to first-time entrepreneurs is: Do I need a co-founder / where can I find a co-founder / where can I find a technical co-founder... well, that's why we're doing an experiment on 1/22. 
We're organizing a co-founder lounge as part of the GUILD's entrepreneurship summit.

I thought there might be awesome people in this community here excited to either hear co-founders pitching their businesses to find a co-founder or maybe you are looking for a co-founder yourself? 

It's free to attend or pitch.

Apply here: https://getguilded.typeform.com/to/eJkyM6Jn

Or just join the event if you want to participate in the lounge and listen in.

http://SERENDIPITY2021.Eventbrite.com 

Cheers!
Anne
Calculate the estimated reading time of an article using JavaScript
Tags: javascript, tutorial
Published: 2021-01-08 02:28:56

You’ve probably seen displayed on websites like Medium an estimated reading time. This metric helps users decide if they read the article immediately, or save it for later. In this tutorial we’ll be using JavaScript to calculate the estimated reading time of an article.

First in a HTML document let’s create a dummy article as follows:

```html
<article id="article">
  <h1>Lorem ipsum dolor sit amet</h1>
  <p>
    Minus ullam est commodi facere repudiandae sit. Ab quibusdam totam
    veniam ducimus ut consequatur sit. Ea et nulla quaerat. Et temporibus
    quas numquam quas dolor vero accusantium numquam.
  </p>
  <!-- repeat <p> tag several times here -->
</article>
```

Then where you would like the reading time to be displayed in the page add this:

```html
<p><span id="time"></span> minute read</p>
```

Now for the JavaScript functionality to calculate the reading time:

```javascript
function readingTime() {
  const text = document.getElementById("article").innerText;
  const wpm = 225;
  const words = text.trim().split(/\s+/).length;
  const time = Math.ceil(words / wpm);
  document.getElementById("time").innerText = time;
}
readingTime();
```

Here’s a breakdown of what the `readingTime()` function is doing:

- `text` – fetch the article text so we can preform the calculations.
- `wpm` – average adult reading speed (words per minute).
- `words` – calculate total number of words (length) by splitting at each whitespace.
- `time` – calculates the read time rounded up to the nearest whole number.

With the time calculated we then output the number into `<span id="time"></span>`.

That concludes this tutorial, you now know how to display the estimated reading time for an article that can easily be dropped into a blog or news website.