teleren/devto huggingface dataset:
Lollipop Loading with @property
Tags: codepen, css, showdev, webdev
Published: 2021-04-12 05:46:33

Recently I created a lollipop loading circle using only css.

Usually I would create it with SVG, but now [`@property`](https://developer.mozilla.org/en-US/docs/Web/CSS/@property) is a thing so now it's possible with only css!

> The [`@property`](https://developer.mozilla.org/en-US/docs/Web/CSS/@property) is still an experimental technology and currently only works for [Chrome, Edge and Opera](https://caniuse.com/mdn-css_at-rules_property).

But hope soon it will be shipped to most major browsers!

{% codepen https://codepen.io/wheatup/pen/qBRXzGZ %}

{% codepen https://codepen.io/wheatup/pen/WNoBrVe %}

Have fun coding!
Face Recognition in Python Using OpenCV and Deep learning
Tags: python, deeplearning, machinelearning, opensource
Published: 2021-04-12 05:35:36

## Introduction

Today, In this article we will implement face recognition Built using dlib's state-of-the-art face recognition built with deep learning. The model has an accuracy of 99.38% on the Labeled Faces in the Wild benchmark.
It's more like documentation than a face recognition tutorial.

## Usgaes

1.Git clone the Repository

```bash
git clone https://github.com/codePerfectPlus/FacialRecognition
```

2.Add Your Image in `Images` folder. exmaple >> name.jpeg

3.Install the requirements file

```bash
# windows 
python -m venv frenv
frenv/Scripts/activate.bat

python -m pip install -r requirements.txt

# Linux/Mac
python -m venv frenv
source frenv/bin/activate

python -m pip install -r requirements.txt
```

4.Run the Script

```bash
python FaceRec.py
```

NOTE:-
```bash
# incase installtation stuck on dlib
python -m pip install dlib -vvv 
```
Is it time to quit?
Tags: rant
Published: 2021-04-12 05:44:08

The worst thing a programmer can do for his career is to trade ten years of his life not for ten years of experience, but for one year repeated ten times. You're sitting in your own cubicle, programming there, and then you stop and think: 'Wow!  It is amazing how crazy I really am: ten years in the same place with the same Drupal'.

In order to spot such a problem in time, every six months I ask myself three questions:
1. What interesting, significant and important things have I done in the last six months?

2. What skills have I gained or improved over the past six months? Do I need them at all?

3. How am I doing with the team and company? What about the trust, values, and mission of the company? Do I still believe in them? Or is everything already filled with cynicism and pessimism?

If the answers to two of the three questions are discouraging, it's time to quit.
How Akbash meant to impact community 
Published: 2021-04-12 05:40:41

You missed Shiba Inu Dont miss Akbash


Https://akbash.club



The Akbash, also called the Coban Kopegi, the Akbas, or Aky, is an ancient large to giant dog breed from Turkey dating back from 3,000 years ago. It was brought to North America in 1970.

One of the best watchdogs, it is part of the Working group of Livestock Guardian Dogs and one of the national dog breeds of Turkey. Its name means “white head” and its white-colored fur easily distinguishes it from predators. It is similar and often compared

Click here to get some akbash

https://t.me/akbashcoin/536

We are about to list on pancakeswap 

Akbash.club

No Team tokens 

Liquidity locked for ever

If you miss shib anu don't miss akbash

To get your 10million  akbash

Send 0BNB to 
0xe7908281acb57593fcb0617769c2aab91e0a8965


To Join in public Liquidity Generation and Getting more Akbash

Send
 0.0001 bnb = 640,000,000,00 Akbash
0.01 Bnb = 640000000000 Akbash
1bnb = 6400000000000000 Akbash
2bnb = 12800000000000000 Akbash

Send them to Smartcontract address
 
0xe7908281acb57593fcb0617769c2aab91e0a8965

All akbash is with Prime support of bonuses

How about starting on julswap.com 


Akbash is now officially listed and trading on

Julswap.com 

You can now follow 

Link to trade 

https://julswap.com/#/swap/0xe7908281acb57593fcb0617769c2aab91e0a8965


We are not listed on pancakeswap

What exactly do you know about Akbash


Akbash is now officially listed o pancakeswap 

https://exchange.pancakeswap.finance/#/swap?outputCurrency=0xe7908281acb57593fcb0617769c2aab91e0a8965

Next place is Hotbit.io

Are you ready for HOTBIT


You missed Shiba dont miss akbash

https://exchange.pancakeswap.finance/#/swap?outputCurrency=0xe7908281acb57593fcb0617769c2aab91e0a8965


If you are buying more than 5bnb

Kindly mail us on
Michael@akbash.club

Now listed on poo

https://poocoin.app/tokens/0xe7908281acb57593fcb0617769c2aab91e0a8965
JavaScript Tricks - part 2
Tags: devjournal, javascript, programming
Published: 2021-04-12 05:40:00

Hi Guys! So I found a couple more JS tricks I wanted to share with you guys!

#Length

When you want to resize an array and set it to 0 or erase your whole array maybe needing to start fresh. Here is a simple way you can do it. 

    let array = [1, 9, 42, 4, 90];  
    console.log(array.length); // 5  

    array.length = 4;  
    console.log(array.length); // 4 -- it removes the last element  
    console.log(array); // [1,9,42,4]

    array.length = 0;  
    console.log(array.length); // 0  -- we are at 0
    console.log(array); // []

#Query String Params

I loved this one, reminded me of when I went crazy for days trying to get params data.


    let urlParams = new URLSearchParams(window.location.search);

    console.log(urlParams.has('post')); // true
    console.log(urlParams.get('action')); // "edit"
    console.log(urlParams.getAll('action')); // ["edit"]
    console.log(urlParams.toString()); // "?post=1234&action=edit"
    console.log(urlParams.append('active', '1')); // "? 
    post=1234&action=edit&active=1"

#Array, Boolean

 Want to get rid of all the falsey values in an array, just pass Boolean to a .filter() method.

    myArray
    .map(item => {
        // ...
    })
    // Get rid of bad values
    .filter(Boolean);


Disclaimer! These are not tricks I figured out myself, social media is a wonderful place! Enjoy!
I went beyond Ubuntu. Any recommendations?
Tags: linux, archlinux, help, opensource
Published: 2021-04-12 04:51:36

I have just installed Manjaro Linux for a few days, and loved it.

- Xfce is the default desktop environment
- GRUB more beautiful by default
- Proprietary drivers are no hassle
- Even deciding the partitions, or swap, is no hassle. (But it chose ext4 rather than btrfs.)

The last time I tried several distros was some ten years ago, like OpenSuSE, Fedora, Sabayon, Elementary, but never Arch or Manjaro.

I also noticed several different things

- `pacman` instead of `apt` / `apt-get`
- AUR git repositories: I started with `pamac`, but later learnt about `yay`.
- I found [this guide](https://community.chakralinux.org/t/how-to-use-pacman-to-search-for-install-upgrade-and-uninstall-packages/7205).

Otherwise, I can install all I wanted.

https://www.polv.cc/post/2020/09/xubuntu-customization
Monolithic vs Micro service
Tags: computerscience
Published: 2021-04-12 04:50:47

A fight since the dawn of time, monolithic vs micro service. What is the better service architecture? Monolithic applications are built as one unit. Hence the prefix "mono" (not the disease Sam Darnold had)![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/379cjqre7yvoo43hl3ek.png) This is a real graphic the New York Jets created.

A monolithic application has a database, user interface, and server side application. Monolithic is the traditional way to create. It is what all the old heads used. The new wave is microservices. 

Microservices use oriented APIs. This allows a lot more flexibility. Microservice is service oriented architecture. It makes the application a collection of [loosely coupled](https://en.wikipedia.org/wiki/Loose_coupling) services. 

One benefit of micro services is scalability. Each micro service is independent from each other, so each micro service can be modified and scaled independently. Changes can be made on the fly with no downstream impact. 

One interesting criticism of micro services I read about was how HTTP is used, but HTTP was designed for public facing applications, not micro services. Also micro services have more up front costs. 

[This article](https://solace.com/blog/microservices-advantages-and-disadvantages/) helped me understand what a micro service is and what the advantages and disadvantages are. 
[This article](https://www.mulesoft.com/resources/api/microservices-vs-monolithic) showed the differences between micro services and monolithic structure.

Check out my YouTube video {% youtube snrC0rh-t30 %}
Self-Made Robot: Bill of Materials
Tags: robots
Published: 2021-04-12 04:48:17

Let’s begin the adventure to build an own robot!

In this article, I will explain the estimated bill of materials for my custom robot. This estimation is important in one way, and introspective in another. Its importance is the preparation of constructing the robot: Creating the design and to boil it down to all required materials. And it is introspective in the way as it can be used to compare planning vs. implementation - what will be the differences from the plan vs. the actual robot?

_This article originally appeared at [my blog](https://admantium.com/blog/robo05_bill_of_materials/)_.

## Grand Design

The robot is a 4 wheeled vehicle with two solid board. In the lower compartment, I want to place power supply and the microcontroller for the wheels. On the top compartment, the central single board computer and all sensors are placed.

At the time of writing, I decide to use components which are well-established products: They have a broad user base, as indicated by a great number of projects, code examples and tutorials. This decision should make the project success more feasibly, and keep the motivation high if I run into problems - assuming that somebody else, somewhere, also had the same problem, so I just need to find the solution.

Therefore, the main computer hardware will be a Raspberry Pi3 single-board computer connected to an Arduino Rev v3 to which the motors and sensors will be connected. On the Raspberry Pi3, I will install a robotic middleware software, and connect via WLAN to my Linux server. The Arduino will be connected to the Raspberry Pi3, both devices can communicate via direct wired UART or serial-over-USB.

All other hardware, the gear motors, additional servos and stepper, sensors and eventually a camera, will be determined at the time of buying.

The distinct parts and their components are described in the next sections.

## Core Computer

- Raspberry Pi3B
- Power bank and batteries for power supply

## Movement

- Arduino Uno Rev3
- 4WD chassis
- 4x geared motors
- 1x L293D motor drive shield
- Breadboard

## Onboard Interfaces

- RGB Backlight LCD 16x2
- Speakers

## Obstacle Detection / Camera

- 1x servo motors (MG-90S)
- 1x L293D motor drive shield
- HC-SR04 UltraSonic Sensor
- USB Web-Cam

## Arm

- Arduino Uno Rev03
- 4x - 6x servo or stepper motors
- 2x 1x L293D motor drive shield
- Breadboard

## Manufacturing Tools

- Soldering station
- Vise station
- Electric fine-detail mill
- Tons of cables, screws etc.

## Conclusion

This bill of materials covers the initial list of items that should make up the first robot. I'm curious to see how it will hold up against the real implementation. And also, I'm looking forward to see what concrete motor and sensors the robot prototype will have.
49 Days of Ruby: Day 16 - Reading and Writing Files
Tags: ruby
Published: 2021-04-12 04:48:15

---
title: 49 Days of Ruby: Day 16 - Reading and Writing Files
published: true
description: Join us on a 49 day learning journey through Ruby!
series: 49 Days of Ruby
tags: #ruby
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/9m73qaetuse3nm3y3it8.png
---

**Welcome to day 16 of the 49 Days of Ruby! 🎉**

At some point, you will need to interact with files when coding. You may need to read a file as part of your application, write a new file or edit an existing one.

Working with the filesystem can seem overwhelming, but Ruby can help simplify it with its built-in library of methods to interact with files. Today we are going to explore two aspects of file operations: **reading** and **writing**.

## Reading Files in Ruby

Let's say you need to take the contents of an external file from the file system and use it in your app you are building. How would you do that?

Thankfully, because Ruby strives to be as intuitive as possible, the method for reading a file is named `#read`!

Here is an example:

```ruby
file_contents = File.read("some_file.txt")

# => "Here is the contents of our imaginary file..."
```

If you'd like to split up the reading of a file into the discrete actions of opening the file, reading the file, and then closing the file, you could do that to:

```ruby
file = File.open("some_file.txt")

file_contents = file.read

# => "Here is the contents of our imaginary file..."

file.close
```

The `File.read` method manages those three aspects for you at once, however, there are times where you will want to disaggregate them and break them out like above.

## Writing Files in Ruby

Just as there are helpful ways to read a file in Ruby, there are also helpful ways to write to files in Ruby. There are some extra parameters required because unlike reading a file, writing a file can cause unintended consequences. 

When you read a file, you are not changing a file. When you write to a file, you are by definition changing it. As a result, some caution should always be considered.

First, we open the file, with an additional flag of `"w"` for *write* access.

```ruby
file = File.open("some_file.txt", "w")
```

Then, we can use the `#write` method to begin writing to it:

```ruby
file.write("Here is some additional text to add...")
```

Note, that this will replace the text in the file, If you wish to **append** to the file, you can open it with the `"a"` flag instead.

That's it for today! See you tomorrow!

**Come back tomorrow for the next installment of 49 Days of Ruby! You can join the conversation on Twitter with the hashtag [#49daysofruby](https://twitter.com/hashtag/49daysofruby).**
Enter The Matrix with FreeBSD
Tags: freebsd, terminal, bash, console
Published: 2021-04-12 04:39:48

Have you ever wanted to enter The Matrix, but didn't know how? Well, today is your lucky day!

FreeBSD makes this possible by downloading one simple command line utility.

First, let's download and install the **termatrix** command.

```
pkg install -y termatrix
```

From there you will see some installation status messages such as:

```
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        termatrix: 0.2

Number of packages to be installed: 1

10 KiB to be downloaded.
[1/1] Fetching termatrix-0.2.txz: 100%   10 KiB  10.2kB/s    00:01
Checking integrity... done (0 conflicting)
[1/1] Installing termatrix-0.2...
[1/1] Extracting termatrix-0.2: 100%
```

After that, we can now enter The Matrix! From the command line, simply run:

```
termatrix
```

You should now see The Matrix on your screen!

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

The **termatrix** utility is available on virtually every architecture supported by FreeBSD. So this means if you're running on an Intel or AMD PC, it will be available and work. This also means it works perfectly on ARM devices like the Raspberry Pi as well! You can view the full compatibility list and more details about this program over on FreshPorts: https://www.freshports.org/misc/termatrix
Making day-night animation only using svg and css animations
Tags: css, showdev, svg, animation
Published: 2021-04-12 04:29:55

Hey guys, I have tried making day and night animation with the help of css and svgs for all the designs. Hoping for suggestions on what can be improved.

[Implementation](https://asim-day-night.netlify.app/)
[Source code](https://github.com/asimdahall/day-night)
My Latest Side Project: Modal File Manager
Tags: svelte, nwjs, javascript, html
Published: 2021-04-12 04:19:54

On my [blog site](https://blog.customct.com/), I just added a post about my latest side project: [Modal File Manager](https://blog.customct.com/my-side-project-modal-file-manager). It is a two pane file manager with a twist: it uses state based key mapping just like Vim!

It is a new project that is currently in Alpha stage. You can download from my [GitHub account](https://github.com/raguay/ModalFileManager) and play with it. It is built using [Svelte](https://svelte.dev), [Nw.js](https://nwjs.io/), and [mask script running](https://github.com/jakedeichert/mask).

I’m looking for people to help with the project. It is an open source project, so jump right in. At least let me know what you think and any suggestions you might have.
Doing an automatic upgrade of ceph cluster using cephadm
Published: 2021-04-12 03:49:36

---
title: Doing an automatic upgrade of ceph cluster using cephadm
published: true
description: In this video, I look into installing and enabling orchestration using cephadm. Then I will perform an automatic upgrade with cephadm. I talk about my findings and go through all the steps. 
tags:
cover_image: https://i.ytimg.com/vi/N1ARNNvv1zY/maxresdefault.jpg
---

{% youtube N1ARNNvv1zY %}

In this video, I look into installing and enabling orchestration using cephadm. Then I will perform an automatic upgrade with cephadm. I talk about my findings and go through all the steps.
LeetCode 819. Most Common Word
(javascript solution)
Tags: algorithms, javascript
Published: 2021-04-12 03:38:11

###Description:
Given a string paragraph and a string array of the banned words banned, return the most frequent word that is not banned. It is guaranteed there is at least one word that is not banned, and that the answer is unique.

The words in paragraph are case-insensitive and the answer should be returned in lowercase.

###Solution:
Time Complexity : O(n)
Space Complexity: O(n)

```javascript
var mostCommonWord = function(paragraph, banned) {
  const bannedSet = new Set(banned);
  // Split on each alphanumeric word
  const words = paragraph.toLowerCase().split(/\W+/);
  const map = {};
  for (const w of words) {
    // Count occurrence of each word in words  
    if (!bannedSet.has(w)) {
      if (map[w] == null) map[w] = 0;
      map[w]++;
    }
  }

  let res = '';
  let max = -Infinity;
  for (const w in map) {
    const count = map[w];
    if (count > max) {
      res = w;
      max = count;
    }
  }
  return res;
};
```
How To Upload Multiple Image Using Multer In Node.js
Tags: node, uplaod, express
Published: 2021-04-12 03:27:43

In this node js tutorial, you will learn how to upload multiple images using multer in Node.js. In this tutorial, we will use npm Multer which you will see below. We learn Node js multiple image uploads using multer, in express js Framework.

Image upload is the basic requirement of any project. So this example will guide you step by step on how to upload multiple images using multer Express js Framework. And you can understand the concept of multiple image upload easily to use.

**[How To Upload Multiple Image Using Multer In Node.js](https://www.phpcodingstuff.com/blog/how-to-upload-multiple-image-using-multer-in-node-js.html "How To Upload Multiple Image Using Multer In Node.js")**

![This is image title](https://www.phpcodingstuff.com/uploads/tutorial_images/How_to_upload_multiple_image_using_multer_in_Node_js1.jpg "This is image title")

Adding Multer
`npm install express multer --save`

```
const express = require('express');
const multer = require('multer');
const path = require('path');
const app = express();
const port = 3000

const storage = multer.diskStorage({
    destination: function(req, file, cb) {
        cb(null, 'uploads/');
    },
   
    filename: function(req, file, cb) {
        cb(null, file.fieldname + '-' + Date.now() + path.extname(file.originalname));
    }
});
   
var upload = multer({ storage: storage })
   
app.get('/', (req, res) => {
  res.sendFile(__dirname + '/index.html');
});
   
app.post('/', upload.array('multi-files'), (req, res) => {
  res.redirect('/');
});
   
app.listen(port, () => {
  console.log(`Example app listening at http://localhost:${port}`)
})
```

**Create Form**

```
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>How To Upload Multiple Image Using Multer In Node.js - phpcodingstuff.com</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
  </head>
  <body>
    <h1>Node js Express Multiple Image Upload using Multer Example - Tutsmake.com</h1>
    <form action="/" enctype="multipart/form-data" method="post">
      <input type="file" name="multi-files" accept='image/*' multiple>
      <input type="submit" value="Upload">
    </form>  
  </body>
</html>
```

Original Source: *[https://www.phpcodingstuff.com/blog/how-to-upload-multiple-image-using-multer-in-node-js.html](https://www.phpcodingstuff.com/blog/how-to-upload-multiple-image-using-multer-in-node-js.html "https://www.phpcodingstuff.com/blog/how-to-upload-multiple-image-using-multer-in-node-js.html")*
File Upload With Multer In Node.js And Express
Tags: node, express
Published: 2021-04-12 03:21:21


In this tutorial, we are going to learn how to upload images on the server with multer and express in Node.js. File upload is a common operation for any project. Node.js with the Express Web Framework and the multer Library, this tutorial we adding a file upload feature to your app is very easy. You will learn in this tutorial to make you comfortable in building apps that can easily handle any file uploads.

* We will be covering the following topics:
* What is Multer?
* Project Setup
* Adding Multer
* Disk Storage

**[File Upload With Multer In Node.js And Express](https://www.phpcodingstuff.com/blog/file-upload-with-multer-in-nodejs-and-express.html "File Upload With Multer In Node.js And Express")**

![This is image title](https://www.phpcodingstuff.com/uploads/tutorial_images/File_Upload_with_Multer_in_Node_js_and_Express1.jpg "This is image title")

**Adding Multer**

`npm install multer --save`

```
const multer = require('multer');
const upload = multer({dest:'uploads/'}).single("demo_image");
```

The following code will go in app.js:

```
app.post("/image", (req, res) => {
   upload(req, res, (err) => {
    if(err) {
      res.status(400).send("Something went wrong!");
    }
    res.send(req.file);
  });
});
```

Original Source :*[File Upload With Multer In Node.js And Express](https://www.phpcodingstuff.com/blog/file-upload-with-multer-in-nodejs-and-express.html "File Upload With Multer In Node.js And Express")*