nwo stringlengths 5 106 | sha stringlengths 40 40 | path stringlengths 4 174 | language stringclasses 1
value | identifier stringlengths 1 140 | parameters stringlengths 0 87.7k | argument_list stringclasses 1
value | return_statement stringlengths 0 426k | docstring stringlengths 0 64.3k | docstring_summary stringlengths 0 26.3k | docstring_tokens list | function stringlengths 18 4.83M | function_tokens list | url stringlengths 83 304 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
thushv89/attention_keras | 322a16ee147122026b63305aaa5e899d9e5de883 | src/examples/utils/model_helper.py | python | plot_attention_weights | (encoder_inputs, attention_weights, en_id2word, fr_id2word, filename=None) | Plots attention weights
:param encoder_inputs: Sequence of word ids (list/numpy.ndarray)
:param attention_weights: Sequence of (<word_id_at_decode_step_t>:<attention_weights_at_decode_step_t>)
:param en_id2word: dict
:param fr_id2word: dict
:return: | Plots attention weights
:param encoder_inputs: Sequence of word ids (list/numpy.ndarray)
:param attention_weights: Sequence of (<word_id_at_decode_step_t>:<attention_weights_at_decode_step_t>)
:param en_id2word: dict
:param fr_id2word: dict
:return: | [
"Plots",
"attention",
"weights",
":",
"param",
"encoder_inputs",
":",
"Sequence",
"of",
"word",
"ids",
"(",
"list",
"/",
"numpy",
".",
"ndarray",
")",
":",
"param",
"attention_weights",
":",
"Sequence",
"of",
"(",
"<word_id_at_decode_step_t",
">",
":",
"<atten... | def plot_attention_weights(encoder_inputs, attention_weights, en_id2word, fr_id2word, filename=None):
"""
Plots attention weights
:param encoder_inputs: Sequence of word ids (list/numpy.ndarray)
:param attention_weights: Sequence of (<word_id_at_decode_step_t>:<attention_weights_at_decode_step_t>)
:... | [
"def",
"plot_attention_weights",
"(",
"encoder_inputs",
",",
"attention_weights",
",",
"en_id2word",
",",
"fr_id2word",
",",
"filename",
"=",
"None",
")",
":",
"if",
"len",
"(",
"attention_weights",
")",
"==",
"0",
":",
"print",
"(",
"'Your attention weights was e... | https://github.com/thushv89/attention_keras/blob/322a16ee147122026b63305aaa5e899d9e5de883/src/examples/utils/model_helper.py#L8-L47 | ||
Tautulli/Tautulli | 2410eb33805aaac4bd1c5dad0f71e4f15afaf742 | plexpy/libraries.py | python | Libraries.get_datatables_list | (self, kwargs=None, grouping=None) | return dict | [] | def get_datatables_list(self, kwargs=None, grouping=None):
default_return = {'recordsFiltered': 0,
'recordsTotal': 0,
'draw': 0,
'data': []}
data_tables = datatables.DataTables()
custom_where = [['library_sections.de... | [
"def",
"get_datatables_list",
"(",
"self",
",",
"kwargs",
"=",
"None",
",",
"grouping",
"=",
"None",
")",
":",
"default_return",
"=",
"{",
"'recordsFiltered'",
":",
"0",
",",
"'recordsTotal'",
":",
"0",
",",
"'draw'",
":",
"0",
",",
"'data'",
":",
"[",
... | https://github.com/Tautulli/Tautulli/blob/2410eb33805aaac4bd1c5dad0f71e4f15afaf742/plexpy/libraries.py#L313-L453 | |||
materialsproject/pymatgen | 8128f3062a334a2edd240e4062b5b9bdd1ae6f58 | pymatgen/electronic_structure/boltztrap2.py | python | VasprunBSLoader.__init__ | (self, obj, structure=None, nelect=None) | Args:
obj: Either a pmg Vasprun or a BandStructure object.
structure: Structure object in case is not included in the BandStructure object.
nelect: number of electrons in case a BandStructure obj is provided.
Example:
vrun = Vasprun('vasprun.xml')
data... | Args:
obj: Either a pmg Vasprun or a BandStructure object.
structure: Structure object in case is not included in the BandStructure object.
nelect: number of electrons in case a BandStructure obj is provided.
Example:
vrun = Vasprun('vasprun.xml')
data... | [
"Args",
":",
"obj",
":",
"Either",
"a",
"pmg",
"Vasprun",
"or",
"a",
"BandStructure",
"object",
".",
"structure",
":",
"Structure",
"object",
"in",
"case",
"is",
"not",
"included",
"in",
"the",
"BandStructure",
"object",
".",
"nelect",
":",
"number",
"of",... | def __init__(self, obj, structure=None, nelect=None):
"""
Args:
obj: Either a pmg Vasprun or a BandStructure object.
structure: Structure object in case is not included in the BandStructure object.
nelect: number of electrons in case a BandStructure obj is provided.
... | [
"def",
"__init__",
"(",
"self",
",",
"obj",
",",
"structure",
"=",
"None",
",",
"nelect",
"=",
"None",
")",
":",
"if",
"isinstance",
"(",
"obj",
",",
"Vasprun",
")",
":",
"structure",
"=",
"obj",
".",
"final_structure",
"nelect",
"=",
"obj",
".",
"pa... | https://github.com/materialsproject/pymatgen/blob/8128f3062a334a2edd240e4062b5b9bdd1ae6f58/pymatgen/electronic_structure/boltztrap2.py#L66-L134 | ||
ppizarror/pygame-menu | da5827a1ad0686e8ff2aa536b74bbfba73967bcf | pygame_menu/baseimage.py | python | BaseImage.pick_channels | (self, channels: ChannelType) | return self | Pick certain channels of the image, channels are ``"r"`` (red), ``"g"``
(green) and ``"b"`` (blue); ``channels param`` is a list/tuple of channels
(non empty).
For example, ``pick_channels(['r', 'g'])``: All channels not included on
the list will be discarded.
:param channels: ... | Pick certain channels of the image, channels are ``"r"`` (red), ``"g"``
(green) and ``"b"`` (blue); ``channels param`` is a list/tuple of channels
(non empty). | [
"Pick",
"certain",
"channels",
"of",
"the",
"image",
"channels",
"are",
"r",
"(",
"red",
")",
"g",
"(",
"green",
")",
"and",
"b",
"(",
"blue",
")",
";",
"channels",
"param",
"is",
"a",
"list",
"/",
"tuple",
"of",
"channels",
"(",
"non",
"empty",
")... | def pick_channels(self, channels: ChannelType) -> 'BaseImage':
"""
Pick certain channels of the image, channels are ``"r"`` (red), ``"g"``
(green) and ``"b"`` (blue); ``channels param`` is a list/tuple of channels
(non empty).
For example, ``pick_channels(['r', 'g'])``: All chan... | [
"def",
"pick_channels",
"(",
"self",
",",
"channels",
":",
"ChannelType",
")",
"->",
"'BaseImage'",
":",
"if",
"isinstance",
"(",
"channels",
",",
"str",
")",
":",
"channels",
"=",
"[",
"channels",
"]",
"assert",
"isinstance",
"(",
"channels",
",",
"Vector... | https://github.com/ppizarror/pygame-menu/blob/da5827a1ad0686e8ff2aa536b74bbfba73967bcf/pygame_menu/baseimage.py#L572-L601 | |
ukdtom/ExportTools.bundle | 49aba4292a2897f640162a833c2792480aa4f0b6 | Contents/Libraries/Shared/xlsxwriter/workbook.py | python | Workbook.add_worksheet | (self, name=None, worksheet_class=None) | return self._add_sheet(name, worksheet_class=worksheet_class) | Add a new worksheet to the Excel workbook.
Args:
name: The worksheet name. Defaults to 'Sheet1', etc.
Returns:
Reference to a worksheet object. | Add a new worksheet to the Excel workbook. | [
"Add",
"a",
"new",
"worksheet",
"to",
"the",
"Excel",
"workbook",
"."
] | def add_worksheet(self, name=None, worksheet_class=None):
"""
Add a new worksheet to the Excel workbook.
Args:
name: The worksheet name. Defaults to 'Sheet1', etc.
Returns:
Reference to a worksheet object.
"""
if worksheet_class is None:
... | [
"def",
"add_worksheet",
"(",
"self",
",",
"name",
"=",
"None",
",",
"worksheet_class",
"=",
"None",
")",
":",
"if",
"worksheet_class",
"is",
"None",
":",
"worksheet_class",
"=",
"self",
".",
"worksheet_class",
"return",
"self",
".",
"_add_sheet",
"(",
"name"... | https://github.com/ukdtom/ExportTools.bundle/blob/49aba4292a2897f640162a833c2792480aa4f0b6/Contents/Libraries/Shared/xlsxwriter/workbook.py#L165-L179 | |
ajinabraham/OWASP-Xenotix-XSS-Exploit-Framework | cb692f527e4e819b6c228187c5702d990a180043 | external/Scripting Engine/packages/IronPython.StdLib.2.7.4/content/Lib/decimal.py | python | _dlog10 | (c, e, p) | return _div_nearest(log_tenpower+log_d, 100) | Given integers c, e and p with c > 0, p >= 0, compute an integer
approximation to 10**p * log10(c*10**e), with an absolute error of
at most 1. Assumes that c*10**e is not exactly 1. | Given integers c, e and p with c > 0, p >= 0, compute an integer
approximation to 10**p * log10(c*10**e), with an absolute error of
at most 1. Assumes that c*10**e is not exactly 1. | [
"Given",
"integers",
"c",
"e",
"and",
"p",
"with",
"c",
">",
"0",
"p",
">",
"=",
"0",
"compute",
"an",
"integer",
"approximation",
"to",
"10",
"**",
"p",
"*",
"log10",
"(",
"c",
"*",
"10",
"**",
"e",
")",
"with",
"an",
"absolute",
"error",
"of",
... | def _dlog10(c, e, p):
"""Given integers c, e and p with c > 0, p >= 0, compute an integer
approximation to 10**p * log10(c*10**e), with an absolute error of
at most 1. Assumes that c*10**e is not exactly 1."""
# increase precision by 2; compensate for this by dividing
# final result by 100
p +... | [
"def",
"_dlog10",
"(",
"c",
",",
"e",
",",
"p",
")",
":",
"# increase precision by 2; compensate for this by dividing",
"# final result by 100",
"p",
"+=",
"2",
"# write c*10**e as d*10**f with either:",
"# f >= 0 and 1 <= d <= 10, or",
"# f <= 0 and 0.1 <= d <= 1.",
"# Thus ... | https://github.com/ajinabraham/OWASP-Xenotix-XSS-Exploit-Framework/blob/cb692f527e4e819b6c228187c5702d990a180043/external/Scripting Engine/packages/IronPython.StdLib.2.7.4/content/Lib/decimal.py#L5551-L5583 | |
python-diamond/Diamond | 7000e16cfdf4508ed9291fc4b3800592557b2431 | src/diamond/utils/log.py | python | setup_logging | (configfile, stdout=False) | return log | [] | def setup_logging(configfile, stdout=False):
log = logging.getLogger('diamond')
try:
logging.config.fileConfig(configfile, disable_existing_loggers=False)
# if the stdout flag is set, we use the log level of the root logger
# for logging to stdout, and keep all loggers defined in the c... | [
"def",
"setup_logging",
"(",
"configfile",
",",
"stdout",
"=",
"False",
")",
":",
"log",
"=",
"logging",
".",
"getLogger",
"(",
"'diamond'",
")",
"try",
":",
"logging",
".",
"config",
".",
"fileConfig",
"(",
"configfile",
",",
"disable_existing_loggers",
"="... | https://github.com/python-diamond/Diamond/blob/7000e16cfdf4508ed9291fc4b3800592557b2431/src/diamond/utils/log.py#L35-L57 | |||
mozillazg/pypy | 2ff5cd960c075c991389f842c6d59e71cf0cb7d0 | pypy/module/cpyext/stubs.py | python | PyDescr_IsData | (space, descr) | Return true if the descriptor objects descr describes a data attribute, or
false if it describes a method. descr must be a descriptor object; there is
no error checking. | Return true if the descriptor objects descr describes a data attribute, or
false if it describes a method. descr must be a descriptor object; there is
no error checking. | [
"Return",
"true",
"if",
"the",
"descriptor",
"objects",
"descr",
"describes",
"a",
"data",
"attribute",
"or",
"false",
"if",
"it",
"describes",
"a",
"method",
".",
"descr",
"must",
"be",
"a",
"descriptor",
"object",
";",
"there",
"is",
"no",
"error",
"chec... | def PyDescr_IsData(space, descr):
"""Return true if the descriptor objects descr describes a data attribute, or
false if it describes a method. descr must be a descriptor object; there is
no error checking.
"""
raise NotImplementedError | [
"def",
"PyDescr_IsData",
"(",
"space",
",",
"descr",
")",
":",
"raise",
"NotImplementedError"
] | https://github.com/mozillazg/pypy/blob/2ff5cd960c075c991389f842c6d59e71cf0cb7d0/pypy/module/cpyext/stubs.py#L263-L268 | ||
numba/numba | bf480b9e0da858a65508c2b17759a72ee6a44c51 | numba/cpython/setobj.py | python | SetInstance.allocate | (cls, context, builder, set_type, nitems=None) | return self | Allocate a SetInstance with its storage. Same as allocate_ex(),
but return an initialized *instance*. If allocation failed,
control is transferred to the caller using the target's current
call convention. | Allocate a SetInstance with its storage. Same as allocate_ex(),
but return an initialized *instance*. If allocation failed,
control is transferred to the caller using the target's current
call convention. | [
"Allocate",
"a",
"SetInstance",
"with",
"its",
"storage",
".",
"Same",
"as",
"allocate_ex",
"()",
"but",
"return",
"an",
"initialized",
"*",
"instance",
"*",
".",
"If",
"allocation",
"failed",
"control",
"is",
"transferred",
"to",
"the",
"caller",
"using",
"... | def allocate(cls, context, builder, set_type, nitems=None):
"""
Allocate a SetInstance with its storage. Same as allocate_ex(),
but return an initialized *instance*. If allocation failed,
control is transferred to the caller using the target's current
call convention.
"... | [
"def",
"allocate",
"(",
"cls",
",",
"context",
",",
"builder",
",",
"set_type",
",",
"nitems",
"=",
"None",
")",
":",
"ok",
",",
"self",
"=",
"cls",
".",
"allocate_ex",
"(",
"context",
",",
"builder",
",",
"set_type",
",",
"nitems",
")",
"with",
"bui... | https://github.com/numba/numba/blob/bf480b9e0da858a65508c2b17759a72ee6a44c51/numba/cpython/setobj.py#L768-L779 | |
sagemath/sage | f9b2db94f675ff16963ccdefba4f1a3393b3fe0d | src/sage/graphs/graph_decompositions/modular_decomposition.py | python | promote_left | (root) | Perform the promotion phase on the forest root.
If child and parent both are marked by LEFT_SPLIT then child is removed
and placed just before the parent
INPUT:
- ``root`` -- The forest which needs to be promoted
EXAMPLES::
sage: from sage.graphs.graph_decompositions.modular_decompositi... | Perform the promotion phase on the forest root. | [
"Perform",
"the",
"promotion",
"phase",
"on",
"the",
"forest",
"root",
"."
] | def promote_left(root):
"""
Perform the promotion phase on the forest root.
If child and parent both are marked by LEFT_SPLIT then child is removed
and placed just before the parent
INPUT:
- ``root`` -- The forest which needs to be promoted
EXAMPLES::
sage: from sage.graphs.grap... | [
"def",
"promote_left",
"(",
"root",
")",
":",
"q",
"=",
"deque",
"(",
")",
"# q has [parent, child] elements as parent needs to be modified",
"for",
"child",
"in",
"root",
".",
"children",
":",
"q",
".",
"append",
"(",
"[",
"root",
",",
"child",
"]",
")",
"w... | https://github.com/sagemath/sage/blob/f9b2db94f675ff16963ccdefba4f1a3393b3fe0d/src/sage/graphs/graph_decompositions/modular_decomposition.py#L1734-L1820 | ||
fake-name/ReadableWebProxy | ed5c7abe38706acc2684a1e6cd80242a03c5f010 | WebMirror/management/rss_parser_funcs/feed_parse_extractMountainofPigeonsTranslations.py | python | extractMountainofPigeonsTranslations | (item) | return False | Mountain of Pigeons Translations | Mountain of Pigeons Translations | [
"Mountain",
"of",
"Pigeons",
"Translations"
] | def extractMountainofPigeonsTranslations(item):
"""
Mountain of Pigeons Translations
"""
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol or frag) or 'preview' in item['title'].lower():
return None
if 'Manga' in item['tags']:
return None
if 'Anime' in item['tags'... | [
"def",
"extractMountainofPigeonsTranslations",
"(",
"item",
")",
":",
"vol",
",",
"chp",
",",
"frag",
",",
"postfix",
"=",
"extractVolChapterFragmentPostfix",
"(",
"item",
"[",
"'title'",
"]",
")",
"if",
"not",
"(",
"chp",
"or",
"vol",
"or",
"frag",
")",
"... | https://github.com/fake-name/ReadableWebProxy/blob/ed5c7abe38706acc2684a1e6cd80242a03c5f010/WebMirror/management/rss_parser_funcs/feed_parse_extractMountainofPigeonsTranslations.py#L1-L49 | |
tenpy/tenpy | bbdd3dbbdb511948eb0e6ba7ff619ac6ca657fff | tenpy/simulations/simulation.py | python | resume_from_checkpoint | (*,
filename=None,
checkpoint_results=None,
update_sim_params=None,
simulation_class_kwargs=None) | return results | Resume a simulation run from a given checkpoint.
(All parameters have to be given as keyword arguments.)
Parameters
----------
filename : None | str
The filename of the checkpoint to be loaded.
You can either specify the `filename` or the `checkpoint_results`.
checkpoint_results : ... | Resume a simulation run from a given checkpoint. | [
"Resume",
"a",
"simulation",
"run",
"from",
"a",
"given",
"checkpoint",
"."
] | def resume_from_checkpoint(*,
filename=None,
checkpoint_results=None,
update_sim_params=None,
simulation_class_kwargs=None):
"""Resume a simulation run from a given checkpoint.
(All parameters have to be... | [
"def",
"resume_from_checkpoint",
"(",
"*",
",",
"filename",
"=",
"None",
",",
"checkpoint_results",
"=",
"None",
",",
"update_sim_params",
"=",
"None",
",",
"simulation_class_kwargs",
"=",
"None",
")",
":",
"if",
"filename",
"is",
"not",
"None",
":",
"if",
"... | https://github.com/tenpy/tenpy/blob/bbdd3dbbdb511948eb0e6ba7ff619ac6ca657fff/tenpy/simulations/simulation.py#L913-L985 | |
kuri65536/python-for-android | 26402a08fc46b09ef94e8d7a6bbc3a54ff9d0891 | python3-alpha/python-libs/gdata/apps/multidomain/data.py | python | UserEntry.SetPassword | (self, value) | Set the password of this User object.
Args:
value: string The new password to give this object. | Set the password of this User object. | [
"Set",
"the",
"password",
"of",
"this",
"User",
"object",
"."
] | def SetPassword(self, value):
"""Set the password of this User object.
Args:
value: string The new password to give this object.
"""
self._SetProperty(USER_PASSWORD, value) | [
"def",
"SetPassword",
"(",
"self",
",",
"value",
")",
":",
"self",
".",
"_SetProperty",
"(",
"USER_PASSWORD",
",",
"value",
")"
] | https://github.com/kuri65536/python-for-android/blob/26402a08fc46b09ef94e8d7a6bbc3a54ff9d0891/python3-alpha/python-libs/gdata/apps/multidomain/data.py#L129-L135 | ||
robotframework/RIDE | 6e8a50774ff33dead3a2757a11b0b4418ab205c0 | src/robotide/lib/robot/libraries/OperatingSystem.py | python | OperatingSystem.create_binary_file | (self, path, content) | Creates a binary file with the given content.
If content is given as a Unicode string, it is first converted to bytes
character by character. All characters with ordinal below 256 can be
used and are converted to bytes with same values. Using characters
with higher ordinal is an error.
... | Creates a binary file with the given content. | [
"Creates",
"a",
"binary",
"file",
"with",
"the",
"given",
"content",
"."
] | def create_binary_file(self, path, content):
"""Creates a binary file with the given content.
If content is given as a Unicode string, it is first converted to bytes
character by character. All characters with ordinal below 256 can be
used and are converted to bytes with same values. Us... | [
"def",
"create_binary_file",
"(",
"self",
",",
"path",
",",
"content",
")",
":",
"if",
"is_unicode",
"(",
"content",
")",
":",
"content",
"=",
"bytes",
"(",
"bytearray",
"(",
"ord",
"(",
"c",
")",
"for",
"c",
"in",
"content",
")",
")",
"path",
"=",
... | https://github.com/robotframework/RIDE/blob/6e8a50774ff33dead3a2757a11b0b4418ab205c0/src/robotide/lib/robot/libraries/OperatingSystem.py#L592-L616 | ||
log2timeline/plaso | fe2e316b8c76a0141760c0f2f181d84acb83abc2 | plaso/containers/artifacts.py | python | PathArtifact._SplitPath | (self, path, path_segment_separator) | return path_segments | Splits a path.
Args:
path (str): a path.
path_segment_separator (str): path segment separator.
Returns:
list[str]: path segments. | Splits a path. | [
"Splits",
"a",
"path",
"."
] | def _SplitPath(self, path, path_segment_separator):
"""Splits a path.
Args:
path (str): a path.
path_segment_separator (str): path segment separator.
Returns:
list[str]: path segments.
"""
path = path or ''
split_path = path.split(path_segment_separator)
path_segments = ... | [
"def",
"_SplitPath",
"(",
"self",
",",
"path",
",",
"path_segment_separator",
")",
":",
"path",
"=",
"path",
"or",
"''",
"split_path",
"=",
"path",
".",
"split",
"(",
"path_segment_separator",
")",
"path_segments",
"=",
"[",
"split_path",
"[",
"0",
"]",
"]... | https://github.com/log2timeline/plaso/blob/fe2e316b8c76a0141760c0f2f181d84acb83abc2/plaso/containers/artifacts.py#L355-L371 | |
NifTK/NiftyNet | 935bf4334cd00fa9f9d50f6a95ddcbfdde4031e0 | niftynet/layer/rgb_histogram_equilisation.py | python | RGBHistogramEquilisationLayer.layer_op | (self, image, mask=None) | :param image: a 3-channel tensor assumed to be an image in floating-point
RGB format (each channel in [0, 1])
:return: the equilised image | :param image: a 3-channel tensor assumed to be an image in floating-point
RGB format (each channel in [0, 1])
:return: the equilised image | [
":",
"param",
"image",
":",
"a",
"3",
"-",
"channel",
"tensor",
"assumed",
"to",
"be",
"an",
"image",
"in",
"floating",
"-",
"point",
"RGB",
"format",
"(",
"each",
"channel",
"in",
"[",
"0",
"1",
"]",
")",
":",
"return",
":",
"the",
"equilised",
"i... | def layer_op(self, image, mask=None):
"""
:param image: a 3-channel tensor assumed to be an image in floating-point
RGB format (each channel in [0, 1])
:return: the equilised image
"""
if isinstance(image, dict):
image[self.image_name] = self._normalise_image... | [
"def",
"layer_op",
"(",
"self",
",",
"image",
",",
"mask",
"=",
"None",
")",
":",
"if",
"isinstance",
"(",
"image",
",",
"dict",
")",
":",
"image",
"[",
"self",
".",
"image_name",
"]",
"=",
"self",
".",
"_normalise_image",
"(",
"image",
"[",
"self",
... | https://github.com/NifTK/NiftyNet/blob/935bf4334cd00fa9f9d50f6a95ddcbfdde4031e0/niftynet/layer/rgb_histogram_equilisation.py#L51-L64 | ||
HymanLiuTS/flaskTs | 286648286976e85d9b9a5873632331efcafe0b21 | flasky/lib/python2.7/site-packages/sqlalchemy/orm/events.py | python | MapperEvents.instrument_class | (self, mapper, class_) | Receive a class when the mapper is first constructed,
before instrumentation is applied to the mapped class.
This event is the earliest phase of mapper construction.
Most attributes of the mapper are not yet initialized.
This listener can either be applied to the :class:`.Mapper`
... | Receive a class when the mapper is first constructed,
before instrumentation is applied to the mapped class. | [
"Receive",
"a",
"class",
"when",
"the",
"mapper",
"is",
"first",
"constructed",
"before",
"instrumentation",
"is",
"applied",
"to",
"the",
"mapped",
"class",
"."
] | def instrument_class(self, mapper, class_):
"""Receive a class when the mapper is first constructed,
before instrumentation is applied to the mapped class.
This event is the earliest phase of mapper construction.
Most attributes of the mapper are not yet initialized.
This liste... | [
"def",
"instrument_class",
"(",
"self",
",",
"mapper",
",",
"class_",
")",
":"
] | https://github.com/HymanLiuTS/flaskTs/blob/286648286976e85d9b9a5873632331efcafe0b21/flasky/lib/python2.7/site-packages/sqlalchemy/orm/events.py#L634-L655 | ||
openstack/cinder | 23494a6d6c51451688191e1847a458f1d3cdcaa5 | cinder/volume/drivers/dell_emc/powermax/common.py | python | PowerMaxCommon._delete_group_snapshot | (self, group_snapshot, snapshots) | return model_update, snapshots_model_update | Helper function to delete a group snapshot.
:param group_snapshot: the group snapshot object
:param snapshots: the snapshot objects
:returns: model_update, snapshots_model_update
:raises: VolumeBackendApiException, NotImplementedError | Helper function to delete a group snapshot. | [
"Helper",
"function",
"to",
"delete",
"a",
"group",
"snapshot",
"."
] | def _delete_group_snapshot(self, group_snapshot, snapshots):
"""Helper function to delete a group snapshot.
:param group_snapshot: the group snapshot object
:param snapshots: the snapshot objects
:returns: model_update, snapshots_model_update
:raises: VolumeBackendApiException, ... | [
"def",
"_delete_group_snapshot",
"(",
"self",
",",
"group_snapshot",
",",
"snapshots",
")",
":",
"snapshots_model_update",
"=",
"[",
"]",
"source_group",
"=",
"group_snapshot",
".",
"get",
"(",
"'group'",
")",
"grp_id",
"=",
"group_snapshot",
".",
"group_id",
"i... | https://github.com/openstack/cinder/blob/23494a6d6c51451688191e1847a458f1d3cdcaa5/cinder/volume/drivers/dell_emc/powermax/common.py#L6157-L6206 | |
sadighian/crypto-rl | 078081e5715cadeae9c798a3d759c9d59d2041bc | data_recorder/connector_components/orderbook.py | python | OrderBook.render_lob_feature_names | (include_orderflow: bool = INCLUDE_ORDERFLOW) | return feature_names | Get the column names for the LOB render features.
:param include_orderflow: if TRUE, order flow imbalance stats are included in set
:return: list containing features names | Get the column names for the LOB render features. | [
"Get",
"the",
"column",
"names",
"for",
"the",
"LOB",
"render",
"features",
"."
] | def render_lob_feature_names(include_orderflow: bool = INCLUDE_ORDERFLOW) -> list:
"""
Get the column names for the LOB render features.
:param include_orderflow: if TRUE, order flow imbalance stats are included in set
:return: list containing features names
"""
feature_... | [
"def",
"render_lob_feature_names",
"(",
"include_orderflow",
":",
"bool",
"=",
"INCLUDE_ORDERFLOW",
")",
"->",
"list",
":",
"feature_names",
"=",
"list",
"(",
")",
"feature_names",
".",
"append",
"(",
"'midpoint'",
")",
"feature_names",
".",
"append",
"(",
"'spr... | https://github.com/sadighian/crypto-rl/blob/078081e5715cadeae9c798a3d759c9d59d2041bc/data_recorder/connector_components/orderbook.py#L98-L123 | |
replit-archive/empythoned | 977ec10ced29a3541a4973dc2b59910805695752 | dist/lib/python2.7/ctypes/macholib/dyld.py | python | framework_find | (fn, executable_path=None, env=None) | Find a framework using dyld semantics in a very loose manner.
Will take input such as:
Python
Python.framework
Python.framework/Versions/Current | Find a framework using dyld semantics in a very loose manner. | [
"Find",
"a",
"framework",
"using",
"dyld",
"semantics",
"in",
"a",
"very",
"loose",
"manner",
"."
] | def framework_find(fn, executable_path=None, env=None):
"""
Find a framework using dyld semantics in a very loose manner.
Will take input such as:
Python
Python.framework
Python.framework/Versions/Current
"""
try:
return dyld_find(fn, executable_path=executable_path,... | [
"def",
"framework_find",
"(",
"fn",
",",
"executable_path",
"=",
"None",
",",
"env",
"=",
"None",
")",
":",
"try",
":",
"return",
"dyld_find",
"(",
"fn",
",",
"executable_path",
"=",
"executable_path",
",",
"env",
"=",
"env",
")",
"except",
"ValueError",
... | https://github.com/replit-archive/empythoned/blob/977ec10ced29a3541a4973dc2b59910805695752/dist/lib/python2.7/ctypes/macholib/dyld.py#L140-L161 | ||
saltstack/salt | fae5bc757ad0f1716483ce7ae180b451545c2058 | salt/modules/cimc.py | python | set_user | (uid=None, username=None, password=None, priv=None, status=None) | return ret | Sets a CIMC user with specified configurations.
.. versionadded:: 2019.2.0
Args:
uid(int): The user ID slot to create the user account in.
username(str): The name of the user.
password(str): The clear text password of the user.
priv(str): The privilege level of the user.
... | Sets a CIMC user with specified configurations. | [
"Sets",
"a",
"CIMC",
"user",
"with",
"specified",
"configurations",
"."
] | def set_user(uid=None, username=None, password=None, priv=None, status=None):
"""
Sets a CIMC user with specified configurations.
.. versionadded:: 2019.2.0
Args:
uid(int): The user ID slot to create the user account in.
username(str): The name of the user.
password(str): The... | [
"def",
"set_user",
"(",
"uid",
"=",
"None",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
",",
"priv",
"=",
"None",
",",
"status",
"=",
"None",
")",
":",
"conf",
"=",
"\"\"",
"if",
"not",
"uid",
":",
"raise",
"salt",
".",
"exceptions"... | https://github.com/saltstack/salt/blob/fae5bc757ad0f1716483ce7ae180b451545c2058/salt/modules/cimc.py#L897-L944 | |
larryhastings/gilectomy | 4315ec3f1d6d4f813cc82ce27a24e7f784dbfc1a | Lib/stat.py | python | S_ISLNK | (mode) | return S_IFMT(mode) == S_IFLNK | Return True if mode is from a symbolic link. | Return True if mode is from a symbolic link. | [
"Return",
"True",
"if",
"mode",
"is",
"from",
"a",
"symbolic",
"link",
"."
] | def S_ISLNK(mode):
"""Return True if mode is from a symbolic link."""
return S_IFMT(mode) == S_IFLNK | [
"def",
"S_ISLNK",
"(",
"mode",
")",
":",
"return",
"S_IFMT",
"(",
"mode",
")",
"==",
"S_IFLNK"
] | https://github.com/larryhastings/gilectomy/blob/4315ec3f1d6d4f813cc82ce27a24e7f784dbfc1a/Lib/stat.py#L66-L68 | |
awslabs/aws-ec2rescue-linux | 8ecf40e7ea0d2563dac057235803fca2221029d2 | ec2rlcore/prediag.py | python | print_indent | (str_arg, level=0) | Print str_arg indented two spaces per level. | Print str_arg indented two spaces per level. | [
"Print",
"str_arg",
"indented",
"two",
"spaces",
"per",
"level",
"."
] | def print_indent(str_arg, level=0):
"""Print str_arg indented two spaces per level."""
print("{}{}".format(level * " ", str_arg)) | [
"def",
"print_indent",
"(",
"str_arg",
",",
"level",
"=",
"0",
")",
":",
"print",
"(",
"\"{}{}\"",
".",
"format",
"(",
"level",
"*",
"\" \"",
",",
"str_arg",
")",
")"
] | https://github.com/awslabs/aws-ec2rescue-linux/blob/8ecf40e7ea0d2563dac057235803fca2221029d2/ec2rlcore/prediag.py#L340-L342 | ||
stopstalk/stopstalk-deployment | 10c3ab44c4ece33ae515f6888c15033db2004bb1 | aws_lambda/spoj_aws_lambda_function/lambda_code/pkg_resources/_vendor/pyparsing.py | python | ParserElement.split | (self, instring, maxsplit=_MAX_INT, includeSeparators=False) | Generator method to split a string using the given expression as a separator.
May be called with optional C{maxsplit} argument, to limit the number of splits;
and the optional C{includeSeparators} argument (default=C{False}), if the separating
matching text should be included in the split result... | Generator method to split a string using the given expression as a separator.
May be called with optional C{maxsplit} argument, to limit the number of splits;
and the optional C{includeSeparators} argument (default=C{False}), if the separating
matching text should be included in the split result... | [
"Generator",
"method",
"to",
"split",
"a",
"string",
"using",
"the",
"given",
"expression",
"as",
"a",
"separator",
".",
"May",
"be",
"called",
"with",
"optional",
"C",
"{",
"maxsplit",
"}",
"argument",
"to",
"limit",
"the",
"number",
"of",
"splits",
";",
... | def split(self, instring, maxsplit=_MAX_INT, includeSeparators=False):
"""
Generator method to split a string using the given expression as a separator.
May be called with optional C{maxsplit} argument, to limit the number of splits;
and the optional C{includeSeparators} argument (defaul... | [
"def",
"split",
"(",
"self",
",",
"instring",
",",
"maxsplit",
"=",
"_MAX_INT",
",",
"includeSeparators",
"=",
"False",
")",
":",
"splits",
"=",
"0",
"last",
"=",
"0",
"for",
"t",
",",
"s",
",",
"e",
"in",
"self",
".",
"scanString",
"(",
"instring",
... | https://github.com/stopstalk/stopstalk-deployment/blob/10c3ab44c4ece33ae515f6888c15033db2004bb1/aws_lambda/spoj_aws_lambda_function/lambda_code/pkg_resources/_vendor/pyparsing.py#L1799-L1819 | ||
IronLanguages/ironpython2 | 51fdedeeda15727717fb8268a805f71b06c0b9f1 | Src/StdLib/Lib/site-packages/win32/lib/win32timezone.py | python | utcnow | () | return now | Return the UTC time now with timezone awareness as enabled
by this module
>>> now = utcnow() | Return the UTC time now with timezone awareness as enabled
by this module
>>> now = utcnow() | [
"Return",
"the",
"UTC",
"time",
"now",
"with",
"timezone",
"awareness",
"as",
"enabled",
"by",
"this",
"module",
">>>",
"now",
"=",
"utcnow",
"()"
] | def utcnow():
"""
Return the UTC time now with timezone awareness as enabled
by this module
>>> now = utcnow()
"""
now = datetime.datetime.utcnow()
now = now.replace(tzinfo=TimeZoneInfo.utc())
return now | [
"def",
"utcnow",
"(",
")",
":",
"now",
"=",
"datetime",
".",
"datetime",
".",
"utcnow",
"(",
")",
"now",
"=",
"now",
".",
"replace",
"(",
"tzinfo",
"=",
"TimeZoneInfo",
".",
"utc",
"(",
")",
")",
"return",
"now"
] | https://github.com/IronLanguages/ironpython2/blob/51fdedeeda15727717fb8268a805f71b06c0b9f1/Src/StdLib/Lib/site-packages/win32/lib/win32timezone.py#L666-L674 | |
TencentCloud/tencentcloud-sdk-python | 3677fd1cdc8c5fd626ce001c13fd3b59d1f279d2 | tencentcloud/eiam/v20210420/eiam_client.py | python | EiamClient.ListApplications | (self, request) | 获取应用列表信息。
:param request: Request instance for ListApplications.
:type request: :class:`tencentcloud.eiam.v20210420.models.ListApplicationsRequest`
:rtype: :class:`tencentcloud.eiam.v20210420.models.ListApplicationsResponse` | 获取应用列表信息。 | [
"获取应用列表信息。"
] | def ListApplications(self, request):
"""获取应用列表信息。
:param request: Request instance for ListApplications.
:type request: :class:`tencentcloud.eiam.v20210420.models.ListApplicationsRequest`
:rtype: :class:`tencentcloud.eiam.v20210420.models.ListApplicationsResponse`
"""
t... | [
"def",
"ListApplications",
"(",
"self",
",",
"request",
")",
":",
"try",
":",
"params",
"=",
"request",
".",
"_serialize",
"(",
")",
"body",
"=",
"self",
".",
"call",
"(",
"\"ListApplications\"",
",",
"params",
")",
"response",
"=",
"json",
".",
"loads",... | https://github.com/TencentCloud/tencentcloud-sdk-python/blob/3677fd1cdc8c5fd626ce001c13fd3b59d1f279d2/tencentcloud/eiam/v20210420/eiam_client.py#L757-L782 | ||
mozillazg/pypy | 2ff5cd960c075c991389f842c6d59e71cf0cb7d0 | pypy/objspace/std/bytearrayobject.py | python | BytearrayDocstrings.endswith | () | B.endswith(suffix[, start[, end]]) -> bool
Return True if B ends with the specified suffix, False otherwise.
With optional start, test B beginning at that position.
With optional end, stop comparing B at that position.
suffix can also be a tuple of strings to try. | B.endswith(suffix[, start[, end]]) -> bool | [
"B",
".",
"endswith",
"(",
"suffix",
"[",
"start",
"[",
"end",
"]]",
")",
"-",
">",
"bool"
] | def endswith():
"""B.endswith(suffix[, start[, end]]) -> bool
Return True if B ends with the specified suffix, False otherwise.
With optional start, test B beginning at that position.
With optional end, stop comparing B at that position.
suffix can also be a tuple of strings to ... | [
"def",
"endswith",
"(",
")",
":"
] | https://github.com/mozillazg/pypy/blob/2ff5cd960c075c991389f842c6d59e71cf0cb7d0/pypy/objspace/std/bytearrayobject.py#L772-L779 | ||
fortharris/Pcode | 147962d160a834c219e12cb456abc130826468e4 | Extensions/Settings/GeneralSettings.py | python | GeneralSettings.setMatchBraces | (self, state) | [] | def setMatchBraces(self, state):
self.useData.SETTINGS["MatchBraces"] = str(state)
for i in range(self.projectWindowStack.count() - 1):
editorTabWidget = self.projectWindowStack.widget(i).editorTabWidget
for i in range(editorTabWidget.count()):
editor = editorTabW... | [
"def",
"setMatchBraces",
"(",
"self",
",",
"state",
")",
":",
"self",
".",
"useData",
".",
"SETTINGS",
"[",
"\"MatchBraces\"",
"]",
"=",
"str",
"(",
"state",
")",
"for",
"i",
"in",
"range",
"(",
"self",
".",
"projectWindowStack",
".",
"count",
"(",
")"... | https://github.com/fortharris/Pcode/blob/147962d160a834c219e12cb456abc130826468e4/Extensions/Settings/GeneralSettings.py#L434-L447 | ||||
Chaffelson/nipyapi | d3b186fd701ce308c2812746d98af9120955e810 | nipyapi/registry/models/extension_repo_group.py | python | ExtensionRepoGroup.bucket_name | (self, bucket_name) | Sets the bucket_name of this ExtensionRepoGroup.
The bucket name
:param bucket_name: The bucket_name of this ExtensionRepoGroup.
:type: str | Sets the bucket_name of this ExtensionRepoGroup.
The bucket name | [
"Sets",
"the",
"bucket_name",
"of",
"this",
"ExtensionRepoGroup",
".",
"The",
"bucket",
"name"
] | def bucket_name(self, bucket_name):
"""
Sets the bucket_name of this ExtensionRepoGroup.
The bucket name
:param bucket_name: The bucket_name of this ExtensionRepoGroup.
:type: str
"""
self._bucket_name = bucket_name | [
"def",
"bucket_name",
"(",
"self",
",",
"bucket_name",
")",
":",
"self",
".",
"_bucket_name",
"=",
"bucket_name"
] | https://github.com/Chaffelson/nipyapi/blob/d3b186fd701ce308c2812746d98af9120955e810/nipyapi/registry/models/extension_repo_group.py#L96-L105 | ||
awslabs/gluon-ts | 066ec3b7f47aa4ee4c061a28f35db7edbad05a98 | src/gluonts/nursery/SCott/pts/model/tempflow/tempflow_network.py | python | TempFlowTrainingNetwork.distr_args | (self, rnn_outputs: torch.Tensor) | return distr_args | Returns the distribution of DeepVAR with respect to the RNN outputs.
Parameters
----------
rnn_outputs
Outputs of the unrolled RNN (batch_size, seq_len, num_cells)
scale
Mean scale for each time series (batch_size, 1, target_dim)
Returns
-------
... | Returns the distribution of DeepVAR with respect to the RNN outputs. | [
"Returns",
"the",
"distribution",
"of",
"DeepVAR",
"with",
"respect",
"to",
"the",
"RNN",
"outputs",
"."
] | def distr_args(self, rnn_outputs: torch.Tensor):
"""
Returns the distribution of DeepVAR with respect to the RNN outputs.
Parameters
----------
rnn_outputs
Outputs of the unrolled RNN (batch_size, seq_len, num_cells)
scale
Mean scale for each time... | [
"def",
"distr_args",
"(",
"self",
",",
"rnn_outputs",
":",
"torch",
".",
"Tensor",
")",
":",
"(",
"distr_args",
",",
")",
"=",
"self",
".",
"proj_dist_args",
"(",
"rnn_outputs",
")",
"# # compute likelihood of target given the predicted parameters",
"# distr = self.di... | https://github.com/awslabs/gluon-ts/blob/066ec3b7f47aa4ee4c061a28f35db7edbad05a98/src/gluonts/nursery/SCott/pts/model/tempflow/tempflow_network.py#L296-L320 | |
nadineproject/nadine | c41c8ef7ffe18f1853029c97eecc329039b4af6c | nadine/models/organization.py | python | OrganizationMember.__str__ | (self) | return "%s member of %s" % (self.user, self.organization) | [] | def __str__(self):
return "%s member of %s" % (self.user, self.organization) | [
"def",
"__str__",
"(",
"self",
")",
":",
"return",
"\"%s member of %s\"",
"%",
"(",
"self",
".",
"user",
",",
"self",
".",
"organization",
")"
] | https://github.com/nadineproject/nadine/blob/c41c8ef7ffe18f1853029c97eecc329039b4af6c/nadine/models/organization.py#L191-L192 | |||
dimagi/commcare-hq | d67ff1d3b4c51fa050c19e60c3253a79d3452a39 | custom/up_nrhm/sql_data.py | python | ASHAAFChecklistData.table_name | (self) | return get_table_name(self.config['domain'], TABLE_ID) | [] | def table_name(self):
return get_table_name(self.config['domain'], TABLE_ID) | [
"def",
"table_name",
"(",
"self",
")",
":",
"return",
"get_table_name",
"(",
"self",
".",
"config",
"[",
"'domain'",
"]",
",",
"TABLE_ID",
")"
] | https://github.com/dimagi/commcare-hq/blob/d67ff1d3b4c51fa050c19e60c3253a79d3452a39/custom/up_nrhm/sql_data.py#L260-L261 | |||
derrod/legendary | 3bc819e56742cec3b60ec209e22004ae7ee783b3 | legendary/utils/egl_crypt.py | python | xor_bytes | (a, b) | return bytes(i ^ j for i, j in zip(a, b)) | Returns a new byte array with the elements xor'ed. | Returns a new byte array with the elements xor'ed. | [
"Returns",
"a",
"new",
"byte",
"array",
"with",
"the",
"elements",
"xor",
"ed",
"."
] | def xor_bytes(a, b):
""" Returns a new byte array with the elements xor'ed. """
return bytes(i ^ j for i, j in zip(a, b)) | [
"def",
"xor_bytes",
"(",
"a",
",",
"b",
")",
":",
"return",
"bytes",
"(",
"i",
"^",
"j",
"for",
"i",
",",
"j",
"in",
"zip",
"(",
"a",
",",
"b",
")",
")"
] | https://github.com/derrod/legendary/blob/3bc819e56742cec3b60ec209e22004ae7ee783b3/legendary/utils/egl_crypt.py#L130-L132 | |
scrapinghub/splash | 802d8391984bae049ef95a3fe1a74feaee95a233 | splash/lua_runtime.py | python | SplashLuaRuntime.remove_allowed_object | (self, obj) | Remove an object from a list of objects the runtime can access | Remove an object from a list of objects the runtime can access | [
"Remove",
"an",
"object",
"from",
"a",
"list",
"of",
"objects",
"the",
"runtime",
"can",
"access"
] | def remove_allowed_object(self, obj):
""" Remove an object from a list of objects the runtime can access """
if obj in self._allowed_object_attrs:
del self._allowed_object_attrs[obj] | [
"def",
"remove_allowed_object",
"(",
"self",
",",
"obj",
")",
":",
"if",
"obj",
"in",
"self",
".",
"_allowed_object_attrs",
":",
"del",
"self",
".",
"_allowed_object_attrs",
"[",
"obj",
"]"
] | https://github.com/scrapinghub/splash/blob/802d8391984bae049ef95a3fe1a74feaee95a233/splash/lua_runtime.py#L46-L49 | ||
fonttools/fonttools | 892322aaff6a89bea5927379ec06bc0da3dfb7df | Lib/fontTools/subset/__init__.py | python | retain_empty_scripts | (self) | return self.__class__ == ttLib.getTableClass('GSUB') | [] | def retain_empty_scripts(self):
# https://github.com/fonttools/fonttools/issues/518
# https://bugzilla.mozilla.org/show_bug.cgi?id=1080739#c15
return self.__class__ == ttLib.getTableClass('GSUB') | [
"def",
"retain_empty_scripts",
"(",
"self",
")",
":",
"# https://github.com/fonttools/fonttools/issues/518",
"# https://bugzilla.mozilla.org/show_bug.cgi?id=1080739#c15",
"return",
"self",
".",
"__class__",
"==",
"ttLib",
".",
"getTableClass",
"(",
"'GSUB'",
")"
] | https://github.com/fonttools/fonttools/blob/892322aaff6a89bea5927379ec06bc0da3dfb7df/Lib/fontTools/subset/__init__.py#L1571-L1574 | |||
simonacca/zatt | ec4748599dd8365d4d808dc9131cc71dd28f9cbf | zatt/server/states.py | python | Leader.on_client_append | (self, protocol, msg) | Append new entries to Leader log. | Append new entries to Leader log. | [
"Append",
"new",
"entries",
"to",
"Leader",
"log",
"."
] | def on_client_append(self, protocol, msg):
"""Append new entries to Leader log."""
entry = {'term': self.persist['currentTerm'], 'data': msg['data']}
if msg['data']['key'] == 'cluster':
protocol.send({'type': 'result', 'success': False})
self.log.append_entries([entry], self.... | [
"def",
"on_client_append",
"(",
"self",
",",
"protocol",
",",
"msg",
")",
":",
"entry",
"=",
"{",
"'term'",
":",
"self",
".",
"persist",
"[",
"'currentTerm'",
"]",
",",
"'data'",
":",
"msg",
"[",
"'data'",
"]",
"}",
"if",
"msg",
"[",
"'data'",
"]",
... | https://github.com/simonacca/zatt/blob/ec4748599dd8365d4d808dc9131cc71dd28f9cbf/zatt/server/states.py#L311-L323 | ||
mchristopher/PokemonGo-DesktopMap | ec37575f2776ee7d64456e2a1f6b6b78830b4fe0 | app/pywin/Lib/pipes.py | python | quote | (file) | return "'" + file.replace("'", "'\"'\"'") + "'" | Return a shell-escaped version of the file string. | Return a shell-escaped version of the file string. | [
"Return",
"a",
"shell",
"-",
"escaped",
"version",
"of",
"the",
"file",
"string",
"."
] | def quote(file):
"""Return a shell-escaped version of the file string."""
for c in file:
if c not in _safechars:
break
else:
if not file:
return "''"
return file
# use single quotes, and put single quotes into double quotes
# the string $'b is then quo... | [
"def",
"quote",
"(",
"file",
")",
":",
"for",
"c",
"in",
"file",
":",
"if",
"c",
"not",
"in",
"_safechars",
":",
"break",
"else",
":",
"if",
"not",
"file",
":",
"return",
"\"''\"",
"return",
"file",
"# use single quotes, and put single quotes into double quote... | https://github.com/mchristopher/PokemonGo-DesktopMap/blob/ec37575f2776ee7d64456e2a1f6b6b78830b4fe0/app/pywin/Lib/pipes.py#L267-L278 | |
Alex-Fabbri/Multi-News | f6476d1f114662eb93db32e9b704b7c4fe047217 | code/Hi_MAP/onmt/models/sru.py | python | SRUCell.forward | (self, input, c0=None) | return h, c | [] | def forward(self, input, c0=None):
assert input.dim() == 2 or input.dim() == 3
n_in, n_out = self.n_in, self.n_out
batch = input.size(-2)
if c0 is None:
c0 = input.data.new(
batch, n_out if not self.bidirectional else n_out * 2
).zero_()
i... | [
"def",
"forward",
"(",
"self",
",",
"input",
",",
"c0",
"=",
"None",
")",
":",
"assert",
"input",
".",
"dim",
"(",
")",
"==",
"2",
"or",
"input",
".",
"dim",
"(",
")",
"==",
"3",
"n_in",
",",
"n_out",
"=",
"self",
".",
"n_in",
",",
"self",
".... | https://github.com/Alex-Fabbri/Multi-News/blob/f6476d1f114662eb93db32e9b704b7c4fe047217/code/Hi_MAP/onmt/models/sru.py#L528-L560 | |||
stb-tester/stb-tester | 5b652bd5018360f2352f9bedc5f80ff92e66b2d1 | _stbt/keyboard.py | python | _join_with_commas | (items, last_one=", ") | >>> _join_with_commas(["A", "B", "C"], last_one=" or ")
'A, B or C'
>>> _join_with_commas(["A", "C"], last_one=" or ")
'A or C'
>>> _join_with_commas(["A"], last_one=" or ")
'A'
>>> _join_with_commas([], last_one=" or ")
'' | >>> _join_with_commas(["A", "B", "C"], last_one=" or ")
'A, B or C'
>>> _join_with_commas(["A", "C"], last_one=" or ")
'A or C'
>>> _join_with_commas(["A"], last_one=" or ")
'A'
>>> _join_with_commas([], last_one=" or ")
'' | [
">>>",
"_join_with_commas",
"(",
"[",
"A",
"B",
"C",
"]",
"last_one",
"=",
"or",
")",
"A",
"B",
"or",
"C",
">>>",
"_join_with_commas",
"(",
"[",
"A",
"C",
"]",
"last_one",
"=",
"or",
")",
"A",
"or",
"C",
">>>",
"_join_with_commas",
"(",
"[",
"A",
... | def _join_with_commas(items, last_one=", "):
"""
>>> _join_with_commas(["A", "B", "C"], last_one=" or ")
'A, B or C'
>>> _join_with_commas(["A", "C"], last_one=" or ")
'A or C'
>>> _join_with_commas(["A"], last_one=" or ")
'A'
>>> _join_with_commas([], last_one=" or ")
''
"""
... | [
"def",
"_join_with_commas",
"(",
"items",
",",
"last_one",
"=",
"\", \"",
")",
":",
"if",
"len",
"(",
"items",
")",
">",
"1",
":",
"return",
"last_one",
".",
"join",
"(",
"[",
"\", \"",
".",
"join",
"(",
"items",
"[",
":",
"-",
"1",
"]",
")",
","... | https://github.com/stb-tester/stb-tester/blob/5b652bd5018360f2352f9bedc5f80ff92e66b2d1/_stbt/keyboard.py#L807-L825 | ||
TarrySingh/Artificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials | 5bb97d7e3ffd913abddb4cfa7d78a1b4c868890e | deep-learning/NLP/Seq2Seq-PyTorch/model.py | python | Seq2SeqFastAttention.get_state | (self, input) | return h0_encoder.cuda(), c0_encoder.cuda() | Get cell states and hidden states. | Get cell states and hidden states. | [
"Get",
"cell",
"states",
"and",
"hidden",
"states",
"."
] | def get_state(self, input):
"""Get cell states and hidden states."""
batch_size = input.size(0) \
if self.encoder.batch_first else input.size(1)
h0_encoder = Variable(torch.zeros(
self.encoder.num_layers * self.num_directions,
batch_size,
self.src_... | [
"def",
"get_state",
"(",
"self",
",",
"input",
")",
":",
"batch_size",
"=",
"input",
".",
"size",
"(",
"0",
")",
"if",
"self",
".",
"encoder",
".",
"batch_first",
"else",
"input",
".",
"size",
"(",
"1",
")",
"h0_encoder",
"=",
"Variable",
"(",
"torch... | https://github.com/TarrySingh/Artificial-Intelligence-Deep-Learning-Machine-Learning-Tutorials/blob/5bb97d7e3ffd913abddb4cfa7d78a1b4c868890e/deep-learning/NLP/Seq2Seq-PyTorch/model.py#L1093-L1108 | |
Azure/azure-devops-cli-extension | 11334cd55806bef0b99c3bee5a438eed71e44037 | azure-devops/azext_devops/devops_sdk/v5_1/git/git_client_base.py | python | GitClientBase.get_pull_request_reviewer | (self, repository_id, pull_request_id, reviewer_id, project=None) | return self._deserialize('IdentityRefWithVote', response) | GetPullRequestReviewer.
Retrieve information about a particular reviewer on a pull request
:param str repository_id: The repository ID of the pull request’s target branch.
:param int pull_request_id: ID of the pull request.
:param str reviewer_id: ID of the reviewer.
:param str p... | GetPullRequestReviewer.
Retrieve information about a particular reviewer on a pull request
:param str repository_id: The repository ID of the pull request’s target branch.
:param int pull_request_id: ID of the pull request.
:param str reviewer_id: ID of the reviewer.
:param str p... | [
"GetPullRequestReviewer",
".",
"Retrieve",
"information",
"about",
"a",
"particular",
"reviewer",
"on",
"a",
"pull",
"request",
":",
"param",
"str",
"repository_id",
":",
"The",
"repository",
"ID",
"of",
"the",
"pull",
"request’s",
"target",
"branch",
".",
":",
... | def get_pull_request_reviewer(self, repository_id, pull_request_id, reviewer_id, project=None):
"""GetPullRequestReviewer.
Retrieve information about a particular reviewer on a pull request
:param str repository_id: The repository ID of the pull request’s target branch.
:param int pull_r... | [
"def",
"get_pull_request_reviewer",
"(",
"self",
",",
"repository_id",
",",
"pull_request_id",
",",
"reviewer_id",
",",
"project",
"=",
"None",
")",
":",
"route_values",
"=",
"{",
"}",
"if",
"project",
"is",
"not",
"None",
":",
"route_values",
"[",
"'project'"... | https://github.com/Azure/azure-devops-cli-extension/blob/11334cd55806bef0b99c3bee5a438eed71e44037/azure-devops/azext_devops/devops_sdk/v5_1/git/git_client_base.py#L1937-L1959 | |
glamp/bashplotlib | db4065cfe65c0bf7c530e0e8b9328daf9593ad74 | bashplotlib/utils/helpers.py | python | get_colour | (colour, default="default") | return bcolours.get(colour, bcolours[default]) | Get the escape code sequence for a colour | Get the escape code sequence for a colour | [
"Get",
"the",
"escape",
"code",
"sequence",
"for",
"a",
"colour"
] | def get_colour(colour, default="default"):
"""
Get the escape code sequence for a colour
"""
return bcolours.get(colour, bcolours[default]) | [
"def",
"get_colour",
"(",
"colour",
",",
"default",
"=",
"\"default\"",
")",
":",
"return",
"bcolours",
".",
"get",
"(",
"colour",
",",
"bcolours",
"[",
"default",
"]",
")"
] | https://github.com/glamp/bashplotlib/blob/db4065cfe65c0bf7c530e0e8b9328daf9593ad74/bashplotlib/utils/helpers.py#L29-L33 | |
xgi/castero | 766965fb1d3586d62ab6fd6dd144fa510c1e0ecb | castero/feed.py | python | Feed.title | (self) | return self._title | str: the title of the feed | str: the title of the feed | [
"str",
":",
"the",
"title",
"of",
"the",
"feed"
] | def title(self) -> str:
"""str: the title of the feed"""
return self._title | [
"def",
"title",
"(",
"self",
")",
"->",
"str",
":",
"return",
"self",
".",
"_title"
] | https://github.com/xgi/castero/blob/766965fb1d3586d62ab6fd6dd144fa510c1e0ecb/castero/feed.py#L373-L375 | |
bytedance/byteps | d0bcf1a87ee87539ceb29bcc976d4da063ffc47b | example/tensorflow/tensorflow2_mnist_bps_MirroredStrategy.py | python | mnist_dataset | (batch_size) | return train_dataset | [] | def mnist_dataset(batch_size):
(x_train, y_train), _ = tf.keras.datasets.mnist.load_data()
# The `x` arrays are in uint8 and have values in the range [0, 255].
# We need to convert them to float32 with values in the range [0, 1]
x_train = x_train / np.float32(255)
y_train = y_train.astype(np.int64)
train_da... | [
"def",
"mnist_dataset",
"(",
"batch_size",
")",
":",
"(",
"x_train",
",",
"y_train",
")",
",",
"_",
"=",
"tf",
".",
"keras",
".",
"datasets",
".",
"mnist",
".",
"load_data",
"(",
")",
"# The `x` arrays are in uint8 and have values in the range [0, 255].",
"# We ne... | https://github.com/bytedance/byteps/blob/d0bcf1a87ee87539ceb29bcc976d4da063ffc47b/example/tensorflow/tensorflow2_mnist_bps_MirroredStrategy.py#L28-L36 | |||
zopefoundation/Zope | ea04dd670d1a48d4d5c879d3db38fc2e9b4330bb | src/Products/SiteAccess/__init__.py | python | initialize | (context) | [] | def initialize(context):
from Products.SiteAccess import VirtualHostMonster
context.registerClass(
instance_class=VirtualHostMonster.VirtualHostMonster,
permission='Add Virtual Host Monsters',
constructors=VirtualHostMonster.constructors,
) | [
"def",
"initialize",
"(",
"context",
")",
":",
"from",
"Products",
".",
"SiteAccess",
"import",
"VirtualHostMonster",
"context",
".",
"registerClass",
"(",
"instance_class",
"=",
"VirtualHostMonster",
".",
"VirtualHostMonster",
",",
"permission",
"=",
"'Add Virtual Ho... | https://github.com/zopefoundation/Zope/blob/ea04dd670d1a48d4d5c879d3db38fc2e9b4330bb/src/Products/SiteAccess/__init__.py#L1-L8 | ||||
nilearn/nilearn | 9edba4471747efacf21260bf470a346307f52706 | nilearn/plotting/displays/_slicers.py | python | TiledSlicer._find_initial_axes_coord | (self, index) | return [coord1, coord2, coord3, coord4] | Find coordinates for initial axes placement for xyz cuts.
Parameters
----------
index : :obj:`int`
Index corresponding to current cut 'x', 'y' or 'z'.
Returns
-------
[coord1, coord2, coord3, coord4] : :obj:`list` of :obj:`int`
x0, y0, x1, y1 coo... | Find coordinates for initial axes placement for xyz cuts. | [
"Find",
"coordinates",
"for",
"initial",
"axes",
"placement",
"for",
"xyz",
"cuts",
"."
] | def _find_initial_axes_coord(self, index):
"""Find coordinates for initial axes placement for xyz cuts.
Parameters
----------
index : :obj:`int`
Index corresponding to current cut 'x', 'y' or 'z'.
Returns
-------
[coord1, coord2, coord3, coord4] : :o... | [
"def",
"_find_initial_axes_coord",
"(",
"self",
",",
"index",
")",
":",
"rect_x0",
",",
"rect_y0",
",",
"rect_x1",
",",
"rect_y1",
"=",
"self",
".",
"rect",
"if",
"index",
"==",
"0",
":",
"coord1",
"=",
"rect_x1",
"-",
"rect_x0",
"coord2",
"=",
"0.5",
... | https://github.com/nilearn/nilearn/blob/9edba4471747efacf21260bf470a346307f52706/nilearn/plotting/displays/_slicers.py#L971-L1002 | |
s-leger/archipack | 5a6243bf1edf08a6b429661ce291dacb551e5f8a | pygeos/geom.py | python | Geometry.length | (self) | return 0.0 | * Returns the length of this Geometry.
* Linear geometries return their length.
* Areal geometries return their perimeter.
* They override this function to compute the area.
* Others return 0.0
*
* @return the length of the Geometry | * Returns the length of this Geometry.
* Linear geometries return their length.
* Areal geometries return their perimeter.
* They override this function to compute the area.
* Others return 0.0
*
* | [
"*",
"Returns",
"the",
"length",
"of",
"this",
"Geometry",
".",
"*",
"Linear",
"geometries",
"return",
"their",
"length",
".",
"*",
"Areal",
"geometries",
"return",
"their",
"perimeter",
".",
"*",
"They",
"override",
"this",
"function",
"to",
"compute",
"the... | def length(self):
"""
* Returns the length of this Geometry.
* Linear geometries return their length.
* Areal geometries return their perimeter.
* They override this function to compute the area.
* Others return 0.0
*
* @return the length of th... | [
"def",
"length",
"(",
"self",
")",
":",
"return",
"0.0"
] | https://github.com/s-leger/archipack/blob/5a6243bf1edf08a6b429661ce291dacb551e5f8a/pygeos/geom.py#L289-L299 | |
mozman/ezdxf | 59d0fc2ea63f5cf82293428f5931da7e9f9718e9 | src/ezdxf/sections/objects.py | python | ObjectsSection.export_dxf | (self, tagwriter: "TagWriter") | Export DXF entity by `tagwriter`. (internal API) | Export DXF entity by `tagwriter`. (internal API) | [
"Export",
"DXF",
"entity",
"by",
"tagwriter",
".",
"(",
"internal",
"API",
")"
] | def export_dxf(self, tagwriter: "TagWriter") -> None:
"""Export DXF entity by `tagwriter`. (internal API)"""
tagwriter.write_str(" 0\nSECTION\n 2\nOBJECTS\n")
self._entity_space.export_dxf(tagwriter)
tagwriter.write_tag2(0, "ENDSEC") | [
"def",
"export_dxf",
"(",
"self",
",",
"tagwriter",
":",
"\"TagWriter\"",
")",
"->",
"None",
":",
"tagwriter",
".",
"write_str",
"(",
"\" 0\\nSECTION\\n 2\\nOBJECTS\\n\"",
")",
"self",
".",
"_entity_space",
".",
"export_dxf",
"(",
"tagwriter",
")",
"tagwriter",
... | https://github.com/mozman/ezdxf/blob/59d0fc2ea63f5cf82293428f5931da7e9f9718e9/src/ezdxf/sections/objects.py#L73-L77 | ||
lad1337/XDM | 0c1b7009fe00f06f102a6f67c793478f515e7efe | site-packages/logilab/common/fileutils.py | python | relative_path | (from_file, to_file) | return sep.join(result) | Try to get a relative path from `from_file` to `to_file`
(path will be absolute if to_file is an absolute file). This function
is useful to create link in `from_file` to `to_file`. This typical use
case is used in this function description.
If both files are relative, they're expected to be relative to... | Try to get a relative path from `from_file` to `to_file`
(path will be absolute if to_file is an absolute file). This function
is useful to create link in `from_file` to `to_file`. This typical use
case is used in this function description. | [
"Try",
"to",
"get",
"a",
"relative",
"path",
"from",
"from_file",
"to",
"to_file",
"(",
"path",
"will",
"be",
"absolute",
"if",
"to_file",
"is",
"an",
"absolute",
"file",
")",
".",
"This",
"function",
"is",
"useful",
"to",
"create",
"link",
"in",
"from_f... | def relative_path(from_file, to_file):
"""Try to get a relative path from `from_file` to `to_file`
(path will be absolute if to_file is an absolute file). This function
is useful to create link in `from_file` to `to_file`. This typical use
case is used in this function description.
If both files ar... | [
"def",
"relative_path",
"(",
"from_file",
",",
"to_file",
")",
":",
"from_file",
"=",
"normpath",
"(",
"from_file",
")",
"to_file",
"=",
"normpath",
"(",
"to_file",
")",
"if",
"from_file",
"==",
"to_file",
":",
"return",
"''",
"if",
"isabs",
"(",
"to_file"... | https://github.com/lad1337/XDM/blob/0c1b7009fe00f06f102a6f67c793478f515e7efe/site-packages/logilab/common/fileutils.py#L180-L244 | |
jgagneastro/coffeegrindsize | 22661ebd21831dba4cf32bfc6ba59fe3d49f879c | App/dist/coffeegrindsize.app/Contents/Resources/lib/python3.7/numpy/polynomial/polynomial.py | python | polyfit | (x, y, deg, rcond=None, full=False, w=None) | Least-squares fit of a polynomial to data.
Return the coefficients of a polynomial of degree `deg` that is the
least squares fit to the data values `y` given at points `x`. If `y` is
1-D the returned coefficients will also be 1-D. If `y` is 2-D multiple
fits are done, one for each column of `y`, and th... | Least-squares fit of a polynomial to data. | [
"Least",
"-",
"squares",
"fit",
"of",
"a",
"polynomial",
"to",
"data",
"."
] | def polyfit(x, y, deg, rcond=None, full=False, w=None):
"""
Least-squares fit of a polynomial to data.
Return the coefficients of a polynomial of degree `deg` that is the
least squares fit to the data values `y` given at points `x`. If `y` is
1-D the returned coefficients will also be 1-D. If `y` i... | [
"def",
"polyfit",
"(",
"x",
",",
"y",
",",
"deg",
",",
"rcond",
"=",
"None",
",",
"full",
"=",
"False",
",",
"w",
"=",
"None",
")",
":",
"x",
"=",
"np",
".",
"asarray",
"(",
"x",
")",
"+",
"0.0",
"y",
"=",
"np",
".",
"asarray",
"(",
"y",
... | https://github.com/jgagneastro/coffeegrindsize/blob/22661ebd21831dba4cf32bfc6ba59fe3d49f879c/App/dist/coffeegrindsize.app/Contents/Resources/lib/python3.7/numpy/polynomial/polynomial.py#L1293-L1509 | ||
persephone-tools/persephone | ef7cbf169b1fd7ad6eb880dbda6357f0e7393fba | persephone/corpus.py | python | Corpus.get_untranscribed_prefixes | (self) | return get_untranscribed_prefixes_from_file(self.tgt_dir) | The file "untranscribed_prefixes.txt" will specify prefixes which
do not have an associated transcription file if placed in the target directory.
This will fetch those prefixes from that file and will return an empty
list if that file does not exist.
See find_untranscribed_wavs functio... | The file "untranscribed_prefixes.txt" will specify prefixes which
do not have an associated transcription file if placed in the target directory. | [
"The",
"file",
"untranscribed_prefixes",
".",
"txt",
"will",
"specify",
"prefixes",
"which",
"do",
"not",
"have",
"an",
"associated",
"transcription",
"file",
"if",
"placed",
"in",
"the",
"target",
"directory",
"."
] | def get_untranscribed_prefixes(self) -> List[str]:
"""
The file "untranscribed_prefixes.txt" will specify prefixes which
do not have an associated transcription file if placed in the target directory.
This will fetch those prefixes from that file and will return an empty
list if... | [
"def",
"get_untranscribed_prefixes",
"(",
"self",
")",
"->",
"List",
"[",
"str",
"]",
":",
"return",
"get_untranscribed_prefixes_from_file",
"(",
"self",
".",
"tgt_dir",
")"
] | https://github.com/persephone-tools/persephone/blob/ef7cbf169b1fd7ad6eb880dbda6357f0e7393fba/persephone/corpus.py#L555-L566 | |
marcosfede/algorithms | 1ee7c815f9d556c9cef4d4b0d21ee3a409d21629 | strings/rabin_karp.py | python | RollingHash.move_window | (self) | [] | def move_window(self):
if self.window_end <= len(self.text) - 1:
# remove left letter from hash value
self.hash -= (ord(self.text[self.window_start]) - ord("a") + 1) * 26 ** (self.sizeWord - 1)
self.hash *= 26
self.hash += ord(self.text[self.window_end]) - ord("a"... | [
"def",
"move_window",
"(",
"self",
")",
":",
"if",
"self",
".",
"window_end",
"<=",
"len",
"(",
"self",
".",
"text",
")",
"-",
"1",
":",
"# remove left letter from hash value",
"self",
".",
"hash",
"-=",
"(",
"ord",
"(",
"self",
".",
"text",
"[",
"self... | https://github.com/marcosfede/algorithms/blob/1ee7c815f9d556c9cef4d4b0d21ee3a409d21629/strings/rabin_karp.py#L20-L27 | ||||
mesalock-linux/mesapy | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | lib-python/2.7/lib-tk/turtle.py | python | TurtleScreenBase._type | (self, item) | return self.cv.type(item) | Return 'line' or 'polygon' or 'image' depending on
type of item. | Return 'line' or 'polygon' or 'image' depending on
type of item. | [
"Return",
"line",
"or",
"polygon",
"or",
"image",
"depending",
"on",
"type",
"of",
"item",
"."
] | def _type(self, item):
"""Return 'line' or 'polygon' or 'image' depending on
type of item.
"""
return self.cv.type(item) | [
"def",
"_type",
"(",
"self",
",",
"item",
")",
":",
"return",
"self",
".",
"cv",
".",
"type",
"(",
"item",
")"
] | https://github.com/mesalock-linux/mesapy/blob/ed546d59a21b36feb93e2309d5c6b75aa0ad95c9/lib-python/2.7/lib-tk/turtle.py#L747-L751 | |
girder/girder | 0766ba8e7f9b25ce81e7c0d19bd343479bceea20 | plugins/user_quota/girder_user_quota/quota.py | python | QuotaPolicy.checkUploadStart | (self, event) | Check if an upload will fit within a quota restriction. This is before
the upload occurs, but since multiple uploads can be started
concurrently, we also have to check when the upload is being completed.
:param event: event record. | Check if an upload will fit within a quota restriction. This is before
the upload occurs, but since multiple uploads can be started
concurrently, we also have to check when the upload is being completed. | [
"Check",
"if",
"an",
"upload",
"will",
"fit",
"within",
"a",
"quota",
"restriction",
".",
"This",
"is",
"before",
"the",
"upload",
"occurs",
"but",
"since",
"multiple",
"uploads",
"can",
"be",
"started",
"concurrently",
"we",
"also",
"have",
"to",
"check",
... | def checkUploadStart(self, event):
"""
Check if an upload will fit within a quota restriction. This is before
the upload occurs, but since multiple uploads can be started
concurrently, we also have to check when the upload is being completed.
:param event: event record.
... | [
"def",
"checkUploadStart",
"(",
"self",
",",
"event",
")",
":",
"if",
"'_id'",
"in",
"event",
".",
"info",
":",
"return",
"quotaInfo",
"=",
"self",
".",
"_checkUploadSize",
"(",
"event",
".",
"info",
")",
"if",
"quotaInfo",
":",
"raise",
"ValidationExcepti... | https://github.com/girder/girder/blob/0766ba8e7f9b25ce81e7c0d19bd343479bceea20/plugins/user_quota/girder_user_quota/quota.py#L366-L385 | ||
JBakamovic/cxxd | 142c19649b036bd6f6bdcd4684de735ea11a6c94 | services/source_code_model/indexer/clang_indexer.py | python | start_indexing_subprocess | (root_directory, compiler_args_filename, indexer_input_list_filename, output_db_filename, log_filename) | return subprocess.Popen(shlex.split(cmd)) | [] | def start_indexing_subprocess(root_directory, compiler_args_filename, indexer_input_list_filename, output_db_filename, log_filename):
cmd = "python2 " + get_clang_index_path() + \
" --project_root_directory='" + root_directory + \
"' --compiler_args_filename='" + compiler_args_filename + \
... | [
"def",
"start_indexing_subprocess",
"(",
"root_directory",
",",
"compiler_args_filename",
",",
"indexer_input_list_filename",
",",
"output_db_filename",
",",
"log_filename",
")",
":",
"cmd",
"=",
"\"python2 \"",
"+",
"get_clang_index_path",
"(",
")",
"+",
"\" --project_ro... | https://github.com/JBakamovic/cxxd/blob/142c19649b036bd6f6bdcd4684de735ea11a6c94/services/source_code_model/indexer/clang_indexer.py#L363-L370 | |||
bread-and-pepper/django-userena | 7dfb3d5d148127e32f217a62096d507266a3a83c | userena/contrib/umessages/views.py | python | MessageListView.get_queryset | (self) | return MessageContact.objects.get_contacts_for(self.request.user) | [] | def get_queryset(self):
return MessageContact.objects.get_contacts_for(self.request.user) | [
"def",
"get_queryset",
"(",
"self",
")",
":",
"return",
"MessageContact",
".",
"objects",
".",
"get_contacts_for",
"(",
"self",
".",
"request",
".",
"user",
")"
] | https://github.com/bread-and-pepper/django-userena/blob/7dfb3d5d148127e32f217a62096d507266a3a83c/userena/contrib/umessages/views.py#L37-L38 | |||
omz/PythonistaAppTemplate | f560f93f8876d82a21d108977f90583df08d55af | PythonistaAppTemplate/PythonistaKit.framework/pylib_ext/matplotlib/patches.py | python | Patch.get_linewidth | (self) | return self._linewidth | Return the line width in points. | Return the line width in points. | [
"Return",
"the",
"line",
"width",
"in",
"points",
"."
] | def get_linewidth(self):
"""
Return the line width in points.
"""
return self._linewidth | [
"def",
"get_linewidth",
"(",
"self",
")",
":",
"return",
"self",
".",
"_linewidth"
] | https://github.com/omz/PythonistaAppTemplate/blob/f560f93f8876d82a21d108977f90583df08d55af/PythonistaAppTemplate/PythonistaKit.framework/pylib_ext/matplotlib/patches.py#L214-L218 | |
hydroshare/hydroshare | 7ba563b55412f283047fb3ef6da367d41dec58c6 | hs_modelinstance/models.py | python | ModelInstanceMetaData.executed_by | (self) | return self._executed_by.all().first() | [] | def executed_by(self):
return self._executed_by.all().first() | [
"def",
"executed_by",
"(",
"self",
")",
":",
"return",
"self",
".",
"_executed_by",
".",
"all",
"(",
")",
".",
"first",
"(",
")"
] | https://github.com/hydroshare/hydroshare/blob/7ba563b55412f283047fb3ef6da367d41dec58c6/hs_modelinstance/models.py#L145-L146 | |||
krintoxi/NoobSec-Toolkit | 38738541cbc03cedb9a3b3ed13b629f781ad64f6 | NoobSecToolkit - MAC OSX/scripts/sshbackdoors/master.py | python | BackdoorMe.do_clear | (self, args) | [] | def do_clear(self, args):
os.system("clear") | [
"def",
"do_clear",
"(",
"self",
",",
"args",
")",
":",
"os",
".",
"system",
"(",
"\"clear\"",
")"
] | https://github.com/krintoxi/NoobSec-Toolkit/blob/38738541cbc03cedb9a3b3ed13b629f781ad64f6/NoobSecToolkit - MAC OSX/scripts/sshbackdoors/master.py#L206-L207 | ||||
chapmanb/bcbb | dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027 | nextgen/bcbio/distributed/split.py | python | _check_group_status | (xs, grouped_info) | return ready, grouped | Identify grouped items that need ungrouping to continue. | Identify grouped items that need ungrouping to continue. | [
"Identify",
"grouped",
"items",
"that",
"need",
"ungrouping",
"to",
"continue",
"."
] | def _check_group_status(xs, grouped_info):
"""Identify grouped items that need ungrouping to continue.
"""
ready = []
grouped = []
for x in xs:
if x.has_key("group"):
x["group_orig"] = grouped_info[x["group"]]
grouped.append([x])
else:
ready.append... | [
"def",
"_check_group_status",
"(",
"xs",
",",
"grouped_info",
")",
":",
"ready",
"=",
"[",
"]",
"grouped",
"=",
"[",
"]",
"for",
"x",
"in",
"xs",
":",
"if",
"x",
".",
"has_key",
"(",
"\"group\"",
")",
":",
"x",
"[",
"\"group_orig\"",
"]",
"=",
"gro... | https://github.com/chapmanb/bcbb/blob/dbfb52711f0bfcc1d26c5a5b53c9ff4f50dc0027/nextgen/bcbio/distributed/split.py#L42-L53 | |
bookieio/Bookie | 78b15fc68ec7e7dc3ad0c4fa049ce670a304d419 | bookie/models/auth.py | python | User.deactivate | (self) | In case we need to disable the login | In case we need to disable the login | [
"In",
"case",
"we",
"need",
"to",
"disable",
"the",
"login"
] | def deactivate(self):
"""In case we need to disable the login"""
self.activated = False | [
"def",
"deactivate",
"(",
"self",
")",
":",
"self",
".",
"activated",
"=",
"False"
] | https://github.com/bookieio/Bookie/blob/78b15fc68ec7e7dc3ad0c4fa049ce670a304d419/bookie/models/auth.py#L341-L343 | ||
tp4a/teleport | 1fafd34f1f775d2cf80ea4af6e44468d8e0b24ad | server/www/packages/packages-linux/x64/ldap3/protocol/rfc2849.py | python | persistent_search_response_to_ldif | (change) | return ldif_lines[:-1] | [] | def persistent_search_response_to_ldif(change):
ldif_lines = ['# ' + datetime.now().isoformat()]
control = decode_persistent_search_control(change)
if control:
if control['changeNumber']:
ldif_lines.append('# change number: ' + str(control['changeNumber']))
ldif_lines.append(cont... | [
"def",
"persistent_search_response_to_ldif",
"(",
"change",
")",
":",
"ldif_lines",
"=",
"[",
"'# '",
"+",
"datetime",
".",
"now",
"(",
")",
".",
"isoformat",
"(",
")",
"]",
"control",
"=",
"decode_persistent_search_control",
"(",
"change",
")",
"if",
"control... | https://github.com/tp4a/teleport/blob/1fafd34f1f775d2cf80ea4af6e44468d8e0b24ad/server/www/packages/packages-linux/x64/ldap3/protocol/rfc2849.py#L283-L294 | |||
securityclippy/elasticintel | aa08d3e9f5ab1c000128e95161139ce97ff0e334 | ingest_feed_lambda/numpy/polynomial/chebyshev.py | python | _zseries_der | (zs) | return d | Differentiate a z-series.
The derivative is with respect to x, not z. This is achieved using the
chain rule and the value of dx/dz given in the module notes.
Parameters
----------
zs : z-series
The z-series to differentiate.
Returns
-------
derivative : z-series
The de... | Differentiate a z-series. | [
"Differentiate",
"a",
"z",
"-",
"series",
"."
] | def _zseries_der(zs):
"""Differentiate a z-series.
The derivative is with respect to x, not z. This is achieved using the
chain rule and the value of dx/dz given in the module notes.
Parameters
----------
zs : z-series
The z-series to differentiate.
Returns
-------
derivat... | [
"def",
"_zseries_der",
"(",
"zs",
")",
":",
"n",
"=",
"len",
"(",
"zs",
")",
"//",
"2",
"ns",
"=",
"np",
".",
"array",
"(",
"[",
"-",
"1",
",",
"0",
",",
"1",
"]",
",",
"dtype",
"=",
"zs",
".",
"dtype",
")",
"zs",
"*=",
"np",
".",
"arange... | https://github.com/securityclippy/elasticintel/blob/aa08d3e9f5ab1c000128e95161139ce97ff0e334/ingest_feed_lambda/numpy/polynomial/chebyshev.py#L258-L287 | |
udacity/ud330 | fc0cf20871b64bc252179e1a3cca17d0224de3d5 | Lesson3/step3/project.py | python | newRestaurant | () | [] | def newRestaurant():
if 'username' not in login_session:
return redirect('/login')
if request.method == 'POST':
newRestaurant = Restaurant(
name=request.form['name'], user_id=login_session['user_id'])
session.add(newRestaurant)
flash('New Restaurant %s Successfully Cr... | [
"def",
"newRestaurant",
"(",
")",
":",
"if",
"'username'",
"not",
"in",
"login_session",
":",
"return",
"redirect",
"(",
"'/login'",
")",
"if",
"request",
".",
"method",
"==",
"'POST'",
":",
"newRestaurant",
"=",
"Restaurant",
"(",
"name",
"=",
"request",
... | https://github.com/udacity/ud330/blob/fc0cf20871b64bc252179e1a3cca17d0224de3d5/Lesson3/step3/project.py#L225-L236 | ||||
pantsbuild/pex | 473c6ac732ed4bc338b4b20a9ec930d1d722c9b4 | pex/vendor/_vendored/pip/pip/_vendor/urllib3/contrib/_securetransport/low_level.py | python | _assert_no_error | (error, exception_class=None) | Checks the return code and throws an exception if there is an error to
report | Checks the return code and throws an exception if there is an error to
report | [
"Checks",
"the",
"return",
"code",
"and",
"throws",
"an",
"exception",
"if",
"there",
"is",
"an",
"error",
"to",
"report"
] | def _assert_no_error(error, exception_class=None):
"""
Checks the return code and throws an exception if there is an error to
report
"""
if error == 0:
return
cf_error_string = Security.SecCopyErrorMessageString(error, None)
output = _cf_string_to_unicode(cf_error_string)
CoreFo... | [
"def",
"_assert_no_error",
"(",
"error",
",",
"exception_class",
"=",
"None",
")",
":",
"if",
"error",
"==",
"0",
":",
"return",
"cf_error_string",
"=",
"Security",
".",
"SecCopyErrorMessageString",
"(",
"error",
",",
"None",
")",
"output",
"=",
"_cf_string_to... | https://github.com/pantsbuild/pex/blob/473c6ac732ed4bc338b4b20a9ec930d1d722c9b4/pex/vendor/_vendored/pip/pip/_vendor/urllib3/contrib/_securetransport/low_level.py#L129-L147 | ||
lisa-lab/pylearn2 | af81e5c362f0df4df85c3e54e23b2adeec026055 | pylearn2/utils/datasets.py | python | BatchIterator.__iter__ | (self) | Generator function to iterate through all minibatches | Generator function to iterate through all minibatches | [
"Generator",
"function",
"to",
"iterate",
"through",
"all",
"minibatches"
] | def __iter__(self):
"""Generator function to iterate through all minibatches"""
counter = [0, 0, 0]
for chosen in self.permut:
# Retrieve minibatch from chosen set
index = counter[chosen]
minibatch = self.dataset[chosen][
index * self.batch_siz... | [
"def",
"__iter__",
"(",
"self",
")",
":",
"counter",
"=",
"[",
"0",
",",
"0",
",",
"0",
"]",
"for",
"chosen",
"in",
"self",
".",
"permut",
":",
"# Retrieve minibatch from chosen set",
"index",
"=",
"counter",
"[",
"chosen",
"]",
"minibatch",
"=",
"self",... | https://github.com/lisa-lab/pylearn2/blob/af81e5c362f0df4df85c3e54e23b2adeec026055/pylearn2/utils/datasets.py#L231-L243 | ||
zhl2008/awd-platform | 0416b31abea29743387b10b3914581fbe8e7da5e | web_flaskbb/lib/python2.7/site-packages/sqlalchemy/dialects/mssql/base.py | python | MSDialect.get_foreign_keys | (self, connection, tablename,
dbname, owner, schema, **kw) | return list(fkeys.values()) | [] | def get_foreign_keys(self, connection, tablename,
dbname, owner, schema, **kw):
RR = ischema.ref_constraints
C = ischema.key_constraints.alias('C')
R = ischema.key_constraints.alias('R')
# Foreign key constraints
s = sql.select([C.c.column_name,
... | [
"def",
"get_foreign_keys",
"(",
"self",
",",
"connection",
",",
"tablename",
",",
"dbname",
",",
"owner",
",",
"schema",
",",
"*",
"*",
"kw",
")",
":",
"RR",
"=",
"ischema",
".",
"ref_constraints",
"C",
"=",
"ischema",
".",
"key_constraints",
".",
"alias... | https://github.com/zhl2008/awd-platform/blob/0416b31abea29743387b10b3914581fbe8e7da5e/web_flaskbb/lib/python2.7/site-packages/sqlalchemy/dialects/mssql/base.py#L2230-L2287 | |||
qutebrowser/qutebrowser | 3a2aaaacbf97f4bf0c72463f3da94ed2822a5442 | qutebrowser/browser/qutescheme.py | python | qute_pdfjs | (url: QUrl) | Handler for qute://pdfjs.
Return the pdf.js viewer or redirect to original URL if the file does not
exist. | Handler for qute://pdfjs. | [
"Handler",
"for",
"qute",
":",
"//",
"pdfjs",
"."
] | def qute_pdfjs(url: QUrl) -> _HandlerRet:
"""Handler for qute://pdfjs.
Return the pdf.js viewer or redirect to original URL if the file does not
exist.
"""
if url.path() == '/file':
filename = QUrlQuery(url).queryItemValue('filename')
if not filename:
raise UrlInvalidErr... | [
"def",
"qute_pdfjs",
"(",
"url",
":",
"QUrl",
")",
"->",
"_HandlerRet",
":",
"if",
"url",
".",
"path",
"(",
")",
"==",
"'/file'",
":",
"filename",
"=",
"QUrlQuery",
"(",
"url",
")",
".",
"queryItemValue",
"(",
"'filename'",
")",
"if",
"not",
"filename"... | https://github.com/qutebrowser/qutebrowser/blob/3a2aaaacbf97f4bf0c72463f3da94ed2822a5442/qutebrowser/browser/qutescheme.py#L523-L570 | ||
adamrehn/ue4cli | 25e3f31830494141bb3bdb11a8d52d5c8d8d64ef | ue4cli/UnrealManagerWindows.py | python | UnrealManagerWindows._editorPathSuffix | (self, cmdVersion) | return '-Cmd.exe' if cmdVersion == True else '.exe' | [] | def _editorPathSuffix(self, cmdVersion):
return '-Cmd.exe' if cmdVersion == True else '.exe' | [
"def",
"_editorPathSuffix",
"(",
"self",
",",
"cmdVersion",
")",
":",
"return",
"'-Cmd.exe'",
"if",
"cmdVersion",
"==",
"True",
"else",
"'.exe'"
] | https://github.com/adamrehn/ue4cli/blob/25e3f31830494141bb3bdb11a8d52d5c8d8d64ef/ue4cli/UnrealManagerWindows.py#L75-L76 | |||
inkandswitch/livebook | 93c8d467734787366ad084fc3566bf5cbe249c51 | public/pypyjs/modules/numpy/ma/core.py | python | _MaskedUnaryOperation.__call__ | (self, a, *args, **kwargs) | return masked_result | Execute the call behavior. | Execute the call behavior. | [
"Execute",
"the",
"call",
"behavior",
"."
] | def __call__(self, a, *args, **kwargs):
"""
Execute the call behavior.
"""
d = getdata(a)
# Deal with domain
if self.domain is not None:
# Case 1.1. : Domained function
with np.errstate(divide='ignore', invalid='ignore'):
result = ... | [
"def",
"__call__",
"(",
"self",
",",
"a",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"d",
"=",
"getdata",
"(",
"a",
")",
"# Deal with domain",
"if",
"self",
".",
"domain",
"is",
"not",
"None",
":",
"# Case 1.1. : Domained function",
"with",
"... | https://github.com/inkandswitch/livebook/blob/93c8d467734787366ad084fc3566bf5cbe249c51/public/pypyjs/modules/numpy/ma/core.py#L866-L909 | |
gprMax/gprMax | 2d5926aa1f70b96ade2bbe4e99c8190d6d60f66d | gprMax/input_cmd_funcs.py | python | edge | (xs, ys, zs, xf, yf, zf, material, rotate90origin=()) | return s, f | Prints the gprMax #edge command.
Args:
xs, ys, zs, xf, yf, zf (float): Start and finish coordinates.
material (str): Material identifier.
rotate90origin (tuple): x, y origin for 90 degree CCW rotation in x-y plane.
Returns:
s, f (tuple): 2 namedtuple Coordinate for the start an... | Prints the gprMax #edge command. | [
"Prints",
"the",
"gprMax",
"#edge",
"command",
"."
] | def edge(xs, ys, zs, xf, yf, zf, material, rotate90origin=()):
"""Prints the gprMax #edge command.
Args:
xs, ys, zs, xf, yf, zf (float): Start and finish coordinates.
material (str): Material identifier.
rotate90origin (tuple): x, y origin for 90 degree CCW rotation in x-y plane.
R... | [
"def",
"edge",
"(",
"xs",
",",
"ys",
",",
"zs",
",",
"xf",
",",
"yf",
",",
"zf",
",",
"material",
",",
"rotate90origin",
"=",
"(",
")",
")",
":",
"if",
"rotate90origin",
":",
"if",
"xs",
"==",
"xf",
":",
"polarisation",
"=",
"'y'",
"else",
":",
... | https://github.com/gprMax/gprMax/blob/2d5926aa1f70b96ade2bbe4e99c8190d6d60f66d/gprMax/input_cmd_funcs.py#L273-L296 | |
uber-research/learning-to-reweight-examples | 0b616c99ecf8a1c99925322167694272a966ed00 | cifar/cifar_train.py | python | _get_data_inputs | (bsize, seed=0) | return Datasets() | Gets data input tensors. | Gets data input tensors. | [
"Gets",
"data",
"input",
"tensors",
"."
] | def _get_data_inputs(bsize, seed=0):
"""Gets data input tensors."""
# Compute the dataset directory for this experiment.
data_name = FLAGS.dataset
data_dir = os.path.join(FLAGS.data_root, data_name)
print(data_dir)
log.info('Building dataset')
trn_data = _get_data_input(data_name, data_dir,... | [
"def",
"_get_data_inputs",
"(",
"bsize",
",",
"seed",
"=",
"0",
")",
":",
"# Compute the dataset directory for this experiment.",
"data_name",
"=",
"FLAGS",
".",
"dataset",
"data_dir",
"=",
"os",
".",
"path",
".",
"join",
"(",
"FLAGS",
".",
"data_root",
",",
"... | https://github.com/uber-research/learning-to-reweight-examples/blob/0b616c99ecf8a1c99925322167694272a966ed00/cifar/cifar_train.py#L136-L153 | |
shiyanhui/FileHeader | f347cc134021fb0b710694b71c57742476f5fd2b | jinja2/environment.py | python | Environment.lex | (self, source, name=None, filename=None) | Lex the given sourcecode and return a generator that yields
tokens as tuples in the form ``(lineno, token_type, value)``.
This can be useful for :ref:`extension development <writing-extensions>`
and debugging templates.
This does not perform preprocessing. If you want the preprocessing... | Lex the given sourcecode and return a generator that yields
tokens as tuples in the form ``(lineno, token_type, value)``.
This can be useful for :ref:`extension development <writing-extensions>`
and debugging templates. | [
"Lex",
"the",
"given",
"sourcecode",
"and",
"return",
"a",
"generator",
"that",
"yields",
"tokens",
"as",
"tuples",
"in",
"the",
"form",
"(",
"lineno",
"token_type",
"value",
")",
".",
"This",
"can",
"be",
"useful",
"for",
":",
"ref",
":",
"extension",
"... | def lex(self, source, name=None, filename=None):
"""Lex the given sourcecode and return a generator that yields
tokens as tuples in the form ``(lineno, token_type, value)``.
This can be useful for :ref:`extension development <writing-extensions>`
and debugging templates.
This do... | [
"def",
"lex",
"(",
"self",
",",
"source",
",",
"name",
"=",
"None",
",",
"filename",
"=",
"None",
")",
":",
"source",
"=",
"text_type",
"(",
"source",
")",
"try",
":",
"return",
"self",
".",
"lexer",
".",
"tokeniter",
"(",
"source",
",",
"name",
",... | https://github.com/shiyanhui/FileHeader/blob/f347cc134021fb0b710694b71c57742476f5fd2b/jinja2/environment.py#L461-L476 | ||
Ultimaker/Uranium | 66da853cd9a04edd3a8a03526fac81e83c03f5aa | UM/Qt/ListModel.py | python | ListModel.sort | (self, fun: Callable[[Any], float]) | Sort the list.
:param fun: The callable to use for determining the sort key. | Sort the list. | [
"Sort",
"the",
"list",
"."
] | def sort(self, fun: Callable[[Any], float]) -> None:
"""Sort the list.
:param fun: The callable to use for determining the sort key.
"""
self.beginResetModel()
self._items.sort(key = fun)
self.endResetModel() | [
"def",
"sort",
"(",
"self",
",",
"fun",
":",
"Callable",
"[",
"[",
"Any",
"]",
",",
"float",
"]",
")",
"->",
"None",
":",
"self",
".",
"beginResetModel",
"(",
")",
"self",
".",
"_items",
".",
"sort",
"(",
"key",
"=",
"fun",
")",
"self",
".",
"e... | https://github.com/Ultimaker/Uranium/blob/66da853cd9a04edd3a8a03526fac81e83c03f5aa/UM/Qt/ListModel.py#L164-L172 | ||
bruderstein/PythonScript | df9f7071ddf3a079e3a301b9b53a6dc78cf1208f | PythonLib/full/concurrent/futures/_base.py | python | Future.running | (self) | Return True if the future is currently executing. | Return True if the future is currently executing. | [
"Return",
"True",
"if",
"the",
"future",
"is",
"currently",
"executing",
"."
] | def running(self):
"""Return True if the future is currently executing."""
with self._condition:
return self._state == RUNNING | [
"def",
"running",
"(",
"self",
")",
":",
"with",
"self",
".",
"_condition",
":",
"return",
"self",
".",
"_state",
"==",
"RUNNING"
] | https://github.com/bruderstein/PythonScript/blob/df9f7071ddf3a079e3a301b9b53a6dc78cf1208f/PythonLib/full/concurrent/futures/_base.py#L377-L380 | ||
zhufz/nlp_research | b435319858520edcca7c0320dca3e0013087c276 | language_model/bert/run_classifier.py | python | XnliProcessor.get_dev_examples | (self, data_dir) | return examples | See base class. | See base class. | [
"See",
"base",
"class",
"."
] | def get_dev_examples(self, data_dir):
"""See base class."""
lines = self._read_tsv(os.path.join(data_dir, "xnli.dev.tsv"))
examples = []
for (i, line) in enumerate(lines):
if i == 0:
continue
guid = "dev-%d" % (i)
language = tokenization.convert_to_unicode(line[0])
if lan... | [
"def",
"get_dev_examples",
"(",
"self",
",",
"data_dir",
")",
":",
"lines",
"=",
"self",
".",
"_read_tsv",
"(",
"os",
".",
"path",
".",
"join",
"(",
"data_dir",
",",
"\"xnli.dev.tsv\"",
")",
")",
"examples",
"=",
"[",
"]",
"for",
"(",
"i",
",",
"line... | https://github.com/zhufz/nlp_research/blob/b435319858520edcca7c0320dca3e0013087c276/language_model/bert/run_classifier.py#L232-L248 | |
OpenCobolIDE/OpenCobolIDE | c78d0d335378e5fe0a5e74f53c19b68b55e85388 | open_cobol_ide/extlibs/future/backports/email/feedparser.py | python | FeedParser._pop_message | (self) | return retval | [] | def _pop_message(self):
retval = self._msgstack.pop()
if self._msgstack:
self._cur = self._msgstack[-1]
else:
self._cur = None
return retval | [
"def",
"_pop_message",
"(",
"self",
")",
":",
"retval",
"=",
"self",
".",
"_msgstack",
".",
"pop",
"(",
")",
"if",
"self",
".",
"_msgstack",
":",
"self",
".",
"_cur",
"=",
"self",
".",
"_msgstack",
"[",
"-",
"1",
"]",
"else",
":",
"self",
".",
"_... | https://github.com/OpenCobolIDE/OpenCobolIDE/blob/c78d0d335378e5fe0a5e74f53c19b68b55e85388/open_cobol_ide/extlibs/future/backports/email/feedparser.py#L208-L214 | |||
joxeankoret/diaphora | dcb5a25ac9fe23a285b657e5389cf770de7ac928 | pygments/lexers/__init__.py | python | find_lexer_class | (name) | Lookup a lexer class by name.
Return None if not found. | Lookup a lexer class by name. | [
"Lookup",
"a",
"lexer",
"class",
"by",
"name",
"."
] | def find_lexer_class(name):
"""Lookup a lexer class by name.
Return None if not found.
"""
if name in _lexer_cache:
return _lexer_cache[name]
# lookup builtin lexers
for module_name, lname, aliases, _, _ in itervalues(LEXERS):
if name == lname:
_load_lexers(module_na... | [
"def",
"find_lexer_class",
"(",
"name",
")",
":",
"if",
"name",
"in",
"_lexer_cache",
":",
"return",
"_lexer_cache",
"[",
"name",
"]",
"# lookup builtin lexers",
"for",
"module_name",
",",
"lname",
",",
"aliases",
",",
"_",
",",
"_",
"in",
"itervalues",
"(",... | https://github.com/joxeankoret/diaphora/blob/dcb5a25ac9fe23a285b657e5389cf770de7ac928/pygments/lexers/__init__.py#L57-L72 | ||
TencentCloud/tencentcloud-sdk-python | 3677fd1cdc8c5fd626ce001c13fd3b59d1f279d2 | tencentcloud/waf/v20180125/waf_client.py | python | WafClient.CreateAccessExport | (self, request) | 本接口用于创建访问日志导出
:param request: Request instance for CreateAccessExport.
:type request: :class:`tencentcloud.waf.v20180125.models.CreateAccessExportRequest`
:rtype: :class:`tencentcloud.waf.v20180125.models.CreateAccessExportResponse` | 本接口用于创建访问日志导出 | [
"本接口用于创建访问日志导出"
] | def CreateAccessExport(self, request):
"""本接口用于创建访问日志导出
:param request: Request instance for CreateAccessExport.
:type request: :class:`tencentcloud.waf.v20180125.models.CreateAccessExportRequest`
:rtype: :class:`tencentcloud.waf.v20180125.models.CreateAccessExportResponse`
"""... | [
"def",
"CreateAccessExport",
"(",
"self",
",",
"request",
")",
":",
"try",
":",
"params",
"=",
"request",
".",
"_serialize",
"(",
")",
"body",
"=",
"self",
".",
"call",
"(",
"\"CreateAccessExport\"",
",",
"params",
")",
"response",
"=",
"json",
".",
"loa... | https://github.com/TencentCloud/tencentcloud-sdk-python/blob/3677fd1cdc8c5fd626ce001c13fd3b59d1f279d2/tencentcloud/waf/v20180125/waf_client.py#L57-L82 | ||
datamllab/rlcard | c21ea82519c453a42e3bdc6848bd3356e9b6ac43 | rlcard/games/gin_rummy/dealer.py | python | GinRummyDealer.deal_cards | (self, player: GinRummyPlayer, num: int) | Deal some cards from stock_pile to one player
Args:
player (GinRummyPlayer): The GinRummyPlayer object
num (int): The number of cards to be dealt | Deal some cards from stock_pile to one player | [
"Deal",
"some",
"cards",
"from",
"stock_pile",
"to",
"one",
"player"
] | def deal_cards(self, player: GinRummyPlayer, num: int):
''' Deal some cards from stock_pile to one player
Args:
player (GinRummyPlayer): The GinRummyPlayer object
num (int): The number of cards to be dealt
'''
for _ in range(num):
player.hand.append(s... | [
"def",
"deal_cards",
"(",
"self",
",",
"player",
":",
"GinRummyPlayer",
",",
"num",
":",
"int",
")",
":",
"for",
"_",
"in",
"range",
"(",
"num",
")",
":",
"player",
".",
"hand",
".",
"append",
"(",
"self",
".",
"stock_pile",
".",
"pop",
"(",
")",
... | https://github.com/datamllab/rlcard/blob/c21ea82519c453a42e3bdc6848bd3356e9b6ac43/rlcard/games/gin_rummy/dealer.py#L23-L32 | ||
Lawouach/WebSocket-for-Python | a3e6d157b7bb1da1009e66aa750170f1c07aa143 | ws4py/server/wsgirefserver.py | python | WSGIServer.server_close | (self) | Properly initiate closing handshakes on
all websockets when the WSGI server terminates. | Properly initiate closing handshakes on
all websockets when the WSGI server terminates. | [
"Properly",
"initiate",
"closing",
"handshakes",
"on",
"all",
"websockets",
"when",
"the",
"WSGI",
"server",
"terminates",
"."
] | def server_close(self):
"""
Properly initiate closing handshakes on
all websockets when the WSGI server terminates.
"""
if hasattr(self, 'manager'):
self.manager.close_all()
self.manager.stop()
self.manager.join()
delattr(self, 'man... | [
"def",
"server_close",
"(",
"self",
")",
":",
"if",
"hasattr",
"(",
"self",
",",
"'manager'",
")",
":",
"self",
".",
"manager",
".",
"close_all",
"(",
")",
"self",
".",
"manager",
".",
"stop",
"(",
")",
"self",
".",
"manager",
".",
"join",
"(",
")"... | https://github.com/Lawouach/WebSocket-for-Python/blob/a3e6d157b7bb1da1009e66aa750170f1c07aa143/ws4py/server/wsgirefserver.py#L131-L141 | ||
JiYou/openstack | 8607dd488bde0905044b303eb6e52bdea6806923 | packages/source/quantum/quantum/openstack/common/log.py | python | LegacyFormatter.format | (self, record) | return logging.Formatter.format(self, record) | Uses contextstring if request_id is set, otherwise default. | Uses contextstring if request_id is set, otherwise default. | [
"Uses",
"contextstring",
"if",
"request_id",
"is",
"set",
"otherwise",
"default",
"."
] | def format(self, record):
"""Uses contextstring if request_id is set, otherwise default."""
# NOTE(sdague): default the fancier formating params
# to an empty string so we don't throw an exception if
# they get used
for key in ('instance', 'color'):
if key not in reco... | [
"def",
"format",
"(",
"self",
",",
"record",
")",
":",
"# NOTE(sdague): default the fancier formating params",
"# to an empty string so we don't throw an exception if",
"# they get used",
"for",
"key",
"in",
"(",
"'instance'",
",",
"'color'",
")",
":",
"if",
"key",
"not",... | https://github.com/JiYou/openstack/blob/8607dd488bde0905044b303eb6e52bdea6806923/packages/source/quantum/quantum/openstack/common/log.py#L458-L479 | |
leo-editor/leo-editor | 383d6776d135ef17d73d935a2f0ecb3ac0e99494 | leo/plugins/backlink.py | python | backlinkController.updateTab | (self, tag, k) | called by leo select position hook | called by leo select position hook | [
"called",
"by",
"leo",
"select",
"position",
"hook"
] | def updateTab(self, tag, k):
"""called by leo select position hook"""
if k['c'] != self.c:
return # not our problem
self.updateTabInt() | [
"def",
"updateTab",
"(",
"self",
",",
"tag",
",",
"k",
")",
":",
"if",
"k",
"[",
"'c'",
"]",
"!=",
"self",
".",
"c",
":",
"return",
"# not our problem",
"self",
".",
"updateTabInt",
"(",
")"
] | https://github.com/leo-editor/leo-editor/blob/383d6776d135ef17d73d935a2f0ecb3ac0e99494/leo/plugins/backlink.py#L603-L608 | ||
AppScale/gts | 46f909cf5dc5ba81faf9d81dc9af598dcf8a82a9 | AppServer/lib/django-1.5/django/contrib/gis/geos/geometry.py | python | GEOSGeometry.__repr__ | (self) | return '<%s object at %s>' % (self.geom_type, hex(addressof(self.ptr))) | Short-hand representation because WKT may be very large. | Short-hand representation because WKT may be very large. | [
"Short",
"-",
"hand",
"representation",
"because",
"WKT",
"may",
"be",
"very",
"large",
"."
] | def __repr__(self):
"Short-hand representation because WKT may be very large."
return '<%s object at %s>' % (self.geom_type, hex(addressof(self.ptr))) | [
"def",
"__repr__",
"(",
"self",
")",
":",
"return",
"'<%s object at %s>'",
"%",
"(",
"self",
".",
"geom_type",
",",
"hex",
"(",
"addressof",
"(",
"self",
".",
"ptr",
")",
")",
")"
] | https://github.com/AppScale/gts/blob/46f909cf5dc5ba81faf9d81dc9af598dcf8a82a9/AppServer/lib/django-1.5/django/contrib/gis/geos/geometry.py#L137-L139 | |
home-assistant/core | 265ebd17a3f17ed8dc1e9bdede03ac8e323f1ab1 | homeassistant/components/qwikswitch/__init__.py | python | async_setup | (hass: HomeAssistant, config: ConfigType) | return True | Qwiskswitch component setup. | Qwiskswitch component setup. | [
"Qwiskswitch",
"component",
"setup",
"."
] | async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Qwiskswitch component setup."""
# Add cmd's to in /&listen packets will fire events
# By default only buttons of type [TOGGLE,SCENE EXE,LEVEL]
cmd_buttons = set(CMD_BUTTONS)
for btn in config[DOMAIN][CONF_BUTTON_EVENTS]:
... | [
"async",
"def",
"async_setup",
"(",
"hass",
":",
"HomeAssistant",
",",
"config",
":",
"ConfigType",
")",
"->",
"bool",
":",
"# Add cmd's to in /&listen packets will fire events",
"# By default only buttons of type [TOGGLE,SCENE EXE,LEVEL]",
"cmd_buttons",
"=",
"set",
"(",
"... | https://github.com/home-assistant/core/blob/265ebd17a3f17ed8dc1e9bdede03ac8e323f1ab1/homeassistant/components/qwikswitch/__init__.py#L137-L244 | |
missionpinball/mpf | 8e6b74cff4ba06d2fec9445742559c1068b88582 | mpf/platforms/fast/fast_gi.py | python | FASTGIString.is_successor_of | (self, other) | Return true if the other light has the previous number. | Return true if the other light has the previous number. | [
"Return",
"true",
"if",
"the",
"other",
"light",
"has",
"the",
"previous",
"number",
"."
] | def is_successor_of(self, other):
"""Return true if the other light has the previous number."""
raise AssertionError("Not possible in FASTGI.") | [
"def",
"is_successor_of",
"(",
"self",
",",
"other",
")",
":",
"raise",
"AssertionError",
"(",
"\"Not possible in FASTGI.\"",
")"
] | https://github.com/missionpinball/mpf/blob/8e6b74cff4ba06d2fec9445742559c1068b88582/mpf/platforms/fast/fast_gi.py#L36-L38 | ||
sc0tfree/mentalist | 953a07bedf8842c817f0825d3cd0c6e6ce1d3e7f | mentalist/model.py | python | Chain.get_words | (self, basewords_only=False) | A generator that yields the chain's words | A generator that yields the chain's words | [
"A",
"generator",
"that",
"yields",
"the",
"chain",
"s",
"words"
] | def get_words(self, basewords_only=False):
'''A generator that yields the chain's words
'''
for attr in self.nodes[0].attrs:
attr.words_read = 0
if basewords_only:
for word in self.nodes[0].get_words([]):
yield word
else:
... | [
"def",
"get_words",
"(",
"self",
",",
"basewords_only",
"=",
"False",
")",
":",
"for",
"attr",
"in",
"self",
".",
"nodes",
"[",
"0",
"]",
".",
"attrs",
":",
"attr",
".",
"words_read",
"=",
"0",
"if",
"basewords_only",
":",
"for",
"word",
"in",
"self"... | https://github.com/sc0tfree/mentalist/blob/953a07bedf8842c817f0825d3cd0c6e6ce1d3e7f/mentalist/model.py#L115-L129 | ||
pyparallel/pyparallel | 11e8c6072d48c8f13641925d17b147bf36ee0ba3 | Lib/site-packages/pip-7.1.2-py3.3.egg/pip/utils/ui.py | python | InterruptibleMixin.finish | (self) | Restore the original SIGINT handler after finishing.
This should happen regardless of whether the progress display finishes
normally, or gets interrupted. | Restore the original SIGINT handler after finishing. | [
"Restore",
"the",
"original",
"SIGINT",
"handler",
"after",
"finishing",
"."
] | def finish(self):
"""
Restore the original SIGINT handler after finishing.
This should happen regardless of whether the progress display finishes
normally, or gets interrupted.
"""
super(InterruptibleMixin, self).finish()
signal(SIGINT, self.original_handler) | [
"def",
"finish",
"(",
"self",
")",
":",
"super",
"(",
"InterruptibleMixin",
",",
"self",
")",
".",
"finish",
"(",
")",
"signal",
"(",
"SIGINT",
",",
"self",
".",
"original_handler",
")"
] | https://github.com/pyparallel/pyparallel/blob/11e8c6072d48c8f13641925d17b147bf36ee0ba3/Lib/site-packages/pip-7.1.2-py3.3.egg/pip/utils/ui.py#L88-L96 | ||
pwnieexpress/pwn_plug_sources | 1a23324f5dc2c3de20f9c810269b6a29b2758cad | src/set/src/core/scapy.py | python | ScapyFreqFilter.filter | (self, record) | return 1 | [] | def filter(self, record):
wt = conf.warning_threshold
if wt > 0:
stk = traceback.extract_stack()
caller=None
for f,l,n,c in stk:
if n == 'warning':
break
caller = l
tm,nb = self.warning_table.get(... | [
"def",
"filter",
"(",
"self",
",",
"record",
")",
":",
"wt",
"=",
"conf",
".",
"warning_threshold",
"if",
"wt",
">",
"0",
":",
"stk",
"=",
"traceback",
".",
"extract_stack",
"(",
")",
"caller",
"=",
"None",
"for",
"f",
",",
"l",
",",
"n",
",",
"c... | https://github.com/pwnieexpress/pwn_plug_sources/blob/1a23324f5dc2c3de20f9c810269b6a29b2758cad/src/set/src/core/scapy.py#L54-L76 | |||
HuangYG123/CurricularFace | 68c8727fb7cd2243ecbfd7e09c35efc87c6e2de4 | backbone/model_irse.py | python | Backbone.forward | (self, x) | return x, conv_out | [] | def forward(self, x):
x = self.input_layer(x)
x = self.body(x)
conv_out = x.view(x.shape[0], -1)
x = self.output_layer(x)
return x, conv_out | [
"def",
"forward",
"(",
"self",
",",
"x",
")",
":",
"x",
"=",
"self",
".",
"input_layer",
"(",
"x",
")",
"x",
"=",
"self",
".",
"body",
"(",
"x",
")",
"conv_out",
"=",
"x",
".",
"view",
"(",
"x",
".",
"shape",
"[",
"0",
"]",
",",
"-",
"1",
... | https://github.com/HuangYG123/CurricularFace/blob/68c8727fb7cd2243ecbfd7e09c35efc87c6e2de4/backbone/model_irse.py#L169-L175 | |||
pyvisa/pyvisa | ae8c8b1180851ee4d120bc3527923c944b9623d6 | pyvisa/ctwrapper/functions.py | python | gpib_command | (library, session, data) | return return_count.value, ret | Write GPIB command bytes on the bus.
Corresponds to viGpibCommand function of the VISA library.
Parameters
----------
library : ctypes.WinDLL or ctypes.CDLL
ctypes wrapped library.
session : VISASession
Unique logical identifier to a session.
data : bytes
Data to write.... | Write GPIB command bytes on the bus. | [
"Write",
"GPIB",
"command",
"bytes",
"on",
"the",
"bus",
"."
] | def gpib_command(library, session, data):
"""Write GPIB command bytes on the bus.
Corresponds to viGpibCommand function of the VISA library.
Parameters
----------
library : ctypes.WinDLL or ctypes.CDLL
ctypes wrapped library.
session : VISASession
Unique logical identifier to a... | [
"def",
"gpib_command",
"(",
"library",
",",
"session",
",",
"data",
")",
":",
"return_count",
"=",
"ViUInt32",
"(",
")",
"# [ViSession, ViBuf, ViUInt32, ViPUInt32]",
"ret",
"=",
"library",
".",
"viGpibCommand",
"(",
"session",
",",
"data",
",",
"len",
"(",
"da... | https://github.com/pyvisa/pyvisa/blob/ae8c8b1180851ee4d120bc3527923c944b9623d6/pyvisa/ctwrapper/functions.py#L859-L885 | |
out0fmemory/GoAgent-Always-Available | c4254984fea633ce3d1893fe5901debd9f22c2a9 | server/lib/google/appengine/api/logservice/logservice.py | python | _LogsDequeBuffer._flush | (self) | Internal version of flush() with no locking. | Internal version of flush() with no locking. | [
"Internal",
"version",
"of",
"flush",
"()",
"with",
"no",
"locking",
"."
] | def _flush(self):
"""Internal version of flush() with no locking."""
records_to_be_flushed = []
try:
while True:
group = log_service_pb.UserAppLogGroup()
bytes_left = self._MAX_FLUSH_SIZE
while self._buffer:
record = self._get_record()
if record.IsBlank():
... | [
"def",
"_flush",
"(",
"self",
")",
":",
"records_to_be_flushed",
"=",
"[",
"]",
"try",
":",
"while",
"True",
":",
"group",
"=",
"log_service_pb",
".",
"UserAppLogGroup",
"(",
")",
"bytes_left",
"=",
"self",
".",
"_MAX_FLUSH_SIZE",
"while",
"self",
".",
"_b... | https://github.com/out0fmemory/GoAgent-Always-Available/blob/c4254984fea633ce3d1893fe5901debd9f22c2a9/server/lib/google/appengine/api/logservice/logservice.py#L347-L408 | ||
jeromerony/fast_adversarial | 45210b7c79e2deaeac9845d6c901dc2580d6e316 | fast_adv/models/cifar10/wide_resnet.py | python | WideResNet.__init__ | (self, depth, num_classes, widen_factor=1, dropRate=0.0) | [] | def __init__(self, depth, num_classes, widen_factor=1, dropRate=0.0):
super(WideResNet, self).__init__()
nChannels = [16, 16 * widen_factor, 32 * widen_factor, 64 * widen_factor]
assert (depth - 4) % 6 == 0, 'depth should be 6n+4'
n = (depth - 4) // 6
block = BasicBlock
#... | [
"def",
"__init__",
"(",
"self",
",",
"depth",
",",
"num_classes",
",",
"widen_factor",
"=",
"1",
",",
"dropRate",
"=",
"0.0",
")",
":",
"super",
"(",
"WideResNet",
",",
"self",
")",
".",
"__init__",
"(",
")",
"nChannels",
"=",
"[",
"16",
",",
"16",
... | https://github.com/jeromerony/fast_adversarial/blob/45210b7c79e2deaeac9845d6c901dc2580d6e316/fast_adv/models/cifar10/wide_resnet.py#L53-L82 | ||||
klen/graphite-beacon | c1f071e9f557693bc90f6acbc314994985dc3b77 | graphite_beacon/handlers/telegram.py | python | TelegramHandler.get_message | (self, level, alert, value, **kwargs) | return generated.decode().strip() | Standart alert message. Same format across all
graphite-beacon handlers. | Standart alert message. Same format across all
graphite-beacon handlers. | [
"Standart",
"alert",
"message",
".",
"Same",
"format",
"across",
"all",
"graphite",
"-",
"beacon",
"handlers",
"."
] | def get_message(self, level, alert, value, **kwargs):
"""Standart alert message. Same format across all
graphite-beacon handlers.
"""
target, ntype = kwargs.get('target'), kwargs.get('ntype')
msg_type = 'telegram' if ntype == 'graphite' else 'short'
tmpl = TEMPLATES[ntyp... | [
"def",
"get_message",
"(",
"self",
",",
"level",
",",
"alert",
",",
"value",
",",
"*",
"*",
"kwargs",
")",
":",
"target",
",",
"ntype",
"=",
"kwargs",
".",
"get",
"(",
"'target'",
")",
",",
"kwargs",
".",
"get",
"(",
"'ntype'",
")",
"msg_type",
"="... | https://github.com/klen/graphite-beacon/blob/c1f071e9f557693bc90f6acbc314994985dc3b77/graphite_beacon/handlers/telegram.py#L160-L171 | |
649453932/Bert-Chinese-Text-Classification-Pytorch | 050a7b0dc75d8a2d7fd526002c4642d5329a0c27 | pytorch_pretrained/tokenization.py | python | whitespace_tokenize | (text) | return tokens | Runs basic whitespace cleaning and splitting on a piece of text. | Runs basic whitespace cleaning and splitting on a piece of text. | [
"Runs",
"basic",
"whitespace",
"cleaning",
"and",
"splitting",
"on",
"a",
"piece",
"of",
"text",
"."
] | def whitespace_tokenize(text):
"""Runs basic whitespace cleaning and splitting on a piece of text."""
text = text.strip()
if not text:
return []
tokens = text.split()
return tokens | [
"def",
"whitespace_tokenize",
"(",
"text",
")",
":",
"text",
"=",
"text",
".",
"strip",
"(",
")",
"if",
"not",
"text",
":",
"return",
"[",
"]",
"tokens",
"=",
"text",
".",
"split",
"(",
")",
"return",
"tokens"
] | https://github.com/649453932/Bert-Chinese-Text-Classification-Pytorch/blob/050a7b0dc75d8a2d7fd526002c4642d5329a0c27/pytorch_pretrained/tokenization.py#L65-L71 | |
graphcore/examples | 46d2b7687b829778369fc6328170a7b14761e5c6 | applications/tensorflow2/unet/losses.py | python | dice_ce_loss | (y_true, y_pred) | return ce + dice_loss | Calculate the combined loss. | Calculate the combined loss. | [
"Calculate",
"the",
"combined",
"loss",
"."
] | def dice_ce_loss(y_true, y_pred):
"""Calculate the combined loss."""
ce = ce_loss(y_true, y_pred)
dice_loss = dice_coef_loss_fn(y_true, y_pred)
return ce + dice_loss | [
"def",
"dice_ce_loss",
"(",
"y_true",
",",
"y_pred",
")",
":",
"ce",
"=",
"ce_loss",
"(",
"y_true",
",",
"y_pred",
")",
"dice_loss",
"=",
"dice_coef_loss_fn",
"(",
"y_true",
",",
"y_pred",
")",
"return",
"ce",
"+",
"dice_loss"
] | https://github.com/graphcore/examples/blob/46d2b7687b829778369fc6328170a7b14761e5c6/applications/tensorflow2/unet/losses.py#L61-L65 | |
mchristopher/PokemonGo-DesktopMap | ec37575f2776ee7d64456e2a1f6b6b78830b4fe0 | app/pywin/Lib/rfc822.py | python | AddrlistClass.getquote | (self) | return self.getdelimited('"', '"\r', 0) | Get a quote-delimited fragment from self's field. | Get a quote-delimited fragment from self's field. | [
"Get",
"a",
"quote",
"-",
"delimited",
"fragment",
"from",
"self",
"s",
"field",
"."
] | def getquote(self):
"""Get a quote-delimited fragment from self's field."""
return self.getdelimited('"', '"\r', 0) | [
"def",
"getquote",
"(",
"self",
")",
":",
"return",
"self",
".",
"getdelimited",
"(",
"'\"'",
",",
"'\"\\r'",
",",
"0",
")"
] | https://github.com/mchristopher/PokemonGo-DesktopMap/blob/ec37575f2776ee7d64456e2a1f6b6b78830b4fe0/app/pywin/Lib/rfc822.py#L721-L723 | |
ghostop14/sparrow-wifi | 4b8289773ea4304872062f65a6ffc9352612b08e | sparrow-wifi.py | python | startRemoteSpectrumScan | (agentIP, agentPort, scan5) | [] | def startRemoteSpectrumScan(agentIP, agentPort, scan5):
if scan5:
url = "http://" + agentIP + ":" + str(agentPort) + "/spectrum/scanstart5"
else:
url = "http://" + agentIP + ":" + str(agentPort) + "/spectrum/scanstart24"
statusCode, responsestr = makeGetRequest(url)
if statusCode ==... | [
"def",
"startRemoteSpectrumScan",
"(",
"agentIP",
",",
"agentPort",
",",
"scan5",
")",
":",
"if",
"scan5",
":",
"url",
"=",
"\"http://\"",
"+",
"agentIP",
"+",
"\":\"",
"+",
"str",
"(",
"agentPort",
")",
"+",
"\"/spectrum/scanstart5\"",
"else",
":",
"url",
... | https://github.com/ghostop14/sparrow-wifi/blob/4b8289773ea4304872062f65a6ffc9352612b08e/sparrow-wifi.py#L188-L204 | ||||
mne-tools/mne-python | f90b303ce66a8415e64edd4605b09ac0179c1ebf | mne/io/brainvision/brainvision.py | python | _BVEventParser.__call__ | (self, description) | return code | Parse BrainVision event codes (like `Stimulus/S 11`) to ints. | Parse BrainVision event codes (like `Stimulus/S 11`) to ints. | [
"Parse",
"BrainVision",
"event",
"codes",
"(",
"like",
"Stimulus",
"/",
"S",
"11",
")",
"to",
"ints",
"."
] | def __call__(self, description):
"""Parse BrainVision event codes (like `Stimulus/S 11`) to ints."""
offsets = _BV_EVENT_IO_OFFSETS
maybe_digit = description[-3:].strip()
kind = description[:-3]
if maybe_digit.isdigit() and kind in offsets:
code = int(maybe_digit) + ... | [
"def",
"__call__",
"(",
"self",
",",
"description",
")",
":",
"offsets",
"=",
"_BV_EVENT_IO_OFFSETS",
"maybe_digit",
"=",
"description",
"[",
"-",
"3",
":",
"]",
".",
"strip",
"(",
")",
"kind",
"=",
"description",
"[",
":",
"-",
"3",
"]",
"if",
"maybe_... | https://github.com/mne-tools/mne-python/blob/f90b303ce66a8415e64edd4605b09ac0179c1ebf/mne/io/brainvision/brainvision.py#L875-L888 | |
niosus/EasyClangComplete | 3b16eb17735aaa3f56bb295fc5481b269ee9f2ef | plugin/clang/cindex50.py | python | Token.spelling | (self) | return conf.lib.clang_getTokenSpelling(self._tu, self) | The spelling of this token.
This is the textual representation of the token in source. | The spelling of this token. | [
"The",
"spelling",
"of",
"this",
"token",
"."
] | def spelling(self):
"""The spelling of this token.
This is the textual representation of the token in source.
"""
return conf.lib.clang_getTokenSpelling(self._tu, self) | [
"def",
"spelling",
"(",
"self",
")",
":",
"return",
"conf",
".",
"lib",
".",
"clang_getTokenSpelling",
"(",
"self",
".",
"_tu",
",",
"self",
")"
] | https://github.com/niosus/EasyClangComplete/blob/3b16eb17735aaa3f56bb295fc5481b269ee9f2ef/plugin/clang/cindex50.py#L3178-L3183 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.