teleren/devto huggingface dataset:
#TECHLEADweek | The online free training to become a great leader in tech
Tags: devops, ios, android, eventsinyourcity
Published: 2021-09-14 03:35:10

Welcome to #TECHLEADweek, our biggest event of the year! ⚡️ A series of 4 free live training sessions to transition from engineer to manager and become a great tech lead/EM.

Discover the key skills needed, get the best practices to start building a solid leadership career and learn by doing with top industry leaders.

If you are already in the management path, plan to be there at some point, or you need to upskill your engineering team, this event is for all of you! Join, share and grow together! 📈

➡️ Register for the event here: https://tech.lidr.co/weekevent

🗓 Training Agenda:
27, 28, 29, 30 Sept | 18:00 to 19:30 CET

→ Session #1 (Monday, 27th)
Discover the critical skills you need to become a successful tech lead, how to develop them, and take advantage of the huge opportunity.

→ Session #2 (Tuesday, 28th)
Know the framework that highest-performing teams apply.

→ Session #3 (Wednesday, 29th)
Find out the best practices to put the Tech Leadership career Framework in practice.

→ Session #4 (Thursday, 30th)
Plug n' play with mentors and live the tech leadership experience.

🎙 Speakers:
Alvaro Moya (https://www.linkedin.com/in/alvarormoya/) is a seasoned CTO and entrepreneur. After many years walking the path from solo-founder to unicorn, he has founded Lidr.co, the ecosystem for tech leaders, to support top professionals in their transition to leadership roles.

📍 Address:
This training will be hosted online in Zoom.
Save your seat here: https://tech.lidr.co/weekevent

See you in the #TECHLEADweek!
Learning Map & Set (in JS) while doing leetcode
Published: 2021-09-14 03:33:50

I was going through a leetcode question yesterday with my pair
This was my pair's problem.

question was:
```
You are given an array of words where each word consists of lowercase English letters.

wordA is a predecessor of wordB if and only if we can insert exactly one letter anywhere in wordA without changing the order of the other characters to make it equal to wordB.

For example, "abc" is a predecessor of "abac", while "cba" is not a predecessor of "bcad".
A word chain is a sequence of words [word1, word2, ..., wordk] with k >= 1, where word1 is a predecessor of word2, word2 is a predecessor of word3, and so on. A single word is trivially a word chain with k == 1.

Return the length of the longest possible word chain with words chosen from the given list of words.
```


```javascript
const longestStringChain = (wordsArray) => {
  let result = [];
  let index = 0;
  wordsArray = wordsArray.sort((a,b) => {return a.length - b.length});
  const innerHelper = (start) => {
  if (start > wordsArray.length -1) {
    return;
  }
  let currentChain = [];
  currentChain.push(wordsArray[start]);
  for (let i = start + 1; i < wordsArray.length; i++) {
    let currentComparison = wordsArray[i];
    if (currentComparison.length - currentChain[currentChain.length - 1].length === 1) {
      let chainWord = currentChain[currentChain.length - 1];
      for (var j = 0; j < currentComparison.length; j++) {
        if (currentComparison[j] !== chainWord[j]) {
          chainWord.slice(0, j) + currentComparison[j] + chainWord.slice(j + 1);
          if (chainWord === currentComparison) {
            currentChain.push(currentComparison);
          }
        }
      }
      }
    }
    result.push(currentChain);
    currentChain = [];
    index++;
    innerHelper(index);
  };
  innerHelper(index);
  let longest = 1;
  for (var k = 0; k < result.length; k++) {
    if (result[k].length > longest) {
      longest = result[k].lenght;
    }
  }
  return longest;
  };
```


```
var longestStrChain = function(words) {
  words.sort((a, b) => a.length > b.length ? 1 : -1)
  const memo = new Map()
  for (let j = 0; j < words.length; j++) {
      memo.set(words[j], 1)
      for (let i = 0; i < words[j].length; i++) {
          const x = words[j].slice(0, i) + words[j].slice(i+1)
          if (memo.has(x)) {
              memo.set(words[j], Math.max(memo.get(words[j]), memo.get(x) + 1))
          }
      }
  }
  return Math.max(...memo.values());
}
```
#1 📚Library Management System
Tags: library, system, csharp, desktopapplication
Published: 2021-09-14 03:16:02


<!--- <img width="100%" style="width:100%" src="https://c.tenor.com/ypeQ4PaWXsoAAAAC/back-to-school-how-do-you-even-know-about-the-library.gif"> -->

![library](https://c.tenor.com/ypeQ4PaWXsoAAAAC/back-to-school-how-do-you-even-know-about-the-library.gif)


This is my `individual project`. Here I am trying to solve the difficulties faced in library. As a solution I have created a desktop application implemented with C#.

### Technology
Technologies I've used is: 
* `C#`

### Configuration
#### Step 1
`Clone this project from github (link is mentioned in below)`

#### Step 2
`Open the cloned project in Visual Studio`

#### Step 3 
`Run the project`

#### Step 4 (Optional) 
`You can create the project as standalone application by building the project in Visual Studio`


### User Interfaces
> `Welcome Page`

![library](https://user-images.githubusercontent.com/57215584/96998502-2c052100-1551-11eb-8a24-cad6b301c918.png)

> `Login Page`

![library](https://user-images.githubusercontent.com/57215584/96998544-3e7f5a80-1551-11eb-87e1-0620d71d6c5b.png)

> `Dashboard Page`

![library](https://user-images.githubusercontent.com/57215584/96998604-58b93880-1551-11eb-889d-45a10f529c79.png)

> `You can view others in Github Repo👇`

### GitHub Repo 📌
{% github Dulyaaa/Library-Management-System no-readme %}

Thanks in advance✨..!!
How to Make Money from Blog
Tags: blogger, tutorial, templat, tools
Published: 2021-09-14 03:08:44

One way to make money during the current pandemic is to create a good blog and register it with google adsense to register as a freelancer or become a google adsense publisher.

For me, this is the right way because many of us have lost our jobs due to the effects of the covid-19 disease which has made some employees at home because of the PPKM period.

Maybe some of you have asked something like this: How do I create a blog and make money? Do we have to master programming languages? I will answer briefly, concisely and clearly. For that here we need to think in advance like what will you do when you are hungry? Surely you are looking for food to eat right? Well, here the meaning of my answer is all that we can do easily. We can create a blog for free and to learn programming now is not difficult. You can learn self-taught with the help of Google, if you find it difficult you can visit my blog and I am ready to help you if it is needed.

Visit my blog https://www.samuelpasaribu.com
My Contributed Projects
Tags: projects, systems, contribution, series
Published: 2021-09-14 03:01:51

Projects that I've proofed my valuable😁 contribution are listed down here as a series. Most of them are group projects done in university life and some of them have only my individual contribution where I'd done them to learn new technology and to became a pro🙊.  
The series of project contains the both web application and mobile application where each of them have good background. 

### **My starting point...** 
BTW my first application is a website, developed at age of 15 by force of a school IT teacher to learn the basics of `HTML` and `CSS`. And the same teacher taught me the `Visual Basics 6.0` which is too odd now to study and made a simple calculator (only addition and subtraction😅 `{It was too hard since no passionate, and done for teacher's power of mouth}`). But I got big "A" for that thanks to teacher. 

Then I wasn't developed any for two years since I chose to become a `medical officer👩‍⚕️` to treat all kind of people no matter who visits me. But the thing was that I had to learn not only about humans body but also plants body where my brain was started to explode and crashed down. Eventually brain capacity exceeded😪. 

While learning plant's structure I turned into other two subjects: chemistry🧪, and physics which had the complex logic and invisible world theories. Then path changed for `Electrical Engineer...Chemist...?!` 

So, life keep changing my future when I was a teenager. But myself decided to change my life forever.  Life got changed at age of 19 to become a Software Engineer which I'd never figure out to be. 

### **Eventually...**
I entered the university for my higher studies. And then realized what I born for💀. Contribute to software. This is the life I wanna be. Coding for 24/7 hrs no matter what😊.

But **`failing😓.. trying.. winning🏆..`** has become a part of a my life now. It's a cycle🌀. No chance to loose that cycle.
Anyway I never think to stop coding even though I'm able to get free swags.

> *My ultimate goal is to keep society happily by contributing the software.* 

`Keep contributing🤗`

So, let's get started!!✨
Deploying to Netlify!(React)
Published: 2021-09-14 02:57:40

You just spent hard time developing an application and are extremely proud of your work, now time to... just look at it and show your household? NO! Time to push that awesome work of art out for the whole wide world to see! Im going to take you step by step while keeping it as simple as possible on deploying your application to Netlify.

-Project
Make sure your frontend is in its own repo! Netlify wont be able to read the program that has the full-stack in one repo.

- Starting on Netlify!
First and foremost, create your account on Netlify, connect it to your github as this is how your site will be read! 

-Site creation
Choose the option that reads "New site from Git". After this, choose GitHub as the provider, then choose your desired repository. Set up your branch.

In Build command type in "CI= npm run build", in publish directory type in "build".

After you hit deploy site! Well done you have deployed your work of art! Happy coding!
Basic Arithmetic in Assembly
Published: 2021-09-14 02:57:11

## Hello there!

So basically I just figured out how to do those 4 simple operations (adding, diving etc.) in assembly, because I need to be able to do maths in my own programming language. So here's the recap of all the pain I've been through thanks to intel:

> This article is useful for people using intel x86_64 architecture with the GNU assembler, gas. You also have to use `.intel_syntax noprefix` macro so you can use the intel syntax, which this tutorial uses.

## Addition

First things first, get your values into your 64 bit teeny tiny registers:

```
mov rax, 1
mov rbx, 2
```

The rest is pretty simple:

```
add rax, rbx
```

The result is in `rax`, which is `3`.

## Subtraction

Same as always:

```
mov rax, 10
mov rbx, 2
```

Then again:

```
sub rax, rbx
```

The result is in `rax`, which is `8`.

## Multiplication

So, this one instruction actually has 2 ways of using it, but for the sake of simplicity, I will show you the easiest one, which is most likely erroneous because if you are writing a production ready compiler or the production code directly you HAVE TO check if multiplying two 64 bit numbers result in a 128 bit number, because if it does your result will be incorrect. But who cares right?

```
mov rax, 5
mov rbx, 2
```

Then a simple operation:

```
imul rax, rbx
```

Aaaanndd, the result is in `rax`, which is `10`.

## Division 🤢

So, this one is probably the messiest within the four, but here we go ladies and gentleman. This instruction takes only a single, explicit argument and an implicit argument. But using it with a little hack is pretty easy. Firstly, unlike any other instruction up until you have seen, this one requires that the dividend MUST be in the rax register.

```
mov rax, 100
mov rbx, 5
```

Then, before diving it you have to put this instruction for some complicated reason, which affects registers `rdx` and `rax`. I will tell more in a minute, but just divide by then:
```
cqo
idiv rbx
```

Your result should be in `rax`, and the remainder of this operation is in register `rdx`.

The problem with dividing is that, because it affects other registers that you don't mention, often times when `rax` and/or `rdx` has values you actually  have to store them somewhere. One way to get around this is using the stack:

> note that you can put them in unused registers too!

```
# store those values on the stack
push rax
push rdx

# divide
mov rax, 100
mov rbx, 5
cqo
idiv rbx

# move the result to unused registers
mov r8, rax
mov r9, rdx

# then retrieve back those values, notice the order is reverse!
pop rdx
pop rax
```

## Conclusion

I don't hate intel, but that way of dividing is uhhh... Nevertheless, this is a funny thing to know and pun your coworkers because you can do maths in ASSEMBLY now and they can't cuz they have a life and shit. Can't understand humans, see you later!
VueJs, React , Angular, StencilJs
Published: 2021-09-14 00:57:51

VueJs, Angular,  React, and stencilJs are all front-end JavaScript frameworks for building modern web applications,  each of these frameworks have their own quirks ,dependencies, and syntactical sugar, but also share some similarities.

Components:
components are a common theme for these frameworks. If you've ever worked on a web application using asp .NET core components in my opinion are similar to partial views. they are separated parts of HTML JavaScript and CSS that you can re use throughout your web application.

Biased Opinion: 
I think VueJs has the best developer experience, I've used VueJs to create a marketing page for a company and the framework is not much different from vanilla JavaScript. If you know what you are doing with JavaScript html and CSS VueJs was nice as it provides nice separation of code through components, comes with vue routing, and comes with some nice easy ways of adding inline event listeners such as "@click" and more. If I had to chose a framework to build a web application today I would probably chose vue.

The boiler plate project for my hello-world vue comes directly from the VueJs CLI:


...
npm install -g @vue/cli
# OR
yarn global add @vue/cli

vue create hello-world
...
 

https://github.com/Viable-Slime/BoilerPlate
Recomendaciones para una entrevista técnica
Tags: desarrollador, pruebas, spanish
Published: 2021-09-14 00:52:20

A lo largo de mi carrera profesional he apoyado el proceso de reclutamiento en varias empresas desde la parte técnica y aquí te daré unos tips para que la próxima vez que tengas una entrevista técnica vallas preparado.

- Lo más importante de todo ***repasa*** los temas por los que están interesados en contratarte.
- La entrevista es una charla de ambos lados en la cual el entrevistador quiere conocer tu habilidad técnica.
- Ten seguridad sobre tus respuestas .
- Elimina cualquier elemento que te pueda distraer, procura estar concentrado en una sola actividad.
- Si tiene una prueba en vivo lo mejor es ir comentando el proceso que está realizando, así no tendrás nervios y será más dinámica la prueba.
- No olvides las pruebas unitarias, son muy importantes actualmente no existe un lugar donde no las apliquen.
- Se tu mismo, confía en ti y se sincero sobre tus conocimientos.

Este post se inspiro en el de @valtory , [Cómo venderse como dev](https://dev.to/valtory/como-venderse-como-dev-356i) ya que es algo muy importante en nuestro día a día.

Gracias por leer, nos vemos en la próxima.
How to learn DevOps
Tags: devops, operations, cloudnative, learning
Published: 2021-09-16 08:34:43

---
title: How to learn DevOps
published: true
date: 2021-09-14 00:00:00 UTC
tags: devops,operations,cloudnative,learning
canonical_url: https://jhall.io/archive/2021/09/14/how-to-learn-devops/
---

I was recently asked “How can I learn DevOps?”

This is a bit of a loaded question, if only because “DevOps” is a loaded term. I did my best to cut through that confusion, and provide a concise answer in my recent longer-form blog post here: [How to learn DevOps](https://jhall.io/posts/learn-devops/).

But here’s the TL;DR;

Since [DevOps really means “cooperation”](https://jhall.io/archive/2021/02/11/devops-is-just-cooperation/), I’ll assume that you really meant to ask “What technologies should I learn to become a competent Operations engineer?”.

There are a ton of exciting technologies out there, and a certain amount of competition between products. I cannot tell you whether you should learn AWS, Azure, or Google Cloud, for example. They all do roughly the same thing. Which is “best” mostly depends on who is paying your salary (now, or in the future).

So here’s my general advice to anyone who’s interested in becoming proficient in the types of technologies used in modern Cloud operations environments, and in working with DevOps-minded teams:

**Learn to write and deploy your own application.**

It’s that simple. And it’s that complicated.

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
How to add string array type to function return value in TypeScript?
Tags: typescript
Published: 2021-09-14 00:00:00

---
  title: How to add string array type to function return value in TypeScript?
  published: true
  tags: TypeScript
  date: Tue Sep 14 2021 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/add-string-array-type-to-function-return-value-typescript
  cover_image: https://melvingeorge.me/_next/static/images/main-66e8854f9ee60b4bab9a0d697878afe0.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/add-string-array-type-to-function-return-value-typescript)
  
To add `string` array type to function return value first, declare the function, then add a `:` symbol (colon) after the parameters opening and closing brackets `()` and then type the word `string` followed by `[]` symbol (opening and closing square brackets) to indicate that the function's return value is of `string` array type.

### TL;DR

```ts
// simple function with return
// value of string array type
function getGreetStrings(): string[] {
  return ["Hey", "Hello", "Hi"];
}
```

For example, let's say we have a function called `getGreetStrings()` and on calling the function should return an array containing only string values for example `Hey`, `Hello`, `Hi`, etc.

It can be done like this,

```ts
// simple function
function getGreetStrings() {
  return ["Hey", "Hello", "Hi"];
}
```

This is fine. But what if we need to enforce that the return value of the `getGreetStrings` function should only return an array of strings and nothing else. To do that we can add the function return type like this,

```ts
// simple function with return
// value of string array type
function getGreetStrings(): string[] {
  return ["Hey", "Hello", "Hi"]; // ✅ allowed
}
```

After defining the return type as a `string` array, we must return an array of string values or it may show an error.

Now Let's also try to return a value other than the `string` array type like this,

```ts
// simple function with return
// value not of string array type
function getGreetStrings(): string[] {
  return [1, 2, 3]; // ❌ not allowed. Type 'number' is not assignable to type 'string'.
}
```

As you can see from the above code the TypeScript compiler is not allowing us to return the array and shows us an error saying `Type 'number' is not assignable to type 'string'.` which is what we want to happen.

See the above codes live in [codesandbox](https://codesandbox.io/s/add-string-array-type-to-function-return-value-in-typescript-n4fgk?file=/src/index.ts).

That's all 😃!

### Feel free to share if you found this useful 😃.

---
How to Upload Multiple Files to AWS S3 using Terraform
Tags: s3, aws, terraform
Published: 2022-02-25 03:45:54

---
title: How to Upload Multiple Files to AWS S3 using Terraform
published: true
date: 2021-09-14 00:00:00 UTC
tags: s3, aws, terraform
canonical_url: https://www.ankursheel.com/blog/upload-multiple-files-aws-s3-terraform
description: A snippet to upload multiples files from a specific folder (recursively) to AWS S3 using terraform
---

## Problem

I want to upload multiple files from a specific folder to an AWS S3 bucket.

### Assumptions

The S3 bucket name is **test**.

The directory structure is as follows.

```
documents
|- file_1
|- subdirectory1
| |- file_1_1
| |- file_1_2
| |- subdirectory2
| | |- file_1_2_1
```

We want to end up with the following S3 objects.

- s3://test/file\_1
- s3://test/subdirectory1/file\_1\_1
- s3://test/subdirectory1/file\_1\_2
- s3://test/subdirectory1/subdirectory2/file\_1\_2\_1

## Solution

```hcl
resource "aws_s3_bucket_object" "test" {
  for_each = fileset("./documents/", "**")
  bucket = "test"
  key = each.value
  source = "./documents/${each.value}"
  etag = filemd5("./documents/${each.value}")
}
```

- **_Line 1_:** : Create an S3 bucket object resource.
- **_Line 2_:** : Use a **_for\_each_** argument to iterate over the documents returned by the **_fileset_** function. **_for\_each_** identifies each instance of the resource by its S3 path, making it easy to add/remove files. The fileset function enumerates over a set of filenames for a given path. It uses **_\*\*_** as the pattern for a recursive search.
- **_Line 3_:** : The name of the bucket to put the files in.
- **_Line 4_:** : The object’s name once it’s in the bucket. In the example above, it is the same as the path.
- **_Line 5_:** : the Path to the file to be uploaded.
- **_Line 6_:** : Triggers an update only if the file changes. The eTag of each object is an MD5 hash of that object.

## References

- [Resource: aws\_s3\_bucket\_object](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket_object)
- [for\_each](https://www.terraform.io/docs/language/meta-arguments/for_each.html)
- [fileset](https://www.terraform.io/docs/language/functions/fileset.html)
Comparing Boilerplates...
Published: 2021-09-13 23:55:07

__My Experience:__
While downloading multiple different boilerplates in VueJS, React, Angular, and StencilJS it felt like I had to go through the same general process when cloning boilerplates into a new repo. I had to install some dependencies using npm, cd into the right directory and use npm to start the boilerplate. However, I did use yarn to install the Vue.js boilerplate rather than npm. StencilJS was probably the most basic boilerplate but it was also the easiest and fastest to install. Vue.js by far too the longest to download, while Angular and React downloaded and ran faster than Vue.js but much slower than StencilJS. 

__File Comparison:__
When looking through the code of each boilerplate I found that each one had a Readme file, a license file, a src directory, some basic javascript, and a package.json file. However, Vue.Js had the biggest file structure out of all of them with more .js and json files than react, angular, or StencilJS.  

__My Preference:__
If I had to start developing with one of these immediately, I'd probably start with react. It's fairly easy to use and while it did take a bit longer than some of the other boilerplates, to install dependencies and run it, there's already so much existing support and functionality for react that I don't think it would take long for an amateur developer learn the basics of react relatively quickly. 


The boilerplates I worked with are here under this repo: 
https://github.com/TheKodingKrab/boilerplates
Introduce AID - A system that helps you run machine learning models
Tags: opensource, machinelearning, showdev
Published: 2021-09-13 23:31:32

---
title: Introduce AID - A system that helps you run machine learning models
published: true
description: 
tags: opensource,machinelearning,showdev
//cover_image: https://direct_url_to_image.jpg
---

Hi all! In the past, when I was trying to run some existing machine learning algorithms/models, it usually takes me a lot of time (finding dependencies, etc.). Hence we made a system that can be used to find existing models, download them and run them easily.

Here's a YouTube Demo: {% youtube 18ulW_8phgs %}

GitHub: {% github autoai-org/aid %}

I am looking forward to your feedback!

Note: The system is still under heavy development and should not be used in serious environment :( .