teleren/devto huggingface dataset:
SPACEBAR COUNTER
Tags: spacebarcounter, spacebarclicker, spacebartest
Published: 2021-08-01 14:52:08

<h1>What is the Spacebar Counter?</h1>
The space bar key is found at the most minimal of the console or character-at-a-time printer in an extremely level column. You realize a space bar counter is an interesting apparatus, which assists you with finding how regularly you press the space bar on your console. Our subsequent counter instrument will assist you with augmenting your tapping speed. 

What are the Spacebar counter test, and how out of nowhere this test turns out to be so broad? 

All Credit goes to web-based media. Web-based media is an exceptionally well known stage, and particularly it comes to Tik-Tok. It is a video sharing stage where the client makes video, and a portion of their recordings become a pattern, and this spacebar speed test is one of them. You know this Spacebar clicker challenge is so engaging and habit-forming that such countless individuals partook in that test and made this test stylish.

<h1>How to test your spacebar clicking speed?</h1>
1: In order to check your spacebar pressing speed simply go to this website "www.cpstest.us".
They have an incredible <a href="https://cpstest.us/spacebar-counter/">Spacebar Counter</a> tool for spacebar testing - with various time durations.
2: Select your desired time duration(my favorite one is 5 seconds) 
That's really worth a try.
3: Click on the "START" button to start your test.
4: Start pressing the space bar button as fast as you can un-till timer stops.
5: Finally, you'll be told your total clicks perform in five seconds and also your average per second clicking speed.  

Cheers........
Create real time language visualization of tweets in minutes
Tags: machinelearning, nlp, charting, lowcode
Published: 2021-08-01 14:48:52

![image of visualization](https://github.com/code2k13/nlphose/raw/main/docs/images/netflix_twitter.gif)

In this article I will show you how to perform language identification on tweets and how to stream the results to a webpage and display a real time visualization. We will use my open source project [nlphose](https://github.com/code2k13/nlphose) and [C3.js](https://c3js.org/) to create this visualization in minutes and without writing any Python code !


 To run this example you need following software
 * Docker
 * [ngrok](https://ngrok.com/docs) (optional, not required if your OS has GUI)
 * Internet Browser


## Starting the nlphose docker container

Run the below code at shell/command prompt. It pulls the latest [nlphose docker image](https://hub.docker.com/repository/docker/code2k13/nlphose) from Docker hub. After running the command, it should start *'bash'* inside the container 
```shell
docker run --rm -it -p 3000:3000 code2k13/nlphose:latest
```

## Running the nlphose pipeline inside the container
Copy  paste the below command inside the container's shell prompt. It will start the nlphose pipeline

```shell
twint -s "netflix" |\
./twint2json.py |\
./lang.py |\
jq -c '[.id,.lang]' |\
./ws.js
```
The above code collects tweets from twitter containing the term *"netflix"* using the 'twint' command and performs language identification on it. Then it streams the output using a [socket.io](https://socket.io/) server. For more details, please refer to [wiki of my project](https://github.com/code2k13/nlphose/wiki). You can also create these commands graphically, as shown below using the [NlpHose Pipeline Builder tool](https://ashishware.com/static/nlphose.html)
![](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/prc5klc6r72c1wcssa7i.png)

## Exposing local port 3000 on the internet (optional)
If you are running this pipeline on a headless server (no browser), you can expose port 3000 of your host machine over the internet using ngrok. 
```shell
./ngrok http 3000
```

## Running the demo
Download [this html file](https://raw.githubusercontent.com/code2k13/nlphose/main/demos/netflix_languages_demo.html) from my GitHub repo. Edit the file and update the following line in the file with ngrok url
```javascript
var endpointUrl = "https://your_ngrok_url"
```

If you are not using ngrok, and have browser installed on your system (which is running the docker container), simply change the line to:
```javascript
var endpointUrl = "http://localhost:3000"
```

You will need to run this file from a local webserver *(example [http-server](https://www.npmjs.com/package/node-http-server) or python -m http.server 8080)*.Once you run it, you should see a webpage like the one shown below:


![image of visualization](https://github.com/code2k13/nlphose/raw/main/docs/images/netflix_twitter.gif)

That's it !! Hope you enjoyed this article !
My morning healthy habits. Or 6 ways to improve Your mood and productivity before writing any code.
Tags: productivity, motivation, devjournal, tips
Published: 2021-08-01 14:43:57

# Drink water

After night your body is pretty dehydrated. To keep it well functioning and boost productivity - drink water (with a pinch of sea salt - magnesium, potasium, electrolytes) after You wake and and remember to keep drinking it.

- [Water intake calculator](https://www.hydrationforhealth.com/en/hydration-tools/hydration-calculator/)
- [Few apps that help keeping track of water intake](https://www.healthline.com/health/hydration-top-iphone-android-apps-drinking-water)
- [Adding sea salt to your daily routine](https://reduceinjuries.com/blog/adding-sea-salt-to-your-daily-routine/)

# Get morning sun exposure

Right after You wake up (or 14-16 hours before You go to sleep) and drink some water (see above) go out and get sun exposure without any glasses on your nose.
Depending on how cloudy it is outside and which place on Earth you live in You can keep it around 10 minutes or extend it to 30 minutes period.

- [Details: Huberman Lab Podcast ep. 28](https://www.youtube.com/watch?v=aXvDEmo6uS4&t=1020s)

# Take a walk

Go out for a 15-30 minutes walk/run/bicycle ride every morning. It perfectly combines with sun exposure. It has very positive influence on Your nervous system, helps lowering anxiety.

- [Details: Huberman Lab Podcast ep. 28](https://www.youtube.com/watch?v=aXvDEmo6uS4&t=727s)

# 5 minute quick gymnastics

Since we usually sit at least 8 hours a day during our workday, it may be a good idea to do a simple gymnastics and stretches in the morning.
I use this set of exercises

- [5 min gymnastics](https://www.youtube.com/watch?v=BVPk4xw-Jw0&list=PLuILYsRx9zAt7U2o2GqJjkE9KtS3pfzzC)

# Meditation

You can combine it with taking a walk, there are few guides to take mindful walks.
But if You want to take Your mind and focus to another level - Naval Ravikant suggests doing 60 minutes meditation at least 60 days.
To me its a bit extreme to extend morning routine with additional 60 minutes meditation, but I am keeping in mind to include daily meditation practice.

- [Naval on Twitter on meditation](https://twitter.com/naval/status/1261481222359801856)
- [Naval replying about thoughts during meditaton](https://twitter.com/naval/status/1159245225350406146)
- [Naval on learning to enjoy being alone](tohttps://www.youtube.com/watch?v=KGCc1cUbx90)

# Delay caffeine

The best time for coffee is 90-120 minutes after You wake up, to not disturb Your natural high cortysol level in the morning.

- [Best time to drink coffee](https://www.healthline.com/nutrition/best-time-to-drink-coffee#cortisol-coffee)
- [Delay caffeine / Huberman Lab](https://www.youtube.com/watch?v=aXvDEmo6uS4&t=1680s)

## Resources

- https://tim.blog/2021/07/06/andrew-huberman/
- https://hubermanlab.com/maximizing-productivity-physical-and-mental-health-with-daily-tools/
- [Photo by Joseph Redfield from Pexels](https://www.instagram.com/fotografia.legal/)
Finding S3 Batch Operations Failures in CloudTrail
Tags: aws, tutorial, cloud
Published: 2022-05-08 01:06:09

At work, I recently got the distinct opportunity to copy millions of objects from one S3 bucket to another.

There are roughly a dozen separate ways to do this (as with everything in AWS), but the "right" way is to use an S3 Batch Operation to copy everything from an S3 Inventory Report.

The only problem with an S3 Batch Operation is that it fails in surprising and hidden ways, especially if there's a misconfigured IAM permission. For example, our most recent job was failing due to a missing KMS permission. To determine what the missing permission was, we would typically head to CloudTrail and hunt down the failed requests.

As S3 Batch Operations run as an assumed role, hunting these logs can be slightly more difficult, but we finally found the right way to accomplish it.

The first, most important, piece is to hunt down the S3 Batch Operation's Job ID. You'll find this on the details screen clear at the top.

![Finding S3 Batch Operations Failures in CloudTrail](https://blog.morriscloud.com/content/images/2021/08/image-14.png)
_S3 Batch Operation Job Details Screen_

Next, shoot on over to CloudTrail and filter by User Name. The value you'll want to use is `s3-batch-operations_{Job ID}`, where `{Job ID}` is your S3 Batch Operation's Job ID retrieved in the previous step.

![Finding S3 Batch Operations Failures in CloudTrail](https://blog.morriscloud.com/content/images/2021/08/image-15.png)
_CloudTrail Filtering on Job ID User_

**Heads Up!** If you've got KMS enabled for the Job, then you're going to get a whole heck of a lot of logs. I tend to download the logs to use Excel to look through it, but when you're moving more than 19 million records, you're going to have a bad time. If you need to dive into the reasons even more, I recommend using an Athena table.

* * *

In case anyone is curious, the missing permission for the role was `kms:GenerateDataKey*`. KMS is super fun.
deploy react to github pages
Tags: github, ghpages, deploy
Published: 2021-08-01 14:23:37

## deploy react to github pages

hello bro today I will share you a way publish react application with github pages.
Let's follow me !!
![install package gh-pages](https://guides.github.com/features/pages/pages-home-page.png "Logo Title Text 1")
## step 1:
### install package gh-pages 
```javascript 
yarn add gh-pages -D 
```
## step 2:
add config gh-pages in package.json
 2.1 open package.json change homepage
 ```"homepage": "http://tomnyson.github.io/vercel-demo",```
 **change tomnyson = your account github**
  **change vercel-demo = your projec name github**
2.2 add code in block scripts
```javascript
  "scripts": {
    "predeploy": "npm run build",
    "deploy": "gh-pages -d build"
  },
```
**2 line code above show react build before deploy **
2.2 deploy code
```javascript
yarn deploy
```
## resource
[github project example](https://github.com/tomnyson/vercel-dem)
REAL-TIME bitcoin price in javascript
Tags: javascript, blockchain, bitcoin, bot
Published: 2021-08-01 14:14:57

Bitcoin is a decentralized digital currency and it's currently trading above ***$41000*** (at the time I write this article).Due to it's volatility it would be quite a boring task to keep an eye on it's price. Lucky us, as we're all programmers so let's automate this!:sunglasses:

## What are we going to code ?

![dev-to-websocket](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tplkaqrkg17qwszpt28z.gif)

## The bridge to cryptocurrencies pricing

There's a lot of exchange in the market but I choose to use Binance to tracking bitcoin price for some reasons:
1. They expose a websocket server, so we can track cryptocurrencies price `real time` like.
2. All we need is to connect to `wss://stream.binance.com:9443` **WITHOUT AN API KEY** !

---

btw, you can [sign up](https://accounts.binance.com/en/register?ref=163041215) to Binance and start trading anytime.

---

## Initializing the project

If you don't have nodejs installed follow the [official website](https://nodejs.org/en/) instructions.

Let's start the project and install two tiny dependencies:
 
```sh
npm init -y
npm i ws prompts
```

- **`ws`** it's a client/server websocket implementation, will be used as a client to connect to binance's websocket server.
- **`prompts`** it's a cli tool, will be used to brings flexibility to our code allowing the user to choose what cryptocurrency to keep it's price tracked.

## Coding

```javascript
const prompts = require('prompts');
const WebSocket = require('ws');

const run = async () => {
  const { symbol } = await prompts({
    type: 'text',
    name: 'symbol',
    message: 'What symbol do you wanna track ?'
  });

  const ws = new WebSocket(`wss://stream.binance.com:9443/ws/${symbol.toLowerCase()}@kline_1m`);

  ws.on('message', async (data) => {
    const incomingData = JSON.parse(data.toString());
    if (incomingData.k) {
      const isClosed = incomingData.k.x;
      const symbolPrice = Number(incomingData.k.c);
      console.log(`${symbol.toUpperCase()} : ${symbolPrice} -- closed = ${isClosed}`);
    }
  });
}

run();
```

That's it ! Isn't simple? I know that it's a lot of things going on under the hood but let's ignoring for now.

>The *JSON* payload received from the socket it's described in binance websocket [official documentation](https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md#klinecandlestick-streams).

## Conclusion

From that piece of code you can build an even more elegant bot, maybe do some action when getting the cryptocurrency price, triggering your cellphone to waking you up to buy some cryptocurrency, the sky is the limit!
To be honest I've never make money with that but I just wanted to show you guys an interesting and simple real time application.
is_initialized() helper function
Tags: php, webdev, helpers
Published: 2021-08-01 13:41:19


I'm no fan of (too much) global helper functions, but I feel like `is_initalized()` is a must! It really should be PHP native, but that's [not happening](https://github.com/php/php-src/pull/7029#issuecomment-849694385).

This `is_initialized()` helper is modeled after `method_exists()`, and others like it, in the sense that it asks for an `$object` and a `$property` separately. Reason for this is that we cannot infer the context of a parameter when it is passed like `is_initialized($object->parameter)`. The function would just receive the value.

```php
if (!function_exists('is_initialized')) {
    /**
     * Returns whether a property is initialized with a value.
     * @param string|object $object The class (name), that contains the property.
     * @param string $property The name of the property.
     * @return bool Whether the property is initialized with a value.
     */
    function is_initialized($object, string $property): bool {
        try {
            return (new ReflectionProperty($object, $property))->isInitialized(is_object($object) ? $object : null);
        } catch (ReflectionException $e) {
            return false;
        }
    }
}
```

## Why is this better than `isset()`?
It's not "better" per se, but it makes memoization easier as a value can now also be `null`. `isset()` would return `false` in that case. It kind of depends on your use case.

## An example

In this example we use the `$service` parameter for memoization. The parameter can by either `null` or a `Service` instance. In this case, only the first call to `getService()` would call the container, whereas `isset()` would call the container multiple times if the value where to be `null`.

```php
class Controller
{
    private ?Service $service;

    public function getService(): ?Service
    {
        if (!is_initialized($this, 'service')) {
            $this->service = Container::get(Service::class); // either the service, or `null`
        }

        return $this->service;
    }
}
```

## Think you can make this better?
Please let me know if you have an idea on how this function could be even more helpful.
100 days of code challenge
Tags: 100daysofcode, codenewbie, career
Published: 2021-08-01 13:36:12

Day 0 of #100DaysOfCode

Tell everyone that I will commit to the 100 days of code challenge.

Setup a public trello board showing all possible projects I will try to complete. 

Github: https://github.com/vernonranis
Trello: http://trello.com/b/zlxBu1pp

#CodeNewbies #WebDev #Programming #ShiftingCareer #CallCenterToDev
Investigation: Why I can't use my ThinkPad L14 fingerprint reader in Ubuntu 21.04?
Tags: fingeprin, thinkpad, lenovo, libfprint
Published: 2021-08-01 13:34:13

Running Ubuntu I wanted my Thinkpad fingerprint reader to work. It's not working out of the box and there are no first-page results when googling the problem.

So, I need to investigate.

This is the device my ThinkPad L14 has built-in:
```
➜  ~ lsusb | grep Fingerprint
Bus 002 Device 003: ID 27c6:55b4 Shenzhen Goodix Technology Co.,Ltd. Fingerprint Reader
```

OK. Device ID is `27c6:55b4` - got it

Now, most common lib that is used in fingerprint reading is `libfprint`. 

Alright. Visiting its GitLab page, there's a link to list of unsupported devices: https://gitlab.freedesktop.org/libfprint/wiki/-/wikis/Unsupported%20Devices 

..and my fingerprint reader is listed as unsupported:
![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lcs9n91i65qdxb911zlp.png)


..and `libfprint` developers are stating the following: 

> These are devices that are not supported. **For most of them support is unlikely to ever happen**, and if then only through reverse engineering efforts as vendors are only officially supporting a small subset of devices.
  
Oops.

Perhaps because it's a new device, the vendor "Shenzhen Goodix Technology" will support their devices in near future? 



Nope..

Found this forum post where user asks Goodix for Linux support: https://developers.goodix.com/en/bbs/detail/2cc68cdf9f824e28b247f626c4a9374b

![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pfopg7glt7ezd7gpexqj.png)
 
Well, it's 2021 and still no support. 

Bummer Lenovo couldn't pressure their hardware providers to open-source the drivers or take care of this themselves. Shame.
"Hello World" dotnet core in Mac OSX
Tags: dotnet, csharp, helloworld, brew
Published: 2021-08-01 13:30:38

#Setting up Development Environment

* Install `brew`
```bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
* Install `dotnet-core-sdk` and version 3.1.411
```bash
brew tap isen-ng/dotnet-sdk-versions
brew install --cask dotnet-sdk3-1-400
```
* Check the `dotnet` version
```bash
dotnet --version
```
* Optional install `Visual Studio Code` as your editor
```bash
brew install --cask visual-studio-code
```

#Create `Hello World` Console application
```bash
dotnet new console -o hello-world
cd hello-world
dotnet run
```
What are the System Requirements for Windows 11 ?
Tags: windows11
Published: 2021-08-01 13:10:55

I guess everyone got to know about the release of Beta version of Windows 11...
Even I switched to Windows 11 through Windows insider Program
My Experience on using Windows 11 is remarkable. My suggestion is to switch to Windows 11 as soon as possible. Frankly speaking I didn't face a single issue in using Windows 11
Now speaking about the system requirements you need for switching to Windows 11 are below
Processor:

1 gigahertz (GHz) or faster with 2 or more cores on a compatible 64-bit processor or System on a Chip (SoC)

RAM:

4 gigabyte (GB)

Storage:

64 GB or larger storage device

Note: See below under “More information on storage space to keep Windows 11 up-to-date” for more details.

System firmware:

UEFI, Secure Boot capable

TPM:

Trusted Platform Module (TPM) version 2.0

Graphics card:

Compatible with DirectX 12 or later with WDDM 2.0 driver

Display:

High definition (720p) display that is greater than 9” diagonally, 8 bits per color channel

Internet connection and Microsoft accounts: 

Windows 11 Home edition requires internet connectivity and a Microsoft account to complete device setup on first use.

Switching a device out of Windows 11 Home in S mode also requires internet connectivity. Learn more about S mode here.

For all Windows 11 editions, internet access is required to perform updates and to download and take advantage of some features. A Microsoft account is required for some features.
My Dev Journey: Week 13
Tags: javascript, codenewbie, beginners, bootcamp
Published: 2021-08-01 12:40:21

This week of the bootcamp was our only full working week on our goal achievement app. This week has felt incredibly long, whilst at the same time has felt like we've had absolutely no time at all to work on our app.

I'm definitely feeling the fatigue of the intensive bootcamp now, having been working on what is the culmination of all 13 weeks of hard work up to this point has been very tiring, as well as preparing for interviews and tech tests after hours, and falling asleep in front of the laptop. But the end is one week away and I can have a rest afterwards, before hopefully starting a job 🤞🏼

If you've enjoyed this blog post, maybe consider checking out my [GitHub](https://github.com/fearneyork) 😁

## What's happened this week

### Front End

We started with our front end and worked from our wireframe prototypes, to create the navigation of our app. We started off in a mob to get the foundations working, then when we all felt comfortable with the process, we broke off into pairs to carry on with individual pages.

Pair programming was great for this, as we still had many questions about how to build these pages, and put in components with dummy data, so it was useful to have one driver coding out what we knew, and then the navigator looking up information at the same time. Because of this, we managed to get our whole navigation implemented on day one. Then by the end of day two we had our front end pulling data from a test backend.

### Back End

I spent the most of this week working with the backend, and the biggest struggle has been getting used to the non-relational database over the relational SQL based databases.

Both the test backend and the final backend were created in Firebase using Firestore collections and Firestore functions. And they interface with the Front End through the Express based API I've created. The other big struggle with this has been writing the whole thing in TypeScript over JavaScript and getting used to the nuances between the two.

## New tech I've started learning

### Firebase

The Diligent Dev's [tutorial](https://www.youtube.com/watch?v=iIVlRZIo2-c&t=677s) on creating a REST API using Firebase was a great springboard to work from. 

Also, the Firebase [docs](https://firebase.google.com/docs) are pretty good too for most of the troubleshooting but the thing that's helped me the most is just trying things out and experimenting with the data structures for the most part.
You are just a click away from Go package documentation
Tags: go, showdev
Published: 2021-08-01 12:04:50

Hi Gophers!

Do you struggle to find link to official Go package documentation while looking at the repository, not anymore!

I built a handy chrome web store extension to redirect from Go source code repositories to their official documentation 📄.

Trust me, it helps everyday. [Try it now!](https://chrome.google.com/webstore/detail/docgo/jllcbbemppedmpfjjeaoifdogcinmjpm)

![You can click the extension and GO!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qemtldgxbnu5kzbdb55y.gif)

Following repository hosts this extension. Feel free to contribute. I am open for suggestions. Give it a 🌟 if you liked it!
{% github akshaybharambe14/docgo no-readme %}