teleren/devto huggingface dataset:
Quantum computing -The future of Computing
Published: 2022-05-12 19:26:20

_“Computer Science is no more about computers than astronomy is about telescopes.”_
_**— Edsger W. Dijkstra**_


Computer science is one of the pillars which is holding the base of humankind now and a mind boggling fact is that it came less than 100 years ago unlike fire and wheel which came 2 million years ago.  
It means we still have many things to find , make and modify in this field which make it a vast field on its own. One of its futuristic aspects is Quantum Computing.

**But what is Quantum Computing ?**
In simple words Quantum Computing is based on a phenomenon called Quantum mechanics which humans don’t understand completely ,and  is capable of doing wonders to the extent we can’t imagine . Quantum computing uses  quantum mechanics to deliver a massive jump in computation to solve certain problems. 

**Why do we need Quantum Computers?**
To solve some big difficult problems Supercomputers are not able to solve. Until now, we’ve relied on supercomputers to solve most problems. These are very large classical computers, having thousands of cores of CPU and GPU. However Supercomputers also have some limitations in their computing. This is why we need quantum computers.

**Why are they faster ?**
In normal computers we have only 0 and 1 in which we store the data but in Quantum computers we have and an extra bit called Qubits Quantum computers can create vast multidimensional spaces in which to represent these very large problems. Classical supercomputers cannot do this.
Algorithms that employ quantum wave interference are then used to find solutions in this space, and translate them back into forms we can use and understand.

**How quantum computers work?**
You don't have to know how quantum computers work to use them . What we can know is that bits are used in a classical computer, at the heart of the quantum computer are quantum bits or qubits which can store information in quantum form. A qubit (or quantum bit) is the quantum mechanical analogue of a classical bit. In classical computing the information is encoded in bits, where each bit can have the value zero or one. In quantum computing the information is encoded in qubits.
[Fake News or Real News Detection Model]
Tags: appwritehack, codenewbie, machinelearning
Published: 2022-05-12 19:16:23


### **Overview of My Submission**
To combat the spread of fake news, it’s critical to determine the information’s legitimacy, which this Data Science project can help with.This is the MachineLearning Model which detects whether the news is fake or real.


### **Submission Category:** 

**Web2 Wizards
**
### **Link to Code**

Repo Link- https://github.com/a593/Fake-News-Detection

****Features**
**
1. Helps to detect whether the news is fake or real .
2. Accuracy of my model is really is very nice.

**Tech-Stack**

- Numpy
- Pandas
- LogisticRegression
- tfid-vectorizer





### **Additional Resources** / Info

Screenshots-

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wdr6hm5cx7zvshogkgvt.png)
Developers Contest Now Open!
Tags: appdev, developer
Published: 2022-05-12 19:08:57



Are you a developer working in Healthcare or FinTech? Want to compete for $22,000 in prizes? InterSystems Data Platform technology is used to support over 1 billion patients and billions of financial transactions each day. Join our developer community and sign up for the [InterSystems Grand Prix Contest](https://community.intersystems.com/post/intersystems-grand-prix-programming-contest-2022?utm_source=devcom&utm_medium=native&utm_campaign=na_ir_granprix&utm_content=sd)
How to automatically generate Yup schemas from your Prisma schema
Published: 2022-05-12 19:07:27

Here's what you need to do:

1- Install the generator 

- Using npm 

```bash
 npm install prisma-yup-generator
```

- Using yarn:

```bash
 yarn add prisma-yup-generator
```

2-  Add the generator to your Prisma schema

```prisma
generator yup {
  provider = "prisma-yup-generator"
}
```

3- Run `npx prisma generate` for your schema(or the example below)

```prisma
model User {
  id    Int     @id @default(autoincrement())
  email String  @unique
  name  String?
  posts Post[]
}

model Post {
  id        Int      @id @default(autoincrement())
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
  title     String
  content   String?
  published Boolean  @default(false)
  viewCount Int      @default(0)
  author    User?    @relation(fields: [authorId], references: [id])
  authorId  Int?
}
```

Now you will have all possible Yup schemas generated for you!

![Yup Schemas](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jdub7ckdzj5oygxz3m7n.png)
OpenBB is pleased to announce the release of v1.3.0 which introduces new features and fixes! Available now to download!
Tags: news, python, opensource, github
Published: 2022-05-12 18:53:41

[OpenBB Terminal v1.3.0 release](https://github.com/OpenBB-finance/OpenBBTerminal/releases/tag/v1.3.0)

What has changed?

```
A big thank you and welcome to our new contributors:
@josephjacks
🚀❤️‍❤️‍❤️‍🚀

2022-05-12 - OpenBB Terminal blended signature (#1806) by @DidierRLopes
2022-05-12 - Reports and Dashboards to be one level above (#1805) by @DidierRLopes
2022-05-12 - fix 1756 (#1801) by @jose-donato
2022-05-12 - Improve overall UX (#1804) by @DidierRLopes
2022-05-11 - fix 1793; bring stocks ta to crypto (#1802) by @jose-donato
2022-05-12 - Fix regression bug introduced by #1709 regarding support command (#1803) by @DidierRLopes
2022-05-12 - Fixes 1636 - hugo docs showing white bg (#1800) by @jose-donato
2022-05-12 - Add /crypto/ta/kc implementation (#1799) by @alexferrari88
2022-05-11 - Trading hours stock feature (#1697) by @buahaha
2022-05-11 - improve error keys for reddit and twitter error (#1797) by @DidierRLopes
2022-05-11 - Fix crypto loading for Binance #1794 (#1795) by @alexferrari88
2022-05-11 - change view_vwap to specify date range (#1790) by @PzaThief
2022-05-10 - Update README - Very minor grammatical typos (#1792) by @josephjacks 🚀
2022-05-10 - Refactored Crypto Tests (#1743) by @colin99d
2022-05-11 - Add terminal-wide report command (#1709) by @minhhoang1023


We're proud of our community contributors and staunch supporters of open-source ecosystems.
Help us promote our community by tagging `@openbb_finance` on Twitter with a link to your pull request, and join our Discord server to chat about your contribution! We want to hear about your experience!
```

Visit our official webpage where you can find developer jobs OpenBB is actively hiring for: [https://openbb.co](https://openbb.co)
Heroku Deployment & WSL
Published: 2022-05-12 18:52:00

I've been struggling for a bit to deploy my react app to Heroku using WSL terminal and I'd like to share the steps if someone needs them: 
1- Run --> `curl https://cli-assets.heroku.com/install.sh | sh`
2- To verify your CLI installation run --> `heroku --version`

ON THE BROWSER GO TO YOUR APP TEHN TO '**DEPLOY**' TO FOLLOW THE STEPS THERE IF YOU NEED TO CLONE THE REPO OR IF ALREADY YOU HAVE YOUR CODE AND IT'S UP TODATE YOU CAN FOLLOW THESE STEPS:

- Run --> `heroku login`
- Press on any key on the keyboard then follow the link to login to 
  Heroku on the browser 
- `heroku git:remote -a (you app name) `
- `git push heroku main`
QR Code Generator Android App
Tags: appwritehack, android, kotlin, showdev
Published: 2022-05-12 18:49:11

[Instructions]: # (To submit to the Appwrite Hackathon on DEV, please fill out all sections.)


### Overview of My Submission
An Android app to generate QR codes using the text provided using Appwrite QR code API accessed via Appwrite's Android SDK.

### Submission Category: 

Mobile Moguls


### Link to Code

{% embed https://github.com/Devansh-Maurya/QR-Code-Generator %}


### Additional Resources / Info

The backend is hosted with the help of [Gitpod](https://gitpod.io/#https://github.com/appwrite/integration-for-gitpod) and is accessed in the app using Appwrite's Android SDK.

#### Screenshots

| Text input screen | Generated QR Code screen|
| ------------- | -----:|
| ![Text input screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5rnb9ntfd9kp9jzl9jp9.png)      | ![Generated QR Code screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jxijciam6kx1u10em47o.png) |

#### Screen Recording
{% embed https://www.youtube.com/watch?v=HCrOhYZP9iQ %}
PROGRAMMING - A SEED OF CREATION
Tags: programming, logic, beginners
Published: 2022-05-12 18:31:51

_' I think everybody in the country should learn how to program a computer ,should learn a computer language , because it teaches you how to think.’_
**_- Steve Jobs_**

**Fun Fact** : Steve did not wrote a single line of code in Apple but he understood the power of it .

**Logic**
It may be because Steve also knew the value and power of logical thinking. Programming is as important as learning Mathematics as both of these help you in building logical thinking which ultimately helps you to think better , analyse better, understand the mechanism of any simple or complex process in a better way. In fact if you take a closer look at any subject which is created by humans have logic in their very foundations and today the very pure form of logic can be made on a 12x10 inch computer screen .

**Art of Problem Solving**
If there is any skill that has remained and will remain a top priority for decades in any job of any field,it is the skill of Problem Solving .To become a better problem solver and resolve the complexities that are occurring in any system is the main priority of any business or country and Programming helps you to build that ability to do it. When you learn to program you deal with many things like creating something ,optimizing it ,building an algorithm, making the machines think and work the way you want!
**In programming, not only you understand how the system works ,you can build the system and make it work according to your own will .**

**Building the Future**
It hasn't been much time since the “ IT boom “ and an integral part of future of the human race depends on the technology we are developing in the field of computer science . So if you learn programming you are getting a chance to contribute and shape the world according to your will because You can practically make anything: games,websites ,Web Application,Mobile apps, embedded systems etc that influences the life of people around us. From the brush you use in the morning to the car you drive in the evening is designed and made using the softwares. From the games you play to the satellites that provide you interstellar information are all controlled by software which are made by people who are no smarter than you .
**So you should not ask what can be achieved with programming but you should ask what you can’t .**
Install cfn-lint on Windows
Tags: aws, devops
Published: 2022-05-12 18:26:15

Lint testing your code is something that should be done 
whether you are writing software code or infrastructure code.
 
When writing [AWS CloudFormation templates](https://www.techielass.com/create-an-s3-bucket-using-aws-cloudformation/?utm_campaign=external&utm_medium=blog&utm_source=devto) you can use the **cfn-lint** to perform lint testing on your code. 

The cfn-lint tool can validate both YAML and JSON templates against the [AWS CloudFormation Resource Specification](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html).

I've been recently trying to upskill on AWS CloudFormation as an Infrastructure as Code (IaC) language and get into good habits of lint testing my code as I go.  I've looked to cfn-lint to help me.  I found the instructions on how to install this tool on Windows lacking.  But I have found a way to make it work!

## Step 1 - Install Windows Subsystem for Linux
Windows has a tool called [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-gb/windows/wsl/about?WT.mc_id=AZ-MVP-5004737), that allows you to run a GNU/Linux environment on your Windows machine without the overhead of having to run a dual booting system on your machine. 

To install WSL on your machine open up an elevated PowerShell command and type:

```powershell
wsl --install
```

This will download the latest Linux kernel, and install a Linux distribution, by default this is Ubuntu. 

Once WSL has been installed you will be asked to set up a username and password.  Follow best practices with this.  If you ever forget the password, you can reset it. 

## Step 2 - Install python
The cfn-lint tool has a dependency on python so we need to ensure that is installed.  We can do this by issuing the command within our WSL terminal:
```powershell
sudo apt install python3 python3-pip
```

## Step 3 - Install cfn-lint
Now we have all the dependencies installed we can install the tool itself.  To do that we use the command: 
```powershell
pip install cfn-lint
```

Once the install completes, close your terminal and re-open it. 

## Start to use cfn-lint
Everything is now installed and ready for you to use!
![cfn-ling within a Ubuntu terminal](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ycglu4txgom4dmmj9ih.png)
Confused between ADD and COPY instructions in Dockerfile ?
Tags: docker, dockerfile, container, cloud
Published: 2022-05-12 18:24:48

When you have to create a Dockerfile there are two instructions that you can use to copy the  files to the Container file system. The commands are **ADD** and **COPY**, both work quite similar but there are some specifics that we should consider before using them. 

**COPY**
- Copy instruction will only allow copying the local source file to the container’s file system

```
COPY foo.properties /var/tmp/
```

**ADD**
- It will copy the local files and directories to the container's file system

```
  ADD foo.properties /var/tmp/
```

- It will also allow copying the file from a remote URL. 

```
  ADD http://someserver.com/file/foo.properties /var/tmp
```

- Add instructions will also unpack the compressed file after copying it.

```
ADD test.tar /var/tmp/
```

The outcome of the above instruction would be that test.tar will be copied first and then it will be extracted at location 

```
/var/tmp/
```

Be careful that ADD doesn't unpack the compressed when you copy it from a remote URL. It will only download and copy it. Unpacking works only for local files.

**Recommendation**
If you need to copy from the local build context into a container, stick to using **COPY**. 

Also, when you need to download and copy from a URL instead of **ADD**, it’s safer and more efficient to use `wget` or `curl` within a **RUN** command. By doing so, you avoid creating an additional image layer.

```
ADD config.tar.gz /
```

```
COPY config.tar.gz /
RUN tar -zxvf config.tar.gz
RUN rm -rf config.tar.gz
```



References:
- https://stackoverflow.com/questions/24958140/what-is-the-difference-between-the-copy-and-add-commands-in-a-dockerfile/31923335#31923335
- https://developersdoors.xyz/the-difference-between-add-and-copy-in-dockerfile/
Astronomy Picture of the Day
Tags: appwritehack
Published: 2022-05-12 18:02:44

### Overview of My Submission
This project is Astronomy Picture of the Day. The NASA has an API that developers can use to access the pictures from the NASA, and they update their picture and description of the picture every day. However, we cannot go back in time to look at old pictures and descriptions. So, I have an idea that we can store pictures and descriptions of each day into my database, so that we can select a picture to see each day that passed.
For the project I use `ReactJS`, `ExpressJS`, and `appwrite` as a database, Additionally I use the `cron-job` to schedule the time to send the request to the NASA API and store all the details in my database.

### Submission Category: 
Web2 Wizards


### Link to Code
{% embed https://github.com/Mixko50/appwrite-apod %}

### Demo

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

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


[Note]: # (Be sure to include the DEV usernames of your collaborators, if any. Prizes for winning projects with multiple collaborators will be sent to the person who posts this submission and they will distribute the prize evenly.)
How to use the main function in Python
Tags: python, mainfunction, programming, beginners
Published: 2022-05-12 18:02:33


In this article, I have explained about how to use the main function in the python programming language.

## **main function**

The `main` function is considered the entry point of a program. It means that no matter how many functions we have defined in our program, it will find the main function and execute it at the very beginning, and later on other programs will execute it inside the main function.

Python does not have a `main` function in entry points. The program is executed from top to bottom. Python provides a special built-in variable named **`__name__`**. In this article, we will explore how we can use the main function as the entry point of a python program and execute it at the very beginning.


In the below example, we simply define a python function and call it **`main()`**.



```
def main():
     print ("Welcome to KCD Chennai!")

print ("Welcome")


# output: Welcome
```
In the above program, we can see that it only prints the `Welcome` and does not execute the main function. The main function of our program is to execute. To perform this action, we need to use the python's built-in variable **`__name__`** and set it as the main function.

The code example is below:

```
def main():
     print ("Welcome to KCD Chennai!")

if __name__ == "__main__":
    main()

print ("Welcome")


# Output: 
# Welcome to KCD Chennai!
# Welcome
```

The main function has been executed first, followed by the rest of the code. The main reason is that we have used python's built-in variable and when the block of code executes it finds the main function and returns true as a result, the main function has been executed.



Gratitude for perusing my article till end. I hope you realized some thing one-of-a-kind today. If you enjoyed this article then please share to your friends and if you comprehend any different approaches to use the main function in Python Programming Language or thoughts to share with me then please write in the comment box.

Above blog is submitted as part of 'Devtron Blogathon 2022' - https://devtron.ai/
Check out Devtron's GitHub repo - https://github.com/devtron-labs/devtron/ and give a ⭐ to show your love & support.
Follow Devtron on LinkedIn - https://www.linkedin.com/company/devtron-labs/ and Twitter - https://twitter.com/DevtronL/, to keep yourself updated on this Open Source project.
Anonymous Controller
Tags: appwritehack, javascript, webdev, react
Published: 2022-05-12 17:58:49

[Instructions]: # (To submit to the Appwrite Hackathon on DEV, please fill out all sections.)


### Overview of My Submission

I have an inspiration for controlling a device from anywhere around the world using Web Technologies and I always wanted to try out something unique, therefore, developed prototype to illustrate controlling of an IoT robot car connected with the internet, steering with a Progressive Web Application (PWA) built on Javascript.

It's a Progressive Web Application controller that allows us to control the IoT robot from anywhere in the world via the internet. I used the MQTT protocol for communication between the app and the robot, as well as appwrite integration for user authentication to access the controller. It also have the appwrite's real-time database for tracking user events on the controller that are saved in the database.

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

Developed using **Appwrite** deployed on Digital Ocean, C++, React, Recoil, Service Workers, MQTT, Arduino, ESP, Mosquitto broker deployed on AWS.

You can heads to [https://appwrite-hack-robo.netlify.app/](https://appwrite-hack-robo.netlify.app) to control.

Github Repository Link: [https://github.com/raghavdhingra/Anonymous-Remote](https://github.com/raghavdhingra/Anonymous-Remote)


### Submission Category

My submission falls under the category of **Wacky Wildcards**, and **Web2 Wizards**


### Link to Code

{% embed https://github.com/raghavdhingra/Anonymous-Remote %}


### Additional Resources / Info

![Login Page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/goaqsfo8kgpa1lvbtmls.png)

![Controller](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wcb7elciyfiv0kwbqt8f.png)

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

Designed and code by @raghavdhingra
Main function in Python
Tags: python, mainfunction, programming, beginners
Published: 2022-05-12 17:58:19


In this article, I have explained about how to use the main function in the python programming language.

## **main function**

The `main` function is considered the entry point of a program. It means that no matter how many functions we have defined in our program, it will find the main function and execute it at the very beginning, and later on other programs will execute it inside the main function.

Python does not have a `main` function in entry points. The program is executed from top to bottom. Python provides a special built-in variable named **`__name__`**. In this article, we will explore how we can use the main function as the entry point of a python program and execute it at the very beginning.


In the below example, we simply define a python function and call it **`main()`**.



```
def main():
     print ("Welcome to KCD Chennai!")

print ("Welcome")


# output: Welcome
```
In the above program, we can see that it only prints the `Welcome` and does not execute the main function. The main function of our program is to execute. To perform this action, we need to use the python's built-in variable **`__name__`** and set it as the main function.

The code example is below:

```
def main():
     print ("Welcome to KCD Chennai!")

if __name__ == "__main__":
    main()

print ("Welcome")


# Output: 
# Welcome to KCD Chennai!
# Welcome
```

The main function has been executed first, followed by the rest of the code. The main reason is that we have used python's built-in variable and when the block of code executes it finds the main function and returns true as a result, the main function has been executed.



Gratitude for perusing my article till end. I hope you realized some thing one-of-a-kind today. If you enjoyed this article then please share to your friends and if you comprehend any different approaches to use the main function in Python Programming Language or thoughts to share with me then please write in the comment box.