text
stringlengths
0
267k
# coding=utf-8
from emft.core import constant
from emft.core.logging import make_logger
from emft.gui.base import GridLayout, HSpacer, Label, VLayout, VSpacer
from emft.gui.main_ui_tab_widget import MainUiTabChild
LOGGER = make_logger(__name__)
class TabChildAbout(MainUiTabChild):
def tab_clicked(self):
pass
@property
def tab_title(self) -> str:
return 'About'
def __init__(self, parent=None):
super(TabChildAbout, self).__init__(parent)
repo_label = Label(
'''<a href='{link}'>{link}</a>'''.format(link=constant.LINK_REPO)
)
repo_label.setOpenExternalLinks(True)
changelog_label = Label(
'''<a href='{link}'>{link}</a>'''.format(link=constant.LINK_CHANGELOG)
)
changelog_label.setOpenExternalLinks(True)
self.setLayout(
VLayout(
[
GridLayout(
[
[Label('Github repository: '), repo_label, HSpacer()],
[Label('Changelog: '), changelog_label, HSpacer()],
],
[0, 0, 1]
),
VSpacer(),
]
)
)
# Original author: D. Eppstein, UC Irvine, August 12, 2003.
# The original code at http://www.ics.uci.edu/~eppstein/PADS/ is public domain.
# Copyright (C) 2004-2016 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# Tomas Gavenciak <gavento@ucw.cz>
# All rights reserved.
# BSD license.
#
# Authors: Tomas Gavenciak <gavento@ucw.cz>
# Aric Hagberg <aric.hagberg@lanl.gov>
"""Functions for reading and writing graphs in the *graph6* format.
The *graph6* file format is suitable for small graphs or large dense
graphs. For large sparse graphs, use the *sparse6* format.
For more information, see the `graph6`_ homepage.
.. _graph6: http://users.cecs.anu.edu.au/~bdm/data/formats.html
"""
import networkx as nx
from networkx.exception import NetworkXError
from networkx.utils import open_file, not_implemented_for
__all__ = ['read_graph6', 'parse_graph6', 'generate_graph6', 'write_graph6']
def parse_graph6(string):
"""Read a simple undirected graph in graph6 format from string.
Parameters
----------
string : string
Data in graph6 format
Returns
-------
G : Graph
Raises
------
NetworkXError
If the string is unable to be parsed in graph6 format
Examples
--------
>>> G = nx.parse_graph6('A_')
>>> sorted(G.edges())
[(0, 1)]
See Also
--------