teleren/devto huggingface dataset:
Bandit Level 8 Level 9
Tags: bandit, ctf, overthewire, writeup
Published: 2023-08-01 16:31:27

### Introduction

Bandit9 is the tenth level of the OverTheWire Bandit wargame. In this level, we are given a file called `data.txt` and we have to find the line that occurs only once in the file.

### Steps

1. Open your terminal application.
2. Enter the following command to ssh into the remote server:

```
ssh bandit8@bandit.labs.overthewire.org -p 2220
```

1. Enter the password for Bandit8: `z7WtoNQU2XfjmMtWA8u5rN4vzqu4v99S`
2. Now, you are logged in as Bandit8 and can start solving the level.
3. Use the `cat` command to read the contents of the `data.txt` file:

```
cat data.txt
```

1. We need to find the line that occurs only once in the file. To do this, we can use the `sort` command to sort the lines of the file, and then the `uniq -u` command to show only the lines that occur once:

```
cat data.txt | sort | uniq -u
```

Congratulations! You have successfully solved Bandit9 and obtained the password for the next level `EN632PlfYiZbn3PhVK3XOGSlNInNE00t`.

### Conclusion

In this level, we learned how to use the `sort` and `uniq` commands to find a unique line in a file. These are powerful commands that can be used to analyze and manipulate large amounts of data.
AI-Tests Quest
Published: 2023-08-01 16:29:58

> I tried writing the outline of this article with ChatGPT. I asked it to be casual, but it went crazy into this fantasy mode. It was quite funny so I kept it mostly intact. xD.
– Victor (the writer)

Welcome, fellow engineers, to the magical land of `ai-tests`, a powerful tool conjured up by our friend Lancelot, designed to create test boilerplate code from your files. Though it may not create the perfect dragon-slaying sword every time, it does pretty well and can certainly save you from wrestling with the beast of initial test creation. If you'd like to get a feel for its magic, head on over to the repository [here](https://github.com/lowczarc/ai-tests/blob/main/README.md).

## Fetching Your PolyFact Token

Before embarking on your journey, you'll need to obtain a mystical object - the PolyFact token. PolyFact is a magical API witch, with powers and spells unbeknownst to humankind. It is the key to generating AI responses in the `ai-tests` tool. Like all quests, obtaining this key involves a few steps:

1. Navigate to the [PolyFact Dashboard](https://app.polyfact.com).
2. Connect with your GitHub account.
3. Once you've connected, copy your newly created token.

After securing your token, you'll need to embed it into your environment. We just use a simple export command for this: 

```bash
export POLYFACT_TOKEN=<your_polyfact_token>
```

Now you're all set!

## Summoning the AI-Tests

Ready to summon the magic? Simply provide your file path to the `ai-tests` command. Here's how you do it:

```bash
$ npx ai-tests <input_file>
```

And voila! Just like that, you'll have a batch of unit tests in the language corresponding to your input file. Now you're free to modify, add to, or otherwise adjust these tests as you see fit.

## A Few Words of Caution

Though it's quite a handy tool, it's important to remember that `ai-tests` isn't a silver bullet. Like any tool, it's all about using it in the right context and for the right job. The generated tests can range from nearly perfect to needing a bit of refinement, but either way, they're a solid starting point.

Be aware of one limitation: the tool is sensitive to file size. If a file is too large, it'll generate multiple tests and concatenate them. Depending on the language, this may not always produce syntactically valid test files.

## How to Lend a Hand

Oh, by the way, if you're interested in contributing or have some fantastic ideas to make this tool even better, Lancelot is always open to suggestions and improvements. Feel free to create a pull request or open an issue on the GitHub repository [here](https://github.com/lowczarc/ai-tests/blob/main/README.md). Let's make `ai-tests` the best it can be together!

And that's it! Enjoy your adventure with `ai-tests`. Remember, the goal here isn't to create perfect tests every time, but to give you a headstart on your testing journey.

Your friend,
Victor the Witch
AI Video Generator: About to Revolutionize the Entertainment Industry
Tags: ai, openai, discord
Published: 2023-08-01 14:47:02

Imagine Netflix, Youtube, and Tiktok, where we can enjoy movies and various videos without the need for movie studios or video creators. This idea may not be entirely feasible at the moment, but this technology is already emerging and being used in the entertainment industry, albeit at a slow pace.

AI news announcers or videos that utilize AI for creation on platforms like Youtube are steadily gaining popularity, as evidenced by increasing views. When we combine this AI technology with talented directors or writing teams, it might enable us to produce films at a significantly lower cost, similar to how some people create manga with Midjourney in just a few months.

What do the readers think about this concept?

Disclaimer: The entire text is purely speculative and imaginative.
Reference: https://lnkd.in/gJzmdqxK
Starting My Coding Life
Tags: beginners, learning, webdev
Published: 2023-08-01 16:16:55

As I embarked on my journey of learning coding came across the article by Damian Wolf in Coding. And the link is https://www.hongkiat.com/blog/get-started-with-programming/. This article helped me understand what to look ahead to on my coding journey as a beginner—for example, being patient. Like Damian Wolf said, "Patience can help you become a better problem-solver and also help improve your understanding of computers." This article has many more steps to help beginners understand what's in store on this journey.
71 berufliches Vorwärtskommen: Wie wird man zum Karriere-Weg-Uneigentlich-Helfer.
Tags: deutsch, career, motivation, discuss
Published: 2023-08-01 16:07:00

Moin Moin,

ich denke, dass es bei einem tatsächlichen [Uneigentlich-Helfer→](https://dev.to/amustafa16421/70-berufliches-vorwartskommen-karriere-weg-uneigentlich-helfer-3a6g), eher um eine innere Haltung geht, als um einen Fehler der Auslieferung eines Angebots.

Gefragt habe ich mich auch hier nach einem Beweggrund für ein solches Fehlverhalten. Sollte es Profitgier sein, so zeigen, denke ich, viele ehrliche Unternehmen tagtäglich, dass es nachhaltigere und bessere Verfahrensweisen gibt.

1) Was meint ihr stecken für Beweggründe hinter der uneigentlichen Hilfe derer, denen ihr selbst begegnet seid?


Lass uns mittels Kommentaren austauschen.

Beste Grüße,
Mustafa

Oder auch mittels E-Mail: mustafa.kevin.dwenger@posteo.de
Betreff: Austausch
D9 #100DaysOfOSS
Tags: 100daysofcode, 100daysofoss, programming, opensource
Published: 2023-08-01 15:52:09

D9 #100DaysOfOSS with #saucedopen

Learned about the HTTP response status code while creating a backend for TODO using Express js. I also reviewed some PR in the next js project by Vercel.

#100DaysOfCode #opensauced #opensource
How To Enable Email Verification On Laravel
Tags: laravel, validation, programming, armanrahman
Published: 2023-08-01 15:12:53

Email verification is the process of checking and authenticating emails that users have been provided in the registration form.

To enable this feature we need to implement `MustVerifyEmail `interface in our User model.

```
use Illuminate\Contracts\Auth\MustVerifyEmail;
…

class User extends Authenticatable implements MustVerifyEmail
{
…
}
```

After that, an email will be sent out when a user registers with a link to verify their email.

However, we still need to add a middleware to our routes where we want to restrict access to unverified users.

We will create a new route called ‘only-verified’ and we will add ‘auth’ and ‘verified’ middleware. The auth middleware prevents access to guests and the verified middleware checks whether the user has verified their email.

Here is an example:

```
Route::get('/only-verified', function () {
   return view('only-verified');
})->middleware(['auth', 'verified']);

```
How to exchange data between Angular components
Tags: angular, typescript, component, javascript
Published: 2023-08-01 15:09:35

This article covers all the information you need about sending data between components in Angular. Simply click on the link below to explore it!

👉 [Read Now](https://medium.com/@developer.aymenmissaoui/how-to-exchange-data-between-angular-components-285704540a46)
JS Challenge: Remove duplicates from an array
Tags: javascript, arrays, javascripttips, oneliners
Published: 2023-08-01 15:01:47

---
title: JS Challenge: Remove duplicates from an array
published: true
description: 
tags: javascript, arrays, javascripttips, oneliners
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-08-01 14:47 +0000
---

The first method below creates a new Set object with the elements of the array which eliminates all duplicates since a Set by definition cannot have duplicate elements. Then using the Spread operator creates a new Array from the elements of the Set.

The second method uses Array filter() method to filter out multiple occurrences of the same element - keeping only the first occurrence.

```js
const arr = [1, 1, 2, 3, 3, 4, 4, 5];

let uniqueArr = [...new Set(arr)];

// OR this works too

uniqueArr = arr.filter((value, index, self) => 
  self.indexOf(value) === index);
```
AKS - Azure Kubernetes Service
Tags: aks, azure, kubernetes
Published: 2023-08-01 14:56:41

##AKS

It is a managed container orchestration service provided by Microsoft Azure. AKS helps developers deploy, manage, and scale containerized applications using Kubernetes, an open-source container orchestration platform. With AKS, you can create and manage Kubernetes clusters without having to handle the underlying infrastructure. It simplifies the deployment and management of containers, providing features like automatic scaling, self-healing, and load balancing. AKS makes it easier to run your applications in a containerized environment, helping you achieve better efficiency and scalability.


##How AKS helps us? What problem it will solve for us?

AKS provides several benefits that can help you in managing your containerized applications:

**1. Simplified Kubernetes management:** AKS abstracts away the complexities of setting up and managing Kubernetes clusters. You no longer need to worry about installing, configuring, and maintaining the underlying infrastructure and Kubernetes control plane. AKS handles the cluster management, including scaling, upgrades, and security patches, allowing you to focus on your application development.

**2. Scalability and agility:** AKS enables you to easily scale your applications based on demand. With just a few clicks or API calls, you can increase or decrease the number of containers running your application. This elasticity ensures your application can handle higher loads without manual intervention.

**3. Automated Updates:** AKS automates the process of updating Kubernetes and its components. It provides you with regular updates and security patches for your cluster, ensuring your applications stay up-to-date and secure without interrupting your operations.

**4. Integration with Azure services:** AKS seamlessly integrates with other Azure services, such as Azure Container Registry, Azure Active Directory, Azure Monitor, and Azure DevOps. This integration enables you to leverage additional services for container image storage, authentication, monitoring, and CI/CD pipelines.

**5. Cost optimization:** AKS provides cost optimization features such as cluster autoscaling and virtual node integration with Azure Container Instances. With these capabilities, you can optimize resource allocation and reduce costs by automatically scaling your cluster based on workload demands.

Overall, AKS simplifies the management and operation of Kubernetes, allowing you to focus on developing your applications rather than dealing with infrastructure complexities. It provides a reliable, scalable, and secure environment for running containerized applications, thereby solving many of the challenges associated with managing a Kubernetes cluster on your own.
Posgresql Optimization technique: work_mem
Tags: postgres, apacheage
Published: 2023-08-01 14:54:40

# What is `work_men`?
This parameter determines how much memory is allocated to in-memory sort operation. If high values is set, then the query will execute very fast compared with
using disk-based sort. By default it is set to be 1 MB. It is a parameter of per-sort rather than per-client. 

In case a query containing more than one sort operations, the actual memory required will be `work_mem times the number of
sort operations`. It is difficult to predict how many sort operations are needed per client. 

One way to calculate suitable value is to see how much free RAM is around after `shared_buffers` is allocated, divide by max_connections, and then take a part of that figure and then divided by two. Sort operations include `ORDER BY, DISTINCT, GROUP BY, UNION AND merge joins`.

Assuming you have a postgresql Database and you want to perform an in-memory sort operation, you can set `work-men` to 2 MB.
```
SET work_mem = '2MB';
```
This allocates more memory for the sort operation, making the query execute faster.
Fix the Critical Error in WordPress: A Step-by-Step Guide
Published: 2023-08-01 14:49:35

Causes of the Critical Error in WordPress
The Critical Error can be caused by a variety of factors, including:

Plugin or Theme Compatibility: Incompatible plugins or themes can conflict with the WordPress core, leading to a Critical Error.
Memory Exhaustion: If your website exceeds the allocated memory limit, it can trigger this error.
Corrupted Core Files: Damage to WordPress core files due to a failed update or malware can lead to a Critical Error.
PHP Compatibility Issues: Incompatibility between PHP versions can also result in a Critical Error.

## How to fix the Critical Error in WordPress?

Step 1: Identify the Cause
The first and crucial step is to identify the root cause of the Critical Error. To do this, you can enable WordPress debugging, which will provide more detailed error messages.

1. Edit the wp-config.php File: Access your website files via FTP or cPanel File Manager and find the wp-config.php file. Add the following code just above the “That’s all, stop editing!” line:
`define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );`

Read More Step Click [here](https://techzpad.com/fix-the-critical-error-in-wordpress)
How to Catch Runtime Exceptions and Incorporate ICEM
Tags: programming, webdev, discuss
Published: 2023-08-01 14:38:58

In our [latest blog post](https://codaea.blogspot.com/2023/08/how-to-catch-runtime-exceptions-in-icem.html), we cover some introductory details on how to write code that uses [CodaEA](https://www.codaea.io) to close the loop that Software Engineering has long ignored.

It is absolutely crucial to provide a mechanism to allow your software community (users, operators, support staff, and developers) to understand the errors your software emits, easily obtain solutions, and easily research those errors.  We predict that if you don't do it, you will be outpaced by your competitors who do - and within the next few years.

Remember the big disruptions - Apple disrupting the music industry, the cell phone industry, the mobile device industry?  Remember the automotive paid features that were introduced, but became standard and nobody would buy a vehicle without them (power locks, power windows, antilock brakes, cruise control, and so on)?  ICEM is one of those disruptions - software will soon have to have it, or it will not be able to compete.

Who wants to use software A if software B does the same thing, and provides help fixing its problems?
What are your goals for the week? (Anniversary edition)
Tags: discuss, motivation
Published: 2023-08-01 14:07:00

This is the one year anniversary of the start of this series.

The series tag says 45 posts in series so either I didn't tag them all or missed a couple weeks before it became a habit. I thought it was getting close to the series anniversary, and thought maybe I'll write something.Thinking I had a few weeks to go. I scrolled to the first post and realized First post was a year ago.


1st post {% embed https://dev.to/jarvisscript/what-are-your-goals-for-the-week-anm %} 

I started this to help keep me and others motivated. I tested it on DEV, LinkedIn, and the site formerly known a twitter. DEV is where I got the most feedback and response. 

Now, I publish here on Dev, share it on Mastodon, and edit it for LinkedIn. I didn't always date the post title. At some point I realized I needed to add the date so readers could find specific posts.


It's been great seeing how everyone's weekly goals and learning what you are working on. It's helps to know I'm not the only one that doesn't hit my goals every week. It's also a great method to help me learn what the community is doing.

It's also lead to the opportunity to run a similar series on Virtual Coffee Slack. I'm looking forward to learning what the VC community is up to.


Even though I just asked yesterday, I'll ask again, 

## What are your goals for this week? 

What would be a good result by weeks end.
7GUIs in Elm
Tags: elm, css, html, webdev
Published: 2023-08-01 14:00:36

---
title: 7GUIs in Elm
published: true
description: Yet another implementation of 7GUIs in Elm
tags: elm, css, html, webdev
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s6luet7wom7krszbjx15.png
# Use a ratio of 100:42 for best results.
# published_at: 2023-08-01 13:44 +0000
---

I'm happy to finally share [my implementation of 7GUIs](https://dwayne.github.io/elm-7guis/) ([source](https://github.com/dwayne/elm-7guis)) in Elm.

{% embed https://youtu.be/O0DLZc3Yc98 %}

The last two tasks, [Circle Drawer](https://dwayne.github.io/elm-7guis/circle-drawer.html) and [Cells](https://dwayne.github.io/elm-7guis/cells.html) were the most challenging and interesting of the seven tasks. However, I was delighted :smile: to see how effective Elm was at modeling both tasks.

## Change propagation for Cells

One of the main highlights for me was figuring out a neat and performant implementation of change propagation for Cells. I modeled it as a [directed graph](https://github.com/dwayne/elm-7guis/blob/17897d548ac17b1077e79ecc5ac78b881879f8d4/src/Task/Cells/Data/DirectedGraph.elm) and to figure out the order in which to propagate the changes through the cells I used a [topological sort](https://github.com/dwayne/elm-7guis/blob/17897d548ac17b1077e79ecc5ac78b881879f8d4/src/Task/Cells/Data/DirectedGraph.elm#L93-L149). I also achieved a clean separation of the [domain model for the spreadsheet](https://github.com/dwayne/elm-7guis/blob/17897d548ac17b1077e79ecc5ac78b881879f8d4/src/Task/Cells/Data/Sheet.elm) and the [UI](https://github.com/dwayne/elm-7guis/blob/17897d548ac17b1077e79ecc5ac78b881879f8d4/src/Task/Cells/View/Sheet.elm) which allowed me to easily write [tests for the spreadsheet](https://github.com/dwayne/elm-7guis/blob/17897d548ac17b1077e79ecc5ac78b881879f8d4/tests/Test/Task/Cells/Data/Sheet.elm). Finally, testing allowed me to come up with a [well-crafted test case](https://github.com/dwayne/elm-7guis/blob/17897d548ac17b1077e79ecc5ac78b881879f8d4/tests/Test/Task/Cells/Data/Sheet.elm#L101-L150) that breaks naive implementations of change propagation.
How to populate mythtv EPG
Published: 2023-08-01 14:00:17

On how to install mythtv in ubuntu
https://www.mythtv.org/wiki/Mythbuntu_Control_Panel
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b0xpd5xxishih7qycczz.png)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aos8jdwrqtr3n4flnn7a.png)

Let's get the epg data
1. install xmltv https://www.mythtv.org/wiki/XMLTV
2. type this in cmd `tv_find_grabbers`
3. pick a free epg let's say tv_grab_eu_xmltvse
tv_grab_eu_xmltvse --configure --config-file $HOME/.mythtv/EUEPG.xmltv

then a list of channel wil come 1 by 1
type yes to the channel you want the data for
and keep pressing enter for the unwanted channel

lets get 4 days of data
 tv_grab_eu_xmltvse --config-file $HOME/.mythtv/EUEPG.xmltv --days 4 --quiet

Now 
Open the MythTV-Setup. $mythtv-setup 
Go to Video Sources (option 4).
click on create new video source
give it 5 second new entry will show up open it
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/st0s95mgr6j2m8tte4zf.png)
Enter the videosource name
Go to the "Listings grabber" and hit enter. Scroll through the list until you see
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/41p5kp0l755mn62wi3hk.png)

save and exit
and run the mythfilldatabase
it will fill up the database,

Assuming you have installed mythweb
go to this link and your data will show up
http://localhost/mythweb/tv/list

Sadly the epg won't show up in mythtv-frontend
 if there's no input refer to this https://forum.mythtv.org/viewtopic.php?t=599

but i only wanted the epg data so i don't care about the mythfronend
Personal Research Assistant to MASTER EVERYTHING
Tags: beginners, tutorial, productivity, career
Published: 2023-08-01 13:30:00

Welcome to [ResearchAIde](https://www.aiforme.wiki/ai/tools/ResearchAIde), your ultimate personal AI Research Assistant. Whether you are a student, researcher, or business professional, ResearchAIde is here to empower you in your quest to master everything. 

With its cutting-edge capabilities, [ResearchAIde](https://www.aiforme.wiki/ai/tools/ResearchAIde) simplifies the process of extracting and synthesizing relevant information from research papers, saving you valuable time and enhancing your knowledge acquisition. Let's explore the seven powerful ways to revolutionize the way you conduct research and stay ahead in your professional endeavors.

**Instant Information Retrieval:**
[ResearchAIde](https://www.aiforme.wiki/ai/tools/ResearchAIde) empowers you to swiftly access specific information from research papers. Save time by skipping lengthy reads and pinpointing relevant data effortlessly.

**Efficient Research Organization:**
Chat with multiple files seamlessly using ResearchAIde's intuitive interface. Organize your research papers in one centralized location, simplifying navigation and improving productivity.

**Speedy Data Extraction:**
Unleash the power of ResearchAIde's data extraction capabilities. Extract valuable insights and key findings from research papers in a matter of seconds, accelerating your research process.

**Empower Your Business Insights:**
For business professionals, ResearchAIde acts as a reliable assistant in gathering market research and industry trends. Stay updated with valuable data to make informed decisions.

**Bridge the Gap for Researchers:**
Researchers can maximize efficiency with ResearchAIde. Locate relevant studies, extract crucial data, and synthesize findings for comprehensive literature reviews.

**Unlock New Learning Possibilities:**
Expand your knowledge horizons effortlessly. ResearchAIde enables you to delve into various subjects, acquiring insights from diverse research papers across different domains.

**Conclusion:**
[ResearchAIde](https://www.aiforme.wiki/ai/tools/ResearchAIde) is the ultimate personal AI research assistant, designed to make you the master of everything. Its time-saving features, efficient organization, and powerful data extraction capabilities elevate your research, academic, and professional pursuits. 
Embrace ResearchAIde to unlock a world of knowledge and harness the potential of comprehensive information extraction at your fingertips.