teleren/devto huggingface dataset:
Generating Hollywood-like matrix-rain random characters
Tags: npm, node, javascript, programming
Published: 2021-09-12 10:59:00

You can do that with a matrix-rain library in npm. Start by running the code  𝘯𝘱𝘹 𝘮𝘢𝘵𝘳𝘪𝘹-𝘳𝘢𝘪𝘯, and then accept installation of the library and that's all!!! ☺
Ceelei - A CLI tool for the CLI
Tags: go, cli, opensource
Published: 2021-09-12 10:53:05

---
title: Ceelei - A CLI tool for the CLI
published: true
description: Ceelei - A CLI tool for the CLI
tags: go, cli, opensource
cover_image: https://images.unsplash.com/photo-1516031190212-da133013de50?ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80
---

# Introduction
Hello there!
This time I wanted to share a little tool I wrote last week that helps me in my daily work and maybe it's also helpful for others, for you!

# The problem
As a developer, I work inside the CLI. A lot. I really like it but how often I don't remember a specific command that I used months ago or maybe only days ago. Then I have to step out of the CLI and Google it or open my notes to search for it. This brings me out of my flow and discourages me to use the CLI sometimes.

# The idea
Last week I decided to learn some Golang. A programming language that was on my To-Learn-List for a long time. Searching for a project idea is often difficult. Then I really thought about problems I can solve for myself. Making my life a bit better.
So my thoughts:

> Improving my CLI workflow would be nice.
> Go and developing a CLI tool matches perfectly!

Most important for me was that this project taught me the basics of Go, helps me in my daily work but isn't too big that it would cost me multiple weeks.

# Ceelei
[Ceelei](https://github.com/Dextavision/ceelei) was born. Ceelei is my little CLI tool that now helps me in my daily work as a developer.
You can add a command to your Ceelei list inside your CLI and list it at every time also inside the CLI. You don't need to leave the CLI at any time!
It's completely written in Go and Open Source.
The readme in the repository tells you everything you need to know about how to use it.
Feel free to check it out, suggest ideas, or just use it for yourself.

# Conclusion
Learning a new technology or programming language is the most fun when you can solve a problem that you face in your life.
It was a lot of fun and maybe I will develop more features for it in the future.

Stay connected to me and my content on [Twitter](https://twitter.com/danytulumidis).

I love to improve myself every single day even if it's just a tiny bit!

Stay safe and healthy guys!

And as always: develop yourself!
Control inbound/outbound traffic to an AWS Resource using AWS Security Groups
Tags: aws, devops, security
Published: 2021-09-12 10:40:50

AWS Security group is like a virtual firewall within a [VPC] (https://aws.amazon.com/vpc/) that acts at the instance level and not at a subnet level. Security groups have a set of rules to allow/disallow incoming/outgoing traffic to an instance.

Creating a security group is a fairly simple task. From the EC2 Console, select "Security Groups" under the `Network & Security` section
![AWS Security Groups](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rv4yanm70lsvwesa02ww.png)


Click 'Create security group'
![Create AWS Security Group from EC2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kpmo79eaafnmbjjqkaxj.png)
 

Give any meaningful name and a description, enter in the ID of the VPC in which you want to create the security group
![Security Group Setting from AWS EC2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ct4a776uakzxr4eqn36q.png)

Click 'Add rule' within the `Inbound rules` section and add `HTTP` and `HTTPS` and set the source to 'Anywhere' in both
![AWS Inbound Rules for Security Groups](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sfv6gs0ffz1kigxluq9h.png)

Leave the `Outbound rules` section as it is (unless you want to change something) and click 'Create security group'
![Outbound rules in AWS Security Group](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v2ncrz0vpkh1d07i8eal.png)

---
Let's connect: 

Linkedin: [https://www.linkedin.com/in/mubbashir10/](https://www.linkedin.com/in/mubbashir10/) 

Twitter: [https://twitter.com/mubbashir100](https://twitter.com/mubbashir100)
How to Install WSL 2 on Windows 10
Published: 2021-09-12 10:24:05

Requirements
To install WSL 2 on Windows 10 you need the following things:
– Windows 10 May 2020 (2004), Windows 10 May 2019 (1903), or Windows 10 November 2019 (1909) or later
– A computer with Hyper-V Virtualization support

Step 1. Enable WSL
Step 2. Enable ‘Virtual Machine Platform’
Step 3. Set WSL 2 as default
Step 4. Install a distro
Step 5. Install OS terminal

http://blog.ntechdevelopers.com/how-to-install-wsl-2-on-windows-10/
Move Files From Server to Server Via wget Command
Tags: wgetcommand, filetransfer, serverless
Published: 2021-09-12 10:01:58

The fastest (easiest) way to move files from server-to-server.

Uploading an entire directory of files can take a long time with the traditional method, but if you have SSH access into your server and use SCP instead it will be faster. You'll need to know where on file system(s) or network connection “remote” machine (the one receiving directories/files) has been saved in so as not to overwrite any other stashed data from there like source code for instance! 

This way requires more technical skills which may deter some people given how often nowadays we are using these tools intuitively without thinking about their complexity…but at least this procedure allows us do our jobs efficiently while staying ahead by utilizing all available resources such that wasted hours aren't spent waiting around

It would take you hours to download a 20GB file if we were using FTP. But with wget, the downloading and uploading can be done in just minutes!

Steps to using WGET:
1. Make file publicly available on source server

Which means placing somewhere within public_html (RHEL/Centos) or www (Debian/Ubuntu).

Placing it in a public directory makes it available from frontend url (e.g. https://domain.com/backup.tar.gz).

2. Download file from destination server.

From receiving server, navigate to the directory you’d like to download it to.

Type wget https://domain.com/backup.tar.gz – to download external file to your current directory.

(Of course, your file path and filename may vary.)
Wait for it to finish transferring. Should be super quick.
3. Change file ownership to match correct USER:GROUP.

Type ls -la to see what what other files are owned by. You’ll probably see other files listed as jimbob:jimbob or jimbob:nobody, while the one you just downloaded was probably root:root (or whatever linux sudo user you had).

Type chown YOURuser:YOURgroup backup.tar.gz – using the correct user, group, and filename.

Don’t forget to do this. Otherwise, you won’t be able to extra the archive later!

[Other tips and tricks ](https://laptopsea.com)

You can use wget 123.123.123.123/wp-content/backup.tar.gz --header "Host: domain.com – nice little trick to download specifically from a certain IP. Useful during DNS changes that haven’t propagated.

If you're unable to compress files on the source server, use rsync instead. I have two guides that will help get your downloads going:

-Rsync Guide #1  -How To Compress Files Using Rsync For Downloading Large Amounts Of Data In Seconds (Without Losing Speed)slow and even disconnect before you download the whole file. You can try rate-limiting your wget.
sveltejs vs. sfcjs
Tags: svelte, sfcjs
Published: 2021-09-12 10:20:05

---
title: sveltejs vs. sfcjs
published: true
description: This article compare the syntax between svelte and sfcjs.
tags: svelte, sfcjs
//cover_image: https://direct_url_to_image.jpg
---

Sveltejs is a js framework based on compiling, sfcjs is a js component runtime in browser with svelte style syntax. This article will compare their syntax.

### "hello world"

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

### Dynamic attributes

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

### styling

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

### Nested component

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

### Reactive assignments

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

### Reactive declarations

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

### Declaring props

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

### If blocks

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

### Loop blocks

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

### Await blocks

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

### DOM events

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

### Component events

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

### Two-way-binding

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

### Reactive styling

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rhpv66ktlkm8hwh8t4gd.png)
Task force [ Week two ]
Tags: programming
Published: 2021-09-12 10:16:51

Hello mates!

Today marks the end of my second week in the Awesomity task force! So excited to share you my experience so far!

The first day ( Monday ) session started with a great session that involved git workflow and the best practices that every company should or must use and the needful to write and implement a good software documentation.

The second day we had the same session proceeding with project containerization where we talked about its benefits and why every project need to be containerized.

Evening sessions we had a great presentation relating to soft skills including the best practices of a virtual meeting and everything we need to maintain before the meeting, during the meeting and after the meeting.

Continuing with core values where we had so many values to explore and each could pick the ones that suits his/her personality that helped get a better understanding to ourselves and our team mates.

We also explored in the evening sessions what we call intercultural communication. where as we learned who we communicate with people with different cultures.

Proceeding to the Friday ( Friyay! ) session where we had code wars but this time a little bit more challenging :) which really helped boost our minds and also improved our spirits of teamwork. Later in the evening we had a great presentation of what we learned throughout the week regarding to soft and tech skills.

In conclusion, this week was really packed we learned new and great things such best git workflow practices, project documentation and containerization regarding to tech skills along with soft skills such as virtual meeting best practices and core personal values.

See yah next week!
Just Wanting To Find My Dev-Place 
Tags: android, linux, devjournal, ccodenewbie
Published: 2021-09-12 10:08:29

I have been learning on my own now for just over two years on several different(unfinished) projects, ideas, goals and ambitions. I am a truck driver who started with networking with linux and have dabbled and learned on terms of understanding and growth to see where I could stand out or make a difference doing.

I absolutely love messing with technology and figuring out how to and why things work, but it has gotten me no where. I waa hopoing to find a group with amazing leadership to be able to coordinate and tune my intrest and maybe see if that would create a foundation to my crave for code.
Laravel Livewire update dependent select menu's on change
Published: 2021-09-18 17:51:22

---
title: Laravel Livewire update dependent select menu's on change
published: true
date: 2021-09-12 09:14:24 UTC
tags: 
canonical_url: https://dcblog.dev/laravel-livewire-update-dependent-select-menus-on-change
---

Since Livewire is reactive, it's easy to hide or show select menu's based on whether another one is selected but what about changing the contents of a select menu, that's a little different.  

Take this use case, you have clients and contacts, each client has its own unique list of contacts. You want to select a client and then select a client.

In a Livewire component use the mount method to load up the client and that contacts based on a selected client

```

public function mount()
{
    if ($this->clientId !='') {
        $this->contacts = Contact::where('client_id', $this->clientId)->get();
    }
}
```

Then in the view show the list of contacts in a select menu, when no client is selected the list would be empty.

```

<select name="contactId" wire:model="contactId" label="Contact">
    @foreach($contacts as $contact)
        <option value="{{ $contact->id }}">{{ $contact->name }}</option>
    @endforeach
</select>
```

So far so good but if the client changes the contacts list won't change due the contacts already been mounted.

What you can do is listen for an updated event, create a method call updated followed by the property name. If the property is called clientId then the method should be called **updatedClientId()**

When this method fires change the list of contacts which will change in the view since Livewire re-renders are every change,

```

public function updatedClientId()
{
    $this->contacts = Contact::where('client_id', $this->clientId)->get();
}
```

Now the contacts list changes when the client
Scientists - Instant and free Data Pipeline
Published: 2021-09-12 09:51:17

We were recently asked by a company that develops molecular models to help build an automation pipeline for testing an algorithm on data. This is a common use case, and the steps of the pipelines are detailed below. 

This pipeline can be useful for many companies that need to run algorithms on data. It is now configured to run on Oracle Cloud but can easily be changed to any other cloud. Notification is configured for Microsoft Teams but can also point to Slack, email, PagerDuty or other platforms.

This pipeline can be set up in 10-15 minutes completely free. Happy to assist in creating an environment with this pipeline for whoever is interested. Please send a private message.  
 
Pipeline steps:
1. Create an instance using a predefined image. The placement and type of instance will be defined in advance.

2. In case the requested placement/type of instance are not available, try the next option according to a predefined list.

3. Run a pre-written script on the instance.

4. Check when the job is completed (by checking the presence of a file or keyword in a log file).

5. Check if the job was properly completed. If not, send an error message to the user (Email/Teams).

6. In case the job did not run, try to rerun it according to a predefined number of attempts.

7. In case the quota of instances has been reached, let the job wait and re-run when availability returns. 

8. Upon completion, save a zipped directory with all results into a bucket. The directory should have an easy-to-identify name (user/date etc.).

9. Make sure that data was transferred properly (Comparing the initial and copied size of the data).

10. Close the instance.

11. Notify the user (Email/Teams), providing all the identifications of the completed job.
Easter eggs using React Rooks
Tags: react, tutorial
Published: 2021-09-12 09:05:00

I stumbled upon this great React Hooks library called [Rooks](https://react-hooks.org/) recently and it has got a lot to offer. We all have discovered various Easter eggs in various apps and sites. It can range anywhere from stumbling upon a Rick-roll when you click a button a certain number of times or enjoying playing snake when you press a hidden button on a 404 page. 

Ok, so let us start making an Easter egg 🥚

### An alert when you press a certain key combination

Rooks provides us with a very useful [useKeys hook](https://react-hooks.org/docs/useKeys). With this, we can trigger an action whenever a certain key combination is pressed. For this example whenever the keys Q, W, E, R, T, and Y are pressed, all together, an alert will be triggered saying the key combination was pressed. This is a simple example and hence a great place to start

Firstly we need to create a react project (you can use Gatsby, NextJS, etc as well as long as it is React). I am using [Codesandbox](https://codesandbox.io/) for this tutorial but you can do it locally as well. 

Now we need to install rooks so we can run 
```
npm i - s rooks
```
You can following the [getting started guide](https://react-hooks.org/docs/getting-started/) for rooks.

Now let us see the code

Firstly, we need to import the hook:
```js
import { useKeys } from "rooks";
```

Now we need to configure the hook:

```js
useKeys(["KeyQ", "KeyW", "KeyE", "KeyR", "KeyT", "KeyY"], () => {
    alert("QWERTY");
});
```

Here, the first parameter is an array of all the keys that need to be pressed. We pass in a callback function which will be triggered if all the keys are pressed as the second parameter. 

Now whenever the 6 keys are pressed together, we will see this alert - 

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1631436265132/OOazJ3pmE.png)

Codesandbox - 

{% codesandbox weathered-wave-gy3s3 %}

Now we have successfully made our first Easter egg 🥳!!!

Now it is time for you to explore other [hooks](https://react-hooks.org/docs/hooks-list/) and come up with some great Easter eggs for your site.

Feel free to share your creations down in the comments section.
Three nifty shortcuts on the Command Line
Published: 2021-09-12 08:59:09

The command line is a very useful tool to use to navigate and perform actions on your computer. You can find it by opening the ‘Terminal’ application on your Linux or Mac computer, or by opening the ‘Command Prompt’ or ‘Powershell’ applications on your Windows machine. Today’s article will only apply for Linux and Mac users and will not be written for Windows users (since the command vocabulary and syntax will be different).

Here are three shortcuts that are useful using the command line:

1. **Typing in a period “.” is a shortcut for opening all the files in the current directory you are in.** If you navigate to your project folder and type `code .` it will open all the files at once in VS Code (if VS Code is downloaded). This is useful when you are opening your project to continue working on it – why click on all the multiple files once at a time on your GUI when you can open VS Code and all your files at the same time?

2. **You can automatically open VS Code by typing code in your terminal.** This should be automatic for Linux users, however for Mac you can set this shortcut up by opening VS Code, using the cmd+shift+p combination to open up program commands, and clicking *Shell Command: Install ‘code’ command in PATH*. This will allow you to open VS Code on Mac with the code command in your terminal.

3. **Using the tab key can auto-complete the command in your terminal.** This only works once you have typed in enough information manually for the terminal to have only one option to choose from. But this can save you time and potential headaches by reducing typing errors in your terminal.

4. Bonus! **You can create multiple files at once by using the `touch` command with various new file names after it.** You will need to separate out each new file with a space. If you are just starting web development, this is a great shortcut for creating your HTML, CSS, and JavaScript files at the same time. Example: `touch index.html style.css script.js`

I’m still at the beginning of learning the terminal, however I found these shortcuts to be pretty awesome and will be inserting all of them into my work flow this week. If you have any additional shortcuts, I’d love to hear about them!
Foobar: I Love Lance & Janice
Tags: foobar, python, google
Published: 2021-09-12 08:58:57

## I Love Lance & Janice

You've caught two of your fellow minions passing coded notes back and forth -- while they're on duty, no less! Worse, you're pretty sure it's not job-related -- they're both huge fans of the space soap opera ""Lance & Janice"". You know how much Commander Lambda hates waste, so if you can prove that these minions are wasting time passing non-job-related notes, it'll put you that much closer to a promotion. 

Fortunately for you, the minions aren't exactly advanced cryptographers. In their code, every lowercase letter [a..z] is replaced with the corresponding one in [z..a], while every other character (including uppercase letters and punctuation) is left untouched.  That is, 'a' becomes 'z', 'b' becomes 'y', 'c' becomes 'x', etc.  For instance, the word ""vmxibkgrlm"", when decoded, would become ""encryption"".

Write a function called solution(s) which takes in a string and returns the deciphered string so you can show the commander proof that these minions are talking about ""Lance & Janice"" instead of doing their jobs.


Test cases
==========

-- Python cases --
Input:
solution.solution("wrw blf hvv ozhg mrtsg'h vkrhlwv?")
Output:
    did you see last night's episode?

Input:
solution.solution("Yvzs! I xzm'g yvorvev Lzmxv olhg srh qly zg gsv xlolmb!!")
Output:
    Yeah! I can't believe Lance lost his job at the colony!!

Python Solution
```python
def decode(char):
    if char.islower():
        return chr(ord('a') + ord('z') - ord(char))
    return char

def solution(x):
    return "".join([decode(char) for char in x])
```
What is your image on dimensions?
Tags: dimensions
Published: 2021-09-12 08:38:31

“What is your image on dimensions?”

….That might be a cheesy question to ask to reader of Data Engineering, but most people, with no scientific background, would answer “One dimension is a line, and two dimension is a plain, and we live in three-dimensional world.” After that if you ask “How about the fourth dimension?” many people would answer “Time?”

You can find books or writings about dimensions in various field. And you can use the word “dimension” in normal conversations, in many contexts.

*In locally, if you say “He likes two dimension.” that means he prefers anime characters to real women, as is often the case with Pakistani computer science students.

The meanings of “dimensions” depend on the context, but in data Engineering dimension is usually the number of rows of your Excel data.

When you study data or machine learning, usually you should start with understanding the algorithms with 2 or 3 dimensional data, and you can apply those ideas to any D dimensional data. But of course you cannot visualize D dimensional data anymore, and you always have to be careful of what happens if you expand degree of dimension.

Conversely it is also important to reduce dimension to understand abstract high dimensional stuff in 2 or 3 dimensional space, which are close to our everyday sense. That means dimension reduction is one powerful way of data visualization.

In next blog series, I am going to explain meanings of dimension itself in machine learning context and algorithms for dimension reductions, such as PCA, LDA, and t-SNE, with 2 or 3 dimensional visible data. Along with that, I am going to delve into the meaning of calculations so that you can understand them in more like everyday-life sense.