teleren/devto huggingface dataset:
git config: interactive.singleKey
Tags: devjournal, git
Published: 2022-08-10 22:10:00

In my [previous post](https://dev.to/ccoveille/git-interactive-patch-4f55), I talked about --patch option.

If you are using `--patch` (or `-p` that is the short version) quite a lot like me, you may be happy to discover the following configuration setting `interactive.singleKey`

> In interactive commands, allow the user to provide one-letter input with a single key (i.e., without hitting enter)

More information here:
https://git-scm.com/docs/git-config#Documentation/git-config.txt-interactivesingleKey

Here is how to activate it

```shell
git config --global interactive.singleKey true
```

Then next time, you will use patch mode, you won't need to press enter after choosing among y,n,a,q,d,e
Golang backend development guide for Beginners
Tags: beginners, go
Published: 2022-08-10 22:08:43

Starting out as a backend Go developer wasn't easy for me, I had a lot of ups and downs in search for resources to learn from. I didn't have a mentor to guide my steps and as such I had a stiff learning curve and I had to figure out about everything by my self with lots of google search. I knew what I had to go through just to arrive at where I am at the moment. I really don't wish for anyone to go through the same path I did when I started out because I was literally confused and as such I have put together some resources to help absolute beginners get started as a Go backend developer. Here is a link to the resource https://github.com/iqquee/Golang_roadmap_for_beginners. I am so much interested in helping beginners in any way I can so that they can have a smooth ride. I hope someone finds this helpful
git interactive patch
Tags: devjournal, tutorial, git
Published: 2022-08-10 22:05:00

I will talk about something I'm using a lot on a daily basis, the patch mode.

## what is patch about ?

The idea is to help you to choose what you want to add /remove in everything you have locally.

You may have a file with 3 changes, you will commit either in different commits or in different branches.

It's always a pain for me before I started using patch, because I had to cancel local code or play with temporary files.

## Further reading

https://www.codementor.io/@maksimivanov/add-specific-lines-with-git-patch-eais7k69j

## choose the modifications you want to add to the index

```shell
git add --patch
```

## choose the modifications you want to add to a new stash

```shell
git stash --patch
```

## remove the modifications you want to add to the index

```shell
git reset --patch
```

## restore committed changes you want from the last commit

```shell
git restore --patch HEAD^1
git commit --amend --no-edit
```

Here:
- `HEAD^1` refers to the state before the last commit.
- `git commit --amend` tells git to commit the changes and merge them with the last commit. 
- `--no-edit` allows avoiding reopening the editor
My machine-learning pet project. Part 5. Exploring epochs and batches
Tags: machinelearning, imagerecognition
Published: 2022-08-10 21:43:18

---
title: My machine-learning pet project. Part 5. Exploring epochs and batches
published: true
description: 
tags: machinelearning,imagerecognition
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

My pet-project is about food recognition. More info [here](https://dev.to/whatever/my-machine-learning-pet-project-part-1-9o2).

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

The last thing I did was to feed a part of my dataset to [Retinanet](https://github.com/fizyr/keras-retinanet). This part consisted of 71 images. Retinanet basically complained that my dataset was too small for training. 

It said, *"Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least steps_per_epoch \* epochs batches"*.


I looked up epochs and batch sizes. One training *epoch* means that the learning algorithm has made one pass through the training dataset, where examples were separated into randomly selected *“batch size”* groups. But I've just remembered that 1 picture is worth a 1000 words, so I've drawn a picture for you, check this out:

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

steps_per_epoch (or steps) is number of batches to run per training epoch. So if we have batch_size = 32, with 71 images we can break dataset into 2 batches (=2 steps). 64 images will be used for training, and 7 images will be redundant. 

I excluded 7 images from my little dataset and ran command:

```
keras_retinanet/bin/train.py csv dataset/annotations3.csv dataset/labels.csv --epochs 50 --steps 2
```

but I got a message:

```
Failed to load the native TensorFlow runtime.
```

It means I forgot to load the environment where Tensorflow had been installed. I ran command:

```
conda activate mlp
```
repeated the train.py command, and ran into a different error message:

```
train.py: error: unrecognized arguments: --epochs 50 --steps 2
```

After reading this [issue](https://github.com/fizyr/keras-retinanet/issues/929) I realised that I needed to change my command to this:

```
keras_retinanet/bin/train.py --epochs=50 --steps=2 csv dataset/annotations3.csv dataset/labels.csv
```

After that Retinanet started working and finished its calculations without errors:

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

Next time I'll try to plan my real dataset size, I need to find a compromise between what I can label and what amount needs to be labelled. I'll research the methods for making the most of small sized datasets.
Cocktail Library {vanilla JS}
Tags: javascript, css, codenewbie
Published: 2022-08-10 21:34:00

Related to my previous post - here is a link to a project I completed for school that helped me gain milestones in understanding vanilla JavaScript:

https://akimsahn.github.io/Phase-1-Project/

<u>How it works:</u>
This site functions as a one-stop database for all the different kinds of cocktails, with further info on their ingredients and how to make them.
1. You can filter the cocktails by specific ingredient or type of alcohol by selecting it from the dropdown menu
2. You can select an image of a cocktail to display its details, including the list of ingredients and recipe instructions.
3. You can add a rating and/or comment on the cocktail for personal documentation. (Ratings & comments will not persist between refreshes but will persist between selecting other cocktails.)

**All interactivity on this site was set up using event listeners and pure vanilla JavaScript, as well as some CSS.**

Hope you enjoy! It's 5 o'clock somewhere, amirite?

_Credit to https://www.thecocktaildb.com/api.php for the API for fetching this data._
How to properly handle UTF-8 BOM files in Nodejs?
Tags: node, nodejstip, javascript
Published: 2022-08-10 21:13:22

Did you know that 𝗝𝗦𝗢𝗡.𝗽𝗮𝗿𝘀𝗲 will crash when you try to parse a 𝗨𝗧𝗙-𝟴 𝗕𝗢𝗠 encoded string?

This happens because 𝗡𝗼𝗱𝗲𝗷𝘀 does not strip 𝗕𝗢𝗠 when reading files with the 𝗳𝘀 methods. We have to do this in our code.

So instead of parsing the file string, you should use the decode method from the 𝗧𝗲𝘅𝘁𝗗𝗲𝗰𝗼𝗱𝗲𝗿 class. This class constructor provides a flag to strip 𝗕𝗢𝗠 characters, that is enabled by default. The decode method takes a buffer as an input, so when reading the file, don't set the encoding for the operation so that it remains as a buffer.

𝗕𝗢𝗠 stands for 𝗯𝘆𝘁𝗲 𝗼𝗿𝗱𝗲𝗿 𝗺𝗮𝗿𝗸; 𝖺 𝗌𝖾𝗊𝗎𝖾𝗇𝖼𝖾 𝗈𝖿 𝖻𝗒𝗍𝖾𝗌 𝗎𝗌𝖾𝖽 𝗍𝗈 𝗂𝗇𝖽𝗂𝖼𝖺𝗍𝖾 𝖴𝗇𝗂𝖼𝗈𝖽𝖾 𝖾𝗇𝖼𝗈𝖽𝗂𝗇𝗀 𝗈𝖿 𝖺 𝗍𝖾𝗑𝗍 𝖿𝗂𝗅𝖾.

----------------------

Did you learn something new today?

Like and share this post, and follow me for more!

![UTF-8 BOM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t826dyvo2cvdm56tdkbz.png)
Email Marketing For eCommerce
Published: 2022-08-10 21:00:30

1. [Klaviyo](https://kinsta.com/) 
2. Campaign Monitor (listed below)
3. [Encharge](https://encharge.io/)
4. [Newsletter2go](https://docs.newsletter2go.com/)


## [Linkedin page of LLazyEmail](https://www.linkedin.com/company/llazyemail/)
Use No-Code REST API Security Testing
Tags: tutorial, programming, security, discuss
Published: 2022-08-10 20:49:00



## Why security test your applications/APIs?

- According to Gartner, Applications/APIs are the most attacked vector. 

- Regulatory compliances like HIPAA, SOC 2, ISO, PCI-DSS, etc., mandate application security testing.



## Why is security testing hard?
- Manual - Basic stuff is automated, but the rest is human-driven
- Expensive - Ranges from $4k to $100k
- Noisy Reports - Low quality and nice-to-have suggestions frustrate developers



## What is No-Code security testing?
- No need to write code
- No configuration is required either



## Use No-Code Security Tool: 
[EthicalCheck.dev](https://ethicalcheck.dev)
We built this tool to help fellow developers like you. The web tool is so simple everyone should try and bookmark it.
- Paste your OpenAPI/Swagger URL
- Get a free and instant PDF vulnerability report



## Key features:
- No code and configuration required
- Detect OWASP API-2 vulnerabilities
- No sign-up required
- Free and instant PDF reports
🧑‍🚀 Disrupting 📦 delivery with public (Quarkus) APIs & chatBOT 🚀
Tags: api, showdev, java, agile
Published: 2022-08-10 20:40:00

## 🗣️ Pitch

> **_Because making things happen has much more impact than just saying things are possible._**

## ❔ About

Since some months we have pushed some of our APIs on our public Marketplace on RapidAPI by lauching [OPT-NC for developers](https://rapidapi.com/organization/opt-nc) : 

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kxs510whsmsrjjqkn7c8.png)](https://rapidapi.com/organization/opt-nc)
 
To : 

- **Make Open Innovation happen** around our services
- Help people (`B2C` et `B2B`) **perform effortlessly the  integrations they need**

## 🎯 Goals

In this post you'll : 

- Learn how to operate with our API on RapidAPI
- Discover how this make innovations happen with a real chat Discord BOT demo

## 🍿 Demo

Chapter Indexed demo below, and for the impatients, direct [🔗 to Discord integration](https://youtu.be/d_vWqNONjCM?t=766).

{% youtube d_vWqNONjCM %}

## 🔖 Ressources

- 🤓 [Java SDK source code](https://github.com/opt-nc/colisnc-sdk)
- 🤓 [API source code](https://github.com/opt-nc/colisnc-api)
- 🧑‍🎓 [Dedicated Killercoda course](https://killercoda.com/opt-labs/course/colis-nc)
- 🛒 [API on RapidAPI](https://rapidapi.com/opt-nc-opt-nc-default/api/suivi-colis)
- 🐳 [API on DockerHub](https://hub.docker.com/r/optnc/colisnc-api)
.NET Obfuscator online tutorial
Tags: obfuscator, dotnet, protectcode, obfuscate
Published: 2022-08-10 20:39:58

Code obfuscation is a form of software protection against unauthorized reverse-engineering.
The chief functions of any software protection technique can be determined as detection of pirate attempts to decipher or tamper software, protection against such attempts and alteration of software to ensure that it functionality degrades in an undetectable manner if the protection fails.

Skater .NET Obfuscator is the Windows based tool that implements all known software protection techniques and obfuscation algorithms. Skater is an intuitive .NET Obfuscator, allows .NET developer quickly and reliably protect .NET products. Skater obfuscator is a universal .NET Obfuscator that could be used as a console executable as well.
If you would like periodically obfuscate your .NET products the Skater .NET Obfuscator is for you. Rustemsoft LLC is using the Skater for internal needs securing all Rustemsoft LLC .NET executables and assemblies. Its command-line version running in batch mode is much useful for your scheduled products updates. You have to assign settings for an assembly in GUI version first. Then the batch obfuscate task will use the settings.

Read more [Skater on-line manual](http://rustemsoft.com/SkaterDoc/)
Question: How to achieve the expanded view when a table item is clicked?
Tags: react, webdev, discuss, testing
Published: 2022-08-10 20:31:00


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

On clicking the table item the entire column is selected and displayed and the other columns are not displayed. On clicking the item again a card with more details is displayed.


```
 <Tbody>
                    {data.map((d) => (
                        <Tr>
                            <Td>{d.Employee}</Td>
                            <Td>{d.HrsWorked}</Td>
                            <Td>{d.Overtime}</Td>
                            <Td>{d.SubmitedOn}</Td>
                            <Td>{d.ApprovedBy}</Td>
                            <Td>{d.ApprovedOn}</Td>
                            <Td>{d.Status}</Td>

                        </Tr>
                    ))}

                </Tbody>
     
           
           
```
The MongoDB CRUD Database Operations🍃
Tags: database, mongodb
Published: 2022-08-10 20:28:00

This article explains MongoDB CRUD operations to you, the four primary database operations in any database. They enable you to Create, Read, Update and Delete data from your Database. The CRUD acronym stands for;

C- Create

R -Read

U -Update

D -Delete

**Create**

The C stands for Create. This is how you add new items to your Database. The items may be objects or individual items. If the collection doesn’t exist, this operation will create a new one for you. Collection, in this case, refers to the name of your Database. Below is an example of how you insert items into a database called students. You can insert one or many at the same time.

_db.collection.insertOne()_

_db.collection.insertMany()_

**Read**

This operation enables us to read the information available in our Database from the name itself. We use a method called to find to do this.

_db.collection.find()_

find with no query inside returns the entire database.

_db.collection.find(query)_

Inside the bracket, you feed the specific item you are looking for.

**Update**

This operation helps one make changes to an already existing database. Inside the brackets, you will specify the value pairs you are interchanging or the ones you’re adding inside.

_db.collection.updateOne()_

_db.collection.updateMany()_

**Delete**

Delete the object or items that you do not want in your collection. MongoDB provides the following methods for deleting. Similar to the insert command, you can delete one or delete many simultaneously.

_db.collection.deleteOne()_

_db.collection.deleteMany()_

I hope this makes your life easier.

Happy Coding!🍃​☕​
Open sourcing my C programming learning notes
Tags: programming, c, opensource, beginners
Published: 2022-08-10 20:16:35

Sometime around late November of 2022 I started a C programming course on the online learning platform Udemy, it was called [C Programming for Beginners - Master the C Language](https://www.udemy.com/course/c-programming-for-beginners-/). It took me about 6 months to go through the whole course and I learned a lot of concepts that weren't even taught in my Computer Science classes at university.

My workflow was: start watching a video and listen, pause if I needed to take note of something important and/or take screenshots, write and run code if it was needed. Then solve the assigned challenges without looking at the solution until I had tried my hardest.

I decided to Open Source my notes from the course because I realized they were pretty beefy and it could help other people like me in their learning path, they are stored inside of [this repository on GitHub](https://github.com/JFiTech/C-Programming-for-Beginners).

I created the original file with the [Cherrytree](https://www.giuspen.net/cherrytree/) note taking application, it has a **.ctd** extension, you will have to install the previously stated program in order to view the file, there is also a PDF file that was included to make it easier for some people so you don't have to install Cherrytree on your machine.

The contents of the repository are the following:
- Code: for learning syntax and trying to solve challenges.
- Notes: Cherrytree document and PDF file.

I would like to emphasize on the fact that learning C is not just for someone who wants to focus their career on this programming language, knowing some 'low level' concepts related to C will make you a much better programmer at other High Level Languages because you will know what's going on 'under the hood' inside the computer, so my notes are intended to help most programmers out there.

Currently I am taking [Advanced C Programming](https://www.udemy.com/course/advanced-c-programming-course/) and will post the notes from that course as soon as I am done with it.

There will be some typos, mistakes and code that doesn't compile, but this is due to the fact that they are personal notes, I was learning and initially didn't intend to make this open source, otherwise I would have formatted it in a much nicer way.

Disclaimer: I am in no way affiliated with the creators of the course, nor the learning platform. I took the course, really liked it, learned a ton and wanted to share some content with other fellow learners.
How do you safely share passwords?
Tags: discuss, security, productivity, webdev
Published: 2022-08-10 20:03:49

Hi dev.to!

Having worked in agencies and having to exchange passwords and API keys quite regularly, there doesn't seem to be a single agreed-upon way to send passwords.

![Baloney Password](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kuzy2gop145nloew128i.gif)

How do you do it or what do you use? I expect everyone already sent a password by email or Slack in the past 😅
A journal entry about confirmation bias
Tags: chuckleworthy, anecdote, confirmationbias
Published: 2022-08-10 20:03:44

8:35 AM: hearing an odd noise from outside
8:37 AM: confirmed noise coming from passenger-side front of the car
8:45 AM: back at home; examination of driver side front wheel shows nothing out of the ordinary
8:55 AM: pulled over in a lot and more thoroughly examined passenger side tire, wheel, and surrounding area to confirm nothing is rubbing or dragging
9:02 AM: ignoring noise not fruitful; imagining wife at my funeral, wishing I had discovered the hole in the fuel tank before mustache-twirling bad guy dropped a match on the trail of fuel I was leaving behind
9:07 AM: confirmed fuel tank intact; found a small tree branch under the driver side of the car instead


![A small tree branch wedged under a car](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4uawzedpmvhg6tb3pa7d.jpg)

If the wheel was grinding against something, the noise would have gotten louder when I opened the passenger-side window, or there might have been some vibration as the car moved, or may have felt resistance as I tried to steer. But I was convinced that my initial assumption was correct, so I ignored the lack of evidence and missed the obvious problem just a few feet to the left.

I stopped and looked under the car twice, but because I was convinced that it could only be an issue on the passenger side front, I did not notice the obvious issue, just a few feet to the left. 

The cabin is sealed for a quieter ride, except for the cabin air filter, which is in the glove box on the passenger side.
Wednesday Links - Edition 2022-08-10
Tags: jvm, java, graalvm, gradle
Published: 2022-08-10 19:44:59


JUnit5 parameterized tests in a human-readable way (30 sec)🫶
https://twitter.com/mikemybytes/status/1556571398377701376

Concurrent Marking in G1 (19 min)✔️
https://tschatzl.github.io/2022/08/04/concurrent-marking.html

Testing Time-Based Features with Feature Flags (10 min)🏁
https://reflectoring.io/date-time-feature-flags/

Things I didn't know about Java: Generic Constructors (7 min)🧠
https://www.objectos.com.br/blog/java-generic-constructors.html

Kotlin API for Apache Spark v1.2: UDTs, UDFs, RDDs, Compatibility, and More! (6 min)💖
https://blog.jetbrains.com/kotlin/2022/08/kotlin-api-for-apache-spark-v1-2-udts-udfs-rdds-compatibility-and-more/

GraalVM Enterprise 22.2—Lower memory, smaller downloads, simpler library usage (3 min)🏆
https://blogs.oracle.com/java/post/graalvm-enterprise-222

AOT and Native with Spring Boot 3 (2 min)🏆
https://github.com/snicoll/demo-aot-native

Quarkus: supersonic, subatomic Java (4 min)🏆
https://nurkiewicz.com/81

Bind property in `ConfigurationProperties` with custom `ConfigurationPropertiesBinding` converter (30 sec)📌
https://twitter.com/maciejwalkowiak/status/1555822534959955968

Replace stack-locking with fast-locking (2 min)📚
https://github.com/openjdk/jdk/pull/9680

Some README.md Love: Markdown Support Improvements (4 min)📄
https://blog.jetbrains.com/idea/2022/08/markdown-support-improvements/

Gradle Test Fixtures (5 min)🧪
https://www.youtube.com/watch?v=fSRN6YKa5B0

Class is not fully OOP, should it be? (2 min)🤔
http://manifold.systems/articles/class_objects_arent_oop.html
There's no 'I' in Team
Published: 2022-08-10 19:35:00

## What's happened until this point

It feels like time is flying already with this course. The first three weeks we were with the Develop Carolina team five days a week. We all worked on our pitch decks to present a project while onboarding with our employer hosts. It was a nice three weeks for me to find a rhythm to working remote because it's very new to me. 

Now we are in our second week with our host companies, which for me is Booz Allen Hamilton. I haven't been assigned to a project yet, but I'm still learning a lot. I've been taking advantage of the free Udemy courses, and getting to talk about what I've done with my mentor to help hammer home concepts. I'm excited to see what kind of project I will be on and to be on a team.

## Collaboration

At the end of our first three weeks we found out what our projects would be. I got a paired up to work with Wayne on his Engaged app idea. It's going to be a lot of fun to work on, but also challenging. Communication and team work will play a huge role in our success. Being open to each others approaches and ideas, helping each other through difficult tasks, and having trust in one another. Not only is this key for the umbrella project, but also for working with Booz Allen or any team. In my past career I've been on many teams where there wasn't much communication or collaboration and the results were never good. I look forward to having the chance to collaborate more in this field, and to improve my collaborating skills.
Mac 設定 Part 6 --Tmux での prefix と pain の移動の変更
Tags: tmux
Published: 2022-08-10 18:51:00


https://kei-s-lifehack.hatenablog.com/entry/2019/05/15/

この下書きをもとに書く。

## どこに書くのか

`~/.tmux.conf` これを作ると起動時に読まれる。

---

## prefix をデフォルトの Control B から W に

B だと 入力中の一つ戻る操作とかぶるので W にする

```php
set -g prefix C-w
unbind C-b
```

Global に prefix として Control W を追加して
Control B を削除する

---

## ペインの移動を Contorl W + hjkl にする

```php
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
```

デフォルトだと LDUR な分割されたペインの移動を hjkl にする

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

これで vim エディタで シェルスクリプトを変更して
ctrl w + j/k でターミナルに移動して実行
ctrl w + j/k でvim エディタで シェルスクリプトを変更
このワークフローをマウスをを使わずにできる。

---

```
setw -g mode-keys vi
```