id int32 0 252k | repo stringlengths 7 55 | path stringlengths 4 127 | func_name stringlengths 1 88 | original_string stringlengths 75 19.8k | language stringclasses 1
value | code stringlengths 75 19.8k | code_tokens list | docstring stringlengths 3 17.3k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 87 242 |
|---|---|---|---|---|---|---|---|---|---|---|---|
12,000 | datascopeanalytics/scrubadub | scrubadub/scrubbers.py | Scrubber.clean | def clean(self, text, **kwargs):
"""This is the master method that cleans all of the filth out of the
dirty dirty ``text``. All keyword arguments to this function are passed
through to the ``Filth.replace_with`` method to fine-tune how the
``Filth`` is cleaned.
"""
if sy... | python | def clean(self, text, **kwargs):
"""This is the master method that cleans all of the filth out of the
dirty dirty ``text``. All keyword arguments to this function are passed
through to the ``Filth.replace_with`` method to fine-tune how the
``Filth`` is cleaned.
"""
if sy... | [
"def",
"clean",
"(",
"self",
",",
"text",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"sys",
".",
"version_info",
"<",
"(",
"3",
",",
"0",
")",
":",
"# Only in Python 2. In 3 every string is a Python 2 unicode",
"if",
"not",
"isinstance",
"(",
"text",
",",
"u... | This is the master method that cleans all of the filth out of the
dirty dirty ``text``. All keyword arguments to this function are passed
through to the ``Filth.replace_with`` method to fine-tune how the
``Filth`` is cleaned. | [
"This",
"is",
"the",
"master",
"method",
"that",
"cleans",
"all",
"of",
"the",
"filth",
"out",
"of",
"the",
"dirty",
"dirty",
"text",
".",
"All",
"keyword",
"arguments",
"to",
"this",
"function",
"are",
"passed",
"through",
"to",
"the",
"Filth",
".",
"re... | 914bda49a16130b44af43df6a2f84755477c407c | https://github.com/datascopeanalytics/scrubadub/blob/914bda49a16130b44af43df6a2f84755477c407c/scrubadub/scrubbers.py#L44-L62 |
12,001 | datascopeanalytics/scrubadub | scrubadub/scrubbers.py | Scrubber.iter_filth | def iter_filth(self, text):
"""Iterate over the different types of filth that can exist.
"""
# currently doing this by aggregating all_filths and then sorting
# inline instead of with a Filth.__cmp__ method, which is apparently
# much slower http://stackoverflow.com/a/988728/5647... | python | def iter_filth(self, text):
"""Iterate over the different types of filth that can exist.
"""
# currently doing this by aggregating all_filths and then sorting
# inline instead of with a Filth.__cmp__ method, which is apparently
# much slower http://stackoverflow.com/a/988728/5647... | [
"def",
"iter_filth",
"(",
"self",
",",
"text",
")",
":",
"# currently doing this by aggregating all_filths and then sorting",
"# inline instead of with a Filth.__cmp__ method, which is apparently",
"# much slower http://stackoverflow.com/a/988728/564709",
"#",
"# NOTE: we could probably do t... | Iterate over the different types of filth that can exist. | [
"Iterate",
"over",
"the",
"different",
"types",
"of",
"filth",
"that",
"can",
"exist",
"."
] | 914bda49a16130b44af43df6a2f84755477c407c | https://github.com/datascopeanalytics/scrubadub/blob/914bda49a16130b44af43df6a2f84755477c407c/scrubadub/scrubbers.py#L64-L96 |
12,002 | terrycain/aioboto3 | aioboto3/s3/inject.py | download_file | async def download_file(self, Bucket, Key, Filename, ExtraArgs=None, Callback=None, Config=None):
"""Download an S3 object to a file.
Usage::
import boto3
s3 = boto3.resource('s3')
s3.meta.client.download_file('mybucket', 'hello.txt', '/tmp/hello.txt')
Similar behavior as S3Transf... | python | async def download_file(self, Bucket, Key, Filename, ExtraArgs=None, Callback=None, Config=None):
"""Download an S3 object to a file.
Usage::
import boto3
s3 = boto3.resource('s3')
s3.meta.client.download_file('mybucket', 'hello.txt', '/tmp/hello.txt')
Similar behavior as S3Transf... | [
"async",
"def",
"download_file",
"(",
"self",
",",
"Bucket",
",",
"Key",
",",
"Filename",
",",
"ExtraArgs",
"=",
"None",
",",
"Callback",
"=",
"None",
",",
"Config",
"=",
"None",
")",
":",
"with",
"open",
"(",
"Filename",
",",
"'wb'",
")",
"as",
"ope... | Download an S3 object to a file.
Usage::
import boto3
s3 = boto3.resource('s3')
s3.meta.client.download_file('mybucket', 'hello.txt', '/tmp/hello.txt')
Similar behavior as S3Transfer's download_file() method,
except that parameters are capitalized. | [
"Download",
"an",
"S3",
"object",
"to",
"a",
"file",
"."
] | 0fd192175461f7bb192f3ed9a872591caf8474ac | https://github.com/terrycain/aioboto3/blob/0fd192175461f7bb192f3ed9a872591caf8474ac/aioboto3/s3/inject.py#L17-L30 |
12,003 | terrycain/aioboto3 | aioboto3/s3/inject.py | download_fileobj | async def download_fileobj(self, Bucket, Key, Fileobj, ExtraArgs=None, Callback=None, Config=None):
"""Download an object from S3 to a file-like object.
The file-like object must be in binary mode.
This is a managed transfer which will perform a multipart download in
multiple threads if necessary.
... | python | async def download_fileobj(self, Bucket, Key, Fileobj, ExtraArgs=None, Callback=None, Config=None):
"""Download an object from S3 to a file-like object.
The file-like object must be in binary mode.
This is a managed transfer which will perform a multipart download in
multiple threads if necessary.
... | [
"async",
"def",
"download_fileobj",
"(",
"self",
",",
"Bucket",
",",
"Key",
",",
"Fileobj",
",",
"ExtraArgs",
"=",
"None",
",",
"Callback",
"=",
"None",
",",
"Config",
"=",
"None",
")",
":",
"try",
":",
"resp",
"=",
"await",
"self",
".",
"get_object",
... | Download an object from S3 to a file-like object.
The file-like object must be in binary mode.
This is a managed transfer which will perform a multipart download in
multiple threads if necessary.
Usage::
import boto3
s3 = boto3.client('s3')
with open('filename', 'wb') as dat... | [
"Download",
"an",
"object",
"from",
"S3",
"to",
"a",
"file",
"-",
"like",
"object",
"."
] | 0fd192175461f7bb192f3ed9a872591caf8474ac | https://github.com/terrycain/aioboto3/blob/0fd192175461f7bb192f3ed9a872591caf8474ac/aioboto3/s3/inject.py#L33-L95 |
12,004 | terrycain/aioboto3 | aioboto3/s3/inject.py | upload_fileobj | async def upload_fileobj(self, Fileobj: BinaryIO, Bucket: str, Key: str, ExtraArgs: Optional[Dict[str, Any]] = None,
Callback: Optional[Callable[[int], None]] = None,
Config: Optional[S3TransferConfig] = None):
"""Upload a file-like object to S3.
The file-like ... | python | async def upload_fileobj(self, Fileobj: BinaryIO, Bucket: str, Key: str, ExtraArgs: Optional[Dict[str, Any]] = None,
Callback: Optional[Callable[[int], None]] = None,
Config: Optional[S3TransferConfig] = None):
"""Upload a file-like object to S3.
The file-like ... | [
"async",
"def",
"upload_fileobj",
"(",
"self",
",",
"Fileobj",
":",
"BinaryIO",
",",
"Bucket",
":",
"str",
",",
"Key",
":",
"str",
",",
"ExtraArgs",
":",
"Optional",
"[",
"Dict",
"[",
"str",
",",
"Any",
"]",
"]",
"=",
"None",
",",
"Callback",
":",
... | Upload a file-like object to S3.
The file-like object must be in binary mode.
This is a managed transfer which will perform a multipart upload in
multiple threads if necessary.
Usage::
import boto3
s3 = boto3.client('s3')
with open('filename', 'rb') as data:
s3.u... | [
"Upload",
"a",
"file",
"-",
"like",
"object",
"to",
"S3",
"."
] | 0fd192175461f7bb192f3ed9a872591caf8474ac | https://github.com/terrycain/aioboto3/blob/0fd192175461f7bb192f3ed9a872591caf8474ac/aioboto3/s3/inject.py#L98-L203 |
12,005 | terrycain/aioboto3 | aioboto3/s3/inject.py | upload_file | async def upload_file(self, Filename, Bucket, Key, ExtraArgs=None, Callback=None, Config=None):
"""Upload a file to an S3 object.
Usage::
import boto3
s3 = boto3.resource('s3')
s3.meta.client.upload_file('/tmp/hello.txt', 'mybucket', 'hello.txt')
Similar behavior as S3Transfer's u... | python | async def upload_file(self, Filename, Bucket, Key, ExtraArgs=None, Callback=None, Config=None):
"""Upload a file to an S3 object.
Usage::
import boto3
s3 = boto3.resource('s3')
s3.meta.client.upload_file('/tmp/hello.txt', 'mybucket', 'hello.txt')
Similar behavior as S3Transfer's u... | [
"async",
"def",
"upload_file",
"(",
"self",
",",
"Filename",
",",
"Bucket",
",",
"Key",
",",
"ExtraArgs",
"=",
"None",
",",
"Callback",
"=",
"None",
",",
"Config",
"=",
"None",
")",
":",
"with",
"open",
"(",
"Filename",
",",
"'rb'",
")",
"as",
"open_... | Upload a file to an S3 object.
Usage::
import boto3
s3 = boto3.resource('s3')
s3.meta.client.upload_file('/tmp/hello.txt', 'mybucket', 'hello.txt')
Similar behavior as S3Transfer's upload_file() method,
except that parameters are capitalized. | [
"Upload",
"a",
"file",
"to",
"an",
"S3",
"object",
"."
] | 0fd192175461f7bb192f3ed9a872591caf8474ac | https://github.com/terrycain/aioboto3/blob/0fd192175461f7bb192f3ed9a872591caf8474ac/aioboto3/s3/inject.py#L206-L219 |
12,006 | terrycain/aioboto3 | aioboto3/resources.py | AIOBoto3ResourceFactory._create_action | def _create_action(factory_self, action_model, resource_name,
service_context, is_load=False):
"""
Creates a new method which makes a request to the underlying
AWS service.
"""
# Create the action in in this closure but before the ``do_action``
# me... | python | def _create_action(factory_self, action_model, resource_name,
service_context, is_load=False):
"""
Creates a new method which makes a request to the underlying
AWS service.
"""
# Create the action in in this closure but before the ``do_action``
# me... | [
"def",
"_create_action",
"(",
"factory_self",
",",
"action_model",
",",
"resource_name",
",",
"service_context",
",",
"is_load",
"=",
"False",
")",
":",
"# Create the action in in this closure but before the ``do_action``",
"# method below is invoked, which allows instances of the ... | Creates a new method which makes a request to the underlying
AWS service. | [
"Creates",
"a",
"new",
"method",
"which",
"makes",
"a",
"request",
"to",
"the",
"underlying",
"AWS",
"service",
"."
] | 0fd192175461f7bb192f3ed9a872591caf8474ac | https://github.com/terrycain/aioboto3/blob/0fd192175461f7bb192f3ed9a872591caf8474ac/aioboto3/resources.py#L183-L240 |
12,007 | terrycain/aioboto3 | aioboto3/s3/cse.py | AsymmetricCryptoContext.from_der_private_key | def from_der_private_key(data: bytes, password: Optional[str] = None) -> _RSAPrivateKey:
"""
Convert private key in DER encoding to a Private key object
:param data: private key bytes
:param password: password the private key is encrypted with
"""
return serialization.lo... | python | def from_der_private_key(data: bytes, password: Optional[str] = None) -> _RSAPrivateKey:
"""
Convert private key in DER encoding to a Private key object
:param data: private key bytes
:param password: password the private key is encrypted with
"""
return serialization.lo... | [
"def",
"from_der_private_key",
"(",
"data",
":",
"bytes",
",",
"password",
":",
"Optional",
"[",
"str",
"]",
"=",
"None",
")",
"->",
"_RSAPrivateKey",
":",
"return",
"serialization",
".",
"load_der_private_key",
"(",
"data",
",",
"password",
",",
"default_back... | Convert private key in DER encoding to a Private key object
:param data: private key bytes
:param password: password the private key is encrypted with | [
"Convert",
"private",
"key",
"in",
"DER",
"encoding",
"to",
"a",
"Private",
"key",
"object"
] | 0fd192175461f7bb192f3ed9a872591caf8474ac | https://github.com/terrycain/aioboto3/blob/0fd192175461f7bb192f3ed9a872591caf8474ac/aioboto3/s3/cse.py#L149-L156 |
12,008 | terrycain/aioboto3 | aioboto3/s3/cse.py | S3CSE.get_object | async def get_object(self, Bucket: str, Key: str, **kwargs) -> dict:
"""
S3 GetObject. Takes same args as Boto3 documentation
Decrypts any CSE
:param Bucket: S3 Bucket
:param Key: S3 Key (filepath)
:return: returns same response as a normal S3 get_object
"""
... | python | async def get_object(self, Bucket: str, Key: str, **kwargs) -> dict:
"""
S3 GetObject. Takes same args as Boto3 documentation
Decrypts any CSE
:param Bucket: S3 Bucket
:param Key: S3 Key (filepath)
:return: returns same response as a normal S3 get_object
"""
... | [
"async",
"def",
"get_object",
"(",
"self",
",",
"Bucket",
":",
"str",
",",
"Key",
":",
"str",
",",
"*",
"*",
"kwargs",
")",
"->",
"dict",
":",
"if",
"self",
".",
"_s3_client",
"is",
"None",
":",
"await",
"self",
".",
"setup",
"(",
")",
"# Ok so if ... | S3 GetObject. Takes same args as Boto3 documentation
Decrypts any CSE
:param Bucket: S3 Bucket
:param Key: S3 Key (filepath)
:return: returns same response as a normal S3 get_object | [
"S3",
"GetObject",
".",
"Takes",
"same",
"args",
"as",
"Boto3",
"documentation"
] | 0fd192175461f7bb192f3ed9a872591caf8474ac | https://github.com/terrycain/aioboto3/blob/0fd192175461f7bb192f3ed9a872591caf8474ac/aioboto3/s3/cse.py#L330-L389 |
12,009 | terrycain/aioboto3 | aioboto3/s3/cse.py | S3CSE.put_object | async def put_object(self, Body: Union[bytes, IO], Bucket: str, Key: str, Metadata: Dict = None, **kwargs):
"""
PutObject. Takes same args as Boto3 documentation
Encrypts files
:param: Body: File data
:param Bucket: S3 Bucket
:param Key: S3 Key (filepath)
"""
... | python | async def put_object(self, Body: Union[bytes, IO], Bucket: str, Key: str, Metadata: Dict = None, **kwargs):
"""
PutObject. Takes same args as Boto3 documentation
Encrypts files
:param: Body: File data
:param Bucket: S3 Bucket
:param Key: S3 Key (filepath)
"""
... | [
"async",
"def",
"put_object",
"(",
"self",
",",
"Body",
":",
"Union",
"[",
"bytes",
",",
"IO",
"]",
",",
"Bucket",
":",
"str",
",",
"Key",
":",
"str",
",",
"Metadata",
":",
"Dict",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"self",
"... | PutObject. Takes same args as Boto3 documentation
Encrypts files
:param: Body: File data
:param Bucket: S3 Bucket
:param Key: S3 Key (filepath) | [
"PutObject",
".",
"Takes",
"same",
"args",
"as",
"Boto3",
"documentation"
] | 0fd192175461f7bb192f3ed9a872591caf8474ac | https://github.com/terrycain/aioboto3/blob/0fd192175461f7bb192f3ed9a872591caf8474ac/aioboto3/s3/cse.py#L482-L549 |
12,010 | astrofrog/fast-histogram | fast_histogram/histogram.py | histogram1d | def histogram1d(x, bins, range, weights=None):
"""
Compute a 1D histogram assuming equally spaced bins.
Parameters
----------
x : `~numpy.ndarray`
The position of the points to bin in the 1D histogram
bins : int
The number of bins
range : iterable
The range as a tupl... | python | def histogram1d(x, bins, range, weights=None):
"""
Compute a 1D histogram assuming equally spaced bins.
Parameters
----------
x : `~numpy.ndarray`
The position of the points to bin in the 1D histogram
bins : int
The number of bins
range : iterable
The range as a tupl... | [
"def",
"histogram1d",
"(",
"x",
",",
"bins",
",",
"range",
",",
"weights",
"=",
"None",
")",
":",
"nx",
"=",
"bins",
"if",
"not",
"np",
".",
"isscalar",
"(",
"bins",
")",
":",
"raise",
"TypeError",
"(",
"'bins should be an integer'",
")",
"xmin",
",",
... | Compute a 1D histogram assuming equally spaced bins.
Parameters
----------
x : `~numpy.ndarray`
The position of the points to bin in the 1D histogram
bins : int
The number of bins
range : iterable
The range as a tuple of (xmin, xmax)
weights : `~numpy.ndarray`
Th... | [
"Compute",
"a",
"1D",
"histogram",
"assuming",
"equally",
"spaced",
"bins",
"."
] | ace4f2444fba2e21fa3cd9dad966f6b65b60660f | https://github.com/astrofrog/fast-histogram/blob/ace4f2444fba2e21fa3cd9dad966f6b65b60660f/fast_histogram/histogram.py#L15-L58 |
12,011 | astrofrog/fast-histogram | fast_histogram/histogram.py | histogram2d | def histogram2d(x, y, bins, range, weights=None):
"""
Compute a 2D histogram assuming equally spaced bins.
Parameters
----------
x, y : `~numpy.ndarray`
The position of the points to bin in the 2D histogram
bins : int or iterable
The number of bins in each dimension. If given as... | python | def histogram2d(x, y, bins, range, weights=None):
"""
Compute a 2D histogram assuming equally spaced bins.
Parameters
----------
x, y : `~numpy.ndarray`
The position of the points to bin in the 2D histogram
bins : int or iterable
The number of bins in each dimension. If given as... | [
"def",
"histogram2d",
"(",
"x",
",",
"y",
",",
"bins",
",",
"range",
",",
"weights",
"=",
"None",
")",
":",
"if",
"isinstance",
"(",
"bins",
",",
"numbers",
".",
"Integral",
")",
":",
"nx",
"=",
"ny",
"=",
"bins",
"else",
":",
"nx",
",",
"ny",
... | Compute a 2D histogram assuming equally spaced bins.
Parameters
----------
x, y : `~numpy.ndarray`
The position of the points to bin in the 2D histogram
bins : int or iterable
The number of bins in each dimension. If given as an integer, the same
number of bins is used for each ... | [
"Compute",
"a",
"2D",
"histogram",
"assuming",
"equally",
"spaced",
"bins",
"."
] | ace4f2444fba2e21fa3cd9dad966f6b65b60660f | https://github.com/astrofrog/fast-histogram/blob/ace4f2444fba2e21fa3cd9dad966f6b65b60660f/fast_histogram/histogram.py#L61-L121 |
12,012 | cytoscape/py2cytoscape | py2cytoscape/data/cynetwork.py | CyNetwork.to_networkx | def to_networkx(self):
"""
Return this network in NetworkX graph object.
:return: Network as NetworkX graph object
"""
return nx_util.to_networkx(self.session.get(self.__url).json()) | python | def to_networkx(self):
"""
Return this network in NetworkX graph object.
:return: Network as NetworkX graph object
"""
return nx_util.to_networkx(self.session.get(self.__url).json()) | [
"def",
"to_networkx",
"(",
"self",
")",
":",
"return",
"nx_util",
".",
"to_networkx",
"(",
"self",
".",
"session",
".",
"get",
"(",
"self",
".",
"__url",
")",
".",
"json",
"(",
")",
")"
] | Return this network in NetworkX graph object.
:return: Network as NetworkX graph object | [
"Return",
"this",
"network",
"in",
"NetworkX",
"graph",
"object",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/data/cynetwork.py#L46-L52 |
12,013 | cytoscape/py2cytoscape | py2cytoscape/data/cynetwork.py | CyNetwork.to_dataframe | def to_dataframe(self, extra_edges_columns=[]):
"""
Return this network in pandas DataFrame.
:return: Network as DataFrame. This is equivalent to SIF.
"""
return df_util.to_dataframe(
self.session.get(self.__url).json(),
edges_attr_cols=extra_edges_colum... | python | def to_dataframe(self, extra_edges_columns=[]):
"""
Return this network in pandas DataFrame.
:return: Network as DataFrame. This is equivalent to SIF.
"""
return df_util.to_dataframe(
self.session.get(self.__url).json(),
edges_attr_cols=extra_edges_colum... | [
"def",
"to_dataframe",
"(",
"self",
",",
"extra_edges_columns",
"=",
"[",
"]",
")",
":",
"return",
"df_util",
".",
"to_dataframe",
"(",
"self",
".",
"session",
".",
"get",
"(",
"self",
".",
"__url",
")",
".",
"json",
"(",
")",
",",
"edges_attr_cols",
"... | Return this network in pandas DataFrame.
:return: Network as DataFrame. This is equivalent to SIF. | [
"Return",
"this",
"network",
"in",
"pandas",
"DataFrame",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/data/cynetwork.py#L54-L63 |
12,014 | cytoscape/py2cytoscape | py2cytoscape/data/cynetwork.py | CyNetwork.add_node | def add_node(self, node_name, dataframe=False):
""" Add a single node to the network. """
if node_name is None:
return None
return self.add_nodes([node_name], dataframe=dataframe) | python | def add_node(self, node_name, dataframe=False):
""" Add a single node to the network. """
if node_name is None:
return None
return self.add_nodes([node_name], dataframe=dataframe) | [
"def",
"add_node",
"(",
"self",
",",
"node_name",
",",
"dataframe",
"=",
"False",
")",
":",
"if",
"node_name",
"is",
"None",
":",
"return",
"None",
"return",
"self",
".",
"add_nodes",
"(",
"[",
"node_name",
"]",
",",
"dataframe",
"=",
"dataframe",
")"
] | Add a single node to the network. | [
"Add",
"a",
"single",
"node",
"to",
"the",
"network",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/data/cynetwork.py#L82-L86 |
12,015 | cytoscape/py2cytoscape | py2cytoscape/data/cynetwork.py | CyNetwork.add_nodes | def add_nodes(self, node_name_list, dataframe=False):
"""
Add new nodes to the network
:param node_name_list: list of node names, e.g. ['a', 'b', 'c']
:param dataframe: If True, return a pandas dataframe instead of a dict.
:return: A dict mapping names to SUIDs for the newly-cre... | python | def add_nodes(self, node_name_list, dataframe=False):
"""
Add new nodes to the network
:param node_name_list: list of node names, e.g. ['a', 'b', 'c']
:param dataframe: If True, return a pandas dataframe instead of a dict.
:return: A dict mapping names to SUIDs for the newly-cre... | [
"def",
"add_nodes",
"(",
"self",
",",
"node_name_list",
",",
"dataframe",
"=",
"False",
")",
":",
"res",
"=",
"self",
".",
"session",
".",
"post",
"(",
"self",
".",
"__url",
"+",
"'nodes'",
",",
"data",
"=",
"json",
".",
"dumps",
"(",
"node_name_list",... | Add new nodes to the network
:param node_name_list: list of node names, e.g. ['a', 'b', 'c']
:param dataframe: If True, return a pandas dataframe instead of a dict.
:return: A dict mapping names to SUIDs for the newly-created nodes. | [
"Add",
"new",
"nodes",
"to",
"the",
"network"
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/data/cynetwork.py#L88-L102 |
12,016 | cytoscape/py2cytoscape | py2cytoscape/data/cynetwork.py | CyNetwork.add_edge | def add_edge(self, source, target, interaction='-', directed=True, dataframe=True):
""" Add a single edge from source to target. """
new_edge = {
'source': source,
'target': target,
'interaction': interaction,
'directed': directed
}
return ... | python | def add_edge(self, source, target, interaction='-', directed=True, dataframe=True):
""" Add a single edge from source to target. """
new_edge = {
'source': source,
'target': target,
'interaction': interaction,
'directed': directed
}
return ... | [
"def",
"add_edge",
"(",
"self",
",",
"source",
",",
"target",
",",
"interaction",
"=",
"'-'",
",",
"directed",
"=",
"True",
",",
"dataframe",
"=",
"True",
")",
":",
"new_edge",
"=",
"{",
"'source'",
":",
"source",
",",
"'target'",
":",
"target",
",",
... | Add a single edge from source to target. | [
"Add",
"a",
"single",
"edge",
"from",
"source",
"to",
"target",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/data/cynetwork.py#L104-L112 |
12,017 | cytoscape/py2cytoscape | py2cytoscape/data/cynetwork.py | CyNetwork.get_views | def get_views(self):
"""
Get views as a list of SUIDs
:return:
"""
url = self.__url + 'views'
return self.session.get(url).json() | python | def get_views(self):
"""
Get views as a list of SUIDs
:return:
"""
url = self.__url + 'views'
return self.session.get(url).json() | [
"def",
"get_views",
"(",
"self",
")",
":",
"url",
"=",
"self",
".",
"__url",
"+",
"'views'",
"return",
"self",
".",
"session",
".",
"get",
"(",
"url",
")",
".",
"json",
"(",
")"
] | Get views as a list of SUIDs
:return: | [
"Get",
"views",
"as",
"a",
"list",
"of",
"SUIDs"
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/data/cynetwork.py#L304-L311 |
12,018 | cytoscape/py2cytoscape | py2cytoscape/cyrest/diffusion.py | diffusion.diffuse_advanced | def diffuse_advanced(self, heatColumnName=None, time=None, verbose=False):
"""
Diffusion will send the selected network view and its selected nodes to
a web-based REST service to calculate network propagation. Results are
returned and represented by columns in the node table.
Col... | python | def diffuse_advanced(self, heatColumnName=None, time=None, verbose=False):
"""
Diffusion will send the selected network view and its selected nodes to
a web-based REST service to calculate network propagation. Results are
returned and represented by columns in the node table.
Col... | [
"def",
"diffuse_advanced",
"(",
"self",
",",
"heatColumnName",
"=",
"None",
",",
"time",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"\"heatColumnName\"",
",",
"\"time\"",
"]",
",",
"[",
"heatColumnName",
",",... | Diffusion will send the selected network view and its selected nodes to
a web-based REST service to calculate network propagation. Results are
returned and represented by columns in the node table.
Columns are created for each execution of Diffusion and their names are
returned in the re... | [
"Diffusion",
"will",
"send",
"the",
"selected",
"network",
"view",
"and",
"its",
"selected",
"nodes",
"to",
"a",
"web",
"-",
"based",
"REST",
"service",
"to",
"calculate",
"network",
"propagation",
".",
"Results",
"are",
"returned",
"and",
"represented",
"by",... | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/diffusion.py#L30-L48 |
12,019 | cytoscape/py2cytoscape | py2cytoscape/util/util_networkx.py | to_networkx | def to_networkx(cyjs, directed=True):
"""
Convert Cytoscape.js-style JSON object into NetworkX object.
By default, data will be handles as a directed graph.
"""
if directed:
g = nx.MultiDiGraph()
else:
g = nx.MultiGraph()
network_data = cyjs[DATA]
if network_data is no... | python | def to_networkx(cyjs, directed=True):
"""
Convert Cytoscape.js-style JSON object into NetworkX object.
By default, data will be handles as a directed graph.
"""
if directed:
g = nx.MultiDiGraph()
else:
g = nx.MultiGraph()
network_data = cyjs[DATA]
if network_data is no... | [
"def",
"to_networkx",
"(",
"cyjs",
",",
"directed",
"=",
"True",
")",
":",
"if",
"directed",
":",
"g",
"=",
"nx",
".",
"MultiDiGraph",
"(",
")",
"else",
":",
"g",
"=",
"nx",
".",
"MultiGraph",
"(",
")",
"network_data",
"=",
"cyjs",
"[",
"DATA",
"]"... | Convert Cytoscape.js-style JSON object into NetworkX object.
By default, data will be handles as a directed graph. | [
"Convert",
"Cytoscape",
".",
"js",
"-",
"style",
"JSON",
"object",
"into",
"NetworkX",
"object",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/util/util_networkx.py#L120-L151 |
12,020 | cytoscape/py2cytoscape | py2cytoscape/cyrest/cybrowser.py | cybrowser.dialog | def dialog(self=None, wid=None, text=None, title=None, url=None, debug=False, verbose=False):
"""
Launch and HTML browser in a separate window.
:param wid: Window ID
:param text: HTML text
:param title: Window Title
:param url: URL
:param debug: Show debug tools.... | python | def dialog(self=None, wid=None, text=None, title=None, url=None, debug=False, verbose=False):
"""
Launch and HTML browser in a separate window.
:param wid: Window ID
:param text: HTML text
:param title: Window Title
:param url: URL
:param debug: Show debug tools.... | [
"def",
"dialog",
"(",
"self",
"=",
"None",
",",
"wid",
"=",
"None",
",",
"text",
"=",
"None",
",",
"title",
"=",
"None",
",",
"url",
"=",
"None",
",",
"debug",
"=",
"False",
",",
"verbose",
"=",
"False",
")",
":",
"PARAMS",
"=",
"set_param",
"(",... | Launch and HTML browser in a separate window.
:param wid: Window ID
:param text: HTML text
:param title: Window Title
:param url: URL
:param debug: Show debug tools. boolean
:param verbose: print more | [
"Launch",
"and",
"HTML",
"browser",
"in",
"a",
"separate",
"window",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/cybrowser.py#L13-L27 |
12,021 | cytoscape/py2cytoscape | py2cytoscape/cyrest/cybrowser.py | cybrowser.hide | def hide(self, wid, verbose=False):
"""
Hide and HTML browser in the Results Panel.
:param wid: Window ID
:param verbose: print more
"""
PARAMS={"id":wid}
response=api(url=self.__url+"/hide?",PARAMS=PARAMS, method="GET", verbose=verbose)
return response | python | def hide(self, wid, verbose=False):
"""
Hide and HTML browser in the Results Panel.
:param wid: Window ID
:param verbose: print more
"""
PARAMS={"id":wid}
response=api(url=self.__url+"/hide?",PARAMS=PARAMS, method="GET", verbose=verbose)
return response | [
"def",
"hide",
"(",
"self",
",",
"wid",
",",
"verbose",
"=",
"False",
")",
":",
"PARAMS",
"=",
"{",
"\"id\"",
":",
"wid",
"}",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"__url",
"+",
"\"/hide?\"",
",",
"PARAMS",
"=",
"PARAMS",
",",
"m... | Hide and HTML browser in the Results Panel.
:param wid: Window ID
:param verbose: print more | [
"Hide",
"and",
"HTML",
"browser",
"in",
"the",
"Results",
"Panel",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/cybrowser.py#L29-L40 |
12,022 | cytoscape/py2cytoscape | py2cytoscape/cyrest/cybrowser.py | cybrowser.show | def show(self, wid=None, text=None, title=None, url=None, verbose=False):
"""
Launch an HTML browser in the Results Panel.
:param wid: Window ID
:param text: HTML text
:param title: Window Title
:param url: URL
:param verbose: print more
"""
PARA... | python | def show(self, wid=None, text=None, title=None, url=None, verbose=False):
"""
Launch an HTML browser in the Results Panel.
:param wid: Window ID
:param text: HTML text
:param title: Window Title
:param url: URL
:param verbose: print more
"""
PARA... | [
"def",
"show",
"(",
"self",
",",
"wid",
"=",
"None",
",",
"text",
"=",
"None",
",",
"title",
"=",
"None",
",",
"url",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"PARAMS",
"=",
"{",
"}",
"for",
"p",
",",
"v",
"in",
"zip",
"(",
"[",
... | Launch an HTML browser in the Results Panel.
:param wid: Window ID
:param text: HTML text
:param title: Window Title
:param url: URL
:param verbose: print more | [
"Launch",
"an",
"HTML",
"browser",
"in",
"the",
"Results",
"Panel",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/cybrowser.py#L42-L59 |
12,023 | cytoscape/py2cytoscape | py2cytoscape/data/util_http.py | check_response | def check_response(res):
""" Check HTTP response and raise exception if response is not OK. """
try:
res.raise_for_status() # Alternative is res.ok
except Exception as exc:
# Bad response code, e.g. if adding an edge with nodes that doesn't exist
try:
err_info = res.json(... | python | def check_response(res):
""" Check HTTP response and raise exception if response is not OK. """
try:
res.raise_for_status() # Alternative is res.ok
except Exception as exc:
# Bad response code, e.g. if adding an edge with nodes that doesn't exist
try:
err_info = res.json(... | [
"def",
"check_response",
"(",
"res",
")",
":",
"try",
":",
"res",
".",
"raise_for_status",
"(",
")",
"# Alternative is res.ok",
"except",
"Exception",
"as",
"exc",
":",
"# Bad response code, e.g. if adding an edge with nodes that doesn't exist",
"try",
":",
"err_info",
... | Check HTTP response and raise exception if response is not OK. | [
"Check",
"HTTP",
"response",
"and",
"raise",
"exception",
"if",
"response",
"is",
"not",
"OK",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/data/util_http.py#L3-L18 |
12,024 | cytoscape/py2cytoscape | py2cytoscape/util/util_dataframe.py | from_dataframe | def from_dataframe(df,
source_col='source',
target_col='target',
interaction_col='interaction',
name='From DataFrame',
edge_attr_cols=[]):
"""
Utility to convert Pandas DataFrame object into Cytoscape.js JSON
:pa... | python | def from_dataframe(df,
source_col='source',
target_col='target',
interaction_col='interaction',
name='From DataFrame',
edge_attr_cols=[]):
"""
Utility to convert Pandas DataFrame object into Cytoscape.js JSON
:pa... | [
"def",
"from_dataframe",
"(",
"df",
",",
"source_col",
"=",
"'source'",
",",
"target_col",
"=",
"'target'",
",",
"interaction_col",
"=",
"'interaction'",
",",
"name",
"=",
"'From DataFrame'",
",",
"edge_attr_cols",
"=",
"[",
"]",
")",
":",
"network",
"=",
"c... | Utility to convert Pandas DataFrame object into Cytoscape.js JSON
:param df: Dataframe to convert.
:param source_col: Name of source column.
:param target_col: Name of target column.
:param interaction_col: Name of interaction column.
:param name: Name of network.
:param edge_attr_cols: List co... | [
"Utility",
"to",
"convert",
"Pandas",
"DataFrame",
"object",
"into",
"Cytoscape",
".",
"js",
"JSON"
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/util/util_dataframe.py#L6-L49 |
12,025 | cytoscape/py2cytoscape | py2cytoscape/util/util_dataframe.py | to_dataframe | def to_dataframe(network,
interaction='interaction',
default_interaction='-',
edges_attr_cols=[]):
"""
Utility to convert a Cytoscape dictionary into a Pandas Dataframe.
:param network: Dictionary to convert.
:param interaction: Name of interaction col... | python | def to_dataframe(network,
interaction='interaction',
default_interaction='-',
edges_attr_cols=[]):
"""
Utility to convert a Cytoscape dictionary into a Pandas Dataframe.
:param network: Dictionary to convert.
:param interaction: Name of interaction col... | [
"def",
"to_dataframe",
"(",
"network",
",",
"interaction",
"=",
"'interaction'",
",",
"default_interaction",
"=",
"'-'",
",",
"edges_attr_cols",
"=",
"[",
"]",
")",
":",
"edges",
"=",
"network",
"[",
"'elements'",
"]",
"[",
"'edges'",
"]",
"if",
"edges_attr_... | Utility to convert a Cytoscape dictionary into a Pandas Dataframe.
:param network: Dictionary to convert.
:param interaction: Name of interaction column.
:param default_interaction: Default value for missing interactions.
:param edges_attr_cols: List containing other edges' attributes to include
... | [
"Utility",
"to",
"convert",
"a",
"Cytoscape",
"dictionary",
"into",
"a",
"Pandas",
"Dataframe",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/util/util_dataframe.py#L52-L91 |
12,026 | cytoscape/py2cytoscape | py2cytoscape/cytoscapejs/viewer.py | render | def render(network,
style=DEF_STYLE,
layout_algorithm=DEF_LAYOUT,
background=DEF_BACKGROUND_COLOR,
height=DEF_HEIGHT,
width=DEF_WIDTH,
style_file=STYLE_FILE,
def_nodes=DEF_NODES,
def_edges=DEF_EDGES):
"""Render network data with... | python | def render(network,
style=DEF_STYLE,
layout_algorithm=DEF_LAYOUT,
background=DEF_BACKGROUND_COLOR,
height=DEF_HEIGHT,
width=DEF_WIDTH,
style_file=STYLE_FILE,
def_nodes=DEF_NODES,
def_edges=DEF_EDGES):
"""Render network data with... | [
"def",
"render",
"(",
"network",
",",
"style",
"=",
"DEF_STYLE",
",",
"layout_algorithm",
"=",
"DEF_LAYOUT",
",",
"background",
"=",
"DEF_BACKGROUND_COLOR",
",",
"height",
"=",
"DEF_HEIGHT",
",",
"width",
"=",
"DEF_WIDTH",
",",
"style_file",
"=",
"STYLE_FILE",
... | Render network data with embedded Cytoscape.js widget.
:param network: dict (required)
The network data should be in Cytoscape.js JSON format.
:param style: str or dict
If str, pick one of the preset style. [default: 'default']
If dict, it should be Cytoscape.js style CSS object
:pa... | [
"Render",
"network",
"data",
"with",
"embedded",
"Cytoscape",
".",
"js",
"widget",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cytoscapejs/viewer.py#L57-L118 |
12,027 | cytoscape/py2cytoscape | py2cytoscape/cyrest/edge.py | edge.create_attribute | def create_attribute(self,column=None,listType=None,namespace=None, network=None, atype=None, verbose=False):
"""
Creates a new edge column.
:param column (string, optional): Unique name of column
:param listType (string, optional): Can be one of integer, long, double,
or st... | python | def create_attribute(self,column=None,listType=None,namespace=None, network=None, atype=None, verbose=False):
"""
Creates a new edge column.
:param column (string, optional): Unique name of column
:param listType (string, optional): Can be one of integer, long, double,
or st... | [
"def",
"create_attribute",
"(",
"self",
",",
"column",
"=",
"None",
",",
"listType",
"=",
"None",
",",
"namespace",
"=",
"None",
",",
"network",
"=",
"None",
",",
"atype",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"network",
"=",
"check_netw... | Creates a new edge column.
:param column (string, optional): Unique name of column
:param listType (string, optional): Can be one of integer, long, double,
or string.
:param namespace (string, optional): Node, Edge, and Network objects
support the default, local, and hid... | [
"Creates",
"a",
"new",
"edge",
"column",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/edge.py#L13-L35 |
12,028 | cytoscape/py2cytoscape | py2cytoscape/cyrest/edge.py | edge.get | def get(self,edge=None,network=None,sourceNode=None, targetNode=None, atype=None, verbose=False):
"""
Returns the SUID of an edge that matches the passed parameters. If
multiple edges are found, only one will be returned, and a warning will
be reported in the Cytoscape Task History dialo... | python | def get(self,edge=None,network=None,sourceNode=None, targetNode=None, atype=None, verbose=False):
"""
Returns the SUID of an edge that matches the passed parameters. If
multiple edges are found, only one will be returned, and a warning will
be reported in the Cytoscape Task History dialo... | [
"def",
"get",
"(",
"self",
",",
"edge",
"=",
"None",
",",
"network",
"=",
"None",
",",
"sourceNode",
"=",
"None",
",",
"targetNode",
"=",
"None",
",",
"atype",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"network",
"=",
"check_network",
"(",... | Returns the SUID of an edge that matches the passed parameters. If
multiple edges are found, only one will be returned, and a warning will
be reported in the Cytoscape Task History dialog.
:param edge (string, optional): Selects an edge by name, or, if the
parameter has the prefix s... | [
"Returns",
"the",
"SUID",
"of",
"an",
"edge",
"that",
"matches",
"the",
"passed",
"parameters",
".",
"If",
"multiple",
"edges",
"are",
"found",
"only",
"one",
"will",
"be",
"returned",
"and",
"a",
"warning",
"will",
"be",
"reported",
"in",
"the",
"Cytoscap... | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/edge.py#L37-L68 |
12,029 | cytoscape/py2cytoscape | py2cytoscape/cyrest/network.py | network.add_edge | def add_edge(self, isDirected=None,name=None,network=None,sourceName=None,targetName=None, verbose=False):
"""
Add a new edge between two existing nodes in a network. The names of the
nodes must be specified and much match the value in the 'name' column for
each node.
:param isD... | python | def add_edge(self, isDirected=None,name=None,network=None,sourceName=None,targetName=None, verbose=False):
"""
Add a new edge between two existing nodes in a network. The names of the
nodes must be specified and much match the value in the 'name' column for
each node.
:param isD... | [
"def",
"add_edge",
"(",
"self",
",",
"isDirected",
"=",
"None",
",",
"name",
"=",
"None",
",",
"network",
"=",
"None",
",",
"sourceName",
"=",
"None",
",",
"targetName",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"network",
"=",
"check_networ... | Add a new edge between two existing nodes in a network. The names of the
nodes must be specified and much match the value in the 'name' column for
each node.
:param isDirected (string, optional): Whether the edge should be directed
or not. Even though all edges in Cytoscape have a s... | [
"Add",
"a",
"new",
"edge",
"between",
"two",
"existing",
"nodes",
"in",
"a",
"network",
".",
"The",
"names",
"of",
"the",
"nodes",
"must",
"be",
"specified",
"and",
"much",
"match",
"the",
"value",
"in",
"the",
"name",
"column",
"for",
"each",
"node",
... | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/network.py#L45-L73 |
12,030 | cytoscape/py2cytoscape | py2cytoscape/cyrest/network.py | network.create | def create(self, edgeList=None, excludeEdges=None, networkName=None, nodeList=None, source=None, verbose=False):
"""
Create a new network from a list of nodes and edges in an existing source network.
The SUID of the network and view are returned.
:param edgeList (string, optional): Spec... | python | def create(self, edgeList=None, excludeEdges=None, networkName=None, nodeList=None, source=None, verbose=False):
"""
Create a new network from a list of nodes and edges in an existing source network.
The SUID of the network and view are returned.
:param edgeList (string, optional): Spec... | [
"def",
"create",
"(",
"self",
",",
"edgeList",
"=",
"None",
",",
"excludeEdges",
"=",
"None",
",",
"networkName",
"=",
"None",
",",
"nodeList",
"=",
"None",
",",
"source",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"network",
"=",
"check_netw... | Create a new network from a list of nodes and edges in an existing source network.
The SUID of the network and view are returned.
:param edgeList (string, optional): Specifies a list of edges. The keywords
all, selected, or unselected can be used to specify edges by their
select... | [
"Create",
"a",
"new",
"network",
"from",
"a",
"list",
"of",
"nodes",
"and",
"edges",
"in",
"an",
"existing",
"source",
"network",
".",
"The",
"SUID",
"of",
"the",
"network",
"and",
"view",
"are",
"returned",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/network.py#L137-L170 |
12,031 | cytoscape/py2cytoscape | py2cytoscape/cyrest/network.py | network.create_empty | def create_empty(self, name=None, renderers=None, RootNetworkList=None, verbose=False):
"""
Create a new, empty network. The new network may be created as part of
an existing network collection or a new network collection.
:param name (string, optional): Enter the name of the new networ... | python | def create_empty(self, name=None, renderers=None, RootNetworkList=None, verbose=False):
"""
Create a new, empty network. The new network may be created as part of
an existing network collection or a new network collection.
:param name (string, optional): Enter the name of the new networ... | [
"def",
"create_empty",
"(",
"self",
",",
"name",
"=",
"None",
",",
"renderers",
"=",
"None",
",",
"RootNetworkList",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"\"name\"",
",",
"\"renderers\"",
",",
"\"Root... | Create a new, empty network. The new network may be created as part of
an existing network collection or a new network collection.
:param name (string, optional): Enter the name of the new network.
:param renderers (string, optional): Select the renderer to use for the
new network v... | [
"Create",
"a",
"new",
"empty",
"network",
".",
"The",
"new",
"network",
"may",
"be",
"created",
"as",
"part",
"of",
"an",
"existing",
"network",
"collection",
"or",
"a",
"new",
"network",
"collection",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/network.py#L201-L218 |
12,032 | cytoscape/py2cytoscape | py2cytoscape/cyrest/network.py | network.list | def list(self, verbose=False):
"""
List all of the networks in the current session.
:param verbose: print more
:returns: [ list of network suids ]
"""
response=api(url=self.__url+"/list", method="POST", verbose=verbose)
return response | python | def list(self, verbose=False):
"""
List all of the networks in the current session.
:param verbose: print more
:returns: [ list of network suids ]
"""
response=api(url=self.__url+"/list", method="POST", verbose=verbose)
return response | [
"def",
"list",
"(",
"self",
",",
"verbose",
"=",
"False",
")",
":",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"__url",
"+",
"\"/list\"",
",",
"method",
"=",
"\"POST\"",
",",
"verbose",
"=",
"verbose",
")",
"return",
"response"
] | List all of the networks in the current session.
:param verbose: print more
:returns: [ list of network suids ] | [
"List",
"all",
"of",
"the",
"networks",
"in",
"the",
"current",
"session",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/network.py#L532-L542 |
12,033 | cytoscape/py2cytoscape | py2cytoscape/cyrest/network.py | network.list_attributes | def list_attributes(self, namespace=None, network=None, verbose=False):
"""
Returns a list of column names assocated with a network.
:param namespace (string, optional): Node, Edge, and Network objects
support the default, local, and hidden namespaces. Root networks also
... | python | def list_attributes(self, namespace=None, network=None, verbose=False):
"""
Returns a list of column names assocated with a network.
:param namespace (string, optional): Node, Edge, and Network objects
support the default, local, and hidden namespaces. Root networks also
... | [
"def",
"list_attributes",
"(",
"self",
",",
"namespace",
"=",
"None",
",",
"network",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"network",
"=",
"check_network",
"(",
"self",
",",
"network",
",",
"verbose",
"=",
"verbose",
")",
"PARAMS",
"=",
... | Returns a list of column names assocated with a network.
:param namespace (string, optional): Node, Edge, and Network objects
support the default, local, and hidden namespaces. Root networks also
support the shared namespace. Custom namespaces may be specified
by App... | [
"Returns",
"a",
"list",
"of",
"column",
"names",
"assocated",
"with",
"a",
"network",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/network.py#L544-L562 |
12,034 | cytoscape/py2cytoscape | py2cytoscape/cyrest/network.py | network.rename | def rename(self, name=None, sourceNetwork=None, verbose=False):
"""
Rename an existing network. The SUID of the network is returned
:param name (string): Enter a new title for the network
:param sourceNetwork (string): Specifies a network by name, or by SUID
if the prefix SU... | python | def rename(self, name=None, sourceNetwork=None, verbose=False):
"""
Rename an existing network. The SUID of the network is returned
:param name (string): Enter a new title for the network
:param sourceNetwork (string): Specifies a network by name, or by SUID
if the prefix SU... | [
"def",
"rename",
"(",
"self",
",",
"name",
"=",
"None",
",",
"sourceNetwork",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"sourceNetwork",
"=",
"check_network",
"(",
"self",
",",
"sourceNetwork",
",",
"verbose",
"=",
"verbose",
")",
"PARAMS",
"=... | Rename an existing network. The SUID of the network is returned
:param name (string): Enter a new title for the network
:param sourceNetwork (string): Specifies a network by name, or by SUID
if the prefix SUID: is used. The keyword CURRENT, or a blank value
can also be used to s... | [
"Rename",
"an",
"existing",
"network",
".",
"The",
"SUID",
"of",
"the",
"network",
"is",
"returned"
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/network.py#L619-L634 |
12,035 | cytoscape/py2cytoscape | py2cytoscape/cyrest/session.py | session.new | def new(self, verbose=False):
"""
Destroys the current session and creates a new, empty one.
:param wid: Window ID
:param verbose: print more
"""
response=api(url=self.__url+"/new", verbose=verbose)
return response | python | def new(self, verbose=False):
"""
Destroys the current session and creates a new, empty one.
:param wid: Window ID
:param verbose: print more
"""
response=api(url=self.__url+"/new", verbose=verbose)
return response | [
"def",
"new",
"(",
"self",
",",
"verbose",
"=",
"False",
")",
":",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"__url",
"+",
"\"/new\"",
",",
"verbose",
"=",
"verbose",
")",
"return",
"response"
] | Destroys the current session and creates a new, empty one.
:param wid: Window ID
:param verbose: print more | [
"Destroys",
"the",
"current",
"session",
"and",
"creates",
"a",
"new",
"empty",
"one",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/session.py#L14-L23 |
12,036 | cytoscape/py2cytoscape | py2cytoscape/cyrest/session.py | session.open | def open(self, session_file=None,session_url=None, verbose=False):
"""
Opens a session from a local file or URL.
:param session_file: The path to the session file (.cys) to be loaded.
:param session_url: A URL that provides a session file.
:param verbose: print more
"""
... | python | def open(self, session_file=None,session_url=None, verbose=False):
"""
Opens a session from a local file or URL.
:param session_file: The path to the session file (.cys) to be loaded.
:param session_url: A URL that provides a session file.
:param verbose: print more
"""
... | [
"def",
"open",
"(",
"self",
",",
"session_file",
"=",
"None",
",",
"session_url",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"\"file\"",
",",
"\"url\"",
"]",
",",
"[",
"session_file",
",",
"session_url",
... | Opens a session from a local file or URL.
:param session_file: The path to the session file (.cys) to be loaded.
:param session_url: A URL that provides a session file.
:param verbose: print more | [
"Opens",
"a",
"session",
"from",
"a",
"local",
"file",
"or",
"URL",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/session.py#L26-L37 |
12,037 | cytoscape/py2cytoscape | py2cytoscape/cyrest/session.py | session.save | def save(self, session_file, verbose=False):
"""
Saves the current session to an existing file, which will be replaced.
If this is a new session that has not been saved yet, use 'save as'
instead.
:param session_file: The path to the file where the current session
must b... | python | def save(self, session_file, verbose=False):
"""
Saves the current session to an existing file, which will be replaced.
If this is a new session that has not been saved yet, use 'save as'
instead.
:param session_file: The path to the file where the current session
must b... | [
"def",
"save",
"(",
"self",
",",
"session_file",
",",
"verbose",
"=",
"False",
")",
":",
"PARAMS",
"=",
"{",
"\"file\"",
":",
"session_file",
"}",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"__url",
"+",
"\"/save\"",
",",
"PARAMS",
"=",
"P... | Saves the current session to an existing file, which will be replaced.
If this is a new session that has not been saved yet, use 'save as'
instead.
:param session_file: The path to the file where the current session
must be saved to.
:param verbose: print more | [
"Saves",
"the",
"current",
"session",
"to",
"an",
"existing",
"file",
"which",
"will",
"be",
"replaced",
".",
"If",
"this",
"is",
"a",
"new",
"session",
"that",
"has",
"not",
"been",
"saved",
"yet",
"use",
"save",
"as",
"instead",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/session.py#L40-L54 |
12,038 | cytoscape/py2cytoscape | py2cytoscape/cyrest/vizmap.py | vizmap.apply | def apply(self, styles=None, verbose=False):
"""
Applies the specified style to the selected views and returns the
SUIDs of the affected views.
:param styles (string): Name of Style to be applied to the selected
views. = ['Directed', 'BioPAX_SIF', 'Bridging Reads Histogram:u... | python | def apply(self, styles=None, verbose=False):
"""
Applies the specified style to the selected views and returns the
SUIDs of the affected views.
:param styles (string): Name of Style to be applied to the selected
views. = ['Directed', 'BioPAX_SIF', 'Bridging Reads Histogram:u... | [
"def",
"apply",
"(",
"self",
",",
"styles",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"\"styles\"",
"]",
",",
"[",
"styles",
"]",
")",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"__url",
... | Applies the specified style to the selected views and returns the
SUIDs of the affected views.
:param styles (string): Name of Style to be applied to the selected
views. = ['Directed', 'BioPAX_SIF', 'Bridging Reads Histogram:unique_0',
'PSIMI 25 Style', 'Coverage Histogram:best&... | [
"Applies",
"the",
"specified",
"style",
"to",
"the",
"selected",
"views",
"and",
"returns",
"the",
"SUIDs",
"of",
"the",
"affected",
"views",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/vizmap.py#L13-L39 |
12,039 | cytoscape/py2cytoscape | py2cytoscape/cyrest/vizmap.py | vizmap.create_style | def create_style(self,title=None,defaults=None,mappings=None,verbose=VERBOSE):
"""
Creates a new visual style
:param title: title of the visual style
:param defaults: a list of dictionaries for each visualProperty
:param mappings: a list of dictionaries for each visualProperty
... | python | def create_style(self,title=None,defaults=None,mappings=None,verbose=VERBOSE):
"""
Creates a new visual style
:param title: title of the visual style
:param defaults: a list of dictionaries for each visualProperty
:param mappings: a list of dictionaries for each visualProperty
... | [
"def",
"create_style",
"(",
"self",
",",
"title",
"=",
"None",
",",
"defaults",
"=",
"None",
",",
"mappings",
"=",
"None",
",",
"verbose",
"=",
"VERBOSE",
")",
":",
"u",
"=",
"self",
".",
"__url",
"host",
"=",
"u",
".",
"split",
"(",
"\"//\"",
")",... | Creates a new visual style
:param title: title of the visual style
:param defaults: a list of dictionaries for each visualProperty
:param mappings: a list of dictionaries for each visualProperty
:param host: cytoscape host address, default=cytoscape_host
:param port: cytoscape p... | [
"Creates",
"a",
"new",
"visual",
"style"
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/vizmap.py#L86-L129 |
12,040 | cytoscape/py2cytoscape | py2cytoscape/cyrest/vizmap.py | vizmap.update_style | def update_style(self, title=None,defaults=None,mappings=None, verbose=False):
"""
Updates a visual style
:param title: title of the visual style
:param defaults: a list of dictionaries for each visualProperty
:param mappings: a list of dictionaries for each visualProperty
... | python | def update_style(self, title=None,defaults=None,mappings=None, verbose=False):
"""
Updates a visual style
:param title: title of the visual style
:param defaults: a list of dictionaries for each visualProperty
:param mappings: a list of dictionaries for each visualProperty
... | [
"def",
"update_style",
"(",
"self",
",",
"title",
"=",
"None",
",",
"defaults",
"=",
"None",
",",
"mappings",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"u",
"=",
"self",
".",
"__url",
"host",
"=",
"u",
".",
"split",
"(",
"\"//\"",
")",
... | Updates a visual style
:param title: title of the visual style
:param defaults: a list of dictionaries for each visualProperty
:param mappings: a list of dictionaries for each visualProperty
:returns: nothing | [
"Updates",
"a",
"visual",
"style"
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/vizmap.py#L131-L194 |
12,041 | cytoscape/py2cytoscape | py2cytoscape/cyrest/vizmap.py | vizmap.simple_defaults | def simple_defaults(self, defaults_dic):
"""
Simplifies defaults.
:param defaults_dic: a dictionary of the form { visualProperty_A:value_A, visualProperty_B:value_B, ..}
:returns: a list of dictionaries with each item corresponding to a given key in defaults_dic
"""
de... | python | def simple_defaults(self, defaults_dic):
"""
Simplifies defaults.
:param defaults_dic: a dictionary of the form { visualProperty_A:value_A, visualProperty_B:value_B, ..}
:returns: a list of dictionaries with each item corresponding to a given key in defaults_dic
"""
de... | [
"def",
"simple_defaults",
"(",
"self",
",",
"defaults_dic",
")",
":",
"defaults",
"=",
"[",
"]",
"for",
"d",
"in",
"defaults_dic",
".",
"keys",
"(",
")",
":",
"dic",
"=",
"{",
"}",
"dic",
"[",
"\"visualProperty\"",
"]",
"=",
"d",
"dic",
"[",
"\"value... | Simplifies defaults.
:param defaults_dic: a dictionary of the form { visualProperty_A:value_A, visualProperty_B:value_B, ..}
:returns: a list of dictionaries with each item corresponding to a given key in defaults_dic | [
"Simplifies",
"defaults",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/vizmap.py#L278-L293 |
12,042 | cytoscape/py2cytoscape | py2cytoscape/cyrest/layout.py | layout.attribute_circle | def attribute_circle(self, EdgeAttribute=None, network=None, \
NodeAttribute=None, nodeList=None, singlePartition=None,\
spacing=None, verbose=False):
"""
Execute the Attribute Circle Layout on a network.
:param EdgeAttribute (string, optional): The name of the edge column
containing numeric values that wil... | python | def attribute_circle(self, EdgeAttribute=None, network=None, \
NodeAttribute=None, nodeList=None, singlePartition=None,\
spacing=None, verbose=False):
"""
Execute the Attribute Circle Layout on a network.
:param EdgeAttribute (string, optional): The name of the edge column
containing numeric values that wil... | [
"def",
"attribute_circle",
"(",
"self",
",",
"EdgeAttribute",
"=",
"None",
",",
"network",
"=",
"None",
",",
"NodeAttribute",
"=",
"None",
",",
"nodeList",
"=",
"None",
",",
"singlePartition",
"=",
"None",
",",
"spacing",
"=",
"None",
",",
"verbose",
"=",
... | Execute the Attribute Circle Layout on a network.
:param EdgeAttribute (string, optional): The name of the edge column
containing numeric values that will be used as weights in the layout
algorithm. Only columns containing numeric values are shown
:param network (string, optional): Specifies a network by nam... | [
"Execute",
"the",
"Attribute",
"Circle",
"Layout",
"on",
"a",
"network",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/layout.py#L29-L61 |
12,043 | cytoscape/py2cytoscape | py2cytoscape/cyrest/layout.py | layout.attributes_layout | def attributes_layout(self, EdgeAttribute=None, maxwidth=None, minrad=None, \
network=None, NodeAttribute=None,nodeList=None, radmult=None, \
spacingx=None, spacingy=None, verbose=False):
"""
Execute the Group Attributes Layout on a network
:param EdgeAttribute (string, optional): The name of the edge column
... | python | def attributes_layout(self, EdgeAttribute=None, maxwidth=None, minrad=None, \
network=None, NodeAttribute=None,nodeList=None, radmult=None, \
spacingx=None, spacingy=None, verbose=False):
"""
Execute the Group Attributes Layout on a network
:param EdgeAttribute (string, optional): The name of the edge column
... | [
"def",
"attributes_layout",
"(",
"self",
",",
"EdgeAttribute",
"=",
"None",
",",
"maxwidth",
"=",
"None",
",",
"minrad",
"=",
"None",
",",
"network",
"=",
"None",
",",
"NodeAttribute",
"=",
"None",
",",
"nodeList",
"=",
"None",
",",
"radmult",
"=",
"None... | Execute the Group Attributes Layout on a network
:param EdgeAttribute (string, optional): The name of the edge column
containing numeric values that will be used as weights in the layout
algorithm. Only columns containing numeric values are shown
:param maxwidth (string, optional): Maximum width of a row, i... | [
"Execute",
"the",
"Group",
"Attributes",
"Layout",
"on",
"a",
"network"
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/layout.py#L64-L104 |
12,044 | cytoscape/py2cytoscape | py2cytoscape/cyrest/layout.py | layout.circular | def circular(self,EdgeAttribute=None,leftEdge=None,network=None,\
NodeAttribute=None,nodeHorizontalSpacing=None,nodeList=None,\
nodeVerticalSpacing=None,rightMargin=None,singlePartition=None,topEdge=None,\
verbose=None):
"""
Execute the Circular Layout on a network
:param EdgeAttribute (string, optional): The... | python | def circular(self,EdgeAttribute=None,leftEdge=None,network=None,\
NodeAttribute=None,nodeHorizontalSpacing=None,nodeList=None,\
nodeVerticalSpacing=None,rightMargin=None,singlePartition=None,topEdge=None,\
verbose=None):
"""
Execute the Circular Layout on a network
:param EdgeAttribute (string, optional): The... | [
"def",
"circular",
"(",
"self",
",",
"EdgeAttribute",
"=",
"None",
",",
"leftEdge",
"=",
"None",
",",
"network",
"=",
"None",
",",
"NodeAttribute",
"=",
"None",
",",
"nodeHorizontalSpacing",
"=",
"None",
",",
"nodeList",
"=",
"None",
",",
"nodeVerticalSpacin... | Execute the Circular Layout on a network
:param EdgeAttribute (string, optional): The name of the edge column contai
ning numeric values that will be used as weights in the layout algor
ithm. Only columns containing numeric values are shown
:param leftEdge (string, optional): Left edge margin, in numeric val... | [
"Execute",
"the",
"Circular",
"Layout",
"on",
"a",
"network"
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/layout.py#L106-L146 |
12,045 | cytoscape/py2cytoscape | py2cytoscape/cyrest/layout.py | layout.copycat | def copycat(self,gridUnmapped=None,selectUnmapped=None,sourceColumn=None,\
sourceNetwork=None,targetColumn=None,targetNetwork=None,verbose=None):
"""
Sets the coordinates for each node in the target network to the coordinates
of a matching node in the source network.
Optional parameters such as gridUnmapped an... | python | def copycat(self,gridUnmapped=None,selectUnmapped=None,sourceColumn=None,\
sourceNetwork=None,targetColumn=None,targetNetwork=None,verbose=None):
"""
Sets the coordinates for each node in the target network to the coordinates
of a matching node in the source network.
Optional parameters such as gridUnmapped an... | [
"def",
"copycat",
"(",
"self",
",",
"gridUnmapped",
"=",
"None",
",",
"selectUnmapped",
"=",
"None",
",",
"sourceColumn",
"=",
"None",
",",
"sourceNetwork",
"=",
"None",
",",
"targetColumn",
"=",
"None",
",",
"targetNetwork",
"=",
"None",
",",
"verbose",
"... | Sets the coordinates for each node in the target network to the coordinates
of a matching node in the source network.
Optional parameters such as gridUnmapped and selectUnmapped determine
the behavior of target network nodes that could not be matched.
:param gridUnmapped (string, optional): If this is set to t... | [
"Sets",
"the",
"coordinates",
"for",
"each",
"node",
"in",
"the",
"target",
"network",
"to",
"the",
"coordinates",
"of",
"a",
"matching",
"node",
"in",
"the",
"source",
"network",
".",
"Optional",
"parameters",
"such",
"as",
"gridUnmapped",
"and",
"selectUnmap... | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/layout.py#L148-L175 |
12,046 | cytoscape/py2cytoscape | py2cytoscape/cyrest/layout.py | layout.degree_circle | def degree_circle(self,EdgeAttribute=None,network=None,NodeAttribute=None,\
nodeList=None,singlePartition=None,verbose=None):
"""
Execute the Degree Sorted Circle Layout on a network.
:param EdgeAttribute (string, optional): The name of the edge column contai
ning numeric values that will be used as weights... | python | def degree_circle(self,EdgeAttribute=None,network=None,NodeAttribute=None,\
nodeList=None,singlePartition=None,verbose=None):
"""
Execute the Degree Sorted Circle Layout on a network.
:param EdgeAttribute (string, optional): The name of the edge column contai
ning numeric values that will be used as weights... | [
"def",
"degree_circle",
"(",
"self",
",",
"EdgeAttribute",
"=",
"None",
",",
"network",
"=",
"None",
",",
"NodeAttribute",
"=",
"None",
",",
"nodeList",
"=",
"None",
",",
"singlePartition",
"=",
"None",
",",
"verbose",
"=",
"None",
")",
":",
"network",
"... | Execute the Degree Sorted Circle Layout on a network.
:param EdgeAttribute (string, optional): The name of the edge column contai
ning numeric values that will be used as weights in the layout algor
ithm. Only columns containing numeric values are shown
:param network (string, optional): Specifies a network ... | [
"Execute",
"the",
"Degree",
"Sorted",
"Circle",
"Layout",
"on",
"a",
"network",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/layout.py#L233-L262 |
12,047 | cytoscape/py2cytoscape | py2cytoscape/cyrest/layout.py | layout.force_directed | def force_directed(self,defaultEdgeWeight=None,defaultNodeMass=None,\
defaultSpringCoefficient=None,defaultSpringLength=None,EdgeAttribute=None,\
isDeterministic=None,maxWeightCutoff=None,minWeightCutoff=None,network=None,\
NodeAttribute=None,nodeList=None,numIterations=None,singlePartition=None,\
Type=None,ver... | python | def force_directed(self,defaultEdgeWeight=None,defaultNodeMass=None,\
defaultSpringCoefficient=None,defaultSpringLength=None,EdgeAttribute=None,\
isDeterministic=None,maxWeightCutoff=None,minWeightCutoff=None,network=None,\
NodeAttribute=None,nodeList=None,numIterations=None,singlePartition=None,\
Type=None,ver... | [
"def",
"force_directed",
"(",
"self",
",",
"defaultEdgeWeight",
"=",
"None",
",",
"defaultNodeMass",
"=",
"None",
",",
"defaultSpringCoefficient",
"=",
"None",
",",
"defaultSpringLength",
"=",
"None",
",",
"EdgeAttribute",
"=",
"None",
",",
"isDeterministic",
"=",... | Execute the Prefuse Force Directed Layout on a network
:param defaultEdgeWeight (string, optional): The default edge weight to con
sider, default is 0.5
:param defaultNodeMass (string, optional): Default Node Mass, in numeric va
lue
:param defaultSpringCoefficient (string, optional): Default Spring Coeffic... | [
"Execute",
"the",
"Prefuse",
"Force",
"Directed",
"Layout",
"on",
"a",
"network"
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/layout.py#L265-L321 |
12,048 | cytoscape/py2cytoscape | py2cytoscape/cyrest/layout.py | layout.genemania_force_directed | def genemania_force_directed(self,curveSteepness=None,defaultEdgeWeight=None,\
defaultSpringCoefficient=None,defaultSpringLength=None,EdgeAttribute=None,\
ignoreHiddenElements=None,isDeterministic=None,maxNodeMass=None,\
maxWeightCutoff=None,midpointEdges=None,minNodeMass=None,minWeightCutoff=None,\
network=Non... | python | def genemania_force_directed(self,curveSteepness=None,defaultEdgeWeight=None,\
defaultSpringCoefficient=None,defaultSpringLength=None,EdgeAttribute=None,\
ignoreHiddenElements=None,isDeterministic=None,maxNodeMass=None,\
maxWeightCutoff=None,midpointEdges=None,minNodeMass=None,minWeightCutoff=None,\
network=Non... | [
"def",
"genemania_force_directed",
"(",
"self",
",",
"curveSteepness",
"=",
"None",
",",
"defaultEdgeWeight",
"=",
"None",
",",
"defaultSpringCoefficient",
"=",
"None",
",",
"defaultSpringLength",
"=",
"None",
",",
"EdgeAttribute",
"=",
"None",
",",
"ignoreHiddenEle... | Execute the GeneMANIA Force Directed Layout on a network.
:param curveSteepness (string, optional):
:param defaultEdgeWeight (string, optional): The default edge weight to con
sider, default is 0.5
:param defaultSpringCoefficient (string, optional):
:param defaultSpringLength (string, optional):
:param Ed... | [
"Execute",
"the",
"GeneMANIA",
"Force",
"Directed",
"Layout",
"on",
"a",
"network",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/layout.py#L455-L512 |
12,049 | cytoscape/py2cytoscape | py2cytoscape/cyrest/layout.py | layout.get_preferred | def get_preferred(self,network=None,verbose=None):
"""
Returns the name of the current preferred layout or empty string if not
set. Default is grid.
:param network (string, optional): Gets the name of the current preferred l
ayout
"""
network=check_network(self,network,verbose=verbose)
PARAMS=set_para... | python | def get_preferred(self,network=None,verbose=None):
"""
Returns the name of the current preferred layout or empty string if not
set. Default is grid.
:param network (string, optional): Gets the name of the current preferred l
ayout
"""
network=check_network(self,network,verbose=verbose)
PARAMS=set_para... | [
"def",
"get_preferred",
"(",
"self",
",",
"network",
"=",
"None",
",",
"verbose",
"=",
"None",
")",
":",
"network",
"=",
"check_network",
"(",
"self",
",",
"network",
",",
"verbose",
"=",
"verbose",
")",
"PARAMS",
"=",
"set_param",
"(",
"[",
"'network'",... | Returns the name of the current preferred layout or empty string if not
set. Default is grid.
:param network (string, optional): Gets the name of the current preferred l
ayout | [
"Returns",
"the",
"name",
"of",
"the",
"current",
"preferred",
"layout",
"or",
"empty",
"string",
"if",
"not",
"set",
".",
"Default",
"is",
"grid",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/layout.py#L515-L526 |
12,050 | cytoscape/py2cytoscape | py2cytoscape/cyrest/layout.py | layout.grid | def grid(self,EdgeAttribute=None,network=None,NodeAttribute=None,\
nodeHorizontalSpacing=None,nodeList=None,nodeVerticalSpacing=None,verbose=None):
"""
Execute the Grid Layout on a network.
:param EdgeAttribute (string, optional): The name of the edge column contai
ning numeric values that will be used as w... | python | def grid(self,EdgeAttribute=None,network=None,NodeAttribute=None,\
nodeHorizontalSpacing=None,nodeList=None,nodeVerticalSpacing=None,verbose=None):
"""
Execute the Grid Layout on a network.
:param EdgeAttribute (string, optional): The name of the edge column contai
ning numeric values that will be used as w... | [
"def",
"grid",
"(",
"self",
",",
"EdgeAttribute",
"=",
"None",
",",
"network",
"=",
"None",
",",
"NodeAttribute",
"=",
"None",
",",
"nodeHorizontalSpacing",
"=",
"None",
",",
"nodeList",
"=",
"None",
",",
"nodeVerticalSpacing",
"=",
"None",
",",
"verbose",
... | Execute the Grid Layout on a network.
:param EdgeAttribute (string, optional): The name of the edge column contai
ning numeric values that will be used as weights in the layout algor
ithm. Only columns containing numeric values are shown
:param network (string, optional): Specifies a network by name, or by S... | [
"Execute",
"the",
"Grid",
"Layout",
"on",
"a",
"network",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/layout.py#L528-L560 |
12,051 | cytoscape/py2cytoscape | py2cytoscape/cyrest/layout.py | layout.hierarchical | def hierarchical(self,bandGap=None,componentSpacing=None,EdgeAttribute=None,\
leftEdge=None,network=None,NodeAttribute=None,nodeHorizontalSpacing=None,\
nodeList=None,nodeVerticalSpacing=None,rightMargin=None,topEdge=None,\
verbose=None):
"""
Execute the Hierarchical Layout on a network.
:param bandGap (st... | python | def hierarchical(self,bandGap=None,componentSpacing=None,EdgeAttribute=None,\
leftEdge=None,network=None,NodeAttribute=None,nodeHorizontalSpacing=None,\
nodeList=None,nodeVerticalSpacing=None,rightMargin=None,topEdge=None,\
verbose=None):
"""
Execute the Hierarchical Layout on a network.
:param bandGap (st... | [
"def",
"hierarchical",
"(",
"self",
",",
"bandGap",
"=",
"None",
",",
"componentSpacing",
"=",
"None",
",",
"EdgeAttribute",
"=",
"None",
",",
"leftEdge",
"=",
"None",
",",
"network",
"=",
"None",
",",
"NodeAttribute",
"=",
"None",
",",
"nodeHorizontalSpacin... | Execute the Hierarchical Layout on a network.
:param bandGap (string, optional): Band gap, in numeric value
:param componentSpacing (string, optional): Component spacing, in numeric v
alue
:param EdgeAttribute (string, optional): The name of the edge column contai
ning numeric values that will be used as w... | [
"Execute",
"the",
"Hierarchical",
"Layout",
"on",
"a",
"network",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/layout.py#L563-L604 |
12,052 | cytoscape/py2cytoscape | py2cytoscape/cyrest/layout.py | layout.isom | def isom(self,coolingFactor=None,EdgeAttribute=None,initialAdaptation=None,\
maxEpoch=None,minAdaptation=None,minRadius=None,network=None,NodeAttribute=None,\
nodeList=None,radius=None,radiusConstantTime=None,singlePartition=None,\
sizeFactor=None,verbose=None):
"""
Execute the Inverted Self-Organizing Map La... | python | def isom(self,coolingFactor=None,EdgeAttribute=None,initialAdaptation=None,\
maxEpoch=None,minAdaptation=None,minRadius=None,network=None,NodeAttribute=None,\
nodeList=None,radius=None,radiusConstantTime=None,singlePartition=None,\
sizeFactor=None,verbose=None):
"""
Execute the Inverted Self-Organizing Map La... | [
"def",
"isom",
"(",
"self",
",",
"coolingFactor",
"=",
"None",
",",
"EdgeAttribute",
"=",
"None",
",",
"initialAdaptation",
"=",
"None",
",",
"maxEpoch",
"=",
"None",
",",
"minAdaptation",
"=",
"None",
",",
"minRadius",
"=",
"None",
",",
"network",
"=",
... | Execute the Inverted Self-Organizing Map Layout on a network.
:param coolingFactor (string, optional): Cooling factor, in numeric value
:param EdgeAttribute (string, optional): The name of the edge column contai
ning numeric values that will be used as weights in the layout algor
ithm. Only columns containin... | [
"Execute",
"the",
"Inverted",
"Self",
"-",
"Organizing",
"Map",
"Layout",
"on",
"a",
"network",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/layout.py#L607-L651 |
12,053 | cytoscape/py2cytoscape | py2cytoscape/cyrest/layout.py | layout.kamada_kawai | def kamada_kawai(self,defaultEdgeWeight=None,EdgeAttribute=None,\
m_anticollisionSpringStrength=None,m_averageIterationsPerNode=None,\
m_disconnectedNodeDistanceSpringRestLength=None,\
m_disconnectedNodeDistanceSpringStrength=None,m_layoutPass=None,\
m_nodeDistanceRestLengthConstant=None,m_nodeDistanceStrengthC... | python | def kamada_kawai(self,defaultEdgeWeight=None,EdgeAttribute=None,\
m_anticollisionSpringStrength=None,m_averageIterationsPerNode=None,\
m_disconnectedNodeDistanceSpringRestLength=None,\
m_disconnectedNodeDistanceSpringStrength=None,m_layoutPass=None,\
m_nodeDistanceRestLengthConstant=None,m_nodeDistanceStrengthC... | [
"def",
"kamada_kawai",
"(",
"self",
",",
"defaultEdgeWeight",
"=",
"None",
",",
"EdgeAttribute",
"=",
"None",
",",
"m_anticollisionSpringStrength",
"=",
"None",
",",
"m_averageIterationsPerNode",
"=",
"None",
",",
"m_disconnectedNodeDistanceSpringRestLength",
"=",
"None... | Execute the Edge-weighted Spring Embedded Layout on a network.
:param defaultEdgeWeight (string, optional): The default edge weight to con
sider, default is 0.5
:param EdgeAttribute (string, optional): The name of the edge column contai
ning numeric values that will be used as weights in the layout algor
... | [
"Execute",
"the",
"Edge",
"-",
"weighted",
"Spring",
"Embedded",
"Layout",
"on",
"a",
"network",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/layout.py#L653-L726 |
12,054 | cytoscape/py2cytoscape | py2cytoscape/cyrest/layout.py | layout.set_preferred | def set_preferred(self,preferredLayout=None,verbose=None):
"""
Sets the preferred layout. Takes a specific name as defined in the API
Default is grid.
:param preferredLayout (string, optional): Layout to use as preferred, for
allowed names see Layout API
"""
PARAMS=set_param(['preferredLayout'],[preferr... | python | def set_preferred(self,preferredLayout=None,verbose=None):
"""
Sets the preferred layout. Takes a specific name as defined in the API
Default is grid.
:param preferredLayout (string, optional): Layout to use as preferred, for
allowed names see Layout API
"""
PARAMS=set_param(['preferredLayout'],[preferr... | [
"def",
"set_preferred",
"(",
"self",
",",
"preferredLayout",
"=",
"None",
",",
"verbose",
"=",
"None",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"'preferredLayout'",
"]",
",",
"[",
"preferredLayout",
"]",
")",
"response",
"=",
"api",
"(",
"url",
"=... | Sets the preferred layout. Takes a specific name as defined in the API
Default is grid.
:param preferredLayout (string, optional): Layout to use as preferred, for
allowed names see Layout API | [
"Sets",
"the",
"preferred",
"layout",
".",
"Takes",
"a",
"specific",
"name",
"as",
"defined",
"in",
"the",
"API",
"Default",
"is",
"grid",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/layout.py#L729-L739 |
12,055 | cytoscape/py2cytoscape | py2cytoscape/cyrest/layout.py | layout.stacked_node_layout | def stacked_node_layout(self,EdgeAttribute=None,network=None,NodeAttribute=None,\
nodeList=None,x_position=None,y_start_position=None,verbose=None):
"""
Execute the Stacked Node Layout on a network.
:param EdgeAttribute (string, optional): The name of the edge column contai
ning numeric values that will be ... | python | def stacked_node_layout(self,EdgeAttribute=None,network=None,NodeAttribute=None,\
nodeList=None,x_position=None,y_start_position=None,verbose=None):
"""
Execute the Stacked Node Layout on a network.
:param EdgeAttribute (string, optional): The name of the edge column contai
ning numeric values that will be ... | [
"def",
"stacked_node_layout",
"(",
"self",
",",
"EdgeAttribute",
"=",
"None",
",",
"network",
"=",
"None",
",",
"NodeAttribute",
"=",
"None",
",",
"nodeList",
"=",
"None",
",",
"x_position",
"=",
"None",
",",
"y_start_position",
"=",
"None",
",",
"verbose",
... | Execute the Stacked Node Layout on a network.
:param EdgeAttribute (string, optional): The name of the edge column contai
ning numeric values that will be used as weights in the layout algor
ithm. Only columns containing numeric values are shown
:param network (string, optional): Specifies a network by name,... | [
"Execute",
"the",
"Stacked",
"Node",
"Layout",
"on",
"a",
"network",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/layout.py#L742-L772 |
12,056 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.create_column | def create_column(self,columnName=None,listType=None,table=None,ntype=None,verbose=None):
"""
Appends an additional column of attribute values to the current table.
:param columnName (string, optional): The new column name
:param listType (string, optional): Can be one of integer, long,... | python | def create_column(self,columnName=None,listType=None,table=None,ntype=None,verbose=None):
"""
Appends an additional column of attribute values to the current table.
:param columnName (string, optional): The new column name
:param listType (string, optional): Can be one of integer, long,... | [
"def",
"create_column",
"(",
"self",
",",
"columnName",
"=",
"None",
",",
"listType",
"=",
"None",
",",
"table",
"=",
"None",
",",
"ntype",
"=",
"None",
",",
"verbose",
"=",
"None",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"'columnName'",
",",
... | Appends an additional column of attribute values to the current table.
:param columnName (string, optional): The new column name
:param listType (string, optional): Can be one of integer, long, double, or
string.
:param table (string, optional): Specifies a table by table name. ... | [
"Appends",
"an",
"additional",
"column",
"of",
"attribute",
"values",
"to",
"the",
"current",
"table",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L30-L46 |
12,057 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.create_table | def create_table(self,keyColumn=None,keyColumnType=None,title=None,verbose=None):
"""
Adds a new table to the network.
:param keyColumn (string, optional): Specifies the name of a column in the
table
:param keyColumnType (string, optional): The syntactical type of the value
... | python | def create_table(self,keyColumn=None,keyColumnType=None,title=None,verbose=None):
"""
Adds a new table to the network.
:param keyColumn (string, optional): Specifies the name of a column in the
table
:param keyColumnType (string, optional): The syntactical type of the value
... | [
"def",
"create_table",
"(",
"self",
",",
"keyColumn",
"=",
"None",
",",
"keyColumnType",
"=",
"None",
",",
"title",
"=",
"None",
",",
"verbose",
"=",
"None",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"'keyColumn'",
",",
"'keyColumnType'",
",",
"'ti... | Adds a new table to the network.
:param keyColumn (string, optional): Specifies the name of a column in the
table
:param keyColumnType (string, optional): The syntactical type of the value
used in the key
:param title (string, optional): The name of the table used in the... | [
"Adds",
"a",
"new",
"table",
"to",
"the",
"network",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L49-L65 |
12,058 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.delete_column | def delete_column(self,column=None,table=None,verbose=None):
"""
Remove a column from a table, specified by its name. Returns the name of
the column removed.
:param column (string, optional): Specifies the name of a column in the tab
le
:param table (string, optional... | python | def delete_column(self,column=None,table=None,verbose=None):
"""
Remove a column from a table, specified by its name. Returns the name of
the column removed.
:param column (string, optional): Specifies the name of a column in the tab
le
:param table (string, optional... | [
"def",
"delete_column",
"(",
"self",
",",
"column",
"=",
"None",
",",
"table",
"=",
"None",
",",
"verbose",
"=",
"None",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"'column'",
",",
"'table'",
"]",
",",
"[",
"column",
",",
"table",
"]",
")",
"r... | Remove a column from a table, specified by its name. Returns the name of
the column removed.
:param column (string, optional): Specifies the name of a column in the tab
le
:param table (string, optional): Specifies a table by table name. If the pr
efix SUID: is used, the... | [
"Remove",
"a",
"column",
"from",
"a",
"table",
"specified",
"by",
"its",
"name",
".",
"Returns",
"the",
"name",
"of",
"the",
"column",
"removed",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L67-L80 |
12,059 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.delete_row | def delete_row(self,keyValue=None,table=None,verbose=None):
"""
Deletes a row from a table.Requires the table name or SUID and the row key.
:param keyValue (string): Specifies the primary key of a value in the row o
f a table
:param table (string, optional): Specifies a tabl... | python | def delete_row(self,keyValue=None,table=None,verbose=None):
"""
Deletes a row from a table.Requires the table name or SUID and the row key.
:param keyValue (string): Specifies the primary key of a value in the row o
f a table
:param table (string, optional): Specifies a tabl... | [
"def",
"delete_row",
"(",
"self",
",",
"keyValue",
"=",
"None",
",",
"table",
"=",
"None",
",",
"verbose",
"=",
"None",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"'keyValue'",
",",
"'table'",
"]",
",",
"[",
"keyValue",
",",
"table",
"]",
")",
... | Deletes a row from a table.Requires the table name or SUID and the row key.
:param keyValue (string): Specifies the primary key of a value in the row o
f a table
:param table (string, optional): Specifies a table by table name. If the pr
efix SUID: is used, the table correspondi... | [
"Deletes",
"a",
"row",
"from",
"a",
"table",
".",
"Requires",
"the",
"table",
"name",
"or",
"SUID",
"and",
"the",
"row",
"key",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L83-L95 |
12,060 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.get_value | def get_value(self,column=None,keyValue=None,table=None,verbose=None):
"""
Returns the value from a cell as specified by row and column ids.
:param column (string, optional): Specifies the name of a column in the tab
le
:param keyValue (string, optional): Specifies a row of ... | python | def get_value(self,column=None,keyValue=None,table=None,verbose=None):
"""
Returns the value from a cell as specified by row and column ids.
:param column (string, optional): Specifies the name of a column in the tab
le
:param keyValue (string, optional): Specifies a row of ... | [
"def",
"get_value",
"(",
"self",
",",
"column",
"=",
"None",
",",
"keyValue",
"=",
"None",
",",
"table",
"=",
"None",
",",
"verbose",
"=",
"None",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"'column'",
",",
"'keyValue'",
",",
"'table'",
"]",
","... | Returns the value from a cell as specified by row and column ids.
:param column (string, optional): Specifies the name of a column in the tab
le
:param keyValue (string, optional): Specifies a row of a table using the pr
imary key as the indentifier
:param table (string,... | [
"Returns",
"the",
"value",
"from",
"a",
"cell",
"as",
"specified",
"by",
"row",
"and",
"column",
"ids",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L160-L176 |
12,061 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.import_url | def import_url(self,caseSensitiveNetworkCollectionKeys=None,\
caseSensitiveNetworkKeys=None,dataTypeList=None,\
DataTypeTargetForNetworkCollection=None,DataTypeTargetForNetworkList=None,\
delimiters=None,delimitersForDataList=None,firstRowAsColumnNames=None,\
KeyColumnForMapping=None,Key... | python | def import_url(self,caseSensitiveNetworkCollectionKeys=None,\
caseSensitiveNetworkKeys=None,dataTypeList=None,\
DataTypeTargetForNetworkCollection=None,DataTypeTargetForNetworkList=None,\
delimiters=None,delimitersForDataList=None,firstRowAsColumnNames=None,\
KeyColumnForMapping=None,Key... | [
"def",
"import_url",
"(",
"self",
",",
"caseSensitiveNetworkCollectionKeys",
"=",
"None",
",",
"caseSensitiveNetworkKeys",
"=",
"None",
",",
"dataTypeList",
"=",
"None",
",",
"DataTypeTargetForNetworkCollection",
"=",
"None",
",",
"DataTypeTargetForNetworkList",
"=",
"N... | Similar to Import Table this uses a long list of input parameters to
specify the attributes of the table, the mapping keys, and the destination
table for the input.
:param caseSensitiveNetworkCollectionKeys (string, optional): Determines wh
ether capitalization is considered in matc... | [
"Similar",
"to",
"Import",
"Table",
"this",
"uses",
"a",
"long",
"list",
"of",
"input",
"parameters",
"to",
"specify",
"the",
"attributes",
"of",
"the",
"table",
"the",
"mapping",
"keys",
"and",
"the",
"destination",
"table",
"for",
"the",
"input",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L246-L311 |
12,062 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.list_tables | def list_tables(self,includePrivate=None,namespace=None,atype=None,verbose=None):
"""
Returns a list of the table SUIDs associated with the passed network parameter.
:param includePrivate (string, optional): A boolean value determining wheth
er to return private as well as public ta... | python | def list_tables(self,includePrivate=None,namespace=None,atype=None,verbose=None):
"""
Returns a list of the table SUIDs associated with the passed network parameter.
:param includePrivate (string, optional): A boolean value determining wheth
er to return private as well as public ta... | [
"def",
"list_tables",
"(",
"self",
",",
"includePrivate",
"=",
"None",
",",
"namespace",
"=",
"None",
",",
"atype",
"=",
"None",
",",
"verbose",
"=",
"None",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"'includePrivate'",
",",
"'namespace'",
",",
"'t... | Returns a list of the table SUIDs associated with the passed network parameter.
:param includePrivate (string, optional): A boolean value determining wheth
er to return private as well as public tables
:param namespace (string, optional): An optional argument to contrain outpu
t... | [
"Returns",
"a",
"list",
"of",
"the",
"table",
"SUIDs",
"associated",
"with",
"the",
"passed",
"network",
"parameter",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L314-L329 |
12,063 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.list_columns | def list_columns(self,table=None,verbose=None):
"""
Returns the list of columns in the table.
:param table (string, optional): Specifies a table by table name. If the pr
efix SUID: is used, the table corresponding the SUID will be returne
d.
:returns: list of col... | python | def list_columns(self,table=None,verbose=None):
"""
Returns the list of columns in the table.
:param table (string, optional): Specifies a table by table name. If the pr
efix SUID: is used, the table corresponding the SUID will be returne
d.
:returns: list of col... | [
"def",
"list_columns",
"(",
"self",
",",
"table",
"=",
"None",
",",
"verbose",
"=",
"None",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"'table'",
"]",
",",
"[",
"table",
"]",
")",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"__url",
... | Returns the list of columns in the table.
:param table (string, optional): Specifies a table by table name. If the pr
efix SUID: is used, the table corresponding the SUID will be returne
d.
:returns: list of columns in the table. | [
"Returns",
"the",
"list",
"of",
"columns",
"in",
"the",
"table",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L332-L343 |
12,064 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.list_rows | def list_rows(self,rowList=None,table=None,verbose=None):
"""
Returns the list of primary keys for each of the rows in the specified table.
:param rowList (string, optional): Specifies a list of rows. The pattern CO
LUMN:VALUE sets this parameter to any rows that contain the specifi... | python | def list_rows(self,rowList=None,table=None,verbose=None):
"""
Returns the list of primary keys for each of the rows in the specified table.
:param rowList (string, optional): Specifies a list of rows. The pattern CO
LUMN:VALUE sets this parameter to any rows that contain the specifi... | [
"def",
"list_rows",
"(",
"self",
",",
"rowList",
"=",
"None",
",",
"table",
"=",
"None",
",",
"verbose",
"=",
"None",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"'rowList'",
",",
"'table'",
"]",
",",
"[",
"rowList",
",",
"table",
"]",
")",
"re... | Returns the list of primary keys for each of the rows in the specified table.
:param rowList (string, optional): Specifies a list of rows. The pattern CO
LUMN:VALUE sets this parameter to any rows that contain the specifie
d column value; if the COLUMN prefix is not used, the NAME colum... | [
"Returns",
"the",
"list",
"of",
"primary",
"keys",
"for",
"each",
"of",
"the",
"rows",
"in",
"the",
"specified",
"table",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L346-L362 |
12,065 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.merge | def merge(self,DataTypeTargetForNetworkCollection=None,\
dataTypeTargetForNetworkList=None,mergeType=None,SourceMergeColumns=None,\
SourceMergeKey=None,SourceTable=None,TargetKeyNetworkCollection=None,\
TargetMergeKey=None,TargetNetworkCollection=None,TargetNetworkList=None,\
UnassignedT... | python | def merge(self,DataTypeTargetForNetworkCollection=None,\
dataTypeTargetForNetworkList=None,mergeType=None,SourceMergeColumns=None,\
SourceMergeKey=None,SourceTable=None,TargetKeyNetworkCollection=None,\
TargetMergeKey=None,TargetNetworkCollection=None,TargetNetworkList=None,\
UnassignedT... | [
"def",
"merge",
"(",
"self",
",",
"DataTypeTargetForNetworkCollection",
"=",
"None",
",",
"dataTypeTargetForNetworkList",
"=",
"None",
",",
"mergeType",
"=",
"None",
",",
"SourceMergeColumns",
"=",
"None",
",",
"SourceMergeKey",
"=",
"None",
",",
"SourceTable",
"=... | Merge tables together joining around a designated key column. Depending
on the arguments, might merge into multiple local tables.
:param DataTypeTargetForNetworkCollection (string, optional): The collectio
n of networks where the merged table will reside
:param dataTypeTargetForNetw... | [
"Merge",
"tables",
"together",
"joining",
"around",
"a",
"designated",
"key",
"column",
".",
"Depending",
"on",
"the",
"arguments",
"might",
"merge",
"into",
"multiple",
"local",
"tables",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L365-L400 |
12,066 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.rename_column | def rename_column(self,columnName=None,newColumnName=None,table=None,verbose=None):
"""
Changes the name of a specified column in the table.
:param columnName (string): The name of the column that will be renamed.
:param newColumnName (string): The new name of the column.
:param... | python | def rename_column(self,columnName=None,newColumnName=None,table=None,verbose=None):
"""
Changes the name of a specified column in the table.
:param columnName (string): The name of the column that will be renamed.
:param newColumnName (string): The new name of the column.
:param... | [
"def",
"rename_column",
"(",
"self",
",",
"columnName",
"=",
"None",
",",
"newColumnName",
"=",
"None",
",",
"table",
"=",
"None",
",",
"verbose",
"=",
"None",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"'columnName'",
",",
"'newColumnName'",
",",
"... | Changes the name of a specified column in the table.
:param columnName (string): The name of the column that will be renamed.
:param newColumnName (string): The new name of the column.
:param table (string, optional): Specifies a table by table name. If the pr
efix SUID: is used, th... | [
"Changes",
"the",
"name",
"of",
"a",
"specified",
"column",
"in",
"the",
"table",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L404-L416 |
12,067 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.set_title | def set_title(self,table=None,title=None,verbose=None):
"""
Changes the visible identifier of a single table.
:param table (string, optional): Specifies a table by table name. If the pr
efix SUID: is used, the table corresponding the SUID will be returne
d.
:para... | python | def set_title(self,table=None,title=None,verbose=None):
"""
Changes the visible identifier of a single table.
:param table (string, optional): Specifies a table by table name. If the pr
efix SUID: is used, the table corresponding the SUID will be returne
d.
:para... | [
"def",
"set_title",
"(",
"self",
",",
"table",
"=",
"None",
",",
"title",
"=",
"None",
",",
"verbose",
"=",
"None",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"'table'",
",",
"'title'",
"]",
",",
"[",
"table",
",",
"title",
"]",
")",
"response... | Changes the visible identifier of a single table.
:param table (string, optional): Specifies a table by table name. If the pr
efix SUID: is used, the table corresponding the SUID will be returne
d.
:param title (string, optional): The name of the table used in the current
... | [
"Changes",
"the",
"visible",
"identifier",
"of",
"a",
"single",
"table",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L420-L432 |
12,068 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.set_values | def set_values(self,columnName=None,rowList=None,table=None,value=None,verbose=None):
"""
Set all the values in the specified list of rows with a single value.
:param columnName (string, optional): Specifies the name of a column in the
table
:param rowList (string, optio... | python | def set_values(self,columnName=None,rowList=None,table=None,value=None,verbose=None):
"""
Set all the values in the specified list of rows with a single value.
:param columnName (string, optional): Specifies the name of a column in the
table
:param rowList (string, optio... | [
"def",
"set_values",
"(",
"self",
",",
"columnName",
"=",
"None",
",",
"rowList",
"=",
"None",
",",
"table",
"=",
"None",
",",
"value",
"=",
"None",
",",
"verbose",
"=",
"None",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"'columnName'",
",",
"'r... | Set all the values in the specified list of rows with a single value.
:param columnName (string, optional): Specifies the name of a column in the
table
:param rowList (string, optional): Specifies a list of rows. The pattern CO
LUMN:VALUE sets this parameter to any rows that... | [
"Set",
"all",
"the",
"values",
"in",
"the",
"specified",
"list",
"of",
"rows",
"with",
"a",
"single",
"value",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L436-L457 |
12,069 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.getTable | def getTable(self, columns=None, table=None, network = "current", namespace='default', verbose=VERBOSE):
"""
Gets tables from cytoscape.
:param table: table to retrieve eg. node
:param columns: columns to retrieve in list format
:param network (string, optional): Specifies a net... | python | def getTable(self, columns=None, table=None, network = "current", namespace='default', verbose=VERBOSE):
"""
Gets tables from cytoscape.
:param table: table to retrieve eg. node
:param columns: columns to retrieve in list format
:param network (string, optional): Specifies a net... | [
"def",
"getTable",
"(",
"self",
",",
"columns",
"=",
"None",
",",
"table",
"=",
"None",
",",
"network",
"=",
"\"current\"",
",",
"namespace",
"=",
"'default'",
",",
"verbose",
"=",
"VERBOSE",
")",
":",
"u",
"=",
"self",
".",
"__url",
"host",
"=",
"u"... | Gets tables from cytoscape.
:param table: table to retrieve eg. node
:param columns: columns to retrieve in list format
:param network (string, optional): Specifies a network by name, or by
SUID if the prefix SUID: is used. The keyword CURRENT, or a blank
value can also ... | [
"Gets",
"tables",
"from",
"cytoscape",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L459-L515 |
12,070 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.loadTableData | def loadTableData(self, df, df_key='index',table="node", table_key_column = "name", \
network="current",namespace="default",verbose=False):
"""
Loads tables into cytoscape.
:param df: a pandas dataframe to load
:param df_key: key column in df, default="index"
:param tabl... | python | def loadTableData(self, df, df_key='index',table="node", table_key_column = "name", \
network="current",namespace="default",verbose=False):
"""
Loads tables into cytoscape.
:param df: a pandas dataframe to load
:param df_key: key column in df, default="index"
:param tabl... | [
"def",
"loadTableData",
"(",
"self",
",",
"df",
",",
"df_key",
"=",
"'index'",
",",
"table",
"=",
"\"node\"",
",",
"table_key_column",
"=",
"\"name\"",
",",
"network",
"=",
"\"current\"",
",",
"namespace",
"=",
"\"default\"",
",",
"verbose",
"=",
"False",
... | Loads tables into cytoscape.
:param df: a pandas dataframe to load
:param df_key: key column in df, default="index"
:param table: target table, default="node"
:param table_key_column: table key column, default="name"
:param network (string, optional): Specifies a network by name... | [
"Loads",
"tables",
"into",
"cytoscape",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L517-L588 |
12,071 | cytoscape/py2cytoscape | py2cytoscape/cyrest/table.py | table.getTableCount | def getTableCount(verbose=None):
"""
Returns the number of global tables.
:param verbose: print more
:returns: 200: successful operation
"""
response=api(url=self.url+'tables/count', method="GET", verbose=verbose, parse_params=False)
return response | python | def getTableCount(verbose=None):
"""
Returns the number of global tables.
:param verbose: print more
:returns: 200: successful operation
"""
response=api(url=self.url+'tables/count', method="GET", verbose=verbose, parse_params=False)
return response | [
"def",
"getTableCount",
"(",
"verbose",
"=",
"None",
")",
":",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"url",
"+",
"'tables/count'",
",",
"method",
"=",
"\"GET\"",
",",
"verbose",
"=",
"verbose",
",",
"parse_params",
"=",
"False",
")",
"r... | Returns the number of global tables.
:param verbose: print more
:returns: 200: successful operation | [
"Returns",
"the",
"number",
"of",
"global",
"tables",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/table.py#L590-L600 |
12,072 | cytoscape/py2cytoscape | py2cytoscape/data/base_view.py | BaseView.set_value | def set_value(self, visual_property, value):
"""Set a single Visual Property Value
:param visual_property: Visual Property ID
:param value: New value for the VP
:return: None
"""
if visual_property is None or value is None:
raise ValueError('Both VP and value... | python | def set_value(self, visual_property, value):
"""Set a single Visual Property Value
:param visual_property: Visual Property ID
:param value: New value for the VP
:return: None
"""
if visual_property is None or value is None:
raise ValueError('Both VP and value... | [
"def",
"set_value",
"(",
"self",
",",
"visual_property",
",",
"value",
")",
":",
"if",
"visual_property",
"is",
"None",
"or",
"value",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"'Both VP and value are required.'",
")",
"new_value",
"=",
"[",
"{",
"'visual... | Set a single Visual Property Value
:param visual_property: Visual Property ID
:param value: New value for the VP
:return: None | [
"Set",
"a",
"single",
"Visual",
"Property",
"Value"
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/data/base_view.py#L41-L57 |
12,073 | cytoscape/py2cytoscape | py2cytoscape/data/base_view.py | BaseView.set_values | def set_values(self, values):
"""
Set multiple Visual properties at once.
:param values:
:return:
"""
if values is None:
raise ValueError('Values are required.')
new_values = []
for vp in values.keys():
new_val = {
... | python | def set_values(self, values):
"""
Set multiple Visual properties at once.
:param values:
:return:
"""
if values is None:
raise ValueError('Values are required.')
new_values = []
for vp in values.keys():
new_val = {
... | [
"def",
"set_values",
"(",
"self",
",",
"values",
")",
":",
"if",
"values",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"'Values are required.'",
")",
"new_values",
"=",
"[",
"]",
"for",
"vp",
"in",
"values",
".",
"keys",
"(",
")",
":",
"new_val",
"=... | Set multiple Visual properties at once.
:param values:
:return: | [
"Set",
"multiple",
"Visual",
"properties",
"at",
"once",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/data/base_view.py#L59-L77 |
12,074 | cytoscape/py2cytoscape | py2cytoscape/data/base_view.py | BaseView.get_value | def get_value(self, visual_property):
"""Get a value for the Visual Property
:param visual_property:
:return:
"""
res = requests.get(self.url + '/' + visual_property)
return res.json()['value'] | python | def get_value(self, visual_property):
"""Get a value for the Visual Property
:param visual_property:
:return:
"""
res = requests.get(self.url + '/' + visual_property)
return res.json()['value'] | [
"def",
"get_value",
"(",
"self",
",",
"visual_property",
")",
":",
"res",
"=",
"requests",
".",
"get",
"(",
"self",
".",
"url",
"+",
"'/'",
"+",
"visual_property",
")",
"return",
"res",
".",
"json",
"(",
")",
"[",
"'value'",
"]"
] | Get a value for the Visual Property
:param visual_property:
:return: | [
"Get",
"a",
"value",
"for",
"the",
"Visual",
"Property"
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/data/base_view.py#L79-L86 |
12,075 | cytoscape/py2cytoscape | py2cytoscape/data/base_view.py | BaseView.get_values | def get_values(self):
"""Get all visual property values for the object
:return: dictionary of values (VP ID - value)
"""
results = requests.get(self.url).json()
values = {}
for entry in results:
values[entry['visualProperty']] = entry['value']
return... | python | def get_values(self):
"""Get all visual property values for the object
:return: dictionary of values (VP ID - value)
"""
results = requests.get(self.url).json()
values = {}
for entry in results:
values[entry['visualProperty']] = entry['value']
return... | [
"def",
"get_values",
"(",
"self",
")",
":",
"results",
"=",
"requests",
".",
"get",
"(",
"self",
".",
"url",
")",
".",
"json",
"(",
")",
"values",
"=",
"{",
"}",
"for",
"entry",
"in",
"results",
":",
"values",
"[",
"entry",
"[",
"'visualProperty'",
... | Get all visual property values for the object
:return: dictionary of values (VP ID - value) | [
"Get",
"all",
"visual",
"property",
"values",
"for",
"the",
"object"
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/data/base_view.py#L88-L98 |
12,076 | cytoscape/py2cytoscape | py2cytoscape/data/network_view.py | CyNetworkView.update_network_view | def update_network_view(self, visual_property=None, value=None):
"""
Updates single value for Network-related VP.
:param visual_property:
:param value:
:return:
"""
new_value = [
{
"visualProperty": visual_property,
"v... | python | def update_network_view(self, visual_property=None, value=None):
"""
Updates single value for Network-related VP.
:param visual_property:
:param value:
:return:
"""
new_value = [
{
"visualProperty": visual_property,
"v... | [
"def",
"update_network_view",
"(",
"self",
",",
"visual_property",
"=",
"None",
",",
"value",
"=",
"None",
")",
":",
"new_value",
"=",
"[",
"{",
"\"visualProperty\"",
":",
"visual_property",
",",
"\"value\"",
":",
"value",
"}",
"]",
"res",
"=",
"requests",
... | Updates single value for Network-related VP.
:param visual_property:
:param value:
:return: | [
"Updates",
"single",
"value",
"for",
"Network",
"-",
"related",
"VP",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/data/network_view.py#L153-L171 |
12,077 | cytoscape/py2cytoscape | py2cytoscape/cyrest/view.py | view.export | def export(self, Height=None, options=None, outputFile=None, Resolution=None,\
Units=None, Width=None, Zoom=None, view="current", verbose=False):
"""
Exports the current view to a graphics file and returns the path to the
saved file. PNG and JPEG formats have options for scaling, whi... | python | def export(self, Height=None, options=None, outputFile=None, Resolution=None,\
Units=None, Width=None, Zoom=None, view="current", verbose=False):
"""
Exports the current view to a graphics file and returns the path to the
saved file. PNG and JPEG formats have options for scaling, whi... | [
"def",
"export",
"(",
"self",
",",
"Height",
"=",
"None",
",",
"options",
"=",
"None",
",",
"outputFile",
"=",
"None",
",",
"Resolution",
"=",
"None",
",",
"Units",
"=",
"None",
",",
"Width",
"=",
"None",
",",
"Zoom",
"=",
"None",
",",
"view",
"=",... | Exports the current view to a graphics file and returns the path to the
saved file. PNG and JPEG formats have options for scaling, while other
formats only have the option 'exportTextAsFont'. For the PDF format,
exporting text as font does not work for two-byte characters such as
... | [
"Exports",
"the",
"current",
"view",
"to",
"a",
"graphics",
"file",
"and",
"returns",
"the",
"path",
"to",
"the",
"saved",
"file",
".",
"PNG",
"and",
"JPEG",
"formats",
"have",
"options",
"for",
"scaling",
"while",
"other",
"formats",
"only",
"have",
"the"... | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/view.py#L46-L85 |
12,078 | cytoscape/py2cytoscape | py2cytoscape/cyrest/view.py | view.fit_content | def fit_content(self, verbose=False):
"""
Zooms out the current view in order to display all of its elements.
:param verbose: print more
"""
PARAMS={}
response=api(url=self.__url+"/fit content", PARAMS=PARAMS, method="POST", verbose=verbose)
return response | python | def fit_content(self, verbose=False):
"""
Zooms out the current view in order to display all of its elements.
:param verbose: print more
"""
PARAMS={}
response=api(url=self.__url+"/fit content", PARAMS=PARAMS, method="POST", verbose=verbose)
return response | [
"def",
"fit_content",
"(",
"self",
",",
"verbose",
"=",
"False",
")",
":",
"PARAMS",
"=",
"{",
"}",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"__url",
"+",
"\"/fit content\"",
",",
"PARAMS",
"=",
"PARAMS",
",",
"method",
"=",
"\"POST\"",
... | Zooms out the current view in order to display all of its elements.
:param verbose: print more | [
"Zooms",
"out",
"the",
"current",
"view",
"in",
"order",
"to",
"display",
"all",
"of",
"its",
"elements",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/view.py#L87-L96 |
12,079 | cytoscape/py2cytoscape | py2cytoscape/cyrest/view.py | view.get_current | def get_current(self, layout=None, network=None, verbose=False):
"""
Returns the current view or null if there is none.
:param verbose: print more
:returns: current view or null if there is none
"""
PARAMS={}
response=api(url=self.__url+"/get_current", PARAMS=PA... | python | def get_current(self, layout=None, network=None, verbose=False):
"""
Returns the current view or null if there is none.
:param verbose: print more
:returns: current view or null if there is none
"""
PARAMS={}
response=api(url=self.__url+"/get_current", PARAMS=PA... | [
"def",
"get_current",
"(",
"self",
",",
"layout",
"=",
"None",
",",
"network",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"PARAMS",
"=",
"{",
"}",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"__url",
"+",
"\"/get_current\"",
",",
... | Returns the current view or null if there is none.
:param verbose: print more
:returns: current view or null if there is none | [
"Returns",
"the",
"current",
"view",
"or",
"null",
"if",
"there",
"is",
"none",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/view.py#L110-L120 |
12,080 | cytoscape/py2cytoscape | py2cytoscape/data/style.py | Style.update_defaults | def update_defaults(self, prop_value_dict):
"""
Updates the value of one or more visual properties.
:param prop_value_dict: Dictionary containing, for each visual property,
the new value to use.
"""
body = []
for key in prop_value_dict:
entry = {... | python | def update_defaults(self, prop_value_dict):
"""
Updates the value of one or more visual properties.
:param prop_value_dict: Dictionary containing, for each visual property,
the new value to use.
"""
body = []
for key in prop_value_dict:
entry = {... | [
"def",
"update_defaults",
"(",
"self",
",",
"prop_value_dict",
")",
":",
"body",
"=",
"[",
"]",
"for",
"key",
"in",
"prop_value_dict",
":",
"entry",
"=",
"{",
"'visualProperty'",
":",
"key",
",",
"'value'",
":",
"prop_value_dict",
"[",
"key",
"]",
"}",
"... | Updates the value of one or more visual properties.
:param prop_value_dict: Dictionary containing, for each visual property,
the new value to use. | [
"Updates",
"the",
"value",
"of",
"one",
"or",
"more",
"visual",
"properties",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/data/style.py#L112-L129 |
12,081 | cytoscape/py2cytoscape | py2cytoscape/cyrest/cyrest.py | cyclient.status | def status(self, verbose=False):
"""
Checks the status of your CyREST server.
"""
try:
response=api(url=self.__url, method="GET", verbose=verbose)
except Exception as e:
print('Could not get status from CyREST:\n\n' + str(e))
else:
prin... | python | def status(self, verbose=False):
"""
Checks the status of your CyREST server.
"""
try:
response=api(url=self.__url, method="GET", verbose=verbose)
except Exception as e:
print('Could not get status from CyREST:\n\n' + str(e))
else:
prin... | [
"def",
"status",
"(",
"self",
",",
"verbose",
"=",
"False",
")",
":",
"try",
":",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"__url",
",",
"method",
"=",
"\"GET\"",
",",
"verbose",
"=",
"verbose",
")",
"except",
"Exception",
"as",
"e",
"... | Checks the status of your CyREST server. | [
"Checks",
"the",
"status",
"of",
"your",
"CyREST",
"server",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/cyrest.py#L67-L76 |
12,082 | cytoscape/py2cytoscape | py2cytoscape/cyrest/cyrest.py | cyclient.version | def version(self, verbose=False):
"""
Checks Cytoscape version
"""
response=api(url=self.__url+"version",method="H", verbose=verbose)
response=json.loads(response)
for k in response.keys():
print(k, response[k]) | python | def version(self, verbose=False):
"""
Checks Cytoscape version
"""
response=api(url=self.__url+"version",method="H", verbose=verbose)
response=json.loads(response)
for k in response.keys():
print(k, response[k]) | [
"def",
"version",
"(",
"self",
",",
"verbose",
"=",
"False",
")",
":",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"__url",
"+",
"\"version\"",
",",
"method",
"=",
"\"H\"",
",",
"verbose",
"=",
"verbose",
")",
"response",
"=",
"json",
".",
... | Checks Cytoscape version | [
"Checks",
"Cytoscape",
"version"
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/cyrest.py#L84-L91 |
12,083 | cytoscape/py2cytoscape | py2cytoscape/cyrest/idmapper.py | idmapper.map_column | def map_column(self, only_use_one=None, source_column=None, species=None, target_selection= None, verbose=False):
"""
Uses the BridgeDB service to look up analogous identifiers from a wide
selection of other databases
:param only_use_one (string, optional): When multiple identifiers can... | python | def map_column(self, only_use_one=None, source_column=None, species=None, target_selection= None, verbose=False):
"""
Uses the BridgeDB service to look up analogous identifiers from a wide
selection of other databases
:param only_use_one (string, optional): When multiple identifiers can... | [
"def",
"map_column",
"(",
"self",
",",
"only_use_one",
"=",
"None",
",",
"source_column",
"=",
"None",
",",
"species",
"=",
"None",
",",
"target_selection",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"\"onl... | Uses the BridgeDB service to look up analogous identifiers from a wide
selection of other databases
:param only_use_one (string, optional): When multiple identifiers can be
mapped from a single term, this forces a singular result
:param source_column (string): Specifies the column n... | [
"Uses",
"the",
"BridgeDB",
"service",
"to",
"look",
"up",
"analogous",
"identifiers",
"from",
"a",
"wide",
"selection",
"of",
"other",
"databases"
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/idmapper.py#L13-L38 |
12,084 | cytoscape/py2cytoscape | py2cytoscape/cyrest/command.py | command.echo | def echo(self, variableName, verbose=False):
"""
The echo command will display the value of the variable specified by the
variableName argument, or all variables if variableName is not provided.
:param variableName: The name of the variable or '*' to display the value of all variables.
... | python | def echo(self, variableName, verbose=False):
"""
The echo command will display the value of the variable specified by the
variableName argument, or all variables if variableName is not provided.
:param variableName: The name of the variable or '*' to display the value of all variables.
... | [
"def",
"echo",
"(",
"self",
",",
"variableName",
",",
"verbose",
"=",
"False",
")",
":",
"PARAMS",
"=",
"{",
"\"variableName\"",
":",
"variableName",
"}",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"__url",
"+",
"\"/echo\"",
",",
"PARAMS",
"... | The echo command will display the value of the variable specified by the
variableName argument, or all variables if variableName is not provided.
:param variableName: The name of the variable or '*' to display the value of all variables.
:param verbose: print more | [
"The",
"echo",
"command",
"will",
"display",
"the",
"value",
"of",
"the",
"variable",
"specified",
"by",
"the",
"variableName",
"argument",
"or",
"all",
"variables",
"if",
"variableName",
"is",
"not",
"provided",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/command.py#L13-L23 |
12,085 | cytoscape/py2cytoscape | py2cytoscape/cyrest/command.py | command.open_dialog | def open_dialog(self, verbose=False):
"""
The command line dialog provides a field to enter commands and view
results. It also provides the help command to display namespaces,
commands, and arguments.
:param verbose: print more
"""
response=api(url=self.__url+"/o... | python | def open_dialog(self, verbose=False):
"""
The command line dialog provides a field to enter commands and view
results. It also provides the help command to display namespaces,
commands, and arguments.
:param verbose: print more
"""
response=api(url=self.__url+"/o... | [
"def",
"open_dialog",
"(",
"self",
",",
"verbose",
"=",
"False",
")",
":",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"__url",
"+",
"\"/open dialog\"",
",",
"verbose",
"=",
"verbose",
")",
"return",
"response"
] | The command line dialog provides a field to enter commands and view
results. It also provides the help command to display namespaces,
commands, and arguments.
:param verbose: print more | [
"The",
"command",
"line",
"dialog",
"provides",
"a",
"field",
"to",
"enter",
"commands",
"and",
"view",
"results",
".",
"It",
"also",
"provides",
"the",
"help",
"command",
"to",
"display",
"namespaces",
"commands",
"and",
"arguments",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/command.py#L25-L34 |
12,086 | cytoscape/py2cytoscape | py2cytoscape/cyrest/command.py | command.pause | def pause(self, message=None, verbose=False):
"""
The pause command displays a dialog with the text provided in the
message argument and waits for the user to click OK
:param message: a message to display. default=None
:param verbose: print more
"""
PARAMS=set_p... | python | def pause(self, message=None, verbose=False):
"""
The pause command displays a dialog with the text provided in the
message argument and waits for the user to click OK
:param message: a message to display. default=None
:param verbose: print more
"""
PARAMS=set_p... | [
"def",
"pause",
"(",
"self",
",",
"message",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"\"message\"",
"]",
",",
"[",
"message",
"]",
")",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"__url"... | The pause command displays a dialog with the text provided in the
message argument and waits for the user to click OK
:param message: a message to display. default=None
:param verbose: print more | [
"The",
"pause",
"command",
"displays",
"a",
"dialog",
"with",
"the",
"text",
"provided",
"in",
"the",
"message",
"argument",
"and",
"waits",
"for",
"the",
"user",
"to",
"click",
"OK"
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/command.py#L37-L48 |
12,087 | cytoscape/py2cytoscape | py2cytoscape/cyrest/command.py | command.quit | def quit(self,verbose=False):
"""
This command causes Cytoscape to exit. It is typically used at the end
of a script file.
:param verbose: print more
"""
response=api(url=self.__url+"/quit", verbose=verbose)
return response | python | def quit(self,verbose=False):
"""
This command causes Cytoscape to exit. It is typically used at the end
of a script file.
:param verbose: print more
"""
response=api(url=self.__url+"/quit", verbose=verbose)
return response | [
"def",
"quit",
"(",
"self",
",",
"verbose",
"=",
"False",
")",
":",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"__url",
"+",
"\"/quit\"",
",",
"verbose",
"=",
"verbose",
")",
"return",
"response"
] | This command causes Cytoscape to exit. It is typically used at the end
of a script file.
:param verbose: print more | [
"This",
"command",
"causes",
"Cytoscape",
"to",
"exit",
".",
"It",
"is",
"typically",
"used",
"at",
"the",
"end",
"of",
"a",
"script",
"file",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/command.py#L51-L59 |
12,088 | cytoscape/py2cytoscape | py2cytoscape/cyrest/command.py | command.run | def run(self,script_file,args=None,verbose=False):
"""
The run command will execute a command script from the file pointed to
by the file argument, which should contain Cytoscape commands, one per
line. Arguments to the script are provided by the args argument.
:param script_fil... | python | def run(self,script_file,args=None,verbose=False):
"""
The run command will execute a command script from the file pointed to
by the file argument, which should contain Cytoscape commands, one per
line. Arguments to the script are provided by the args argument.
:param script_fil... | [
"def",
"run",
"(",
"self",
",",
"script_file",
",",
"args",
"=",
"None",
",",
"verbose",
"=",
"False",
")",
":",
"PARAMS",
"=",
"set_param",
"(",
"[",
"\"file\"",
",",
"\"args\"",
"]",
",",
"[",
"script_file",
",",
"args",
"]",
")",
"response",
"=",
... | The run command will execute a command script from the file pointed to
by the file argument, which should contain Cytoscape commands, one per
line. Arguments to the script are provided by the args argument.
:param script_file: file to run
:param args: enter the script arguments as key:v... | [
"The",
"run",
"command",
"will",
"execute",
"a",
"command",
"script",
"from",
"the",
"file",
"pointed",
"to",
"by",
"the",
"file",
"argument",
"which",
"should",
"contain",
"Cytoscape",
"commands",
"one",
"per",
"line",
".",
"Arguments",
"to",
"the",
"script... | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/command.py#L61-L75 |
12,089 | cytoscape/py2cytoscape | py2cytoscape/cyrest/command.py | command.sleep | def sleep(self,duration,verbose=False):
"""
The sleep command will pause processing for a period of time as specified
by duration seconds. It is typically used as part of a command script.
:param duration: enter the time in seconds to sleep
:param verbose: print more
"""... | python | def sleep(self,duration,verbose=False):
"""
The sleep command will pause processing for a period of time as specified
by duration seconds. It is typically used as part of a command script.
:param duration: enter the time in seconds to sleep
:param verbose: print more
"""... | [
"def",
"sleep",
"(",
"self",
",",
"duration",
",",
"verbose",
"=",
"False",
")",
":",
"PARAMS",
"=",
"{",
"\"duration\"",
":",
"str",
"(",
"duration",
")",
"}",
"response",
"=",
"api",
"(",
"url",
"=",
"self",
".",
"__url",
"+",
"\"/sleep\"",
",",
... | The sleep command will pause processing for a period of time as specified
by duration seconds. It is typically used as part of a command script.
:param duration: enter the time in seconds to sleep
:param verbose: print more | [
"The",
"sleep",
"command",
"will",
"pause",
"processing",
"for",
"a",
"period",
"of",
"time",
"as",
"specified",
"by",
"duration",
"seconds",
".",
"It",
"is",
"typically",
"used",
"as",
"part",
"of",
"a",
"command",
"script",
"."
] | dd34de8d028f512314d0057168df7fef7c5d5195 | https://github.com/cytoscape/py2cytoscape/blob/dd34de8d028f512314d0057168df7fef7c5d5195/py2cytoscape/cyrest/command.py#L77-L87 |
12,090 | ofw/curlify | curlify.py | to_curl | def to_curl(request, compressed=False, verify=True):
"""
Returns string with curl command by provided request object
Parameters
----------
compressed : bool
If `True` then `--compressed` argument will be added to result
"""
parts = [
('curl', None),
('-X', request.me... | python | def to_curl(request, compressed=False, verify=True):
"""
Returns string with curl command by provided request object
Parameters
----------
compressed : bool
If `True` then `--compressed` argument will be added to result
"""
parts = [
('curl', None),
('-X', request.me... | [
"def",
"to_curl",
"(",
"request",
",",
"compressed",
"=",
"False",
",",
"verify",
"=",
"True",
")",
":",
"parts",
"=",
"[",
"(",
"'curl'",
",",
"None",
")",
",",
"(",
"'-X'",
",",
"request",
".",
"method",
")",
",",
"]",
"for",
"k",
",",
"v",
"... | Returns string with curl command by provided request object
Parameters
----------
compressed : bool
If `True` then `--compressed` argument will be added to result | [
"Returns",
"string",
"with",
"curl",
"command",
"by",
"provided",
"request",
"object"
] | 5a464218431f979ac78d089682d36860b57420ce | https://github.com/ofw/curlify/blob/5a464218431f979ac78d089682d36860b57420ce/curlify.py#L4-L42 |
12,091 | rq/Flask-RQ2 | src/flask_rq2/cli.py | shared_options | def shared_options(rq):
"Default class options to pass to the CLI commands."
return {
'url': rq.redis_url,
'config': None,
'worker_class': rq.worker_class,
'job_class': rq.job_class,
'queue_class': rq.queue_class,
'connection_class': rq.connection_class,
} | python | def shared_options(rq):
"Default class options to pass to the CLI commands."
return {
'url': rq.redis_url,
'config': None,
'worker_class': rq.worker_class,
'job_class': rq.job_class,
'queue_class': rq.queue_class,
'connection_class': rq.connection_class,
} | [
"def",
"shared_options",
"(",
"rq",
")",
":",
"return",
"{",
"'url'",
":",
"rq",
".",
"redis_url",
",",
"'config'",
":",
"None",
",",
"'worker_class'",
":",
"rq",
".",
"worker_class",
",",
"'job_class'",
":",
"rq",
".",
"job_class",
",",
"'queue_class'",
... | Default class options to pass to the CLI commands. | [
"Default",
"class",
"options",
"to",
"pass",
"to",
"the",
"CLI",
"commands",
"."
] | 58eedf6f0cd7bcde4ccd787074762ea08f531337 | https://github.com/rq/Flask-RQ2/blob/58eedf6f0cd7bcde4ccd787074762ea08f531337/src/flask_rq2/cli.py#L35-L44 |
12,092 | rq/Flask-RQ2 | src/flask_rq2/cli.py | empty | def empty(rq, ctx, all, queues):
"Empty given queues."
return ctx.invoke(
rq_cli.empty,
all=all,
queues=queues or rq.queues,
**shared_options(rq)
) | python | def empty(rq, ctx, all, queues):
"Empty given queues."
return ctx.invoke(
rq_cli.empty,
all=all,
queues=queues or rq.queues,
**shared_options(rq)
) | [
"def",
"empty",
"(",
"rq",
",",
"ctx",
",",
"all",
",",
"queues",
")",
":",
"return",
"ctx",
".",
"invoke",
"(",
"rq_cli",
".",
"empty",
",",
"all",
"=",
"all",
",",
"queues",
"=",
"queues",
"or",
"rq",
".",
"queues",
",",
"*",
"*",
"shared_optio... | Empty given queues. | [
"Empty",
"given",
"queues",
"."
] | 58eedf6f0cd7bcde4ccd787074762ea08f531337 | https://github.com/rq/Flask-RQ2/blob/58eedf6f0cd7bcde4ccd787074762ea08f531337/src/flask_rq2/cli.py#L66-L73 |
12,093 | rq/Flask-RQ2 | src/flask_rq2/cli.py | requeue | def requeue(rq, ctx, all, job_ids):
"Requeue failed jobs."
return ctx.invoke(
rq_cli.requeue,
all=all,
job_ids=job_ids,
**shared_options(rq)
) | python | def requeue(rq, ctx, all, job_ids):
"Requeue failed jobs."
return ctx.invoke(
rq_cli.requeue,
all=all,
job_ids=job_ids,
**shared_options(rq)
) | [
"def",
"requeue",
"(",
"rq",
",",
"ctx",
",",
"all",
",",
"job_ids",
")",
":",
"return",
"ctx",
".",
"invoke",
"(",
"rq_cli",
".",
"requeue",
",",
"all",
"=",
"all",
",",
"job_ids",
"=",
"job_ids",
",",
"*",
"*",
"shared_options",
"(",
"rq",
")",
... | Requeue failed jobs. | [
"Requeue",
"failed",
"jobs",
"."
] | 58eedf6f0cd7bcde4ccd787074762ea08f531337 | https://github.com/rq/Flask-RQ2/blob/58eedf6f0cd7bcde4ccd787074762ea08f531337/src/flask_rq2/cli.py#L79-L86 |
12,094 | rq/Flask-RQ2 | src/flask_rq2/cli.py | info | def info(rq, ctx, path, interval, raw, only_queues, only_workers, by_queue,
queues):
"RQ command-line monitor."
return ctx.invoke(
rq_cli.info,
path=path,
interval=interval,
raw=raw,
only_queues=only_queues,
only_workers=only_workers,
by_queue=by_... | python | def info(rq, ctx, path, interval, raw, only_queues, only_workers, by_queue,
queues):
"RQ command-line monitor."
return ctx.invoke(
rq_cli.info,
path=path,
interval=interval,
raw=raw,
only_queues=only_queues,
only_workers=only_workers,
by_queue=by_... | [
"def",
"info",
"(",
"rq",
",",
"ctx",
",",
"path",
",",
"interval",
",",
"raw",
",",
"only_queues",
",",
"only_workers",
",",
"by_queue",
",",
"queues",
")",
":",
"return",
"ctx",
".",
"invoke",
"(",
"rq_cli",
".",
"info",
",",
"path",
"=",
"path",
... | RQ command-line monitor. | [
"RQ",
"command",
"-",
"line",
"monitor",
"."
] | 58eedf6f0cd7bcde4ccd787074762ea08f531337 | https://github.com/rq/Flask-RQ2/blob/58eedf6f0cd7bcde4ccd787074762ea08f531337/src/flask_rq2/cli.py#L100-L113 |
12,095 | rq/Flask-RQ2 | src/flask_rq2/cli.py | worker | def worker(rq, ctx, burst, logging_level, name, path, results_ttl,
worker_ttl, verbose, quiet, sentry_dsn, exception_handler, pid,
queues):
"Starts an RQ worker."
ctx.invoke(
rq_cli.worker,
burst=burst,
logging_level=logging_level,
name=name,
path=pa... | python | def worker(rq, ctx, burst, logging_level, name, path, results_ttl,
worker_ttl, verbose, quiet, sentry_dsn, exception_handler, pid,
queues):
"Starts an RQ worker."
ctx.invoke(
rq_cli.worker,
burst=burst,
logging_level=logging_level,
name=name,
path=pa... | [
"def",
"worker",
"(",
"rq",
",",
"ctx",
",",
"burst",
",",
"logging_level",
",",
"name",
",",
"path",
",",
"results_ttl",
",",
"worker_ttl",
",",
"verbose",
",",
"quiet",
",",
"sentry_dsn",
",",
"exception_handler",
",",
"pid",
",",
"queues",
")",
":",
... | Starts an RQ worker. | [
"Starts",
"an",
"RQ",
"worker",
"."
] | 58eedf6f0cd7bcde4ccd787074762ea08f531337 | https://github.com/rq/Flask-RQ2/blob/58eedf6f0cd7bcde4ccd787074762ea08f531337/src/flask_rq2/cli.py#L136-L155 |
12,096 | rq/Flask-RQ2 | src/flask_rq2/cli.py | suspend | def suspend(rq, ctx, duration):
"Suspends all workers."
ctx.invoke(
rq_cli.suspend,
duration=duration,
**shared_options(rq)
) | python | def suspend(rq, ctx, duration):
"Suspends all workers."
ctx.invoke(
rq_cli.suspend,
duration=duration,
**shared_options(rq)
) | [
"def",
"suspend",
"(",
"rq",
",",
"ctx",
",",
"duration",
")",
":",
"ctx",
".",
"invoke",
"(",
"rq_cli",
".",
"suspend",
",",
"duration",
"=",
"duration",
",",
"*",
"*",
"shared_options",
"(",
"rq",
")",
")"
] | Suspends all workers. | [
"Suspends",
"all",
"workers",
"."
] | 58eedf6f0cd7bcde4ccd787074762ea08f531337 | https://github.com/rq/Flask-RQ2/blob/58eedf6f0cd7bcde4ccd787074762ea08f531337/src/flask_rq2/cli.py#L162-L168 |
12,097 | rq/Flask-RQ2 | src/flask_rq2/cli.py | scheduler | def scheduler(rq, ctx, verbose, burst, queue, interval, pid):
"Periodically checks for scheduled jobs."
scheduler = rq.get_scheduler(interval=interval, queue=queue)
if pid:
with open(os.path.expanduser(pid), 'w') as fp:
fp.write(str(os.getpid()))
if verbose:
level = 'DEBUG'
... | python | def scheduler(rq, ctx, verbose, burst, queue, interval, pid):
"Periodically checks for scheduled jobs."
scheduler = rq.get_scheduler(interval=interval, queue=queue)
if pid:
with open(os.path.expanduser(pid), 'w') as fp:
fp.write(str(os.getpid()))
if verbose:
level = 'DEBUG'
... | [
"def",
"scheduler",
"(",
"rq",
",",
"ctx",
",",
"verbose",
",",
"burst",
",",
"queue",
",",
"interval",
",",
"pid",
")",
":",
"scheduler",
"=",
"rq",
".",
"get_scheduler",
"(",
"interval",
"=",
"interval",
",",
"queue",
"=",
"queue",
")",
"if",
"pid"... | Periodically checks for scheduled jobs. | [
"Periodically",
"checks",
"for",
"scheduled",
"jobs",
"."
] | 58eedf6f0cd7bcde4ccd787074762ea08f531337 | https://github.com/rq/Flask-RQ2/blob/58eedf6f0cd7bcde4ccd787074762ea08f531337/src/flask_rq2/cli.py#L193-L204 |
12,098 | rq/Flask-RQ2 | src/flask_rq2/app.py | RQ.init_cli | def init_cli(self, app):
"""
Initialize the Flask CLI support in case it was enabled for the
app.
Works with both Flask>=1.0's CLI support as well as the backport
in the Flask-CLI package for Flask<1.0.
"""
# in case click isn't installed after all
if cli... | python | def init_cli(self, app):
"""
Initialize the Flask CLI support in case it was enabled for the
app.
Works with both Flask>=1.0's CLI support as well as the backport
in the Flask-CLI package for Flask<1.0.
"""
# in case click isn't installed after all
if cli... | [
"def",
"init_cli",
"(",
"self",
",",
"app",
")",
":",
"# in case click isn't installed after all",
"if",
"click",
"is",
"None",
":",
"raise",
"RuntimeError",
"(",
"'Cannot import click. Is it installed?'",
")",
"# only add commands if we have a click context available",
"from... | Initialize the Flask CLI support in case it was enabled for the
app.
Works with both Flask>=1.0's CLI support as well as the backport
in the Flask-CLI package for Flask<1.0. | [
"Initialize",
"the",
"Flask",
"CLI",
"support",
"in",
"case",
"it",
"was",
"enabled",
"for",
"the",
"app",
"."
] | 58eedf6f0cd7bcde4ccd787074762ea08f531337 | https://github.com/rq/Flask-RQ2/blob/58eedf6f0cd7bcde4ccd787074762ea08f531337/src/flask_rq2/app.py#L195-L208 |
12,099 | ionelmc/python-remote-pdb | src/remote_pdb.py | set_trace | def set_trace(host=None, port=None, patch_stdstreams=False):
"""
Opens a remote PDB on first available port.
"""
if host is None:
host = os.environ.get('REMOTE_PDB_HOST', '127.0.0.1')
if port is None:
port = int(os.environ.get('REMOTE_PDB_PORT', '0'))
rdb = RemotePdb(host=host, p... | python | def set_trace(host=None, port=None, patch_stdstreams=False):
"""
Opens a remote PDB on first available port.
"""
if host is None:
host = os.environ.get('REMOTE_PDB_HOST', '127.0.0.1')
if port is None:
port = int(os.environ.get('REMOTE_PDB_PORT', '0'))
rdb = RemotePdb(host=host, p... | [
"def",
"set_trace",
"(",
"host",
"=",
"None",
",",
"port",
"=",
"None",
",",
"patch_stdstreams",
"=",
"False",
")",
":",
"if",
"host",
"is",
"None",
":",
"host",
"=",
"os",
".",
"environ",
".",
"get",
"(",
"'REMOTE_PDB_HOST'",
",",
"'127.0.0.1'",
")",
... | Opens a remote PDB on first available port. | [
"Opens",
"a",
"remote",
"PDB",
"on",
"first",
"available",
"port",
"."
] | 152b4af3b8da282bbba1fc6b62f85d5cdf70be6e | https://github.com/ionelmc/python-remote-pdb/blob/152b4af3b8da282bbba1fc6b62f85d5cdf70be6e/src/remote_pdb.py#L121-L130 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.