teleren/devto huggingface dataset:
How to install Unoconv
Tags: linux, fedora, pdf, libreoffice
Published: 2021-04-20 18:46:58

unoconv (Universal office convert) is a very special tool when it comes to converting Word files to PDF.

# Installation

**0. Verify if python is installing**
if you don't have python installed so:

 ```bash
## look for the latest version
sudo dnf install python3.8

## set aliases
alternatives --set python /usr/bin/python3

## more information 
man unversioned-python
```
**1. install libreOffice**
**important!** download the latest stable version compatible with unoconv from http://download.documentfoundation.org/libreoffice/stable

```bash
## download libreoffice
wget http://download.documentfoundation.org/libreoffice/stable/6.0.4/deb/x86_64/LibreOffice_6.0.4_Linux_x86-64_deb.tar.gz

## unzip
tar -xvf LibreOffice_6.4.7_Linux_x86-64_rpm.tar.gz

## install RPM
cd LibreOffice_6.4.7_Linux_x86-64_rpm/RPMS
dnf install *.rpm
```
**2. install unoconv**

```bash
git clone https://github.com/dagwieers/unoconv.git
# this 
cp unoconv/unoconv /usr/bin
# or 
ln -s unoconv/unoconv /usr/bin/unoconv
```

**3. configure service for apache **
first, edit or create this file: 

```bash
vi /etc/systemd/system/unoconv.service
```
second, paste the following text, but it's important to replace UNO_PATH with the libreOffice installation path.

```
[Unit]
Description=Unoconv listener for document conversions
Documentation=https://github.com/dagwieers/unoconv
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=simple
Environment="UNO_PATH=/usr/lib64/libreoffice/program"
ExecStart=/usr/bin/unoconv --listener

[Install]
WantedBy=multi-user.target
```
now you can start unoconv service

```bash
systemctl enable unoconv.service
systemctl start unoconv.service
```
How to perform Vehicle Detection using Python and opencv
Tags: opensource, python, programming
Published: 2021-04-20 18:32:41

For full source code please read this original article
<a href="https://pythonslearning.com/2021/04/how-to-perform-vehicle-detection-using-python-and-opencv.html">How to perform Vehicle Detection using Python and opencv</a>
I love the idea of smart cities. The thought of automated smart energy systems, electrical grids, one-touch access ports – it’s an enthralling concept! Honestly, it’s a dream for a data scientist and I’m delighted that a lot of cities around the world are moving towards becoming smarter.

One of the core components of a smart city is automated traffic management. And that got me thinking – could I use my data science chops to build a vehicle detection model that could play a part in smart traffic management?

Think about it – if you could integrate a vehicle detection system in a traffic light camera, you could easily track a number of useful things simultaneously:

How many vehicles are present at the traffic junction during the day?
What time does the traffic build up?
What kind of vehicles are traversing the junction (heavy vehicles, cars, etc.)?
Is there a way to optimize the traffic and distribute it through a different street?
And so on. The applications are endless!
Resource : https://pythonslearning.com/2021/04/how-to-perform-vehicle-detection-using-python-and-opencv.html
Which OpenIndiana directories to backup for bare metal recovery
Tags: openindiana, illumos, backup, recovery
Published: 2021-04-20 18:28:40

For bare metal recovery, backup every ZFS filesystem under `/`. You can find what isn't a ZFS filesystem by running: 

```
`$ awk '$3 != "zfs" { printf("%-20s %s\n", $2, $3); }' /etc/mnttab | sort`
```

You can also add `/mnt` to that list if you choose to not backup your mountpoint contents.
Speed up git commands with Autohotkey
Tags: 5days5blogposts, git, productivity, autohotkey
Published: 2021-04-20 18:23:29

> **Disclaimer:** This solution only works on Windows.


Working with git on the command line interface seems to be faster and more productive than using a mouse. But do you know all the commands by heart? Do you type without mistakes? Yeah, me neither.

Today I present a solution - [Autohotkey](https://www.autohotkey.com/) will complete any command for you. 

# How it works?
Autohotkey will complete your predefined phrases with anything you want it to. Let's start simple - watch how it works with `git checkout -` 
![image](https://kopieczedevstorage.blob.core.windows.net/blogfiles/7l8e3WzDkM.gif)
 
I just write `gitc` and press space/tab/enter and Autohotkey completes the command for me. This is because I configured it to work this way. All "scripts" are configured in *.ahk file that should be put to startup folder (its `Windows + R` and `shell:startup` or just `%appdata%\Microsoft\Windows\Start Menu\Programs\Startup`).

# Examples
### Checkout
```
::gitc::
Send, git checkout -
return
```
![image](https://kopieczedevstorage.blob.core.windows.net/blogfiles/7l8e3WzDkM.gif)
 
### Rebase
```
::gitrm::
Send, git rebase master --rebase-merges
return
```
![image](https://kopieczedevstorage.blob.core.windows.net/blogfiles/eewVggmVDG.gif)
 
### Fetch and log
It's more fun because there are 2 git commands with 1 Authotkey command. 
```
::gitfl::
Send, git log HEAD..origin/main --oneline
return
```
![image](https://kopieczedevstorage.blob.core.windows.net/blogfiles/No1p3JHaGb.gif)
 
## But why?
I prefer command line because I do in git exactly what I indented to do. No more unexpected actions hidden on the UI. Writing commands also helps with learning and mastering git. If your goal is to have clean and readable history, that's the perfect way to go. 

Now working on the command line with git should be easier and more friendly. 

**Documentation:** [https://www.autohotkey.com/docs/AutoHotkey.htm](https://www.autohotkey.com/docs/AutoHotkey.htm)

## PS
- this will also work with any kind of scripts, not only git
- off course, you can use Autohotkey to autocomplete your email footer or any other recurrent plain text
RTOS Interview question
Tags: rtos, interview, question
Published: 2021-04-20 18:19:35

Welcome everyone in this post we will see top of the RTOS Interview question so let's see:
<a href="https://pythonslearning.com/2021/04/top-10-rtos-interview-questions-with-answers-2021.html">Original article here</a>
What do you mean by a real-time system? ...
What is RTOS? ...
How is RTOS different from other OS? ...
What are the different interprocess communications? ...
What is the kernel? ...
What is multitasking in the OS? ...
What is the stack overflow?
FOR MORE QUESTION PLEASE READ THIS ARTICLE
Source (Answer available there): <a href="https://pythonslearning.com/2021/04/top-10-rtos-interview-questions-with-answers-2021.html">RTOS QUESTION AND ANSWER</a>
How's your Google-fu?
Tags: google, duckduckgo
Published: 2021-04-20 17:51:00

I remember hearing the "Google-fu" expression forever ago on the [Coding Horror](https://blog.codinghorror.com/google-fu) blog. While my Google-fu may be a little stale, here goes what I use quite often.

# [123 * 45](https://www.google.com/search?q=123%20*%2045)

Can be quicker than your firing up the calculator and typing it there.

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

# [1 usd to brl](https://www.google.com/search?q=1%20usd%20to%20brl)

The graph displayed along is quite nice.

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

# [translate cadeira](https://www.google.com/search?q=translate%20cadeira)

No need to navigate to translate.google.com just for that.

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

# [no silver bullet filetype:pdf](https://www.google.com/search?q=no%20silver%20bullet%20filetype%3Apdf)

Watch out because pdf files can be dangerous. Always double-check the URL.

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

# [no silver bullet site:news.ycombinator.com](https://www.google.com/search?q=no%20silver%20bullet%20site%3Anews.ycombinator.com)

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

# ["why * is my favorite programming language"](https://www.google.com/search?q=%22why%20*%20is%20my%20favorite%20programming%20language%22)

Quotations and asterisk goes together just like... [oh well](https://www.google.com/search?q=%22goes%20together%20like%20*%20and%20*%22).

![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/816l8ggwcedj9htw40i8.png)

# DuckDuckGo-fu

I've used DDG for quite a while in the past and I remember fondly how smart some of its replies can be:

[shorten wikipedia.org](https://duckduckgo.com?q=shorten%20wikipedia.org)
[wikipedia.org down](https://duckduckgo.com?q=wikipedia.org%20down)
[qr wikipedia.org](https://duckduckgo.com?q=qr%20wikipedia.org)
[password](https://duckduckgo.com?q=password)
[password 20](https://duckduckgo.com?q=password%2020)
[weak password](https://duckduckgo.com?q=weak%20password)
[strong password](https://duckduckgo.com?q=strong%20password)
[json beautifier](https://duckduckgo.com?q=json%20beautifier)
[url encode açaí](https://duckduckgo.com?q=url%20encode%20a%E7a%ED)
[calendar 1 jan 1999](https://duckduckgo.com?q=calendar%201%20jan%201999)
[lorem ipsum](https://duckduckgo.com?q=lorem%20ipsum)
[html chars](https://duckduckgo.com?q=html%20chars)
[ascii table](https://duckduckgo.com?q=ascii%20table)
What are fun projects to do when you're feeling exhausted?
Tags: burnout, personalprojects, projects, programming
Published: 2021-04-20 18:18:04

I've been struggling a lot to find the energy to do personal projects since I started my first programming job. I like my job, and I'm learning a lot, but when I'm done with work I feel so exhausted that I don't have any brain power left to do personal projects. The pandemic of course doesn't help with the exhaustion either. Everything takes a lot more effort than it normally does, and it's all I can do to do basic tasks. 

Do you have any advice for doing personal projects when you're feeling burnt out and exhausted?
New Python App
Published: 2021-04-20 18:12:05

This is my second post on dev.to. I plan to build a basic app calculating the mean from scratch without using any libraries. This evening or today, I will work on this program using either a data set or dummy data in a list. My goal is to write up this code today and post tonight or tomorrow. The program is very simple but powerful as I explain the methods used in the code. I plan to do a handful of simple apps each week and blog about them just to sharpen my skills and to keep up with my goal of blogging at least several times a week. I will extend this to calculating the variance and standard deviation from scratch as well. Some functions may be used to build the equation. The idea is to take basic statistical equations and work through them without using standard analytics libraries. Keep your eyes on the blog as I continue to write and put up code for you to follow, critique, and improve upon.
python online compiler for data science
Tags: programming, python, compiler
Published: 2021-04-20 18:08:19

We know that all programming compiler available in online mode for run the program so in this post we see one of the best online compiler for python
so open this post to run your program
<a href="https://pythonslearning.com/2021/04/which-is-python-online-compiler-for-data-science.html">python online compiler</a>
best of luck!!!
The 7 Most Popular DEV Posts from the Past Week
Tags: top7
Published: 2021-04-20 18:06:50

---
title: The 7 Most Popular DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week.
tags: icymi
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---
_Every Tuesday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week. ❤️_

## Save hours of manual typing

A super handy list from @simonpaix! If you're just starting your coding journey, these tips might just save you a significant amount of time.


{% link https://dev.to/simonpaix/10-useful-vs-code-shortcuts-you-should-know-42m %}

## The only way out is through...

@alexlsalt shows us that we truly have so much to learn _from_ early-career developers.

{% link https://dev.to/alexlsalt/10-things-i-ve-learned-after-3-months-as-a-junior-software-engineer-2m89 %}

## Never underestimate the power of simplicity

@commentme shares some examples of the libraries that make Vanilla JS "somewhat impeccable".


{% link https://dev.to/commentme/some-vanilla-js-libraries-you-must-try-17a3 %}

## REST for the weary

@lucasnevespereira breaks down the process of writing a REST API using Golang. Best practices, galore!


{% link https://dev.to/lucasnevespereira/write-a-rest-api-in-golang-following-best-practices-pe9  %}


## 👏This👏Is👏So👏Cool

@devdevcharlie thought it would be fun to toggle dark mode on and off by clapping your hands, just like those classic [Clapper](https://www.youtube.com/watch?v=Ny8-G8EoWOw&ab_channel=JosephEnterprises) commercials. So, they built a way to do just that. What a great idea!


{% link https://dev.to/devdevcharlie/toggle-dark-light-mode-by-clapping-your-hands-li7 %}


## Don't let JS drive you nuts

As this post explains, JavaScript is accessible for newcomers, and a lot of what you'll use it for doesn't require an in-depth understanding of the mechanics. But this phenomenon can "trap" you if you're not careful. Good looking out, @jesuisundev.

{% link https://dev.to/jesuisundev/javascript-what-i-didn-t-understand-14hl %}

## Running your containerized workloads on AWS

@aditmodi's post compares the three most important ways to run Docker on AWS.

1. Amazon Elastic Container Service (ECS) with AWS Fargate
2. Amazon Elastic Container Service for Kubernetes (EKS)
3. AWS Elastic Beanstalk (EB) with Single Container Docker

Helpful!

{% link https://dev.to/aws-builders/introduction-to-containers-with-aws-og4 %}

_That's it for our weekly wrap up! Keep an eye on dev.to this week for daily content and discussions...and if you miss anything, we'll be sure to recap it next Tuesday!_
Implementing Singleton Pattern In Dart - Flutter
Tags: flutter, dart
Published: 2021-04-20 18:06:16

##What is a singleton pattern?
Singleton pattern is a design pattern that allows us to use a single instance of a class everywhere.

##Implementation
```dart
class ClassName {
    static ClassName _className;

    ClassName._createInstance();
    factory ClassName() {
        if (_className == null) {
            _className = ClassName._createInstance();
        }
       return _className;
    }
}
```
Factory constructors return an instance of the class, but it doesn't necessarily create a new instance.

Thank you for reading. Give it a thumbs-up if it is helpful for you.

Feel free to [connect](https://bibekkakati.me) 👋

---

> Originally published on [blog.bibekkakati.me](https://blog.bibekkakati.me/implementing-singleton-pattern-in-dart-flutter)

---

<a href="https://www.buymeacoffee.com/bibekkakati"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=bibekkakati&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff"></a>
One wireguard connection to solve two person's problems
Tags: wireguard, remoteaccess, linux, 5days5blogposts
Published: 2021-04-20 17:58:59

Several years ago my uncle needed to start using e-mail. E-mail and simple one page text documents were supposed to be his only computer activities at that time.

I installed Linux Mint 13 Cinnamon 32 bit on my unused Thinkpad T61 and I gave it to him.
All was working without any hiccups. Recently his printer has died.
I visited him to install drivers and configure new printer. Unfortunately it was not so easy. Old Mint had no drivers for that very new Brother wi-fi printer. I managed to download and install it manualy via famous CUPS webpanel http://localhost:631

## But the very next day ...

Uncle is calling:
* Hi, my printer does not print.
* Are there any messages on screen?
* No.
* What is the status of the printer in the printer panel?
* Let me check ... oops ... I deleted it by mistake.


Did I mention that my uncle lives 40km from me?


## New times, new challenges, new possibilities

My uncle said that he has another used laptop. He acquired it from someone in hope to be faster and usable with youtube and video conferencing. But this laptop has had Win10 on HDD. It was slow like hell!
And uncle doesn't want to learn Windows. He wants to feel at home with green folders of Linux Mint ;)

Decision made: Put SSD into that newer laptop. Install current Linux Mint Cinnamon 19.3 64bit. Copy all the data.

Easy peasy. Half an hour of work. But what about 40km? WireGurad!

Luckily I have working WireGuard installation on my OpenWRT 19.07 router.

## Step by step instructions

For future me, if my aunt calls me with similar problem.

### Generate wireguard keys pair

    wg genkey | tee uncle-george.key | wg pubkey > uncle-george.pub

### Add wg peer on OpenWRT router

Network -> Interfaces -> Edit your WG interface -> Peers tab

Add peer button on the bottom
![WG peer config](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dtrg1b0ebu33hybdhoto.png)

Save, Apply changes, restart WG interface


### Remote access to ubuntu based desktop

    apt install ssh

### Desktop sharing Linux Mint 19.3 Cinnamon

    apt install vino dconf-editor

Add vino-server to autosart

    /usr/lib/vino/vino-server

Because of cinnamon you have to use dconf to configure vino. Preferences does not work.

dconf path:

    /org/gnome/desktop/remote‐access

## Install and configure WG on ubuntu based desktop

Linux mint 19.3, uncle's machine

    apt install wireguard


Add `wg-qucik` configuration file, i.e. `/etc/wireguard/wg0.conf`

```
[Interface]
Address = x.x.x.6/24
#here goes uncle private key
PrivateKey = OJBB**************************4W0o=
 
[Peer]
#here goes router public key
PublicKey = RpPL5n9bBX**************************mGzofYTFw=
Endpoint = 1.2.3.4:1234
PersistentKeepalive = 25
AllowedIPs = x.x.x.0/24, y.y.y.0/24
```

enable and start wg service

    sudo systemctl enable wg-quick@wg0.service
    sudo systemctl daemon-reload
    sudo systemctl start wg-quick@wg0
  
`wg-quick` automatically adds routes for all AllowedIPs
Apple AirTag announced
Tags: apple, iot, privacy, ios
Published: 2021-04-20 17:54:24

The AirTag has been [announced](https://www.apple.com/newsroom/2021/04/apple-introduces-airtag/) by Apple.

"Apple today introduced AirTag, a small and elegantly designed accessory that helps keep track of and find the items that matter most with Apple’s Find My app. Whether attached to a handbag, keys, backpack, or other items, AirTag taps into the vast, global Find My network1 and can help locate a lost item, all while keeping location data private and anonymous with end-to-end encryption. AirTag can be purchased in one and four packs for just $29 and $99, respectively, and will be available beginning Friday, April 30. "

And I think the real key element here is the use of Find My App / Find My Network.

Apparently this leverages the vast, mostly unknown, network that Apple has where every device from them with Bluetooth on contributes to the Find My network. Meaning, even if you don't own a AirTag, but you happen to have Bluetooth on and are near an AirTag, your phone will send and receive data to share the location with the network.

No opt-in. No opt-out besides leaving Bluetooth off.

Though I've definitely been one to lose my keys or backpack and wish I had something like an AirTag or its predecessor called [Tile](https://www.thetileapp.com/) I am wholly uncomfortable that they are using my device to communicate with other people's devices creating a large mesh network with no knowledge of my participation.

This is being discussed on Hacker News right now and other sites too. The benefit seems cool and huge, but much like Amazon's announcement several months ago about its [Sidewalk](https://www.forbes.com/sites/paullamkin/2020/11/27/what-is-amazon-sidewalk-and-why-is-it-on-your-echo-smart-speaker/?sh=34f46e19acfd) feature, I feel like there will be a [backlash](https://www.businessinsider.com/amazon-sidewalk-privacy-neighborhood-wifi-networks-us-2020-11?op=1).

I'd love to hear what others think because my initial reaction is revulsion. And I'm seeing mixed thoughts on articles concerning it. To me it is without my consent and if it weren't for a single device in my home I use Bluetooth for from my iPhone I would definitely have it turned off all the time.

Why isn't there active, positive consent to participate in this?

Why isn't this theft of resources, although minimal, to participate in this?

Do we really want to participate more in the already egregious tracking done by just participating in having a smart phone?
Angular built-in Slice Pipe | Array SlicePipe + String SlicePipe Example
Tags: angular, slice
Published: 2021-04-20 17:43:48

https://ozenero.com/angular-built-in-slice-pipe-array-slicepipe-string-slicepipe-example

Angular built-in Slice Pipe | Array SlicePipe + String SlicePipe Example

In the tutorial, we show how to work with Angular impure built-in SlicePipe to create a new Array or String containing a subset of the elements.

Related posts:
– <a href="https://ozenero.com/frontend/angular/angular-6/angular-6-keyvalue-pipe-ngfor-loop-through-object-map-example">Angular Built-in KeyValue Pipe</a>
- <a href="https://ozenero.com/frontend/angular/angular-6/angular-built-in-datepipe-example-pre-defined-format-timezone-locale-custom-format">Angular Built-in DatePipe</a>
- <a href="https://ozenero.com/frontend/angular/angular-6/angular-6-custom-pipe-with-parameterizing-a-pipe-angular-pure-pipes-impure-pipes">Angular Custom Pipe | Pure Pipe + Impure Pipe</a>
– <a href="https://ozenero.com/frontend/angular/angular-6/angular-6-service-with-observable-data-for-asynchronous-operation">Angular 6 Service – with Observable Data for Asynchronous Operation</a>

Related pages:
<ul>
<li><a href="https://ozenero.com/angular-tutorial">Angular Tutorials</a></li>
</ul>

<!--more-->

https://ozenero.com/angular-built-in-slice-pipe-array-slicepipe-string-slicepipe-example

Angular built-in Slice Pipe | Array SlicePipe + String SlicePipe Example