teleren/devto huggingface dataset:
Making neural nets uncool, Open GPU Data Science, Simple. Flexible. Powerful.
Tags: python, beginners, machinelearning, datascience
Published: 2020-06-20 18:58:02

![welcome back](https://media.giphy.com/media/kMM3vtBEgSsLu/giphy.gif)
Welcome back to the fourth week of the series. In this post, we will be discussing the following libraries 
- Rapids
- Keras
- Fast AI

Don't get lost seeing the title, you will understand the title once you finish reading the post 🕵🏻‍♂️.
![Sherlock](https://media.giphy.com/media/26FLa6peMp3ZNzKnu/source.gif)

## [Rapids](https://rapids.ai/)
![rapids](https://rapids.ai/assets/images/og_image.png)
The RAPIDS suite of open-source software libraries and APIs give you the ability to execute end-to-end data science and analytics pipelines entirely on GPUs. Licensed under Apache 2.0, RAPIDS is incubated by NVIDIA  based on extensive hardware and data science experience. RAPIDS utilizes NVIDIA CUDA  primitives for low-level compute optimization and exposes GPU parallelism and high-bandwidth memory speed through user-friendly Python interfaces.

**Tagline**: Open GPU Data Science
[Docs](https://docs.rapids.ai/)
[Collab Notebook](https://colab.research.google.com/drive/1rY7Ln6rEE1pOlfSHCYOVaqt8OvDO35J0#forceEdit=true&offline=true&sandboxMode=true)

## [Keras](https://keras.io/)
![Keras](https://upload.wikimedia.org/wikipedia/commons/thumb/a/ae/Keras_logo.svg/1200px-Keras_logo.svg.png)
Keras is an API designed for human beings, not machines. Keras follows best practices for reducing cognitive load: it offers consistent & simple APIs, it minimizes the number of user actions required for common use cases, and it provides clear & actionable error messages. It also has extensive documentation and developer guides.

**Tagline**: Simple. Flexible. Powerful.
[Docs](https://keras.io/documentation/)

[Fast AI](https://www.fast.ai/)
![fastai](https://miro.medium.com/max/265/1*bUZKHfAugVeXAkl0TGClCA.png)
The fastai library simplifies training fast and accurate neural nets using modern best practices. It's based on research into deep learning best practices undertaken at fast.ai, including "out of the box" support for vision, text, tabular, and collab (collaborative filtering) models.

**Tagline**: Making neural nets uncool again
_TBH my favourite library and tagline, they explained their tagline on their website_
[Learn](https://course.fast.ai/)
[Docs](https://docs.fast.ai/)

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

Peace ✌🏻,
Rohith Gilla
Old layout
Published: 2020-06-20 18:23:06

---
title: Old layout
published: true
description: Dev.to homepage layout changes
tags: 
//cover_image: https://direct_url_to_image.jpg
---
How do i recover the old dev.to layout that had just blocks and blocks of useful articles. Now it is over run with stuff i dont want. is there a reset button on this thing Jane !?
Priority Queue in python with a custom object
Tags: python
Published: 2020-06-20 18:31:50

I've come across this because you can use this `priority queue` in the **selection process** in the A* algorithm (i.e the process where you choose the node with the lowest f score), to get an `O(1)` instead of the traditional `O(n)` solution.

Since we are choosing the node with the lowest score and the priority queue keeps the lowest value at the beginning, we can then achieve this `O(1)` solution.

Here is the first file 
**node.py**

```
class Node(object):
    def __init__(self, title, i, j):
        self.title = title
        self.i = str(i)
        self.j = str(j)
        self.f = 0
        self.g = 0
        self.h = 0
        # no neighbors at first
        self.neighbors = []

    def __str__(self):
        return '<' + self.title + '>'

    def __repr__(self):
        character = 'W' if self.title is '#' else 'O'
        return '<' + self.i + ' ' + self.j + ' ' + self.title + ', ' + str(len(self.neighbors))+'>'
```

Don't mind the unnecessary code.

Here is the second and final file
**priority_item.py**

```
from dataclasses import dataclass, field
from typing import Any
from queue import PriorityQueue
from node import Node


@dataclass(order=True)
class PrioritizedItem:
    priority: int
    item: object = field()

q = PriorityQueue()
n = Node('a', 0, 0)
n.f = 1
n2 = Node('b', 0, 0)
n2.f = 0
n3 = Node('c', 0, 0)
n3.f = 2
q.put(PrioritizedItem(n.f, n))
q.put(PrioritizedItem(n2.f, n2))
q.put(PrioritizedItem(n3.f, n3))
print(q.get())
```

In this file I create a new **PrioritizedItem** which will encompass my custom object.

Below it I make 3 new node objects just as a test where the second has the lowest f score.

When inserting these custom nodes into the list, you wrap it in the `PrioritizedItem` and pass the value that you want to be used as the priority as the first argument, and then the priority queue will sort them from lowest to highest. This is because the `PriorityQueue` uses a `min-heap` data structure in its underlying implementation.
CSS Combinators
Tags: css, csscombinators, cssadvance, fahaddevs
Published: 2020-06-20 18:26:09

In this article, I will discuss CSS Combinators.

### **Table Of Contents**
   * [Descendant combinator](#chapter-1)
   * [Child combinator](#chapter-2)
   * [Adjacent sibling combinator](#chapter-3)
   * [General sibling combinator](#chapter-4)


### Descendant combinator <a name="chapter-1"></a>
The descendant combinator — typically represented by a single space ( ) character — combines two selectors such that elements matched by the second selector are selected if they have an ancestor (parent, parent's parent, parent's parent's parent, etc) element matching the first selector. Selectors that utilize a descendant combinator are called descendant selectors.

```html
<div class="box">
   <p>Text in .box</p>
</div>
<p>Text not in .box</p>
```

```css
/* This is descendant combinator example */
.box p {
    color: red;
}  
```
---

### Child combinator <a name="chapter-2"></a>
The child combinator (>) is placed between two CSS selectors. It matches only those elements matched by the second selector that are the direct children of elements matched by the first. Descendent elements further down the hierarchy don't match.

```html
<ul>
    <li>Unordered item</li>
    <li>Unordered item
        <ol>
            <li>Item 1</li>
            <li>Item 2</li>
        </ol>
    </li>
</ul>
```

```css 
/* this is child combinator example */
ul > li {
    border-top: 5px solid red;
} 
```
---
### Adjacent sibling combinator <a name="chapter-3"></a>
The adjacent sibling selector (+) is used to select something if it is right next to another element at the same level of the hierarchy

```html
<article>
    <h1>A heading</h1>
    <p>Veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo
            melon azuki bean garlic.</p>
    <p>Gumbo beet greens corn soko endive gumbo gourd. Parsley shallot courgette tatsoi pea sprouts fava bean collard greens dandelion okra wakame tomato. Dandelion cucumber earthnut pea peanut soko zucchini.</p>
</article>
```

```css 
/* this is adjacent sibling combinator example */
h1 + p {
    font-weight: bold;
    background-color: #333;
    color: #fff;
    padding: .5em;
} 
```
---
### General sibling combinator <a name="chapter-4"></a>
If you want to select siblings of an element even if they are not directly adjacent, then you can use the general sibling combinator (~). To select all img elements that come anywhere after p tag.

```html 
<article>
    <h1>A heading</h1>
    <p>I am a paragraph.</p>
    <div>I am a div</div>
    <p>I am another paragraph.</p>
</article>
```

```css 
/* this is general sibling combinator example*/
h1 ~ p {
    font-weight: bold;
    background-color: #333;
    color: #fff;
    padding: .5em;
}
```
---

#Thanks for reading...

Original article [Click here](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors/Combinators)
how to insert app-token into the header on axios and react js?
Published: 2020-06-20 18:08:23

first I post the API to the "api / app-token" endpoint "The API doesn't need a header", after that the response from the "api / app-token" is stored in the localstorage with the app-token key, after saving it in the localstorage I take app- I then set the token to the header to post another API endpoint that requires a header, the problem is that the header cannot retrieve data from localstorage so the other endpoint cannot be accessed because the header has not been filled with app-tokens that are in localstorage, I try to outsmart it with force the app-token to a state when the stat is loaded then I make the page refresh "window.location.reload ()", but why isn't the function running? or is there a more efficient way?

There are basically 2 endpoints, the first endpoint "api / app-token" does not need a header, then the second endpoint requires a header, and the header must be filled with app-tokens that I set into localstorage

this is example axios post for get app-token
```
const [getAppToken, setgetAppToken] = useState({})
  const [company, setCompany] = useState({
    company_name: 'fevci',
    comp_key: 'fevci123'
  })

  useEffect(() => {
    const getAppToken = async () => {
      const res = await axios({
        method: 'post',
        url: endpoint + 'api/app_token',
        data: company,
      })
      const { data: appToken, success } = res.data

      if (success === true) {
        storage.setItem('app-token', JSON.stringify(appToken))
      } else {
        storage.removeItem('app-token')
      }

      return res
    }
    getAppToken()
  }, [])
```
and this is an example of axios which has a header assuming the header has been filled with app-tokens
```
export const api = axios.create({
  baseURL: endpoint,
  headers: {
    'app-token': (storage.getItem('app-token') !== null) ? JSON.parse(storage.getItem('app-token')) : null,
    'Authorization': (storage.getItem('token') !== null) ? JSON.parse(storage.getItem('token')) : null,
    'content-type': 'multipart/form-data'
  }
})
```
EuroPython 2020 Sprints
Tags: europython, python, sprints, conferences
Published: 2020-06-20 17:26:35

Sprint tickets are **[free](https://ep2020.europython.eu/registration/buy-tickets/)** this year!

This is a great chance to get to know open source or to promote your open source project.

ℹ️ Sprints will be run on the conference weekend: Saturday & Sunday July 25 & 26 online.

ℹ️ EuroPython 2020 Sprints Listing: https://wiki.python.org/moin/EuroPython2020/Sprints

As is tradition, sprints are not organized by the conference organizers, but instead run by the attendees who want to put on a sprint. We only provide the virtual rooms and guidance on how to run the sprints.

# What is a “Sprint” ?
Most open source software development happens on the web and developers usually communicate online only when working on projects. This usually works out fine, but the lack of live meetings can sometimes be a limiting factor in making good progress.

For this reason, a form of impromptu coding meetups called “**sprints**” or “**hackathons**” (outside the Python community, the term “hackathon” is more common) were initiated, where developers interested in a project can get together for a short period of time to make quick progress. Since conferences provide the perfect occasion to meet, sprints are made part of the conference program.

![Pictures of sprints from EuroPython 2018 and 2019 (in-person events)](https://dev-to-uploads.s3.amazonaws.com/i/tejp5fmtf2zl4jxhyjqi.png)

# EuroPython 2020 Online Sprints
EuroPython has had sprints ever since it started in 2002. This year we will have a sprint weekend, where developers can join to work on interesting things. It is also possible for people interested in a project to join in for the first time at a sprint. The setup and management of the sprints is solely up to the sprint teams running the sprints.

We will have a sprint introduction session on Saturday morning. If you want to join a sprint team, attending this session is a good idea.

**Since we're running EuroPython 2020 as an online event, we made attending the sprints free of charge, so you won't need a ticket to join.**

# Organizing a Sprint
If you are planing to run a sprint at EuroPython 2020, please add an entry to the public Python.org wiki page we have for this: https://wiki.python.org/moin/EuroPython2020/Sprints

You do not need to create an account for this. Simply click [Edit (GUI)](https://wiki.python.org/moin/EuroPython2020/Sprints?action=edit&editor=gui) or [Edit (Text)](https://wiki.python.org/moin/EuroPython2020/Sprints?action=edit&editor=text) to add an entry.

👉 Remember to announce it on the [social channels](https://ep2020.europython.eu/social-media/) too!

Note: If you want to add a per-sprint page, you will need editing permission to the wiki. Please see [the wiki front page](https://wiki.python.org/moin/FrontPage#use) for instructions (near the bottom of the page) on how to get those permissions. You don't need these permissions for adding a sprint.

Many thanks !
Why Visual Studio Code is so popular?
Tags: vscode
Published: 2020-06-20 18:00:50

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

I think the main reason Vscode is so popular is that it has all that every programmer expects from a code editor with some other useful features.

###1) It serves numerous programming languages

It supports almost all the major programming languages such as It supports Python, JavaScript, HTML, CSS, TypeScript, C++, Java, PHP, Go, C#, PHP, SQL, Ruby, Objective-C and much more.

###2) Available for macOS, Linux, and Windows

It is a free open source editor and cross platform that works on Windows , Linux and MacOS to enable you to work on your device regardless of the platform.

###3) The language of the selected file can be modified

It supports default language, but you can also edit language mode according to your file.

###4) Debugging

When the coding becomes difficult, it becomes difficult to debug. Debugging is often the only feature developers miss in a sleeker coding experience, and so we did it. Visual Studio Code provides an integrated debugger so that you can transfer source code, check variables, view call stacks and run console commands.

###5) Provides documentation specific to the language

The web portal contains popular language documents, which are supported by the Visual Studio Software. C++, C #, CSS, Go, Python, PHP , Java and many more are among them.

###6) Command palette

The command palette that makes the VS code accessible from the keyboard is displayed in Ctrl / Command+ Shipt+P. You will use all VS Code features and all keyword shortcuts.

###7) Customization

Visual Studio Code offers flexibility, as with any other common editor. In fact , thanks to its flexible preferences and a variety of extensions, it provides extremely personalized solutions. Vscode allows you to modify your theme, modify your keypads, adjust your settings, create snippets and much more.

###8) Code management features

Visual Studio code also features code management functions such as Go to Definition, Peek Definition and the Rename Symbol. Find all references. These features can be easily found in the vscode by right-clicking in the code file.

###9) Built-in Git integration

Visual studio code is providing comprehensive Git integration, so that programmers can immediately monitor changes without leaving the editor. You can find the Git icon on the left side of the bar where it can be initialized and several Git commands such as pull, push, publish etc. can be performed. Vscode also works with a number of Git repository locally and remotely.

###10) IntelliSense

The programmers use this function for the completion of their intelligent code, parameter information, content support, quick information and hinting of code. IntelliSense is provided by VSC for the following programming languages: JavaScript, CSS , HTML, TypeScript, JSON, Sass, and Fewer. We can use the IntelliSense extensions for other languages. For other languages.

What is your opinion here? Share your thoughts in the comments :)
What are some misconceptions about mobile app development?
Tags: discuss, career, ios, android
Published: 2020-06-20 17:55:29

When people think "mobile app development", what do they get wrong?

Inspired by:

{% link https://dev.to/ben/what-are-some-misconceptions-about-web-development-25m8 %}

And

{% link https://dev.to/waylonwalker/what-are-some-misconceptions-about-data-science-5973 %}

 👇 Pour in your thoughts in the comments below!
StretchShop - the fast & scalable e-business is growing up
Tags: javascript, node, opensource
Published: 2020-06-20 17:50:39

I started to develop **StretchShop** because I wanted to create a solution that would not suffer from issues I was fighting in the past. I wanted something where:

- **Tech-stack is narrow** with crunchy, and well-known and easy to learn technologies.
- It can be **easily scaled** up or down.
- **Data-source is fast**, scalable, and can handle different models.
- **Development is modern**, fast, enjoyable, and not expensive.
- With **open-source** DNA and options for paid help available.

And here we are - after almost two years of developing it as a hobby. StretchShop is an open-source solution, that will introduce its first products soon, becoming a project for professional use.

I am trying to spread the word about it, even wrote two articles :-) 
1. https://www.linkedin.com/pulse/stretchshop-04-growing-up-marcel-z%C3%BAbrik/
2. https://www.linkedin.com/pulse/stretchshop-04-growing-up-marcel-z%25C3%25BAbrik 

There's still a lot of work to do and like to **get feedback** and maybe find somebody who would like it and help to improve it.
🤷‍♀️ What are some misconceptions about data science??
Tags: discuss, career, data, datascience
Published: 2020-06-20 17:10:25

---
title:  🤷‍♀️ What are some misconceptions about data science??
published: true
description: Weigh in with your thoughts.
tags: discuss, career, data, datascience
//cover_image: https://direct_url_to_image.jpg
series: career questions for data folks
---



When people think "data science", what do they get wrong?

{% post ben/what-are-some-misconceptions-about-web-development-25m8 %}

> Inspired by @ben
100DaysOfCode Challenge
Published: 2020-06-20 17:07:11

Hello Coder Community,

I'm publicly committing to the 100DaysOfCode challenge starting from today (20th June 2020)! I will share my progress report daily basis on Twitter(@fabpos). After a few days, I will also share my work on Github (https://github.com/fabpos) and also on my website (https://parvez.info/). Yesterday I challenged @TheMonzurul(Twitter) and he accepted my challenge(https://twitter.com/TheMonzurul/status/1274289495391666176). Anyone from this community, feel free to challenge me.
Wish me good luck. Happy Coding!
Swift: Text to Speech in any Language
Tags: swift, avfoundation, ios
Published: 2020-06-20 16:54:07

---
date: 2020-04-26 15:55
description: How to convert text in any language into speech 
tags: swift,AVFoundation,ios
---

To start with text to speech, the code below is the basic setup. 

```swift
let utterance = AVSpeechUtterance(string: "Some text")
utterance.voice = AVSpeechSynthesisVoice(language: "en") //any language that you prefer
let synth = AVSpeechSynthesizer()
synth.speak(utterance)

```

However, this code requires us to specify the language of the text in the code. To make it more dynamic by allowing it to speak any text by automatically detecting the language, we can use `NSLinguisticTagger.dominantLanguage(for: text)` to detect the language of the text. 

```swift

if let language = NSLinguisticTagger.dominantLanguage(for: text) {
    
    //we now know the language of the text 
    
    let utterance = AVSpeechUtterance(string: text)
    utterance.voice = AVSpeechSynthesisVoice(language: language) //use the detected language

    let synth = AVSpeechSynthesizer()
    synth.speak(utterance)
} else {
    print("Unknown language")
}

```
Additionally, we can also control the speed of the speech as well as the pitch/frequency of the speech: 

```swift
private func readText(_ text:String){
    if let language = NSLinguisticTagger.dominantLanguage(for: text) {
        let utterance = AVSpeechUtterance(string: text)
        utterance.voice = AVSpeechSynthesisVoice(language: language)
        
        //control speed and pitch
        utterance.pitchMultiplier = 1
        utterance.rate = 0.2

        let synth = AVSpeechSynthesizer()
        synth.speak(utterance)
        
    } else {
        print("Unknown language")
    }
}

```
Calculate your construction cost online in Delhi
Tags: architecture
Published: 2020-06-20 16:49:44

Building their own house is a dream of every person. so it is important for anyone to get an idea about how much it may cost. normally it is difficult to calculate the construction cost. but now it is possible.

You can calculate your construction cost through a cost calculator on liveup homes website. it gives you a good idea about how much construction of your house may cost you.
you can calculate your construction cost here https://liveup.in/blogs/home-construction-cost-calculator-in-delhi/

All that is required is for you to fill your plot size and the number of floors you want. and the calculator will give you a good idea of how much it may cost you to build your house.

Here how it works:
1. The construction calculator is formed as per the FAR Norms
2. The price range mentioned is for estimation purposes for each of the construction types
3. Actual price range quotations will vary depending on the area of construction, Construction type, finishing items chosen.
4. Any budget related specification, we can work to customize the project configurations for that stipulated budget range.

Parameters on which Home construction cost depends upon

1. Total Built Up Area: The construction cost calculations for your plot in Delhi will depend on the Covered Area, Half Covered Area, Basement and Open Area. The summation of these areas form the total built up area.
Covered Area: It includes rooms, lift lobby, toilet, guard room,staircase, toilets, underground water tank, rain water harvesting pit, balcony area, sunken courtyard,etc.
Basement: It Includes retaining wall and staircase, lift shaft, lift lobby.
Open Area: It includes area of shaft/courtyard on each floor, area which is open to sky including the terrace, non-load bearing chajja area on each floor, parking area, etc.
All these areas further depend on the FAR Consumption. Some families consume the full FAR of the plot and build the maximum number of floors on their plot, others might just want to build the number of floors in which their family can live comfortably in. Calculate FAR Calculator for your plot in Delhi here.
2. Specifications of Interior and Exterior Finishing: The construction cost calculations of a home also largely depend on the specification which a family chooses for their home according to their taste and requirements. This includes the kind of kitchen the family might opt for (Modular or Normal), the kind of flooring they like (Italian Marble or Ceramic Tiles), the quality of bathroom fittings, whether they like stone cladding on the facade or extensive grillwork, etc.
3. Quality/Brands of Construction Materials Used: Every material used in the construction of a house comes in different qualities and from a variety of brands. After the quality parameters are met, it is usually the decision of the family, as to which brand they would like to go for.

here is a tutorial video for you to know how to use the calculator 
https://youtu.be/K2tVuaRr4Xc