Skip to content

Instantly share code, notes, and snippets.

View linminhtoo's full-sized avatar

Lin Min Htoo linminhtoo

View GitHub Profile
@alvinncx
alvinncx / notes.md
Last active August 24, 2020 10:35
My thoughts on Sandi Metz's presentation on better OOP Design

My thoughts on Sandi Metz's presentation on better OOP Design

Youtube Link

How to write better Object Oriented code. The central claim is that OO is not a problem, but many teams are not utilising the features of OO to design better code. Her other point is also that design becomes more important late stage as code bases becomes bigger.

Takeaway points

  • Premature design is bad. Does not really add value. However when design is required later, it is too late and most people don't know how to do it properly.
  • Code that is properly abstracted should be easier to change than complex routines. However, wrongly abstracted code can also make it as difficult at complex code.
@PatWalters
PatWalters / split_complex.py
Last active August 30, 2024 14:57
Split a protein-ligand complex into protein and ligands and assign ligand bond orders using SMILES strings from Ligand Expo
#!/usr/bin/env python
# Split a protein-ligand complex into protein and ligands and assign ligand bond orders using SMILES strings from Ligand Export
# Code requires Python 3.6
import sys
from prody import *
import pandas as pd
from rdkit import Chem
from rdkit.Chem import AllChem
@sbliven
sbliven / cif2pdb.py
Created April 26, 2017 19:27
Convert mmCIF files to PDB format using biopython
#!/usr/bin/env python
"""
Script to convert mmCIF files to PDB format.
usage: python cif2pdb.py ciffile [pdbfile]
Requires python BioPython (`pip install biopython`). It should work with recent version of python 2 or 3.
@author Spencer Bliven <[email protected]>
"""
@sloria
sloria / bobp-python.md
Last active November 14, 2024 15:01
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork [email protected]