teleren/devto huggingface dataset:
Build Images with Images
Tags: python, opensource, tooling, machinelearning
Published: 2022-02-10 10:12:29

## [tiler](https://github.com/nuno-faria/tiler)
<span><strong><i class="fa fa-star">Star 5k</i> <i class="fa fa-eye">Watch 57</i> <i class="fa fa-code-fork">Fork 318</i></strong></span>

## About

Tiler is a tool to create an image using all kinds of other smaller images (tiles). It is different from other mosaic tools since it can adapt to tiles with multiple shapes and sizes (i.e. not limited to squares).

An image can be built out of circles, lines, waves, cross stitches, legos, minecraft blocks, paper clips, letters, ... The possibilities are endless!

## Examples

### Circles

#### Various sizes

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


#### Fixed

- 10x10
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1vnx0seoaerwrceteu0a.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fetad2j175r8yq6brf2h.png)
- 25x25
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hrpk29hp7kxjsnnt0194.png)
- 50x50
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hvmmwi1bdr9gfzch7i4u.png)


### Paper clips

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


### Cross stitch (times)

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

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


### Hearts

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


### Legos

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


### Minecraft blocks

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

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


### Stripes (lines)

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


### At

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7uwptz9y9gatdqsteajq.png)
Haters
Tags: discuss, personal, improvement, growth
Published: 2022-02-10 10:07:11

---
title: Haters
published: true
description: Don't hate, donate <3
tags: discuss, personal, improvement, growth
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hwalc121v3k4a6s4xb3d.jpg
---

_Originally published on [my blog](https://www.nikola-breznjak.com/blog/daily-thoughts/haters/)._

> Don't hate someone who's willing to go the extra mile. Join them and become best friends because it's lonely at the extra mile.

---

This is [why I write](https://www.nikola-breznjak.com/blog/daily-thoughts/why-do-i-write-these-daily-thoughts-posts/) these 'daily thoughts' posts.
Filter unique array members (remove duplicates)
Tags: set, javascript
Published: 2022-02-10 10:04:00

### METHOD 1 - Using _filter_:
indexOf will return the first index (position) that a specific value first appear in the array. By checking indexOf(item)=== index, we can get the unique values.

```JavaScript
let array = ["🐑", "😁", "🐑", "🐑", "😁", "😁"];
const filterArr = array.filter((item, index) => array.indexOf(item) === index);
console.log(filterArr); //[ '🐑', '😁' ]
```

Instead of checking for duplicates using array.filter() method, we can make use of the Set Data Structure that by definition only allows unique values.

### METHOD 2 - Using _Set_:
```JavaScript
const unique = (arr) => {
  const nameSet = new Set();
  for (let i = 0; i < arr.length; i++) {
    nameSet.add(arr[i]); //add element to Set
  }
  Array.from(nameSet)
};
console.log(unique(values)); //[ '🐑', '😁' ]
```

#### Shorter Method
```JavaScript
const unique = (arr) => {
   return Array.from(new Set(arr));
}
```

#### Set with _Array Destructuring_
```JavaScript
const unique = (arr) => {
   return [...new Set(arr];
}
```
### METHOD 3 - Using _Reduce_:
```JavaScript
const uniqueVal = array.reduce((unique, item) =>
  unique.includes(item) ? unique : [...unique, item]
);

console.log(uniqueVal); //[ '🐑', '😁' ]
```
Ecommerce Development Company | Hire Developers in India
Tags: css, webdev, programming
Published: 2022-02-10 09:54:57

One-stop destination for all B2B and B2C eCommerce solutions that makes you stay on top competition.

ecommerce development is the process of developing online ecommerce website for retail business - how it structured and work proper

**Hire Our Ecommerce Development services**

Universe Technologies is an offshore **[ecommerce development company](https://universetech.co/ecommerce-development-services)** which have a solution for all small to large business. We offer best eCommerce design and development services to attract your customers with the perfect eCommerce solution. While developing, we will keep in mind your targeted audience, requirement, theme customization and provide best solution for enhancing your business at affordable price.

Are you looking for a web development company for your Ecommerce Development project? We helps startups and giant industry for building robust eCommerce web solutions. Our eCommerce developing experts leverage their expertise and refined methodology for your business to grow multifolds by delivering exclusive website.

We are also provide below services globally:
**[Magento development company](https://universetech.co/magento-development-services)**
**[Shopware development company](https://universetech.co/shopware-development-services)**
**[Prestashop development company](https://universetech.co/prestashop-development-services)**
**[Shopify development company](https://universetech.co/shopify-development-services)**
**[Magento 2 Migration Services](https://universetech.co/magento-2-migration-services)**
**[Shopware Development Services](https://universetech.co/shopware-development-services)**
**[Woocommerce Development Company](https://universetech.co/woocommerce-development-services)**
**[UI UX Design Services](https://universetech.co/ui-ux-design-services
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cutk9w80rsipmy7d3dcs.jpg))**
What Is CI/CD In DevOps? | GitLab CI/CD Tutorial | Part I 💻👌
Tags: devops, git, cicd, tutorial
Published: 2022-02-10 10:03:37

{% youtube MggFYkomfx0 %}

This video explains the fundamentals of Continuous Integration, Continuous Deployment and Continuous Delivery  (CI/CD). [Start FREE Testing](https://accounts.lambdatest.com/register?utm_source=devto&utm_medium=organic&utm_campaign=feb10_sb&utm_term=sb&utm_content=tutorial_video) 
Run Selenium Tests In GitLab CI -: https://bit.ly/3C82MK2


Want to get started with CI/CD? Well, here is a detailed CI/CD Tutorial by LambdaTest to help answer the following  -:

◼ What is CI/CD?
◼ What does CI and CD mean?
◼ What is CI CD and how does it work?
◼ What is CI and CD in DevOps?
◼ What is meant by Ci CD pipeline?
◼What is CI CD in GitLab?
◼Is GitLab CI CD free?
◼How do you write CI CD in GitLab?
◼Is GitLab a CI tool CD?
Change userLocation puck color using MapBox v10
Tags: swift, mapbox
Published: 2022-02-10 09:55:16

I’m working on migrating my MapBox version from `v6.4` to `v10`.

I have been able to migrate almost everything, only issue I have at the moment is changing the `userLocation` puck `tintColor`.

What I was doing on v6.4 was changing the color in `mapView.tintColor` where `mapView` is an object of `MKMapView` class. Right now, changing the tintColor will only update the `attributionButton` color.

Do you have any suggestion?

[Link on StackOverflow](https://stackoverflow.com/questions/71062100/change-userlocation-puck-color-using-mapbox-v10)
RSS/Atom Reader for MacOS
Tags: ios, swift, opensource, programming
Published: 2022-02-10 09:52:24

## [vienna-rss](https://github.com/ViennaRSS/vienna-rss)
<span><strong><i class="fa fa-star">Star 1.5k</i> <i class="fa fa-eye">Watch 58</i> <i class="fa fa-code-fork">Fork 222</i></strong></span>

![Vienna](https://vienna-rss.sourceforge.io/img/vienna_logo.png)


Vienna is an RSS/Atom reader for macOS.

Vienna can connect directly to the websites you want to track.
Additionally or alternatively, you can also sync with a server supporting the Open Reader API (an adaptation of the now deceased Google Reader API). Vienna has been successfully tested with BazQux.com, FreshRSS.org, FeedHQ.org, InoReader.com and TheOldReader.com.

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

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

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

Licensing
---------

[Apache License, Version 2.0](LICENCE.md).
Ultimate Guide to PrestaShop: Everything You Need To Know!
Published: 2022-02-10 09:39:10


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

PrestaShop is one of the most popular eCommerce platforms in the world. It has a diverse set of features, and comes with 300+ different options for you to choose from. PrestaShop can be found on 25,000+ websites around the globe. And it’s not just available in two languages: today its available in 60! This diversity is further enhanced by expert developers who develop sites that are feature-rich and help build your brand value as well as increase sales using PrestaShop .

Prestashop is not complicated to install, set up and use. It also possesses a variety of settings options without being too demanding with system requirements for hosting server: Apache web server 1.3 or later with PHP 5 or above and MySQL 5.

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

PrestaShop, an e-commerce application and website builder, is using Ajax technology for both the front end and back end. Asynchronous JavaScript and XML (Ajax) is a set of techniques in web development that involve using many web technologies for client-side applications to create asynchronous websites. With the help of Ajax, browser applications are able to send or retrieve data from a server asynchronously without interfering with any other display or behavior.

PrestaShop is a new word in the world of ecommerce platforms development. It’s simple, powerful and adaptable to any online business. Are you searching out a [Prestashop Development Company](https://universetech.co/prestashop-development-services) on your project? Our devoted team will develop well designed Prestashop stores with seamless navigation systems so you can browse through products conveniently. Contact us today!

Source:- https://universetech.co/ultimate-guide-to-prestashop-everything-you-need-to-know!
MacOS Python Statusbar apps
Tags: python, opensource, github, programming
Published: 2022-02-10 09:38:23

## [rumps](https://github.com/jaredks/rumps)
<span><strong><i class="fa fa-star">Star 2.6k</i> <i class="fa fa-eye">Watch 46</i> <i class="fa fa-code-fork">Fork 167</i></strong></span>

Ridiculously Uncomplicated macOS Python Statusbar apps.

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

```python
import rumps

class AwesomeStatusBarApp(rumps.App):
    @rumps.clicked("Preferences")
    def prefs(self, _):
        rumps.alert("jk! no preferences available!")

    @rumps.clicked("Silly button")
    def onoff(self, sender):
        sender.state = not sender.state

    @rumps.clicked("Say hi")
    def sayhi(self, _):
        rumps.notification("Awesome title", "amazing subtitle", "hi!!1")

if __name__ == "__main__":
    AwesomeStatusBarApp("Awesome App").run()
```

How fun!?

`rumps` can greatly shorten the code required to generate a working app. No `PyObjC` underscore syntax required!

## Use case
`rumps` is for any console-based program that would benefit from a simple configuration toolbar or launch menu.

Good for:

- Notification-center-based app

- Controlling daemons / launching separate programs

- Updating simple info from web APIs on a timer

Not good for:

- Any app that is first and foremost a GUI application

## License
Modified BSD License.
Python list and list methods
Tags: python, tutorial, programming, beginners
Published: 2022-02-10 09:09:42

> [Sign up to my newsletter!](https://baransel.dev/newsletter/).

## Lists

Briefly, we said that Lists can contain more than one data type, are shown with `square brackets` and are mutable. Now let's show Lists with an example.

```python
list =[9, "Python", 7.2, [8, 1], ("PHP", 5, 'b')]
```

As you can see above, we created a List named `list`.

Well, if you ask how we can reach the elements of the list, let's show it right away.

## Accessing Lists Elements

```
list[2]
7.2
```

As you can see, it is very simple, let's show another example right away.

```
list[4]
("PHP", 5, 'b')
```

As you can see, our element in the 4th index is a tuple and to access their item is simple, let's show another example right away.

```
list[4][0]
PHP
```

Well, if you ask how I can reach more than one item, let's show it right away.

> `List[start, end, increase amount]`

```
list[0:2]
[9, 'Python']
```

If you've noticed, it took the indexes of the elements by one increment by default, and took the zero and one elements together, not the 2nd element, because it doesn't include the 2nd element.


Now that we have learned what Lists are, and how it is used, and how to access the elements of the List, let's move on to the List's Methods.

### List Methods

Before moving on to the Methods of the List, let's talk about the concept of Method. Method is on something; Adding, removing, changing etc. So let's take a quick look at what the List's Methods are. `dir()` function could see all the methods. Let's show it now;

```python
dir(list) 

['__add__', '__class__', '__contains__', '__delattr__', '__delitem__', '__dir__',
 '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', 
'__gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__iter__', '__le__',
 '__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', 
'__repr__', '__reversed__', '__rmul__', '__setattr__', '__setitem__', '__sizeof__',
 '__str__', '__subclasshook__', 'append', 'clear', 'copy', 'count', 'extend', 'index',
 'insert', 'pop', 'remove', 'reverse', 'sort']
```

We got an output as `__xxx__` methods, since they are private methods, we will not process them for now.


We will cover these methods;

```
['append', 'clear', 'copy', 'count', 'extend', 'index', 'insert',
 'pop', 'remove', 'reverse', 'sort']
```

### Append Method
Continue this post on my blog! [Python list and list methods](https://baransel.dev/post/python-list-and-list-methods/).


[Sign up to my newsletter!](https://baransel.dev/newsletter/).
Obsei: Missing YouTube dislike count?
Tags: opensource, productivity, datascience, showdev
Published: 2022-02-10 08:29:50

Dear Dev Community!


Obsei is an open-source low-code AI powered automation tool. Please refer [Obsei introduction thread](https://dev.to/lalitpagaria/introducing-obsei-56ma). I would like to share about our new integration: YouTube video comments.


As you are aware that YouTube is stopped showing video "dislike" count. So how about analyzing it via sentiments of the comments?


With this integration you can easily perform following tasks:
- getting alert on negative or spam comment on your video
- aggregate all comments and extract insight to analyze reveal more detailed engagement metrics
- fast and easy creation of ML review dataset
- and many more

Please check the demo:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pefxc0j528agi7ceykxa.gif)


If you are Python person then this is all you need it:
```python
from obsei.source.youtube_scrapper import YoutubeScrapperSource, YoutubeScrapperConfig

# initialize Youtube source config
source_config = YoutubeScrapperConfig(
    video_url="https://www.youtube.com/watch?v=uZfns0JIlFk", # Youtube video URL
    fetch_replies=True, # Fetch replies to comments
    max_comments=10, # Total number of comments and replies to fetch
    lookup_period="1Y", # Lookup period from current time, format: `<number><d|h|m|M|Y>` (day|hour|minute|month|year)
)

# initialize Youtube comments retriever
source = YoutubeScrapperSource()

# This will fetch information from configured source ie twitter, app store etc
source_response_list = source.lookup(source_config)
```


If like YAML then you would need following config:
```yaml
source:
      _target_: obsei.source.youtube_scrapper.YoutubeScrapperSource
source_config:
      _target_: obsei.source.youtube_scrapper.YoutubeScrapperConfig
      video_url: "https://www.youtube.com/watch?v=uZfns0JIlFk"
      lookup_period: "1Y"
      max_comments: 10
```


Looking forward for your valuable feedback.

Repo URL: [https://github.com/obsei/obsei](https://github.com/obsei/obsei)
Show properties of an object during the debug
Tags: vs2022, visualstudio, debugger
Published: 2022-02-10 08:24:25

During the debug sessions, very often, you have to check what is inside a property or in multiple properties.
It's very annoying every time to move the cursor on the object -> add to Quickwatch or try to click close to the arrow to see the values inside.

You can easily solve this problem with Visual Studio and improve your productivy during the debug.

## The DebuggerDisplay attribute

For instance, you have this class with two properties inside.

```csharp
    public class Person
    {
        public string Name { get; set; }

        public string Surname { get; set; }
    }
```

You can tell to the debugger: "ehy, I want to see the values of these two properties".
You can simply add the DebuggerDisplay attribute on top of the class and you can format the string to display.

```csharp
[DebuggerDisplay("Name = {Name} - Surname = {Surname}")]
```

In the screenshot below, you can see the result.

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

If you want to go more deeper on the DebuggerDisplay attribute, this is the official documentation: https://docs.microsoft.com/en-us/visualstudio/debugger/using-the-debuggerdisplay-attribute?view=vs-2022
Effortless OneDev CI/CD Farm with Agents
Tags: devops, git
Published: 2022-02-10 08:17:35

## Introduction

From day 1, [OneDev](https://github.com/theonedev/onedev) is able to run CI/CD jobs as pods on Kubernetes clusters. In case you do not have a Kubernetes cluster, it is now possible to install OneDev agents on other machines to get a CI/CD farm. Agent is designed to be maintenance free: the server will push updates to agents automatically when it is upgraded.

## How to Set Up

Let's go through an example to see how to set up the CI/CD farm

1. Start OneDev server with below command on Linux or Mac (this command is for demonstration purpose, follow installation guide for production use):
    ```
    docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd)/onedev:/opt/onedev -p 6610:6610 -p 6611:6611 1dev/server
    ```
2. Open browser to visit http://localhost:6610 to complete the setup
3.  Visit agent management page, click the add agent button, and show the docker command to run agent:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/igkp70c8u5ql3kgs3b5u.png)
4. Copy the command to your terminal (Linux/Mac), change serverUrl environment to http://<ip address of OneDev server>:6610 (do not use localhost here as otherwise OneDev agent running inside container can not access OneDev server), and run the command to start agent. If connected, the agent will be online in agent management page like below:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1v9uq5qwh88zw89ctr12.png)
5. Now let's create a job executor to use the agent. Switch to job executors page, delete the default auto-discover executor, and create an executor of type Remote Docker Executor, give it a name and leave others as default. Test and save the setting:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y323n70a3qiaht5whq6f.png)
6. Create a test project, define CI spec with a simple job, and run the job. You will see that the job is running on the agent:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nk3ar69y5k0zqldjnblc.gif)
8. When OneDev dispatches jobs to agents, it choses the best one based on agent cpu/memory capacity and job cpu/memory requirement. If no agents satisfies the requirement, the job will be in waiting state.

Thanks for reading!
How to create custom helpers in Laravel?
Tags: php, laravel
Published: 2022-02-10 08:12:52

Laravel is one of the best frameworks out there **FOR ME**. I use it every day for my 9-5 job and I really love it.

Whenever I start a new project either for my job or for my side projects, the first thing that I do is to create a new file called **helpers.php**. I use that file to create the custom helper functions that I will be used for along the project.

For example; I really don't like to find the name of the current route in blade files following a hard way like as below;

```
{{ Illuminate\Support\Facades\Route::currentRouteName() }}
```
Instead, I prefer to create a simple function that I can use anywhere in the project to get the current route name in a shorter syntax like as below;

```
{{ getCurrentRouteName() }} // In the blade files,also can be used in .php files as well.
```

## How to make sure that this simple function can work anywhere?

Since Laravel as a default uses **composer** to manage the dependencies, we have a powerful tool under our hands and we can tell the composer to autoload any file we want and it allows us to use it in the entire project.

To do so; first of all, we have to create the file anywhere we want, as a default, I always put it under the **app** folder.

- app/helpers.php

After I am sure that, the file exists, I create my own custom helper functions as shown below;

```
// function_exists method is initiated to check;
// If there is any function existed with the name of getCurrentRouteName,
// If not, this function will be added otherwise existed one will be used.
// The aim is to protect existing functions to be overwritten
if (!function_exists('getCurrentRouteName')) {
    function getCurrentRouteName()
    {
        return Illuminate\Support\Facades\Route::currentRouteName();
    }
}
```
At this point, I have to tell the composer to discover and autoload this file by adding it to the **composer.json** file as shown below.

> If you don't know, composer.json is a file in that you can define the project dependencies and install them using a simple command composer install or update them with composer update.

```
{
    "require": { ... },
    "require-dev": { ... },
    "autoload": {
        "psr-4": { ... },
        "files": [
            "app/helpers.php" //this is the place I tell composer to autoload file
        ]
    },
    ...
}
```

I created a file, add it to the composer.json file, so is it going to work? **Unfortunately No** 😥

Because we have to run a simple composer command to load all files again in the entire project just for one time. 

```
composer dump-autoload
```

I am afraid to ask, but is it going to work? **Yes! Congratulations, you've made it** 😇

So, now I can use getCurrentRouteName anywhere I want as I showed in the example above.

```
{{ getCurrentRouteName() }} // In the blade files,also can be used in .php files as well.
```
This is how I create custom helpers in my Laravel projects.