teleren/devto huggingface dataset:
Who dominates the cloud market?
Published: 2021-02-10 11:02:13

By early 2020, major cloud providers want to improve their position through their key capabilities, plans, and market prospects. Credit for declaring public cloud wars is given to cloud giants such as Amazon Web Services (AWS), Microsoft Azure, and the Google Cloud Platform. New and large-scale players such as IBM Cloud, Oracle Cloud, and Salesforce are also aiming to fight market leaders.

Due to this rapid growth in cloud technology the all sizes company shifting their resources over the cloud so that they can easily cut down the cost of business doing. To this enterprises will need the highly skilled, certified and experienced cloud experts.

JustCerts is a reputed company that is helping cloud professionals to verify their skills and knowledge by passing the certification of these major cloud providers. Get the credentials of cloud service providers with the help of JustCerts today.
https://www.justcerts.com/
So, you want to move your keepass database to pass?
Tags: keepass, pass, password, script
Published: 2021-02-10 10:54:20

**Update (2023-09-27):** another approach is to use git to download your data from your backup repo. This is for using a passwords database available in another machine, it is not related to keepass. In this case the only problems are:

* Setting up the repo in your pass database

```
pass git init
pass git remote add origin <url>
pass git add -A
pass git commit -m "initial commit"
pass git push -u origin master
```

* Exporting your gpg keys (because the data is encrypted with them).

```
gpg --export-secret-keys $ID > my-private-key.asc
```

You may need:
```
gpg --list-secret-keys
```

* Importing them in the new place.
```
gpg --import my-private-key.asc
```
* Cloning the repo with the passwords:
```
git clone <url> ~/.password-store/
```

This info is from: [How to backup passwords from pass](https://superuser.com/questions/1722240/how-to-backup-passwords-from-pass)

**Update (2021-02-12):** the script did not work well, it was missing the username field from keepass.

First, you'll need to create a gpg key if you do not have one:

`gpg --gen-key`

Then you can init your pass respository (with git, in our case):

`pass init user`

Put it under git control:

`pass git init`

Now you could add a password with:

`pass insert test `

It will ask you for the password and you can see it added with:

`pass`

Nevertheless, my objective was to import to this new database the keepass database. For this, you can open the keepass program and export the database as a `.csv`.
Since keepass will put quotes (") for each field and if your names and passwords do not contain them, you can delete them to simplify the importing program (with your prefered editor, for example).

Then, you can run the program:

`./keepassToPass.sh yourPassFile.csv `

    #!/bin/sh
    
    if [ $# -eq 0 ]
    then
        echo "You must provide a file name"
        exit
    fi

    while IFS=, read -r f1 f2 f3 f4 f5 f6 f7 f8 ; 
    do   
        echo "Creating pass entry for $f1 $f2"; 
        echo "$f4" | pass insert -e "$f1/$f2" 
        sleep 1
    
    done < "$1"

You can download (no guarantee) from [keepassToPass.sh](https://github.com/fernand0/scripts/blob/28038250c88b03f76f9dcb9396e31e1409c88ee7/keepassToPass.sh)

References:

[Introducing pass](https://www.passwordstore.org/)
Every Developer Should Start Journalism
Published: 2021-02-10 10:25:47

In this article, I will tell you why every developer should start journalism. This article may not be for everyone and this is only my advice.

## What is Journalism
So Journalism is collecting the collection and editing of news for presentation through the media or in rather simpler words **Journalism is collecting information and presenting it through a media**. 

For a developer, Journalism is not collecting news related information and noting it down but for a developer, Journalism can be just writing down what you have struggled in coding or learning a language or even the errors you have faced during creating applications, website,s or even some small programs and etc.

## Why Journalism
Let's say you are making a website but you are stuck on an error and you spent some minutes, hours, days depending upon the error and the developer's skill and after a month or two and now you are working on a new project and you are facing the same error and you cannot remember the code you wrote last time or the algorithm you wrote last time, now what would you do you will have to look through the whole code search through all the code you wrote last resulting in wasted productive hours. Now let's say that you wrote the errors and what you did on that day to solve that problem in a diary or on a personal notetaking device. You could just look up that diary and just get the written code to that error faster. In a nutshell **Journalism can help you save productive hours**. It would just take like 15-20 mins to write that error or sometimes even less.

So Thank You For Reading Throgh the whole article.

Please share this article.

Dont forget to follow me on [Twitter](https://twitter.com/GarvitMotwani) and If Youy Have any questions, drop it down in the discussion section below.
Implement Request Timeout Using Fetch and AbortController
Tags: javascript, webdev, tutorial
Published: 2021-02-10 10:14:26

consider this, you have a web-app that requests some data from some external service and you want to cancel the request if it takes more than `n` seconds. how would you implement this using javascript? I got you

this is the final snippet that you could modify according to your needs:
```javascript
(async () => {

// we'll use to add dely/sleep logic
const timedOut = Symbol("Timeout")
const sleep= (delay) => new Promise((resolve, reject) => {
  setTimeout(resolve, delay, timedOut);
});

// the actual interface that we'd be using to cancel the request
const abortController = new AbortController();
const signal = abortController.signal;

// this is our external api call
// delay is added only to mock time-taking requests
const getData =async (signal,delay) => {
await sleep(delay)
return fetch("https://jsonplaceholder.typicode.com/todos/1",{
  signal
})
}

// promise.race returns whichever promise resolves first
const res = await Promise.race([
  sleep(3000),
  getData(signal,3000)
]);

// if response is timeout abort the request
if(res === timedOut) {
  abortController.abort();
} else {
  // do whatever you want to do with the result
}
})()
```

lets walk through the code bit by bit

```javascript
const timedOut = Symbol("Timeout")
const sleep= (delay) => new Promise((resolve, reject) => {
  setTimeout(resolve, delay, timedOut);
});
```
this code resolves after however much delay we provide it with value of the symbol `timedOut` which we'll use later


```javascript
const abortController = new AbortController();
const signal = abortController.signal;
```
this is the interface that allows us to cancel one or more webRequests that use the same `signal`


```javascript
const res = await Promise.race([
  sleep(3000),
  getData(signal,3000)
]);

// if response is timeout abort the request
if(res === timedOut) {
  abortController.abort();
} else {
  // do whatever you want to do with the result
}
```

> The Promise.race() method returns a promise that fulfills or rejects as soon as one of the promises in an iterable fulfills or rejects, with the value or reason from that promise.

in our case, if the request takes more time than the timeout specified; `sleep()` function will resolve first and we can compare the response to abort the request.

That's all folks! :)
Wednesday Links - Edition 2021-02-10
Tags: kotlin, java, graalvm, jvm
Published: 2021-02-10 10:11:26

Explicit upcast in Java (30 sec read) ↕️
https://twitter.com/tagir_valeev/status/1356852454390923264

GraalVM Native Image Quick Reference (7 min read) 🏆
https://medium.com/graalvm/graalvm-native-image-quick-reference-4ceb84560fd8

Enhanced Deprecation in Kotlin (5 min read) ❎
https://todd.ginsberg.com/post/kotlin/deprecation

New Language Features Preview in Kotlin 1.4.30 (11 min read) 🎉
https://blog.jetbrains.com/kotlin/2021/02/new-language-features-preview-in-kotlin-1-4-30

JEP 356: Enhanced Pseudo-Random Number Generators (5 min read) 🔀
https://openjdk.java.net/jeps/356

SDKMAN! 5.11.0 released with completion (30 sec read) 🖥️
https://github.com/sdkman/sdkman-cli/releases/tag/5.11.0

JFrog to shut down JCenter and Bintray (7 min read) 🌇
https://www.infoq.com/news/2021/02/jfrog-jcenter-bintray-closure

Pinterest Describes an Architecture for Efficient Retrieval of Hierarchical Documents (3 min read) 📄
https://www.infoq.com/news/2021/02/pinterest-efficient-retrieval

Seeding a file server quickly (using Netcat and tar) 🚎
https://jmmv.dev/2021/02/seeding-a-file-server.html
Frontend Knowledge Pills
Tags: webdev, react, javascript, tutorial
Published: 2021-02-10 09:41:27

# Hello!

As I'm constantly searching for ways how to share Frontend related knowledge, I created [Knowledge Pills](https://bigsondev.com/pills/) on my website.

💊 What is this all about? 💊

👉 Code snippets with explanations.
👉 All the tips & tricks related to Frontend, e.g. outline HTML elements for easier layout building or learn how to create neat custom hooks in React.
👉 Blogs are usually longer and need more time to traverse.
👉 With pills, you get an example codesandbox application, code snippet itself with explanation/summary.

The main point is to keep them short, they should be more of a reference when you need to learn smaller concepts.

I hope you like the idea as I'm investing some of my time into that, I'll be happy for any proposals for new pills as well feedback on existing ones.

Enjoy the 💊

Cheers!

---
I'm thinking about creating YT video series - building [projects](https://bigsondev.com/projects/) from my website, step-by-step, modern technologies, best coding practices with a thorough explanation.

If you enjoy the content and like the idea, [Buy me a pizza](https://www.buymeacoffee.com/bigsondev).
Let's reach that goal together. 😊

Thanks for all the support!

Get in touch: [Mentorship](https://bigsondev.com/mentorship/) | [Twitter](https://twitter.com/BigsonDev) | [LinkedIn](https://www.linkedin.com/in/adrian-bigaj-282277130/)
uknown-host
Tags: bash, ssh, rsa
Published: 2021-08-10 12:25:37

---
title: uknown-host
published: true
date: 2021-02-10 10:03:00 UTC
tags: bash,ssh,rsa
canonical_url: https://jay.gooby.org/2021/02/10/uknown-host
---

I updated a server cluster last night and was getting loads of

```
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

```

warnings. You get told about the offending line number:

```
Offending RSA key in ~/.ssh/known_hosts:531

```

And usually I’d just edit it and be done, but after doing it a couple of times I wrote [unknown-host](https://gist.github.com/jaygooby/00b58afd85be372a3a4c451dd535f94e)

```bash
#!/bin/bash
#
# Use this to remove the offending line from your
# ~/.ssh/known-hosts file when you know the host
# has actually changed and you get the
#
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
# @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
# @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#
# Offending RSA key in ~/.ssh/known_hosts:531
#
# warning telling you what line needs removing.
#
# usage: unknown-host <line number>
#
# So calling:
#
# unknown-host 531
#
# will remove line 531 and then you can ssh again with the nag.
#
# jay@gooby.org
# @jaygooby

line=$1

# number detection via https://stackoverflow.com/a/3951175/391826
case $line in
    ''|*[!0-9]*) line="" ;;
esac

if [ -z "$line" ]; then
  echo -e "Usage: $(basename $0) <line number>" >&2
  exit 1
else
  sed -i"" -e "${line}d" ~/.ssh/known_hosts
fi
```


so I wouldn’t have to do that again, in the great spirit of [xkcd’s “Automation” webcomic](https://xkcd.com/1319/)

[![xkcd webcomic about how writing a simple script to automate a task grows exponentially](https://imgs.xkcd.com/comics/automation.png)](https://xkcd.com/1319/)
Machine Learning - Metrics
Tags: machinelearning, ai
Published: 2021-02-10 09:56:57

We saw that machine learning algorithms process large amounts of data to find patterns. But how exactly do they do that?

The first step in a machine learning project is establishing metrics. What exactly do we want to do and how do we know we're doing it well?

Are we trying to predict a number? How much will Bitcoin cost next year? That's a regression problem. Are we trying to predict who will win the election? That's a binary classification problem (at least in the USA). Are we trying to recognize objects in an image? That's a multi class classification problem.

Another question that has to be answered is what kind of mistakes are worse. Machine learning is not all knowing, so it will make mistakes, but there are trade-offs to be made. Maybe we are building a system to find tumors in X-rays: in that case it might be better that we call wolf too often and have false positives, rather than missing out on a tumor. Or maybe it's the opposite: we are trying to implement a facial recognition system. If the system recognizes a burglar incorrectly, then the wrong person will get sent to jail, which is a very bad consequence for a mistake made by "THE algorithm".

These are not just theoretical concerns, but they actually matter a lot in building machine learning systems. Because of this, many ML projects are human-in-the-loop, meaning the model doesn't decide by itself what to do, it merely makes a suggestion which a human will then confirm. In many cases, that is valuable enough, because it makes the human much more efficient. For example, the security guard doesn't have to look at 20 screens at once, but can only look at the footage that was flagged as anomalous.

Tomorrow we'll look at the next step: gathering the data.
What is the fastest way to create a basic website
Tags: discuss, webdev
Published: 2021-02-10 09:48:55

I want to create a basic website that just contains some personal information, probably a resumé, mainly text and some images. It may also have a contact me form.
What is the best way to go about this? Do I use a static site generator like Hugo or GatsbyJS, or do I create the site from scratch (especially because of the contact me form)?

Which is the fastest and easiest way to go about it?
Different but familiar and interactive todo list using React's Context API
Published: 2021-02-10 09:45:48

One crazy idea popped in my head - so I've created very basic interactive UI using React's context API and local storage. 

I was exploring different ways of putting and settled on this. I've categorized few daily regular routines. 

Few things needs an upgrade. There are thousands of todo apps so thought to make it in a little creative in a different way.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/9yvz9na3602aqgz0i8ue.jpg)

You can check it on [here](https://my-dailytodolist.netlify.app/)

Leave a star if you find creative 🙂

Graphic credits - icon8 vector creator.

Have a good day!
Good unit test vs bad one?
Tags: dotnet, csharp, unittest, beginners
Published: 2021-02-10 09:38:14

What's the difference between good and bad unit tests? 🧐

Bad unit tests feel right in the beginning. They let you feel confident, because hey, you write tests. 

But nothing really changes 🙊 , once you get into the refactoring part, and you have to refactor tests as well. And their assertions for the result. This leads to even longer development, even though you invested time in tests at the begging of the project.
So this leads us to the conclusion that… not are tests are equally valuable. Some of them raise false alarms. Some unit tests don't help you catch regression errors. Bad unit tests may be as well slow and are difficult to maintain.

Don't write unit tests just for sake of writing unit tests!

Focus on high-quality tests 🚀 
💻 They'll help you develop and design code, that is sustainable.
How to Learn Perl Object Oriented Programming?
Tags: tutorial, codenewbie, beginners, oop
Published: 2021-02-10 09:33:43

The **Object Oriented concept** in Perl is very much based on references and anonymous array and hashes. Let's start learning basic concepts of Object Oriented Perl.
Object Basics

In Perl, a package is a self-contained unit of user-defined variables and subroutines, which can be re-used over and over again. Perl Packages provide a separate namespace within a Perl program which keeps subroutines and variables independent from conflicting with those in other packages.

To declare a class named Person in Perl we do:

```perl
package Person;
```

Let's create our constructor for our Person class using a Perl hash reference. When creating an object, you need to supply a constructor, which is a subroutine within a package that returns an object reference. The object reference is created by blessing a reference to the package's class. 

```perl
#!/usr/bin/perl 

package Person;

sub new {
   my $class = shift;
   my $self = {
      _firstName => shift,
      _lastName  => shift,
      _ssn       => shift,
   };
   # Print all the values just for clarification.
   print "First Name is $self->{_firstName}\n";
   print "Last Name is $self->{_lastName}\n";
   print "SSN is $self->{_ssn}\n";
   bless $self, $class;
   return $self;
}
sub setFirstName {
   my ( $self, $firstName ) = @_;
   $self->{_firstName} = $firstName if defined($firstName);
   return $self->{_firstName};
}

sub getFirstName {
   my( $self ) = @_;
   return $self->{_firstName};
}
1;
```
Now let's make use of `Person` object in `scientific-employee.pl` file as follows:

```perl
#!/usr/bin/perl

use Person;

$object = new Person( "Sci", "Pro", 23234345);
# Get first name which is set using constructor.
$firstName = $object->getFirstName();

print "Before Setting First Name is : $firstName\n";

# Now Set first name using helper function.
$object->setFirstName( "Scientific" );

# Now get first name set by helper function.
$firstName = $object->getFirstName();
print "Before Setting First Name is : $firstName\n";
```

When we execute above program, it produces the following result −

```perl

First Name is Scientific
Last Name is Pro
SSN is 124567890
Before Setting First Name is : Sci
Before Setting First Name is : Pro.

```

### Run interactively!
The "PERL Systems & Scientific Programming Course" is a hands-on training that will give you a solid understanding and practical knowledge of Perl in order to be able to build any project. 

https://school.scientificprogramming.io/home/course/perl-systems-scientific-programming/17
Everything you need to know about macOS Catalina
Published: 2021-02-10 09:31:34

Since its introduction, many have hailed macOS as the next great Apple product. With a user-friendly interface and a new feature-set that are sure to fascinate tech-savvy users, it is expected that macOS will be able to provide users with the best mobile experience on the planet. In addition to the great features already mentioned, macOS comes with two other innovative programs. First, it comes with the highly acclaimed iBooks software and second, it provides you with access to GDrive - an online storage service that is fast becoming famous among iPad users. Here are some of the highlights that have helped me determine why I think that iOS is the better choice for a tablet computer experience:

Graphics and Design - A major consideration when buying a new device is the graphics that you would be getting. Many times, consumers have been frustrated by unsatisfactory graphics on tablets because they were unable to take advantage of the great features that come with tablets like apps and 3D visualization tools. Luckily, with macOS, this problem is solved. With the availability of new apps that can take full advantage of the wide screen size, you can easily use your drawing tablet to draw amazing pictures and illustrations all in one smooth operation. The excellent depth sensor allows the device to detect objects that are not otherwise detected by its predecessors.

Entertainment - In addition to great apps and great graphics, another reason why I believe that iOS is the better choice for a drawing tablet is because of the large selection of entertainment applications that are available for the device. With more than a thousand apps available for both iOS and macos, you can always find something that you enjoy doing. If you want to watch full length movies on your macos, there are apps that you can use to do just that. Plus, if you want to listen to your favorite music through your home stereo system, there are also plenty of options to choose from.

Read Also:
<a href="https://techvatan.com/download-macos-catalina-iso-dmg-and-vmdk-files/">download macOS Catalina ISO and DMG</a>
<a href="https://techvatan.com/download-macos-catalina-dmg-file-version-10-15/">Download macOS Catlina DMG</a>
The most common issue I see in new programmers code
Tags: beginners, javascript
Published: 2021-02-10 09:25:22

Is this:
```js
const isEmbedded = className.indexOf('embedded') > -1 ? true : false
```

Which can be fixed like this:
```js
const isEmbedded = className.indexOf('embedded') > -1
```

Or, even better:
```js
const isEmbedded = className.includes('embedded')
```
Karate UI Automation Tutorial :  Automating LIVE Project Step by Step
Tags: tutorial, testing, beginners, api
Published: 2021-02-10 09:23:41

In this video, We are going to learn How to Automate a LIVE Project using Karate UI Automation Tutorial. We will discuss the Karate API, UI Automation, and going to automate a Demo Katalon Web Application.


{% youtube nwFRzZM0p1U %}

We are using the Karate Core which allow to automation UI using Chrome, Safari.

What is Karate?
Karate is the only open-source tool to combine API test-automation, mocks, performance-testing and even UI automation into a single, unified framework. The BDD syntax popularized by Cucumber is language-neutral, and easy for even non-programmers. 

Powerful JSON & XML assertions are built-in, and you can run tests in parallel for speed.


❤️ Documentation - https://github.com/intuit/karate
❤️ https://intuit.github.io/karate/karate-core/

🔥🔥IMPORTANT LINKs 🔥🔥

✅API Testing –
https://www.learnapitesting.com

✅Cypress Tutorial with LIVE Projects –
http://cypresstutorial.com

🟢30 Days of Automation Testing
https://go.scrolltest.com/automation

🟢30 Days of API Testing
https://apitesting.co/30days

🟢 30 Days of Rest Assured
https://go.scrolltest.com/30days-restassured

—————————————————–
👪 Join our Community – http://bit.ly/learntesting2019
✅ Automation Tester Community – https://thetestingacademy.com
🐦Follow us on Twitter – https://twitter.com/itstechmode
📖 Like us on Facebook – https://www.facebook.com/scrolltest
🎤 Listen to our Podcast – https://anchor.fm/thetestingacademy
——————————————————

#selenium #seleniumjobs #testing #karateuitutorial #karateapi #karateframework
How to Learn Multivariable Calculus for Machine Learning in 2021?
Tags: machinelearning, datascience, analytics, deeplearning
Published: 2021-02-10 09:19:03

Do you have the same question- **"How to Learn Multivariable Calculus for Machine Learning"?**

If yes, then read this article.

**Multivariate(Multivariable) Calculus** helps in machine learning to explain the relationships between input and output variables. And Multivariate Calculus comes into the picture when you deal with a lot of **features and huge data.** That’s why familiarity with multivariate calculus is essential for building a machine learning model. 

For machine learning, you need to learn the following Multivariate Calculus topics-

1. Functions of several variables,
2. Derivatives and gradients,
3. Step function,
4. Sigmoid function,
5. Logit function,
6. ReLU (Rectified Linear Unit) function,
7. Cost function,
8. Plotting of functions,
9. Minimum and Maximum values of a function.

The next question you might have-

##**What are the Resources to learn multivariable calculus?**
So I have chosen 8 Best+FREE multivariable calculus Courses for Machine Learning & Data Science and here is the list-
**[Click to continue reading...](https://www.mltut.com/best-calculus-courses-online/)**