How to use the dynetx.utils.open_file function in dynetx

To help you get started, we’ve selected a few dynetx examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GiulioRossetti / dynetx / dynetx / readwrite / edgelist.py View on Github external
@open_file(0, mode='rb')
def read_interactions(path, comments="#", directed=False, delimiter=None,
                      nodetype=None, timestamptype=None, encoding='utf-8', keys=False):
    """Read a DyNetx graph from interaction list format.


        Parameters
        ----------

        path : basestring
            The desired output filename

        delimiter : character
            Column delimiter

        comments: character
            Comments row identifier
github GiulioRossetti / dynetx / dynetx / readwrite / edgelist.py View on Github external
@open_file(0, mode='rb')
def read_snapshots(path, comments="#", directed=False, delimiter=None,
                   nodetype=None, timestamptype=None, encoding='utf-8', keys=False):
    """Read a DyNetx graph from snapshot graph list format.


        Parameters
        ----------

        path : basestring
            The desired output filename

        delimiter : character
            Column delimiter

        comments: character
            Comments row identifier
github GiulioRossetti / dynetx / dynetx / readwrite / edgelist.py View on Github external
@open_file(1, mode='wb')
def write_interactions(G, path, delimiter=' ', encoding='utf-8'):
    """Write a DyNetx graph in interaction list format.


        Parameters
        ----------

        G : graph
            A DyNetx graph.

        path : basestring
            The desired output filename

        delimiter : character
            Column delimiter
github GiulioRossetti / dynetx / dynetx / readwrite / edgelist.py View on Github external
@open_file(1, mode='wb')
def write_snapshots(G, path, delimiter=' ', encoding='utf-8'):
    """Write a DyNetx graph in snapshot graph list format.


        Parameters
        ----------

        G : graph
            A DyNetx graph.

        path : basestring
            The desired output filename

        delimiter : character
            Column delimiter