teleren/devto huggingface dataset:
NumPy Tutorial #6: Array Shape
Tags: datascience, python, beginners, tutorial
Published: 2023-08-24 14:25:18

{% embed https://youtu.be/hSvBJhV0RGM %}

What is "shape" in NumPy array? The shape of an array can be referred to the number of elements in each dimension in the array.

---

## Shape

Luckly, we don't have to perform any iteration process to count the number of elements in each array dimension. NumPy has provided `shape` method to perform the counting process. Let see how it works through an example

Let create an array (from now on I will refer array an NumPy array)
```python
import numpy as np

arr = np.array([[1, 2, 3], [4, 5, 6]])
```

You can get the shape of `arr` and print the shape to generate an output
```python
print(arr.shape)
```

You can see the following output
```
(2, 3)
```

The output shows a tuple that described there are two dimensions in the array. In the second dimension, it has two items, and the first dimension it has 3 items.

---

There you go, that is how you get the shape of an array. Thank you for reading this blog and have a good day!
Quick tip: Getting all links from any web site into a spreadsheet using browser developer tools
Tags: links, web, scraping, developertools
Published: 2023-08-24 14:21:18

---
title: Quick tip: Getting all links from any web site into a spreadsheet using browser developer tools
published: true
description: Using developer tools in the browser you can get all links of the current document into a spreadsheet with one line of code.
tags: links, web, scraping, developertools
canonical_url: https://christianheilmann.com/2023/08/24/quick-tip-getting-all-links-from-any-web-site-into-a-spreadsheet-using-browser-developer-tools/
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-08-23 19:22 +0000
---

As part of taking over the editorial job of the [WeAreDevelopers newsletter](https://www.wearedevelopers.com/about/newsletter/), I needed to get all the links from older editions and import them into a spreadsheet. Eventually I will write a scraping script, but there is a much simpler way to get all the links from a web site into a spreadsheet: browser developer tools. You can follow how that's done in this video:

{% youtube f3d2IRg-uu4 %}

The step-by-step instructions:

* Go to the web site you want the links from
* Open Developer Tools (press F12)
* Go to the Console tool
* Enter (or copy and paste) the following: `console.table($$('a'),['innerHTML','href'])`
* Highlight the table with your mouse 
* Copy and paste into your spreadsheet, making sure to only copy the values

This works in Microsoft Edge, Google Chrome, Firefox but for some reason not in Safari 

Another issue is that long links and link texts get shortened with a `…` in Chrome and Edge, to work around that you need to shorten the links first. In my case, I removed the `utm_source=` tracking info. To this end, I had to write another short script in the console to run first. 

`$$('a').forEach(l => {l.href = l.href.replace(/\?utm_source=.*$/,'')})` replaces all the `utm_source` tracking info on each link before calling `console.table`.
NumPy Tutorial #5: Array Copy vs View
Tags: datascience, python, beginners, tutorial
Published: 2023-08-24 13:59:32

{% embed https://youtu.be/1A-PYZV5uZU %}

How can you make a duplicate of a NumPy array? There are two NumPy array methods that you can use to perform that. Those two methods are `copy` and `view`. What is the difference between these two?

---

## Copy

Let me start with the `copy` method. The `copy` method in here can be refered to "deep duplication". Let me show what it means through an example.

Let us create a NumPy array
```python
import numpy as np

list_of_number = [1, 3, 5, 7, 9]

arr = np.array(list_of_number)
```

Then let us make a duplication of the array called `arr2` from the original array using `copy` method
```python
arr2 = arr.copy()
```

Let us update an item from `arr2` and print `arr` also with `arr2` to see the output
```python
arr2[0] = 90

print(arr)
print(arr2)
```

You will see the following output
```
[1 3 5 7 9]
[90  3  5  7  9]
```

From the output, you can see that even if we update a value of `arr2`, it will not update the original array. This is what it means by "deep duplication".

---

## View

Now let us see what `view` will do to an array. Let us update our existing code from `.copy()` to `.view()`
```python
arr2 = arr.view()
```

Then update an item from `arr2` and print both `arr` and `arr2` to see the output
```python
arr2[0] = 90

print(arr)
print(arr2)
```

You will see the following output
```
[90  3  5  7  9]
[90  3  5  7  9]
```

You will see that any update we perform in the `arr2`, it also update `arr` in the process. This can also refered to "shallow copy".

---

There you go, you can use "copy" or "view" to duplicate a NumPy array depending on your situation. Thank you for reading this blog, and see you next time!
Empower Your Creativity with Personalised NO CODE AI Apps
Tags: webdev, javascript, beginners, programming
Published: 2023-08-24 13:30:00

Introducing [Yoya.ai](https://www.aiforme.wiki/ai/tools/Yoya) – your gateway to crafting personalized generative AI applications effortlessly and without code. Unleash the power of natural language and transform your visions into reality with next-generation software built on Language Model architectures. In this blog, we delve into [Yoya.ai](https://www.aiforme.wiki/ai/tools/Yoya)'s seamless chatbot creation process, personalized capabilities, and versatile integration options.

Tailored Chatbot Creation:

1. Chatbot Knows Your Needs:
[Yoya.ai](https://www.aiforme.wiki/ai/tools/Yoya) understands your desires. Instantly create custom chatbots that resonate with your goals. With a streamlined three-step process, owning a personalized bot has never been easier.

2. Connect Your URL:
Begin your journey by pasting your website URL. Choose the pages you want your chatbot to be knowledgeable about. [Yoya.ai](https://www.aiforme.wiki/ai/tools/Yoya) simplifies the initial setup, making the process user-friendly.

3. Training Made Simple:
[Yoya.ai](https://www.aiforme.wiki/ai/tools/Yoya) takes care of training. Your chatbot learns from your website pages, acquiring the information needed to serve your users effectively.

4. Universal Accessibility:
Engage with your personalized chatbot across various supported platforms. Now, your chatbot is ready to assist and interact everywhere.

Empowering Imagination:

5. Build ChatGPT for Everything:
[Yoya.ai](https://www.aiforme.wiki/ai/tools/Yoya) empowers your creative endeavors. Create personalized ChatGPT applications for a myriad of purposes, all based on your unique data. The possibilities are endless.

6. Ready to Use with Ease:
With just a single click, your project comes to life. Yoya.ai ensures that setting up your application is as simple as filling out a form. Start your AI journey effortlessly.

7. Personalized and Integrated:
Elevate your AI applications by integrating external data sources. [Yoya.ai](https://www.aiforme.wiki/ai/tools/Yoya) supports connecting to URLs to import data, enabling you to build personalized AI applications with ease.

8. Seamless Integration:
[Yoya.ai](https://www.aiforme.wiki/ai/tools/Yoya)offers versatile integration options. Whether it's no-code platforms, JavaScript, APIs, or more on the horizon, Yoya.ai's rich interface ensures a seamless experience.

Conclusion:
[Yoya.ai](https://www.aiforme.wiki/ai/tools/Yoya) is your canvas for personalized AI innovation. From instant chatbot creation to boundless possibilities with ChatGPT, Yoya.ai enables you to transform your ideas into AI-powered realities without the need for coding expertise. Explore the realm of next-generation software and embrace personalized, engaging AI applications that redefine user experiences. Unlock your creativity, empower your visions, and let [Yoya.ai](https://www.aiforme.wiki/ai/tools/Yoya) be the catalyst for your AI journey.
Take the State of PostgreSQL 2023 Survey.
Published: 2023-08-24 13:19:29

The State of PostgreSQL 2023 survey is still open


💻 Quick questions about how and why you use PostgreSQL, how you got started & more 

🗂 Fully anonymized source data will be shared publicly 


Help create a knowledge base for the entire community 


[Start here](
https://timescale.typeform.com/state-of-pg-23/?utm_source=kelvins&utm_campaign=state-of-pg-2023&utm_content=state-of-pg-survey)
Ways a Newbie software engineer can work effectively in team (collaboration 101)
Published: 2023-08-24 13:13:48

An inevitable part of being a software engineer is **Collaboration projects** in most tech companies software devs engage in an exercise know as **Pair Programming** for most of you that have done internship or worked full time or are working in big tech companies you guys can relate. Because you will be put in teams that comprise of several people of different skill set, such as UI/UX Designers, frontend devs, backend devs, and mobile devops and many more. So the below steps are ways one can better can do better when it comes to collaborative projects

**1.Act as a sponge and water**
Don't be confused by the subtitle
I. Make your brain act as a sponge, in the sense that it absorbs information quickly and you can be able to release the information when nessecary.
II. Act like water, in the sense that anyway you're poured into you fit perfectly

**2. There's no such thing as a bad or stupid question**
In my tribe there's a very popular proverb that says
"An inquisitive person never goes missing"
 or in my language "Onye Ajuju Anaghi Efu Uzo"
Learn to ask more questions in meetings, standups and meetups. Never be too shy. We devs are usually sterotyped as guys or gals that just sit down drinking coffe in our dark lonely rooms where the only source of light is our monitors, yes, sometimes it maybe true. But where machines that convert thought to real life applications. Software Development is not for the weak hearted. So only the fact that your a dev shows that your weak at all.  I know working in a tech company can be overwhelming at times. But the trick is to reach to Senior devs, start a newbie community, talk to your manager or walkup to someone you feel will give you good advise and just listen. which leads me to my third point and last point.

**3. Listen **
Listening is a skill, not everyone has it. If you can listen attentively you can understand how other people feel by so doing knowing ways you guys can complement each other.

**Lastly,** know that you're a part of a team, understand you team and know your role in the team.

I believe that  anyone who follows this principles is already on his 0r her way to start collaboration Project
**Congrats**
Variables in Go (Golang)
Tags: go, coding, codenewbie, programming
Published: 2023-08-24 13:11:53

In Go (commonly known as Golang), variables are a fundamental concept. Variables are used to store data that can be used and manipulated throughout a program. Here's a breakdown of variables in Go:

1. **Declaring Variables**: 

    You can declare a variable using the `var` keyword.

    ```go
    var x int
    ```

    This declares a variable named `x` of type `int`. You can also assign a value during declaration.

    ```go
    var y int = 10
    ```

    For multiple variables:

    ```go
    var a, b, c int
    ```

2. **Short Declaration**:

    Go supports a shorthand syntax to declare and initialize a variable. 

    ```go
    z := 20
    ```

    This infers the type of `z` based on the value you assign to it.

3. **Zero Values**:

    In Go, variables declared without an explicit initial value are given their zero value. The zero value is:

   - `0` for numeric types
   - `false` for the boolean type
   - `""` (empty string) for strings
   - `nil` for pointers, functions, interfaces, slices, channels, and maps.

4- **Constants**:

Go supports constants, which are declared like variables but with the `const` keyword. Constants cannot be changed after they're declared.

```go
    const Pi = 3.14159
```

5- **Data Types**:

 Go is a statically-typed language, which means the variable type is determined at compile time. Some common types include:

- Basic Types:
        - `int`, `int8`, `int16`, `int32`, `int64`
        - `uint`, `uint8`, `uint16`, `uint32`, `uint64`, `uintptr`
        - `float32`, `float64`
        - `complex64`, `complex128`
        - `bool`
        - `string`
- Composite Types:
        - `array`
        - `slice`
        - `map`
        - `struct`
        - `channel`
        - `interface`
        - `pointer`
        - `function`

6- **Pointers**:

A pointer is a variable that stores the address of another variable. Pointers in Go are similar to those in other languages like C and C++.

```go
var ptr *int
```

This declares a pointer to an integer.

7- **Scope**:

Variables can be defined in various scopes:

   - **Local**: Inside a function or block, only accessible within that function.
   - **Package**: Outside a function but inside a package, accessible throughout the package.
   - **Global**: Declared outside a function, accessible throughout the program.
   - **Exported/Unexported**: Variables starting with an uppercase letter are exported and can be accessed from other packages. Those with lowercase are unexported and are private to their package.

Using variables efficiently and understanding their scope and lifetime is crucial when writing Go programs.

Thank you for reading. I encourage you to follow me on Twitter where I regularly share content about JavaScript and React, as well as contribute to open-source projects and learning golang. I am currently seeking a remote job or internship.

Twitter: https://twitter.com/Diwakar_766

GitHub: https://github.com/DIWAKARKASHYAP

Portfolio: https://diwakar-portfolio.vercel.app/
$lookup in MongoDB
Tags: javascript, webdev, beginners, programming
Published: 2023-08-24 13:08:26

`$lookup` operator

Today, we would be looking at the `$lookup` operator in MongoDB. 

The `$lookup` operator; is part of the aggregation pipeline. It is used to join a document from one collection to a document of another collection in the same database.

**Note:** Both collections should be in the same database.

`$lookup` operator has 4 options.

**from:** The collection which we will take documents from.
**localField:** The field of the collection which we are currently performing our `$lookup` query on.
**foreignField:** The field of the collection which we wil take documents from.
**as:** The name given to the resultant array.


#### Exercise
We would use the `$lookup` operator to get all the documents from the post collection to the user collection.

**Step 1:** create a database called "Facebook".

**Step 2:** create two collections called "users" and "posts".

**Step 3:** Populate the collections with data

**users**

```javascript
// users collection
{
"author": String
}
```

**posts**

```javascript
// posts collection
{
"likes": Number,
"shares": Number, 
"comments": Number,
"postAuthor": String
}
```

```javascript

db.users.aggregate([
{$lookup: {
  from: "posts",
  localField: "author",
  foreignField: "postAuthor",
  as: "postData"

}}])

```

**Note:** The value of the localField and the value of the foreignField must be the same.

E.g 

```javascript
// users collection

{
 author: "Joe"
}
```

```javascript
// posts collection

{
 postAuthor: "Joe"
}
```



<a href="https://www.buymeacoffee.com/ifeanyichima" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>

**Thank you, Please follow me**

[![HTML](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://linkedin.com/in/ifeanyi-thankgod-chima)&nbsp;[![GitHub](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)](https://github.com/masterifeanyi)
Developer Starter Pack
Published: 2023-08-24 12:46:32

The amazing thing about the IT industry is that you don't need many assets to get started.

in this article will mention things you need to get started in the field of it.


## 1. Computer
![Computer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0lzczw3er15h1y6ge8so.jpg)

yes for sure to start learning or working in The it field you need a computer (laptop or pc it depends on your preference).
but the thing to be aware of here is that you don't need a very expensive computer or either a very cheep one. depending on your budget pick up the proper hardware and also note that don't spend to much because the computer you working on is not the only key in road of the IT Field.

## 2.Hoodie 
![Hoodie](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uienkql7b4ffbuw0sava.gif)


yea baby you need to start wearing hoodie because "WE ALL DO"

## 3. a good chair
![good chair](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e7zgu1dvzmefxwmkk7mi.gif)
working in this field demands a long period of setting so you need to keep your back safe, for sure you don't have to get a gamming chair because it's extra expensive but get a chair that doesn't give you ache for long setting.

## 4.Good internet Connection
![Internet Connection](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lnrjk0imkku7q4ihiyj8.gif)
for sure you need good internet connection helping you download all applications you will need, allowing you to watch high quality courses or even to play games when you are bored from all this sh** ,but since you are reading this article i guess you already have this one.

## 5.Eye Fresher
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/60z3299457ya4aze6dn1.gif)
staring at screens for long time can make your eyes dry so you may need to use some eye fresher drops but actually it's not a final solution it's better to take some off screen time and go for a hike and keep looking away this will help your sight and also will help you lose some weight 😛

## 6.Vitamins
![Vitamins](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hapu8aukylttokc64zus.gif)
one of drawbacks of working in this field is that you don't have much time for moving around or have proper exposure to sunlight
or setting for long time as mentioned , so you may need to have vitamins like vitamin D and Omega 3.
also remember to do some stretches and do some sports whenever you can.



*NOTE :: PLEASE ADVICE YOUR DOCTOR BEFORE TRYING ANY DRUGS MENTIONED IN THIS ARTICLE
Intro to Python: Day 17 - Making Dumb Mistakes with Lists []
Tags: python, webdev, beginners, programming
Published: 2023-08-24 12:36:36

*Hi there 👋 I'm a New York City based web developer documenting my journey with React, React Native, and Python for all to see. Please follow my dev.to profile or [my twitter](https://twitter.com/stonestwebdev) for updates and feel free to reach out if you have questions. Thanks for your support!*

One of the things I've found most helpful about Python so far is the error messages. Whenever your program crashes, you get a full traceback message of all the places in the code where the program failed.

If you scroll to the bottom of the traceback, you'll see the first place in the code it failed- which is the first bug it encountered that needs to be fixed. Python will also try to print out an exception that indicates what kind of bug it encountered.

Today I encountered an IndexError while testing my program. Unlike Javascript, which will allow you to create a list by explicitly adding elements at a given index, Python is more strict, and will only allow this if the index already exists. This means that unlike in Javascript, the following Python code will crash:

```python
my_list = []
my_list[0] = "apple"
print(my_list[0])

# console will print:
# ERROR!
# Traceback (most recent call last):
#  ...
# IndexError: list assignment index out of range
```

This is because although the `my_list` list exists, there is no index 0 on it, so in Python we cannot simply add something there if it doesn't exist.

Javascript is more forgiving because it's made for working with browsers and the web. It does its best to help you. Python will not, but that's ok, because it's more frequently used for backend computations and more precise programs.

**If you like projects like this and want to stay up to date with more, check out my Twitter [@stonestwebdev](https://twitter.com/stonestwebdev), I follow back! See you tomorrow for another project.**
All about dot net
Published: 2023-08-24 12:30:05

.NET is a software framework developed by Microsoft that provides tools and libraries for building and running various types of applications, ranging from web and desktop applications to mobile apps and more. It supports multiple programming languages, with C# and VB.NET being the most prominent ones. Here's an overview of the key aspects of .NET:

1. **Programming Languages**: .NET supports several programming languages, including C#, VB.NET, F#, and more. Among these, C# is the most widely used language.

2. **.NET Framework vs. .NET Core vs. .NET 5+**:
   - **.NET Framework**: The traditional version of .NET that primarily runs on Windows. It's suitable for building Windows applications, web applications, and more.
   - **.NET Core**: A cross-platform version of .NET that evolved into the unified .NET 5+.
   - **.NET 5+**: Starting from .NET 5, Microsoft merged .NET Framework, .NET Core, and Xamarin into a single, cross-platform framework called ".NET." It's designed to run on Windows, Linux, and macOS.

3. **Application Types**:
   - **Web Applications**: .NET is commonly used for building web applications using ASP.NET. ASP.NET MVC and ASP.NET Core (part of .NET 5+) are popular frameworks for building web applications.
   - **Desktop Applications**: .NET can be used to create Windows desktop applications using Windows Presentation Foundation (WPF) or Windows Forms.
   - **Mobile Applications**: Xamarin, which is now part of .NET, allows developers to create cross-platform mobile applications using C#.

4. **Common Language Runtime (CLR)**: In the context of the .NET Framework, the Common Language Runtime (CLR) is the runtime environment that manages the execution of .NET programs. It provides features like memory management, type safety, and garbage collection.

5. **Class Libraries**: .NET provides a rich set of class libraries that offer pre-built functions and components for common tasks, reducing the amount of code developers need to write.

6. **Visual Studio IDE**: Microsoft's Visual Studio is the primary integrated development environment for building .NET applications. It offers tools for code editing, debugging, testing, and more.

7. **NuGet**: NuGet is a package manager for .NET that allows developers to easily integrate third-party libraries and packages into their projects.

8. **Cross-Platform Support**: With .NET 5+ (and later), cross-platform development is a major focus. Developers can build and run .NET applications on Windows, Linux, and macOS.

9. **Performance**: .NET has seen improvements in performance over the years, with optimizations in both the runtime and the language.

10. **Open Source**: .NET Core and .NET 5+ are open-source projects hosted on GitHub, allowing developers to contribute to their development.

In summary, .NET is a versatile framework that offers various tools and libraries for building a wide range of applications. Its evolution into a unified, cross-platform framework with .NET 5+ has further expanded its capabilities and appeal to developers.


[Silver Jewellery](https://kysa.co/)