teleren/devto huggingface dataset:
Starting with JavaScript Series #100JSPosts
Tags: codenewbie, javascript, css, react
Published: 2020-09-13 03:07:17

_Hello to all my community people :-) This is my 7th post and I'm thankful to everyone because I love this community. And special thanks to all my 600+ family, not followers. don't forget to check my other posts. I'm sure you'll love it too..._

####_Now, I'm Starting JavaScript Series for the next few months where I'm sharing the complete journey to become a JS developer from newbie to a pro. More focus "To understand it in a simpler way"..._❤️😃


`CONTENT`:

will be updated here... :-)

`1`
`2`
`3`


---

####If you love this post, please give a like to boost my confidence to write more posts for this community. I'm also sharing a short microblog on my Instagram page also.

If you have doubts regarding development or UI/UX Design. Please feel free to connect with me on: ❤️😃

[Linkedin](www.linkedin.com/in/akash1296) 

[Instagram Page](www.instagram.com/designer.akash)

![Instagram page](https://dev-to-uploads.s3.amazonaws.com/i/2ic2vrfzlf2pxlrrmkmr.jpg)

Regards
`Akash`
How To Find a Mentor Using Twitter
Tags: codenewbie, webdev, career
Published: 2020-09-13 02:56:47

A question I hear people ask a lot is "How Do I Find a Mentor?"

I understand why you would want someone who can help you and has been on the same path as you. They can help you avoid pitfalls and mistakes and point you in the right direction.

## Should You Look For A Mentor

My advice? Don't look for a mentor. That's not the same as don't get a mentor, but I don't think you should actively ask around for one.

There's a quote that says "When the student is ready, the teacher shall appear".

{% twitter 1282713655105159170 %}

This is definitely something I have experienced, as noted by my tweet above. If you are consistently showing your work and your progress, people who have the experience you desire will reach out to you to help you reach those higher levels. BOOM! You have a mentor.

The reason I say you shouldn't directly reach out asking for mentors is that a mentor relationship is built on trust. If you haven't established any prior history with someone, they don't even have any context to mentor you.

However, if they know that you've been learning, progressing and you reach out for something specific like "Do you know why then API isn't returning any data?" with the steps you took so far. They know that you value their time. If you implement that advice and tell them, the next time you reach out they'll be eager to help you.

When I was learning web development, Eric Poe from CoderDojoKC reached to me on Twitter and showed me how to use GitHub because I was confused. I didn't have to ask he was willing because I built trust by constantly showing what I was doing. He knew that I was would take his advice seriously, and he wouldn't waste his time. 


## Get Mentorship Indirectly

Also, in 2020 there are a ton of ways to get indirect mentorship, people have done podcasts interviews, wrote blog posts about their careers, conferences talks, and more. You can learn a lot from people without ever having to reach out to them directly. Just reading the tweets can give a lot of information.

By getting that information it can better assist you if you do decide to ask a question. I decided to reach out to Joel Hooks from egghead for advice because he was a self-taught developer who learned to code in his mid-thirties with a wife and 5 kids.

That was the situation I was in, it had the right context. I'm not 100% sure if a 22-year-old, single Computer Science Grad could have given advice that was right for me and my situation.

Also, I never asked him or anyone to be my mentor. As I implemented the advice that was given. trust was built and more advice was given. It was organic, not formal.

## Conclusion 

I really believe organic relationships built on trust, are better factors in your success than trying to find someone who mentors you. If you make your self mentor-able, a mentor will appear when you least expect it. That's what has happened to me.

I believe it can happen to you.

Let me know in the comments, "Do you have a mentor?"
🤝👥Join my Facebook Group "AWS Troubleshooting Tips and Tricks & Blogs" ☁️🔍⏳👨‍💻👩‍💻🛠️✅
Tags: aws, devops, linux, cloud
Published: 2020-09-13 00:34:13

![AWS Cloud](https://media.giphy.com/media/7J4P7cUur2DlErijp3/giphy.gif)

<b>Thought of sharing this with you</b> 😊

<u><b>I've started posting my articles here on Facebook group as well</b></u>

<h2><b><a href="https://www.facebook.com/groups/2588950954550770/?ref=gs&fref=gs&dti=2588950954550770&hc_location=group">"AWS Troubleshooting Tips and Tricks & Blogs"☁️🔍⏳👨‍💻👩‍💻🛠️✅</a></b></h2>

----------------------------------------------------------------
<h3><b>You can join here </h3></b>
----------------------------------------------------------------
<b>[+] https://www.facebook.com/groups/2588950954550770/?ref=gs&fref=gs&dti=2588950954550770&hc_location=group</b>

<a href="https://www.facebook.com/groups/2588950954550770/?ref=gs&fref=gs&dti=2588950954550770&hc_location=group">![AWS Troubleshooting Tips and Tricks & Blogs](https://dev-to-uploads.s3.amazonaws.com/i/5k7ialgarn56qljskx30.JPG)</a>


![Happy Learning](https://media.giphy.com/media/ZB9CwEZowWFQzHDqN2/giphy.gif)

      ☁️🔍⏳👨‍💻👩‍💻🛠️✅😇 Happy learning 😇☁️🔍⏳👨‍💻👩‍💻🛠️✅
Symbolic logic and programming
Tags: ocaml, logic
Published: 2020-09-13 00:19:10

I am [working my way](https://github.com/jamesliudotcc/discrete-math-and-func-prog) through VanDrunen's Discrete Math and Functional Programming. Symbolic logic is dealt with in a single chapter from beginning through multiple quantification. Here are some thoughts.

1. It took a quarter-long course, Logic I, in college to get through that material. It was a long time ago, and I am glad it has stuck as well as it did. I am breezing through the chapter as if through well-trodden ground.

2. This chapter is 1/7 of what the author thinks should be covered in a semester-long class with "bright" math and CS undergrads. So I guess about 2 weeks.

3. The book, as the title suggests, also covers programming. I think the programming aspect helps with the comprehension of logic, so that partly explains how it is squeezed into so much less space.

4. All the extra how-to-prove-it material would have been really helpful when I got to Logic II. Logic I was way too slow, Logic II, which proved the soundness and consistency of first-order logic, was much too fast.
Suggestions for coding stream time/day, content, languages
Tags: watercooler, java, cpp
Published: 2020-09-13 00:10:08

It's been a while DEV! A few months ago I toyed with the idea of streaming coding sessions where I'd do some casual coding tutorials with a better interaction with the viewers than say a YouTube video.  After COVID sent me home from college early, though, the idea kinda died. Well, I'm back at my true home again and I'm looking into the idea once more. Is this something you feel you would be interested in, and if so what type of content would you want?
How to detect the Do not track option using JavaScript?
Tags: javascript
Published: 2020-09-13 00:00:00

---
  title: How to detect the Do not track option using JavaScript?
  published: true
  tags: JavaScript
  date: Sun Sep 13 2020 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/detect-do-not-track-javascript
  cover_image: https://melvingeorge.me/_next/static/images/main-e8a1737ca9fe38fbd6b44992cad83dce.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/detect-do-not-track-javascript)
  
## What is Do not track?

Do not track is an option set by users in many modern browsers to tell the websites and advertisers not to track their activities.

## How to detect Do not track?

Detecting Do not track settings from a browser is different for different browsers.

### For Chrome and Firefox browsers

- You need to use the `navigator.doNotTrack` property to detect the settings
- The property returns a string `"1"` if the do not track option is turned on and `"0"` if it is turned off.

```javascript
// detect do not track option
// for chrome and firefox browsers

if (navigator.doNotTrack === "1") {
  // if the options is true
  console.log("Do not track is enabled");
} else {
  // if the option is false
  console.log("Do not track is not enabled");
}
```

### For Safari browsers

- You need to use the `window.doNotTrack` property to detect the settings.
- The property returns a string `"1"` if the do not track option is turned on and `"0"` if it is turned off.

```javascript
// detect do not track option
// for safari browsers

if (window.doNotTrack === "1") {
  // if the options is true
  console.log("Do not track is enabled");
} else {
  // if the option is false
  console.log("Do not track is not enabled");
}
```

### Caveat: For some browsers, the `doNotTrack` property may return string `yes` or `no` instead of `"1"` or `"0"` 🧘‍♂️.

### A universal detection method

To detect Do not track setting universally, you nned to check for both the `naviagtor` and `window` object for the `doNotTrack` property like this,

```javascript
// check whether the browser support Do not track
if (naviagtor.doNotTrack || window.doNotTrack) {
  // if it supports
  // then check for the doNotTrack property in both of them
  if (
    window.doNotTrack === "1" ||
    navigator.doNotTrack === "1" ||
    navigator.doNotTrack === "yes"
  ) {
    // the options is enabled
    console.log("Do not track is enabled");
  } else {
    // the option is not enabled
    console.log("Do not track is not enabled");
  }
} else {
  console.log("Do Not track is not supported");
}
```

See this example live in [JSBin](https://jsbin.com/mobebatibi/3/edit?js,console).

### Feel free to share if you found this useful 😃.

---
Just the beginning...
Tags: justthebeginning, herewego, onegiantstep
Published: 2020-09-12 23:38:52

Today is the first day of the rest of my life.  It sounds so dramatic, right?!?  But maybe it really is.  And it's about damn time.  I'm 41 years old and finally deciding what I want to be when I grow up.  I know there were reasons, my kids were worth every moment in a job I didn't love, but I am ready to take these steps.
So flash forward to now.  I start a bootcamp in two weeks.  I am unemployed for the first time in my adult life.  My family is beyond supportive and I am blessed beyond compare.  So I need to make sure I got this.  So I'm preparing.  Every damn day.  Watching videos and doing classes and using apps on my phone.  I've got notebooks filled with notes about everything I think I might forget, things I have already forgotten and things I'm not even sure I understand!  I've watched video after video of advice, ideas, study guides... anything I think might help.
So today I'm here, asking for advice, support, really just needing to cement my dedication to myself, even if only to me.  
Here we go!  Let's get this done!
Show your latest to-do's and Todoist stats automatically on your GitHub profile readme
Tags: actionshackathon, showdev, javascript, github
Published: 2020-09-12 23:36:14

[Instructions]: # (To submit to the GitHub Actions x DEV Hackathon, please fill out all sections.)
_This blog is originally published on: [My Blog](blog.abhisheknaidu.tech)_

I use `Todoist` and `Notion` App, a lot for organizing my work and maintaining my `Timeline`. I actually had this idea of automating and showing todoist stats on my README (as Notion doesn't have it's own API till now), a long back when `GitHub` launched their `Profile README's`, but due to some work and busy schedule , I'm not able to work on this, but few days ago, I saw **DEV's** post regarding GitHub Actions hackathon in collaboration with **GITHUB**. That's when I thought, It's the best time to work on this automation stuff.

**Fast Forward** to today: I build this automation in just 3 Days, Published it, and also using it!

 {% github https://github.com/abhisheknaiidu/todoist-readme %} 


### Todoist Readme Workflow:
[Note]: # (Make sure to include the name of your GitHub Action and share where it's being used!)

**Todoist Readme** just needs your **TODOIST_API_KEY**, and if you're **PREMIUM** user, we have some features also for you guy's 😉


### Submission Category: Wacky Wildcards

[Note]: # (Maintainer Must-Haves, DIY Deployments, Interesting IoT, Phone Friendly, or Wacky Wildcards)


The **Workflow** looks this:

### Repository Workflow For Non-Premium Users:

  ```yml
  name: Todoist Readme

  on:
    workflow_dispatch:
    schedule:
      # Runs every minute 
      - cron: '* * * * *'

  jobs:
    update-readme:
      name: Update todoist stats
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v2
        - uses: abhisheknaiidu/todoist-readme@master
          with:
            TODOIST_API_KEY: ${{ secrets.TODOIST_API_KEY }}
  ```


### Repository Workflow For Premium Users:

  ```yml
  name: Todoist Readme

  on:
    workflow_dispatch:
    schedule:
      # Runs every minute 
      - cron: '* * * * *'

  jobs:
    update-readme:
      name: Update todoist stats
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v2
        - uses: abhisheknaiidu/todoist-readme@master
          with:
            TODOIST_API_KEY: ${{ secrets.TODOIST_API_KEY }}
            PREMIUM: true
  ```



__If you loved the project, do share and 🌟 the Repo!__
Selection Sort
Tags: javascript, algorithms, sorting
Published: 2020-08-24 13:51:58

As we continue to look into sorting algorithms we will learn what's **Selection Sort** today.

Selection Sort is another naive sorting approach, can be used for sorting smaller data sets.

First, let's look at the _Pseudo code_

For this example, let's imagine we are looking at an unsorted set of cards

1. Find the smallest card and swap it with the first element of the array.
2. Find the second smallest card and swap it with the second element of the array.
3. Repeat finding the next-smallest card, and swapping it into the correct position until the array is sorted.

Simple! isn't it?!

Below is the implementation of Selection Sort in JS

![implementation](https://dev-to-uploads.s3.amazonaws.com/i/nyqabnd6jmm8zpzd8tf5.png)

Once after you execute the function below is the response

![result](https://dev-to-uploads.s3.amazonaws.com/i/gij8h2oadyt7gvd0ffm1.png)

As I mentioned earlier on the below article.

{% post https://dev.to/sudharsanansr/insertion-sort-27p %}

this video reference was really good to understand how similar Insertion Sort & Selection Sort are.

{% youtube pcJHkWwjNl4 %}

Hope you like this article, please feel free to share your comments.

Thanks again for stopping by 😊
Implementing cursor pagination with ActiveRecord
Tags: ruby, activerecord
Published: 2020-09-12 22:00:09

---
title: Implementing cursor pagination with ActiveRecord
published: true
description: Having fun with performant pagination
tags: ruby, activerecord, sql
//cover_image: https://direct_url_to_image.jpg
---
[The PaginationService](https://github.com/AndyRosenberg/ReviewAnythingOnce/blob/master/services/pagination_service.rb)

I had some fun with this one. Implementing pagination almost always gives me a touch of anxiety, especially your typical `LIMIT/OFFSET` pagination. I had recently discovered the more performant cursor pagination [from this post](https://dev.to/ivoecpereira/why-you-shouldn-t-use-offset-and-limit-for-your-pagination-610) and wanted to give it a go. I created a service in my latest Roda app to be able to take some arguments, chain a query and run the high-performance pagination from there.

I started with implementing a couple different gems, then was able to gather what I needed to create my own version with more control. [Parulian's post and repo](https://dev.to/bambangsinaga/ruby-cursor-pagination-531m) was a huge inspiration for my service (big thanks!). I needed the returned formatting to be a little more specific and the query chaining capabilities to be a bit more explicit, so I was able to create a base structure around his library and convert the service based on my needs.

Here's a little explanation of the code. We basically have a parent service class (not shown) that converts args passed into an instance into accessors. We use a class method to define defaults, and another to pass in keyword arguments (limited to the accessors listed) to define the boundaries of the query.

`PaginationService.paginate` defaults to a descending-order page showing the last 25 reviews that were created. The previous and next cursor are returned in the `"navigation"` pair in the final JSON. What I like about the implementation is that we can pass in an array to the `where:` option that represents a parameterized query to be chained to the final pagination (i.e. limiting reviews that have a rating higher than 5).

I'm totally nerding out over my own code, but maybe it can help someone that wants to set up their own cursor pagination. Happy trails, devs!
hookee - command line webhooks, on demand
Tags: webhooks, python, ngrok, flask
Published: 2020-09-12 21:57:43

<p align="center"><img alt="pyngrok - a Python wrapper for ngrok" src="https://hookee.readthedocs.io/en/latest/_images/logo.png" /></p>

`hookee` is a utility that provides command line webhooks, on demand! Dump useful request data to the
console, process requests and responses, customize response data, and configure `hookee` and its routes
further in any number of ways through custom plugins.

## Installation

`hookee` is available on [PyPI](https://pypi.org/project/hookee/) and can be installed
using `pip`:

```sh
pip install hookee
```

or `conda`:

```sh
conda install -c conda-forge hookee
```

That's it! `hookee` is now installed.

## Basic Usage

`hookee` makes it easy to get webhooks on the fly right from the console. Simply start it with:

```sh
hookee start
```

With its default configuration, this will start a server on port 5000, open a [`ngrok`](https://ngrok.com/) tunnel
using [`pyngrok`](https://pyngrok.readthedocs.io/en/latest/), and mount a URL at `/webhook`. Sending any request to
the `/webhook` endpoint will dump the request and response data to the console.

`hookee` can be configured in a number of ways to quickly and easily tweak request and response data. For example,
here we are customizing the response body from `/webhook` using the `--response` arg.

```sh
hookee --response "<Response>Ok</Response>" --content-type application/xml
```

To see the ways `hookee` can be tweaked right from the console, view its documented args and commands like this:

```sh
hookee --help
```

## Documentation

For more advanced usage, including how `hookee` default configuration can be changed, extended through plugins,
and more, see its official documentation is available at [http://hookee.readthedocs.io](http://hookee.readthedocs.io).

## Contributing

If you would like to get involved, be sure to review the [Contribution Guide](https://github.com/alexdlaird/hookee/blob/master/CONTRIBUTING.rst).

Want to contribute financially? If you've found `hookee` useful, [sponsorship](https://github.com/sponsors/alexdlaird) would also be greatly appreciated!
Create a Covid-19 map using react leaflet, hooks and bootstrap - Choropleth map

Tags: react, javascript, tutorial
Published: 2020-09-12 21:56:56

{% youtube 4cliojOu3as %}

I’m excited to be sharing this tutorial with you. We will be creating a Covid-19 Choropleth map using React Leaflet, React Hooks, GeoJson, Papa Parse, Bootstrap and flexbox. I will take you through every step of creating this application.

This Covid-19 map will display confirmed cases from around the world. Countries with the most cases are shown in dark red and those with fewer cases have a lighter color. This map is interactive and lets you click on each country for more details. 

We will even be creating a nice legend to place at the bottom of the map. If you're wondering what this type of map is called, it’s called a choropleth map. It uses different shading and color to display some statistic, in this case we are using covid-19 confirmed cases.
Named Entity Recognition (NER) Simplified
Tags: nlp, computerscience, linguistics
Published: 2020-09-12 21:44:43

* [Introduction] (#Intro)
* [Defining Named Entity Recognition] (#Definition)
* [What makes NER Difficult] (#NERProblems)
* [Current Approaches] (#NERApproaches)
* [Experimenting With NER] (#NERExperimenting)



<a name="Intro"/>
# Introduction
This blog post is post number two in a series aimed at making Natural Language Processing topics more accessible by abstracting these topics away from mathematics and implementation details.
- - - - - - - - - - - 
<a name="Definition"/>
# Defining Named Entity Recognition
> Named Entity Recognition (NER) is the detection and labelling of named entities (organisations, people, locations etc.)  within a text.  

Here is an example of what an NER analysis returns on a given sentence (using [spaCy's NER and visualiser] (https://spacy.io/usage/linguistic-features#named-entities-101)):

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


Tags (labels such as _organisation_) can vary between different systems and implementations but they will usually include:
1. **ORG**anisation
2. (**GPE**) Geo-Political Entities
3. **PERSON**

Other categories you may encounter include _location_, _money_ and _time_.

- - - - - - - - - - - 
<a name="NERProblems"/>
# What Makes NER Difficult?
At first glance, the task can seem very easy. However, after considering a few examples it can equally quickly become clear how the task could be troublesome for a machine.

> “First Lady Makes an Appearance at John Smith’s”  

Are we discussing the first lady to ever exist or are we talking about the president’s wife here? Is John Smith's a pub, a person's house or something completely different? And, more importantly, how can a computer know?

- - - - - - - - - - - 

<a name="NERApproaches" />
# Approaches to NER
There are several different approaches that people use to meet their NER requirements. Generally, these can be broken down into techniques using statistics (including machine learning) and techniques based on grammar. Obviously most implementations take a combination of both of these approaches. 

* More grammar-based techniques involve a higher labour cost but see much more accurate results.
* Statistical approaches produce slightly less accurate results but can analyse sample sets much quicker. A common bottleneck for statistical approaches is the amount of annotated data (these are sentences like in the picture above which are labelled correctly so that the computer can learn how to label too).

- - - - - - - - - - - 

<a name="NERExperimenting" />
# Experimenting with NER
Now that you hopefully have a baseline understanding of what NER is, I could not end this post without suggesting using the NLP package spaCy's NER feature and visualiser (which I even used when making this post)!

You can find an interactive code playground [here](https://spacy.io/usage/linguistic-features#named-entities-101) where you can change anything from the NLP pipeline or just the sentence to analyse.