Skip to content

Instantly share code, notes, and snippets.

Jeet Sukumaran jeetsukumaran

View GitHub Profile
View parsetexerr
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import os
import pathlib
import sys
import argparse
import codecs
View fix-git-branch-names.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import pathlib
import sys
import argparse
import subprocess
"""
View fix-git-branch-name.sh
#! /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
View flattendirs
#! /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 Mar 15, 2020
Modified Sphinx Makefile --- copies HTML documentation to project/docs folder to be deployed as a Github project static website
View Makefile
# Minimal makefile for Sphinx documentation
# Project organization assumed:
#
# project1/
# docs/
# src/
# project1/
# project1-docs/
# build/
# source/
@jeetsukumaran
jeetsukumaran / setup.py
Last active Mar 14, 2020
How to specify a repository clone/check-out as a source for ``install_requires`` in a Python package
View setup.py
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",
View property.py
#! /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):
View t.nex
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 May 7, 2020
Script to drive Restic
View bu
#!/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:
View install-r-on-hpc-with-no-admin-priv.sh
#! /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
You can’t perform that action at this time.