This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "metadata": { | |
| "name": "" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "metadata": { | |
| "name": "" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ | |
| { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "metadata": { | |
| "name": "simple_tf_gene_network" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ | |
| { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ProgressPrinter(object): | |
| """ | |
| Write a recurring message to a stream on the same line. | |
| Warning | |
| ------- | |
| Only works properly if the message fits on a single line for the given | |
| stream. | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def __getattr__(self, attribute): | |
| """ | |
| Defer any attribute access that was unsuccessful to a compound class. | |
| Introduce a safeguard, for example, when unpickling this class, by raising an AttributeError. | |
| """ | |
| if "compound" in self.__dict__: | |
| self.compound.__getattribute__(attribute) | |
| raise AttributeError("'{0}' object has no attribute '{1}'".format(self.__class__.__name__, attribute)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MetaBase(type): | |
| """ | |
| Metaclass for MutableBase. | |
| This metaclass is one of two possible solutions to having a per-class | |
| mutable class attribute. The per-class aspect is tricky because the | |
| attribute is a mutable object. It is thus shared among MutableBase and all | |
| its subclasses. | |
| Shared state of the mutable class attribute is avoided with this metaclass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def convert_argument(arg, new_type, default=None): | |
| """ | |
| Convert an argument to a new type unless it is `None`. | |
| """ | |
| return default if arg is None else new_type(arg) |