teleren/devto huggingface dataset:
What's your checklist and suggestions for starting a new tech project/blog?
Tags: discuss, career, sideprojects, watercooler
Published: 2020-05-26 02:56:14

I am working on a blog post that details the do's, dont's and provides few tips for starting a new tech project/blog - to help boost confidence for those with imposter syndrome or feel they have it(like me 😉) and scrap the projects in the initial phase itself.

I thought it would be best for the readers to add in the community input which is a vast knowledge.

I will give you the credits by linking your profile. I respect your privacy, if you would like to stay anonymous, please mention so by adding `anonymous: true` at the end of your comment.

Thank you so much for helping me and the community.
Cheers!
Git Credential Store
Tags: git
Published: 2023-01-06 01:22:53

---
title: Git Credential Store
published: true
date: 2020-05-26 02:30:49 UTC
tags: Git
canonical_url: https://brandonrozek.com/blog/gitcredentialstore/
---

Normally it is recommended to setup a SSH key with your Git hosting tool with choice. Though if that is not practical, another way you can avoid having to put in your git username and password every time you push your code is to make use of Git’s credential store.

To enable it globally across your projects

```
git config --global credential.helper store

```

Then you can edit the file `~/.git-credentials` with the following format

```
https://username1:password1@site1.com
https://username2:password2@site2.com

```

It is recommended to set your `.git-credentials` file with the same permissions you would see in a SSH private key file. Read and write permissions for the user only.

```
chmod 600 ~/.git-credentials

```
Trying Lazy Loading and getting flicker?
Tags: help, react
Published: 2020-05-26 02:26:55

Hey ya'll! Using suspense + lazy for the first time, would really really appreciate some help.

I've recently enabled suspense and lazy loading in my application, and when I apply them to my `<Router>`, I get a solid load + performance boost.

Was wondering though, in-between clicking on pages, I get this huge white flicker. I'm using it like so:

```
import React, { Suspense, lazy } from 'react';
import { BrowserRouter as Router, Route, Switch, Redirect } from 'react-router-dom';
{...}

const NotFound = lazy(() => import('./components/NotFound'));
const Feed = lazy(() => import('./components/Feed'));
const Food = lazy(() => import('./components/Food'));
{...}
import('./components/DEBUGEasyPeasyContents'));

const App: React.SFC = () => {
    const isLoggedIn = useStoreState(state => state.userModel.isLoggedIn);

    const Spinner = <Spin size="large" style={{ width: '100%', margin: 'auto', padding: '10%' }} />;

    return (
        <>
            <ReactNotification />
            <Router>
                <Suspense fallback={wrapHOC(Spinner)}>
                    <Switch>
                        {isLoggedIn && (
                            <>
                                <Route path="/login" exact={true} component={Login} />
                                <Route path="/changePassword" exact={true} component={wrapHOC(ChangePassword)} />
                                <Route path="/account" exact={true} component={wrapHOC(AccountInfo)} />
                                <Route path="/dashboard" exact={true} component={wrapHOC(Dashboard)} />
                            {...}
                    </Switch>
                </Suspense>
            </Router>
        </>
    );
};

export default App;

```

In-between clicking on pages, the whole page flashes white for like 1.3ms according to the chrome screenshot inspector. It ruins the performance boost for me, so I'm desperate to figure out the cause.

Any advice appreciated, thanks!
[UMBC grad 2020]
Tags: octograd2020
Published: 2020-05-26 01:55:30

# (A Semantically Rich Framework to AutomateCloud Service Level Agreements.)



## My Final Project
A Semantically Rich Framework to AutomateCloud Service Level Agreements


https://github.com/DivyaNat26/ 


## Consumers evaluate and choose cloud-based services based on Service Level Agreements (SLA). These agreements list the service terms and metrics to be agreed upon by the service providers and the customers. Current cloud SLAs are long text documents that require significant manual effort to parse and determine if providers meet the SLAs. Moreover, due to the lack of standardization, providers differ in the way they define the terms and metrics, making it more difficult to compare different provider SLAs. We have developed a novel framework to significantly automate the process of extracting knowledge embedded in cloud SLAsand representing it in a semantically rich ontology so that the user can make a calculated decision in choosing a provider. Our framework captures the key terms, measures, and deontic rules, in the form of obligations and permissions present in the cloud SLAs.In this paper, we discuss our framework, technique, and challenges in automating cloud services management. We also describe our results and their validation against standards
Machine Learning - Outliers, its type and causes
Tags: machinelearning, datascience
Published: 2020-05-26 01:53:04

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/coxd4uemnojrlbdj1td7.PNG)

OUTLIERS :

Outliers are points which are like introverts who never mingle with other points or group of points(distribution) like me. Outliers are extreme values that deviate from other observations on data, an outlier is an observation that diverges from an overall pattern on a sample. If the outliers are not treated during our EDA (Exploratory Data Analytics) the resulting machine learning model may have problems like low accuracy, errors etc.

TYPES OF OUTLIERS:

UNI-VARIATE OUTLIERS : It is a data point that consists of extreme value on one variable.

MULTIVARIATE OUTLIERS : It is the combination of unusual scores on atleast two variables.

TYPES OF OUTLIERS BASED ON ENVIRONMENT:

POINT OUTLIERS : They are single data points that lay far from the rest of the distribution.

CONTEXTUAL OUTLIERS : It deviates significantly with the respect to a specific context of the object (Noise)

COLLECTIVE OUTLIERS : A subset of data objects collectively deviate significantly from the whole data set, even if the individual data objects may not be the outliers.

CAUSES OF OUTLIERS:

Handling outliers is very important, because all the outliers aren't a bad thing. Its very important to understand that simply removing the outliers from our dataset without considering how they will impact the results is a recipe for disaster.

Outliers can impact the results of our analysis and statistical modelling in a drastic way. Especially in logistical regression, outliers has a greater impact and lets discuss about that in a separate post.

The causes of outliers are as follows,

1. Data Entry Errors (Human Errors)
2. Measurement Errors (Instrument errors)
3. Experimental Errors (Data Extraction or execution errors)
4. Intentional Errors (dummy outliers made to test detection methods)
5. Data Processing Errors ( Data manipulation or Data set unintended mutations)
6. Sampling Errors (Extracting or mixing data from wrong or various sources)
7. Natural (Its not an error, but an real extreme value in a Data)

In the next blog we can see about, detecting and dealing with outliers.
my personal checklist deploying to Heroku
Tags: heroku, beginners
Published: 2020-05-26 01:20:31

This post serves as my single source of truth deploying local changes to a Heroku app.

![deploy the app](https://media.giphy.com/media/CDZwopbecAbIc/giphy.gif)

#### Local(production) to Github(production)
1. Pull the latest changes from master `git pull origin master`
2. Switch to production branch. Update that shit `git checkout production`
3. Look over diffs for both master/production branches. It's more or less a sanity check `git diff production..master`. Take notes of features you're merging
4. Looks good? Merge changes from master to production on your production branch `git merge master`
5. Push the latest version production to Github `git push origin production`

---

#### Github(production) to Heroku Staging
1. Check Heroku for green status: `heroku status`
2. Push to production:master branch on staging, update the schema (if needed) and reboot the app `git push staging production:master && heroku run rake db:migrate -r staging && heroku restart -r staging`
3. Wait for the dyno slug to change `watch -n 5 bin/deploy_slug_information` _(details below on this script)_
4. Login to staging. Poke around features you just merged
5. Check JS console for any interesting front end errors
6. Check [Honeybadger](https://honeybadger.io/) for server errors

---

#### Github(production) to Heroku Production
1. Push to production:master branch on staging, update the schema (if needed) and reboot the app  `git push production production:master && heroku run rake db:migrate -r production && heroku restart -r production`
2. Ensure latest SHA release is the same as production branch `heroku releases -r production | grep <production_SHA>` 
3. Check HoneyBadger for errors from release

---

How to run `watch -n 5 bin/deploy_slug_information`:

#### Setup an executable in your bin directory to watch `./bin/deploy_slug_information`
```bash
#!/bin/bash

URL="https://my-app-name.com"

if [ "$1" == "staging" ]; then
  URL="https://my-app-name-staging.com"
fi

URL+="/deploy_slug_information.json"

echo $URL
curl -s $URL
echo
```

---

#### Add middleware to your Rails app `app/middleware/deploy_slug_information.rb`
```ruby
class DeploySlugInformationMiddleware
  HEADER        = "X-Slug-Commit".freeze
  JSON_ENDPOINT = "/deploy_slug_information.json".freeze

  def initialize(app)
    @app         = app
    @partial_sha = (ENV["HEROKU_SLUG_COMMIT"].to_s[0, 4].presence || "unknown").freeze
  end

  def call(env)
    if env["PATH_INFO"] == JSON_ENDPOINT
      json_endpoint_reply(env)
    else
      header_injection_reply(env)
    end
  end

  private

  def header_injection_reply(env)
    status, headers, response = @app.call(env)
    headers[HEADER] = @partial_sha
    [status, headers, response]
  end

  def json_endpoint_reply(env)
    body = { slug_commit: @partial_sha }.to_json

    headers = {
      "Content-Length" => body.length.to_s,
      "Content-Type"   => "application/json",
    }

    [200, headers, [body]]
  end
end
```
### Tips
- Unix trick -  use `fc` to edit and execute your most recently used shell command.
Laravel helper function
Tags: laravel
Published: 2020-05-26 01:15:21

As you know, Laravel is a modern, leading-edge framework for PHP developers 
I also seemed to learn it. I wanted to share with you 2 "helper" function That you should not be ignorant of them as laravel developer.

#dd()helper function
The full form of dd is "Dump and Die" that's mean your script will dump a variable then will die.it's useful when tracing your code searching for the error.

```php
dd($value);
```
#slug()helper function
In case you are building a blog website, you should pay attention to improving search engine results "SEO", which rely heavily on the **SLUG**
Laravel comes with a **SLUG** helper function that accepts a string and returns a link.
This usually used when saving the article or news we use the **SLUG** helper function to get the clean URL from the title of post or news 

```php
use Illuminate\Support\Str;

$slug = Str::of('your blog title')->slug('-'); // your-blog-title
```
A new tool for drawing mind maps: Abstraxo
Tags: mind, map, drawing, tool
Published: 2020-05-26 01:05:38

**[Abstraxo](https://abstraxo.com)** is a new web tool for visualizing, and sharing information by generating mind maps, or concept maps, through an intuitive user interface.

![Abstraxo example map structure 1](https://dev-to-uploads.s3.amazonaws.com/i/clpnaiie58th00yshrz6.png)

These are some of the highlights of what the app can do:
- nodes dynamically self position, no need to move them manually
- each node can hold user defined properties
- relations can be labeled
- create multiple maps (clusters) in the same view
- export (save) maps as a text in JSON format
- import (load) text in JSON format as a map
- multiple color schemes
- It is only going to get better, as I spend more time on rolling out improvements and gathering feedback.

_____

The app starts with a single node. Once pressed and selected, it provides users with several actions to choose from:

- new child: creates a child of the slected node
- edit: modify the node’s label
- open: opens a modal for managing properties (name-value pairs)
- delete: deletes the node and all its descendants
- expand/collapse: if the node’s children are visible: collapses the node (hides all the descendants), otherwise expands the node (spawns hidden descendants)

Additional mind maps (clusters) can be created by pressing the central button on the top.

![Abstraxo example map structure 2](https://dev-to-uploads.s3.amazonaws.com/i/t0w59p6qfligiiyc4h1a.png)

**Browser support**
- Chrome v67 — latest Chrome
- Firefox v69 — latest Firefox
- Edge v79 — latest Edge
Exact cross browser compatibility is unknown at this time.

The app is developed and published by me, on May 25th 2020. If you want to help me improve it, consider supporting me by buying me a “coffe” on app’s [donation page](https://abstraxo.com/donate). Thank you.
When a programmer is born
Tags: bash, github, linux, tutorial
Published: 2020-05-26 00:48:54

When Microsoft open-sourced [Microsoft GW-Basic](https://github.com/microsoft/GW-BASIC) using a 38 years commit, I thought: how is that possible?

Well, you can use an old computer, set a date in the past, commit. But it can be done with some bash and Git tricks.

## A magic touch

[touch](https://linux.die.net/man/1/touch) command allow us to create empty files and mess with the timestamp. So you can do:

```bash
$ touch -d '1972-11-28 13:25:00 -0300' README.md
$ ls -l
-rw-rw-r-- 1 rafael rafael    0 nov 28  1972 README.md
```

## The time-machine versioning

GIT has two dates related to a commit: `GIT_COMMITTER_DATE` and `GIT_AUTHOR_DATE`. According to [Git documentation](https://git-scm.com/docs/git);

- **GIT_AUTHOR_DATE**: The date used for the author's identity when creating commit or tag objects, or when writing reflogs.
- **GIT_COMMITTER_DATE**: The date used for the committer identity when creating commit or tag objects, or when writing reflogs.

Basically, the first affects the _commit_ date (seen on `git log` or on Github commit listing) and the second affects the _file_ date. You need to change both to get the complete effect.

`GIT_AUTHOR_DATE` can be set during the commit or amending a commit. `GIT_COMMITTER_DATE` must be in the environment to be considered. It's also possible to change them after (but that's harder, it can take a long time for big repositories).

## Jumping into the DeLorean

This small script glues the pieces together. It's supposed to run on a brand new folder, with any set of files you want. 

```bash
#!/bin/bash
DATE="1955-11-12 22:04 -0500"
touch -d "${DATE}" README.md
touch -d "${DATE}" lightning-on-the-clock.DOC
touch -d "${DATE}" any-other-file-you-want
git init
git add .
export GIT_COMMITTER_DATE=$DATE
git commit --date "${DATE}" -m "Initialize programmer"
unset GIT_COMMITTER_DATE
```

## Programmers' commit date

Just for fun, I create a repository using my birth date. You can clone and create your own born repository!

[https://github.com/rafaelgou/born](https://github.com/rafaelgou/born)

That's all for today.
Conditonals & Operators
Tags: swift, beginners
Published: 2020-05-26 00:27:17

1) What is a conditional?

	A- The conditional is used to make decisions in your code using, if, else if, and else. 

2) What is a logical operator?

	A- An operator is a special symbol or phrase that you use to check, change, or combine values.

3) Which are the most common logical operators?

	A- Logical operators modify or combine the Boolean logic values true and false. Swift supports the three standard logical operators found in C-based languages: 
Logical NOT (!a), Logical AND (a && b), Logical OR (a || b)
Make Python Social Again
Tags: python, showdev
Published: 2020-05-26 00:00:35

I wanted to make this quick post to tip off some folks about a project I've been trying to get off the ground on Twitter (apologies for the clickbait title). 

Since 2018, I've been building up [a portfolio of Python "How to" articles](https://therenegadecoder.com/series/how-to-python/). At this point, there are about 30 articles in the series, and I've been trying to continuously improve them. For example, about a year ago, I decided to add performance metrics to the articles, so people could see the performance difference between different solutions. 

Then, last August, [I started making my own YouTube videos](https://www.youtube.com/channel/UCpyoVwOqYRlSAEUPEn7P9hw) to enhance the content a bit. Eventually, I even came up with the idea of adding coding challenges at the end of each article, so readers could try applying what they learned. 

Unfortunately, as Google continued to punish sites for being "too slow," I ended up overhauling my theme to improve its speed. In fact, I ended up removing a ton of bloat including comments (which people rarely used anyway). Of course, this caused some problems. After all, I added challenges to my articles. Where the heck were people supposed to share their solutions?

As a result, I decided to push my readers off to social media! Now, I have my own hashtag ([#RenegadePython](https://twitter.com/hashtag/RenegadePython)) where folks can share solutions to my many challenges. For instance, here's one I made today for converting text into mocking SpongeBob case:

{% twitter 1264975318126919680 %}

I would love it if the folks of DEV could help me get this project off the ground by contributing some solutions of your own. Anyone up to it? If so, [here's the link again to my series](https://therenegadecoder.com/series/how-to-python/). Just about every article has a challenge!  

Alternatively, I have [a list of 100 code snippets](https://therenegadecoder.com/code/python-code-snippets-for-everyday-problems/) which will give you a nice overview of the series.
VSCode Recommended Extensions Script
Tags: vscode, ide, bash
Published: 2020-10-13 14:28:42

---
title: VSCode Recommended Extensions Script
published: true
date: 2020-05-26 00:00:00 UTC
tags: vscode, IDE, bash
canonical_url: https://tech.serhatteker.com/post/2020-05/generate-vscode-extensions/
---

We saw in the [post] we can use `.vscode/extensions.json` for workspace base extension recommendation. Ok but how we can generate this file in _a developer way_?

For a starting point, if you can look at the doc [Manage Extensions], you can see that you can list your extensions by:

```bash
$ code --list-extensions
```

## 0. Generate extensions.json script

```bash
#!/bin/bash

VSC_DIR="$PWD/.vscode"
EXTENSION_JSON="$VSC_DIR/extensions.json"
EXTENSION_LIST="$VSC_DIR/extensions.list"
TMP_FILE="$VSC_DIR/extensions-tmp.list"

echo "Copying Code extensions"
mkdir -p $VSC_DIR
cd $VSC_DIR

code --list-extensions > $EXTENSION_LIST
cp $EXTENSION_LIST $TMP_FILE
sed -i 's/.*/\t\t\"&\",/' $TMP_FILE

echo \
'{
    // See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
    // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

    // List of extensions which should be recommended for users of this workspace.
    "recommendations": [
        //user extensions
    ],
    // List of extensions recommended by VS Code that should not be recommended for users of this workspace.
    "unwantedRecommendations": [

    ]
}' > $EXTENSION_JSON
sed -e '/user extensions/ {' -e 'r extensions-tmp.list' -e 'd' -e '}' -i $EXTENSION_JSON
rm $TMP_FILE

cd $PWD
echo "Code extensions copied."
```

With above script it basically does 2 things:
1. Create `.vscode` and `extensions.json` & `extensions.list` files,
2. Echo your extensions into these files with right formats.

## 1.0 Install extensions in GUI
If you put your `.vscode/extensions.json` in your project root, after you open
your workspace with __VSCode__ it will ask you:

![VSCode Recommended Extension](/img/content/2020/vscode-rec-extensions.png)

## 1.1 Install extensions in cli
In the doc [Manage Extensions] we also see there is another flag option to allow us to install extensions:

```bash
$ code --install-extension
```

OK, how we can use this with our _generated_ _extensions files_? With some magic bash for sure:

```bash
$ cat .vscode/extensions.list | xargs -L 1 code --install-extension
```

### Extra
If you want to see my _extensions_ go to: [My VSCode Extensions].
Also you can check out my whole __VSCode__ _backup_: [My VSCode Backup]

All done!

[post]: https://tech.serhattker.com/post/2020-05/vscode-extensions-recommended/
[Manage Extensions]: https://code.visualstudio.com/docs/editor/extension-gallery#_manage-extensions
[My VSCode Extensions]: https://gist.github.com/SerhatTeker/7a7deb63f7836ac659bc19e07e974e7f#file-extensions-json
[My VSCode Backup]: https://gist.github.com/SerhatTeker/7a7deb63f7836ac659bc19e07e974e7f
Notification Pattern with C# and .NET Core
Tags: netcore, notificationpattern, csharp, video
Published: 2020-05-25 23:40:53

Hi everyone,

Have you ever needed to validate your own entities with C# and .NET Core instead of throwing exceptions when model validation was needed?

In this video I will explain how you can do that using Visual Studio 2019, C# and FluentValidator. 

Video available at: https://www.youtube.com/watch?v=9EzzKbXao2g

I hope you like it!
Record your terminal session using the `script`command.
Tags: bash, terminal, commandline
Published: 2020-05-25 22:34:43

I've been in the situation where I ran a script that behaved weirdly and would love to be able to "replay" what I did to figure out what went wrong. A useful command for those cases is `script(1)`.

The `script` command ([introduced in 1979](https://en.wikipedia.org/wiki/Script_(Unix))) allows you to record a terminal session to a file. You can later check and reference that file to analyse it as you please. Or maybe record your terminal as a demo.

As with any other Unix command, the power comes from your creativity on how to use it. You can use `script` to:

+ Record a demo.
+ Capture output.
+ Record session to report a bug.

You can try it just by typing `script` in your terminal. It opens up a new shell that will be recorded. By default, the session is saved in a file named `typescript`.

```bash
$ script
% ls
% exit
```

You can then view the capture by using `cat(1)`:

```bash
$ cat typescript
```

If you are interested in more detail, here are my notes on how to use it:

https://rderik.com/notes/using-the-script-command-to-record-a-terminal-session/