teleren/devto huggingface dataset:
Go course reviewer
Tags: go, course
Published: 2023-08-28 14:28:58

So I spent my last week learning Go as a new backend language that I can use to build out awesome backend. 

Go is famous for powerful performance and claimed to be easy to learn. 

Knowing what I know, It's best for me to find a reliable source to first start learning Go so I choose **Go: The Complete Developer's Guide (Golang)** from **Stephen Grider** on Udemy.

This is absolutely not a paid promotion or anything, I bought the course with dirt cheap price on Udemy and gets quite good knowledges about Go languages from it, so I would definitely recommend it. 

For summary it can teach you about : 

- Many basics like : Variables in Go, Functions, How to write a Go file and run it, how to "import" Go files code to use in another Go file code.
- Many data type and how to use them like : primitive types, array or slices, interfaces, struct, maps
- Many important Go features like : Pointer, Receiver Function, Reference types and Value types, Routine and Channel
- How to write test files in Go

This course won't teach you how to build a fully functional app with Golang backend but it give you a very solid knowledge about what Golang is and how it works. 

After you learn the code, you can try this link https://www.freecodecamp.org/news/best-resources-to-learn-golang-for-free/ to actually build out backend using Golang. 

I also have written a few notes about Go here https://github.com/Tris-909/KnowledgeStores/blob/master/Golang/Golang.md, I would absolutely love it if anyone who reads this can go through the course and make some pull requests directly to that MD files to correct me on some points if it feels wrong.

Well that it is for Golang, wish you all the best on your learning journey.

Hope anyone can provide me some goods Golang learning materials.
Open Source ABCs: Kernel
Tags: opensource, discuss, 100daysofoss
Published: 2023-08-28 14:24:55

---
title: Open Source ABCs: Kernel
published: true
description: Join our #100DaysOfOSS blog series as we explore the world of Open Source Software (OSS) from A to Z! Every week, we'll discuss two new letters of the English alphabet. Share your thoughts, ideas, and favorite OSS projects for each letter. Let's celebrate the power of open source together! 
tags: opensource, discuss, 100DaysOfOSS
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fxwg4ygmybnni1tpwdx3.png
# Use a ratio of 100:42 for best results.
series: 100DaysOfOSS
canonical_url: https://opensauced.pizza/docs/community-resources/open-source-abcs-kernel/
---

Welcome to our [#100DaysOfOSS series](https://dev.to/opensauced/100daysofoss-growing-skills-and-real-world-experience-3o5k). Until October 31, we'll be doing  Open Source Software (OSS) terms from A to Z. We'll be diving into a different letter of the English alphabet, uncovering OSS concepts, and sharing our thoughts on them.

Today, we're covering the letter "K" for Kernel. 

**Kernel**: The kernel is the core component of an operating system. Several open-source operating systems, such as Linux, have a kernel that allows developers to contribute and modify the system's functionality.

Now, we want to hear from you! What other OSS terms can you think of that start with the letter "K"? 

Remember to use the hashtag #100DaysOfOSS if you share on social media, and don't forget to tag us [@saucedopen](https://twitter.com/saucedopen) so we can follow along.
What are your goals for the week of August 28?
Tags: discuss, motivation
Published: 2023-08-28 14:21:14

## What are your goals for this week?


- What are you building? 
- What will be a good result by week's end?
- Are you attending any events this week? 
  * Any suggestions of events to attend?
- Did you meet your goals last week?


### Last Week's Goals



- [:white_check_mark:] Continue Job Search.
- [:x:] Blog.
- [:white_check_mark:] Code Challenges. 
- [:x:] Project work
- Events
  * Attend [Virtual Coffee(VC)](https://dev.to/virtualcoffee) Thursday.
  * [:white_check_mark:] Other VC events if I can. Chad and Nick T were on separate live streams not VC events but that's where I met both of them. They were Certified Fresh Events. 
  * [:white_check_mark:] Job Fair Tuesday. 
  * [:white_check_mark:] Watch Chad Stewart talk on Certified Fresh Event. 
{% embed https://www.youtube.com/watch?v=hem6KaheMBE %}
- [:white_check_mark:] Run a weekly Slack thread similar to this post. Gonna motivate the community.
- [:x:] Build some LEGO sets. 
- [:white_check_mark:] Rewatch Rebels before Ahsoka series starts. 
- [:white_check_mark:] Pack for weekend trip. 



### This Week's Goals

- Continue Job Search.
- Blog.
- Code Challenges. 
- Project work
- Events
  * Attend [Virtual Coffee(VC)](https://dev.to/virtualcoffee) Thursday.

  * Other VC events if I can.

- Run a weekly Slack thread similar to this post. Gonna motivate the community.
- Build some LEGO sets. 
- Rewatch Star Wars Rebels. I'm in the last season. But at that episode.
- Process pics from weekend trip. 
- Add them to a website

### Your Goals for the week


You've read my goals so I'll throw the questions back to you.


- What are you building? 
- What will be a good result by week's end?
- Are you attending any events this week? 
  * Any suggestions of events to attend?
- Did you meet your goals last week?



```html
-$JarvisScript git push
```
A technical look at the news of "Python moves to remove the GIL". Some coding & some source checking
Tags: python, video, technical, news
Published: 2023-08-28 14:12:15

Python's usage exploded even when it was merely new; lacking lots of features. One main reason for this was its great integration with C libraries. Combine this with the possibility of using Threads and you will get your holy grail: and easy language with threads which can use C libraries! BUT! But python needed a Global Interpreter Lock to be able to run C Libraries in its threads.

In this video we will have a closer look at this concept. I will describe the necessity of GIL  in Cpython and will show you why and how it is slowing down multi-threaded CPU hungry program. We will check the source code and will understand why both parties (defending and protesting the GIL removal) are claiming that the "You are slowing down Python!"

{% embed https://youtu.be/6254JnkLg1c %}
What I'm working on today!
Tags: javascript, html, webdev, beginners
Published: 2023-08-28 14:01:51


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

Learning JS as been the most challenging on my journey to becoming a Front-end developer. But I am embracing the challenge, so far.

Today, I learned how to use the textContent property to access and modify html elements. I am currently learning all about the DOM, after spending the last month learning and understanding some JS fundamentals.

Lastly, I am sharing this screenshot of my code, after discovering the codeSnap extension om vs code. So looks like I will be sharing more snippets of my work as I continue to learn all about Front-end coding.

What are you working on today?
Monitor an operator
Tags: kubernetes, devops, sre, monitoring
Published: 2023-08-28 14:01:00

Having an Kubernetes operator is quite cool, but if everything goes well. To track this and potentially adding alerts on it, we must have metrics.

And that's good, by default with the Golang Operator SDK, we already have a couple of metrics which are available.

## Available metrics

The following list is an overview of all the metrics available. To see the full list, please check the [Kubebuilder reference](https://book.kubebuilder.io/reference/metrics-reference.html).

- `controller_runtime_reconcile_total` : Counter - Total number of reconciliations per controller.
- `controller_runtime_reconcile_errors_total` : Counter - Total number of reconciliation errors per controller.
- `controller_runtime_reconcile_time_seconds` : Histogram - Length of time per reconciliation per controller.
- `controller_runtime_webhook_requests_total` : Counter - Total number of admission requests by HTTP status code.

---

## Add metrics
Even if the generic metrics from Kubebuilder are useful, they may not be enough for your use cases.

For this, there is something to do to easily add more metrics. With the package `github.com/prometheus/client_golang/prometheus`, create all the metrics you may need

```go
import ( 
	"github.com/prometheus/client_golang/prometheus" 
)

var ( 
	goobers = prometheus.NewCounter( 
		prometheus.CounterOpts{ 
			Name: "goobers_total", 
			Help: "Number of goobers proccessed", 
		}, 
	) 
	gooberFailures = prometheus.NewCounterVec( 
		prometheus.CounterOpts{ 
			Name: "goober_failures_total",
			Help: "Number of failed goobers", 
		}, []string{"label_1"}
	)
)
```

Then register them in the metric registry of the operator

```go
import ( 
	"sigs.k8s.io/controller-runtime/pkg/metrics" 
)

func init() { 
	metrics.Registry.MustRegister(goobers, gooberFailures) 
}
```

Once it's done, congrats! You can use these metrics wherever you want!
```go
goobers.Inc()
goobers.Add(2)

gooberFailures.WithLabelValues("toto").Inc()
gooberFailures.WithLabelValues("titi").Add(2)
```

> ## Metrics with labels
> As you can see in the previous example, if you want to create a metric with labels, you can use `New...Vec`. It will ask you to give a list of labels name, and then will ask you to use `WithLabelValues` to fill the value for each label when you will want to update a metric value. Quite useful if you always have the same labels.
>
> Otherwise, you can use `.With()` to add all the labels you want when updating a metric value.
>
> ex: `.With(map[string]string{"toto": "titi"}).Inc()`

---

At the end, an operator is a service like all the others and should be monitored to be sure that everything is going well in your stack. Like a lot of other things, Operator SDK and Kubebuilder help us a lot by simplifying all this process.

---

I hope it will help you and if you have any questions *(there are not dumb questions)* or some points are not clear for you, don't hesitate to add your question in the comments or to contact me directly on  [LinkedIn](https://www.linkedin.com/in/maxime-guilbert-14b6a5128/).
Why is Blazor Hybrid's file input crashing on iOS?!
Tags: blazor, dotnet, mobile, webdev
Published: 2023-08-28 13:59:31

On `Android` and `WinUI` input tag with type of `file` is working fine when trying to capture `image/video` with the camera, but on `iOS` doing weird stuff like crashing on a real device or showing a black screen when you want to upload an image or video from the camera! so no worries we're here to fix them all.

## Crashing on opening camera
Why it's happening only on the `Hybrid` app?
Because unlike `PWA` or `SPA`, it's basically an actual app accessing all the native stuff + Web UI and the crashing is because you need to give it the right permissions just like a native app!
So go to `YOURPROJECTNAME\Platforms\iOS\Info.plist` and add these lines:
```xml
<key>NSCameraUsageDescription</key>
<string>This app uses camera for...</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app uses microphone to record videos for...</string>
```

## Camera view is black!
I don't know if this is on `BlazorWebView` or not but when you open the camera from an `input` tag it shows a black screen! so I read `WKWebView`'s docs and found the `AllowsInlineMediaPlayback` property and we have to enable it in our `BlazorWebView`!
In your `MainPage.xaml.cs` add these lines:
```csharp
BlazorWebViewHandler.BlazorWebViewMapper.AppendToMapping("CustomBlazorWebViewMapper", (handler, view) =>
{
#if IOS
    var configs = handler.PlatformView.Configuration;
    configs.AllowsInlineMediaPlayback = true;
#endif
});
```
---

So that was all you needed to fix the `input` tag on a Blazor Hybrid iOS app! 
Luckily we've covered these in [BitPlatform templates](https://bitplatform.dev/templates/overview) and more!

Happy coding ;D
How to solve git not ignoring files in .gitignore
Tags: git
Published: 2023-08-28 13:51:50

Git is the number one version control system that has made the software development process faster and collaboration on projects much easier.

When working on a project, there will be some files that don't need to be committed and shared with other developers. Such files include configuration files that are specific to your development environment(.env), IDE config files, log files and node_modules folders.

There are 3 main states of files in a git repository:

- **tracked**: These are files/folders that git is aware of and keeps track of any changes made to them.

- **untracked**: These are new files/folders in the working directory that are yet to be staged and committed.

- **ignored**: These are files/folders that git avoids. No tracking, no staging, no commits on these files/folders.


All ignored files are clearly stated in a `.gitignore` file.


## How to create a `.gitignore` file
On Windows, run this command in the command line:
`cd . > .gitignore`

on Mac/Linux
`touch .gitignore`

Both commands are run from the root directory of the project.


## How to correct files/folders not ignored by Git

After creating our `.gitignore` file and stating the files we want to ignore. Sometimes, they don't get ignored and are committed and pushed to the remote repository. This usually happens when we commit a file/folder either by mistake or otherwise into git before realising the error and then adding the file/folder to `.gitignore`. In such cases, we run the following commands after committing any changes made:


```
git rm -r --cached .
git add .
git commit -m "<commit message>"
git push
```


- `git rm -r --cached .` - removes all files from the git index and refreshes the git repository

- `git add .` - stages all files/folders not stated in the `.gitignore` file

- `git commit -m "<commit message>"` - commits all files that have been staged

- `git push` - push to remote repository



The files stated in `.gitignore` have been left alone by git and all other files uploaded to the remote repository
Am I missing something
Tags: explainlikeimfive
Published: 2023-08-28 13:41:53

So I had this interview over the weekend on Angular and I got asked the below question "How does the component class connects to template file and how it binds its data to its elements? " This seemed like a generic question on how the data binding happens and how we can use the template or template URL property in the component metadata to let Angular know that this template belongs to the component class. But it felt like the interviewer was not happy with the answer and he was hovering over the same concept. What was I missing and what should have been my answer. Any insights would help , Thanks !
Looking for developer(s)
Tags: webdev, programming, productivity, hiring
Published: 2023-08-28 13:21:47

Hi, my name is Teodor Walter Vido, and I am looking for developer(s). I have this idea for a big project. For more info, text me at: teo.vido@icloud.com, teo.vido@aol.com, or theodore.walter@gmail.com. :-)
Some lesser known Vim tips
Tags: vim, linux, development
Published: 2023-08-28 13:05:27

Just sharing some lesser known remaps hope it helps

## Quickly enter command mode 
```
nnoremap ; :
nnoremap : ;
```
- In my experience I have seen my self using command mode more than `;` motion
- But I still use `;` motion time to time so I have remapped also

## Last buffer
- We all know `<C-o>` and `<C-i>` are awesome they jump to last point. But for long time I was using them also to navigate navigate to last buffer such a shame ....
- Vim always had `<C-^>` for moving to last file
```
nnoremap Q <C-^>
```
- I have remapped it to this for my preference but use you own 

## Increment and decrement
- I dont use this vim feature often but sometimes it comes handy when you are working on UI
- Sadly I never remember them when I need them 
```
nnoremap - <C-x>
nnoremap + <C-a>
```
- For me its very intuitive 

## Copying
- Yank in vim is awesome but there is a problem when you want to copy something from buffer to system keyboard
- People do this crazy stuff which I dont understand
```
vnoremap y "+y
nnoremap y "+y
```
- what is does that system clipboard and vim clipboard is essentially same , I think its problematic because It will clutter you system clipboard.
Instead I like to do is 
```
vnoremap Y "+y
nnoremap Y "+y
```
- This way when they stay different 

Here are my some tips which I have found along the ways. Share me your own.

Also if you are hiring for a backend or frontend role (remote global). Let me know.
Prisma "null or does not exists"
Tags: prisma, mongodb
Published: 2023-08-28 13:04:27


I've been using Prisma on my latest project [Karaoke Tools](https://karaoketools.com) and as crazy as it may seem, I did not find any easy way (like a plugin) to handle soft delete behaviour.

So I had to tweak it myself manually and ending up in a case where
- `deletedAt` can be null
- `deletedAt` can NOT exist

This is because I'm using mongo and no default value for `deletedAt`.

This filtering in Prisma is not handled by default (like `deletedAt: null` so I had to do it with an `OR` request.

```js

const items = await prisma.event.findMany({
    ...
    where: filters: {
      OR: [{ deletedAt: { isSet: false } }, { deletedAt: null }],
    ...
  });

```

As it took me almost an hour to find this (chatGPT not being helpful), I wrote this article.

Cheers
Intro to Python: Day 18 - Running Your First Python Program
Tags: python, programming, webdev
Published: 2023-08-28 12:57:00

*Hi there 👋 I'm a New York City based web developer documenting my journey with React, React Native, and Python for all to see. Please follow my dev.to profile or [my twitter](https://twitter.com/stonestwebdev) for updates and feel free to reach out if you have questions. Thanks for your support!*

To run a program in Python, luckily it's quite a bit easier than learning to run your first program in Javascript, for which you have to learn Node.

Simply make sure Python is installed on your computer by opening a terminal and typing `python` or on Mac/Linux systems it is likely `python3`, which it is for me. If you get an error, go to the Python website and download it to your machine. Once installed, running `python3` should print the following:

```python
Python 3.9.6 (default, Oct 18 2022, 12:41:40) 
[Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
```

To run your own Python program simply create a folder, and save a Python file in it by using the extension `.py`. For example, `main.py`.

Let's start traditionally and write a Hello World program.

```python
#main.py
print("Hello world!")
```

When you save this program and in the command line run `python3 main.py` from the project directory, your string will print to the screen. Huzzah!

This means it is installed and the three `>` mean it can accept input. You can stop the interpreter by pressing CTRL + D on a Mac.



When you verify Python is installed (

**If you like projects like this and want to stay up to date with more, check out my Twitter [@stonestwebdev](https://twitter.com/stonestwebdev), I follow back! See you tomorrow for another project.**
Tesla Clone Website
Tags: webdev, javascript, beginners, programming
Published: 2023-08-28 12:50:45

Hii, Friends I have made Tesla Clone Website using Next js 13 
Check My Work and Tell me what imporvement should i can do in my development 
Live Link:- https://tesla-clone-7hf6.vercel.app/
github repo :- https://github.com/faisgit/tesla-clone
NumPy Tutorial #11: Array Search
Tags: datascience, python, beginners, tutorial
Published: 2023-08-28 12:48:30

{% embed https://youtu.be/9hiRg_tomvw %}

In this blog, I will show you how to search a specific item in an array.

---

## Search

NumPy has a method called `where` to find an item in array. This method requires an expression for its parameter. Let me show you how to implement it.

First, let us create an array
```python
import numpy as np

arr = np.array([1, 2, 3, 4, 5, 2])
```

Then, use method `where` to find the index of an item in array and store it in a variable `x`
```python
x = np.where(arr == 2)
```

Let us print the value of `x` to see its output
```python
print(x)
```

The following is the output
```
(array([1, 5]),)
```
From the output above, you can see that `2` is occurs two times in index `1` and `5`.

---

Congratulations, that is how you can search an item in NumPy array. Thank you for reading, and have a nice day!
A Beginner's Guide to Using APIs in React.
Tags: javascript, programming, react, api
Published: 2023-08-28 12:42:56

INTRODUCTION: Imagine you're feeling hungry and faced with the dilemma of either spending your valuable energy, time, and resources cooking a meal or opting for the convenience of an eatery. 

Similarly, when building applications, integrating APIs can provide a comparable solution. 

Instead of investing significant effort into developing specific functionalities from scratch, APIs allow you to leverage existing services and external data, saving you time and resources while enhancing the functionality of your applications.

1. Make API Requests in React:

To make API requests in React, 

we can utilize the fetch function or third-party libraries like axios. 

Here's an example using the fetch function to make a GET request:

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


In this example, we use the fetch function inside the useEffect hook to make an asynchronous API request to the specified URL. The retrieved JSON data is stored in the data state using the setData function. The component then conditionally renders a list of items if the data state is not null.

 2.Handling API Errors:

API requests can encounter errors, such as network failures or invalid responses. 

To handle errors gracefully in React, we can add error handling logic.

 Here's an updated example:

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



In this updated example, we handle errors by catching any exceptions thrown during the API request. If an error occurs, we store the error message in the error state and render an error message instead of the data.

3.Handling API Authentication:

Many APIs require authentication for secure access. 

To include authentication in your API requests, you can add headers or tokens to the request. 

Here's an example using the Authorization header:


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


In this example, we include an Authorization header in the API request by passing it as part of the headers option in the fetch function.

Conclusion:

Integrating APIs into your React applications opens up a world of possibilities for fetching and manipulating data from external sources. By utilizing the fetch function or third-party libraries like axios, handling errors, and incorporating authentication, you can create powerful and dynamic React applications.

Remember to handle errors gracefully, consider loading states, and explore the API documentation for additional details and specific usage instructions.

Note: The code snippets provided above are written using React function components and the Hooks API. Make sure you have the necessary dependencies installed, such as React and axios or other libraries, before running the code.

THANK YOU.
Aeppeva - Blog Kiến Thức Wiki, Hỏi Đáp
Published: 2023-08-28 12:39:03

Aeppeva - Blog Kiến Thức Wiki, Hỏi Đáp  https://aeppeva.org/

https://twitter.com/aeppevaorg

https://www.linkedin.com/in/aeppeva/

https://about.me/aeppeva

https://www.reddit.com/user/aeppeva

https://www.youtube.com/@aeppeva/about

https://www.pinterest.com/aeppeva/

https://www.flickr.com/people/aeppeva/

https://www.tumblr.com/aeppeva

https://dribbble.com/aeppeva/about

https://linkhay.com/u/beatthethao

https://hub.docker.com/u/aeppeva

https://www.diigo.com/profile/aeppeva

https://www.twitch.tv/aeppeva/about

https://tapas.io/aeppevaorg

https://replit.com/@aeppevaorg

https://en.gravatar.com/aeppevaorg

https://sketchfab.com/aeppeva

https://www.instapaper.com/read/1629520196

https://gab.com/aeppeva