teleren/devto huggingface dataset:
Async Programming in Python: An Introduction
Tags: programming, python, datascience, web3
Published: 2022-12-21 08:20:13

Async programming is a way of writing concurrent code in a single-threaded environment. It allows you to write code that can perform multiple tasks concurrently, rather than waiting for one task to finish before starting the next. Async programming has become increasingly popular in recent years, as it allows you to build high-performance applications that can scale to handle a large number of concurrent connections.



Python has introduced several new features for async programming in recent versions, and it now has a full-featured async programming model. Python’s async model is based on the async/await syntax, which was introduced in Python 3.5. Async/await allows you to write asynchronous code in a way that looks and feels like synchronous code, making it easier to understand and work with.

To use async programming in Python, you need to use an async-compatible library or framework. There are many options to choose from, including asyncio (the built-in async library in Python), aiohttp (a library for async HTTP requests), and asyncpg (a library for async PostgreSQL database access). These libraries provide async versions of common functions and methods, such as sleep, read, and write, which allow you to write async code that can perform multiple tasks concurrently.

In conclusion, async programming is a powerful tool for building high-performance, scalable applications in Python. With the introduction of async/await in Python 3.5, it has become easier than ever to write async code in Python, and there are many libraries and frameworks available to help you get started.

References:

Python documentation on async programming: https://docs.python.org/3/library/asyncio.html
asyncio documentation: https://docs.python.org/3/library/asyncio.html
aiohttp documentation: https://aiohttp.readthedocs.io/en/stable/
asyncpg documentation: https://magicstack.github.io/asyncpg/

#asyncprogramming #Python #async #await #asyncio #aiohttp #asyncpg
9 Best Practices for Multi-factor Authentication (MFA)
Published: 2024-06-22 09:02:01

---
title: 9 Best Practices for Multi-factor Authentication (MFA)
published: true
date: 2022-12-21 08:03:58 UTC
tags: 
canonical_url: https://mojoauth.com/blog/multi-factor-authentication-best-practices
---

Relying alone on passwords for secure authentication is no longer sufficient, in fact, considered among the weak links in cybersecurity. Multi-factor authentication and its best practice solve this problem as it can effectively block more than 90% of account attacks. Researcher says 80% of data breaches occur due to weak passwords, stolen credentials, or common passwords. MFA can solve this problem, as it combats attacks like dictionary passwords, brute-force, phishing, etc.
Save Christmas from Bug!
Tags: programming, community, challenge, watercooler
Published: 2022-12-21 08:02:17

Anyone in Bug's shoes would turn green with envy and go mad. As a true introvert, he lives in the depths of the code and hides far away from developers, reviewers, testers, and everyone else 🐞 But these "everyone else" are preparing the biggest Christmas party ever 🎄🎅🎁 They make a fuss over the holidays, decorate everything they can decorate and make Bug so angry! He will not resist the urge of ruining their holidays. **Bug decides to steal Christmas** 😱
 

> Don't let Bug ruin the holidays! [Take the quiz](https://pvs-studio.com/go.php?url=1941) to save Christmas from the offended winged beast 🦸

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/omtl425b4yzecc4jyahw.png)
A Nice Developer Joke For Today
Tags: jokes, dailydeveloperjokes
Published: 2022-12-21 08:00:10

---
title: "A Nice Developer Joke For Today"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12596bcfd66.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ What was Grace Hopper's favorite car?

___A:___ VW Bug
 -->
Azure: Retrieve an OAuth2 Token through PowerShell
Tags: powershell, azure, oauth2, token
Published: 2022-12-21 07:55:37

When working with REST APIs one might need a Bearer Token quite often. Here is one way to retrieve it through PowerShell for a Service Principal.

```powershell
function Get-AzOauth2Token
{
    [CmdletBinding()]
    Param
    (
        [string]$TenantId,
        [string]$AppId,
        [string]$Secret
    )

    $result         =   Invoke-RestMethod -Uri $('https://login.microsoftonline.com/'+$TenantId+'/oauth2/token?api-version=1.0') -Method Post -Body @{"grant_type" = "client_credentials"; "resource" = "https://management.core.windows.net/"; "client_id" = "$AppId"; "client_secret" = "$Secret" }
    $authorization  =   ("{0} {1}" -f $result.token_type, $result.access_token)
    return $authorization
}
```

**Example:**

```powershell
$token = Get-AzOauth2Token -TenantId tenant_id -AppId app_id -Secret secret_value
```
Follow 7 Step and Dockerize your ReactJS Project
Tags: docker, react, javascript, cloud
Published: 2022-12-21 07:51:47

Follow this steps for dockerize your react project

**Steps**

**1** - Make sure you have Docker installed on your system.
**2** - Navigate to your reactjs project directory in the terminal and create a new file called "**Dockerfile**" without any extension.
**3** - Add the following code to the Dockerfile:

```
FROM node:latest

WORKDIR /app

COPY package*.json ./

RUN npm install

COPY . .

EXPOSE 3000

CMD ["npm", "start"]
```
**4** - Run the following command in the terminal to build the Docker image:

```
docker build -t react-app
```
**5** - Once the build is complete, run the following command to run the Docker container:

```
docker run -p 3000:3000 react-app
```
**6** - Your reactjs app should now be running in a Docker container and available at [http://localhost:3000](http://localhost:3000.)

**7** - If you want to make changes to your code and see the changes reflected in the app, run the following command in the terminal to start a development server:

```
docker compose up
```

This will start a development server that will automatically update the app as you make changes to the code.
Backstage - A centralized location to manage your infrastructure
Published: 2022-12-21 07:49:52

Backstage is an open-source product developed and leveraged by Spotify that helps dev teams manage their services, software, tooling, etc., all in a centralized place. 

It was developed to improve team productivity working with complex infrastructure. So, as opposed to investing time looking for information like, "Where's the API for that service we're all supposed to be using?" "What version of that framework is everyone on?" "This service isn't responding. Who owns it?" "I can't find documentation for anything!" engineers can quickly look for information about the infrastructure at a centralized place via Backstage.

Every team can see all the services they own and related resources (deployments, data pipelines, pull request status, libraries, frameworks, ML models, all the dependencies etc.)

The platform offers a consistent experience acting as a frontend for our infrastructure that ties all our infrastructure tooling, resources, standards, owners, contributors, and administrators together in one place.

A couple of ways Spotify leverages the product:

With Backstage, teams at Spotify define standard templates for their services, which enables them create new services with a few clicks adhering to the best practices that existing services follow. 

After inputting metadata about the service, a new repository is created with a "hello world" service that automatically builds and deploys in production on Kubernetes. With the ownership of the service provided in the metadata, organization-wide teams can view on the dashboard the owners of the spawned service. 

Spotify mobile app is developed by many different teams and the codebase is divided up into different features, each owned and maintained by a separate team. If an app developer on one team wants to understand how their feature affects overall app performance, including a look at crashes, releases, test coverage over time and more information, they do it via Backstage.

[GitHub URL ](https://github.com/backstage/backstage)
For more information, [check out this resource](https://engineering.atspotify.com/2020/03/what-the-heck-is-backstage-anyway/).
What's the Right Approach to on Demand Laundry App Development?
Published: 2022-12-21 06:15:18


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8pcwaooco74gh7dxrd9j.png)
Would you want to show up to a crucial business meeting in dirty clothes? Or are you going to a party wearing offensive attire? It's horrifying just to think about these scenarios. Clean clothes are a need for everyone today! 


With the introduction of on-demand apps, the laundry business is generating great revenue these days. We can say that **[laundry app development](https://www.apptunix.com/solutions/laundry-app-development/)** has revolutionized the industry today and had a significant impact on businesses as well. Booking a laundry service on your smartphone is easy while monitoring the customer's order and receiving delivery at your doorway. All day long, people are working and participating in other activities. It's a great initiative to start your business and participate in the development of laundry apps!
ReactJS vs VueJS vs AngularJS
Tags: react, vue, angular, javascript
Published: 2022-12-21 07:38:24

## Usage
ReactJS, VueJS, and AngularJS are all popular JavaScript libraries used for building web applications.

## ReactJS
ReactJS is a library that focuses on the declarative approach to building user interfaces. It allows developers to build reusable UI components and efficiently update the UI when data changes. React is used by companies such as Facebook, Netflix, and Airbnb.

## VueJS
VueJS is a lightweight, easy-to-learn library that focuses on simplicity and performance. It has a reactive data model and a template-based syntax, making it easy to build interactive, modern web applications. Vue is used by companies such as Alibaba, Grammarly, and GitLab.

## AngularJS
AngularJS is a comprehensive framework that provides a full set of features for building web applications. It has a powerful dependency injection system, a reactive data model, and a template-based syntax. Angular is used by companies such as Google, Nike, and Weather.com.

## Conclusion 
Overall, each library has its own strengths and is suitable for different types of projects. It's important to consider the specific needs and requirements of a project when deciding which library to use.
Payment Splitter Smart Contract Module in Bunzz
Tags: webdev, programming, web3
Published: 2022-12-21 07:36:48

We are excited to announce our new Payment Splitter Module available in Bunzz and created by Alex Wang.

This contract allows splitting Ether payments among a group of accounts. The sender does not need to be aware that the Ether will be split in this way, since it is handled transparently by the contract. The split can be in equal parts or in any other arbitrary proportion.

This Module connects with other contracts and is used for sharing accumulated tokens on the contract with shared accounts.

The number of shared accounts is limited up to 10 and can be used for sharing revenues with a limited number of accounts. (NFT Mint, Launch Token, etc)

You can access this Module and the code [here](https://bit.ly/3j7AJWQ).
 
 

## How to use

- Add a payee with a share point on the contract
- Connect with other contracts which accumulate tokens (both ERC20 and native token) itself.
- Release tokens to payees based on their shares.
- Contract owner can update the shares of payees, and disable the payee to prevent further payments (Of course, they can enable the payee again if needed)

In most cases, the contract accumulates tokens itself and then releases them to payees. Example:

- Token Launch contract is getting a fee from the transaction (sell, buy, transfer, etc)
- DEFI contract is getting the fee from the user's deposit and stake.
- NFT Mint contract has some minting price and the contract is getting tokens from the minting transaction.
- NFT Marketplace contract is getting a fee from the trades (sell, buy, transfer, etc)


For the above cases, the contracts need to have functions to withdraw the accumulated tokens or release them to payees with shares.

By using the PaymentSplitter module, the above contracts don't need to have those functions, just connect them with the PaymentSplitter Module and add payees with shares and release it to the payees.

## Functions

**#WRITE**

- updatePayeeStatus
- withdrawEth
- withdrawERC20
- updatePayeeShares
- transferOwnership
- removePayee
- renounceOwnership
- setMaxPayeeCounter
- releaseEth
- releaseERC20
- addPayee

**READ**

- totalShares
- totalEthWithdrawn
- totalERC20Withdrawn
- totalEthReleased
- shares
- totalERC20Released
- releasableERC20
- payeeCount
- releasableEth
- listOfPayees
- isPayee
- isEnabled
- ethReleased
- owner
- maxPayeeCounter
- erc20Released


You can access this Module and the code [here](https://bit.ly/3j7AJWQ).

If you still haven’t signed up to Bunzz, what are you waiting for? Sign up [here](https://app.bunzz.dev/signup) and get your smart contracts deployed in 5 minutes through our great GUI.
Jobs search site | Find free job posting website online in India
Tags: job, vacancy, free
Published: 2022-12-21 07:23:48

Jobsbloc is India's first free job platform. Find the latest jobs in your city, search by company or industry and apply for a new career today[]
[](Https://jobsbloc.com/


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z0gtsy4fu96tizq2lafc.png)
Awesome animation effect for any SVGs with a surprisingly simple trick
Tags: webdev, css, beginners, javascript
Published: 2022-12-21 07:21:56

In this short tutorial, I'll demonstrate how to animate the paths of any SVG similar to the animation shown in this gif (the animation is slowed down in the gif :/ ).

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1671602366790/ex4zkSaMu.gif)

There are a few ways to create SVGs and by the end of this tutorial, you'll get the idea of how to apply this effect to other variants too to create nice effects with just a few lines of code.

> Before we move on, remember you can implement your websites or landing pages **with** or **without** coding on [DoTenX](https://dotenx.com) for **free**. Make sure to check it out and even nominate your work to be showcased.*DoTenX is* ***open-source*** *and you can find the repository here:* [*github.com/dotenx/dotenx*](http://github.com/dotenx/dotenx)*.*

* * *

We start by creating add our SVG element to the page:

```xml
<svg width="200px" height="200px" viewBox="0 0 60 60" preserveAspectRatio="xMidYMid meet" stroke="gray" stroke-width="1" class="svgAnimate">
	<path fill="none" d="M20,0 L20,20" />
	<path fill="none" d="M20,20 L40,20" />
	<path fill="none" d="M40,20 a20,20 0 0,1 -20,20" />
	<path fill="none" d="M20,40 a20,20 0 0,1 -20,-20" />
	<path fill="none" d="M0,20 a20,20 0 0,1 20,-20" />
</svg>
```

This is a simple SVG element with a 200px width and 200px height.

The minimum x-coordinate, y-coordinate, width, and height are represented by the numbers in the `viewBox` property, which determines how the SVG's contents should be resized to fit inside the specified dimensions.

Also, the value "xMidYMid meet" denotes that the SVG will be centred and resized to suit the specified dimensions while keeping its aspect ratio.

Now we need the following styles and animation:

```css
.path {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: progress 2s linear forwards;
}

@keyframes progress {
	to {
    stroke-dashoffset: 0;
  }
}
```

The `stroke-dasharray` attribute specifies the arrangement of dashes and gaps used to draw the shape's outline.

The `stroke-dashoffset` attribute defines an offset on the related dash `stroke-dasharray's` rendering.

We have created a simple animation named **progress** with a single keyframe that simply removes the gap created in the `stroke-dasharray` due to the `stroke-dashoffset`.

> Try yourself: What does happen if we just apply the class path to all the `path` children of the `svg`?

In order to execute the animations one after another we use this javascript code:

```javascript
const el = document.querySelector(".svgAnimate");

for (let i = 0; i < el.children.length; i++) {
  el.children[i].style.animationDelay = `${i * 0.25}s`
  el.children[i].classList.add('path')
}
```

In this simple code, we just find the svg element and add a delay to each `path` element based on its order in the list of children. This is different from setting a constant animation delay for all the elements.
How Much Do Prescription Eyewear Cost
Tags: optical, canada, ontario, kitchener
Published: 2022-12-21 07:15:28

If you looking [Prescription Eyewear](https://optical-store-in-kitchener.tumblr.com/post/704230131359744000/how-much-do-prescription-eyewear-or-sunglasses) Store in Kitchener it will cost between 50 cad to 100 cad.
Optical House at Kitchener has range of design and framed for eyewear.
Advantages of Azure Powershell over Azure CLI
Tags: azure, azurecli, powershell, infrastructureascode
Published: 2022-12-21 07:13:02

Azure PowerShell and Azure CLI are both powerful tools that can be used to manage resources in the Azure cloud platform. While both tools have their own unique advantages, Azure PowerShell has several key benefits that make it a popular choice among Azure administrators.

One of the main advantages of Azure PowerShell is its ability to provide deep integration with the Azure platform. Azure PowerShell includes a wide range of cmdlets (command-line functions) that can be used to perform almost any task in Azure. This includes everything from creating and managing virtual machines to configuring networking and security.

Another advantage of Azure PowerShell is its support for automation. Azure administrators can use Azure PowerShell to write scripts that automate complex tasks, which can save time and reduce the risk of errors. Azure PowerShell scripts can also be run on a schedule, making it easy to automate routine maintenance tasks.

In addition to automation, Azure PowerShell also offers advanced features such as the ability to work with Azure Resource Manager templates. These templates allow administrators to define and deploy complex Azure environments using a simple JSON-based syntax. This can be particularly useful for organizations that need to deploy and manage multiple Azure resources in a consistent and repeatable way.

Finally, Azure PowerShell has a large and active community of users, which means there is a wealth of documentation, examples, and support available online. This can make it easier for administrators to learn and use Azure PowerShell, and to get help when they run into issues.

While Azure CLI is also a useful tool for managing Azure resources, it does not offer the same level of integration or advanced features as Azure PowerShell. For these reasons, many Azure administrators prefer to use Azure PowerShell for their day-to-day management tasks.

In conclusion, Azure PowerShell is a powerful and versatile tool that offers many advantages for managing Azure resources. Its deep integration with the Azure platform, support for automation, and advanced features make it a popular choice among Azure administrators.
What is Micro Frontend?
Published: 2022-12-21 07:09:03

A micro frontend is a software architecture pattern that involves breaking a large, monolithic frontend application into smaller, independent units that can be developed and deployed independently. Each unit is called a "micro frontend," and represents a specific part or feature of the overall frontend application.

There are several benefits to using a micro frontend architecture:

**1. Improved scalability**: By dividing the frontend into smaller, independent units, it is easier to scale specific features or parts of the application as needed, without affecting the entire frontend.
**2. Enhanced modularity**: A micro frontend architecture allows for greater modularity, since each micro frontend is self-contained and can be developed and tested independently.
**3. Improved team collaboration**: With a micro frontend architecture, different teams can work on different micro frontends concurrently, without affecting each other's work.
**4. Better maintainability**: Micro frontends are easier to maintain and update, since each one represents a smaller, more focused piece of functionality.

However, there are also some potential disadvantages to using a micro frontend architecture:

**1. Increased complexity**: Implementing a micro frontend architecture can add complexity to the frontend, as it requires additional infrastructure and coordination between the different micro frontends.
**2. Performance issues**: Depending on the implementation, a micro frontend architecture may result in slower page load times, due to the need to load and initialize multiple micro frontends.
**3. Difficulty integrating micro frontends**: It can be challenging to integrate the different micro frontends into a cohesive whole, especially if they are developed by different teams with different approaches and technologies.

Whether it is worth implementing a micro frontend architecture will depend on the specific needs and goals of your project. If you are working on a large, complex frontend application with many features, a micro frontend architecture may be a good option to consider. However, if your frontend is relatively simple or has few features, a monolithic architecture may be sufficient.

It is important to carefully weigh the pros and cons of a micro frontend architecture before deciding whether to implement it in your project.
SPVM 0.9669 is released
Tags: perl, spvm, programming, beginners
Published: 2022-12-21 07:07:35

<a href="https://metacpan.org/pod/SPVM">SPVM</a> 0.9669 is released.

## New Features and Enhancement

<a href="https://github.com/yuki-kimoto/SPVM/blob/master/Changes">Changes</a>

```
0.9669 2022-12-21
  [Incompatible Changes]
    * Renamed the create_precompile_source Precompile Native API to build_class_source.
  [New Features]
    * Added the build_method_source Precompile Native API.
      
      void (*build_method_source)(void* precompile, void* string_buffer, const char* class_name, const char* method_name);
      
      This generates the source for JIT compile.
    * Added the get_method_id Native API.
    
      int32_t (*get_method_id)(SPVM_ENV* env, SPVM_VALUE* stack, const char* class_name, const char* method_name);
  [Performance Improvement]
    * Improve the performance of the method call, field access, class variable access, basic type access, class access in precompiled source
      because the ids are cached at the beginning of the precompiled function.
```

## For Programming Beginners

### What Is SPVM?

SPVM is a static typed programming language that can be installed from Perl/CPAN.

### How potential dose SPVM have?

Growth is expected in the fields of Bio Tech, AI/ML, Apple/iPhone/iPad Apps, Google/Android Apps, IoT Device, Connected Car, Smart Device, Smart Home, etc.

This is because SPVM can produce an executable file that supports cross platforms and make easy to calculate arrays and bind C/C++