teleren/devto huggingface dataset:
Day 574 : The Life
Tags: hiphop, code, coding, lifelong
Published: 2022-06-15 22:28:46

_liner notes_:
- Professional : Went back to the office today. Reviewed a bunch of PRs. Spoke with some folks. Then I recorded the audio for a video tutorial I'm working on. The day flew by!

- Personal : Last night, I made some progress with my new side project. I got the layout working, but I can't get the animation the way I want. For the life of me, I cannot figure it out!.

![A Killer Whale just below the surface of the water in Desolation Sound, BC, Canada](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0x18jb3jq5etl7zu9xdj.jpg)

Just realized that it's Wednesday, so there should be a new episode of Ms Marvel on Disney+. Going to work on my side project some more. Before all that, I'm still at the office and going to get some food and head back to the spot.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube pfblnrUjysI %}
Shift 2D Grid
Tags: leetcode, dsa, theabbie
Published: 2022-06-15 22:00:48

Given a 2D `grid` of size `m x n` and an integer `k`. You need to shift the `grid` `k` times.

In one shift operation:

*   Element at `grid[i][j]` moves to `grid[i][j + 1]`.
*   Element at `grid[i][n - 1]` moves to `grid[i + 1][0]`.
*   Element at `grid[m - 1][n - 1]` moves to `grid[0][0]`.

Return the _2D grid_ after applying shift operation `k` times.

**Example 1:**

![](https://assets.leetcode.com/uploads/2019/11/05/e1.png)

**Input:** `grid` = \[\[1,2,3\],\[4,5,6\],\[7,8,9\]\], k = 1
**Output:** \[\[9,1,2\],\[3,4,5\],\[6,7,8\]\]

**Example 2:**

![](https://assets.leetcode.com/uploads/2019/11/05/e2.png)

**Input:** `grid` = \[\[3,8,1,9\],\[19,7,2,5\],\[4,6,11,10\],\[12,0,21,13\]\], k = 4
**Output:** \[\[12,0,21,13\],\[3,8,1,9\],\[19,7,2,5\],\[4,6,11,10\]\]

**Example 3:**

**Input:** `grid` = \[\[1,2,3\],\[4,5,6\],\[7,8,9\]\], k = 9
**Output:** \[\[1,2,3\],\[4,5,6\],\[7,8,9\]\]

**Constraints:**

*   `m == grid.length`
*   `n == grid[i].length`
*   `1 <= m <= 50`
*   `1 <= n <= 50`
*   `-1000 <= grid[i][j] <= 1000`
*   `0 <= k <= 100`

**SOLUTION:**

    class Solution:
        def shiftGrid(self, grid: List[List[int]], k: int) -> List[List[int]]:
            m = len(grid)
            n = len(grid[0])
            for _ in range(k):
                lastcol = [row[-1] for row in grid]
                for i in range(m):
                    for j in range(n - 1, 0, -1):
                        grid[i][j] = grid[i][j - 1]
                for i in range(m):
                    grid[i][0] = lastcol[(m + i - 1) % m]
            return grid
Day 68: Hello Trello!
Published: 2022-06-15 21:34:20

Hi!
Today was a for Trello the project we are working was becoming impossible to manage so we had to create a real project management system and we used Trello for it. so today I was creating Trello cards and destructuring the project in small chunks. I got a chance to learn about user stories in an agile system until today I took writing user stories a waste of time but I realized that when the project instructions are not clear you can get more insight by thinking like the end user of the application their desire and motivation to use your app.
I think tomorrow will be a day for Figma again but it is expected to be the final day soooo that's good news :)
I have to run for now

Signing off....
Integer Break
Tags: leetcode, dsa, theabbie
Published: 2022-06-15 21:30:38

Given an integer `n`, break it into the sum of `k` **positive integers**, where `k >= 2`, and maximize the product of those integers.

Return _the maximum product you can get_.

**Example 1:**

**Input:** n = 2
**Output:** 1
**Explanation:** 2 = 1 + 1, 1 × 1 = 1.

**Example 2:**

**Input:** n = 10
**Output:** 36
**Explanation:** 10 = 3 + 3 + 4, 3 × 3 × 4 = 36.

**Constraints:**

*   `2 <= n <= 58`

**SOLUTION:**

    class Solution:
        def integerBreak(self, n: int) -> int:
            maxp = float('-inf')
            for k in range(2, n + 1):
                val = n // k
                p = (val ** (k - (n % k))) * ((val + 1) ** (n % k))
                maxp = max(p, maxp)
            return maxp
Wednesday Links - Edition 2022-06-15
Tags: java, jvm, kotlin, http
Published: 2022-06-15 21:20:13

JDK GCs Comparison - Sip of Java (1 min)⚔️
https://inside.java/2022/06/06/sip054/

NumberFormat.getCompactNumberInstance (30 sec)🔢
https://twitter.com/tnurkiewicz/status/1532683822759825408

Kotlin 1.7.0 Released (2 min)🎉
https://blog.jetbrains.com/kotlin/2022/06/kotlin-1-7-0-released/

An Introduction to Kotlin Symbol Processing (6 min)🔣
https://blog.codecentric.de/en/2022/06/kotlin-symbol-processing-introduction/

What I miss in Java, the perspective of a Kotlin developer (6 min)🎱
https://blog.frankel.ch/miss-in-java-kotlin-developer/

A New Definition of HTTP (3 min)📃
https://www.mnot.net/blog/2022/06/06/http-core

RFC 9114 HTTP/3 (1h 16 min)📜
https://www.rfc-editor.org/rfc/rfc9114.html

The collapse of complex software (5 min)🏛️
https://nolanlawson.com/2022/06/09/the-collapse-of-complex-software/

#77: DDoS: take down a server, one request at a time (4 min)🪠
https://nurkiewicz.com/77
Longest Increasing Path in a Matrix
Tags: leetcode, dsa, theabbie
Published: 2022-06-15 21:00:45

Given an `m x n` integers `matrix`, return _the length of the longest increasing path in_ `matrix`.

From each cell, you can either move in four directions: left, right, up, or down. You **may not** move **diagonally** or move **outside the boundary** (i.e., wrap-around is not allowed).

**Example 1:**

![](https://assets.leetcode.com/uploads/2021/01/05/grid1.jpg)

**Input:** matrix = \[\[9,9,4\],\[6,6,8\],\[2,1,1\]\]
**Output:** 4
**Explanation:** The longest increasing path is `[1, 2, 6, 9]`.

**Example 2:**

![](https://assets.leetcode.com/uploads/2021/01/27/tmp-grid.jpg)

**Input:** matrix = \[\[3,4,5\],\[3,2,6\],\[2,2,1\]\]
**Output:** 4
**Explanation:** The longest increasing path is `[3, 4, 5, 6]`. Moving diagonally is not allowed.

**Example 3:**

**Input:** matrix = \[\[1\]\]
**Output:** 1

**Constraints:**

*   `m == matrix.length`
*   `n == matrix[i].length`
*   `1 <= m, n <= 200`
*   `0 <= matrix[i][j] <= 231 - 1`

**SOLUTION:**

    class Solution:
        def getNeighbours(self, i, j, m, n):
            for x, y in [(i - 1, j), (i, j + 1), (i + 1, j), (i, j - 1)]:
                if 0 <= x < m and 0 <= y < n:
                    yield (x, y)
        
        def longestTill(self, matrix, i, j, m, n):
            if (i, j) in self.cache:
                return self.cache[(i, j)]
            mlen = 1
            for x, y in self.getNeighbours(i, j, m, n):
                if matrix[x][y] > matrix[i][j]:
                    curr = 1 + self.longestTill(matrix, x, y, m, n)
                    mlen = max(mlen, curr)
            self.cache[(i, j)] = mlen
            return mlen
        
        def longestIncreasingPath(self, matrix: List[List[int]]) -> int:
            m = len(matrix)
            n = len(matrix[0])
            mlen = 1
            self.cache = {}
            for i in range(m):
                for j in range(n):
                    if (i, j) not in self.cache:
                        curr = self.longestTill(matrix, i, j, m, n)
                        mlen = max(mlen, curr)
            return mlen
My Elgato Streamdeck all set up for StreamYard
Tags: streaming
Published: 2022-06-15 20:53:36


Very brief update...

Using [StreamYard](https://streamyard.com) for awhile now and it's great to finally be able to set up another profile on my StreamDeck and flip between my default (with PyLadies) to my Irish Makers Podcast setup, mainly for my Maker news roundups. 

Here's the support page:
* https://support.streamyard.com/hc/en-us/articles/360061032132-Using-the-Elgato-Stream-Deck-with-StreamYard

And you can get Streamyard official icons from [here](https://drive.google.com/drive/folders/1qCCbj_KWEFvW2BcuCleRil-4AYZQr9k4?fbclid=IwAR3MeVoayA9slW2OUl18_9LY4PJ7LFv4eSFqFRy8pt6xPBoGaWGDQiVimFY)
Coding Grace - Figuring when to run a workshop for Founders
Tags: fail
Published: 2022-06-15 20:49:32

_This was from a few months ago and I was drafting this post and didn't end up publishing it till now. And I still feel the same, hence sharing it with you or anyone who might be curious about what we are doing at Coding Grace._

---

![sighing](https://media.giphy.com/media/xx3WVWGJEVdZ3P43Ge/giphy.gif)

Sometimes when you try something, it doesn't really work as planned. The trial for our new Founders workshop worked out well, and we wanted to open it up and decided to run the Tech Basics for Founders diversity-friendly workshop on 2 weekday mornings (08:00 - 10:00).

There were interest in it, but no clicks for signing up.

We cancelled as it was not getting any registrations, we posted event on

* LinkedIn
* Facebook (even paid around €50 promotion via ads)
* Twitter

We decided to post a poll

* 1 response from Twitter
* 3 votes via LinkedIn
* a nil pointe for Facebook (which I couldn't create a poll, and used framadate.org

For the latter, I was tempted to completely pull Coding Grace from Facebook, but there are some people who do react to some post... future Vicky problem to look at about engaging people in what we do and where to focus our attentions on.

![Lego Movie](https://media.giphy.com/media/5bbvjZWIXiKfrg9i3d/giphy.gif)

💪 Time to roll up our sleeves and start contact people out in the founders world, especially female or anyone from under-represented groups. 

🤔 Can you help me reach out to these people and seek advice, or some feedback on how we can help?
Encoding/Decoding Base64 with Node.js Core Buffer API
Tags: node, base64, auth
Published: 2022-06-15 20:47:49

---
title: Encoding/Decoding Base64 with Node.js Core Buffer API
published: true
description: Quick examples of how to encode and decode strings to base64 with Node.js.
tags: nodejs, base64, auth
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---
The Node.js core `Buffer` API allows base64 encoding for cases like Basic authentication. 

The legacy version with Node.js is by using the `buf.atob()` and `buf.btoa()` methods, and [according to their documentation](https://nodejs.org/docs/latest-v15.x/api/buffer.html#buffer_buffer_atob_data) should not be used in new code.

So here's the recommended way...


## Encoding a string to base64
```javascript
const user = 'colbyhemond'
const password = 'test123!@#'
const stringBuffer = Buffer.from(`${user}:${password}`)
const stringBase64 = stringBuffer.toString('base64')

console.log(stringBase64)
// will output: "Y29sYnloZW1vbmQ6dGVzdDEyMyFAIw=="
```

## Decoding from base64 to a unicode string
```javascript
const base64String = 'Y29sYnloZW1vbmQ6dGVzdDEyMyFAIw=='
const base64Buffer = Buffer.from(base64String, 'base64')
const string =  base64Buffer.toString()

console.log(string)
// will output: "colbyhemond:test123!@#"
```

To see how you can turn this into your own encoding utility and publish it on NPM, [checkout the post on my website](https://colbyhemond.me/posts/encoding-base64).
Django Girls Dublin Workshop at EuroPython
Tags: djangogirls, europython
Published: 2022-06-15 20:37:13

[EuroPython](https://ep2022.europython.eu/) is arriving to Dublin this July after 2 years delay because of Covid. 

{% embed https://dev.to/europython %}

Django Girls Dublin workshop is back after our last workshop hosted by PyCon Ireland in 2016!

![lego dancing](https://media.giphy.com/media/7zMkk1aiQVonuZQKi6/giphy.gif)

Applications are open right now, and you can find information at https://djangogirls.org/en/dublin

Any questions drop me an email at dublin@djangogirls.org.

## What is Django Girls?
> Django Girls is a non-profit organisation and a community that empowers and helps women to organise free, one-day programming workshops by providing tools, resources and support. We are a volunteer run organisation with hundreds of people contributing to bring more amazing women into the world of technology. We are making technology more approachable by creating resources designed with empathy.
> 
> During each of our events, 30-60 women build their first web application using HTML, CSS, Python and Django.

More info: https://djangogirls.org/en/

## What will I be doing here on dev.to?
Hopefully I can document on the happenings on the run up, during and after the workshop. People can post their experiences as well.

This is what we documented in one of our last workshops, it's a tumblr blog (waat, I know, it's still around!): https://djangogirlsdublin.tumblr.com/
Paracetamol.js💊| #143: Explica este código JavaScript
Tags: javascript, webdev, programming, spanish
Published: 2022-06-15 20:33:21

## **<center>Explica el siguiente código JavaScript</center>**
#### <center>**Dificultad:** <mark>Intermedio</mark></center>

```js
const f = (tamanio, fn) => {
  return Array.from({length:tamanio}, fn)
}

console.log(f(3, () => ({}))); //? 
```

A. `SyntaxError`
B. `[{}, {}]`
C. `[{}, {}, {}]`
D. Ninguna de las anteriores.

Respuesta en el primer comentario.

---
Let me introduce myself
Published: 2022-07-19 20:12:58

---
title: Let me introduce myself
published: true
date: 2022-06-15 20:32:36 UTC
cover_image: https://dashaun.com/images/blog/let-me-introduce-myself/seattle-s1t-2022-from-glenn-renfro-twitter-cropped.png 
canonical_url: https://dashaun.com/posts/let-me-introduce-myself/
---

## Videos

Several conferences have asked for example presentations, from their potential speakers.

Here are some of the videos that I have included when submitting:

- [Introducing Javagrunt and my new role at Redis in 2021](https://youtu.be/Vkd7g9BCNLs)
- [Spring Boot Observability - SpringOne 2020](https://youtu.be/zGiBpUlg9mk)
- [Leap Ahead with Redis 6.2 - SpringOne 2021](https://youtu.be/mJGYeBSkS_c)
- [Cloud Native Spring for Relational Databases - Distributed SQL Summit 2020](https://vimeo.com/459492570)

## What do I do

It's super hard explaining what I do these days.  I am a "Spring Developer Advocate" for VMware Tanzu.

My job is to unblock developers, and help them get their hard work into production, with more joy and less pain.

These videos are very similar to the types of conversations that I have regularly, with customers, partners, and Spring developers.

I love my job.
CodeLand is special, and I'm not just saying that.
Tags: codeland, codenewbie
Published: 2022-06-15 20:30:59

I've been to _every_ [CodeLand](https://codelandconf.com/) — well before I was officially involved in it. It's been one of the best parts of my career.

It was awesome in person — but what's amazing to me is that it's also been awesome since it moved online — but for different reasons. The way it now touches _so many people around the world_, has been really incredible to see.

The talks are incredibly curated, but what is really special is the little things the community always brings — and I'm not entirely sure how to describe it.

It's happening June 16 and 17, with all details on the site. Depending on your time zone or your work day, you might not be able to make all of it, but make it to something.

The experience will be taking over the whole [CodeNewbie Community](https://community.codenewbie.org/) tomorrow. Follow instructions to make sure you can attend in full.

CodeLand is special. Be sure not to miss it!

Happy CodeLanding.
Regular Expression Matching
Tags: leetcode, dsa, theabbie
Published: 2022-06-15 20:30:37

Given an input string `s` and a pattern `p`, implement regular expression matching with support for `'.'` and `'*'` where:

*   `'.'` Matches any single character.​​​​
*   `'*'` Matches zero or more of the preceding element.

The matching should cover the **entire** input string (not partial).

**Example 1:**

**Input:** s = "aa", p = "a"
**Output:** false
**Explanation:** "a" does not match the entire string "aa".

**Example 2:**

**Input:** s = "aa", p = "a\*"
**Output:** true
**Explanation:** '\*' means zero or more of the preceding element, 'a'. Therefore, by repeating 'a' once, it becomes "aa".

**Example 3:**

**Input:** s = "ab", p = ".\*"
**Output:** true
**Explanation:** ".\*" means "zero or more (\*) of any character (.)".

**Constraints:**

*   `1 <= s.length <= 20`
*   `1 <= p.length <= 30`
*   `s` contains only lowercase English letters.
*   `p` contains only lowercase English letters, `'.'`, and `'*'`.
*   It is guaranteed for each appearance of the character `'*'`, there will be a previous valid character to match.

**SOLUTION:**

    class Solution:
        def isSame(self, a, b):
            if a == "." or b == ".":
                return True
            return a == b
        
        def isMatchRec(self, s, p, i, j, m, n):
            if i >= m:
                if j >= n:
                    return True
                return j < n - 1 and p[j + 1] == "*" and self.isMatchRec(s, p, i, j + 2, m, n)
            if j >= n:
                return i >= m
            if j == n - 1 or p[j + 1] != "*":
                return self.isSame(s[i], p[j]) and self.isMatchRec(s, p, i + 1, j + 1, m, n)
            if p[j + 1] == "*":
                return self.isMatchRec(s, p, i, j + 2, m, n) or (self.isSame(s[i], p[j]) and self.isMatchRec(s, p, i + 1, j, m, n))
            return False
        
        def isMatch(self, s: str, p: str) -> bool:
            m = len(s)
            n = len(p)
            return self.isMatchRec(s, p, 0, 0, m, n)
Q: As a #CodeNewbie, what web development framework are you learning - and why?
Tags: codeland, beginners, javascript, discuss
Published: 2022-06-15 20:30:34

---
title: Q: As a #CodeNewbie, what web development framework are you learning - and why?
published: true
description: Join @AzureAdvocates and @msdev at #Codeland2022 and let's discuss what #CodeNewbies should focus on to jumpstart their learning journey to Cloud+AI!
tags: #codeland, #beginners, #javascript, #discuss
series: Microsoft Developers + Azure Advocates at Codeland
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qr3u7elijvnicxok1u59.png
---

> Microsoft is sponsoring [Codeland Conference](https://codelandconf.com/) again this year. Come join us in the [#CodeNewbie Forem](https://community.codenewbie.org/msusdeveloper) Jun 16-17 to jumpstart your learning journey into Azure & AI, and meet your peers!

---

Both `javascript` and `webdev` made it to the top tags list on both [dev.to](https://dev.to/tags) and [CodeNewbie](https://community.codenewbie.org/tags) forems, which makes us think many of you are actively working on (or learning about) modern web application development. **So, what frameworks (front-end, back-end, full-stack, testing etc.) are you skilling up on in 2022?**

---

Please do leave us your thoughts and ideas in the comments. If you are an experienced developer, do leave your feedback on what you think a new developer should focus on learning (and why). In case useful, the [State of JS](https://2021.stateofjs.com/en-US/libraries) and [Rising Stars of JS](https://risingstars.js.org/2021/en) reports provide some insights into developer interests in 2021.
Digital Transformation - Myths and Realities
Tags: digital, transformation, software, development
Published: 2022-06-15 20:19:01

{% youtube gadj8yD-ZAg %}

Let's bust the myths of digital transformation. In the latest episode of Experts Zone I was talking about digitization process and its benefits to the business. What are your thoughts on this matter?

Enjoy! You can also read the article at [Frontend House](https://frontendhouse.com/experts-zone/digital-transformation-myths-and-realities-experts-zone-20).
Q: As a #CodeNewbie, what programming language do you want to learn - and why?
Tags: codeland, beginners, azure, discuss
Published: 2022-06-15 20:14:42

---
title: Q: As a #CodeNewbie, what programming language do you want to learn - and why?
published: true
description: Join @AzureAdvocates and @msdev at #Codeland2022 and let's discuss what #CodeNewbies should focus on to jumpstart their learning journey to Cloud+AI!
tags: #codeland, #beginners, #azure, #discuss
series: Microsoft Developers + Azure Advocates at Codeland
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qr3u7elijvnicxok1u59.png
---

> Microsoft is sponsoring [Codeland Conference](https://codelandconf.com/) again this year. Come join us in the [#CodeNewbie Forem](https://community.codenewbie.org/msusdeveloper) Jun 16-17 to jumpstart your learning journey into Azure & AI, and meet your peers!

---

We know there are a number of programming language options out there today. So if you are just getting started with code, or if you are a career-changer looking to switch into tech, **what programming language do you prioritize for learning - and why?**

---

Please do leave us your thoughts and ideas in the comments. If you are an experienced developer, do leave your feedback on what you think a new developer should focus on learning (and why). In case useful, the [GitHub Octoverse Report](https://octoverse.github.com/#top-languages-over-the-years) had this graphic showing the changes in rankings of popular languages over the years.

![GitHub Octoverse report](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ndfa6zfr7s9feb1iuwnd.png)
GitHub Action to run mypy on changed files only
Tags: python, github, opensource
Published: 2022-06-15 20:13:52

Recently, I needed a way to perform Python static type checking using mypy only on "changed" files for a GitHub Pull Request.

So I googled a bit and found out this super useful action that you can use it in your workflow right away.

{% github https://github.com/tj-actions/changed-files %}

And after customizing some options like filter only `*.py` files, I was able to run `mypy` passing the changed files as argument. 

It's worth to mention that I needed to include `--ignore-missing-imports` argument to `mypy` because I'm not scanning the whole repo, only some files. The goal of course is to check them all. However, a lot of fixes should be made before it's ready.

This solution can be very useful to you if you want to include static type checking for new files on a legacy project where existing files will be fixed little by little.

```yml
name: "mypy check"
on: [pull_request]

jobs:

  static-type-check:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-python@v3
      with:
        python-version: '3.x'
    - run: pip install mypy  # you can pin your preferred version
    - name: Get Python changed files
      id: changed-py-files
      uses: tj-actions/changed-files@v23
      with:
        files: |
          *.py
          **/*.py
    - name: Run if any of the listed files above is changed
      if: steps.changed-py-files.outputs.any_changed == 'true'
      run: mypy ${{ steps.changed-py-files.outputs.all_changed_files }} --ignore-missing-imports

```

Happy type-safety!