Skip to content

Instantly share code, notes, and snippets.

View NatureGeorge's full-sized avatar
🌗
Still have lots more to work on.

Zefeng Zhu NatureGeorge

🌗
Still have lots more to work on.
View GitHub Profile
@NatureGeorge
NatureGeorge / rp.ipynb
Last active May 11, 2024 10:06
Jupyter Notebook Demo for calculating phi-psi info of a PDB file via Biopython
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from IPython.core.magic import register_line_magic
@register_line_magic
def styledf(line):
"""Style Pandas DataFrame
Usage:
>>> %styledf pandas.DataFrame
# Copyright (C) 2002, Thomas Hamelryck (thamelry@binf.ku.dk)
#
# This file is part of the Biopython distribution and governed by your
# choice of the "Biopython License Agreement" or the "BSD 3-Clause License".
# Please see the LICENSE file that should have been included as part of this
# package.
"""Turn an mmCIF file into a dictionary."""
@NatureGeorge
NatureGeorge / 2020-08-13-note-of-async-unsync.md
Last active August 15, 2020 09:42
Note of `async` and `unsync` programming in Python
title author date categories tags
Note of async and unsync programming in Python
Zefeng Zhu
2020-08-13 17:40:00 +0800
Notes
Programming
python
asynchronous-programming

About Hashable function

@NatureGeorge
NatureGeorge / dagdeps_unsync.py
Last active September 21, 2020 04:16
Example for generating an arbitrary DAG as a dependency map (single machine, unsync version)
# @Created Date: 2020-08-04 22:16:21 pm
# @Filename: dagdeps_unsync.py
# @Email: 1730416009@stu.suda.edu.cn
# @Author: ZeFeng Zhu
# @Last Modified: 2020-08-05 15:22:07 pm
"""
Example for generating an arbitrary DAG as a dependency map (single machine, unsync version).
Modification on MinRK's code
Reference
@NatureGeorge
NatureGeorge / dagdeps.py
Last active October 26, 2022 11:51
Example for generating an arbitrary DAG as a dependency map (single machine, async version)
# @Created Date: 2020-05-17 07:56:52 pm
# @Filename: dagdeps.py
# @Email: 1730416009@stu.suda.edu.cn
# @Author: ZeFeng Zhu
# @Last Modified: 2020-05-17 08:32:11 pm
"""
Example for generating an arbitrary DAG as a dependency map (single machine, async version).
Modification on MinRK's code