teleren/devto huggingface dataset:
Predicting the field
Tags: machinelearning, python, sports
Published: 2020-03-19 22:26:31

So first off, since about 9th grade, way back in 2004, I discovered lacrosse. And from 2004 to about 2011 it was just about the biggest, most important thing in my life. 2011 was when I really buckled down with school and when I met my now wife. So while it isn't the most important thing anymore, I still really like it.

Before COVID-19 cancelled everything including the 2020 NCAA Division 1 Lacrosse season I had the idea to create a program that would help me with my bracket come May, when the National Championships are and Lacrosse's version of March Madness. I found all the data I could for the lacrosse tournament going back to 2014 and now I think I have all the data. But for a while I didn't think I would do it. I have to brush up on machine learning concepts and figure out how to do all the modelling and setting up the data sets. I hesitated on starting this project because I felt overwhelmed, and the impostor syndrome started creeping in even on a personal project.

But I'm finally starting. On the bright side, if this takes a while I have until May 2021 to really get it working for the next tournament. I'm actually going to start off fairly simple and not use machine learning at first, just making an algorithm to compare the stats that stats that I have and then later on bring in proper machine learning and comparing the results. 

I'll make some periodic updates and maybe try live streaming once it gets a little more interesting. Who knows.
Qt Timers
Tags: c
Published: 2023-01-06 01:37:10

---
title: Qt Timers
published: true
date: 2020-03-19 21:30:04 UTC
tags: C
canonical_url: https://brandonrozek.com/blog/qttimer/
---

Qt has two great timers, one that repeats an action after a certain interval, and one that is meant for one-off operations. They call these `QTimer` and `QTimer::singleShot` respectively. This post is going to assume that we’re working with a class named `Test` that inherits `QObject`.

Let us first look at the one that repeats. This code needs to be inside a class that inherits `QObject`.

```
void Test::callbackRepeat(void) {
    // Code that executes when the timer times out
}

// ......
int interval = 1000; // Units: milliseconds
QTimer* timer = new QTimer(this);
timer->start(interval);
connect(timer, &QTimer::timeout, this, &Test::callbackRepeat);

```

Now for the one-off…

```
void Test::callback(void) {
	// Code that executes when the timer times out
}

// ......
int timeout = 1000; // Units: milliseconds
QTimer::singleShot(timeout, this, &Test::callback)

```
Stories estimation while working in services
Tags: discuss
Published: 2020-03-19 21:21:45

Hi all,

I switched job about two mounts ago and I'm having a bit hard time adapting to estimate my stories/tasks (as a developer) <i>in hours</i>!
At my last job, we used to make our estimations in hours but we never could deliver so to combat this, the department needed to get more robust, so a bunch of senior people switch departments and helped out. We started to estimate in story points and another impactful changes. This was great because we went from, we couldn't deliver when we were saying we going to, to we deliver 100% of the time!

It's important to say, this was my first job as a developer so for the first 6 months to 1 year I didn't know what was I doing plus the department was in the early stages, so this change had a huge impact on both of us.

Now, in my new job we still estimate in hours because it's a consulting company that does projects for other companies, so the client is paying for the consultant's time (hours) and I'm having a hard time mapping the complexity of the tasks in hours. Does all this part of the industry do this also in hours or there is a better way to tackle this?

Cheers!
Charming the Python: Classes & Methods pt 1
Tags: python, beginners, codenewbie
Published: 2020-03-19 21:07:06

*If coding tutorials with math examples are the bane of your existence, keep reading. This series uses relatable examples like dogs and cats.*

---

## Classes and Methods 


```python
# syntax
class ClassName:
  pass # remember, pass just means there is not code here yet
```
### Creating a Class
A class is basically a template for an object. Let's create a class (template) for dog.
```python
class Dog:  # the name of our template/class
      def __init__ (self, name, color):  # initialize attributes
          self.name = name
          self.color = color
```
### Creating an Object

Having a template/class for `Dog` is great, but it's useless if we don't actually use it. Let's create a dog object.
```python
d = Dog('Cheeto', 'tan')
print(d.name)
Cheeto
```
### Class Constructor
Constructors are each of the attributes of the class. In this case, we already have `name` and `color`. You could also add `age` and many other things.
```python
class Dog:  # the name of our template/class
      def __init__ (self, name, color, age):  # initialize attributes
          self.name = name
          self.color = color
          self.age = age
```
### Object Methods
Objects can have methods. Think of objects as nounds and methods as actions or verbs.
```python
class Dog:  # the name of our template/class
    def __init__ (self, name, color, age):  # initialize attributes
          self.name = name
          self.color = color
          self.age = age

	def dog_info(self):
        return f'{self.name} is {self.age}.'

d = Dog('Cheeto','tan and black','5')
print(d.dog_info())

Cheeto is 5.
```
### Object Default Methods
Sometimes, you may want to have default values. The default values will fill in all the info, but can also be overridden.
```python
class Dog:  # the name of our template/class
    def __init__ (self, name = "Cheeto", color = "tan and black", age = "5"):  # initialize attributes
          self.name = name
          self.color = color
          self.age = age

	def dog_info(self):
        return f'{self.name} is {self.age} and {self.color}.'

d1 = Dog()
print(d1.dog_info())
d2 = Dog('Wiley','brown, black, and white','age unknown')
print(d2.dog_info())

Cheeto is 5 and tan and black.
Wiley is age unknown and brown, black, and white.
```

---
Series loosely based on {% post https://dev.to/asabeneh/30daysofpyton-challenge-43ii %}
How to Setup Quick SSH Access
Tags: sysadmin, ssh, servers
Published: 2020-03-19 20:59:45

---
title: How to Setup Quick SSH Access
published: true
description: How to Setup Quick SSH Access
tags: sysadmin, ssh, servers
canonical_url: https://aarondunphy.com/blog/how-to-setup-quick-ssh-access/
---

In this article you will learn how you can set up a quick and easy way to SSH onto any server without needing to remember the user or IP address. This will work by  running a command similar to:

```bash
ssh server_name
```

---

## Machine Setup

Check if your machine already has a public SSH key generated:
```bash
cat ~/.ssh/id_rsa.pub
```

If you see “No such file or directory” then generate a SSH key otherwise skip this step (click enter at all prompts):
```bash
ssh-keygen
```

Edit the SSH config file to setup quick SSH access to a server from your local machine:
```bash
sudo nano ~/.ssh/config
```

Ensure all hosts use key chain is at the top of the file:
```bash
Host *
     UseKeyChain yes
```

Then you can insert as many host references as you would like. Insert the following (changing the server_name, ip_address and server_user):
```bash
Host server_name
     HostName ip_address
     User server_user
     IdentityFile ~/.ssh/id_rsa
     IdentitiesOnly yes
```

Copy your machine's ssh public key:
```bash
cat ~/.ssh/id_rsa.pub
```

## Server Setup

Add your machine's SSH public key to the server's authorized_keys file (you will need to SSH onto the server with `ssh user@ip` first):
```bash
sudo nano ~/.ssh/authorized_keys
```

--- 

You can then ssh on via
```bash
ssh server_name
```
Destructuring Arrays in JavaScript
Tags: destructuring, arrays, javascript, destructure
Published: 2020-03-19 20:37:51

Destructuring is a new feature available in ES6. Destructuring allows you to assign elements in objects or arrays to variables in a swift, declarative way. We can reach into deeply nested structures and even eliminate the need to null check by grabbing just the elements we need, leading to more succinct code.

Let’s take a look at a couple of examples dealing with destructuring arrays:

One of my favorite television shows is Black Mirror, and I figure we could use the main overarching theme, season in and season out, as an example.

<h2>Grabbing the First Element:</h2>

```javascript

const blackMirror = ['black', 'mirror', 'technology', 'bad']

const [first] = blackMirror

console.log(first) 
// 'black'

```

<h2>Grabbing All Of The Elements</h2>

```javascript
const blackMirror = ['black', 'mirror', 'technology', 'bad']

const [first, second, third, fourth] = blackMirror

console.log(first) 
// 'black'  
console.log(second) 
// 'mirror'  
console.log(third) 
// 'technology'  
console.log(fourth) 
// 'bad'
```

<h2>Grabbing Non-Sequential/Out Of Order Elements</h2>

By using the comma operator, we can return each index we want to destructure and skip over the rest. It’s important to note that the comma is in addition to any other commas needed to separate elements.

```javascript
const blackMirror = ['black', 'mirror', 'technology', 'bad']

const [first,,third] = blackMirror

console.log(first) 
// 'black'   
console.log(third) 
// 'technology'
```

<h2>Using the Spread Operator</h2>

```javascript
const blackMirror = ['black', 'mirror', 'technology', 'bad']

const [firstElem, ...rest] = blackMirror

console.log(first) 
// 'black'  
console.log(rest) 
// ['mirror', 'technology', 'bad']  
```

As long as the right hand side of your destructuring assignment returns an array, you can destructure the elements in the array. This means functions or objects that return arrays can also be destructured.

<h2>Array Destructuring from an Object</h2>

```javascript
const blackMirror = \['black', 'mirror', 'technology', 'bad'\]

const cereal = {  
    frosties: blackMirror   
}

const [first] = cereal.frosties

console.log(first) 
// 'black'
```

<h2>Array Destructing from a Function</h2>

```javascript
function sugarPuffs(){  
    return blackMirror  
}  
const [,,third] = sugarPuffs()

console.log(third) 
// 'technology'
```

Array destructuring can help you write more effective, concise code by avoiding the need to declare extra variables and only destructuring the data necessary to building your application.
My Group’s Remote Working Manifesto
Published: 2020-03-19 20:30:36

We created this yesterday to try and make this situation as good as possible, I thought some of you might like to read it to, manifesto start here:


First of all, this is not a normal remote situation! But to try and make this as best as possible, we drafted this manifesto to try to follow to make our working and social relationships as best as possible.

Overcommunication is key – What do we mean? In the office we saw when people went out for a smoke or coffee break, when we are remote-working people don’t see it, so we need to start getting into the habit of letting our peers know when we leave for a break – it’s not a tracking tool, but rather setting expectations, when we stand up and go to grab a smoke or coffee in the office – it’s a form of visual communication that we lack now 🙂 we now just need to do the same either written or status change on Slack.

New joiners Addition – This btw will normalize this for everyone, once everyone will be able to see people take breaks during work hours remote, our new joiners will feel more comfortable doing so as well
Our faces are important – By default let’s have cameras on, we know most of us hate seeing ourselves in the video, but we like seeing each other, and it helps, we are used to a visual communication style, we see expressions and we understand the tone… unless there’s a specific reason, let’s start our calls with video on.

We Socialize – We continue to have lunches and coffee breaks together. We have this slack channel – #log-remote-coffee-break and Lunch Hangout Open for all on the Logistics calendar (12:30 – 13:30) – Hangout Room – Let’s invite peers for coffee or lunch, have conversations and be welcoming, we also keep in mind that people moved to Berlin recently, so this situation is extra difficult on them.

We 🍐 – Pair! Pair! Pair! Pairing is key to onboard, is key to understand the scope and to share knowledge, working remotely could lead to silos, silos kill teams! A great way to share knowledge in an organic way is to pair, pair program, pair on discovery and pair with our PMs when we try to find a solution

We avoid long slack messages that lead to no result – If we find ourselves in the rabbit hole of never-ending messages that leads to nothing, call! Quick video chat could solve hours of chatting, same as chatting to peer in the office would save that. 

We provide Context – Now more than ever, let’s make sure we have Agenda set for each meeting and summary of what was decided, let’s share – let’s call this Context sharing and Async info providing (to those that weren’t there).
When a JSON file becomes a DSL
Tags: typescript, javascript, angular
Published: 2020-03-19 17:52:55

Consider this portion of a JSON file.
```json
 {
               "DisplayName": "Job Run Options",
               "Type": "select",
               "Options": [
                  "1-High Priority",
                  "2-Medium High Priority",
                  "3-Medium Priority",
                  "4-Medium Low Priority",
                  "5-Low Priority",
                  "6-Overnight Batch Job"
               ],
               "CurrentValueList": [
                  {
                     "Val": "1-High Priority"
                  }
               ]
            },
```
It's used to auto-create controls in Angular (or any other framework). It closely resembles HTML. This is a select element with options and a current value. While this works quite well in granting the ability to auto-create HTML elements from the back-end, it is it's own [DSL Domain Specific Language](https://www.google.com/search?q=dsl+domain+specific+language&rlz=1C1GCEB_enUS845US845&oq=dsl&aqs=chrome.1.69i57j35i39j0l6.3760j0j7&sourceid=chrome&ie=UTF-8).  

We've spoke in the past about problems with [DSLs](https://www.google.com/search?q=dsl+domain+specific+language&rlz=1C1GCEB_enUS845US845&oq=dsl&aqs=chrome.1.69i57j35i39j0l6.3760j0j7&sourceid=chrome&ie=UTF-8).  The top-most being the inability; when refactoring, to have a code symbol rename also find all the symbols in the JSON file. 

This implies other problems too, you cannot refactor [DSLs](https://www.google.com/search?q=dsl+domain+specific+language&rlz=1C1GCEB_enUS845US845&oq=dsl&aqs=chrome.1.69i57j35i39j0l6.3760j0j7&sourceid=chrome&ie=UTF-8) in the manner of making things lean and mean like one can do in code. You have to pretty much make all these changes manually. 

If you are doing something like this, the best way to proceed is to keep your [DSL](https://www.google.com/search?q=dsl+domain+specific+language&rlz=1C1GCEB_enUS845US845&oq=dsl&aqs=chrome.1.69i57j35i39j0l6.3760j0j7&sourceid=chrome&ie=UTF-8) simple. Don't allow large JSON hierarchies to exist, because refactoring each and every one of them is a big job.
Avoid Coronavirus (COVID-19) but Don't go hangry.. 😫 Use grocery shopping apps if you value 🕛, 💵, and not 🤮
Tags: covid19, productivity, remote, discuss
Published: 2020-03-19 20:19:21

Do you currently use a grocery shopping app, or do you intend to go to the grocery store in-person?

We made an app before covid-19 came out, and it may benefit you to give our app a try, www.recipetotableapp.com

There is a current boom in grocery shopping related apps due to the coronavirus.
Don't believe me, just google a bit and read some news articles.

In fact, many people seem willing to try online grocery shopping for the first time ever due to covid-19.
The trend seems to include those outside of traditional demographics.

It has been mentioned by local news posts that users of mobile grocery shopping apps may be able to reduce their potential exposure to covid-19, and we agree.
Some grocery stores are even considering 'seniority' hours to limit exposure to the older generation if they want to come directly into the grocery store.

Some customers are going online to try grocery shopping apps for their first time, and we commend them. There are a LOT of apps to choose from in the online grocery shopping category.

If you do not currently use a mobile app for grocery shopping, maybe you should.
If you would like to try ours, it's a free download for android and ios (ios currently under review for public release, test flight is available now). Download Links at www.recipetotableapp.com

We currently offer integration with select grocery retailers and will be adding more!

Stay healthy!
Day 1 On Web Development
Tags: 100daysofcode, html, webdev
Published: 2020-03-19 19:53:38

Hy this is my Day 1 on web development i start with basic html and recall some basic tags and and learn about H1 H2 tags like with H1 is used for telling Google if you want to rank your page and H2 is section subtitle so any content block with in your page will be H2 further i learn about ul and li tags these tags are pretty cool for me i love these tags
Is it worth learning JavaScript?
Published: 2020-03-19 19:17:24

My favorite language is Python, and I feel very comfortable with it; but when I look around I find a lot of developers know 2 , 3 maybe more languages, a lot of frameworks, and maybe one or two for backend and the circle doesn't stop there, I mean they continue to learn more and more and more ! 

The reason why I am writing this blog post, is a YouTube comment I have read that says " The more languages you learn, the more chances you'll have" and I say this is not precisely true, I'd rather say 
**************************************************************************
"Don't distract yourself, concentrate in one technology and be good at it"
**************************************************************************

Some time ago I learned everything about HTML5 and CSS3 , I have created web pages in tutorials and side projects but without the use of JavaScript, which seemed to me the missing block in the overall design of whatever I am designing; instead I was using Flask or Django but it was all amateur to intermediate projects and I thought to myself " hey, maybe it's time to step up and learn JavaScript".

I ordered a couple of books on Amazon - before the pandemic- and I've received my assets just in time! And as we're all quarantined now, I am using this time to read and study academically instead of falling in those YouTube rabbit holes each night, I read two books now:
1- Automate the boring stuff with Python
2 JavaScript and jQuery: Interactive Front-End Web Development

So, back to my question, is it worth learning JavaScript if I know already a language (Python) and I understand the logic and the mechanics of the syntax for 85% of the language ? My answer is : I really don't know! And if you do, please tell me.

P.S Special Thanks to Brad Traversy as he is the one behind my constant motivation, he was the one behind me creating a YouTube channel and writing these blog posts.
How to face COVID-19 crisis as an E-commerce /online business
Tags: covid19, seo, ecommerce
Published: 2020-03-19 19:11:57

---
title: How to face COVID-19 crisis as an E-commerce /online business
published: true
description: Due to COVID-19, many online businesses are struggling and having difficult times. Some business areas are more impacted than others and it mainly depends on products/services they are offering.
tags: covid19,SEO,ecommerce
cover_image: https://www.aymen-loukil.com/wp-content/uploads/2020/03/e-commerce-corona-virus-covid-19-e1584545556170.jpg
---

Due to COVID-19, many online businesses are struggling and having difficult times. Some business areas are more impacted than others and it mainly depends on products/services they are offering.
In this post, i’ll share some ideas and recommendations on how to deal with this difficult period so keep reading !

Like every crisis, there are winners and losers :

Potential losers :

- Travel
- Events based
- Luxury
- Jewelry

Potential winners :

- Online leisure (video games, electronics)
- Children toys
- Health products (vitamins, food supplements)
- News
- Software and SaaS
- Online courses
- Grocery (household products)
- Food, beverages and coffee
- Headphones
- Homeschooling stuff
- Books

1-Communicate about your company principals and values
2-Get your business run remotely
3-Define and communicate your new way to work
4-Keep the contact with your audience
5-Pursue your content production but differently
6-Work on your technical SEO issues
7-Be ready for the surge when things get better

#[Continue reading here](https://www.aymen-loukil.com/en/blog-en/e-commerce-and-covid-19/)
CSS Modules is not working in functional component Help????? 
Tags: react, redux, javascript, node
Published: 2020-03-19 18:57:34

i am facing issue when i am trying to scope css file to specific component in case of class component its working fine by following this article https://create-react-app.dev/docs/adding-a-css-modules-stylesheet

but in functional component this approach is not working 

here is some my application details
    "react": "^16.13.0",
    "react-dom": "^16.13.0",
    "react-scripts": "3.4.0"

here is my component 
import React, { Component } from 'react';
import LS from './Layout.module.css';
// import './Layout.css'
import Aux from '../../hoc/Aux';


// const layout = (props) => (
//    <Aux>
//         <div>Toolbar Sidebar BackDrop</div>
//     <main className={LS.Content}>
//         {props.children}
//     </main>
//    </Aux>
// );

class layout extends Component {
    render() {
        return (
            <Aux>
                <div>Toolbar Sidebar BackDrop</div>
                <main className={LS.Content}>
                    {this.children}
                </main>
            </Aux>
        );
    }
}
export default layout;

when i apply class approach the css is only scope to the layout file but i want to use finctional component but the scope css is not working when i use functional component