teleren/devto huggingface dataset:
Manohari: Find how much attractive you are to others
Tags: azuretrialhack, python, azure, beginners
Published: 2022-03-07 10:22:13

### Overview of My Submission
Manohari is a web application that tells how much attractive a person is for others, it works on some studies that I will tell you later in this blog.
It is built with Azure App Service, Azure Blob Storage and Azure Cognitive Services (Face API).

Go give it a try at https://manohari.azurewebsites.net and check yourself. 

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


### Submission Category: 
**Wacky Wildcards**

 

### Link to Code on GitHub

Last weekend, I asked my friend about a silly game that we played in childhood and can build for hackathon. He told me a love calculator and I took it seriously.

Tell me in the comments, how much you like this silly idea.

{% github https://github.com/PradyumnaKrishna/manohari %}



### Working
According to some studies it is found that people likes faces that have common facial characteristics to them or their near one. So, I used Azure Face API to match faces and get the confidence, after that I tried to neutralise gender biasing and added emotional score. I added some quotes to tell your some points that I consider while calculating the score.

It is not much accurate because of two reasons:
1. It differs from person to person and depends upon person perspective.
2. Azure Face API tries to match person and doesn't returns the score for similar facial characteristics.

I believe that if I train my own ML model then it will produce more accurate results but it is only for fun. I handed the case if same person provided in both images, it checks that the persons are identical and returns no score.

You can understand my algorithm from my GitHub repository provided and tell me in the comments how I can improve it.



### Azure Services
I used three Azure Services:

1. Azure App Service
2. Azure Face API
3. Azure Blob Storage

![Azure Services](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7lkyr27ylwo6qjw6knrz.png)

Flask application hosted on Azure App Service provides user interaction and communicate with Azure Blob Storage and Face API. Blob storage is used to storage the images provided by user and Face API uses those images to detect and find similar.


### Screenshots and Gif
**Demo**
![Demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xubwqvfuin0ni2hoh1ym.gif)
 
**Angry Face**
![Angry Face](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xk91ygbry2yozu4hiu6z.png)

**Disgusting Face**
![Disgusting Face](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pegof54ucpvi5uf4qsv1.png)



### End Note
I hope you find this interesting and tell me in the comments about your opinion on it. 

Thanks to my friend **Chetan Goyal** to provide this idea.
Terminal. Day 1
Published: 2022-03-07 11:48:35

**Hi**
i learned today some commands like 
 - Ls
 - pwd
 - cd
 - echo 
 - mkdir
 - rm
 - cat

ls - open the files
pwd - recognizes the address
cd - current directory 
echo - print the text inside to the terminal 
mkdir - creates a folder at the given address 
rm - remove 
cat - prints the contents of the given text file text file to the terminal.

 **Bye**
Terminal kommandalari | PART 1
Tags: cpp, beginners, uzbek, terminal
Published: 2022-03-07 11:42:36

### `ls`
- hozirda papkadagi barcha narsalarni chiqaradi
- `-a` tanlovi orqali yashirin fayl va papkalar ham chop etiladi

- `~` manzili `$HOME` manzilga teng

### `pwd` (print working directory)
- hozirgi biz turgan fayl manzilni chop etiladi

### `cd`(change direcotry) ( joriy papka ) 
- joriy papkani o'zgartiradi, ya'ni sizni boshqa manzilga olib boradi

a. **`cd Documents`**
b. **Documents** `cd ~`
 - a.komanda orqali **Documents** papkasiga o'tadi.
 - b.komanda orqali **$HOME** ga qaytadi.

- `cd ..` komandasi orqali bitta papka ortga qaytadi

### `echo`
- berilgan qo'shtirnoq `""` yoki bir tirnoq `''` ichidagi textni terminalga chiqaradi

````
echo 'Lyuboy textni chop etadi'
echo "Qo'shtirnoqdagini ham chop etadi"

````
### `mkdir`
- berilgan manzilda papka sazdat qiladi

### `rm`**(remove)**
- berilgan papka yoki faylni o'chiradi. ESLATMA !!! bu kommanda orqali o'chirilgan fayl yoki papka korzinkaga tushmaydi
- `-r`**(recursive)** tanlovi orqaligina bo'sh papkalarni o'chirsa bo'ladi
- `-f`**(force)** tanlovi orqali o'chmayotgan fayl yoki papka majburlab o'chiriladi.

###`cat`
- berilgan text fayl ichidagi kontentni terminalga chop etadi
How to upload images from markdown to S3 bucket
Tags: webdev
Published: 2022-03-07 11:37:01

### **Uploading a File**

There are three ways you can upload a file:

- From an `Object` instance

- From a `Bucket` instance

- From the `client`

In each case, you have to provide the `Filename`, which is the path of the file you want to upload. You’ll now explore the three alternatives. Feel free to pick whichever you like most to upload the `first_file_name` to S3.

<br/>
DIFFERENCE BETWEEN WEB 3.0 AND WEB 2.0
Published: 2022-03-07 11:33:37

DIFFERENCE BETWEEN WEB 3.0 AND WEB 2.0

Definition
One of the foremost factors to answer “What is the difference between web 2.0 and web 3.0?” would focus on their definitions. Web 2.0 is the participative social web or the second generation of internet services that enables read and write functionalities. On the other hand, Web 3.0 is the third generation of the web which focuses on the semantic web. It basically focuses on enabling better communication and understanding between users and machines on decentralized infrastructures. 

Focus
The next critical aspect for identifying web 2.0 and web 3.0 differences would obviously draw attention towards the primary focus. Web 2.0 focused on enabling users to interact with content on the internet. On the other hand, Web 3.0 fosters immersion in the content on the internet by becoming an active contributor. While web 2.0 aimed to connect people, web 3.0 aims to connect knowledge. On a broader level, the focus of web 2.0 reflected largely on tagging and end-user experiences. Web 3.0 turned its focus towards user empowerment by facilitating improved trust, security, and privacy. So, you could clearly identify that the focus area is a notable aspect in web 2.0 vs. web 3.0 comparisons. You have web 2.0 focusing particularly on community development while web 3.0 intends to empower individuals. 

Technologies
The third important differentiating factor in web 2.0 vs web 3.0 comparison would refer to the underlying technologies. Web 2.0 has played a decisive role in fostering the development of many new technologies. Some of the notable technologies underlying the growth of web 2.0 include AJAX and JavaScript. In addition, you can also notice the dominance of CSS3 and HTML5 among the technologies empowering Web 2.0. On the other hand of the spectrum, you can find web 3.0 providing support for the implementation of innovative technologies. The major technologies underpinning the foundation of web 3.0 include AI, semantic web, and decentralized protocols. The other notable technologies underlying the growth of web 3.0 include knowledge bases and ontologies.

Types of Applications
Another crucial factor for answering “what is the difference between web 2.0 and web 3.0?” would refer to the types of applications associated with them. In the case of web 2.0, you can find web applications. Some of the examples of web 2.0 applications include two-way web pages, video websites, podcasts, and personal blogs. On the contrary, web 3.0 empowers the growth of smart applications with capabilities for leveraging ML and AI functionalities. The notable examples of web 3.0 applications might include multi-user virtual environments, 3D portals, and integrated games.  


https://blockgames.gg/
https://nestcoin.com/
https://zuri.team/
Working with JS prototypes
Tags: javascript
Published: 2022-03-07 11:29:17

While playing around in my browser terminal, I came across a JavaScript functionality that left me a little confused. In this post, I'll explain why that functionality exists and how it happens. Let's take a look:

### What is a primitive data type?
In computer science, primitive data types are a set of basic data types from which all other data types are built upon. Each programming language has its own set of primitives. In JS, we have the following:

![JS Data types](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bfnb788el3zyd2f07154.png)
  
### What are prototypes?
In short, prototypes are mechanisms by which JavaScript objects inherit resources from each other.

### And how does this all connect?
Well, in JS, primitives don't have prototypes. In spite of that, if we try to access a primitive's prototype using `__proto__`, we would get the following:

![Code snippet](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0duya0k5bqjfyga5o66n.png)
 
This happens because JS wraps anything that doesn't have a prototype with an object. To exemplify, consider the following code:

![code snippet](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4vcty1k51w8b4zmeklxu.png)

Under the hood, this is what happens (approximately):
- JS creates a wrapper Object from our primitive (Something similar to using `new Number(123)`);
- Call the `valueOf()` method with the value returned from the previous operation;
- Discard the Number object;
- Return the primitive from the 2nd operation.

So there we have it! To get more info on `Object.prototype.__proto__`, check out the [ECMAScript 2015 spec](https://262.ecma-international.org/6.0/#sec-additional-properties-of-the-object.prototype-object)
day 3
Published: 2022-03-07 11:22:10

ls

    joriy papkadagi barcha narsalarni chop etadi
    -a tanlovi orqali yashirin fayl va papkalar ham chop etiladi

pwd (print working directory)

    joriy papka manzilini chop etadi
    ~ manzili $HOME mazilga teng

cd (current directory)

    joriy papkani o'zgartiradi, ya'ni sizni boshqa manzilga olib boradi

a. ~ # cd Documents
b. Documents # cd ~
a. komanda orqali Documents papkasiga o'tiladi.
b. komanda orqali $HOMEga qaytiladi

    cd .. komandasi orqali bita papka ortga qaytiladi

echo

    berilgan qo'shtirnoq "" yoki bir tirnoq '' ichidagi tekstni terminalga chop etadi

echo 'Lyuboy tekstni chop etadi'
echo "Qo'shitirnoq ham ishlaydi"
echo qoshtirnoqSIZ ham ishlaydi

mkdir

    berilgan manzilda papka yaratadi

mkdir Test

    Joriy papka ichida Test degan papka yaratadi. Agar papka mavjud bo'lsa, error beradi.

rm (remove)

    berilgan papka yoki faylni o'chiradi. ! Bu kommanda orqali o'chirilgan fayl va papkalar Korzinkaga tushmaydi.
    -r(recursive) tanlovi orqaligini bo'sh papkalarni o'chirsa bo'ladi
    -f(force) tanlovi orqali o'chmayotgan fayl yoki papka majburlab o'chiriladi

cat

    berilgan tekst fayl ichidagi kontentini terminalga chop etadi
?
Terminal komndalar
Published: 2022-03-07 11:20:07

##``ls``
покаывает все приложение (не все)
##``ls -a``
$HOME papkag teng 
## ~
### echo

```sh
echo 'luboy tekstni chop etadi'
``` 
### `mkdir`
-berilgan manzilda papka yaratadi
### '% rm' (remove)
 - berilgan papka yoki faylni o'chiradi (karzinkaga tushmide)    
   - '-r' tanlov bilan ochiradi
   - '-f (force)' tanlovi bilan ochmayobtagan papkalarni ochiradi (ichida fayl bosa ochirmaydi)
###'cd'
-joriy papkani 
### `cat` 
- berilgan text faylni chop etadi
What is consensus in blockchain technology
Tags: programming, blockchain
Published: 2022-03-07 11:16:34

## Consensus mechanisms

Sometimes a confusion appears between the blockchain type and its consensus mechanism. This is why it is important to understand what consensus is and its role in a blockchain.
The consensus mechanism makes sure all nodes are synchronised with each other and agree on which transactions are legitimate and added to the blockchain. It makes sure that everyone in the network uses the same blockchain.
In a centralised system, a central administrator has the authority to maintain and update the database.

Consensus assures that the protocol rules are being followed and guarantees that all transactions occur in a trustless way. There are some specific goals in the Blockchain consensus protocol, such as agreement, collaboration, cooperation, equal rights for each node, and mandatory participation of each node in the consensus process.

## Types of consensus algorithms:

- **Proof of Work (PoW)** — is a decentralised consensus mechanism that requires members of a network to expend effort solving an arbitrary mathematical puzzle to prevent anybody from gaming the system. Proof of work is used widely in cryptocurrency mining, for validating transactions and mining new tokens.
- **Proof of Stake (PoS)** — protocols are a class of consensus mechanism for blockchains that work by selecting validators in proportion to their quantity of holdings in the associated cryptocurrency. Unlike a proof of work (PoW) protocol, PoS systems do not incentivise extreme amounts of energy consumption.
- **Delegated Proof of Stake (DPoS)** — is a popular evolution of the PoS concept, whereby users of the network vote and elect delegates to validate the next block. Delegates are also called witnesses or block producers. Using DPoS, you can vote on delegates by pooling your tokens into a staking pool and linking those to a particular delegate. You do not physically transfer your tokens to another wallet, but instead, utilise a staking service provider to stake your tokens in a staking pool.
- **Proof of Importance (PoI)** — is a cryptocurrency term defined as a blockchain consensus technique — essentially, proof of important works to prove the utility of nodes in a cryptocurrency system, so that they can create blocks.

Other consensus mechanisms:

- **Proof-of-Capacity(PoC)** — PoC is another consensus algorithm used in blockchains that allows mining devices in the network to decide mining rights and validate transactions with the help of their available hard drive space.
- **Proof-of-Activity (PoA)** — PoA is a consensus algorithm used in Blockchain technology that ensures that all transactions occurring on the network of Blockchain are genuine and authentic. PoA consensus, which is a combination of proof-of-work and proof-of-stake, ensures that all miners arrive at a consensus. In other words, PoA is an attempt to consolidate the best features of PoW and the PoS systems.
Video: Deploy your Medusa store on Heroku in 5 minutes
Tags: webdev, tutorial, opensource, javascript
Published: 2022-03-07 11:16:21

A quick guide by our CTO, Oliver, on how to deploy your [Medusa](https://www.medusajs.com/) ecommerce backend to Heroku. 

> We assume, that you are currently running a local instance of Medusa. If not, check out our [Quickstart](https://docs.medusajs.com/quickstart/quick-start) or use `npx create-medusa-app` to quickly set up your application. For the latter, see [this guide](https://docs.medusajs.com/how-to/create-medusa-app) for a short walkthrough.

After this tutorial, you will have a live headless commerce backend to start your ecommerce store from.


{% embed https://www.youtube.com/watch?v=nqZKnkrGMA0&ab_ %}

---

**For the written tutorial:** [https://docs.medusajs.com/how-to/deploying-on-heroku/](https://docs.medusajs.com/how-to/deploying-on-heroku/)

Should you have any problems setting this up, then feel free to hit us up on our [Discord](https://discord.com/invite/medusajs).

Hope you found the tutorial helpful!
React Sticky Children
Tags: react, javascript, opensource, webdev
Published: 2022-03-07 11:07:29

I created a simple ReactJS plugin [`react-sticky-children`](https://www.npmjs.com/package/react-sticky-children) to abstract away the complexities of the IntersectionObserver API and allow you to apply styles to a component as it approaches the top of the viewport. Useful for "Scroll to Top", complex "sticky" elements or animating components into view.

[Demo](https://react-sticky-children.vercel.app/)

![Demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fd0glcyafqygd4ehj28z.gif)

## Usage

```
import { ReactStickyChildren } from 'react-sticky-children';

<ReactStickyChildren initialStyle={initialStyle} intersectingStyle={intersectingStyle}>
  <MyComponent />
</ReactStickyChildren>
```

Looking for feedback. 🙏

NPM: https://www.npmjs.com/package/react-sticky-children
GitHub: https://github.com/kevinfarrugia/react-sticky-children
Terminal komandalari - PART 1
Published: 2022-03-07 11:06:31

### `ls`
- joriy papkadagi barcha narsalarni chop etadi
- `-a` tanlovi orqali yashirin fayl va papkalar ham chop etiladi

### `pwd` (print working directory)
- joriy papka manzilini chop etadi
- `~` manzili `$HOME` mazilga teng

### `cd` (current directory)
- joriy papkani o'zgartiradi, ya'ni sizni boshqa manzilga olib boradi

a. **~ # `cd Documents`**
b. **Documents # `cd ~`**
a. komanda orqali **Documents** papkasiga o'tiladi.
b. komanda orqali **$HOME**ga qaytiladi

- `cd ..` komandasi orqali bita papka ortga qaytiladi

### `echo`
- berilgan qo'shtirnoq `""` yoki bir tirnoq `''` ichidagi tekstni terminalga chop etadi
```sh
echo 'Lyuboy tekstni chop etadi'
echo "Qo'shitirnoq ham ishlaydi"
echo qoshtirnoqSIZ ham ishlaydi
```

### `mkdir`
- berilgan manzilda papka yaratadi
```sh
mkdir Test
```
> Joriy papka ichida *Test* degan papka yaratadi. Agar papka mavjud bo'lsa, error beradi.

### `rm` (remove)
- berilgan papka yoki faylni o'chiradi. ! Bu kommanda orqali o'chirilgan fayl va papkalar Korzinkaga tushmaydi.
- `-r`(recursive) tanlovi orqaligini bo'sh papkalarni o'chirsa bo'ladi
- `-f`(force) tanlovi orqali o'chmayotgan fayl yoki papka majburlab o'chiriladi

### `cat`
- berilgan tekst fayl ichidagi kontentini terminalga chop etadi
CSS Selectors
Tags: webdev, programming, css
Published: 2022-03-07 11:05:33

CSS selectors are components of the CSS rule set, they are implemented for selecting the content of your web page you wish to style. CSS selectors choose elements in HTML based on the class, type, attribute, id etc.

Selectors are those names that you give to your different styles.
While creating a style, you define how each selector should work in terms of the size, color etc.

Below are a few basic types of selectors for CSS;
* CSS class selector
* CSS id selector
* CSS Universal selector
* CSS element selector.

<hr></hr>

### Class Selectors
The CSS class selector selects the element to style based on it's specific class attribute.  It is used with a dot symbol " . " followed by the class name. 

```
.nameOfClass {
    CSS Declarations
              }
```
This is the general syntax for class selectors in CSS.
Below is an example of how it is applied.

```
.container {
    width: 360px;
    height: 420px;
    background: rgba(216, 190, 190, 0.6);
    color: #fff;
    position: center;
    top: 150px ;
    border-radius: 15px;
    box-shadow: 0px 11px 35px 2px rgba(0,0,0,0.8);
    margin:auto;
    position: relative;    
}

```


<hr></hr>

### ID Selectors
The CSS ID selector selects the element to style based on it's specific ID attribute. Each id is unique to a page, so only one element is attached to one ID although it's possible to use the same ID for more than one element, but this isn't done because it's against the normal convention. The ID selector is used with a hash symbol " # " followed by the ID name.

```
#nameOfID {
    CSS Declarations
              }
```

This is the general syntax for ID selectors in CSS.
Below is an example an ID selector applied with a login form.

```
#login-form {
	background-color: #FFFFFF;
	height: 400px;
	width: 400px;
	margin: 7em auto;
	border-radius: 1.5em;
	box-shadow: 0px 11px 35px 2px rgba(0,0,0,0.8)
}
```

<hr></hr>

### Universal Selectors
The CSS Universal selector is used to select all the elements on the page. It is used with an asterisk symbol " * ".

```
* {
    css declarations;
}
```
This is the general syntax for Universal selectors, in this case it'll point to all elements on the page.

```
div * {
     font-family: sans-serif;
}
```
Here it selects all the elements within the div tag and sets the font to sans-serif.

<hr></hr>

### Element Selectors
The Element selector selects the HTML elements by name.

```
element {
    CSS Declarations
}
```
All format testing (uat testing)
Tags: payment
Published: 2022-03-07 11:03:36

# Steps to integrate Razorpay 

* Setting up Razorpay account.

* Storing API keys in settings.py

* Installing Razorpay library.

* Creating order using Razorpay API.

* Creating order at backend and also creating Razorpay order.

	* Show template

	* render to payment.html

	* Get info of call back URL

	* Done with creating an order.

### **Uploading a File**

There are three ways you can upload a file:

- From an `Object` instance

- From a `Bucket` instance

- From the `client`

In each case, you have to provide the `Filename`, which is the path of the file you want to upload. You’ll now explore the three alternatives. Feel free to pick whichever you like most to upload the `first_file_name` to S3.

![](https://notionpack-uploads.s3.amazonaws.com/blog_images/tmp/tmpwb12favr.png)

![](https://notionpack-uploads.s3.amazonaws.com/blog_images/tmp/tmpft1s_tn0.png)

💡 Testing call out block


```python
@app.action("submit_your_response")
def submit_response(ack, body, client, logger):
    reference_id = body["actions"][0]["value"]
    # form_data = SlackForm.objects.filter(reference_id=reference_id).first()
    form_data = form_data_2
    form_view = utils.get_form_view_data(form_data)
    form_view["private_metadata"] = reference_id
    try:
        ack()
        result = client.views_open(trigger_id=body["trigger_id"], view=form_view)
        logger.info("User clicked submit button")
    except Exception as e:
        logger.error(e)
```

[https://gist.github.com/Nishant127/13898538d35a024b4d93a592b1b4a6ea](https://gist.github.com/Nishant127/13898538d35a024b4d93a592b1b4a6ea)

<br/>
UX/UI Design — Most Asked Questions
Tags: design, ux, ui, qa
Published: 2022-03-07 10:55:19

{% youtube MhhyI5O7WjI %}

Hi!
Let’s have a little Q&A session with our Head of Design, Paweł. In the newest episode of Experts Zone, he faces the most asked UX/UI design questions. How did he handle them?

Enjoy! You can also read the article at [Frontend House](https://frontendhouse.com/experts-zone/most-asked-uxui-design-questions-experts-zone-14).