Skip to content

Instantly share code, notes, and snippets.

Jeet Sukumaran jeetsukumaran

Block or report user

Report or block jeetsukumaran

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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 Oct 14, 2019
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
View results.tsv
L-BFGS-B 0.0 0.000000 True: b'CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL'
L-BFGS-B 0.1 0.100000 True: b'CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL'
L-BFGS-B 0.2 0.200000 True: b'CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL'
L-BFGS-B 0.3 0.300000 True: b'CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL'
L-BFGS-B 0.4 0.400000 True: b'CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL'
L-BFGS-B 0.5 0.500000 True: b'CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL'
L-BFGS-B 0.6 0.500000 True: b'CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH'
L-BFGS-B 0.7 0.500000 True: b'CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH'
L-BFGS-B 0.8 0.500000 True: b'CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH'
L-BFGS-B 0.9 0.656250 True: b'CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH'
@jeetsukumaran
jeetsukumaran / version.py
Created Apr 11, 2018
PEP 440 Python Versioning Compliance/Parsing
View version.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import re
VERSION_PATTERN = r"""
v?
(?:
(?:(?P<epoch>[0-9]+)!)? # epoch
@jeetsukumaran
jeetsukumaran / fb.obs.tsv
Created Sep 6, 2017
Distribution of Birthdays on FB (n=198) Raw
View fb.obs.tsv
Date Count
01-01 1
01-03 2
01-06 2
01-09 1
01-10 1
01-13 1
01-14 1
01-25 2
01-27 3
@jeetsukumaran
jeetsukumaran / dirichlet_partition.py
Created Jul 14, 2017
Randomly partitions a set of elements using the Dirichlet process
View dirichlet_partition.py
#! /usr/bin/env python
###############################################################################
##
## Copyright 2017 Jeet Sukumaran.
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or
## (at your option) any later version.
@jeetsukumaran
jeetsukumaran / 00iii.py
Last active May 19, 2017
Implicit Interface Discovery
View 00iii.py
#! /usr/bin/env python
import inspect
import sys
import collections
import re
class CallInfo(object):
def __init__(self,
@jeetsukumaran
jeetsukumaran / gist:42f7dfb67c4670f1ac150e10e76b5ace
Created Jan 6, 2017
Track history of commands together with directory in which they were executed
View gist:42f7dfb67c4670f1ac150e10e76b5ace
# History {{{1
# ==============================================================================
export HISTSIZE=10000 # limit of history loaded in memory
export HISTFILESIZE=1000000 # limit of history stored in file
_loghistory() {
# Detailed history log of shell activities, including time stamps, working directory etc.
#
You can’t perform that action at this time.