teleren/devto huggingface dataset:
Selenium Webdriver for Automation
Tags: python, selenium
Published: 2020-08-16 23:47:06

So I recently wanted to create an application to automate the job application process. This project is still a work in progress and was really just meant to be a break from what I have been working on. Using selenium and Monster's easy application process, I got my program to apply to various speed-apply jobs. 

##Setup
First I imported requests and webdriver from selenium. Then got the monster job URL for software jobs in texas and passed it into my chrome driver
```
import requests
from selenium import webdriver
URL = 'https://www.monster.com/jobs/search/?q=Software-Developer&where=texas'
driver = webdriver.Chrome(chromedriver_location)
driver.get(URL)
```
Then the program logged me in using the code below:
```
driver.find_element_by_tag_name("ul a").click()
driver.find_element_by_id("email").send_keys("email")
driver.find_element_by_id("password").send_keys("password")
driver.find_element_by_id("btn-login").click()
```

##Job Application
When I first started this I tried to go through each application and have the program fill in my information and apply. This worked well for one job but the driver was slower than the code and caused some issues. So I decided to just select the speed-apply jobs and apply to these. However, the issue then arose that the page some times had different numbers of jobs so I implemented the solution below:
```
for num in range(0, 50):
    try:
        jobs = driver.find_elements_by_tag_name('h2 a')
        jobs[num].click()
    except:
        driver.find_element_by_class_name('mux-search-results').click()
        jobs = driver.find_elements_by_tag_name('h2 a')
        jobs[num].click()
    try:
        apply = driver.find_element_by_id('speedApply')
        if apply:
            apply.click()
            print(f"applied to job {num}")
    except:
        print(f"job {num}")
        print("Gotta do more")
```
In this code, I go through 50 jobs(Sometimes). If there are no more jobs the program then presses the more jobs button. Once these results are loaded the program will try to continue through the process. This works for the most part but as of now, I am running into issues with some of the speed applies.

With this, I have successfully applied for a handful of jobs on Monster using Selenium and python code.
Tips to read while your poopy -- lite -- editor leve e open-source no ubuntu
Tags: ubuntu, opensource, tutorial, editor
Published: 2020-08-16 22:45:31

Outro dia estava no meu twitter vendo memes e problemáticas de adolescentes super lúcidos de 14 anos como faço todos os dias e me deparei com um artigo sobre o Visual Studio **[The best parts of Visual Studio Code are proprietary](http://underjord.io/the-best-parts-of-visual-studio-code-are-proprietary.html)** que me fez pensar bastante sobre o uso do mesmo.

E bem o ponto desse tutorial não é conversar sobre isso então leia e tire suas próprias conclusões, enquanto não lê, vou te mostrar um editor feito em lua rápido novo e com algumas características bem legais e o melhor open-source.

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

E bem caso queira novos ares como eu, ao dar uma olhada no repositório como instalar vai ver que não tem muitas informações de como usar no Ubuntu que no caso é meu sistema principal e onde programo, então como resolver isso é fácil.

**1.** Instalar o compilador de C++, que nesse caso é o g++ para nossa sorte ele é fácil de instalar já que está nos repositórios oficiais da Ubuntu

```bash
sudo apt-get install g++
```

**2.** Instalar a biblioteca SDL que é o que eles usam para renderizar a tela de nosso futuro querido editor.

*Obs.:* Link de onde peguei os comandos para instalar caso o artigo fique antigo 😬 https://gist.github.com/BoredBored/3187339a99f7786c25075d4d9c80fad5

```bash
#install sdl2
sudo apt install libsdl2-dev libsdl2-2.0-0 -y;

#install sdl image
sudo apt install libjpeg-dev libwebp-dev libtiff5-dev libsdl2-image-dev libsdl2-image-2.0-0 -y;

#install sdl mixer
sudo apt install libmikmod-dev libfishsound1-dev libsmpeg-dev liboggz2-dev libflac-dev libfluidsynth-dev libsdl2-mixer-dev libsdl2-mixer-2.0-0 -y;

#install sdl true type fonts
sudo apt install libfreetype6-dev libsdl2-ttf-dev libsdl2-ttf-2.0-0 -y;
 ```

 **3.** Baixar a última versão disponível no repo, de preferência em *tar.gz* e descompactar

 **4.** Na pasta onde descompactou basta rodar  

 ```bash
 ./build.sh
 ```
**5.** Bem com isso ele deve ter feito o build mas agora para rodar em qualquer pasta como faço?.
É simples também basta colocar na última linha de seu arquivo *.bashrc* que fica na sua pasta home o comando

```bash
export PATH=$PATH:/home/<Seu usuário>/<Caminho para a pasta do lite>

#### no meu caso ficou 
export PATH=$PATH:/home/alexandre/lite
```

Com isso toda vez que seu sistema iniciar ele vai ter o caminho do editor salvo aí basta rodar **lite .** na pasta onde quer abrir o editor.

### Abraços virtuais

Espero que tenham gostado e dado uma chance para esse editor que sinceramente gostei muito e é bem leve o que é ótimo para minha máquina cansada de guerra 🤣

Se gostarem digam nos comentários quem sabe eu animo a fazer um outro artigo instalando alguns plugins que gosto muito, até pessoal 👋
Day 07 (100DaysOfCode)
Tags: 100daysofcode, programmers, developers
Published: 2020-08-16 22:24:44

---
title: Day 07 (100DaysOfCode)
published: true
description: Daily Update of 100 Days of Code
tags: #100DaysOfCode #Programmers #Developers
//cover_image: https://unsplash.com/photos/zE007SNgcdE
---
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gsbh7p9sqw7eqwnooerw.jpg)

 
# Progress Report    

**Learn about BABEL Compiler.**
BABEL:  That's used to translate our modern javascript code in ES5.
Usually, browsers, not support ES2016 or later versions therefore we use BABEL to convert our code into ES5.

**Learn About Components**
React.js have two types of components.
1. Function Component.
2. Class Component.

**Learn the Difference between JSX and HTML**
1. You can use Javascript variables directly in your JSX code!.
2. Adding custom styling to an element uses different syntax.
3. Some attribute names are different in JSX.
Fingerprint WSQ library
Published: 2020-08-16 21:53:17

AFIS.WSQ is a wrapper library, written in .NET C#, to encode and decode WSQ (Wavelet Scalar Quantization) images using AFIS.WSQ.K native library (WSQ) from NIST Biometric Image Software (NBIS)

Allows parallel execution of compression and decompression. Thread Safe x32 and x64

[WSQ C# Wrapper Library](https://github.com/alainrc2005/AFIS.WSQ)
[WSQ C Native Library](https://github.com/alainrc2005/AFIS.WSQ.K)
Dart Lang Learning Experiment
Tags: learning, flutter, dart, newbie
Published: 2020-08-16 21:50:02

I am currently learning Dart lang, so that i can be well equipped on the journey of building cross platform apps using Flutter. These are my notes on how i am approaching this subject. I am approaching it from a linguistic perspective because after all this is a language. Just like human languages, the same principles could be applied here.

#### Side Note
Dart 2.10.0-4 Dev & Flutter 1.21.0-7 Pre Dev Channel

This first part takes a look at the autocomplete feature. I take note of what letters are not used and the amount associated with each letter. All these notes correlate to using the boiler plate code without any packages. 

### Lowercase unused letters
g , j, k, l, o, q, r, u, v, w ,x, y, z. 12 unused letters (lowercase)

### Lowercase Autocompletion count
a-6, b-7, c-16, d-3, e-1, f-5, h-1, i-2, m-6, n-1, p-9, s-6, t-1, v-2
Total: 66 (subject to change)
Side note: 14 Widget categories

### Uppercase Autocompletion
A-137, B-114, C-245, D-193, E-64, F-150, G-67, H-70, I-135, J-11,K-17, L-81, M-140, N-55, O-54, P-215, Q-2, R-267, S-342, T-176, U-60, V-52, W-44, X-8, Y-1, Z-11
Total: 2711 (subject o change)
Uppercase + Lowercase total = 2777 (approximately 3000)

You could say that all you to know is 2777 words to become fluent in Dart Language. Similar to how knowing 142 words or tags makes you fluent in HTML. However, this type of reasoning falls short, but does accomplish one thing. It simplifies the process of learning. 

This is part one of learning Programming using NLP (Neuro Linguistic Programming). All information is subject to change because such is the nature of language (human or programming).
The Empty Statement in JavaScript
Tags: javascript, beginners, codenewbie, 100daysofcode
Published: 2020-08-16 21:42:43


The empty statement in JavaScript is one of those fun and quirky things about JS that you should know. It might not be beneficial, but it exists, and it is entirely legal. An empty statement in JavaScript is `;`. Yup, a semicolon.

An empty statement provides no statement even though JavaScript expects it. The statement has no effect and performs no action.

A typical example would be to create a for loop that has no body.

```javascript
const arr = [1, 2, 3, 4, 5];

for (i = 0; i < arr.length; arr[i++] = 0) ;

console.log(arr); // [ 0, 0, 0, 0, 0 ]
```

It is a good idea to leave a comment if you ever plan on using an empty statement.

```javascript
const arr = [1, 2, 3, 4, 5];

for (i = 0; i < arr.length; arr[i++] = 0) /* empty */ ;

console.log(arr); // [ 0, 0, 0, 0, 0 ]
```

Another example of using an empty statement is a chain of `if-else`.

```javascript
const name = "Lauren";

if (name === "Parwinder")
    console.log(name);
else if (name === "Lauren")
    console.log(`Hello ${name}`); // Hello Lauren
else if (name === "Eliu"); // No action is taken if name passed is  "Eliu"
else if (name === "Robert")
    console.log(`Good to see you ${name}`);
else
    console.log("Goodbye");
```
How to add custom domain in Firebase Hosting
Tags: firebase, hosting, customdomain, webdev
Published: 2020-08-16 21:18:27

If you have an existing domain and wanted to point your subdomain to your web app that you deployed in Firebase then here's how:
1. In your Firebase Hosting Dashboard, Click the 'Add custom domain' button.
2. Enter the domain
3. Verify the ownership by copying the TXT code
4. In your Domain, go to Manage DNS Records or similar and add a new TXT type with your subdomain and paste the TXT code
5. Back to your Firebase page, it should let you verify the ownership and now it will give you the IP address.
6. Then back to your DNS Records page, add a new A type, with your subdomain and paste the IP address.
7. Then Go Live.
8. Wait for a few minutes for the propagation, it depends on your DNS but usually it will only take 15-30 minutes. 
9. You can check once its live in your Firebase dashboard if the subdomain says 'Connected'.

That's it! Let me know if you have questions

[![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ufkyzb7jngbhlfoi8m91.png)](https://www.buymeacoffee.com/aralovelace)
Reactive CSS Properties 🎉🎉🎉 Released on NPM
Tags: css, javascript, showdev
Published: 2020-08-16 21:03:20

[Click here to view the NPM package](https://www.npmjs.com/package/reactive-css-properties)

For a full description of what this is checkout the first post in the series.

The Library is now available for public use, so whats next? Probably a plugin / mixin for each popular framework React, Vue, Angular, Lit and so on, If anyone wants to help me with that I would be very glad!
Repositorios interesantes
Tags: github, repositorios, awesome
Published: 2020-08-16 20:33:09

Hay unos repositorios en GitHub que inician con el prefijo “awesome”, la idea es poner una lista de herramientas o tecnologías recomendadas. 

Por ejemplo el repositorio awesome-java, tiene un listado bien organizado de librerías y frameworks por categorías dependiendo el uso.

Estos son algunos repositorios que he encontrado interesantes:

- [Awesome](https://github.com/sindresorhus/awesome)
- [Awesome Java](https://github.com/akullpp/awesome-java)
- [Awesome Python](https://github.com/vinta/awesome-python)
- [Awesome JavaScript](https://github.com/sorrycc/awesome-javascript)
- [Awesome NodeJS](https://github.com/sindresorhus/awesome-nodejs)
- [Awesome Awesome NodeJS](https://github.com/bnb/awesome-awesome-nodejs)
- [Awesome GitHub Profile](https://github.com/abhisheknaiidu/awesome-github-profile-readme)

Otros repos:

- [Dotly by CodelyTV](https://github.com/CodelyTV/dotly)
- [Listado de API’s públicas](https://github.com/public-apis/public-apis)  
- [Algoritmos y estructuras de datos en JavaScript](https://github.com/trekhleb/javascript-algorithms)  
- [Recomendaciones de buenas prácticas con NodeJS](https://github.com/goldbergyoni/nodebestpractices)  
- [Lluvia de ideas para nuevos proyectos](https://github.com/florinpop17/app-ideas) 
- [Tendencias del desarrollo web 2020](https://github.com/kamranahmedse/developer-roadmap)
Verify a JWT Token
Tags: 100daysofcode, javascript
Published: 2020-08-16 20:19:53

[My previous post](https://dev.to/mtee/generating-a-json-web-token-98m) involved generating a random number that would serve as a token secret. I was generating a new random number each time a user made post request to the login route, which was good for learning but impractical. [We only need one token secret](https://stackoverflow.com/questions/46112014/i-need-to-manage-jwt-secret-keys-individually-for-each-user), this is because we'll be using the token secret to verify our tokens. So instead i logged out the random number, copied it and saved it to a config.js file.
```javascript
module.exports = {
  'secret': 'ed5a2131834e4e0dd1fb7b9d1d0a1db71802a13a02011b19a98152b7988ad9215613c064a0ded303c39ab328b6181494'
}
```
I'll be using this token secret to create and verify tokens. I'll include my the config.js file in my userController.js file, then replace the secret ([previous post](https://dev.to/mtee/generating-a-json-web-token-98m))  in `jwt.sign()` with config.secret.
```javascript
const config = require('../config/config');
```
```javascript
const token = jwt.sign({ id: user._id }, config.secret, {
        expiresIn: 86400 
      });
```
Next i want to verify the token. I'll add this functionality to my getUsers function. I'll retrieve the token from the request headers and save it to a variable: token. If no token exists i'll send back a message: 'no token Provided'. If a token exists we pass it to `jwt.verify()` together with our token secret for verification. On successful verification it should return a list of all users, failure to which it  will return an error message.
*Disclaimer: I'm probably not following the best practices here but it's part of the learning process.*
```javascript
const getUsers = (req, res) => {
  let token = req.headers['x-access-token'];
  if(!token){
    return res.status(401).send({auth: false, message:'no token provided'});
  }
  jwt.verify(token, config.secret, function(err, users) {
    if (err) return res.status(500).send({ auth: false, message: 'Failed to authenticate token.' });
    
    User.find((err, users) => {
        if (err) {
          return res.sendStatus(404);
        }
        return res.json(users)
      });
  });
```
I'll head over to postman and send a Get request to the /users route. Since no token was passed i'll get an error message back.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/giem3gp8gk8orh2nnrtz.png)

I'll send a Post request to the /users/login route, and copy the generated token.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/t30q3d6mhwm68j05ggnh.png)

I'll try and get the users again this time passing the token to the request.![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/tf34hvcbkevsw7wtctsh.png)
My users are retrieved successfully.

That's it for today.

Ps:
*I'm still trying to wrap my head around Authentication. There might be a hell lot of updates on this posts.*

_Day 31_
API to take full page screenshots?
Tags: qa, screenshots, api
Published: 2020-08-16 20:19:44

Hi guys. I'm looking for an API that takes full page screenshots using real devices that isn't browserstack. The issue with browserstack is that it just scrolls the page to take screenshots which results in cookie bars and header bars being duplicated the whole way through the image. If this isn't possible with real devices no worries, was just checking if anything like that exists.
How to install amqp extension for PHP on Windows
Tags: php, amqp, phpextensions
Published: 2020-08-16 20:01:14

---
title: How to install amqp extension for PHP on Windows
published: true
description:
tags: PHP, amqp, phpextensions
---

**Warning:** before the download, check if your PHP installation [is thread safe or non-thread safe](https://www.geeksforgeeks.org/what-is-thread-safe-or-non-thread-safe-in-php/) typing this on Terminal:

`php -i|findstr "Thread"`

Next, proceed:

1. Download the right version of the extension https://pecl.php.net/package/amqp
2. After download, copy rabbitmq.4.dll and rabbitmq.4.pdb files to PHP root folder and copy php_amqp.dll and php_amqp.pdb files to PHP\ext folder
3. Add `extension=amqp` to the php.ini file
4. Check if is everything OK with `php -m`

It is miserable easy but I have stuck on this for almost two hours.
Universal Data Tool Weekly Update 2
Tags: machinelearning, computerscience, datascience
Published: 2020-08-16 19:56:58

If you haven’t heard of the Universal Data Tool, it’s an open-source web or desktop program to collaborate, build and edit text, image, video, and audio datasets with labels and annotations. You can get started with the [Universal Data Tool] (universaldatatool.com)

This is our second community update! We’re hoping by releasing these we can better engage the community and encourage new contributors. Let’s get started…

You can watch the video update here

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/a59ahy4fgs4r6qcxc7yf.png)
(https://youtu.be/3bq9N08oc-U) 



#New Feature: Collapsible Sidebar
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fngi7e56gb4dfos0zk2l.png)

All Image Segmentation views now have a collapsible sidebar with expendable options. Now you can use the entire screen for segmentation if needed by just clicking on the arrow on the right side of the screen. It should help to clear the UI and be beneficial when used on smaller screens.

#New Feature: Convert Image Samples into any number of segments

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

Now there is no limit to convert image samples into segments as opposed to earlier 5x5 limits. Also, there is an improvement to how we zoom in on segments when you have a sample split up in segments. It will now automatically zoom in on the segment that’s allowed to be annotated in every sample.


That’s it for our second community update, be sure to follow us on [Twitter] (http://twitter.com/UniversalDataTl), or join our [Slack](https://workaroundon.slack.com)to hear more!
Terminal and Team
Tags: terminal, remote, collaboration, cli
Published: 2020-08-16 19:40:53

Hi folks,

we are trying to make the terminal experience more collaborative with a focus on remote teams.

We are still pinpointing what is the most important part, so a little collaboration with you folks would really help us.

The questions we want to ask are:
- What is the most painful thing about using terminals for you?
- Does your whole team have the same terminal and shell setup? 
- How do you keep programs versions in-sync across the team?
- Have you built an internal CLI tool?
- Is there a set of commands that the whole team uses?
- How do you educate new hires about all these things?
- Have you ever screen-shared your terminal while working remotely?

So far we have created the [Sidekick app](https://www.notion.so/Sidekick-Terminal-for-Teams-2d0f7a2000b04467868a5505dd2867e6) that lets you connect to your teammates' terminal sessions with 1-click.

We are grateful for any answers and ideas you will give us.
Keep your draw.io diagrams in sync inside your repository
Tags: actionshackathon, github, opensource, drawio
Published: 2020-08-16 19:39:22

---
title: Keep your draw.io diagrams in sync inside your repository
published: true
description: My 'drawio-export' submission to the GitHub Actions x DEV Hackathon!
tags: actionshackathon, github, opensource, drawio
series: Actions Hackathon
---

### My Workflow

You have [Draw.io](https://app.diagrams.net/) diagram files on your repository? You export them manually to have them as images (png, jpg) or pdf?

You can keep your diagrams as exported images (png, jpg) or pdf and keep them synchronized when the diagram files are updated.

### Submission Category: 

* Maintainer Must-Haves

### Yaml File or Link to Code

Example to keep your draw.io files exported as PNG files with associated Asciidoctor pages.

```yaml
name: Keep draw.io export synchronized
on:
  push:
    branches:
      - master
    paths:
      - "**.drawio"
      - .github/workflows/drawio-export.yml
jobs:
  drawio-export:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v2
        with:
          token: ${{ secrets.GH_TOKEN }}

      - name: Export drawio files to asciidoctor and png files
        uses: docker://rlespinasse/drawio-export:v3.x
        with:
          args: --fileext adoc --folder drawio-assets --transparent --on-changes

      - name: Get author and committer info from HEAD commit
        uses: rlespinasse/git-commit-data-action@v1.x

      - name: Commit changed files
        uses: stefanzweifel/git-auto-commit-action@v4.1.6
        with:
          commit_message: "docs: sync draw.io exported files"
          commit_user_name: "${{ env.GIT_COMMIT_COMMITTER_NAME }}"
          commit_user_email: "${{ env.GIT_COMMIT_COMMITTER_EMAIL }}"
          commit_author: "${{ env.GIT_COMMIT_AUTHOR }}"
```

### Additional Resources / Info

Learn more about the `drawio-export` docker image.

{% github rlespinasse/drawio-export no-readme %}

Contributions welcome
Async Await from Beginner to Advanced Features Including Concurrency
Tags: webdev, javascript, beginners, tutorial
Published: 2020-08-16 19:31:25

# Async Await Tutorial
{% youtube 7DTQP5G97oU %}
*Link to youtube channel: https://www.youtube.com/channel/UC3b871DqOlA5tKbizv4J6mg*
### What is Async Await?

Async await is used to execute asynchronous tasks in Javascript. The tutorial video above covers Async await and concurrency.

### Write Better Code With Concurrency

If you are here to learn async await, watch the video above. Below we will illustrate the power of concurrency!

This is a wait function that returns a promise. The promise resolves in the amount of milliseconds passed to it as an argument.

```javascript
const wait = (ms) => {
    return new Promise(function(resolve) {
        setTimeout(resolve, ms, 'Message Received');
    });
}
```

The following function, findMessage(), will await 3 separate asynchronous calls to the wait() function above. Wait is called and 2000 is passed in. This means the promise resolves in 2 seconds. This code takes 6 seconds to execute.

```javascript
const findMessage = async () => {
  const timeStart = Date.now()
  const one = await wait(2000)
  console.log(one)
  const two = await wait(2000)
  console.log(two)
  const three = await wait(2000)
  console.log(three)
  const timeEnd = Date.now()
  console.log(`Time ${timeEnd - timeStart}`)
}

findMessage()
```

The following function, findMessageConcurrently(), will await 3 asynchronous calls to the wait() function above. Wait is called and 2000 is passed in. This means the promise resolves in 2 seconds. This code takes just over 2 seconds to execute.

```javascript
const findMessageConcurrently = async () => {
   const timeStart = Date.now()
   const [one, two, three] = await Promise.all([wait(2000),
 wait(2000), wait(2000)])
   console.log(one)
   console.log(two)
   console.log(three)
   const timeEnd = Date.now()
   console.log(`Time ${timeEnd - timeStart}`)
 }

findMessageConcurrently()
```

# Why?
When using Promise.all, each promise passed in is started. Then it is added to the end of the event loop where a response is awaited. The two second promises can all be done concurrently using Promise.all.