teleren/devto huggingface dataset:
Pop!_OS - Linux for devs
Tags: linux, productivity
Published: 2020-07-20 09:55:08

### What is Pop!_OS
> Pop!_OS is an operating system for STEM and creative professionals who use their computer as a tool to discover and create. Unleash your potential on secure, reliable open-source software. Based on your exceptional curiosity, we sense you have a lot of it. - system76

### Why use Pop!_OS over other distros
* Designed for __fast navigation__
* Fluid workspaces focused for convenient workflow
* Encourages you to make something new

I have been using Linux for last 2 to 3 years but I am yet to come across a distribution which has been a *developer-centric* operating system.

{% youtube v9oVZwJrjOc %}

### It claims that a number of dev toolkits work flawlessly 
* Deep learning
 1. [Tensorman](https://support.system76.com/articles/use-tensorman/)
 2. Tensorflow
 3. PyTorch
 4. Cafe
 5. Jupyter
 6. Matlab

* Engineering
 1. VS code
 2. ROS
 3. KiCad
 4. Cafe
 5. Android Studio
 6. Arduino IDE

> It also supports Media production and Bioinformatics, check [here](https://pop.system76.com/) for more info

### Some key features
1. Encrypted install by default with full-disk encryption out of the box
2. No forced updates
3. Privacy centric - Minimal OS and hardware data is used but not stored
4. Automatic firmware updates
5. Hybrid graphics
6. Preconfigured for gaming on Linux
7. System-wide dark mode

### Personal thoughts
Although I have been using Arch for a while now when I saw Pop!_os it almost made me want to jump ships. I tried it out and it just worked perfectly. As mentioned earlier this feels very "productivity-focused" distribution. The workflow on this thing is amazing and to my surprise, they also have their own tiling manager called `pop shell`. It adds an extra layer to the environment and makes it a serious choice for power-users. This will surely boost your productivity once you get used to it. 

{% youtube -fltwBKsMY0 %}

Hope this helped 💖
Running WASM on node.js
Tags: ssvm, webassembly, node
Published: 2020-07-20 09:48:48

---
title: Running WASM on node.js
published: true
description: This post explores SSVM. SSVM is the fastest WebAssembly virtual machine. It is also much faster than Docker in both cold start and at runtime.
tags: ssvm, webassembly, nodejs
//cover_image: https://direct_url_to_image.jpg
---

Getting started with Web Assembly is super easy with [SSVM](https://www.secondstate.io/ssvm/). It allows you compile high performance Rust functions into WebAssembly (wasm file), and call them from Node.js/deno applications. So, you get best of both worlds.

While manual installation has its perks and also headaches, I prefer docker image for quick tests and ssvm is easy to setup in Docker. Ensure you have docker installed to go through following steps.

**Steps:**

1. Clone the repo: https://github.com/second-state/rust-wasm-ai-demo

```bash
$ git clone https://github.com/second-state/rust-wasm-ai-demo.git
```

2. Go into the cloned directory `rust-wasm-ai-demo` and do the following.
```bash
# create the Dockerfile
$ cat >> Dockerfile <<EOL
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
ENV RUSTUP_HOME=/usr/local/rustup \
    CARGO_HOME=/usr/local/cargo \
    PATH=/usr/local/cargo/bin:$PATH
RUN apt-get update \
    && apt-get install -y tzdata \
    && apt-get -y upgrade && apt-get install -y build-essential curl wget git vim libboost-all-dev
RUN curl -sL https://deb.nodesource.com/setup_14.x |  bash \
    && apt-get install -y nodejs \
    && npm install -y -g ssvmup --unsafe-perm \
    && npm install -y ssvm \
    && npm install express express-fileupload
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
EOL

# build the image
$ docker build -t ssvm-nodejs:v1 .

# run the docker container exposing port 8080 which is 
# where express server is listening. 
# also mounting the current directory to `/app`
$ docker run -p 8080:8080 --rm -it -v $(pwd):/app ssvm-nodejs:v1

## ---------------------------------------- ##

# when you run above command, 
# you will be in the container's shell:

$ cd /app

# build the WASM bytecode 
$ ssvmup build

# install node dependencies
$ cd /app/node
$ npm init -y
$ npm install express express-fileupload

# run the webserver
$ npm start

```

If all went correctly, you should have a running web server with Image Recognition capability. Point your browser to http://localhost:8080 and enjoy. 😊 


**Reference Repos:**

* [rust-wasm-ai-demo](https://github.com/second-state/rust-wasm-ai-demo)
* [image recognition in nodejs](https://www.secondstate.io/articles/artificial-intelligence/)
* [get a raspberry pi for free](https://www.secondstate.io/articles/raspberry-pi-for-free-20200709)
Python - Simple and beautiful
Tags: python, tutorial, beginners
Published: 2020-07-20 09:29:26

### Hello 👋

I want to show you, what Python works. How to write functions and if's.

_I'm new in Python, i previous worked with C# and other languages which have a compiler._

_Python don't needs a compiler. It's an script language. The good is, you can code everywhere and just need to run this file._

_But if you code a error, for example Syntax-Error, the program neeeds to go to the line. A Compiler check this on compiling and will show it._

### Define a variable
```python
# Define a boolean
MyVariable = True

# Define a string
WelcomeText = "Welcome"

# Define a array
Names = ['Some', 'Body']
```

### Print/Write to Console
```python
# Print a defined text
print("I am at the Console!")

# Print a string
print(WelcomeText)

# Print a multiple Strings/Text
print(WelcomeText + ' User')
```

### If-Clauses
```python
if MyVariable == True:
    # Do something
```

### Functions
```python
# Define a new function
def Welcome:
    print(WelcomeText)

# Run Function
Welcome()
```

### For Loops
```python
for user in names:
    print(WelcomeText + ' ' + user)
```

### So yeah 🎉

Python is a beatiful language, what mean formatting.

I think it's easy to understand, and i would use Python for small scripts for Linux, Windows and macOS.

For more help, ask me or search in the world-wide-web.
Heya, I'm Shivani!🐣
Tags: newbiedev
Published: 2020-07-20 09:02:50


I have just joined this amazing platform and I'm new to this "DEV"🤩 Community. I'm a Flutter Developer, Web Developer,  Python Coder, Linux Lover, UI/UX enthusiast exploring in world of tech!💕 Find some projects of mine along with some details about me on the links given below;) 

And yes, I'm a final year IT🥳 Engineering Student! :) 

Find me on Github👀 - https://github.com/Singh-Shivani
Also, LinkedIn👀 - https://www.linkedin.com/in/shivani-singh-86b640192/


DevAlwaysRocks!!🔥
Curated dataset for recommender system
Tags: machinelearning, datascience
Published: 2020-07-20 08:58:23

Every recommender system begins with the right data, which is often not readily available for someone starting their journey in the field. We at [Caboom](https://caboom.ai/?utm_source=dev-to&utm_medium=post&utm_campaign=datahub), are committed to helping you learn, develop, and deploy personalized recommender systems. 

There are a number of publicly available datasets available these days. However, a lot of our users have said that it is difficult to find the dataset that matches their domains. Most people also struggle when it comes to figuring out how to build recommender systems to prove its feasibility. 

So, to make things simpler, we have [curated the right datasets](https://caboom.ai/datahub/recommendation-system-dataset?utm_source=dev-to&utm_medium=post&utm_campaign=datahub) for you to get started on your recommendation systems. We have categorized the datasets as per different domains like movies, books, finance, retail, job, music, food, etc so that you can find the one matching your use-case the best easily.

This will not only be a great way to find the right datasets, but we will also be adding comprehensive exploratory analysis and implementation of recommender algorithms in the future.
Get access to the complete dataset [here](https://caboom.ai/datahub/recommendation-system-dataset?utm_source=dev-to&utm_medium=post&utm_campaign=datahub).
Cat Login Detection
Tags: cat, php, security, showandtell
Published: 2020-07-20 08:33:33

---
title: Cat Login Detection
published: true
description: A short piece of code to recognise whether a cat is logging in from your desktop/laptop
tags: #cat #php #security #showandtell
//cover_image: https://direct_url_to_image.jpg
---

I was taking a quick break from work last week when my cat predictably took up napping position on my keyboard. When I looked at the monitor I noticed she had tried to login, and a question dawned on me: 
<i>In an age where we use machine learning to detect changes in the inflection in a voice and process hundreds of thousandths of images in seconds, why do we not tell the user that their cat is trying to login to the application they're using and impersonate them? </i>

OK maybe that's not what the cat is doing, but either way it seemed like a great opportunity for an easter egg.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/l9o0hs1ofif6ibfvik9x.PNG)

Maybe not the smartest detection setup, but assuming the user is not using software to allow for non-blocking key input detection, I decided counting the characters provided and searching for a character which was entered more than 'X' amount of times would suffice. The aim here was to detect whether a cat is sitting on the keyboard, so sophistication was never a priority here. 

```
private function catInputDetected($s)
{
        return max(array_count_values(str_split($s))) > self::CAT_THRESHOLD;
}
```

And can you guess what self::CAT_THRESHOLD is?

```
const CAT_THRESHOLD = 9; //9 Lives
```

All that was left was to run this check against the username and password, and inform the user that their cat has no boundaries.

```
if($this->catInputDetected($username) || $this->catInputDetected($password))
{
    throw new \LengthException(
        "
          It would appear your cat has attempted to log in. 
          Please remove your cat from the workspace and try again.
        "
        );
}
```

Thanks for reading!

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/k4k7rtly9rm4rdc494vu.jpg)
A New Open Log Collector, Parser and Forwarder That Cuts 90% of Manual Work. 
Published: 2020-07-20 08:18:47

---
title: A New Open Log Collector, Parser and Forwarder That Cuts 90% of Manual Work. 
published: true
description: XPLG releases PortX, a new solution to collect, parse and ship log data, pain-free and solves one of the biggest pain points and time-consuming tasks in log analysis.
tags:
//cover_image: https://www.xplg.com/wp-content/uploads/2020/07/in-minutes.png
---

XPLG releases PortX, a new solution to collect, parse and ship log data, pain-free and solves one of the biggest pain points and time-consuming tasks in log analysis.

PortX’s engine identifies data patterns from a wide variety of applications/ systems/ cloud/ servers and represents them eﬃciently in any logging system. It collects, parses, indexes, and enriches any data, agent-less, Windows, Linux, Syslog, HTTPS. 

PortX optimizes data management costs by filtering events and data. With its built-in log data filters you can forward (ELK/logging services/SIEM) only data that matters and reduce costs substantially. 

Key features:
•	Persistency and data forwarding to log data services.
•	Load balancing.
•	Visual parsing.
•	Cloud connectors.
•	Built-in plugins.
•	Elastic (ELK) integration.
•	Templates. 
•	Pattern detection and more.

Simplifying the work with ELK stack
The ELK Stack is one of the world’s most popular log management platform since it is open source. But with any advantages, there are also pitfalls. The implementation and deployment are tedious, requires a high level of proficiency and time-consuming. 

Setting up a processing pipeline in PortX is 90% faster than it is in Logstash because there are no complex pipeline configurations to write. With this approach, customers can keep their existing investment in the ELK stack and add real-time log viewer, monitors, problem detection, predictive insights, security, data management policies, data manipulation and more.

Try PortX on your data > https://www.xplg.com/download/
Learn more: https://www.xplg.com/port-x-log-parser/
User journey through hell: 20 ways to lose access to your account
Tags: security, ux
Published: 2020-07-20 08:07:05

- your child plays with your phone and everyone is locked out of everything
- your chosen OAuth provider's server is down
- your former co-founder has changed the password and they are the only person with the details
- you lose access to the phone you use for 2FA
- you're in a different country to the phone you use for 2FA
- you lose access to the account email
- your abusive ?? has access to the account email
- your abusive ?? has changed the account email
- your abusive ?? has changed the account password
- you don't have account recovery questions
- you've forgotten the answers to the account recovery questions
- you haven't added an alternate email address
- there isn't an option to add an alternate email address
- you haven't added a connecting phone number
- there isn't an option to add a connecting phone number for account recovery purposes
- the auth code generator is too fast and by the time you're ready to copy it over it's changed again
- you ran out of attempts for the day
- a hacker changed your account details
- you need to use your legal name to use the account and you can't use your legal name for safety reasons
- your card is stuck in a malfunctioning ATM machine and you don't have access to the internet 
- your card is stuck in a malfunctioning ATM machine and you don't have access to your phone as it is dead
Start of the Week - Grab Your Plates!
Tags: devjournal, codenewbie, womenintech, codeland
Published: 2020-07-20 08:05:38

_This post was originally published on July 20, 2020 on [my blog] (https://alexlsalt.github.io/blog)._

Happy start-of-the-week, friends! I hope you had a restful weekend and are ready to hit the ground running this week :)

I have a few things on my plate:

First, I'm preparing for my [CodeLand talk] (https://codelandconf.com/) (it's on Thursday!) and I'll be doing a run-through on my own today probably.

I also have a few things coming up for [Ladies Code Collective] (https://www.ladiescodecollective.com) that I want to set on the right track for now. So, some planning and writing copy for one of my pages on the site.

Later this week, I'll want to work more on that podcast accelerator application I mentioned a few posts back. It's due at the beginning of August, but I've been getting more used to getting things done and then having relaxed, focused time to check over everything (instead of skating by at the last minute, as I've been very wont to do in the past).

Could this be the week that I finally finish my JavaScript course on Udemy? I suppose we'll soon find out!

What's on your plate this week? Leave a comment and let me know!

----------

Thanks so much for reading along! [Now let's be friends over on Twitter >>] (https://twitter.com/alexlsaltt)

P.S. Did you know I have a podcast with new episodes each Wednesday? Go listen [right over here >>] (https://www.ladiescodecollective.com/)

![The Ladies Code Collective Podcast art](https://dev-to-uploads.s3.amazonaws.com/i/nl20jdyk6b9ec2w1lms7.png)
Road to Genius: superior #55
Tags: javascript, codenewbie, computerscience, beginners
Published: 2020-07-20 07:54:11

Each day I solve several coding challenges and puzzles from Codr's ranked mode. The goal is to reach genius rank, along the way I explain how I solve them. You do not need any programming background to get started, and you will learn a ton of new and interesting things as you go.

```JS
function MinStack() {
    this.stack = []
    this.MS = []
};

MinStack.prototype.push = function(x) {
    this.stack.push(x)
    if (this.MS.length == 0 || x <= this.MS[this.MS.length - 1]) {
        this.MS.push(x)
    }
};

MinStack.prototype.pop = function() {
    const x = this.stack.pop()
    if (x !== void 0 && x === this.MS[this.MS.length - 1]) {
        this.MS.pop()
    }
};

MinStack.prototype.top = function() {
    return this.stack[this.stack.length - 1]
};

MinStack.prototype.min = function() {
    return this.MS[this.MS.length - 1]
};

var obj = new MinStack()
obj.push(20)
obj.push(15)
obj.push(16)
obj.push(3)
obj.push(18)

let A = obj.top() + obj.min();

// A = ? (number)
```

In today's challenge we are looking at some kind of special "stack" class called `MinStack`.

The last few lines of code is what we have to analyze: first the code pushes a bunch of numbers to this stack, finally it's asking for the answer:
```JS
obj = MinStack()
obj.push(...)
A = obj.top() + obj.min()
// A = ?
```

The constructor of `MinStack` creates two empty arrays `MS` and `stack`, so that's all there is to it. The push function adds the argument to the `stack` array, and if the number satisfies the if-condition it's also added to `MS`. This particular condition checks if `MS` is empty, or that the latest element in `MS` is greater than or equal to the number. In a nutshell this adds the number to `MS` if it's smaller than the latest number inside (or if it's empty of course). Hence the name `MinStack`, it's keeping track of the smallest numbers in the stack structure.

Here's some pseudo-code that to help us solve the challenge: 
```
stack = []
MS    = []

push(20)
stack = [20]
MS    = [20]

push(15)
stack = [20, 15]
MS    = [20, 15]

push(16)
stack = [20, 15, 16]
MS    = [20, 15]

push(3)
stack = [20, 15, 16, 3]
MS    = [20, 15, 3]

push(18)
stack = [20, 15, 16, 3, 18]
MS    = [20, 15, 3]


A = top() + min()
A = 18    + 3
a = 21
```
![coding challenge answer](https://dev-to-uploads.s3.amazonaws.com/i/n8wegpt2qucvtgdb7f02.png)

By solving these challenges you train yourself to be a better programmer. You'll learn newer and better ways of analyzing, debugging and improving code. As a result you'll be more productive and valuable in business. Get started and become a certified Codr today at https://nevolin.be/codr/
Open source 📖
Tags: beginners, news, watercooler
Published: 2020-07-20 07:53:29

The [GitHub Archive Program](https://archiveprogram.github.com/) 🤍 is an initiative to preserve open source software for future generations.

And if you've contributed to an open source project which has been selected for archive. Well that' an honour in its self. You will notice a new badge on your GitHub profile.

And I hope this inspires people to continue to contribute to open source projects in the future. So if I can do it. Well so can you 🌍
Happy birthday Django! 🎂
Tags: python, django, news
Published: 2020-07-20 07:48:57

---
title: Happy birthday Django! 🎂
published: true
description: Django was introduced 15 years ago.
tags: python, django, news
//cover_image: https://direct_url_to_image.jpg
---

Django is 15 years old!

{% twitter 1284125169229787136 %}

Do you have a Django story to share?
Bringing localization into your Widget testing
Tags: widgettesting, unittesting, flutter, mockito
Published: 2020-07-22 03:09:12

---
title: Bringing localization into your Widget testing
published: true
date: 2020-07-20 07:16:01 UTC
tags: widgettesting,unittesting,flutter,mockito
canonical_url: https://medium.com/wyzetalk-tech/bringing-localization-into-your-widget-testing-121ef7eec7c
---

![](https://cdn-images-1.medium.com/max/1024/1*KcSljL8cBi93F7WyFYOYQg.jpeg)

The more accurate you make your test, the higher the quality of the test itself.

Many apps these days are built to be more accessible, one thing we do to ensure this is we localize our applications, allowing people who do not speak the same language as we do, to also use the application.

In our application, we have been using [easy\_localization](https://pub.dev/packages/easy_localization), I know there are quite a few choices, but for us, this was one of the easier ones to implement and for us, the JSON support was a big win with how we manage our localization.

To ensure we have the most accurate widget tests, we rather use “real” localizations than having to mock the helper classes.

To do this we keep a local copy of the locale JSON files to keep them safe from external updates and have created a helper function createLocalizedWidgetFortesting which looks like:

```dart
Widget createLocalizedWidgetForTesting({Widget child}) {
  return EasyLocalization(
    path: '$TEST\_MOCK\_STORAGE/locale',
    useOnlyLangCode: true,
    assetLoader: FileAssetLoader(),
    fallbackLocale: const Locale('en'),
    supportedLocales: globals.supportedLocale,
    saveLocale: false,
    child: MaterialApp(
      home: Scaffold(
        body: child,
      ),
    ),
  );
}
```

As you will see, EasyLocatlizationrequires a path, that is simply a constant that we have defined a little higher in the file, as it is used as part of other mocks.

```dart
const TEST\_MOCK\_STORAGE = './test/fixtures/core';
```

Beyond that, everything else is pretty much how it is set up in main.dart.

Here is a simplified example of how a test would look with this implementation.

```dart
void main() {
  testWidgets(
    'Should render localized widget',
    (
      WidgetTester tester,
    ) async {
      await tester.pumpWidget(
        createLocalizedWidgetForTesting(
          child: SampleWidget(),
        ),
      );

      await tester.pumpAndSettle();

      // expectations to follow
    }
  );
}
```

Through this would be able to run proper expectations like:

```dart
expect(find.text("Sample localized text", findsOneWidget);
```

More importantly, if you have a language switcher that a user can select you can test for text changes through a setup flow.

I hope you found this useful if you want to learn more about flutter testing why not take a look at some of the other posts we have written…

[Widget testing passed in function](https://dev.to/remejuan/widget-testing-passed-in-function-kpi)

* * *
I Challenge You!
Tags: developer, 100daysofcode
Published: 2020-07-20 07:02:48

Hey, you awesome developer, you want to get in on a secret of becoming even better?

Practice and learn! Today I'm going to challenge you to improve yourself; no matter what level you are currently, you can always improve.

## 100daysofcode Challenge

One challenge which is absolute love, because of the community, is the #100daysofcode challenge.

You can find it here: [100daysofcode.com](https://www.100daysofcode.com/).

Please sign up and start tweeting your progress.

Also, feel free to follow me on [Twitter](https://twitter.com/DailyDevTips1)!

## Why is a Challenge Good?

A challenge keeps you active, motivated, and accountable.
You can define what you are focussing on.
You can, for instance, do actual coding tests, but even reading up on things is good!

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
Android Tips for new bee in 2020
Tags: android, showdev, beginners, 2020
Published: 2020-07-20 07:02:05

Hi All,

I compiled my thoughts for new bees to android. There is lot on net that one has to unclutter before he/she can make sense for Android App development. I tried capturing the must knows and keep the focus so one should not feel lost. As android is under development from last many years. People tend make assumptions thus giving nightmares to new bees.
Below is the link for the video.

{% youtube 579vh6S3oMA %}