teleren/devto huggingface dataset:
Is hyperautomation the future of development?
Tags: discuss, devops, productivity
Published: 2022-01-05 21:18:36

I recently read about Gartner's [12 technology trends for 2022](https://www.ciodive.com/news/gartner-strategic-trends-2022/608315/). One of the predictions that stood out to me was the idea of **hyperautomation**: 

> The hyperautomation playbook yields benefits for enterprise leaders in the year ahead. This strategy seeks to rapidly identify, vet and automate as many processes as possible.

In the world of software development, there's a lot of discussion about automation. Automated workflows impact so many different parts of the software development life cycle — CI/CD pipelines, [testing](https://www.software.com/devops-guides/test-automation-guide), [code suggestions](https://copilot.github.com/), [code scaffolding](https://yeoman.io/generators/), and even [writing documentation](https://marketplace.visualstudio.com/items?itemname=mintlify.document). 

What do you think? Will hyperautomation will be a key trend in software development in 2022? What things can or can't be automated?
FFMPEG Compress and change playback
Tags: batch, ffmpeg, cmd, windows
Published: 2022-01-05 20:25:40

I am using ffmpeg to take an mp4 file, compress and increase its playback speed.

ffmpeg -i "%loc%\%fileName%" -filter_complex "[0:v]setpts=0.125*PTS[v];[0:a]atempo=8[a]" -map "[v]" -map "[a]" "%loc%\%folderName%\%folderName% 8xPlayback.mp4"

However I need to create multiple files with different playback speeds (2x,4x,8x,16x,32x,64x... etc)
It seems awfully inefficient to run the command above over and over to get the different playbacks.

Im thinking the most efficient way would be to create a single compressed file and then sample it for 2x, 4x, etc...

How would I go about doing this?
Rails 7 with Bootstrap! So much fun!
Tags: ruby, rails, beginners, programming
Published: 2022-01-05 20:24:17

Hi Folks!
published an [article](https://medium.com/@grzegorz.smajdor/rails-7-with-bootstrap-css-52f5468ead38) about Bootstrap and Rails 7! 

Happy reading,
Grzegorz
S3 compatible storage providers
Tags: serverless
Published: 2022-01-05 20:17:40

Found this list of s3 enabled storage providers, something I couldn't quite find before. I'm sure there are more, but this is quite a nice list in my opinion.

[https://www.storageprovider.info/blog/all-s3-storage-providers/](https://www.storageprovider.info/blog/all-s3-storage-providers/)
Adding a discord server to Easy UI
Tags: easyui, ui
Published: 2022-01-05 20:01:25

Hey all! We just launched a discord server which is a more open place to chat about frontend development. The Easy UI forem isn't going anywhere, but if you're looking for somewhere more personal to chat, feel free to join!

→ https://discord.gg/Qq4aU2EMm9
﻿
How I built a dropdown cart modal in JavaScript
Tags: beginners, javascript, webdev, css
Published: 2022-01-05 19:55:23

Here's how I built a feature which allows a cart modal to fade in when it's clicked.

First, I want to create a class with all my styles, and then to trigger in JS, give the first class a display: none. I then create a second class named (-visible) and give it a display: flex;.

It looks like this: 

     .dropdown-cart{
    background: #fafafa;
    height: 57vh;
    width: 25%;
    top: 91px;
    right: 0px;
    position: fixed;
    display: none; (Here's where I hide the cart)
    padding-left: 4%;
    z-index: 1;
    animation-duration: 1s;
    animation-name: fadein;  (Here is where the effect will come in)
    }

    .dropdown-cart-visible{
    display: flex; (Here's where the cart is visible)
    padding-left: 4%;
    }

In JS, I made sure to create variables that would help me target the index I was looking for. 

Basically, I created a variable for the cart icon and the modal itself, so when you click on the icon, it will fade in, and if you click again, it will fade out. Here's what it looks like.

    let dropdowncart = 
    document.getElementsByClassName('dropdown-cart')[0]

    let carticon = 
    document.getElementsByClassName('cart')[0]


    let showdropdown = function () {
        dropdowncart.classList.add('dropdown-cart-visible')
        pagefade.classList.add('fadecart-fadein')
        console.log('hello')
    }

    let hidedropdown = function () {
        dropdowncart.classList.remove('dropdown-cart-visible')
        pagefade.classList.remove('fadecart-fadein')
        console.log('goodbye')
    }
      


    carticon.addEventListener('click', function () {
        showdropdown();
    })

    closeicon.addEventListener('click', function () {
        hidedropdown();
    })

To sum it up,
1) Create your classes in CSS, and hide the original class, since you don't want it shown until clicked.

2) Create a second class of -visible, and that's what you'll use to create variables in JS.
5 FREE TOOLS ALL LARAVEL DEVELOPERS MUST HAVE
Tags: nrkdrk, laravel
Published: 2022-01-05 19:53:53

 Find out the 5 tools all Laravel developers must have and use to boost up their productivity and save more time when developing Laravel Projects

[Address](https://postsrc.com/posts/5-free-tools-all-laravel-developers-must-have)
Javascript - Scope, Closure
Published: 2022-01-05 19:53:10

**Scope: **
It’s a very important topic in javascript. It mainly defines where we can use our variables and functions in javascript. When we declare a variable and function and after that we use them. But we did not use them all over the script. There are some restrictions and that is known as scope. 

There are two types of scops 
Local scope
Global scope

It defines where we can access the variables and functions
Every new functions creates a scope
A variable that is declared in a function and that function can not be used in other functions.


**1. Local Scope:**
	We declare variables in a function called local variables. These variables are local scope. It means we can use these variables only under that function. We did not use any outer function. In that case you will get an error.

**2. Global Scope: **
	Global scope means that access is everywhere. We declare variables not in any function that are known as global variables. These variables are global scope. We can use these variables anywhere in the script. 


**Lexical Scoping:** 
	Every child function can access their parent functions. We declare a function and under that function we declare a variable x and another function y(). So now we can access x in the y() function though we did not declare x under the y(). So here child y() can access the parent variable this is called Lexical Scoping. 

**Closure: **
	Closure just like  Lexical Scoping. We did not need to do anything for closure. It’s a default behavior of javascript. When we write a function inside a function then there is a parent child relationship occurring. If we return a parent function we can also access a variable from the parent function into the child function. This is called closure.
Using setInterval() in Javascript
Tags: javascript, tutorial
Published: 2022-01-05 19:51:59

In my last project I wanted to set production per second and have my "factories" produce resources on a set time interval. Unfortunately I did not have enough time to figure out then so I decided to go back and look into how to use setInterval() in Javascript.

setInterval() repeatedly calls a function with a fixed time delay between each call. So you can utilize to do something like I mentioned above (producing x amount of resources every x seconds) or for animations! You can use it in a way to have your picture move from one position to the other every x amount of seconds (hint hint... you might maybe see this in our upcoming project). 

Let's get into how to use setInterval() in your code now.

setInterval() takes in a callback function and a delay in milliseconds. The method returns an interval ID so you can remove it later by calling clearInterval().

basic example of the syntax:
```
let intervalId = setInterval(callBackFn, 1000)

function callBackFn(){
   console.log("This message will log every one second")
}
```
This example would log "This message will log every one second" to the console every one second.

Here is an example of using the clearInterval() method with setInterval() to be able to start/stop the function from executing every x seconds:
```
let nIntervId;

function changeColor() {
  // check if already an interval has been set up
  if (!nIntervId) {
    nIntervId = setInterval(flashText, 1000);
  }
}

function flashText() {
  const oElem = document.getElementById("my_box");
  if (oElem.className === "go") {
    oElem.className = "stop";
  } else {
    oElem.className = "go";
  }
}

function stopTextColor() {
  clearInterval(nIntervId);
  // release our intervalID from the variable
  nIntervId = null; 
}

document.getElementById("start").addEventListener("click", changeColor);
document.getElementById("stop").addEventListener("click", stopTextColor);
```

Things to be careful of when using the setInterval() method:
-If you're using it to manipulate data from a fetch request you have to keep in mind that the fetch request itself takes sometime
-Using it to setState can also get really funky (which is what happened with my project, therefore didn't end up using it)
How to Fix a Facebook Account Temporarily Locked?

Published: 2022-01-03 05:21:07

A platform as famous as Facebook makes sure that the security and privacy of their users are protected. Facebook uses different measures to make sure that the accounts of its customers are guarded. And if Facebook ever detects that there is some wrong and suspicious activity from your account then you will see your **[Facebook account temporarily locked](https://worldzo.net/locked-out-of-facebook-account-how-to-unlock/)**. 

There are many reasons that your Facebook account can be locked but the main problem is to figure out how you can **[recover Facebook account temporarily locked](https://worldzo.hpage.com/recover-a-locked-facebook-account.html)**. 

**3 Ways to Recover your Facebook Account After Getting Locked**

There are three simple ways that you can use to get the success to your locked Facebook account back. So, follow these instructions correctly.

**Using ‘Report a Login Issue’ form**
The simplest way that you can use to recover your Facebook account back is to use the ‘Report a Login Issue’ Form. You will find this form on the official help desk of Facebook. You should mention your problem in detail and also point out your attempts at login. Facebook will respond back to you in some days or weeks but you need to check that email continuously. 

**Using ‘Security Checks Preventing Login’ Form**
If Facebook is preventing you from login into your account due to security reasons then, you should use the ‘Security Checks Preventing Login’ form. You need to highlight your problem and give an email address where Facebook can reach you. Facebook will make sure that they understand your issue and then work accordingly.

**Verify your Identity**
The last technique that you can use to recover a **[locked Facebook Account](https://educatorpages.com/site/worldzo/pages/how-to-recover-a-facebook-account-locked-for-no-reason?)** is to use the ‘Confirm your identity with Facebook’ form. Here you need to provide Facebook with an official id of your so that, Facebook confirms it is indeed you who is trying to login into your account.
Changing caret color with CSS
Tags: css, programming, webdev, tutorial
Published: 2022-01-05 19:40:07

With all of the fun stuff that you can do in CSS, you can even change the caret color: that's right.
_Caret is a thin blinking line that appears inside inputs, textboxes, etc._

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

Just with one line of CSS:

```CSS
.selector {
  caret-color: red;
} 
```

And the support is [basically universal](https://caniuse.com/css-caret-color) too! (~94% at the time of writing this post)
Center div within div
Tags: css, html
Published: 2022-01-05 19:33:30

**Center div within div using flexbox**

![Center div within div using flexbox](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r4nsy7kxd0a345japxzj.png)

try in [jsfiddle](https://jsfiddle.net/meetsonusharma/mokfzt9L/21/)

**Center div within div using transform translate**

![Center div within div using transform translate](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8759qvwweis5wrpxie3e.png)

try in [jsfiddle](https://jsfiddle.net/meetsonusharma/mokfzt9L/57/)


**Center div within div using margin**

![Center div within div using margin](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4dtjgmrue0wtxckluwdv.png)

try in [jsfiddle]
(https://jsfiddle.net/meetsonusharma/mokfzt9L/77/)

What are other ways to center div within div ?
Explore Seattle City Bikes trips
Tags: atlashackathon, python, javascript, docker
Published: 2022-01-05 19:32:15


### Overview
If like me you had the chance to live in a big city or a capital, you certainly came across these bikes :
![Nextbike by Holger Schué on Pixabay](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9wg22xkwri5xczycne40.jpg)

Theses bike sharing services are pretty popular nowadays and as a user I'm a pretty big fan of them. That's why as a Data Science student I chose to dig and play a bit with the data I could find about them.

The project consist in a small one-page dashboard to analyze and predicts the cycle share trips of the Pronto Cycle Share system, that was operating between 2014 and 2016 in Seattle, USA.


![Screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/erigkdt9vcpa4vxxmfbl.png)
This project was built with FastAPI, MongoDB, Docker, Bootstrap and Chartjs.

Project can be accessed at the following url :
[Pronto Dashboard](http://194-195-242-254.ip.linodeusercontent.com) 
### Submission Category: 

This project belongs to the **Prime Time** category.


### Link to Code

{% github duranbe/bike-sharing %}


### Additional Resources / Info

- [MongoDB Quickstart : Fastapi and MongoDB](mongodb.com/developer/quickstart/python-quickstart-fastapi/)
- [Pronto Cycle Share dataset on Kaggle](https://www.kaggle.com/pronto/cycle-share-dataset)
- [FastAPI](https://fastapi.tiangolo.com)
- [Docker](https://www.docker.com)
- [MongoDB](MongoDB.com)
- [ChartJS](https://www.chartjs.org)
- [Bootstrap](https://getbootstrap.com)
Recursion in JavaScript
Tags: javascript, functional, algorithms, beginners
Published: 2022-01-05 19:29:48

The concept of recursion sounds intimidating, but it is deceptively straightforward.

Let's dive in. First, the terminology.

The MDN Web Docs define recursion as:

> The act of a function calling itself, recursion is used to solve problems that contain smaller sub-problems. A recursive function can receive two inputs: a base case (ends recursion) or a recursive case (resumes recursion).

Let's create a function called "recursiveFunction" with a "num" parameter, taking in a number as an argument. If "num" is less than 10, the function will call itself on num + 1, checking to see if the new value is less than 10.

If the value of "num" is **NOT** less than 10, our "else" statement will execute and console.log "num". 

To ensure our code runs as anticipated, I will add in a console.log in the "if" statement as well.

```javascript
function recursiveFunction(num){
    if (num < 10) {
        console.log(`Number = ${num}. recursiveFunction will be called.`)
        recursiveFunction(num+1)
    } else {
        console.log(`Number = ${num}. Recursion terminated.`)
    }
}
```
In the abstract, recursion can seem needlessly verbose; however, when your code becomes more complex, recursion keeps your code clean.

For example, I created a recursive function for a React application that uses a window to display a random lyric from a hard-coded array:
```javascript
function randomLyric(array) {
    let random = array[Math.floor(Math.random()*array.length)];
    if (lyric !== random) {
        setLyric(random);
    } else {
        randomLyric(array)
    }
}
```
The "if" statement checks if the randomly pulled lyric stored in the "random" variable is different from the lyric that is already stored in the state variable "lyric". If it is indeed different, it will use the setter function setLyric to updated the state variable "lyric" to the random lyric.

If, however, the two lyrics are exactly equal to each other - that is, our randomly pulled lyric is already being displayed - the recursion inside the "else" block executes and calls the randomLyric function on the same array, repeating the process until the randomly generated lyric is indeed random.

Try making a simple recursive function yourself. Once you see the utility of a function calling itself if certain conditions are met, you will never look back. 

Well, you will, but only recursively. 

Happy coding.
Python - Variables
Tags: python, begginer, variables
Published: 2022-01-05 19:25:14

---
title: Python - Variables
series: Python - Getting started
published: true
description: Variables in python
tags: 'python, begginer, variables'
cover_image: 'https://raw.githubusercontent.com/campelo/documentation/master/posts/python/getting-started/assets/cover.jpg'
canonical_url: null
id: 945644
date: '2022-01-05T19:25:14Z'
---

###### :postbox: Contact :brazil: :us: :fr:

[Twitter](https://twitter.com/campelo87)
[LinkedIn](https://www.linkedin.com/in/flavio-campelo/?locale=en_US)

---

## Variables

Computer programs use variables to hold and work with values in memory. For this reason it's important to know a little bit more about them.

### Keeping hard coded values

This sample shows how to print a calculated value to the user

```python
myNumber = 2
print(myNumber)
```

### Getting value from user input

Most of the time, the program will wait or ask the user to input values. To do this with python is very simple. We'll use **input()** function for that.

```python
myNumber = input("Enter a number: ")
print(myNumber)
```

### Breaking line

Using this code below, the program will wait for a value from the user.

```python
myName = input("Enter your name")
print(myName)
```

The issue here is that the user's response will be concatenated directly with the question. 

![Image 1](https://raw.githubusercontent.com/campelo/documentation/master/posts/python/getting-started/03-variables/assets/img1.png)

To solve that, we can use [escape characters](https://www.w3schools.com/python/gloss_python_escape_characters.asp) to insert a new line **\n**.

```python
myName = input("Enter your name\n")
print(myName)
```

Now, the question will be showed in one line and the answer in another one.

![Image 2](https://raw.githubusercontent.com/campelo/documentation/master/posts/python/getting-started/03-variables/assets/img2.png)

###### Notes

You can access this code on [github](https://github.com/campelo/Python-First-steps).

## Typos or suggestions?

If you've found a typo, a sentence that could be improved or anything else that should be updated on this blog post, you can access it through a git repository and make a pull request. If you feel comfortable with github, instead of posting a comment, please go directly to https://github.com/campelo/documentation and open a new pull request with your changes.
My thoughts on working and studying full time

Tags: thinking, beginners, career, productivity
Published: 2022-01-05 19:01:56

Some time ago I was at an online university class, and i got lost on my mind if when i graduated i will have enough experience for a first job.

I know internships and entry level jobs exist, but I dont't want to wait after i finished college to make it.

Right now i decide that i will go through some interviews to get a first job. A first formal job not freelancing or internships. I have searched in different companies and i am wonder if i meet all the requirements. In the immense majority of jobs description that are listed, business want people with 3-5 years of experience on similar jobs.

After job searching I know I don’t have enough experience, also project, research are not enough. Also, a full-time job in Panama are 8 hours a day, my university classes are 5 hours. The time is not enough.

Right now i am on my 4th year of 5 years, which also means that the time I begin classes will be different, it varies every semester. For example, on my 3rd year we were always in the morning.

But, based on my research, there’s a high chance that my classes begin at 4 pm or 5 pm (at best). Which let me work from 8am to 3pm. And if classes and work are remote (which there is a high chance that there will be) i can save on commute and make it all the work in my home.

What’s the catch? No time (1 hour between work and study) and i will be with full classes (6 classes per semester), so things can get messy in bad times.


## There’s always hope

After these years i have been doing it pretty good with my classes, i got good grades this last 2 years. I have a high gpa and i have been praised for my very good work as an individual either as a team member.

Also i have make improvements on my productivity and my life in general. So i know i could handle at make my best at these opportunities. Things always seem bad at first, but then i find a way

See the full article at: https://fernandocutire.com/my-thoughts-on-working-and-studying-full-time/

I share more of my experience in twitter 
[follow me @fernandocutire](https://twitter.com/fernandocutire)
Leetcode Merge Intervals - Solution & Video Explaination
Tags: cpp, algorithms, leetcode, interview
Published: 2022-01-05 18:56:45

{% youtube pVsGdDW4G9w %}

## Solution

```cpp
vector<vector<int>> merge(vector<vector<int>>& intervals) {

    // Edge Cases
    if (intervals.size() <= 1) {
        return intervals;
    }

    // Sorting
    sort(intervals.begin(), intervals.end());

    // Merging
    vector<vector<int>> result;
    result.push_back(intervals[0]);
    for (int i = 1; i < intervals.size(); ++i) {
        if (intervals[i][0] <= result.back()[1]) {
            if (intervals[i][1] > result.back()[1]) {
                result.back()[1] = intervals[i][1];
            }
        } else {
            result.push_back(intervals[i]);
        }
    }
    return result;
}
```

```python
def merge(intervals):

    if len(intervals) <= 1:
        return intervals

    intervals.sort()

    merged = [intervals[0]]

    for interval in intervals[1:]:
        if interval[0] <= merged[-1][1]:
            if interval[1] > merged[-1][1]:
                merged[-1][1] = interval[1]
        else:
            merged.append(interval)

    return merged
```

## Complexity

Runtime: O(nlogn)
Space: O(n)
Your own website available on the internet from your computer in just 3 steps!
Tags: python, programming, cloudflare, learning
Published: 2022-01-05 18:44:52

For anyone that is looking forward to learning backend development the initial question usually is: “How I can make my web-side available to the internet”?

## How can this happen?

It’s pretty simple, you can look to the internet as just a road with many connections.

There are some major players that make these connections available, and in general, we use those to make this available.


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

What we need is just a tool, that can make our own connection to the “main players” so it makes our own server/website available to anyone that wants to access it from anywhere!

For this we can use any tool that does a “tunnel”, that will create this link.

1 - For this we will connect through Cloudflare Access using a CLI.

2 - We need to build and run a Basic Web Server sample, and we will be using python with just few lines for this.

3 - Then just Start and run our server to the entire internet!

And these steps are all shared in this post on Medium: [Your own website available on the internet from your computer in just 3 steps](https://medium.com/dev-today/your-own-website-available-on-the-internet-from-your-computer-in-just-3-steps-432c73f4540)