teleren/devto huggingface dataset:
Choosing Enjoyment
Published: 2020-03-05 17:27:02

I'm one of the three main organizers of ng-conf. I've been doing this event for 7 years now, and it keeps getting more and more intense. The week of ng-conf is over 100 hours of work for me, which is crazy. But it's also one of the best weeks of the year for me: learning, friends, fun, good food. Conferences are one of the most enjoyable activities I do. Sure, it's busy and stressful, but it's the culmination of over a year's worth of work and a very fulfilling week.

Yet a couple of years ago, in the middle of the conference, I found myself grumpy, short-tempered, and not enjoying myself at all. This went on for several hours. My friends could tell something was off, frequently asking how I was doing, and always my response was that I was stressed and overworked…

Finally, I had a few minutes to myself and I just stopped, and asked myself, "why aren't you enjoying this?" and honestly, I had no real reason. Sure things were busy and there were some minor problems, but overall, things were fine. I was simply choosing to be miserable.

And so I decided to choose happiness. I told myself, I'm going to enjoy this time. I'm going to enjoy this work. It's not perfect, but it's good work to be doing. At the same time, I went and spent a few minutes with a close friend who was a safe person to be open and vulnerable with, and talked to them about what I was going through and what my thoughts were.

And from that time forward, that decision allowed me to begin enjoying the day and the rest of the conference.

Life can get hard. REALLY hard. But sometimes, without thinking, we can thoughtlessly start choosing to be miserable. In those cases, just being mindful, finding connection, practicing vulnerability can snap us out of where we are and let us choose how we want to feel.

Are you in that place? Are you choosing misery? Maybe some mindfulness and connection are what you need right now. We can't control the things that happen around us but we can choose how we react and think when they happen.

Happy Coding!

Signup for my newsletter [here](https://thinkster.io/?previewmodal=signup?utm_source=devto&utm_medium=blog&utm_term=enjoyment&utm_content=&utm_campaign=blog).

Visit Us: [thinkster.io](https://thinkster.io?utm_source=devto&utm_medium=blog&utm_term=enjoyment&utm_content=&utm_campaign=blog) | Facebook: @gothinkster | Twitter: @GoThinkster
How to remove files already added to git after you update .gitignore
Published: 2020-03-05 17:26:58

How many times you commited files on git in an entry phase of a project and only after a while you noticed that the files are useless? (For me: at least 3–4 times every project — damn android builds files on react-native)

Even if you update your .gitignore, the files will continue to be tracked and inside your repository.



### So how you can remove them? Here 3 simple steps to do it:

### 1. Be sure to have committed all changes

You shouldn’t have any uncommitted files in your working directory. To be sure about that, use

```
git status
```

If it returns

```
nothing to commit, working tree clean
```

You are ready to go! 🚀 If not, add and commit your files or stash them.

### Step 2: Remove everything from the repository

To clear your repo, use:

```
git rm -r --cached .
```

* [rm](https://git-scm.com/docs/git-rm) is the remove command of git
* \-r means recursive, so it will remove also inside folders
* –cached meas that will only remove files from the git index, not from your current directory; your files are safe ✨
* `.` indicates to remove all files. If you want to untrack only one file, add the path instead of`.` , eg: git rm — cached .env

### Step 3: Add everything again

That’s the easy part:

```
git add .
```

### Step 4: Commit and party

Now commit your changes

```
git commit -m "removed useless files"
```

And now your repository follows your .gitignore rules! It’s time to party!
🚀 Monorepo Workspace, a vs-code extension to manage monorepos with multi-root workspaces. Supports Lerna, Yarn, Pnpm and Rush
Tags: javascript, webdev, showdev, vscode
Published: 2020-03-05 17:25:42

I just released [Monorepo Workspace](https://marketplace.visualstudio.com/items?itemName=folke.vscode-monorepo-workspace), a simple extension to work with monorepos in **VS Code**. Supported repositories: Lerna, Yarn, Pnpm, Rushjs and recursive package directories.

## Features

All **Monorepo Workspace** functionality can be found in the command palette. Available commands:

![Commands](https://raw.githubusercontent.com/folke/vscode-monorepo-workspace/master/images/commands.png)

Selecting a package:
![Commands](https://raw.githubusercontent.com/folke/vscode-monorepo-workspace/master/images/list.png)

* `Monorepo: Open Package (Current Window)`: open a package from your repository in the current window
* `Monorepo: Open Package (New Window)`: open a package from your repository in a new window
* `Monorepo: Open Package (Workspace Folder)`: add a package from your repository as a workspace folder

You can also create workspace folders for all your repository packages with `Monorepo: Sync Workspace Folders`:
![Commands](https://raw.githubusercontent.com/folke/vscode-monorepo-workspace/master/images/explorer.png)
Send an email with python (simple, complexe, more complexe)
Tags: tutorial, python
Published: 2020-03-05 17:21:16

Simple : 

```
import smtplib

server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login("YOUR EMAIL ADDRESS", "YOUR PASSWORD")

msg = "YOUR MESSAGE!"
server.sendmail("YOUR EMAIL ADDRESS", "THE EMAIL ADDRESS TO SEND TO", msg)
server.quit()
```

Complexe(professionel) :

```
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText


fromaddr = "YOUR ADDRESS" 
toaddr = "ADDRESS YOU WANT TO SEND TO"
msg = MIMEMultipart()
msg['From'] = fromaddr
msg['To'] = toaddr
msg['Subject'] = "SUBJECT OF THE MAIL"

body = "YOUR MESSAGE HERE"
msg.attach(MIMEText(body, 'plain'))

server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login(fromaddr, "YOUR PASSWORD")
text = msg.as_string()
server.sendmail(fromaddr, toaddr, text)
server.quit()
```

More complexe (convert files to Base64 before sending it. to send text, pdfs, pictures, audios or videos) :

```
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from email.MIMEBase import MIMEBase
from email import encoders

fromaddr = "YOUR EMAIL"
toaddr = "EMAIL ADDRESS YOU SEND TO"

msg = MIMEMultipart()

msg['From'] = fromaddr
msg['To'] = toaddr
msg['Subject'] = "SUBJECT OF THE EMAIL"

body = "TEXT YOU WANT TO SEND"

msg.attach(MIMEText(body, 'plain'))

filename = "NAME OF THE FILE WITH ITS EXTENSION"
attachment = open("PATH OF THE FILE", "rb")

part = MIMEBase('application', 'octet-stream')
part.set_payload((attachment).read())
encoders.encode_base64(part)
part.add_header('Content-Disposition', "attachment; filename= %s" % filename)

msg.attach(part)

server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login(fromaddr, "YOUR PASSWORD")
text = msg.as_string()
server.sendmail(fromaddr, toaddr, text)
server.quit()
```
Resources to learn Golang by doing?
Tags: help, go
Published: 2020-03-05 17:10:23

Hello! I'm posting this because I'm looking for a resource to learn go by doing a guided project. Just like you can do with the [The Ruby on Rails tutorial](https://www.railstutorial.org/) by Michael Hartl.

Do you know any?

I found [this one](https://astaxie.gitbooks.io/build-web-application-with-golang/content/en/index.html?ref=hackr.io), but last time it was updated was 2 years ago...
Any other resources are also welcome. 👀✨
getting hacked 5 times
Tags: go, github
Published: 2020-03-05 17:09:48

Most spend months protecting their software, i didn't and now i regret it.

I started with Gogs, a self hosted github service written in Golang. And forgot to put protection in. 

We have had 4 DDOS attacks along with an XSS, then glitch.com suspended my project for violation of the ToS. 

My message is clear- don't release unsafe software until you know it is defended by an antivirus or something like that. You may regret not doing so
Looking for CMS backend for your App? WordPress may not be ready yet.
Published: 2020-03-05 17:04:24

A few days ago a beginning a personal project, an LGBT app. After an evaluating the work load, using a Headless CMS could save me a lot of time, with a high quality and security for those part that need attention as developer but not for a product. Those part I think are:
- Authentication
- Users Management
- Some Social Stuff
- A Back-office to check data

After reading about WordPress with the new REST API, I throw, "maybe is I use BuddyPress with WordPress and REST API, I could save days of works"...

![I'm a Genius](https://media.giphy.com/media/WUsOgqfcpOBRlJPrUM/giphy.gif)

Well... that only for a few seconds.

WordPress has a big problem with REST API, Authentication Sucks, is not out of the box, you need to do some configurations, there not difficult at all but still a few thing broken a lot. There is no Registration API so you need to added too. At the end is more work on a simple begin stage.

But is not a WordPress problem, most of the Headless CMS I checked, are more focus on Publishing than offer some like BaaS replacement.

Did you know any CMS as Baas? Comment below!
Shell command options you didn't know you needed #2
Tags: shell, linux, unix
Published: 2020-03-05 17:00:41

(another in an occasional series)

`grep -m <matches>`

One of the many handy options to `grep` (there'll be quite a few in this series), the `-m` option controls how many matches are displayed for each file grep scans. 

For (hypothetical) example:

`grep -m 1 '^sub' *.pm # find the first sub definition in each file`
I'm back!
Tags: career, scala
Published: 2020-03-05 16:59:17

Sorry I've been silent for so long. I recently accepted a new job at [Workday](https://www.google.com/search?q=wday) as a Software Development Engineer III! This is an exciting new role for me and I'll be working with tech like [#Akka](https://dev.to/t/akka), [#Kafka](https://dev.to/t/kafka), and [#K8s](https://dev.to/t/kubernetes), all using [#Scala](https://dev.to/t/scala). I took a few weeks off writing for DEV in order to study for my new position!

Workday builds Enterprise Resource Planning (ERP) software (payroll, employee scheduling, etc.), and has been moving from a monolith to microservices over the past few years. Accordingly, I have a lot to learn about Docker, Kubernetes, asynchronous programming, and more.

I know I've mainly written about Java on here in the past, but I'll likely focus on Scala in the future. Thanks for sticking with me!
Nevertheless, Gift Egwuenu Coded ✨
Tags: wecoded
Published: 2020-03-05 14:37:46

No, I don't sit on my computer every day playing games or whatnot!

Yes, I am an engineer. Women can also be engineers :)

The assumptions from non-tech or technical friends that I am not qualified to be an engineer because of my gender is sickening and I get tired of defending my work or what I do for a living.


## What I wish was a norm in tech 
A space where anyone can thrive regardless of your gender, race or color. We should all see ourselves as capable and not discriminate based on one's traits. I see a lot of improvements in tech with initiatives for women, people of color and the LGBTQ community but there's still more work to be done and we all can achieve this collectively by making an effort.

## I have experience 
In building web experiences that are accessible for all users using web technologies like Vue, Reactjs, and CSS. I have a strong passion for teaching what I know and learning from the process as well and I commit a lot of my time in doing that. I write, give talks, host events and make videos on things related to the web, career growth and my life as a frontend engineer.


To all the allies out there I'll leave you with these key actions:

- Pivot our voices. 

- Be kind.

- Speak up when you can and stand up for what's not right.


I love my career as an engineer and I won't trade it for anything ❤️❤️❤️
Simple Neomorphic Button Using CSS
Tags: css, todayilearned, todayisearched, html
Published: 2020-03-05 16:31:02

Everyone wants a new design with more popularity user-interface with some unique concepts. So here we design Simple Neomorphic Button Using CSS3 properties with basic HTML tags.

Neomorphic is a simple box-shadow effect on both sides of an element. So here we design an awesome button with Neomorphic effect. In this button, we used the box-shadow effect to make effects and also used flex properties to make this element in the center.

 
Make it yours now by using it, downloading it and please share it. we will design more elements for you.

[Download Source code](https://w3hubs.com/simple-neomorphic-button-using-css/)
On.NET Episode: Empowering digital transformation with .NET, ML and Azure
Tags: dotnet, azure, iot, machinelearning
Published: 2020-03-05 16:23:33

Data entry automation is a huge space and has tremendous impact to many countries around the world. Raul Roa is a software engineer in the Dominican Republic who is using .NET Core and Azure to help drive the digital transformation for his country and many others around the world.

In this episode, we chat with Raul at the Caribbean Developers Conference to learn how he's using technology to improve the lives of the people in this country.

{% youtube SriyUJEpMAU %}

If you liked this video and would like to see some more of our .NET content, please subscribe to our [.NET Developers YouTube Channel](https://www.youtube.com/channel/UCvtT19MZW8dq5Wwfu6B0oxw).


## Useful Links
* [Getting started with ML .NET](https://dotnet.microsoft.com/apps/machinelearning-ai/ml-dotnet?WT.mc_id=ondotnet-devto-cephilli)
* [Get started with .NET](https://dotnet.microsoft.com/learn?WT.mc_id=ondotnet-c9-cephilli)
* [Machine Learning in Azure](https://docs.microsoft.com/en-us/azure/machine-learning/overview-what-is-azure-ml?WT.mc_id=ondotnet-devto-cephilli)
ODPI's OpenDS4All - Open Source Data Science Content To Teach the World
Tags: ai, ds, machinelearning
Published: 2020-03-12 21:11:57

---
title: ODPI's OpenDS4All - Open Source Data Science Content To Teach the World
published: true
date: 2020-03-05 16:15:00 UTC
tags: AI,ds,machine learning,ml
canonical_url: 
---

### OpenDS4All
  

[![](https://github.com/odpi/artwork/raw/master/projects/opends4all/odpiopends4all-color.svg?sanitize=true)](https://github.com/odpi/OpenDS4All)

  

  

**Start learning now:**

  

[https://github.com/odpi/<wbr></wbr>OpenDS4All/tree/master/<wbr></wbr>opends4all-resources/<wbr></wbr>opends4all-data-wrangling-and-<wbr></wbr>integration](https://github.com/odpi/OpenDS4All/tree/master/opends4all-resources/opends4all-data-wrangling-and-integration)

  

ODPI has officially announced this recently and it looks great.

[https://www.odpi.org/news/2020/02/28/odpi-announces-the-opends4all-project](https://www.odpi.org/news/2020/02/28/odpi-announces-the-opends4all-project)

  

There is a ton of amazing materials including slides, notes, documentation, homework, exercises and Jupyter notebooks covering Data Wrangling, Data Science, the Basics and Apache Spark.   

  
 ![taxonomy](https://github.com/odpi/OpenDS4All/raw/master/assets/img/taxonomy.png)  
  

This“starter set” of training materials can help you build a Data Science program for yourself, your company, your university or your non-profit.    I am going to bring some of these to my meetups and hopefully can help give back with new materials, updates and suggestions.

  

These are college level materials developed by the University of Pennsylvania and open source via the ODPI with IBM leading.   The code and slides look great.   I can see these helping to enable the world adding another million desperately needed Data Scientists, Data Engineers and Data Science Enabled professionals.

  

I have been running some of this via Cloudera Machine Learning in my CDP cluster in AWS and it works great.   This is really well made.   I am hoping to create a module on Streaming Data Science to contribute.

  

[https://www.meetup.com/futureofdata-princeton/](https://www.meetup.com/futureofdata-princeton/)
Getting arrays in the params hash for sinatra
Tags: sinatra, notes, jesus, angel
Published: 2020-03-05 16:14:48

---
title: Getting arrays in the params hash for sinatra
published: true
description: Look here if your stuck getting arrays into the params hash from a get request
tags: sinatra,notes,Jesus,angel
---

God or an Angel litterly told me the answer to this one when i was walking out of the bathroom. I am christian coder, and God helps me code.

## short answer:

do something like this:
`<select id="users-select" form="search-form" name="users[]" multiple>`

the key is to have "[]" in the name


## The story behind it:

so i was writing a search engine for note taking app and i was noticing that in my templates that options that were selected in a multiple choice input only reflected the last option in the url. my url looked like this:

`http://localhost:4567/reports?clients=5e399c1d181b8942a418c10d&clients=5e52c3f5181b894bcc285cfa`

so only the option with the value 5e52c3f5181b894bcc285cfa.

i dispaired slightly having found a (what i thought was a) project crashing bug. Oh no! i thought, im going to have to do double work learning ember or angular or something, specifying the model on front end and the back end stack! and my javascript is a bit lacking! this would push back the completion deadline by months!

so i decided to try the sinatra param gem which is here:

[Sinatra Param Github](https://github.com/mattt/sinatra-param)

no luck. the types of the param values probably were coerced but params would still only return the last value on the url for that param name.

so i decided to solve it the only way someone who depends on open source should respond to a problem like this. with prayer and project contribution. so i opened an issue here.. 

[My Sinatra Repo issue](https://github.com/sinatra/sinatra/issues/1604)

and cloned sinatra ready for a pull request after my hack. If God was willing. when im solo, i leave tests until last. but this is a team effort so testing comes first. so i searched in the test folder using rubymines "search in path" command for mentions of params and i came across a behaviour spec at line 575 of this file

[Sinatra/test/routing_test.rb](https://github.com/sinatra/sinatra/blob/master/test/routing_test.rb)

so i noted it in the sinatra issue, shelved it for the night and gamed to 4am because i woke up at 2pm becuase of a persistant migrain and im off sick and working on a project. 

the next day after my post wakeup routine i came out of the bathroom and i heard an angel speak to me.

he said something like use brackets in the name attributes of my form inputs. Of Coarse! So i went and tried it out to my success and reported it on the sinatra issue and found out that i had a reply. Github user dentarg found a stack exchange question which i hadnt:

[The reply](https://github.com/sinatra/sinatra/issues/1604#issuecomment-594817941)

[The Stack Exchange Question](https://stackoverflow.com/questions/2277185/how-to-get-all-of-the-url-parameters-in-a-sinatra-app)

They both did not mention how you got the names in the url like that but my angel friend did.

Thanks God and his messenger!
Best way to allow other components to change table's focused row?
Tags: react, redux
Published: 2020-03-05 16:02:51

I have `displayProjectTable` that gets state from reducer `projectData` and populates itself. 

Currently `displayProjectTable` has a local state that stores `focusedRowID`. My problem is that I want other components to have the ability to modify the `focusedRowID` and it's content.

Some examples:
-A component tells `displayProjectTable` to add 1 to `focusedRowID` (ie. focus on the next row)
-A component tells `displayProjectTable` to set value of row at `focusedRowID` to "test". Because `displayProjectTable` gets its state from `projectData`, that reducer's state will have to be changed at the `focusedRowID` index.

A possible solution is to store `focusedRowID` inside of the `projectData.js` reducer. However, this seems like a bad solution to me. The `projectData` reducer is responsible for fetching, storing, and saving `projectData`. Would it really make sense to store a `focusedRowID` when `projectData` shouldn't even know what a row is?
Final Project: Heard
Tags: react, redux, rails, newbie
Published: 2020-03-05 15:56:33

 Twelve months ago, returning "Hello world!", simple array manipulation, basic math, and loops in python was the extent of my abilities. That was fun... it opened my eyes though. You really have to apply yourself if you want to make a career of programming. In comes the search for a course. Applied to a few online programs, took a few tests, then I stumbled upon Flatiron and I was sold. They had everything. They pushed me, they challenged me but they also picked me up. Now we are at the end of the curriculum. Job search services are in full affect but something was missing. A way to keep track of all the suggestions made by my career coach. Why not make a job search journal for this? I had come up with my final project! 

 The basic requirements are build a Rails API, use React for our front end, use Redux for client side data management and make sure it works upon assessment day. So I decided to make a job search journal, keeping track of contacts, daily accomplishments and setting goals. I am calling it Heard.

 On the landing page we will see our bootstrap navbar and a slick-react carousel sharing information about Heard. Using Rails sessions controller and the bcrpyt gem, during signup the password is encrypted and emails are checked for proper formatting. When a user makes a login post request the sessions controller validates the credentials, authenticates user, sets a current_user, authorizing the user to the restful API and returns a cookie that is stored in the browser for future use. In the App component, Heard then checks to see if a currentUser exists and then presents the logged in navbar. The currentUser value is kept in the Redux store and is validated by the cookie whenever the page reloads or you visit the page at a later time. Heard uses react-router, this help us define the correct route for each component and set a value for each component in the URL. After selecting a page from the navbar, you are routed to that component displaying a contact list, your daily journal entries or to the goal page where you can create and update your dream job goal. Creating new journal entries and contacts follows the React/Redux flow of handling onChange events(typing in the form inputs). Passing that input into the actions, actions calling the reducers, reducers updating state on and passing the state back to the form compotent. The component then passes the updated state as a value in the forms, with the help of mapStateToProps and connect. Upon submit the data saved in the form is passed as a POST fetch request where the instance is saved to the DB and the store is update with the new entry.

  This has been a wild journey so far, the beginning of life full of learning and evolving.