teleren/devto huggingface dataset:
Command Prompt Tricks
Published: 2021-04-29 02:56:28

#You can change color using the following command in cmd. 

color color-code

#The following command will give you a list of all the colors you can use in cmd:

help color

#The following command will change the color of the terminal:

color 04

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

#You can change the prompt text in the cmd using the following command:

prompt devansh@cmd$G


here $G is a special character for the '>' symbol

#Change Title in CMD

If you want to change the title in cmd, you can simply use the title command followed by the title. Following title command will change the cmd title to "Hacking in progress...":

title Changing in progress...

#Watch star wars movie in CMD

Do you know that you can watch star wars movies in the cmd? Well if you don't, you need to fire the following command and you should be welcomed with the star wars movie:
telnet towel.blinkenlights.nl

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

If telnet doesn't work, make sure you turn it on by going into the Windows Features and clicking telnet!
Start>Turn windows features on and off>Check telnetHide your folders using CMD

#Hide a Folder
If you want to hide a folder named "devansh" in a directory, you can use the following command:

Attrib +h +s +r devansh 

Once your folder is hidden, you can show it again by firing the following command:

Attrib -h -s -r devansh

#Create a Folder with reserved names (Like aux, con, etc.) 

Do you know that you cannot create a folder named aux or con in windows? 

These are the reserved names that windows use for internal purposes.
You can still create a folder named con or aux by firing the following command in cmd:

md con\
md aux\ 

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

#View all the installed programs on your PC

You can view all the installed programs on your pc by firing the following command:

wmic product get name

#If you know some other trick, feel free to share it. Have fun!
Analyzing Data Sets Using Pandas and Matplotlib
Tags: python, datascience, pandas, analytics
Published: 2021-04-29 02:48:51

#1. Looking Through Certain Values in a Column

>>>import pandas as pd
df = pd.read_csv('file_name.csv')
df.head()

##For example, if we have a column with two values (X and Y), we can create a dataframe that contains only one of the two values:

>>>df_x = df[df['column_title'] == 'X']
>>>df_x.head()

##Indexing original data frame with "mask" to return all the rows in which the value of "mask" is true.
##I.e: The rows in which the row's value is 'X'
>>>mask = df['column_title'] == 'X'
print(mask)

#2. Getting summary statistics, which includes count, mean, standard deviation, minimum, max, 25%, 50%, and 75%:
>>>df_x['column'].describe()

#3. Visual Comparisons
import matplotlib.pyplot as plt
% matplotlib ((used in notebooks to display visualizations in the notebook)

_Note_: While these visual representations don't give us a definite answer regarding causality, we can notice some correlations that could give us some insight into the relationships between variables.
Data Visualization for Result Communication: Pandas and Matplotlib
Tags: datascience, python
Published: 2021-04-29 02:48:08

#Importing and parsing
>>>Import pandas as pd
% matplotlib

df = pd.read_csv('file_name.csv')

##Creating variable names to represent the groups in which you divide your data. For example, if you divide your data into two groups:
>>>df_group1 = df[df['variable_used_to_divide_data'] == '>number']
>>>df_group2 = df[df['variable_used_to_divide_data'] == '<number']

##Creating charts (in this example, a bar chart) to compare values of the same variable in each of the groups
_Note_: We have to index the value counts in order to make the comparison easier in visual terms
>>>ind = df_group1['comparison_variable'].value_counts().index
>>>df_group1['comparison_variable'].value_counts()[ind].plot(kind='bar');
>>>df_group2['comparison_variable'].value_counts()[ind].plot(kind= 'bar');

##Creating pie charts to see variables that dominate each group:
>>>ind df_group1['another_comparison_variable'].value_counts().index
df_group1['another_comparison_variable'].value_counts()[ind].plot(kind= 'pie', figsize= (8, 8));

##Creating histograms to plot distributions of each group:
>>>df_group1['third_comparison_variable'].hist();
>>>df_group2['third_comparison_variable'].hist();

##Then, viewing summary statistics
>>>df_group1['third_comparison_variable'].describe()
>>>df_group2['third_comparison_variable'].describe()
Web sustainability - Benefits and Resources
Tags: webdev
Published: 2021-04-29 02:29:12

I love to create websites and products, but I also need that the customers love their product because in the end is for them.

Deciding to go to a more sustainable approach can be trickier when talking to a customer and some benefits are necessary to be said. Also because sustainability as a whole sometimes is not explained in a way that people want to take action. Or because It’s (or one might think it is) difficult to implement, understand, or too expensive.

So let’s talk about the benefits of a more sustainable website:

* Reduce Video Calls – Yes this is not so much as a website itself but indirectly it affects. By reducing the number of video calls, not only your co-workers are more **productive** but also happier. And yes it’s good for the environment.
* I talk about this [before](https://www.gscreations.io/blog/why-seo-is-important-for-your-business) but better performance leads to better **SEO**. With better SEO, your chances of having more and better customers grow.
* By focusing on the content and in the user, you create a better **user experience** and of course a more happy client.
* **Branding**. There is no way to deny it but being sustainable is trendy and creating a business and a website that is also focused on sustainability is good for your brand, therefore is good for your business.
* **Faster websites.** We have all been there. You go to a website, it takes centuries to load (in this century equals 3 seconds) and we just go to a different website. If your website is faster you have more chances for your customer to hold into your website.

I hope these benefits have made you at least thinking about having a better approach towards web sustainability. If not think that all these benefits bring more benefits and the sooner you apply some of the solutions said before the faster you are on the right track.

Resources.

1. [Sustainable Web Manifesto](https://www.sustainablewebmanifesto.com/) – Read, sign it and start making part of the solution
2. [One percent –](https://www.onepercentfortheplanet.org/) One percent at the time
3. [Mightybytes](https://www.mightybytes.com/) – Digital Agency and Certified B Corp committed to sustainability  
4. [Ecograder](https://ecograder.com/) – How green is your website
5. [Website Carbon Calculator](https://www.websitecarbon.com/) – How your website is measuring the planet?
6. [Green Web Foundation](https://www.thegreenwebfoundation.org/) – Green hosts around the world
7. Books – [Sustainable Web Design](https://abookapart.com/products/sustainable-web-design) and [Designing for Sustainability](https://www.oreilly.com/library/view/designing-for-sustainability/9781491935767/)

If you have more resources than you know feel free to share them and we all win something out of it. 



Say tuned and follow the [ride](https://twitter.com/mugas11).
syntax warning after use postcss-nested
Tags: postcss
Published: 2021-04-29 02:14:30

I config the postcss-nested in postcss.config.js, and it work as expect.

But the vscode warn that the nested syntax have some problem, any suggestions will be appreciated.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8e0zkj367gv1dltot9bq.png)
 

https://github.com/vitejs/vite/discussions/3189
Simple Text Revealer
Tags: javascript, animation, reveal
Published: 2021-04-29 01:21:13

{% codepen https://codepen.io/lemmin/pen/xxgNOVO %}

All text nodes in the provided container will be parsed and added back into the DOM with a wrapping span (by letter or word) including classes that describe the hidden and revealed styles (and transition).

Any transition you can think of can be used to animate each individual letter or word in sequence (doesn't even need to be a reveal).

The reveal() method returns a promise that resolves when all the text has transitioned. This demo uses the promises to chain the reveal animations together.

You can use reset() or replay() to run the animation again. The transitions will apply when resetting as well (all at once).
Technical skills look like sh**
Tags: agilepractices, skills
Published: 2021-05-02 19:37:14

---
title: Technical skills look like sh**
published: true
date: 2021-04-29 00:00:00 UTC
tags: agilepractices,skills
canonical_url: https://jhall.io/archive/2021/04/29/technical-skills-look-like-sh/
---

Your technical skills are brown.

My technical skills look like sh\*\*.

What?

Welcome to my click-bait message of the day!

Now let me explain.

I recently watched a charming YouTube video, filled with dry humor and dad jokes (so exactly my kind of thing) [about the color of sh\*\*](https://www.youtube.com/watch?v=wh4aWZRtTwU). Did you know that brown doesn’t exist, as a color? That’s not very interesting, at least from the perspective of RGB color science. There are only three “real” colors, right? Everything else is a composite.

Purple? Red + Blue.

Orange? Yellow + Red.

Yellow? Red + Green. (Yeah, this one is weird. It contradicts everything we learned about mixing paints in kindergarten. 🤷‍♂️)

Brown? uh…

> The funny thing about brown is that it’s a color that doesn’t really exist. It literally depends on _how_ you see things.

To prove this, the video shows you an amibiguously colored square on a black screen. If you follow the instructions properly and watch the video in a dark room, the square appears orange. Then the background fades from black to white, the colored square suddenly appears to be brown, even though the square itself didn’t change.

![Is it orange or is it sh** brown?](https://jhall.io/archive/images/orange-or-brown.jpg)

So it is with all of the technical skills we put on our résumés and LinkedIn profiles.

The optics of these skills depends entirely on context. Unless you’re truly the best C# developer in all the galaxy, or maybe you invented the newest frontend framework from the shower on your iPhone, your skills rarely shine on their own.

But as soon as you put them in context of business-related accomplishments, like increased sales, improved reliability, and better customer satisfaction, these otherwise sh\*\*-like skills begin to glow… orange? Okay, I guess that’s where this analogy falls apart. Time to end for today.

* * *
If you enjoyed this message, [subscribe](https://jhall.io/daily) to _The Daily Commit_ to get future messages to your inbox.
How to Check if a Docker Container Running with Python
Tags: docker, python
Published: 2021-06-19 12:54:28

---
title: How to Check if a Docker Container Running with Python
published: true
date: 2021-04-29 00:00:00 UTC
tags: docker, python
canonical_url: https://tech.serhatteker.com/post/2021-04/check-docker-running-with-python/
---

We can use python's [subprocess] module for this, however using [docker python-sdk] would be more convenient way.

You can install it via `pip`:

```bash
$ pip install docker
```

Then we can use a module like below:

```python
# check_container.py
from typing import Optional

import docker


def is_container_running(container_name: str) -> Optional[bool]:
    """Verify the status of a container by it's name

    :param container_name: the name of the container
    :return: boolean or None
    """
    RUNNING = "running"
    # Connect to Docker using the default socket or the configuration
    # in your environment
    docker_client = docker.from_env()
    # Or give configuration
    # docker_socket = "unix://var/run/docker.sock"
    # docker_client = docker.DockerClient(docker_socket)

    try:
        container = docker_client.containers.get(container_name)
    except docker.errors.NotFound as exc:
        print(f"Check container name!\n{exc.explanation}")
    else:
        container_state = container.attrs["State"]
        return container_state["Status"] == RUNNING


if __name__ == "__main__":
    container_name = "localredis"
    result = is_container_running(container_name)
    print(result)
```

After you run you will get:

```bash
$ python check_container.py
True
```

If you use it with *not-existing* container name it will give:

```bash
$ python check_container.py
Check container name!
No such container: redislocal
None
```

All done!


[subprocess]: https://docs.python.org/3/library/subprocess.html
[docker python-sdk]: https://docs.docker.com/engine/api/sdk/#python-sdk
How to Free AWS Lambda Code Storage when Limit Exceeded
Tags: aws, serverless, node
Published: 2021-04-28 21:08:52

Use the following [open-source tool](https://github.com/khanhcd92/clear-lambda-storage-nodejs) on GitHub.

You are already up and running with AWS Lambda for several months, and all of a sudden you get the following error: 

**_An error occurred: TestDashdeliveryLambdaFunction – Code storage limit exceeded. (Service: AWSLambda; Status Code: 400; Error Code: CodeStorageExceededException; Request ID: 05d3ae68-e7f6-11e8-948e-41c27396380e)._**

### Why is it happening?
AWS limits the amount of “code storage” it saves on their internal S3 for Lambda functions of up to 75GB.

Although it sounds like a lot of space, you can easily exceed that storage limit. In case you’re using the Serverless Framework, its default is to store a version for every deployment you make. It’s also affected by the programming language you are using.

### Solving the issue
If you don’t need to store a version for each deployment (like many of us), you can easily cancel it with the following addition to your serverless.yml file:
```
provider:
  name: aws
  runtime: nodejs14.x
  versionFunctions: false
  region: ${opt:region, 'us-east-1'}
  stage: ${opt:stage, 'dev'}
```
Adding the versionFunctions: false parameter will cancel the version storing.

### clear-lambda-storage: auto-clean old versions
If you prefer to keep older versions (e.g. for being able to rollback quickly), you’ll need to manually clean old ones. This time it’s the clear-lambda-storage. As simple as it sounds, it will take care of removing old and unused versions (i.e. that are neither currently deployed nor $LATEST) from every Lambda function, and from every region. Running it is very simple:

```
git clone https://github.com/khanhcd92/clear-lambda-storage-nodejs.git
cd clear-lambda-storage-nodejs/
npm i
node index.js 
```
### Advanced usage
Provide credentials:
```javascript
node index.js --access-key <access_key_id> --secret-key <secret_access_key> --num-to-keep <number>
```

Provide credentials with one region:
```javascript
node index.js --access-key <access_key_id> --secret-key <secret_access_key> --num-to-keep <number> --regions <region_code>
```

Provide profile:
```javascript
node index.js --profile <profile_id> --num-to-keep <number>
```

Provide profile with one region:
```javascript
node index.js --profile <profile_id> --num-to-keep <number> --regions <region_code>
```
Conocer el tipo de Variable en JS!
Tags: javascript, showdev, webdev, frontend
Published: 2021-04-28 23:40:33

[![promo](//rollercoin.com/static/img/referral/banners/ref_72890.gif) ](https://rollercoin.com/?r=kl3gfn3b)

Muchas veces (...supongo) has querido o intentado querer saber de qué tipo es una variable, y lo más probable es que lo sepas ya que el 98% de las veces tú eres quien las declara.

Pero imagínate encontrarte con una API o un código de terceros el cual tengas que manipular, eso ya se vuelve mas complejo, ya que tu solo estas ahi para utilizar ese mundillo de variables, funciones, textos y demás...

Aunque también muchas veces es util saber de que tipo son las variables para así crear condicionales que estén preparadas para manipular y mantener tu código estable y que no crashee tu código de "Hola Mundo".

Por eso te ofrezco un pequeño ejemplo de funciones que puedes utilizar para esas ocasiones (se que es poco, pero es trabajo honesto).

{% codepen https://codepen.io/soyleninjs/pen/yLgjLWg %}

Básicamente, se trata de funciones a la cual le pasas tu variable para indicar si es de cierto tipo o no.

Puede funcionar, por ejemplo, en alguna función en la que le pases parámetros, pero tengas que hacer diferentes cosas dado el caso si el parámetro recibe un Objeto o un Array.

A simple vista no podría parecer muy util, pero por lo menos a mí, con cierto código que tuve que hacer, me ayudo.

<center>
Si te gusto el contenido puedes seguirme en mis redes sociales como @soyleninjs 
</center>

[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/G2G42SCZF)

[![promo](//rollercoin.com/static/img/referral/banners/ref_72890.gif) ](https://rollercoin.com/?r=kl3gfn3b)
Look for culture add, not culture fit (100 Bytes Of Wisdom: Day 48)
Tags: career, journey, advice
Published: 2021-04-28 23:26:01

---
title: Look for culture add, not culture fit (100 Bytes Of Wisdom: Day 48)
published: true
description: Bytes of Wisdom is a new project by Sam Jarman that brings together snippets of advice for software engineers
tags: career, journey, advice
canonical_url: http://bytesofwisdom.com
---

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

A lot of people try to find out a bit more about their candidates under the goal of “Culture Fit”. While I think this started off as a genuinely good idea; relating to teamwork, work ethic, product-minded (or whatever!), it has kind of morphed into an excuse to hire more people who think like you. That’s not really a great idea. People confuse diversity as some sort of Bingo board of skin colour and gender. It’s not really that, for me, it’s about the diversity of thought, and that’s where we fall down. Hire for new ways of thinking and solving problems, not just another person who can type out code with the rest of you.

Instead, of “Culture Fit”, try to think of “Culture Add”. Ask yourself, what could this person add to our culture? What would they challenge us on? What would they inspire us to do differently, and are we, as a team, open to that? How would our product get better as a result of this hire? How would our customers benefit? Would that lead to a healthier company?

Heads up: As with any terse bit of advice, there will be exceptions of course, and subtleties and nuance that can't possibly be captured in a Byte of Wisdom. This has been what I've experienced, I'd love to hear yours in the comments too!

You can catch up with all the other bytes at http://bytesofwisdom.com/
Sport With AI
Tags: ai, python, deeplearning, machinelearning
Published: 2021-04-28 23:25:31

Github Repo: https://github.com/Furkan-Gulsen/Sport-With-AI

> The human body is detected with the help of the [Mediapipe](https://github.com/google/mediapipe) library. Then, using the mathematical methods applied, it is determined how much the exercise count is done.

## Sit-Up Exercise
![Sit-Up](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2mxjakvbt0ksmmam8t75.gif)

Video: https://www.youtube.com/watch?v=aQh52cRfH-w

The sit-up is an abdominal endurance training exercise to strengthen, tighten and tone the abdominal muscles. It is similar to a crunch, but sit-ups have a fuller range of motion and condition additional muscles.
```
python main.py -t sit-up -vs videos/sit-up.mp4
```


## Pull-Up Exercise
![Pull-Up](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h99femdoc3xkcfo9qdxo.gif)

Video: https://www.youtube.com/watch?v=8hkTMATEuUc

A pull-up is an upper-body strength exercise. The pull-up is a closed-chain movement where the body is suspended by the hands and pulls up. As this happens, the elbows flex and the shoulders adduct and extend to bring the elbows to the torso.
```
python main.py -t pull-up -vs videos/pull-up.mp4
```


## Push-Up Exercise
![Push-Up](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w2gimthwr3e3wafnm7jw.gif)

Video: https://www.youtube.com/watch?v=IGjHIXAZAak

A push-up is a common calisthenics exercise beginning from the prone position. By raising and lowering the body using the arms, push-ups exercise the pectoral muscles, triceps, and anterior deltoids, with ancillary benefits to the rest of the deltoids, serratus anterior, coracobrachialis and the midsection as a whole. 
```
python main.py -t push-up -vs videos/push-up.mp4
```


## Squat Exercise
![Squat](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/afuz6w350soyn6n7o4up.gif)

Video: https://www.youtube.com/watch?v=iQrXRTk7KE0

A squat is a strength exercise in which the trainee lowers their hips from a standing position and then stands back up. During the descent of a squat, the hip and knee joints flex while the ankle joint dorsiflexes; conversely the hip and knee joints extend and the ankle joint plantarflexes when standing up.
```
python main.py -t squat -vs videos/squat.mp4
```


## Walking Exercise
![Walking](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eblftjv35sh0lobcbqzj.gif)

Video: https://www.youtube.com/watch?v=pPTeSd_GXoc

```
python main.py -t walk -vs videos/walk.mp4
```

---

If you want to detect your movements live with your webcam, you can run the code line below.
```
python main.py -t sit-up
# or python main.py -t pull-up
# or python main.py -t push-up
# or python main.py -t squat
# or python main.py -t walk
```
Hiring - Intern Software Developer
Published: 2021-04-28 23:22:21

Hi Developers!

[Colonist.io](https://colonist.io) a web-based online game with a million monthly players is currently in need of software developers: 

Software developers - entry-level or interested in learning & being trained
Will use technologies depending on position;

- **Frontend:** Pixi.js, Typescript, EJS, HTML5, CSS
- **Backend:** Node.js, Typescript, PostgreSQL, Docker

**Essential Functions:**
- Implementing new features, updating existing features & fixing bugsWriting unit tests
- Working with the team, managers & players
- Working with testers to identify & fix bugs
- Doing many other tasks which may be necessary

**Requirements:**

- Interest in-game/software development
- English: Ability to efficiently communicate in English. Naturally and effortlessly write sentences and paragraphs to communicate with our players and the team.
- Internet Native: Knows how to use various software tools, social media, document editors, spreadsheets, meme makers, torrent, proxy, etc.
- Inventor: Loves exploring new tools. Researches and discovers new ways to get things done. Loves to invent new methods.
- Doer: Outgoing and straight-shooting type. Doesn't wait for answers, goes out, and gets shit done.
- Self Improver: Ready to evolve up to the next level when their tasks, job, or role changes.
- PC Gamer: Where else would you play?

**Other details:**

- Location: Remote
- Schedule working hours: Flexible
- Start Date: Sooner than later
For interested applicants, send an email here: **mayla@colonist.io** with the title _**“Colonist Developer Intern Application - [Yourname]”**_ body including 2 sentences about you with your portfolio/resume attached.