teleren/devto huggingface dataset:
Appreciating the "Learning Problem" - Why AI will never replace your job
Published: 2023-12-28 15:00:31

so... let's play a game !!!

i'll show you a series of patterns, and each pattern maps to a value of either 0 or 1

![a game of puzzles](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cr89knc7gt2ybm0dn2vq.png)

now consider this pattern, which number would this pattern map to?

![a question from the puzzles](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q0tu4zubdu1dxnehikxq.png)

if you said 0 you're probabily right

if you said 1 you're also probabily right

¯\\\_(ツ)\_/¯

the point here is that whatever your guess was...

1. you had no idea what each of the tiles represented
2. you had no idea what the co-relation between the tiles was
3. you had no idea what 0 or 1 represents

just like AI and this guy here

![meme](https://i.imgflip.com/2ji8hx.jpg?a473208)

> he has 0 understanding of what the puzzle means and what his guess means, but he made the correct guess

## The Learning Problem

the game we just played right now, is presicely what every **ML/DL/RL/AI** algorithm does

1. take data that has been cleaned/processed (into a puzzle)
2. find a pattern in the data
3. use the pattern on new data (it has never seen before)
4. hope it gets appriciated

but keep in mind that not every problem can be solved this way

because...

1. not every problem has (enough) data on it
2. not every data has a pattern in it

some of them also/already have a (not so) simple mathematical answer to them, you don't need rely to finding patterns

but for the rest, they can probabily (maybe not efficiently) be solved by having **a computer find a pattern** AKA **learning from data**

## How does a Computer Learn from Data

short answer, you solve the learning problem 😝

long answer to solve any **learning problem** (ML, DL, RL)👇

![the learning process](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4plogikgepldv3meton8.png)

1. **unknown solution:** think of this the true pattern/source of all the data we have
2. **training data:** data that we have collected and processed so a computer can find a pattern
3. **learning algorithm:** the actual algorithm that refines a model so the model learns from the data
   > eg: Perceptron Learning Algorithm, Backpropagation Algorithm, etc
4. **hypothesis set:** a set of all possible models that can find a solution
   > eg: Perceptron, Neural Networks, etc
5. **final hypothesis solution:** a pattern with the heighest accuracy

while this **IS** the long answer to solve any **learning problem**

this long answer lacks details...
the details which would be dealt with in the forthcoming blog articles

originally posted on [my personal blog](https://ziro2mach.com/blog/appriciating-ml/)

thank you for reading
do let me know what you think in the comment section
✌️
Teaching My Kids Linux 
Tags: linux, kids
Published: 2017-05-04 23:47:03

---
title: Teaching My Kids Linux 
published: true
description: A few mini-projects that you can do with your kids
tags: Linux, Kids
---

My kids (9 and 12 years old) liked the idea of learning programming, but they really weren't making much progress and would lose interest pretty quickly.  

As a result, I turned my attention to something more tangible for them. After brainstorming a bit, and figuring sysadmin skills are good to know as well, I decided to teach them some Linux skills.

The first project that we started with was installing Linux (we picked Ubuntu even though I could've gone hardcore with Gentoo). We actually did this twice: first, into a VM; second, on an actual PC.

When installing it on a PC, I asked them questions like, "How do you think you can put a new OS onto the computer?"  Which led to learning about updating the BIOS boot order, how to install a bootable linux onto a USB stick (netbootin), and hard drives vs. memory.  We also learned about hostnames and creating user accounts.

After installing the OS, we started exploring Linux.  They immediately wanted to use the GUI, but I guided them to open Terminal. We used:

* `ls` and `ls -la`
* `touch`
* `cp`

Finally, we loaded a text editor.  Yes, we tried out `vi` (sorry my `emacs` friends).

* `:w`
* `:q` and `:q!`
* `j` `k` `h` `l` for navigation

There ain't no keeping my kids away from Minecraft, and so the next stop on our Linux adventure was to install a Minecraft Server.  Lots of fun tools here to learn about:

* `wget`
* `useradd`
* `usermod`
* `passwd`
* `chmod`
* `chown`
* `apt-get`
* `sudo`
* `telnet`
* `ssh`

Of course, we didn't cover all of this is one day, but have split up these exercises over many weekends.  

I plan to add more posts documenting our adventures with Linux.  Would love to hear from other parents who might be trying to help their kids with Linux literacy.

_Hat tip to [@vallard](https://twitter.com/vallard) for the inspriation._

_(Originally posted at [aroach.github.io](https://aroach.github.io))_
Free Icons for your reactjs and web applications
Published: 2023-12-28 14:39:39

In this post, I'll share some of the best free icon libraries that can be incredibly useful for your JavaScript projects. Whether you're working on a web app, mobile app, or desktop application, these icon libraries offer a wide range of options to enhance your UI/UX design.

## 1. [Font Awesome](https://fontawesome.com)
A popular choice with a vast collection of icons suitable for various applications.

## 2. [Bootstrap Icons](https://icons.getbootstrap.com)
Over 1,000 SVG-based icons designed for Bootstrap components.

## 3.  [React Icons] (https://react-icons.github.io/react-icons)
Super huge icons libraries. In my view, it takes up too much space but still useful.

## 4. [Radix-UI] (https://www.radix-ui.com/icons)
A crisp set of 15×15 icons

## 5. [Ionicons](https://ionicons.com)
High-quality icons for web, iOS, Android, and desktop apps, supporting SVG and web fonts.

## 6. [css.gg](https://css.gg)
Open-source CSS, SVG and Figma UI Icons Available in SVG Sprite, styled-components, NPM & API. More than 700 UI icons entirely written in CSS, fast rendering and easy to scale.

## 7. [Heroicons] (https://heroicons.com/)
Beautiful hand-crafted SVG icons, by the makers of Tailwind CSS.
How to secure a WordPress website in under 1 minute using a simple trick?
Tags: webdev, wordpress, security, programming
Published: 2023-12-28 14:24:10

[WordPress](https://wordpress.org/) is the most popular CMS(Content Management System) among bloggers. The same fact has made WordPress more vulnerable to attacks by hackers. Especially for authentication vulnerabilities such as brute-force attacks.

We can mitigate the risks of these types of attacks on WordPress websites by simply installing and configuring a plugin.


![wp-admin-login-demo-image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fl4gqv76i5buaiv2crrd.jpeg)

As I mentioned before WordPress is the most popular CMS, and anyone knows the default admin login URL of a WordPress site which is equivalent to "{WORDPRESS_SITE_DOMAIN}/wp-admin". So the "wp-admin" suffix is the route that navigates the user to the admin login page. 

So our simple trick is to change that route to a custom one and not allow the hackers to guess it and perform a brute-force attack.

![Change WP Admin Login Plugin](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jx4xbywemswqi29k0a4w.png)

For this, we need to install a plugin called [Change WP Admin Login](https://wordpress.org/plugins/change-wp-admin-login/). 

Once installed the plugin from plugins section in WordPress, it should appear as below.

![Change WP Admin Login Installed](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f7pggtnhhchlz9xyrh5l.png)

You're almost done, and it's just left 1 last step to complete.

Now we just need to provide our desired custom route to replace the default "wp-admin" one. So navigate to Settings-->Permalinks and bottom of the page it will appear "Change wp-admin login" section.

So just provide the custom name under "Login URL" input field. Additionally can add a value to "Redirect URL" input field as well. As an example if you have a default "404 not found" page with the website, you can add it. Or else simply keeping it empty will redirect the user to site's home page when someone tries to access "wp-admin" route.


![Reflected wp admin login changes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ysbka31mkajl92angx9m.png)
[I have used https://shoppersprestige.com/ WordPress site for demonstrating the custom URL]

That's it!! Now save changes, and just after that you can log out and see. You'll be on "{WORDPRESS_SITE_DOMAIN}/{CUSTOM_ADMIN_ROUTE}"
Boto3 - Calling powershell scripts in EC2 Instance
Tags: boto3, ec2, powershell, python
Published: 2023-12-28 14:23:46

**Calling remove powershell scripts in EC2 Instance by Boto3**

Permission : Make sure you have access for running AWS Lambda 

1. AmazonSSMFullAccess
2. AmazonEc2FullAccess
3. AWSLambdaExecute

```
import time
import json
import boto3

def lambda_handler(event, context):

    # boto3 client instance
    client = boto3.client("ec2")
    ssm = boto3.client("ssm")

    # getting ec2 instance information
    describeInstance = client.describe_instances()

    InstanceId = "i-0xxxxxxxxxxxx"

    # command to be executed on ec2 instance
    response = ssm.send_command(InstanceIds=[InstanceId],DocumentName="AWS-RunPowerShellScript", Parameters={"commands": ['& "C:\scripts\ec2_invoke_scripts.ps1"']})

    # fetching command id for the output
    command_id = response["Command"]["CommandId"]

    time.sleep(3)
    # fetching command output
    output = ssm.get_command_invocation(CommandId=command_id, InstanceId=InstanceId)
    print(output)

    return {"statusCode": 200, "body": json.dumps("Scripts executed Successfully")}-
```

Conclusion : Discussed about calling remote powershell scripts in Ec2 Instances using Boto3

Any suggestions/improvements for my blogs and if you like my blogs please share with your connections. Follow me in dev.to and linked in https://www.linkedin.com/in/srinivasuluparanduru/
2024’s Tech Trend: Frontend for Backend
Tags: webdev, javascript, react, node
Published: 2023-12-28 14:18:39

Hey there!

We all heard about the Backend for Frontend, our BFF. It's basically a backend designed specifically for a certain frontend application.

Now let's talk about a radically different concept: a little something it's being called Frontend for Backend or simply FFB. 

> _Frontend for Backend (FFB) is a development approach that integrates admin panels into web applications, enabling frontend developers to manage and configure backend functionalities more efficiently. This method adds a layer of frontend interfaces - essentially admin panels - that directly interact with the backend. These panels provide a user-friendly way for developers to control and modify backend processes, such as database management, user authentication, and system configurations, without delving into complex backend code. FFB is designed to simplify the overall development process, making it more accessible for those who primarily work on the frontend. By offering a visual and intuitive means to handle backend tasks, FFB streamlines the workflow, making it easier to implement changes and updates. It can expedite the development cycle by allowing quick and straightforward adjustments through the frontend._

The FFB concept can make it easier to manage your Node.js website and it's in the core of WebCrumbs. We believe everyone deserves an admin panel that's easy to use for everyone involved (and preferably free and open source). 

Frontend for Backend means segregating options from code, making it highly configurable without pain (or pipelines).

- No more waiting for definitions. 
- No more sprints to implement small changes that anyone could do.

It's about making changes to websites ~~less headache-inducing~~ more enjoyable.

After all, we're smarter than before. 

It shouldn't feel like this:

[![2000s](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gr6jm1oh9yy4cn6tl81z.png)](https://comicss.art/?id=104)

Right?

Let's aim for a better 2024!

If you're into making things easier for Node.js devs, [give us a star on GitHub](https://github.com/webcrumbs-community/webcrumbs). We're all about helping devs quickly turn ideas into live websites with an admin panel that let's you configure your code or install plugins and themes. 

Your support means the world to us!

{% cta https://github.com/webcrumbs-community/webcrumbs %}⭐️ Give WebCrumbs a Star! ⭐️ {% endcta %}
Navigating Passport Processes Made Easy with Passport Agents in Noida
Tags: passportagentsinnoida, passportservices, passportagents, passportconsultant
Published: 2023-12-28 14:17:49

In the bustling city of Noida, where time is a precious commodity, obtaining a passport can sometimes feel like a daunting task. However, with the assistance of dedicated passport agents in Noida, the journey through the bureaucratic maze becomes remarkably streamlined and stress-free.

Noida, short for New Okhla Industrial Development Authority, is a city known for its rapid urbanization and diverse population. As a result, the demand for passports has surged, and the need for reliable passport agents has never been more apparent. These professionals play a pivotal role in guiding applicants through the intricate procedures associated with obtaining a passport.

One of the primary advantages of engaging a passport agent in Noida is the wealth of local knowledge they bring to the table. These agents are well-versed in the specific requirements and procedures of the Noida passport office, ensuring that applicants submit accurate and complete documentation. This local expertise proves invaluable, as it helps avoid common pitfalls that might otherwise lead to delays in the passport issuance process.

Navigating the bureaucracy involved in passport applications can be time-consuming and confusing for the uninitiated. Passport agents in Noida act as liaisons between applicants and the passport office, streamlining the entire process. From form submission to document verification and police verification, these agents guide applicants every step of the way, making the entire experience efficient and hassle-free.

Furthermore, passport agents are adept at handling unforeseen challenges that may arise during the application process. Whether it's resolving discrepancies in documentation or addressing concerns raised by the passport office, these professionals are well-equipped to handle such situations, saving applicants from unnecessary stress and potential setbacks.

The convenience offered by passport agents extends beyond the application process. Many of these agents provide additional services such as assistance with appointment scheduling, tracking application status, and even doorstep document collection. This level of support is particularly beneficial for individuals with busy schedules or those unfamiliar with the intricacies of the passport application system.

In conclusion, the role of a [passport agent in Noida](https://shriharienterprisespassport.business.site/?utm_source=pocket_saves) is indispensable for anyone looking to obtain a passport efficiently. With their local knowledge, expertise in navigating bureaucratic procedures, and commitment to providing a seamless experience, these professionals are a boon for Noida residents seeking to embark on international journeys. By entrusting the passport application process to these agents, individuals can save time, reduce stress, and ensure a smooth journey toward acquiring this essential travel document.
API call failing when call from React Native, otherwise work fine in any other browser, server in our domain
Tags: api, vpn, iis
Published: 2023-12-28 14:11:08

1. an API is deployed in IIS, in server dev1
2. then API, in IIS is set to run with a Service Account MPLTS\_svc_ad
3. API get data from SQL server located in Server weh1
4. Service account MPLTS\_svc_ad is assigned a db_owner role in SQL server DB in weh1
5. I am using VPN and remote desktop to log into dev 1 and weh1, all in the same network, domain= MPLTS
6. My local machine name is GTMTW93
6. API run to success when call from any browser, in both remote servers, including my local
7. API is failing when call from with my React Native mobile application
8. the error returned is: Login failed for user 'MPLTS\GTMTW93$'. Reason: Could not find a login matching the name provided. [CLIENT: <local machine>]

Any idea how to resolve this failure
Tips to improve your productivity with kubectl
Published: 2023-12-28 14:09:17



This article explains tips to increase your efficiency with kubectl.

What is Kubectl?


kubectl is a command-line utility that helps to interact with Kubernetes API. kubectl helps to create, update, delete, and get API objects for the declarative configuration schema for the system. For a complete list of kubectl operations, see [Overview of Kubectl](https://kubernetes.io/docs/reference/kubectl/overview/). For installation instructions see [installing kubectl](https://kubernetes.io/docs/tasks/kubectl/install/).
Let's get started.

**Tip #1 - Using the Tab key for Autocomplete**

While everyone uses Tab key on their terminals to autocomplete commands, kubectl also provides the feature of using Tab key for autocompletion.
To setup autocomplete on Bash, first, you need to ensure you have installed `bash-completion` using the following command:

Install bash-completion
`brew install bash-completion`
Sets autocompletion in Bash
`source <(kubectl completion bash) `

To setup autocomplete on ZSH use the following command:
`source <(kubectl completion zsh)`

Autocompletion works for verbs, resources as well as for flags.

**Tip #2 You can use VS Code as your default editor**
Many times we need to edit resources right from the cluster. While you can do so using your default editor (vim/nano) but you can also set VS Code as your default editor to edit resources. Simply set the environment variable KUBE_EDITOR to VS Code using the following command:
`$ export KUBE_EDITOR = code - wait`

While you can also use a flag - edit with kubectl create command to edit the resources before applying. eg. `$ kubectl create -f life.yml - edit`

**Tip #3 You can access documentation inside your terminal**

If you are feeling lazy and want to refer the documentation for any resources, you can do so by simply explaining it.
`$kubectl explain pods`

This command shows you all the information of definitions, fields on your terminal. It just makes an API request to Kubernetes cluster, grabs the current documentation of the API version running in the cluster, and outputs it on the terminal.

**Extra Tip - ** Always refer kubectl cheatsheet for some great explanation of kubctl commands.


Suggestions and Feedback are always welcomed!
Creating an autogrowing textarea with React and Typescript
Tags: react, typescript, ui, javascript
Published: 2023-12-28 13:57:58

In my 6 years career I almost never had to make an autogrowing textarea field like the ones we have in Jira or Linear (i.e. description fields) 👇

<video width="100%" controls>
  <source src="https://railyard.works/blog_posts/autogrowing-textarea.mp4" type="video/mp4">
</video>

But recently, I had to make one. While there are already some posts about this, e.g. [THIS](https://medium.com/@oherterich/creating-a-textarea-with-dynamic-height-using-react-and-typescript-5ed2d78d9848) post by Owen, I thought I'd post my solution, which covers a slightly different scenario.

So basically, I create a hook

```js
export const useInputHeight = (name: string, value: string | undefined) => {
  const setInputHeight = useCallback(() => {
    const textarea: HTMLTextAreaElement | null = document.querySelector(name);
    if (!textarea) return;
    textarea.style.height = textarea.scrollHeight + "px";
  }, [name]);

  useEffect(() => {
    setInputHeight();
  }, [value, setInputHeight]);

  return setInputHeight;
};
```

It returns a `setInputHeight` function that we call in our `onChange` function.

```js
const setNameInputHeight = useInputHeight('textarea[name="email"]', emailValue);
// ...
const handleInputChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
  setInputHeight();
  // ... other functionality
};
```

Do you need a `value` argument? No, you don't, but in my case, the value was being updated on the client, so I had to adjust the field height every time it updated without me triggering the `onChange` event.

If that's not the case, simplify it to be

```js
export const useInputHeight = (name: string) => {
  const setInputHeight = () => {
    const textarea: HTMLTextAreaElement | null = document.querySelector(name);
    if (!textarea) return;
    textarea.style.height = textarea.scrollHeight + "px";
  };

  return setInputHeight;
};
```

That's all you'd need.

You may have also noticed that I'm not using `useRef()` and simply doing `document.querySelector`.

Would `ref` work? Yes, yes it should. The only reason I was using `querySelector` was because I was using a UI library and textarea there wasn't allowing a `ref` prop. So I didn't want to do all those workarounds, `querySelector` seemed like a great option.

Do feel free to use a `ref` if you'd like, after all, it IS a more 'React way' of doing things 😁👍
help me what is the problem here
Tags: react
Published: 2023-12-28 13:43:54


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0iaft0ygg62fiynklzjf.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jytgxugwjapkt3hn4lby.png)
🚀 Dive into BFS: Dry Run Examples for Breadth First Search (BFS) for Binary Tree! 🎥
Tags: programming, algorithms, learning, tutorial
Published: 2023-12-28 13:39:37


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

Hello, fellow learners! In my latest video, I guide you through detailed dry run examples, unraveling the mysteries of the Breadth First Search (BFS) algorithm in the context of binary trees. Join me as we break down the steps, visualize the process, and master the application of BFS on binary tree structures.

🎥 Watch the video here: https://youtu.be/1oImnoiPNws?si=6ZMgcS3hIITojPxo
🔗 Access the code on GitHub: https://github.com/Vinay352/Leetcode_Complete_Solution/blob/main/CreateBinaryTree_DFS_BFS.java

Your feedback and questions are highly valued, so please share your thoughts in the comments. Let's deepen our understanding of BFS together! 💡🌳

Stay connected:
🎥 YouTube: https://www.youtube.com/@VinayJainDev3097
📚 Medium: https://medium.com/@vinay.j3097
📝 Dev.to: https://dev.to/vinay_jain_dev
🔗 GitHub: https://github.com/Vinay352
🐦 Twitter: https://twitter.com/vinayj3097
📸 Instagram: https://www.instagram.com/vinay_jain_dev/
📘 Facebook: https://www.facebook.com/vinayj3097/
Angular developer for Arwiki.wiki project
Tags: webdev, devops, ai, opensource
Published: 2023-12-28 13:27:18

I'm looking for a developer to collaborate on a project that is "simple" and involves only putting together a few other projects that are already written.  It shouldn't take long, it's something the world really needs; and it should be significantly financially rewarding, as well as in other ways; just via a token offering.  

Text me if you can help; 954-667-8083.

It's a few very simple things; I need to find someone that's interested in "building something" to actually make the world better.

-a