teleren/devto huggingface dataset:
How to make a CLI application in python 
Tags: python
Published: 2020-03-16 21:29:33

# Create an express-generator application of our own. 

We will use **python** and **docopt** to create a **CLI** application. 

### Step 1:

+ Install docopt.
```pip install docopt``` 

To know more about docopt <a href="http://docopt.org/">here</a>.

### Step 2:

+ To use docopt we need to create a docstring in python 

```
'''create-express-app.
Usage:
    create-express-app.py (-h | --help)
    create-express-app.py --version
    create-express-app.py check 
    create-express-app.py create <params>
Options:
    -h --help   Show this screen
    --version   Show Version 
'''
```
### Step 3:
+ Now all we have to do is to import docopt and parse the input 
```
from docopt import docopt 
if __name__ == '__main__':
   arguments = docopt(__doc__,version='1.0.0')
   print(arguments)
```

### Step 4:
+ Now we have to write functions to handle the parsed inputs 

The `arguments` variable returns a dictionary 
we can then check for the command we are looking and perform the function 
```
if arguments['check'] == True:
        check()
    elif arguments['create'] == True:
        create(arguments['<params>'])
```

### The `create` function :
```
def create(params):
    import os 
    import subprocess
    os.mkdir(params)
    path = './'+params
    os.chdir(path)
    os.system("npm init -y")
    os.system("type nul > app.js")
    os.system("npm i express body-parser")
    os.system("code ..")
```

In the create function we are building the project to do the following task:
+ run npm init 
+ Create a file named app.js 
+ install the express and body-parser npm packages 
+ and open the directory in visual studio code.

To check out the complete code <a href="https://github.com/Souvikns/create_express_app">here</a>
#VueJS Web Application 
Tags: covid19, vue, pwa, github
Published: 2020-03-16 21:21:55

<h2><b>I</b>n today's life , we use faster as well as more useful websites for us . So,I decided to make an interesting web app out of vue js which is having a PWA support.</h2>
<h4>I will integrate many components one by one and together built an amazing website.One of the most important component i added is the <strong>coronavirus</strong> live cases map ! checkout below</h4>
## GAMA TECHS

Click on ==> [Project on GitHub](https://github.com/UmarGit/Gama-Techs)

## Let's Start Now ! [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/UmarGit/Gama-Techs/issues) [![JavaScript Style Guide: Good Parts](https://img.shields.io/badge/code%20style-goodparts-brightgreen.svg?style=flat)](https://github.com/UmarGit/Gama-Techs)

## Live Preview On Netlify !

 Click on ==> [Gama Techs](https://gama-techs.netlify.com/)

### This is Gama Techs website having all rights reserved.Feel free to contribute and make Gama Techs as a helping source.
<hr/>

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Run your unit tests
```
npm run test:unit
```

### Run your end-to-end tests
```
npm run test:e2e
```

### Lints and fixes files
```
npm run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

<hr/>
 Please comment on this post , So , I will make , how to get-started with this project step by step.
### Thank You For Reading => UmarGit
git-commit-as: committing on a shared computer
Tags: git, bash
Published: 2020-03-16 20:54:19

---
title: git-commit-as: committing on a shared computer
published: true
description: 
tags: git, bash
---

I recently wrote a script to solve an issue I had committing on a shared computer. I'm sharing it with you because I think it's useful.

When I'm on a shared computer, I always forget to reconfigure my own name and email in git, so I end up committing under the name of the last person using the computer.

This is why I wrote git-commit-as, which is used as such:
```sh
git commit-as John -m "Committed by John"
```

Having previously configured a name and email for "John" in the git configuration file:
```ini
[users "John"]
    name = "John Doe"
    email = "john.doe@example.com"
```

You can get the script [on GitHub](https://github.com/tqdv/git-commit-as). It's (probably) POSIX-compatible, which means it should work in sh, bash and zsh.
React line chart zooming to child data
Published: 2020-03-16 20:52:40

In a react chart line, I want to select and drag chart area and when there is child records(3 level in the sample data below), chart should zoom. 
Any idea, help is appreciated -- I am beginner in React.

when chart is loaded, days (Mar 01, Mar 02...) will be drawn, zooming will open hour/minute for Mar 02 as this day has child data

data = [		
		{name: 'Mar 01', 
		sale: 30,
		},
		{name: 'Mar 02',
		sale: 48,
			childData: [
			{name: '01:00', -- first hour
			sale: 9,
				childData: [
				{name: '01:01', -- first minute
				sale: 5
				},
				{name: '01:02', -- second minute
				sale: 1,
				},
				{name: '01:03', -- third minute
				sale: 2
				},
				{name: '01:04', -- fourth minute
				sale: 0,
				},
				{name: '01:05', -- fifth minute
				sale: 1
				}, 
				],
			name: '02:00', -- second hour
			sale: 10,
			},
			{name: '03:00', -- third hour
			sale: 6,
			},	
			{name: '04:00', -- forth hour
			sale: 8,
			},	
			{name: '05:00', -- fifth hour
			sale: 15,
			},											
			],
		},
		{name: 'Mar 03', 
		sale: 50,
		},
		{name: 'Mar 04',
		sale: 70,
		},
		];
You cannot learn everything
Tags: programming, javascript, python, productivity
Published: 2020-03-16 20:28:42

Knowledge is like an ocean and time is very limited like if you want to pour the entire ocean in a a cup!

The same with languages, frameworks and technologies; you have got very limited time to learn a lot of things, especially if you are in the beginning of your career and you are trying to do everything you can in order to grasp each nut and bolt, whether you're a game developer, a web developer or designer , front end or back end , it really doesn't matter and you will overwhelm yourself with too much stuff if you follow this mind set.

My advice to you is: Slow Down and take your time, if you want to be a front-end dev, you can learn HTML CSS JS and maybe have an idea about one back-end language like Java, Python or C#, in addition to a few technologies like Docker and Github; I think this is quite enough [ not to mention that you will have to learn a framework like Angular or React and this will require more time and more dedication ].

Take it slowly but surely you will build you knowledge in no time as you take those steps steadily, this is one of the shooting strategies in the army; snipers need to be calm and if they are calm then you're focused and when you're focused your accuracy level increases in shooting the target; be a sniper instead of being someone with a lot in his arsenal but shooting up and down, right and left. 

Read tech blogs, read other people's code and then write your one notes if you want or you can jump to your text editor directly and write your own code, your way ,with comments and explanations.

Finally, don't get distracted; if you decided to study Python then study Python; if you decided to study JavaScript then do it; don't jump back and forth or you won't achieve anything  and you'll discover that you have lost your time with no fruits collected; but that doesn't mean that you can't learn both, if you want , please by all means I encourage you if this will help you in your career but don't start Python then jump to Java then to C# to Ruby [ believe me I have been there and learned the lesson the hard way !]   

Stay Safe and Happy Coding!
What is AJAX?
Tags: webdev, javascript, xml
Published: 2020-03-16 20:07:07

Ajax, or Asynchronous JavaScript And XML, is a way to request a resource from the server without having to reload the page or ask the user to navigate to a different page. This means you can request information, such as recent posts, in the background and refresh the display in the foreground dynamically with the new information. This can be referred to as real-time communication between the server and the client or real-time updating.

The name AJAX is misleading as it doesn't have to be XML that is transferred. More often than not it is JSON or plain text that is transferred from the server. JSON is more human-readable and lightweight when comparing to XML. However, it doesn't matter what data or format you transfer with AJAX as it can support any data, in any format.

Before the use of AJAX to get information from the server you had to reload the page and have some inline scripts within the page that is processed on the page prior to the user receiving it. By this I mean, having an HTML document with some PHP code inline to load all the newest posts and displaying them to the user. This would mean to get any new posts the user would have to reload the page to get the new information. However, with AJAX you could have an endpoint on the server to receive the newest posts and then use a client-side scripting language, such as JavaScript, to periodically send AJAX requests to receive the newest posts and update the display without requiring a page reload.

This post was originally published on https://acroynon.com
Dicas para o Trabalho em Casa (HomeOffice)
Tags: homeoffice
Published: 2020-03-16 19:57:55

Trabalho na mesma área por mais de 15 anos e por conta dos mais diversos motivos, invariavelmente precisava trabalhar de casa. Dado o momento atual resolvi compartilhar uma pequena lista de algumas *dicas* que podem te ajudar nessa nova rotina:

0. Não é apenas sobre você, mas também sua família. Então tente falar com **TODOS que você ESTÁ TRABALHANDO em casa, DE VERDADE**. Portanto, tente se "trancar" em algum tipo de porão, escritório em casa ou em qualquer lugar onde você possa ter algum tipo de privacidade. Pode parecer estranho ou até rude no início, mas irá valer a pena;
  * Caso voce não tenha um cômodo ou uma mesa disponível, tente estabelecer algum tipo de indicativo de que voce não pode ser incomodado ou interrompido: estar com fones de ouvido, luzes acesas ou apagadas, música alta, etc.. Qualquer sinal previamente acordado que demonstre que naquele momento voce não pode ser incomodado(a) de maneira alguma;
1. Tente estabelecer uma rotina: café da manhã, tomar banho, trocar de roupa simular seu percurso de ida ao escritório/cliente;
2. Ergonomia: camas e sofás são muito confortáveis, mas definitivamente não são a melhor opção para longas horas de trabalho (pelo menos para mim). Não considere (pelo menos nos primeiros dias) esses lugares como ambiente de trabalho;
3. Não se esqueça de criar um ambiente razoavelmente agradável - tenha uma garrafinha de água, café, guloseimas por perto;
    * cuidado com os exageros;
4. EVITE distrações **PRINCIPALMENTE** a televisão;
5. Faça pausas - tente fazer algumas paradas mediante execução de atividades ou período de tempo, seja pra tomar um café ou até fazer alguns alongamentos.
6. Respeite seu tempo/limites. Como você economizará horas preciosas do seu dia com o não deslocamento ao escritório, voce pode acabar trabalhando mais do que deveria. Novamente, tente estabelecer uma rotina com metas, marcos ou qualquer métrica que você usa para controlar sua carga de trabalho. Não exagere muito nisso!
  *  Não sei se isso é aplicável a todos os cargos/posições/tarefas, mas pelo menos da minha perspectiva um dos efeitos colaterais mais positivos do trabalho em casa é a **PRODUTIVIDADE;**
7. Sei que pode pode ser difícil para alguns principalmente nos dias atuais, mas tente investir em alguns gadgets para facilitar seu dia dia: monitor extra, teclado externo, mouses sem fio, fones de ouvido.

Caso vocês tenham alguma dúvida, sintam-se livres para mandar colocar abaixo seus comentários, ou mandar um email/tweet.

Boa sorte à todos.
Microsoft Acquires npm
Published: 2020-03-16 19:44:03

Today, news broke that GitHub and its parent company Microsoft, acquired npm and its public repository of open source JavaScript packages.

Sonatype CTO Brian Fox shares his reaction in this post, <a href="https://blog.sonatype.com/microsoft-acquires-npm-a-healthy-move-for-critical-public-infrastructure"> Microsoft Acquires npm: A Healthy Move for Critical Public Infrastructure</a>.
10x Engineer
Tags: podcast
Published: 2020-03-16 19:38:15

🎧 👉🏻 Hier anhören und abonnieren: [codeandship.rocks/podcast/19](https://codeandship.rocks/podcast/19/)

In unserer Folge vom 16.03.2020 geht es um den 10x Engineer, typische Software-Entwickler Eigenschaften, Montage und Motivation, Diversität im Team, Stereotypen und Vorurteile. 

## Shownotes

- [10x Engineer Tweet von Shekhar Kirani](https://twitter.com/skirani/status/1149302828420067328)
- [Cassidy Williams: "Life as a 10x engineer"](https://twitter.com/cassidoo/status/1150170262228201472)
- [10x Engineer | Know Your Meme](https://knowyourmeme.com/memes/10x-engineer)
- [7 Personality Types of Developers Today | Webdesigner Depot](https://www.webdesignerdepot.com/2010/05/7-personality-types-of-developers-today/)
- [Startup Generator](http://tiffzhang.com/startup/)
Community Is Everything Right Now
Tags: watercooler, psa
Published: 2020-03-16 19:35:07

The DEV community has the opportunity to maintain the status quo during the crisis. DEV can give us a sense of normalcy in the midst of a worldwide pandemic. A lot of us need that. While we adjust to this new reality, we need to consider our local community too. This may not seem evident in a time of panic buying, social distancing and self-quarantines, but community is everything right now. 

While we are advised to refrain from congregating in large groups, to self-quarantine and practice social distancing, we can't forget about our local community. We can't afford to have the mindset: "let someone else take care of the less fortunate". Government will most likely fail to bail us out. We need to band together to make it through the pandemic. 

I urge you to do whatever you can to help your local community. There are several things you can do. Approach a local non-profit or community organization and ask how you can be helpful. Don't assume you know.

I'm not advocating going out into your community without precaution. I'm not telling you to defy government mandates. Keep calm. Practice social distancing. Use every precaution you can. Most importantly, stay healthy. If you're sick, stay home. Self quarantine. 

What happens when the people who are not prepared whatsoever have to self quarantine? What happens when all the restaurant workers living paycheck to paycheck have to go without pay? There are people in our communities who will need help and have no one to help them.

This crisis will test what we are made of. Let's not look back on this moment and remember the panic buying. Instead let's remember how we came together to help each other.

I just made a donation of canned goods to the local food pantry. Now I am taking some time to consider how else I can be helpful. 

What are you doing to help your community?

How can we use our skills to help others in this crisis?
S3 CSV File to DynamoDB using EventBridge, AWS Lambda, Fargate and SQS
Tags: cdk, aws, tutorial, beginners
Published: 2020-03-16 19:33:51

Setup a pipeline to take a csv file and transform it, then insert all the records into dynamodb using a fully serverless stack!

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

Just run the following command to get the code:

npx cdkp init the-eventbridge-etl

Then cd into the folder and if you have your aws local creds setup you can just run:

npm run deploy

Don’t fancy cloning the repo but want to read more?

https://github.com/cdk-patterns/serverless/blob/master/the-eventbridge-etl/README.md
I know what you did.
Tags: security, osint, python
Published: 2020-03-16 19:20:17

---
title: I know what you did.
published: true
description: OSINT and investigation over your digital fingerprint.
tags: security, osint, python
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/m20gm429hiaf2c23jpyx.jpg
---

An important part of offensive security is basically knowing __what__ to attack. Sometimes you have to face a really big project and before launching any kind of attack, you must learn the weaknesses and as much as information about your target as you could gather. Good for us, there are tons of useful tools and resources for this.

When trying to get subdomains of a target, we have for example Subl1st3r. Gathering subdomains is important because you might find a forgotten subdomain with unpatched bugs that can lead us to bigger issues, data leaks and more. [Subl1st3r](https://github.com/aboul3la/Sublist3r) is an open Linux terminal, for example `using python3 sublist3r.py -d mydomain.com`. Another useful tool is [knockpy](https://github.com/guelfoweb/knock), it's slow but it gathers tons of subdomains, this is a nice tool even though it doesn't use Python 3, that's why I would add here [Photon](https://github.com/s0md3v/Photon), which does and is similar to knockpy, plus is faster.

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

What I like the most about this last one is that it creates a directory with all the information. So nice and tidy!

![](https://media.giphy.com/media/hvRoo3YcAPUheF3MxY/giphy.gif)

Let's not forget about some famous tools such as: [Shodan](https://www.shodan.io/), [Censys](https://censys.io/) or [Hunter.io](https://hunter.io/). These are nice, some of them allow you to have an API key in order to build tools with them. 

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

There are some frameworks for making these ❀⋆❀ __even tidier__ ❀⋆❀ ! For example [Spiderfoot](https://www.spiderfoot.net/). After trying to set up other frameworks, the first time I faced Spiderfoot I was expecting tons of bug handling and issues but it was quite easy, just `git clone` it, `pip3 install -r requirements.txt` and execute! easy pie. This tool is interesting because apart from launching tons of tools (some of them need an API key for gathering information) it generates graphs, which is very useful. And by the way it's so pretty well documented so if you are new with this, you will thank them. 

Learning this, you might want consider cleaning up your webpage in order not to let anything spreading information about it that should not be there!
WordPress > SSG
Tags: wordpress, nuxt, ssg
Published: 2020-03-16 19:19:48

Hello,
I have a WordPress blog with several hundred posts.
Now I wonder how much effort it would take to transfer that to a static site generator.
I am playing around with nuxtjs and vuetify. That would be my preferred combo.

Has somebody made that change? What is your opinion about it?

thanks
Jochen
Free Virtual Events for Female Devs in March
Tags: career, wecoded, womenintech, watercooler
Published: 2020-03-16 18:59:55

---
title: Free Virtual Events for Female Devs in March
published: true
description: 
tags: #career #shecoded #womenintech #watercooler
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/ycitaidjxyq2b47k12w2.jpg
---

Let's connect with each other and beat the social isolation as we hunker down to flatten the curve. I'm hosting free virtual events for the Women in Web Dev community, and you're invited to join!

### Events This Week (Mar 16 - 20)

**MON:** Virtual Coffee @ 5pm PDT // 8pm EDT

**TUES:** Workshop - Write a Great Developer Resume @ 10am PDT // 1pm EDT // 5pm GMT

**WED:** Virtual Coffee @ 12pm PDT // 3pm EDT // 7pm GMT

**THURS:** Workshop - Write a Great Cover Letter / Email Intro @ 10am PDT // 1pm EDT // 5pm GMT

**FRI:** Virtual Coffee @ 2pm PDT // 5pm EDT // 9pm GMT

### Location:
Coffee chats will be hosted on Zoom. Pease sign up here to join us as there are only 100 spots: https://womeninwebdev.com/virtual-events/

Workshops will be hosted on the Women in Web Dev FB Page (https://www.facebook.com/womeninwebdev/). A FB account is not required for watching. Everyone is welcomed to attend as the stream will be publicly available.

### Feeling shy?
Don't worry, we're going to be breaking into small groups of 4-5 in our virtual coffee chats. You won't be speaking in front of dozens of people.

The Women in Web Dev community is also the best. The members are very supportive and welcoming to people at all experience levels.

### Save These Events to Your Calendar
1. Go to the Virtual Events Page: [https://womeninwebdev.com/virtual-events/](https://womeninwebdev.com/virtual-events/)
2. Click on the bottom right button of the calendar.

Looking forward to connecting with you all!
How to add message type as object in ProtoBuf (gRPC) - Proto3 Syntax?
Published: 2020-03-16 18:49:18

---
title: How to add message type as object in ProtoBuf (gRPC) - Proto3 Syntax?
published: true
description: https://stackoverflow.com/a/60701365/3342447
tags: 
---

https://stackoverflow.com/a/60701365/3342447
What is JSON?
Tags: python, webdev
Published: 2020-03-16 18:44:20

JSON is the most widely used *format for interchanging data on the web*. Its meaning is "Java Script Object Notation".

It originates from the JavaScript language. JSON uses the JavaScript syntax, but the JSON format is text only. 

## Example

The data below is in json format:

```js
{"employees":[
{"name":"Alice", "email":"alice@xyz.com"},
{"name":"Alex", "email":"alex@xyz.com"},
{"name":"Allison", "email":"allison@xyz.com"}
]}
```

Its easily readable by a computer and human (compared to the XML format).

You can convert any JavaScript object into JSON and send JSON to the server.

But what's more: 
* JSON is a cross language data format
* JSON is both more compact and (in my view) more readable
* You can convert json to Python objects
* You can convert json to Python Pandas Dataframe, then to csv or Excel
* You can convert Python objects to json

Json text can be read and used as a data format by any programming language.

One of the ways to use it, is the json module:
```python
import json
data = '{"name": "Alice", "city": "Amsterdam"}'
python_obj = json.loads(data)
print python_obj["name"]
```

But the pandas module may be better suited. Pandas is a data analysis module and it supports many features like reading and writing excel.

You can read <a href="https://pythonbasics.org/pandas-json/">json in Python Pandas</a>.

Reference:
<a href="https://docs.python.org/3/library/json.html">json module</a>
<a href="https://pythonspot.com/tag/json/">json examples</a>