teleren/devto huggingface dataset:
Your Eyes Matter!
Tags: healthcare
Published: 2019-09-23 14:10:09

As a programmer you’re bound to stare at a screen for extended periods of time, which can cause a lot of eye strain.  These are most commonly known as refractive errors and are inevitable as a software engineer, but it's best to limit the occurrences to a few as possible.  Refractive errors are a common cause for blurred and impaired vision due to the irregularity of the human eye’s shape. 
They are the cause of at least 42% of visual impairment, 124 million people are estimated to have uncorrected refractive errors, and 517 million people have trouble seeing up close due to normal aging.  So here are some thing you can do to avoid these errors at all costs.

1) Set up the lighting of your workspace environment.  Eye strain is commonly caused by excessively bright light, both natural and artificial, so it's best to limit all sources of light while working long hours.  Avoid glare, it contributes a lot to excess light.  This can be done in a plethora of ways including positioning screens so that they are to the side of windows, and limit the amount of light coming in with blinds.  Try to avoid fluorescent lighting as they are seen as the harshest type of light to use indoors and use “soft light” like lamps.  Consider using anti-glare screen cover and/or glasses.

2) Position your workspace.  Increase your text size and dim your screen, if you have to squint your eyes to see what's right in front of you, something is wrong.  Adjust your monitor, your eyes should be near the top of your screen to avoid as much glare as possible.  Try out dark mode, many people think dark mode is less stressful on the eyes, though it is not scientifically proven I personally prefer dark modes.  Consider installing blue light filter software, like "Redlight", "f.lux", or "Iris".  Blue light has a shorter wavelength which can cause more strain on your eyes.  There's also a lot that work with your phone.

3) Exercise!  Follow the 20-20-20 rule: Every 20 min look away from the computer for 20 sec at something that is 20 ft away.  Also can try to look at something far for 10-15 sec then something close for 10-15 sec, 10 times a day.  Blink more!  Staring at a screen all day, you blink ⅓ as often, so try to be more conscious of this to prevent dryness and irritation.  Take a break:  Try to stand up and stretch for at least 10 min every hour, it reduces stress and tension as well as muscle fatigue.  Take this time to relax for a second, clear your mind, work is important, but so is your health!
Finding tokens on Ethereum blockchain with Python
Tags: ethereum, blockchain, python, beautifulsoup
Published: 2019-09-23 14:05:57

In the crypto space it seems <a href="https://coinmarketcap.com">there are many coins</a>. You may know that 99% of those digital coins run on distributed networks. Is there a network for each of those coins?

No, that is not the case. Many of the so called coins run on the Ethereum blockchain. This means they are in fact tokens.

So which coins have their own network? So far it's Bitcoin and Ethereum. You can see which tokens run on Ethereum using <a href="https://etherscan.io/tokens">etherscan</a>

Can we grab a list of tokens with Python? Yes, we can. But you need to know the <a href="https://pythonbasics.org">Python basics</a>

## Beautifulsoup

Import a bunch of modules

    #!/usr/bin/python3
    import time
    import os
    import json
    import requests
    from bs4 import BeautifulSoup
    import csv
    import sys
    from time import sleep
    from time import gmtime, strftime
    import re

Then grab the HTML data
    
    #!/usr/bin/python3
    r  = requests.get("https://etherscan.io/tokens")
    data = r.text

Then parse the table and grab the first column. Because there is to much text in the column, we stop grabbing the text after the ) token. We remove the HTML tags with regular expressions.
    
    #!/usr/bin/python3
    soup = BeautifulSoup(data, "html.parser")
    table = soup.find('table', attrs={ "class" : "table"})
    for row in table.find_all('tr'):
        tag = row.findAll('td')
        if len(tag) >= 7:
            token = tag[1]
            token = re.sub('<[^<]+?>', '', str(token))
            if ")" in token:
                token = token[0:token.index(")")+1]
                print(token)

<img src="https://proxy.duckduckgo.com/iu/?u=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F1EuLa4HzCWffO%2Fgiphy.gif&f=1&nofb=1">

This only grabs the coins on page 1, but you can grab them from all pages by wrapping it in a function.

## Git

If you don't want to copy and paste, you can just git clone the repository. Git is a tool used by developers, so if you are a software developer I recommend to install git.

In the terminal you can type:

    git clone https://github.com/codesharedot/ethereum-tokens.git

If you don't want git, you can also grab the code with the link below.


Related links:

* <a href="https://github.com/codesharedot/ethereum-tokens/blob/master/tokens.py">Code on github</a>
* <a href="https://etherscan.io/tokens">Etherscan.io</a>
* <a href="https://pythonbasics.org">Learn Python</a>
Tech Lead Squad 💪 - What's on Tap This Week (9/23) 
Tags: career, leadership
Published: 2019-09-23 14:05:06

---
title: Tech Lead Squad 💪 - What's on Tap This Week (9/23) 
published: true
description: A preview of what I'm talking about this week on my tech lead podcast and email list. This week we're going to cover a grab bag of random, but helpful, topics for your tech leadership.
tags: career, leadership
---

Hey Tech Leads,

Last week we did a [deep dive into the mysterious topic of influence as a tech lead](https://dev.to/michaelrice/tech-lead-squad-what-s-on-tap-this-week-9-16-5fc). Hopefully I dispelled the notion that only _some_ gifted folks have it. It's actually pretty easy to define and an easy skill to develop, if very hard to execute day to day.

This week we're going to do something a bit less focused but hopefully no less impactful for you. I hope, at the end of the week, some of the themes will come together. 

On **Monday**, we're going to explore the idea that everything as a tech lead takes ten times as much effort as you think it is. It's not the code--that's the easy part. It's all the other stuff: the coordination, the follow ups, the miscommunications. But it's OK! This is real, important work.

On **Wednesday**, I'm going to dive into a sensitive topic, for me anyway. Having interviewed for many engineering manager and tech lead roles at very large and very small companies (and everything in between), I have ideas that might run a little contrary to some of the common guidance out there.

On **Friday**, I may flip the script on what I'm going to say on Wednesday so we cover both ends of the spectrum. Despite what I'm planning to say on Wednesday, the famous college basketball coach, John Wooden's favorite quote was this:

> No written word, no spoken plea can teach our youth what they should be, nor all the books on all the shelves, it’s what the teachers are themselves.

How's _that_ for cryptic? It's going to be an interesting week, so join us and it should all come clear!

---
## Join the Tech Lead Squad

You can always follow me here on dev.to - I try to post some tidbits and useful stuff from time to time.

But I think my best work is on Substack, which is a paid list (only $7/month), but I often publish a few free letters each month so make sure you sign up for at least the free issues. 

[Sign up here!](https://michaelrice.substack.com)
When was the last time you made a change to your process?
Tags: agile, discuss, productivity
Published: 2019-09-23 13:53:32

The values behind agile are intended to increase collaboration, and incremental improvement. However, most teams work as if the primary directive is to ship lots of code, rather than find better ways to deliver value to customers.

Tell me about a time that your team improved their process or ran an experiment. Then let’s celebrate together and show others that they can improve there work lives too. 🎉
Rails Meta Tags
Tags: rails, seo
Published: 2019-10-01 00:07:47

---
title: Rails Meta Tags
published: true
tags: rails, seo
canonical_url: https://github.com/kpumuk/meta-tags
---

[Rails Meta Tags](https://github.com/kpumuk/meta-tags)

This is a really easy way to consistently implement and set meta tags in your rails apps (title, meta, noindex, open graph, etc).
The Building an Indie Business Podcast- Hire Me
Tags: podcast, career, design, webdev
Published: 2019-09-23 13:35:16

In this episode I discuss the fact that I'm graduating soon, my need for a job, and my qualifications.

[Episode Page](https://baib-podcast.com)
[Revenue Research](https://revenueresearch.co/)

https://overcast.fm/+RG5iD5QPk
How To Make React VR Apps
Tags: react
Published: 2019-09-23 13:19:10

VR web apps can be built with the React VR apps. WebVR is an experimental API enabling the creation and viewing of VR experiences in your browser. This new technology enables you to grant access to virtual reality regardless of the devices at hand.

The only thing you need to make a React VR app is a headset and a compatible browser. If you are just viewing a web VR application then you don’t need even for a headset. React VR is a great framework to build VR websites or apps on JavaScript. It utilizes the same design as React Native and lets you make virtual reality tours and under interfaces with the provided components.

For more details about this App click here to see:- https://codersera.com/blog/how-to-make-react-vr-apps-2/
Getting past frustration barrier while learning a new technology
Tags: opengl, learning, help
Published: 2019-09-23 13:15:00

---
title: Getting past frustration barrier while learning a new technology
published: true
description: 
tags: opengl, learning, help
---

So I've spent the last week or so working on an assignment for my computer graphics class, and it seems I've hit a mental wall with my learning. Since I've spent most of my spare time learning web technologies, I'm not too comfortable with lower level/math-y stuff. How do ya'll get past that wall when you want to pull your hair out trying to learn something?

Also any tips/resources for OpenGL are greatly appreciated!
Monochromey CSS
Tags: css, monochrome, photo
Published: 2019-09-23 13:11:12

Let's say you have a photo that you want to show somewhere on a web page. The photo is rich in color, but you need to follow a strict color scheme, maybe because of brand guidelines, or just because you like certain colors more than others.

The first temptation might be to open the photo in your favorite image editor software _(mine is [Paint.NET](https://www.getpaint.net/) for the PC)_ and fiddle around with functions until the photo looks the way you want it.

Then, after a while, the color scheme changes for some reason. Maybe the higher-ups emerge from a meeting room after a rebranding workshop, or maybe you just get tired of [mauve](https://dilbert.com/strip/1995-11-17) and decide that [perriwinkle blue](https://www.youtube.com/watch?v=sPCtEMbUgJM) is your new favorite color. You discover that your site has hundreds of photos that all need to be re-edited. To avoid this, you should instead serve the original photo as it is, and let [CSS filters](https://developer.mozilla.org/en-US/docs/Web/CSS/filter) do the trick for you.

If you go for the `grayscale` filter, you get a photo that is all grays. If you want a completely desaturated image, this works fine. But if you are aiming for a monochromatic image of a certain hue, `grayscale` is a dead end. Instead, start by applying the `sepia` filter, which sets the hue of every pixel of the image to somewhere around 60°. Then you can add another filter to add or subtract to the hue.

```css
img {
    filter: sepia() hue-rotate(123deg);
}
```

I made a [Pen to demonstrate the effect](https://codepen.io/atornblad/pen/yLBGwOj). Drag the hue selector to the desired color and copy the generated CSS. If you hold down your finger _(or the mouse button)_ on the image, the filter effect is cancelled to reveal the original image. The image itself is a random [Unsplash](https://unsplash.com/) image with `nature, water` as the query.

{% codepen https://codepen.io/atornblad/pen/yLBGwOj %}

_Cover photo by [David T](https://unsplash.com/@david113) on [Unsplash](https://unsplash.com/photos/V1nvtZ3TQ_8)_
Daily Challenge #74 - Free Pizza
Tags: challenge
Published: 2019-09-23 13:10:58

---
title: Daily Challenge #74 - Free Pizza
published: true
series: Daily Challenge
description: Your manager wants you to implement a pizza rewards system. 
tags: challenge
---

In an attempt to boost sales, the manager of the pizzeria you work at has devised a new pizza rewards system. Although, he isn't exactly sure what he wants the variables to be. The rewards system may change in the future. Your manager wants you to implement a function that, given a dictionary of customers, a minimum number of orders, and a minimum order value, returns a set of the customers who are eligible for a reward.

Customers in the dictionary are represented as:
`{ 'customerName' : [list_of_order_values_as_integers] }`

**Test 1:**
Make at least 5 orders of at least 20$ each and get a free pizza!
<pre>
min_orders = 5
min_price = 20
customers = {
'John Doe' : [22, 30, 11, 17, 15, 52, 27, 12], 
'Jane Doe' : [5, 17, 30, 33, 40, 22, 26, 10, 11, 45]
}
</pre>

**Test 2:**
Make at least 2 orders of at least 50$ each and get a free pizza!
<pre>
min_orders = 2
min_price = 50
customers = {
'Joey Bonzo' : [22, 67, 53, 29],
'Jennifer Bonzo' : [51, 19]
}
</pre>

**Test 3:**
Make at least 3 orders of at least 15$ each and get a free pizza!
<pre>
min_orders = 3
min_price = 15
customers = {
'Natsumi Sakamoto' : [15, 15, 14],
'Gorou Hironaka' : [15, 15, 15],
'Shinju Tanabe' : [120, 240]
}
</pre>

***
_This challenge comes from kingcobra 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!_
Java Client Library - General Use Code Examples
Tags: java, blockchain, tutorial, dlt
Published: 2019-09-23 12:47:20

---
title: Java Client Library - General Use Code Examples
published: true
description: 
tags: #java #blockchain #tutorial #dlt
---

# Introduction
Let's review some code examples on how to handle generic tasks:

-[Initializing a Universe](https://docs.radixdlt.com/radixdlt-java/examples/code-examples/general-use#initializing-a-universe)
-[Initializing the Application API](https://docs.radixdlt.com/radixdlt-java/examples/code-examples/general-use#initializing-the-dapp-api)

>Tip: if you're new to our Java library, we suggest you begin with our Get [Started guide](https://docs.radixdlt.com/radixdlt-java/guides/getting-started).

# Initializing a Universe

A Universe is an instance of a Radix Distributed Ledger which is defined by a genesis atom and a dynamic set of unpermissioned nodes forming a network.

## Available networks

| Network| Description         | 
| ------------- |:-------------:| 
| LOCALHOST_SINGLENODE      | A locally hosted single node connection. |
| A single node Betanet connection.     | A single node Betanet connection.      |

A predefined configuration to bootstrap into the LOCALHOST_SINGLENODE network is available:

>BootstrapConfig config = Bootstrap.LOCALHOST_SINGLENODE;

# Initializing the Application API

The Radix Application API is a client-side API exposing high-level abstractions to make DApp creation easier.

To initialize the API:

>RadixApplicationAPI api = RadixApplicationAPI.create(Bootstrap.BETANET, identity);

To continually sync and pull from the network ledger on your account:

>Disposable d = api.pull();

To stop syncing:

>d.dispose();

# Join The Radix Community

[Telegram](https://t.me/radix_dlt) for general chat
[​Discord](https://discord.gg/7Q7HSZZ) for developers chat
[​Reddit](https://reddit.com/r/radix) for general discussion
[Forum](https://forum.radixdlt.com/) for technical discussion
​[Twitter](https://twitter.com/radixdlt) for announcements
[​Email](https://radixdlt.typeform.com/to/nyKvMV) newsletter for weekly updates
Mail to [hello@radixdlt.com](hello@radixdlt.com) for general enquiries
[Pro Tip] `npm link` explained 🎉
Tags: angular, webdev, javascript
Published: 2019-09-23 12:30:54

---
title: [Pro Tip] `npm link` explained 🎉
published: true
description: 
tags: angular, webdev, javascript
---

It's time for another **Angular Knowledge Pill**!
It takes just a couple of seconds to learn something new 🔥
Like taking your morning vitamins 😃

If you are working on **a library that you want to import** to your application you don't have to publish it to any npm repository! You can link it locally. Imagine you develop an Angular library or maybe you have your CSS theme in a separate npm package that you want to import to your application locally. You can use **npm link** command like below. 😎

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

> **npm link** creates a symbolic link (symlink) from your `<global node_modules>` directory to the local library’s directory.

> **npm link \<library-name\>** creates a symbolic link from project's local node modules directory `./node_modules/<library_name>` to `<global_node_modules>/<library_name>`.

To locate your `<global node_modules>` directory, type `npm root -g` in the command line.

Now, you can import your library directly in your application like below. But, there is a catch! 😱

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/106an801tpnq4fgaphfb.png)

The catch is that you need one more change in your `angular.json` file! You need to add a property `preserveSymlinks` as presented below. And that's it! You can run your application with the local dependency! 🔥

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

---

If you would like to receive this kind of knowledge pills directly into your mailbox, subscribe at [angular-academy.com/blog/](https://angular-academy.com/blog). I will be sending them regularly! Remember, it just takes 10 seconds to learn something new! 😃
What are Kubernetes minions?
Tags: kubernetes, beginners
Published: 2019-09-23 12:28:16

---
title: What are Kubernetes minions? 
published: true
description: Part of bitesize Kubernetes series for busy people. No more than 2 min read. Read it while waiting for the coffee to brew. 
tags: Kubernetes, beginners
cover_image: https://images.unsplash.com/photo-1555786766-e1e69380c4bc?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=2249&q=80
series: Kubernetes in Bitesize
---

<em> Ok. let's keep it short! <em> 
 
Kubernetes cluster is a collection of machines, each machine has a dedicated role. They can be master or worker. The master is our API point of contact and holds the information about what's going on in the cluster in terms of apps, pods, developments, etc. The workers are in charge of running the app in the pod, in the container. 

The machines that acts as workers, used to be called `minions`. 
 Today they are called nodes. 

<em> That's it! <em>



![](https://media.giphy.com/media/1yscVZ8RHQOGs/giphy.gif)


For more bitesize, you are welcome to follow me **here** and on [twitter](https://twitter.com/AdiPolak).
Basics of Async and Await
Tags: beginners, javascript
Published: 2019-09-23 12:27:46

Good day, today I will share my notes about Async/Await.

Async/await functions is new feature that came with ES2017 (ES8), and it allow us to write synchronous-looking code that performs asynchronous tasks.
Using Async/Await can make your code easier to read and understand and allows you to use Promises in a Sync way without blocking the main thread. 

**A bit of Syntax**
Specify the word **async** before a functions makes this function return a Promise.
```javascript
async function() {
}
```

**Await** works only inside an Async function and it returns the Promise's result after it is solved. As an example, Await tells JS "wait" until the Promise is solved before going on with the rest of the code.
```javascript
const example = async function() {
const promise = new Promise(function(resolve, reject) {
setTimeout(resolve, 999, 1)
})
const response = await promise
console.log(response)

}
```

**Handling error**
There is a little delay between the Promise being reject and the error being fired, so it is a good strategy to use "try/catch" to deal with error, where the catch will, guess what? Yes, it will Catch any error inside the try block. 


This is just my short Notes on the topic as usual, so all extra comments are super welcome as always!

Happy Monday and Thanks for reading,
XOXO
Help me solve this CORS Policy Issue - React App
Tags: javascript, react
Published: 2019-09-23 12:21:44

I'm trying to delete a user by id from server, accessing the api with axios http client on react app and receiving this message in developer/ console ->

>Access to XMLHttpRequest at 'host:8082/user/delete/6' from origin 'localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Here's my code -

import React from "react"
import axios from "axios"

```
export default class PersonList extends React.Component {
  state = {
    id: "",
  }

  handleChange = event => {
    this.setState({ id: event.target.value })
  }

  handleSubmit = event => {
    event.preventDefault()

    axios
      .delete(`http://host:8082/user/delete/${this.state.id}`)
      .then(res => {
        console.log(res)
        console.log(res.data)
      })
  }

  render() {
    return (
      <div>
        <form onSubmit={this.handleSubmit} crossOrigin="anonymous">
          <label>
            User ID:
            <input type="text" name="id" onChange={this.handleChange} />
          </label>
          <button type="submit">Delete</button>
        </form>
      </div>
    )
  }
}
```

Please help me to resolve this cors issue.
Base API: Postman Collection
Tags: postman, api, saas
Published: 2019-09-23 11:52:49

I created a Postman Collection for [Base API](https://www.base-api.io/) which you can checkout here: https://documenter.getpostman.com/view/8898992/SVmzsviP

It contains all of the endpoints available and should be good as an example.

I hope this will make it easier for some people to get started :)

Also you can find the client libraries on Github: https://github.com/base-api-io

---------

As always let me know if you have any question or ideas, and stay tuned for more content about Base API in the near future!📻
Edit Order in Magento 2 - Order Manager Extension by FME
Published: 2019-09-23 11:14:29

---published:true---
<h1>Edit Order in Magento 2 - Order MAnager Extension by FME</h1>
  
<p>Edit Customer Order without affecting the order statuses.  The extension empowers you to edit Payment, Shipment, and incorrect Billing details.  The extension also allows you to edit the following options.
Order details e.g. date and status</p>
<ul>
<li>User account information</li>
<li>Billing address</li>
<li>Shipping address</li>
<li>Payment and shipping method</li>
<li>Items ordered</li>
</ul>

<h2>Powerful Key Features</h2>

Edit any detail of the Customers Orders
Modify customer, shipping, payment data
Modify ordered items and their quantities
Return order items to stock upon removal
Delete previous invoices and/or create new ones
Recalculate shipping charges after order edits

<b> Read the Complete Article Here - https://www.fmeextensions.com/magento-2-edit-order.html </b>

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

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

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

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