teleren/devto huggingface dataset:
Generating Awesome User Avatars is Easy
Tags: html, tips, tutorials, ui
Published: 2021-08-25 14:40:07

# Hey Developers

Whenever user signups, we as a developer either ask them to upload an avatar or add a simple avatar placeholder that looks too boring. 

So, today I'll be sharing, how you guys can create an amazing avatar for your users.

# Let's Start

There's a tool name  [DiceBear Avatars](https://avatars.dicebear.com/)  which will help you create an amazing avatar using the user's name. And this is too easy to use. This will generate different avatars based on your options.

```
<img src="https://avatars.dicebear.com/api/male/Ashik%20Chapagain.svg"/>
```
This is what you'll get.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1629899694752/NrZhP7sKD.png)

This is just of one type. DiceBear Avatars provides you 10 types of avatars.

Let's look at them.

# Avatars Types

## Male

```html
<img src="https://avatars.dicebear.com/api/male/Lalit%20Kishore.svg"/>
```
This is what you'll get.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1629899867456/K4V2LXuyZT.png)

## Female

```html
<img src="https://avatars.dicebear.com/api/female/Some Girl Name.svg"/>
```
You'll get something like this.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1629900051149/A2E5MUJKC.png)

## Human

```html
<img src="https://avatars.dicebear.com/api/human/Some Person Name.svg"/>
```
Result:
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1629900122934/X87sSvHUY.png)

## Avataaars
```html
<img src="https://avatars.dicebear.com/api/avataaars/Some Person Name.svg"/>
```

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1629900248911/GK_nrcfhi.png)

## Bottts
```html
<img src="https://avatars.dicebear.com/api/bottts/Some Person Name.svg"/>
```
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1629900322272/TlMfWrvjQd.png)


## Micah
```html
<img src="https://avatars.dicebear.com/api/micah/Some Person Name.svg"/>
```

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1629900364573/i88p6ovq-.png)


## Initials
```html
<img src="https://avatars.dicebear.com/api/initials/Some Person Name.svg"/>
```
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1629900483780/9oUgD1VI6.png)

## Identicon
```html
<img src="https://avatars.dicebear.com/api/identicon/Ashik Chapagain.svg"/>
```
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1629900512984/eWR682w2h.png)

## Jdenticon
```html
<img src="https://avatars.dicebear.com/api/jdenticon/Ashik Chapagain.svg"/>
```
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1629900552113/hUttmb1HjP.png)


## Gridy
```html
<img src="https://avatars.dicebear.com/api/gridy/Ashik Chapagain.svg"/>
```
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1629900578845/PYOgkVo95.png)


That's it for today guys.
How to select and copy the right way?
Published: 2021-08-25 14:27:37

I have been thinking a lot, if there is a way to solve this problem: When I need to copy something between tabs, and multiple items are selected, and I change tab after selecting the items, how not to lose the selection when returning to the original tab? It drives me nuts to select again, may it be code, or files in a folder, or anything. All ideas welcome.
Dict in Python & how to use it?
Tags: python
Published: 2021-08-25 14:21:53

1. What is Dict in Python?
Dict (short for Dictionary) in Python is a storage data type like List and Tuple, Dict has the function to store values containing key and value, and these data are not sorted in a certain way. any order.

The Dict in python is determined by the following factors:

- Confined to curly braces { }, everything inside the braces is interpreted as an element of the Dict.
- Dict elements are separated by commas ","
- Dict's elements must be a key-value pair
- The key-value pair of the element in the Dict is separated by a colon ":"
- Keys must be a hash object

2. How to initialize a Dict's element in Python
2.1 Use curly braces {} and put the value inside curly braces
To add 1 or n elements to the Dict data type in Python, you do the following syntax:

Syntax: {<key_1: value_1>, <key_2: value_2>, .., <key_n: value_n>}

==> Click to learn more: https://mcivietnam.com/kieu-du-lieu-dict-trong-python/
Learning Unity3d... 🤯
Tags: unity3d, beginners, gamedev
Published: 2021-08-25 14:20:00

So, I decided I need to learn. Not only I'm trying to keep myself concentrated (which I think is my biggest problem) to finish anything, I'll try to write things in English just to trains myself more. I still expect to use Google Translator to make sure I'm writing something understandable, but things tend to get better, right?

I always had this dream of being a game developer. To build something that others enjoy, have fun, to allow the player to experience emotions with something you built, made me think that I need to follow this route. Everything is a little cloudy on my thoughts: I know some programming, but I don't know anything about game design, and much less about drawing/modeling. So I think there'll be a lot of hurdles in this journey (like always).

Enough with this presentation: I'm using the Unity3d tutorials from their own site (https://learn.unity.com/). Still trying to memorize the terminology used, the panels on the IDE (Hierarchy, Project, Inspector), but so far so good. It's only two days since I began (with weeks of interval between them 😬), so obviously everything is the most basic possible. 

The last step I did until this post was to build a scene where a ball would go from point A to point B without touching the floor. This probably took more time than necessary, because I wanted to make something more elaborated, but it ended as simple as could get. I've put some textures from the Asset Store to make things more pretty, but that's it. 

The result can be seen here:
👉 https://play.unity.com/mg/other/build-div

I'm hopeful that someday I'll create something that will make me proud of myself.
Getting Started with Splash in Docker
Tags: webscrapping, docker, scrapy, splash
Published: 2021-08-25 14:16:05

[Splash](https://github.com/scrapinghub/splash) is a javascript rendering service. I don't have much idea what this service actually is. All I know is the service is one of many tools that could help me scrapping sites that needs javascript to run and enabled. And Splash could work well along with [Scrapy](https://scrapy.org/), the web scrapping framework that I currently learn about. And as always, If this service can be done installed using Docker then I would give a try the docker way.

## Pulling the Image

As instructed from the docker registry [page](https://hub.docker.com/r/scrapinghub/splash), we can pull the latest splash image using this docker command (The image size is huge enough, prepare your internet) :

```bash
docker pull scrapinghub/splash
```

And when check the image listed using `docker image ls`, we could see that it has a huge size:

```
scrapinghub/splash                        latest       9364575df985   12 months ago   1.89GB
```

## Run As Container Service

We can name the service anything you want, but here let's it's `splash-test`. We forward the port to `8050:8050` so we can access it on our browser. Here is the full command to create and run the container:

```
docker run --name splash-test -p 8050:8050 -d scrapinghub/splash
```
Once it created, you can check whether the service is running or stopped using `docker container ls`:

```
CONTAINER ID   IMAGE                COMMAND                  CREATED          STATUS          PORTS                                       NAMES
6e49662c03a7   scrapinghub/splash   "python3 /app/bin/sp…"   48 seconds ago   Up 46 seconds   0.0.0.0:8050->8050/tcp, :::8050->8050/tcp   splash-test
```

You could also check the resource used by the service using `docker stats`:

```
CONTAINER ID   NAME          CPU %     MEM USAGE / LIMIT     MEM %     NET I/O          BLOCK I/O   PIDS
6e49662c03a7   splash-test   0.08%     181.8MiB / 6.043GiB   2.94%     1.09MB / 987kB   0B / 0B     37
```

## Render A Javascript-Required Site

You can access the service using your browser at [http://localhost:8050/](http://localhost:8050/) and here is what it looks like:

![splash page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hn108n56ncxva9ml45qh.png)

If you successfully followed me at this point, then you can start to render any web site that needs javascript enabled to view the pages. For example, you can use [https://www.transfermarkt.com/](https://www.transfermarkt.com/) because I find that this site can't be viewed when I disable the javascript on the browser. So try it by filling the URL form with it and hit the green `Render me!` button.

![splash result](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c5hk0hjb7r6ho44jg1js.png)



As the result, you can see the snapshot image of the site, some statistics, and more importanly the raw html document that ready for you to scrap it. 

That's it and have fun scrapping!

________________
Hello, I've just started my coding journey!
Published: 2021-08-25 14:04:15

Hi, folks!
<br>

Today could be one of the most interesting days in my life, because I've been publicly committing to the [#100DaysOfCode challenge](https://twitter.com/oreckc/status/1430529217217789956) starting today!

In this coding challenge, I'll focus in learning basic web development and advanced stuff, maybe.

I hope that I'll be able to create a simple and cool website, after I complete this coding challenge.
<br>


Thanks,

Thanh Hoang
Top 5 BaaS, You Can Opt for Your Flutter Application
Tags: flutter, firebase, aws, graphql
Published: 2021-08-25 13:55:12

5 The Best BaaS for the Flutter App

If you are curious about the topmost backend services for the flutter app, then you are at the right place. Here are some great backend options for the Flutter app.

1.Back4app

It is a service based on an open-source framework along with many other development tools. The platform service is excellent for hosting, creating, and running apps within record time. You can hire Flutter developers to use it for building web, IoT, and mobile apps. The core features of Back4app are its scalable database, functions of cloud code, APIs, authentication, file storage, and notifications. It can be started for free, but the paid plans start from $5 per month.

2.Firebase

Firebase is one of the popular BaaS platforms from Google. The platform offers a wide range of components and features that helps in the development of web and mobile applications. It is a platform with a NoSQL database that follows protocols of JSON to carry the data storage work. The features include a real-time NoSQL database, REST API, analytics, scalable hosting, and Test lab. It is completely free, but you can also go for paid plans.

3.Parse

Parse is used for making application backend, and it is one of the sturdy development solutions for web and mobile applications. Parse supports front-end technologies such as Swift, Java, Ionic, React Native, and Xamarin. The features of Parse are SQL or NoSQL databases, GraphQL and Rest APIs, automatic emails, social login, and push notifications. The platform Parse is downloadable for free and has no hosted versions.

4.AWS Amplify

This is an accessible BaaS platform that is widely used in present times. It delivers agile and secure offerings for the global customer base. Users experience faster access to resources and functionalities with this service. The core features comprise authentications, Rest APIs and GraphQL, datastore, notifications, and analytics. A free tier of AWS Amplify is available, and you can also have paid plans.

5.Backendless

It is an MBaaS or mobile backend-as-a-service that offers many tools to enable easy and fast deployment. Backendless provides dedicated, cloud-based managed servers to the users and also offers user-defined APIs. The features include visual programming, API services, real-time database, hosting, and notifications. It is available for free, but the paid plans begin from $25 per month.

GET to know here Benefits of Using Flutter for App Development:https://www.rlogical.com/blog/top-5-baas-you-can-opt-for-your-flutter-application/
Tiiny.host - A new, cheap and simple web hosting for freelancers and digital agencies
Tags: showdev, html, webdev, programming
Published: 2021-08-25 13:37:58

There are a lot of renowned web hosting providers available. Some of them are fast, seamless but expensive. 

We're a new web hosting provider, tiiny.host. With tiiny.host, you can get your site live within a few seconds. 

To ensure freelancers get their sites live quickly, we've made a simple and peerless hosting for all. 

In tiiny.host, you don't need to have cloud knowledge or any technical knowledge. If your HTML files are ready, then you're good to go. 

All you've to do is, upload the HTML zip files, and your site will be live in less than 30 seconds. 

Check out this attached GIF to know how tiiny.host can make your work easier and quicker.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qsk4xewxv9uij46vu1qk.gif)
Wednesday Links - Edition 2021-08-25
Tags: java, jvm, microservices, spring
Published: 2021-08-25 13:37:02

Structuring Your Code for Spring Framework and Spring Boot (7 min)🍫
https://spring.io/blog/2021/08/22/structuring-spring-boot-applications

Common Pitfalls When Testing Spring Boot Applications (10 min)🪤
https://rieckpil.de/common-pitfalls-when-testing-spring-boot-applications

If you want to use Mockito and restrict yourself to interfaces... (30 sec)✋
https://twitter.com/rafaelcodes/status/1430243608590966785

SpringFramework 5.3.10 will bring support for "soft assertions" (30 sec)🪶
https://twitter.com/sam_brannen/status/1429808920118407181

One does not simply calculate the absolute value (5 min)⚔️
https://habr.com/en/post/574082

Kotlin 1.5.30 Is Now Available! (9 min)🎉
https://blog.jetbrains.com/kotlin/2021/08/kotlin-1-5-30-released

Reading stdin and The Kotlin DSL for Gradle (2 min)🔣
https://blog.thecodewhisperer.com/permalink/stdin-gradle-kotlin-dsl

Is there a need for speed in the Cloud? (4 min)🚄
https://blog.scottlogic.com/2021/08/18/hpc-in-cloud.html

Free Docker registries (1 min)🏦
https://blog.frankel.ch/free-docker-registries

The tale of two forks: GlassFish and Payara (5 min read)🐟
https://shantanu-mohanti.medium.com/the-tale-of-two-forks-glassfish-and-payara-4f734b4e428f

Is today’s microservice bloated than yesterday’s monolithic? (3 min)🎪
https://blog.ycrash.io/2021/08/20/is-todays-microservice-bloated-than-yesterdays-monolithic
What are Hub Sites in SharePoint Online?

Tags: sharepoint, sharepointonline, microsoft, office365
Published: 2021-08-25 13:34:07

In an organization, a lot of sites grow with time. They can be team sites or newly introduced communication sites. So, it is difficult to manage the number of sites.

A hub site helps bring together team sites and communication sites, provides the capabilities to organize sites in a better way and also increases visibility and navigation among associated sites. Microsoft announced SharePoint hub sites, new building blocks of the intranet, to bring together related sites to roll up news and activities, to simplify search, and to create cohesion with shared navigation and look and feel. Ultimately giving your business the flexibility and agility to dynamically grow and respond to the changes in business, without rigid silos, and helping bind a more cohesive workforce moving forward in the same direction.

Let's look at some of the features advantages/features of a Hub site in SharePoint Online.

- Hub sites bring your organizations’ team sites and communication sites together.
- Hub sites display news, events and site activities across all the sites (both team sites and communication sites). Your users will be able to stay up-to- date with the latest news and events within one location.
- When you search at a hub, you can automatically search from all the related sites. When you search at any sites which are joined, they will have the same search experience as the hub level. In short, the search experience will appear for the hub site as well as for all the team sites and communication sites joined to the hub site. Internally, a search scope is created which allows users to directly search for content within all the joined sites.
- Hub sites display cross-site navigation, which means you will see a top navigation bar on the hub site as well as on all the joined sites (both team sites and communication sites). So, navigation to any site will be easier. Consistent navigation will always be there in any joined site as well as in hub sites.
- When you join a team site or communication site under a hub site, the site inherits the look and feel, theme, and logo from the hub site level. All the joined team sites and communication sites will have the same consistent look and feel.

As an organization, you may need to change the site structure and contents within the sites for your business need. Hub sites will give you this flexibility to navigate easily. Hub sites can be created by a user with the SharePoint Administrator role in Office 365 admin centre or by using PowerShell and site owners can then join a team site or communication site under a hub site.

So if you are looking to get started with it, then check out our book "SharePoint Online Modern Experience Practical Guide". This book is a comprehensive guide that lets you explore the Modern features of SharePoint Online. Do check out, if it interests you.
Machine Learning vs. Deep Learning: What's the difference?
Tags: machinelearning, deeplearning, datascience, ai
Published: 2021-08-25 13:25:23

Machine Learning (ML) is the subfield of this big, broad-sweeping category known as Artificial Intelligence. Machine learning gives machines the ability to improve their performance over time, without explicit intervention or help from a human being. Most of the current applications of Machine learning leverage what is known as Supervised Learning.

In practical terms, Deep Learning is a subset of machine learning, which is a subset of Artificial Intelligence; hence, why the terms are used interchangeably. Deep learning is Machine learning but with different capabilities. Deep learning typically has more learning layers than other types of algorithms and these layers are called hidden layers.

Machine learning usually requires some form of guidance, especially if it returns an inaccurate prediction. A person then needs to intervene and make the correct adjustments. But with Deep learning, generally, the algorithms themselves can determine if a prediction is accurate or not.

Let us talk for a moment about some of the differences between Machine learning and Deep learning. While Machine learning models are progressively better at whatever their functions are, the truth is that they still sometimes may need a little bit of hand-holding. If a Machine learning algorithm predicts something incorrectly, someone usually needs to step in and adjust the process. With Deep learning, however, the algorithms themselves are designed such that they can determine on their own whether that prediction is accurate, without any outside help or intervention.

So, in fact, the hierarchy which we have here is that deep learning is a subset of machine learning, and machine learning is a subset of the broader category of Artificial Intelligence.

Here are a few differences between Machine learning and Deep learning that should be highlighted:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ao0sufxkci8nt498kwb.png)

Let us do a recap:

- Machine learning uses algorithms to parse data, learn from that data, and then make informed decisions based on what it has learned.
- Deep learning is a subset of machine learning. It organizes algorithms in layers to create an artificial neural network that can learn and make intelligent decisions without any outside intervention and by finding patterns in the data provided.
- Deep learning uses a massive amount of data to learn. With the phenomenal increase in the amount of data we collect, in the very near future, we hope that deep learning will be able to provide new opportunities and innovations.

Hope this was helpful.
Java 8 features implementation
Tags: java
Published: 2021-08-25 13:22:02

Features in Java-8
-------------------
1. Interface Enhancement
2. Functional Interface
3. Lambda Expression
4. Stream API
5. Date & Time API

a. Introduction of default methods - Supports backward compatibility
    1. default method is available inside the implementing class
    2. there can be more than 1 default method in interface
    3. default method helps in bringing backward compatibility

b. Introduction of static method
    1. static method is not available inside the implementing class
    2. there can be more than 1 static method in interface
    3. static method helps in bringing backward compatibility
    4. we cannot override static method
    5. Java 8 onwards main method can be part of interface

c. Functional Interface
   1. An interface having one and only one abstract method is a functional
   2. Runnable interface had only 1 abstract method called run() - ex. functional interface
   3. Comparable interface had only 1 abstract method called compareTo() - ex. functional interface
   4. Functional interface can have any number of default and static method but only 1 abstract method
   thats why it is also called as SAM interface

d. Lambda expression
- OOP -> Programming paradigm should adhere to Classes, Objects, Encapsulation, Inheritance, Polymorphirm, Abstraction
- Functional programming - Here implementation of same functionality can be done in clear and concise manner.
    - Code will be less, implementation will compact

e. Predicates
- Are predefined functional interfaces
- Return boolean value

f. Double colon operator => can be used as an alternative to Lambda expression
- method reference - instance and static method
- constructor reference

g. Streams - java.util.stream
- Helps to operate on collection object
- distinct function removed duplicate and returns unique list
- skip functions skips the specified number of elements from starting
- peek function helps in debugging to see what is happening after a particular operation on the stream

h. Java-8: Date Time API
- In java 7 we had Date, Calender, Timestamp, they were not efficient, it was present in java.util package
- In Java 8 a new Date Time API was introduced which is also called as Joda Time Api in a new package called java.time

If you want to implement all Java8 concepts in practical handson based approach than checkout my popular udemy course:

https://www.udemy.com/course/practical-java-8-mastery-course/?couponCode=1DCCF8309E7BB06E4C42