teleren/devto huggingface dataset:
Using Python to slice up my Reading Habits
Tags: programming, python, books
Published: 2022-01-28 10:25:13

I love my local library.  As much as my wife loves to read things on her phone (I give her a pass since she can get more Chinese books online than in our library) I need to have that solid feel of words in my hands.

It's also a great way for me to step away from electronic things and just immerse myself in something or somewhere else.

Since I read a lot I tend to forget now and again on if I have read a specific book, or as I like to read a series, did I read number 3?  7?  Where did I leave off as I waited for the next one to come out?

Luckily my library can give me a list of books I have read.

Sadly, that list is a bunch of metadata that I only need 2 lines out of 20+ so taking time to go through it manually is taxing.

Since I wanted to get into Python again I decided to use that to look through a record and get just the Author and Title I need.

Starting with:
`Record 717 of 717
LOCATIONS    TOWN & CITY
AUTHOR       Younger, Heather R., author.
TITLE        The art of caring leadership : how leading with heart uplifts
teams and organizations / Heather R. Younger.
EDITION      First edition.
PUB INFO     Oakland, CA : Berrett-Koehler Publishers, Inc., [2021]
DESCRIPT     xvii, 193 pages : illustrations ; 23 cm.
DESCRIPT     text txt rdacontent.`

I only needed:
`AUTHOR       Younger, Heather R., author.
TITLE        The art of caring leadership : how leading with heart uplifts
teams and organizations / Heather R. Younger.`

So at first I just wanted to get through the whole text dump and see what I have.

```
f = open("export.txt", "r")
print(f.read())
f.close()
```

But, yikes!  I get some weird UTF error!  Nothing new here, happens a lot of times when you get text from sources you can't control.  So a little modification...

```
f = open("export.txt", encoding="utf8")
print(f.read())
f.close()
```

I want to save it, so I can look through just what I want, and maybe do a text search in the result for just what I want.  That means ensuring the encoding when writing, as well as adding a regex to get just those two lines.  Where I end up with:

```
import io
import re

with io.open("readingList.txt", "a", encoding="utf8") as f:
    # Get only the two fields we care about
    for line in open("export.txt", encoding="utf8").readlines():
        if re.search("^AUTHOR", line) is not None:
            author = line.replace(", author.", "")
            f.write(author)
        elif re.search("^TITLE", line) is not None:
            title = line
            f.write(title)
f.close()
```

There you have it, now all I have to do is work on a way to save it so I can automate the searches....or maybe have an input for just the authors I want.  It was also a good way to jump back into a language I haven't used in years.
Find and stop systemd services
Tags: linux, systemd
Published: 2022-01-28 10:21:35

I use Caddy server on occasion for work. Its awesome. Well worth looking into, and I’m sure I’ll write a more in depth piece on its finer points sometime, but for now its the object of this particular narrative, not the focus. 

So I kept finding that when I went to start Caddy with a custom configuration, it would fail due to the ports required for Caddy to run being already in use. 

A bit of delving using our handy CLI toolbox identifies which process is hogging the port in question (2019)

```bash
sudo netstat -nlp | grep :2019
#=>  tcp  0  0  127.0.0.1:2019  0.0.0.0:*  LISTEN  18648/caddy
```

So Caddy is already running... 

This is strange as I never started that process.

For a while I took the amateur’s way out, and just killed the running Caddy process, before starting my own. 

```bash
sudo pkill caddy
```

But c’mon, we all know we can do much better than that.

The next clue as to why this keeps happening is the fact that this ghost Caddy process will be present from every time I start my machine. In Linux, `systemd` is responsible for starting processes at given times - like after boot. It does this via “services”. If a service is enabled then it will fire up on boot of the OS.
We can find all the currently enabled services with a `systemd list-unit-files --state=enabled` command, but this will return us a bit of a beast of a list. So let’s pipe it to our old friend `fzf` (`grep` would be a fine choice as well).

```bash
systemd list-unit-files --state=enabled | fzf
```

I start typing Caddy and there it is: “caddy.service enabled enabled”. So all we need to do is `systemd disable` it and we’ll stop the service from being started on boot!

```bash
systemd disable caddy.service
```

And there we have it. Another minor annoyance solved, and literally seconds every day saved! Incredible!
YUVA: A Component Based React Library
Published: 2022-01-28 10:16:22

I started developing my first React Based Library, which is by now, is just a side project. 

You can consider this series, as the progress of `YUVA`, as a library, which I will keep updating in this series, every week. 

## Current Status of the Project
1. Created a Button component, in which you can pass title and type prop.
**title:** You can pass `title` as a prop get text inside the button.

``` javascript
<Button title="Yuva" />
```
which will be shown like the below button

![Button title](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k12g42rlhqof7duypffa.png)

**type:** If you need, eithher primary button, or ghost button, info buttons etc. You just have to pass `type` as a prop, and then you can call any type of pre-defined button. 

```javascript
<Button type="primary" title="Manas" />
<Button type="success" title="Manas" />
<Button type="warning" title="Manas" />
<Button type="danger" title="Manas" />
<Button type="info" title="Manas" />
<Button type="text" title="Manas" />
<Button type="ghost" title="Manas" />
<Button type="raised" title="Manas" />
```

![Button types](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/havinwye5c81lsmxbsdp.png)

Only this is being done by now, and planning to increase more functionality in the `Button` prop.
Effective Call to Action Button : Create Post
Tags: beginners, writing, cta, consistency
Published: 2022-01-28 10:15:35

_Begin Writing_ ✏
This post is a result of DEV's create post button and DEV's suggestions as below. 💻

> ##Suggested things you can do
> - Join the Welcome thread   --✔ joined
> - Write your first DEV community   --still writing 🙃
> - Customize your profile   --✔ customized

I hope, the first post will be a trigger to continue writing post.
`DBMS_OUTPUT.PUT_LINE('HELLO WORLD! 🌏');`
Learning How to Learn!
Tags: productivity, motivation, career, education
Published: 2022-01-28 10:15:18

_Estimated reading time: 1 minute, 11 seconds. Contains 237 words_

I would like to share a free education below that will change your life. The topic I want to talk about today is perhaps the most valuable thing I have written so far. Learning to learn is perhaps the secret to success, especially if we are talking about software development.

Of course, when it comes to software development, there are dozens of different languages, hundreds of concepts, thousands of syntaxes. Memorizing is not learning, learning involves permanent memory. And in order to learn, it is also necessary to prepare mentally. Learning in a hurry under stress and pressure is inefficient.

I would like to recommend you a training that I have benefited greatly from and shared with many of my friends. My training is completely free. There are also weekly plans of the training and homework for the friends who find it difficult to follow the free trainings. So you will be able to feel yourself in a flow.


![Procrastination](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yaumqiy1wzngtatw1ra6.png)

I believe that it will be very useful to understand the phases of learning and the working logic of permanent memory. In addition, in the same training, people with procrastination will also find very valuable information that will benefit them.

"Just stop procrastinating and take action". you will learn much more than this standard sentence. Once you understand how your brain feels when you procrastinate, you'll learn how to prevent it.

I wish everyone the best of luck. 

[Learning how to learn:Education link](https://www.coursera.org/learn/learning-how-to-learn)

_If you like the article, do not forget to follow for future articles.You can also share it with your friends who you think will like it.Please feel free to comment!_
Front End Developer Tools
Tags: javascript, react, productivity, devops
Published: 2022-01-28 09:58:19

Hello folks,

Today I am sharing some developers tools which may useful in work. Getting to know the Developer tools of the trade can make your job easier and keep you on top of the skills you need to land a developer job or work better with your current team or clients.


Here some list:

**1. Roadmap. sh**

roadmap.sh is a community effort to create roadmaps, guides and other educational content to help guide the developers in picking up the path and guide their learnings.

[Link](https://roadmap.sh/)

---



**2. RapidAPI**

Discover and connect to thousands of APIs

[Link](https://rapidapi.com/hub)

---



**3. Daily. dev**

This chrome extension is the fastest growing online community for developers to stay updated on the best developer news..

[Link](https://chrome.google.com/webstore/detail/dailydev-the-homepage-dev/jlmpjdjjbgclbocgajdjefcidcncaied)

---


**5. Figma**

Create mockups, design templates of your websites here.

[Link](https://www.figma.com/graphic-design-tool/)

---

**6. Small Dev Tools**

Useful developer tools which can perform a specific task.

[Link](https://smalldev.tools/)

---

**7. Meta Tags**

It will let you know how your webpage looks on Chrome, Twitter, Facebook, etc.

[Link](https://metatags.io/)

Thank you for reading post.
We recently launch our [Geeks React UI Kit](https://bit.ly/geeksuireact) Project.
![Geeks React UI Kit - Admin Dashboard Template](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/awa881kb9iec58qass0j.jpg)
GUI url shortener using python
Tags: python, gui, programming, beginners
Published: 2022-01-28 09:46:06

Here is the Code for GUI Url Shortener using python
<br><br>
``` python
from tkinter import *
from tkinter import ttk
import pyshorteners # pip install pyshortneres
import webbrowser

# main window
root=Tk()
root.title("URL Shortner")
root.geometry("500x250")
root.resizable(0, 0)
# label
label=ttk.Label(root, text="URL Shortener", font=('Popping', 25))
label.grid(row=0)
# label for input URL
url_input=ttk.Label(root, text="Enter URL: ")
url_input.grid(row=1, column=0, pady=10)
# input fied for URL
url=StringVar()
url_entry=ttk.Entry(root, textvariable=url, width=40)
url_entry.grid(row=1, column=1, pady=10)

# Button for Short URL
shorten_button=ttk.Button(root, text="Shorten", command= lambda: shorten_url(url.get()))
shorten_button.grid(row=2, column=0, pady=10)

# label for shortebed Url
shortened_url_label=ttk.Label(root, text="Shortened Url: ")
shortened_url_label.grid(row=4, column=0, pady=10)
# input field for output Url
output_url=StringVar()
output_url_entry=ttk.Entry(root, textvariable=output_url, width=40)
output_url_entry.grid(row=4, column=1, pady=10)

# button for Copy Url
copy_button=ttk.Button(root, text="Copy", command=lambda: copy_url(output_url.get()))
copy_button.grid(row=5, column=0, pady=10)
# open Button
open_button=ttk.Button(root, text="Open", command=lambda: open_url(url.get()))
open_button.grid(row=5, column=1, pady=10)

# Function to short URL
def shorten_url(url):
    try:
        short_url=pyshorteners.Shortener().tinyurl.short(url)
        output_url.set(short_url)
    except:
        print("Invalid Url")

# function to copy url
def copy_url(url):
    try:
        url_entry.clipboard_clear()
        url_entry.clipboard_append(url)
        print("Url Copied to clipboard")
    except:
        print("invalid URL")

# function to open URL
def open_url(url):
    try:
        webbrowser.open(url)
    except:
        print("invalid Url")
root.mainloop()
```

<br><br>
#Youtube Tutorial
<h2><a href="https://www.youtube.com/watch?v=BMed6k86J-A">Watch Here</h2></a>
<br><br>
##Find Me On:
<a href="https://www.facebook.com/technicalvandar" terget="_blank">Facebook</a>
<a href="https://www.youtube.com/technicalvandar" terget="_blank">Youtube</a>
<a href="https://github.com/Technical-Vandar-885/" terget="_blank">Github</a>
Formations en ligne pour apprendre Python
Published: 2022-01-28 09:27:24

De plus en plus apprécié par les développeurs, Python est souvent considéré comme un langage simple et aux mises en [application multiples](kenumerique.com). Zoom sur une sélection non-exhaustive de six formations en ligne pour en découvrir les contours du langage ou approfondir ses connaissances.
Pour débuter dans l’apprentissage des langages de programmation, Python est un bon choix. En raison de sa lisibilité, il s'agit généralement du premier langage de programmation enseigné dans les écoles. C'est une excellente rampe de lancement. « C’est un langage qui devient très populaire, alors que sa création date des années 1990 », confirme [Ornella Biasioli](https://kenumerique.com/pes-2022-ppsspp/), senior manager pour le cabinet de recrutement Robert Walters.

Mais que peut-on faire avec ce langage ? Python est le langage officiel de Google, il alimente Instagram, et fonctionne même sur des puces Intel pour tests. « C’est le langage le plus usité dans les métiers qui tournent autour de la donnée », ajoute Ornella Biasioli. Mais il a aussi des avantages distincts.

**45 000 € de salaire annuel moyen pour un développeur Python**
Beaucoup des avantages de Python proviennent de la grande variété de bibliothèques qu'il a accumulées depuis son lancement. Ces bibliothèques peuvent être considérées comme des outils ou des programmes qui gèrent une grande partie du codage. Par exemple, les bibliothèques comme Requests, [BeautifulSoup](https://kenumerique.com/telecharger-pes-2022-ppsspp-iso/) et Scrapy peuvent extraire des données de pages Web. Alors que Pandas, SciPy et NumPy peuvent aider à manipuler et analyser des ensembles de données massifs.
Si vous n'avez pas le temps de fréquenter une école ou si vous voulez économiser de l'argent, apprendre Python dans un cours en ligne est une alternative intéressante. Si les formations certifiantes au Répertoire national des certifications professionnelles (RNCP) sont assez rares, cela ne pose pas forcément de problème selon [Mme Biasioli](https://kenumerique.com/telecharger-gta-5-ppsspp-iso-file-pour-android/) : « L’important lorsqu’un recruteur cherche ce type de profil, ce n’est pas le diplôme. Si le candidat réussit les tests Python, l’entreprise n’ira pas voir les certifications. D’ailleurs, les personnes cherchant à développer leurs compétences dans ce domaine ont souvent déjà un bagage ou des diplômes dans leurs domaines. »
1 - Agile - Your self-development.mov
Tags: agile, career, leadership, devops
Published: 2022-01-27 01:02:00

[Portuguese version](https://dev.to/caju/0001-seu-autodesenvolvimentomov-4o9i)

Hello guys! Good night. Let's talk a little about **professional development**.

A career to be successful, it has to be compatible with your personality, interests, skills and ambitions if you want to succeed!

A lot of people think about money, which is really important, and sometimes, momentarily, we don't have options, but if you want to succeed, to grow, you have to do what you love! It sounds headword, but it's the truth.

You have to manage your work life forever, in parallel with your personal and professional development.

Let's understand one thing: traditional professional climbing is in the past. You can no longer expect an organization to take full responsibility for its development. We now have a labyrinthine career, and it's up to you to set your goals and find ways to achieve them. What do you want from life? What's your art? What is the direction to be reached?

Initially, you must develop the right skills, both technical and interpersonal. Your chances will be better if you build a personal profile (an avatar lol) that helps you identify the right organizational placement. Once in your new job, there are specific routes to success and a personal development plan will outline the paths you can take.

Finally, when one job no longer satisfies you, you will have to recognize the best time to move on to another.

Remember: there is no job forever, but a career forever.
I sold my app!
Tags: business, apps, exe, appdev
Published: 2022-01-28 08:56:22

```python
'I SOLD MY APP FOR 2$'
```

Sponsored by Gumroad but more on that later.


Yes. only for 2$ if you are not from U.S it means
₹150.13
ლ6.10
€.99

NOTE: The app is only available for Windows 10


you might be wondering how did i sold my app?

thanks to Gumroad technology i can sell my app

Gumroad is a platform where you can sell your digital products
so if you want to sell your digital products check out https://gumroad.com
React-Firebase CRUD Application
Tags: react, firebase, javascript, webdev
Published: 2022-01-28 08:52:45

ToDo Applications are best to start learning any framework as it cover basic CRUD operations and form handling as well.

## Tech Stack

**Client:** React, Bootstrap

**Server:** Firebase


## Screenshots

![App Screenshot](https://raw.githubusercontent.com/yashkumat/React-Firebase-todolist/main/Screenshot%202021-12-09%20at%2015.49.09.png)


## File Structure

- Form component - Input form and add document logic

- CardContainer component - Read, update, delete document logic

- App component - Layout (Parent component).


## Features

- Component Based (React)
- Realtime (Firebase)
- Reponsive (Bootstrap)


## Lessons Learned

### 1. React

- useState
```javascript
    // useState - Assign initial value to a variable and create a function that can be used to change value of variable
    
    const [tasks, setTasks] = useState([])   
    
    // const tasks = [] , setTasks() is the function which is used to set value of tasks
```

- useEffect
```javascript
    // useEffect - Run code indside it when there is change in second arg.
    useEffect(()=>{
        someCode
    },[dependent variable])    // When dependent variable changes useEffect runs 
```

### 2. Firebase

- Setup

```javascript

import { initializeApp } from "firebase/app";

import { getFirestore } from '@firebase/firestore'

// Firebase Configuration
const firebaseConfig = {
    apiKey: "XXXX",
    authDomain: "XXXX",
    databaseURL: "XXXX",
    projectId: "XXXX",
    storageBucket: "XXXX",
    messagingSenderId: "XXXX",
    appId: "XXXX",
    measurementId: "XXXX"
};

// Connect firebase to our application
const app = initializeApp(firebaseConfig);

// connect to Firestore (firebase nosql db)
export const db = getFirestore(app);

```

![Firestore](https://raw.githubusercontent.com/yashkumat/React-Firebase-todolist/main/Screenshot%202021-12-09%20at%2015.47.51.png)
*Screenshot of Firestore document collection*

- Collection refrence

```javascript
const collectionRef = collection(db, "collection_name")
```

- Create

```javascript
import {addDoc } from 'firebase/firestore'

const saveTask = async (e) => {
    await addDoc(todosCollectionRef, newTask)   // Add new doc
}
```

- Read

```javascript
import {getDocs } from 'firebase/firestore'

const getTasks = async (e) => {
    const taskList = await getDocs(todosCollectionRef);   // Get all Docs
}
```

- Update

```javascript
import {updateDoc } from 'firebase/firestore'

const saveTask = async (e) => {
    const task = doc(db, "todos", id);    // find doc 
    await updateDoc(task, {isComplete: true})  // update doc 
}
```

- Delete

```javascript
import {deleteDoc } from 'firebase/firestore'

const deleteTask = async (id) => {
    const task = doc(db, "todos", id)
    await deleteDoc(task)   // Delete doc
}
```
## Feedback

If you have any feedback, please reach out to us at ykumat@gmail.com
Learn Flexbox : 6 Use Cases
Tags: css, javascript, webdev, programming
Published: 2022-01-28 08:48:22

Explained the 6 most useful use cases where FlexBox Css can be used.

🔥🔥🔥🔥🔥
Timeline :
00:00 Intro
00:15 Block Elements in a Row
00:56 Middle of the Container
02:00 Navigation bar with Flexbox
03:36 Navigation with Logo
05:21 Table Layout Flex
08:46 Let's Order Flex Items

{%youtube xLicNWVQUs4%}
Flutter vs React Native - A Comparision by Vanessa Nelson
Published: 2022-01-28 08:42:06

Vanessa Nelson just wrote an article comparing React Native and Flutter - Two great frameworks for building mobile apps. 

Read her excerpts below.

> With the upsurge of mobile apps, the demand for cross-platform app development has increased mainly in recent years.

React Native and Flutter are the two most popular cross-platform mobile frameworks. Both platforms help develop apps for Android and iOS faster and cheaper. 

Many developers find it hard to choose between the two platforms. So, we wrote this as a directory to help explain the differences between them and help you conclude which is more satisfactory for your app.

The rest of [flutter vs react native](https://syntaxexplained.com/flutter-vs-react-native-a-comparison/) can be found here.
Responsive Design with CSS Media Queries
Tags: css, mediaqueries, tutorial, beginners
Published: 2022-01-28 08:39:39

Yusuf Bitrus just published an article on how to build responsive websites using CSS. Read the excerpts below

> Today, this article will help you learn how CSS Media Queries help you build responsive websites. If you are a beginner frontend developer who is currently learning or sharpening your CSS skill, this article will help you understand the concept of responsive design much better.


Read more on [responsive design with css media queries here](https://syntaxexplained.com/responsive-design-with-css-media-queries/).
Terraform state locking using DynamoDB(LockID) and S3 Bucket 
Tags: terraform, aws, devops, tutorial
Published: 2022-01-28 08:35:22

{% youtube MxdvSgoWK7E %}

Terraform state locking is really important when you work in a team where multiple developers are trying to update the same Terraform state file. 

It prevents Terraform state file(terraform.tfstate) from accidental updates by putting a lock on the file so that the current update can be finished before processing the new change. The feature of Terraform state locking is supported by AWS S3 and Dynamo DB(LockID).

In this lab session, we will be looking into - 

1. How to Store Terraform state file remotely on S3?
2. Create DynamoDB table with LockID as Key
3. Simulate the terraform state locking by creating multiple terraform projects using the same Terraform state file.
Understanding IPS Patching
Tags: ips, virtualpatching, security, devops
Published: 2022-01-28 08:34:26

The team at SyntaxExplained just published a new post on IPS patching and related security mechanisms and the excerpts i as follows. 



> 
An Intrusion Prevention System (IPS) is a security mechanism that detects and prevents threats to networks. In this article, we’d take a look at what IPS patching entails, why it’s important, and more. 
An IPS system helps prevent and detect threats to networks by scanning network traffics for identified threats. Once the system detects a threat in the intrusion data, it stalls development and bars it from entry. Elements are broadly considered as threats based on three criteria. 



Read [more about IPS patching here](https://syntaxexplained.com/understanding-ips-patching/).
Terraform state file | How to manage local statefile | How to save remote statefile on AWS S3 Bucket
Tags: terraform, devops, aws, programming
Published: 2022-01-28 08:34:14

{% youtube LzWBPIgbrXM %}

In this lab session on Managing terraform state file we are gonna look on -

1. What is Terraform state file?
2. What is Terraform local state file?
3. How to manage terraform state file?
4. How to store Terraform state file remotely on AWS S3 bucket
5. What are the best practices for managing Terraform state file