teleren/devto huggingface dataset:
The Art of Abstraction
Tags: javascript, beginners, codenewbie, learning
Published: 2023-10-18 17:50:40

## Welcome!

Abstraction, what is it? How does it work? How do I balance a checkbook? How is abstraction the backbone of all computer programming? All but one of these questions will be answered in this blog post!

**What is it:** Abstraction refers to the process of taking big ideas and representing them in smaller, more digestible pieces of information. We see this in the process of making a "variable". Consider the code below:

```
let myGroceryList = ['apples', 'bananas', 'coconuts', 'strawberries'];
```
This array of foods makes up the grocery list of a rather passionate fruit enthusiast! This fruit fan, let's call them Momo, can try to remember each item on his grocery list, or he can `let` the variable `myGroceryList` equal an array of list items:

```
['apples', 'bananas', 'coconuts', 'strawberries'];
```
Right now, Momo only has 4 items on his grocery list. But let's say he was feeling particularly fruity one day, and decided to buy 20 different fruits. The `myGroceryList` variable would be far too large to just remember. What if Momo wanted to keep track of how many items were on his list? What if Momo wanted to add, change, or remove items from his list? What if Momo wanted to not only keep track of his own list, but also all the lists of his eccentric friends?

**How Does it Work:** To find out how many item are in his grocery list, Momo could access the `length` of his grocery list. He could then _assign_ the length of his list, to yet another variable!

```
let myGroceryList = ['apples', 'bananas', 'coconuts', 'strawberries'];

let listLength = myGroceryList.length;

// => "myGroceryList" has 4 items, "myGroceryList.length" returns that length (4), 
// => we then assign that '4' to the listLength variable.

```
Embracing Tech: Tools, Not Threats 🩸
Tags: ai, programming, discuss, watercooler
Published: 2023-10-18 17:45:53

✨Top 10 ChatGPT Prompts That Will Make You a 10x Developer ✨

The world is inundated with articles about AI, and regurgitated articles like this. These write-ups and the content creators that push them are preying on an innate desire that human beings have to choose the path of least resistance. "Just give me the answer" is an attitude that a lot of people who grew up with the internet feel entitled to.

Like everything else, AI tech is a part of the tech cycle at large. Every couple years something comes around that is a 🔪killer🔪 of the way things were. Like back in the day when Dreamweaver was going to make it too easy for people to build websites, or like when Squarespace came out and was was going eliminate the need for developers.

The perceived threat of these technologies is fleeting, and is an effective tool when it comes to exposing those in our industry who are unwilling to adapt, and see these technologies for what they are, a tool to be used. Too many folks are ready to throw their hands up and say "WELLP THIS IS IT, THE END IS FINALLY HERE".

Those who thrive will leverage the tool to help them create something better, more impressive, more creative, and more unique as a supplement to their already unique set of skills.

How will you leverage these tools to do something better?
Safari automation test on your own iPhone with Selenium in 2023
Published: 2023-10-18 17:40:30

# Prerequisites

* Settings > Safari > Details > Turn on "Remote automation" on your own iPhone.

* Connect the iPhone with your Mac PC where Selenium codes run and then choose "Trust".

[Running a website automation test on your own iPhone with Selenium](https://shawnlobo96.medium.com/running-a-website-automation-test-on-your-own-iphone-with-selenium-90907b51b27b)

# Source code

```Python
from time import sleep

from selenium import webdriver
from selenium.webdriver.safari.options import Options as SafariOptions

# Use Options to set capabilities instead of DesiredCapabilities after Selenium 4
safari_options = SafariOptions()
safari_options.set_capability("platformName", "ios")

driver = webdriver.Safari(options=safari_options)
driver.get("https://google.com")

sleep(10)
```
Open Source ABCs: Zsh
Tags: opensource, discuss, 100daysofoss
Published: 2023-10-18 17:34:12

---
title: Open Source ABCs: Zsh
published: true
description: Join our #100DaysOfOSS blog series as we explore the world of Open Source Software (OSS) from A to Z! Every week, we'll discuss two new letters of the English alphabet. Share your thoughts, ideas, and favorite OSS projects for each letter. Let's celebrate the power of open source together! 
tags: opensource, discuss, 100DaysOfOSS
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fxwg4ygmybnni1tpwdx3.png
# Use a ratio of 100:42 for best results.
series: 100DaysOfOSS
canonical_url: https://opensauced.pizza/docs/community-resources/open-source-abcs-zsh/
---

Welcome to our [#100DaysOfOSS series](https://dev.to/opensauced/100daysofoss-growing-skills-and-real-world-experience-3o5k). With this post, we've officially gone from A to Z!

Today, we're covering the letter "Z."

- **Zsh**: Zsh, also known as the Z Shell, is an interactive login shell for Unix-like operating systems. It includes many features to improve productivity, such as advanced tab completion, spelling correction, and a flexible plugin and theming system. Zsh is often favored by developers for its customization capabilities and is commonly used in open source software development environments.

Now, we want to hear from you! What other OSS terms can you think of that start with the letter "Z"? 

Remember to use the hashtag #100DaysOfOSS if you share on social media, and don't forget to tag us [@saucedopen](https://twitter.com/saucedopen) so we can follow along.
The Green Revolution: How Cryptocurrencies are Paving the Way for Sustainable Finance
Tags: cryptocurrency, mining, bitcoin, ethereum
Published: 2023-10-18 17:23:31

**Introduction:**
Cryptocurrencies have come a long way since the inception of Bitcoin over a decade ago. While their meteoric rise in popularity and value has been the subject of much discussion, one of the most intriguing trends in the cryptocurrency industry is their potential to drive environmental sustainability. This article explores how cryptocurrencies are not only reshaping finance but also leading the charge towards a greener and more sustainable world.

**Cryptocurrency Mining and Energy Consumption:**
The elephant in the room when discussing the environmental impact of cryptocurrencies is their energy consumption, especially in the context of Bitcoin's Proof of Work (PoW) consensus algorithm. However, it's essential to dissect this issue in a balanced manner. We'll delve into the energy-efficient alternatives such as Proof of Stake (PoS) and their impact on the carbon footprint.

**Renewable Energy Adoption:**
One of the most promising trends is the growing integration of cryptocurrencies with renewable energy sources. We'll discuss how some mining operations are leveraging excess energy from solar, wind, and hydroelectric power, thus reducing the environmental footprint associated with cryptocurrency mining.

**Cryptocurrencies and Financial Inclusion:**
Cryptocurrencies are not just about decentralized finance (DeFi) and speculation; they are also a powerful tool for financial inclusion. We'll explore how cryptocurrencies are enabling access to financial services for the unbanked and underbanked populations globally, contributing to economic growth and reducing inequality.

**NFTs and the Art World:**
The explosive popularity of NFTs (Non-Fungible Tokens) is reshaping the art and entertainment industry. We'll discuss how NFTs are providing artists and creators with a new, decentralized platform to monetize their work, and how this movement can potentially reduce the environmental impact of traditional art and entertainment industries.

**Blockchain for Supply Chain Transparency:**
The trend of utilizing blockchain technology for supply chain transparency and traceability is making waves in the sustainability sector. We'll examine how blockchain is being employed to ensure ethical sourcing, fair trade, and reduce waste in industries like food and fashion.

**Closing Thoughts:**
Cryptocurrencies are more than just financial assets; they represent a paradigm shift in how we perceive and interact with the world. The cryptocurrency industry, despite its energy consumption challenges, is at the forefront of innovation for sustainability. As the world grapples with environmental crises, cryptocurrencies are offering solutions that align with the goals of a greener, more sustainable future.
Tree has been Planted
Tags: hack23contributor, hacktoberfest23, hacktoberfest, flutter
Published: 2023-10-18 17:19:25

I would like to share my recent experience of completing Hacktoberfest 2023, which was organized by DigitalOcean and GitHub. Hacktoberfest is an open-source event where developers from around the world gather to contribute to the open-source community.

During this program, I learned how open-source contributions work and how software is created through collaboration with other programmers. Throughout this process, I acquired numerous new skills.

Special thanks to our generous partners who made this possible. I'm looking forward to enjoying these rewards and continuing to contribute to open source in the future.

Let's keep the open-source spirit alive and continue to make a positive impact on the tech world! 🌍🚀
Testing Techniques
Published: 2023-10-18 16:53:53

1.Boundary Value Analysis

    It's based on the boundary values of valid and invalid partitions of the given input.
    Example: Year input 1990 to 2000
BVA test cases:
    1.1889 and 1991
    2.1999 and 2001 is the test case boundaries of this method.

2.Decision Table Testing

     It's based on the indicator as true and false values.
     Example: KFC give the 50% off your first order
 Test cases:
     check this is first order
            -True{get 50% off}
            -False{pay full amount}

3.Use case Testing

     It's based on the scenario of the use cases.
     Example: Ticket booking system
  Test cases:
     -Normal ticket booking
     -Unavailability ticket booking
     -Get the invalid amount in account for the ticket booking
     
4.LCSAJ Testing(Linear Code Sequence And Jump)  
     
     It's based on the conditional statement and this is white box testing.
     Example: Student Exam Results

```
mark = input()
if(mark>=35):
  print("PASS")
else:
  print("FAIL")
```
   Test cases:
        1.mark = 55 (PASS)
        2.mark = 20 (FAIL)
        3.mark = 35 (PASS)
Wifi hoạt động tốt với laptop nhưng iphone thì không
Tags: tips
Published: 2023-10-18 16:48:38

Lúc tối nay mình gặp 1 vấn đề, một vài website đột nhiên không thể vào dc bằng iphone, trong khi bật laptop vẫn vào tốt. Dù rằng iphone và laptop đang dùng chung 1 wifi 
ngồi mày mò một hồi thì xác định dc lỗi nằm ở chỗ DNS, 
cái DNS Automatic của iPhone có vấn đề gì đó với mấy cái site này, 
và thế là thử DNS qua anh `8.8.8.8` của Google và `1.1.1.1` của CloudFlare thế là OK 

cách làm 

1. trên iphone, mở setting, tìm Wi-Fi 
2. click vào biểu tượng chữ i ở chỗ cái Wifi 
3. kéo xuống tìm mục DNS 
4. bật DNS lên và thêm 2 cái DNS kia vào 

Done 

hình ảnh bên dưới 


![wifi](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/esy8zst8iyf0xnzh1ezu.jpg)


![Configure DNS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k3cyhsflhw1pvvq6wkv6.jpg)

![Add Manual DNS Server](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4epw4fneh9yz5plknj2r.jpg)
Useful features by NextJS
Tags: javascript, nextjs, react, webdev
Published: 2023-10-18 16:46:45

Next.js empowers developers to create modern, high-performance web application
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2opkgy8lpbdsi1fr62y6.jpg)

while simplifying complex tasks. Whether it's optimizing images, improving SEO, or handling routing and middleware, Next.js has you covered. 💪

1. 𝗜𝗺𝗮𝗴𝗲 𝗢𝗽𝘁𝗶𝗺𝗶𝘇𝗮𝘁𝗶𝗼𝗻: Seamlessly enhance your website's performance using the <Image> tag. Say goodbye to slow loading times! ⚡️
2.𝗦𝗲𝗿𝘃𝗲𝗿-𝗦𝗶𝗱𝗲 𝗥𝗲𝗻𝗱𝗲𝗿𝗶𝗻𝗴 (𝗦𝗦𝗥): Serve dynamic content with SSR for faster page loads and better SEO. 📡
3. 𝗖𝗹𝗶𝗲𝗻𝘁-𝗦𝗶𝗱𝗲 𝗥𝗲𝗻𝗱𝗲𝗿𝗶𝗻𝗴 (𝗖𝗦𝗥): Need client-side interactivity? No problem! Next.js offers CSR when it's needed. 🌐
4.𝗦𝘁𝗮𝘁𝗶𝗰 𝗦𝗶𝘁𝗲 𝗚𝗲𝗻𝗲𝗿𝗮𝘁𝗶𝗼𝗻 (𝗦𝗦𝗚): Create blazing-fast, SEO-friendly static websites effortlessly. 🏎
5. 𝗦𝗘𝗢 𝗢𝗽𝘁𝗶𝗺𝗶𝘇𝗮𝘁𝗶𝗼𝗻: Search engine bots can scan and understand HTML meta tags, but they can't interpret JSX directly. With Next.js, you're providing search engines with the rich, meaningful content they crave.📈
6. 𝗣𝗮𝗴𝗲 / 𝗟𝗮𝘆𝗼𝘂𝘁 : The Pages Router has a file-system-based router built on concepts of pages. When a file is added to the pages directory it's automatically available as a route. 🚀
7. 𝗔𝗣𝗜 𝗥𝗼𝘂𝘁𝗶𝗻𝗴:Next.js supports API Routes, which allow you to build your API without leaving your Next.js app.🧰
8. 𝗠𝗶𝗱𝗱𝗹𝗲𝘄𝗮𝗿𝗲: Customize your Next.js application's behavior with middleware.

Do you know any useful features that aren't on this list? 😄

If so, drop them in the comments below! Let's share the knowledge and make life even easier for everyone. 🚀
Exploratory Data Analysis using Data Visualization Techniques
Published: 2023-10-18 16:38:28

To understand data, we must be able to clean and remove unnecessary noise as soon as raw data is received to convert the data into useful data and later use for presenting and predicting useful features. To be able to handle this, we use a method called **Exploratory Data Analysis (EDA)**, which simply means describing data in the context of statistics (descriptive) and visualization to bring meaningful data that showcases the important aspects for further analysis. **Data Visualization**, on the other hand, is a technique or way of representing data in pictorial or graphical format, which is important in helping data scientists analyze data visually for patterns or trends.

EDA is very helpful in uncovering any Missing values, anomalies, duplicates, outliers, or incorrect data types while cleaning and preparing the raw datasets. This helps data scientists discover insights, spot anomalies and patterns/trends, test hypotheses, and assumptions.

EDA Is divided into four well-known types primarily:

- **Univariate non-graphical**: This involves a data set with one variable; hence, no relationship can be analyzed from it. We can only find insights and patterns in it.

- **Univariate Graphical**: Most common are:
  - Stem and leaf plots – show data values and shape of the distribution.
  - Histograms – Bar plots in which every bar represents frequency count for a value range.
  - Box plot – Graphically showcases a five-number summary of the minimum, first quartile, median, third quartile, and maximum.

- **Multivariate non-graphical**: When there is more than one variable, it shows the relational statistics between two or more variables.

- **Multivariate Graphical**: The use of graphical methods to display the relationship between two or more data sets. A grouped bar plot or bar chart is most commonly used, where each bar chart with each group represents one level of one of the variables, and each bar within a group represents levels of the other variable.

Exploratory Data Analysis uses Data Visualization to represent and present data, and to properly achieve these, there are steps and techniques required when using Python in this case:

1. **Understanding the why?**: This will solve the business question, need, or problem and question at hand.

2. **Importing necessary libraries**: Import the necessary libraries such as Pandas, Seaborn, and Matplotlib.

3. **Loading the dataset**: Load the dataset that you want to visualize based on the requirement needs.

4. **Data Cleaning**: This involves handling the missing values, removing outliers, and ensuring data quality across the data sets.

5. **Data Exploration and Summary**: Examining summary statistics, visualizing data distributions, and identifying patterns or relationships.

6. **Feature Engineering**: Transforming variables, creating new features, or selecting relevant variables for analysis.

7. **Data Visualization**: Presenting insights through plots, charts, and graphs to communicate findings effectively about the data.
Python: creating tokens without the Django auth models
Tags: django, token, baseusermanager, abstractbaseuser
Published: 2023-10-18 16:24:33

Hi, as a beginner in django_restframework, it is difficult to work with tokens without first creating a BaseUserManager account model and abstract it to be able to access the AuthToken functionality of restframework. I mean this way:

![BaseUserManager model code implementation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/daftzl2rvwrqxt06add6.png)
Basically, you can create tokens for your normal model, but it requires a bit of work. I mean if your model is this way:

![simple account model](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jbofz4l3k4mwjly7puud.png)
all you have to do is:

Create a new python file in your app and give it a name. The file is for handling tokens, mine i have called it tokenizer.py.

![token Model code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9vhvlmsl2nijqvdcwixs.png)

Create another file handling the fetching of tokens, I have named mine token_getter.py

![code that gets tokens from the AuthToken model](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m698n0l83dr90ps98q93.png)

Now, create a third file that handles the token validation, name it whatever you think is best for your taste. I just happened to call mine auth_validity.py

![code that describe token validation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ai9ouz5yqtn4q7nzkf7n.png)
In your views.py,
import
`from .auth_validity import is_authenticated`
`from .token_getter import get_token`
and
`from .tokenizer import AuthToken`
now you can use it like this while you create a user and assign token
`AuthToken.objects.create(user=account)
            obj                 = Account.objects.get(email_address = account.email_address)
            obj.token           = AuthToken.objects.get(user=obj).key
            obj.save()`
or do this for validation
`    if is_authenticated(request):
        # content`
or do this to login
` account             = Account.objects.get(token = get_token(request))`
Well, i don't know how secure this implementation is, but it is easier if you want to avoid using AbstractBaseUser and BaseUserManager so as to access token authentication in django restframework.
Hope this is helpful to someone out there looking for an easier way out without adding extra packages or having to use BaseUserManager.
Meet Fred: The most awesome Redis client for Rust.
Tags: redis, rust, opensource, github
Published: 2023-10-18 16:00:30

## TLDR
{% embed https://github.com/aembke/fred.rs %}

## Back Story
The goto Redis client for Rust is called [redis-rs](https://github.com/redis-rs/redis-rs). It has over 3k stars on Github. but I found it very annoying to use because I quickly found out that if you want to set any value you had to get a mutable reference to the underlying client. Which meant great pain to store Redis client in the global scope. People who do not know what a mutable reference is consider the `let` keyword in JavaScript. you can mutate or change a variable that is initiated with `let`.

The other annoyance I had that it didn't support RedisJson which was a bummer because it is very helpful if you store anything other than `String` key value pair.

Fortunately then I found Fred. Fred is a beautiful piece of engineering. It solved all of the problems I had with the redis-rs package. It is async friendly, it supports RedisJson and most importantly it doesn't require a mutable reference to set value.

It also has a lot of other great features. Consider **starring** the project and spreading the words!
Azure Storage Account service -learning day 2
Tags: azure
Published: 2023-10-18 15:59:01

Disclaimer: This is the note I am publishing as blogs for me to revisit all topics and clear my fundamentals. I would love if this article you found as helpful.




Azure Storage account is a Microsoft managed cloud service that provides storage that is highly available, secure, durable, scalable and redundant.

Within azure there are

- 2 types of storage accounts
- 4 types of storage
- 4 levels of data redundancy
- 3 tires for storage files

**4 types of storage**

1. Azure blobs
2. Azure files
3. Azure Queues
4. Azure Tables

Azure blob is important so we will explore it later.

## **Azure file Storage**
Azure files is a shared network file storage service that provides administrator a way to **access native smb file** shared in the cloud.

Using this smb protocol we can integrate with our local machine to cloud azure.

## **Azure Queue Storage**

> Azure Queue Storage is a service that allows users to store high volumes of messages, process them asynchronously and consume them when needed.

Here we put a retention day of 7 days or a month as per required.

After that day the message will be disappear.

## **Azure table storage**
Don't confuse with the name like table that don't mean structured data here.

> Azure table storage is a scalable, no-SQL, key-value data storage system that can be used to store large amounts of data in the cloud.

This storage offering has a schema less design and each table has rows, that are composed of key value pairs.

In No-SQL there is a document dB where data stores as Json document file.

similar ex: Mongo dB

## **Azure Blob Storage**

_Extra importance for this storage service_

> Azure blob storage is Microsoft azure service for storing binary large object or blobs which are typically composed of **unstructured** data such as text, images and videos along with their metadata.

Blobs are stored in directory like structure called **Containers**.

**Note:**
All the 3 types of data classification we can store into this one place which is blob.

Those classifications are:

- structured 
- semi-structured
- unstructured

**Benefits of blobs**

- optimized for storing massive amounts of unstructured data
- Text or binary data
- General purpose object storage
- cost efficient
- Provide multiple access tiers.

Note:
     we can do all the tasks using this single blob storage service.

**Types of storage account**
At the time of creation of storage account there will be option 

- Standard
- Premium 

These two types are called types of storage account.

Standard: as from the name we can understand that it has les s I/O use case with low latency 

Premium: This has a very low latency.
- very good data movement from point A to point B.
- High I/O use case.

In the time of creation, we have to very careful about the name, name of storage account.

Because it is going to create a URL through which we connect this account from other services or accounts to perform any operation.

Next article will be about azure data lake gen2.