teleren/devto huggingface dataset:
The truth behind being a good programmer
Tags: discuss, watercooler, webdev, programming
Published: 2022-07-21 04:19:58

Programmers are dumb !
This is a fact, no one can argue this.
Why ? - you might ask
Well, for one very simple reason, and that is the machine itself is dumb, it follow coding instructions, and if it found that something is not correct, it will halt. You need to write the exact steps that the computer will take in order to achieve whatever your purpose is from your program!
So, naturally, you will find that programmers are not clever, they write code, which is predefined by others - the founders of the language/framework/package/library ..etc
You just type what you see correct from your point of view, and as a good friend of mine said once, programming is all about trial and error!
So what is the secret here 😄 ?
The Keyword here is : Discipline !
If you code everyday, get engaged with the code and what is behind the code - try to learn assembly language and get one layer below your higher level language - on a constant basis each day or each 2 days or even each two weeks, the most important is you set a rule and you follow it. 
You will discover - by time - that there is a big improvement in your understanding to your language even if it was baby steps, but you know Japanese were not wrong when they set the KAIZEN rules: Continuous Improvement Even with Small steps BUT **constantly**  
Discipline in each aspect of your life, starting by sleeping early avoiding the YT rabbit hole + Social Media, to making your bed in the morning, walking up early, drinking more water than coffee, exercise, have a hobby, read a book, walk in the forest, be original and do not imitate others : All Of That on a **constant basis** - that is what discipline is all about. 

Discipline is the key to success, and that is another fact that no one else can argue.

All the best.
Amir Bek
Bảng giá căn hộ cao cấp FiveSeasons Home Vũng Tàu
Tags: fiveseasonshomes, fiveseasonshomesvungtau, giafiveseasonshomes, vitrifiveseasonshomesvungtau
Published: 2022-07-21 04:09:22

Bảng giá căn hộ cao cấp FiveSeasons Home Vũng Tàu:
FiveSeasons Homes – không chỉ sở hữu vẻ đẹp tuyệt tác từ vị thế độc tôn nằm trên sườn đồi cao và tầm nhìn hướng ra biển xanh mà còn sở hữu những giá trị “vàng” dung dưỡng cho cuộc sống từ sự cân bằng, gắn kết con người với thiên nhiên , gắn kết các thành viên trong gia đình, để năm mùa lúc nào cũng là mùa yêu thương, trải nghiệm và hạnh phúc.
Với Giá Bán Five Seasions Home đặc biệt ưu đãi giúp khách hàng có thể dễ dàng lựa chọn sản phẩm.

Thông tin chi tiết: https://centralland.com.vn/fiveseasons-homes-vung-tau/
FiveSeasons Home Căn hộ nghĩ dưỡng cao cấp chuẩn 5 sao
Tags: fiveseasonshomes, fiveseasonshomesvungtau, giafiveseasonshomes, canhofiveseasonshomes
Published: 2022-07-21 04:07:04

Five Seasons Homes là dự án khu phức hợp căn hộ nghỉ dưỡng cao cấp với trung tâm thương mại ngay vị trí trung tâm và liền kề Bãi Sau thành phố Vũng Tàu .
Five Seasons Homes Vũng Tàu được đánh giá cao bởi vị trí đẹp nhiều mặt tiền đường đại lộ , thiết kế hiện đại và 100 % căn hộ sở hữu ban công thoáng mát , tầm nhìn biển ngút ngàn . Một dự án căn hộ sinh lời cao cho các nhà đầu tư , cũng như khách hàng có nhu cầu nghỉ dưỡng .
Thông tin chi tiết: https://centralland.com.vn/fiveseasons-homes-vung-tau/
Kubernetes Authentication in AWS EKS Using IAM Authenticator
Tags: kubernetes, aws, cloud, eks
Published: 2022-07-21 04:00:52

## How Kubernetes integrates with AWS IAM authenticator

![EKS Authentication. Image from AWS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yssfs8ihk2fu6zqdlpz6.png)

There is a different way of authentication to Kubernetes based on different cloud provider implementations. I will specifically discuss authentication implemented by AWS EKS. This article should clarify the following questions.

- How authentication works in EKS?
- What is AWS IAM Authenticator for Kubernetes?
- What does “aws eks get-token” do in KubeConfig to access EKS cluster?
- What is “aws-auth” Configmap in EKS?
- How can I add AWS users/roles to access EKS cluster?
- How do AWS users/roles map to Kubernetes users and groups in EKS?
- How do I generate KubeConfig for EKS cluster?
- How do users get authorized to perform specific Kubernetes actions?

Take a look at this article to find detailed explanation with hands-on use case - https://betterprogramming.pub/kubernetes-authentication-in-aws-eks-using-iam-authenticator-de3a586e885c?source=friends_link&sk=fce36cdc7bbc7de2c9a39f73f013922b
Schema Inference for Large .CSV files
Tags: dataengineering, bigdata, csv, dataset
Published: 2022-07-21 03:54:43

A tool to automatically infer columns data types in .csv files

[csv-schema-inference](https://github.com/Wittline/csv-schema-inference)

The tests were done with 9 .csv files, 21 columns, different sizes and number of records, an average of 5 executions was calculated for each process, shuffle time and inferring time.

- file__20m.csv: 20 million records
- file__15m.csv: 15 million records
- file__12m.csv: 12 million records
- file__10m.csv: 10 million records
- And so on...

If you want to know more about the shuffling process, you can check this other repository: [A tool to automatically Shuffle lines in .csv files](https://github.com/Wittline/csv-shuffler), the shuffling process will helps us to:

- Increase the probability of finding all the data types present in a single column.
- Avoid iterate the entire dataset.
- Avoid see biases in the data that may be part of its organic behavior and due to not knowing the nature of its construction.

![Benchmark](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h8ak5xtt8eossqtphm9o.png)
How to Insert Images in the React Spreadsheet Component
Tags: react, webdev, reactnative
Published: 2022-07-21 03:54:21

Learn how to insert an image in the [React Spreadsheet component](https://www.syncfusion.com/react-ui-components/react-spreadsheet) of Syncfusion. In this video, the image has been inserted in the specific cell position by using the image property. You can also insert an image by using the insertImage method. To enable or disable this feature use the allowImage property in Spreadsheet. You can change the height and width of the image by resizing it and move it to another position with drag and drop functionality. 

**Product overview**: https://www.syncfusion.com/react-ui-components/react-spreadsheet

**Download an example from GitHub**: https://github.com/SyncfusionExamples/how-to-insert-images-in-the-react-spreadsheet

{% youtube PsdR7hPi4DY %}
Filename Issue
Tags: python
Published: 2022-07-21 03:45:17

Hello, I am new to programming. I have an issue with the python language. I have multiple wave files and filenames so big so I want to reduce the filename first 3 letters. My wav file name is "id10270___5r0dWxy17C8___00007_BGD_150204_030_CAF.CH5_snr3_fileid_1088.wav". I want to only wav file this format "id10270___5r0dWxy17C8___00007.wav". Please suggest and advised to me how to solved this issue.
Thank you very much.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ffcijn9tbo0r7g0vsmq7.png)
Microsoft Teams was unavailable for users worldwide
Tags: microsoft, teams
Published: 2022-07-21 04:38:50

---
title: Microsoft Teams was unavailable for users worldwide
published: true
date: 2022-07-21 03:32:45 UTC
tags: Microsoft,Teams
canonical_url: https://www.geekgreenish.eu.org/microsoft-teams-was-unavailable-for-users-worldwide/
---

 ![Microsoft Teams was unavailable for users worldwide](https://images.unsplash.com/photo-1611174895360-53948c735c3a?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDF8fG1pY3Jvc29mdCUyMHRlYW1zfGVufDB8fHx8MTY1ODM3MzM4OA&ixlib=rb-1.2.1&q=80&w=2000)

Teams and Office 365 were two of the affected Microsoft services, the company announced.

Europe and Asia are being impacted by a Microsoft Teams outage, according to a tweet from a Microsoft account.

> We’re investigating an issue with Microsoft Teams impacting Europe and Asia. For more details please follow TM252802 in the admin center.
> 
> — Microsoft 365 Status (@MSFT365Status) [April 27, 2021](https://twitter.com/MSFT365Status/status/1386991069091479552?ref_src=twsrc%5Etfw)

<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

"We have verified that this problem affects users everywhere. In order to identify the problem's underlying cause, we are examining recent changes and monitoring telemetry.

On social media, people complained about issues with the desktop application for the video conferencing tool, which works on Windows 10 and MacOS.

Users began reporting login and server problems at around 10:30am GMT, [according to DownDetector](https://downdetector.co.uk/status/microsoft/).

Other Microsoft services, such as its cloud computing platform Azure or gaming service Xbox Live, did not appear to be affected by the problem.

A Microsoft spokesperson said, "We have resolved an issue that affected access to Microsoft Teams for some customers and services are now running normally." They did not provide any detail about what the issue was.

On April 2, the Azure Portal and Azure services faced problems that caused all of the software giant's products to go down, including its gaming platforms, Skype, and OneDrive.

However, because the Microsoft Exchange business accounts were not yet transferred to Azure, they were untouched.

<!--kg-card-begin: markdown-->

> Source: [Yahoo!](https://www.yahoo.com/now/microsoft-teams-down-users-around-111757806.html?guce_referrer=aHR0cHM6Ly93d3cuYmluZy5jb20v&guce_referrer_sig=AQAAABsE-s8dMRqxadaCy8mBx_iYL9lS-MR3ms7vKjq7_Hhcfl9Rg6i_UGqTUQQswN_U75q755htF6fUFbWIb-s7ZZJZvmS9pJEsuaEdA8wiFFW095z2SzK-X2YH16XEqA6CdeULOljbXPEOqM8lLKLIOkG7A4deGjzLNFtw5c4K5ns4&guccounter=2)

<!--kg-card-end: markdown-->
Terraform: My experience taking the exam
Tags: terraform, devops, cloud
Published: 2022-07-21 03:31:37

After writing several articles about Terraform I finally felt prepared I took the exam. I am glad that I passed that I passed. Now I am a certified Terraform Associate.

In this final chapter of the series I will tell you about the exam and what I think about it.

&nbsp;

### Registration

Registration for the exam is available on [this page](https://www.hashicorp.com/certification/terraform-associate). Weird thing about the portal is that it required a Github account. The unfortunate part is that my Github email is different from my personal email tied to Credly where I have all of my certification badges. If you are like me and prefer to have your Credly badges in one place make sure to register a Github account for that email and use it for registering for the exam.

Registration itself is straight forward. You pay $70.50USD and select date and time using PSI portal. After registration you will get an email with required links and you are all set.

&nbsp;

### Before the Exam

PSI would allow you to access the exam page 30 minutes prior to the exam. In this time you would need to download PSI secure browser which is about 180MB so make sure your internet connection allows for timely. Then you would need to install it and grant the necessary permissions like screen recording, access to camera and microphone.

When you launch PSI browser it will run a check and ask you to close applications that PSI does not allow during exam. For me it asked to close other Browsers and Ipad mirroring service (I didn't even know I had such process running in the background). Closing all those apps will pass the PSI browser checks and you will be presented with the next task.

The browser will ask you to take a picture of your government issued ID and taking sweeping videos of your sitting area (horizontal and vertical).

Once you are done with that you will be connected to the proctor with a new chat window. The proctor will verify your name and the sitting area. He may ask you to show him the table and/or ask you to remove certain items. If he is happy with what he sees he will start the exam. 

&nbsp;

### Exam

The exam is 1 hour long and mine had 57 questions in it. All questions were multiple choice and some True/False questions here and there. I was done in about 30 minutes.

After you submit your answers you will be given the result right away.

&nbsp;

### Thoughts about questions

I passed with a score of 86%. I think I could have done better, but a pass is a pass.

I covered most of the topics for this exam in the series, though some questions threw me off.

This is the list of topics I wish I covered more:
- Built-in functions
- CLI commands and available options/flags
- Workspaces

If you are using this series as a prep for the exam, I would recommend going through [official study guide with tutorials](https://learn.hashicorp.com/collections/terraform/certification-associate-tutorials) to make sure you cover all the bases.

&nbsp;

### Conclusion

This wraps up this series. I hope you learned something. Good luck!
[ABOUT ME] My DeviantArt page.
Tags: deviantart, art, watercooler
Published: 2022-07-21 03:29:11

I now have a [DeviantArt](https://www.deviantart.com) page.
I'm "[KattyTheEnby](https://www.deviantart.com/kattytheenby)" and ðis is [my About Me](https://www.deviantart.com/kattytheenby/status-update/I-m-Calin-Baenen-a-pansexual-923187789) remade on ðere.

I will be posting game concept-art, images ðat showcase my game(s), art I own or have made, etc...

Hopefully ðis will greatly expand my audience.
I know I'll have fun on ðe platform and I can't wait to see what kinds of new followers I'll attract!


<center><h1><b>Thanks for reading!<br/>Cheers!</b></h1></center>
The different syntax of import packages between python and Nodejs
Tags: javascript, webdev, python, node
Published: 2022-07-21 03:21:51

In the ES6 and Nodejs, we import packages like 

```js
import default_package_name from "module-name";
```

However, it is total opposite in python, the from keyword is at beginning

```python
from package_name import module_name
``` 

why the two syntax are so similar but the order is completely difference.
Modern JS
Tags: javascript
Published: 2022-07-21 03:05:54

## Private class properties, getters, iterators in one simple example

Ever needed to loop over a set of values continuously, i.e. return to the first value when the end is reached? You could use an array, increment the index and set it to 0 when the end is reached, or you could take the opportunity to learn some modern js features:

```js
class Looper {
    #i // iterator
    #b // iterable e.g. array, Map, Set
    #v // value 
    constructor(iterable) {
        this.#b = iterable
        this.reset()
    }
    get value() {
        return this.#v.value
    }
    get next() {
        this.#v = this.#i.next()
        if (this.#v.done) {
            this.reset()
        }
        return this.value
    }
    reset() {
        this.#i = this.#b[Symbol.iterator]()
        this.#v = this.#i.next() 
        return this
    }
}
```
Example usage:
```js
const loop = new Looper([1,2,3])
loop.value //1
loop.next //2
loop.next //3
loop.next //1
loop.next //2
loop.reset()
loop.value //1
loop.next //2
loop.reset().value //1
loop.next //2
loop.next //3
```
:)
4 Simple Ways to Covert a JavaScript String to a Number
Tags: javascript, beginners, webdev, programming
Published: 2022-07-21 02:28:51

Having to check if a string is a number, and then type convert it to a number, comes up a lot when coding in JavaScript. If you're done more than 5 leetcode problems, then you know what I'm talking about! 😅

*It's also super useful when coding applications too.* The classic example is the calculator app, where you're taking in input values from the users as strings, and you need to verify that these values are valid numbers (or operators).

### How do you check if a String is a Number?

There's a JavaScript method with a funny name called `isNaN(str)`.  Which translates to "is Not a Number".  It returns true if `str` is not a number, and false if it IS a number.

If we use `!isNaN(str)` we get true if `str` is a number....


```javascript
!isNaN('👾123') // => false
!isNaN('😺') // => false
!isNaN('456') // => true

// works for floats too
!isNaN('-2.5') // => true
``` 

### Great, now how do I Convert the String to a Number?


There are 4 ways to type convert a string to a number (if it is a number). 

**WARNING**: If the string is NOT a number, do NOT attempt to convert it to a number, because you'll either get `NaN` back or sometimes `0` if you convert an empty string or space to a number.  Good luck finding that bug in your code!** 🤬

*So ALWAYS check if it's a number using `!isNaN(str)` FIRST. *

Got it? Cool! Let's type convert:


```javascript
// for integers
+'456' // => 456
parseInt('456') // => 456 
Number('456') // => 456

// for floating point numbers
+'-2.600' // => -2.6
parseFloat('-2.600') // => -2.6 
Number('-2.600') // => -2.6

``` 

Note that `parseInt(...)` ONLY works for integers, if you give it a float it will cut off everything after the `.`, so `parseInt('-2.6')` becomes `-2`.

### How to Remove Trailing (and Leading) Zeros from a Floating Point Number

Notice I added some zeros at the end of `-2.6` I did that to illustrate something cool: **by type converting a string to a float, all unnecessary floating point zeros that come after AND before will be removed.  **

This really comes in handy.

For example:

```javascript
+'-000002.600' // => -2.6
``` 

**Related trick:** if you have a float with a lot of trailing zeros you want to get rid of, just convert it to a string THEN back to a number with `+`:

```javascript
const annoyingNumber = 1.230000000000;

const cleanNumber = +annoyingNumber.toString();

console.log(cleanNumber); // => 1.23
``` 
## 😎

### My Favorite Option for Converting from String to Number in JavaScript?

Hands down, my favorite is the `+` operator.  It's just one character long, gotta love it! 😻

What's your favorite?


If you enjoyed this article please check out my blog
[Indepth JavaScript](https://indepthjavascript.dev/) for more illuminating content. 🤓
O que é REPL Driven Development?
Tags: clojure, javascript, tutorial, programming
Published: 2022-07-21 02:10:45

![REPL Driven Development](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/heigfpumhrmsh7rd1r5s.png)

 
Como desenvolvedores em 2021, devemos escrever testes de unidade, de integração, porém muitas vezes empacamos nesse processo, hoje vou mostrar como o Clojure tem me deixado melhor nisso de testar e analisar o meu próprio código.

### REPL
Para começar o que é o REPL ? Read-Eval-Print Loop é um terminal onde você pode testar as suas funções e ver seus resultados em tempo real. Isso parece algo simples e que temos no Node, mas nunca tinha visto que isso poderia me ajudar no meu workflow até mexer um pouco com Clojure, onde o REPL Driven Development e o TDD andam de mãos dadas. Para exemplificar temos essa função: 
```clojure
(defn blocked-in-source-tax
  "Retorna a quantia que foi bloqueada na fonta baseado nesse teste: abaixo de 1000, não bloqueia nada, depois de 1000, retorna 10% do valor. 
Tabela verdade: 1000 > $ -> $ *.10 "
  [money]
  (let [max-money-value 1000
        retained-percentage 0.10 ]
    (cond
      (<= money 0) "err"
      (< money max-money-value) 0
      (>= money max-money-value) (* money retained-percentage))))
``` 
É um código simples em clojure mas para ter certeza que estava condizente com a regra de negocio eu usei o REPL, usei essa função com o valor de 999 para ver se me retornava 0, ao invés de compilar o programa inteiro para ver se estava certo e dai escrever os testes, usei o REPL da seguinte forma:

```clojure
(blocked-in-source-tax 400)
=> 0
(blocked-in-source-tax 2100)
=> 210.0
```
Se olharmos a descrição da função e seus resultados testados no REPl podemos dizer que está funcionando como deveria, agora falta escrever os testes. Como tudo em LISP e Clojure, é bem simples escrever testes, os que escrevi para essa função são esses 

```clojure
(deftest blocked-in-source-tax-min-test
  (testing "Given an input lower than 1000 it should return 0"
    (is (= 0 (blocked-in-source-tax 999)))
    (is (= 0 (blocked-in-source-tax 400)))
    (is (= 0 (blocked-in-source-tax 1)))))

(deftest blocked-in-source-tax-max-test
  (testing "Given an input bigger than 1000 it should return 10%"
    (is (= 100.0 (blocked-in-source-tax 1000)))
    (is (= 210.0 (blocked-in-source-tax 2100)))))
```

Depois dessa facilidade que eu descobri do RELP, fui atrás do mesmo em Node e descobri que temos isso. [link para REPL no node](https://nodejs.org/en/knowledge/REPL/how-to-use-nodejs-repl)
Seguir esse workflow, de criar funções e coleções de funções podem ser mais facilmente validades e depois criado testes se usássemos esse modelo de REPL com TDD.

## Mais referencias

Além de ler um pouco sobre essa maravilhosa pratica, gostaria de deixar mais um link onde me ajudou muito
[demostração de REPL (em inglês)](https://youtu.be/Qx0-pViyIDU)
Esse [site](https://practical.li/clojure/) me ajuda bastante quando tenho dúvidas do clojure e pretendo fazer mais conteúdos em Pt-BR sobre a linguagem.
The Pageable object of Spring Data JPA implements paging of the queried list
Tags: springboot, springjpa, lambda, java8
Published: 2022-07-21 01:22:23

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

**Pageable object**

  Using the Pageable object of Spring Data JPA can perform database query and paging. This implementation has been introduced in many blogs, so I won’t list it anymore. You can refer to the link：
[https://www.tianmaying.com/tutorial/spring-jpa-page-sort](https://www.tianmaying.com/tutorial/spring-jpa-page-sort
)
But there is a situation that pageable cannot paginate the list results of the queried data, which is almost unavoidable in actual development. For many complex businesses, for simplifying development or considering practical reasons, it is impossible to achieve the requirements through a sql query , it will definitely filter the queried list data, and the paging function of the pageable object is invalid at this time, refer to the code.
```java
List<Impianto> impiantos = myService.findMyMethod(); // returned 30 objects 
    Page<Impianto> pageImpianto = new PageImpl<Impianto>(impiantos, pageable, impiantos.size());
```
This implementation cannot achieve paging.

According to the spring data jpa author:

Spring Data repositories support pagination on query methods by simply declaring a parameter of type Pageable to make sure they’re only reading the data necessary for the requested Page.
The pageable object is only a basic implementation of paging, and cannot achieve paging of the queried list results. In my opinion, this implementation has almost no practical engineering significance. It is recommended not to use pageable objects for paging in actual project development. If you have different opinions, you can leave a message for discussion.
For this reason, if the pageable object wants to achieve paging, it can only process the data manually. The sample code is as follows:

```java
if (pageable.getOffset() > ucShopCourseBizPojoList.size()) {
    long total = 0L;
    PageImpl<UcShopCourseBizPojo> emptyPage = new PageImpl<>(Lists.newArrayList(), pageable, total);
    resultDo.setResult(emptyPage);
    return resultDo;
}
 
if (pageable.getOffset() <= ucShopCourseBizPojoList.size() && pageable.getOffset() + pageable.getPageSize() > ucShopCourseBizPojoList.size()) {
    List<UcShopCourseBizPojo> bizPojos = ucShopCourseBizPojoList.subList(pageable.getOffset(), ucShopCourseBizPojoList.size());
    PageImpl<UcShopCourseBizPojo> pPage = new PageImpl<>(bizPojos, pageable, ucShopCourseBizPojoList.size());
    resultDo.setResult(pPage);
    return resultDo;
}
 
List<UcShopCourseBizPojo> ucShopCourseBizPojos = ucShopCourseBizPojoList.subList(pageable.getOffset(), pageable.getOffset() + pageable.getPageSize());
 
PageImpl<UcShopCourseBizPojo> pPage = new PageImpl<>(ucShopCourseBizPojos, pageable, ucShopCourseBizPojoList.size());
```
ucShopCourseBizPojoList is the list to be paginated.