teleren/devto huggingface dataset:
I run Livebook (Elixir)
Tags: elixir, livebook, time4vps
Published: 2021-04-16 01:54:29

I am not good at English.
I use [DeepL](https://www.deepl.com/translator) a lot.

[日本語版](https://qiita.com/torifukukaiou/items/3847c68293ed9b94ba2d)

[Graphing support via VegaLite has arrived to Livebook! をイゴかしてみる(Elixir)](https://qiita.com/torifukukaiou/items/d9813aad1d3f5790b9ae)

# Introduction

- I hope you enjoy [Elixir](https://elixir-lang.org/) :bangbang::bangbang::bangbang:
- Now that [Livebook](https://github.com/elixir-nx/livebook) is out there, let's try it out!
- For a detailed explanation, see [Announcing Livebook](https://dashbit.co/blog/announcing-livebook).
- I'm embarrassed to admit that I first saw this in [a tweet on April 1st](https://twitter.com/josevalim/status/1377354990969233411), so - I thought it was an April Fool's joke!
- It's really real!

# [Demo](https://livebook.torifuku-kaiou.tokyo/)
- https://livebook.torifuku-kaiou.tokyo/
  - password: `enjoyelixirwearethealchemists`
  - https://github.com/elixir-nx/livebook/tree/e10f43e5b53a75a857106df04bd45d37629f4ebf
- I'll keep it running for a month, so please feel free to play with it.
  - until 06/23/2021
- It is running on a virtual private server called [Time4VPS](https://www.time4vps.com/).
- I don't care what you do with it, as it was made exclusively for this purpose.
- RAM 2GB, Storage 20GB

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


# Requirements
- Elixir 1.12, later

# Run
- Would you please refer to [README](https://github.com/elixir-nx/livebook/blob/539cb8e2b188ab2d2ab3022b9b41c0d28a5a6a51/README.md)?

```
$ git clone https://github.com/elixir-nx/livebook.git
$ cd livebook
$ mix deps.get --only prod
$ MIX_ENV=prod mix phx.server
```

Visit: http://localhost:8080/?token=pn6rnkqs44livrm2jgad5dkjof4wlgqe

- The token is example.

# Wrapping Up 
- Awesome!
- Amazing!
- Unbelievable!
- I will keep an eye on this.
- Enjoy [Elixir](https://elixir-lang.org/)!

Thanks!
TIL CSS v* units
Tags: todayilearned, gamedev, webdev, css
Published: 2021-04-16 01:10:31

2021-04-15

When games and browsers combine! I'm displaying text for a web visual novel using TuesdayJS and I'm running into font visibility issues on some devices. 

Fortunately CSS has some useful units that work relative to the viewport! There's

* vw - 0.01x of the viewport width
* vh - 0.01x of the viewport height
* vmin - 0.01x of the smaller of the two dimensions
* vmax - 0.01x of the greater of the two dimensions

So far using a font size based on the vmin gives me a result that seems to work nicely on different screens.
The open source Calendly alternative is here
Tags: opensource
Published: 2021-04-16 01:06:12

Calendso is the open source Calendly alternative. Self host it, or have it hosted in the cloud. Integrate it seamlessly into your business with advanced customization and the open API. White-label by default, and designed to be a joy to use for you and your visitors.

<a href="https://www.producthunt.com/posts/calendso?utm_source=badge-top-post-badge&utm_medium=badge&utm_souce=badge-calendso" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=291910&theme=light&period=daily" alt="Calendso - The open source Calendly alternative | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>


Please support by giving a vote and leaving a comment telling why you love Calendso: https://producthunt.com/posts/calendso

<a href="https://www.producthunt.com/posts/calendso?utm_source=badge-review&utm_medium=badge&utm_souce=badge-calendso#discussion-body" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/review.svg?post_id=291910&theme=light" alt="Calendso - The open source Calendly alternative | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>

Feel free to check it out, set up your own copy, and fork it.
https://github.com/calendso/calendso
React Functional over Class components ? 🤔
Tags: javascript, react
Published: 2021-04-16 01:03:01


Component is a reusable part that should be able to use anywhere inside user interface.

There are two way to create component, first using functional component and second using class component, I prefer using functional except when I need using state management or take benefit from lifecycle, here is why

## Functional component or stateless component
- Just function that return HTML
- Give solution without managing state and able to consume props 
```js
    function Hey(props){
        return <h1> hello {props.name}</h1>
    } 
    export default Hey
```
- No render method, just return
- Component lifecycle such as mounting and updating doesn't exist, instead functional component using `useEffect()` to replicate lifecycle behavior, and `useState()` to store state 

## Class component or stateful component
- Classes that extends component class from react library
- Managing state `this.setState` and able to consume props with `this.props`
- Have render() method, and must using it to render HTML 
- Have three phases of lifecycle there is mounting, updating, unmounting
    - Mounting: when putting elements into the DOM (constructor, getDrivedStateFromProps, render, componentDidMount)
    - Updating: when component is updated (getDerivedStateFromProps, shouldComponentUpdate, render, getSnapshotBeforeUpdate, componentDidUpdate)
    - Unmounting: when component remove from the DOM (componentWillUnmount)
```js
    import React, { Component } from "react";
    class Hey extends Component{
        constructor(props) {
            super(props);
            this.state = {
                name:'';
            }
        }
        render() {
            return(
               <h1> Hey {this.state.name} </h1>
            )
        }
    }
    export default Hey
```

### So why functional components ? 
- Less code
- More readable because it's like a plain javascript function 
- More easy to separate from container

### Conclusion
If you don't need your own state or access lifecycle, use functional component as much as possible
Prevent app crash Node JS
Tags: node, crash, errors
Published: 2021-04-16 00:42:54

There are two main reasons why our node application crashes, uncaught exceptions, and unhandled rejections

While the correct way to fix this problem would be to handle all these exceptions and rejections, sometimes our application crashes due to a error in one part of the code, and this causes the entire app flow to not be able to continue

I show you how to prevent this behavior

The trick is add two listeners in the top of app, for the unhandled exceptions and rejections, this way:

```javascript
process.on('uncaughtException', (error, origin) => {
    console.log('----- Uncaught exception -----')
    console.log(error)
    console.log('----- Exception origin -----')
    console.log(origin)
})

process.on('unhandledRejection', (reason, promise) => {
    console.log('----- Unhandled Rejection at -----')
    console.log(promise)
    console.log('----- Reason -----')
    console.log(reason)
})
```

To demonstrate that works, I add a setInterval function next to the listeners

```javascript
setInterval(() => {
    console.log('app still running')
}, 1000)
```

And to make app crash, I call a function that doesn't exists

```javascript
nonExistingFunction()
```

As we can see, the uncaughtException runs, and app continues its execution

```shell
----- Uncaught exception -----
ReferenceError: nonExistingFunction is not defined
    at Object.<anonymous> (C:\Users\Jorge\Desktop\test\t.js:19:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47
----- Exception origin -----
uncaughtException
app still running
app still running
app still running
```

I let you official node JS documentation:

[Uncaught exception](https://nodejs.org/api/process.html#process_event_uncaughtexception)

[Warning: Using 'uncaughtException' correctly](https://nodejs.org/api/process.html#process_warning_using_uncaughtexception_correctly)

[Unhandled rejection](https://nodejs.org/api/process.html#process_event_unhandledrejection)
Does TDD slow you down or help you go faster?
Tags: discuss, tdd, healthydebate, productivity
Published: 2021-04-16 00:20:19

I have the impression that I spend less time doing manual testing and "thinking" about what to test when I do TDD. But I've heard very different opinions on this.

For those of you who've done a fair share of both **test-driven development** and **test-last development**, do you perceive any difference in the speed of getting your code to production?
🎉 Announcement - API testing in python course live on Test automation university
Tags: testautomation, testing, python
Published: 2021-06-18 02:26:34

---
title: 🎉 Announcement - API testing in python course live on Test automation university
published: true
date: 2021-04-16 00:00:00 UTC
tags: Testautomation,Testing,Python
canonical_url: https://automationhacks.io/2021/04/16/python-api-automation-framework-course
---

![TAU course header](https://automationhacks.io/assets/images/2021/04/tau-course.png)

This post is a **really short** announcement.

I’m really happy 😄 and excited to announce that the video course for the entire blog series on building an API test automation framework using Python is live on[Test automation university](https://testautomationu.applitools.com) under the[API Python path](https://testautomationu.applitools.com/learningpaths.html?id=api-python-path)

[Course link: 👉🏼 API Testing in python](https://testautomationu.applitools.com/python-api-testing/)

As always, this is a **FREE** offering for the community on the platform

We dive deeper into each of these areas (covered in the blog) and I throw out additional insights and anecdotes along the way

Thanks to the platform you have full transcripts available with source code links and even quizzes to test whether you got everything down

Go ahead. Dig in. 😉

As always, Do share this with your friends or colleagues and if you have thoughts or feedback, I’d be more than happy to chat over at twitter or comments. Until next time. Happy Testing and coding.

Here is the entire course in blogs as well.

- [Python API test automation framework (Part 1) Introduction, Setup and Installation](/2020/11/23/python-api-automation-framework-part1-python-and-dependencies-setup)
- [Python API test automation framework (Part 2) Making HTTP requests](/2020/11/27/python-api-automation-framework-part2-making-http-requests)
- [Python API test automation framework (Part 3) Writing Fluent assertions](/2020/12/07/python-api-automation-framework-part3-fluent-assertions-using-assertpy)
- [Python API test automation framework (Part 4) Working with XML using LXML](/2020/12/17/python-api-automation-framework-part4-working-with-xml-using-lxml)
- [Python API test automation framework (Part 5) Working with JSON and JsonPath](/2020/12/25/python-api-automation-framework-part5-working-with-json)
- [Python API test automation framework (Part 6) API response schema validation](/2020/12/28/python-api-automation-framework-part6-api-response-schema-validation)
- [Python API test automation framework (Part 7) Refactoring structure](/2021/01/08/python-api-automation-framework-part7-refactoring-structure)
- [Python API test automation framework (Part 8) Adding reporting with report portal](/2021/02/03/python-api-automation-framework-part8-adding-reporting-with-report-portal)
- [Python API test automation framework (Part 9) Running tests in parallel](/2021/02/23/python-api-automation-framework-part9-running-tests-in-parallel)
How to check if a date is today or the current date in JavaScript?
Tags: javascript
Published: 2021-04-16 00:00:00

---
  title: How to check if a date is today or the current date in JavaScript?
  published: true
  tags: JavaScript
  date: Fri Apr 16 2021 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/check-if-date-is-today-or-current-date-javascript
  cover_image: https://melvingeorge.me/_next/static/images/main-ebc8f14165d9aa820ec53ea38fbc90a6.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/check-if-date-is-today-or-current-date-javascript)
  
To check if a date is today or the current date, we check the `day`, `month`, and `year` of that date with the current date's using the `getDate()`, `getMonth()`, and `getYear()` methods from the `Date` object in JavaScript.

### TL;DR

```js
// Function to check if a date is today or not
function isDateToday(date) {
  const otherDate = new Date(date);
  const todayDate = new Date();

  if (
    otherDate.getDate() === todayDate.getDate() &&
    otherDate.getMonth() === todayDate.getMonth() &&
    otherDate.getYear() === todayDate.getYear()
  ) {
    return true;
  } else {
    return false;
  }
}
```

For example, let's imagine we have a date of `18 July 2020` (this is a valid date string or you can pass any valid date string) and we want to check if this date is the current date. So let's pass this date string to the `Date()` constructor to make it into a `Date` object.

It can be done like this,

```js
const otherDate = new Date("18 July 2020"); // Valid Date string
```

Now let's get the current date using creating a new `Date` object like this,

```js
const otherDate = new Date("18 July 2020"); // Valid Date string
const todayDate = new Date();
```

Now, all we need is to check whether the `day`, `month` and `year` of both dates match with each other.

It can be done like this,

```js
const otherDate = new Date("18 July 2020"); // Some other date
const todayDate = new Date(); // Current or today's date

// Check if the other date matches today's date
if (
  otherDate.getDate() === todayDate.getDate() &&
  otherDate.getMonth() === todayDate.getMonth() &&
  otherDate.getYear() === todayDate.getYear()
) {
  console.log("The date is today!");
} else {
  console.log("The date is not today!");
}
```

See the above code live in [JSBin](https://jsbin.com/bonaqesiva/2/edit?js,console).

That's all! 😃

If you want the whole code as a utility function here it is,

```js
// Function to check if a date is today or not
function isDateToday(date) {
  const otherDate = new Date(date);
  const todayDate = new Date();

  if (
    otherDate.getDate() === todayDate.getDate() &&
    otherDate.getMonth() === todayDate.getMonth() &&
    otherDate.getYear() === todayDate.getYear()
  ) {
    return true;
  } else {
    return false;
  }
}
```

### Feel free to share if you found this useful 😃.

---
Product Management vs. Product Ownership
Tags: scrum, agile, productmanagement, productownership
Published: 2021-04-19 08:58:06

---
title: Product Management vs. Product Ownership
published: true
date: 2021-04-16 00:00:00 UTC
tags: scrum,agile,productmanagement,productownership
canonical_url: https://jhall.io/archive/2021/04/16/product-management-vs.-product-ownership/
---

Once I worked in a company that was pretty dedicated to Scrum. It was not uncommon to hear people there complain about Product Management as a backwards, rigid, inhumane approach to product development. In their eyes Product Ownership was clearly the more enlightend approach, and we embraced it fully!

A couple years later I joined another company where they adopted the Product Management mindset. I heard Product Managers there talking about how backwards, rigid, and inhumane Product Ownership was. In their eyes, Product Managementw as clearly the more enlightend approach, and we embraced it fully!

This contrast opened my eyes to something that is now easy for me to see any time the topic of product ownership vs product management pops up:

No matter which school someone belongs to, they seem to have exactly the same complaints about the other.

I tested this theory with a recent [LinkedIn poll](https://www.linkedin.com/feed/update/urn:li:activity:6787283129586462720/):

![PO vs PM poll results](https://jhall.io/archive/images/poll-pm-vs-po.png)

(While those who participated had an apparent preference for the PO school, I expect this is due to a sampling bias, since I have many Scrum practitioners in my network.)

My take away from all of this:

PO vs PM is the wrong debate. Both approaches can be done in backwards, rigid, and inhumane ways. **Both can also be done well, with humility, teamwork, and agility.**

* * *
If you enjoyed this message, [subscribe](https://jhall.io/daily) to _The Daily Commit_ to get future messages to your inbox.
Installing Flutter 2.0 on MacOS(Big Sur)
Tags: flutter, dart, pwa, tutorial
Published: 2021-04-15 23:17:19

I've been through the pain of installing flutter recently. Theres almost no resources online that is up-to-date. 

This is article would get you started with Flutter 2.0 right away. 

Install Homebrew

```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

&nbsp;
Pick one. I personally use VS code.

```bash
brew install --cask android-studio

OR

brew install --cask visual-studio-code
```

&nbsp;
Use Homebrew to install asdf, Android SDK, haxm and JDK8.

```bash
brew install asdf
brew install android-sdk
brew install intel-haxm
brew install --cask homebrew/cask-versions/adoptopenjdk8
```

&nbsp;
Add the plugin for dart, flutter and ruby to asdf.

```bash
asdf plugin-add dart https://github.com/patoconnor43/asdf-dart.git
asdf plugin-add flutter
asdf plugin-add ruby https://github.com/asdf-vm/asdf-ruby.git
```

&nbsp;
Now you can install dart, flutter and ruby with asdf.

```bash
asdf install dart latest
asdf install flutter latest
asdf install ruby latest
```

&nbsp;
Take note of the installed versions by running this:

```bash
asdf list dart
asdf list flutter
asdf list ruby
```

&nbsp;
Run the following in order to set the global runtimes. 
<em>NOTE: Please replace my version with your results from the previous part.</em>

```bash
asdf global dart 2.12.4
asdf global flutter 2.0.4-stable
asdf global ruby 3.0.1
```

&nbsp;
###Lets put everything together and set things up.

&nbsp;
Open up your bash or zsh rc file

```bash
vim $HOME/.zshrc
```

&nbsp;
Add the following into your rc file in order to allow your system to run the flutter command so it is able to locate your Android SDK.
<em>NOTE: replace 'zainulcain' with your own username</em>

```bash
export PATH="$PATH:/Users/zainulcain/.asdf/installs/flutter/2.0.4-stable/bin"
export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"
```

press [esc],  save and exit your rc file by typing ':wq'

&nbsp;
Next you'll need to set up cocoapods.

```bash
sudo gem install cocoapods
pod setup
```

&nbsp;
###Lets accept the iOS and Android Licenses

&nbsp;
iOS License

```bash
sudo xcodebuild -license
```

&nbsp;
Android License

```bash
touch ~/.android/repositories.cfg
flutter doctor --android-licenses
sdkmanager --update
sdkmanager "platform-tools" "platforms;android-29” "build-tools;28.0.3"
flutter config --android-sdk /usr/local/share/android-sdk
```

&nbsp;
Congratulations ! If you've done everything correctly, you can run this to confirm that everything is in working order.

```bash
flutter doctor -v
```
If you've enjoyed this, do give me a follow for more interesting articles :)
How to set up tplinkrepeater?
Tags: tplinkrepeater, httptplinkrepeater, help
Published: 2021-04-15 23:07:57

It is very disappointing when we face buffering or lag while watching out a favorite movie or playing games online. Due to this, we can enjoy ourselves to the fullest. Especially when if we are doing something important related to work and all of a sudden the internet drops. So it can affect our performance at work.
Don't worry by Using <a href="https://tplink-repeatersetup.net/">tplinkrepeater</a>  you can get rid of these issues. Rackspace offers some pocket-friendly network expansion wifi extenders such as TP-link ac750 Extender, TP-Link AC1200 Extender, and TP-Link AC2100 Extender. On top of it, it also provides a TP-Link Mesh WiFi System, which allows you to transmit a single wifi name which is a combination of 2.4GHz and 5GHz networks throughout your house.
You can easily set up your TP-Link extender by pushing the WPS button or you can also do the setup with http tplinkrepeater net URL.

Follow the steps below for TP-Link Extender Setup:
First of all, plug your Rockspace extender into the power outlet and wait for the light to be solid.
Use your devices such as a computer or mobile phone and connect them to the extender's wifi <a href="https://tplink-repeatersetup.net/">http tplinkrepeater net</a> .
Open a web browser and type http:tplinkrepeater.net in the address bar.
It will take you to the login screen, here you can create your login password for the future login and click on NEXT.
After clicking on NEXT, select your wifi that you would like to extend and enter the password for it.
Finally, after typing the password, click on Extend.
It will take few seconds to apply the settings and after that, you suppose to get 2 solid lights on it (Power and Signal).

Additional Information:
In case if you are not able to access <a href="https://tplink-repeatersetup.net/">tplinkrepeater.net</a>  then try to access the setup page with the default IP address which is 192.168.0.254.
Still, it doesn't work, then try to reboot your modem and router and repeat the process once again.
The epispot Project Roadmap
Tags: epidemiology, datascience, python, pythonpackage
Published: 2021-04-15 22:49:18

Epispot is one of the largest and simplest epidemiological modeling tools for Python. Install via one of the following:
```shell
pip install epispot
conda install epispot
```
Alternatively, you can install it from the source:
```shell
git clone https://github.com/epispot/epispot
cd epispot
python setup.py install
```
If you're new to epispot, start by reading the information provided on the READMEs in PyPI or GitHub [here](https://www.github.com/epispot/epispot/README.md)


While the epispot package has had tremendous success and now has over **15 releases** (just counting the `master` package), the epispot team would like to announce a preview of what's to come. We present to you the **epispot project roadmap:**

## In Maintenance:
- In Automation: 
    - Automate release notes on master & nightly 
    - Automate documentation on master & nightly 
    - Dependabot automation everywhere
- In Packaging: 
    - Automatic conda deployment on nightly 
    - Direct conda packaging (without conda-forge)?
- In Issue Management: 
    - Automate issue labels
- In Branch Management: 
    - Automatic code coverage reports on pull requests and commits 
    - Automate merge conflict resolutions for master→nightly
    - Automate merge conflict resolutions for nightly→master

## In Development: 
- In Compartments: 
    - Vaccinated 
    - Severe 
    - Mild 
    - Immune 
    - Asymptomatic 
    - Quarantined
- In Model Types: 
    - Cluster 
    - Probabilistic 
    - Monte-Carlo Simulation 
    - Large Area Simulation
- In Small Updates: 
    - **Anything?**
- In Major Changes: 
    - Demographic modeling within compartments 
    - More information on integrate() 
        - inflection points 
        - extrema 
        - herd immunity markers 
        - Pre-built support for geographic modeling
- In Integrations: 
    - Live COVID-19 data 
    - Live national cases data 
    - Live city/county data

## In Simulations:
- Small-Scale 
    - Use spatial models get to accurate small-scale predictions 
    - Implement in large cities: 
        - San Francisco 
        - London 
        - Tokyo 
        - New York 
        - Mexico City 
        - Mumbai 
        - Add an open-source platform for more cities to be added
- Build a web dashboard
- Large-Scale 
    - Add large-scale modeling to CLI 
    - Implement a Cluster model to simulate travel across major hotspots 
    - Get a geographic model ready for world mapping

**Lastly:** The long-awaited command line-interface (**is here! :fireworks:**)--no, really, [check it out](https://www.github.com/epispot/epispot/tree/nightly/CHANGELOG.md)