teleren/devto huggingface dataset:
Extract texts from PDFs.
Tags: javascript, beginners, tutorial, node
Published: 2022-03-11 10:11:32


Finding, screening, recruiting, and training job applicants, as well as administering employee-benefit programs, are the responsibilities of **hiring managers** and **human resource** (HR).
At times, the process may necessitate extracting their information in the most computerized and automated manner possible.


We'll learn how to extract text from PDF using the _pdf-parse_ npm lib in this short post. 

#### Setup
`npm init -y` to start your node project
`npm i pdf-parse`
 `Add your pdf file`

###### This is how your folder structure should look. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n3bd33elpugql6nv5gju.PNG)
 

* Here's the code base
```javascript
const fs = require("fs");
const pdfParse = require("pdf-parse");

const pdfFile = fs.readFileSync("test.pdf");

pdfParse(pdfFile).then(function (data) {
  console.log(data.numpages);
  console.log(data.text);
  console.log(data.info);
});

```

* Other available options
```javascript
	// number of pages
	console.log(data.numpages);
	// number of rendered pages
	console.log(data.numrender);
	// PDF info
	console.log(data.info);
	// PDF metadata
	console.log(data.metadata); 
	// PDF.js version
	// check https://mozilla.github.io/pdf.js/getting_started/
	console.log(data.version);
	// PDF text
	console.log(data.text); 
```
###### Run your code with this command: `node index`
Result: 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v4knym49n2rnflz7yxjm.PNG)

> The <kbd>2</kbd> highlighted in green represents the number of text as indicated in our code. 

---


#### Basic Usage with HTTP
We will install 2 additional packages `multer` and `crawler-request`
```javascript
const express = require("express");
const pdf = require("pdf-parse");
const crawler = require("crawler-request");
const multer = require("multer");

var upload = multer();

const app = express();
const port = process.env.PORT || 3434;

// Body parser middleware
app.use(express.json());
app.use(express.raw());


app.post("/upload-pdf", upload.single("file"), (req, res) => {
  console.log(`Request File: ${JSON.stringify(req.file)}`);

  let buff = req.file.buffer;

  pdf(buff).then((data) => {
    // PDF text
    console.log(data.text);
    res.send({ pdfText: data.text });
  });
});

app.listen(port, () => {
  console.log(`app started on localhost:${port}`);
});


```

###### Let's test with postman
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/259p5ot0zptimpcu2i1h.PNG)

Result:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tsfcs1dmiia3kkanf74e.PNG)
  
#### Discuss 
What are the other ways you can use to extract text from PDF other than the aforementioned

#### Resources
[pdf-parse](https://www.npmjs.com/package/pdf-parse)
[Dev Odyssey](https://gist.github.com/odevodyssey/ac07f490c43375c7cf0cde1db22f1e4a)
Topic Labeling: A Definitive Guide
Tags: topiclabeling, textanalysis, sentimentanalysis, emotionanalysis
Published: 2022-03-11 10:09:36

[**Topic Labeling**](https://www.bytesview.com/topic-labeling) is an (NLP) Natural Language Processing technique that enables you to automate tagging and organizing massive values of textual data based on the topic or theme.

On a daily basis, businesses generate a large volume of documents and unstructured text such as emails, social media posts, reviews, forum discussions, and customer support tickets. But when it comes to analyzing and making sense of this data, it is far too big to process manually. Even if you go ahead and start analyzing the data manually, it will be too time-consuming and you are bound to make mistakes.

This is where topic labeling can help you out. It can make it much easier and faster to accurately analyze and extract large volumes of data. In this blog, we will discuss what topic labeling is and how you can use it to analyze unstructured text.


**What is Topic Labeling?**

Topic Labeling is also known as topic extraction is a machine learning and NLP technique that examines and organizes large volumes of unstructured text data. It can tag and categorize documents or even each paragraph based on the topic or theme of the text.

Read the full article here:https://www.bytesview.com/blog/topic-labeling/
This Week in Python
Tags: python
Published: 2022-03-11 10:08:11


**Fri, March 11, 2022**

This Week in Python is a concise reading list about what happened in the past week in the Python universe. 

## Python Articles

- [Python 4 dream list](https://old.reddit.com/r/Python/comments/sy369l/your_python_4_dream_list/) – A discussion of features people would like to see in Python 4
- [A Gentle Introduction to Serialization for Python](https://machinelearningmastery.com/a-gentle-introduction-to-serialization-for-python/) – Covers pickle, h5py, serializing TensorFlow models, and memoization
- [Testing Weak References](https://blog.ganssle.io/articles/2018/06/testing-weak-references.html) – Testing Weak References Testing when using weak-referenced objects
- [String Interning in Python](https://rednafi.github.io/reflections/string-interning-in-python.html) – String interning makes common string processing operations time and space-efficient by caching them.
- [Modal forms with Django+HTMX](https://blog.benoitblanchon.fr/django-htmx-modal-form/) – This article describes the pattern I use to implement modal forms with Django and HTMX.



## Projects

- [Streamlit](https://github.com/streamlit/streamlit) – The fastest way to build data apps in Python
- [pip_search](https://github.com/victorgarric/pip_search) – Searching thought pip when hard times strike
- [django-distill](https://github.com/meeb/django-distill) – Minimal configuration static site generator for Django
- [mercury](https://github.com/mljar/mercury) – easily convert Python notebook to web app and share with others
- [blobbackup](https://github.com/blobbackup/blobbackup) – A backup solution in Python
Cannot read properties of undefined (reading 'childNodes')
Tags: javascript, node
Published: 2022-03-11 09:57:43

I am trying to parse a text to a text/xml and get the value that is inside a child Node but is giving this error to me (Cannot read properties of undefined (reading 'childNodes'). I want the value true inside of the GetValidUserPasswordResult. This is the code that i am making:

```
var text = '<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetValidUserPasswordResponse xmlns="http://microsoft.com/webservices/"><GetValidUserPasswordResult>true</GetValidUserPasswordResult></GetValidUserPasswordResponse></soap:Body></soap:Envelope>';
    console.log(text);
    parser = new DomParser();
    xmlDoc = parser.parseFromString(text, "text/xml");


xmlDoc1 = xmlDoc.getElementsByName("GetValidUserPasswordResult")[0].childNodes[0].text;
console.log(xmlDoc1)`

```
Deepen Your Cloud Skills for Free | Digital Talent x Alibaba Cloud 2022 | Indonesia
Tags: beginners, database, cloudskills
Published: 2022-03-11 09:47:09


【Free Cloud Skill Courses For Indonesian Users】

Good news for users in Indonesia, you are free to go with **Digital Talent Scholarship Program** which is initiated by Indonesia Ministry of Communications and Informatics, and it is sponsored by Alibaba Cloud Academy. 

Take your chance to join in and get FREE access to all Apsara Clouder courses, certifications and labs!
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s4q3ql6eyy0ngc6otnao.png)
 

Join Now:
https://id.alibabacloud.com/en/campaign/digital-talent-2022-database
Free AWS Educate Account for Learners
Tags: aws, awseducate, freeawslearning, awsservices
Published: 2022-03-11 09:46:51

I feel happy when I share something that benefits others, and usually share posts that helps community to grow. In this writing I am sharing how to make AWS educate account for free and learn basic to advance level of Amazon Web Services with hands on labs.
First of all visit www.awseducate.com and click on Register button to start the registration process.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4o17nrrmzcg3dyjbgus8.png)

On next screen select “Learn Cloud Skills”

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e6e879zcd470lg8tdmks.png)

You can also select if your organization/institution has affiliation with AWS, and fill out the information as they provided. But for now we will proceed with Learn cloud skill and fill out all the information in the form.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bgntz7p97at23gfmnf4b.png)

As soon as you click on Create Account button, you will receive an email to verify you email.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wuaidbwurowvmx02lp6l.png)

Check you email and click on the link provided in the email to verify the account. After few minutes you will get another email for account confirmation and password reset.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8gnlgjrabe5vju26u0nu.png)

Click on the link to reset the password.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/altwd8ndo2bri1l6b50u.jpeg)

As soon you reset your password you will be redirected to your AWS Educate account.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/52i64wcerr5vtyfazt9q.png)

Congratulations! you now have AWS Educate account. Navigate the home page and get the self paced courses done.
100% FREE Computer Sciences Courses
Tags: free, tutorial, programming, news
Published: 2022-03-11 09:39:38

Hi! I want to tell you that you can apply for free courses on the internet. If you like to learn new things and/or earn free certificates, go to this link.

[Class Central Free Course + Certificate](https://www.classcentral.com/subject/cs?free=true&certificate=true)

This will help you out in your career, not only that you can also learn new knowledge, ideas, tips, about the computer world.

-------
Buy Me Coffee 😊

[![Buymecoffee Donate to Bro Jenuel](https://i.imgur.com/jnnBYBem.png)](https://www.buymeacoffee.com/BroJenuel)
OpenAPI Tools by OxygenXML
Published: 2022-03-11 09:32:27

Hello commmunity! 
 

With great joy, I would like to introduce you to the OpenAPI tools that our team developed in the last few months. Below, I left a short description on them and the links where you can go to find out more details about them: 
 

[OpenAPI Tester Tool](https://www.oxygenxml.com/doc/versions/24.1/ug-editor/topics/openapi-tester.html) 
This tool provides the ability to execute API requests and validate responses on the fly to ensure that they work as expected. It can be used for OpenAPI files in JSON or YAML format. 

 

[OpenAPI Documentation Generator](https://www.oxygenxml.com/doc/versions/24.1/ug-editor/topics/openapi-documentation-generator.html)
Oxygen includes an OpenAPI Documentation generator tool that helps you to easily generate full documentation for OpenAPI components in HTML format, including comprehensive annotations and cross references. The documentation displays information about the servers, paths, components and tags defined in the OpenAPI documents. It also includes the JSON schema documentation for the components along with the diagram image for each component generated according to the specified options. You can select which components are shown in your output after the OpenAPI documentation is generated. 

 
We hope you will enjoy these tools as much as we enjoyed developing them. Also, your feedback will be much appreciated!
Getting comfortable with promises in JavaScript
Tags: javascript, webdev, beginners
Published: 2022-03-11 09:04:29

Promises are difficult to understand for people coming from Python. 

I am currently building an application that will have users upload a CSV file containing a list of emails of members of an online community. I used a popular library, Papa parse, to parse the CSV data. 

However, I got stuck for a couple of hours. 

While I could read the file and output it in the console, I could not assign the data to a variable and transfer it to a database. The trick happened in understanding that the library uses asynchronous functions.

## Asynchronous functions

These are functions that do not execute completely in the sequence of the code. Instead, they return a promise that will do something. This promise may take time to complete and in JavaScript the rest of the code that is not dependent on it continues to execute.  

This means that any value that is returned by a promise can only be accessed after the code in the scope has finished running.  

```
console.log('beginning')
myPromise.then(value => {console.log('Value inside promise:', value)})
console.log('finish')

/* Output logs:
beginning
finish
Value inside promise: myValue
*/
```

Another pitfall is that you cannot assign 'value' to a variable and hope to use that value in the rest of your code that is in the same scope of execution as the promise declaration.

```
let globalVariable
myPromise.then(value => {
  globalVariable = value
})

useValue(globalVariable) // incorrect: does not work
```

This is because the function useValue is being executed before value is returned by myPromise and assigned to globalVariable.

## How to handle promises

You basically have to wait for the promise to execute. Include the code that uses the result of the promise inside the .then syntax.

```
myPromise.then(value => {
  useValue(value) // works! waits for value
})
```

You can also use an async function with the await keyword.

```
async function getValue () {
  // ...
  return value
}

async function main () {
  const value = await getValue() // works! waits for value
  useValue(value)
}

main()
```

Or finally, you can assign to a variable but only use the value in code that runs after. For example, code that runs after an event is triggered. 

```
let globalVariable

myPromise.then(value => {
  globalVariable = value
})


myButton.addEventListener('click', event => {
  if (globalVariable) {
    useValue(globalVariable) 
   // correct but only when click happens after then()
  } else {
    console.log('globalVariable is not yet available')
  }
})
```

The key lesson is to be careful with async functions and promises and think about the sequence in which your code will run.
Day 14/100, 100 Days of Code
Tags: javascript, beginners, codenewbie, devjournal
Published: 2022-03-11 08:55:46

Not much new today. I continued working on the Pokedex project. I guess I could've finished this a couple days ago, but I'm going slowly to understand as much as I can from it.

As far as online courses go, I started **getters** today. Will update tomorrow.
Nervously, I Started A Tech Youtube Channel
Tags: career, beginners
Published: 2022-03-11 08:22:44

That's the plan.

> The marketing expert says to highlight my newborn Youtube Channel: [I Failed To Quit FAANG Jobs (Facebook/Meta | Amazon | Apple | Netflix | Google)](https://www.youtube.com/watch?v=2xVOhl6-RmE&ab_channel=TuwangTech) 


I feel like an imposter, as if I'm joining a new company. Others doing so well. Me? huh.

This time, it's about making Youtube videos. About this first upload, I expected 0 organic impression, so no release pressure. 

One click - Done.

Now, when it comes to sharing the content to broader audience, I'm nervous. The worries are cliche: 
- what if people don't like how I present? 
- what if my point of view is way too narrow? 
- what if - my accent is horrible?

**[EMOTIONAL DAMAGE]**

I doubt this video will gain up to **100 views** before I upload the next one. But hey, I'd like to take 1 step outside of the comfort zone - now I have your attention. 

**Thank you for reading. Please consider checking out that video, and if you enjoy it, I'd love to know how you think!**

Here is the link again: [I Failed To Quit FAANG Jobs (Facebook/Meta | Amazon | Apple | Netflix | Google)](https://www.youtube.com/watch?v=2xVOhl6-RmE&ab_channel=TuwangTech) 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4nz48ipmhmqg61tqyckd.jpg)
A Nice Developer Joke For Today
Tags: jokes, dailydeveloperjokes
Published: 2022-03-11 08:00:20

---
title: "A Nice Developer Joke For Today"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12591e45d64.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ Why didn't the `<div />` get invited to the dinner party?

___A:___ Because it had no class!
 -->
A Brief Introduction To The Hungarian Language 😊
Tags: fun, hungarian, languagelearning, learning
Published: 2022-03-12 18:56:24

---
title: A Brief Introduction To The Hungarian Language 😊
published: true
date: 2022-03-11 07:55:47 UTC
tags: fun, hungarian, languagelearning, learning
canonical_url: https://mszeles.com/a-brief-introduction-to-the-hungarian-language
---
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4bja9o97fjoabpyr3afr.jpg)
Hungarian is a beautiful language, but let's be honest, learning it is hard as f\*\*k. 🤣🤣🤣

But as usual, I do not leave you alone on your journey so I brought you a video that can jumpstart your Hungarian learning adventure.

Here it is:

<iframe src="https://www.facebook.com/plugins/video.php?height=476&amp;href=https%3A%2F%2Fwww.facebook.com%2Fcsilla.varro%2Fvideos%2F361054345880691%2F&amp;show_text=false&amp;width=267&amp;t=0" width="267" height="476" style="border:none;overflow:hidden"></iframe>

**Let's celebrate the Hungarian language together by sharing this video!** 😊

In case you do **not want to miss my posts** , just **follow me** [here on Hashnode](https://mszeles.com/), on [LinkedIn](https://www.linkedin.com/in/miklos-szeles/), on [Twitter](https://twitter.com/mszeles) on [Medium.com](https://medium.com/@mszeles), on [dev.to](https://dev.to/mszeles) and even on [Instagram](https://www.instagram.com/szelesmiki/). 😊

[![](https://img.buymeacoffee.com/button-api/?text=Buy%20me%20a%20coffee&emoji=&slug=theashishmaurya&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff)](https://www.buymeacoffee.com/mikiszeles)
How to add autocomplete to Powershell in 30 seconds ⚡
Tags: tutorial, productivity
Published: 2022-03-11 07:47:16

One of my friends informed me about this really cool feature that allows you to add autocomplete to Windows powershell in 2 easy steps:

Here’s a demo of what we’ll be doing today (Thanks to [nexxel](https://personal-website-nexxeln.vercel.app/) for the blog idea)

![https://us-east-1.tixte.net/uploads/img.dhravya.dev/M22.gif](https://us-east-1.tixte.net/uploads/img.dhravya.dev/M22.gif)

How? By using PSReadLine

## Step one

Install PSreadline

```
Install-Module PSReadLine
```

## Step two

Open your PowerShell PROFILE in your preferred editor (get the file by using `$PROFILE` )

paste this code snippet:

```
Import-Module PSReadLine

# Shows navigable menu of all options when hitting Tab
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete

# Autocompleteion for Arrow keys
Set-PSReadLineOption -HistorySearchCursorMovesToEnd
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward

Set-PSReadLineOption -ShowToolTips
Set-PSReadLineOption -PredictionSource History
```

And that’s it!!
tsParticles 1.42.1 Released
Tags: javascript, webdev, showdev, typescript
Published: 2022-03-11 07:39:00

# tsParticles 1.42.0 Changelog

## Options Updates

New numeric values are now randomizable, using the `{ min, max }` object instead of the numeric value. The list of the new randomizable options are:

- `particles.move.attract.distance`
- `particles.move.angle.offset`
- `particles.move.angle.value`
- `particles.orbit.opacity`
- `particles.orbit.radius`
- `particles.orbit.width`
- `particles.repulse.distance`
- `particles.repulse.duration`
- `particles.repulse.factor`
- `particles.repulse.speed`
- `particles.roll.darken.value`
- `particles.roll.enlighten.value`
- `particles.rotate.animation.speed`
- `particles.tilt.animation.speed`
- `particles.twinkle.lines.opacity`
- `particles.twinkle.particles.opacity`

These are the core options, also every animation object now can have randomizable `count` and `speed` properties.

Absorbers and Emitters plugin options now have randomizable coordinates, the `{ min, max }` can be set to their `position.x` and `position.y` values instead of a single numeric.

---

# tsParticles 1.42.1 Changelog

## Bug Fixes

- Fixes issue with 0 values on x and y properties of emitters position options

---

{% github matteobruni/tsparticles %}
Getting started with Apache APISIX Dashboard
Tags: devops, opensource, apache, programming
Published: 2022-03-11 07:22:21

[Apache APISIX](https://apisix.apache.org/) is the first Open source API gateway, with a built-in low-code Dashboard offering a powerful and flexible interface for developers to use.
 
The [Apache APISIX Dashboard](https://apisix.apache.org/docs/dashboard/USER_GUIDE) is designed to make it as easy as possible for users to operate Apache APISIX through a frontend interface. It uses the [Admin API](https://apisix.apache.org/docs/apisix/admin-api) under the hood to administer and control Api Gateway.

In this video, you can learn what APISIX Dashboard offers and how to use it to manage your Admin API from a single simple user interface. Also, we will install Apache APISIX with Docker. Then we'll walk through how you can create a route, upstream and add authentication to your first Consumer service using the same Dashboard.  

{% embed https://www.youtube.com/watch?v=-9-HZKK2ccI %}

Everything that is covered in the tutorial you can find on an [official documentation](https://github.com/apache/apisix).

You want to learn more about Apache APISIX usage, go with me from a beginner to an expert, and more tutorials are coming soon.
Hosting Blazor WASM for free using Github Actions and Pages
Tags: dotnet, github, devops, blazor
Published: 2022-03-11 07:02:36

Reference: https://swimburger.net/blog/dotnet/how-to-deploy-aspnet-blazor-webassembly-to-github-pages

YouTube: https://www.youtube.com/watch?v=nNxII6jvPvQ&feature=emb_imp_woyt