teleren/devto huggingface dataset:
Python’s Print() Does What!?!?
Tags: beginners, tutorial, python
Published: 2019-12-15 05:04:49

<body>
<h1> The Basics </h1>

Note: The following code is valid only for Python 3.0 and up.

If you’ve gone through even one tutorial of any programming language, you know the first thing you do is print “Hello World” to the console. Python’s way of doing that is, of course, print(). And it’s as simple as typing the line
```python
print("Hello Word")
# Hello World
```

Tutorial over, right? Well, no. Turns out print() has some hidden use cases. 

<h1> Print()+ </h1>

The print function takes multiple objects so you can do some goofy things like:```python
print("my", "name", "is", "Austin")
# my name is Austin
``` 
This returns <i>my name is Austin</i> because print’s default separator is a space(‘ ‘). This can easily be changed though by adding the keyword argument <b>sep</b> after the things to print. In the example of: 
```python
print("my", "name", "is", "Austin", sep="")
# mynameisAustin
```
the output <i>mynameisAustin</i> isn't pretty, but it <i>is</i> functionality that could come in handy.

There is also the option of using the keyword argument <b>end</b>, which defaults to a line break(“\n”). 
```python
print("my", "name", "is", "Austin", sep=",", end="!") 
# returns: my,name,is,Austin!
# you can actually use any valid string in the keyword argument end
```

Now we’re done, right? Nope. There’s more goodness packed into this function. 

<h1>Print()++</h1>

What if you wanted a log of everything you printed? Well, print() already has that functionality. All you need to do is use the keyword argument <b>file</b>. Let’s say I wanted a .txt document as the output of the last print statement:

```python
with open("text.txt", "w") as text:
    print("my", "name", "is", "Austin", sep=",", end="!", file=text)
# this take the output as before (my,name,is,Austin!) and outputs it
# into text.txt
```

(More to come on the open() function, it's got some neat things to explore as well)

This is powerful alternative to printing everything to the console and can help log potential errors while debugging.

Like many things in programming, print() is something we often take for granted without really looking at it too deeply. Now that you’ve seen what print can actually do, I hope that it will help you in your development.

Thanks for reading!
</body>
Giving Thanks for Diversity in Tech: Chloe Condon
Published: 2020-01-07 00:28:14

---
title: Giving Thanks for Diversity in Tech: Chloe Condon
published: true
date: 2019-12-16 14:48:40 UTC
tags: 
canonical_url: https://www.thisdot.co/giving-thanks-for-diversity-in-tech-chloe-condon
---

![KFD8O6AZ](//images.ctfassets.net/zojzzdop0fzx/qavnBH8wLffmbtbcxW4TQ/7db493c6342de76f4056f7ddb24408bd/KFD8O6AZ.jpg_small)

Chloe Condon is a Cloud Advocate at Microsoft where she helps developers learn all about Microsoft Azure. Lately, Chloe has been focused on developing fun and practical examples of ways to use Azure Functions and Cognitive Services, which reflects her passion for showing folks ways to use technology in ways they may not have thought of before! 

She also brings her passion and creativity to her role as the content director for the San Francisco Microsoft Reactor, where she helps host and organize events!  As a bootcamp grad with a non-traditional background, she loves being able to host events with bootcamp students/grads as a way of helping to alleviate the stress and isolation that many experience when trying to bridge the gap between their graduation and their first developer position.

Chloe is an extremely active speaker, currently delivering talks about her [fake boyfriend app](http://aka.ms/chloesdiybf) that uses Azure Functions and the Twilio API, as well as her keynote titled "The ROI of LOLs" which talks about the importance of humor and entertainment in tech.

Chloe not only regularly attends and participates in developer events- she also founded her own meetup called “Sentry Scouts”- an award-winning, high energy meetup based out of San Francisco, which focuses on open source technologies in a fun and uplifting way. 

“I want tech to be a welcome place for everyone,” Chloe says, “regardless of gender identity, race, background, and experience. Often times, I find myself being the only woman in a meeting/conference room/tech event/etc. and it's truly baffling to me.” She also added this advice to other women who want to enter the tech industry: “Be you. Don't change who you are to fit a mold. We need diverse perspectives, and we need you here!”

Chloe credits her strength as a speaker and larger-than-life personality to her past as a musical theater performer. She loves to bring in elements of humor and theatricality to her demos, tutorials, and presentations!  In fact, she hasn’t completely left her theater days behind- you can catch her every year at RuPaul’s Annual DragCon, dressed in elaborate costumes, “Last year I attended with a bunch a lady devs and my friend April and I dressed as Dionne and Cher from Clueless!”

You can catch Chloe next year at Refactr, and NG Con, which will have a musical theme this year, much to her delight!  In the meantime, you can follow Chloe on her Twitter page [@ChloeCondon](https://twitter.com/ChloeCondon).
Daily Challenge #138 - Do I get a Bonus?
Tags: challenge
Published: 2019-12-16 14:38:31

---
title: Daily Challenge #138 - Do I get a Bonus?
published: true
series: Daily Challenge
description: Build a function that takes in two arguments (salary, bonus). Salary will be an integer, and bonus a boolean.
tags: challenge
---

It's bonus time in the big city! The fatcats are rubbing their paws in anticipation... but who is going to make the most money?

Build a function that takes in two arguments (salary, bonus). Salary will be an integer, and bonus a boolean.

If bonus is true, the salary should be multiplied by 10. If bonus is false, the fatcat did not make enough money and must receive only his stated salary.

Return the total figure the individual will receive as a string prefixed with "£" (= `\u00A3`, JS, Go, and Java), "$" (C#, C++, Ruby, Clojure, Elixir, PHP and Python, Haskell, Lua) or "¥" (Rust).

***
_This challenge comes from A.Partridge on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Will I still be called a developer?
Tags: discuss, help
Published: 2019-12-16 14:30:03

---
title: Will I still be called a developer?
published: true
description: Imposter Syndrome relapse
tags: discuss, help
---

There are many people who write code. Some (many) of them are from non computer science background. Some are self-taught.

Some of them may understand Data Structures and Algorithms, but cannot write the implementation. They would have successfully delivered projects by using modern libraries/frame-works.

By doing so , they would have got good grasp over "System Design". Yet they would fail to implement a "merge-sort".

Will they still be called a developer? Are they not as good as developers from FANG companies ? Are they left behind?

F - Facebook , A - Amazon , N - Netflix, G - Google

Looking forward for opinions.

Also I am part of the "They" .
Kubernetes Ingress Explained For Beginners
Tags: devops, kubernetesingress, kubernetes
Published: 2019-12-16 14:28:12

Kubernetes is the trending technology in today's software space and knowing how it works is one of the most demanding skills for DevOps professionals around the globe.

A [Kubernetes Certification](https://kodekloud.com/p/kubernetes-certification-course) can take your career to a whole new level. Learn, practice, and get certified on Kubernetes with hands-on labs right in your browser.

Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. It was originally designed by Google and is now maintained by the Cloud Native Computing Foundation.

Simplify Complex Technology

Kubernetes is at the cutting-edge of application deployment. To elevate your DevOps career, learn how to effectively deploy applications on Kubernetes.

Here is your instructor, Mumshad Mannambeth explaining Kubernetes Ingress.  

{% youtube VicH6KojwCI %}
How to manually create a workspace in VSCode
Tags: javascript, vscode, code
Published: 2019-12-16 14:26:47

---
title: How to manually create a workspace in VSCode
published: true
description: 
tags: JavaScript, VSCode, Code 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9lsexkgdom4w93rwup7u.png
canonical_url: https://fobabs.tech/how-to-manually-create-a-workspace-in-vscode
---

The usual convention of creating a workspace in VScode is by adding the working folders you desire in the workspace and saving it with any name of your choice.

For example, we have an existing workspace named *“coding.code-workspace”* with three working folders: fobabs-app, JavaScript and FOSS as shown below:

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

But what if you want to do it manually, then you’ll have to create a file named **example.code-workspace** and add the following code into it.

> Take note of the “.code-workspace” extension.

```json
{
  "folders": [
    {
      "path": "JavaScript/fobabs/fobabs-app"
    },
    {
      "path": "JavaScript"
    },
    {
      "path": "JavaScript/FOSS"
    }
  ]
}
```

Looking at the code, you can see they are in JSON format which makes it cool 😎 if you are already familiar with JavaScript Objects. The above code is for folders in the same directory and sub-directories. Let’s say you want to add a folder from a different directory, all you have to do is to do add the file path as shown below depending on your OS installed:

```json
{
  "folders": [
    {
      "path": "JavaScript/fobabs/fobabs-app"
    },
    {
      "path": "JavaScript"
    },
    {
      "path": "JavaScript/FOSS"
    },
    {
      "path": "/home/fobabs/Desktop/facebook-clone"
    }
  ]
}
```

Now, you’re just a few steps to becoming a VSCode Ninja 🦹‍♀️.
How to filter the data with a common search bar at the top (Angular 8)
Tags: javascript, angular, beginners, tutorial
Published: 2019-12-16 14:09:11

---
title: How to filter the data with a common search bar at the top (Angular 8)
published: true
description: Implementation of common search bar in angular
cover_image: https://silvercloudinc.com/wp-content/uploads/2019/03/search-bar-608x240.png
tags: javascript, angular,  Beginners,tutorial
series: Angular Journey
---

Hey there,

![Alt text of image](https://media.giphy.com/media/YOjP742CyBbg0zKCbl/giphy.gif)

Lets say we have common search bar at the top of our application . We need to filter the available data on the main component according to the keywords typed. 

We can make use of
<ul>
<li> Array filter method</li> 
<li> Component interaction (Child to Parent)</li>
</ul>
Let's see our Header component (header.html)

```html
<input matInput type="text"  [(ngModel)]="searchword"(input)="searchThis()">
```
We use <ul><li>[ngModel](https://angular.io/api/forms/NgModel) for two way data binding</li>
<li>[(input)] (https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/input_event) logs the value whenever you change the value of the <input> element.</li></ul>

Header Component (header.ts)
```typescript

import { Component,Input, OnInit, Output,EventEmitter } from '@angular/core';
@Output() searchcriteria = new EventEmitter<String>();
searchThis() {
    this.searchcriteria.emit(this.searchword)
}
```

We create a new event emitter in order to emit the value from the header component to body component. <code>searchThis</code> function will trigger the event for every keypress in the search input field.

Let's see our parent component or body component

Parent component (html)

```html
<app-header (searchcriteria)="searchThis($event)"></app-header>
```
We use event binding to pass the data from header to parent .

Parent Component (ts)

```typescript
  newArray
  searchThis(data) {
    this.content = this.newArray
    console.log(data)
    if (data) {
      this.content = this.content.filter(function (ele, i, array) {
        let arrayelement = ele.name.toLowerCase()
        return arrayelement.includes(data)
      })
    }
    else {
      console.log(this.content)
    }
    console.log(this.content)
  }
}
```
<code>newArray</code> is the array contains the data for the component. We assign the data to another array <code>content</code> each time function calls and filter from that array. The filter function changes the existing original array.

The filtered array will be used when we call the function if we change the original array. We need fresh array with full data each time when the function calls. 

Let me know how you can improve this.

Until next time,

![alt text](https://media.giphy.com/media/113PoJxEaRxKbm/giphy.gif)
I started a new series of curated content articles and would love to get your feedback!
Tags: discuss
Published: 2019-12-16 14:05:03



Here is the first issue

https://altalogy.com/blog/alta-curated-1/


Each week, I curate 6 items - 2 podcasts, 2 readings and 2 videos.

I believe as long as you poke around technology, entrepreneurship, software, or philosophy, chances are the content will be closely aligned with your preferences too. 

This is not about the latest trends or news. I know that sharing only timeless wisdom is a hard-to-achieve virtue, but I’ll do my best to find the best possible middle ground. 

I'd love to get your feedback!
Medical Image Segmentation: UNet++
Tags: machinelearning, deeplearning, imageprocessing, healthcare
Published: 2019-12-16 14:03:30

Nested U-Net architecture is pretty cool, and it has better performance compared to U-Net.

[![](https://jinglescode.github.io/assets/img/posts/unet-nested-03.png)](https://jinglescode.github.io/datascience/2019/12/02/biomedical-image-segmentation-u-net-nested/)

* UNet++ aims to improve segmentation accuracy, with a series of nested, dense skip pathways.
* Redesigned skip pathways made optimisation easier with the semantically similar feature maps.
* Dense skip connections improve segmentation accuracy and improve gradient flow.
* Deep supervision allows for model complexity tuning to balance between speed and performance optimisation.

[Read about it!](https://jinglescode.github.io/datascience/2019/12/02/biomedical-image-segmentation-u-net-nested/)
How to load dynamical environment variables with Nuxt.js
Tags: node, webdev, vue, todayilearned
Published: 2019-12-16 13:55:57

# The problem

Often we have some settings to store, like the url of the API, credentials, some other data. Often it is provided to an application in a form of environment variables.
A nice workflow might be like so:
commit->test->build docker image and push it to registry
And when running, you can configure prebuilt image using environment variables without rebuilding.

Seems perfect,right? You may have thought that using normal `process.env.VARIABLE_NAME` is enough. It is not.
During build time, webpack replaces `process.env.VARIABLE_NAME` with actual variable from **build** environment, making images not reproducible and not configurable.

[Nuxt docs](https://nuxtjs.org/api/configuration-env/) on environment variables seem to provide a nice solution for that problem, but actually it works absolutely the same way.
So how do we do it properly?

# Solution

If we have an SSR app, we have two stages: build and launch stage.
At launch stage we should load our environment variables.

This is were vuex comes in handy. 
We can use [nuxtServerInit](https://nuxtjs.org/guide/vuex-store#the-nuxtserverinit-action), which will be run on server bootstrap(it also runs on client, but we need server side variable only).

# Now, to the code!

## **Edit:** Nuxt.js 2.13+

In Nuxt.js 2.13+ you can use new [Runtime config property](https://nuxtjs.org/guide/runtime-config/). After configuring it in nuxt.config.js, you can access it anywhere via `this.$config`.

But there are still some quirks! If you want to use environment variables in vuex getters, then `this.$config` won't work.

So we still need to do the same process as described below, but replace `process.env.NAME` with `this.$config.NAME`!

## Previous example (nuxt.js < 2.13)

{% gist https://gist.github.com/MrNaif2018/46a965929a9bcd0b150aaaa6703ccaa3 %}

Put this code in `store/index.js` file. Nuxt will activate vuex for you.
So, we define store state with the only variable `env`, being empty object by default, this way we store all needed variables in one object.

Our mutation is just changing `env` state.

And `nuxtServerInit` is doing all the job.
We check if we run from server, and if so, we simply run our mutation, loading environment variables using same process.env. It doesn't get replaced by webpack in that case.
We can also set default values using `|| 'default value'`.
And then, in any place in your code, you can access environment variable using `$store.state.env.VARIABLE`.

# Conclusion

This is a pretty simple and working way to load environment variables dynamically, encouraging proper CI/CD workflow with minimal maintenance issues.

I think that this example should be put in nuxt docs. Let's create a pull request? (:

This example, as the previous post, came from my work on my opensource project bitcart.
Contributions welcome!
{% github MrNaif2018/bitcart-frontend %}
(For example, any help with improving checkout design is highly appreciated)

I hope you found my article interesting, have a good day!
VS Code November 2019 Release Highlights Video
Tags: discuss, vscode, javascript, webdev
Published: 2019-12-16 13:54:48

---
title: VS Code November 2019 Release Highlights Video
published: true
description: Highlights of some of the latest features found in the November 2019 release of Visual Studio Code.
tags: discuss,vscode,javascript,webdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/o7mbmwzr6e0ryxzum3ja.png
series: vscode-release
---

## November 2019 VS Code Release
You can read through the [release notes](https://code.visualstudio.com/updates/v1_41?WT.mc_id=devto-blog-brcl) to find out more about them or watch this short video to see some of the highlights from it.

{% youtube 6lglFH5CwtA %}

### Features Highlighted

- [Optional Chaining Support](https://code.visualstudio.com/updates/v1_41?WT.mc_id=devto-blog-brcl#_optional-chaining-support-for-javascript-and-typescript)
- [Compact Folders in Explorer](https://code.visualstudio.com/updates/v1_41?WT.mc_id=devto-blog-brcl#_compact-folders-in-explorer)
- [Update Search Results on Type](https://code.visualstudio.com/updates/v1_41?WT.mc_id=devto-blog-brcl#_update-search-results-as-you-type)
- [HTML Mirror Cursor](https://code.visualstudio.com/updates/v1_41?WT.mc_id=devto-blog-brcl#_html-mirror-cursor)
- [Problems Panel - More Filters](https://code.visualstudio.com/updates/v1_41?WT.mc_id=devto-blog-brcl#_problems-panel)
- And more...🙂


What's your favorite feature or improvement in this month's release? Share it below 👇
Learn Temenos APIs
Tags: banking, api, testing, enterprise
Published: 2019-12-16 13:54:26

Have you ever wanted to learn how to interact with a core banking system to build your own applications, products or services that deliver financial services? Maybe you want to build a connector for your company, a simple web app for your university or mobile app to deliver value to end-users? 

Temenos, the worlds #1 Banking Software company now offers free API Keys to Developers looking to interact with its online banking sandbox. 

To get an API Key, you need to [register](https://apidocs.temenos.com/) at the Temenos Developer Portal. As soon as you have your API Key, you can start interacting with the cloud-based core banking Sandbox. You will be the first to learn of new events, product updates and much much more. 

During my time at Temenos, I've worked on the (ISV) MarketPlace, on a SaaS Platform Project and the Developer Community and the one thing I've learnt is that new members are always welcome. I look forward to seeing you there!
npm dashboard - check stats on all of your npm packages at a glance
Tags: showdev, javascript, react
Published: 2019-12-16 13:51:00

Like many others out there, I have several npm packages published. Periodically I like to check how they are doing with downloads, stars, etc.

I wanted to have a central place where I could just look at a glance at all my projects in one dashboard. I couldn't find anything like that so I created npm dashboard.

I'd love to hear feedback, what other information people think would be useful.

Please check it out at [https://npm-dashboard.netlify.com](https://npm-dashboard.netlify.com).
Changing Tab Details
Tags: webdev, javascript, html, code
Published: 2019-12-16 13:45:34

---
title: Changing Tab Details
published: true
description: I stumbled onto an interesting pattern when checking out Mellow Mushroom. Once I saw the page title change when I switched tabs, I had to figure out how it was done.
tags: WebDev, JavaScript, HTML, code
series: JavaScript Details
cover_image: https://thepracticaldev.s3.amazonaws.com/i/5c31cwbnsfktzmhgxq0l.png
---

I stumbled onto an interesting pattern when checking out the Mellow Mushroom web page. It didn't hit me right away ... I left the page and had to come back and see if I really had observed the page title change when I switched tabs! Then, I had to figure out how it was done.

A quick search came up with the following question on Stack Overflow ... PERFECT!

{% stackoverflow 21808160 %}

In the answers ...

```javascript
window.onblur = function () {
  document.title = 'you left?';
}
window.onfocus = function () {
  document.title = 'WELCOME';
}
```

Here's a working copy of the code above ...

{% github bob-fornal/title-on-blur %}
Download website files entirely using wget
Tags: linux, wget, scraping
Published: 2019-12-16 13:25:54

---
title: Download website files entirely using wget
published: true
description: 
tags: Linux,wget,scraping
---

If you want to create a local mirror site, you can download a set of websites by wget.

## Usage

```
wget -P /path/to/download -E -k -m -nH -np -p -c https://example.com
```

| Option | Overview |
|--------|--------|
| -P | Set save directory path. |
| -E | This option will cause the suitable suffix to be appended to the local filename. |
| -k | After the download is complete, convert the links in the document to make them suitable for local viewing. |
| -m | Turn on options suitable for mirroring. |
| -nH | Disable generation of host-prefixed directories. |
| -np | Do not ever ascend to the parent directory when retrieving recursively. |
| -p | This option causes Wget to download all the files that are necessary to properly display a given HTML page. |
| -c | Continue getting a partially-downloaded file. |

## With basic authentication

```
wget -P /path/to/download -E -k -m -nH -np -p -c --http-user=username --http-password=password https://example.com
```

| Option | Overview |
|--------|--------|
| --http-user | Set username. |
| --http-password | Set password. |
Personalized UI design claim mass success to 5X user experience! See examples how personalized design works in 2020..
Tags: ux, uiweekly, design, startup
Published: 2019-12-16 13:08:12

Every designer often making a lot of guessing works about our user, when designing user interface for web or mobile application. Without confidence, we can only design for the ideal user. This hopeless design undoubtedly leaves some loopholes in the experience for the people that don’t fit our user.

So, why should we build personalized interfaces? Because every design project is different because every project has a unique idea & values that should care about your users.

https://medium.com/@goprotoz/personalized-ui-design-matters-in-2020-dont-miss-out-the-quick-outstanding-success-b98263ad729a