Skip to content

Instantly share code, notes, and snippets.

View skulumani's full-sized avatar

Shankar Kulumani skulumani

View GitHub Profile
function gitInfo=getGitInfo()
% Matlab script to get information about the Git repository in the current directory, including:
% - branch name of the current Git Repo
% -Git SHA1 HASH of the most recent commit
% -url of corresponding remote repository, if one exists
%
% The function first checks to see if a .git/ directory is present. If so it
% reads the .git/HEAD file to identify the branch name and then it looks up
% the corresponding commit.
%

Keybase proof

I hereby claim:

  • I am skulumani on github.
  • I am skulumani (https://keybase.io/skulumani) on keybase.
  • I have a public key whose fingerprint is 5DC0 E5C9 AD73 DC63 D61D 7445 20D0 6850 9346 6FC7

To claim this, I am signing this object:

Log into the site first and export the cookie
# HTTP Cookie File for domains related to xcdsystem.com.
# Downloaded with cookies.txt Chrome Extension (https://chrome.google.com/webstore/detail/njabckikapfpffapmjgojcnbfjonfjfg)
# Example: wget -x --load-cookies cookies.txt https://www.xcdsystem.com/aas/papers/index.cfm
#
www.xcdsystem.com FALSE / TRUE 0 JSESSIONID 40BA2E3B73B9C344A288EA59CA41DC4F.cfusion
First command I haven't tried yet
@skulumani
skulumani / anaconda installed
Created June 17, 2017 16:58
Installed anaconda packages for spacetrack
# packages in environment at /home/shankar/anaconda3:
#
_license 1.1 py36_1
alabaster 0.7.9 py36_0
anaconda custom py36_0
anaconda-client 1.6.0 py36_0
anaconda-navigator 1.4.3 py36_0
astroid 1.4.9 py36_0
astropy 1.3 np111py36_0
asyncio 3.4.3 <pip>
@skulumani
skulumani / pypi_instructions.md
Last active October 5, 2017 18:58
Pushing package to pypi
  1. Ensure the package directory is setup properly. Use the following structure:
README.rst
LICENSE
setup.py
requirements.txt
sample/__init__.py
sample/core.py
sample/helpers.py
docs/conf.py
@skulumani
skulumani / conda_build.md
Last active March 14, 2024 03:09
Conda Build from PyPi
  1. Use conda skeleton to copy a pypi package
conda skeleton pypi pyinstrument
conda-build pyinstrument
  1. Can install locally using if you copy the tar ball to the ~/anaconda3/conda-bld
conda install --use-local pyinstrument
  1. Build for Python 2.7, 3.4, 3.5 at a minimum
@skulumani
skulumani / anaconda-project.md
Last active October 6, 2017 19:03
Anaconda Project
  1. Create a minimum enviornment file that will run the program. It's better to list the explicit requirements rather than exporting form conda-env
  2. Save this as environment.yml in the project directory and run anaconda-project init
  3. Add a command using anconda-project add-command command_name "python main.py"
  4. Test it out by using anaconda-project run command_name
  5. If it's working then lock the version for all platforms using anaconda-project lock
  6. Create an archive using anaconda-project archive filename.zip
  7. Upload using anaconda-project upload

To run

@skulumani
skulumani / badges.md
Last active December 21, 2017 14:14
Badges and Shields for repos

GitHub tag Travis Coveralls github Codecov Read the Docs GitHub release

PyPI GitHub last commit GitHub commit activity the past week, 4 weeks, year

@skulumani
skulumani / roadster.py
Last active February 12, 2018 22:18
Roadster animation
"""Plot the SpaceX Roadster in the Heliocentric frame
The ephemerides for the Roadster can be found at the following locations:
-143205 : JPL Horizons
https://www.projectpluto.com/temp/spacex.htm
"""
import numpy as np
import matplotlib.pyplot as plt
@skulumani
skulumani / Makefile
Created February 26, 2018 17:30
Generic Makefile for a single executable
PRODUCT := ex6-10
# directories
BINDIR := bin
INCDIR := include
SRCDIR := src
BUILDDIR := build
# compiler flags
CXX := g++