teleren/devto huggingface dataset:
🚀 🤖💻🔍 How to scrape g2 using Python, Selenium and Bose Framework 🅶2️⃣🐍🖥️
Tags: webscraping, python, tutorial, webscrapingtools
Published: 2023-05-21 15:07:45


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

## Introduction

In this article, you will learn how to scrape g2.com using Bose Framework.

Also, Scraping g2.com is an excellent way to do competitor analysis.

Bose Framework, is a Selenium based Bot Development Framework that provides a comprehensive set of tools and functionalities specifically aimed at making the Bot Development Process easy for Developers. 

To make it easy to scrape g2.com, I have prepared a script that you can use to scrape g2 effectively. This article will walk you through the steps of utilizing the script.

## Installation

1. Clone Starter Template
```
git clone https://github.com/omkarcloud/g2-scraper
cd g2-scraper
```
2. Install dependencies
```
python -m pip install -r requirements.txt
```

## Usage

- In `extract_product_links.py` specify your `Task.product_url`
- Run Project
```
python main.py
```
The script will start running and output progress updates to the console. When the scraper is complete, it will generate a JSON file named `pending.json` in the `output` directory. The JSON file will contain the product links.

Once the bot is detected by Cloudflare, the script will recognize it and prompt you to press the "Enter" key in the console once you have successfully solved the Cloudflare captcha.

Additionaly, you don't have to configure the Selenium driver as it will automatically download the appropriate driver based on your Chrome browser version.

- In `main.py` change `task` variable to `src.extract_product_links` 
- Rerun Project
```
python main.py
```
- The products will be extracted and stored in the output/finished.csv and output/finished.json file after scraping.
How to Show Asterisks While Typing Sudo Password in Linux
Tags: linux, code, command, bash
Published: 2023-05-21 15:48:04

---
title: How to Show Asterisks While Typing Sudo Password in Linux
published: true
date: 2023-05-21 14:53:09 UTC
tags: #linux #code #command #bash
canonical_url: https://www.thebackendblog.com/2023/05/how-to-show-asterisks-while-typing-sudo.html
---
![Terminal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4tgfj22xsmx1wqokc5hu.png)

When using the sudo command in Linux, it is common to be prompted for the user's password. However, by default, the password is not displayed on the screen while typing. This can be a security feature, but it can also be inconvenient if the user needs to verify what they are typing.

{% youtube H0OPIpbqNJ0 %}

But we can enable asterisks to show while typing the sudo password, follow simple steps:

- Open the terminal and type the following command:

```
sudo visudo
```

**sudo visudo** is a command in Linux that allows a user with administrative privileges to edit the sudoers file, which contains the rules for the sudo command. This file determines which users are allowed to run sudo and what commands or actions they are allowed to execute with it. The **visudo** command ensures that the file is edited safely and consistently, and checks for syntax errors before saving the file.

- Enter your password when prompted. Note that the password will not be displayed on the screen. This will open the sudoers file in the terminal.

![Terminal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9mg196vcnfjk1xqfg8qr.png)

- Look for the line that contains the following text:
```
 Defaults env_reset
```
- Add the following text after it:
```
 Defaults pwfeedback
```
![Terminal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/77z1t2e2272f9dye6z89.png)

- Save and exit the file, by pressing **Ctrl+X** , then **Y** , and then Enter if you are using nano else **:wq** if using vim/nvim

- Now, when the user types sudo in the terminal and is prompted for their password, asterisks will appear on the screen as they type.

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

It is worth noting that this feature may not be available in all versions of Linux or in all terminals. Additionally, displaying the password as it is typed can be a security risk if other people are present who should not see the password. Therefore, use this feature with caution and only when necessary.
#1 Finding resources
Tags: python, beginners, opensource, gamedev
Published: 2023-05-21 14:47:10

So I found some website that is fun and useful for self-taught

[https://codecombat.com/play/dungeon](): this one is quite interactive

[https://py.checkio.org]()

[https://www.kodeco.com/2795-beginning-game-programming-for-teens-with-python](): good~  

[https://www.youtube.com/watch?v=8dfePlONtls](): in case I want to make a snake game

[https://ssiddique.info/classic-games-written-in-python-programming.html](): cool ideas and example of games code in python
A Roadmap to Machine Learning 🧠 with Tensorflow: Your Path to AI Mastery
Tags: machinelearning, ai, tensorflow, programming
Published: 2023-05-21 14:30:43

## Introduction:
Machine Learning (ML) is revolutionizing industries and reshaping the world we live in. If you're eager to embark on a journey into the realm of AI, we've got you covered! In this article, we present a comprehensive roadmap that will guide you through the fundamentals of ML using the powerful Tensorflow framework developed by Google. Buckle up and get ready to unleash the potential of ML!

## 1. Learn the Basics
To lay a strong foundation, start by acquainting yourself with the fundamental principles of statistics and linear algebra. Understanding these concepts will give you the necessary tools to grasp the inner workings of ML algorithms and their underlying mathematical principles.

## 2. Python Programming
Python has emerged as the go-to language for ML enthusiasts. Dive into Python programming and familiarize yourself with its syntax, libraries, and tools. Python's versatility and vast ML ecosystem make it an ideal choice for implementing ML models.

## 3. Dive into Tensorflow
As you progress, it's time to dive into Tensorflow. This open-source framework provides a robust platform for building, training, and deploying ML models. Familiarize yourself with tensors, operations, and the core concepts of Tensorflow, enabling you to leverage its full potential.

## 4. ML Algorithms
Broaden your ML repertoire by exploring various algorithms, such as linear regression, decision trees, and neural networks. Gain a deep understanding of their strengths, weaknesses, and use cases. Through practical examples and exercises, develop the skills to apply these algorithms to real-world problems.

## 5. Deep Learning and Neural Networks
To unlock the full potential of ML, delve into the world of deep learning and neural networks. Understand the architecture and concepts behind deep learning algorithms. Explore convolutional neural networks (CNNs) for image recognition and recurrent neural networks (RNNs) for natural language processing. Immerse yourself in the cutting-edge techniques that power AI applications.

## Build Real-World Projects
Apply your newfound knowledge to real-world projects. Engage with diverse datasets and tackle ML challenges head-on. Building ML models and solving practical problems will enhance your skills and solidify your understanding of ML concepts.


By following this roadmap, you'll embark on an exciting ML journey that takes you from the basics to advanced concepts. Armed with Tensorflow and a deep understanding of ML algorithms, you'll be well-equipped to navigate the thriving world of AI. Embrace the possibilities of ML and contribute to the AI revolution that is shaping our future. Let the learning begin!

_Remember, perseverance and hands-on practice are key to mastering ML. Stay curious, keep experimenting, and never stop exploring the endless possibilities of AI-driven solutions._
how to run simulations in your browser
Tags: ai, simulation, webdev, python
Published: 2023-05-21 14:27:59

hey everyone — so i built this app that lets you spin up simulations in your browser with no code.

it’s called **simulacra labs**.

tbh it’s pretty fun + easy to use. let me show you how.

first — go to the simulacra [web app](https://dylanintech-hackathon-simulacra-main-gw16fg.streamlit.app/).

![an image of how the simulacra web app looks when you first open it](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jcq83go1g9izwcidm5jn.png)

next you’re gonna wanna select a simulation using the selection box above start simulation. i recommend starting with the **double-agent** simulation if you want more of a hands-off experience.

now just sit back and watch some cool stuff unfold!

right now all of the simulations are text-based, but this will change soon.

additionally — while the simulation is loading you’ll be able to view + copy the code for the agents that you’re deploying so that you get an idea of what’s going on under the hood.

i plan on open-sourcing this soon.

![an image of the code you're shown when a simulation is loading](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/by8ipduzz4jkrsmny57c.png)

let me know what you think! i started working on this for a hackathon hosted by [founder’s inc](https://twitter.com/fdotinc) a few days ago and am curious about this tech so i wanna keep hacking on it and see how it goes lol.

s/o to langchain and stanford university for doing research into and providing implementations for the agents that make these simulations possible (respectively)!

also — if you wanna support me and my work you can help me out by engaging with my [launch tweet](https://twitter.com/dxlantxch/status/1659976289950810113?s=20)!

-----------------------------------------------

thnx for reading!

— dylan
Simplifying Async Data Handling in React with Loadable
Tags: react, webdev, javascript, opensource
Published: 2023-05-21 14:20:40


Hello everyone,

I'm excited to share with you a project that I've been working on - a new NPM package called [Loadable](https://www.npmjs.com/package/@tobq/loadable). This package is designed to simplify handling asynchronous data in your React applications, and it's available to use right now!

### What is Loadable?

Loadable is a library that provides a set of hooks and utility functions to abstract the complexity of loading, error, and ready states in your React components. 

### Why Loadable?

React is a fantastic library for building user interfaces. However, when it comes to data fetching, there are some gaps that developers need to fill in, usually resulting in a lot of boilerplate code. Loadable aims to reduce this boilerplate, making your components more readable, maintainable, and less error-prone.

### Key Features

Here are some of the key features of Loadable:

- **Loading state management**: No need to manually manage loading states in your components.
- **Error Handling**: Handle errors during data fetching in a unified, abstracted way.
- **Data fetching based on dependencies**: Similar to `useEffect`, but tailored for data fetching.
- **Synchronous and asynchronous data fetching**: Works with both synchronous and asynchronous functions.
- **Composability**: Hooks and utilities can be composed together to create complex data fetching flows.
- **Type-Safe**: The library is fully typed, providing excellent TypeScript support.

Loadable is [open-source](https://github.com/tobq/loadable).
Feel free to follow on [twitter @tobi_akin](https://twitter.com/tobi_akin)

You can install the package with `npm i @tobq/loadable`. I've written a comprehensive README that includes usage examples and explains how to use the provided hooks and utilities.

I'd love to hear your thoughts, feedback, and see what amazing things you'll build with Loadable! Let's improve it together.
Learning JavaScript
Tags: whathaveilearn
Published: 2023-05-21 14:12:14

#Part 1:
###Ways to code:
+ The simplest way to get started is to simply create an HTML file with the JavaScript code inside of it.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zfdu2ri4ha38uitlh3fu.png)
+ The next way is to directly create a JS file.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n3emxa567dlfh4ksm8hs.png)

###Simpliest command:
+ The simpliest command you will learn is **console.log("write sth you want here")**. 

***'console.log()*** *is the command to print something to the developer console in your browser. You can use this to print the results from any of the following articles and exercises to the console. We encourage you to code along with all of the examples in this and future lessons.'*
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2h5z5275r3516shp1tcu.png)

###How to check if you command is doing right?
+ There's a way you can check it: 

**1.** Install **Live Server**.
![Live Server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r9js9rzay94590r3ltlb.png)

**2.** Right click on your code, then click **Open with Live Server**.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qganimyn75ysjj73gahf.png)

**3.** When it open your browser press **F12** and you will see a small window like this:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/593644rm9qzcw0evan9o.png)

**4.** Then click the tag next to it, you will see if your command is right or not:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/av5hkgmkuier4yk8hl98.png)
Render Wasabi Cloud File
Tags: wasabi, laravel, aws, php
Published: 2023-05-21 13:40:00

**Wasabi** is a cloud object storage that is compatible with Amazon S3. It can be integrated with AWS, Google Cloud or Microsoft Azure solutions, using the same protocol and tools. Wasabi is a value-oriented, high-performance, low-latency, and high-availability cloud object storage offering.

Generating a pre-signed S3 URL for uploading an object in your application code with AWS SDK for PHP (V2)

- 
You can make a helper function like this inside app/Helpers/funtions.php.

```
if (!function_exists('renderWasabiCloudFile')) {
    function renderWasabiCloudFile($fileLocationInsideYourBucket)
    {
        $s3 = new \Aws\S3\S3Client([
            'endpoint' => config('filesystems.disks.wasabi.endpoint'),
            'region' => config('filesystems.disks.wasabi.region'),
            'version' => 'latest',
            'credentials' => array(
                'key' => config('filesystems.disks.wasabi.key'),
                'secret' => config('filesystems.disks.wasabi.secret'),
            )
        ]);

        $cmd = $s3->getCommand('GetObject', [
            'Bucket' => config('filesystems.disks.wasabi.bucket'),
            'Key' => $fileLocationInsideYourBucket, //hYTYRT56.jpg
            'ACL' => 'public-read',
        ]);

        $request = $s3->createPresignedRequest($cmd, '+20 minutes');

        $fileUrl = (string)$request->getUri();

        return $fileUrl;
    }
}
```

- 
Now, call the function and pass $fileUrl from your db.

```
<img class="img-fluid" src={{renderWasabiCloudFile($fileUrl)}}> //this url would come from your database (file path url)
```

---

> You can also follow up the official guidance [Generate pre-signed urls](https://wasabi-support.zendesk.com/hc/en-us/articles/360022853592) to learn more.
How to Build a Recipe App with Vanilla JavaScript
Tags: css, javascript, tutorial, beginners
Published: 2023-05-21 13:39:54

{% youtube KWTyC1WKdFw %}

In this video, I'll show you how to build a recipe app using API and JavaScript. We'll use a dark and light theme and responsive design so that your app looks great on any device.

If you're looking to learn how to build a web application using API, then this is the video for you! We'll show you everything you need to know to build a real world web application. This is a great beginner's guide to web development and working with API. so be sure to watch it!

[Starter file](https://drive.google.com/file/d/1-4SclwXjU--uMAq4gur-ZbSDAwsm-4dk/view?usp=share_link)

⏱️ Timestamps
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
0:00 - Demo
14:02 - File structure
15:16 - Project initial
35:10 - Home page - Header
47:10 - Light and dark mode
52:35 - Mobile nav
59:17 - Home page - Hero section
1:06:58 - Home page - Tab section
1:46:24 - Home page - Slider section
1:53:40 - Home page - Tag section
2:04:46 - Footer
2:08:01 - Setup API
2:15:19 - JavaScript - Tab section
2:40:34 - JavaScript - Slider section
2:51:17 - Snackbar
2:58:24 - Recipe page
4:25:18 - Recipe page - Rander recipe
4:40:48 - Detail page
2:37:26 - Detail page - Randar recipe detail
5:16:33 - Bookmark page
5:26:31 - Media queries
Async API documentation 101
Tags: documentation, api, nestjs, node
Published: 2023-05-21 13:39:45

---
title: Async API documentation 101
published: true
tags: ['docs', 'api', 'nestjs', 'node']
canonical_url: https://sevic.dev/notes/async-api-docs/
---

Async API documentation is used for documenting events in event-driven systems, like Kafka events. All of the event DTOs are stored in one place. It supports YAML and JSON formats.

It contains information about channels and components. Channels and components are defined with their messages and DTO schemas, respectively.

```json
{
  "asyncapi": "2.6.0",
  "info": {
    "title": "Events docs",
    "version": "1.0.0"
  },
  "channels": {
    "topic_name": {
      "publish": {
        "message": {
          "schemaFormat": "application/vnd.oai.openapi;version=3.0.0",
          "payload": {
            "type": "object",
            "properties": {
              "counter": {
                "type": "number"
              }
            },
            "required": [
              "counter"
            ]
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EventDto": {
        "type": "object",
        "properties": {
          "counter": {
            "type": "number"
          }
        },
        "required": [
          "counter"
        ]
      }
    }
  }
}
```

### Autogeneration

Async API docs can be autogenerated by following multiple steps:

- define DTOs and their required and optional fields with `ApiProperty` and `ApiPropertyOptional` decorators (from the `@nestjs/swagger` package), respectively
- generate OpenAPI docs from the defined DTOs
- parse and reuse component schemas from generated OpenAPI documentation to build channel messages and component schemas for Async API docs

### Validation

Use [AsyncAPI Studio](https://studio.asyncapi.com/) to validate the written specification.

### Preview

There are multiple options

- [AsyncAPI Studio](https://studio.asyncapi.com/)

- VSCode extension `asyncapi-preview`, open the command palette, and run the `Preview AsyncAPI` command.

### UI generation

- Install `@asyncapi/cli` and corresponding template package (e.g., `@asyncapi/html-template`, `@asyncapi/markdown-template`)
- Update package.json with scripts

```json
{
  "scripts": {
    // ...
    "generate-docs:html": "asyncapi generate fromTemplate ./asyncapi/asyncapi.json @asyncapi/html-template --output ./docs/html",
    "generate-docs:markdown": "asyncapi generate fromTemplate ./asyncapi/asyncapi.json @asyncapi/markdown-template --output ./docs/markdown"
  }
}
```

### Boilerplate

Here is the [link](https://sevic.dev/nestjs-starter) to the boilerplate I use for the development.
How Long Does it Take to Make UpWork Profitable?
Published: 2023-05-21 13:32:53

I've been thinking about starting an UpWork profile to find more clients. This recent article on [https://www.ditchthegrind.org/how-long-does-it-take-to-make-money-on-upwork/?swcfpc=1] how much money you can make on UpWork(url) has me convinced I need to go ahead and give it a shot.
The Turing test
Published: 2023-05-21 13:28:13

Proposed by famed scientist and mathematician **Alan Turing**, this test aims to provide a clear cut definition of Intelligence, specifically for machines and/or computer programs.

The test is as following: on one side are 2 respondents, one machine and the other human. On the other side is a human acting as an interrogator. The machine pass the test if the interrogator can not tell the difference between the two.

![Turing test diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yfkhhc7b8fyr5dfed2ms.png)

This test require high level of NLP, Knowledge representation, Reasoning, and ML. Which is beginning to be achievable for modern AI programs like ChatGPT by OpenAI

One of my favorite quote about the Turing test is: _"Any AI smart enough to pass a Turing test is smart enough to know to fail it."_
Phản Ứng Hóa Học
Published: 2023-05-21 13:27:31

Hóa học phổ thông, nguyên tố, hợp chất, nguyên tử, phân tử, và các phản ứng hóa học.

https://phanunghoahoc.com/

https://twitter.com/phanunghoahoc

https://www.linkedin.com/in/phan-ung-hoa-hoc-585a72277/

https://about.me/phanunghoahoc

https://www.pinterest.com/phanunghoahoccom/

https://www.reddit.com/user/phanunghoahoc

https://www.youtube.com/@phanunghoahoc/about

https://www.flickr.com/people/phanunghoahoc/

https://dribbble.com/phanunghoahoc/about

https://www.tumblr.com/phanunghoahoccom

http://hawkee.com/profile/4067146/

https://tapas.io/phanunghoahoccom

https://vi.gravatar.com/phanunghoahoc

https://www.twitch.tv/phanunghoahoc

https://linkhay.com/u/phanunghoahoc

https://www.penname.me/@phanunghoahoccom

https://sketchfab.com/phanunghoahoc

https://www.openstreetmap.org/user/phanunghoahoc

https://replit.com/@phanunghoahocco

https://www.diigo.com/profile/phanunghoahoc

https://folkd.com/user/phanunghoahoc

http://www.lawrence.com/users/phanunghoahoc/