teleren/devto huggingface dataset:
Add document ID to the firestore document in Python
Tags: python, firebase, codenewbie
Published: 2021-11-17 20:02:45

Hi guys,
Today I want to share with you how to add the document ID to the firestore document before you push the data to firebase. 
I think I can just skip the part where I explain you how to import firebase_admin to python, but I'll copy it anyways. 

**This is what you need to import ro make it work** 
```import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore```

Also you will need to set up your serviceAccountKey.json document. Find in the followig [Link](https://www.youtube.com/watch?v=UVzBQ0LkO28&list=PLs3IFJPw3G9LW-rGJ8EBMaCd8OxGm_qQe&index=2)
She explains really nice how to set up firestore.

**This part I really just copied it from that video and you can find it on firebase** 
`cred = credentials.Certificate("serviceAccountKey.json")
firebase_admin.initialize_app(cred)`

`db = firestore.client()`

**Here is what's important, we need to reference the document that is being created.**

```doc_ref = db.collection('plans').document('docName').collection('collection-name').document()```

Now we are going to get the ID **ONLY**

`docId = doc_ref.id`

Now we can set up out data using the docId variable to set up the id we need. 

```
data = {
    'id': docId,
    'date': firestore.SERVER_TIMESTAMP,
    'bedroomLocation': 'Down',
    'bedrooms': 2,
    'category': 'Townhomes',
    'depth': 56,
    'garage': 'Yes',
    'garageType': 'Standard',
    'name': 'TEST PLAN FROM PYTHON',
    'sqf': 1460,
    'stories': 1,
    'width': 30,
}
```
In my case I will be adding a test plan information. 

At last, we need to push this data to the document we created previously. 

`doc_ref.set(data)`

Let me know if you find it useful or you think this could be done in a better way, I'm only a begginer :)
I'm Taking part in 100DaysOfCode 👩‍💻👨‍💻!! First thoughts...
Tags: 100daysofcode, webdev
Published: 2021-11-17 19:53:44

Hey y'all 👋!

A few days ago, I decided to take part in #100daysOfCode.

## What is #100DaysOfCode
100 Days Of Code is a challenge where you have to code for at least an hour for 100 consecutive days. Sounds like a challenge I'm ready to take on 💪

## So what is my plan?
Over the next 100 days I am planning to build a collection of Tailwind CSS components and brush up on my python and js. I will most likely do several small projects. I will be tweeting about my progress publicly on my [twitter](https://twitter.com/sidcraftscode) and will be writing about it here ocassionally.

## How can you take part?
On the [#100DaysOfCode](https://100daysofcode.com) website, there is lots of information on how to take part. Or just search up the twitter hashtag [#100DaysOfCode](https://twitter.com/search?q=%23100DaysOfCode&src=hashtag_click) and you'll find all the info you need.

```
Happy coding!!!
- Sid
```
Introducing Gelato Ops: Web3’s Multi-Chain Smart Contract Automation Hub
Tags: automation, defi, tooling, nft
Published: 2021-11-17 19:45:09

TL;DR:

- [Gelato Ops](https://app.gelato.network/) enables web3 developers to automate tasks via an easy-to-use interface
- Example use cases that are already live include: harvesting yield vaults every day, paying out rewards daily, topping up contract balances, or petting Aavegotchis every 12 hours
- 0% fees until the end of 2021

Using Gelato Ops, developers can input the contract address and function they want to automate, when they want to automate it, and how they will pay for it. Having submitted this information as a “task”, it will be picked up by Gelato Executors and executed at the right time. Developers can monitor past transactions, manage their budget, and debug their tasks. Payments can be in the network token (ETH, MATIC, or FTM) and soon with other tokens, including DAI or USDC. 

<h1>Successful Gelato Ops Beta</h1>
Gelato Ops is already in use by some of the most innovative projects in DeFi, NFTs, and gaming:

- [QiDAO](https://medium.com/gelato-network/harvesting-in-peace-qi-dao-and-gelato-partner-to-auto-compound-yields-ed76cead8ea5) for harvesting rewards and compounding them daily
- [B.Protocol](https://medium.com/gelato-network/b-protocol-integrates-gelato-to-maintain-liquidation-system-c5471a95f5f5) for executing arbitrage trades
- [Unicly](https://medium.com/gelato-network/unicly-and-gelato-work-together-to-automate-the-distribution-of-rewards-f231fbe94524) for creating and distributing daily rewards to stakers
- [Parcel](https://medium.com/gelato-network/parcel-integrates-gelato-to-offer-automated-recurring-payouts-to-dao-treasury-managers-eb77bfb3a7b8) for automating salary payouts for DAOs
- Staking Facilities for topping up different addresses once they go below a certain threshold
- [ETHA Lend](https://medium.com/gelato-network/etha-lend-utilizes-gelato-automation-to-optimize-yields-on-polygon-647217df75d0) for harvesting their vaults
- [GotchiCare](https://programmablewealth.com/how-to-automate-aavegotchi-petting-with-pet-operator-and-gelato/) for petting Aavegotchi NFTs every 12 hours

Plus many more awesome projects…

Instead of manually triggering functions or having to build and monitor their own bot infrastructure, developers can rely on Gelato Ops to automate any arbitrary task on most EVM-based blockchains. Gelato Ops will be live on Ethereum, Polygon, Fantom, and Arbitrum — with more networks to come.

Check out the video on [YouTube](https://www.youtube.com/watch?v=YQGRIT8aV5c) and read the [tutorial](https://docs.gelato.network/guides/create-a-task) on how you can create tasks on the Gelato Ops. 

--
Docs: [https://docs.gelato.network/](https://docs.gelato.network/)
Search for...
Published: 2021-11-17 19:38:04

Hello everyone!
Ive have been createing a new project, and i search for developers to help. 
its a css framwork thats made for chill and help people make easyir websites.
So if you want, or will have more details about it. Send an email to me <strong>vestergaardlasse2@gmail.com</strong>
AMA: Building a Career in Cloud Native
Tags: career, beginners, discuss, cloud
Published: 2021-11-17 18:56:21

##Career Meetup with Stephen Simonian: Ask Me Anything About Building a Career in Cloud Native

Got questions about building a career in Cloud Native? Interested to learn how to be successful during an interview? Looking for career advice? Stephen Simonian is here for you!

Stephen is SUSE’s tech recruiter in the USA. Whether you are an experienced professional or you are just starting your career, Stephen has a lot of insights into being part of an innovative environment, projects SUSE is working on, what the hiring managers are looking for in a candidate and more.

Get your questions and tune in on November 30th at 10am PT.

###Register Here
[November 30th at 10am PT]
(https://www.crowdcast.io/e/AMA-Stephen-Simonian?utm_source=devto&utm_medium=post&utm_campaign=AMA-Stephen)
Listen to the S7E2 of DevDiscuss: "The Story of Vue with Evan You"
Tags: discuss, podcast
Published: 2021-11-17 18:45:28

---
title: Listen to the S7E2 of DevDiscuss: "The Story of Vue with Evan You"
published: true
description: Listen to S7E2 of DevDiscuss!
tags: discuss, podcast 
series: DevDiscuss Season 7
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b12123orht7rzx6jzpet.png
---

## We have a fascinating episode of DevDiscuss for you all this week...

{% podcast https://dev.to/devdiscuss/s7-e2-the-story-of-vue-with-evan-you %}

_Quick refresher — DevDiscuss is the first original podcast from DEV all about the burning topics that impact all our lives as developers._

**Episode Info** 

In S7E2, we get to do a deep dive into the background of Vue.js —  the open-source model–view–viewmodel front end JavaScript framework, which is used for building user interfaces and single-page apps. The kicker? Our guest is the _founder_ of it.

### Hosts:
- @ben — Creator of DEV & Co-Founder of Forem
- @coffeecraftcode — Developer Advocate at Forem
  
### Guests: 
- [Evan You](https://dev.to/yyx990803), Creator of Vue.

{% user yyx990803 %}

Let us know your thoughts on this show in the comments below — or on Twitter ([@thepracticaldev](https://twitter.com/thepracticaldev) ).

![Speakers](https://media.giphy.com/media/qZelsWAXfWpAA/giphy.gif?cid=ecf05e47ddu6jql6tkj8kvdmj4z5ofal65l38f235ruuinlo&rid=giphy.gif&ct=g)

---

_You can [follow DevDiscuss](dev.to/devdiscuss) to get episode notifications and listen right in your feed_ — or subscribe on your platform of choice! Plus, if you leave us a review, we'll send you a free pack of thank-you stickers. Details [here](https://airtable.com/shr8oKAIMZgdYnBxx). 

## Quick Listening Links
- [Apple Podcasts](https://podcasts.apple.com/us/podcast/s7-e2-the-story-of-vue-with-evan-you/id1513053883?i=1000542191037)
- [Spotify](https://open.spotify.com/episode/5os68vs6CqoIbEa7XWF3tZ)
- [Google](https://podcasts.google.com/feed/aHR0cHM6Ly9mZWVkcy5kZXZwb2RzLmRldi9kZXZkaXNjdXNzX3BvZGNhc3QueG1s/episode/aHR0cHM6Ly9kZXZwb2RzLmRldi9wb2RjYXN0cy9kZXZkaXNjdXNzLzUx?sa=X&ved=0CAQQkfYCahcKEwjgqrzehqD0AhUAAAAAHQAAAAAQCg)
- [Listen Notes](https://www.listennotes.com/podcasts/devdiscuss/s7e2-the-story-of-vue-with-kfDyRJL_v07/)
- [TuneIn](https://tunein.com/podcasts/Technology-Podcasts/DevDiscuss-p1324596/?topicId=167818708)
- [RSS Feed](http://feeds.codenewbie.org/devnews_podcast.xml)
- [DEV Pods Site](http://devpods.herokuapp.com/podcasts/devdiscuss/episodes/230)

---
_Acknowledgements_ 
- _@levisharpe for producing & mixing the show_
- _Our season seven sponsors: [Microsoft](https://www.microsoft.com/en-us/dev-community/Event/Register?eventId=DevDiscussPodcast_o7nllI4cp4Vg&ocid=aid3038582), [New Relic](https://developer.newrelic.com/), & [Vultr](ource=devdiscuss&utm_medium=syndication&utm_campaign=october21)!_
HELLO WORLD in Morse Code
Tags: codequality, devops, security, showdev
Published: 2021-11-17 18:44:49

In this video, I've said HELLO WORLD in Morse Code. Morse Code is one of the first digital communication languages that is used worldwide. This code was invented by Samuel Morse in 1938.

Know more: https://en.wikipedia.org/wiki/Morse_code

![International Morse Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h467hq2ldaucd05xmiuz.jpg)

HELLO WORLD.
Yo: https://twitter.com/thesouvikpaul
Make money as a developer
Tags: webdev, programming, productivity, discuss
Published: 2021-11-17 18:28:08

If you’re a programming geek and not making any money online, you are missing out BIG. There are plenty of ways to earn as a developer, in this blog, I am going to discuss about some of these ways.

There are many incredible ways to make money online with programming skills. If you learn various coding languages and programs, then you can offer your skills online and start generating cash fast.

#### 1. Blogging

Just as me, you can write blogs about anything you want and earn money. There are many platforms in which you can write blogs.

If you do blogging in a platform where the platform itself dont pay you, no worries you can earn with different ways out there.
- offering coding skills online
- charging for premium content
- earning through affiliate links

#### 2. Freelancing

You must have heard this word, if you have any skill like web development, android development or anything you can start a freelancing website.

Same as blogging there are many platforms in which you can freelance, and the cool part is you dont need a platform, you can start your own website.

[For more of these content, you can follow me on twitter](https://twitter.com/vikstack)

#### 3. Selling Templates or Themes

You can start making Templates and Theme ( even of wordpress ) and sell them, people earn a lot by doing this.

You might be confused on where to sell your HTML Templates?

No Worries I got it for you
- themeforest. net
- monsterone. com
- codester. com
- creativemarket. com
- designhill. com
- templatemonster. com
- mojomarketplace. com
- gumroad.com
- your own website

#### 4. Develop a App or Website

You can just start your own app and website and earn through it, most of the programmers know this and dont need much explanation. There are plenty of ways from which you can earn in an app or website.

#### 5. Sell Courses

Last but not the least, you can sell your courses, if you are good at teaching stuff and have a good programming knowledge you can surely do it.

Good Luck for the journey of earning through code, Thanks
Day 5: Conditionals and Booleans
Tags: python, beginners, luxacademy
Published: 2021-11-17 18:14:29

#**Boolean Values**
_True_ or _False_
_True_ is a Boolean value, however, TRUE/true/'true'/'True' are not
They can be assigned to variables and can be put into tuples or lists
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mh5c9yxdtwjylh6ul2gn.png)

###**Boolean Operators**
_and_, _or_, _not_


###**Truth values**
We can find the truth value of any function by passing the _bool_ function. 
The result will be _True_ or _False_ depending on the truth value of what we passed in the code
Some values are inherently falsy;
*Any numeric representation of zero i.e. 0, 0.0
*The values _None_ and _False_
*Empty sequences i.e. empty strings, empty tuples, empty lists
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3pkwpucbb6gmr29supk2.png)

###**Comparison Operators**
There are 8 operators that yield a boolean function:
<  |  yields _True_ if the 1st value is less in value than the 2nd value
>  | yields _True_ if the 1st value is greater in value than the 2nd value
<= | yields _True_ if the 1st value is less than or equal to the 2nd value
>= | yields _True_ if the 1st value is greater than or equal to the 2nd value
== | yields _True_ if the two values are equal in value
!= | yields  _True_ if the 1st value is NOT the second value
is | yields _True_ only if the two values are same
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/adgyf9dpr01wyemvsfp9.png)

#**Conditional Statements**
_if_, _else_, _elif_
These are used to control the flow of code
IF only allows a block of code to run, only when a particular condition has been met
ELSE used when we have to compare 2 statements, where you judge one based on the outcome of the other, is executed ONLY when the if statement is false. **It does not have a condition**
ELIF statement is used when you have _many_ conditions that you want executed, it only follows an IF statement or another ELIF statement, and provides conditions that is checked only if any of the previous conditions were false, **it contains a condition**
The print function after the if conditional statement should have 4 indentation spaces
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s45psdrcfcegii99px7h.png) 

#**Nested If Statement**


#**Exercise 5**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jotaqz6p8llfyp6wjgwv.png)
How to use Leetcode more efficiently
Tags: productivity, interview, beginners
Published: 2021-11-17 18:12:12

tldr; Stop doing random LC problems and make a study plan. Layout all of the topics, rate yourself from 1-10, solve problems until each topic is at a 9 or a 10. Then teach

## The Problem

Too many people are doing random Leetcode problems without any framework for choosing which problem to solve. They either follow a pre-canned list of problems off Leetcode, or just pick a problem at random every day. This method might be ok to start, but you will soon need to start adding more structure to your studying if you want to grow. Everyone digests different concepts at different rates. You need a tailored study plan to use your time more efficiently.

## Create a plan

It is important to select practice problems with intention, and to track yourself as you progress. Layout all of the relevant topics for your interview, from strings to DP and rate yourself 1-10 on them. Your goal is to get your self-rating in all of these topics to a 9 or 10. Example, if linked lists are rated at a 4, you should be reading up on the concept and solving problems until they are at 9 or a 10.

## How to confirm you’ve mastered a concept?

Teach others! There is nothing that will help you find the gaps in your knowledge faster than teaching that concept to someone who is trying to learn. You will be forced to articulate all of the thoughts in your head, and simplify them so they are digestible. As you are explaining different concepts, and attempting to answer your student’s questions, the gaps in your knowledge will be come clear. 

When you are able to teach others the ins and outs of a particular topic, you will be in a good place and can move on to mastering another topic.

## When should I start doing “random” leetcode questions?

Taking on random questions has its place, after you’ve gotten the different concepts to a rating of 9 or 10. Grabbing a random question and learning how to categorize and solve it is an important skill in itself to master. The problem is that too many people are trying to skip diving deep into the fundamentals of the different topics before simulating the interview environment.

(Shoutout to Ching#4264 in the discord for raising this point)

## Join the community

I run a private study group for engineers who are serious about getting jobs in Big Tech, [signup here](https://fangprep.notion.site/Big-Tech-Private-Study-Group-9d209cbfb57f4a5b858872798066ac8c).

Need advice on how to break into Big Tech? [Join the discord](https://discord.com/invite/M8944Xz26m)

Twitter: [@dannyhabibs](https://twitter.com/DannyHabibs)
Extract data from PDF files with Python
Tags: mypersonaltools, python
Published: 2021-11-18 18:58:23

---
title: Extract data from PDF files with Python
published: true
date: 2021-11-17 17:56:04 UTC
tags: Mypersonaltools,Python
canonical_url: https://daniele.tech/2021/11/extract-data-from-pdf-files-with-python/
---

A simple python script with PDFminer to read and manipulate data from a pdf file

The post [Extract data from PDF files with Python](https://daniele.tech/2021/11/extract-data-from-pdf-files-with-python/) appeared first on [Daniele Mte90 Scasciafratte](https://daniele.tech/eng).
#100DaysOfCode
Tags: python
Published: 2021-11-17 17:52:25

Сегодня я начинаю изучение python по курсу "100 Days of Code: The Complete Python Pro Bootcamp for 2022". Я не уверен, что у меня получится кодить 100 дней подряд, но буду стараться. 

Первая цель: кодить 7 дней подряд.
OOP Principles
Tags: beginners, programming, codenewbie, java
Published: 2021-11-17 17:23:38

> oop outline

## Building Blocks
-
### Objects
> An object is an entity that has states and behaviors.

### Classes
> A class is a template or blueprint from which objects are created.

***
## Main Principles
-
### Encapsulation
> Encapsulation is a process of wrapping code and data together into a single unit.

### Inheritance
> Inheritance is a mechanism in which one object acquires all the states and behaviors of a parent object.

### Abstraction
> Abstraction is a process of hiding the implementation details and showing only functionality to the user.

#### Interface
> An interface is a blueprint of a class.

### Polymorphism
> Polymorphism is the ability of an object to take on many forms.

#### Method overloading
> If a class has multiple methods that have same name but different parameters, this is known as method overloading.

#### Method overriding
> If a subclass has the same method as declared in the super class, this is known as method overriding.
Difference between parameter and argument
Tags: programming, tutorial, computerscience, shorts
Published: 2021-11-17 17:21:37

The two terms are used interchangeably in conversation, but they mean different things. You pass arguments when calling a method. And you use parameters within the method body.

As most if not all programming languages are copy-by-value, the two are equivalent, only differing in the context. The two terms exist to distinguish whether you are talking about a method definition or a method call. When you're calling a method, you pass in arguments. When you're actually in the method body, you are using parameters. Arguments get copied-by-value to parameters.
Discord Server
Published: 2021-11-17 17:18:02

## Discord Lounge:
We are mainly German!
With us you can find people to play with, write and talk to users or just listen to the music bot playing!

**What we offer:**
📱 | Nice design
📄 | Active chats
😑 | No annoying @ everyone's 
🎉 | Lots of giveaways 
🎵 | Music bots + 24/7 music 
🆘 | Good support 
🤝 | Partnerships 

Did we convince you? Then feel free to drop by us!

https://discord.gg/KYFNT8AVtu
Build a scalable front-end with Rush monorepo and React — VSCode
Tags: monorepo, javascript, react, rushjs
Published: 2021-11-17 17:15:47

In previous posts, we added `prettier` and `eslint` to format our code and enforce a consistent code style across our projects. We can save time by automatically formatting pasted code, or fix `lint` errors while writing code, without running lint command to see all the errors.

VSCode provides two different types of settings:

- User Settings - applied to all VSCode instances
- Workspace Settings - applied to the current project only.

We'll use Workspace Settings and few extensions to improve our development experience in VSCode.

#### Install extensions

Let's add Prettier Formatter for VSCode. Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

```bash
ext install esbenp.prettier-vscode
```

or you can open [https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode (https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) and install it manually.

In the same manner, let's install VSCode ESLint extension:

```bash
ext install dbaeumer.vscode-eslint
```

or install manually from [https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint (https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)

#### Add settings

Create a new file `.vscode/settings.json` in the root of our monorepo and let's add the following settings:

```json
{
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.tabSize": 2,
  "editor.insertSpaces": true,
  "editor.formatOnSave": true,
  "search.exclude": {
    "**/node_modules": true,
    "**/.nyc_output": true,
    "**/.rush": true
  },
  "files.exclude": {
    "**/.nyc_output": true,
    "**/.rush": true,
    "**/*.build.log": true,
    "**/*.build.error.log": true,
    "**/generated-docs": true,
    "**/package-deps.json": true,
    "**/test-apps/**/build": true
  },
  "files.trimTrailingWhitespace": true,
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact"
  ],

  "eslint.workingDirectories": [
    {
      "mode": "auto"
    }
  ],
  "eslint.nodePath": "common/temp/node_modules",
  "eslint.trace.server": "verbose",
  "eslint.options": {
    "resolvePluginsRelativeTo": "node_modules/@monorepo/eslint-config"
  },
  "eslint.format.enable": true,
  "eslint.lintTask.enable": true,
  "editor.codeActionsOnSave": {
    "editor.action.fixAll": true,
    "source.fixAll.eslint": true
  }
}
```

In these settings we:

- set Prettier as default formatter
- exclude from search some irrelevant folders like `node_modules` and `.nyc_output`
- exclude from VSCode file explorer irrelevant files
- provide a nodePath for ESLint. We're not using `eslint` directly (we're using `lint` script from `react-scripts`) so we're helping the extension to find the `eslint` binary.
- provide a path to `eslint` plugins. We're helping ESLint extension to pick up the right rules for each project.

I hope you'll find these settings useful.