Skip to content

Instantly share code, notes, and snippets.

@04pallav
04pallav / publickey-git-error.markdown
Created September 14, 2018 07:11 — forked from adamjohnson/publickey-git-error.markdown
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "your_email@example.com". Th
@04pallav
04pallav / iplot and plot
Last active October 13, 2017 21:08
iplot and plot
py.iplot() when working in a Jupyter Notebook to display the plot in the notebook.
py.plot() to return the unique url and optionally open the url
https://plot.ly/python/file-options/
Updating old graphs and folder locations
https://plot.ly/python/getting-started/
offline plots
Cheat sheet
@04pallav
04pallav / new_gist_file_0
Created September 13, 2017 22:02
Survival Models
https://www.youtube.com/watch?v=Cg0Gl-_6TwM
https://www.analyticsvidhya.com/blog/2014/04/survival-analysis-model-you/
https://www.analyticsvidhya.com/blog/2014/04/solving-survival-model/
https://www.youtube.com/watch?v=17QbQF__9XM
https://rpubs.com/mjeagle/Surv
@04pallav
04pallav / new_gist_file_0
Created September 13, 2017 22:02
Key elements
Parameters ::::::::::: can be used to choose from multiple columns and mor dynamic views used along with calculated fields
Groups ::::::::::: can be used for coloring
Sets ::::::::::: Filters
Calculated fields :::::::::::
Pages ::: data across time
Actions ::: highlight tpecific bars or data points of charts
@04pallav
04pallav / new_gist_file.bat
Created September 13, 2017 22:02
copy folder
cp -R source destination/
@04pallav
04pallav / new_gist_file_0
Last active September 22, 2017 22:50
Create a file in Unix
vi test1.txt or gedit test1.txt
will open test1 file
type and :wq
@04pallav
04pallav / new_gist_file_0
Last active September 22, 2017 22:50
sh and zsh files Unix
Linux scripts are sh or zsh
vi test1.sh
First, the most common is to write a file, make sure the first line is
#!/bin/bash
chmod +x test1 # make this an executable
run using
@04pallav
04pallav / new_gist_file_0
Last active September 22, 2017 22:51
ls
ls / ----- lists the root diectory
ls -l ::line option ( -l ) which indicates we are going to do a long listing. A long listing has the following:
@04pallav
04pallav / new_gist_file_0
Last active September 22, 2017 22:51
echo
displays the message on screen
[pallanan@ta-hrer-2b-1199b137]~% echo hello
hello
[pallanan@ta-hrer-2b-1199b137]~% echo "hello"
hello
echo $SHELL
@04pallav
04pallav / new_gist_file_0
Last active September 22, 2017 22:51
search in all folders
find -name *hello* ## will search hello keyword in all filenames inside the folder