nwo
stringlengths
5
86
sha
stringlengths
40
40
path
stringlengths
4
189
language
stringclasses
1 value
identifier
stringlengths
1
94
parameters
stringlengths
2
4.03k
argument_list
stringclasses
1 value
return_statement
stringlengths
0
11.5k
docstring
stringlengths
1
33.2k
docstring_summary
stringlengths
0
5.15k
docstring_tokens
list
function
stringlengths
34
151k
function_tokens
list
url
stringlengths
90
278
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/tkinter/ttk.py
python
_format_elemcreate
(etype, script=False, *args, **kw)
return spec, opts
Formats args and kw according to the given element factory etype.
Formats args and kw according to the given element factory etype.
[ "Formats", "args", "and", "kw", "according", "to", "the", "given", "element", "factory", "etype", "." ]
def _format_elemcreate(etype, script=False, *args, **kw): """Formats args and kw according to the given element factory etype.""" spec = None opts = () if etype in ("image", "vsapi"): if etype == "image": # define an element based on an image # first arg should be the default image n...
[ "def", "_format_elemcreate", "(", "etype", ",", "script", "=", "False", ",", "*", "args", ",", "*", "*", "kw", ")", ":", "spec", "=", "None", "opts", "=", "(", ")", "if", "etype", "in", "(", "\"image\"", ",", "\"vsapi\"", ")", ":", "if", "etype", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/tkinter/ttk.py#L117-L152
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/propgrid.py
python
PropertyGridInterface.HideProperty
(*args, **kwargs)
return _propgrid.PropertyGridInterface_HideProperty(*args, **kwargs)
HideProperty(self, PGPropArg id, bool hide=True, int flags=PG_RECURSE) -> bool
HideProperty(self, PGPropArg id, bool hide=True, int flags=PG_RECURSE) -> bool
[ "HideProperty", "(", "self", "PGPropArg", "id", "bool", "hide", "=", "True", "int", "flags", "=", "PG_RECURSE", ")", "-", ">", "bool" ]
def HideProperty(*args, **kwargs): """HideProperty(self, PGPropArg id, bool hide=True, int flags=PG_RECURSE) -> bool""" return _propgrid.PropertyGridInterface_HideProperty(*args, **kwargs)
[ "def", "HideProperty", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_propgrid", ".", "PropertyGridInterface_HideProperty", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/propgrid.py#L1288-L1290
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemFramework/v1/AWS/resource-manager-code/lib/setuptools/command/easy_install.py
python
easy_install.check_site_dir
(self)
Verify that self.install_dir is .pth-capable dir, if needed
Verify that self.install_dir is .pth-capable dir, if needed
[ "Verify", "that", "self", ".", "install_dir", "is", ".", "pth", "-", "capable", "dir", "if", "needed" ]
def check_site_dir(self): """Verify that self.install_dir is .pth-capable dir, if needed""" instdir = normalize_path(self.install_dir) pth_file = os.path.join(instdir, 'easy-install.pth') if not os.path.exists(instdir): try: os.makedirs(instdir) ...
[ "def", "check_site_dir", "(", "self", ")", ":", "instdir", "=", "normalize_path", "(", "self", ".", "install_dir", ")", "pth_file", "=", "os", ".", "path", ".", "join", "(", "instdir", ",", "'easy-install.pth'", ")", "if", "not", "os", ".", "path", ".", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemFramework/v1/AWS/resource-manager-code/lib/setuptools/command/easy_install.py#L457-L504
cornell-zhang/heterocl
6d9e4b4acc2ee2707b2d25b27298c0335bccedfd
python/heterocl/report.py
python
Displayer.display
(self, loops=None, level=None, cols=None)
return df.loc[rows, cols].to_string()
Display the report file. Parameters ---------- loops: list, optional List of loop names (e.g., ['A', 'Y']) level: int, optional Maximum level of loop nest to print. cols: list, optional List of column names. (e.g., ['Trip Count']) ...
Display the report file. Parameters ---------- loops: list, optional List of loop names (e.g., ['A', 'Y']) level: int, optional Maximum level of loop nest to print. cols: list, optional List of column names. (e.g., ['Trip Count']) ...
[ "Display", "the", "report", "file", ".", "Parameters", "----------", "loops", ":", "list", "optional", "List", "of", "loop", "names", "(", "e", ".", "g", ".", "[", "A", "Y", "]", ")", "level", ":", "int", "optional", "Maximum", "level", "of", "loop", ...
def display(self, loops=None, level=None, cols=None): """Display the report file. Parameters ---------- loops: list, optional List of loop names (e.g., ['A', 'Y']) level: int, optional Maximum level of loop nest to print. cols: list, optional ...
[ "def", "display", "(", "self", ",", "loops", "=", "None", ",", "level", "=", "None", ",", "cols", "=", "None", ")", ":", "if", "loops", "is", "None", ":", "loops", "=", "self", ".", "_loop_name_aux", "if", "level", "is", "None", ":", "level", "=", ...
https://github.com/cornell-zhang/heterocl/blob/6d9e4b4acc2ee2707b2d25b27298c0335bccedfd/python/heterocl/report.py#L376-L434
yyzybb537/libgo
4af17b7c67643c4d54aa354dcc77963ea07847d0
third_party/boost.context/tools/build/src/build/scanner.py
python
Scanner.pattern
(self)
Returns a pattern to use for scanning.
Returns a pattern to use for scanning.
[ "Returns", "a", "pattern", "to", "use", "for", "scanning", "." ]
def pattern (self): """ Returns a pattern to use for scanning. """ raise BaseException ("method must be overriden")
[ "def", "pattern", "(", "self", ")", ":", "raise", "BaseException", "(", "\"method must be overriden\"", ")" ]
https://github.com/yyzybb537/libgo/blob/4af17b7c67643c4d54aa354dcc77963ea07847d0/third_party/boost.context/tools/build/src/build/scanner.py#L97-L100
zlgopen/awtk
2c49e854a78749d9092907c027a7fba9062be549
3rd/mbedtls/scripts/assemble_changelog.py
python
ChangelogFormat.split_categories
(cls, version_body)
Split a changelog version section body into categories. Return a list of `CategoryContent` the name is category title without any formatting.
Split a changelog version section body into categories.
[ "Split", "a", "changelog", "version", "section", "body", "into", "categories", "." ]
def split_categories(cls, version_body): """Split a changelog version section body into categories. Return a list of `CategoryContent` the name is category title without any formatting. """ raise NotImplementedError
[ "def", "split_categories", "(", "cls", ",", "version_body", ")", ":", "raise", "NotImplementedError" ]
https://github.com/zlgopen/awtk/blob/2c49e854a78749d9092907c027a7fba9062be549/3rd/mbedtls/scripts/assemble_changelog.py#L106-L112
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/idlelib/sidebar.py
python
get_widget_padding
(widget)
return padx, pady
Get the total padding of a Tk widget, including its border.
Get the total padding of a Tk widget, including its border.
[ "Get", "the", "total", "padding", "of", "a", "Tk", "widget", "including", "its", "border", "." ]
def get_widget_padding(widget): """Get the total padding of a Tk widget, including its border.""" # TODO: use also in codecontext.py manager = widget.winfo_manager() if manager == 'pack': info = widget.pack_info() elif manager == 'grid': info = widget.grid_info() else: ra...
[ "def", "get_widget_padding", "(", "widget", ")", ":", "# TODO: use also in codecontext.py", "manager", "=", "widget", ".", "winfo_manager", "(", ")", "if", "manager", "==", "'pack'", ":", "info", "=", "widget", ".", "pack_info", "(", ")", "elif", "manager", "=...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/idlelib/sidebar.py#L17-L40
fossephate/JoyCon-Driver
857e4e76e26f05d72400ae5d9f2a22cae88f3548
joycon-driver/full/wxWidgets-3.0.3/build/tools/builder.py
python
Builder.doSetup
(self)
Do anything special needed to configure the environment to build with this builder.
Do anything special needed to configure the environment to build with this builder.
[ "Do", "anything", "special", "needed", "to", "configure", "the", "environment", "to", "build", "with", "this", "builder", "." ]
def doSetup(self): """ Do anything special needed to configure the environment to build with this builder. """ pass
[ "def", "doSetup", "(", "self", ")", ":", "pass" ]
https://github.com/fossephate/JoyCon-Driver/blob/857e4e76e26f05d72400ae5d9f2a22cae88f3548/joycon-driver/full/wxWidgets-3.0.3/build/tools/builder.py#L46-L51
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/python/training/saver.py
python
update_checkpoint_state
(save_dir, model_checkpoint_path, all_model_checkpoint_paths=None, latest_filename=None)
Updates the content of the 'checkpoint' file. This updates the checkpoint file containing a CheckpointState proto. Args: save_dir: Directory where the model was saved. model_checkpoint_path: The checkpoint file. all_model_checkpoint_paths: List of strings. Paths to all not-yet-deleted checkpo...
Updates the content of the 'checkpoint' file.
[ "Updates", "the", "content", "of", "the", "checkpoint", "file", "." ]
def update_checkpoint_state(save_dir, model_checkpoint_path, all_model_checkpoint_paths=None, latest_filename=None): """Updates the content of the 'checkpoint' file. This updates the checkpoint file containing a CheckpointState p...
[ "def", "update_checkpoint_state", "(", "save_dir", ",", "model_checkpoint_path", ",", "all_model_checkpoint_paths", "=", "None", ",", "latest_filename", "=", "None", ")", ":", "_update_checkpoint_state", "(", "save_dir", "=", "save_dir", ",", "model_checkpoint_path", "=...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/python/training/saver.py#L799-L827
strukturag/libheif
0082fea96ee70a20c8906a0373bedec0c01777bc
scripts/cpplint.py
python
CheckLanguage
(filename, clean_lines, linenum, file_extension, include_state, nesting_state, error)
Checks rules from the 'C++ language rules' section of cppguide.html. Some of these rules are hard to test (function overloading, using uint32 inappropriately), but we do the best we can. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum:...
Checks rules from the 'C++ language rules' section of cppguide.html.
[ "Checks", "rules", "from", "the", "C", "++", "language", "rules", "section", "of", "cppguide", ".", "html", "." ]
def CheckLanguage(filename, clean_lines, linenum, file_extension, include_state, nesting_state, error): """Checks rules from the 'C++ language rules' section of cppguide.html. Some of these rules are hard to test (function overloading, using uint32 inappropriately), but we do the best we can. ...
[ "def", "CheckLanguage", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "file_extension", ",", "include_state", ",", "nesting_state", ",", "error", ")", ":", "# If the line is empty or consists of entirely a comment, no need to", "# check it.", "line", "=", "cle...
https://github.com/strukturag/libheif/blob/0082fea96ee70a20c8906a0373bedec0c01777bc/scripts/cpplint.py#L4549-L4707
p4lang/p4c
3272e79369f20813cc1a555a5eb26f44432f84a4
tools/cpplint.py
python
CheckCasts
(filename, clean_lines, linenum, error)
Various cast related checks. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found.
Various cast related checks.
[ "Various", "cast", "related", "checks", "." ]
def CheckCasts(filename, clean_lines, linenum, error): """Various cast related checks. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line =...
[ "def", "CheckCasts", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "line", "=", "clean_lines", ".", "elided", "[", "linenum", "]", "# Check to see if they're using an conversion function cast.", "# I just try to capture the most common basic t...
https://github.com/p4lang/p4c/blob/3272e79369f20813cc1a555a5eb26f44432f84a4/tools/cpplint.py#L5701-L5817
openthread/openthread
9fcdbed9c526c70f1556d1ed84099c1535c7cd32
tools/otci/otci/otci.py
python
OTCI.ping_stop
(self)
Stop sending ICMPv6 Echo Requests.
Stop sending ICMPv6 Echo Requests.
[ "Stop", "sending", "ICMPv6", "Echo", "Requests", "." ]
def ping_stop(self): """Stop sending ICMPv6 Echo Requests.""" self.execute_command('ping stop')
[ "def", "ping_stop", "(", "self", ")", ":", "self", ".", "execute_command", "(", "'ping stop'", ")" ]
https://github.com/openthread/openthread/blob/9fcdbed9c526c70f1556d1ed84099c1535c7cd32/tools/otci/otci/otci.py#L259-L261
gtcasl/gpuocelot
fa63920ee7c5f9a86e264cd8acd4264657cbd190
ocelot/scripts/which.py
python
which_files
(file, mode=os.F_OK | os.X_OK, path=None, pathext=None)
Generate full paths, where the file*is accesible under mode and is located in the directory passed as a part of the file name, or in any directory on path if a base file name is passed. The mode matches an existing executable file by default. The path defaults to the PATH environment v...
Generate full paths, where the file*is accesible under mode and is located in the directory passed as a part of the file name, or in any directory on path if a base file name is passed.
[ "Generate", "full", "paths", "where", "the", "file", "*", "is", "accesible", "under", "mode", "and", "is", "located", "in", "the", "directory", "passed", "as", "a", "part", "of", "the", "file", "name", "or", "in", "any", "directory", "on", "path", "if", ...
def which_files(file, mode=os.F_OK | os.X_OK, path=None, pathext=None): """ Generate full paths, where the file*is accesible under mode and is located in the directory passed as a part of the file name, or in any directory on path if a base file name is passed. The mode matches an existing ...
[ "def", "which_files", "(", "file", ",", "mode", "=", "os", ".", "F_OK", "|", "os", ".", "X_OK", ",", "path", "=", "None", ",", "pathext", "=", "None", ")", ":", "filepath", ",", "file", "=", "os", ".", "path", ".", "split", "(", "file", ")", "i...
https://github.com/gtcasl/gpuocelot/blob/fa63920ee7c5f9a86e264cd8acd4264657cbd190/ocelot/scripts/which.py#L88-L230
netket/netket
0d534e54ecbf25b677ea72af6b85947979420652
netket/operator/_local_operator.py
python
LocalOperator.__init__
( self, hilbert: AbstractHilbert, operators: Union[List[Array], Array] = [], acting_on: Union[List[int], List[List[int]]] = [], constant: numbers.Number = 0, dtype: Optional[DType] = None, )
r""" Constructs a new ``LocalOperator`` given a hilbert space and (if specified) a constant level shift. Args: hilbert (netket.AbstractHilbert): Hilbert space the operator acts on. operators (list(numpy.array) or numpy.array): A list of operators, in matrix form. ...
r""" Constructs a new ``LocalOperator`` given a hilbert space and (if specified) a constant level shift.
[ "r", "Constructs", "a", "new", "LocalOperator", "given", "a", "hilbert", "space", "and", "(", "if", "specified", ")", "a", "constant", "level", "shift", "." ]
def __init__( self, hilbert: AbstractHilbert, operators: Union[List[Array], Array] = [], acting_on: Union[List[int], List[List[int]]] = [], constant: numbers.Number = 0, dtype: Optional[DType] = None, ): r""" Constructs a new ``LocalOperator`` given a ...
[ "def", "__init__", "(", "self", ",", "hilbert", ":", "AbstractHilbert", ",", "operators", ":", "Union", "[", "List", "[", "Array", "]", ",", "Array", "]", "=", "[", "]", ",", "acting_on", ":", "Union", "[", "List", "[", "int", "]", ",", "List", "["...
https://github.com/netket/netket/blob/0d534e54ecbf25b677ea72af6b85947979420652/netket/operator/_local_operator.py#L202-L273
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/python/ops/data_flow_ops.py
python
QueueBase._scope_vals
(self, vals)
Return a list of values to pass to `name_scope()`. Args: vals: A tensor, a list or tuple of tensors, or a dictionary. Returns: The values in vals as a list.
Return a list of values to pass to `name_scope()`.
[ "Return", "a", "list", "of", "values", "to", "pass", "to", "name_scope", "()", "." ]
def _scope_vals(self, vals): """Return a list of values to pass to `name_scope()`. Args: vals: A tensor, a list or tuple of tensors, or a dictionary. Returns: The values in vals as a list. """ if isinstance(vals, (list, tuple)): return vals elif isinstance(vals, dict): ...
[ "def", "_scope_vals", "(", "self", ",", "vals", ")", ":", "if", "isinstance", "(", "vals", ",", "(", "list", ",", "tuple", ")", ")", ":", "return", "vals", "elif", "isinstance", "(", "vals", ",", "dict", ")", ":", "return", "vals", ".", "values", "...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/python/ops/data_flow_ops.py#L271-L285
Cisco-Talos/moflow
ed71dfb0540d9e0d7a4c72f0881b58958d573728
BAP-0.7-moflow/libtracewrap/libtrace/protobuf/python/google/protobuf/internal/python_message.py
python
_PropertyName
(proto_field_name)
return proto_field_name
Returns the name of the public property attribute which clients can use to get and (in some cases) set the value of a protocol message field. Args: proto_field_name: The protocol message field name, exactly as it appears (or would appear) in a .proto file.
Returns the name of the public property attribute which clients can use to get and (in some cases) set the value of a protocol message field.
[ "Returns", "the", "name", "of", "the", "public", "property", "attribute", "which", "clients", "can", "use", "to", "get", "and", "(", "in", "some", "cases", ")", "set", "the", "value", "of", "a", "protocol", "message", "field", "." ]
def _PropertyName(proto_field_name): """Returns the name of the public property attribute which clients can use to get and (in some cases) set the value of a protocol message field. Args: proto_field_name: The protocol message field name, exactly as it appears (or would appear) in a .proto file. ""...
[ "def", "_PropertyName", "(", "proto_field_name", ")", ":", "# TODO(robinson): Escape Python keywords (e.g., yield), and test this support.", "# nnorwitz makes my day by writing:", "# \"\"\"", "# FYI. See the keyword module in the stdlib. This could be as simple as:", "#", "# if keyword.iskeyw...
https://github.com/Cisco-Talos/moflow/blob/ed71dfb0540d9e0d7a4c72f0881b58958d573728/BAP-0.7-moflow/libtracewrap/libtrace/protobuf/python/google/protobuf/internal/python_message.py#L109-L135
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/path.py/path.py
python
Path.relpath
(self, start='.')
return cwd.relpathto(self)
Return this path as a relative path, based from `start`, which defaults to the current working directory.
Return this path as a relative path, based from `start`, which defaults to the current working directory.
[ "Return", "this", "path", "as", "a", "relative", "path", "based", "from", "start", "which", "defaults", "to", "the", "current", "working", "directory", "." ]
def relpath(self, start='.'): """ Return this path as a relative path, based from `start`, which defaults to the current working directory. """ cwd = self._next_class(start) return cwd.relpathto(self)
[ "def", "relpath", "(", "self", ",", "start", "=", "'.'", ")", ":", "cwd", "=", "self", ".", "_next_class", "(", "start", ")", "return", "cwd", ".", "relpathto", "(", "self", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/path.py/path.py#L467-L472
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py3/scipy/optimize/nonlin.py
python
LowRankMatrix.solve
(self, v, tol=0)
return LowRankMatrix._solve(v, self.alpha, self.cs, self.ds)
Evaluate w = M^-1 v
Evaluate w = M^-1 v
[ "Evaluate", "w", "=", "M^", "-", "1", "v" ]
def solve(self, v, tol=0): """Evaluate w = M^-1 v""" if self.collapsed is not None: return solve(self.collapsed, v) return LowRankMatrix._solve(v, self.alpha, self.cs, self.ds)
[ "def", "solve", "(", "self", ",", "v", ",", "tol", "=", "0", ")", ":", "if", "self", ".", "collapsed", "is", "not", "None", ":", "return", "solve", "(", "self", ".", "collapsed", ",", "v", ")", "return", "LowRankMatrix", ".", "_solve", "(", "v", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py3/scipy/optimize/nonlin.py#L760-L764
cms-sw/cmssw
fd9de012d503d3405420bcbeec0ec879baa57cf2
PhysicsTools/HeppyCore/python/utils/eostools.py
python
fileExists
( path )
return result
Returns true if path is a file or directory stored locally, or on EOS. This function checks for the file or directory existence.
Returns true if path is a file or directory stored locally, or on EOS.
[ "Returns", "true", "if", "path", "is", "a", "file", "or", "directory", "stored", "locally", "or", "on", "EOS", "." ]
def fileExists( path ): """Returns true if path is a file or directory stored locally, or on EOS. This function checks for the file or directory existence.""" eos = isEOSDir(path) result = False if eos: # print 'eos', path result = isEOSFile(path) else: # print 'not eos...
[ "def", "fileExists", "(", "path", ")", ":", "eos", "=", "isEOSDir", "(", "path", ")", "result", "=", "False", "if", "eos", ":", "# print 'eos', path", "result", "=", "isEOSFile", "(", "path", ")", "else", ":", "# print 'not eos', path", "#check locally", "re...
https://github.com/cms-sw/cmssw/blob/fd9de012d503d3405420bcbeec0ec879baa57cf2/PhysicsTools/HeppyCore/python/utils/eostools.py#L198-L213
Cantera/cantera
0119484b261967ccb55a0066c020599cacc312e4
interfaces/cython/cantera/examples/surface_chemistry/sofc.py
python
show_coverages
(s)
Print the coverages for surface s.
Print the coverages for surface s.
[ "Print", "the", "coverages", "for", "surface", "s", "." ]
def show_coverages(s): """Print the coverages for surface s.""" print('\n{0}\n'.format(s.name)) cov = s.coverages names = s.species_names for n in range(s.n_species): print('{0:16s} {1:13.4g}'.format(names[n], cov[n]))
[ "def", "show_coverages", "(", "s", ")", ":", "print", "(", "'\\n{0}\\n'", ".", "format", "(", "s", ".", "name", ")", ")", "cov", "=", "s", ".", "coverages", "names", "=", "s", ".", "species_names", "for", "n", "in", "range", "(", "s", ".", "n_speci...
https://github.com/Cantera/cantera/blob/0119484b261967ccb55a0066c020599cacc312e4/interfaces/cython/cantera/examples/surface_chemistry/sofc.py#L46-L52
google/shaka-player-embedded
dabbeb5b47cc257b37b9a254661546352aaf0afe
shaka/tools/idl/exposed_type_generator.py
python
_GetPublicFieldName
(attr)
return re.sub(r'([A-Z])', r'_\1', attr.name).lower()
Converts a lowerCamelCase field name to lower_with_underscores.
Converts a lowerCamelCase field name to lower_with_underscores.
[ "Converts", "a", "lowerCamelCase", "field", "name", "to", "lower_with_underscores", "." ]
def _GetPublicFieldName(attr): """Converts a lowerCamelCase field name to lower_with_underscores.""" return re.sub(r'([A-Z])', r'_\1', attr.name).lower()
[ "def", "_GetPublicFieldName", "(", "attr", ")", ":", "return", "re", ".", "sub", "(", "r'([A-Z])'", ",", "r'_\\1'", ",", "attr", ".", "name", ")", ".", "lower", "(", ")" ]
https://github.com/google/shaka-player-embedded/blob/dabbeb5b47cc257b37b9a254661546352aaf0afe/shaka/tools/idl/exposed_type_generator.py#L88-L90
zeakey/DeepSkeleton
dc70170f8fd2ec8ca1157484ce66129981104486
scripts/cpp_lint.py
python
UpdateIncludeState
(filename, include_state, io=codecs)
return True
Fill up the include_state with new includes found from the file. Args: filename: the name of the header to read. include_state: an _IncludeState instance in which the headers are inserted. io: The io factory to use to read the file. Provided for testability. Returns: True if a header was succesful...
Fill up the include_state with new includes found from the file.
[ "Fill", "up", "the", "include_state", "with", "new", "includes", "found", "from", "the", "file", "." ]
def UpdateIncludeState(filename, include_state, io=codecs): """Fill up the include_state with new includes found from the file. Args: filename: the name of the header to read. include_state: an _IncludeState instance in which the headers are inserted. io: The io factory to use to read the file. Provide...
[ "def", "UpdateIncludeState", "(", "filename", ",", "include_state", ",", "io", "=", "codecs", ")", ":", "headerfile", "=", "None", "try", ":", "headerfile", "=", "io", ".", "open", "(", "filename", ",", "'r'", ",", "'utf8'", ",", "'replace'", ")", "excep...
https://github.com/zeakey/DeepSkeleton/blob/dc70170f8fd2ec8ca1157484ce66129981104486/scripts/cpp_lint.py#L4454-L4480
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_windows.py
python
Dialog.GetAffirmativeId
(*args, **kwargs)
return _windows_.Dialog_GetAffirmativeId(*args, **kwargs)
GetAffirmativeId(self) -> int
GetAffirmativeId(self) -> int
[ "GetAffirmativeId", "(", "self", ")", "-", ">", "int" ]
def GetAffirmativeId(*args, **kwargs): """GetAffirmativeId(self) -> int""" return _windows_.Dialog_GetAffirmativeId(*args, **kwargs)
[ "def", "GetAffirmativeId", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_windows_", ".", "Dialog_GetAffirmativeId", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_windows.py#L757-L759
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/contrib/learn/python/learn/estimators/linear.py
python
LinearRegressor.__init__
(self, feature_columns=None, model_dir=None, weight_column_name=None, optimizer=None, gradient_clip_norm=None, enable_centered_bias=True, target_dimension=1, config=None)
Construct a `LinearRegressor` estimator object. Args: feature_columns: An iterable containing all the feature columns used by the model. All items in the set should be instances of classes derived from `FeatureColumn`. model_dir: Directory to save model parameters, graph, etc. This can ...
Construct a `LinearRegressor` estimator object.
[ "Construct", "a", "LinearRegressor", "estimator", "object", "." ]
def __init__(self, feature_columns=None, model_dir=None, weight_column_name=None, optimizer=None, gradient_clip_norm=None, enable_centered_bias=True, target_dimension=1, config=None): """Construct...
[ "def", "__init__", "(", "self", ",", "feature_columns", "=", "None", ",", "model_dir", "=", "None", ",", "weight_column_name", "=", "None", ",", "optimizer", "=", "None", ",", "gradient_clip_norm", "=", "None", ",", "enable_centered_bias", "=", "True", ",", ...
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/contrib/learn/python/learn/estimators/linear.py#L270-L315
microsoft/TSS.MSR
0f2516fca2cd9929c31d5450e39301c9bde43688
TSS.Py/src/TpmTypes.py
python
TPM2B_TIMEOUT.fromBytes
(buffer)
return TpmBuffer(buffer).createObj(TPM2B_TIMEOUT)
Returns new TPM2B_TIMEOUT object constructed from its marshaled representation in the given byte buffer
Returns new TPM2B_TIMEOUT object constructed from its marshaled representation in the given byte buffer
[ "Returns", "new", "TPM2B_TIMEOUT", "object", "constructed", "from", "its", "marshaled", "representation", "in", "the", "given", "byte", "buffer" ]
def fromBytes(buffer): """ Returns new TPM2B_TIMEOUT object constructed from its marshaled representation in the given byte buffer """ return TpmBuffer(buffer).createObj(TPM2B_TIMEOUT)
[ "def", "fromBytes", "(", "buffer", ")", ":", "return", "TpmBuffer", "(", "buffer", ")", ".", "createObj", "(", "TPM2B_TIMEOUT", ")" ]
https://github.com/microsoft/TSS.MSR/blob/0f2516fca2cd9929c31d5450e39301c9bde43688/TSS.Py/src/TpmTypes.py#L3946-L3950
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
scripts/SANS/sans/algorithm_detail/mask_workspace.py
python
mask_spectra
(mask_info, workspace, spectra_block, detector_type)
return workspace
Masks particular spectra on the workspace. There are several spectra specifications which need to be evaluated 1. General singular spectrum numbers 2. General spectrum ranges 3. Detector-specific horizontal singular strips 4. Detector-specific horizontal range strips 5. Detector-specific vertic...
Masks particular spectra on the workspace.
[ "Masks", "particular", "spectra", "on", "the", "workspace", "." ]
def mask_spectra(mask_info, workspace, spectra_block, detector_type): """ Masks particular spectra on the workspace. There are several spectra specifications which need to be evaluated 1. General singular spectrum numbers 2. General spectrum ranges 3. Detector-specific horizontal singular strip...
[ "def", "mask_spectra", "(", "mask_info", ",", "workspace", ",", "spectra_block", ",", "detector_type", ")", ":", "total_spectra", "=", "[", "]", "# All masks are detector-specific, hence we pull out only the relevant part", "detector", "=", "mask_info", ".", "detectors", ...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/scripts/SANS/sans/algorithm_detail/mask_workspace.py#L157-L285
rdkit/rdkit
ede860ae316d12d8568daf5ee800921c3389c84e
Contrib/FreeWilson/freewilson.py
python
FWDecompose
(scaffolds, mols, scores, decomp_params=default_decomp_params)
return FreeWilsonDecomposition(rgroups, rgroup_idx, lm, r2, descriptors)
Perform a free wilson analysis : param scaffolds : scaffold or list of scaffolds to use for the rgroup decomposition : param mols : molecules to decompose : param scores : list of floating point numbers for the regression ( you may need convert these to their logs in...
Perform a free wilson analysis : param scaffolds : scaffold or list of scaffolds to use for the rgroup decomposition : param mols : molecules to decompose : param scores : list of floating point numbers for the regression ( you may need convert these to their logs in...
[ "Perform", "a", "free", "wilson", "analysis", ":", "param", "scaffolds", ":", "scaffold", "or", "list", "of", "scaffolds", "to", "use", "for", "the", "rgroup", "decomposition", ":", "param", "mols", ":", "molecules", "to", "decompose", ":", "param", "scores"...
def FWDecompose(scaffolds, mols, scores, decomp_params=default_decomp_params) -> FreeWilsonDecomposition: """ Perform a free wilson analysis : param scaffolds : scaffold or list of scaffolds to use for the rgroup decomposition : param mols : molecules to decompose : param scores : list o...
[ "def", "FWDecompose", "(", "scaffolds", ",", "mols", ",", "scores", ",", "decomp_params", "=", "default_decomp_params", ")", "->", "FreeWilsonDecomposition", ":", "descriptors", "=", "[", "]", "# list of descriptors, one per matched molecules", "# descriptors are 1/0 if ...
https://github.com/rdkit/rdkit/blob/ede860ae316d12d8568daf5ee800921c3389c84e/Contrib/FreeWilson/freewilson.py#L241-L331
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/image_grad.py
python
_ResizeBicubicGrad
(op, grad)
return [grad0, None]
The derivatives for bicubic resizing. Args: op: The ResizeBicubic op. grad: The tensor representing the gradient w.r.t. the output. Returns: The gradients w.r.t. the input.
The derivatives for bicubic resizing.
[ "The", "derivatives", "for", "bicubic", "resizing", "." ]
def _ResizeBicubicGrad(op, grad): """The derivatives for bicubic resizing. Args: op: The ResizeBicubic op. grad: The tensor representing the gradient w.r.t. the output. Returns: The gradients w.r.t. the input. """ allowed_types = [dtypes.float32, dtypes.float64] grad0 = None if op.inputs[0]....
[ "def", "_ResizeBicubicGrad", "(", "op", ",", "grad", ")", ":", "allowed_types", "=", "[", "dtypes", ".", "float32", ",", "dtypes", ".", "float64", "]", "grad0", "=", "None", "if", "op", ".", "inputs", "[", "0", "]", ".", "dtype", "in", "allowed_types",...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/image_grad.py#L95-L113
trilinos/Trilinos
6168be6dd51e35e1cd681e9c4b24433e709df140
cmake/tribits/doc/sphinx/sphinx_rst_generator.py
python
SphinxRstGenerator.create_rst_dir
(self)
Creates copied_files directory in Sphinx directory. All include files will be copy there.
Creates copied_files directory in Sphinx directory. All include files will be copy there.
[ "Creates", "copied_files", "directory", "in", "Sphinx", "directory", ".", "All", "include", "files", "will", "be", "copy", "there", "." ]
def create_rst_dir(self) -> None: """ Creates copied_files directory in Sphinx directory. All include files will be copy there. """ if self.rst_dir is not None: if not os.path.exists(self.rst_dir): os.makedirs(self.rst_dir)
[ "def", "create_rst_dir", "(", "self", ")", "->", "None", ":", "if", "self", ".", "rst_dir", "is", "not", "None", ":", "if", "not", "os", ".", "path", ".", "exists", "(", "self", ".", "rst_dir", ")", ":", "os", ".", "makedirs", "(", "self", ".", "...
https://github.com/trilinos/Trilinos/blob/6168be6dd51e35e1cd681e9c4b24433e709df140/cmake/tribits/doc/sphinx/sphinx_rst_generator.py#L98-L104
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/ultimatelistctrl.py
python
UltimateListItemData.GetWidth
(self)
return self._rect.width
Returns the item width, in pixels.
Returns the item width, in pixels.
[ "Returns", "the", "item", "width", "in", "pixels", "." ]
def GetWidth(self): """ Returns the item width, in pixels. """ return self._rect.width
[ "def", "GetWidth", "(", "self", ")", ":", "return", "self", ".", "_rect", ".", "width" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/ultimatelistctrl.py#L3106-L3109
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
packages/Python/lldbsuite/support/seven.py
python
unhexlify
(hexstr)
return bitcast_to_string(binascii.unhexlify(hexstr))
Hex-decode a string. The result is always a string.
Hex-decode a string. The result is always a string.
[ "Hex", "-", "decode", "a", "string", ".", "The", "result", "is", "always", "a", "string", "." ]
def unhexlify(hexstr): """Hex-decode a string. The result is always a string.""" return bitcast_to_string(binascii.unhexlify(hexstr))
[ "def", "unhexlify", "(", "hexstr", ")", ":", "return", "bitcast_to_string", "(", "binascii", ".", "unhexlify", "(", "hexstr", ")", ")" ]
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/packages/Python/lldbsuite/support/seven.py#L45-L47
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/inspect.py
python
getinnerframes
(tb, context=1)
return framelist
Get a list of records for a traceback's frame and all lower frames. Each record contains a frame object, filename, line number, function name, a list of lines of context, and index within the context.
Get a list of records for a traceback's frame and all lower frames.
[ "Get", "a", "list", "of", "records", "for", "a", "traceback", "s", "frame", "and", "all", "lower", "frames", "." ]
def getinnerframes(tb, context=1): """Get a list of records for a traceback's frame and all lower frames. Each record contains a frame object, filename, line number, function name, a list of lines of context, and index within the context.""" framelist = [] while tb: framelist.append((tb.tb_...
[ "def", "getinnerframes", "(", "tb", ",", "context", "=", "1", ")", ":", "framelist", "=", "[", "]", "while", "tb", ":", "framelist", ".", "append", "(", "(", "tb", ".", "tb_frame", ",", ")", "+", "getframeinfo", "(", "tb", ",", "context", ")", ")",...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/inspect.py#L1036-L1045
kevin-ssy/Optical-Flow-Guided-Feature
07d4501a29002ee7821c38c1820e4a64c1acf6e8
lib/caffe-action/scripts/cpp_lint.py
python
_NestingState.SeenOpenBrace
(self)
return (not self.stack) or self.stack[-1].seen_open_brace
Check if we have seen the opening brace for the innermost block. Returns: True if we have seen the opening brace, False if the innermost block is still expecting an opening brace.
Check if we have seen the opening brace for the innermost block.
[ "Check", "if", "we", "have", "seen", "the", "opening", "brace", "for", "the", "innermost", "block", "." ]
def SeenOpenBrace(self): """Check if we have seen the opening brace for the innermost block. Returns: True if we have seen the opening brace, False if the innermost block is still expecting an opening brace. """ return (not self.stack) or self.stack[-1].seen_open_brace
[ "def", "SeenOpenBrace", "(", "self", ")", ":", "return", "(", "not", "self", ".", "stack", ")", "or", "self", ".", "stack", "[", "-", "1", "]", ".", "seen_open_brace" ]
https://github.com/kevin-ssy/Optical-Flow-Guided-Feature/blob/07d4501a29002ee7821c38c1820e4a64c1acf6e8/lib/caffe-action/scripts/cpp_lint.py#L1931-L1938
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/xml/sax/xmlreader.py
python
InputSource.setByteStream
(self, bytefile)
Set the byte stream (a Python file-like object which does not perform byte-to-character conversion) for this input source. The SAX parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a URI connection itsel...
Set the byte stream (a Python file-like object which does not perform byte-to-character conversion) for this input source.
[ "Set", "the", "byte", "stream", "(", "a", "Python", "file", "-", "like", "object", "which", "does", "not", "perform", "byte", "-", "to", "-", "character", "conversion", ")", "for", "this", "input", "source", "." ]
def setByteStream(self, bytefile): """Set the byte stream (a Python file-like object which does not perform byte-to-character conversion) for this input source. The SAX parser will ignore this if there is also a character stream specified, but it will use a byte stream in prefer...
[ "def", "setByteStream", "(", "self", ",", "bytefile", ")", ":", "self", ".", "__bytefile", "=", "bytefile" ]
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/xml/sax/xmlreader.py#L240-L251
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/pydoc.py
python
classname
(object, modname)
return name
Get a class name and qualify it with a module name if necessary.
Get a class name and qualify it with a module name if necessary.
[ "Get", "a", "class", "name", "and", "qualify", "it", "with", "a", "module", "name", "if", "necessary", "." ]
def classname(object, modname): """Get a class name and qualify it with a module name if necessary.""" name = object.__name__ if object.__module__ != modname: name = object.__module__ + '.' + name return name
[ "def", "classname", "(", "object", ",", "modname", ")", ":", "name", "=", "object", ".", "__name__", "if", "object", ".", "__module__", "!=", "modname", ":", "name", "=", "object", ".", "__module__", "+", "'.'", "+", "name", "return", "name" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/pydoc.py#L107-L112
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/setuptools/ssl_support.py
python
opener_for
(ca_bundle=None)
return urllib.request.build_opener( VerifyingHTTPSHandler(ca_bundle or find_ca_bundle()) ).open
Get a urlopen() replacement that uses ca_bundle for verification
Get a urlopen() replacement that uses ca_bundle for verification
[ "Get", "a", "urlopen", "()", "replacement", "that", "uses", "ca_bundle", "for", "verification" ]
def opener_for(ca_bundle=None): """Get a urlopen() replacement that uses ca_bundle for verification""" return urllib.request.build_opener( VerifyingHTTPSHandler(ca_bundle or find_ca_bundle()) ).open
[ "def", "opener_for", "(", "ca_bundle", "=", "None", ")", ":", "return", "urllib", ".", "request", ".", "build_opener", "(", "VerifyingHTTPSHandler", "(", "ca_bundle", "or", "find_ca_bundle", "(", ")", ")", ")", ".", "open" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/setuptools/ssl_support.py#L210-L214
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/core/arrayprint.py
python
_make_options_dict
(precision=None, threshold=None, edgeitems=None, linewidth=None, suppress=None, nanstr=None, infstr=None, sign=None, formatter=None, floatmode=None, legacy=None)
return options
make a dictionary out of the non-None arguments, plus sanity checks
make a dictionary out of the non-None arguments, plus sanity checks
[ "make", "a", "dictionary", "out", "of", "the", "non", "-", "None", "arguments", "plus", "sanity", "checks" ]
def _make_options_dict(precision=None, threshold=None, edgeitems=None, linewidth=None, suppress=None, nanstr=None, infstr=None, sign=None, formatter=None, floatmode=None, legacy=None): """ make a dictionary out of the non-None arguments, plus sanity checks """ opti...
[ "def", "_make_options_dict", "(", "precision", "=", "None", ",", "threshold", "=", "None", ",", "edgeitems", "=", "None", ",", "linewidth", "=", "None", ",", "suppress", "=", "None", ",", "nanstr", "=", "None", ",", "infstr", "=", "None", ",", "sign", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/core/arrayprint.py#L69-L97
openvinotoolkit/openvino
dedcbeafa8b84cccdc55ca64b8da516682b381c7
tools/mo/openvino/tools/mo/middle/passes/fusing/decomposition.py
python
convert_batch_norm
(graph: Graph)
This function finds FusedBatchNorm layer (or BatchNorm for MXNet) and replaces with Mul->Add->Mul->Add sequence.
This function finds FusedBatchNorm layer (or BatchNorm for MXNet) and replaces with Mul->Add->Mul->Add sequence.
[ "This", "function", "finds", "FusedBatchNorm", "layer", "(", "or", "BatchNorm", "for", "MXNet", ")", "and", "replaces", "with", "Mul", "-", ">", "Add", "-", ">", "Mul", "-", ">", "Add", "sequence", "." ]
def convert_batch_norm(graph: Graph): """ This function finds FusedBatchNorm layer (or BatchNorm for MXNet) and replaces with Mul->Add->Mul->Add sequence. """ nodes = graph.get_op_nodes() for node in nodes: if node.has_valid('op') and (node.op in ['FusedBatchNorm', 'FusedBatchNormV2', 'Fused...
[ "def", "convert_batch_norm", "(", "graph", ":", "Graph", ")", ":", "nodes", "=", "graph", ".", "get_op_nodes", "(", ")", "for", "node", "in", "nodes", ":", "if", "node", ".", "has_valid", "(", "'op'", ")", "and", "(", "node", ".", "op", "in", "[", ...
https://github.com/openvinotoolkit/openvino/blob/dedcbeafa8b84cccdc55ca64b8da516682b381c7/tools/mo/openvino/tools/mo/middle/passes/fusing/decomposition.py#L24-L71
anestisb/oatdump_plus
ba858c1596598f0d9ae79c14d08c708cecc50af3
tools/cpplint.py
python
CheckSectionSpacing
(filename, clean_lines, class_info, linenum, error)
Checks for additional blank line issues related to sections. Currently the only thing checked here is blank line before protected/private. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. class_info: A _ClassInfo objects. linenum: The number ...
Checks for additional blank line issues related to sections.
[ "Checks", "for", "additional", "blank", "line", "issues", "related", "to", "sections", "." ]
def CheckSectionSpacing(filename, clean_lines, class_info, linenum, error): """Checks for additional blank line issues related to sections. Currently the only thing checked here is blank line before protected/private. Args: filename: The name of the current file. clean_lines: A CleansedLines instance co...
[ "def", "CheckSectionSpacing", "(", "filename", ",", "clean_lines", ",", "class_info", ",", "linenum", ",", "error", ")", ":", "# Skip checks if the class is small, where small means 25 lines or less.", "# 25 lines seems like a good cutoff since that's the usual height of", "# termina...
https://github.com/anestisb/oatdump_plus/blob/ba858c1596598f0d9ae79c14d08c708cecc50af3/tools/cpplint.py#L2525-L2577
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/distlib/_backport/tarfile.py
python
TarInfo._create_gnu_long_header
(cls, name, type, encoding, errors)
return cls._create_header(info, USTAR_FORMAT, encoding, errors) + \ cls._create_payload(name)
Return a GNUTYPE_LONGNAME or GNUTYPE_LONGLINK sequence for name.
Return a GNUTYPE_LONGNAME or GNUTYPE_LONGLINK sequence
[ "Return", "a", "GNUTYPE_LONGNAME", "or", "GNUTYPE_LONGLINK", "sequence" ]
def _create_gnu_long_header(cls, name, type, encoding, errors): """Return a GNUTYPE_LONGNAME or GNUTYPE_LONGLINK sequence for name. """ name = name.encode(encoding, errors) + NUL info = {} info["name"] = "././@LongLink" info["type"] = type inf...
[ "def", "_create_gnu_long_header", "(", "cls", ",", "name", ",", "type", ",", "encoding", ",", "errors", ")", ":", "name", "=", "name", ".", "encode", "(", "encoding", ",", "errors", ")", "+", "NUL", "info", "=", "{", "}", "info", "[", "\"name\"", "]"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/distlib/_backport/tarfile.py#L2303-L2331
Slicer/Slicer
ba9fadf332cb0303515b68d8d06a344c82e3e3e5
Utilities/Scripts/SlicerWizard/ExtensionWizard.py
python
ExtensionWizard.describe
(self, args)
Generate extension description and write it to :attr:`sys.stdout`. :param args.destination: Location (directory) of the extension to describe. :type args.destination: :class:`str` If something goes wrong, the application displays a suitable error message.
Generate extension description and write it to :attr:`sys.stdout`.
[ "Generate", "extension", "description", "and", "write", "it", "to", ":", "attr", ":", "sys", ".", "stdout", "." ]
def describe(self, args): """Generate extension description and write it to :attr:`sys.stdout`. :param args.destination: Location (directory) of the extension to describe. :type args.destination: :class:`str` If something goes wrong, the application displays a suitable error message. """ try:...
[ "def", "describe", "(", "self", ",", "args", ")", ":", "try", ":", "r", "=", "None", "if", "args", ".", "localExtensionsDir", ":", "r", "=", "SourceTreeDirectory", "(", "args", ".", "localExtensionsDir", ",", "os", ".", "path", ".", "relpath", "(", "ar...
https://github.com/Slicer/Slicer/blob/ba9fadf332cb0303515b68d8d06a344c82e3e3e5/Utilities/Scripts/SlicerWizard/ExtensionWizard.py#L143-L170
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/decimal.py
python
Decimal.is_canonical
(self)
return True
Return True if self is canonical; otherwise return False. Currently, the encoding of a Decimal instance is always canonical, so this method returns True for any Decimal.
Return True if self is canonical; otherwise return False.
[ "Return", "True", "if", "self", "is", "canonical", ";", "otherwise", "return", "False", "." ]
def is_canonical(self): """Return True if self is canonical; otherwise return False. Currently, the encoding of a Decimal instance is always canonical, so this method returns True for any Decimal. """ return True
[ "def", "is_canonical", "(", "self", ")", ":", "return", "True" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/decimal.py#L3007-L3013
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/bdb.py
python
Bdb.get_stack
(self, f, t)
return stack, i
Return a list of (frame, lineno) in a stack trace and a size. List starts with original calling frame, if there is one. Size may be number of frames above or below f.
Return a list of (frame, lineno) in a stack trace and a size.
[ "Return", "a", "list", "of", "(", "frame", "lineno", ")", "in", "a", "stack", "trace", "and", "a", "size", "." ]
def get_stack(self, f, t): """Return a list of (frame, lineno) in a stack trace and a size. List starts with original calling frame, if there is one. Size may be number of frames above or below f. """ stack = [] if t and t.tb_frame is f: t = t.tb_next ...
[ "def", "get_stack", "(", "self", ",", "f", ",", "t", ")", ":", "stack", "=", "[", "]", "if", "t", "and", "t", ".", "tb_frame", "is", "f", ":", "t", "=", "t", ".", "tb_next", "while", "f", "is", "not", "None", ":", "stack", ".", "append", "(",...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/bdb.py#L509-L530
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/parfor.py
python
simplify_parfor_body_CFG
(blocks)
simplify CFG of body loops in parfors
simplify CFG of body loops in parfors
[ "simplify", "CFG", "of", "body", "loops", "in", "parfors" ]
def simplify_parfor_body_CFG(blocks): """simplify CFG of body loops in parfors""" for block in blocks.values(): for stmt in block.body: if isinstance(stmt, Parfor): parfor = stmt # add dummy return to enable CFG creation # can't use dummy_retur...
[ "def", "simplify_parfor_body_CFG", "(", "blocks", ")", ":", "for", "block", "in", "blocks", ".", "values", "(", ")", ":", "for", "stmt", "in", "block", ".", "body", ":", "if", "isinstance", "(", "stmt", ",", "Parfor", ")", ":", "parfor", "=", "stmt", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/parfor.py#L3802-L3820
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/ttk.py
python
Entry.__init__
(self, master=None, widget=None, **kw)
Constructs a Ttk Entry widget with the parent master. STANDARD OPTIONS class, cursor, style, takefocus, xscrollcommand WIDGET-SPECIFIC OPTIONS exportselection, invalidcommand, justify, show, state, textvariable, validate, validatecommand, width VALIDATION...
Constructs a Ttk Entry widget with the parent master.
[ "Constructs", "a", "Ttk", "Entry", "widget", "with", "the", "parent", "master", "." ]
def __init__(self, master=None, widget=None, **kw): """Constructs a Ttk Entry widget with the parent master. STANDARD OPTIONS class, cursor, style, takefocus, xscrollcommand WIDGET-SPECIFIC OPTIONS exportselection, invalidcommand, justify, show, state, tex...
[ "def", "__init__", "(", "self", ",", "master", "=", "None", ",", "widget", "=", "None", ",", "*", "*", "kw", ")", ":", "Widget", ".", "__init__", "(", "self", ",", "master", ",", "widget", "or", "\"ttk::entry\"", ",", "kw", ")" ]
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/ttk.py#L650-L666
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/contrib/seq2seq/python/ops/beam_search_decoder.py
python
_tensor_gather_helper
(gather_indices, gather_from, batch_size, range_size, gather_shape, name=None)
Helper for gathering the right indices from the tensor. This works by reshaping gather_from to gather_shape (e.g. [-1]) and then gathering from that according to the gather_indices, which are offset by the right amounts in order to preserve the batch order. Args: gather_indices: The tensor indices that we...
Helper for gathering the right indices from the tensor.
[ "Helper", "for", "gathering", "the", "right", "indices", "from", "the", "tensor", "." ]
def _tensor_gather_helper(gather_indices, gather_from, batch_size, range_size, gather_shape, name=None): """Helper for gathering the right indices from the tensor. This works by reshaping gather_from to gather_shape (e.g. [-1]) and then gathering from that according to the gather_indice...
[ "def", "_tensor_gather_helper", "(", "gather_indices", ",", "gather_from", ",", "batch_size", ",", "range_size", ",", "gather_shape", ",", "name", "=", "None", ")", ":", "with", "ops", ".", "name_scope", "(", "name", ",", "\"tensor_gather_helper\"", ")", ":", ...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/contrib/seq2seq/python/ops/beam_search_decoder.py#L771-L808
peterljq/OpenMMD
795d4dd660cf7e537ceb599fdb038c5388b33390
3D Pose Baseline to VMD/src/cameras.py
python
load_cameras
( bpath='cameras.h5', subjects=[1,5,6,7,8,9,11] )
return rcams
Loads the cameras of h36m Args bpath: path to hdf5 file with h36m camera data subjects: List of ints representing the subject IDs for which cameras are requested Returns rcams: dictionary of 4 tuples per subject ID containing its camera parameters for the 4 h36m cams
Loads the cameras of h36m
[ "Loads", "the", "cameras", "of", "h36m" ]
def load_cameras( bpath='cameras.h5', subjects=[1,5,6,7,8,9,11] ): """Loads the cameras of h36m Args bpath: path to hdf5 file with h36m camera data subjects: List of ints representing the subject IDs for which cameras are requested Returns rcams: dictionary of 4 tuples per subject ID containing its c...
[ "def", "load_cameras", "(", "bpath", "=", "'cameras.h5'", ",", "subjects", "=", "[", "1", ",", "5", ",", "6", ",", "7", ",", "8", ",", "9", ",", "11", "]", ")", ":", "rcams", "=", "{", "}", "with", "h5py", ".", "File", "(", "bpath", ",", "'r'...
https://github.com/peterljq/OpenMMD/blob/795d4dd660cf7e537ceb599fdb038c5388b33390/3D Pose Baseline to VMD/src/cameras.py#L122-L138
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/ConfigParser.py
python
RawConfigParser.readfp
(self, fp, filename=None)
Like read() but the argument must be a file-like object. The `fp' argument must have a `readline' method. Optional second argument is the `filename', which if not given, is taken from fp.name. If fp has no `name' attribute, `<???>' is used.
Like read() but the argument must be a file-like object.
[ "Like", "read", "()", "but", "the", "argument", "must", "be", "a", "file", "-", "like", "object", "." ]
def readfp(self, fp, filename=None): """Like read() but the argument must be a file-like object. The `fp' argument must have a `readline' method. Optional second argument is the `filename', which if not given, is taken from fp.name. If fp has no `name' attribute, `<???>' is us...
[ "def", "readfp", "(", "self", ",", "fp", ",", "filename", "=", "None", ")", ":", "if", "filename", "is", "None", ":", "try", ":", "filename", "=", "fp", ".", "name", "except", "AttributeError", ":", "filename", "=", "'<???>'", "self", ".", "_read", "...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/ConfigParser.py#L310-L324
neoml-lib/neoml
a0d370fba05269a1b2258cef126f77bbd2054a3e
NeoML/Python/neoml/Dnn/BatchNormalization.py
python
BatchNormalization.slow_convergence_rate
(self, slow_convergence_rate)
Sets the coefficient for calculating the exponential moving mean and variance.
Sets the coefficient for calculating the exponential moving mean and variance.
[ "Sets", "the", "coefficient", "for", "calculating", "the", "exponential", "moving", "mean", "and", "variance", "." ]
def slow_convergence_rate(self, slow_convergence_rate): """Sets the coefficient for calculating the exponential moving mean and variance. """ if slow_convergence_rate <= 0 or slow_convergence_rate > 1: raise ValueError('The `slow_convergence_rate` must be in (0, 1].') ...
[ "def", "slow_convergence_rate", "(", "self", ",", "slow_convergence_rate", ")", ":", "if", "slow_convergence_rate", "<=", "0", "or", "slow_convergence_rate", ">", "1", ":", "raise", "ValueError", "(", "'The `slow_convergence_rate` must be in (0, 1].'", ")", "self", ".",...
https://github.com/neoml-lib/neoml/blob/a0d370fba05269a1b2258cef126f77bbd2054a3e/NeoML/Python/neoml/Dnn/BatchNormalization.py#L92-L99
SoarGroup/Soar
a1c5e249499137a27da60533c72969eef3b8ab6b
scons/scons-local-4.1.0/SCons/Node/__init__.py
python
Node.set_always_build
(self, always_build = 1)
Set the Node's always_build value.
Set the Node's always_build value.
[ "Set", "the", "Node", "s", "always_build", "value", "." ]
def set_always_build(self, always_build = 1): """Set the Node's always_build value.""" self.always_build = always_build
[ "def", "set_always_build", "(", "self", ",", "always_build", "=", "1", ")", ":", "self", ".", "always_build", "=", "always_build" ]
https://github.com/SoarGroup/Soar/blob/a1c5e249499137a27da60533c72969eef3b8ab6b/scons/scons-local-4.1.0/SCons/Node/__init__.py#L1245-L1247
seqan/seqan
f5f658343c366c9c3d44ba358ffc9317e78a09ed
util/py_lib/seqan/dddoc/core.py
python
App.getNextId
(self)
return self.next_id - 1
Returns an identifier. Each id is only returned once.
Returns an identifier.
[ "Returns", "an", "identifier", "." ]
def getNextId(self): """Returns an identifier. Each id is only returned once. """ assert False, "For future use." self.next_id += 1 return self.next_id - 1
[ "def", "getNextId", "(", "self", ")", ":", "assert", "False", ",", "\"For future use.\"", "self", ".", "next_id", "+=", "1", "return", "self", ".", "next_id", "-", "1" ]
https://github.com/seqan/seqan/blob/f5f658343c366c9c3d44ba358ffc9317e78a09ed/util/py_lib/seqan/dddoc/core.py#L1026-L1033
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
gpu/command_buffer/build_gles2_cmd_buffer.py
python
TypeHandler.WriteClientGLReturnLog
(self, func, file)
Writes the return value logging code.
Writes the return value logging code.
[ "Writes", "the", "return", "value", "logging", "code", "." ]
def WriteClientGLReturnLog(self, func, file): """Writes the return value logging code.""" if func.return_type != "void": file.Write(' GPU_CLIENT_LOG("return:" << result)\n')
[ "def", "WriteClientGLReturnLog", "(", "self", ",", "func", ",", "file", ")", ":", "if", "func", ".", "return_type", "!=", "\"void\"", ":", "file", ".", "Write", "(", "' GPU_CLIENT_LOG(\"return:\" << result)\\n'", ")" ]
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/gpu/command_buffer/build_gles2_cmd_buffer.py#L2197-L2200
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/training/optimizer.py
python
Optimizer._apply_sparse
(self, grad, var)
Add ops to apply sparse gradients to `var`. Args: grad: `IndexedSlices`. var: A `Variable` object. Return: An `Operation`.
Add ops to apply sparse gradients to `var`.
[ "Add", "ops", "to", "apply", "sparse", "gradients", "to", "var", "." ]
def _apply_sparse(self, grad, var): """Add ops to apply sparse gradients to `var`. Args: grad: `IndexedSlices`. var: A `Variable` object. Return: An `Operation`. """ raise NotImplementedError()
[ "def", "_apply_sparse", "(", "self", ",", "grad", ",", "var", ")", ":", "raise", "NotImplementedError", "(", ")" ]
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/training/optimizer.py#L413-L423
albertz/openlierox
d316c14a8eb57848ef56e9bfa7b23a56f694a51b
tools/DedicatedServerVideo/gdata/apps/service.py
python
PropertyService.AddAllElementsFromAllPages
(self, link_finder, func)
return link_finder
retrieve all pages and add all elements
retrieve all pages and add all elements
[ "retrieve", "all", "pages", "and", "add", "all", "elements" ]
def AddAllElementsFromAllPages(self, link_finder, func): """retrieve all pages and add all elements""" next = link_finder.GetNextLink() while next is not None: next_feed = self.Get(next.href, converter=func) for a_entry in next_feed.entry: link_finder.entry.append(a_entry) next = n...
[ "def", "AddAllElementsFromAllPages", "(", "self", ",", "link_finder", ",", "func", ")", ":", "next", "=", "link_finder", ".", "GetNextLink", "(", ")", "while", "next", "is", "not", "None", ":", "next_feed", "=", "self", ".", "Get", "(", "next", ".", "hre...
https://github.com/albertz/openlierox/blob/d316c14a8eb57848ef56e9bfa7b23a56f694a51b/tools/DedicatedServerVideo/gdata/apps/service.py#L485-L493
NVIDIA/DALI
bf16cc86ba8f091b145f91962f21fe1b6aff243d
third_party/cpplint.py
python
_IncludeState.IsInAlphabeticalOrder
(self, clean_lines, linenum, header_path)
return True
Check if a header is in alphabetical order with the previous header. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. header_path: Canonicalized header to be checked. Returns: Returns true if the header is in alphabetical order.
Check if a header is in alphabetical order with the previous header.
[ "Check", "if", "a", "header", "is", "in", "alphabetical", "order", "with", "the", "previous", "header", "." ]
def IsInAlphabeticalOrder(self, clean_lines, linenum, header_path): """Check if a header is in alphabetical order with the previous header. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. header_path: Canonicalized header to be checke...
[ "def", "IsInAlphabeticalOrder", "(", "self", ",", "clean_lines", ",", "linenum", ",", "header_path", ")", ":", "# If previous section is different from current section, _last_header will", "# be reset to empty string, so it's always less than current header.", "#", "# If previous line ...
https://github.com/NVIDIA/DALI/blob/bf16cc86ba8f091b145f91962f21fe1b6aff243d/third_party/cpplint.py#L785-L804
interpretml/interpret
29466bffc04505fe4f836a83fcfebfd313ac8454
python/interpret-core/interpret/glassbox/ebm/internal.py
python
Booster.generate_term_update
( self, term_idx, generate_update_options, learning_rate, min_samples_leaf, max_leaves, )
return gain.value
Generates a boosting step update per feature by growing a shallow decision tree. Args: term_idx: The index for the term to generate the update for generate_update_options: C interface options learning_rate: Learning rate as a float. min_samples_leaf: ...
Generates a boosting step update per feature by growing a shallow decision tree.
[ "Generates", "a", "boosting", "step", "update", "per", "feature", "by", "growing", "a", "shallow", "decision", "tree", "." ]
def generate_term_update( self, term_idx, generate_update_options, learning_rate, min_samples_leaf, max_leaves, ): """ Generates a boosting step update per feature by growing a shallow decision tree. Args: term_idx: The ...
[ "def", "generate_term_update", "(", "self", ",", "term_idx", ",", "generate_update_options", ",", "learning_rate", ",", "min_samples_leaf", ",", "max_leaves", ",", ")", ":", "# log.debug(\"Boosting step start\")", "self", ".", "_term_idx", "=", "-", "1", "native", "...
https://github.com/interpretml/interpret/blob/29466bffc04505fe4f836a83fcfebfd313ac8454/python/interpret-core/interpret/glassbox/ebm/internal.py#L1089-L1137
pmq20/node-packer
12c46c6e44fbc14d9ee645ebd17d5296b324f7e0
lts/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
python
_PrepareListOfSources
(spec, generator_flags, gyp_file)
return (sources, excluded_sources)
Prepare list of sources and excluded sources. Besides the sources specified directly in the spec, adds the gyp file so that a change to it will cause a re-compile. Also adds appropriate sources for actions and copies. Assumes later stage will un-exclude files which have custom build steps attached. Argument...
Prepare list of sources and excluded sources.
[ "Prepare", "list", "of", "sources", "and", "excluded", "sources", "." ]
def _PrepareListOfSources(spec, generator_flags, gyp_file): """Prepare list of sources and excluded sources. Besides the sources specified directly in the spec, adds the gyp file so that a change to it will cause a re-compile. Also adds appropriate sources for actions and copies. Assumes later stage will un-ex...
[ "def", "_PrepareListOfSources", "(", "spec", ",", "generator_flags", ",", "gyp_file", ")", ":", "sources", "=", "OrderedSet", "(", ")", "_AddNormalizedSources", "(", "sources", ",", "spec", ".", "get", "(", "'sources'", ",", "[", "]", ")", ")", "excluded_sou...
https://github.com/pmq20/node-packer/blob/12c46c6e44fbc14d9ee645ebd17d5296b324f7e0/lts/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py#L1446-L1482
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_internal/exceptions.py
python
HashMismatch.__init__
(self, allowed, gots)
:param allowed: A dict of algorithm names pointing to lists of allowed hex digests :param gots: A dict of algorithm names pointing to hashes we actually got from the files under suspicion
:param allowed: A dict of algorithm names pointing to lists of allowed hex digests :param gots: A dict of algorithm names pointing to hashes we actually got from the files under suspicion
[ ":", "param", "allowed", ":", "A", "dict", "of", "algorithm", "names", "pointing", "to", "lists", "of", "allowed", "hex", "digests", ":", "param", "gots", ":", "A", "dict", "of", "algorithm", "names", "pointing", "to", "hashes", "we", "actually", "got", ...
def __init__(self, allowed, gots): # type: (Dict[str, List[str]], Dict[str, _Hash]) -> None """ :param allowed: A dict of algorithm names pointing to lists of allowed hex digests :param gots: A dict of algorithm names pointing to hashes we actually got from the fi...
[ "def", "__init__", "(", "self", ",", "allowed", ",", "gots", ")", ":", "# type: (Dict[str, List[str]], Dict[str, _Hash]) -> None", "self", ".", "allowed", "=", "allowed", "self", ".", "gots", "=", "gots" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_internal/exceptions.py#L317-L326
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/traceback.py
python
print_list
(extracted_list, file=None)
Print the list of tuples as returned by extract_tb() or extract_stack() as a formatted stack trace to the given file.
Print the list of tuples as returned by extract_tb() or extract_stack() as a formatted stack trace to the given file.
[ "Print", "the", "list", "of", "tuples", "as", "returned", "by", "extract_tb", "()", "or", "extract_stack", "()", "as", "a", "formatted", "stack", "trace", "to", "the", "given", "file", "." ]
def print_list(extracted_list, file=None): """Print the list of tuples as returned by extract_tb() or extract_stack() as a formatted stack trace to the given file.""" if file is None: file = sys.stderr for item in StackSummary.from_list(extracted_list).format(): print(item, file=file, en...
[ "def", "print_list", "(", "extracted_list", ",", "file", "=", "None", ")", ":", "if", "file", "is", "None", ":", "file", "=", "sys", ".", "stderr", "for", "item", "in", "StackSummary", ".", "from_list", "(", "extracted_list", ")", ".", "format", "(", "...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/traceback.py#L19-L25
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
ppapi/generators/idl_parser.py
python
IDLParser.p_struct_list
(self, p)
struct_list : member_attribute ';' struct_list | member_function ';' struct_list |
struct_list : member_attribute ';' struct_list | member_function ';' struct_list |
[ "struct_list", ":", "member_attribute", ";", "struct_list", "|", "member_function", ";", "struct_list", "|" ]
def p_struct_list(self, p): """struct_list : member_attribute ';' struct_list | member_function ';' struct_list |""" if len(p) > 1: p[0] = ListFromConcat(p[1], p[3])
[ "def", "p_struct_list", "(", "self", ",", "p", ")", ":", "if", "len", "(", "p", ")", ">", "1", ":", "p", "[", "0", "]", "=", "ListFromConcat", "(", "p", "[", "1", "]", ",", "p", "[", "3", "]", ")" ]
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/ppapi/generators/idl_parser.py#L799-L803
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/bdb.py
python
Bdb.user_exception
(self, frame, exc_info)
This method is called if an exception occurs, but only if we are to stop at or just below this level.
This method is called if an exception occurs, but only if we are to stop at or just below this level.
[ "This", "method", "is", "called", "if", "an", "exception", "occurs", "but", "only", "if", "we", "are", "to", "stop", "at", "or", "just", "below", "this", "level", "." ]
def user_exception(self, frame, exc_info): exc_type, exc_value, exc_traceback = exc_info """This method is called if an exception occurs, but only if we are to stop at or just below this level.""" pass
[ "def", "user_exception", "(", "self", ",", "frame", ",", "exc_info", ")", ":", "exc_type", ",", "exc_value", ",", "exc_traceback", "=", "exc_info", "pass" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/bdb.py#L170-L174
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/init_ops_v2.py
python
he_uniform
(seed=None)
return VarianceScaling( scale=2., mode="fan_in", distribution="uniform", seed=seed)
He uniform variance scaling initializer. It draws samples from a uniform distribution within [-limit, limit] where `limit` is `sqrt(6 / fan_in)` where `fan_in` is the number of input units in the weight tensor. Arguments: seed: A Python integer. Used to seed the random generator. Returns: An initia...
He uniform variance scaling initializer.
[ "He", "uniform", "variance", "scaling", "initializer", "." ]
def he_uniform(seed=None): """He uniform variance scaling initializer. It draws samples from a uniform distribution within [-limit, limit] where `limit` is `sqrt(6 / fan_in)` where `fan_in` is the number of input units in the weight tensor. Arguments: seed: A Python integer. Used to seed the random gene...
[ "def", "he_uniform", "(", "seed", "=", "None", ")", ":", "return", "VarianceScaling", "(", "scale", "=", "2.", ",", "mode", "=", "\"fan_in\"", ",", "distribution", "=", "\"uniform\"", ",", "seed", "=", "seed", ")" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/init_ops_v2.py#L702-L720
microsoft/ivy
9f3c7ecc0b2383129fdd0953e10890d98d09a82d
ivy/ivy_parser.py
python
p_action_let_eqns_lcb_action_rcb
(p)
action : LET eqns sequence
action : LET eqns sequence
[ "action", ":", "LET", "eqns", "sequence" ]
def p_action_let_eqns_lcb_action_rcb(p): 'action : LET eqns sequence' p[0] = LetAction(*(p[2]+[p[3]]))
[ "def", "p_action_let_eqns_lcb_action_rcb", "(", "p", ")", ":", "p", "[", "0", "]", "=", "LetAction", "(", "*", "(", "p", "[", "2", "]", "+", "[", "p", "[", "3", "]", "]", ")", ")" ]
https://github.com/microsoft/ivy/blob/9f3c7ecc0b2383129fdd0953e10890d98d09a82d/ivy/ivy_parser.py#L2421-L2423
TheImagingSource/tiscamera
baacb4cfaa7858c2e6cfb4f1a297b404c4e002f6
tools/tcam-capture/tcam_capture/TcamSpinBox.py
python
TcamSpinBox.mouseReleaseEvent
(self, event)
Reset mouse related properties
Reset mouse related properties
[ "Reset", "mouse", "related", "properties" ]
def mouseReleaseEvent(self, event): """ Reset mouse related properties """ self.is_active = False super().mouseReleaseEvent(event)
[ "def", "mouseReleaseEvent", "(", "self", ",", "event", ")", ":", "self", ".", "is_active", "=", "False", "super", "(", ")", ".", "mouseReleaseEvent", "(", "event", ")" ]
https://github.com/TheImagingSource/tiscamera/blob/baacb4cfaa7858c2e6cfb4f1a297b404c4e002f6/tools/tcam-capture/tcam_capture/TcamSpinBox.py#L58-L63
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/urllib/parse.py
python
unquote
(string, encoding='utf-8', errors='replace')
return ''.join(res)
Replace %xx escapes by their single-character equivalent. The optional encoding and errors parameters specify how to decode percent-encoded sequences into Unicode characters, as accepted by the bytes.decode() method. By default, percent-encoded sequences are decoded with UTF-8, and invalid sequences...
Replace %xx escapes by their single-character equivalent. The optional encoding and errors parameters specify how to decode percent-encoded sequences into Unicode characters, as accepted by the bytes.decode() method. By default, percent-encoded sequences are decoded with UTF-8, and invalid sequences...
[ "Replace", "%xx", "escapes", "by", "their", "single", "-", "character", "equivalent", ".", "The", "optional", "encoding", "and", "errors", "parameters", "specify", "how", "to", "decode", "percent", "-", "encoded", "sequences", "into", "Unicode", "characters", "a...
def unquote(string, encoding='utf-8', errors='replace'): """Replace %xx escapes by their single-character equivalent. The optional encoding and errors parameters specify how to decode percent-encoded sequences into Unicode characters, as accepted by the bytes.decode() method. By default, percent-enc...
[ "def", "unquote", "(", "string", ",", "encoding", "=", "'utf-8'", ",", "errors", "=", "'replace'", ")", ":", "if", "'%'", "not", "in", "string", ":", "string", ".", "split", "return", "string", "if", "encoding", "is", "None", ":", "encoding", "=", "'ut...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/urllib/parse.py#L619-L642
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/backcall/backcall/_signatures.py
python
Signature.replace
(self, parameters=_void, return_annotation=_void)
return type(self)(parameters, return_annotation=return_annotation)
Creates a customized copy of the Signature. Pass 'parameters' and/or 'return_annotation' arguments to override them in the new copy.
Creates a customized copy of the Signature. Pass 'parameters' and/or 'return_annotation' arguments to override them in the new copy.
[ "Creates", "a", "customized", "copy", "of", "the", "Signature", ".", "Pass", "parameters", "and", "/", "or", "return_annotation", "arguments", "to", "override", "them", "in", "the", "new", "copy", "." ]
def replace(self, parameters=_void, return_annotation=_void): '''Creates a customized copy of the Signature. Pass 'parameters' and/or 'return_annotation' arguments to override them in the new copy. ''' if parameters is _void: parameters = self.parameters.values() ...
[ "def", "replace", "(", "self", ",", "parameters", "=", "_void", ",", "return_annotation", "=", "_void", ")", ":", "if", "parameters", "is", "_void", ":", "parameters", "=", "self", ".", "parameters", ".", "values", "(", ")", "if", "return_annotation", "is"...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/backcall/backcall/_signatures.py#L597-L610
wisdompeak/LeetCode
ef729c1249ead3ead47f1a94b5eeb5958a69e152
Dynamic_Programming/940.Distinct-Subsequences-II/940.Distinct-Subsequences-II.py
python
Solution.distinctSubseqII
(self, S)
return int(dp)
:type S: str :rtype: int
:type S: str :rtype: int
[ ":", "type", "S", ":", "str", ":", "rtype", ":", "int" ]
def distinctSubseqII(self, S): """ :type S: str :rtype: int """ last = [0 for _ in range(26)] dp = 0 M = 1e9+7 for ch in S: dp_temp = dp dp = dp_temp + (dp_temp +1 - last[ord(ch)-ord('a')]) ...
[ "def", "distinctSubseqII", "(", "self", ",", "S", ")", ":", "last", "=", "[", "0", "for", "_", "in", "range", "(", "26", ")", "]", "dp", "=", "0", "M", "=", "1e9", "+", "7", "for", "ch", "in", "S", ":", "dp_temp", "=", "dp", "dp", "=", "dp_...
https://github.com/wisdompeak/LeetCode/blob/ef729c1249ead3ead47f1a94b5eeb5958a69e152/Dynamic_Programming/940.Distinct-Subsequences-II/940.Distinct-Subsequences-II.py#L2-L17
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py
python
AppleScript_Suite_Events.start_log
(self, _no_object=None, _attributes={}, **_arguments)
start log: Start event logging in the script editor Keyword argument _attributes: AppleEvent attribute dictionary
start log: Start event logging in the script editor Keyword argument _attributes: AppleEvent attribute dictionary
[ "start", "log", ":", "Start", "event", "logging", "in", "the", "script", "editor", "Keyword", "argument", "_attributes", ":", "AppleEvent", "attribute", "dictionary" ]
def start_log(self, _no_object=None, _attributes={}, **_arguments): """start log: Start event logging in the script editor Keyword argument _attributes: AppleEvent attribute dictionary """ _code = 'ToyS' _subcode = 'log1' if _arguments: raise TypeError, 'No optional args...
[ "def", "start_log", "(", "self", ",", "_no_object", "=", "None", ",", "_attributes", "=", "{", "}", ",", "*", "*", "_arguments", ")", ":", "_code", "=", "'ToyS'", "_subcode", "=", "'log1'", "if", "_arguments", ":", "raise", "TypeError", ",", "'No optiona...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py#L580-L597
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/email/message.py
python
_formatparam
(param, value=None, quote=True)
Convenience function to format and return a key=value pair. This will quote the value if needed or if quote is true. If value is a three tuple (charset, language, value), it will be encoded according to RFC2231 rules.
Convenience function to format and return a key=value pair.
[ "Convenience", "function", "to", "format", "and", "return", "a", "key", "=", "value", "pair", "." ]
def _formatparam(param, value=None, quote=True): """Convenience function to format and return a key=value pair. This will quote the value if needed or if quote is true. If value is a three tuple (charset, language, value), it will be encoded according to RFC2231 rules. """ if value is not None...
[ "def", "_formatparam", "(", "param", ",", "value", "=", "None", ",", "quote", "=", "True", ")", ":", "if", "value", "is", "not", "None", "and", "len", "(", "value", ")", ">", "0", ":", "# A tuple is used for RFC 2231 encoded parameter values where items", "# a...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/email/message.py#L38-L60
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/telemetry/third_party/mox3/mox3/mox.py
python
And.__init__
(self, *args)
Initialize. Args: *args: One or more Comparator
Initialize.
[ "Initialize", "." ]
def __init__(self, *args): """Initialize. Args: *args: One or more Comparator """ self._comparators = args
[ "def", "__init__", "(", "self", ",", "*", "args", ")", ":", "self", ".", "_comparators", "=", "args" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/telemetry/third_party/mox3/mox3/mox.py#L1745-L1752
PaddlePaddle/Anakin
5fd68a6cc4c4620cd1a30794c1bf06eebd3f4730
tools/external_converter_v2/parser/caffe/parser_caffe.py
python
CaffeParser._UpgradeNetAsNeeded
(self)
same as caffe UpgradeNetAsNeeded.
same as caffe UpgradeNetAsNeeded.
[ "same", "as", "caffe", "UpgradeNetAsNeeded", "." ]
def _UpgradeNetAsNeeded(self): """ same as caffe UpgradeNetAsNeeded. """ if NetNeedsV0ToV1Upgrade(self.net_parameter): # NetParameter was specified using the old style (V0LayerParameter), need to upgrade. logger(verbose.INFO).feed("[ Upgrade Level 1 ] Details: ne...
[ "def", "_UpgradeNetAsNeeded", "(", "self", ")", ":", "if", "NetNeedsV0ToV1Upgrade", "(", "self", ".", "net_parameter", ")", ":", "# NetParameter was specified using the old style (V0LayerParameter), need to upgrade.", "logger", "(", "verbose", ".", "INFO", ")", ".", "feed...
https://github.com/PaddlePaddle/Anakin/blob/5fd68a6cc4c4620cd1a30794c1bf06eebd3f4730/tools/external_converter_v2/parser/caffe/parser_caffe.py#L186-L218
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/masked/timectrl.py
python
TimeCtrl.ChangeValue
(self, value)
Validating ChangeValue function for time values: This function will do dynamic type checking on the value argument, and convert wxDateTime, mxDateTime, or 12/24 format time string into the appropriate format string for the control.
Validating ChangeValue function for time values: This function will do dynamic type checking on the value argument, and convert wxDateTime, mxDateTime, or 12/24 format time string into the appropriate format string for the control.
[ "Validating", "ChangeValue", "function", "for", "time", "values", ":", "This", "function", "will", "do", "dynamic", "type", "checking", "on", "the", "value", "argument", "and", "convert", "wxDateTime", "mxDateTime", "or", "12", "/", "24", "format", "time", "st...
def ChangeValue(self, value): """ Validating ChangeValue function for time values: This function will do dynamic type checking on the value argument, and convert wxDateTime, mxDateTime, or 12/24 format time string into the appropriate format string for the control. """ ##...
[ "def", "ChangeValue", "(", "self", ",", "value", ")", ":", "## dbg('TimeCtrl::ChangeValue(%s)' % repr(value), indent=1)", "try", ":", "strtime", "=", "self", ".", "_toGUI", "(", "self", ".", "__validateValue", "(", "value", ")", ")", "except", ":", "## ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/masked/timectrl.py#L642-L657
manutdzou/KITTI_SSD
5b620c2f291d36a0fe14489214f22a992f173f44
scripts/cpp_lint.py
python
CheckInvalidIncrement
(filename, clean_lines, linenum, error)
Checks for invalid increment *count++. For example following function: void increment_counter(int* count) { *count++; } is invalid, because it effectively does count++, moving pointer, and should be replaced with ++*count, (*count)++ or *count += 1. Args: filename: The name of the current file. ...
Checks for invalid increment *count++.
[ "Checks", "for", "invalid", "increment", "*", "count", "++", "." ]
def CheckInvalidIncrement(filename, clean_lines, linenum, error): """Checks for invalid increment *count++. For example following function: void increment_counter(int* count) { *count++; } is invalid, because it effectively does count++, moving pointer, and should be replaced with ++*count, (*count)++ ...
[ "def", "CheckInvalidIncrement", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "line", "=", "clean_lines", ".", "elided", "[", "linenum", "]", "if", "_RE_PATTERN_INVALID_INCREMENT", ".", "match", "(", "line", ")", ":", "error", ...
https://github.com/manutdzou/KITTI_SSD/blob/5b620c2f291d36a0fe14489214f22a992f173f44/scripts/cpp_lint.py#L1737-L1756
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_controls.py
python
ListCtrl.DeleteColumn
(*args, **kwargs)
return _controls_.ListCtrl_DeleteColumn(*args, **kwargs)
DeleteColumn(self, int col) -> bool
DeleteColumn(self, int col) -> bool
[ "DeleteColumn", "(", "self", "int", "col", ")", "-", ">", "bool" ]
def DeleteColumn(*args, **kwargs): """DeleteColumn(self, int col) -> bool""" return _controls_.ListCtrl_DeleteColumn(*args, **kwargs)
[ "def", "DeleteColumn", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "ListCtrl_DeleteColumn", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_controls.py#L4649-L4651
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/Tix.py
python
ButtonBox.add
(self, name, cnf={}, **kw)
return btn
Add a button with given name to box.
Add a button with given name to box.
[ "Add", "a", "button", "with", "given", "name", "to", "box", "." ]
def add(self, name, cnf={}, **kw): """Add a button with given name to box.""" btn = self.tk.call(self._w, 'add', name, *self._options(cnf, kw)) self.subwidget_list[name] = _dummyButton(self, name) return btn
[ "def", "add", "(", "self", ",", "name", ",", "cnf", "=", "{", "}", ",", "*", "*", "kw", ")", ":", "btn", "=", "self", ".", "tk", ".", "call", "(", "self", ".", "_w", ",", "'add'", ",", "name", ",", "*", "self", ".", "_options", "(", "cnf", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/Tix.py#L566-L571
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_misc.py
python
LogWindow.IsPassingMessages
(*args, **kwargs)
return _misc_.LogWindow_IsPassingMessages(*args, **kwargs)
IsPassingMessages(self) -> bool
IsPassingMessages(self) -> bool
[ "IsPassingMessages", "(", "self", ")", "-", ">", "bool" ]
def IsPassingMessages(*args, **kwargs): """IsPassingMessages(self) -> bool""" return _misc_.LogWindow_IsPassingMessages(*args, **kwargs)
[ "def", "IsPassingMessages", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_misc_", ".", "LogWindow_IsPassingMessages", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_misc.py#L1782-L1784
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/customtreectrl.py
python
CustomTreeCtrl.GetSecondGradientColour
(self)
return self._secondcolour
Returns the second gradient colour for gradient-style selections. :return: An instance of :class:`Colour`.
Returns the second gradient colour for gradient-style selections.
[ "Returns", "the", "second", "gradient", "colour", "for", "gradient", "-", "style", "selections", "." ]
def GetSecondGradientColour(self): """ Returns the second gradient colour for gradient-style selections. :return: An instance of :class:`Colour`. """ return self._secondcolour
[ "def", "GetSecondGradientColour", "(", "self", ")", ":", "return", "self", ".", "_secondcolour" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/customtreectrl.py#L4080-L4087
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/wsgiref/simple_server.py
python
WSGIServer.server_bind
(self)
Override server_bind to store the server name.
Override server_bind to store the server name.
[ "Override", "server_bind", "to", "store", "the", "server", "name", "." ]
def server_bind(self): """Override server_bind to store the server name.""" HTTPServer.server_bind(self) self.setup_environ()
[ "def", "server_bind", "(", "self", ")", ":", "HTTPServer", ".", "server_bind", "(", "self", ")", "self", ".", "setup_environ", "(", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/wsgiref/simple_server.py#L46-L49
apache/incubator-mxnet
f03fb23f1d103fec9541b5ae59ee06b1734a51d9
python/mxnet/recordio.py
python
pack_img
(header, img, quality=95, img_fmt='.jpg')
return pack(header, buf.tostring())
Pack an image into ``MXImageRecord``. Parameters ---------- header : IRHeader Header of the image record. ``header.label`` can be a number or an array. See more detail in ``IRHeader``. img : numpy.ndarray Image to be packed. quality : int Quality for JPEG encoding in...
Pack an image into ``MXImageRecord``.
[ "Pack", "an", "image", "into", "MXImageRecord", "." ]
def pack_img(header, img, quality=95, img_fmt='.jpg'): """Pack an image into ``MXImageRecord``. Parameters ---------- header : IRHeader Header of the image record. ``header.label`` can be a number or an array. See more detail in ``IRHeader``. img : numpy.ndarray Image to be ...
[ "def", "pack_img", "(", "header", ",", "img", ",", "quality", "=", "95", ",", "img_fmt", "=", "'.jpg'", ")", ":", "assert", "cv2", "is", "not", "None", "jpg_formats", "=", "[", "'.JPG'", ",", "'.JPEG'", "]", "png_formats", "=", "[", "'.PNG'", "]", "e...
https://github.com/apache/incubator-mxnet/blob/f03fb23f1d103fec9541b5ae59ee06b1734a51d9/python/mxnet/recordio.py#L470-L509
alibaba/weex_js_engine
2bdf4b6f020c1fc99c63f649718f6faf7e27fdde
jni/v8core/v8/build/gyp/pylib/gyp/xcodeproj_file.py
python
XCHierarchicalElement.Hashables
(self)
return hashables
Custom hashables for XCHierarchicalElements. XCHierarchicalElements are special. Generally, their hashes shouldn't change if the paths don't change. The normal XCObject implementation of Hashables adds a hashable for each object, which means that if the hierarchical structure changes (possibly due to...
Custom hashables for XCHierarchicalElements.
[ "Custom", "hashables", "for", "XCHierarchicalElements", "." ]
def Hashables(self): """Custom hashables for XCHierarchicalElements. XCHierarchicalElements are special. Generally, their hashes shouldn't change if the paths don't change. The normal XCObject implementation of Hashables adds a hashable for each object, which means that if the hierarchical struct...
[ "def", "Hashables", "(", "self", ")", ":", "if", "self", "==", "self", ".", "PBXProjectAncestor", "(", ")", ".", "_properties", "[", "'mainGroup'", "]", ":", "# super", "return", "XCObject", ".", "Hashables", "(", "self", ")", "hashables", "=", "[", "]",...
https://github.com/alibaba/weex_js_engine/blob/2bdf4b6f020c1fc99c63f649718f6faf7e27fdde/jni/v8core/v8/build/gyp/pylib/gyp/xcodeproj_file.py#L952-L1005
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
build/android/pylib/android_commands.py
python
AndroidCommands.GetMemoryUsageForPackage
(self, package)
return usage_dict, smaps
Returns the memory usage for all processes whose name contains |pacakge|. Args: package: A string holding process name to lookup pid list for. Returns: A tuple containg: [0]: Dict of {metric:usage_kb}, summed over all pids associated with |name|. The metric keys which may be...
Returns the memory usage for all processes whose name contains |pacakge|.
[ "Returns", "the", "memory", "usage", "for", "all", "processes", "whose", "name", "contains", "|pacakge|", "." ]
def GetMemoryUsageForPackage(self, package): """Returns the memory usage for all processes whose name contains |pacakge|. Args: package: A string holding process name to lookup pid list for. Returns: A tuple containg: [0]: Dict of {metric:usage_kb}, summed over all pids associated with ...
[ "def", "GetMemoryUsageForPackage", "(", "self", ",", "package", ")", ":", "usage_dict", "=", "collections", ".", "defaultdict", "(", "int", ")", "pid_list", "=", "self", ".", "ExtractPid", "(", "package", ")", "smaps", "=", "collections", ".", "defaultdict", ...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/build/android/pylib/android_commands.py#L1564-L1589
root-project/root
fcd3583bb14852bf2e8cd2415717cbaac0e75896
documentation/doxygen/converttonotebook.py
python
cppComments
(text)
return newtext
Converts comments delimited by // and on a new line into a markdown cell. For C++ files only. >>> cppComments('''// This is a ... // multiline comment ... void function(){}''') '# <markdowncell>\\n# This is a\\n# multiline comment\\n# <codecell>\\nvoid function(){}\\n' >>> cppComments('''void funct...
Converts comments delimited by // and on a new line into a markdown cell. For C++ files only. >>> cppComments('''// This is a ... // multiline comment ... void function(){}''') '# <markdowncell>\\n# This is a\\n# multiline comment\\n# <codecell>\\nvoid function(){}\\n' >>> cppComments('''void funct...
[ "Converts", "comments", "delimited", "by", "//", "and", "on", "a", "new", "line", "into", "a", "markdown", "cell", ".", "For", "C", "++", "files", "only", ".", ">>>", "cppComments", "(", "//", "This", "is", "a", "...", "//", "multiline", "comment", ".....
def cppComments(text): """ Converts comments delimited by // and on a new line into a markdown cell. For C++ files only. >>> cppComments('''// This is a ... // multiline comment ... void function(){}''') '# <markdowncell>\\n# This is a\\n# multiline comment\\n# <codecell>\\nvoid function(){}\\n...
[ "def", "cppComments", "(", "text", ")", ":", "text", "=", "text", ".", "splitlines", "(", ")", "newtext", "=", "''", "inComment", "=", "False", "for", "line", "in", "text", ":", "if", "line", ".", "startswith", "(", "\"//\"", ")", "and", "not", "inCo...
https://github.com/root-project/root/blob/fcd3583bb14852bf2e8cd2415717cbaac0e75896/documentation/doxygen/converttonotebook.py#L339-L373
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/asyncio/base_events.py
python
BaseEventLoop.create_connection
( self, protocol_factory, host=None, port=None, *, ssl=None, family=0, proto=0, flags=0, sock=None, local_addr=None, server_hostname=None, ssl_handshake_timeout=None)
return transport, protocol
Connect to a TCP server. Create a streaming transport connection to a given Internet host and port: socket family AF_INET or socket.AF_INET6 depending on host (or family if specified), socket type SOCK_STREAM. protocol_factory must be a callable returning a protocol instance. T...
Connect to a TCP server.
[ "Connect", "to", "a", "TCP", "server", "." ]
async def create_connection( self, protocol_factory, host=None, port=None, *, ssl=None, family=0, proto=0, flags=0, sock=None, local_addr=None, server_hostname=None, ssl_handshake_timeout=None): """Connect to a TCP server. Create a streaming t...
[ "async", "def", "create_connection", "(", "self", ",", "protocol_factory", ",", "host", "=", "None", ",", "port", "=", "None", ",", "*", ",", "ssl", "=", "None", ",", "family", "=", "0", ",", "proto", "=", "0", ",", "flags", "=", "0", ",", "sock", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/asyncio/base_events.py#L866-L996
CanalTP/navitia
cb84ce9859070187e708818b058e6a7e0b7f891b
source/jormungandr/jormungandr/scenarios/new_default.py
python
get_kraken_id
(entrypoint_detail)
return '{};{}'.format(coord['lon'], coord['lat'])
returns a usable id for kraken from the entrypoint detail returns None if the original ID needs to be kept
returns a usable id for kraken from the entrypoint detail returns None if the original ID needs to be kept
[ "returns", "a", "usable", "id", "for", "kraken", "from", "the", "entrypoint", "detail", "returns", "None", "if", "the", "original", "ID", "needs", "to", "be", "kept" ]
def get_kraken_id(entrypoint_detail): """ returns a usable id for kraken from the entrypoint detail returns None if the original ID needs to be kept """ if not entrypoint_detail: # impossible to find the object return None emb_type = entrypoint_detail.get('embedded_type') if...
[ "def", "get_kraken_id", "(", "entrypoint_detail", ")", ":", "if", "not", "entrypoint_detail", ":", "# impossible to find the object", "return", "None", "emb_type", "=", "entrypoint_detail", ".", "get", "(", "'embedded_type'", ")", "if", "emb_type", "in", "(", "'stop...
https://github.com/CanalTP/navitia/blob/cb84ce9859070187e708818b058e6a7e0b7f891b/source/jormungandr/jormungandr/scenarios/new_default.py#L868-L889
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/_vendor/six.py
python
python_2_unicode_compatible
(klass)
return klass
A decorator that defines __unicode__ and __str__ methods under Python 2. Under Python 3 it does nothing. To support Python 2 and 3 with a single code base, define a __str__ method returning text and apply this decorator to the class.
A decorator that defines __unicode__ and __str__ methods under Python 2. Under Python 3 it does nothing.
[ "A", "decorator", "that", "defines", "__unicode__", "and", "__str__", "methods", "under", "Python", "2", ".", "Under", "Python", "3", "it", "does", "nothing", "." ]
def python_2_unicode_compatible(klass): """ A decorator that defines __unicode__ and __str__ methods under Python 2. Under Python 3 it does nothing. To support Python 2 and 3 with a single code base, define a __str__ method returning text and apply this decorator to the class. """ if PY2: ...
[ "def", "python_2_unicode_compatible", "(", "klass", ")", ":", "if", "PY2", ":", "if", "'__str__'", "not", "in", "klass", ".", "__dict__", ":", "raise", "ValueError", "(", "\"@python_2_unicode_compatible cannot be applied \"", "\"to %s because it doesn't define __str__().\""...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/_vendor/six.py#L828-L843
nodejs/nan
8db8c8f544f2b6ce1b0859ef6ecdd0a3873a9e62
cpplint.py
python
CheckSpacingForFunctionCall
(filename, clean_lines, linenum, error)
Checks for the correctness of various spacing around function calls. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found.
Checks for the correctness of various spacing around function calls.
[ "Checks", "for", "the", "correctness", "of", "various", "spacing", "around", "function", "calls", "." ]
def CheckSpacingForFunctionCall(filename, clean_lines, linenum, error): """Checks for the correctness of various spacing around function calls. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: T...
[ "def", "CheckSpacingForFunctionCall", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "line", "=", "clean_lines", ".", "elided", "[", "linenum", "]", "# Since function calls often occur inside if/for/while/switch", "# expressions - which have th...
https://github.com/nodejs/nan/blob/8db8c8f544f2b6ce1b0859ef6ecdd0a3873a9e62/cpplint.py#L3177-L3251
deepmind/open_spiel
4ca53bea32bb2875c7385d215424048ae92f78c8
open_spiel/python/algorithms/psro_v2/meta_strategies.py
python
uniform_strategy
(solver, return_joint=False)
Returns a Random Uniform distribution on policies. Args: solver: GenPSROSolver instance. return_joint: If true, only returns marginals. Otherwise marginals as well as joint probabilities. Returns: uniform distribution on strategies.
Returns a Random Uniform distribution on policies.
[ "Returns", "a", "Random", "Uniform", "distribution", "on", "policies", "." ]
def uniform_strategy(solver, return_joint=False): """Returns a Random Uniform distribution on policies. Args: solver: GenPSROSolver instance. return_joint: If true, only returns marginals. Otherwise marginals as well as joint probabilities. Returns: uniform distribution on strategies. """ ...
[ "def", "uniform_strategy", "(", "solver", ",", "return_joint", "=", "False", ")", ":", "policies", "=", "solver", ".", "get_policies", "(", ")", "policy_lengths", "=", "[", "len", "(", "pol", ")", "for", "pol", "in", "policies", "]", "result", "=", "[", ...
https://github.com/deepmind/open_spiel/blob/4ca53bea32bb2875c7385d215424048ae92f78c8/open_spiel/python/algorithms/psro_v2/meta_strategies.py#L28-L46
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scikit-learn/py2/sklearn/feature_extraction/text.py
python
CountVectorizer.get_feature_names
(self)
return [t for t, i in sorted(six.iteritems(self.vocabulary_), key=itemgetter(1))]
Array mapping from feature integer indices to feature name
Array mapping from feature integer indices to feature name
[ "Array", "mapping", "from", "feature", "integer", "indices", "to", "feature", "name" ]
def get_feature_names(self): """Array mapping from feature integer indices to feature name""" self._check_vocabulary() return [t for t, i in sorted(six.iteritems(self.vocabulary_), key=itemgetter(1))]
[ "def", "get_feature_names", "(", "self", ")", ":", "self", ".", "_check_vocabulary", "(", ")", "return", "[", "t", "for", "t", ",", "i", "in", "sorted", "(", "six", ".", "iteritems", "(", "self", ".", "vocabulary_", ")", ",", "key", "=", "itemgetter", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scikit-learn/py2/sklearn/feature_extraction/text.py#L928-L933
Kitware/ParaView
f760af9124ff4634b23ebbeab95a4f56e0261955
ThirdParty/cinema/paraview/tpl/cinema_python/adaptors/paraview/pv_explorers.py
python
Camera.execute
(self, document)
moves camera into position for the current phi, theta value
moves camera into position for the current phi, theta value
[ "moves", "camera", "into", "position", "for", "the", "current", "phi", "theta", "value" ]
def execute(self, document): """moves camera into position for the current phi, theta value""" theta = document.descriptor['theta'] phi = document.descriptor['phi'] theta_rad = float(theta) / 180.0 * math.pi phi_rad = float(phi) / 180.0 * math.pi pos = [ math...
[ "def", "execute", "(", "self", ",", "document", ")", ":", "theta", "=", "document", ".", "descriptor", "[", "'theta'", "]", "phi", "=", "document", ".", "descriptor", "[", "'phi'", "]", "theta_rad", "=", "float", "(", "theta", ")", "/", "180.0", "*", ...
https://github.com/Kitware/ParaView/blob/f760af9124ff4634b23ebbeab95a4f56e0261955/ThirdParty/cinema/paraview/tpl/cinema_python/adaptors/paraview/pv_explorers.py#L305-L331
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/python2_version/klampt/robotsim.py
python
RigidObjectModel.setTransform
(self, R, t)
return _robotsim.RigidObjectModel_setTransform(self, R, t)
setTransform(RigidObjectModel self, double const [9] R, double const [3] t) Sets the rotation / translation (R,t) of the rigid object.
setTransform(RigidObjectModel self, double const [9] R, double const [3] t)
[ "setTransform", "(", "RigidObjectModel", "self", "double", "const", "[", "9", "]", "R", "double", "const", "[", "3", "]", "t", ")" ]
def setTransform(self, R, t): """ setTransform(RigidObjectModel self, double const [9] R, double const [3] t) Sets the rotation / translation (R,t) of the rigid object. """ return _robotsim.RigidObjectModel_setTransform(self, R, t)
[ "def", "setTransform", "(", "self", ",", "R", ",", "t", ")", ":", "return", "_robotsim", ".", "RigidObjectModel_setTransform", "(", "self", ",", "R", ",", "t", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/python2_version/klampt/robotsim.py#L5473-L5482
cztomczak/cefpython
5679f28cec18a57a56e298da2927aac8d8f83ad6
tools/automate-git.py
python
get_chromium_versions
(commit)
return None
Returns the list of Chromium versions that contain the specified commit. Versions are listed oldest to newest.
Returns the list of Chromium versions that contain the specified commit. Versions are listed oldest to newest.
[ "Returns", "the", "list", "of", "Chromium", "versions", "that", "contain", "the", "specified", "commit", ".", "Versions", "are", "listed", "oldest", "to", "newest", "." ]
def get_chromium_versions(commit): """ Returns the list of Chromium versions that contain the specified commit. Versions are listed oldest to newest. """ cmd = '%s tag --contains %s' % (git_exe, commit) result = exec_cmd(cmd, chromium_src_dir) if result['out'] != '': return [line.strip() for line in r...
[ "def", "get_chromium_versions", "(", "commit", ")", ":", "cmd", "=", "'%s tag --contains %s'", "%", "(", "git_exe", ",", "commit", ")", "result", "=", "exec_cmd", "(", "cmd", ",", "chromium_src_dir", ")", "if", "result", "[", "'out'", "]", "!=", "''", ":",...
https://github.com/cztomczak/cefpython/blob/5679f28cec18a57a56e298da2927aac8d8f83ad6/tools/automate-git.py#L531-L538
cvxpy/cvxpy
5165b4fb750dfd237de8659383ef24b4b2e33aaf
cvxpy/expressions/constants/constant.py
python
Constant.shape
(self)
return self._shape
Returns the (row, col) dimensions of the expression.
Returns the (row, col) dimensions of the expression.
[ "Returns", "the", "(", "row", "col", ")", "dimensions", "of", "the", "expression", "." ]
def shape(self) -> Tuple[int, ...]: """Returns the (row, col) dimensions of the expression. """ return self._shape
[ "def", "shape", "(", "self", ")", "->", "Tuple", "[", "int", ",", "...", "]", ":", "return", "self", ".", "_shape" ]
https://github.com/cvxpy/cvxpy/blob/5165b4fb750dfd237de8659383ef24b4b2e33aaf/cvxpy/expressions/constants/constant.py#L103-L106
alexgkendall/caffe-segnet
344c113bf1832886f1cbe9f33ffe28a3beeaf412
scripts/cpp_lint.py
python
FindNextMultiLineCommentStart
(lines, lineix)
return len(lines)
Find the beginning marker for a multiline comment.
Find the beginning marker for a multiline comment.
[ "Find", "the", "beginning", "marker", "for", "a", "multiline", "comment", "." ]
def FindNextMultiLineCommentStart(lines, lineix): """Find the beginning marker for a multiline comment.""" while lineix < len(lines): if lines[lineix].strip().startswith('/*'): # Only return this marker if the comment goes beyond this line if lines[lineix].strip().find('*/', 2) < 0: return l...
[ "def", "FindNextMultiLineCommentStart", "(", "lines", ",", "lineix", ")", ":", "while", "lineix", "<", "len", "(", "lines", ")", ":", "if", "lines", "[", "lineix", "]", ".", "strip", "(", ")", ".", "startswith", "(", "'/*'", ")", ":", "# Only return this...
https://github.com/alexgkendall/caffe-segnet/blob/344c113bf1832886f1cbe9f33ffe28a3beeaf412/scripts/cpp_lint.py#L1123-L1131
etotheipi/BitcoinArmory
2a6fc5355bb0c6fe26e387ccba30a5baafe8cd98
urllib3/packages/ordered_dict.py
python
OrderedDict.__repr__
(self, _repr_running={})
od.__repr__() <==> repr(od)
od.__repr__() <==> repr(od)
[ "od", ".", "__repr__", "()", "<", "==", ">", "repr", "(", "od", ")" ]
def __repr__(self, _repr_running={}): 'od.__repr__() <==> repr(od)' call_key = id(self), _get_ident() if call_key in _repr_running: return '...' _repr_running[call_key] = 1 try: if not self: return '%s()' % (self.__class__.__name__,) ...
[ "def", "__repr__", "(", "self", ",", "_repr_running", "=", "{", "}", ")", ":", "call_key", "=", "id", "(", "self", ")", ",", "_get_ident", "(", ")", "if", "call_key", "in", "_repr_running", ":", "return", "'...'", "_repr_running", "[", "call_key", "]", ...
https://github.com/etotheipi/BitcoinArmory/blob/2a6fc5355bb0c6fe26e387ccba30a5baafe8cd98/urllib3/packages/ordered_dict.py#L198-L209
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/core/series.py
python
Series.dtype
(self)
return self._mgr.dtype
Return the dtype object of the underlying data.
Return the dtype object of the underlying data.
[ "Return", "the", "dtype", "object", "of", "the", "underlying", "data", "." ]
def dtype(self) -> DtypeObj: """ Return the dtype object of the underlying data. """ return self._mgr.dtype
[ "def", "dtype", "(", "self", ")", "->", "DtypeObj", ":", "return", "self", ".", "_mgr", ".", "dtype" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/core/series.py#L563-L567
indutny/candor
48e7260618f5091c80a3416828e2808cad3ea22e
tools/gyp/pylib/gyp/__init__.py
python
RegenerateFlags
(options)
return flags
Given a parsed options object, and taking the environment variables into account, returns a list of flags that should regenerate an equivalent options object (even in the absence of the environment variables.) Any path options will be normalized relative to depth. The format flag is not included, as it is ass...
Given a parsed options object, and taking the environment variables into account, returns a list of flags that should regenerate an equivalent options object (even in the absence of the environment variables.)
[ "Given", "a", "parsed", "options", "object", "and", "taking", "the", "environment", "variables", "into", "account", "returns", "a", "list", "of", "flags", "that", "should", "regenerate", "an", "equivalent", "options", "object", "(", "even", "in", "the", "absen...
def RegenerateFlags(options): """Given a parsed options object, and taking the environment variables into account, returns a list of flags that should regenerate an equivalent options object (even in the absence of the environment variables.) Any path options will be normalized relative to depth. The format...
[ "def", "RegenerateFlags", "(", "options", ")", ":", "def", "FixPath", "(", "path", ")", ":", "path", "=", "gyp", ".", "common", ".", "FixIfRelativePath", "(", "path", ",", "options", ".", "depth", ")", "if", "not", "path", ":", "return", "os", ".", "...
https://github.com/indutny/candor/blob/48e7260618f5091c80a3416828e2808cad3ea22e/tools/gyp/pylib/gyp/__init__.py#L191-L239
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
scripts/SANS/centre_finder.py
python
PositionProviderFactory.get_increment_coord1_angle
(self, reducer, tolerance)
return tolerance/distance
Estimate an increment for the angle based on the specified coord1 increment for linear displacements and the distance from the sample to the detector. For a distance D and an increment dx, we estimate dAlpha to be tan(dAlpha)=dx/D. Since D >> dx, we can use Taylor expansion to set dAlpha = dx/D ...
Estimate an increment for the angle based on the specified coord1 increment for linear displacements and the distance from the sample to the detector. For a distance D and an increment dx, we estimate dAlpha to be tan(dAlpha)=dx/D. Since D >> dx, we can use Taylor expansion to set dAlpha = dx/D
[ "Estimate", "an", "increment", "for", "the", "angle", "based", "on", "the", "specified", "coord1", "increment", "for", "linear", "displacements", "and", "the", "distance", "from", "the", "sample", "to", "the", "detector", ".", "For", "a", "distance", "D", "a...
def get_increment_coord1_angle(self, reducer, tolerance): ''' Estimate an increment for the angle based on the specified coord1 increment for linear displacements and the distance from the sample to the detector. For a distance D and an increment dx, we estimate dAlpha to be tan(dAlpha)=...
[ "def", "get_increment_coord1_angle", "(", "self", ",", "reducer", ",", "tolerance", ")", ":", "workspace_name", "=", "reducer", ".", "get_sample", "(", ")", ".", "wksp_name", "workspace", "=", "mtd", "[", "workspace_name", "]", "instrument", "=", "workspace", ...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/scripts/SANS/centre_finder.py#L538-L560
CRYTEK/CRYENGINE
232227c59a220cbbd311576f0fbeba7bb53b2a8c
Editor/Python/windows/Lib/site-packages/pip/_vendor/distlib/util.py
python
zip_dir
(directory)
return result
zip a directory tree into a BytesIO object
zip a directory tree into a BytesIO object
[ "zip", "a", "directory", "tree", "into", "a", "BytesIO", "object" ]
def zip_dir(directory): """zip a directory tree into a BytesIO object""" result = io.BytesIO() dlen = len(directory) with ZipFile(result, "w") as zf: for root, dirs, files in os.walk(directory): for name in files: full = os.path.join(root, name) rel = ...
[ "def", "zip_dir", "(", "directory", ")", ":", "result", "=", "io", ".", "BytesIO", "(", ")", "dlen", "=", "len", "(", "directory", ")", "with", "ZipFile", "(", "result", ",", "\"w\"", ")", "as", "zf", ":", "for", "root", ",", "dirs", ",", "files", ...
https://github.com/CRYTEK/CRYENGINE/blob/232227c59a220cbbd311576f0fbeba7bb53b2a8c/Editor/Python/windows/Lib/site-packages/pip/_vendor/distlib/util.py#L1086-L1097
stan-dev/math
5fd79f89933269a4ca4d8dd1fde2a36d53d4768c
lib/boost_1.75.0/tools/build/src/build/targets.py
python
TargetRegistry.main_target_requirements
(self, specification, project)
return requirements
Returns the requirement to use when declaring a main target, which are obtained by - translating all specified property paths, and - refining project requirements with the one specified for the target 'specification' are the properties xplicitly specified for a main target...
Returns the requirement to use when declaring a main target, which are obtained by - translating all specified property paths, and - refining project requirements with the one specified for the target
[ "Returns", "the", "requirement", "to", "use", "when", "declaring", "a", "main", "target", "which", "are", "obtained", "by", "-", "translating", "all", "specified", "property", "paths", "and", "-", "refining", "project", "requirements", "with", "the", "one", "s...
def main_target_requirements(self, specification, project): """Returns the requirement to use when declaring a main target, which are obtained by - translating all specified property paths, and - refining project requirements with the one specified for the target 'specificat...
[ "def", "main_target_requirements", "(", "self", ",", "specification", ",", "project", ")", ":", "assert", "is_iterable_typed", "(", "specification", ",", "basestring", ")", "assert", "isinstance", "(", "project", ",", "ProjectTarget", ")", "# create a copy since the l...
https://github.com/stan-dev/math/blob/5fd79f89933269a4ca4d8dd1fde2a36d53d4768c/lib/boost_1.75.0/tools/build/src/build/targets.py#L148-L167
limbo018/DREAMPlace
146c3b9fd003d1acd52c96d9fd02e3f0a05154e4
dreamplace/ops/electric_potential/electric_potential.py
python
ElectricPotential.__init__
( self, node_size_x, node_size_y, bin_center_x, bin_center_y, target_density, xl, yl, xh, yh, bin_size_x, bin_size_y, num_movable_nodes, num_terminals, num_filler_nodes, padding, deter...
@brief initialization Be aware that all scalars must be python type instead of tensors. Otherwise, GPU version can be weirdly slow. @param node_size_x cell width array consisting of movable cells, fixed cells, and filler cells in order @param node_size_y cell height array consisting of m...
[]
def __init__( self, node_size_x, node_size_y, bin_center_x, bin_center_y, target_density, xl, yl, xh, yh, bin_size_x, bin_size_y, num_movable_nodes, num_terminals, num_filler_nodes, padding, ...
[ "def", "__init__", "(", "self", ",", "node_size_x", ",", "node_size_y", ",", "bin_center_x", ",", "bin_center_y", ",", "target_density", ",", "xl", ",", "yl", ",", "xh", ",", "yh", ",", "bin_size_x", ",", "bin_size_y", ",", "num_movable_nodes", ",", "num_ter...
https://github.com/limbo018/DREAMPlace/blob/146c3b9fd003d1acd52c96d9fd02e3f0a05154e4/dreamplace/ops/electric_potential/electric_potential.py#L281-L392