teleren/devto huggingface dataset:
My Unique Project - Github Graph Magician
Tags: webperf, vscode, webdev
Published: 2020-09-02 08:09:55

Here is an exciting new update! 😀

### The GitHub Contribution Graph

All those folks using GitHub, know that there is a **Contribution Graph** in GitHub that represent the statistics of the user's contributions over the past year in a Graphical Design so that it colors the date of contribution. That's cool, right?

So, what I have developed?

## [GitHub Graph Magician](https://faatehsultan.github.io/github-graph-magician)

Ever wanted to design your contribution graph yourself? That sounds pretty awesome 😎. I have developed a unique tool, that you can use to design any pattern on your GitHub Contribution Graph, without knowing any technicalities behind the curtain!

Here is a quick walkthrough about how to use this tool

1. First, install [Node JS](https://nodejs.org/en/download/) on your PC as per your operating system.
2. Go to [GitHub Graph Magician (developed by me 😁)](https://faatehsultan.github.io/github-graph-magician)
3. Follow the instruction mentioned on the website
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/41k8uit2iv6ga7tn8m23.jpg)
4. and SEE THE MAGIC HAPPEN! 😍😍😍

P.S.: This website works on screens greater than 695px. This means that you won't be able to use it on your mobile phones (also not intended for 😂)

Remember me in your prayers!

Allah Hafiz!
Simulating the flip of a coin using python
Tags: probability, python, simulation, coinflip
Published: 2020-09-02 07:49:42

Recently I published a YouTube video in which I calculated the probability of a head on a coin flip. The catch here is that it is also to be demonstrated using a computer program simulating a coin flip for at least a million iterations. You can watch the video here - 
{% youtube Aexx33WA6ig %}

Mathematically speaking, the probability of an event is calculated by the following formula -

> Probability of an event = {% katex inline %}(Number~of~favorable~events)/(Number~of~all~possible~events){% endkatex %}

Here, in this scenario, the favorable event is the appearance of 'Head' and all possible events are any of the faces 'Heads or Tails'. Thus the number of favorable events is 1 whereas the number of all possible events is 2. Thus according to the formula of probability- we get a probability of 1/2 or 50% approx.

Well, now is the time to simulate that using python. Let's get moving -

First of all, import the `random` module because we have to randomly select a face of the coin.
```python
import random
```

Now, its time to create a function, we name it `experiment`. This function will simulate one coin flip and return 1 if we get a Head and 0 if we got a Tail.

```python
def experiment():
    faces = ['T', 'H'] # all possible faces
    top_face = random.random(faces) # randomly choose a face
    
    if top_face == 'H': # Checking if we got a head
        return 1 # return 1 if success
    return 0 # otherwise return 0
```
Now that we have created our function, its time to test it for a million iterations -

```python
headCounter = 0 # variable to count the number of times we get heads
# conduct the experiment a million times and count the heads
for _ in range(1000000):
    headCounter += experiment()
# Print the results as percentage of total number of iterations
print(f"The probability of getting head is {headCounter / 1000000 * 100}%")
```

In my tests, I am consistently getting numbers close to 50 such as 50.0021% and 50.0017% which is in-line with our calculations.

Hope you enjoyed this article. You can also watch my YouTube video here on which this article is based.

Thanks and bye guys. I will see you in the next one.
Starting #100daysofcode challenge as a newbie. how does it feel, and how I am starting...
Tags: 100daysofcode, devcommunity, twitter, startofmylife
Published: 2020-09-02 07:34:08

So here we are, talking about the start of my journey , well i will start by telling you that i was on twitter and got to know some people that did this challenge and are very happy with what they have become as a developer.so I thought of first planing it out of how do I have to spend the next 100 days and what things I have to learn , when I start thinking I made a list of like 30+ things that I have to learn , and I was like damn, I won't be able to do it, and left the thought of starting. 

After some more time on twitter, I thought of at least starting and thought that I will do at least something than nothing.

..so yeah I made another planing session and got to know where to start from ie., THE BASICS...yeah frontend and then backend. and then moving forward step by step...

I am very excited about how these days of my life are gonna be, and I am looking forward to completing this challenge for now and not quitting it in between.
Create a custom toString method.
Tags: javascript
Published: 2020-09-02 07:26:56

Do you get really angry if you see `[object Object]` in your browser. Well, this is the fix you might not need.

If an object has a toString method on itself that method will be called whenever javascript is trying to make the object to a string. Cool, right? 

For example to output the name in a cool way at all times create a function that returns an object with your custom toString method.

```javascript
function createPerson(firstName, lastName) {
  function toString() {
    return `${this.lastName}, ${this.firstName} ${this.lastName}`;
  }

  return {
    firstName,
    lastName,
    toString
  }
}
```

Now 

```javascript
JD = createPerson("John", "Doe");
let html = `<q>My name is: ${JD}.</q>`;
document.body.innerHTML = html;
```

Of course you could also do this if you feel like it: 

```javascript
Object.prototype.toString = function toString() {
  throw new Error("Do not parse ME as a string!");
}
```

I hope you find this useful or interesting.
Announcing Jupiter Release 0.4.0
Tags: jupiter, post
Published: 2020-09-02 14:35:37

---
title: Announcing Jupiter Release 0.4.0
published: true
date: 2020-09-02 07:20:05 UTC
tags: jupiter,post
canonical_url: https://horia141.com/announcing-jupiter-0.4.0.html
series: "Jupiter Dev Log"
---

Today marks the date of the fourth “minor” release of Jupiter - version `0.4.2`. It’s a massive release, and the lastone I’ll make this massive! It literally has tens of big changes, and took about 5 months to deliver! Not cool forsuch a small project.

Checkout the [release notes](https://jupiter-goals.readthedocs.io/en/stable/releases/version-0.4.2/) for the full info.

I’ll summarize the changes here though:

- Brand new and expanded [docs](https://jupiter-goals.readthedocs.io/). More stuff to come here!
- Massive rethink of the way storage is handled - new format is simpler and more robust.
- Added the ability to build [reports](https://jupiter-goals.readthedocs.io/en/stable/concepts/reporting) for past activity.
- Made a unified `sync` [command](https://jupiter-goals.readthedocs.io/en/stable/concepts/notion-local-sync) instead of the various per-entity ones.
- Add a single `gc` [command](https://jupiter-goals.readthedocs.io/en/stable/concepts/garbage-collection) for clearing up stuff on Notion-side.
- Added commands to _hard remove_ entities from both [local storage](https://jupiter-goals.readthedocs.io/en/stable/concepts/local-storage) and Notion.
- Added the _timezone_ as a workspace-level setting.
- Introduced the concepts of _chores_ and _habits_. A recurring task can be one of these, and they’ll get slightlydifferent treatment when building reports, for example.
- Got rid of the _group_ property for recurring tasks.
- Helpful error links to the “How Tos” section on certain errors.
- A `--version` argument to the [CLI](https://jupiter-goals.readthedocs.io/en/stable/concepts/jupiter-cli).
- Added type annotations to the whole codebase.
- Removed the `--dry-run` argument to certain commands.
- Added many log messages, and added the ability to control the log levels shown, as well as a general `--verbose` flag.
- Upgrade to Python `3.8.5`.
- Many bugfixes and performance improvements.
How to Use Excel SINH Function in Office 365? – {with Examples}
Tags: excelfunctions, excelsinhfunctionino
Published: 2020-09-02 10:58:42

---
title: How to Use Excel SINH Function in Office 365? – {with Examples}
published: true
date: 2020-09-02 06:52:42 UTC
tags: ExcelFunctions,ExcelSINHFunctioninO
canonical_url: https://geekexcel.com/how-to-use-excel-sinh-function-in-office-365-with-examples/
---

## Excel SINH Function:

![SINH Function](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/SINH-Function.png)<figcaption id="caption-attachment-13120">SINH Function</figcaption>

In this tutorial, we will guide you to learn the usage of **Excel SINH Function in Office 365** with its syntax, explanation, and examples. Let’s step into this article!! Get an official version of **MS Excel** from the following link: [https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)



## **SINH Function – Explanation:**

- This function returns the **hyperbolic sine of a given input number**.
- For example, **SINH(2)** returns the output value as **3.62686**

## **Syntax:**

**=SINH(number)**

### Parameter Description:

**Number** – The input number to which you want to find the **hyperbolic sine**.

The formula for the hyperbolic sine is:

![Hyperbolic sine formula](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/1-4.png)<figcaption id="caption-attachment-13115">Hyperbolic sine formula</figcaption>

### Note:

- If the argument is a non-numeric value (letters and special characters) and then it returns [**#VALUE!** Error](https://geekexcel.com/how-to-fix-value-error-in-excel-office-365-with-example/).

## **Examples:**

Let’s see some examples to make it clear.

### Example 1:

- Refer to the below example image.
- Here, you can see the input numbers in **Column A** and its corresponding **hyperbolic sine values** in **Column B**.

![Example 1](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/2-3.png)<figcaption id="caption-attachment-13117">Example 1</figcaption>

### Example 2:

- If the argument is a non-numeric value (letters and special characters) and then it returns [**#VALUE!** Error](https://geekexcel.com/how-to-fix-value-error-in-excel-office-365-with-example/).

![Example 2](https://eadn-wc04-371788.nxedge.io/cdn/wp-content/uploads/2020/09/3.png)<figcaption id="caption-attachment-13118">Example 2</figcaption>

## **Verdict:**

In this tutorial,  you can understand the usage of **Excel SINH Function in Office 365** with its syntax, explanation, and examples. Drop your **feedback** in the below comment section. Thanks for visiting **[Geek Excel.](https://geekexcel.com/)** Keep Learning!!

### Similar Function:

- [**Excel COSH Function**](https://geekexcel.com/how-to-use-excel-cosh-function-in-office-365-with-examples/)

### Read Also:

- [How to Use Excel ASIN Function in Office 365? – (with Examples)](https://geekexcel.com/how-to-use-excel-asin-function-in-office-365-with-examples/)
- [How to Use Excel ATAN Function in Office 365? – (with Examples)](https://geekexcel.com/how-to-use-excel-atan-function-in-office-365-with-examples/)
Laravel Route Parameters & Controller Actions
Tags: php, laravel, webdev
Published: 2020-09-02 07:13:23

Laravel is nice. It'll automatically inject the models you need into your controller actions.

```php
// app/Http/Controllers/FilmReviewController.php
class FilmReviewController extends Controller {
    public function edit(Request $request, FilmReview $filmReview)
    {
        //
    }
}
```

What isn't nice though is that your controller action's parameter names must match the route parameter names. This might catch some of you by surprise. It sure did me.

Let's suppose I defined the following resource route:

```php
// routes/web.php
Route::resource('reviews', 'FilmReviewController');
```

This will create the following route for the `edit` action:

```http
PUT /reviews/{review}
```

I must now update my controller like so:

```php
// Notice I changed $filmReview to $review
public function edit(Request $request, FilmReview $review)
{
    //
}
```

If the route parameter name and the parameter name of your controller action don't match, the model won't be fetched from your db. So calls like `$review->id` will always return null.
Dockerize a new Rails application
Tags: rails, ruby, docker, tutorial
Published: 2020-09-02 06:48:00

A simple guide to get started with Rails and Docker.

Deploying a Ruby on Rails app to Docker is useful for distributing and containerizing your Ruby gems. This is helpful in particular if you have many projects that have different versions of both Ruby and Rails on your local system. Secondly, it becomes trivial to distribute your application without worrying about incompatibilities and unforeseen problems.

The following guide helps you setup a new project in Rails to build and deploy the image to a Docker container.

At the minimum you would need 5 files to get started:

1. Dockerfile

1. docker-compose.yml

1. .dockerignore

1. Gemfile

1. Gemfile.lock

## Dockerfile

{% gist https://gist.github.com/vshl/2a6bfbb31e0623e03f88337c71c33fec %}

For the Dockerfile, you will need to build a Ruby image that would install nodejs for Rails to run. The file takes the Gemfile and Gemfile.lock and copies them to the WORKDIR . The command bundle install is then run within the image to install the gems listed in the Gemfile.

## Gemfile

The Gemfile will initially only contain the Rails gem:

```
source 'https://rubygems.org' 
git_source(:github) { |repo| "https://github.com/#{repo}.git"

gem 'rails', '~> 5.2.4', '>= 5.2.4.2'
```

## Gemfile.lock

Gemfile.lock will be an empty file. Create one.

## docker-compose.yml

{% gist https://gist.github.com/vshl/a746af9cc386246efd42c6b065b14e9a %}

docker-compose will be the main file that sets up your debugger, server command to be executed and the volume share between your local machine and the docker image and the port to be exposed.

## .dockerignore

```
    .git/
    .gitignore
    log/*
    tmp/*
    db/*.sqlite3
    db/*.sqlite3-journal
```

Once the files are prepped, next is to build the image and setup a new Rails application in the image. In a terminal run:

`docker-compose up -d`

The command will run through the docker-compose.yml file and build the image. Once it’s complete you will have an image with the Rails gem installed. Next is to create a new Ruby on Rails application. We will use the created image to run a command in a container.

`docker-compose run web rails new . -GMOPCSJT --force --no-deps`

The arguments `-GMOPCSJT` are optional in case you will need to skip creating additional boilerplate files and directories for `-G git`, `-M action-mailer`, `-O active-record` , `-P puma` , `-C action-cable`, `-S sprockets` , `-J javascript`, `-T test-cases`. Feel free to add the arguments that you will require for your projects.

The command will create a Rails project in the `WORKDIR` of the Docker image. Once it’s complete, it is suitable to re-build your Docker image by running the command:

`docker-compose up -d --build`

On completion, you will have a server running on port 3000. [http://localhost:3000](http://localhost:3000)

That’s it!

I created a git repo so one can clone and get started right away:

`git clone git@github.com:vshl/rails-docker-skel.git`

I’ll continue to update that repo and this blog post as I find better ways to follow good practices.
A clear mind starts with a clear inbox
Tags: mentalhealth, healthydebate, devlive
Published: 2020-09-02 06:47:03

Inbox zero, that's what we will be talking about today.
There's nothing worse than getting behind your laptop and seeing an inbox that's unmaintainable.

The best habit I've ever started is inbox zero.

It not only makes your life easier, but actually gives you more peace and a clearer mind!

Today I'll guide you through this, and we are using this flowchart I made for you!

![Inbox Zero | Daily Dev Tips](https://cdn.hashnode.com/res/hashnode/image/upload/v1598878724531/kKpMPHBsX.jpeg)

## Don't overdo yourself

When starting to commit to inbox zero, don't overdo yourself.
When I began my inbox zero, I know I had thousands of emails, and I just moved ALL emails to "archive".

That was a relieve, and we can always search if we need one.

So let's start with that today

> Move all your mails to archive

## Inbox zero policies

The policy for inbox zero is different for everyone. This is my one:

- Mail comes in
- Is it a mailing list -> read/move to archive
- Is it spam -> delete
- Is it important and needs follow up 👇
- Can I reply right away? -> Reply -> else 👇
- Make a task for it and move to archive

With these simple steps, you'll always have a zero inbox and a clear mind.

Even when I come back from a holiday, I only need an hour max to go through my mailbox and perhaps make some tasks I can assign overtime.

### Pro-tip for newsletters

If your the person like me that's subscribed to many newsletters, evaluate every time you open one:

- Do I actually ever read these?
- Do I still resonate with this newsletter?

If the answer is No -> Unsubscribe

## Don't stress it

One important thing is not to stress about having a zero inbox all the time. It's about balance and enjoying life.
If you want to keep your focus, close your mail application and focus on other things.
There's always tomorrow to get to zero again.

What is your best tip for inbox zero?

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)

Illustration by Maria Shukshina from <a target="_blank" rel="noreferrer" href="https://icons8.com/">Icons8</a>
Salesforce Training Best Practices to Drive End User Adoption

Tags: salesforcetraining, useradoption
Published: 2020-09-02 06:19:57

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

The training phase of a [salesforce.com implementation](https://www.cloudanalogy.com/) is the best opportunity to drive end-user adoption. To increase your chances of success, follow these good training practices:

**1. Role-based training:** training should not be the same for all roles; It must be adapted to each role and start with the managers. focus on showing them the value of the tool and how to get the information they want from it; they don't need to know how to turn a lead into an opportunity as much as they need to know which reports will be most useful to them and how to run them

**2. Scenario-based training:** end users don't need to know * what * all screens and functions * do * as much as they need to know * when * to use salesforce.com; Instead of describing each screen, take an example from the real world and walk through it together; it almost ends up being more business process training than software training

**3. Train as a team:** it is crucial that the manager is training with the end users (after ensuring that the managers see the value of salesforce.com, of course); With their manager present, end users know that management is involved and expected, and they are less likely to say or think "this is a waste of time, I'm not doing it"

**4. Train in the Live System:** It's tempting to train in a fictitious organization with leads and fake contacts and other data, but then you have to trust users to take what they have learned and put it in. translate to the real world; instead, ask them to * actually * work with * real * data (for example, bring your stacks of business cards to class and enter actual leads during training); that way, they have already started using salesforce.com when they finish a day of class; It's so much easier to * keep * using a new tool than to * start * using it!

**5. Hands-on Training:** This may be obvious, but it should be noted: Most people don't learn by listening to an instructor or by watching videos and learning online; they learn by doing; each student should have their own workstation or device and should practice each process taught in the classroom

**6. Reinforce training over time:** Research shows that two weeks after training, people generally retain 2-4% of what they have learned ... unless they actually use what they learn. they learned; the one-time training strategy is not enough, as even the fastest end-users are unlikely to use the night delivered during the first week after training; you should check and update after one week and again after a second week

End-user adoption can be one of the hardest things to achieve with salesforce.com, but it's also one of the most important. With initial and ongoing support from direct managers, along with these best practices, any organization can expect and enjoy the high end-user adoption rates of [salesforce.com](https://www.cloudanalogy.com/).
Why Axios is reducing api response?
Tags: reactnative, javascript, help
Published: 2020-09-02 05:19:29

Is there any specific reason , why axios might reduce api response? such as the response is an array and there is 2 index data , but after axios process data only one remains. And if there is 1 index , it becomes an empty array. #axios #ReactNative
My code is given below , 
```let response = await axios.get(
      `$url`,
      {
        headers: {Authorization: authorize(token)},
      },
    );
    console.log(response);
Create your own proxy network using Tinyproxy
Published: 2020-09-02 04:38:40

I live in India and love watching TV shows. One of my favorite show is [The Good Place](https://en.wikipedia.org/wiki/The_Good_Place). Few months back, i had watched 2 seasons on Netflix India, and i got to know that all the 3 seasons were on Netflix US. So i needed a proxy to watch my favorite show on Netflix US.

In order to do that, there are couple of free options, one is to  install Opera Browser, which has an inbuilt VPN feature, the other is to create your own Proxy network using AWS EC2 and **Tinyproxy**.

[Tinyproxy](https://tinyproxy.github.io/) is a light-weight HTTP/HTTPS proxy daemon for POSIX operating systems, which is open source on Github.

In order to setup a proxy network, these are the steps you have to follow

* Launch an EC2 instance on AWS in the region where you want your network to pass through, in my case i chose N. California region.

Tutorial - https://aws.amazon.com/premiumsupport/knowledge-center/launch-instance-custom-ami/

* Make changes to security group of the EC2, so that it allows connections on 8888 port. Since 8888 port is the default port used by tinyproxy.
![Security group configuration for Tinyproxy](https://res.cloudinary.com/practicaldev/image/fetch/s--0kZ1Urvs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zlbkdjrxbhug9rn4dccq.png)

* Install tinyproxy on the instance and start it. To install tiny proxy, run below commands after sshing to your EC2 instance.

```
sudo apt update && sudo apt upgrade
sudo apt install tinyproxy
```

* Make changes to tinyproxy.conf, to allow your ip address to access the proxy.
```
sudo vim /etc/tinyproxy/tinyproxy.conf
```
Look for Allow 127.0.0.1 line and add your public IP

To know your public ip, search "my ip" on Google or run below command in terminal.

```
curl ifconfig.co
```

* Configure your newly created proxy in Firefox Browser

![Configuring proxy in Mozilla Firefox](https://dev-to-uploads.s3.amazonaws.com/i/bvbv02620b7l55eao9s5.png)

* Test your public ip address, by searching "my ip" on google. Or try opening Netflix in Firefox browser. You will have shows from your proxy server country!

Footnote - I have a created a tool [Youtube Cut](https://youtubecut.com) to cut parts of youtube video and download, you can also choose to download the entire video. Let me know if you found this helpful.