teleren/devto huggingface dataset:
Task-Force Week 3 
Tags: bootcamp, awesomitylab, coa, knowledge
Published: 2022-03-06 09:57:31

This week we bigged deeper into effective communication, where we looked at different cultures and how to bring the best from each (inter-cultural communication).

## StereoTypes
![SteroeTypes Illustration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m7lpvj12r71wue4nk8b3.jpeg)
 
I was aware of different cultures but I hadn't really considered how it could affect a formal or non-formal relationship between people.

My parents raised me to be accepting of people no matter their appearance. If I had some stereotypes (a belief about a particular category of people) feelings towards, I should always be open to change, commit to knowing the person first, and always focus on what makes people similar to people different.

This is done by putting yourself in someone else's shoes and thinking for a second (how would it make me feel if the tables were turned). after that emotional step in the right direction, it leads you to some good topics and away from harmful conversation topics.

when you make the other party feel valid and safe, he/she will open up, and you'll both have effective communication.
When you get past the stereotypes barrier, Then you can get quickly to the best next part about sharing your information.

## Values
![Core Values](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xz36qlax258q37yqxv7n.jpg) 

Your values are the things that you believe are important in the way you live and work.
Value is a big part of people, some are tough them from the childhood to their current age. values  (should) determine your priorities, and, deep down, they're probably the measures you use to tell if your life is turning out the way you want it to.

When the things that you do and the way you behave match your values, life is usually good – you're satisfied and content. But when these don't align with your personal values, that's when things feel... wrong. This can be a real source of unhappiness.

In these types of situations, understanding your values can really help. When you know your own values, you can use them to make decisions about how to live your life, and you can answer questions like these:
What job should I pursue?
- Should I accept this promotion?
- Should I start my own business?
- Should I compromise, or be firm with my position?
- Should I follow tradition, or travel down a new path?

So, take the time to understand the real priorities in your life, and you'll be able to determine the best direction for you and your life goals !
More on input tag!
Tags: html, programming
Published: 2022-03-06 09:51:29



**These are some types of input tag which are really helpful for developing amazing web pages (mostly in making forms or signup)**

**1. Type = "text"**
```
<input type="text"></input>
``` Defines a simple box for text input, basically used only to insert texts.

**2. Type = "password"**
 ```
<input type="password"></input>
```Defines a password field,where input text will show as "******".

**3. Type = "email"** 
```
<input type="email"></input>
``` Defines a field for an e-mail address, senses automatically when submitted.

**4. Type = "number"**
```
<input type="number"></input>
``` Defines a field for entering number, where you can set 
    max - specifies the maximum value allowed
    min - specifies the minimum value allowed
    value - Specifies the default value.

**5. Type = "color"** 
```
<input type="color"></input>
``` Defines a color picker option on the web page for user to change the color or background-color of any element on of DOM using javaScript (The default value is always #000000 (black))

**6. Type = "file"** 
```
<input type="file"></input>
```  Defines a file-select field and a "Browse" button for file uploads(used for making forms).

**7.Type = "date"** 
```
<input type="date"></input>
``` Defines a date picker,The field includes year, month, and day.

**8. Type = "checkbox"**
```
<input type="checkbox"></input>
``` Defines a checkbox for the users to check whether the option will applied or not.(used to make forms)

**9. Type = "radio"** 
```
<input type="radio"></input>
``` Defines a radio button for the users to choose which all options he wants to be applied.(used to make forms).

**A BONUS TIP ABOUT A TAG WHICH EVERY DEVELOPER SHOULD KNOW ABOUT.**

**#PROGRESS TAG**
The progress that is used to add a progress bar on a web page which is used to add a skill bar option on any portfolio.

```
<label for="skills">Designing Skills:</label>
<progress max="100" value="50"> </progress> 50%
```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7on0c0yv98ne73mjd5p5.png)
Task force 5.0 Week three recap{stereotype}
Published: 2022-03-06 09:39:51

Another week of happiness and challenges, we started with values where we sow code of Africa values and why they took that values.
This week we get into stereotype for deference cultures, for myself  I sow that stereotype can be miss understanding to difference people where we can do sign or gestures to mean something where  on other hand means dad thing.
This showed me that first thing to understand and communicate with new people with difference cultural is to first make research on their cultural so that you can not make a mistake through the first impression.
The biggest challenge I meet this week was the preparation of presentation where we had short time to make it. 
It was a challenge to as it was technical skills to make it so that any challenging question on that stage I was not able well to answer them.
But all in all I tried hard to overcome those questions and Kagabo helped us to.
But it was good experience to overcome that challenge to learn quickly and deliver some of the given content.
We also continued deep in cultural awareness where we sow much how we think difference opinions 
As the fact and opinions with searching more information on difference point.
We also sow about database structure of the system we will build through this taskforce we designed the structure of the system.
All in all this week was challenging week but more experienced through many things but mainly values and communication I sow that to communication well first to research on the people’s cultural so that I can not make a mistake thinking am doing good.
Thanks to Task Force   #CoA and #Awesomity Lab.
Week 3 of TaskForce 5.0 reflections
Published: 2022-03-06 09:24:37

> A nation’s culture resides in the hearts and in the soul of its people.

Mahatma Gandhi

This quote perfectly demonstrates how multiple layers of culture exist and how it is important to be aware of these layers to be able to understand different cultures.

![Layers of culture](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y93cnc7i1lcawlmallpv.png)
 

The drawing is based on Schein's model of organizational culture. 

Some of these cultural traits can be identified through basic observation but the most important parts cannot be easily identified.

For example, a culture's fundamental values can only be identified through interaction over an extended period of time.

Being aware of these layers allows us to take time and understand a culture that we are not accustomed to. Which also has another hidden benefit, it helps us get rid of stereotypes that are more harmful than good.

Personally, this lesson was an eye opener. I admit, I had many stereotypes and it is going to take a lot of time and work to get rid of them but as humans we learn and we grow.

One way I am going to use is to be more open-minded about new cultures, exploring and learning more about them and be willing to admit and apologize when I offend a person from a different culture.

Another lesson from this week that will help me on this journey was about conflict resolving. My favourite is discussion as a way of conflict resolution because it allows for more personal engagement. There are many cases where it wouldn't work so don't just take my word for it.

Hold on, this is the TaskForce so where is the technical part?

We had a lot of technical sessions but they were more focused on getting the team up to speed on technologies used by Awesomity Labs and Code of Africa.

All in all, it was another successful week which makes it 3/3. Yay 3 more to go.
Best Messagebox features in python
Tags: python, beginners, programming, tutorial
Published: 2022-03-06 09:17:39

Features we want teach you on this post:
- Show warning
- Show error
- Ask cancel
- Ask yes no
- Ask retry cancel


1.Show warning


```python
from tkinter import *
from tkinter import messagebox
window = Tk()
messagebox.showwarning("Warning","Warning")  
window.mainloop()
```

output:

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




2.Show error


```python
from tkinter import *
from tkinter import messagebox
window = Tk()
messagebox.showerror("Error","Error")  
window.mainloop()
```

output:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/72bt2jwmva5qe1z8gdqs.jpeg)
 



3.Ask cancel


```python
from tkinter import *
from tkinter import messagebox
window = Tk()
messagebox.askokcancel("askokcancel","askokcancel")  
window.mainloop()
```

output:




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



4.Ask yes no


```python
from tkinter import *
from tkinter import messagebox
window = Tk()
messagebox.askyesno("askyesno","askyesno")  
window.mainloop()
```

output:




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




5.Ask retry cancel


```python
from tkinter import *
from tkinter import messagebox
window = Tk()
messagebox.askretrycancel("askretrycancel","askretrycancel")  
window.mainloop()
```

output:




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5v81i422isn7ojv4sc4o.jpeg)
 


1.Like
2.Comment
3.Follow me
Icyumweru cya gatatu at TaskForce
Tags: awesomity, taskforc, codeofafric, culture
Published: 2022-03-06 09:14:35

You might be wondering what does the title mean? what does "Icyumweru cya gatatu" mean? Well it means "third week" in Kinyarwanda. So the title is “third week experience at TaskForce”. But why mix different languages? Why don't I just use English and make life easy? But to a Kinyarwanda only speaking person they might be wondering what does "at TaskForce"? They may also ask the same "why not use Kinyarwanda and make life easy?". This is the dilemma that arises when you communicate with people from different cultures. Which brings in the take of this week at TaskForce: Culture Awareness.


![diversity](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qh1vzyuipxbw7wkiojcf.png)
>Cultural awareness is the understanding that our own culture differs from one individual and group to the next, and specifically from our target language.

What I learnt this week was the importance of self awareness being aware of who you are, and how your culture influences the way we interact and how we behave. Which is different from the way others are. And always be willing to learn other people's culture and respect it.

The biggest challenge this week was the Friday presentation. We had to come up with something special and working as a big team with different ideas was a bit challenge.


![I am right](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qb09vu9uayrrwkt6fohm.jpeg)

The way we worked on it was to chose a leader among ourselves. Making sure everyone has their ideas considered and making compromises where necessary. None was entitled to their opinion. The culture awareness and communication skills really helped a lot in that. And we were happy with the final presentation we made.

![happy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k7lbi5edk8op27revvk3.jpg)

As a conclusion, differences and similarities can co-exist. We should always appreciate other people's culture. We can always find differences but we should focus on the similarities. I am really learning a lot of useful and interesting things at Taskforce. Can't wait for what's coming up next. Thank you for your time. See you on the next one.

![Thank you](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/26rkvevxuy4ljrqczyls.jpeg)
Azure Trial Hackathon - Mini Pinterest with Flask
Tags: azuretrialhack, python, flask, azure
Published: 2022-03-06 09:09:48

 ---
title: Azure Trial Hackathon - Mini Pinterest with Flask
published: true
description: My submission to the Microsoft Azure Trial Hackathon on DEV!
tags: azuretrialhack, python, flask, azure
---

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


### Overview of My Submission
[Note]: # (Please make sure the project links to the appropriate GitHub repository, and includes the [Apache-2 permissive license](https://www.apache.org/licenses/LICENSE-2.0)  and README.)
Hi guys, have you ever thought about creating a simple web application to enable saving, sharing and discovery images on a smaller scale in form of pinboard by leveraging the services in Azure ?
Here we bring you our project, called MiniPinterest. This is a web application that has all the features mentioned above. We can add images, edit and delete them on it. Image information is searched through captions and name tag, using Computer Vision in analyzing the image and its content to find similar content.

Live demo at: https://lmh-pinterest.azurewebsites.net

### Submission Category: 

[Note]: # (AI Aces, Computing Captains, Low-Code Legends, Java Jackpot, or Wacky Wildcards:)
The category for this project is: **AI Aces**.
We are using Azure Computer Vision API.

In addition, to publish the webapp on Production, we are using an Azure App Service for deploying, PostgreSQL for Database and Azure Blob Storage for storing images.

![Azure services](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fsx6l5rh4e93wnr9uxn0.png) 
 

### Link to Code on GitHub

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% https://github.com/hungle00/flask-mini-pinterest %}` to share a GitHub repository)
{% embed https://github.com/hungle00/flask-mini-pinterest %}
[Note]: # (Your repository must include a README)
[Note]: # (You must use and list a permissive license for your code: MIT, Apache-2)


### Additional Resources / Info

#### Screenshot on app
Here is show pins page:
![Show pins](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ea7lzmb8f0794qanvwj5.png)
Here is a demo video to show how this app works:
{% youtube https://youtu.be/a03JosCjZAk %} 
 
 

#### Members

- hungle00 - https://github.com/hungle00
- evil-nerver-die - https://github.com/evil-nerver-die

[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. DEV will not split prizes as per our rules)
Interface and DB in golang
Published: 2022-03-06 09:04:19

As implement hexagonal pattern (Ports and adapters pattern), our code should separate to three sections
1. **API** (Application Programming Interface) such your inbound (Gin, Echo, Fiber ...), Serialization or something else
2. **Domain**, **Entity** or something else that make your app unique
3. **SPI** (Service Programming Interface) such as external service, DB, DAO (Data Access Object) or something else


Example with below code, This will show relation with ***My Entity (Todo) and SPI(Database Insert)***
1. Entity -> **Todo** struct
2. Port -> **TodoHandler**
3. Adapters -> **todoAdapter** interface, **MySQLDB** and **MongoDB** struct

```go
package main

import (
	"log"

	"go.mongodb.org/mongo-driver/mongo"
	"gorm.io/gorm"
)

type Todo struct {
	ID          string
	Title       string
	Description string
}

type todoAdapter interface {
	Create(*Todo) error
}

type TodoHandler struct {
	adapter todoAdapter
}

type MySQLDB struct {
	db *gorm.DB
}

type MongoDB struct {
	db *mongo.Collection
}

func NewTodoHandler(adapter todoAdapter) *TodoHandler {
	return &TodoHandler{adapter: adapter}
}

func (db *MySQLDB) Create(todo *Todo) error {
	log.Println("🐟 MySQL Create Interface")

	// in real example, you can comment out below code
	// err := db.db.Create(todo)
	// return err

	return nil
}

func NewMySQLDB(db *gorm.DB) *MySQLDB {
	return &MySQLDB{db: db}
}

func (db *MongoDB) Create(todo *Todo) error {
	log.Println("✅ MongoDB Create Interface")

	// in real example, you can comment out below code
	// _, err := db.db.InsertOne(context.TODO(), todo)
	// return err

	return nil
}

func NewMongoDB(db *mongo.Collection) *MongoDB {
	return &MongoDB{db: db}
}

func main() {
	var todoHandler *TodoHandler

	// Todo insert with MySQL
	mysqlAdapter := NewMySQLDB(&gorm.DB{})
	todoHandler = NewTodoHandler(mysqlAdapter)
	todoHandler.adapter.Create(&Todo{
		ID: "1", Title: "New note", Description: "Save in mysql",
	})

	// Todo insert with MongoDB
	mongoAdapter := NewMongoDB(&mongo.Collection{})
	todoHandler = NewTodoHandler(mongoAdapter)
	todoHandler.adapter.Create(&Todo{
		ID: "1", Title: "New note", Description: "Save in mongo",
	})
}

```

In the example, you will see two adapters should implement Create method to related with adapter interface

And result will be like this
```bash
2022/03/06 15:35:46 🐟 MySQL Create Interface
2022/03/06 15:35:46 ✅ MongoDB Create Interface
```
how to Get current time with python
Published: 2022-03-06 08:54:42

## Get current time with python time module

```
import time
print(time.time())
1586813438.419919
print(time.ctime())
Mon Apr 13 23:30:38 2020
```

## Get current time with python datetime module

```
import datetime
print(datetime.datetime.now())
2021-11-13 23:30:38.419951
print(datetime.date.today())
2021-11-13
```

## Get current time with python os module

```
import os
os.system('date')
Sun Feb 20 10:12:36 UTC 2022
os.system('date +"%Y-%m-%d %H:%M:%S"')
2022-02-20 10:30:09
```

[3 ways to get the current time in python](https://www.howtouselinux.com/post/3-ways-to-get-the-current-time-in-python)

[10 tips to use Python OS module](https://www.howtouselinux.com/post/10-tips-for-mastering-the-os-module-in-python)
Startup guide of Jest for testing your javascript code. (Beginner)
Tags: javascript, codequality, beginners, tutorial
Published: 2022-03-06 08:52:00

The purpose of writing this article is to clarify that when a newbie learns javascript he goes through many concepts. But he doesn't know how to test code or doesn't have any idea about code testing. Today, I will make you understand how you can start learning javascript as well as writing test code also. So that, from the start phase you are confident about your code.

  _**Today's Topics**_

1. create package.json
2. intalling jest via npm
3. configuration for running test
4. write function & test it.

Don't be panic, this article is very practical.
 

**Step 1 : Create `package.json`** 

> _What is package.json ?
> Metadata that is specific to the project.  It contains a collection of any given project's dependencies. A web application is used to identify the project and acts as a baseline for users and contributors to get information about the project_


To create a `package.json` you must have to install `nodejs` on your machine that's all. If you don't have `nodejs` installed go to this website and install it. Then open an empty folder in vs code, open terminal type npm init -y. After executing this command you can see a file is created named `package.json`. 😀 Dig more into understanding `package.json` [click here](https://docs.npmjs.com/cli/v8/configuring-npm/package-json)

**Step 2 : Install `jest via npm`**

This is the simpliest way through this step. go go the existing terminal and type `npm install --save-dev jest`.

**Step 3 : Configuration for running test**

* update your `package.json`'s scripts section like this, <br>

```
 "scripts": {
       "test":"npx jest --watchAll"
  },
  "jest": {
    "testEnvironment": "node"
  },
```

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

That's all for now.

**Step 4 : writing function & test it**
 * Make a file like `script.js`
 * Also make a file `script.test.js`

For example,

```
scripts.js

function sum(a, b)
{
    return (a + b);
}

module.exports = sum;
```

```
script.test.js

const sum = require('../script')


test('Sum of (1,1) = 2', () =>
{
    expect(sum(1, 1)).toBe(2);
})
test('Sum of (2,3) = 5', () =>
{
    expect(sum(2, 3)).toBe(5);
})

test('Sum of (3,7) = 10', () =>
{
    expect(sum(3, 7)).toBe(10);
})

```

After writing your function & tests code. Go to `terminal` and run `npm run test`. You can watch something like this ,

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2em2f5ab78vzge5lgj1g.PNG)


Cool 😎 huh ! 
Yes, now you got the point that I want to share with you.
From today try to build up writing tests for your code & understand your code better. 💖


Signing off.
Sefat
Getting started with Apache APISIX
Tags: devops, programming, opensource, kubernetes
Published: 2022-03-06 08:50:53

The role of an API gateway in building large-scale, cloud-native Microservices APIs is sometimes important. It provides rich traffic management features such as monitoring, load balancing, dynamic upstream, caching, canary release, circuit breaking, authentication, observability, and more. An API gateway will introduce these concerns, allowing your Microservices to focus on the business task at hand. One of such top open-source API Gateways is [Apache APISIX](https://apisix.apache.org/). 

Apache APISIX is a dynamic, real-time, high-performance Nginx-based API gateway. You can use Apache APISIX to handle traditional north-south traffic, as well as east-west traffic between services. It can also be used as a k8s ingress controller.

By watching this video tutorial _Getting Started With Apache APISIX_, you will be able to run your first API Gateway instance on a local machine, will have knowledge about main concepts of Apache APISIX such as Route, Upstream and configure your first routing logic for your backend service. 
 
This Quick Start video tutorial is divided into the following three steps:

- [Install Apache APISIX](https://apisix.apache.org/docs/apisix/getting-started#step-1-install-apache-apisix) via Docker.
- Create a [Route](https://apisix.apache.org/docs/apisix/architecture-design/route), [Upstream ](https://apisix.apache.org/docs/apisix/architecture-design/upstream)service for your API Gateway with help of [Admin API](https://apisix.apache.org/docs/apisix/admin-api).
- Bind the route with the Upstream.
- Verify the result via Admin API of Apache APISIX.

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

Everything that is covered in the tutorial you can find on an official documentation and you can access that by going to [Apache APISIX](https://apisix.apache.org/docs/apisix/getting-started).

You want to learn more about Apache APISIX usage, go with me from a beginner to an expert, and more tutorials are coming soon.
Locust load testing k8s deployment
Tags: kubernetes, python, locustio
Published: 2022-03-06 08:22:36

Deployed locust load testing to test my web application using kubernetes clusters. I created two replica pods to run the application. The load test has both master and worker and CPU size are shared equally.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rngqp6vy2m1vyy7lwqxx.jpg)

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