teleren/devto huggingface dataset:
Python Flask Resources
Tags: python
Published: 2020-03-15 18:09:05

You can make Web Apps with Python Flask. This means you can make a Web App with only Python as backend programming language. 

So where do you get started?
One way to start is by doing a <a href="https://gumroad.com/l/IMzBy">Flask course</a>.

If you prefer learning from articles, there are many Flask articles, that could serve as staring point:

**General**

* <a href="https://en.wikipedia.org/wiki/Flask_%28web_framework%29">Flask wikipedia</a>
* <a href="https://palletsprojects.com/p/flask/">Flask homepage</a>
* <a href="https://opensource.com/article/18/4/flask">An introduction to Flask</a>

**Hello World**

* <a href="https://pythonbasics.org/what-is-flask-python/">What is Flask</a>
* <a href="https://pythonbasics.org/Flask-Tutorial-Hello-World/">Flask Tutorial - Hello World</a>
* <a href="https://pythonspot.com/flask-hello-world/">Flask Getting started</a>
* <a href="https://pythonbasics.org/Flask-Tutorial-Routes/">Flask Tutorial - Routes</a>
* <a href="https://pythonspot.com/create-an-epic-web-app-with-python-and-flask-beginners-tutorial/" title="Create an Epic Web App with Python and Flask (beginners tutorial)">Flask Create an Epic Web App</a>
* <a href="https://code.visualstudio.com/docs/python/tutorial-flask">Python Flask in Visual Code</a>

**Template engine**

* <a href="https://pythonbasics.org/Flask-Tutorial-Templates/">Flask Tutorial - Templates</a>
* <a href="https://pythonbasics.org/flask-template-data/">Flask Template Data</a>
* <a href="https://pythonspot.com/jinja2-template-engine/">Flask Jinja2 Template Engine</a>

**Database**

* <a href="https://pythonbasics.org/flask-sqlite/">Flask SQLite</a>
* <a href="https://pythonbasics.org/flask-mongodb/">Flask MongoDB</a>
* <a href="https://pythonbasics.org/flask-sqlalchemy/">Flask SQLAlchemy</a>

**Charts and forms**
 
* <a href="https://pythonspot.com/flask-json-and-the-google-charts-api/">Flask JSON and Google Charts API</a>
* <a href="https://pythonspot.com/flask-web-forms/">Flask Web Forms</a>
* <a href="https://pythonspot.com/flask-and-great-looking-charts-using-chart-js/">Flask and charts using Chart.js</a>

**Deploy & others**

* <a href="https://pythonbasics.org/python-to-web/">Python to Web</a>
* <a href="https://pythonbasics.org/flask-rest-api/">Flask REST API</a>
Migrating from Particles.js to tsParticles
Tags: javascript, typescript, tutorial, showdev
Published: 2020-03-15 18:07:00

# Migrating from Particles.js to tsParticles

[tsParticles](https://github.com/matteobruni/tsparticles) is fully compatible with Particles.js and the migration is really easy to do.

Let's checkout your possible HTML code.

## Simple solution

You should have something like the following code

```html
<script src="particles.js"></script>
```

Well to migrate from particles.js to tsParticles all you have to do is replace that to this

```html
<script src="tsparticles.js"></script>
```

And you're done. Easy isn't it?

## Advanced solution

Probably you noticed some warnings in the console. Well yes, it's really easy doing the migration but new features requires new configs and bug fixes can mess up some things.

If you're not familiar with Javascript don't worry, you can skip this part and keep the warnings, everything will work fine.

If you care about console warnings well you are in the right place.

The particlesJS identifier is now obsolete, well the library has a new name so it changed.

Now let's checkout the Javascript code, you should have something like this

```javascript
/* particlesJS.load(@dom-id, @path-json, @callback (optional)); */
particlesJS.load('particles-js', 'assets/particles.json', function() {
  console.log('callback - particles.js config loaded');
});
```

or something like this

```javascript
particlesJS('particles-js', { /* your options here */ });
```

All you have to do to use the new identifiers it replacing the function

`particlesJS()` into `tsParticles.load()`

or the function

`particlesJS.load()` into `tsParticles.loadJSON()`

**Warning here, the `loadJSON` doesn't have a third parameter, if you need a callback use the `then` function.**

Still really simple.

Let's convert the sample provided above to understand

```javascript
/* particlesJS.load(@dom-id, @path-json, @callback (optional)); */
tsParticles.loadJSON('particles-js', 'assets/particles.json').then(function(p) {
  // p is the loaded container, for using it later
  console.log('callback - particles.js config loaded');
});

tsParticles.load('particles-js', { /* your options here */ });
```

But probably you noticed that your warnings are still there, well the options are changed too but like the identifier this is not an issue.

## Transforming Options

Let's checkout the options warning. They suggest you to change the old property in the newer one.

The changed properties still continues to work, but they will be dropped probably for new features.

If you find a property with a `_` in the name, that property was renamed. We can take `line_linked` property as sample. It's renamed `lineLinked` now.

Boom. Another warning gone!

Checkout warnings for finding all other properties renamed.
My #100DaysOfCode
Tags: 100daysofcode, nlp, bot, challenge
Published: 2020-03-15 17:57:32

The 100 days of code challenge is something that was in my mind for a while, and now I've finally decided to begin this journey 🧙‍!
(And I really wanted to be part of the DEV community, and writing this article is my first step toward that purpose).


## Why ? 🤔

I am currently a 2nd year student at CentraleSupélec, one of the leading Grande Ecole (Engineering Schools) in France. I want to work in the Artificial Intelligence topic. Giving my objectives, I need some experience and it's the reason why I decided to start that challenge.

Creating a big project and learning state-of-the-art methods and algorithms will help me prepare myself (and improve my English 😉). And 

## Rules 👮‍
Just to ensure I forgot nothing, here are the main points and rules I will try to follow in the following days :

1 - I vow to code for a total of one hour per day. This will be done in one or more sessions.

2 - Coding time includes : Web development (interface+back) and script code (for the AI part of the project) in python. The learning part can be counted, but at least 1/2 of the mandatory time needs to be code.

3 - If days are not done (due to health problems for instance), they will be added at the end of the challenge, until 100 coding days has been reached

4 - At least one commit has to be done on github each day.


## What will I build?

During these 100 days, I want to learn more about Natural Language Processing. So I decided to create a Bot, that will be able to answer simple questions (take the example of Siri, Cortana, ...).
Other features could be added, mainly in the beginning of the project, to learn some things and methods.


## And Now ?

I think that everything has been said, now let's begin coding !
You can check my daily progress on Twitter (like suggested in the official rules). And sometimes on DEV.to to share what I learned 😀.


And if you are familiar with the #100DaysOfCode challenge, doesn't hesitate to share advice. And if you have any suggestions, feel free to share, I'm listening 😃.

[My Github repository](https://github.com/marcoboucas/palabot)
[My Twitter](https://twitter.com/Palad0rn)

Happy coding !
Enhance your Python scripts
Tags: productivity, beginners, bash
Published: 2020-03-15 17:42:35

Maybe you remember some commands from documentations like:

```bash
brew upgrade && brew update
```

Yea, you see right. This command will execute `brew upgrade` and `brew update`
one after another. But did you know you can do something similar to get the same result?

```bash
brew upgrade; brew update
```

The difference between them is simple and has to do with status codes.

## What are Statuscodes and how can I use them?

Here is a example:
```python
# script.py
import sys
import time

def doSomething():
    for i in range(5):
        time.sleep(1)
        print("done")
    sys.exit(0)

if __name__ == "__main__":
    doSomething()
```

"ok ok... I get it... but wait!" Exactly. `sys.exit(0)` is used to exit a program and returns a status code of 0.

Try to run this command in you command line:
```bash
python script.py && echo "finish"
```

Nothing happend...right?

Now change `sys.exit(0)` with `sys.exit(1)` and rerun it.

This is the point where you will expect to see "finish" after the "4" but `&&` is preventing the execution because of the status code of 1.

You see... status codes can help controling your workflow in the CLI.

Maybe you don`t care how your program is ending, so try this instead:

```bash
python script.py; echo "finish"
```

The semicolumn is also used to execute one command after another, but our semicolumn don`t care about the status of the last executed program.

## Conclusion

I think at this point the difference should be clear...

Both operators can help you preventing the executions of commands if something went wrong in your execution. Sometimes you need to know how your program has exit and sometimes you wish code get executed anyway... you decide!


If it was usefull for you please share it with a friend and leave a comment! Thanks!
Shell command options you didn't know you needed #3
Tags: shell, linux, bash, unix
Published: 2020-03-15 17:42:28

More well known, perhaps, than the previous two, but very useful for those of us building shell pipelines to clean up and process our messes.

`find -print0 <stuff> | xargs -0 <command>`

The problem with `find` which you trip over a lot when processing file trees, is that if you're not careful, piping the results into `xargs` (which I do a lot 'cause I can never remember how `-exec` works :D) breaks when `find` returns filenames with whitespace in. 

These two handy options to the rescue!

`find -print0` returns a list of filenames, except that the names are terminated with ASCII `NUL` (`\0`) instead of a newline. The `-0` option to `xargs` then tells it to expect input in that form, and *quote* each filename as it gets it. Result, filenames with whitespace in don't get broken up by the shell parser.

And they're not the only commands that can do this. Watch this space!
Is there a meaning to <Link> in Gatsby.js, and is there something analogous for other SSG?
Tags: ssg, webdev, gatsby, discuss
Published: 2020-03-15 17:41:38

Of course I know that for Nuxt, there is `<nuxt-link>` and Gridsome `<g-link>`, but what about Eleventy, Hugo, etc.

I assume it's about [Preloading](https://www.gatsbyjs.org/docs/gatsby-link/) in [PRPL](https://dev.to/sadiqful/how-to-achieve-performance-using-the-prpl-pattern-1g68), but is SPA architecture needed?

This is especially important when I am trying to create my own SSG with Node.js scripts and `parcel build template/**/*.html`...
How to be a customer focused engineer
Tags: customerfocused, customercentric
Published: 2020-03-15 17:32:18

---
title: How to be a customer focused engineer
published: true
description: A list of things you can do today to be more customer focused
tags: customer focused, customer centric
canonical_url: https://trentduffy.com/how-to-be-a-customer-focused-engineer/
---


The most valuable thing I've learned in the first two years of my career is how to be a customer focused engineer. But sometimes it’s hard as an engineer to see the forest from the trees in the day to day work.

Here's a list of actionable items you can do to be more customer focused:

### Have context to the problems you’re solving:

- Hop on customer calls/listen to customer calls/or trainings where they’re talking about your part of the product

- Walk and talk to the people who use your product. What do they like about it? What do they dislike?

- Go for 1 on 1’s with your PM. How are they thinking about the problems your team is trying to solve?

### When developing something new:

- Did you come up with the easy technical solution, or the one that best fits the customers needs?

- How will you track to see if the new feature is making customers more successful? For example, will users be sending 20% more messages?

### Look for opportunities to level up the customer experience:

- If you see somewhere with friction in the product, whether it be in your domain or not, investigate it! if you can’t fix it, bring it up with that team so you can partner with them on it.

### Review code and designs with a customer centric eye:

- What if there’s an error? Is it clear in the error message what action the customer should take? How does this break?

- What edge cases have you thought about?

- What happens if there’s an empty state? Is it clear what the user should do next?

- (For frontend) Do these design patterns match the rest of the page? The rest of the app? The design system?

- Run the branch code and play around with the changes!

- Does the copy make sense in your glossary? Does it make as much sense to a veteran vs a new user of your product?

### During planning + scoping sessions:

- What’s the quickest path to value? How can you keep your iterations tight to get more feedback loops?

- Frame your discussions around customer pains instead of solutions. For example instead of: “We need a button to export a CSV”, try “How can we empower our users to move data around?”

### Work with your UX team:

- Watch someone do a user test of your part of the product, or even better, run your own user test!

- Find out if your company gets NPS, PMF, or SEQ scores. What do customers like? What do they dislike? Which types of customers like the product most, and why?

Here’s the most important part: don’t forget to share your learnings. Put together an internal wiki, or post in your team’s channel when you get a new nugget of information. Everyone benefits from the new knowledge!
How to connect to AWS MySQL / MariaDB RDS or EC2 Database from MySQL WorkBench
Tags: mysql, mysqlworkbench, mariadb, rds
Published: 2020-03-15 17:20:46

How to connect to AWS MySQL / MariaDB RDS or EC2 Database from MySQL WorkBench

https://thedbadmin.com/how-to-connect-to-aws-mysql-rds-ec2-database-from-mysql-workbench/

In this article, we are going to explain how to connect to AWS MySQL/MariaDB RDS or MySQL/MariaDB database running inside an EC2 machine from MySQL Workbench. Workbench can be installed on your local laptop/desktop.

What is MySQL WorkBench

MySQL Workbench is an official graphical tool to manage the MySQL database. Using workbench you can take the backup, create database, user and grant role, monitor database health and many more other activities.

You can download it from www.mysql.com


 
Prerequisites

RDS: Valid Endpoint name
EC2: Machine hostname /IP

MySQL DB Port: 3306 (Default)

Credentials: Username and Password of the database user

Network: VPC and security group setup to reach till database from outside over the Internet or using the AWS network if MySQL Workbench is installed inside the AWS infrastructure.


 
 

#1. Open MySQL Workbench

 

#2. Add new connection under ‘MySQL Connections‘ and click on ‘+‘

 



 

#3. Enter connection details

HostName:  xyz.est1.rds.amazonaws.com or Public IP of ec2/RDS endpoint.

Port: 3306

Username: 

And hit ‘Test Connection’ once you see ‘successful message’  you are done.

 



 

Let me know if you see any issues or have any questions.

 

Please like our Facebook page and share this post in your network.
How to Create MySQL Database with AWS RDS
Tags: rds, mysql, aws, database
Published: 2020-03-15 17:17:31

How to Create MySQL Database with AWS RDS
In this post, we will see details steps to create a MySQL database in Amazon Web Services (AWS) on Amazon Relational Database Service (RDS). Creating MySQL on AWS RDS is easy in comparison to installing MySQL on the local server. It will be ready in a few clicks and you can connect to the cloud MySQL database with Any application or MySQL workbench.

 

#1. Login to AWS console


 
 

#2. Select the AWS region where you want to create the MySQL RDS database service. Check the proximity of your application or your location from where you will connect to the database. Try to choose the nearest region.

 

AZ Code	Name and Location
us-east-2
us-east-1
us-west-1
us-west-2
ap-east-1
ap-south-1
ap-northeast-3
ap-northeast-2
ap-southeast-1
ap-southeast-2
ap-northeast-1
ca-central-1
eu-central-1
eu-west-1
eu-west-2
eu-west-3
eu-north-1
me-south-1
sa-east-1	US East (Ohio)
US East (N. Virginia)
US West (N. California)
US West (Oregon)
Asia Pacific (Hong Kong)
Asia Pacific (Mumbai)
Asia Pacific (Osaka-Local
Asia Pacific (Seoul)
Asia Pacific (Singapore)
Asia Pacific (Sydney)
Asia Pacific (Tokyo)
Canada (Central)
Europe (Frankfurt)
Europe (Ireland)
Europe (London)
Europe (Paris)
Europe (Stockholm)
Middle East (Bahrain)
South America (São Paulo)
 


 
#3. On AWS console search for ‘rds’



 

#4. Click on ‘Create database‘



 

#5. Chose Standard create and MySQL

setup3

 

#6. Chose the MySQL Version and Template which is like Environment types like production, Development/Test and Free tier RDS instance where you won’t get certain features like read replica set etc. It only available in the Production template.



 

#7.  Database Name and Root Password : Enter the database name, Master user name (root) and password.


Read the full article: https://thedbadmin.com/how-to-create-mysql-database-with-aws-rds/
Liberte-se do conforto!
Tags: objetivo, developer, socialmedia, design
Published: 2020-03-15 17:06:59

A algum tempo fui convidado a trabalhar em uma instituição pública como auxiliar de gestão de Mídias Sociais. Como já tinha bastante experiência na área de informática e facilidade em entender os mecanismos da Web, aceitei o desafio.

Não foi difícil de entender como tudo funcionava e em poucos dias estava suprindo a necessidade da equipe, inclusive, me atrevendo a melhorar alguns métodos.

Mas logo em seguida o inesperado aconteceu, o designer gráfico da equipe, que diga-se de passagem é um ótimo profissional, decidiu-se voltar a trabalhar de forma autônoma.

Tendo sua saída ocorrido de forma inesperada e vendo a necessidade de entregar alguns trabalhos, mais uma vez me atrevi a fazer algo que não me fora solicitado.

Fiz algumas pesquisas e **coloquei a mão na massa.** Sem aplicar nenhuma técnica e me baseando em outros materiais, entreguei minha primeira proposta de arte, está supriria uma demanda de urgência.

Foi um sucesso, todos aprovaram e me senti muito bem por ter conseguido resolver aquele problema pontual.

Mas não parou por aí, tinha mais artes pra fazer e pensei comigo, se fiz uma, consigo fazer outra. 

Hoje já somam centenas delas e já cheguei a suprir 100% da demanda.

Comecei sem saber nada de design, mas com determinação, força de vontade e acima de tudo com o apoio dos colegas de trabalho, hoje consigo entregar projetos como este que ilustra o post, a identidade visual de uma Escola Municipal.

Profissionalmente esse não é o caminho que quero seguir, tenho como objetivo me tornar um bom Analista de Sistemas, que consiga analisar, desenvolver e implementar qualquer tipo de software. 

##Moral da história

Quando comecei a me aventurar na criação artes para mídias sociais, confesso que fiquei com bastante medo de perder o foco do meu objetivo profissional, até porque, por algum tempo me dediquei mais em aprender sobre design do que sobre software.

Mas hoje a ficha caiu, me dei conta de que não é suficiente em nem construtivo focar 100% da nossa energia em um objetivo linear, pois o conhecimento é como um formigueiro, onde os caminhos se encontram, e mesmo que não exista um caminho, se você cavar, em algum momento ele vai se conectar.

###A mensagem que deixo é a seguinte:

**Liberte-se do conforto!**

Não se limite a fazer somente o que gosta, seja aberto às oportunidades de áreas correlacionadas pois elas vão te ajudar a compreender o "ecossistema" do seu objetivo profissional.

Além disso, os  conhecimentos "secundários" se somam de várias maneiras, e fazem com que sua mente se expanda tornando-o uma pessoa mais criativa e crítica de si mesmo.

🖖🏻 *Vida longa e próspera!*
What's the proper way to move website to a new address?
Tags: help, webdev, discuss, javascript
Published: 2020-03-15 17:01:35

Say, you have initially deploy the website on GitHub Pages, but you want to move to Netlify or Heroku.

Perhaps, totally destroy the old website, and create `404.html` for GitHub Pages (or redirect rules with 301 for other websites), filled with one-liner...

```html
<meta http-equiv="refresh" content="0; URL='http://new-website.com'" />
```

See https://css-tricks.com/redirect-web-page/

Of course, a more sophisticated way would be to use JavaScript with `location.replace`.

This is my said website, BTW -- https://patarapolw.github.io/blog
IPv6 Sage Certification with NSX-T, Part 2
Tags: bgp, datacenternetworkin, ebgp, homelab
Published: 2020-03-15 16:53:44

---
title: IPv6 Sage Certification with NSX-T, Part 2
published: true
date: 2020-03-15 16:51:00 UTC
tags: BGP,Datacenter Networkin,eBGP,Home Lab
canonical_url: 
---

To get past the first major test (Explorer), you simply need to access a page over IPv6, and pass a quiz. To do this, spin up a desktop VM on your dual-stack vn-segment and navigate to [https://ipv6.he.net/certification/](https://ipv6.he.net/certification/)  
  
To get past your next phase (Enthusiast) you do have to spend some money - purchase a domain (the cheaper, the better) and link it to he.net's name servers. Jacob Salmela has a pretty good step-by-step on this: ([https://jacobsalmela.com/2013/10/30/ipv6-certification-walkthrough-enthusiast-level-hurricane-electric-part-3/](https://jacobsalmela.com/2013/10/30/ipv6-certification-walkthrough-enthusiast-level-hurricane-electric-part-3/))  
  
From here, you should be able to get through it via trial and error. I recommend just spinning up a linux VM on that vn-segment and toying around with it, e.g. installing apache, postfix, etc.  
  
One thing worth noting is that the last few phases (Professional on up) have automated tests that may need to be manually restarted by HE to work. If you get really stuck, you can ask them at [ipv6@he.net](mailto:ipv6@he.net).
Top News API
Published: 2020-03-15 12:21:36

News is one of the most searched keywords on google. 16.6 million searches are made with this keyword every month. Big opportunity? Only if you intersect this opportunity with another idea. Let's say I want to show only a particular category of news. Or how about an app which learns to customize the news feed. In fact there is an app which made millions by customizing news. To make a news app the first thing we need is a [News API](https://blog.api.rakuten.net/top-10-best-news-apis/). Here is my list of top news apis.

##Bing News
Bing News is a Microsoft-owned news aggregating service that displays the most recent news stories on the web and mobile devices. The [Bing News Search API](https://azure.microsoft.com/en-us/services/cognitive-services/bing-news-search-api/) allows developers to send search queries to the platform and receive comprehensive results of the latest news, interesting articles, trending topics, and images sourced from around the world. The query results can be filtered by topic, publisher details, local news, and other searchable metadata.

##Web Search API
The Web Search API by contextualwebsearch.com allows you to tap into the search engine’s innovative indexing technology and integrate news, images, and other search data into your applications.

##Vegan News API
The Vegan News API is a simple API that returns a list of latest vegan-related news sourced from multiple sources around the world.

##Bloomberg Market and Financial News API
Bloomberg is a popular platform that provides business news, financial information, market analysis, and other insightful data from around the world. It uses advanced technology to deliver up-to-date news and analytical data to assist businesses and individuals to make influential decisions.

##News API
The News API is a simple API that allows you to search several news outlets from around the world. For example, you can use the API to know the trending stories in the BBC News, new articles published about a product, or a company reviewed by a blog recently.