teleren/devto huggingface dataset:
🐉Mastering Python Data Structures: A Comprehensive Guide🦮
Published: 2024-02-10 15:42:45

Python, known for its ease of use and adaptability, provides a wide range of data structures that enable programmers to effectively arrange and work with data. Anyone wishing to fully utilize Python for data manipulation, algorithm design, and software development must have a solid understanding of these data structures. We'll look at the main Python data structures in this article, along with their features and applications.

## Lists:
Lists are one of the most versatile and commonly used data structures in Python. They are ordered collections of items, allowing for easy indexing, slicing, and modification. Lists can contain elements of different types and can be dynamically resized.

Example:
`my_list = [1, 2, 3, 'a', 'b', 'c']`



## Tuples:
Tuples are similar to lists but are immutable, meaning their elements cannot be modified after creation. They are often used to store collections of heterogeneous data and are particularly useful for returning multiple values from a function.

Example:
`my_tuple = (1, 2, 'hello')`



## Dictionaries:
Dictionaries are unordered collections of key-value pairs, providing fast lookup and retrieval of values based on keys. They are highly efficient for mapping relationships between objects and are commonly used for data storage and retrieval.

Example:
`my_dict = {'name': 'John', 'age': 30, 'city': 'New York'}`



## Sets:
Sets are unordered collections of unique elements, allowing for fast membership tests and set operations such as union, intersection, and difference. They are particularly useful for eliminating duplicate values and performing mathematical operations on collections.

Example:
`my_set = {1, 2, 3, 4, 5}`



## Arrays:
While lists and arrays are comparable in Python, arrays are made to hold elements of the same data type, which allows for faster operations for numerical computations and more memory-efficient storage. Numerical analysis and scientific computing both frequently employ them.

Example:
`import array
 my_array = array.array('i', [1, 2, 3, 4, 5])`


## Deque:
A flexible data structure that facilitates effective insertion and deletion operations from both ends is the deque (double-ended queue). When implementing queues, stacks, and other dynamic data structures, it is especially helpful.

Example:
`from collections import deque
 my_deque = deque([1, 2, 3, 4, 5])`



> Mastering Python data structures is essential for becoming a proficient Python programmer. Each data structure offers unique advantages and is suited for different use cases.
 
 🐉Whether you're manipulating lists, mapping relationships with dictionaries, or performing numerical computations with arrays, Python provides powerful data structures that enable you to tackle diverse programming challenges with ease and elegance.
FLASHLIGHTS
Published: 2024-02-10 15:21:57

The flashlight, a humble yet indispensable tool, has evolved over the years from a simple handheld device to a sophisticated instrument that brings light to the darkest corners of our lives. Its invention marked a revolutionary stride in portable illumination, providing a reliable source of light that has become a staple in various situations.https://led-flashlights.co.uk/


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w66syc6rd5joeer4yolh.jpg)
TaskyCal
Published: 2024-02-10 15:20:58

TaskyCal brings all of your to-dos, calendars, projects, Calendly appointments, reminders, and habits into one place, and uses AI-based schedule management & intelligent alerts to keep everything running smoothly.

[reminders app](https://taskycal.com/)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b8dxxefkvmh2czy9qqqc.jpg)
Mohali to Manali Bus Price | Mohali to Manali Bus ticket
Published: 2024-02-10 15:16:17

Book bus tickets from Mohali to Manali at CabBazar. Online bus ticket booking with zero convenience fee. [Mohali to Manali bus price](https://cabbazar.com/bus/ticket/mohali-to-manali) starts from Rs. 500 per head.
Mohali to Amritsar Bus Price | Mohali to Amritsar Bus ticket
Published: 2024-02-10 15:15:24

Book bus tickets from Mohali to Amritsar at CabBazar. Online bus ticket booking with zero convenience fee. [Mohali to Amritsar bus price](https://cabbazar.com/bus/ticket/mohali-to-amritsar) starts from Rs. 500 per head.
Gurgaon to Haridwar Bus Price | Gurgaon to Haridwar Bus ticket
Published: 2024-02-10 15:11:16

Book bus tickets from Gurgaon to Haridwar at CabBazar. Online bus ticket booking with zero convenience fee. [Gurgaon to Haridwar bus price](https://cabbazar.com/bus/ticket/gurgaon-to-haridwar) starts from Rs. 500 per head.
Gurgaon to Manali Bus Price | Gurgaon to Manali Bus ticket
Published: 2024-02-10 15:10:20

Book bus tickets from Gurgaon to Manali at CabBazar. Online bus ticket booking with zero convenience fee. [Gurgaon to Manali bus price](https://cabbazar.com/bus/ticket/gurgaon-to-manali) starts from Rs. 500 per head.
Gurgaon to Agra Bus Price | Gurgaon to Agra Bus ticket
Published: 2024-02-10 15:05:53

Book bus tickets from Gurgaon to Agra at CabBazar. Online bus ticket booking with zero convenience fee. [Gurgaon to Agra bus price](https://cabbazar.com/bus/ticket/gurgaon-to-agra) starts from Rs. 500 per head.
Is MadApes the most well known Crypto TG Caller of all time?
Tags: madapes, telegramcaller, madapescrypto, mad
Published: 2024-02-10 15:05:22

MadApes, a Hub for AMAs and In-Depth Project Reviews, Set to Begin Sharing Wider Crypto Related News

MadApes, a crypto orientated social media behemoth, announced plans to begin sharing wider market cryptocurrency news with their Twitter audience of almost 27,000 followers.

"We think this will be good for the community to keep up with current events relating to market conditions and possible future mass adoption," a Spokesperson for the MadApes team explained. The MadApes platform delivers detailed, yet easy to digest, reviews of crypto projects.

Since its inception in 2021, the platform has grown rapidly to become one of the most followed sources for crypto and DeFi protocol news and information of new projects. Their communities across Twitter and Telegram tally to well over 100,000 - filled with crypto enthusiasts from all corners of the world. Another impressive aspect of the MadApes community is how uniting it is - people from all different walks of life are brought together with their shared love of cryptocurrencies. Their AMAs, which are 'ask me anything' voice chats with projects hosted on Telegram, fetch well over 700 listeners on a good day, with the record being 1800 listeners. As one of the internet's biggest crypto review hubs, the team MadApes strive to be objective and neutral, they achieve this by not only sharing the strengths of a cryptocurrency projects but also the limitations and pitfalls. Not only are that, the team is keen to educate the community also on the general risks of trading cryptocurrencies.

"Crypto is becoming more and more mainstream and with that comes new waves of investors that are vulnerable to scams and other risks seen in the space. To counter that, we have a built a supportive and friendly community that work together to discuss the strengths and weaknesses of projects," said the owner of MadApes. The rapidly evolving space will undoubtedly only grow but one thing will always stay the same according to the team at MadApes, "we will continue to welcome new people into our community and learn together about cryptocurrencies."

About MadApes:

MadApes is an online platform that reviews cryptocurrencies to provide investors with a basis to conduct their own due diligence.

Media Contact:

Email: madapescall@gmail.com
Twitter: https://twitter.com/T1T4Ncrypto
Telegram: https://t.me/madapes , https://t.me/madapescall , https://t.me/madapesgamble
Gurgaon to Delhi Bus Price | Gurgaon to Delhi Bus ticket
Published: 2024-02-10 15:04:45

Book bus tickets from Gurgaon to Delhi at CabBazar. Online bus ticket booking with zero convenience fee. [Gurgaon to Delhi bus price](https://cabbazar.com/bus/ticket/gurgaon-to-delhi) starts from Rs. 500 per head.
Update: GitHub Repository Initialization Script.
Tags: linux, bash, git, github
Published: 2024-02-10 14:50:12

[GitHub Repository Initialization Script
](https://github.com/cosmicwanderer7/github-script/tree/main)This Bash script is designed to automate the process of creating and initializing a Git repository, optionally pushing it to GitHub, and selecting a license.

**Getting Started**
Before using this script, make sure you have the following:

- GitHub account
- GitHub username
- [GitHub personal access token with repo scope](https://docs.github.com/en/enterprise-server@3.9/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)

**Instructions (mkgit.bash)**
1.  Clone the repository to your local machine:

    ```bash
    git clone https://github.com/your-username/bash-github-repo-creator.git
    ```

3. Navigate to the cloned directory:

    ```bash
    cd bash-github-repo-creator
    ```

4. Make the script executable:
 
    ```bash
    chmod +x mkgit.bash
    ```
   
5. Execute the script
 
    ```bash
    ./mkgit.bash [-d] [-i] [-l] [-h]
    ```
  
 ***Flags***

   -d: Delete the configuration file and exit.
   -i: Initialize a Git repository in the current directory.
   -l: Prompt for license selection.
   -h: Display the help message.

   Runing script without any flags makes new repo without licence at `$HOME/Documents/Projects`

7. The first time you use the script, it will prompt you to enter your GitHub credentials. These credentials will be saved in a configuration file for further use.

8. To run the script globally.

   copy the script to
   
   `/usr/local/bin`

   you can create a alias

   `alias mkgit='mkgit.bash'` 
   
9. The script will create a new directory with the given repository name, initialize a Git repository, create an initial commit with a README file, and push it to the newly created GitHub repository.

**Contributing**
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request. Make sure to follow the contribution guidelines.

1. [Fork the repository.](https://github.com/cosmicwanderer7/github-script/tree/main)
2. Create your feature branch `git checkout -b feature/AmazingFeature`.
3. Commit your changes `git commit -m 'Add some AmazingFeature'`.
4. Push to the branch `git push origin feature/AmazingFeature`.
5. Open a pull request.

-------------------------------------------------------------
> **[contributors](https://github.com/cosmicwanderer7/github-script/graphs/contributors)**
> [Github.com/cosmicwanderer7](github.com/cosmicwanderer7)
> [Github.com/Cybersnake223](github.com/Cybersnake223)
> [Github.com/TanX-009
> ](github.com/Cybersnake223)
Ryerson University: Pioneering Innovation in the Heart of Toronto
Published: 2024-02-10 14:40:06

Ryerson University: Pioneering Innovation in the Heart of Toronto

Settled in the core of Canada's biggest city, Toronto, Ryerson College is an image of scholastic greatness, research development, and a significant obligation to inclusivity and local area commitment. **[Gimy](https://gimytv.ws/)** Laid out in 1948, Ryerson has quickly developed into a main foundation, offering a different scope of projects and encouraging a culture of advancement, variety, and investigation. In this article, we will investigate what makes Ryerson College excellent, from its authentic roots to its contemporary commitments to the scholarly community and society. 
A History of Adaptation and Transformation

Ryerson College's set of experiences is one of variation and change. It started as the Ryerson Foundation of Innovation in 1948, zeroing in on professional and useful schooling. Throughout the long term, it advanced into Ryerson Polytechnical Foundation and at last acquired college status in 1993.
The college's change reflects devotion to giving a schooling gets ready understudies to a quickly impacting world, stressing scholarly greatness, exploration, and local area commitment.
Academic Excellence and a Diverse Range of Programs

Scholarly greatness is at the center of Ryerson's main goal. The college offers an extensive variety of undergrad, graduate, and expert projects, drawing in understudies from across Canada and all over the planet. Ryerson's personnel contains achieved researchers and specialists in their separate fields, guaranteeing that understudies get elite training that prepares them for outcome in a universally associated world.
From human expression and sociologies to science, designing, business, and wellbeing sciences, Ryerson's different program contributions engage understudies to investigate their interests and foster a balanced point of view. The organization's obligation to investigate and experiential learning further advances the scholastic experience, cultivating decisive reasoning and critical thinking abilities.
Do you use bcrypt or other 3rd-party npm packages when hashing user password?
Tags: javascript, node, authentication, webdev
Published: 2024-02-10 14:02:17

Why are people using third party packages like bcrypt to hash user credentials instead of Node's own built-in classes and methods?

https://nodejs.org/api/crypto.html#cryptoscryptpassword-salt-keylen-options-callback

Reduce packages (and dependencies) by using Node's asynchronous `scrypt` method.


Well how does it work?
```typescript
import { scrypt, randomBytes } from 'crypto';

const salt = randomBytes(32).toString('hex');
scrypt(password, salt, 32, async (err, derivedKey) => {
  const userToCreate = {
    password: derivedKey.toString('hex'),
    username: username,
    salt: salt,
  };
});
```

The `userToCreate` will then contain the hashed password, as well as a random salt. In this example the hash and salt will still be different if two passwords are equal. That's exactly what we want!
The Psychology of Code - Decoding the Impact on Development 🧠
Tags: bestpractices
Published: 2024-02-10 13:55:49

## What is the Psychology Behind Code? 🤔

Coding is a human activity. That's why understanding the mind is crucial for development. These psychological effects that can significantly influence the code and coding process.

## The Broken Windows Theory in Code Culture 🪟

The Broken Windows Theory says that visible signs of disorder can lead to more disorder. Its a concept that was introduced in "The Pragmatic Programmer" by Andy Hunt and Dave Thomas. In a building, when a single broken window is left unrepaired, it can signal a lack of care and encourage further deterioration and damage, impacting the overall condition of the building. In the coding context, neglecting small issues, like leaving bugs unattended or tolerating messy code, sets the stage for a deteriorating codebase. Imagine a neglected project where every small bug or inconsistency becomes a "broken window," signaling a lack of attention to detail. This cultivates a culture where developers may feel less inclined to maintain code quality.

## Encouraging Developers: A Catalyst for Fixes and Improvements 🚀

Empowering developers goes beyond providing technical resources. It involves creating a culture that supports innovation and improvement. An exemplary way to achieve this is through hackathons or dedicated time for developers to work on personal projects. This not only encourages creativity but also sparks a sense of ownership and responsibility, leading to faster issue resolution and continuous improvements.

## No Blame, More Trust: Fostering Proactiveness 💪

Blaming each other for coding issues is counterproductive. Creating a blame-free environment encourages developers to be more proactive in addressing issues. For instance, implementing a blameless post-mortem culture after incidents promotes a constructive analysis of what went wrong without pointing fingers. This approach promotes trust among team members, enhancing collaboration and problem-solving.

## Conclusion 🌐

Understanding the psychological landscape of coding is essential for a positive development environment. By addressing broken windows, encouraging developer empowerment and promoting a blame-free culture, teams can create a workspace that not only produces high-quality code but also supports the well-being and creativity of its developers.
Animations in React with Framer Motion 😎🍿
Tags: react, animation, javascript, frontend
Published: 2024-02-10 13:50:34

In this tutorial, I'll show you how to create animations in react, with framer motion. 

(In case you'd like to watch, rather than read. ...and see the animations 😅)

{% embed https://youtu.be/Ojk-x-uAyIE %}

To start off, you'll want to install framer motion by running `npm install framer-motion`.

Thank you for coming to my TedTalk.

Then, in any file we want to use it, we can `import { motion } from 'framer-motion'`.

The motion component is the core of Framer Motion. Think of it as an html element or svg with easy and powerful animation capabilities 😎.

You can replace an existing html element, like an image tag `<img src='...' />`, with `<motion.img src='...' />`. So instead of `img`, it's now `motion.img`. 

Then, you can add the `animate` property, which will take an object. Inside that object, you can add things like scale, and rotate.

```
<motion.img animate={{scale: 2, rotate: 360}} src='...' />
```

By default, though, this will animate very fast. So we can add a transition prop, then set the duration. 

```
<motion.img animate={{scale: 2, rotate: 360}} 
transition={{duration: 2}} src='...' />
```

We can also have it scale up, then scale back down, by setting scale to an array with multiple numbers.

```
<motion.img animate={{scale: [1, 2, 1], rotate: 360}} 
transition={{duration: 2}} src='...' />
```

> By the way, I have a video below so you can see these animations 😅

We can also move it along the x axis by giving it 1 number or multiple numbers. 

```
<motion.img 

animate={
   { scale: [1, 2, 1], 
     rotate: 360,
     x: [0, 100, -100, 0]
   }
} 
transition={{duration: 2}}

/>
```

To animate on hover, just use `whileHover` instead of `animate` 👍.

```
<motion.img 

whileHover={
   { scale: [1, 2, 1], 
     rotate: 360,
     x: [0, 100, -100, 0]
   }
} 
transition={{duration: 2}}

/>
```

To animate on scroll, just use `whileInView` instead of `animate` 👍.

```
<motion.button whileHover={{scale: 1.2}}>
          Button Text
</motion.button>
```

Hope it helps! Happy coding!
React:(Props)
Published: 2024-02-10 13:35:38

The most important topic today is **Props**.

**What are Props?**

Props in react used to transfer data from one component to another component.
Like, we transfer the messages from one place to another place with the help of messenger.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uaoqu0yomt4ajudra432.gif)

It helps the components to access the customized data, values and the information that input holds.

**How to Use Props?**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j5vri9lvwfx56rciim79.gif)

In React there is a way of data transfer i.e. from Parent Component to Child Component and viceversa. The data passed to child can't be modified.

**How to Send Prop into Component**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fl455russydv87hs8hnd.png)

We can see how the props are used in Child **iComponent** that was transferred from Parent **TestComponent**. The output displays the props value in Child Component.

Meet you seen with more concepts in React🤠🤠🤠
Vadodara to Dwarka Bus Price | Vadodara to Dwarka Bus ticket
Published: 2024-02-10 13:32:38

Book bus tickets from Vadodara to Dwarka at CabBazar. Online bus ticket booking with zero convenience fee. [Vadodara to Dwarka bus price](https://cabbazar.com/bus/ticket/vadodara-to-dwarka) starts from Rs. 500 per head.
Vadodara to Surat Bus Price | Vadodara to Surat Bus ticket
Published: 2024-02-10 13:32:03

Book bus tickets from Vadodara to Surat at CabBazar. Online bus ticket booking with zero convenience fee. [Vadodara to Surat bus price](https://cabbazar.com/bus/ticket/vadodara-to-surat) starts from Rs. 500 per head.
Vadodara to Ahmedabad Bus Price | Vadodara to Ahmedabad Bus ticket
Published: 2024-02-10 13:27:01

Book bus tickets from Vadodara to Ahmedabad at CabBazar. Online bus ticket booking with zero convenience fee. [Vadodara to Ahmedabad bus price](https://cabbazar.com/bus/ticket/vadodara-to-ahmedabad) starts from Rs. 500 per head.
Udaipur to Surat Bus Price | Udaipur to Surat Bus ticket
Published: 2024-02-10 13:22:31

Book bus tickets from Udaipur to Surat at CabBazar. Online bus ticket booking with zero convenience fee. [Udaipur to Surat bus price](https://cabbazar.com/bus/ticket/udaipur-to-surat) starts from Rs. 500 per head.
Patna to Varanasi Bus Price | Patna to Varanasi Bus Ticket
Published: 2024-02-10 13:21:53


Book bus tickets from Patna to Varanasi at CabBazar. Online bus ticket booking with zero convenience fee. [Patna to Varanasi bus price](https://cabbazar.com/bus/ticket/patna-to-varanasi) starts from Rs. 1500 per head.
Null Coalescing (??) Operator in C#
Tags: csharp
Published: 2024-02-07 11:57:06

The C# Null Coalescing Operator (??) is a versatile operator that simplifies the handling of null values in C# code. It provides a concise way to specify a default value when a nullable variable is null, allowing you to write more concise and readable code.

To understand the Null Coalescing Operator, let's start with a simple scenario. Consider a variable called "name" that can either hold a string value or be null. If "name" is null, we want to assign a default value of "Anonymous" to it. Traditionally, we would use an if-else statement to achieve this:

```csharp
string name = GetNameFromSomeSource(); // Assume this can return null

if (name == null)
{
    name = "Anonymous";
}
```

With the Null Coalescing Operator (??), we can achieve the same result in a more concise way:

```csharp
string name = GetNameFromSomeSource() ?? "Anonymous";
```

In the above code, the "?? " operator performs a null check on the left-hand side variable (in this case, "name"). If the left-hand side is null, the operator returns the right-hand side value ("Anonymous" in this case) and assigns it to the left-hand side variable.

The Null Coalescing Operator can be used with any nullable type, including reference types and nullable value types. This means it can handle null values for strings, integers, bools, and other types.

Let's take another example where we want to assign a default value to an integer variable (age) if it is null:

```csharp
int? age = GetAgeFromSomeSource(); // Assume this can return null

int defaultAge = 18; // Default age to be set if age is null
int actualAge = age ?? defaultAge;
```

In this case, if the "age" variable is null, the Null Coalescing Operator assigns the value of "defaultAge" to "actualAge". Otherwise, it assigns the value of "age" itself.

In addition to assigning a default value, the Null Coalescing Operator can also be used to return a default value directly without assigning it to a variable. For example:

```csharp
string favoriteColor = GetFavoriteColorFromSomeSource(); // Assume this can return null

string color = favoriteColor ?? "Blue";
Console.WriteLine(color); // Output: Blue
```

In the above code, if "favoriteColor" is null, the Null Coalescing Operator returns the default value ("Blue") directly without assigning it to a variable.

Overall, the C# Null Coalescing Operator (??) is a handy tool for simplifying null checks and providing default values in C# code. It helps to write more concise and readable code by reducing the number of if-else statements and adding clarity to null value handling.
Udaipur to Jodhpur Bus Price | Udaipur to Jodhpur Bus ticket
Published: 2024-02-10 13:21:41

Book bus tickets from Udaipur to Jodhpur at CabBazar. Online bus ticket booking with zero convenience fee. [Udaipur to Jodhpur bus price](https://cabbazar.com/bus/ticket/udaipur-to-jodhpur) starts from Rs. 500 per head.