Skip to content

Instantly share code, notes, and snippets.

View skulumani's full-sized avatar

Shankar Kulumani skulumani

View GitHub Profile
@skulumani
skulumani / 01-basic-vim-setup.md
Last active September 23, 2023 02:12
A minimal vimrc setup for LaTeX on mac and linux

Vim configuration

You can spend lots of time getting vim setup to your liking, and probably never finish customizing. My suggestion is to start small and stick to the basics before going crazy with plugins. While I've included some plugins, the hope is that you can easily get started with LaTeX with a minimal of effort and/or Googling.

Here is a small section of some of the things I've figured out to have vim working for editing LaTeX files easily.

  1. Copy the file below to a file vimrc and start vim vim -u vimrc to use the file. After all your customization if you are happy then save your configuration to ~/.vimrc.

  2. You can then start vim and install the plugins using the command :PlugInstall

@skulumani
skulumani / ffmepg.md
Created March 30, 2018 19:32
FFMPEG Command

Make a video

ffmpeg -framerate 20 -i %07d.jpg -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" output.mp4
@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++
@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 / 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 / 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 / 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 / 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 / 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>
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