teleren/devto huggingface dataset:
Why software engineering?
Published: 2021-06-30 16:20:57


	
 why not software engineering... with the world changing and becoming more "tech-based" everyday the opportunity to learn and create seem endless. 
                                                   
																									 
             - My top 3 reasons-
 
               1.Opportunity 
 From Medtech, security, creating new applications or webpages or really anything that utilizes technology there is an opportunity  to explore many different areas.  I think about how my career-oriented interests might grow and change within the span of my career and how being a developer has the potential to provide me with the ability to adapt and explore different areas within the field. 
					
	      2. Job security 
 From a tech perspective, the world is not changing. As technology develops there will always be a demand for people who know how to program it all! Even if working for a tech corporation isn't the desire, having the knowledge to create webpages, apps or programs that are desired by entrepreneurs can always be an option. 
						 
   3. Somewhere between creativity & knowledge 
   Maybe it's where creativity and knowledge meet...From a personal perspective I have always been a strong artist and in academics. When thinking about a career path I always struggled to find a way to keep and develop both of these strengths.  The more I learned about different languages and about the ways different developers approach situations I begin to appreciate how much creativity along with a devs knowledge can (literally) make or break what is trying to be accomplished.  From the front-end and back-end the creativity and knowledge needed to bring it all together is an exciting field to find yourself in.
Redraw a masterpiece with mosaic pictures
Tags: art, python, github, actions
Published: 2021-06-30 16:19:35

---
title: Redraw a masterpiece with mosaic pictures
published: true
description: I need you to participate to a cool experiment: redraw a masterpiece with mosaic pictures
tags: art, python, github, actions
cover_image: https://raw.githubusercontent.com/pgrimaud/pgrimaud/master/data/output.jpg
---

Today, my brilliant intern [@nispeon](https://twitter.com/nispeon) finished a small project I imagined last year: redraw a masterpiece with mosaic pictures.

## Explanation of the project

I created an exercice for him, to work with python, GitHub API and GitHub Actions.

**Main goal**: redraw a masterpiece with mosaic pictures.

We would have been able to use a random sample of pictures to do this exercice, but we thought it could be funny for visitors to check where's their avatar on the generated picture.

We found a nice project [Photomosaic generator](https://github.com/uvipen/Photomosaic-generator) by [Viet Nguyen](https://github.com/uvipen) to generate mosaic with pictures.

So we decided to re-use his code base which works perfectly.

## How is generated the picture?

Each day, the script will : 

- Fetch all stargazers of the repository using GitHub API
- Download avatar picture of all users
- Extract main color of each avatar picture
- Split origin picture into small parts of 30px
- Extract main color of each part of the origin picture
- Match color of each part with the color of an avatar and replace it on the origin picture
- Write the new picture on a folder
- Commit the picture generated using GitHub Actions

## How you can help

We will not add random people without permission, so if you would like to participate: you just have to star [this repository](https://github.com/pgrimaud/pgrimaud).

Why do you need to star to participate? Because it will be very easy to retrieve all avatars with GitHub API and automatically update the image every day.

The more stargazers we will get, more qualitative will be the output. We could also reduce the size of the avatars to get best definition.

## First result

Original picture :

![original picture](https://upload.wikimedia.org/wikipedia/commons/5/5b/Michelangelo_-_Creation_of_Adam_%28cropped%29.jpg)

Output picture :

![output picture](https://raw.githubusercontent.com/pgrimaud/pgrimaud/master/data/output.jpg)

Take a look at the [HD generated picture](https://raw.githubusercontent.com/pgrimaud/pgrimaud/master/data/output.jpg) and the [repository](https://github.com/pgrimaud/pgrimaud) 👀

What do you think about it?

&nbsp;
Pierre 🤖
&nbsp;

__
*[Connect with me on GitHub](https://github.com/pgrimaud)*
*[Connect with me on Twitter](https://twitter.com/pgrimaud_)*
Customize GitHub Profile with Decent theme
Tags: github, profile, markdown, webtechpie
Published: 2021-06-30 16:08:33

Github introduced a new feature, Where you can add personal information about yourself in your bio, projects you’ve contributed to, or interests you have that other person may like to know about.

## Do it in a minute
**If you’re in hurry or already aware of the markdown. You can skip all the steps.**

Just click on the [link](https://github.com/hidaytrahman/hidaytrahman/edit/main/README.md) , `copy` all and `paste` it to your repo in `yourREADME.md` file.

`github.com/<username>/<username>/README.md`

And start editing with your own information. 😉

### Or follow the steps
**If you are new and want to explore then follow the steps**

Let’s start with creating a new repo with the same username.

## Step 1
in my case, my username is `hidaytrahman`

create a repo with the same `username`

> {username}/{username}

`hidaytrahman/hidaytrahman`

## Step 2
create a `README.md` file.

Clone repo in local machine.

`git clone https://github.com/<username>/<username>.git`


## Step 3
open repo folder in `vs code` and `right-click` on the `README.md` file and click on `open preview`.

It’s time to start with the very first info, I will recommend adding a banner.

**Put the banner in the root folder of the `repo`.**

And use it with relative path

`![Your Name - Anything about your banner](banner.png)`


Write a bio about you and your primary skillset.


Let’s add **few gadgets**.

Add visitor info by using the below snippet and replace `hidaytrahman` with your `username`

`[![Visitor](https://visitor-badge.laobi.icu/badge?page_id=hidaytrahman.hidaytrahman)]`

`(https://img.shields.io/github/followers/hidaytrahman.svg?style=social&label=Follow)](https://github.com/hidaytrahman?tab=followers)`


```
[![Visitor](https://visitor-badge.laobi.icu/badge?page_id=hidaytrahman.hidaytrahman)](https://github.com/hidaytrahman)
[![GitHub followers]
```

```
(https://img.shields.io/github/followers/hidaytrahman.svg?style=social&label=Follow)](https://github.com/hidaytrahman?tab=followers)
```

The above snippet shows the visitors and followers.

Let’s add skills like (git, GitHub)

`![Git](https://img.shields.io/badge/-Git-05122A?style=flat&logo=git)&nbsp;`

```
![Git](https://img.shields.io/badge/-Git-05122A?style=flat&logo=git)&nbsp;
![GitHub](https://img.shields.io/badge/-GitHub-05122A?style=flat&logo=github)&nbsp;
```

You can put as many as you like, Put the exact name of the skills.

## Publish it :)

```
git add *
```

```
git commit -m "my decent profile"
```

```
git push origin main
```

That’s it!

Let’s visit the profile and check if everything works fine,

Customized it with your own style by exploring [markdown](https://guides.github.com/features/mastering-markdown/)


You can Visit my [profile](https://github.com/hidaytrahman) for the reference.

Thanks!
Web dev purely in Python
Tags: python, webdev, html, css
Published: 2021-06-30 15:54:40

Sierra is a micro templating engine for web frameworks in Python, bridging the gap between Python, HTML and CSS. You can basically do all of your web development solely in Python, taking full advantage of it's powerful functionalities. Functions, variables, loops, conditions - anything really you can do in Python, Sierra makes it easy to integrate with your web application. Plus, the syntax too, is really short and simple for every use case.

Here's the GitHub: https://github.com/BrainStormYourWayIn/sierra
Here's the doc: https://brainstormyourwayin.github.io/sierra.github.io/

Do have a look!
Kubernetes
Published: 2021-06-30 15:42:37

#!/usr/bin/python3
import subprocess
import cgi

print("content-type: text/html")
print()

f = cgi.FieldStorage()
cmd = f.getvalue("var")


lower_cmd = cmd.lower()
l_str = lower_cmd.split()

Filter=["k8s","kubernetes","provide","for","just","up","me","my","to","or","plzz","please","do","using",      "is","which","whose","has","can","could","pods","pod","you","u","port","number","no.","deployment","hi","a",
",","no","with","the","all","having","name","named","hello","hey","display","print","of","upto","deployments",
"image"]

for i in range(0,len(l_str)):
	if l_str[i] in Filter:
		l_str[i] = ""

j_str = " ".join(l_str)

j_str = j_str.split()

if ("create" in j_str or "deploy" in j_str or "launch" in j_str or "make" in j_str) and len(j_str)<4:
	command = "kubectl create deployment " + j_str[1] + " --image=httpd --kubeconfig admin.conf"

elif ("create" in j_str or "deploy" in j_str or "launch" in j_str) and (len(j_str)<5 and "id" in j_str):
	command = "kubectl create deployment " + j_str[1] + " --image=" + j_str[3] + " --kubeconfig admin.conf"

elif ("get" in j_str or "show" in j_str) and len(j_str)<2:
	command = "kubectl get pods --kubeconfig admin.conf"

elif "describe" in j_str:
	command = "kubectl describe pods --kubeconfig admin.conf"

elif "expose" in j_str:
	command = "kubectl expose deployment " + j_str[1] + " --type='NodePort' --port " + j_str[2] + " --kubeconfig admin.conf"

elif "cluster" in j_str or "cluster's" in j_str or "cluster-info" in j_str or "info" in j_str or "details" in j_str:
	command = "kubectl cluster-info --kubeconfig admin.conf"

elif ("replicas" in j_str or "replica" in j_str or "copies" in j_str or "copy" in j_str) and len(j_str)>3:
	command = "kubectl scale deployment " + j_str[3] + " --replicas=" + j_str[1] + " --kubeconfig admin.conf"

elif "scale" in j_str:
	command = "kubectl scale deployment " + j_str[1] + " --replicas=" + j_str[2] + " --kubeconfig admin.conf"

elif "delete" in j_str and ("svc" in j_str or "service" in j_str):
	command = "kubectl delete svc " + j_str[2] + " --kubeconfig admin.conf"

elif "delete" in j_str or "remove" in j_str:
	command = "kubectl delete pod " + j_str[1] + " --kubeconfig admin.conf"

elif "service" in j_str or "svc" in j_str or "services" in j_str:
	command = "kubectl get svc --kubeconfig admin.conf"

else:
        print("Check your command")



output = subprocess.getoutput(command)
print(output)
Thinking about Ternary Operators
Tags: functional, javascript, beginners, codenewbie
Published: 2021-06-30 15:38:45

This is sort of a more advanced topic, and I've been recommended not to worry about it too much. After all, you want to feel more comfortable with the basics before you simplify, and "simplification" can be a never-ending process.

That said, I know myself, and it's something I want to duck talk through so I can get back to the more important basics.

## Drinking Age

First, let me review a more traditional if / else statement:

```
var age = 22;
var canDrink;
     if (age > 21) {
          canDrink = 'yes';
     } else {
          canDrink = 'no';
     }
```
If someone is over 21, they can drink. If they're under, they can't. In this case we have someone who is 22, so they'll be okay.

Ternary Operators follow that logic too, but it manifests like this:

`condition ? expression_1 : expression_2;`

So using that drinking example:

```
var age = 22;
var canDrink = age > 21 ? 'yes' : 'no';
```
Makes sense, right? Let's try with one more example. 

## Higher Salary Justifies Gaming Purchase

Let's say I want to make a certain salary before I can justify buying a PlayStation 5. (Honestly, we need some actual good console-exclusive games first, but bear with me here.)

I tell myself that I *can't* justify buying a PS5 unless I make $70,000, and what if I make minimum wage?

```
var salary = 28000
var buyPlaystation = salary > 70000 ? 'yes' : 'no';
```

And one more time more traditionally:
```
var salary = 28000
var buyPlaystation;
     if (salary > 70000) {
          buyPlaystation = 'yes';
     } else {
          buyPlaystation = 'no';
     }
```

It can get even more mileage and usage than that, but this is a good digest for me now.

--- 
Photo by [https://photostockeditor.com](https://photostockeditor.com)
SVG Cleanup
Tags: javascript, webdev, svg
Published: 2021-06-30 15:37:13

---
title: SVG Cleanup
published: true
tags: javascript, webdev, svg
cover_image: https://res.cloudinary.com/dzynqn10l/image/upload/v1631846731/JS%20Bits/svg_cleanup_1_r0lfsz.jpg
---

Sometimes you'll look inside the markup of an SVG file and you'll see a TON of extra data that is almost definitely superfluous:

<img src="https://res.cloudinary.com/dzynqn10l/image/upload/v1625026983/JS%20Bits/svg-source_v10ikp.jpg" alt="svg-source" width ="594" />

I came across this great tool called [SVGOMG](https://jakearchibald.github.io/svgomg), by Jake Archibald, which lets you easily toggle SVG features like <b>doctype</b>, <b>comments</b>, <b>metadata</b>, etc. to reduce the file size:

<img src="https://res.cloudinary.com/dzynqn10l/image/upload/v1625026556/JS%20Bits/svgomg-1_gvllrn.jpg" alt="svgomg-1" width ="616" />

As you toggle options you'll see how much savings the new file will have. When you're done you'll be able to copy or download the smaller output:

<img src="https://res.cloudinary.com/dzynqn10l/image/upload/v1625026653/JS%20Bits/svgomg-2_k3jwlh.jpg" alt="svgomg-2" width ="616" />

I particularly love the realtime preview the tool has so you can see how the quality stays as you toggle options. And it's also great for devs like me who have OCD about unnecessary code! 🧼 

### Here's a quick video of how to use it:
<a href="https://www.tiktok.com/@js_bits/video/6979587421432286469" target="_blank">
  <img src="https://res.cloudinary.com/dzynqn10l/image/upload/v1631846731/JS%20Bits/svg_cleanup_1_r0lfsz.jpg" alt="SVG cleanup" width ="190" />
</a>

----------
Check out more #JSBits at my blog, [jsbits-yo.com](http://jsbits-yo.com/). Or follow me on [Twitter](https://twitter.com/JS_Bits_Bill) and [TikTok](https://www.tiktok.com/@js_bits?lang=en).
How to test your API with Hoppscotch
Tags: javascript, beginners, webdev, programming
Published: 2021-06-30 15:31:46

[You can read the full article on Aviyel](https://aviyel.com/post/206/how-to-test-your-api-with-hoppscotch)

In this article, I will show you how to interact with APIs by making requests while showing you some of the cool features of [Hoppscotch](https://hoppscotch.io/).

## Introduction to Hoppscotch

Hoppscotch is an online open-source API request builder built by [Liyas Thomas](https://github.com/liyasthomas) and [contributors](https://github.com/hoppscotch/hoppscotch/graphs/contributors) that helps you create requests faster, saving precious time on development. It is lightweight, effective, and efficient,

Hoppscotch is a totally free open-source project.

Hoppscotch has a low processing demand because it can run simply on the browser.

Hoppscotch is supported by a wide range of browsers and devices, plus it can be installed as a PWA (Progressive Web App), making it even accessible.

Hoppscotch offers [multiple features](https://github.com/hoppscotch/hoppscotch#features) though, in this article, we shall focus on using it as a testing tool for APIs.

## What is an API?

API is the acronym for Application Programming Interface, a software intermediary that allows two applications to talk to each other. It is often a set of functions that allows applications to access data and interact with external software components, operating systems, or microservices.

A great analog used to describe APIs and what they do is a restaurant. In this analogy, the following roles are assigned:

* **API**: acts as the waiter that serves you.

* **Order**: acts as the API Request, where data to be fetched or action to be triggered is specified.

* **Chef**: acts as whatever external component you are trying to interact with, also provides the API.

* **Meal**: data gotten from the external Component.

When you step into a restaurant, you inform the waiter (API) of your order (API request), and the waiter communicates your order to the Chef (external component). After a hopefully short period of time, the waiter returns with your meal (Data).

The same way a chef provides you with a waiter is the same way companies provide you with an API to communicate how you want to use their services & the data you need from them.

Now that you have a good idea of what APIs are and what they do, let’s dive into the basics of API using [Hoppscotch](https://hoppscotch.io/).

## Introduction to API Basics
You can read the rest of the article on [Aviyel](https://aviyel.com/post/206/how-to-test-your-api-with-hoppscotch)
Why software testing matters
Tags: testing, testdev
Published: 2021-06-30 15:10:00

It’s hard to understate the importance of testing in software development. In fact, testing products before release is critical no matter what type of product you’re developing. So it’s no wonder that there are countless methodologies and approaches to testing and quality assurance of products and services.

Two of the most commonly used types of tests used in software development today are unit tests and integration tests.

**Unit Tests**

A Unit Test is a way of testing a unit - the smallest piece of code that can be logically isolated in a system. In most programming languages, that is a function, a subroutine, a method or property. The isolated part of the definition is important. In his book "Working Effectively with Legacy Code", author Michael Feathers states that such tests are not unit tests when they rely on external systems: “If it talks to the database, it talks across the network, it touches the file system, it requires system configuration, or it can't be run at the same time as any other test."

**Integration Tests**

Integration Testing is defined as a type of testing where software modules are integrated logically and tested as a group. A typical software project consists of multiple software modules, coded by different programmers. The purpose of this level of testing is to expose defects in the interaction between these software modules when they are integrated.

*So, Why you need to perform both unit testing and integration testing?*

Understanding and employing the various tests in the development life cycle is key to an efficient and headache-free DevOps experience.

So as you orchestrate the phases of testing and quality assurance through your CI/CD pipelines, remember that at the end of the day, you’re the one putting the puzzle together for deployment to end users.
Wednesday Links - Edition 2021-06-30
Tags: jvm, java, kotlin, microservices
Published: 2021-06-30 14:47:20

A new reporting platform for managing installed Java versions and applications (2 min read)📜
https://blogs.oracle.com/javamagazine/java-management-service-jms

One task — two solutions: Apache Spark or Apache Beam? (10 min read)🎌
https://blog.allegro.tech/2021/06/1-task-2-solutions-spark-or-beam.html

Kotlin Features Survey Edition #2 (18 min read)🗳️
https://blog.jetbrains.com/kotlin/2021/06/kotlin-features-survey-edition-2/

Best Practices and Common Pitfalls of Using JPA (Hibernate) with Kotlin (7 min read)💥
https://www.jpa-buddy.com/blog/best-practices-and-common-pitfalls/

Kotlin: Type conversion with adapters (2 min read)🔌
https://www.mscharhag.com/kotlin/type-conversion-with-adapters

Structuring serverless applications in the cloud (8 min read)☁️
https://blog.codecentric.de/en/2021/06/structuring-serverless-applications-in-the-cloud/

Evacuation Failure and Object Pinning (8 min read)📌
https://tschatzl.github.io/2021/06/28/evacuation-failure.html

Version Vector (11 min read)➡️
https://martinfowler.com/articles/patterns-of-distributed-systems/version-vector.html

How the Next Layer of the Internet is Going to be Standardised (10 min read)📄
https://www.mnot.net/blog/2021/06/21/standards-competition-governance

Oracle Lures Developers with More ‘Always-Free’ Cloud Services (5 min read)🪙
https://thenewstack.io/oracle-lures-developers-with-more-always-free-cloud-services/
A curated list of buttons and box-shadows for your next project!
Tags: showdev, css, html, design
Published: 2021-06-30 14:46:24

Hello!

Here is my latest little project to help you find inspiration for your next button and box-shadow design. I also include a link to some design systems.
https://copy-paste-css.com/

Let me know if you are aware of some interesting button designs that I could include on the site!
14 Arten von Quizfragen, die Sie in Ihren Online-Kurs einbauen können
Published: 2021-06-30 14:42:16

Online-Quiz sind das Werkzeug, das bei Wissenstests beim E-Learning am meisten genutzt wird. Welche Art von Quiz ist die richtige für Ihre Lernenden? In diesem Artikel sehen wir uns 14 Arten von Quizfragen an, vom offensichtlichen Multiple-Choice-Quiz bis hin zum erfrischenden Drag-and-Drop-Format.

Mehr lesen > https://www.ispringlearn.de/blog/typen-von-quizfragen
Ein YouTube Video in PowerPoint einfügen – 4 Wege
Tags: youtube
Published: 2021-06-30 14:37:44

Eine sichere und einfache Möglichkeit, eine PowerPoint-Präsentation zu verbessern, ist das Hinzufügen eines Videos von YouTube. Diese Website ist vollgestopft mit lehrreichen und unterhaltsamen Videos, die Ihren Inhalten ein dynamisches Element hinzufügen können. Egal, ob Sie Ihr eigenes Filmmaterial verwenden oder es von einem anderen Kanal „ausleihen“ wollen, hier sind die vier Wege, die Sie nutzen können, wenn Sie ein YouTube Video in PowerPoint einfügen möchten.

Mehr lesen > https://www.ispringlearn.de/blog/youtube-video-in-powerpoint-einfugen
Comprendre les différentes syntax pour écrire des fonctions en javascript
Tags: french, javascript, beginners, tutorial
Published: 2021-06-30 14:31:57

---
title: Comprendre les différentes syntax pour écrire des fonctions en javascript
published: true
description: 
tags: french, javascript, beginner, tutorial
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ik1c8mr2sz8zi3g466dq.jpg
---
Si vous désirez plus de contenu francophone comme celui-ci, cliquer <strong>Follow<string> ou <a href="https://twitter.com/EricLeCodeur" class="twitter-follow-button">suivez-moi sur Twitter</a>
<hr>

<h2>Fonctions</h2>
Une fonction est un morceau de code que nous pouvons réutiliser à plusieurs reprisent dans notre code.

```js
function displayHello() {
  console.log('Hello World')
}

// La fonction peut être invoquée (exécutée)
displayHello() // 'Hello World'

// Des données peuvent être transmises à la fonction
function display(greeting) {
  console.log(greeting)
}

// Invocation d'une fonction avec donnée passée en paramètre
display('Hello World') // 'Hello World'


// Une fonction peut retourner une valeur
function sumNumber(number1, number2) {
  return number1 + number2
}

console.log(sumNumber(10, 5)) // 15

```
"Function declaration" vs "function expression"
```js
// Function declaration (peut être appelée avant la déclaration)
function displayGreeting(greeting) {
  return 'Hello ' + greeting
}

// Function expression (peut être utilisé dans le code à la place de l'expression)
const displayGreeting = function (greeting) {
  return 'Hello ' + greeting
}

```

Arrow Function
```js
// Fonction abrégée
// 1. Supprimer le mot-clé function()
// 2. Supprimer les accolades {}
// 3. Supprimer le mot-clé Return
// 4. Ajouter => entre les paramètres et le corps de la fonction

// Avec plusieurs paramètres
const addNumber = (number1, number2) => number1 + number2

// Avec aucun paramètre
const displayGreeting = () => 'Hello World'

// Arrow Function multi-lignes
// Utiliser les accolades et le mot-clé Return
const displayGreeting = (greeting) => {
  console.log('Hello World')
  console.log('Hello Mike')
  return true 
}

```