teleren/devto huggingface dataset:
Socks
Tags: watercooler
Published: 2020-01-08 18:39:55

---
title: Socks
published: true
description: What happened to my socks?
tags: watercooler
---

You know me as a programmer and author, but probably didn't know I'm also a songwriter and comedian. And sometimes those last two things merge.

I recorded this video yesterday for a friend, and thought y'all could appreciate some mid-week hilarity. **What happened to my socks?**

(Apologies for my voice...I'm on the tail end of a cold.)

{% youtube Zx3Kk3kNtvw %}

```
==== LYRICS ====

VERSE 1

It's a laundry quandary
It's a hosiery heist
What creature takes off with my socks
In the middle of the night

I swear I had two dozen
All neatly rolled and paired
But half my socks are lonely now
And believably scared

CHORUS
Did the washer take up darning
Or the dryer have a snack?
Are there aliens absconding
With our socks both white and black?

Is it gremlins raiding baskets
Or a wicked feline plot?
A band of rogue lint fairies
Or do they just walk off?

Whoa....
What happened to my socks?

VERSE 2
Perhaps it could explain
In a very simple way
That sweater no one claims to own
It won't fit anyway

The greatest politicians
And the scientific minds
Despite their clout can't work it out
With their feet as cold as mine

[CHORUS]

BRIDGE

Argyle, crew, ankle, or toe
You'd think that someone would surely know
Wool or cotton, blue or tan
It's as strange as that thing with the pens

(Seriously, why can I never find one with ink?)

[CHORUS x2]
```
10 Best Books To Learn Python For Beginners and Experts
Tags: python, books, programming, development
Published: 2020-01-08 21:05:25

---
title: 10 Best Books To Learn Python For Beginners and Experts
published: true
description: Here I have compiled a list of 10 best books to learn Python for beginners and experts. 
tags: #python, #books, #programming, #development
cover_image: https://thepracticaldev.s3.amazonaws.com/i/d1zik2bwx3jrs64iemw7.jpg
---

[Python](https://www.codeitbro.com/best-books-to-learn-python/) is no doubt one of the hottest programming languages out there. From web development to data science to artificial intelligence, you can make use of Python to write robust programs to accomplish anything. 

It makes you an IT God with all the superpowers, which allows you from scraping web content to write custom task automation scripts. In case, you are beginning your Python journey, here are some best books to learn Python. 

I have made the list in such a way that the books are equally helpful for beginners and advanced programmers having some development experience. Make sure you check out the list till the very end as some of the books covers hands-on project related to neural networks and machine learning – topics important for Data Scientists. 

##10 Best Books To Learn Python For Absolute Beginners And Experts

1. Head-First Python: A Brain-Friendly Guide.

2. Python Cookbook, Third Edition, by David Beazley and Brian K. Jones.

3. Python Crash Course, 2nd Edition: A Hands-On, Project-Based Introduction to Programming.

4. Python Programming: An Introduction to Computer Science.

5. Python in A Nutshell: A Desktop Quick Reference, Third Edition.

Please read the complete post on [CodeItBro](https://www.codeitbro.com/best-books-to-learn-python/)
Error while executing from VS 2017.
Published: 2020-01-18 07:32:38

An unhandled exception occurred while processing the request.
AggregateException: One or more errors occurred. (One or more errors occurred. (Failed to start 'npm'. To resolve this:.

[1] Ensure that 'npm' is installed and can be found in one of the PATH directories.
Current PATH enviroment variable is: C:\Oracle\product\12.1.0\dbhome_1\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Users\algupta\AppData\Local\Programs\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Java\jdk1.8.0_231\bin;C:\Program Files\nodejs;C:\Program Files\dotnet\;C:\Program Files\TortoiseGit\bin;C:\Program Files\PuTTY\;C:\Users\algupta\AppData\Roaming\npm;C:\Users\algupta\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Sophos\Sophos SSL VPN Client\bin;C:\Users\algupta\.dotnet\tools;C:\Users\algupta\AppData\Local\Programs\Microsoft VS Code\bin
Make sure the executable is in one of those directories, or update your PATH.

[2] See the InnerException for further details of the cause.))
System.Threading.Tasks.Task<TResult>.GetResultCore(bool waitCompletionNotification)

InvalidOperationException: Failed to start 'npm'. To resolve this:.

[1] Ensure that 'npm' is installed and can be found in one of the PATH directories.
Current PATH enviroment variable is: C:\Oracle\product\12.1.0\dbhome_1\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Users\algupta\AppData\Local\Programs\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Java\jdk1.8.0_231\bin;C:\Program Files\nodejs;C:\Program Files\dotnet\;C:\Program Files\TortoiseGit\bin;C:\Program Files\PuTTY\;C:\Users\algupta\AppData\Roaming\npm;C:\Users\algupta\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Sophos\Sophos SSL VPN Client\bin;C:\Users\algupta\.dotnet\tools;C:\Users\algupta\AppData\Local\Programs\Microsoft VS Code\bin
Make sure the executable is in one of those directories, or update your PATH.

[2] See the InnerException for further details of the cause.
Microsoft.AspNetCore.NodeServices.Npm.NpmScriptRunner.LaunchNodeProcess(ProcessStartInfo startInfo)
Top FrontEnd JS Framework to learn in 2020
Tags: javascript
Published: 2020-01-09 08:10:07

2019 can be described as the revolutionary year for JavaScript frameworks, as we saw huge development of these frameworks and the beginning of their use among the masses.

Read more to keep yourself updated with the frameworks that are predicted to rise.

<H3>What is JavaScript Framework?</H3>

<a href="https://www.javascript.com/">JavaScript</a> is a programming language that is commonly used for the development of moderate applications. It is lightweight and supported by the majority of the browsers we use in our daily life. It supports both Object-Oriented programming(OOPs) and Procedural programming. Hence, it is used commonly for making web pages with the client-side script to interact with the user and make the web pages effective and concise.

<B>Framework</B>

It is nothing but a large part of a code that you can apply to your code to some problem that you are facing in a specific domain. It can be used by providing “callbacks“.

<b>Advantages of JavaScript Frameworks</b>

- It has strong community support which keeps it always updated.
- Possess extensions that help in debugging components.
- Plenty of third party component support.
- The efficiency of the code increases.
- It is free and open to use for all.
- Possesses the ability to keep the user interface in synchronization with the state of the system.

2019 being such a great year for JS, what does 2020 have in store for us??
Now that we have discussed the JavaScript Frameworks, let us check out the rising <a href="https://codersera.com/blog/top-frontend-js-framework/">Frontend frameworks in 2020:</a>
The Chrome Page Ruler
Tags: design
Published: 2020-01-18 19:03:18

Many Web Designers use tools other than HTML and CSS to design web sites. Those tools can create an "impedance mismatch" between the units of measure of that tool and the common CSS units of measure.

For example, you as a developer receive a set of specs, spelling out overall design point widths and heights for the site. Additionally, there are plenty of font-sizes to implement in each different section. Do you find that attempts to implement these specs. show that it doesn't all "just fit together" and you need to make "field adjustments" to get everything to look like the images your designer sent you?

Once the site is coded up and sent to a dev. server the Designer and Business users should be able to see the actual site implementation. Thus begins the tweaking iterations (which can happen frequently).  Statements like *slide it to the left, align it with this, up just a tad*; can be improved.  

**Install the Chrome Page Ruler**

[The Chrome Page Ruler](https://chrome.google.com/webstore/detail/page-ruler/emliamioobfffbgcfdchabfibonehkme?hl=en)

When new code is deployed to the dev. server, the designers and buisness folks can now talk about units of adjustment.

Examples:

*The letter "B" in the header image is 28px from the left, make sure all three section's text align at 28px.*

*The center line of text in 2nd image is 200px from the top, the text in the column next to the image should start at 200px from the top.*

*The main section of the page has a height of 575px, increase it to 585px.*

**Example of the Page Ruler**

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ijhdfvf78cibtvuc3zt0.PNG)


JWP2020
Implementation of an Algebraic Turbulence Model in FEATool Multiphysics
Tags: cfd, turbulence, featool, multiphysics
Published: 2020-01-14 08:35:39

---
title: Implementation of an Algebraic Turbulence Model in FEATool Multiphysics
published: true
date: 2020-01-08 00:00:00 UTC
tags: cfd, turbulence, FEATool, multiphysics
canonical_url: https://www.featool.com/tutorials/2020/01/08/2020-01-08-Implementation-of-an-Algebraic-Turbulence-Model.html
---

![Implementation of an Algebraic Turbulence Model in FEATool Multiphysics](https://thepracticaldev.s3.amazonaws.com/i/p1rjt5fm3cbo4lbnbrft.jpg)

Performing accurate #simulation of #turbulent #flows is still a challenging topic today, especially with limited computational resources. Although the Navier-Stokes equations are perfectly valid in the turbulent flow regime, one typically have to resort to some form of turbulence modeling in order to reduce computational costs, whereby small scale flow fluctuations are effectively filtered out and subsequently approximated by the turbulence model.

Custom definition and implementation of an algebraic turbulence model in #FEATool #Multiphysics is discussed in the following. In particular, the simple equation expression and coefficient syntax highlights how the turbulence model easily can be defined in FEATool.
How to Add a Transparent Text Box Over an Image Using CSS
Tags: css3, latestposts, css, csstricks
Published: 2020-01-09 13:02:46

---
title: How to Add a Transparent Text Box Over an Image Using CSS
published: true
date: 2020-01-09 12:54:17 UTC
tags: CSS3,Latest Posts,CSS,css tricks
canonical_url: http://robdoylecreative.com/how-to-add-a-transparent-text-box-over-an-image-using-css/
---

When you visit some websites, have you ever wondered how text can be transparent over an image or background, or there is a transparent box with text?. Well, this is not as difficult to do as it seems, we just need to apply a few lines of HTML and CSS. Read on as I show […]

The post [How to Add a Transparent Text Box Over an Image Using CSS](http://robdoylecreative.com/how-to-add-a-transparent-text-box-over-an-image-using-css/) appeared first on [Rob Doyle Creative](http://robdoylecreative.com).
Supercharge your expressJs Views
Tags: productivity, javascript, pug, node
Published: 2020-01-15 15:36:13

# Supercharge your expressJs Views
On the following few lines, I want to share with you how I added mixins to my expressjs application.

# Add mixins to your views
- Mix from laravel-mix (if you're from php world you know what I am saying)
With laravel and mix, you're very likely to have the following snippets in your code base:
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/2mh24xhvgwgwryrysykv.png)

Yes this is Pug (ex jade) syntax

## Explanation of express mix helper
You are most likely asking yourself where the hell this `mix` method is coming from so here it is.
![WTH meme](https://media.giphy.com/media/3oEjHOezvV1v2GN07S/giphy.gif)

TLDR;
```js
  this.app.locals.mix = (filename) => {
    const fileObject = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../assets/mix-manifest.json'), 'utf8'))
    const requestedFilename = fileObject[filename]
    if (!requestedFilename) {
      throw new Error(`${filename} not found in mix manifest. Manifest: ${JSON.stringify(fileObject, null, 2)}`)
    }
    return requestedFilename
  }
```

I read the file outputed by webpack on build
```js
  const fileObject = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../assets/mix-manifest.json'), 'utf8'))
```

then I return the value matching to the key which is the filename in our case
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/bykyuvc2n7pabko3x1ee.png)
```js
    const requestedFilename = fileObject[filename]
    return requestedFilename
```

Raise server error in case the file is not there. Should not happen but hey you never know when things can go wrong ![meme:dont-know](https://media.giphy.com/media/U6Fxnc2jTlBh2GKCTU/giphy.gif)
```js
    if (!requestedFilename) {
      throw new Error(`${filename} not found in mix manifest. Manifest: ${JSON.stringify(fileObject, null, 2)}`)
    }
```


# Wrap up
Now you have some a nice helper function serving the latest build of webpack with a content hash to be fully efficient cache wise.
You're welcome!
Table Assignment for Class
Published: 2020-01-15 19:17:39

<!DOCTYPE html>
<html>
  <head>
  <title>My Site</title>
   
  </head>
  <body>
    <h1>Movie Releases by Year</h1>
     <table>
  
      <tr>
        <th>Year</th>
        <th>Titles</th>
      </tr>
       <tr><td>2019</td><td><ul><li>The Wandering Earth</li><li>Pokemon Detective Pikachu</li><li>The Lion King</li><li>Godzilla: King of the Monsters</li><li>Fast & Furious Presents: Hobbs & Shaw</li><li>Avengers: End Game</li></ul></td></tr>
      
       <tr><td>2018</td><td><ul><li>Fantastic Beats: The Crimes of Grindelwald</li><li>The Grinch</li><li>Jurassic World: Fallen Kingdom</li><li>Ralph Breaks the Internet</li><li>Ready Player One</li><li>Venom</li></ul></td></tr>
      
       <tr><td>2017</td><td><ul><li>Pirates of the Caribbean: Dead Men Tell No Tales</li><li>It</li><li>The Boss Baby</li><li>Beauty and the Beast</li><li>John Wick: Chapter 2</li><li>Thor: Ragnarok</li></ul></td></tr>
    </table>
  
  </body>
</html>
Difference between struct and class in C++
Tags: c, class, struct
Published: 2020-01-16 09:56:24

---
title: Difference between struct and class in C++
published: true
date: 2020-01-15 22:10:00 UTC
tags: c++,class,struct
canonical_url: https://howtosurviveasaprogrammer.blogspot.com/2020/01/difference-between-struct-and-class-in-c.html
---

Introduction

A really popular question of the C++ interview is about the difference between struct and class. It seems to be an easy question, but there are multiple views to be considered.

# Historical background

Let’s start with the historical view. C++ is based on the programming language C, which is not supporting the object oriented programming paradigm. So that there were no classes in C, only structs. And struct was nothing else than a data structure to be used to store variables of different types together.

Later on with C++ together with the object oriented programming support the keyword class has been introduced to represent the typical object oriented classes.

In C++ Struct has also been extended with time, so it is also possible to inherit structs from each other, change the visibility of the attributes and to add constructors, destructors and member functions.

# Technical difference

What is then the exact difference?

Technically there’s only what difference between structs and classes: in a struct the default visibility is public, since in a class the default visibility is private.

There’s technically no other difference in C++.

# Practical difference

The difference is more philosophical.

As I already mentioned struct is a collection, a record of data, which belongs somehow together. And nothing more.

Since class is a bit more, class represents something, which has an interface, a state and a behavior. The state is usually internal, not visible from outside, that’s why the default visibility is private. The state can be changed through the predefined interfaces, which are the public methods of the class. Furthermore the usually the class has an invariant which is a restriction on its possible states. In case of a class you have methods which are handling the attributes of the class together.
  

So my suggestion is: use struct if you need a simple data container of data which belongs together and use class for everything what is more complex, what involves more abstraction.
Day 70 : Session
Tags: hiphop, code, coding, lifelongdev
Published: 2020-01-15 22:41:44

_liner notes_:
- Professional : Got up early to sit in on a talk prep session this morning. Good talk and there was some good feedback given. Things that I can incorporate into my own presentations. Had a 1 on 1 meeting with a co-worker to learn more about them. He lives in Slovakia. It's cool because I'm looking to hopefully visit Eastern Europe this year. So I got some info from him. Other than that, I am working on my report and doing some research.

- Personal : Thinking I've reached the height of this cold. Going to drink as much liquids and get rest. I'll probably start putting together this week's radio show.

![Desert plain of Canyonlands, Utah](https://thepracticaldev.s3.amazonaws.com/i/zsimurie7o7m88k8njco.png)

So yeah, going to work on this report a little more and then start working on the radio show.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube Lkfp2lV7Dw0 %}
Full Stack Machine learning on AWS: Language Translation with AWS Amplify
Tags: aws, machinelearning, serverless, javascript
Published: 2020-01-16 13:24:49

---
title: Full Stack Machine learning on AWS: Language Translation with AWS Amplify
published: true
description: In this video, we'll create a new React app, initialize a new AWS Amplify project, and add text translation using Amazon Translate.
tags: aws, machine learning, serverless, javascript
---

In this video, you'll learn how to create a new AWS Amplify project and add the predictions category, enabling a host of managed machine learning capabilities.

We'll then use the __Predictions__ API to interact with Amazon Translate to translate text from a base language to a target language.
A linguagem de programação Egua
Tags: egualang, linguagemprogramacao, brasileira, beginners
Published: 2020-01-21 19:37:02

# Introdução
Olá! Estou começando no DEV para falar sobre as coisas que mais curto em computação.

Estou bem animado pra falar sobre uma linguagem chamada **Egua**, que é uma linguagem bem nova, mas simples, rápida, leve e moderna pra aprendizado de programação.
Sabe o melhor? É toda em português!!! Então não precisa saber inglês pra conseguir entender os comandos. Chega de barreiras na programação!

#Objetivos deste post
1. História do Egua;
2. Olá, mundo;
3. Principais características da linguagem;
4. Como usar o Egua;

#O que significa "Egua"?
A palavra Égua é comumente conhecida no vocabulário paraense, sendo uma expressão extremamente versátil. 
>A ideia sempre foi deixar uma característica regional na linguagem, já que ela foi criada em solo paraense.
>— *egua.tech*

#O "Olá, mundo" em Egua!
```javascript
//ola_mundo.egua

escreva("Olá, mundo");
```
Bem simples e com uma sintaxe limpa, lembra bastante o python.

#Principais características
>**Nota:** este post foi escrito com o Egua na versão 1.1.0

###Egua é escrito em JavaScript
Egua é uma linguagem interpretada e escrita em javascript puro, permitindo uma execução extremamente rápida.
Toda a linguagem, incluindo todas as suas bibliotecas possuem 267KB.

###Tão rápida quanto JS
A linguagem funciona inteiramente online, via navegador, e em uma internet lenta teve seu carregamento médio e integral em 2.4 segundos. 

###Prós e contras
- SIM 👍
 - Online, dispensando qualquer instalação;
 - Paradigma de orientação a objetos;
 - Baixo consumo computacional;
- NÃO 👎
 - IDE ainda um pouco crua;

###Similar a outras linguagens
Se você já conhece as linguagens Pytho, JavaScript e Julia, irá perceber a semelhança de Egua com essas linguagens. Se você não conhece as linguagens listadas acima, saiba que são linguagens robustas e muito utilizadas no mercado. E o Egua foi desenvolvido para propositalmente se assemelhar a elas, visto que não há sentido se utilizar de uma linguagem totalmente diferente das outras para aprender lógica. A ideia é justamente começar com Egua e partir para as outras.

>Egua é simples de ler, fácil de escrever e pode ser aprendido em pouquíssimo tempo!

Okay, hora de testar o Egua no seu computador!
- Primeiro, acesse o [link](https://egua.tech/egua) do egua no seu navegador:
```
https://egua.tech/egua
```

- Segundo, comece a programar. Simples assim.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/5j1n03cbocwrsahomtfi.PNG)

#Mais sobre o Egua
- Site oficial - https://egua.tech
- Repositórios no GitHub - https://github.com/eguatech/egua
- Documentação oficial - https://egua.tech/docs

###Canais oficiais
- Twitter - https://twitter.com/lucaspompeun
- Instagram - https://www.instagram.com/eguatech/
- YouTube - https://www.youtube.com/channel/UCDgGUdR_6hZ6lfVaQbkQPLw
- Comunidade - [WhatsApp](https://chat.whatsapp.com/H7xZXgdRe7Q7EIWgvMmtqx), [Telegram](http://t.me/eguatech)

#Fotos por:
[Título] Annie Spratt https://unsplash.com/photos/QckxruozjRg

#P.S.
Se vocês curtiram ou acharam algo ruim, não esqueçam de comentar sobre.