Skip to content

Instantly share code, notes, and snippets.

View jeetsukumaran's full-sized avatar

Jeet Sukumaran jeetsukumaran

View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import os
import pathlib
import sys
import argparse
import codecs
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import pathlib
import sys
import argparse
import subprocess
"""
#! /bin/bash
# Fix your Git repo branch names.
# Free to use (at your own risk), and share/modify, as long
# as you are not a racist or a tedious "2-sides" bore.
set -x
set -e -o pipefail
git branch -m master main
git push
git push origin :master
git push --set-upstream origin main
#! /usr/bin/env python3
################################################################################
# Copyright 2020 Jeet Sukumaran
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@jeetsukumaran
jeetsukumaran / Makefile
Created March 15, 2020 22:27
Modified Sphinx Makefile --- copies HTML documentation to project/docs folder to be deployed as a Github project static website
# Minimal makefile for Sphinx documentation
# Project organization assumed:
#
# project1/
# docs/
# src/
# project1/
# project1-docs/
# build/
# source/
@jeetsukumaran
jeetsukumaran / setup.py
Last active March 14, 2020 21:44
How to specify a repository clone/check-out as a source for ``install_requires`` in a Python package
setup(
name="tecolotl",
version="1.0",
author="Tlacalel",
author_email="tlacalel@tenochtitlan.anhuac",
packages=find_packages("src"),
package_dir={"": "src"},
scripts=[
"bin/tecolotl-check",
"bin/tecolotl-estimate",
#! /usr/bin/env python
# -*- coding: utf-8 -*-
class A(object):
def __init__(self):
self._foo = None
def foo():
doc = "The foo property."
def fget(self):
Begin data;
Dimensions NTAX=4 NCHAR=1;
Format MISSING=? GAP=- DATATYPE=DNA;
Matrix
S1 G
S2 C
S3 A
S4 T
;
END;
@jeetsukumaran
jeetsukumaran / bu
Last active August 30, 2022 20:32
Script to drive Restic
#!/usr/bin/env bash
#
# bu: Backup data to repository.
#
# Type 'bu --help' for help on actions and options.
#
# Configuration of 'bu' is done via environmental variables which can be set by user
# in a particular session or saved to a file and read by 'bu'.
#
# Examples of backup configuration files:
#! /bin/sh
# Just a little bit of a dependency dance here:
cd ~/src
wget --no-check-certificate https://zlib.net/zlib-1.2.11.tar.gz
tar xf zlib-1.2.11.tar.gz
cd zlib-1.2.11.tar.gz
configure --prefix=$HOME/Environment/local
make && make install