teleren/devto huggingface dataset:
10 Powerful Ways to Promote Your Website for Free in 2022
Tags: web, webdev, appdevelopment, ecommercedevelopment
Published: 2022-04-28 05:25:44

If a website is created on the web and isn't linked anywhere, does anyone actually see it? 

 If you're thinking about how to promote your [website](https://woxro.com/web-application-development-company-in-thrissur) and you're still in the early stages of your business, you're probably the only effective way to increase traffic by spending a fortune on advertising. You will be worried that there is. 

 Fortunately, there are many marketing courses  that can teach you how to promote your website organically in different ways. In this post, I'll consider a few things you can start  today to promote your website.

Here are the best website promotion ideas you should try for the high traffic to your website.

Search engine optimization
Blogging and guest blogging
Take advantage of email marketing
Explore social media
Submit your site to online directories
Focus on quality
Pay per click (PPC)
Retargeting
Facebook ads
forums/Facebook fan pages, etc
A tool to seed your dev database with real data
Tags: opensource, postgres, mysql, mongodb
Published: 2022-04-28 05:20:48

A bunch of developers and myself have created [RepliByte](https://github.com/qovery/replibyte) - an open-source tool to seed a development database from a production database.

## Features ⚡

- Support data backup and restore for PostgreSQL, MySQL and MongoDB
- Replace sensitive data with fake data
- Works on large database (> 10GB) (read Design)
- Database Subsetting: Scale down a production database to a more reasonable size
- Start a local database with the prod data in a single command
- On-the-fly data (de)compression (Zlib)
- On-the-fly data de/encryption (AES-256)
- Fully stateless (no server, no daemon) and lightweight binary
- Use custom transformers

## My motivation

As a developer, creating a fake dataset for running tests is tedious. Plus, it does not reflect the real-world data and painful to keep updated. If you prefer to run your app tests with production data. Then RepliByte is for you as well.

Available for MacOSX, Linux and Windows.

https://github.com/qovery/replibyte give a ⭐ if you like it.
Free Lo-Fi Radio Channel
Tags: music, coding
Published: 2022-04-28 04:58:43

Instead of YouTube, get your (mostly) lo-fi coding music fix by playing the streaming [FreeCodeCamp](www.freecodecamp.org) radio channel. 

To listen, go to www.freecodecamp.org, then from the Menu dropdown select Radio.

> Menu >> Radio

Also, enjoy the free high-quality and pretty up-to-date learning material.
40% of devs use python for interviews
Tags: python, interview, career, programming
Published: 2022-04-28 04:45:43

Our community has grown pretty rapidly over the last few weeks and we now have around 2k+ members! 

There are some awesome insights that can be gathered and assumptions that can be confirmed from having a 2k person sample size. 

For instance, I've always assumed python is the most popular programming language for interviews, but this data confirms it. 

![Bullet point breakdown](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7052hi7kmfp8xeiwmbzp.png)
 
A few languages dominate interviews, with the biggest surprise being that more people interview in C++ over Javascript.
The server specializes in Big Tech interview prep, so that should be taken into account as well!

![Pie Chart Breakdown](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e12m2zwbew8l9lnb3dbf.png)
You'll notice the long tail is very long. 

## My Advice

Make it easier for yourself, if you are targeting big tech, interview in python unless you have 6+ years of experience with a specific language.


Interested in more data around programming interviews? Follow me on [twitter](https://twitter.com/DannyHabibs) where I frequently post insights from our [community](https://discord.gg/Hxq8kTJykJ)!
Can a twitter bot get 1,000 followers in 100 days? A challenge to myself and this community
Tags: discuss, watercooler
Published: 2022-04-28 04:35:20

Yesterday, I made a twitter bot that takes screenshots of tweets if you mention it `@poet_this`. Surprisingly, it started gaining followers - well, just 10 followers, but still! 

So here's the challenge: 
Can a twitter bot get 1000 followers in 100 days? It's just 10 followers a day, and I believe it's possible. 

Let's see if:
- People are interested in following a twitter account that shows nothing but tweets other found interesting, funny or just screenshot-able
- How strong this community is 

Here's the twitter account:
https://twitter.com/poet_this

Today is day 2, and day 1 was pretty strong with 13 followers. 

Share this, tweet with #PoetThisBot, do whatever you can to help!
{Insert Hacktoberfest 2021-Related Title Here}
Tags: hacktoberfest
Published: 2022-04-28 03:46:44

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->


### [Intro Heading]
<!-- If you are new to the DEV community, introduce yourself and share a bit about why you joined DEV and decided to participate in Hacktoberfest this year.  --> 

### Background

<!-- Are you brand new to open source? What about coding in general? Tell us about how you got here →

### Progress

<!-- Share a bit about where you’re at in your Hacktoberfest journey. What stage are you at? How has the process been?  -->

### Contributions

<!-- This is where you can list the contributions you made and explain why you chose the projects you did. Don’t forget to add links!  -->


### Reflections
<!-- Overall, how has your Hacktoberfest 2021 experience been? If you’re a first-timer, will you participate again? What have you learned? Have you made any interesting connections? What is your next step in open source?  -->
Cartoon Filter Using OpenCV and Python
Tags: python, tutorial, beginners, devjournal
Published: 2022-04-28 03:46:04

## Introduction

Hello! In this tutorial I will show how to apply a simply cartoon filter on any image 😃

---

## Preparing the environment

First we need to initiate the python virtual environment which can be done via:

```bash
python3 -m venv env
source env/bin/activate
```

---

## Installing the dependencies

Create a requirements.txt file and add the following:

```bash
# requirements.txt
opencv-python
```

Then install via:

```bash
pip install -r requirements.txt
```

---

## Writing the source code

Importing the neccessary modules

```python
import argparse
import cv2
```

Writing the function to apply the cartoon effect

```python
def cartoonize (image):
  gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
  blurImage = cv2.medianBlur(image, 1)

  edges = cv2.adaptiveThreshold(gray, 255, cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY, 9, 9)

  color = cv2.bilateralFilter(image, 9, 200, 200)

  cartoon = cv2.bitwise_and(color, color, mask = edges)

  return cartoon
```

This function basically takes an image and applies a cartoonish style filter to the image which is then returned.
Median blue is most effective when it comes to reducing the noise from the image.
Adaptive Thresholding is used to overcome false predictions and illumination problems with the image.
Bilateral filter is a edge preserving and smoothing filter for images.
Finally we apply the filter onto the image via bitwise_and.

Finally we need to write the main function

```python
if __name__ == "__main__":
  ap = argparse.ArgumentParser()
  ap.add_argument("-i", "--image", required = True, help = "Path to input file")
  args = vars(ap.parse_args())

  image = cv2.imread(args["image"])

  cartoonImage = cartoonize(image)

  cv2.imwrite("output.jpg", cartoonImage)
  cv2.imshow("output", cartoonImage)

  cv2.waitKey(0)
  cv2.destroyAllWindows()
```

What we do here is basically parse the image argument from the command line, apply the cartoon filter and then write the output to file and then show the output to the user. 
After that we listen for any key and then cleanup the window.

---

## Running the program

The program can be run via:

```bash
python main.py -i original.jpg
```

If all goes well you should see the following output:

![Sample](https://i.ibb.co/mcCmNjm/output.jpg)

The sample image was taken from my home town in the UK. 😎

---

## Conclusion

Here I have demonstrated how to apply a simple cartoon like filter to an image, feel free to experiment with your own images are even expand it to include more filters. 😀

Happy Coding!

---

Like me work? I post about a variety of topics, if you would like to see more please like and follow me.
Also I love coffee. 

[![“Buy Me A Coffee”](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/ethand9999)
Learn to Code - BIG O NOTATION
Tags: javascript, codenewbie, programming, beginners
Published: 2022-04-28 03:33:05

The complexity of code in algebraic terms is Big O Notation. In other words Big O Notation determines how efficient your algorithm is! 
How is the efficiency of algorithm measured? 
In order to measure the efficiency we take into consideration 2 factors. 

1. Time Complexity - The time taken to run the code completely

2. Space Complexity - The extra space that is required in the process

It is denoted as - 

```
f(n)=O(inputSize)
```
Big-O notation show how much time or space an algorithm would require in the worst case scenario as the input size grows.
SCSS mixins for reusable media query and style scoping
Published: 2022-04-28 03:13:38

Let’s start with a simple SCSS. In this I will be using BEM modal css naming. Reference ([http://getbem.com/naming/](http://getbem.com/naming/))
```scss
.as-facts {
  &-header {
    align-items: center;
    display: flex;
    flex-direction: column;

    &-image {
      display: flex;
      height: 200px;
      width: 200px;
    }
  }
}
```
This SCSS would be converted to below CSS
```CSS
.as-facts-header {
  align-items: center;
  display: flex;
  flex-direction: column;
}
.as-facts-header-image {
  display: flex;
  height: 200px;
  width: 200px;
}
```
Now there comes a use case where you need to hide image for mobile and landscapePhone screens. Let’s use untilMediatype mixin
```scss
.as-facts {
  &-header {
    align-items: center;
    display: flex;
    flex-direction: column;

    &-image {
      display: flex;
      height: 200px;
      width: 200px;

      @include untilMediaType("landscapePhone") {
        display: none;
      }
    }
  }
}
```
This would be converted into
```css
.as-facts-header {
  align-items: center;
  display: flex;
  flex-direction: column;
}
.as-facts-header-image {
  display: flex;
  height: 200px;
  width: 200px;
}
@media only screen and (max-width: 576px) {
  .as-facts-header-image {
    display: none;
  }
}
```
Now .as-facts-header-image will be added to all the element that has the class “as-facts-header-image“. Lets say there is a use case where you need as-facts-header-image to be applied only to elements inside .as-facts. Let’s scope it, using scope mixin.
```scss
.as-facts {
  @include scope() {
    &-header {
      align-items: center;
      display: flex;
      flex-direction: column;

      &-image {
        display: flex;
        height: 200px;
        width: 200px;

        @include untilMediaType("landscapePhone") {
          display: none;
        }
      }
    }
  }
}
```
This would be rendered into
```css
.as-facts .as-facts-header {
  align-items: center;
  display: flex;
  flex-direction: column;
}
.as-facts .as-facts-header-image {
  display: flex;
  height: 200px;
  width: 200px;
}
@media only screen and (max-width: 576px) {
  .as-facts .as-facts-header-image {
    display: none;
  }
}
```
Now we don’t need to worry about styles getting applied to all components with this mixin @scope it will be scoped to .as-facts.

Now let’s see the reusable mixins.
```scss
@use 'sass:map';

$breakpoints: (
  "phone": 320px,
  "landscapePhone": 576px,
  "tablet": 768px,
  "desktop": 992px,
  "largeDesktop": 1200px,
  "xlDesktop": 1400px,
);

@mixin untilMediaType($type) {
  @media only screen and (max-width: map.get($breakpoints, $type)) {
    @content;
  }
}

@mixin scope() {
  & & {
    @content;
  }
}
```
CRUD
Tags: webdev, beginners, programming
Published: 2022-04-28 03:12:55


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


**POST** submits data to the specified resource, often causing a change on the server.

**GET** retrieves a resource from the server.

**PUT** replaces a specified resource.

**DELETE** deletes a specified resource.
Easy way to delete your image from docker hub
Tags: docker
Published: 2022-04-28 01:34:05

Free and easy, you can push your local docker image to the docker hub.

But sometimes, we make mistakes by pushing an unnecessary image to the public or realizing that the image should not be there anymore.

Let's remove it from the docker hub!

## 1. Go to your repository on docker hub

Sign in, then browse to your repository.

This is where you will see the **Manage repository** button. Click it.

![Your docker image repository web page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hgins4ecywyz1pxjk0u3.png)

## 2. Go to Setting

You are in the dashboard, but we should look for the Setting tab and click it.

![Your docker image's repository dashboard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hdg7odritsmpi051wmce.png)
  

## 3. Click that delete button 

So far, so good. You will see the Delete Repository section at the bottom of this section. There is a nice delete button here. Click it and say goodbye to your image.

![Setting section in docker image's repository](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qiz1ou90fsx34mkv389b.png)
Spring Data Elasticsearch
Published: 2022-04-28 02:54:53

- 面向POJO模型的交互
- Repository style DAL (数据访问层)
- 支持@Configuration配置的类，或是为ES客户端实例提供XML类型命名空间
- ElasticsearchTemplate helper class为ES操作提效，例如：documents和POJO之间的mapping
- 基于annotation的mapping元数据，且扩展其它元数据格式
- 自动实现了Repository接口，并且支持自定义的finder方法
- 目前版本已经到了4.3.4
Old Developer New Tricks
Published: 2022-04-28 02:45:53

#Main Section

Is this going to be a good place for me to start blogging about my career?  Is this going to be able to support my code/images etc?  Looks like it.

* Supports Markdown
  * so that is familiar

`var supportsCode = true;`
```
public bool SupportsCodeBlock {get {return true;}}
```

Lets see how that looks.
Build a Better Personal Portfolio
Tags: news, codenewbie, career, free
Published: 2022-04-28 02:17:27

Am I showing a comprehensive portfolio to my potential employers? Am I showcasing my coding knowledge in my portfolio? 

These questions will be answered in our FREE webinar entitled - Build a Better Personal Portfolio 

Register here to join: https://bit.ly/MorganLopesMay5Register

This webinar will be conducted May 05, 2022, Thursday at 8:30PM (SGT) via Zoom

Join us and get a chance to win a Code School Book by our guest speaker, Morgan J. Lopes!
Welcome, DataEngHack online!
Tags: dataengineering, dataarchitecture, dataops, hackathon
Published: 2022-04-28 01:57:00

Hey folks,

Peter Hanssens here... welcome to the online DataEngHack blogging competition that we are running in the month of May!

This blogging competition is designed to get you hands on with some cutting edge data engineering technology and public exposure for your awesome work in the process. You will be featured on the [DataEngAu](https://dataengconf.com.au/) website and you have the chance to win an awesome set of prizes. You can submit your blog right away and in order to win a prize, your blog must be submitted by the 31st of May.

## Prizes

So first up, anyone who submits a blog (with a few caveats around it being an appropriate data engineering blog) will be sent a free DataEngHack t-shirt.


![DataEngHack T-Shirt](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y98ifi9pd00ut5ec747u.png)

For the top 10 blogs as determined by weighted popularity, will be each given one of either:

- one of 5 Lego kits valued around $100 including the Lego Vesper 125

- Zhamak Dheghani's book on Data Mesh

## Technology sponsors

This is a sponsored event and as such we encourage our participants to use at least one of the technologies of our technology partners in their solution. These vendors are leaders in their space and often provide really fun and innovative ways of achieving great Data Engineering outcomes, so why not give them a go:


![DataEngHack Sponsors](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rvkyhge1s2d9dryxb44e.png)

So our list of sponsors are:

- [datastax](https://datastax.com/)
- [neo4j](https://neo4j.com/)
- [snowflake](https://www.snowflake.com/)
- [fivetran](https://fivetran.com/)
- [databricks](https://databricks.com/)
- [microsoft azure](https://azure.microsoft.com/en-au/)
- [aws](https://aws.amazon.com/)
- [imply](https://imply.io/)

## How to get involved

See the comments below for the way to register!

This blog was originally published on [DataEngAu](https://dataengconf.com.au/blog/2022-04/welcome-to-dataenghack-online)
Run RunJS on Fedora Linux
Tags: beginners, javascript, tutorial, linux
Published: 2022-04-28 00:56:15

Download form website
[Download RunJS](https://runjs.app/)

Extract file, open terminal to the folder and run file

```
./runjs
```
Great..
![RunJS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r7qhwqxe7vza2e6m4epu.png)

If you can add to drawer, use this to create shortcut
[Create Shortcut](https://dev.to/bukanspot/install-winbox-on-fedra-35-273l)

Or you can install from snap
[Snap Store](https://snapcraft.io/runjs)
Tips for Command Line
Tags: python
Published: 2022-04-28 00:48:23

Had you ever got tired of having to wait for an app to load to execute a simple task? Or got too many folders and things to access and got yourself lost on the way? Learn how to use command line interfaces (or CLIs) might be of a big help for you. On a console or in a terminal in a computer you can easily type instructions using specific syntax, or commands, to order the computer to quickly do what you have in mind.

For example, let’s suppose you simply wants to know the answer for 1.549 + 2.615, you could open the calculator app on your computer or just type on the terminal **_print(1.549 + 2.615)_**.

Working through a terminal is faster and you can keep things more organized than using multiple tabs and apps. Knowing that, in this article, I shall present you with a briefly, but useful, example of syntax of command lines.

The **_ls_** command lists the non-hidden contents of the current directory.
The **_ls -a_** command lists all the contents of the current directory.
The **_cd_** command is used to navigate through the directories.
The **_cd .._** command returns you to the parent directory of your current directory
The **_cd /path to the directory/_** command takes you to a specific directory 
The **_mkdir name_directory_** command creates a new directory called name_directory.
The **_rmdir name_directory_** command deletes an empty directory called name_directory.
The **_cp name_file_** command makes a copy of a specific file.
The **_mv name_file name_directory_** command moves a specific file to a specific directory.
The **_sudo other_command_** command runs a specific command you typed with superuser privileges.
The **_whatis other_command_** command gives you information about a specific command you typed.
The **_man other_file command_** gives you access to the manual of an executable specific file you typed.
The **_help other_command_** command gives you access to the manual of a built-in specific command you typed.
The **_file_name: head -n 20 file_name_** command shows you the firsts 20 rows (for example) of the specific file you typed.
The **_file_name: tail -n 20 file_name_** command shows you the lasts 20 rows (for example) of the specific file you typed.
The **_file_name: wc file_name_** command counts number of lines, words and characters in the specific file you typed.

**Conclusion**
These were the most useful command lines that I learn, and decided to share, by studying through the Dataquest platform.
What does your dream work setup look like?
Tags: workstations, setup, discuss
Published: 2022-04-28 00:44:32

Are you the type to save up for your dream setup equipment (monitors, keyboards, etc.)? What does your dream workstation entail and how does it differ from the one you currently have? Better yet, where would this workstation be located if you could choose? Isn't location a huge factor in it all in the end?
Validando dados no PHP com Lontra Validator
Tags: braziliandevs, php, laminas, zend
Published: 2022-04-28 00:12:06

Apesar do Zend não estar mais tão popular nos últimos anos, principalmente depois que foi para as mãos da Linux Fundation, agora chamado de Laminas, eu continuo trabalhando com ele, pois ao meu ver é um framework muito sólido e versátil, fácil de identificar erros durante o desenvolvimento e baixo acoplamento.

O Laminas é (conforme o significado literal do nome) dividido em pequenas partes, cada coisa tem seu pacote, como forms, banco de dados, MVC, validadores, filtros, etc. 

Pra ser mais direto ao assunto do artigo, muitas vezes precisei de algumas validações que não estavam prontas e disponíveis no pacote laminas-validator, então resolvi desenvolver alguns:

ArrayRecordExists - Check if values in array exists on database
DateBetween - Checks whether the date is between values entered.
DateGreaterThan - Checks if date is greater
DateLessThan - Checks if date is less
EndsWith - If text ends with a value
IsArray - If value is a valid array
Password - Checks whether the entered value is a valid password with the options uppercase, lowercase, number, special characters.
StartsWith - If text starts with a value
WordCount - Validate the number of words in a string

Essas validações foram feitas para serem integradas ao laminas-validator e laminas-inputfilter, mas funcionam também para abordagens Orientadas a Objetos em projetos em PHP puro ou em outros frameworks, apesar de não achar tão interessante nesses casos, mas espero que também te ajude.

A instalação via Composer é bem simples:
```
composer require cledilsonweb/lontra-validator
```
Pra usar também é bem simples:

```php
$inputFilter->add(
    [
        'name' => 'input_name',
        'required' => true,
        'filters' => // your filters...,
        'validators' => [
            [
                'name' => DateBetween::class
                'options' => [
                    'max' => '2020-10-10', 
                    'min' => '2020-05-05', 
                    'format' => 'Y-m-d', 
                    'inclusive' => true
                ]
            ]
        ]
    ]
);
```
Ou em casos em que você não use o Laminas como framework no seu projeto:
```php
$validator = new DateBetween([
    'max' => '2020-10-10', 
    'min' => '2020-05-05', 
    'format' => 'Y-m-d', 
    'inclusive' => true
]);
echo $validator->isValid('2020-06-06'); //true
```
##Conheça o Laminas, agora na Linux Fundation
Como eu disse, você pode usar apenas partes do Laminas em seu projeto em combinação com outros frameworks também. Inclusive o InputFilter que é usado para validar dados, principalmente de formulários:

[https://docs.laminas.dev/laminas-inputfilter/intro/](https://docs.laminas.dev/laminas-inputfilter/intro/)

##Então...
Tem sido uma mão na roda em meus projetos, tanto na empresa como em projetos pessoais, e espero que ajude você também. Caso tenha sugestões, pode enviar pelo projeto no Github ou dúvidas por aqui mesmo. Abraço!
###Link do projeto:
[https://github.com/cledilsonweb/lontra-validator](https://github.com/cledilsonweb/lontra-validator)
Day 19/100; 100 Days of Code
Tags: javascript, beginners, codenewbie, devjournal
Published: 2022-04-28 00:00:27

Ok been away for a bit. Balancing some new work hours but might have found a more consistent way to continue working on code.

Today I began working on a calculator app. Starting with the html and css. Will be adding more to the js portion next time.