teleren/devto huggingface dataset:
Computer science gift idea for him
Tags: javascript, beginners, programming, python
Published: 2021-12-04 12:41:24


![Computer science gift ideas for him](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/axn6eyuwgt1b1ohovqve.jpg)

Are you looking for a computer science gift idea for him? An interesting idea is a flashcard game. You can play the game with him, even, when you don't know, and don't want to know anything about programming. Rules are easy and can be learned in three minutes. A game takes 15 minutes.

There is a mode for one, two people, and also a game mode for four people.

If he likes fantasy games, or board games, he will be amazed. If you hear about The Witcher, Magic The Gathering, Dungeons and Dragons, Lord of The Rings, Heartstone, or Warcraft, he will love Summon The JSON.

The deck is not only a game. It is also a deck of funny flashcards to sharpen programming knowledge. You can choose between five programming languages and frameworks.

When he works with data, check out Python, C# or Java deck. When he works with websites and web apps, check out Javascript, PHP, and React. Just ask him what programming languages he uses or wants to learn.

Summon The JSON is great for beginner programmers, and for seasoned ones. It is loved by people from around the world.

Visit https://summonthejson.com and order the deck. It is high quality collectible item that will last for long. Epic gift every programmer wants to have.
Sharing with the Tech Community - My talk at Festive Tech Calendar 2021
Tags: githubactions, festivetechcalendar, github, azure
Published: 2021-12-04 12:33:22

---
title: Sharing with the Tech Community - My talk at Festive Tech Calendar 2021
published: true
description: My talk at Festive Tech Calendar 2021
tags: 'githubactions, festivetechcalendar, github, azure'
cover_image: 'https://raw.githubusercontent.com/Pwd9000-ML/blog-devto/main/posts/2021/GitHub-FestiveTechCalendar/assets/main_techCal21.jpg'
canonical_url: null
id: 917323
date: '2021-12-04T12:33:22Z'
---

## Festive Tech Calendar 2021

This article is part of the [Festive Tech Calendar 2021](https://festivetechcalendar.com/). You'll find other helpful tech stories and talks published daily through the month of December by other community members and experts, so make sure to check it out every day.

Firstly I'd like to say a big thank you to **[Gregor Suttie](https://twitter.com/gregor_suttie)** and **[Richard Hooper](https://twitter.com/Pixel_Robots)** who are the organizers of this wonderful community tech event and for inviting me to speak at this years event.

I'd also like to ask that, if you like my or any other authors content, to please help the events initiative to raise support and contributions towards a very worthy charity: **Girls Who Code**. Thank you to **[April Edwards](https://twitter.com/TheAprilEdwards)** for setting this up.

Please donate or share to this just giving page:

**[Girls Who Code](https://www.justgiving.com/fundraising/festivetechcalendar)**

## Have a look at the talk

See the video link of my talk - How to rotate VM passwords using GitHub Actions with Azure Key Vault: {% youtube nSSQtOvwVzA %}

## Have a look at the blog

My original blog post can be found here: {% link <https://dev.to/pwd9000/automate-password-rotation-with-github-and-azure-412a> %}

### _Author_

Like, share, follow me on: :octopus: [GitHub](https://github.com/Pwd9000-ML) | :penguin: [Twitter](https://twitter.com/pwd9000) | :space_invader: [LinkedIn](https://www.linkedin.com/in/marcel-l-61b0a96b/)

{% user pwd9000 %}

<a href="https://www.buymeacoffee.com/pwd9000"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=pwd9000&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff"></a>
React : The Redux/Flux Scofflaw
Published: 2021-12-04 12:24:01

It was at first, an opinion I had. The Redux/Flux design pattern was ugly. Slightly difficult to understand, but more than that; the reason for adopting it never made sense to me. It was 
over-engineering in my mind. A solution looking for a problem. An unshakable friend I didn't like. It was ugly to me.

It violated the single responsibility pattern by misappropriation. The state responsibility being wholly owned by any component, and not the component middleware. Initial state and subsequent progression had; for 25+ years, been within the component itself implemented via only events and event handlers. 

If that architecture needed improvement, certainly browsers would have picked it up first; however, they didn't. There was no reason to change.

When hooks arrived to the React platform it was a subtle admission to a prior mistake. At last, each component was fully responsible for its own state.

Unfortunately, the legacy lives on; because traditions are hard to break. The only thing harder is convincing architects their Flux stance is now legacy.

This includes NPX.
How to set Current Directory In Windows PowerShell & Remove The PowerShell Start Text?
Tags: powershell, terminal, windows, tips
Published: 2021-12-04 11:58:40

Today we will see a simple trick on **Windows Terminal**. I personally like minimal things on Terminal. 

Normally when you **Download Windows Terminal from Microsoft Store**, you will see something like this.


![Screenshot_3.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638617397217/4bm6Z0iB_.png)

So, I am going to **Remove The Windows PowerShell Start Text** and **Set up the Current Directory in Windows PowerShell** just like this.


![Screenshot_2.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638617467521/mn4WbG80Z.png)

Now let's see **How to Set up the Current Directory in Windows PowerShell & Remove The Windows PowerShell Start Text** 👇

**1.)** **Download** & **Install Windows Terminal** from **Microsoft Store**.

**2.)** Open **Windows PowerShell** / **Terminal**.

**3.)** Paste this line `Set-ExecutionPolicy RemoteSigned -Scope CurrentUser`. If it gives you any **Error** then please Open your **PowerShell** with the **permission** of the **Administrator**.


![Screenshot_5.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638618484225/NvneSe990.png)

**4.)** Then type `$profile`

> You will see something like this (%USERPROFILE%\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1);

**5.)** Now open your profile by typing `notepad $profile`

**6.)** Add the following to your profile:


```ps1
Clear-Host
function prompt {
	$p = Split-Path -leaf -path (Get-Location)
	"$p> "
}
```

**7.)** Save the **profile**.

![Screenshot_4.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638618178981/0TRmP8mKz.png)

**8.)** Restart **Powershell** and Boom 💥


![Screenshot_2.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638618097634/MiY4fUZCm.png)



**Thanks for reading this post. Stay tuned for more.**


> 
**You can find me [here](https://bio.link/syedsohan)  also.**


> If you like my content, please consider **buying me a coffee**.

<a href="https://www.buymeacoffee.com/syedsohan" target="_blank"><center><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;"></center></a>
How To Add A Favicon To Your Webpage
Tags: html, webdev, tutorial, favicon
Published: 2021-12-04 11:51:44

Have you ever noticed a little icon on the browser tab of the webpage you are looking at? This little icon is called a "Favicon"

Adding it to your own HTML webpage is super-easy, and I will show you how!

### Step 1

Go to [favicon.io/favicon-converter] (https://favicon.io/favicon-converter/) and upload the image you want to convert into a Favicon.

![Upload or drag and drop the image] (https://i.imgur.com/f94wy55.png)

### Step 2

Click download.

![That big blue button!](https://i.imgur.com/usqKCvB.png)

### Step 3

Choose a place for it to save.

![Downloads is the place where people usually keep it] (https://i.imgur.com/skB0EfG.png)

### Step 4

You will see it is downloaded as a ".zip".
Click the up arrow icon that you see in the bottom of your screen, and select "Show In Folder".

After that, right click the folder and click "Extract All".

### Step 5

Now you will see a bunch of items, from them you need the one labelled "Favicon".
![Favicon is the one](https://i.imgur.com/0s8ApyN.png)

### Step 6

Open your file manager and open the folder where your website is and drag and drop the file named "Favicon" to there. Rename it to `favicon.ico`. Now if you run it with live server, you can see it as the icon of your webpage!

### Uploading it to GitHub or other Managers

Make sure that it is in the root directory! 
If this doesn't work, you might need to add the following code to the head section on each of your HTML files.

```html
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
```

Cover image credit: Wikipedia
My favorite Linux command line apps
Tags: linux
Published: 2021-12-04 11:23:41

A long time ago, in an internet far, far away, it was still the Wild West with open plains and free land for all to explore. On these plains, some people came across a land that would become known as Linux.

This new land was free for the taking and there wasn't a soul in sight. The ones who discovered Linux claimed it for themselves and called it theirs. They tamed the land and built roads throughout the countryside. They made a system to run the land so that it would always be there when they returned. This system they called Linux.

Linux is a unix-like system and comes with a [command line](https://bsdnerds.org/what-is-linux-shell/). While the days are long gone when everyone had to use a command line interface, it's a very powerful set of tools for developers.

## vim

[Vim](https://www.vim.org/) is one of my favorite terminal apps. It's a command line editor (has GUI version too) that let's you edit files very quickly. The whole app is using keyboard shortcuts that can be challenging to [learn](https://vim.is/).

It's available on any server (or their predecessor vi), can be used over the network and any IDE supports its key bindings. It was here 20 years ago and will still be here 20 years from now.

![vim editor](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/57ytvbjrkyfzef8v51xt.png)

## ranger

[ranger](https://github.com/ranger/ranger) is a free, open-source software file manager for the linux desktop. It aims to help both new and experienced users to efficiently manage their files, and to seamlessly navigate their file systems.

![ranger](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yay884qtidosrnra78c5.png)

## ssh

The linux ssh command is used to connect to a Linux server using a secure shell protocol. It works by connecting to the given hostname or IP address and then creating a secure channel between the local machine and its remote counterpart.

In the past telnet was used for that, but it was unencrypted and insecure. The community has moved on to use secure shell or ssh in short.

```bash
$ ssh user@ip
```

From there on you can use the remote Linux system as if it were your own. This also works for OS X and Windows, but the Windows prompt works differently of course.

What are your favorite command line programs?
Automating personal investment reports with Gitlab Pages and CI/CD pipelines
Tags: python, programming, tutorial, productivity
Published: 2021-12-04 11:23:03

## 👋 Introduction

I’ve been investing in stocks and mutual funds in the Indian stock market for a couple of years. The reports available on the trading platforms are not sufficient. Moreover, I use multiple platforms making it impossible to look at the health of my portfolio as a whole. So I set out to create my personal investment report. These were my expectations:

- Reports should be available at my fingertips
- Minimal cost and maintenance

_You can read about my investment strategy [here](https://medium.com/@bp.sagar/a-year-of-investments-in-indian-markets-72aad24a6064)._

## 💸 Data collection

To create reports I needed two datasets:

1. Trades (buys and sells)
2. Latest prices

### 1. Trades

The trading platform I use doesn’t provide APIs to fetch my trades automatically 😕. So I manually export the trade book (as CSV) end of every month and store them in a “data” folder in the repository.

### 2. Latest prices

I wrote a python script that crawls the stock exchange sites. It collects the end of day prices which is good enough for my usecase. You can check out the code [here](https://gist.github.com/bpsagar/a14d2f4fc3ab17cc82b1f6c0acd8549c).

## 📈 Report generation

With all my trades and their latest prices, I could calculate the metrics that I was interested in:

- Total investment
- Current value of the portfolio
- Returns (absolute and percentage)
- XIRR ([code](https://gist.github.com/bpsagar/9f9f530cd8005ba470375e80717ccdb3) to calculate XIRR)

I segregated my trades into equity and debt and calculated the same metrics for the two categories as well. With these metrics, I used [Jinja](https://pypi.org/project/Jinja2/) templating engine to display these numbers in a simple cards design 👇

![Screenshot of investment report](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l8m2ckym8yz4kimvhdxg.png)

Finally, I set up Gitlab’s pipeline schedule to generate the above HTML file every day after the markets closed. And with Gitlab pages, served the same HTML by placing it inside the public folder. For private repositories, only members can access the Gitlab pages thus making it my **personal** investment report 👻

---

Are you an investor looking to create a personal investment report just like this one? Feel free to drop your comments (or reach out to me on [Twitter](https://twitter.com/bpsagar)), I can share more details.

---

If you liked this article, you can [subscribe](https://bpsagar.substack.com/) to my newsletter to get new articles directly in your inbox 🙏
Ghosting inconvenience an issue in HP printer? Dial HP printer support number.
Published: 2021-12-04 11:23:01

Ghosting issues can raise a great deal of ruckus and that may likewise prompt printer in error state circumstance. Along these lines, to manage such a circumstance you can utilize the assistance of client care by dialing the [HP printer support](https://www.amiytech.com/hp-printer-support/) with numbering and looking for help. You can likewise get help by watching tech recordings on Youtube and utilizing the stunts introduced there.
It's not a bug, it's a feature! :D
Tags: unix, linux, trivia
Published: 2021-12-04 11:22:25

> Originally there was no concept of a hidden file. But every directory in Linux has two special directories inside it . (current directory) and .. (the parent directory). These are not useful to list as they exist everywhere, so they were filtered out of output. But the code to do so was too aggressive in an attempt to to both checks in a single line, effectively matching every file that begins with a dot. People found out and abused it to hide files, the bug was never fixed and people came to think of it as a feature.

Source: https://libredd.it/r/linux/comments/at05xh/why_do_hidden_files_in_unix_begin_with_a_dot/egxuvwh
The Metaverse
Published: 2021-12-04 11:21:03

To help you get a sense of how vague and complex a term “the metaverse” can be, here's an exercise to try: Mentally replace the phrase “the metaverse” in a sentence with “cyberspace.” Ninety percent of the time, the meaning won't substantially change. That's because the term doesn't really refer to any one specific type of technology, but rather a broad shift in how we interact with technology. And it's entirely possible that the term itself will eventually become just as antiquated, even as the specific technology it once described becomes commonplace.

Broadly speaking, the technologies that make up the metaverse can include virtual reality—characterized by persistent virtual worlds that continue to exist even when you're not playing—as well as augmented reality that combines aspects of the digital and physical worlds. However, it doesn't require that those spaces be exclusively accessed via VR or AR. A virtual world, like aspects of Fortnite that can be accessed through PCs, game consoles, and even phones, could be metaversal.

It also translates to a digital economy, where users can create, buy, and sell goods. And, in the more idealistic visions of the metaverse, it's interoperable, allowing you to take virtual items like clothes or cars from one platform to another. In the real world, you can buy a shirt from the mall and then wear it to a movie theater. Right now, most platforms have virtual identities, avatars, and inventories that are tied to just one platform, but a metaverse might allow you to create a persona that you can take everywhere as easily as you can copy your profile picture from one social network to another.

https://arztoday.com/metaverse/
Python 
Tags: python
Published: 2021-12-04 11:19:57

What is Python? Executive Summary
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python's simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.

Often, programmers fall in love with Python because of the increased productivity it provides. Since there is no compilation step, the edit-test-debug cycle is incredibly fast. Debugging Python programs is easy: a bug or bad input will never cause a segmentation fault. Instead, when the interpreter discovers an error, it raises an exception. When the program doesn't catch the exception, the interpreter prints a stack trace. A source level debugger allows inspection of local and global variables, evaluation of arbitrary expressions, setting breakpoints, stepping through the code a line at a time, and so on. The debugger is written in Python itself, testifying to Python's introspective power. On the other hand, often the quickest way to debug a program is to add a few print statements to the source: the fast edit-test-debug cycle makes this simple approach very effective.
How to Use a Loop in CSS!
Tags: html, css, tutorial
Published: 2021-12-04 10:54:20

Hey **fellow creators**,

Learn *how to use a loop in CSS* with the help of the SASS preprocessor in less than a minute!
 
If you prefer to watch the video **version**, it's right here :

{%youtube PUOcI8XuDDU%}

##1. The HTML structure.

Start by installing the live sass compiler extension in VS Code, or download it globally via npm to use its script.
Then create a hundred paragraphs by using an Emmet shortcut:

```html
p.t${Hello World}*100
```

##2. Create a SCSS file.

Create a SCSS file and copy and paste the following code:

```sass
@for $i from 1 through 100 {
	.t#{$i}{
	font-size: $i * 1px;
	}
}
```

Then press F1 and look for *Live Sass: Watch Sass* if you are using the live sass compiler extension.
Click on it and it'll create a style.css file with all of the different font-sizes, growing one by one, for each paragraph. 

Check out your app and you'll see that each paragraph will grow from a small font to a bigger font steadily!

Come and take a look at my **Youtube channel**: https://www.youtube.com/c/TheWebSchool

*See you soon!*

Enzo.
Box shadow vs. drop shadow in CSS
Tags: css, webdev, beginners, tutorial
Published: 2021-12-04 10:52:37

We all know that we can use box-shadow to add shadows to our HTML elements. eg 
```css
.box{
    box-shadow: 2px 3px 10px rgba(0, 0, 0, .5);
}
```
![CSS box shadow](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r70zukl0s9f0cz5nsz8m.png)

But did you know that we can achieve the same using drop-shadow filter. You simply have to pass the shadow value in the drop-shadow function
```css
.box{
    filter: drop-shadow(2px 3px 10px rgba(0, 0, 0, .5));
}
```
![CSS drop shadow filter](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9apkwnmby0ia8lax6blz.png)

Although in this example both box-shadow and drop-shadow does the same thing. But if we were to add box-shadow on a PNG image you will see the shape of box-shadow is rectangular/box.
```css
img{
  box-shadow: 2px 3px 10px rgba(0, 0, 0, .5);
}
```
![CSS box shadow on png image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v9xg6e745ghs5bnr1j9j.png)
While if we add drop-shadow to a PNG, the shape of the shadow will be same as the shape of the visible area of the PNG.
```css
img{
    filter: drop-shadow(2px 3px 10px rgba(0, 0, 0, .5));
}
```
![CSS drop shadow filter on png image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1cx54j8vzbmd50opbm08.png)

Make sure you checkout my other articles and YouTube channel
{% user 0shuvo0 %}
{% youtube rfZQ-nlxlqo %}
## Was it helpful? Support me on Patreon
[![Patreon Logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7vnw8g7vs5pok3jwgtgv.png)](https://www.patreon.com/0shuvo0)
Deploy ReactJs to Github Pages
Published: 2021-12-04 10:40:53

It is looked simple to do it, deploy ReactJs app and I followed the strict tutorials to do this [HERE](https://stackoverflow.com/questions/69410128/shows-readme-page-after-deploying-react-app), but I still have error 404 or if I try to make manual deploy from GitHub show me README.md.Here is my project [REPO](https://github.com/vladimirpetukhov/resume)
Weekly Challenge 141
Tags: perl, python, theweeklychallenge
Published: 2021-12-04 10:39:48

[Challenge](https://theweeklychallenge.org/blog/perl-weekly-challenge-141/), [My solutions](https://github.com/manwar/perlweeklychallenge-club/tree/master/challenge-141/sgreen)

## TASK #1 › Number Divisors

## Task

Write a script to find lowest 10 positive integers having exactly 8 divisors.

## My solutions

The main part of this challenge is calculating the number of divisors a given number has. This is one of those cases where you can over-optimize the code for no real benefit. My function `divisors` assumes that a number has two divisors (1 and itself) and then goes from 2 to half the number to see if there is any other divisors. A special case is made for one, which only has one divisor.

Once that part is done, the main function has an list called `solutions`, and set `number` to 1. It then increments `number` and adds it to the `solutions` list if it has eight divisors, continuing until we have 10 numbers.

The Perl solution is a transliteration of the Python code.

### Examples

```
$ ./ch-1.py
24, 30, 40, 42, 54, 56, 66, 70, 78, 88

$ ./ch-1.pl
24, 30, 40, 42, 54, 56, 66, 70, 78, 88
```

## TASK #2 › Like Numbers

### Task

You are given positive integers, `$m` and `$n`.

Write a script to find total count of integers created using the digits of `$m` which is also divisible by `$n`.

Repeating of digits are not allowed. Order/Sequence of digits can’t be altered. You are only allowed to use (n-1) digits at the most. For example, 432 is not acceptable integer created using the digits of 1234. Also for 1234, you can only have integers having no more than three digits.

### My solutions

In Python I use itertools' [combinations](https://docs.python.org/3/library/itertools.html#itertools.combinations) function to generate a list of all combinations. I then use a for loop to count the number of combinations that are divisible by `n`.

Perl doesn't have a built in combination function, so I took a slight different tack with this task. I basically used a binary switch to generate a list of combinations using `map { substr( $m, $_, 1 ) } grep { $i & 2**$_ } ( 0 .. $l - 1 )` where `$l` is the length of the first number (`$m`) and `$i` is between 1 and 2<sup>$l</sup> - 2.

### Examples

```
$ ./ch-2.py 1234 2
9

$ ./ch-2.py 768 4
3

$ ./ch-2.pl 1234 2
9

$ ./ch-2.pl 768 4
3
```