teleren/devto huggingface dataset:
How to Write a Simple Python Program
Tags: python
Published: 2021-04-12 07:04:50

This tutorial will teach you how to write a simple Python program. We will begin by explaining what a Python program is and then move on to cover various aspects of syntax, which is the structure of the language.

## What is Python?

[Python](https://python.org) is a programming language that is becoming more and more in demand. It’s an open source language that, as you see below, allows you to create anything from games to web applications using only text. Python is a language that has many unique features, such as the following:

* Python is free.
* Python runs on Linux, OS X, and Windows.
* Python allows you to work with files and folders directly from your computer.
* Python is a high level language, which means that it was designed to be easy for humans to read and write.
* Python statements are made up of small parts that can be joined together. They look just like English words, so they are easy to read and understand.

Here are some other things that you can do in Python:

* Write and install your own computer [game](https://pythonspot.com/game-development-with-pygame/) in an hour or less.
* Automatically [download an image](https://pythonprogramminglanguage.com/get-all-links-from-webpage/) and show it on your website.
* Make a GUI app? Yes, you can create desktop apps with Python scripts using [pyqt](https://pythonpyqt.com/) or [tkinter](https://python-commandments.org/tkinter-basics/)

## Hello world

Hello pythonistas,

This is just a simple tutorial on how to write your first program in Python.

Let me just start this by saying that Python is a very simple programming language to learn. You don't have to be a programming expert to understand it and use it.

Pyhton is also a great language to get started with coding because it's easy to read, write, and maintain.
All you really need is some background in computer science, or at least a basic understanding of how computers work.
Here are the steps you'll need to take to write your first python program:

First, open up your text editor of choice (or an IDE) and save it as "hello.py" (Note: Not .txt). You can use any text editor you want such as notepad or gedit. I personally use vim but you can use any text editor, or an IDE like [PyCharm](https://www.jetbrains.com/pycharm/).

The file contents should be:

```python
print("Hello world")
```

The next step is to [run](https://pythonbasics.org/execute-python-scripts/) it with the command

```bash
python hello.py
```

It should output the hello world message to your computer. If you get an error it's because Python is not installed.
5 Best Python Modules Every Developer Should Know
Published: 2021-04-12 06:56:42

##[Read Here-->](http://expoashish.blogspot.com/)


#Python Projects for Beginners
[Student Management System] (https://youtu.be/QCseldsUGq8)
[University Management System] (https://youtu.be/AzBTUkZ1HAg)
[Contact Management System] (https://youtu.be/pfXOYmYUkKM)
[Bank Management System] (https://youtu.be/4_M3aqnqJ00)
[Contact Book Project in Django] (https://youtu.be/wJExlPfKOVU)

###My Youtube Channel Please support me:###
[Top 10 Technologies to Learn in 2021](https://youtu.be/4pdBhJns2nM)
[Top 10 Programming Languages to Learn in 2021](https://youtu.be/IZHQypmB0iY)

### My Blogs###
##[Visit My Blogs-->](http://expoashish.blogspot.com/)

####🎥💡🔥AND Subscribe to Our YouTube Channel [bestcodecreator] (https://www.youtube.com/bestcodecreator) 

{% youtube 4pdBhJns2nM%}


Thankyou🤗
Image Text Overlay on Hover in React.js
Published: 2021-04-12 06:53:59

In this article I'm going to explain, in a few steps, how to put text over an image on hover.

#### STEP 1: the JSX
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/icp08qedi1cnlueulz2y.JPG)

- import image
- give image some basic styling

Result:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uvu98t2mfqkqhjyamtrq.JPG)

### STEP 2: the CSS - part 1
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jinoqjt4la12dudcobf6.JPG)

- set the image container's position to relative:
this will allow us to set the image overlay's position to absolute so that it can cover the image container
- set the image's width to a 100% together with display: block to fill in its entire container

### STEP 3: the CSS - part 2
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f71j27bthb5ty5dogrlm.JPG)

- the first 4 lines make sure that the overlay covers the full container
- I've set the overlay background to black and gave it an opacity of 0 to hide it
- I've set a transition period to later make to overlay appear smoother instead of instant
- the flex properties and the color are meant for the text that will appear on hover

### STEP 4: the CSS - part 3
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ez6888r5y1fsbs0hea3n.JPG)

- I've set the opacity to 1 to make the overlay appear
- I've chosen a solid color for the overlay
- finally I'm styling the overlay text



This was my very first and easy-to-follow article, hope it helps ;)
Road Map to Game C.R.U.D
Published: 2021-03-07 22:06:03

I was once asked, "How do you eat an Elephant?" My first thought was, "I don't know, I never thought about eating one." The answer I was given was, "One bite at a time."

So, how does this relate to coding? 

How do we as developers solve big problems (The Elephant)? By breaking it down into smaller problems (One bite at a time). 

This was the approach I took when doing my Sinatra Curd project for flatiron. 

The Problem: Build a Create Read Update Delete application.

The first bite: I created a Notes.md file to brainstorm and game plan how to approach this challenge. 

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

I asked a series of questions to create a roadmap to this project; 

1. What do I want this app to do? 
2. What models do I need? 
3. What kind of relationships do I need to plan for? 
4. What attributes do my models need to have?
5. What views do I want in my app?
6. How do I want to route my app through my controllers? 

By taking the above approach the "Elephant" was broken down into smaller bites. Before I did any coding I would look over this file and make changes as needed. 

When facing similar challenges remember the Elephant. Break the problem down to one bite at a time and before you know it there's no more problem. 

Happy Coding.
The Cloud Resume Challenge (series): Part 9 - CloudFront Custom Domain
Tags: devops, serverless, cloud, aws
Published: 2021-04-12 06:47:31

---
title: The Cloud Resume Challenge (series): Part 9 - CloudFront Custom Domain
published: true
tags: #devops #serverless #cloud #aws
---

This is the ninth episode in a series on the cloud resume challenge series. In the last video we went through how to add HTTPS (ACM) to a CloudFront distribution, so we could start to get rid of some 403 errors we were getting from CloudFront. In this video, we go into how you can allow a custom domain to reach CloudFront by adding it into the allowed domains.

{% youtube ZJgBTCPX6Lg %}

If you’ve not heard of the [cloud resume challenge](https://cloudresumechallenge.dev/), it’s a free challenge that you can take to build a resume using AWS.

It’s a great starting point for beginners or those new to the cloud. But… it’s definitely not for the faint of heart!

The challenge is tough and requires you to learn lots of different aspects of the cloud from CDN's to CI pipelines. The best way to learn any technology is by getting hands-on and using it in anger.

The point of this YouTube series is to provide some extra structure and guidance to the challenge for those daring to attempt it!

But it's not about giving you all the answers, just some prompts, and some ideas to push you in the right direction.

So... if you're thinking of getting into the cloud, do you dare take on the cloud resume challenge? 😁
Making CSS perspective text
Tags: css
Published: 2021-04-12 06:47:22

Today I wanted to create a fun CSS effect and try and figure out how it's done.

Today we are making CSS perspective text to make text look like stairs.
In essence, we will use some skew transforms and position offsets to create this effect.

The end result for today:

{% codepen https://codepen.io/rebelchris/pen/LYxzvBy %}

## HTML Structure

As for the HTML goes, we don't need that much fancy stuff.

```html
<h1>
  <span>Always</span>
  <span>deliver</span>
  <span>quality</span>
</h1>
```

In my case, I want to have three words to use as our effect.
You could alter the codebase to work with paragraphs as well.

## CSS Perspective text

Now on to the magic element, CSS.
We'll start by styling the main `h1` element. The goal is to make it look sans-serif and quite big.
This works best for this effect.

```css
h1 {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 70px;
  font-weight: 900;
  text-transform: uppercase;
  position: relative;
  margin-left: -350px;
  margin-top: -150px;
}
```

As you can see, I use quite a big font and transform everything too uppercase.
Then I offset the whole element. Since we will be using absolute positions, it's hard to position the whole element at once.
You might have to change these positions based on the words you want to use.

Then each span element inside our h1 should be absolute.

```css
h1 {
  span {
      position: absolute;
  }
}
```

The next rule will be to make the step skew in opposite directions. I'm using an [odd/even child pseudo-selector](https://daily-dev-tips.com/posts/css-pseudo-elements/).

```css
h1 {
  span {
    &:nth-child(odd) {
      transform: skew(60deg, -30deg) scaleY(0.66667);
    }
    &:nth-child(even) {
      transform: skew(0deg, -30deg) scaleY(1.33333);
    }
  }
}
```

That brings us very close, but all the elements are on top of each other now.
We need to modify the offset position for every second and above element.

With my words, that comes down to the following:

```html
h1 {
  span {
    &:nth-child(2) {
      left: 27px;
      top: 52px;
    }
    &:nth-child(3) {
      left: 54px;
      top: 105px;
    }
	}
}
```

And that is it. You now have this super cool stair-looking perspective text.

![CSS Perspective text](https://cdn.hashnode.com/res/hashnode/image/upload/v1617862678888/NyjslbL_N.png)

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
JavaScript assignments - 3
Tags: javascript, begginer, practice
Published: 2021-04-12 06:47:07

---
title: JavaScript assignments - 3
published: true
description: 
tags: javascript, begginer, practice
//cover_image: https://direct_url_to_image.jpg
---
It's time for another JavaScript assignment.

This assignment is great to practice JavaScript and develop problem solving thinking.

If you have another solution, please be kind and write it in the comment section.

**Assignment:**
Write a program to create a new string adding "New :)!" in front of given string. If given string begins with "New :)!" already, then return the original string.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
**Solution:**
```
const newStr = (str) => {
  if (str.includes("New :)!")) {
    return str;
  } else {
    return "New :)! " + str;
  }
};

console.log(newStr("mouse is the cats worst enemy"));
```
Python Vs JavaScript Developers Salary Difference (Update 2021)
Tags: javascript, python, java
Published: 2021-04-12 06:46:32

Python and JavaScript are two popular programming languages we all know. 

But do you know that there has been a surprising difference in the payment of developers experienced in these two languages?

From 2015 - 2018 StackOverflow published the apart from spring boot developers, no other programmers get highly paid than JavaScript developers.

But what has been happening from 2018 - 2021?

Full of unbelievable surprises here - https://tutorialscamp.com/javascript-vs-python/
Understanding Kubernetes: part 41 – Pod Disruption Budget (PDB)
Tags: kubernetes, devops, docker, beginners
Published: 2021-04-12 06:40:33

---
title: Understanding Kubernetes: part 41 – Pod Disruption Budget (PDB)
published: true
description: Serie of sketchnotes about Kubernetes. Explaining in a visual way Kubernetes principles.
tags: Kubernetes, DevOps, Docker, beginners
series: Understanding Kubernetes in sketchnotes
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zyrz9hdtm0rv3omg264n.jpeg
---

Understanding Kubernetes can be difficult or time-consuming. In order to spread knowledges about Cloud technologies I started to create sketchnotes about Kubernetes. I think it could be a good way, more visual, to explain Kubernetes (and others technologies).

We continue the serie of Sketchnotes about Kubernetes, with an explanation about PDB: Pod Disruption Budget.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zyrz9hdtm0rv3omg264n.jpeg)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kjikii2jyfc5z4zncg7y.jpeg)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u76e1c968g6wfmmjgee4.jpeg)

If you are interested, I published all the sketchnotes on Kubernetes (and new ones!) to make a "book" of 165 pages: ["Understanding Kubernetes in a visual way"](https://gumroad.com/aurelievache#uCxcr).

As usual, if you like theses sketchnotes, you can follow me, and tell me what do you think. I will publish others sketchs shortly :-).
Are you already lost in your node_modules?
Tags: javascript, angular, react, node
Published: 2021-04-12 06:25:01

![lost in dependencies](https://media.giphy.com/media/ghutdpgRkhkxq/giphy.gif)

It doesn’t matter if you work with React or Angular or Node.JS after some time when your project is getting bigger and more complex, it is no longer so easy to follow updates of your project dependencies. This problem continues and with so many updates and versions popping out, it will never end. Of course, this is understandable as projects will never be perfect, **bugfixes**, **security vulnerabilities** or **compatibility issues** will keep popping up. 

I noticed this quite some time ago in my work, that `npm update` could be improved. **Upgrading dependencies** to their latest versions might often break your project if some of your dependencies contain breaking changes. I wanted to be able to upgrade my node_modules safely in a project, therefore I decided to search for an app, which in simpler and more user-friendly way will allow to track what is happening with my project dependencies.

Let's have a look into the app. 
![OK, I'm listening]
(https://media.giphy.com/media/l0IsIZw8doJm3ysRq/giphy.gif)

`npm-gui` is a handy tool for managing javascript project dependencies, which are listed in **package.json**. Under the hood it will use transparently *npm* or *yarn* commands to install, remove or update dependencies.

Below you can see a screenshot of `npm-gui`.  
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ghaebn19q1u3zjsvcsao.png)

The newest version (v.3) of npm-gui has been released last month, and apart from showing you what could be updated, it also allows you to track size of individual bundles or **critical security bugs.**


Whichever framework you use, if you are a web developer looking for a way to simplify managing your dependencies, you must check out this app. 

Try it out simply by using command:
```
npx npm-gui
```
This command will start application npm-gui without installing it. The new window in a browser will appear and all you have to do is click the *open* button to navigate to your project within npm-gui.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h6lelo3lpicweufza2by.gif)

![Brilliant!]
(https://media.giphy.com/media/goKkfkinQTdM4/giphy.gif)


Feel free to leave your comments below. And if you have any features suggestions create an issue on project's page on GitHub.

And if you like it **star** this project!
*[Click to see the app at GitHub](https://github.com/q-nick/npm-gui)*
Day 29 of 100 Days of SwiftUI
Tags: swift
Published: 2021-04-12 06:21:22

I just completed day 29 of 100 days of SwiftUI. Today, I started working on a new app called WordScramble. WordSramble is a game that asks users to make words out of a randomly chosen word.
I also learnt about a new type of view called List. The list view is used to display a scrolling table of data.

I will continue building the app tomorrow.
Meet GoCondor a new Golang web framework based on Gin
Tags: go, webdev, api
Published: 2021-04-12 06:19:46

## Introduction
[GoCondor](https://gocondor.github.io/) is a Golang web framework for building apis, it aims to simplify the development experience for go developers with a development experience similar to [Laravel](https://laravel.com), the framework has almost all the features of modern web frameworks, here is a list of the supported features:
- Routing
- Middlewares
- Data Validation
- Databases ORM ([GORM](https://gorm.io/) integrated)
- Events
- Emails
- JWT tokens
- Cache (Redis)
- HTTPS (TLS)

## Architecture
GoCondor adopts an architecture similar to `MVC`, all routes are defined in a single file `routes.go` and the handling functions for these routes are defined in the directory `handlers`.

## Handlers
Handlers in GoCondor are simply functions that gets executed when a request is received at the crosponding route


## Installation
GoCondor can be installed via GoCondor's CLI tool named [Gaffer](https://gocondor.github.io/docs/gaffer), to install `Gaffer` you can simply run the following command
```bash
go install github.com/gocondor/gaffer@latest
```
To create a new project you can simply use `Gaffer` by run the follwoing command
```bash
gaffer new [project-name] [project-remote-repository]
```
where: 
`project-name` is the name of your project. `remote-repository` is the remote repository that will host the project, usually github.com is used.
Here is an example:
```bash
gaffer new myapp github.com/gocondor/myapp
```
## Running the project in the development mode
You can run the project in the live reloading mode for development using `Gaffer` by simply navigating to the project directory and running the following command
```bash
gaffer run:dev
```
## Getting started
To get started with `GoCondor` you can check the [get started docs](https://gocondor.github.io/docs/getting-started)
Apache Camel Interview Questions
Tags: apache, camel, interview, questions
Published: 2021-04-12 06:13:59

Apache Camel is used to integrating the EIP. #Companies really have a lot of #data #exchange daily and for that purpose, even multiple #applications are #integrated. This is simply done to make the #process in a standard format. It is an #open-source #framework for message-oriented #operations.
#apache #camel ##interview #questions #answers #freshers #job #helpinghands #helpingothers #recruitment #data #hiring #jobs #jobsearch #datascience #python #routing #sql #recruiting https://www.courseya.com/apache-camel-interview-questions/
This Weekend in BarelyHuman Dev Labs - March 10th and 11th
Tags: devjournal
Published: 2021-04-12 06:01:10

---
title: This Weekend in BarelyHuman Dev Labs - March 10th and 11th
published: true
description: 
tags: #devjournal
//cover_image: https://direct_url_to_image.jpg
canonical_url: https://reaper.im/posts/12042021-This-Weekend-in-BarelyHuman-Dev-Labs---March-10th-and-11th.html
---

## Project Updates
### statico
Mentioned that we had a static generator written specifically for reaper.im and all I did was pull it out into a separate repository and is now under the name statico and while it can be used for basic markdown to html page generation while maintaining folder structure[^1] it's still a very simple generator and not as generic as it should be, it will be as the project progresses.
[^1]: You can go through the reaper.im codebase to see what I mean by a simple structure 

### commitlog
There was a little progress in the release command addition to the cli, not a lot and no it's not been pushed, the older release command is still there in the codebase and while functional it doesn't increment the tag as I expected it to be so the cases are still being handled.

### vscode-monoclean-theme
I started writing a vscode theme long time back, just completed it this weekend and also added a light variant to it. It's only been tested on Go and JS so I'm not sure about the other languages while it shouldn't cause many issues in other languages/workflows , do raise an issue if you do see one. You can find the install instructions and screenshots on github

## Life Updates
Wasn't able to post last week since there wasn't any progress, I've been sick the past week and wasn't able to pick up anything so there was nothing to post last weekend. Somehow I've caught covid while staying home all day, anyway I don't see any direct symptoms so I'm not that worried but we'll see how it goes.

In terms of business setup, Tillwhen codebase is to be cleaned and I need a good project management workflow to be setup so I don't treat TillWhen like a side project and just abandon it, which will definitely happen if I don't setup a good workflow forcing me to sit and work on it.

That's about it for now,

Adios!
Node.js Streams
Published: 2021-04-12 05:59:34

A stream is an abstract interface for working with streaming data. They are used to process data piece by piece rather than loading the entire data into memory. It can be thought as a conveyor belt whereby items are processed one at a time rather than in large batches. All streams in node.js are instances of EventEmitter and can either be readable, writable or both. Streams are perfect for handling large volumes of data like videos and are more efficient in data processing in terms of time and memory space.
There are four fundamental streams in node.js :
* __Readable Streams__ - Streams from which we read data for example http requests. The most important events in this streams include *data event* (emitted when there is new data to consume) & *end event* (emitted when there is no more data to consume). Some functions used are pipe() & read ()
* __Writable Streams__ - These are streams to which we write data for example *fs write streams* and sending http responses to the client. The most emportant events are drain & finish events. The important functions include write() & end().
* __Duplex Streams__ - Streams which are both readable and writable for example *net web socket* (communication channel between client and server that is multidirectional and open once the connection has been established)
* __Transform Streams__ - These are duplex streams which transform data as it is read or written for example *zlib Gzip* creation module for compressing data

The events and functions stated above have already been implemented in node.js but we can implement our own streams using the same functions.

An example of the implementation of streams is shown below:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uwjbgxi4ew6l1pjj7e9f.png)
In order to handle the speed of the data coming from a source to a different stream (back pressure), the pipe() method is the most appropriate one to use between the input and output streams. The output stream can either be a duplex or a transform stream.
Streams have two major advantages *memory efficiency* since you don't have to load the entire data into memory and *time efficiency* since it takes less time to process data as soon as you have it (you do not have to wait for the entire data to be loaded).