teleren/devto huggingface dataset:
Why I would use AppWrite over Firebase?
Published: 2023-01-09 11:40:56

When it comes to choosing a backend solution for your web, mobile, or server-side application, there are many options to consider. Two popular platforms in this space are Appwrite and Firebase, but which one is the right fit for your project?

First, let's take a look at what each platform offers. Appwrite is an open-source backend-as-a-service (BaaS) platform that provides a comprehensive set of services and APIs for building and managing applications. It includes features such as user authentication, database management, file storage, and serverless functions, which can be accessed via RESTful APIs or through client libraries for various programming languages.

Firebase, on the other hand, is a real-time database and messaging platform that was acquired by Google in 2014. It provides a variety of tools and services for building and scaling real-time applications, including a NoSQL document database, messaging and notifications, and analytics.

So, which platform is the best choice for your project? Here are a few factors to consider:

Open-source vs. proprietary: As an open-source platform, Appwrite allows developers to access and modify the source code, and to contribute to the project if they wish. This can be a major advantage for developers who want more control over their backend solution and the ability to customize it to their specific needs. Firebase, on the other hand, is a proprietary platform owned by Google.

Range of features: While Firebase is primarily focused on real-time databases and messaging, Appwrite offers a wider range of features for building and managing web, mobile, and server-side applications. This includes user authentication, file storage, serverless functions, and more.

Pricing model: Appwrite offers a free tier with generous usage limits, as well as paid plans that scale with usage. This can make it a more cost-effective option for developers who don't need all of the features and services provided by Firebase.

Developer community: With a growing user base and active community of developers, Appwrite offers a wealth of resources and support for those using the platform. This can be especially beneficial for developers who are new to the platform or who need help troubleshooting issues.

Ultimately, the decision of which platform to use will depend on the specific needs and goals of your project. Both Appwrite and Firebase have their strengths and can be effective solutions in the right context. If you're still unsure which one is the best fit for your project, it can be helpful to try out both platforms and see which one works best for you.
CSS Loading Animation - 1
Tags: html, css, webdev, tutorial
Published: 2023-01-09 11:39:54

Hello everyone, in this tutorial, I'll show you how to use HTML and SASS to make a circular loading animation (You can compile the CSS from SASS in Codepen).

Let's get started...

# What We are going to create?
{% codepen https://codepen.io/shubhamtiwari909/pen/yLqVpyd %}

# HTML - 
```html
<div class="outer__circle">
  <div class="inner__circle__one">
    <div class="inner__circle__two">
     <div class="inner__circle__three"></div>
    </div>
  </div>
</div>
```
* I have created 4 circle one inside the other.

# CSS -
```css
body{
  height:100vh;
  display:grid;
  place-items:center;
  background-color:rgb(0,0,0,1);
}

.outer__circle,
.inner__circle__one,
.inner__circle__two,
.inner__circle__three{
  display:grid;
  place-items:center;
  border-radius:50%;
}
```
* Setting up the body's styling to position the loader in the middle; applying the grid and place-items properties to each of the four circles so that they are all centered inside the outer circle. border-radius to give them a circular appearance.

```css
@mixin circle($width:100%,$height:100%,$borderDirection:border,$borderColor:black,$animationTime:1s){
   width:$width;
  height:$height;
  #{$borderDirection}:3px solid $borderColor;
   animation:rotation 2s linear infinite forwards;
}

// Animation mixin
@mixin animation($animationName){
  @keyframes #{$animationName}{
    @content
  }
}
```
* Created a mixin with the circle's width, height, border side, and border color attributes. Every circle now has an animation due to the animation that was added to the mixin.
* Another mixin named animation was created, and by using "@content," any animation for the keyframe can be defined.
* The parameter animationName is another one it has.

```css
.outer__circle{
  @include circle(80px,80px,border-top,crimson);
}
.inner__circle__one{
  @include circle(70px,70px,border-bottom,lime);
}
.inner__circle__two{
  @include circle(60px,60px,border-right,cyan);
}
.inner__circle__three{
  @include circle(50px,50px,border-left,violet);
}
```

* Setting the styles for the circles by Including the mixin using "@include". 
* Each circle will have different styling using the parameters values passed.

```css
@include animation(rotation){
  from{
    transform:rotate(0deg)
  }
  to{
    transform:rotate(360deg)
  }
}
```
* Using the animation mixin to define our animation body, It will create an infinite rotation effect.

THANK YOU FOR CHECKING THIS POST
You can contact me on -
Instagram - https://www.instagram.com/supremacism__shubh/
LinkedIn - https://www.linkedin.com/in/shubham-tiwari-b7544b193/
Email - shubhmtiwri00@gmail.com

^^You can help me by some donation at the link below Thank you👇👇 ^^
☕ --> https://www.buymeacoffee.com/waaduheck <--

Also check these posts as well
https://dev.to/shubhamtiwari909/css-iswherehas-and-not-2afd

https://dev.to/shubhamtiwari909/theme-changer-with-html-and-css-only-4144

https://dev.to/shubhamtiwari909/swiperjs-3802

https://dev.to/shubhamtiwari909/going-deep-in-array-sort-js-2n90
Python Developer's Guide.
Tags: python, beginners, programming
Published: 2023-01-09 11:37:17

Here are some steps you can take to become a **Python developer**:

- **Learn the basics of Python:** If you are new to Python, it is important to learn the basics of the language. You can start by reading the official Python documentation, taking online tutorials, or working through a Python textbook.

- **Practice writing code:** The best way to improve your skills as a Python developer is to practice writing code. You can start by working on small projects or exercises to get a feel for the language.

- **Learn about object-oriented programming:** Python is an object-oriented programming language, so it is important to understand the concepts of classes, objects, and inheritance.

- **Familiarize yourself with Python libraries and frameworks:** Python has a large number of libraries and frameworks that can be used for a wide range of purposes. It is helpful to become familiar with some of the most popular ones, such as Django, Flask, NumPy and FastApi.

- **Work on larger projects:** As you become more comfortable with Python, you can start working on larger projects to gain more experience and build up your portfolio.

- **Get involved in the Python community:** The Python community is large and active, and there are many resources available online to help you learn and improve your skills. You can join online forums, attend Python meetups or conferences, and contribute to open source projects to learn from other Python developers.

By following these steps and continuing to learn and practice, you can become a proficient Python developer.

Thanks😊
Setting up OpenSSH in Windows Terminal
Published: 2023-01-09 11:18:35

OpenSSH is a free and open-source tool for securely connecting to remote servers. It is commonly used for remote command-line and remote command execution, but it can also be used to transfer files. In this tutorial, we will show you how to set up OpenSSH in Windows Terminal.

## Prerequisites
Before you begin, make sure you have the following:

- A computer running Windows

- An internet connection

## Step 1: Download the OpenSSH files
Go to the official OpenSSH website and download the latest release of the OpenSSH files. Save the downloaded file to a convenient location on your computer.

## Step 2: Extract the files
Extract the downloaded files to a folder on your computer, such as "C:\OpenSSH".

## Step 3: Install the OpenSSH service
Open a new terminal window and navigate to the OpenSSH folder you just created. Then, run the following command to install the OpenSSH service

```
install-sshd.bat
```

## Step 4: Start the OpenSSH service
Start the OpenSSH service by running the following command:

```
net start sshd
```
## Step 5: Add the OpenSSH folder to the system path
To be able to use the OpenSSH client from any location, you will need to add the OpenSSH folder to the system path. To do this, run the following command:

```
setx PATH "%PATH%;C:\OpenSSH"
```

## Step 6: Generate an RSA key pair
Run the following command to generate an RSA key pair for secure communication:

```
ssh-keygen -t rsa -b 4096
```
Follow the prompts to choose a location for the key pair and set a passphrase.

## Step 7: Add your RSA key to the ssh-agent
Run the following command to add your RSA key to the ssh-agent:

```
ssh-add ~/.ssh/id_rsa
```

## Step 8: Connect to a remote server
You can now use the OpenSSH client to connect to remote servers. For example, you can use the following command to connect to a server with the hostname "example.com" using the default port (22):

```
ssh username@example.com
```
That's it! You have successfully set up OpenSSH in Windows Terminal. You can now use the ssh client to securely connect to remote servers from your Windows machine.
5 Best Practices for Coding: Tips for Writing Clean, Efficient, and Maintainable Code
Tags: webdev, beginners, programming, discuss
Published: 2023-01-09 11:17:38

As a coder, it's important to constantly strive for excellence in your craft. Not only does writing high-quality code make it easier for you to work on projects, it also makes it easier for other developers to understand and maintain your code in the future.

Here are 5 best practices that can help you write clean, efficient, and maintainable code:

**1. Follow coding standards.**
Consistency is key when it comes to coding. Use a style guide and stick to it to make your code easier to read and understand. This can include things like using consistent indentation, naming conventions, and formatting. By following a set of coding standards, you can improve the overall readability and maintainability of your code.


**2. Write readable code.**
Code that is easy to read and understand is crucial for maintaining and improving a project over time. Use clear, descriptive variable names and add comments to explain your thought process. Consider the readability of your code from the perspective of someone who is unfamiliar with the project.


**3. Refactor your code.** 
As you continue to work on a project, it's important to periodically review and refactor your code to ensure it is as efficient and maintainable as possible. This can involve things like removing unnecessary code, simplifying complex logic, and improving the overall structure of the codebase. Refactoring can help to improve the performance and reliability of your code and make it easier for other developers to understand and work with.


**4. Use version control.** 
Version control systems like Git allow you to track changes to your code and collaborate with other developers. They also make it easy to revert back to previous versions if you need to. Using version control is especially important when working on large projects with multiple people, as it helps to prevent conflicts and makes it easier to track the history of the project.


**5. Test your code.**
Thoroughly testing your code is essential to ensure that it works as expected and doesn't contain any bugs. This can be done manually or through the use of automated testing tools. Testing helps to catch issues early on and can save time and effort in the long run.

By following these best practices, you can improve the quality of your code and make it easier for others to work with. Happy coding!
What is database transaction?
Tags: database, databasetransaction, databaseengineering, sql
Published: 2023-01-09 11:16:43

Database transaction is a set of queries treated as one unit of work.

**Transaction Lifespan:**
A transaction begins with BEGIN keyword. It says to the database that you are about to start a new transaction with multiple queries. Then you can write queries (1,2,… whatever you need), and when each query executes successfully and you are satisfied you should commit it by using the COMMIT keyword. This commit tells the database that the changes I have done during the whole lifespan of the transaction, persist these things in the disk.
But things can necessarily go wrong. Maybe one of your queries is not executed properly or you are not satisfied, then you should forget about all the changes you have done before this query during the transaction lifetime. The ROLLBACK helps to undo or roll back all changes.

**Two types of database transactions:**
**Explicit Transaction:** You should define the transaction boundary explicitly with BEGIN keyword, and COMMIT after execution. ROLLBACK for unsatisfied cases.

```
BEGIN tx1
Query1….
Query2….
……
COMMIT tx1
Or
ROLLBACK tx1 (if something is wrong)
```

**Implicit Transaction:** The implicit transaction begins before the statement is executed and ends (commit or rollback) after the statement is executed.

```
// one transaction
BEGIN tx1
Query1….
COMMIT tx1
ROLLBACK tx1 (if something is wrong)

//another transaction
BEGIN tx2
Query1….
COMMIT tx2
ROLLBACK tx2 (if something is wrong)
```

If you run queries without explicitly transaction boundary every time an implicit transaction wraps around every individual statement to save the changes to DB. For example, Alice wants to send $100 to Bob, and your first query deducted $100 from Alice's account successfully, but something went wrong when you tried to credit/update it in Bob's account. In this scenario, $100 is lost in space (maybe it can handle it in a tricky way), and you should again undo all queries that executed successfully. But with an explicit transaction, until your queries execute successfully and the execution of COMMIT, it won't save in DB. If get something wrong in the query execution, ROLLBACK will undo everything by itself. There is no need to consider which one has changed or not.

A transaction could change data, or it could be read-only as well.
Comparing Spark and MapReduce: The Pros and Cons of Two Popular Big Data Processing Frameworks on the Hadoop Ecosystem
Tags: datascience, database, beginners, programming
Published: 2023-01-09 11:10:52

Spark and MapReduce are both popular big data processing frameworks that run on the Hadoop ecosystem. Both have their own unique features and benefits, and choosing the right one depends on the specific requirements of a project.

Spark is a more modern and flexible big data processing framework that offers a wide range of data processing capabilities including batch processing, stream processing, machine learning, and graph processing. It is designed to be faster than MapReduce and can process data in-memory, making it suitable for real-time data processing and analysis.

MapReduce, on the other hand, is a more traditional big data processing framework that is designed to handle large volumes of data in a distributed manner. It works by dividing a large dataset into smaller chunks and processing them in parallel across a cluster of machines. MapReduce is suitable for batch processing of large datasets and is primarily used for offline data processing and analysis.

One of the key differences between Spark and MapReduce is the programming model. Spark uses a more intuitive and interactive programming model known as the Resilient Distributed Dataset (RDD) that allows developers to process data in a more interactive and flexible manner. MapReduce, on the other hand, uses a more rigid and sequential programming model that requires developers to write complex map and reduce functions to process data.

Another key difference is the level of complexity involved in setting up and managing a Spark or MapReduce cluster. Spark requires less configuration and is easier to set up and manage, making it more suitable for small and medium-sized organizations. MapReduce, on the other hand, requires more configuration and is more complex to set up and manage, making it more suitable for large organizations with more complex big data processing requirements.

In terms of performance, Spark is generally faster than MapReduce as it is designed to process data in-memory and has a more efficient programming model. However, MapReduce can still be a good choice for certain types of data processing tasks, particularly those that require high levels of fault tolerance and scalability.

In conclusion, Spark and MapReduce are both powerful big data processing frameworks that run on the Hadoop ecosystem. Spark is a more modern and flexible framework that is suitable for real-time data processing and analysis, while MapReduce is a more traditional framework that is suitable for batch processing of large datasets. Ultimately, the choice between Spark and MapReduce depends on the specific requirements of a project and the resources and expertise available to the organization.
What is domain whois and how does it work ?
Tags: domain
Published: 2023-01-09 11:07:22

Whois is a protocol that is used to query databases that store the registered users or assignees of an Internet resource, such as a domain name, an IP address block, or an autonomous system. The whois protocol is documented in RFC 3912.

When you register a domain name, you are required to provide your personal contact information, such as your name, address, phone number, and email address. This information is then stored in a whois database, along with the date that the domain was registered and the expiration date.

To perform a [pk whois lookup](https://domainsearch.pk/whois), you can use a variety of online tools or run a command from the command line. For example, to look up the whois information for the domain example.com, you can use the following command:

whois example.com
This will return the whois record for the domain, which should include the registrant's name, contact information, and the dates of registration and expiration.

There are also privacy services available that allow you to register a domain using a proxy service, which will then forward any communication intended for the domain owner to your real contact information. This can be useful if you want to keep your personal information private, but it also means that it may be more difficult to contact the actual owner of a domain if you need to.
Here are some tips and best practices for optimizing your Javascript code
Tags: javascript, beginners, programming, tutorial
Published: 2023-01-09 11:05:10

Here are some tips and best practices for optimizing your Javascript code:

1. Use efficient data structures and algorithms - Choose data structures and algorithms that are optimized for the specific task you are trying to accomplish. For example, use hash maps instead of arrays for fast key-value lookups.

2. Minimize the number of function calls - Function calls can be expensive, especially when they involve crossing the boundaries of a language runtime or executing external code. Try to minimize the number of function calls by using inlining and memoization techniques.

3. Avoid using global variables - Global variables are slow and can lead to naming conflicts and difficult-to-debug code. Instead, use local variables and pass data as function arguments when needed.

4. Use the right looping constructs - For large data sets, use the right looping constructs, such as for-of or for-in loops, to improve performance.

5. Use lazy loading and pagination - Lazy loading and pagination can help improve performance by only loading the data that is needed at a given time.

6. Use minification and compression - Minification and compression can help reduce the size of your code, which can lead to faster loading times and improved performance.

7. Use a performance profiler - Use a performance profiler to identify and fix bottlenecks in your code. This can help you identify areas of your code that are slow and need optimization.
Blogging with Next.js and MDX: The ultimate combination for dynamic content
Tags: nextjs, javascript, react, webdev
Published: 2023-01-09 11:02:48


## Introduction

Are you a developer looking to create a blog or personal website that is both easy to maintain and visually appealing? Look no further than using <a href="https://nextjs.org/">Next.js</a> and <a href="https://mdxjs.com/">MDX</a>!

<code>Next.js</code> is a popular framework for building server-rendered React applications and in the past year my personal favorite framework which I really love to use. It offers automatic code splitting, optimized performance, and a simple setup process. On the other hand, MDX is a format that allows you to write JSX in Markdown documents. This means you can include React components within your Markdown content, making it easy to create dynamic and interactive blog posts.

But what makes Next.js and MDX the perfect combination for a blog?
  
## Easy customization

With Next.js, you have complete control over the design of your site. It uses <a href="https://styled-components.com/">Styled Components</a> for styling, which allows you to write actual CSS code within your JavaScript files. This means you can easily customize the appearance of your blog without having to navigate between multiple files.

Additionally, MDX allows you to import and use React components within your Markdown content. This means you can create custom blocks or components to include in your posts, such as code blocks, file uploads, or even interactive elements like charts or maps.

## SEO benefits

Server-rendered apps, like those built with Next.js, have an advantage when it comes to search engine optimization (SEO). Since the HTML for the page is generated on the server, search engines are able to easily index the content. This is especially important for a blog, where it is crucial for your articles to be easily discoverable.

## Speed and performance

Next.js automatically code splits your application, meaning that it only sends the JavaScript necessary for the current page to the browser. This results in faster page load times and a better user experience.

## In summary

Using Next.js and MDX for your blog allows for easy customization, improved SEO, and fast performance. Give it a try and see how it can take your blogging to the next level!