teleren/devto huggingface dataset:
Label requests by reponse time in JMeter
Tags: jmeter, performance, testing, webdev
Published: 2020-07-05 17:37:25

JMeter is a defacto standard in performance measurement. There are a lot of existing [plugins](https://jmeter-plugins.org/) you can add easily to your project, but sometimes additional functionality needed. In this case *JSR223 Sampler* is the solution. With use of this sampler you can write your own script to use up response data.

Response times are really important on the internet. It is a cardinal question, how long should visitor waiting for the page to be loaded. Technical solutions are changing really fast, but users are the same. They need short loading times. Performance optimalization has a long history. Please check following article.

> Response Times: The 3 Important Limits
> by Jakob Nielsen on January 1, 1993

> Summary: There are 3 main time limits (which are determined by human perceptual abilities) to keep in mind when optimizing web and application performance.

> Excerpt from Chapter 5 in my book Usability Engineering, from 1993:

> The basic advice regarding response times has been about the same for thirty years [Miller 1968; Card et al. 1991]:

> __0.1 second__ is about the limit for having the user feel that the system is reacting instantaneously, meaning that no special feedback is necessary except to display the result.
> __1.0 second__ is about the limit for the user's flow of thought to stay uninterrupted, even though the user will notice the delay. Normally, no special feedback is necessary during delays of more than 0.1 but less than 1.0 second, but the user does lose the feeling of operating directly on the data.
> __10 seconds__ is about the limit for keeping the user's attention focused on the dialogue. For longer delays, users will want to perform other tasks while waiting for the computer to finish, so they should be given feedback indicating when the computer expects to be done. Feedback during the delay is especially important if the response time is likely to be highly variable, since users will then not know what to expect.

So you have to keep focus on response times during the testing process.
Labeling requests by response times is a fairly good solution for this purpose. In the following example I define intervals. You has to do this for all single request in your *Thread Group*. Exact numbers could be defined with help of previous measurement data or specification.

```
if (prev.getTime() > 170 && prev.getTime() < 340) {
    prev.setSampleLabel(prev.getSampleLabel() + " > 170")
} else if (prev.getTime() > 340 && prev.getTime() < 4000) {
    prev.setSampleLabel(prev.getSampleLabel() + " > 340")
} else if (prev.getTime() > 4000 && prev.getTime() < 8000) {
    prev.setSampleLabel(prev.getSampleLabel() + " > 4000")
} else if (prev.getTime() > 8000) {
    prev.setSampleLabel(prev.getSampleLabel() + " > 8000")
}
```

In this way each request will have more lines in the table of *Aggregate Report*, which will show how many requests are in the predefined time intervals. So you can create more precise reports and check criteria.
Improving performance, security, accessibility, SEO and more
Tags: agile, testing, performance, react
Published: 2020-07-05 17:29:00

In this article I'll show how I've improved my site performance by more than 300%, using Next.js, Vercel, Checkly and Lighthouse. I was also able to improve accessibility, security and adopt common web best practices.
And for that I've used one *secret* of Agile.

https://sergiofreire.com/post/improving-performance-security-accessibility-and-more
NodeJS To Run C++ Executable
Published: 2020-07-05 17:17:52

So, I've been working on a cool project involving:
1. `Raspberry PI`
2. `NodeJS`
3. `Linux` (`Raspbian`)
4. `LibCEC` (`cec-client`)
5. `PM2`

and many more goodies.

during the process I've encountered a few bugs.

I have a NodeJS instance being run by `PM2` on a linux machine (`Raspberry PI`) & I need to pass linux various commands. 
One of them being a long runing process (hopefully forever) without closing that process, and yet run other non-blocking code.

most of my commands to the Raspberry PI will be bash commands.

so I dove into `child process` (comes with Node out of the box).

the child process has a few functions - that allow you to pass bash commands or run a local file (be it a .cpp file, or a .sh file).

so how would i do all of this ?

```javascript
const { execFile } = require('child_process');
 
const compiler = "g++";
const version = "-std=c++11";
const out ="-o";
const infile = "code-runner.cpp";
const outfile = "code-runner.out";
const command = "hello world";

execFile(compiler, [version,infile, out, outfile], (err, stdout, stderr) => {
  if (err) {
    console.log(err);
  } else {
    let executable = `./${outfile}`;
    execFile(executable, (err, stdout, stderr) => {
      if (err) {
        console.log(err);
      } else {
        execFile("echo", [command], { shell: true }, (err, stdout, stderr) => {
          if (err) {
            console.log(err);
          } else {
            console.log(`what is printed to the console: ${stdout}`);
          }
        });
      }
    })
  }
})
```

what we are looking at is missing some code, in my case i chose to use some c++ (nothing fancy):

```cpp
#include <iostream>

int main(int argc, const char* argv[]) {
  auto input = "";

  if (argc > 1) {
    input = argv[1];
  }

  std::cout << input << std::endl;
}
```

bassically the first Node code is using the `execFile` command, to compile the c++ file, and then run it and pass some arguments to it (in this case the `echo` command, with `hello world` as an argument).

the c++ code takes the second argument and prints it out to the console.

of course there are various ways of doing so.

but this should be a good start.

hope you enjoyed this one.

at some point I might do a series on the whole Child Process module, as well as he Cluster Module, and a few mor Node goodies.
Starting a Django Application
Tags: django, python
Published: 2020-07-05 17:15:49


I'm going to write a step by step guide for starting a Django project and after that, I'm making this a Django-Starter template, because I always hate the long setup processes that are repetitive.

*NOTE: I use Ubuntu for my development, some of the commands might not work on windows/mac but there is always an alternative (Google It!).*

### Requirements

1. Python 3+ (I'll be using 3.8.2)
2. Virtualenv ([install](https://virtualenv.pypa.io/en/latest/installation.html)) (I'll use this as my environment)
3. Pip (I'll be using pip3)

## Setting Up The Development Environment

First of all, I'm going to set up a virtual environment using `virtualenv`

To create the workspace folder, I'll use the command below:

```shell
 virtualenv django-template
```

Change your directory to the workspace folder:

```shell
cd django-template
```

You'll notice some folders created and a `pyvenv.cfg` file created but we won't need it at all.

Activate the virtual environment

```shell
source bin/activate
```

## Installing Django

I'm going to use the latest official version (3.0.8), using the simple command below:

```shell
pip3 install django
```

Confirm if it's installed by checking the version

```shell
python3 -m django --version
```

## Creating A Django Project

Starting a Django project

```shell
django-admin startproject _projectroot
```

After that, change your working directory to `_projectroot/` to avoid confusion with the virtualenv folders.
```shell
cd _projectroot
```

This will create the following directories:

```shell
├── manage.py
└── template
    ├── asgi.py
    ├── __init__.py
    ├── settings.py
    ├── urls.py
    └── wsgi.py

```

Learn what each file does [here](https://docs.djangoproject.com/en/3.0/intro/tutorial01/)

Start the development server
```shell
python3 manage.py runserver
```

Upon running the command, the server will run on port 8000 by default (http://127.0.0.1:8000/)

Changing the port is easier:
`python3 manage.py runserver 8080`


A message like the one below shows up but don't stress out.
```shell
You have 17 unapplied migration(s). Your project may not
work properly until you apply the migrations for app(s):
admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
```

## Creating A Django App

Let's create a Django app

(Note that there is a difference between a project and an app. An app is like the building blocks of a project.)

`python3 manage.py startapp myapp`

a new directory called "polls" will be created:

```shell
myapp/
    migrations/
        __init__.py
    __init__.py
    admin.py
    apps.py
    models.py
    tests.py
    views.py
``` 

Now that forms the skeleton of a simple Django application. I will explain what each file does in the next article.

The Project files can be found on [GitHub](https://github.com/ChrisAchinga/django-starter-guide)
Word Box with React Native (Open Source)
Tags: react, reactnative
Published: 2020-07-05 17:13:59

I had been preparing a flashcard to learn English for a long time. To do these things faster, I made an application with react native and did not publish it anywhere. The project is not fully finished. But you can add and use words. So I wanted to put it up to this stage. If you want, you can continue developing.

github: https://github.com/berat/wordBox-react-native

## Demo (Video)
[![Demo Video](https://j.gifs.com/GvJLZ7.gif)](https://www.youtube.com/watch?v=nAQtdNFyuRg) <br>
https://www.youtube.com/watch?v=nAQtdNFyuRg

## Screenshot
<div style="display:flex, flex-direction:row, justify-content: space-between">
<img src="https://raw.githubusercontent.com/berat/wordBox-react-native/master/assets/screen1.png?token=ACQE2Z2HJ4RLPKB5U5PV3IC7BNA3M" width="25%"/>
<img src="https://raw.githubusercontent.com/berat/wordBox-react-native/master/assets/screen2.png?token=ACQE2Z5H5TOEYUAAJSGB4US7BNA5G" width="25%"/>
<img src="https://raw.githubusercontent.com/berat/wordBox-react-native/master/assets/screen3.png?token=ACQE2Z5NPCHSSNOS3ZQX6I27BNA6C" width="25%"/>
</div>


### Thank you for your watching
To follow me [Github](https://github.com/berat) - [Twitter](https://twitter.com/beratbozkurt0) - [Linkedin](https://www.linkedin.com/in/beratbozkurt/)
Mysql2 Ruby Gem for AWS Lambda
Tags: news, ruby, aws, database
Published: 2020-07-05 16:59:20

Very simple [Mysql2](https://github.com/brianmario/mysql2) gem precompiled for Amazon Linux 1 & 2 (Ruby 2.5.x & 2.7.x) with statically linked `libmysqlclient` ready for any AWS Lambda usage, including Rails.

https://github.com/customink/mysql2-lambda

Part of a suite of open source projects from [Lamby](https://lamby.custominktech.com) (Simple Rails & AWS Lambda Integration using Rack). Details include:

- Small Size! Only 5 Megabytes. No Lambda Layers needed!
- Works with any MySQL connection. Including RDS Proxy.
Have you ever, or do you currently, work on an Agile team?
Tags: discuss, agile, webdev, career
Published: 2020-07-05 16:51:48

Hi all,

As someone who works in an organization that has adopted "Scrum-like" practices but is still waterfall, **what is it like working on an Agile (especially Scrum) team?** What has your experience been? What works well and what hasn't worked well?

I can't help but wonder if becoming a Scrum organization will help us innovate quicker, especially by having a self-organized and cross-functional development team.

Do you have insights? Share your thoughts in the comments!

**UPDATE** The Stack Overflow blog published a blog post in response to a question they saw in their forums: ["Does scrum ruin great engineers or are you doing it wrong?"](https://stackoverflow.blog/2020/06/29/does-scrum-ruin-great-engineers-or-are-you-doing-it-wrong/) Curious if anyone has thoughts about this!
Landing Page Header with Animated Login Design | HTML CSS Project Tutorial [Video Format]
Tags: css, html, tutorial, beginners
Published: 2020-07-05 16:43:43

{% youtube ikb_gqDzk3U %}

In this 2020 Tutorial, we'll build a Hero Header with Login using pure HTML, CSS & a little JavaScript only. This Project-based Landing Page Design is suitable for all especially beginners.

📕 Concepts covered in this video:
 - Modern Web Design
 - CSS Flexbox
 - Animations 
 - CSS transitions
 - Clip path
 - JavaScript DOM
 - ES6+ Syntax

[**SUBSCRIBE**](https://www.youtube.com/channel/UCBF2LIwr2Odb3-pRnNBRegA?sub_confirmation=1) our [**Youtube channel**](https://www.youtube.com/channel/UCBF2LIwr2Odb3-pRnNBRegA) if you want to get notified for more real-world **project-based tutorials**

Share this [video](https://youtu.be/ikb_gqDzk3U) with a friend

Let’s connect:
[Twitter](https://www.twitter.com/codeleague7) 
[Instagram](https://www.instagram.com/codeleague7)
Cost-cutting in AWS due to this pandemic Covid-19
Tags: devops, gitlab, server, aws
Published: 2020-07-05 16:38:39

Cost-cutting in AWS cloud providers due to this pandemic Covid-19

In today's scenario, to overcome the limitations involved with covid-19 crisis, MSME Units to MNC's are evaluating the implementation of cloud-based technologies. While the companies that are already benefiting from cloud services look forward towards incorporating essential cost-saving measures extended by cloud computing models. 

At present, the primary focus of industries dealt with maintenance and management capabilities of a firm which involves saving on system and hardware investments as it is prominent with regards to ensuring business continuity. The AWS(Amazon Web Services) public cloud solution provides these competencies thereby, reducing cost assessing services.  In order to display the credibility of cost-cutting mechanisms engulfed with AWS cloud providers due to the existing pandemic crisis, we have identified certain pointers wherein, the AWS features can be reduced to make it more affordable.

   * The process of implementing large servers which do not justify the usage may lead to significant limitations. Thus, the firms are expected to readjust them into families and sizes of Amazon EC2 instances offered by AWS. This measure proves to be cost efficient while also refraining from neglecting the technical requirements of the servers. 

   * Furthermore, it was also necessary to review the idle servers in order to proceed to their removal. This instance is taken into consideration when they would not be used in the near future.

   * Reviewing the unnecessary EBS (Elastic Block Storage) volumes and disposing them based on the storage efficiency also aids towards reducing costs.

   * AWS provides diverse storage options depending on the frequency of access required to the data objects. Therefore, it is proposed that all information requiring less frequent access be transferred from Amazon S3 standard to Amazon Glacier. Since the latter service allows long-term backup and archive storage with a recovery option from 1 minute to 12 hours. This initiative also extends a cost reduction per GB of up to 80% less than the standard Amazon S3 storage.

Having stated that, the above-mentioned actions assure to help companies to reduce their costs of IT department with regards to close infrastructure expenditure.
antispam temporary email forward (alias) service
Tags: tempmail, email, disposableemail, spam
Published: 2020-07-05 16:32:21

---
title: antispam temporary email forward (alias) service
published: true
description: Protect your email address from being sold or spammed
tags: tempmail, email, disposableemail, spam
cover_image: https://websitesareus.co.uk/wp-content/uploads/2020/01/1580187114_%E2%96%B712-reasons-why-emails-go-to-SPAM-and-how-to.png
---

altmails allows you to create temporary email addresses that automatically forward all emails to your personal email account. When you're done with your temporary alias, simply deactivate it and all emails sent to that alias will be blocked.

https://altmails.com/

**protect your privacy with @altmails email alias**

You can protect your primary mail address from unknown and untrustworthy providers. When you give your primary mail address to all of these services and providers, you may get a lot of spam, and it is not always easy to track down where the spam comes from or how you can stop it. So, you do not want to give them your real email address, but you need an email address to sign up! In these situations, you can use a temporary mail address. Temporary emails will also make you anonymous for any of these websites you're signing up, which can serve as extra protection.
If you were going to build a chat app with Node and GraphQL?
Tags: discuss, javascript, graphql
Published: 2020-07-05 16:16:18

I've been wondering and now I'm tired of wandering. So I'm going to ask this here, openly.

If you were going to build a chat application with Javascript (server-side, client-side) and GraphQL, what other tech stack will you use?
What database?
How will you speak to your database from your resolvers (I mean, is it with drivers or ORM, and please name the ORM or ORM-like tech)?

Your opinions are appreciated 🙏
PicoNeo2EyeのEyeTrackingを試してみる
Tags: unity3d, vr, picovr
Published: 2020-07-05 14:09:40

#始めに
BtoB用VRHMDでスタンドアローン機の「PicoNeo2 Eye」を個人用で手に入れましたので、もし同じ様に個人開発しようと思う人向けの内容になります。
![IMG_0584.jpg](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/62400/8fc46276-b504-cd0d-bb12-1edb20e6c3a8.jpeg)

# PicoNeo2 Eyeについて
この「PicoNeo2 Eye」はTobiiのアイトラッキングセンサーが入ったスタンドアローンアイトラッキング機能付きのVRHMDです。
大体の操作はOculusQuestに似てますが、コントローラーは光学式ではなく電磁式なので後頭部の方へ持っていっても操作できます。
ただ、Questのコントローラーと比べると若干ふわっとした感じがあります。

![IMG_0585.jpg](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/62400/c8b2125c-7cf2-722c-87f0-d0609d97728e.jpeg)

![IMG_0628.jpg](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/62400/ea1b405a-f42f-48e9-6951-2937c8ff438e.jpeg)

見えにくいですが、レンズの両サイドにTobiiのセンサーがあります
# デモ確認の環境
Untiy2019.4.1f
(デモプロジェクトは2019.2.20fで開発されています）

デモプロジェクト
https://github.com/picoxr/EyeTracking


プロジェクトをclone、またはDLして来たらUnityで起動してみましょう

初回起動時こちらのウインドウが出ますが
Applyを押してしばらく待ちます。
![pico01.PNG](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/62400/9e6db860-d5cb-3a3a-9c86-180d4df216dc.png)

ちなみに、最初からビルド対象をAndroidにしておくとこちらのウィンドウは出ません。


#ビルドする
最初から設定されてますが、ビルドシーンを番号で管理してるみたいなので番号変えると起動しなかったりします。

![pico02.PNG](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/62400/0dc328d8-1507-d66a-85df-b26402b866a6.png)

#自分の視線情報を登録する
デモを始める前にホーム画面にある専用アプリ「Tobii User Calibration」で自分の視線情報を登録する必要があります。

<img width="721" alt="7.jpg" src="https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/62400/559c0f10-b0b8-a9cb-d32d-7c3c8ad754e1.jpeg">

#デモを体験する
「PicoEyeTracking」とアプリがホーム画面に出るのでコントローラーで選択してください。
わかりやすい「Eye Tracking」から始めるといいです。
![1.jpeg](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/62400/f023039f-5c6f-1299-57a9-9672448419b2.jpeg)


#自分でアプリを作る場合について
視線情報と瞼の開閉レベルならPvr_Unity_SDKだけで対応可能です。

![pico03.PNG](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/62400/d10a8544-e7d9-53d3-e105-6a494d76aa38.png)
EyeManagerの　EyeTrackingのチェックを入れれば動作します。
視線が向いてるところ以外の解像度を下げる「Foveated Rendering」もここで設定できます。

#TobiiのSDKを使う場合
細かい機能を使う場合はTobiiXR SDKが必要です。
こちらについては、後日簡単なデモの確認と動作まで書きたいと思います。
https://vr.tobii.com/sdk/develop/



今までBtoB向けであまり表に出てきてないPicoでしたが、G2はヨドバシでも買えるようになったり、G3がソフトバンクさんのイベントで出たりとしているのでNeo系も今後購入できるようになるので期待してます。
制限がそんなに多くないけど、自前で作らないと無いという状態なのでそういったデバイスをいじるのが好きな人にはおすすめのVRHMDです（ΦωΦ）
Day 9 of #30DaysOfCode | Little trick to make API secure
Tags: node, codenewbie, challenge, restapi
Published: 2020-07-05 16:15:29

Hey awesome person! Thank you for reading this post. I am super happy to have you here. Today is the 9th day of my #30DaysOfCode challenge. The challenge has been so much fun for me that I can't explain in words. I have learnt and grown a lot in the last 9 days. You all have been very supportive in my journey so thank you for that too.

Now, today I would like to talk about a simple trick that can make our API very secure. Whenever you are writing code for user signup, you should keep this neat little trick in mind. The trick is really helpful and can protect you from attackers. Enough of the talking, let's just take a look at the code.

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

Both the example works and both will create a user but there is a serious problem with the first example. In the first example, we are just directly creating a user from all the data sent by the client. This is very unsecure because there are many other fields that you don't want the client to set. For example, you don't want the client to set the passwordResestToken or passwordResetExpiryDate but in the first example, the client will be able to do so because we are not filtering or processing the data. The client will be able to set the fields which they should be. But this can be fixed easily with the second example approach.

In the second example, we are creating a user only from the fields which we want. We are deconstructing name, email and password field from the data send by the client and we are creating a user from these fields only. This way the client wouldn't be able to set the passwordResestToken or passwordResetExpiryDate or any fields which are not required in registering user. So, always choose the second example over the first example.

This simple trick can really save you from attackers. But this simple trick does not mean that you are safe from all the other vulnerability. You still need to learn more about API security and I am pretty sure that you will.

Alright! That's all for today. Don't forget to like and share this post if you found it useful.
This is me, Signing Off!

Connect With Me:
Youtube: <a href="https://www.youtube.com/c/ShubhamSauravYT" target="_blank" rel="noopener noreferrer">ShubhamSauravYT</a>.
Twitter: <a href="https://www.twitter.com/hiShubhamSaurav" target="_blank" rel="noopener noreferrer">@hiShubhamSaurav</a>
Instagram: <a href="https://www.instagram.com/hiShubhamSaurav" target="_blank" rel="noopener noreferrer">@hiShubhamSaurav</a>
Facebook: <a href="https://facebook.com/hiShubhamSaurav" target="_blank" rel="noopener noreferrer">@hiShubhamSaurav</a>
How To Download SP Flash Tool 
Published: 2020-07-05 16:02:55

If you are trying to flash your Oppo Realme X3 SuperZoom device then I would like to suggest you to try using Smartphone flash tool (aka SP Flash Tool). SP flash tool is great flashing tool for Android. You can use this tool to flash almost any MTK (Mediatak IC) based smartphone. Try flashing any custom ROMs, stock ROMs on your <a href="https://flashifyit.com">oppo realme x3 </a> Android smartphone. 

SP flash tool is best firmware flashing tool available online whether it is custom ROM or stock ROM. Using SP Flash Tool, you can flash Oppo Realme X3 SuperZoom Android device (but make sure to check if it is based on Mediatek IC). Flash any custom or stock ROM over Oppo Realme X3 SuperZoom Android device. Also, do make sure that you have installed Oppo Realme X3 SuperZoom USB drivers properly on your PC before flashing any firmware file.
Integration of Current Components into a NPM Package Library
Published: 2020-07-05 16:00:31



- Create a fully separate library project. This prevents mixing of inter-project concerns. It also exposes dependencies.

- Find all "common" components to put into library, and drop one at a time, into the library. Compile and Work out dependency issues.

- Publish to NPM early and often.

- Start importing components back into original project. Remove the old pre migrated components one at a time.

- Compile source project fixing all dependencies.

- Repeat until there are no client side install issues, and the common code you want, is migrated completely to the library.

**Be Patient**

This is a very tedious process full of npm traps. If you are not an NPM expert, you will become one.