- 1 dummy
- 1.1 favorite configuration
- 1.2 For ssh keys
- 1.3 ssh key fingerprint
- 1.4 regenerate private key from public key
- 1.5 repository url
- 1.6 create first page
- 1.7 zip archive of a repo
- 1.8 Add table of contents to mediawiki files
- 1.9 useful links
- 1.10 Useful github repos
- 1.11 Check later
- 1.12 Sort later
- 1.13 my github stars
- 1.14 missing features
- 1.15 change remote's url from https to ssh
- 1.16 specify tab space width
- 1.17 github markdown notes
- 1.18 download a single file
- 1.19 nbviewer links
- 2 searching code
git config user.name "Kamaraju S. Kusumanchi" git config user.email email@example.com
For ssh keys
ssh-keygen -t rsa -C "firstname.lastname@example.org"
Add the key to ssh-agent
ssh-agent -s ssh-add ~/.ssh/id_rsa
To copy the key
clip < ~/.ssh/id_rsa.pub
ssh key fingerprint
ssh-keygen -l -f ~/.ssh/id_rsa -E md5
regenerate private key from public key
ssh-keygen -y -f ~/.ssh/id_rsa
Sample repository url
create first page
zip archive of a repo
Add /archive/master.zip to the end of a repo's URL. For example https://github.com/USER/REPO/archive/master.zip
Add table of contents to mediawiki files
To add the table of contents to a mediawiki file of a project wiki, use
See https://github.com/KamarajuKusumanchi/market_data/wiki/earnings for an example.
- close issues with commit - https://help.github.com/articles/closing-issues-using-keywords/
- searching code - https://help.github.com/articles/searching-code/
- https://stackoverflow.com/questions/21811581/fork-gist-to-repo-on-github - talks about how to import a gist into a github repository.
Useful github repos
- https://github.com/bjornstromeqt/lambda-finance/blob/master/src/google_finance/historical.py - queries finance.google.com using "import requests" module and passes query parameters as separate argument. This is strictly not necessary for google finance data as it can be obtained directly by using pd.read_csv as shown in https://github.com/KamarajuKusumanchi/market_data_processor/blob/master/google_finance.py . But want to keep this as it might be useful for getting data from other websites.
- https://github.com/rsheftel/pandas_market_calendars - calendars of stock exchanges to use with pandas for trading applications
- https://github.com/ChrisCummins/labm8 - uses "pip install -r requirements.txt" in .travis.yml and the requirements.txt has lines that specify the minimum required versions of a package (ex:- pandas >= 0.19.0)
- https://github.com/apache/arrow/tree/master/python - python API for underlying C++ libraries
- Uses https://github.com/apache/arrow-testing as a submodule. The arrow-testing contains data files used in testing.
- github hosts 78 million Git repositories.
my github stars
- If a csv file contains comments at the beginning, github does not render it as described in https://help.github.com/articles/rendering-csv-and-tsv-data/
change remote's url from https to ssh
git remote set-url origin email@example.com:USERNAME/REPOSITORY.git
git remote set-url origin firstname.lastname@example.org:KamarajuKusumanchi/notebooks.git
specify tab space width
Add ?ts=N to the URL. For example https://github.com/nayuki/Project-Euler-solutions/blob/master/python/p053.py?ts=4 will display tabs as 4 spaces wide and https://github.com/nayuki/Project-Euler-solutions/blob/master/python/p053.py?ts=8 will display them as 8 spaces wide.
github markdown notes
<!-- blah blah -->
### is bigger than #####
``` blah blah ```
- click and expand
<details> <summary>Click to expand</summary> whatever </details>
tags | collapsible
See https://github.com/ContinuumIO/anaconda-issues/issues/10992 for an example.
download a single file
curl https://raw.githubusercontent.com/user/repository/branch/filename -O
Example: The pdf version of OpenIntro Statistics 4th edition book is located at https://github.com/OpenIntroStat/openintro-statistics/blob/master/main.pdf . I downloaded it using
curl https://raw.githubusercontent.com/OpenIntroStat/openintro-statistics/master/main.pdf -O
Change github.com with nbviewer.jupyter.org/github
https://github.com/KamarajuKusumanchi/notebooks/blob/master/pandas/Select%20rows%20and%20columns.ipynb -> https://nbviewer.jupyter.org/github/KamarajuKusumanchi/notebooks/blob/master/pandas/Select%20rows%20and%20columns.ipynb
Some times github shows the following error when trying to display an ipython notebook
Sorry, something went wrong. Reload?
A workaround is to use nbviewer.jupyter.org.
search python files
search my repositories
tags | author
search by file extension
tags | search files with an extension
remove results from a user