teleren/devto huggingface dataset:
Weekly 0053
Tags: weeklyretro
Published: 2023-03-27 04:46:42

### Monday
Yesterday afternoon I traveled to Italy to meet a company called Corsi.it.
In the morning I recorded 5 videos for a course about HTML5&CSS3.
It took me less time then we expected and after lunch I came back to the hotel for working on AI Tools for Branplane.

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

**Mood:** 🎥

### Tuesday
I traveled back to home from the morning to early afternoon.
I worked on Brandplane in the train and on small activities for Red Origin.

In the afternoon I went to Zurich for a meetup. The PowerShell Swiss User Group organized the meetup and I delivered a session about PowerShell and Visual Studio Code.
It went well. Some demos didn't work but I used some work arounds 👷
Very good networking at the end of the meetup and during the break.

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

**Mood**: 🚄

### Wednesday
In the morning I worked on Brandplane onboarding system. I was really tired after three days of traveling. I am not use to traveling very often and every time I fell tired the days after.
I did a small refactoring of the entire code of Brandplane.

In the afternoon I released a new version of Red Origin with all bug fixes from February tests.

**Mood:** 🥶

### Thursday
Today I worked on Brandplane Configurator and more in deep about the creation of the Strategy Playbook when the user finished all the steps.

Published an article about how to debug multiple .NET Projects in Visual Studio Code.
First article in the organization “This is Learning”.

{% embed https://twitter.com/kasuken/status/1638844556203679744 %}

**Mood:** 🦉

### Friday
In the morning I tried to do my first GitHub certification and I failed.
I started with the exam about GitHub Actions (without studying but just tried to make the exam).
At the end I received the feedbacks about my errors and most of them were on GitHub Enterprise.
I will study again in the next weeks.
I can take the exam another time in 21 days.

In the afternoon I came back again on Twitch as a guest on Marco Minerva's channel.
I enjoyed the live for almost two hours.
We talked about how to implement ChatGPT in a Blazor application.

I published a new Visual Studio Extension Pack called as my article on my blog "PowerShell like a Pro".
![PowerShell like a Pro](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6m7azsilmg3jykhpasea.png)
This is the link: https://marketplace.visualstudio.com/items?itemName=emanuelebartolesi.powershell-like-a-pro


**Mood:** 🏗️
MVC Architecture in .NET App
Tags: dotnet, mvc
Published: 2023-03-27 04:33:23

Hey Hello, In this article series I’m going to cover the following areas in the Web development with C#, ASP .NET Core MVC, MVVM Tech Stack.

1. ASP .NET Core
2. Razor Pages and Blazor
3. MVC Architecture
4. MVVM Architecture
5. Models, ViewModels, Views, Partial views, Controllers, ViewComponents
6. Dependency injection, Major dependency injection lifetimes, Services
7. SQL Server configuration, EFCore migrations, Relationship types
8. Authentication, Authorization, Cookie-based Authentication
9. Azure Deployment

So, In this section, we will talk about MVC architecture at a high level.

**What is MVC mean?**
The Model-View-Controller (MVC) is an architectural design pattern that divides a software application/system into three main logical components,

The model
The view
The controller
Each of these components is made to control and manage specific development domains in an application.

MVC is one of the most frequently used industry-standard web development frameworks to create scalable and extensible projects.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sfi41ca3i9a02bz8pbkp.png)
**Model**
In basic C# ASP .NET Core Web applications, it acts as a C# class which holds application data as a Data Blueprint. It also manages the Database operations and relations.

Ex: Buyer, Seller, Admin User, Categories Classes in e-commerce Applications

So Basically, The Model component corresponds to all the data-related logic that the user works with.

**View**
The view is a component that displays the user interface. In C#, It’s the CSHTML file (Razor Views). This handles the app's data presentation and user interaction

In view, you can trigger/notify the events that get handled by the controllers.

**Controller**
A controller controls the workflow that a user interacts with MVC application*.* A controller contains the flow control logic for an ASP.NET MVC application. A controller determines what response to send back to a user when a user makes a browser request.
TS: 6 Techniques For Combining Interfaces and Types
Tags: webdev, javascript, typescript
Published: 2023-03-27 03:55:33

Typescript offers numerous ways of combing interfaces and types together to create a whole new interface based off of two other ones. That sentenced had two redundant thoughts, should have combined it into a one thought. Maybe this short article will help.

Let's say we have these two interfaces to work with:

```ts
interface Parent {
  foo: string;
  bar: string;
  baz: string;
}

interface Uncle {
  foo: string;
  peanuts: string;
  peas: string;
}
```

We want to combine and re-use them in various ways to create new and interesting interfaces. First something simple.

```ts
// Here we extend off of Parent
// Then add carrots property to Sibling
interface Sibling extends Parent {
  carrots: string;
}
```

In Sibling all Parent properties are required, what if I don't want that?

```ts
// we can use Partial<> to define Parent properties as all optional
interface Sibling extends Partial<Parent> {
  carrots: string;
}
``` 

What if I only want certain properties from Parent in Sibling?

```ts
// will only accept foo and bar from Parent
// foo and bar are required props
interface Sibling extends Pick<Parent, 'foo' | 'bar'> {
  carrots: string;
}
``` 

One step further, I want those selected properties from Parent to be optional

```ts
// lets combine Partial<> and Pick<> together
// foo and bar are now optional inside of Sibling
interface Sibling extends Partial<Pick<Parent, 'foo' | 'bar'>> {
  carrots: string;
}
```

Now let's flip all this on its head and do the reverse of Pick<> with Omit<>.

```ts
// Omit<> does the oposite of Pick<>
// here we define which props to exclude from the interface/type
// only 'baz' is allowed as a prop
type NewParent = Omit<Parent, 'foo' | 'bar'>;
```

One more and a little bit different, Extract<> will take the similar properties and a new interface with those

```ts
// Extract<> will find the commonalities between types
// Only the props shared between two types will be made into a new type
// only 'foo' is allowed as a prop
type LikeType = Extract<keyof Parent, keyof Uncle>
```

These are a selection of different built-in tools available in Typescript we can make use of to combine and create new interfaces based off of current ones.

Thanks for reading!
Mind-Blowing Technologies That Will Revolutionize the Future
Tags: news, motivation
Published: 2023-03-27 03:53:15

Are you ready for the future? With the rapid advancement of technology, we are on the brink of a major transformation. In this post, we will introduce you to five mind-blowing technologies that are set to revolutionize the future.

**Quantum Computing🔮:** Imagine a world where computers are a billion times faster than the ones we use today. That's what quantum computing promises. With the ability to process massive amounts of data, quantum computers could transform industries such as finance, healthcare, and transportation.

**Augmented Reality👀:** Augmented reality (AR) has been around for a while, but it's only now starting to make its mark. With AR, users can superimpose digital images onto the real world. From gaming to education, AR has the potential to change the way we interact with the world around us.

**CRISPR Gene Editing🧬:** CRISPR is a revolutionary gene-editing technology that allows scientists to modify DNA with unprecedented precision. This technology has the potential to cure genetic diseases and transform the field of medicine.

**Brain-Computer Interfaces🧠:** The idea of controlling technology with your mind might sound like science fiction, but it's becoming a reality. Brain-computer interfaces (BCIs) allow people to control devices using their thoughts. This technology has the potential to help people with disabilities, but it could also change the way we interact with machines.

**Space-Based Solar Power🚀:** The idea of beaming solar energy down to Earth from space has been around for decades, but recent advancements in technology have made it more feasible. Space-based solar power could provide a nearly limitless source of clean energy for the entire planet.

These technologies are just the tip of the iceberg. The future promises even more exciting innovations that will change the way we live, work, and play. Are you ready for what's to come?
Fun with python
Tags: webdev, beginners, tutorial, python
Published: 2023-03-27 03:44:13

[![image alt text here](http://img.youtube.com/vi/xv9E0MNo_3E/0.jpg)](http://www.youtube.com/watch?v=xv9E0MNo_3E)

Python is a high-level, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. Python is dynamically typed and garbage-collected. It supports multiple programming paradigms, including structured, object-oriented and functional programming. It is often described as a "batteries included" language due to its comprehensive standard library.
64. Leetcode Solution in Java
Tags: java
Published: 2023-03-27 03:24:03

```java
class Solution {
  public int minPathSum(int[][] grid) {
    final int m = grid.length;
    final int n = grid[0].length;

    for (int i = 0; i < m; ++i)
      for (int j = 0; j < n; ++j)
        if (i > 0 && j > 0)
          grid[i][j] += Math.min(grid[i - 1][j], grid[i][j - 1]);
        else if (i > 0)
          grid[i][0] += grid[i - 1][0];
        else if (j > 0)
          grid[0][j] += grid[0][j - 1];

    return grid[m - 1][n - 1];
  }
}
```
#leetcode
#challenge
Here is the link for the problem:
https://leetcode.com/problems/minimum-path-sum/
Important practice for python interview
Published: 2023-03-27 03:21:01

[![image alt text here](http://img.youtube.com/vi/JjNeLcNTdI8/0.jpg)](http://www.youtube.com/watch?v=JjNeLcNTdI8)

How to Stand Out in a Python Coding Interview
How to Stand Out in a Python Coding Interview
by James Timmins 22 Comments  best-practices
Tweet Share Email
Table of Contents

Select the Right Built-In Function for the Job
Iterate With enumerate() Instead of range()
Use List Comprehensions Instead of map() and filter()
Debug With breakpoint() Instead of print()
Format strings With f-Strings
Sort Complex Lists With sorted()
Leverage Data Structures Effectively
Store Unique Values With Sets
Save Memory With Generators
Define Default Values in Dictionaries With .get() and .setdefault()
Take Advantage of Python’s Standard Library
Handle Missing Dictionary Keys With collections.defaultdict()
Count Hashable Objects With collections.Counter
Access Common String Groups With string Constants
Generate Permutations and Combinations With itertools
Conclusion: Coding Interview Superpowers
Remove ads
 Watch Now This tutorial has a related video course created by the Real Python team. Watch it together with the written tutorial to deepen your understanding: Python Coding Interviews: Tips & Best Practices

You’ve made it past the phone call with the recruiter, and now it’s time to show that you know how to solve problems with actual code. Whether it’s a HackerRank exercise, a take-home assignment, or an onsite whiteboard interview, this is your moment to prove your coding interview skills.

But interviews aren’t just about solving problems: they’re also about showing that you can write clean production code. This means that you have a deep knowledge of Python’s built-in functionality and libraries. This knowledge shows companies that you can move quickly and won’t duplicate functionality that comes with the language just because you don’t know it exists.
Project 2 Status 2
Tags: webdev
Published: 2023-03-27 03:18:35

**How we started**
* We started by dividing the work. Eric did the backend search API, and Manali did the frontend look of the collapse card. Later, we will work together to merge these ideas together. 

**The first step in starting the project**

* Eric followed the previous YouTube video about the team roster API and applied what he can in this project.
* Manali researched how we could do the HTML and CSS styling for our collapse card. She is also working towards using open wc and the general idea of the original card to be able to test and run in a browser.

**The first issues**

* Eric was unsure how to create an API for the search function. 
* We also struggled with developing a collapse feature to reveal more information about the course. Manali was testing ideas regarding how to do this.
**Project one concepts **

* Importing elements and abstracting functions through different classes. Hiding and showing information as well.

**Next steps**

* Figuring out the API
* Making the list look like a list
* Making the collapse work 

**Uncertainty**

* Eric doesn't know how the search will work with our cards. Will it look for keywords in the card properties?
* Manali is wondering if the size of the badge needs to be changed depending on how long the description is
Maximize Your Coding Efficiency with These Top VS Code Plugins
Published: 2023-03-27 03:18:17

Visual Studio Code is a super popular code editor that lots of developers use. It's packed with cool features and functions that make it an excellent choice for coding. One of the coolest things about VS Code is that you can add plugins to make it even better. In this post, we're going to talk about the top 5 plugins for VS Code.

## **1. ESLint**

ESLint is a plugin that helps you make sure your code is good quality. It looks at your JavaScript code and tells you if it's doing anything weird or bad. The plugin gives you feedback as you code, so you can catch mistakes early. Plus, it helps you write consistent code that follows best practices.

## **2. GitLens**

GitLens is a plugin that makes working with Git in VS Code much easier. It gives you all sorts of info about your code, like who wrote it and when it was last changed. It also shows you a visual history of your code changes, so you can easily see what's been happening.

## **3. Bracket Pair Colorizer**

Bracket Pair Colorizer is a plugin that makes it way easier to read code. It colors the brackets in your code, so you can see which ones match up. This is especially useful when you're working with nested code blocks.

## **4. Live Server**

Live Server is a plugin that lets you see changes to your code in real time. It sets up a local server that refreshes your code automatically whenever you make changes. This is super useful for web development, where you need to see changes quickly.

## **5. REST Client**

REST Client is a plugin that helps you test APIs. It gives you a simple way to send HTTP requests and see the responses. This is a must-have for developers who work with APIs a lot.

So those are the top 5 best plugins for VS Code! They'll help you write better code, work more efficiently, and have a better coding experience overall.
Homework 11 - trust the process
Published: 2023-03-27 03:08:26


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/86vr76ejohtj7v7md8jw.PNG)
##Note
When clicking the little icon a search bar appears from the side of the screen.

##Github repo
https://github.com/davidscheer58/project_2

##How we are conceiving the API for our element on both the frontend and the backend.

When designing our API for elements in both the frontend and backend, it's important to consider the specific needs and requirements of each component. We have to ensure that the API is secure and reliable, with appropriate error handling it can be implemented correctly. We are still devising how we are going to do this will continue to work on our API this week. 

##How did we start?

At first, we looked at the assignment and decided that splitting up the badge interface would be the best idea. However, we realized that working together and communicating with each other would be best because all of the different elements are all connected with each other.

##What we decided to attack first?

We basically wanted to start with the search button and move on from there since it's the most crucial part of the project. We don't have the code for its backend or placed in the intended position.
What issues we had?

We had some starting issues where linking to Vercel wasn't working for some reason, as it gave us a 404 error every time we tried to refresh and view our progress. We were able to figure the cause of the issue and fix it.

##Concepts from Project 1:

In my card, I had a drop down button, where the character's detail popped up when clicked on, which I think will be helpful when creating the panels for this project.

##What's our next priority?

Creating the drop-down panels and then writing backend code for the search feature.
What problems are we unsure of how to solve?

I think the biggest challenge we are facing right now is implementing the search. After creating the panels, we'll be working on coding the search feature.


##Problems we are unsure how to solve 

We are still trying to figure out the best way to implement the three "cards" that will be able to be searched and pulled away from the group either pulled to the top and briefly highlighted or to change the visibility on the rest to only show the one that was searched.
Local and Global variables in Python
Tags: webdev, beginners, tutorial, python
Published: 2023-03-27 03:07:28

[![image alt text here](http://img.youtube.com/vi/UHgSrZGCzjg/0.jpg)](http://www.youtube.com/watch?v=UHgSrZGCzjg)

Data Type Conversions
The general rule is to follow the CAST function if defined. If CAST is not defined, then all input data is treated as a string. It must be cast into the relevant data types when necessary.

For more information about the CAST function, see CAST.

Supported Data Types
Amazon S3 Select supports the following set of primitive data types.

Name	Description	Examples
bool	TRUE or FALSE	FALSE
int, integer	8-byte signed integer in the range -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.	100000
string	UTF8-encoded variable-length string. The default limit is one character. The maximum character limit is 2,147,483,647.	'xyz'
float	8-byte floating point number.	CAST(0.456 AS FLOAT)
decimal, numeric	
Base-10 number, with maximum precision of 38 (that is, the maximum number of significant digits), and with scale within the range of -231 to 231-1 (that is, the base-10 exponent).

Note
Amazon S3 Select ignores scale and precision when you provide both at the same time.

123.456
timestamp	
Time stamps represent a specific moment in time, always include a local offset, and are capable of arbitrary precision.

In the text format, time stamps follow the W3C note on date and time formats, but they must end with the literal "T" if not at least whole-day precision. Fractional seconds are allowed, with at least one digit of precision, and an unlimited maximum. Local-time offsets can be represented as either hour:minute offsets from UTC, or as the literal "Z" to denote a local time of UTC. They are required on time stamps with time and are not allowed on date values.

CAST('2007-04-05T14:30Z' AS TIMESTAMP)
Supported Parquet types
Amazon S3 Select supports the following Parquet types.

DATE

DECIMAL

ENUM

INT(8)

INT(16)

INT(32)

INT(64)

LIST

Note
For LIST Parquet type output, Amazon S3 Select only supports JSON format. However, if the query limits the data to simple values, the LIST Parquet type can also be queried in CSV format.

STRING

TIMESTAMP supported precision (MILLIS/MICROS/NANOS)

Note
Timestamps saved as an INT(96) are unsupported.

Due to the range of the INT(64) type, timestamps using the NANOS unit can only represent values between 1677-09-21 00:12:43 and 2262-04-11 23:47:16. Values outside of this range cannot be represented with the NANOS unit.

Mapping of Parquet types to supported data types in Amazon S3 Select
Parquet types	Supported data types
DATE	
timestamp

DECIMAL

decimal, numeric

ENUM

string

INT(8)

int, integer

INT(16)

int, integer
INT(32)	int, integer
INT(64)

decimal, numeric

LIST

Each Parquet type in list is mapped to the corresponding data type

STRING

string

TIMESTAMP

timestamp
Week 10: Validation and admins
Tags: opensource
Published: 2023-03-27 03:07:06

## Overview
Hello, my friends! I'm delighted to see you again. This week, I tackled two significant PRs: one focused on DNS records validation, and the other on admin page layouts.

## DNS Record Validation
To be honest, I found this task more engaging than the other one, as it introduced me to in-depth validation using zod, unlike designing layouts. The objective was to perform comprehensive validation of all required fields with zod, return appropriate messages, and then parse the response on the frontend to display them to the user.

One interesting technique I employed was reusing a single zod schema for both record creation and record editing requests. To make this work, I only needed to extend the base record validation schema with an additional field. This process closely resembles inheritance in interfaces or classes, and it always feels rewarding to reuse functionality. After some follow-ups, the PR was merged.

https://github.com/DevelopingSpace/starchart/pull/416

## Admin Layout
This task was more straightforward: our goal was to create an admin page, and the initial step from a frontend perspective was to design layouts for it. I crafted two components: one for the metric card and another for the users table. The result looks quite polished, but the real fun will begin when we delve into server-side development.

https://github.com/DevelopingSpace/starchart/pull/451

## The Week Ahead
Next week, I'll be taking on the role of a sheriff, which comes with its own set of responsibilities. Although I can't say I'm overly enthusiastic, it will be interesting to see how the experience unfolds. I'll likely collaborate with Stephan on admin backend development since he's leading that effort. Additionally, I might tackle some smaller issues.

## Final Thoughts
My ongoing battle against social media distractions continues. While I'm doing alright, there's room for improvement. I also feel that I could have been more efficient with my work on the StarChart this week and delivered results faster. I'll need to reflect on that. Peace! ✌️
Recursion in Python
Tags: webdev, beginners, tutorial, python
Published: 2023-03-27 03:03:03

[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/P1SqRCDpNc8/0.jpg)](http://www.youtube.com/watch?v=P1SqRCDpNc8)

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.services.s3.model.ObjectIdentifier;
import software.amazon.awssdk.transfer.s3.S3TransferManager;
import software.amazon.awssdk.transfer.s3.model.CompletedDirectoryUpload;
import software.amazon.awssdk.transfer.s3.model.DirectoryUpload;
import software.amazon.awssdk.transfer.s3.model.UploadDirectoryRequest;

import java.net.URL;
import java.nio.file.Paths;
import java.util.UUID;

    public Integer uploadDirectory(S3TransferManager transferManager,
                                   String sourceDirectory, String bucketName){
        DirectoryUpload directoryUpload =
            transferManager.uploadDirectory(UploadDirectoryRequest.builder()
                .source(Paths.get(sourceDirectory))
                .bucket(bucketName)
                .build());

        CompletedDirectoryUpload completedDirectoryUpload = directoryUpload.completionFuture().join();
        completedDirectoryUpload.failedTransfers().forEach(fail ->
            logger.warn("Object [{}] failed to transfer", fail.toString()));
        return completedDirectoryUpload.failedTransfers().size();
    }