teleren/devto huggingface dataset:
Get weather information on Terminal
Tags: ubuntu
Published: 2019-07-10 03:55:30

You can get weather information of your area in your terminal.

You need to send a curl request on URL `wttr.in/$1?m1`

```bash
curl -s "wttr.in/$1?m1"
```

You can add this to your .bashrc file as a command.


```bash
weather(){ curl -s "wttr.in/$1?m1"}
```

To get the information of 3 days: `curl -s "wttr.in"`



More from Author:  
- [How to Track Email Opens Sent From Django App](https://www.pythoncircle.com/post/626/how-to-track-email-opens-sent-from-django-app/)
- [How to download large csv files in Django](https://www.pythoncircle.com/post/677/how-to-download-large-csv-files-in-django/)
- [Logging databases changes in Django Application](https://www.pythoncircle.com/post/675/logging-databases-changes-in-django-application/)
Copy files into a running Docker container
Tags: docker, devops
Published: 2019-07-10 03:36:30

[![asciicast](https://asciinema.org/a/255327.svg)](https://asciinema.org/a/255327)

Sometimes you want to copy files between a running docker container and your local filesystem. This might be helpful for example if you're running a local webserver and you want to update a HTML file. 

The command `docker cp` gives you the ability to copy files from your local filesystem into a running Docker container and vice versa.

Let's assume you have a running NGINX container. If not you can run a container with `docker run -d -p 8000:80 nginx`.

```
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                  NAMES
3d1fb2f49f1a        nginx               "nginx -g 'daemon of…"   9 hours ago         Up 9 hours          0.0.0.0:8000->80/tcp   nifty_mirzakhani
```

You can now copy a HTML file into your NGINX root folder (in this case `/usr/share/nginx/html`) with `docker cp`:

```
docker cp test.html 3d1fb2f49f1a:/usr/share/nginx/html
          ^         ^            ^
          |         |            |= destination path within the docker container
          |         |
          |         |= the id of the container in which you want to transfer the file
          |
          |= path to file you want to transfer
       
```

You can now access your uploaded file in your browser ([http://localhost:8000/test.html](http://localhost:8000/test.html)).

![](https://i.imgur.com/oPrTqIu.png?1)

## Download files

It is also possible to copy files from your container to your local filesystem.

[![asciicast](https://asciinema.org/a/255383.svg)](https://asciinema.org/a/255383)

```
docker cp 3d1fb2f49f1a:/etc/nginx/conf.d/default.conf ~/
          ^            ^                              ^
          |            |                              |= destination path on your local machine
          |            |
          |            |= path to the file in your container
          |
          |= container id
```

## Path information

The container paths are relative to the container's root directory (`/`), hence you can omit the leading slash.
Both paths are valid: `/etc/nginx/conf.d/default.conf` and `etc/nginx/conf.d/default.conf`.

For your local machine paths you can use absolute and relative values.

<hr />

If you like my content, you might want to follow me on Twitter?! [@fullstack_to](https://twitter.com/fullstack_to)

Cover Image by Photo by [frank mckenna](https://unsplash.com/@frankiefoto?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/search/photos/containers?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
Bubble Danger
Tags: unity3d, csharp, android, gamedev
Published: 2019-07-10 02:49:47

Bubble Danger is getting better and better. Techs studio has 2 more titles coming soon!!! Better add / follow/subscribe while you can! since we are still all we are able to really focus and listen to user feed back. So be one of the first to help mold are games.https://play.google.com/store/apps/details?id=com.Greek.Tapper
Bugs por todas partes
Tags: zerobugspolicy, bugs, management, devops
Published: 2019-07-10 02:36:45

#Bugs por todas partes

##Una estrategia para no vivir inmerso en un abismo de (Bugs)defectos

###El problema:

¿Se han visto en situaciones donde los sistemas son tan grandes y complejos y donde un equipo de trabajo se ve rebasado por los bugs encontrados en la fase de pruebas?

Dejando ahogado al equipo de desarrollo por el tiempo de atención a estos?

Recientemente me encontré en una situación similar.

Los defectos son costosos ya sea por el tiempo que quita analizarlos y atenderlos o por que el no hacerlo genera deuda técnica y/o descontento de los clientes o usuarios, además que dependiendo del contexto de los sistemas puede llegar a generar pérdidas a una compañía si no son tratados adecuadamente. Así que la mejor manera de atacarlos puede ser compleja. Por esto me genere las siguientes preguntas: 

¿Como podemos optimizar el tiempo de atención para estos bugs?

¿Como podemos mitigar que salgan  nuevos bugs?

###La solución:

Implementar la llamada: "Estrategia de Zero Bugs". 


###El camino:

Considerando los objetivos mas importantes para una compañía así como para el área de desarrollo, a continuación expondremos el ejemplo e implementación de esta estrategia.

![](https://thepracticaldev.s3.amazonaws.com/i/rm6c19h3m4srpblaifno.png)

Teniendo en mente la estructura de los equipos de desarrollo, la arquitectura de los sistemas y la naturaleza de estos, buscando siempre la calidad del software y metodologías de trabajo (no siempre bien aplicadas), se personaliza en base a varias fuentes la siguiente guia, y manera de implementar esta; 


Espero les sea de ayuda!!

En un ecosistema basado en Azure DevOps y el mundo de .Net, contamos con varias herramientas que nos facilitan la vida al momento de controlar y versionar el código fuente. Sin embargo no solucionan todo el problema. En esta "plataforma" nos encontramos con herramientas para administrar tareas, requerimientos, defectos y gestionar las publicaciones (vaya pretenden envolver todo el ciclo de desarrollo de software), pero aún asi en ocasiones es necesario personalizarlas de acuerdo a la forma trabajo, y consideraciones comentadas en párrafos anteriores.

En los siguientes parrafos pretendo comentar como:

* Personalizar los elementos de trabajo y templates de azure devops
* [Definicion de una  estrategia de Zero Bugs](https://dev.to/rimt07/politica-de-zero-bug-4l44)
* Como priorizar de mejor manera la criticidad de los defectos/bugs


Buscaremos ver y manejar los defectos, como un temprano resfriado y no como una epidemia dentro de sus equipos de trabajo, de mediano a gran tamaño.

**Como siempre sus comentarios constructivos son bienvenidos**
Introduction to Machine Learning with TensorFlow.js
Tags: machinelearning, python, tutorial
Published: 2019-07-10 02:02:43

Learn how to build and train Neural Networks using the most popular Machine Learning framework for javascript, TensorFlow.js.

This is a practical workshop where you'll learn "hands-on" by building several different applications from scratch using TensorFlow.js.

If you have ever been interested in Machine Learning, if you want to get a taste for what this exciting field has to offer, if you want to be able to talk to other Machine Learning/AI specialists in a language they understand, then this workshop is for you.

{% youtube BGn_NfHZwWk %}

**Thanks for reading** ❤
If you liked this post, share it with all of your programming buddies!
Follow us on **[Facebook](https://www.facebook.com/MachineLearningTutorial)** | **[Twitter]( https://twitter.com/moriohdotcom)**

### Further reading

☞ [Machine Learning A-Z™: Hands-On Python & R In Data Science](http://learnstartup.net/p/SJw1YoTMg "Machine Learning A-Z™: Hands-On Python & R In Data Science")
☞ [Top 10 Machine Learning Algorithms You Should Know to Become a Data Scientist](https://morioh.com/p/1013a5f310dd)
☞ [Machine Learning in JavaScript with TensorFlow.js](https://morioh.com/p/0943a76a69d8)
☞ [A Complete Machine Learning Project Walk-Through in Python](https://morioh.com/p/b56ae6b04ffc)
AWS launches PostgreSQL Serverless Service
Tags: serverless, database, postgres
Published: 2019-07-10 01:48:58

---
title: AWS launches PostgreSQL Serverless Service
published: true
description: Amazon just announced Amazon Aurora PostgreSQL Serverless
cover_image: https://cdn-images-1.medium.com/max/1600/1*7AOhGDnRL2eyJMUidCHZEA.jpeg
tags: [serverless, database, postgresql ]
---

Amazon just announced __Amazon Aurora PostgreSQL Serverless__ service

_The database is usually the most critical part of software architecture and managing databases, especially relational ones, has never been easy. For this reason, we created Amazon Aurora Serverless, an auto-scaling version of Amazon Aurora that automatically starts up, shuts down and scales up or down based on your application workload._

You won't need fixed RDS instances or EC2 instances with database servers attached to auto-scaling groups. This would be a good improvement regarding saving cost and scaling capabilities. 

So, if you have a dev/qa environment you don't need to have a database running all the time, now using serverless service, it would be charged on-demand saving a lot of money. 

For production purpose, you don't need to handle auto or manual scaling by yourself anymore. Handling traffic peaks would be as easier as any serverless(on-demand) service. 

You can find everything related [here](https://aws.amazon.com/blogs/aws/amazon-aurora-postgresql-serverless-now-generally-available/)
PSA / tire kicking dev.to for a11y
Tags: markdown, a11y, helloworld, html
Published: 2019-07-10 00:51:45

Giving this service a try.  Being a markdown editor, seems to me that people who post here should be able to make accessible blog content, since it's totally in their control to do so.

## The nice thing about markdown
Even if you aren't 100% familiar with markdown syntax, it accepts standard HTML as well, and that's pretty awesome.

So if you're placing an image into your post that conveys important information, then you can do something like:
```html
<img src="my-image.jpg" 
  alt="meaningful text goes here to describe what one might infer from seeing the image">
```

as opposed to something like:
```html
<img src="..." alt="designer">
```
which means as little to you in this example as it did in the context of the dev.to article I originally came across the rendered version of this image in.

### Headings are important

Headings help contribute to the structured outline of a document.  `h1` or `#` in markdown represent the primary content of a document.

`h2` or `##` in markdown represent secondary topics related to the primary.

`h3` or `###` (and so on) represent sub-topics sub topics to the level before them...etc.  

Point being that the use of headings have meaning and help someone using assistive technologies, such as a screen reader, navigate to important areas of your post.   Treating headings as a way to visually style text to be "bigger" is something that should be avoided, just like if you were developing a standard HTML document.


## Quick post wrap up
Well that was a relatively simple way to post some content.  And being markdown, I've been able to save this for cross posting to my own website in the event this service goes away some day.  Which is in no way me wishing ill will on dev.to.  But, you know.  Cycles of popularity n' all.

The unfortunate thing about posting on dev.to is the accessibility errors that were not a result of the content of my post.  e.g. the content immediately following the `h1` of my post is wrapped in an `h3`.  Why?  It doesn't introduce a new topic to the document outline.  It skips a heading level.  

There's a skip link on dev.to that appears if you navigate, using the <kbd>Tab</kbd> key from the web address bar into the document.  [It doesn't do anything beyond the home page](https://github.com/thepracticaldev/dev.to/issues/1153#issuecomment-509878182)...

sigh...
Oh, hi there!
Published: 2019-07-10 00:42:43

---
title: Oh, hi there!
published: true
description: This is a test post.
tags: 
---

Hello, Snuggle here! This is a small introduction post, I suppose.

Still not used to this website or the concept of making blog posts at all. Be sure to visit my Twitter [@WarmSnuggle](https://twitter.com/intent/user?user_id=721391181033304064) or my personal website: [https://snugg.ie](https://snugg.ie)

Thank you! 🌸✨
Podcasts Every Software Engineer/developer Should Subscribe To — Part 4
Tags: podcast, productivity
Published: 2019-07-10 00:04:19

Podcasts are a great way to learn new things even for the lazy reader. If you are not fast at reading or don’t like it very much podcasts can be your way to get the information with less effort. It is easier than reading. This is a part 4 in the series (do check part [1](https://geshan.com.np/blog/2015/10/3-podcasts-every-software-engineer-slash-developer-should-subscribe-to/) and [2](https://geshan.com.np/blog/2016/05/3-podcasts-every-software-engineer-slash-developer-should-subscribe-to-part-2/) and [3](https://geshan.com.np/blog/2017/01/3-podcasts-every-software-engineer-slash-developer-should-subscribe-to-part-3/)) of podcasts you must subscribe to and listen to as a software engineer. Same as the last 3 times the 3 podcasts listed below have great content and considerably good sound quality too. Below is the list:

![](https://cdn-images-1.medium.com/max/2000/1*hhWOkslC4ENUtH1l2Qa6Wg.jpeg)

### [Developer Tea by Jonathan](https://spec.fm/podcasts/developer-tea)

Developer Tea is an exceptional podcast to listen to. Jonathan sometimes does an interview and most of the times it is a discourse on software engineering related topics. A recent episode on [Mid-Year Resolutions](https://spec.fm/podcasts/developer-tea/302953) was a strong reminder that half of the year is gone and in less than six months we will reach 2020.

![](https://cdn-images-1.medium.com/max/2000/1*s-M9r3xBdtrN39PtrTphgQ.jpeg)

### [Agile Thoughts by Agile Noir](http://agilenoir.biz/agilethoughts/)

Simply put Agile thought is an unconventional podcast. Don’t be scared by the unusual looking cover of the podcast, the content is good. Mostly conversational with some characters, the episodes are short and address day to day issues. I remember episode 29 [The value TDD gives to leadership](https://agilenoir.biz/podcast/029-the-value-tdd-gives-to-leadership/) being an intriguing one.

![](https://cdn-images-1.medium.com/max/2000/1*L3DX88tzZI4vGfpqp7b4tw.jpeg)

### [Inside Intercom](https://www.intercom.com/blog/podcasts/)

Inside intercom is a superb podcast focusing on the product side of things rather than just the technical aspects. The most recent episode on [why product teams should focus on outcomes over output](https://www.intercom.com/blog/podcasts/josh-seiden-on-why-product-teams-should-focus-on-outcome-vs-output/) was an eye-opener.

![](https://cdn-images-1.medium.com/max/2000/1*uFr7w1pTFPhwd81o_PYWig.jpeg)

## Conclusion
> *I hope you continue your learning journey with the above interesting podcasts. Keep learning!*

---

*Originally published at [https://geshan.com.np](https://geshan.com.np/blog/2019/07/podcasts-every-software-engineer-slash-developer-should-subscribe-to-part-4/) on July 8, 2019.*
The Radar Gun Problem
Tags: principles, opinion, javascript
Published: 2019-07-10 23:59:42

---
title: The Radar Gun Problem
published: true
tags: principles, opinion, javascript
description: When `console.log` goes wrong
cover_image: https://i.imgur.com/FnVk79i.png
canonical_url: https://wuz.fyi/the-radar-gun-problem/
---

The other day, I was driving home from an event and there was a massive slowdown on the highway. I assumed that there was a crash or some construction up ahead, but as I got closer to the bottleneck, I realized that the only difference was that there was a cop standing on the side of the highway with a radar gun. Just the presence of a monitor slowed down the performance of the system.

Later that week, I was debugging some Javascript code and ran into a problem I have hit a few times. I had a fairly intensive process looping over a lot of values. I took the standard approach to debug a JS problem and dropped in a `console.log`. I refreshed the page, opened the console... and almost crashed my browser.

Calling a `console.log` with an intensive process takes a lot of memory, it turns out. I've run into this before, but this time the traffic slowdown really made me think about it. Let's talk a bit about something I'm calling the RadarGun Problem.

In many situations, the fix for the problem is changing where the observation happens. Moving the `console.log` outside of the loop - either after or before -is a good option. You can also change the method of observation - drop in a`debugger;` and step through it, introducing a purposeful bottleneck to prevent an accidental one.

Have you run into this before? How have you solved it?
SQL Tricks: Querying The Same Table Twice
Tags: sql, postgres
Published: 2019-07-11 17:26:35

---
title: SQL Tricks: Querying The Same Table Twice
published: true
tags: sql, postgres,
canonical_url: https://stephencharlesweiss.com//2019-07-10/sql-query-trick-query-field-twice/
---

I recently came across a creative solution to finding the relationships between different values within a table using SQL. This may be standard practice, but it was the first time I had to think about the problem. As I worked my way through understanding the query, I realized that it’s a stellar application of using SQL to solve real problems.

The solution was to query the same field on a table _twice_ and compare it against itself.

Before we get into _why_ you might want to do that, let’s look at how it works.

Imagine you have a table (`my_table`), which has five values. And now, imagine you want to see how all of these relate to one another - let’s say by subtracting one from the others. Notably, however, we do not want to calculate a row against itself (i.e. no `a-a`).

| name | val |
| --- | --- |
| a | 1 |
| b | 2 |
| c | 3 |
| d | 4 |
| e | 5 |

So, a row for `a` might look like:

| value subtracted from | b | c | d | e |
| --- | --- | --- | --- | --- |
| a | -1 | -2 | -3 | -4 |

How can you do that programmatically with SQL?

Instead of trying to _visualize_ it with SQL, let’s just get the data in order. We’re trying to extract unique tuples from the table (I.e. `[a,b]` is different from `[b,a]`).

```
SELECT name as name1, name as name2 FROM my_table table1, my_table table2
    WHERE table1.name != table2.name
```

What this ends up doing is looking at _each_ name in `my_table` and returning a n-1 rows for each.

We’ve got our tuples! Here’s a [SQL Fiddle](http://sqlfiddle.com/#!17/e3156/8) demonstrating this.

So, why would we actually want to use it?

The above example is absolutely contrived, but the need to do something like this is more common than might appear at first blush. For example, the first time I saw this was in an application looking at the relationships between different statuses and the flows that were possible between them.

A simplified example might be envisioned as:

| From \ To | Coming | Active | On Hold | Done | Canceled |
| --- | --- | --- | --- | --- | --- |
| Coming | - | ✓ | ✓ | ✓ | ✓ |
| Active | x | - | ✓ | ✓ | ✓ |
| On Hold | x | ✓ | - | ✓ | ✓ |
| Done | x | ✓ | ✓ | - | ✓ |
| Canceled | x | ✓ | ✓ | ✓ | - |

✓ = available
\- = not applicable
x = not available

While that sort of relationship is useful for visualizing, it’s not how we would store it in SQL since the number of columns could quickly get out of hand and most of the time, we’re interested in a particular relationship - defined by its tuple (e.g., answer the question can Active transition to On Hold?).

Using the technique of querying the table twice against the same field can create this matrix quickly and easily.
Top 5 DEV Comments from the Past Week
Tags: bestofdev
Published: 2019-07-09 23:36:16

---
title: Top 5 DEV Comments from the Past Week
published: true
description: Highlighting some of the best DEV comments from the past week.
tags: bestofdev
cover_image: https://res.cloudinary.com/practicaldev/image/fetch/s--7VrAA2ln--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://thepracticaldev.s3.amazonaws.com/i/qmb5wkoeywj06pd7p8ku.png
---

This is a weekly roundup of awesome DEV comments that you may have missed.  You are welcome and encouraged to boost posts and comments yourself using the **[#bestofdev](/t/bestofdev)** tag.

**[What's one thing you wish you knew before you started programming?](https://dev.to/aspittel/what-s-one-thing-you-wish-you-knew-before-you-started-programming-2pem)**  The whole thread is worth enjoying, but @listnux had a top comment with this reply:
{% devcomment ck8c %}

This was an interesting question with a number of varied perspectives: **[As a Software Engineer, do you prefer to work at start-ups or outsourcing agencies or big companies?](https://dev.to/ilonacodes/as-a-software-engineer-do-you-prefer-to-work-at-start-ups-or-outsourcing-agencies-or-big-companies-28jh)**  @hamishdickson offered a great response:
{% devcomment ckl6 %}

😆 **[I hereby challenge you to a programming poetry smackdown. ](https://dev.to/kelly/i-hereby-challenge-you-to-a-programming-poetry-smackdown-39f5)**.  This was an awesome submission from @pitweetie:
{% devcomment cim7 %}

We've all fallen victim to hype. **[What was the most over-hyped software movement?](https://dev.to/ben/what-was-the-most-over-hyped-software-movement-e8j)**  @maxart2501 talks about NoSQL:
{% devcomment cm3d %}

Finally, in **[Javascript String Methods You Must Know to Become an Algorithms Wizard](https://dev.to/uptheirons78/javascript-string-methods-you-must-know-to-become-an-algorithms-wizard-c84)** @dominela10 provides a warning about `.split('')`:
{% devcomment ckp3 %}

See you next week for more great comments ✌
Do you set up Patreon or other services to accept donation? 💰
Tags: discuss, motivation
Published: 2019-07-09 21:43:51

On one hand, it sounds great to receive donation for working on projects, and people can dream of having enough donation to quit their day jobs. On the other hand, even the people maintaining pretty popular projects do not receive much money. For example, the [Babel](https://babeljs.io/) maintainer is currently receiving $2,580 per month via [Patreon](https://www.patreon.com/henryzhu), but I'm pretty sure one can easily make more money in a full time tech job.

Do you think Patreon or similar services (GitHub Sponsor) is helpful to you? Would receiving money contribution motivate you working on projects?

P.S. Feel free to put your donation links in the discussion ;)
Back to University :) !!!
Published: 2019-07-09 21:25:17

Hello to all i wrote this code using the book [The Little Book of Algorithms](http://www.mrlaulearning.com/2019/04/LBOA.html) by [@MrLauLearning](https://twitter.com/MrLauLearning), and i remember my first code challenges in university that i felt in that moment a long and hard way, but now 7 years later, i now that was hard and a long way, but very interesting and funny way i took.

![LowestNumber.py](https://thepracticaldev.s3.amazonaws.com/i/we5xtegp6cplkxxauq94.png)

i'm getting back to check all the algorithms, i'm go to re-encounter with an amazing challenge and re-enforce my code i'll write.