teleren/devto huggingface dataset:
task 10
Published: 2024-05-30 16:47:10

1)from selenium import webdriver
from selenium.webdriver.common.by import By

# Start a new browser session
driver = webdriver.Chrome()

try:
    # Open the Instagram page
    driver.get("https://www.instagram.com/guviofficial/")

    # Wait for the page to load
    driver.implicitly_wait(10)  # Wait for 10 seconds for elements to appear

    # Extract the number of posts
    post_count_element = driver.find_element(By.XPATH, '//span[text()="posts"]/span')
    post_count = post_count_element.text
    print("Number of posts:", post_count)

    # Extract the number of followers
    follower_count_element = driver.find_element(By.XPATH, '//span[@title="Followers"]/span')
    follower_count = follower_count_element.get_attribute("title")
    print("Number of followers:", follower_count)

    # Extract the number of following
    following_count_element = driver.find_element(By.XPATH, '//span[@title="Following"]/span')
    following_count = following_count_element.get_attribute("title")
    print("Number of following:", following_count)

finally:
    # Close the browser
    driver.quit()
2) from selenium import webdriver
from selenium.webdriver.common.by import By

# Start a new browser session
driver = webdriver.Chrome()

try:
    # Open the Instagram profile page
    driver.get("https://www.instagram.com/guviofficial/")

    # Wait for the page to load
    driver.implicitly_wait(10)  # Wait for 10 seconds for elements to appear

    # Extract the number of followers
    followers_element = driver.find_element(By.XPATH, '//a[@href="/guviofficial/followers/"]/span')
    followers_count = followers_element.get_attribute("title")
    print("Followers:", followers_count)

    # Extract the number of following
    following_element = driver.find_element(By.XPATH, '//a[@href="/guviofficial/following/"]/span')
    following_count = following_element.get_attribute("title")
    print("Following:", following_count)

finally:
    # Close the browser
    driver.quit()
Scraper compania Blackline
Tags: peviitor, scraper, tester, blackline
Published: 2024-05-30 16:41:51

## Scraper 

Orice scraper există datorită unei echipe de scraper și tester. Scraper-ul companiei **_Blackline_** este scris de [Andrei Cojocaru](https://www.linkedin.com/in/andrei-cojocaru-985932204/) în limbajul Python și testat de [Diana Lavinia Dragoi](https://www.linkedin.com/in/diana-lavinia-dragoi/), drept muncă voluntară, și poate fi găsit pe GitHub, fiind un proiect open source.

{% github https://github.com/peviitor-ro/Scrapers_start_with_digi %}

---

## Te interesează să scrii un scraper sau să testezi unul?
Poți să te alături proiectului chiar de aici!

[Link Discord peviitor.ro](https://discord.gg/t2aEdmR52a)

---
Understanding /var/run/docker.sock: The Key to Docker's Inner Workings 🐳
Tags: docker, containers, devops
Published: 2024-05-30 16:40:18

If you're diving into Docker, one term you’ll encounter often is /var/run/docker.sock. But what is it, and why is it so important?

🔍 What is /var/run/docker.sock?
In simple terms, /var/run/docker.sock is a Unix socket file used by Docker to communicate with the Docker daemon (dockerd). This socket file acts as a bridge between your Docker client (like the Docker CLI) and the Docker daemon, enabling you to manage containers, images, networks, and more.

🔧 How Does It Work?
Communication Channel: Instead of using network-based protocols (like HTTP or TCP), Docker uses this Unix socket for efficient and secure communication between the client and the daemon on the same host.
API Access: All Docker commands you run via the CLI (docker run, docker ps, etc.) interact with the Docker daemon through this socket. Essentially, it’s the API endpoint for Docker operations.

🔐 Why Should You Care?
Understanding /var/run/docker.sock is crucial for advanced Docker operations:
Container Management: Tools like Docker Compose and various CI/CD systems use this socket to orchestrate and manage containers.
Security: Be cautious when granting access to this socket. Mounting /var/run/docker.sock inside a container provides that container with root-level access to the host’s Docker daemon, which can pose significant security risks.

💡 Practical Use Case
Ever wondered how to manage Docker from within a container? By mounting the Docker socket inside your container, you can.

Check out my blog on How to run docker in docker.

📈 The Bigger Picture
For developers and DevOps professionals, understanding how Docker operates under the hood, including the role of /var/run/docker.sock, is key to leveraging the full power of containerization. It opens up possibilities for automation, advanced orchestration, and efficient resource management.

Stay curious, and keep exploring the depths of Docker! 🌊🐳

Keep Learning, Keep Hustling.
task 21
Published: 2024-05-30 16:40:03

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
import time

# Function to display cookies
def display_cookies(driver):
    cookies = driver.get_cookies()
    print("Cookies:")
    for cookie in cookies:
        print(cookie)

# URL and login credentials
url = "https://www.saucedemo.com/"
username = "standard_user"
password = "secret_sauce"

# Start a new browser session
driver = webdriver.Chrome()

try:
    # Open the URL
    driver.get(url)

    # Display cookies before login
    print("Before login:")
    display_cookies(driver)

    # Login
    username_field = driver.find_element(By.ID, "user-name")
    username_field.send_keys(username)
    password_field = driver.find_element(By.ID, "password")
    password_field.send_keys(password)
    login_button = driver.find_element(By.ID, "login-button")
    login_button.click()

    # Display cookies after login
    print("After login:")
    display_cookies(driver)

    # Logout
    logout_button = driver.find_element(By.ID, "logout_sidebar_link")
    logout_button.click()
    print("Logged out successfully.")

finally:
    # Close the browser
    driver.quit()
FastAPI Beyond CRUD Part 3 - Buiding a CRUD REST API (CRUD, Response Models & HTTP Exceptions)
Tags: fastapi, api, python, webdev
Published: 2024-05-30 16:37:53

In this video, we build a CRUD REST API using the knowledge we obtained from the previous video. CRUD stands for Create, Read, Update, and Delete. Four Operations that help us manipulate data in any application that may have a data store.
{%youtube W8D-crU5-Fc%}
The Rise of AI-Powered Startups in 2024
Tags: ai, startup, productivity, news
Published: 2024-05-30 16:32:57

1. **Accelerated Innovation**
   - AI-driven startups are rapidly innovating, bringing groundbreaking solutions to various industries, from healthcare to finance.

2. **Enhanced Customer Experience**
   - Startups are leveraging AI to personalize customer interactions, resulting in more tailored and efficient services.

3. **Cost Efficiency**
   - AI technology helps startups automate routine tasks, significantly reducing operational costs and increasing scalability.

4. **Data-Driven Decision Making**
   - AI-powered analytics enable startups to make informed decisions based on real-time data insights, leading to better business outcomes.

5. **Talent Attraction and Retention**
   - Startups with cutting-edge AI technologies attract top talent interested in working on innovative projects and staying at the forefront of tech advancements.

6. **Investment Surge**
   - There's a notable increase in venture capital investments in AI startups, driven by the potential for high returns and transformative impact.

7. **AI-as-a-Service (AIaaS)**
   - Many startups are offering AI-as-a-Service platforms, providing businesses of all sizes access to advanced AI tools without the need for extensive in-house development.

8. **Ethical AI Development**
   - The rise of AI startups comes with a growing emphasis on ethical AI, focusing on creating transparent, fair, and unbiased AI systems.

9. **Cross-Industry Applications**
   - AI-powered startups are not limited to tech sectors; they are disrupting traditional industries like agriculture, manufacturing, and education with innovative AI solutions.

10. **Global Collaboration**
    - Startups are forming global partnerships to leverage diverse expertise and markets, accelerating the adoption and development of AI technologies worldwide.

Happy Learning 🎉
Minimally Invasive Magic: How Technology Makes Foot Surgery Less Scary
Tags: techtalks, howto
Published: 2024-05-30 16:30:30

Foot surgery Even the word "foot surgery" can trigger a shiver through the back. Images of massive incisions lengthy recovery times, and the lingering pain that follows. However, don't fret! With the advancement of technology has led to foot surgery having undergone radical changes that make it less difficult, more precise, and, in the end, less intimidating for patients.

## Minimally Invasive Magic:

The key to success lies in the concept of minimally invasive surgical (MIS). Traditional foot surgery usually involves massive incisions to reach an area for surgery. However, MIS makes use of smaller incisions and equipment, such as small cameras as well as surgical instruments. The instruments are aided by high-resolution images projected on a monitor which allows surgeons to perform operations with amazing precision, and without disturbance to the tissue.

## Benefits of Minimally Invasive [Foot Surgery in perth](https://advancedfootsurgerycentre.com.au/):

- Reduction of Scarring Incisions that are smaller result in less scarring. This translates into an earlier return to your most loved shoes.
- Speedier healing: Minimally invasive techniques reduce tissue damage, which results in faster healing time and faster return to your normal routine.
- Lower Pain Less incisions means less discomfort after surgery, which means an easier recovery.
- Better Outcomes: Advances in visualization technology enable surgeons to have an improved view of the surgical area, which results in more precise surgical procedures and ultimately better results.

## Technology Leading the Way:

A variety of technological advances make the minimally-invasive foot procedure feasible:

Arthroscopy The thin and flexible tubing with a camera enables surgeons to see the inside of the joint, making it easier to perform procedures like ACL fixes as well as bunion elimination.
fluoroscopy real-time imaging with X-rays assists surgeons during surgeries to ensure the exact implant or screw placement.
Robotic-Assisted Surgery Although it is still in the in the beginning stages of foot surgery, robots can give even more accuracy and control in complex procedures.

## The Takeaway:

Foot surgery shouldn't be a stressful procedure. The use of minimally invasive procedures that are powered by technology provide a more comfortable approach for patients. If you're experiencing foot pain that needs surgery, speak to your podiatrist about minimally surgical options that are offered. With the aid technological advancements, your road to healing can be faster as well as less painful. It will also leave little impressions on your return to your feet that are healthy.
The Tech-Powered Podiatrist: How Technology is Transforming Foot Care
Tags: techtalks, healthydebate
Published: 2024-05-30 16:18:28

It is no longer necessary to rely purely on physical examinations and X-rays to treat foot problems are disappearing. The field of podiatry is changing, driven by technological advances that are revolutionizing the way we treat and diagnose foot ailments. We at the Foot Focus [Podiatry Perth](https://footfocuspodiatry.com.au/) we take advantage of these developments to offer our patients the most efficient and customized treatment that is available.

## Revolutionizing Orthotics using 3D Printing

In the past, orthotics were made using a mold that was made of the foot usually creating a one-size-fits-all approach. However 3D scanning technology enables us to take a detailed scan of the foot. The data we collect is utilized to design custom orthotics using 3D printing. These custom-designed orthotics provide top comfort and support, leading to better relief from pain and better treatment outcomes for a variety of foot issues like flat feet and plantar fasciitis. feet.

## Improved Diagnosis Using AI Help:

Artificial Intelligence (AI) is becoming a major player throughout the world of medical science and podiatry isn't one of them. AI algorithmic models are evolving based on huge quantities of medical information such as X-rays, MRIs, and the patient's history. They are able to aid podiatrists with studying photographs and finding subtle indications of irregularities that could be overlooked by our eyes. With AI's assistance, it is possible to diagnose ailments like arthritis, fractures as well as early signs of foot problems caused by diabetes more efficiently and accurately.

## Empowering Patients through Digital Therapy and wearable Tech:

Technology is now extending beyond the confines of our clinic giving patients the ability to take an active part for their feet health. Mobile apps can offer instructions for stretching and exercises specifically formulated for the most common foot ailments. The exercises can be completed at home, encouraging self-care and increasing the efficacy of your office-based treatment program. In addition, wearable technology such as smart insoles are able to measure your gait and provide useful information about your walking habits. These data will assist us in identifying any potential issues and suggest appropriate measures prior to discomfort occurs.

## The Future of Foot Care is Bright

Technology isn't intended to replace podiatrists. it's here for us to expand our experience and provide more complete foot health. With these advances that we're able to provide faster diagnosis, more customized treatment as well as better general outcomes to our clients. If you're suffering from feet pain or just need to take an active approach to improving your foot health, book an appointment today and experience the new era of podiatry.
No Code Process Automation
Published: 2024-05-30 16:08:37

In today's fast-paced business environment, efficiency and agility are paramount. Organizations increasingly turn to no-code process automation apps to streamline operations, reduce costs, and enhance productivity. These platforms empower non-technical users to create and manage automated workflows without the need for programming expertise. Here, we'll explore the benefits, key features, and examples of [no-code process automation apps](https://procesoapp.com/).
Blue Team Alpha
Published: 2024-05-30 15:56:57

Blue Team Alpha is a veteran-owned, comprehensive cybersecurity force on a mission to defend America in the cyberspace domain. It offers proactive, protection and rescue services with deep roots in incident management. With decades of experience handling breach investigations across all 16 critical infrastructure sectors, Blue Team Alpha has amassed the highest caliber talent in the cybersecurity industry. Over 65% of our experts are former nation-state-level employees from the Department of Defense, Department of Homeland Security and other government organizations where they learned from the world's best cyber command. https://blueteamalpha.com/
The Uprising of Machines is Getting Closer with Soft Skin and Wetware
Tags: ai, news, machinelearning, datascience
Published: 2024-05-30 15:56:36

🧠 A world where robots can feel with the delicacy of human and are powered by artificial human brain-cells. This future may be closer than you think!

👉 [**What is Wetware?**](https://iwooky.substack.com/p/the-uprising-of-machines-wetware)

[![The Uprising of Machines is Getting Closer with Soft Skin and Wetware](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3loescbia9rs15p6ut8b.jpg)](https://iwooky.substack.com/p/the-uprising-of-machines-wetware)
Rust Snippet: Exec with Update Intervals
Tags: rust, tokio
Published: 2024-05-30 15:55:40

Recently, I needed to kick off a long running process for encoding videos using ffmpeg in the middle of handling an SQS message. In order to keep the message from showing back up in the queue before the video processing is finished.

So that means, I need to be able to send the change message visibility timeout periodically during the process. so, I came up with this little function to help. It calls a “progress” function every 10 seconds while the command is executing, and then ends once it’s done.

Using tokio as the Async Runtime

```rust
pub async fn exec<F, Fut>(mut cmd: Command, progress: F) -> Result<Output, ProgressingExecError>
where
	F: Fn() -> Fut,
	Fut: Future<Output = ()>,
{
	let (tx, mut rx) = oneshot::channel();
	let mut interval = interval(Duration::from_millis(10000));
	
	tokio::spawn(async move {
		let output = cmd.output().await;
		let _ = tx.send(output);
	});
	
	loop {
		tokio::select! {
			_ = interval.tick() => progress().await,
			msg = &mut rx => return Ok(msg??)
	    }
	}
}
```
Enumeration in C#
Published: 2024-05-30 15:41:37

Enumeration (or enum) is a value data type in C#. It is mainly used to assign the names or string values to integral constants, that make a program easy to read and maintain.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vwm923fdw7rny05y5r58.png)
1442. Count Triplets That Can Form Two Arrays of Equal XOR
Tags: php, leetcode, algorithms, programming
Published: 2024-05-30 15:40:27

1442\. Count Triplets That Can Form Two Arrays of Equal XOR

Medium

Given an array of integers `arr`.

We want to select three indices `i`, `j` and `k` where `(0 <= i < j <= k < arr.length)`.

Let's define `a` and `b` as follows:

- `a = arr[i] ^ arr[i + 1] ^ ... ^ arr[j - 1]`
- `b = arr[j] ^ arr[j + 1] ^ ... ^ arr[k]`

Note that ^ denotes the **bitwise-xor** operation.

Return _the number of triplets (`i`, `j` and `k`) Where `a == b`._

**Example 1:**

- **Input:** arr = [2,3,1,6,7]
- **Output:** 4
- **Explanation:** The triplets are (0,1,2), (0,2,2), (2,3,4) and (2,4,4) 

**Example 2:**

- **Input:** arr = [1,1,1,1,1]
- **Output:** 10

**Constraints:**

- <code>1 <= arr.length <= 300</code>
- <code>1 <= arr[i] <= 10<sup>8</sup></code>



**Solution:**

```
class Solution {

    /**
     * @param Integer[] $arr
     * @return Integer
     */
    function countTriplets($arr) {
        $ans = 0;
        $xors = [0];
        $prefix = 0;

        foreach ($arr as $key => $a) {
            $prefix ^= $a;
            $xors[] = $prefix;
        }

        for ($j = 1; $j < count($arr); $j++) {
            for ($i = 0; $i < $j; $i++) {
                $xors_i = $xors[$j] ^ $xors[$i];
                for ($k = $j; $k < count($arr); $k++) {
                    $xors_k = $xors[$k + 1] ^ $xors[$j];
                    if ($xors_i == $xors_k) {
                        $ans += 1;
                    }
                }
            }
        }

        return $ans;
    }
}
```

**Contact Links**

- **[LinkedIn](https://www.linkedin.com/in/arifulhaque/)**
- **[GitHub](https://github.com/mah-shamim)**
SEO - Crawled - currently not indexed
Tags: seo, google
Published: 2024-05-30 15:30:40

Google has crawled by site about a week ago, and only marked 5 pages as "valid". The majority of my pages are marked as "Crawled - currently not indexed".

Google says that means that "the page was crawled by Google, but not indexed. It may or may not be indexed in the future; no need to resubmit this URL for crawling."

Why did Google tag most of my pages as this, and how long will it take before they are added to the index (And is there anything I can do to speed up the process)?

Thanks!

EDIT: My robots.txt file. All the files that are not showing up in the index are inside of the “webhosting” folder, not mentioned in the file below.


User-agent: *
Disallow: /admin
Disallow: /menu
Disallow: /menu.html
Disallow: /login
Disallow: /login.html

Disallow: /shop/*?page=$
Disallow: /shop/*&page=$
Disallow: /shop/*?sort=
Disallow: /shop/*&sort=
Disallow: /shop/*?order=
Disallow: /shop/*&order=
Disallow: /shop/*?limit=
Disallow: /shop/*&limit=
Disallow: /shop/*?filter_name=
Disallow: /shop/*&filter_name=
Disallow: /shop/*?filter_sub_category=
Disallow: /shop/*&filter_sub_category=
Disallow: /shop/*?filter_description=
Disallow: /shop/*&filter_description=

Any question, contact me: (https://betbrasil.org)
Responsive image with different aspect ratios
Tags: responsive, javascript, webdev, frontend
Published: 2024-05-30 15:12:36

I recently discovered a small browser bug (or at least undesired behavior) related to the picture tag.

It's quite normal in many designs to use taller mobile images and wider desktop images. This means we have different aspect ratios. As [freelance developer](https://iliketoplay.dk/) I often run into designs that use different aspect ratios between mobile and desktop layouts.

When crossing the breakpoint and going from one image to the other, the image size isn't instantly set correct, it doesn't happen until the image has loaded (tested in Chrome). This is problematic because we might have elements further down the page trying to read offsetTop or similar - this reading will be wrong until the image has loaded. You would think that setting the width and height on the "img" and "source" tag would solve this, but it doesn't.

I made this little demo to show the problem. In the console logs it's obvious that the readings are wrong. You can also see the fix:
{% codepen https://codepen.io/iltp/pen/xxNgJoK %}


The solution is fairly simple: Instead of relying only on the normal "resize" event, use a ResizeObserver to check for changes in the document height.

I'm pretty sure the reason for this behaviour, is to always show an image. So while the new image loads the browser keeps showing the old image. This is good (looking) for many reasons, but of course gives us the false readings mentioned above.