teleren/devto huggingface dataset:
Scheduler Design Help Needed
Tags: help
Published: 2019-10-16 04:28:29

Basically I am designing a system, which can have thousand of cron jobs. I am creating a UI where one can create cron job, and specify the interval in it. What system design you will suggest making it scalable?


More Details: My Question is in terms of the backend infrastructure. So I am going to use the package called npmjs.com/package/html-differ to compare two HTML. There will be a user interface where the user will define the webpage URL and interval time where webpage changes will be checked. Let's assume we have 10k URL to check with different time intervals. I wanted to have a recommendation about the database or queuing system like rabbitmq i should use to make it scalable and fault tolerance.
On .NET Episode: Coding F# in Visual Studio Code with Ionide
Tags: dotnet, vscode, fsharp, functional
Published: 2019-10-16 02:49:24

[F#](https://docs.microsoft.com/en-us/dotnet/fsharp/what-is-fsharp?wt.mc_id=ondotnet-devto-cephilli) is a functional programming language that runs on various flavors of .NET. Its succinct syntax allows developers to create efficient and maintainable applications in just a few lines of code.

What you might not know is that F# has vibrant community outside of the umbrella of Microsoft and a very active open source community. Whenever you get a chance, check out the [F# Software Foundation](https://fsharp.org/) for use cases, samples and various projects happening within the F# community.

Learning F# and functional programming in general has been on my list of things to do for this year, so its always a pleasure for me to learn more about what's happening in the ecosystem. 

In this episode of On .NET, Phillip Carter and I sit down to talk about the [Ionide extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=Ionide.Ionide-fsharp&wt.mc_id=ondotnet-devto-cephilli). Ionide has tons of great features for F# developers working in Visual Studio code such as autocomplete, packet integration, syntax highlighting and much more.


{% youtube E4LrQxElbZM %}

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) or leave a comment below.


## Useful Links

* [Ionide][http://ionide.io]

* [Ionide plugin for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=Ionide.Ionide-fsharp&wt.mc_id=ondotnet-devto-cephilli)

* [F# Guide](https://docs.microsoft.com/en-us/dotnet/fsharp?wt.mc_id=ondotnet-devto-cephilli)

* [Visual Studio Code](https://code.visualstudio.com?wt.mc_id=ondotnet-devto-cephilli)
Laravel 6 PHP Framework Tutorial - Full Course for Absolute Beginners
Tags: laravel, php, webdev, tutorial
Published: 2019-10-16 02:27:03

In this course, you will learn Larval 6 Core Functionalities, Laravel 6 CRUD and Default Authentication System.

Laravel is an open-source PHP framework, which is robust and easy to understand. It follows a model-view-controller design pattern. Laravel reuses the existing components of different frameworks which helps in creating a web application. The web application thus designed is more structured and pragmatic.

**Why We Should Learn Laravel?**

* Laravel is a first development life cycle and less code functionality
* It's easy to learn
* Making web applications faster
* Configuration error and exception handling
* Automation testing work.
* URL Routing Configuration is very high in Laravel.
* Scheduling tasks configuration and management
* It has a huge community
* Unlimited resource.
* Most importantly it's very easy to get a job if you have Laravel skills. 

**What you'll learn**

* Laravel 6 Fundamental
* Laravel 6 CRUD Functions
* How to insert Data in Database
* How to Read Data From Database
* How to Update Data in Database
* How to Delete Data From the Database
* Laravel 6 Default Authentication System
* How to Set Up Reset Password Option
* How to Create Change Password Option

{% youtube OLwN8hpmno0 %}
Git alias trick: Comparing your local branch to the upstream version
Tags: git, dotfiles, aliases
Published: 2019-10-16 01:29:01

Hello! I would like to share a small Git alias that has made my life so much better: The ability to compare my local branch to its upstream equivalent. I often want to see exactly what changes I’m about to push before I pull the trigger, so I use this a lot.

In your `.gitconfig`’s `[alias]` section:

```bash
[alias]
  du = "diff @{upstream}"
```

And then you can type in

```bash
git du
```

or even better

```bash
g du
```
if you have `g` aliased to `git`

### 🤓 But Rose I am a bit of a Git newbie and I have no idea what any of those words mean

#### 💁‍♀️ A bit of information on remote repos

Let’s say you have a repository on GitHub. When you work locally you clone that repo. The GitHub one is saved as a `remote` which can have a name of your choosing (since you can define multiple remotes.) When you use `git clone` the remote that you cloned from is by default named `origin`.

#### 👁 A bit of information on upstream branches

Individual branches that you name can be set to “track” an upstream branch, which means that when you use things like `git push` and `git pull` Git will know that your local `master` needs to pull from `origin/master`, or your local `bug_fixes` needs to pull from `origin/bug_fixes`

If you have a local `bug_fixes` branch already and you want to set it up to start tracking an upstream branch, you can do so by checking out your local `bug_fixes` (`git checkout bug_fixes`) and then typing `git branch -u origin/bug_fixes`


#### ℹ️ Elaborating on the `diff`-ing of upstream branches
If you type in `git diff origin/master` when you have `master` checked out locally, you can see the difference between your local master and the master on origin.

But having to type out `origin/branch_name_here` every time is a bit tedious. Another option is to use this handy built-in Git shorthand: `@{upstream}` which then can be shortened even further to `@{u}`, so `git diff @{u}`

💅 However, I am even lazier than that, hence the even _shorter_ alias `du`

#### 🤔 OK but what are aliases?

Don’t know what aliases are? You totally should, because they are awesome. [Here is a how-to on Git aliases](https://githowto.com/aliases). I have a handful that I love - `g du` which I just talked about here, or `g co` instead of `git checkout` or `g br` instead of `git branch` It might seem silly, but saving a little bit of effort on the number of characters I have to type is very satisfying 🤤

#### …Other hints

If you use [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) there are already some cool plugins available that let you quickly set up a ton of Git aliases, which is worth checking out if you are just starting your Git hacking journey.

If you have a pretty minimal `.gitconfig` right now, it is worth searching through the dotfiles of notable developers on GitHub (many devs set up a repo for their dotfiles - [here’s an example](https://github.com/mathiasbynens/dotfiles)) and seeing what cool tricks they are using.

------

OK that’s it! Thanks for reading all the way to the end 👋
Self Taught Data Science Journal
Tags: machinelearning, datascience, devjournal, selftaught
Published: 2019-10-16 00:53:19

Learning is hard. 

Finding a community of people to share your trials with can make it less hard. 

So I'm blogging about my experiences. 

I decided to switch careers to data science in January 2019, using a self-study approach to learn the material. I've been doing MOOCs, reading blog posts and books, attending meetups and conferences, and following folks on social media. The funny thing is that I'm finally confident enough to talk about how much I don't know instead of complaining about it to my friends and family. It's only taken 8 months to get here. Guess what, world? **I don't know squat and that's ok!** Whew, got that off my chest.

My background is in computer science but it's fair to say it's been _years_ since I last coded. I left in no small part because I didn't feel I belonged, and it's with some trepidation that I'm returning to tech. I don't know how much the culture has changed for women, but I do know people are at least talking about it. 

I chose data science over some other software engineering paths because I like data. I like asking questions. I like the idea of taking an experiential approach and learning something about the nature of the world. And with data scientists coming from a variety of backgrounds besides computer science, I suppose I hope it will be less problematic for women. It's also a relatively new field with huge demand, I'm hopeful that it will make it easier for someone my age starting out (again).

What do I plan for this series? I'm hoping to do a very informal weekly writeup of things I'm discovering and learning, but also, where I'm struggling and good use some assistance. It feels nice to share that process. And it might help anyone else who's at the same stage as I am. And anyone who is at the stage right before me can, hopefully, offer guidance and support.

Thanks for reading!
Hiding Things with CSS
Tags: css, webdev, html
Published: 2019-10-16 00:52:00

There are a handful of ways to hide things using CSS, and each of them has its own strengths and potential drawbacks. Here's a list of the 5 most common ways to hide content, and a use case or two for each.

# Display

`display: none;` or HTML `hidden` attribute

- Removes element from visual flow, hiding it from both visual and AT (Assistive Technology) consumption
- Does not transition

### Use Case

- Toggled, closed, or otherwise hidden elements that may be shown again.
- Breakpoint-dependent elements like mobile & desktop menus

# Opacity

Opposite of transparency, `opacity: 1;` is fully opaque, `opacity: 0;` is fully transparent.

- Does not affect the element's position in the DOM flow, but a common gotcha here is an `opacity` value other than `1` puts the element in a new stacking context.
- `opacity` applies to the whole element and any descendants, but is not inherited by the element's children.

### Use Case

- Temporarily hide elements, typically to fade in after a timeout or on a callback
- Pair with another method to create a smooth transition of content in/out of the visual flow

# Visibility

`visibility: hidden;`

- Visually hidden, but still occupies the same space in the visual flow.
- Unlike the `display` property, `visibility` is animatable. Pairs nicely with a short `opacity` transition when animating an element in.

### Use Case

- Hide an element without disrupting the visual flow.
- Pair with DOM manipulation, like `position: absolute;` or `overflow: hidden; height: 0;` to enable transitions where `display: none;` would fall short.

# ARIA

`aria-hidden='true'`

- Hides from screen readers, but not visually.

### Use Case

- Visual-only elements that already have descriptive text
- Redundant elements (all but one of mobile/tablet/desktop menus)

# Clipping

Hides visually, but not to AT. [A11y guidelines](https://a11y-guidelines.orange.com/web_EN/exemples/masquage/index.html) on this are an excellent description.

### Use Case

- Visually redundant elements already described in the DOM
- Input labels made redundant by a visual overhaul using pseudo-elements

### Things to Remember

- All content hidden with CSS will become visible if styles are disabled.
- Be careful not to hide the full functionality of your site from screen reader and/or keyboard-only users.
Button Styles in SwiftUI
Tags: swift, swiftui
Published: 2019-10-16 00:41:45

---
title: Button Styles in SwiftUI
published: true
description: a table explaining the different button styles in SwiftUI
canonical_url: https://medium.com/@maeganwilson_/button-styles-101f183dd9a0
tags: swift, swiftui
---

# Button Styles in SwiftUI

This is a table explaining the different button styles in SwiftUI and which platform each Button Style is available on.

| Button Style | iOS | watchOS | iPad OS | macOS |
| ------------ | --- | ------- | ------ | ------- |
| `PlainButtonStyle` | ✅ | ✅ | ✅ | ✅ |
| | ![](https://github.com/maeganjwilson/swiftui-buttons/blob/master/images/macos-ios-plain.png?raw=true) | ![](https://github.com/maeganjwilson/swiftui-buttons/blob/master/images/watchos_plain.png?raw=true) |  ![](https://github.com/maeganjwilson/swiftui-buttons/blob/master/images/macos-ios-plain.png?raw=true) |  ![](https://github.com/maeganjwilson/swiftui-buttons/blob/master/images/macos-ios-plain.png?raw=true)  |
| `LinkButtonStyle`| ❌ | ❌ | ❌ | ✅ |
| | | | | ![](https://github.com/maeganjwilson/swiftui-buttons/blob/master/images/macos_link.png?raw=true) |
| `BorderedButtonStyle`| ❌ | ❌ | ❌ | ✅ |
| | | | | ![](https://github.com/maeganjwilson/swiftui-buttons/blob/master/images/macos_bordered.png?raw=true) |
| `BorderlessButtonStyle` | ✅ | ❌ | ✅ | ✅ |
| | ![](https://github.com/maeganjwilson/swiftui-buttons/blob/master/images/iOS-borderless.png?raw=true) | | ![](https://github.com/maeganjwilson/swiftui-buttons/blob/master/images/iOS-borderless.png?raw=true) | ![](https://github.com/maeganjwilson/swiftui-buttons/blob/master/images/macos_borderless.png?raw=true) |

# How to use

Here is sample code of how to use a Button Style in SwiftUI.

```swift

Button(action: {
    print("plain")
}) {
    Text("Borderless button")
}.buttonStyle(BorderlessButtonStyle())

```

In the [GitHub repo](https://github.com/maeganjwilson/swiftui-buttons), there is an Xcode project with each button style used.

{% github maeganjwilson/swiftui-buttons %}

---

If you enjoy my posts, please consider sharing it or Buying me a Coffee!

<a href="https://www.buymeacoffee.com/appsbymw" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/arial-blue.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;" ></a>
Python for Beginners - Part 6 - Web API connection, Dictionary, Environment Variable and Decorator
Tags: python
Published: 2019-10-16 00:29:49

![python_titulo](https://thepracticaldev.s3.amazonaws.com/i/5yb0ptvn7cdkih6851cn.jpg)
Last part of articles about the Microsoft's [Python for Beginners](https://www.youtube.com/watch?v=jFCNu1-Xdsw&list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6) series.
All the examples from the playlist are available in this GitHub repository: [Python Examples](https://github.com/lucianopereira86/Python-Examples).

### Objective
You will learn how to make connect with web APIs, manipulate dictionaries, read environment variables and use decorators.
A Python file was created to demonstrate each example.

## Topics
* [api/post.py](#apipostpy)
* [dictionary.py](#dictionarypy)
* [keys.py](#keyspy)
* [decorators.py](#decoratorspy)

### api/post.py

Making a POST request to a web API. 
The example file was created inside of a folder named _api_.

![code32](https://thepracticaldev.s3.amazonaws.com/i/xf3n6nasv2afit44sv2j.JPG)

First, install the _requests_ library:

```bash
pip install requests
```

The result will be:

![code33](https://thepracticaldev.s3.amazonaws.com/i/rhs5im4267o9co1xhy7n.JPG)

Then, run this command:

```bash
python .\examples\api\post.py
```

The result will be:

![code34](https://thepracticaldev.s3.amazonaws.com/i/svl7y0n8lvduw9np3b68.JPG)

### dictionary.py

Creating and manipulating dictionaries.

![code35](https://thepracticaldev.s3.amazonaws.com/i/shyn0jkul7z98qzifueq.JPG)

Executing the command below:

```batch
python .\examples\dictionary.py
```

The result is:

![code36](https://thepracticaldev.s3.amazonaws.com/i/8zy6jxyhmuvljw4mmjyn.JPG)

### keys.py

Reading environment variables.

![code37](https://thepracticaldev.s3.amazonaws.com/i/6ptfrmo6crmhy4d44id2.JPG)

Create a _.env_ file containing a secret key.

![code38](https://thepracticaldev.s3.amazonaws.com/i/vughtqa3l0srobo5jsx3.JPG)

Update the _requirements.txt_ file by adding _python-dotenv_.

![code39](https://thepracticaldev.s3.amazonaws.com/i/cm1nv9ykh54cbjlzzrlj.JPG)

Let's use a virtual environment again by executing the commands below:

```bash
python -m venv venv

.\venv\Scripts\Activate.ps1
```

Install the _python_dotenv_ package inside the venv:

```bash
pip install -r requirements.txt
```

The result will be:

![code40](https://thepracticaldev.s3.amazonaws.com/i/31v520qhq7ynj2ud8cvc.JPG)

Finally, run this command:

```bash
python .\examples\keys.py
```

The result will be:

![code41](https://thepracticaldev.s3.amazonaws.com/i/btzd0m01ogktm15pvcqi.JPG)

### decorators.py

How to use decorators in functions.

![code42](https://thepracticaldev.s3.amazonaws.com/i/x3o2hp1tnnazck67eyte.JPG)

Run the command:

```bash
python .\examples\decorators.py
```

The result will be:

![code43](https://thepracticaldev.s3.amazonaws.com/i/4vkva3ro7wsorvj2iy9p.JPG)

## Conclusion
We have finally ended this series!
Now you have the basics to start working with Python.
Laravel beyond CRUD
Tags: laraval, php, ddd
Published: 2019-10-23 06:48:58

---
title: Laravel beyond CRUD
published: true
date: 2019-10-16 00:00:00 UTC
tags: laraval, php, ddd
canonical_url: https://stitcher.io/blog/laravel-beyond-crud
---

- 00. Preface
- [01. Domains](https://stitcher.io/blog/laravel-beyond-crud-01-domain-oriented-laravel)
- [02. Working with data](https://stitcher.io/blog/laravel-beyond-crud-02-working-with-data)
- 03. Actions: coming next week
- 04. Models: coming soon
- More chapters are in the making

## Preface

> A book for PHP developers working on larger-than-average Laravel projects

I've been writing and maintaining several larger-than-average web applications for years now. These are projects that take a team of developers to work on it for at least a year, often times longer. They are projects that take more than the well-known Laravel CRUD approach to stay maintainable.

In this time I've looked at several architectures which would help me and our team improve the maintainability of these projects, as well as help make the development more easy, both for us and our clients: DDD, Hexagonal Architecture, Event Sourcing.

Because most of these projects were large, yet not ginormous, these paradigms as a whole were almost always overkill. On top of that were we still dealing with fixed deadlines, meaning we couldn't spend ages on fine tuning the architecture.

In general, these were projects with a development lifespan of six months to one year, with a team of three to six developers working on them simultaneously. After going live, most of these projects are still heavily worked on for years to come.

In this book, I'll write about the knowledge we gained over the years in designing these projects. I will take a close look at the "Laravel way", and what did and didn't work for us.This book is for you if you're dealing with these larger Laravel projects, and want practical and pragmatic solutions in managing it.

I will talk about theory, patterns and principles, though everything will be in context of a real-life, working web application.

The goal of this book is to hand you concrete solutions to real life problems, things you can start doing different in your projects today. Enjoy!

## About me

My name is Brent, I'm a 25-year old web developer living in Belgium. I've been writing PHP professionally for the past 5 years, and have been programming since I was 13 years old.

As a professional, I've mainly worked on medium- to large sized web applications and APIs. Right now I work with Laravel at a company called [Spatie](https://spatie.be), and before that I worked with both Symfony and company-specific frameworks.
Daily random knowledge from Wikipedia
Tags: routines
Published: 2020-02-16 12:39:21

---
title: Daily random knowledge from Wikipedia
published: true
date: 2019-10-16 00:00:00 UTC
tags: routines
canonical_url: https://jagascript.com/daily-knowledged-wikipedia/
---

In the past few weeks, I’ve added an interesting new “todo” to my morning routine: to read [Wikipedia’s Main page](https://en.wikipedia.org/wiki/Main_Page)

This page is updated every day to show a Featured article, facts happened the same day in the past, some _Did you know_ interesting events and a Featured Image with a detailed caption.

This allows me to know a lot of interesting information every day with little to no effort, the best part is that I get to know facts I would probably never search for otherwise.

A couple of days ago I started reading a fact about [Lincoln](https://en.wikipedia.org/wiki/Abraham_Lincoln) and link after link I read very interesting stuff related to the [White House](https://en.wikipedia.org/wiki/White_House)

Did you know every new US president have a budget of $100.000 to changes things in the White House?

President Obama built a basketball court for example.

Did you know the President’s [desk](https://en.wikipedia.org/wiki/Resolute_desk) in the Oval Office was a gift from Queen Victoria and was built from the timbers coming from a British Ship that the USA helped recover in the Artic?

## <svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>fun fact

Italian’s main page is different from the English one.

we have:

- born and dead anniversaries
- holidays
- no detailed description for the image of the day
- a single _Did you know_
- a call to action to translate a page not yet available in Italian
- a book of the Month from Wikisource
- a destination of the Month from Wikivoyage

## <svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>Conclusion

Most of these are far from being _must know_ pieces of information but I really enjoy getting to know more about the world I live in

Especially if It’s one click away.