teleren/devto huggingface dataset:
CLI tools example: show all tools
Tags: python, cli
Published: 2020-02-08 11:05:28

I wanted to have a simple tool as my first example in the series. So this first tool will just print all the tools we have stored in our bin folder. Especially useful when you forget what you have named your other tools. I will assume you have read the previous parts of the series on how everything is set up.

I have named this script _tools.py_ and it is just 8 lines of code. It looks like this:
```python
from pathlib import Path
bin_folder = Path(__file__).parent

for tool in bin_folder.iterdir():
    name = tool.name
    if name.startswith("_"):
        continue
    print(name)
```
So this uses the `__file__` attribute to access the path to the _tools.py_ script, which of course is stored in the bin folder. Therefore, the parent of the script is the bin folder. Here I am using `Path`-object which I prefer over the corresponding functions in the _os.path_-module. Check out [this part](https://docs.python.org/3/library/pathlib.html#correspondence-to-tools-in-the-os-module) of the Python documentation for mapping between _os.path_ and _pathlib.Path_. 

Moving on, we iterate over the content of the directory and print the name of each tool. The _Path.name_ attribute is just the name of the file. I also skip all tools which have a name that has a leading underscore. This is just a personal design decision, as I have used this naming convention for files that are for internal use only.

I hope you liked this simple CLI-tool. I am working on a post with one of the tools I have been using the most, which helps with finding and activating virtual environments. So if that sounds interesting, stay tuned for that one.
How to use the multi plugin in your next.js application
Tags: nextjs, multiplugin
Published: 2020-02-08 10:46:09

---
title: How to use the multi plugin in your next.js application
published: true
description: 
tags: next.js, multi-plugin
---

I saw many of them have problems to use multi plugins in next.js configuration file, I mean next.config.js file.

You can use official (next-compose-plugins) to wraps your all plugins and look at all plugins documentation below the link:
https://github.com/zeit/next-plugins

Also, you can try this, it's working properly.

// In your next.config.js file
const withPlugins = require('next-compose-plugins');
const withCSS = require("@zeit/next-css");
const withSass = require('@zeit/next-sass')
const withImages = require('next-images')


module.exports = withPlugins([
[withCSS(withSass())],
[withImages],
])
Manage Redis by Rails Application
Tags: redis, rails, showdev, webdev
Published: 2020-02-08 10:40:29

I come to present a tool that I have developed with 2 others developers (https://github.com/OpenGems)


This tool allows you to manage Redis, thanks to a web interface you can easily manage your Redis instance (see your keys, the memory used, clients connected, etc ...). 



### Check your stats 
The Dashboard allows you tu check the Memory usage, CPU and Redis clients.

![RedisWebManager Dashboard](https://raw.githubusercontent.com/OpenGems/redis_web_manager/master/images/images_dashboard.png)

### Manage your redis keys
You can easily edit and delete any keys stored in your redis database.

![RedisWebManager Keys](https://raw.githubusercontent.com/OpenGems/redis_web_manager/master/images/images_keys.png)

### Keep an eye on your redis clients
Check how many clients are connected and their infos.

![RedisWebManager Clients](https://raw.githubusercontent.com/OpenGems/redis_web_manager/master/images/images_clients.png)

## Installation
Add this line to your application's Gemfile:

```ruby
gem 'redis_web_manager'
```

And then execute:
```bash
$ bundle
```

Or install it yourself as:
```bash
$ gem install redis_web_manager
```

Add the custom route in your `routes.rb`:
```
mount RedisWebManager::Engine => '/redis_web_manager'
```

Access to RedisWebManager at `/redis_web_manager`



In the future we will add several features:


* Add filters to redis keys (filter by type, by expiration date...)
* Add graph for most used commands
* Manage multiple redis instances
* Real time chart update
* Alert system (ex: triggered when memory is peaking)
* Command line interface to manage your redis database
* Logs interface


RedisWebManager is available at https://github.com/OpenGems/redis_web_manager.

Enjoy ! 😀😀
C++ read file from stdin
Tags: help
Published: 2020-02-08 10:28:16

I've started to learn c++ and I need a way to read a file line by line directly from stdin. Now what I've tried is this:
```
freopen("input.txt", "r", stdin);
string buffer;
vector<int> temp = {};
getline(cin, buffer);
for(int elem : buffer) 
  if(elem != ' ')
    temp.push_back(elem - '0');
*dest = temp;
```
but when I run this code, the console waits for me to insert data via cli instead of reading it from stdin.
What can I do?
Technology Reports of Kansai University
Tags: technology, reports, kansai, university
Published: 2020-02-08 10:26:13

Technology Reports of Kansai University (ISSN: 04532198) is a peer-reviewed and open-access international Journal. It was built in 1975 till now by kansai university, japan. The journal covers all sort of engineering topic, mathematics and physics. Technology Reports of Kansai University (TRKU) was closed access journal until 2017. After that TRKU became open access journal. TRKU is a scopus indexed journal and directly run by faculty of engineering, kansai university.

Peer Review

The process is single-blind for most journals, meaning that the author does not know the identity of the reviewer, but the reviewer knows the identity of the author. Some journals operate double-blind peer review.

At least two review reports are collected for each submitted article. Suggestions of reviewers can be made by the academic editor during pre-check. Alternatively,Technology Reports of Kansai University editorial staff will use qualified Editorial Board Members, qualified reviewers from our database, or new reviewers identified by web searches for related articles.

The following checks are applied to all reviewers:

That they hold no conflicts of interest with the authors, including if they have published together in the last five years;
That they hold a Ph.D. (exceptions are made in some fields);
They must have recent publications in the field of the submitted paper;
They have not recently been invited to review a manuscript for the TRKU journal.
Radio Liberty: Setting the mood
Tags: gamedev, devlog
Published: 2020-02-08 10:25:47

These days I’ve been thinking about the plot and tone of the game. It will be set in a parallel, post-apocalyptic world in which the Radio Liberty antennas were never demolished. The main character is a nomad, always traveling alone and keeping to secondary roads to avoid any contact with gangs and thugs. She is resourceful and handy, knows her way around tech and mechanics, and drives some sort of solar powered beach buggy. Since it’s a post-apocalyptic world, spare parts are hard to find, so she tries her best to keep the buggy in perfect conditions.

She is traveling quite happily around southern Europe (or what it used southern Europe anyway) when her buggy suddenly loses power. There is nothing apparently wrong with it. How strange. So she decides to set camp and start exploring the surroundings, and so the game starts.

I’ve been gathering some references for setting the tone of the game.

![Oxenfree](https://dev-to-uploads.s3.amazonaws.com/i/kfouu2fcmd8dz772j85s.jpeg)
From Oxenfree game. I like the small size of the characters vs the open space. In the game, you have a radio that sometimes catches some mysterious signal. I might do something similar!

![Horizon Zero Dawn](https://dev-to-uploads.s3.amazonaws.com/i/kbztr9drxhp4swg439bg.jpeg)
From Horizon Zero Dawn. I love the way nature absorbs the buildings.

![Pixelshuh](https://dev-to-uploads.s3.amazonaws.com/i/lg04b8f0s963wzfpzkaq.png)
A couple of scenes from [Pixelshuh](https://www.pixelshuh.com/). I like the flood idea (and fits perfectly a post-apocalyptic world due to climate change) and the colors and mood of the fishing scene.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/zy67kxmde43pdx67cogj.png)
I love everything about [Language of the Gods](https://ladybenko.itch.io/the-language-of-the-gods-ld36), by Belén Albeza. The tone and the art are great, plus I think I can manage a graphic style like that. And again, small character vs big scenery!

And here are some very rough ideas I’ve sketched:


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1dns4r2gwajb30ljiiml.jpeg)
The paper is all wrinkly because I was drawing on the same beach where the antennas used to be :)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/o9k5utq127xba5aus2mo.jpeg)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/btfsrzf1d41unhmhpqk7.jpeg)

As for the next step, maybe I’m going to look into which tools and language I’m going to use to develop the game. I’m pretty sure it’s going to be [Phaser](https://phaser.io/), because I want the game to be playable in the browser and _❤javascript❤_, but I want to write some code to see if it really makes sense — _if you are thinking about writing a comment saying how much javascript sucks, and it’s not a real language and I’m insane for liking it, please just die instead_. Or, if I’m not in the mood to program, I’ll develop the plot more and do some concept art.
Codename: Radio Liberty
Tags: gamedev, devlog
Published: 2020-02-08 10:25:22


_Originally published at [Medium](https://medium.com/@pincfloit/game-development-diary-i-32dd6a4021ef) on Jun 25, 2018_

Ever since I was a baby, my family and me have been going to the same beach spot almost every year. I guess in the late 80s, early 90s there were big plans for this place, but luckily the development stopped (apparently quite abruptly), and now there are these mysterious unfinished buildings here and there. And, up until 2006, there were these huge antennas that were financed by the fucking CIA to broadcast anti-communist propaganda (or the American dream, whatever you prefer) to the soviet countries under the name of **Radio Liberty**.

It’s a pretty friggin’ awesome story for a modest piece of land if you ask me.

Anyway, I’ve always had a soft spot for huge human constructions and abandoned buildings, but after playing Fallout 3 I thought _“damn, this would make a perfect location for a Fallout game”_. And I made a tweet or two about it, but they didn’t seem to catch Bethesda’s attention. Shame, really.

So last time I went there I thought _“hey, Bethesda is not gonna use your brilliant idea and you’re actually capable of making a game now, so why don’t you go for it?”_

So here I am, going for it.

Although the game plot is going to be purely fictional, for now I’ve been gathering some information about Radio Liberty and some graphic references of the area:

- [RadioLiberty.org](http://www.radioliberty.org/) (awesome website, really)
- [Adéu, Liberty](https://www.youtube.com/watch?v=ev02x0zrUMs&spfreload=10): documentary about Radio Liberty
- [Photos](https://olvidadoydecadente.blogspot.com/2017/08/radio-liberty.html) of the current state of the Radio Liberty facilities (minus the antennas)

![Abandoned building](https://dev-to-uploads.s3.amazonaws.com/i/w2i1k0etay1c3t1sde59.png)

![Abandoned, unfinished building](https://dev-to-uploads.s3.amazonaws.com/i/z952b96n25lriz7bzbn7.jpeg)

![Abandoned beach apartments](https://dev-to-uploads.s3.amazonaws.com/i/ktbtdpsbga312sg8re3u.png)

I have some ideas for the main plot and game play. It will be an adventure game, set in a post-apocalyptic world, where the antennas where never demolished. You will get stranded in the area, trying to figure out how to get out of there. The point&click (or arrows&spacebar) will be probably combined with some survival mechanics, and maybe some minor action scenes.

Next steps are developing the story and game play a bit more, and putting together some kind of moodboard to set the tone of the game.

For now, you can play my other game, [Live](https://nuria-live.netlify.com/) :)
Technology Reports of Kansai University
Tags: technologyreports
Published: 2020-02-08 10:22:23

Technology Reports of Kansai University (ISSN: 04532198) is a monthly peer-reviewed and open-access international Journal. It was built in 1975 till now by kansai university, japan. The journal covers all sort of engineering topic, mathematics and physics. Technology Reports of Kansai University (TRKU) was closed access journal untill 2017. After that TRKU became open access journal. TRKU is a scopus indexed journal and directly run by faculty of engineering, kansai university.
Research Journal of Chemistry and Environment
Tags: researchjournal
Published: 2020-02-08 10:21:19

Research Journal of Chemistry and Environment (ISSN: 09720626) is an international open-access journal publishes twelve times each year.Research Journal of Chemistry and Environment is an international, inter-disciplinary peer-reviewed journal of high quality devoted to the publication of original research and review papers on any subject at the interface among Chemistry, Chemical Sciences, Environmental Sciences, Bio Sciences, Pharmaceutical Science, Chemical Engineering, Environmental Engineering , particularly those of relevance to industry aiming towards economically and environmentally sustainable industrial processes. All papers subjected to peer-review by members of editorial board or qualified reviewers by using of double blind peer review. The Journal welcomes the submission of manuscripts that meet the general scope and criteria of journal.
Signature Digitale des Blocks et Transactions sur la Blockchain
Tags: blockchain, signature, digitale, wavesplatform
Published: 2020-02-08 10:11:30

Bonjour à tous,

Pour bien comprendre le processus de Signature Digitale des Blocks et Transactions sur la Blockchain, voici une vidéo explicative ainsi que du live code pour la mise en pratique via du code javascript.

https://www.youtube.com/watch?v=KBy2P17hT1M

Prochaine vid&eacute;o ce mercredi ou nous verrons Waves Keeper, une extension navigateur, similaire à Matamask, permettant aux utilisateur de votre application Blockchain de gèrer l'ensemble de leurs comptes directement depuis le navigateur et de manière entièrement sècurisèe.

Suivez nous et posez toutes vos questions sur :

Telegram : https://t.me/wavesdappsFR
Twitter : https://twitter.com/WavesDevFr

https://www.wavesplatform.com
An online book club.. for developers?
Tags: codebookclub, javascript
Published: 2020-02-08 09:38:29

I am a software engineer, mostly working in the backend of a desktop application.  Although I don't use JS in my daily tasks at work, I've been using it a lot recently as part of my side projects, such as a twitter bot, and through React Native for an app I am developing.  

A LOT has changed since I was first introduced to JS during my bachelor's in 2011, and as a result all on my own I was slowly following videos and courses to fill in the gaps. That is, until one day, I was casually scrolling #TechTwitter and saw a tweet by @Madisonkanna, talking about a coding book club(@codebookclub)! I immediately jumped on their discord, and what a GREAT community!! 

We are now on Chapter 3 of the book You Don't Know JS: Get Started, and we started by reading it for free on Github(https://github.com/getify/You-Dont-Know-JS). Last week we had the absolute pleasure of being joined by the author himself, and he gave all in attendance free ebook copies of his book! At the risk of sounding cliche, I have to say that despite thinking I "knew" Javascript, I gained a much deeper insight from reading this book! 

Settling Debates

It was an amazing experience to be able to talk to the author directly, especially knowing he has so many years of experience. While we were supposed to originally speak to him for half an hour and then continue meeting. We all were having such great insight from Kyle that he ended up agreeing to stay the entire hour! It was amazing. In one of our groups we had a discussion about whether or not Javascript really is compiled and if we think that's what kyle really meant to say. Well here was my chance to ask him face to face. Conclusion: He meant what he meant and he said what he said. Javascript is a compiled language. Debate settled! 

Symmathesy

One of the biggest benefits for me being apart of the code book club is the sense of community and frankly - peer pressure to continue reading the book every week! Knowing that I had book club coming up on Sunday really made me read and try to understand the chapter before the end of the week. In my own I definitely would not have felt the pressure to continue the way that I did. In addition to that, discussing what we learned together and answering questions and asking questions also help a lot of the material we covered really stick. Kyle brought to our attention that there is actually a word for this style of learning! - Symmathesy.

Conclusion

It has definitely been a positive experience with the codebookclub and it feels amazing to have such a rapport with an online community! Since the inception of the @codebookclub I've had such a positive experience and have been feeding my hunger to learn more! Looking forward to see where we go with this awesome community!
Offline capable Gatsby site on Cloudflare Workers
Tags: gatsby, cloudflare
Published: 2020-02-08 09:10:53

---
title: Offline capable Gatsby site on Cloudflare Workers
published: true
date: 2020-02-08 09:01:24 UTC
tags: gatsby, cloudflare
canonical_url: https://www.mskog.com/posts/offline-capable-gatsby-site-on-cloudflare-workers
---

I recently moved my blog over from [Hugo](https://gohugo.io/) to [Gatsby](https://www.gatsbyjs.org/). One of the issues I ran into was that the offline plugin did not work properly on Cloudflare Workers.

### Cloudflare Workers

This is essentially the [Cloudflare](https://www.cloudflare.com/) version of [Lambda@Edge](https://aws.amazon.com/lambda/edge/) but with much faster cold start. I decided to give that a try for my new blog mostly because it seemed like a lot of fun to try and the deployment process is super easy thanks to the [Wrangler](https://github.com/cloudflare/wrangler) tool.

### Offline Gatsby

Gatsby can use service workers to make your site work offline by using [a plugin](https://www.gatsbyjs.org/packages/gatsby-plugin-offline/). The site is then cached by a service worker and will work just fine offline and with improved performance for slow connections. The service worker will then check two files in the backgrounds: `app-data.json` and `page-data.json`. [These files are not to be cached](https://www.gatsbyjs.org/docs/caching/#page-data) to make the site update properly without resorting to hard reloads to get new content.

The problem is that Cloudflare Workers will cache these files by default, both on their CDN as well as in the browser. This means that the service worker thinks that nothing has updated and the page will never update with new content without doing hard reloads. I do not know why the Cloudflare Workers cache json files by default, but I do have a solution!

Wrangler will create a directory in your project that has the worker files in it. Among other files there is an `index.js` file with the actual worker script in it.  
On line 38 there is an if-statement that deals with reading assets from the Cloudflare KV store that looks something like this:

```javascript
if (DEBUG) {
  // customize caching
  options.cacheControl = {
    bypassCache: true,
  }
}

```

This snippet of code controls the caching behaviour for debug mode. What we want to do is make sure that JSON files are not cached in the browser. This can be achieved by changing the cache control headers like so:

```javascript
if (DEBUG) {
  // customize caching
  options.cacheControl = {
    bypassCache: true
  };
} else if (url.pathname.match(/json$/)) {
  options.cacheControl = {
    browserTTL: 1
  };
}
```

For some reason I couldn't get `browserTTL: null` or `browserTTL: 0`` to work properly. Setting it to 1 second works however.

The site now works properly. The JSON files are cached on the Cloudflare CDN but only for 1 second in the browser. This means that the service worker should now update properly.
Quang Vũ Blog
Published: 2020-02-08 08:43:16

Quang Vũ Blog là nơi tập hợp tất cả những kiến thức cá nhân về công nghệ thông tin mà mình sưu tầm, nghiên cứu và học tập được trong thời gian dài. Nếu ai có bất cứ thắc mắc cần giải đáp về công nghệ liên quan đến nội dung của mình thì liên hệ cho mình nhé.

Quang Vũ Blog
Địa chỉ: 432 Nguyễn Thị Minh Khai, Phường 5, Quận 3, Hồ Chí Minh 
Phone: +84 977 689 733
Email: quangvublog@gmail.com
Website: https://blog.vu-review.com
https://github.com/quangvublog
https://bitbucket.org/quangvublog/
https://gitlab.com/quangvublog
https://twitter.com/quangvublog
https://www.instagram.com/quangvu.blog/
Neomorphism Iphone Number Pad In Bootstrap 4
Tags: css, html, todayilearned, todayisearched
Published: 2020-02-08 08:22:49

Bootstrap has so many elements to designed a responsive website in a couple of hours. So here we designed iPhone Number Pad In Bootstrap 4 with Neomorphism effects.

In these elements, we used the bootstrap grid and button to show the call interface. Also, we used box-shadow effects with hover effects to show Neomorphism effects. For making responsive on the mobile side we used mobile side media queries after 425px. Here we modify bootstrap button classes to show the hover effect. 
 
Make it yours now by using it, downloading it and please share it. we will design more elements for you.

Download Source code:-

https://w3hubs.com/neomorphism-iphone-number-pad-in-bootstrap-4/