teleren/devto huggingface dataset:
Can  not fetch im history with the below bot scopes 
Tags: slack
Published: 2021-02-04 15:20:03

I have created an app which is requesting the above *bot token scopes*
`incoming-webhook,commands,channels:history,channels:read,commands,groups:history,groups:read,im:history,im:read,pins:read,reactions:read,team:read,users:read`
but when I am trying to fetch the conversations it is returning me only the channels not im conversations...
Must I request any *user token scopes* ??
Need DEVELOPER (PYTHON & OCR TOOLS EXPERIENCE)
Tags: jobs, python, career
Published: 2021-02-04 15:15:37

JOB DESCRIPTION – DEVELOPER (PYTHON & OCR TOOLS EXPERIENCE)

A Chennai-based BPO company is in the process of converting PDF, JPG and PNG statements to .CSV
using Python and OCR technology and is looking for a developer with experience in Python, Machine
Learning, OCR tools, Azure Storage Queue and Linux for a period of 3-4 months to develop a OCR tool that supports extraction of statements from pdf, JPG and PNG to .CSV format per the following
 
Scope of work:

Input Documents: Bank statements, credit card statements and payroll summaries (various non-
standard templates) in PDF, JPG & PNG formats

Output Expectations:
1. Developed OCR tool should identify the type of document post extraction (if the document is a bank statement, credit card statement or payroll summary) based on keyword criteria
2.Developed OCR tool should extract the statements from pdf and image formats to .CSV
(keywords will be provided by the client where applicable)
3. Integration with client application – OCR tool should be integrated with client in-house application (DB /storage queue)

Project requirements:
1. Candidate would be responsible for development of OCR tool and should support till project
going live (full-time availability)
2. Support to integrate developed OCR tool with in-house application would be provided by the company
3. Work from home is feasible

Technical skills required:
2-3 years of experience in Python, Machine Learning applications and OCR tools (AWS Textractor Google Tesseract). Experience in AWS Textract is an added advantage
Minimum one-year experience in Azure cloud. Experience in Azure Kubernetes Services (AKS)is an added advantage
Knowledge in Azure Storage Queue and Cron job would be an added advantage.
What is Amazon RDS? Explained through Comics
Tags: aws, database, cloud, sql
Published: 2021-02-04 15:02:27

💡Amazon RDS - Explained through a comic conversational style

Here comes my new blog post where I've tried my best to explain about Amazon RDS through a comic.
Find out what it is and what are its features in the graphics

🎯 You can read more about this article and view all the graphics here - https://lnkd.in/dBwQ85Q

Let me know your thoughts in the comment section. If you liked my comic tutorial explanation of cloud service then please share and follow my blog for more such tutorials.

#amazonrds #relationaldatabaseservice #relationaldatabases #database #cloudcomputing #azure #awscloud #awscommunity #awscertification #awssolutionsarchitect #awstraining #awsdeveloper #awseducate #awsarchitect #awstutorial #mysql #postgresql

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/83xeodldfxm1b50eb6yi.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/d4fymru395bs511pargh.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/14nzd7amvi4koso8e0pm.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/cwlln30xnj6vea5s4a85.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/740x8lhwfxel6c7o9mlr.png)![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ar857eetqiwu4u0k3k8k.png)

You can view all the graphics here - http://cloudforgeeks.com/what-is-amazon-rds-explained-through-comics/

For more such comic tutorials follow cloudforgeeks.com
The Myth of Multitasking: Why Fewer Priorities Leads to Better Work
Tags: productivity
Published: 2021-02-04 14:59:22

I know you don’t want to hear it. But multitasking isn’t effective. In this day and age of extreme busyness and “how much can we get done in a day” mentality, everyone is trying to do more — all at once.

-> [Read full story ](https://blog.doit.io/the-myth-of-multitasking/)
Why Do You Need Management Port in Your Dotnet Web App
Tags: dotnet, csharp
Published: 2021-02-04 14:55:22

Hello, in this short post I gonna explain why enterprise level apps should use management port.

# What is management port

By default app uses only one port and exposes all information to clients via it. But what if we want some data to be private for clients? Let's say we want health check to be available for k8s but not for consumers of our API. How to do that? The answer is separation of concerns. You should use separate ports in your app for different purposes. It's secure and simple way to handle this.

Management port is a private port for service endpoints. It is often used for:

1) Health checks
2) Metrics
3) Custom endpoints for testing

Management port is usually not exposed outside so 
you can be sure that clients won't access your private metrics or health checks data.

# Configuring

Asp.net core provides set of environment variables for configuring ports. `ASPNETCORE_MANAGEMENTPORT` is responsible for management port, so your typical config looks like this:

```json
"ASPNETCORE_URLS": "http://*:5000/;http://*:5001/",
"ASPNETCORE_MANAGEMENTPORT": "5001"
```

This config uses ports `5000` and `5001` in Kestrel, `5001` is management port.

# Conclusion

Management port is fast and convenient way to expose private service endpoints in your app. Do you have those in your app? Feel free to answer in comments
JS Test #4: try/catch
Tags: beginners, codenewbie, javascript, programming
Published: 2021-02-04 14:55:19

![code-snippet](https://learn.coderslang.com/js-test-4.png)
What will be logged to the console? 	

<!--more-->

.

.

.

.

.

.

.

.

.

.

.

.

.

So, we have 2 variables and 2 `try/catch` blocks that supposedly catch errors and put them into `e1` and `e2`.

Then, the content of errors is analyzed, compared and the comparison result is logged to the screen.

First, let’s determine what’s inside of `e1` and `e2`. To do that, we need to check the code in the `try` blocks. Both trying to get to `null.length` and `undefined.length` will throw an error as neither `undefined` nor `null` have the `length` property.

These errors will be caught in the catch blocks as `e` and then assigned to the variables `e1` and `e2`.

The content of these errors will be a bit different. If we were to log `e.message` to the screen in the catch block, we would see the following:

```bash
Cannot read property 'length' of null
Cannot read property 'length' of undefined
```

Then, `.split(' ')[0]` gives us the first words of these sentences which is `Cannot` in both cases. So ultimately, the program can be simplified to:

```javascript
console.log('Cannot' === 'Cannot')
```

---

**ANSWER**: the expression in the `console.log` will be evaluated as `true` and logged to the screen.

[Learn Full Stack JavaScript](https://js.coderslang.com)
Day 42 Of 100DaysOfCode : Learn About Basic Of Numpy
Tags: womenintech, codenewbie, beginners, 100daysofcode
Published: 2021-02-04 14:45:59

This is my 42th day of 100Daysofcode and python. Today I did some assignment on my old courses regarding to the topic regular expression. Learned more about algorithm. Practiced some code which were I already wrote.

And at the end of the day I learned about basic of numpy. I enjoyed  on it. Tomorrow I will continue to learn about the same topic.

# some code 
While study I learned numpy helps to effectively loading, storing and manipulating data in memory in python. Data come from wide range of formats, including collections of documents, collections of images, collections of sound clip, collection of numerical measurement or nearly anything else.

```python
import numpy as np
value = np.random.randint(0,10,(2,3))
value
```
Output is,
```
array([[6, 2, 7],
       [9, 9, 6]])
```
```python
value = np.random.randint(0,10,20)
value
```
```
array([4, 8, 1, 6, 0, 8, 9, 4, 1, 6, 9, 7, 6, 3, 2, 9, 2, 7, 7, 2])
```
```python
value = np.random.rand(3,4)
value
```
```
array([[0.91465555, 0.99841031, 0.55547019, 0.57226342],
       [0.96754427, 0.2398907 , 0.0672654 , 0.4947008 ],
       [0.48353768, 0.06300809, 0.13866248, 0.73626242]])
```
```python

x = np.array([1,2,3,4,5,6])
x<3
```
```
array([ True,  True, False, False, False, False])
```
```python
x<=3
```
```
array([ True,  True,  True, False, False, False])
```
```python
rng = np.random.RandomState(0)
x = rng.randint(10,size=(3,4))
x
```
```
array([[5, 0, 3, 3],
       [7, 9, 3, 5],
       [2, 4, 7, 6]])
```
<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Day 42 of <a href="https://twitter.com/hashtag/100DaysOfCode?src=hash&amp;ref_src=twsrc%5Etfw">#100DaysOfCode</a> and <a href="https://twitter.com/hashtag/pythonlearning?src=hash&amp;ref_src=twsrc%5Etfw">#pythonlearning</a> <br>* More about Regular Expression<br>* More About basic of Algorithm<br>* Learned about basic of Numpy<a href="https://twitter.com/hashtag/womenintech?src=hash&amp;ref_src=twsrc%5Etfw">#womenintech</a> ,<a href="https://twitter.com/hashtag/100DaysofCode?src=hash&amp;ref_src=twsrc%5Etfw">#100DaysofCode</a>, <a href="https://twitter.com/hashtag/CodeNewbies?src=hash&amp;ref_src=twsrc%5Etfw">#CodeNewbies</a> ,<a href="https://twitter.com/hashtag/womenwhocode?src=hash&amp;ref_src=twsrc%5Etfw">#womenwhocode</a>, <a href="https://twitter.com/hashtag/DEVCommunity?src=hash&amp;ref_src=twsrc%5Etfw">#DEVCommunity</a> <a href="https://t.co/Dsadt6KEGv">pic.twitter.com/Dsadt6KEGv</a></p>&mdash; Durga Pokharel (@mathdurga) <a href="https://twitter.com/mathdurga/status/1357332667063173121?ref_src=twsrc%5Etfw">February 4, 2021</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
Monitorando com Ping
Tags: powershell, tutorial, beginners, systems
Published: 2021-02-04 13:29:02

Em alguns momentos pode ser necessário verificarmos quando um equipamento está online na rede, como quando reiniciamos remotamente e queremos saber quando poderemos acessar novamente. 
Para isso pode ser interessante manter um LOG, ou um registro, dessa validação. 

A ideia do script de hoje, é escrever uma função para ficar com um Ping constante para um determinado computador ou seja, ficar continuamente enviando pacotes e analisando esse processo. Mas além disso, vamos registrar num arquivo de texto todo esse processo. 

Fora o Ping em si, que recomendo a leitura [desse artigo](https://canaltech.com.br/telecom/ping-o-que-e-e-para-que-serve/), vamos utilizar uma nova função dentro do Powershell, para salvar tudo que vemos em nossa tela, chamada [Start-Transcript](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.host/start-transcript?view=powershell-7.1). Também vamos alterar o titulo do nosso terminar.

{% gist https://gist.github.com/IGDEXE/cf5be1c7ddaeeeb75dfcc4dbd37e562d %}

Deixamos no titulo a orientação sobre como encerrar essa função, por meio dos comandos CTRL + C.

O uso dessa função é muito interessante no cenário que comentei de reiniciar um equipamento remotamente e monitorar quando ele fica online. Com base nele, pode trabalhar em outras coisas como analisar o retorno do comando e mudar a cor do terminal quando o equipamento estiver online novamente.
Difference between undefined and null in JavaScript
Tags: javascript, beginners
Published: 2021-02-04 14:32:12

Undefined is set by javascript automatically when a value of a variable is defined but value is not set or not declared at all. 

Null is an empty object which is set by the programmer to reset a value of a variable.

If undefined is passed to a function as argument it does not over write the default value where as null does. If function parameter is not passed it is undefined.

```
let a = {};
> undefined

let b = function (a=true){console.log(a);}

b(null);
> null

b(undefined);
> true

function c(a,b){ console.log(a,b);}
c(null, 5);
> 5

```


Null is an empty object type and undefined is of type undefined.

```
typeof(undefined);
> undefined

typeof(null);
> object

```

Null means nothing and undefined means not defined hence both can mean false.

```
null == undefined;
> true

null === undefined;
> false

```


Undefined is not valid in JSON but null is valid.


Adding undefined with a number result to NaN where as null gives the same number.

```
let a = 5 + undefined
a
> NaN

let b = 6 + null
b
> 6

```

Finally both null and undefined usage should be avoided. We do have optional chaining that can help avoid using null.
How to interpret and modify REST requests in Spring Boot ?
Tags: java, springboot, spring
Published: 2021-02-04 14:28:58

There is a standard way to interpret and modify all of your REST service requests in Spring Boot in a centralized way. 
You don't have to duplicate logic in each of your REST service.

Here is a short post on how to implement it:

https://fullstackdeveloper.guru/2021/02/04/how-to-interpret-and-modify-rest-requests-in-spring-boot-in-a-centralized-way/
aspect-ratio property on CSS
Tags: css, webdev, performance
Published: 2021-02-04 14:26:19

⚡️ The new CSS property `aspect-ratio` introduce for **all** HTML element the capability to auto-sizing.

```css
.square { aspect-ratio: 1 / 1; }

.rectangle { aspect-ratio: 3 / 1; }

.video { aspect-ratio: 16 / 9; }

.ultrawide { aspect-ratio: 21 / 9; }

.intrinsicsize { 
  aspect-ratio: attr(width) / attr(height);
}
```

🗣 Without the property `aspect-ratio`, only some elements have a built-in auto-sizing system.

📝 For instance, the `<img />` tag when has at least the `width` value explicitly configured will implicitly calculate the `height` value and vice-versa.

🤩 Now, using `aspect-ratio`, even a `<div>`  can support the auto-sizing mechanism.

📣 The new CSS property `aspect-ratio` is useful to create responsive interfaces.

👍 Also, `aspect-ratio` help the developers to apply the best practices while working with images on the web since it allows manipulates with high precision the size of a given image using its original aspect ratio, which also will, in parallel, improve the performance metrics on [_Lighthouse_ since will be easy to identify images with a wrong resize rule](https://developers.google.com/web/updates/2017/10/lighthouse#aspect).

⚡️ `aspect-ratio` is already supported on Chrome 88. Safari is reportedly working to support it soon. Firefox and Edge are starting to consider the support.
Solve Leetcode Problems and Get Offers From Your Dream Companies || Generate Parentheses
Tags: algorithms, computerscience, programming, career
Published: 2021-02-04 14:25:11

Question number 22. Generate Parentheses
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/i83o2wl8riy6uk9ndtt2.png)
In this series, I am going to solve Leetcode medium problems live with my friends, which you can see on our youtube channel, Today we will do Problem Problem 22. Generate Parentheses.

A little bit about me, I have offers from Uber India and Amazon India in the past, and I am currently working for Booking.com in Amsterdam.

## Motivation to learn algorithms
{% medium https://medium.com/leetcode-simplified/solve-leetcode-problems-and-get-offers-from-your-dream-companies-2786415be0b7 %}

## Problem Statement:

Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.

**Example 1:**

`Input: n = 3
Output: ["((()))","(()())","(())()","()(())","()()()"]`

**Example 2:**

`Input: n = 1
Output: ["()"]`

**Constraints:**

* 1 <= n <= 8

## Youtube Discussion

{% youtube zbUaPatPpvU %}

## Solution

This is a backtracking problem. We have to generate all valid combinations of parentheses. First, we must identify what are the characteristics of a valid string. Their length should be 2*n, where n is the given number. Also, the order of the parenthesis is also important. We can only put opening parenthesis first and the no of opening and closing parenthesis should be same. Therefore we need to keep track of opening and closing parenthesis too.

Therefore at first, we called the solve method with left and right value as 0 and empty string. We add an opening string to the string and call this method again with modified parameters. If it is not possible to add an opening parenthesis, we add one closing parenthesis and backtrack again. When we find the length of the string as 2*n we add that string to our global list. This can be understood with the dry run given in the code.

The following is the Java code for this problem.

{% gist https://gist.github.com/sksaikia/b1e230841ba5bca299aab2803339354f.js %}

The C++ code is given below.

{% gist https://gist.github.com/sksaikia/21a731a0dbebb14abc834a840c4af7a4.js %}
The code can be found in this repository.

{% github webtutsplus/Leetcode %}

**Sign up for Leetcode Simplified**
By LeetCode Simplified

Get latest leetcode solution with youtube breakdown [Take a look](https://medium.com/leetcode-simplified/newsletters/leetcode-simplified?source=newsletter_v3_promo--------------------------newsletter_v3_promo-----------)
You're an editor of Leetcode Simplified
Speed up your even-ness checks with this weird trick! 🙀
Tags: todayilearned, codenewbie, computerscience, clickbait
Published: 2021-02-04 14:07:27

Oldest trick in the book, check if an integer is even or not. How do you do it? A nice and simple `num % 2 == 0` ?

![wrong](https://media.giphy.com/media/l4KhTSWTlozX3flvi/giphy.gif)

That's how most of us did it for a long time. Don't even think about it, almost a reflex thing, am I right?

And that's fine and all, it gets the job done. But here we like things lean and mean, and we like them *fast*.
![flash](https://media.giphy.com/media/3o7TKO9uZAFeuQllo4/giphy.gif)

First of all, why is modulo slow? 
Well, the modulo operation does more than just checking if a number is even or not, it returns the **reminder** of the division of both elements (and [computers really hate dividing](https://en.wikipedia.org/wiki/Division_algorithm)). 
This works for us because an even number will always have a reminder of 0 when divided by 2, but we are wasting precious sweet sweet CPU cycles.

![greed](https://media.giphy.com/media/fBM4ruLmB2pZHsgwtQ/giphy.gif)

But what other nice and useful property have even numbers? Their last bit is always 1. 
And how can we check the value of a single bit? With a beautiful and simple single-instruction **binary AND**

Here an assembly comparison:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/bn9oequ2m5gi73yy3np5.jpg)

And now the real plot-twist! All of this doesn't really matter. 
![plottwist](https://media.giphy.com/media/HtBKcjpHfD7s4/giphy.gif)

The compiler is smart enough to know when are you just checking if the number is even, and does the change for you!
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/dmmq1xqybnkg7n283anr.jpg)

But hey, at least you now know a little bit (hehe see what I did there) better how things work under the hood!
Accessible, Resizable Table-Columns
Tags: html, css, javascript, a11y
Published: 2021-02-04 13:55:20

I love using the `<input type="range">`. It's an interactive control with touch-support, and you get accessibility baked-in for free!

After I finished the [Accessible Image Compare](https://dev.to/madsstoumann/accessible-image-compare-one-line-of-javascript-3gn4) a while ago, I thought about other use-cases.

One obvious candidate is resizable table columns. You'll find plenty of examples and libraries out there — but they often lack accessibility. None of the ones I found supported resizing with arrow-keys (they must be out there, I just couldn't find any).

This is a bit more complex than the *Accessible Image Compare*; you need an `<input type="range">` for all columns except the last. 

Without styling, it looks like this:

![a11yTableUnstyled](https://dev-to-uploads.s3.amazonaws.com/i/567ae2ibcoz94vou4hxq.png)

Each `<input type="range">` will update **two** custom properties, holding the widths of the cells to the left and the right of the input.

In CSS, we need to stack them all on top, using `position: absolute`, the range-height must be set to the lowest value possible (`1px`), while the draggable thumb must be the full height of the table. This is to avoid "collisions" between the ranges.

It now looks like this:

![a11yTableColor](https://dev-to-uploads.s3.amazonaws.com/i/s79bb3vxh5cngpfsnoxn.png)

The draggable thumb should be invisible, so we'll set that to `transparent`, and the cursor should change to `ew-resize` when hovering:

![a11yTableResize](https://dev-to-uploads.s3.amazonaws.com/i/wklb0d7nydrfa445kefs.png)

Then, when using keyboard-navigation, `:focus-visible` is used to show the thumb, styled like this:

![a11yTable](https://dev-to-uploads.s3.amazonaws.com/i/h10jw7mdklmh2583722g.png)

And because it's `<input type="range">`, you can use arrow-keys to de/increase the column widths! The widths are stored as *CSS Custom Properties* on the table:

```css
--c0:23; --c1:26; --c2:25; --c3:26;
```
These are then used on the `thead th`-cells:

```html
<th style="width: calc(1% * var(--c0));">ID</th>
```

I've made a JavaScript, you can add to any table — but beware(!) : I haven't used it in production yet - it might need tweaks and fixes. 

You can grab both CSS and JS from [this Pen](https://codepen.io/stoumann/pen/poNjMJV).

> **NOTE:** This is a proof-of-concept. It's to show how we get a lot "out-of-the-box" when using native HTML-controls vs. writing loads of JavaScript. If you refine the code / come up with ways to make it better, please fork the Pen, and paste the link in the comments below.

Thanks for reading!

> **UPDATE 02/05/2021:** I've added styling for Firefox, as well as a small JavaScript-hack to run an event, that'll position the sliders correctly (only an issue in Firefox).
GitHub Actions: Avvio tramite trigger manuale
Tags: github, githubactions, cron, yml
Published: 2021-02-04 13:50:47


⏲️ Oggi parliamo ancora di GitHub Actions CRON

❓ Posso anticiparla/forzarla al bisogno, vero?

🔥 Dopo avere visto l'altro giorno come schedulare una GitHub actions in modalita' CRON, oggi vedremo una piccola (ma fondamentale) modifica alla pipeline di build.

➡️ Nello specifico vedremo come -aggiungendo poche righe- sara' possibile eseguirla manualmente fuori orario senza attendere la prossima schedulazione. 

❓ A chi non e' mai capitato di dovere fare una release fuori orario e non programmata? 

Articolo Completo: [GitHub Actions: Avvio tramite trigger manuale](https://blog.devandreacarratta.it/github-actions-on-workflow-dispatch/?utm_source=devto&utm_medium=coding-tips&utm_campaign=github&utm_content=github-actions-on-workflow-dispatch)

Buona lettura ed al prossimo aggiornamento!
Hire an Interim CTO - Guaranteed to Succeed
Tags: startup, news
Published: 2021-02-04 13:49:37

CTO for more than 15 years, 27 years in tech.

Helped companies like Microsoft, eBay, Siemens, Lego + ton of startups

Entrepreneur of the year finalist

Flexible hours, remote. Amazing when raising funds.

mail: wickedrgb@gmail.com
Day 5: Nearest Prime Numbers
Tags: 100daysofcode, python
Published: 2021-02-04 13:49:20

Output two numbers: the nearest prime below the input, and the nearest prime above it.

```python
from itertools import count

def is_prime(n):
    for x in range(2, n):
        if not n % x:
            return False
    return True

def prev_prime(n):
    for x in range(n, 2, -1):
        if is_prime(x):
            return x

def next_prime(n):
    for x in count(n + 1):
        if is_prime(x):
            return x

user_input = (270, 541, 993, 649)
for i in user_input:
    if is_prime(i):
        print(f'{i} is prime')
    else:
        print(f'{prev_prime(i)} < {i} < {next_prime(i)}')
```
CodePen - Generative Orb Animation [pixi.js] + Frosty UI ❄️
Tags: codepen, webdev, javascript
Published: 2021-02-04 13:42:50

<p>This is the final code example for my upcoming tutorial on creating a generative UI with a super zen orbs animation (built with pixi.js) and a nice frosty aesthetic. The colors here are generative too! </p>

The tutorial will be released right here on Feb 2, 2021. You can follow me for updates if you like! 🚀

{% codepen https://codepen.io/georgedoescode/pen/XWNmvro %}