teleren/devto huggingface dataset:
Docker , Docker Compose Docker Swarm Vs Kubernetes
Tags: docker, devops, kubernetes, beginners
Published: 2022-12-25 20:51:41


**Docker** is the core technology used for containers and can deploy single containerized applications.

### When do we use docker ?

when you want to deploy a single (network accessible) container.

**Docker Compose** is used for configuring and starting multiple Docker containers on the same host a single host machine.
_so you don't have to start each container separately_.

And Used for running multiple containers as a single service. Each Of the containers here run in isolation but can interact with each other when required.

####When do we use docker compose?

when you want to deploy multiple containers to a single host from within a single YAML . 

**Docker swarm** is a container orchestration tool that allows you to run and connect containers on multiple hosts.

Docker swarm can do tasks like :
- Scaling
- Start a new container when one crashes 
- Networking containers and many more 

####When do we use docker swarm ?

when you want to deploy a cluster of docker nodes (multiple hosts for a simple , scalable application 

**Kubernetes** known as "**K8s**"  is a container orchestration tool that is similar to Docker swarm, but has a wider appeal due to its ease of automation and ability to handle higher demand.

And Also our usual question 
#### When do we use Kubernetes ?

when you need to manage a large deployment of scalable , automated containers.

In The end, it is just a definition for beginners and when u want to make a quick review before the interview hope it is useful! 

Wait for me for new Posts
Read Hierarchical Data Format file
Tags: python, bigdata, hdf
Published: 2022-12-25 20:35:57

HDF is a hierarchical data format developed by the National Center for Supercomputing Applications (NCSA)
to support Earth science data from NASA's Earth Observing System (EOS). The specific data structures that contain scientific data are: grid, swath, area average, and range.
Lets know how to open the file and read some important information.
```
import h5py
fname = r'MOP03J-20100801-L3V5.2.3.he5'
ff = h5py.File(fname, 'r')
```

Studying the structure of the file by printing what HDF5 groups are present

```
for key in ff.keys():
    print(key)
```
#Names of the groups in HDF5 file.
#Extracting the data

#Get the HDF5 group
```
group = ff[key]
```
#Checkout what keys are inside that group.
```
for key in group.keys():
    print(key)
```

Its my first post. Roast me.
Clean Code, a book programmers MUST read
Tags: cleancode, programming, productivity, codequality
Published: 2022-12-25 20:15:26

Starting my developer career I experienced a really good interaction with the team where we were proposed to read a book and weekly we discuss about it. We're currently at the 14th chapter - **Successive Refinement**
This chapter is interesting as it is a show case and validates almost all rules said up to now. Uncle Bob - writer friendly nickname - brings his engineering process from a class that handles string of arguments and extract from the text booleans, sub strings and integers.

At the start, only booleans were being extracted and validated from the string.

At this point, even though the code is in Java, we can see clearly somethings taught by the book very important to code structure and readability:

- Well named/positioned variables/methods;
- Methods intent very clear;
- Cohesion is very good, also vertical distribution, for example, when a function calls another, this other is written next to its usage.   
    Following a comprehensive sequence and clearly naming pattern allows the reader to understand what’s being done and prevent the need to “lost scrolls” through the code looking for anything. A _well written prose_, as it’s called on the book;
    
- Error handling is well defined and messages shows clearly what is wrong;

When he starts to handle more types, the code starts to grow and repeat it self with few changes. Here he emphasizes how a programmer needs to know when it’s time to stop adding features and start some refactoring, he says:
→ _Many different types, all with similar methods — that sounds like a class to me_

So he starts to separates responsibilities as types handling and content validations to another class, and so on.

I though as very rich conclusion, even tough reading pages and pages of Java code without IDE highlight was hard, the message was clear.

While reading, I took note of concepts learned and I intend to bring some show cases too about it using newer technologies other them Java. I want to build a knowledge base with concepts from the book, coming soon.
No code mobile app? BravoStudio is the answer
Tags: zerocode, airtable, figma, bravostudio
Published: 2022-12-25 19:45:26

BravoStudio is a zero code tool that allows you to obtain iOS and Android apps starting from a prototype.
I find it to be a great tool to get POC for your projects and to show to the customers a really working app.

Combining it together with other tools such as Figma and AirTable, you get an app that allows you to show not only the navigation between the various sections, but also to view and even send data to external services.

An example? Let's say we are drawing a mobile app interface with Figma, consisting of two screens:

- one with a list of items, for example for a todo-list of operations to be divided among colleagues in the office

- one with a form, for example to create a new item in the list

complete with keys and navigation between them.

Let's then create a table on AirTable that allows you to record the items in the list. Using AirTable to save data allows it to be easily displayed on a completely stand-alone web page, for example to display on a monitor hanging in a common room, quick to implement with typescript frameworks or alternatively with other zero code tools.

Well, BravoStudio fits in between Figma and AirTable: it feeds the Figma project, connects it to the specific AirTable apps and allows you to generate an application that can be installed on a mobile device, even publishable on the stores.

it is possible to obtain such a POC in a few hours of work.

This set of tools can be used for any project in reality but in my opinion the purpose and the target must be considered.

I definitely recommend it for a POC or an MVP or for projects where a temporary use of the solution is expected. I haven't had experience with more complex projects yet, where for now I prefer to have more control by writing all the code and being able to manage it as I prefer.

For more information: 
[BravoStudio](https://www.bravostudio.app)
[Integration with Figma tutorial](https://www.figma.com/community/file/1037076871042398895)
[AirTable](https://airtable.com)
[Airtable basics for Bravo Studio](https://www.youtube.com/watch?v=N3_fmexrxIs&ab_channel=BravoStudio)
How to write a research paper in artificial intelligence, machine learning, and deep learning field step-by-step guidance.
Tags: machinelearning, deeplearning, datascience, researchpaper
Published: 2022-12-25 18:54:28

**Hii!, I and many others want to write a research paper but they are not able to write bcoz of unfair guidance and lack of knowledge and confidence here I have provided seven steps you can follow in order to write a research paper.**

### Step 1: Choose a topic

Before you start writing your research paper, it is important to choose a topic that is relevant and interesting to you. Consider what aspect of artificial intelligence, machine learning, or deep learning you want to focus on and try to narrow it down to a specific research question or hypothesis.

### Step 2: Conduct a literature review

Once you have chosen your topic, you need to conduct a literature review to familiarize yourself with the existing research in the field. Use academic databases and other sources to find relevant papers and articles that have already been published on your chosen topic.

### Step 3: Define your research question or hypothesis

Based on your literature review, you should be able to define your research question or hypothesis. This will be the main focus of your research paper and should be clearly stated in your introduction.

### Step 4: Determine your research methods

Next, you need to decide on the research methods you will use to collect and analyze data. This could include experiments, surveys, or other methods that are appropriate for your research question or hypothesis.

### Step 5: Collect and analyze data

Using the research methods you have chosen, collect and analyze data that will help you answer your research question or test your hypothesis. This may involve using machine learning algorithms or other statistical techniques to analyze your data.

### Step 6: Write your research paper

Once you have collected and analyzed your data, you can start writing your research paper. Follow the standard structure of a research paper, including an introduction, literature review, methodology, results, and conclusion. Be sure to include references to the literature you reviewed and any relevant findings from your own research.

### Step 7: Edit and revise

Before you submit your research paper, be sure to edit and revise your work to ensure it is clear, concise, and well-written. You may want to have a colleague or mentor review your work to provide feedback and help you improve your paper.

# **If anyone has suggestions on this topic you are welcome with an open heart…❤️❤️😍😍**


<a href="https://www.buymeacoffee.com/anurag629" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
Key Concepts in Database Management: A Beginner's Guide
Tags: sql, dbms, webdev
Published: 2023-05-20 16:53:47

---
title: Key Concepts in Database Management: A Beginner's Guide
published: true
date: 2022-12-25 18:53:42 UTC
tags: sql, DBMS, webdev
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zwgo5odfzfz9pkfejush.png
canonical_url: https://krishnakumar.hashnode.dev/key-concepts-in-database-management-a-beginners-guide
---

### what is key in DBMS?

A Key is a field or set of fields used to uniquely identify any record or row of data from a table and establish a relationship between tables. There are several types of keys that can be used in DBMS including:

- Primary Key

- Foreign Key

- Composite key

- Candidate key

- Alternate key

- Surrogate key

### Primary key

A primary key is an attribute or column that can uniquely identify each row or record of a table. It can not contain a null value, and there can be only one primary key per table.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1671985886109/8b0c3203-8a8d-4d4d-8a40-b1f7e46ee542.png)

### Foreign Key

A foreign key is a field or attribute in one table that refers to a primary key in another table. It is used to establish the relationship between two tables and can be used to enforce data integrity.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1671991339362/ad5a23e9-b19f-4395-8239-bdc3694032bd.png)

### Composite key

A composite key made by more than one attribute or column that can uniquely identify a row in a table. It is used when no single column can identify a row in the table.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1671992200717/288f952d-47d9-49ae-ad6e-b8c38d2c965c.jpeg)

### Candidate key

A candidate key is an attribute or set of attributes that could be used as a primary key. A table can have multiple candidate keys, but only one of them can be chosen as a primary key.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1671992859435/f90e1c4c-e1b5-49ec-bdd3-a32d1b880d52.jpeg)

### Alternate key or Secondary key

An alternate key or secondary key is a candidate key that is not used as a primary key, but that can still use to uniquely identify a row in a table.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1671993240662/47f284d3-1ce7-4d23-a8d3-6d3e16b3d1e1.png)

### Surrogate key

A surrogate key is a synthetic primary key that is used to uniquely identify a row in a table. it is typically an auto-incrementing integer or random alphanumeric string. And it is used when the natural primary key is not able to identify a row in a table.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1671993956781/1c874122-fff8-4ebf-b87f-3e994eb7481e.png)
Dockerizing Your Code: A Step-by-Step Guide
Tags: docker, devops, webdev, javascript
Published: 2022-12-25 18:44:58

Are you tired of manually installing dependencies and configuring environments every time you want to run your code on a new machine? Docker can help!

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

Docker is a tool that allows you to package your code and its dependencies into a container, which can then be easily run on any machine with Docker installed. This can save you a lot of time and effort, and make it easier to share and deploy your code to different environments.

In this post, I'll walk you through the basic steps for dockerizing any piece of code.

1. Create a Dockerfile: This is a configuration file that specifies the base image and any dependencies or commands needed to build and run your code.

2. Build the Docker image: Use the `docker build` command to build an image from your Dockerfile. This will create a snapshot of your code and its dependencies, which can then be used to run your code in a container.

3. Run the container: Use the `docker run` command to start a container based on your image. This will execute your code and any commands specified in your Dockerfile.

Let's walk through an example of dockerizing a simple Python script. First, create a file called `Dockerfile` with the following contents:

``` docker
FROM python:3.8
COPY script.py .
CMD ["python", "script.py"]
```

This Dockerfile specifies that we want to use the Python 3.8 base image, and that our script is called `script.py`. It also specifies that `script.py` should be run when the container is started.

Next, build the Docker image by running the following command:

```cmd
docker build -t my-image .
```

This will create an image called `my-image` based on the contents of your Dockerfile.

Finally, run the container by using the following command:

```cmd
docker run my-image
```
This will start a container based on the `my-image` image, and execute `script.py` inside the container.

That's it! You've successfully dockerized your code.

There are many other benefits to dockerizing your code, such as the ability to isolate your code from the host system, and the ability to easily share and deploy your code to different environments. Using a continuous integration and deployment (CI/CD) tool can also make it easier to automate the process of building and deploying your code.

So if you want to make your life easier and save time when working with code, give dockerizing a try!

I hope this post has been helpful. Let me know if you have any questions or comments.
Top 5 amazing websites to get free web fonts 🤩🧵
Tags: webdev, devfasttt, beginners, design
Published: 2022-12-25 18:38:25

## 1. Google Fonts 
http://fonts.google.com
This is a classic one, almost everyone who has ever been in the web dev industry, has used The Google fonts website atleast once! 
If you haven't already, this one is an absolute classic.
Google fonts is a high-quality library of over 1474+ open source font families and APIs for convenient use via CSS and Android.

## 2. Fonts.com
http://fonts.com
The Fonts.com store  offers more than 150,000 desktop and Web font products for you to preview, purchase and download. There are also over 1,300+ free font families that can be filtered by font weight, width, language etc.

## 3. Dafont Free
https://www.dafontfree.io/
This library is actively offering over 180000+ free fonts just for you to download. With Dafont Free, you can browse fonts by alphabetical listing, categories and more. Above all, Dafont Free is absolutely free for both Personal & Commercial Use. So what are you waiting for? Check it out now!!

## 4. 1001 Fonts
http://1001fonts.com
This amazing library offers over 41988+ free fonts in 23564 families. You also get Free licenses for commercial use and Direct font downloads. It is compatible with Mac, Windows & Linux!
You can even submit a font or get together with the wonderful community. Personally speaking, this is a must try for all junior devs out there!

## 5. FontSpace
http://fontspace.com
With over 1,00,000+ Free Fonts and Free downloads of legally licensed fonts that are perfect for your design projects, this website also provides 15 fresh, handpicked font picks for you each month so that you don't ever run out of the tons of fonts offered!


Did we miss out something? Share your 💭💭 in the comments 🤩 below! 👇👇 We'll be waiting for your thoughts!
Understanding AWS Cloudformation StackSets
Published: 2022-12-25 18:34:39

AWS CloudFormation StackSets enable you to create and manage CloudFormation stacks in multiple accounts and regions from a single CloudFormation template. This can be useful for deploying infrastructure and applications to multiple accounts or regions in a standardized and automated way.

In order to use StackSets, you need to have the necessary permissions in all of the target accounts and regions. You also need to create a CloudFormation template that defines the resources that you want to create in each target account and region.

Here is an example CloudFormation template that creates an Amazon S3 bucket in each target account and region:

```
AWSTemplateFormatVersion: '2010-09-09'
Description: Create an S3 bucket in each target account and region
Resources:
  S3Bucket:
    Type: AWS::S3::Bucket
    Properties:
      BucketName: my-bucket
      VersioningConfiguration:
        Status: Enabled

```
To create a StackSet, you can use the AWS Management Console, the AWS CLI, or the CloudFormation API. Here is an example of how to create a StackSet using the AWS CLI:

```
aws cloudformation create-stack-set \
  --stack-set-name my-stack-set \
  --template-body file://template.yaml \
  --administration-role-arn arn:aws:iam::123456789012:role/AWSCloudFormationStackSetAdministrationRole \
  --execution-role-name AWSCloudFormationStackSetExecutionRole

```

This command creates a StackSet with the name "my-stack-set" using the template in the file "template.yaml". The "administration role" is used to manage the StackSet, and the "execution role" is used to create and manage the stacks in the target accounts and regions.

To deploy a stack from the StackSet to a target account and region, you can use the "create-stack-instances" command:

```
aws cloudformation create-stack-instances \
  --stack-set-name my-stack-set \
  --accounts 123456789012 345678901234 \
  --regions us-east-1 us-west-2 \
  --operation-preferences FailureToleranceCount=1 MaxConcurrentCount=2

```
This command creates stack instances of the StackSet in the specified accounts and regions, using the specified failure tolerance and concurrency settings.

You can also use CloudFormation StackSets to update or delete stacks in multiple accounts and regions. For example, you can use the "update-stack-set" command to update the CloudFormation template or parameters of the StackSet, and the "update-stack-instances" command to update the stacks in the target accounts and regions.

In summary, AWS CloudFormation StackSets provide a convenient way to deploy infrastructure and applications to multiple accounts and regions in a standardized and automated way. They can be managed using the AWS Management Console, the AWS CLI, or the CloudFormation API.
Is AI the End of Traditional Programming?
Tags: ai, chatgpt, programming, career
Published: 2022-12-25 17:07:39

Artificial intelligence (AI) has made its way into nearly every industry, including software development. Some have wondered whether traditional programming will become obsolete as AI technologies advance.

In this blog post, we’ll define AI and traditional programming, provide examples of AI’s use in software development, discuss the challenges and ethical concerns associated with AI in software development, and consider the potential future role of traditional programming in a world where AI is becoming more prevalent.

## AI vs. Traditional Programming

First, let’s define AI and traditional programming.

AI refers to the ability of computers and machines to perform tasks that would typically require human intelligence, such as learning, problem-solving, and decision-making. On the other hand, traditional programming involves writing code in a specific programming language to create software applications.

## How AI is used in software development
Now, let’s look at examples of how AI is used in software development.

One way AI is utilized is through code completion, where AI algorithms can suggest code snippets to programmers as they write code. AI can also detect code bugs, suggest fixes, and assist with natural language processing tasks, such as generating code from natural language descriptions.

## Pros and cons of AI in software development
The potential benefits of using AI in software development include increased efficiency and accuracy. However, using AI in software development also has challenges and ethical concerns. One challenge is the need for large amounts of data to train AI algorithms, which can be a barrier for smaller organizations. Additionally, there is the potential for bias in AI algorithms if the data used to train them is biased. Ethical concerns surrounding the use of AI in software development include the potential impact on employment and the need for responsible use of AI.

So, what does the future hold for traditional programming in a world where AI is increasingly prevalent in software development? It’s essential to consider both the pros and cons of relying on AI versus traditional programming. On the one hand, AI can improve efficiency and accuracy in software development. On the other hand, traditional programming allows for more control and customization in the development process. Ultimately, AI and standard programming will likely continue to play a role in software development, with the balance between the two shifting over time.

## Conclusion
In conclusion, AI is not the end of traditional programming but is changing how software is developed. While AI has the potential to improve efficiency and accuracy in software development, there are also challenges and ethical concerns to consider. The future role of traditional programming in a world where AI is increasingly prevalent remains to be seen. Both AI and standard programming will likely continue to coexist and evolve together.
One-page HTTP/REST cheat sheet
Tags: interview, cheatsheet, http, rest
Published: 2022-12-25 18:01:54

Hello everyone 👋

I am glad to present you with the One-page HTTP/REST cheat sheet.

Link (google doc): [One-page HTTP/REST cheat sheet](https://docs.google.com/document/d/10mMOFxPX5sCPUubqxgeTWbhrpVXY51WLI3m9bZG03Fc/edit)

Feel free to leave your comments on the google doc or below the post.