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
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/swift/utils/bug_reducer/bug_reducer/swift_tools.py
python
SwiftTools.sil_opt
(self)
return self._get_tool('sil-opt')
Return the path to sil-opt in the specified swift build directory. Throws a runtime error if the tool does not exist
Return the path to sil-opt in the specified swift build directory. Throws a runtime error if the tool does not exist
[ "Return", "the", "path", "to", "sil", "-", "opt", "in", "the", "specified", "swift", "build", "directory", ".", "Throws", "a", "runtime", "error", "if", "the", "tool", "does", "not", "exist" ]
def sil_opt(self): """Return the path to sil-opt in the specified swift build directory. Throws a runtime error if the tool does not exist""" return self._get_tool('sil-opt')
[ "def", "sil_opt", "(", "self", ")", ":", "return", "self", ".", "_get_tool", "(", "'sil-opt'", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/swift/utils/bug_reducer/bug_reducer/swift_tools.py#L56-L59
microsoft/checkedc-clang
a173fefde5d7877b7750e7ce96dd08cf18baebf2
lldb/third_party/Python/module/pexpect-4.6/pexpect/spawnbase.py
python
SpawnBase.expect_loop
(self, searcher, timeout=-1, searchwindowsize=-1)
return exp.expect_loop(timeout)
This is the common loop used inside expect. The 'searcher' should be an instance of searcher_re or searcher_string, which describes how and what to search for in the input. See expect() for other arguments, return value and exceptions.
This is the common loop used inside expect. The 'searcher' should be an instance of searcher_re or searcher_string, which describes how and what to search for in the input.
[ "This", "is", "the", "common", "loop", "used", "inside", "expect", ".", "The", "searcher", "should", "be", "an", "instance", "of", "searcher_re", "or", "searcher_string", "which", "describes", "how", "and", "what", "to", "search", "for", "in", "the", "input"...
def expect_loop(self, searcher, timeout=-1, searchwindowsize=-1): '''This is the common loop used inside expect. The 'searcher' should be an instance of searcher_re or searcher_string, which describes how and what to search for in the input. See expect() for other arguments, return valu...
[ "def", "expect_loop", "(", "self", ",", "searcher", ",", "timeout", "=", "-", "1", ",", "searchwindowsize", "=", "-", "1", ")", ":", "exp", "=", "Expecter", "(", "self", ",", "searcher", ",", "searchwindowsize", ")", "return", "exp", ".", "expect_loop", ...
https://github.com/microsoft/checkedc-clang/blob/a173fefde5d7877b7750e7ce96dd08cf18baebf2/lldb/third_party/Python/module/pexpect-4.6/pexpect/spawnbase.py#L420-L428
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_windows.py
python
VarScrollHelperBase.CalcScrolledPosition
(*args, **kwargs)
return _windows_.VarScrollHelperBase_CalcScrolledPosition(*args, **kwargs)
CalcScrolledPosition(self, int coord) -> int
CalcScrolledPosition(self, int coord) -> int
[ "CalcScrolledPosition", "(", "self", "int", "coord", ")", "-", ">", "int" ]
def CalcScrolledPosition(*args, **kwargs): """CalcScrolledPosition(self, int coord) -> int""" return _windows_.VarScrollHelperBase_CalcScrolledPosition(*args, **kwargs)
[ "def", "CalcScrolledPosition", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_windows_", ".", "VarScrollHelperBase_CalcScrolledPosition", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_windows.py#L2230-L2232
hakuna-m/wubiuefi
caec1af0a09c78fd5a345180ada1fe45e0c63493
src/pypack/altgraph/ObjectGraph.py
python
ObjectGraph.msgin
(self, level, s, *args)
Print a debug message and indent
Print a debug message and indent
[ "Print", "a", "debug", "message", "and", "indent" ]
def msgin(self, level, s, *args): """ Print a debug message and indent """ if level <= self.debug: self.msg(level, s, *args) self.indent = self.indent + 1
[ "def", "msgin", "(", "self", ",", "level", ",", "s", ",", "*", "args", ")", ":", "if", "level", "<=", "self", ".", "debug", ":", "self", ".", "msg", "(", "level", ",", "s", ",", "*", "args", ")", "self", ".", "indent", "=", "self", ".", "inde...
https://github.com/hakuna-m/wubiuefi/blob/caec1af0a09c78fd5a345180ada1fe45e0c63493/src/pypack/altgraph/ObjectGraph.py#L159-L165
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/plat-mac/macresource.py
python
open_error_resource
()
Open the resource file containing the error code to error message mapping.
Open the resource file containing the error code to error message mapping.
[ "Open", "the", "resource", "file", "containing", "the", "error", "code", "to", "error", "message", "mapping", "." ]
def open_error_resource(): """Open the resource file containing the error code to error message mapping.""" need('Estr', 1, filename="errors.rsrc", modname=__name__)
[ "def", "open_error_resource", "(", ")", ":", "need", "(", "'Estr'", ",", "1", ",", "filename", "=", "\"errors.rsrc\"", ",", "modname", "=", "__name__", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/plat-mac/macresource.py#L114-L117
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/array_analysis.py
python
ArrayAnalysis._analyze_broadcast
(self, scope, equiv_set, loc, args)
return self._broadcast_assert_shapes(scope, equiv_set, loc, shapes, names)
Infer shape equivalence of arguments based on Numpy broadcast rules and return shape of output https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
Infer shape equivalence of arguments based on Numpy broadcast rules and return shape of output https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html
[ "Infer", "shape", "equivalence", "of", "arguments", "based", "on", "Numpy", "broadcast", "rules", "and", "return", "shape", "of", "output", "https", ":", "//", "docs", ".", "scipy", ".", "org", "/", "doc", "/", "numpy", "/", "user", "/", "basics", ".", ...
def _analyze_broadcast(self, scope, equiv_set, loc, args): """Infer shape equivalence of arguments based on Numpy broadcast rules and return shape of output https://docs.scipy.org/doc/numpy/user/basics.broadcasting.html """ arrs = list(filter(lambda a: self._isarray(a.name), args...
[ "def", "_analyze_broadcast", "(", "self", ",", "scope", ",", "equiv_set", ",", "loc", ",", "args", ")", ":", "arrs", "=", "list", "(", "filter", "(", "lambda", "a", ":", "self", ".", "_isarray", "(", "a", ".", "name", ")", ",", "args", ")", ")", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/array_analysis.py#L2272-L2287
apple/swift
469f72fdae2ea828b3b6c0d7d62d7e4cf98c4893
utils/build_swift/build_swift/migration.py
python
migrate_swift_sdks
(args)
return list(map(_migrate_swift_sdks_arg, args))
Migrate usages of the now deprecated `--swift-sdks` option to the new `--stdlib-deployment-targets` option, converting Swift SDKs to the corresponding targets. This function is a stop-gap to replacing all instances of `--swift-sdks`.
Migrate usages of the now deprecated `--swift-sdks` option to the new `--stdlib-deployment-targets` option, converting Swift SDKs to the corresponding targets.
[ "Migrate", "usages", "of", "the", "now", "deprecated", "--", "swift", "-", "sdks", "option", "to", "the", "new", "--", "stdlib", "-", "deployment", "-", "targets", "option", "converting", "Swift", "SDKs", "to", "the", "corresponding", "targets", "." ]
def migrate_swift_sdks(args): """Migrate usages of the now deprecated `--swift-sdks` option to the new `--stdlib-deployment-targets` option, converting Swift SDKs to the corresponding targets. This function is a stop-gap to replacing all instances of `--swift-sdks`. """ def _flatten(iterable):...
[ "def", "migrate_swift_sdks", "(", "args", ")", ":", "def", "_flatten", "(", "iterable", ")", ":", "return", "itertools", ".", "chain", ".", "from_iterable", "(", "iterable", ")", "def", "_swift_sdk_to_stdlib_targets", "(", "sdk", ")", ":", "targets", "=", "S...
https://github.com/apple/swift/blob/469f72fdae2ea828b3b6c0d7d62d7e4cf98c4893/utils/build_swift/build_swift/migration.py#L50-L80
SFTtech/openage
d6a08c53c48dc1e157807471df92197f6ca9e04d
openage/util/fslike/path.py
python
Path._resolve_r
(self)
return self.fsobj.resolve_r(self.parts)
Flatten the path recursively for read access. Used to cancel out some wrappers in between.
Flatten the path recursively for read access. Used to cancel out some wrappers in between.
[ "Flatten", "the", "path", "recursively", "for", "read", "access", ".", "Used", "to", "cancel", "out", "some", "wrappers", "in", "between", "." ]
def _resolve_r(self): """ Flatten the path recursively for read access. Used to cancel out some wrappers in between. """ return self.fsobj.resolve_r(self.parts)
[ "def", "_resolve_r", "(", "self", ")", ":", "return", "self", ".", "fsobj", ".", "resolve_r", "(", "self", ".", "parts", ")" ]
https://github.com/SFTtech/openage/blob/d6a08c53c48dc1e157807471df92197f6ca9e04d/openage/util/fslike/path.py#L151-L156
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_misc.py
python
Joystick.GetUMin
(*args, **kwargs)
return _misc_.Joystick_GetUMin(*args, **kwargs)
GetUMin(self) -> int
GetUMin(self) -> int
[ "GetUMin", "(", "self", ")", "-", ">", "int" ]
def GetUMin(*args, **kwargs): """GetUMin(self) -> int""" return _misc_.Joystick_GetUMin(*args, **kwargs)
[ "def", "GetUMin", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_misc_", ".", "Joystick_GetUMin", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_misc.py#L2242-L2244
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/python2_version/klampt/math/symbolic.py
python
Context.renameVar
(self,item,newname)
Renames a variable
Renames a variable
[ "Renames", "a", "variable" ]
def renameVar(self,item,newname): """Renames a variable""" if isinstance(item,str): item = self.variableDict[item] if item.name == newname: return assert newname not in self.variableDict,"Renamed variable name "+newname+" already exists" del self.variableDict[item.na...
[ "def", "renameVar", "(", "self", ",", "item", ",", "newname", ")", ":", "if", "isinstance", "(", "item", ",", "str", ")", ":", "item", "=", "self", ".", "variableDict", "[", "item", "]", "if", "item", ".", "name", "==", "newname", ":", "return", "a...
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/python2_version/klampt/math/symbolic.py#L1321-L1330
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Path/PathScripts/PathLog.py
python
notice
(msg)
return _log(Level.NOTICE, _caller(), msg)
(message)
(message)
[ "(", "message", ")" ]
def notice(msg): """(message)""" return _log(Level.NOTICE, _caller(), msg)
[ "def", "notice", "(", "msg", ")", ":", "return", "_log", "(", "Level", ".", "NOTICE", ",", "_caller", "(", ")", ",", "msg", ")" ]
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Path/PathScripts/PathLog.py#L116-L118
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/requests_toolbelt/multipart/encoder.py
python
Part.bytes_left_to_write
(self)
return (to_read + total_len(self.body)) > 0
Determine if there are bytes left to write. :returns: bool -- ``True`` if there are bytes left to write, otherwise ``False``
Determine if there are bytes left to write.
[ "Determine", "if", "there", "are", "bytes", "left", "to", "write", "." ]
def bytes_left_to_write(self): """Determine if there are bytes left to write. :returns: bool -- ``True`` if there are bytes left to write, otherwise ``False`` """ to_read = 0 if self.headers_unread: to_read += len(self.headers) return (to_read + ...
[ "def", "bytes_left_to_write", "(", "self", ")", ":", "to_read", "=", "0", "if", "self", ".", "headers_unread", ":", "to_read", "+=", "len", "(", "self", ".", "headers", ")", "return", "(", "to_read", "+", "total_len", "(", "self", ".", "body", ")", ")"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/requests_toolbelt/multipart/encoder.py#L491-L501
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/ops/array_ops.py
python
unpack
(value, num=None, axis=0, name="unpack")
return gen_array_ops._unpack(value, num=num, axis=axis, name=name)
Unpacks the given dimension of a rank-`R` tensor into rank-`(R-1)` tensors. Unpacks `num` tensors from `value` by chipping it along the `axis` dimension. If `num` is not specified (the default), it is inferred from `value`'s shape. If `value.shape[axis]` is not known, `ValueError` is raised. For example, give...
Unpacks the given dimension of a rank-`R` tensor into rank-`(R-1)` tensors.
[ "Unpacks", "the", "given", "dimension", "of", "a", "rank", "-", "R", "tensor", "into", "rank", "-", "(", "R", "-", "1", ")", "tensors", "." ]
def unpack(value, num=None, axis=0, name="unpack"): """Unpacks the given dimension of a rank-`R` tensor into rank-`(R-1)` tensors. Unpacks `num` tensors from `value` by chipping it along the `axis` dimension. If `num` is not specified (the default), it is inferred from `value`'s shape. If `value.shape[axis]` i...
[ "def", "unpack", "(", "value", ",", "num", "=", "None", ",", "axis", "=", "0", ",", "name", "=", "\"unpack\"", ")", ":", "if", "num", "is", "None", ":", "value", "=", "ops", ".", "convert_to_tensor", "(", "value", ")", "value_shape", "=", "value", ...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/ops/array_ops.py#L578-L624
NERSC/timemory
431912b360ff50d1a160d7826e2eea04fbd1037f
timemory/trace/tracer.py
python
Tracer.stop
(self)
return self._unset
Stop the tracer
Stop the tracer
[ "Stop", "the", "tracer" ]
def stop(self): """Stop the tracer""" self._unset = self._unset - 1 if self._unset == 0: if settings.debug or self.debug: sys.stderr.write("Tracer stopping...\n") sys.settrace(self._original_function) _tracer_fini() if settings.deb...
[ "def", "stop", "(", "self", ")", ":", "self", ".", "_unset", "=", "self", ".", "_unset", "-", "1", "if", "self", ".", "_unset", "==", "0", ":", "if", "settings", ".", "debug", "or", "self", ".", "debug", ":", "sys", ".", "stderr", ".", "write", ...
https://github.com/NERSC/timemory/blob/431912b360ff50d1a160d7826e2eea04fbd1037f/timemory/trace/tracer.py#L219-L231
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/tpu/tpu_embedding.py
python
TPUEmbedding.num_cores_per_host
(self)
return self._num_cores_per_host
Number of TPU cores on a CPU host. Returns: Number of TPU cores on a CPU host.
Number of TPU cores on a CPU host.
[ "Number", "of", "TPU", "cores", "on", "a", "CPU", "host", "." ]
def num_cores_per_host(self): """Number of TPU cores on a CPU host. Returns: Number of TPU cores on a CPU host. """ return self._num_cores_per_host
[ "def", "num_cores_per_host", "(", "self", ")", ":", "return", "self", ".", "_num_cores_per_host" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/tpu/tpu_embedding.py#L629-L635
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
tools/json_schema_compiler/dart_generator.py
python
_Generator._IsListOfSerializableObjects
(self, type_)
return (type_.property_type is PropertyType.ARRAY and (self._IsSerializableObjectType(type_.item_type)))
Given a model.Type, returns whether this type is a list of serializable objects (or regular objects, if this list is treated as a type - in this case, the item type was defined inline). If this type is a reference to something not in this namespace, assumes it is not a list of serializable objects.
Given a model.Type, returns whether this type is a list of serializable objects (or regular objects, if this list is treated as a type - in this case, the item type was defined inline).
[ "Given", "a", "model", ".", "Type", "returns", "whether", "this", "type", "is", "a", "list", "of", "serializable", "objects", "(", "or", "regular", "objects", "if", "this", "list", "is", "treated", "as", "a", "type", "-", "in", "this", "case", "the", "...
def _IsListOfSerializableObjects(self, type_): """Given a model.Type, returns whether this type is a list of serializable objects (or regular objects, if this list is treated as a type - in this case, the item type was defined inline). If this type is a reference to something not in this namespace, ass...
[ "def", "_IsListOfSerializableObjects", "(", "self", ",", "type_", ")", ":", "if", "type_", ".", "property_type", "is", "PropertyType", ".", "CHOICES", ":", "return", "all", "(", "self", ".", "_IsListOfSerializableObjects", "(", "c", ")", "for", "c", "in", "t...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/tools/json_schema_compiler/dart_generator.py#L673-L688
weolar/miniblink49
1c4678db0594a4abde23d3ebbcc7cd13c3170777
tools/idl_parser/idl_ppapi_parser.py
python
IDLPPAPIParser.p_EnumValueList
(self, p)
EnumValueList : EnumValue EnumValues
EnumValueList : EnumValue EnumValues
[ "EnumValueList", ":", "EnumValue", "EnumValues" ]
def p_EnumValueList(self, p): """EnumValueList : EnumValue EnumValues""" p[0] = ListFromConcat(p[1], p[2])
[ "def", "p_EnumValueList", "(", "self", ",", "p", ")", ":", "p", "[", "0", "]", "=", "ListFromConcat", "(", "p", "[", "1", "]", ",", "p", "[", "2", "]", ")" ]
https://github.com/weolar/miniblink49/blob/1c4678db0594a4abde23d3ebbcc7cd13c3170777/tools/idl_parser/idl_ppapi_parser.py#L157-L159
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/_vendor/ordered_set.py
python
OrderedSet.intersection
(self, *sets)
return cls(items)
Returns elements in common between all sets. Order is defined only by the first set. Example: >>> oset = OrderedSet.intersection(OrderedSet([0, 1, 2, 3]), [1, 2, 3]) >>> print(oset) OrderedSet([1, 2, 3]) >>> oset.intersection([2, 4, 5], [1, 2, 3, 4]) ...
Returns elements in common between all sets. Order is defined only by the first set.
[ "Returns", "elements", "in", "common", "between", "all", "sets", ".", "Order", "is", "defined", "only", "by", "the", "first", "set", "." ]
def intersection(self, *sets): """ Returns elements in common between all sets. Order is defined only by the first set. Example: >>> oset = OrderedSet.intersection(OrderedSet([0, 1, 2, 3]), [1, 2, 3]) >>> print(oset) OrderedSet([1, 2, 3]) ...
[ "def", "intersection", "(", "self", ",", "*", "sets", ")", ":", "cls", "=", "self", ".", "__class__", "if", "isinstance", "(", "self", ",", "OrderedSet", ")", "else", "OrderedSet", "if", "sets", ":", "common", "=", "set", ".", "intersection", "(", "*",...
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/ordered_set.py#L333-L353
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/stc.py
python
StyledTextCtrl.GetWhitespaceSize
(*args, **kwargs)
return _stc.StyledTextCtrl_GetWhitespaceSize(*args, **kwargs)
GetWhitespaceSize(self) -> int Get the size of the dots used to mark space characters.
GetWhitespaceSize(self) -> int
[ "GetWhitespaceSize", "(", "self", ")", "-", ">", "int" ]
def GetWhitespaceSize(*args, **kwargs): """ GetWhitespaceSize(self) -> int Get the size of the dots used to mark space characters. """ return _stc.StyledTextCtrl_GetWhitespaceSize(*args, **kwargs)
[ "def", "GetWhitespaceSize", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextCtrl_GetWhitespaceSize", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/stc.py#L2937-L2943
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python3/src/Lib/email/headerregistry.py
python
Address.__init__
(self, display_name='', username='', domain='', addr_spec=None)
Create an object representing a full email address. An address can have a 'display_name', a 'username', and a 'domain'. In addition to specifying the username and domain separately, they may be specified together by using the addr_spec keyword *instead of* the username and domain keywo...
Create an object representing a full email address.
[ "Create", "an", "object", "representing", "a", "full", "email", "address", "." ]
def __init__(self, display_name='', username='', domain='', addr_spec=None): """Create an object representing a full email address. An address can have a 'display_name', a 'username', and a 'domain'. In addition to specifying the username and domain separately, they may be specified to...
[ "def", "__init__", "(", "self", ",", "display_name", "=", "''", ",", "username", "=", "''", ",", "domain", "=", "''", ",", "addr_spec", "=", "None", ")", ":", "inputs", "=", "''", ".", "join", "(", "filter", "(", "None", ",", "(", "display_name", "...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python3/src/Lib/email/headerregistry.py#L18-L58
Tencent/CMONGO
c40380caa14e05509f46993aa8b8da966b09b0b5
src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/SConf.py
python
CheckLib
(context, library = None, symbol = "main", header = None, language = None, autoadd = 1)
return not res
A test for a library. See also CheckLibWithHeader. Note that library may also be None to test whether the given symbol compiles without flags.
A test for a library. See also CheckLibWithHeader. Note that library may also be None to test whether the given symbol compiles without flags.
[ "A", "test", "for", "a", "library", ".", "See", "also", "CheckLibWithHeader", ".", "Note", "that", "library", "may", "also", "be", "None", "to", "test", "whether", "the", "given", "symbol", "compiles", "without", "flags", "." ]
def CheckLib(context, library = None, symbol = "main", header = None, language = None, autoadd = 1): """ A test for a library. See also CheckLibWithHeader. Note that library may also be None to test whether the given symbol compiles without flags. """ if library == []: libr...
[ "def", "CheckLib", "(", "context", ",", "library", "=", "None", ",", "symbol", "=", "\"main\"", ",", "header", "=", "None", ",", "language", "=", "None", ",", "autoadd", "=", "1", ")", ":", "if", "library", "==", "[", "]", ":", "library", "=", "[",...
https://github.com/Tencent/CMONGO/blob/c40380caa14e05509f46993aa8b8da966b09b0b5/src/third_party/scons-2.5.0/scons-local-2.5.0/SCons/SConf.py#L994-L1012
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/ops/control_flow_ops.py
python
GradLoopState.grad_context
(self)
return self._grad_context
The corresponding WhileContext for gradient.
The corresponding WhileContext for gradient.
[ "The", "corresponding", "WhileContext", "for", "gradient", "." ]
def grad_context(self): """The corresponding WhileContext for gradient.""" return self._grad_context
[ "def", "grad_context", "(", "self", ")", ":", "return", "self", ".", "_grad_context" ]
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/ops/control_flow_ops.py#L776-L778
NVIDIAGameWorks/kaolin
e5148d05e9c1e2ce92a07881ce3593b1c5c3f166
kaolin/io/materials.py
python
PBRMaterial._read_usd_preview_surface
(cls, shader_parameters, texture_file_path, time)
return cls(**params)
Read UsdPreviewSurface material.
Read UsdPreviewSurface material.
[ "Read", "UsdPreviewSurface", "material", "." ]
def _read_usd_preview_surface(cls, shader_parameters, texture_file_path, time): """Read UsdPreviewSurface material.""" texture_file_path = Path(texture_file_path).as_posix() params = {} def _read_data(data): if 'value' in data: if hasattr(data['value'], '__le...
[ "def", "_read_usd_preview_surface", "(", "cls", ",", "shader_parameters", ",", "texture_file_path", ",", "time", ")", ":", "texture_file_path", "=", "Path", "(", "texture_file_path", ")", ".", "as_posix", "(", ")", "params", "=", "{", "}", "def", "_read_data", ...
https://github.com/NVIDIAGameWorks/kaolin/blob/e5148d05e9c1e2ce92a07881ce3593b1c5c3f166/kaolin/io/materials.py#L639-L719
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/extern/aui/auibook.py
python
AuiTabCtrl.OnRightUp
(self, event)
Handles the ``wx.EVT_RIGHT_UP`` event for :class:`AuiTabCtrl`. :param `event`: a :class:`MouseEvent` event to be processed.
Handles the ``wx.EVT_RIGHT_UP`` event for :class:`AuiTabCtrl`.
[ "Handles", "the", "wx", ".", "EVT_RIGHT_UP", "event", "for", ":", "class", ":", "AuiTabCtrl", "." ]
def OnRightUp(self, event): """ Handles the ``wx.EVT_RIGHT_UP`` event for :class:`AuiTabCtrl`. :param `event`: a :class:`MouseEvent` event to be processed. """ x, y = event.GetX(), event.GetY() wnd = self.TabHitTest(x, y) if wnd: e = AuiNotebookEven...
[ "def", "OnRightUp", "(", "self", ",", "event", ")", ":", "x", ",", "y", "=", "event", ".", "GetX", "(", ")", ",", "event", ".", "GetY", "(", ")", "wnd", "=", "self", ".", "TabHitTest", "(", "x", ",", "y", ")", "if", "wnd", ":", "e", "=", "A...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/extern/aui/auibook.py#L2086-L2105
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/grid.py
python
Grid.GetCellEditor
(*args, **kwargs)
return _grid.Grid_GetCellEditor(*args, **kwargs)
GetCellEditor(self, int row, int col) -> GridCellEditor
GetCellEditor(self, int row, int col) -> GridCellEditor
[ "GetCellEditor", "(", "self", "int", "row", "int", "col", ")", "-", ">", "GridCellEditor" ]
def GetCellEditor(*args, **kwargs): """GetCellEditor(self, int row, int col) -> GridCellEditor""" return _grid.Grid_GetCellEditor(*args, **kwargs)
[ "def", "GetCellEditor", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_grid", ".", "Grid_GetCellEditor", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/grid.py#L2006-L2008
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/email/_policybase.py
python
Policy.header_store_parse
(self, name, value)
Given the header name and the value provided by the application program, return the (name, value) that should be stored in the model.
Given the header name and the value provided by the application program, return the (name, value) that should be stored in the model.
[ "Given", "the", "header", "name", "and", "the", "value", "provided", "by", "the", "application", "program", "return", "the", "(", "name", "value", ")", "that", "should", "be", "stored", "in", "the", "model", "." ]
def header_store_parse(self, name, value): """Given the header name and the value provided by the application program, return the (name, value) that should be stored in the model. """ raise NotImplementedError
[ "def", "header_store_parse", "(", "self", ",", "name", ",", "value", ")", ":", "raise", "NotImplementedError" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/email/_policybase.py#L231-L235
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
chrome/common/extensions/docs/build/directory.py
python
ApiManifest._parseModuleDocLinksByKeyTypes
(self, module, key)
return api_dict
Given a specific API module, returns a dict of methods mapped to documentation URLs. Args: module: The data in the extension API JSON for a single module. key: A key belonging to _MODULE_DOC_KEYS to determine which set of methods to parse, and what kind of documentation URL to generate. ...
Given a specific API module, returns a dict of methods mapped to documentation URLs.
[ "Given", "a", "specific", "API", "module", "returns", "a", "dict", "of", "methods", "mapped", "to", "documentation", "URLs", "." ]
def _parseModuleDocLinksByKeyTypes(self, module, key): """ Given a specific API module, returns a dict of methods mapped to documentation URLs. Args: module: The data in the extension API JSON for a single module. key: A key belonging to _MODULE_DOC_KEYS to determine which set of ...
[ "def", "_parseModuleDocLinksByKeyTypes", "(", "self", ",", "module", ",", "key", ")", ":", "api_dict", "=", "{", "}", "namespace", "=", "module", "[", "'namespace'", "]", "if", "self", ".", "_disableDocs", "(", "module", ")", ":", "return", "api_dict", "if...
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/chrome/common/extensions/docs/build/directory.py#L127-L168
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
src/external/xgboost/subtree/rabit/wrapper/rabit.py
python
init
(args=None, lib='standard')
Intialize the rabit module, call this once before using anything. Parameters ---------- args: list of str, optional The list of arguments used to initialized the rabit usually you need to pass in sys.argv. Defaults to sys.argv when it is None. lib: {'standard', 'mock', 'mpi'} ...
Intialize the rabit module, call this once before using anything.
[ "Intialize", "the", "rabit", "module", "call", "this", "once", "before", "using", "anything", "." ]
def init(args=None, lib='standard'): """Intialize the rabit module, call this once before using anything. Parameters ---------- args: list of str, optional The list of arguments used to initialized the rabit usually you need to pass in sys.argv. Defaults to sys.argv when it is N...
[ "def", "init", "(", "args", "=", "None", ",", "lib", "=", "'standard'", ")", ":", "if", "args", "is", "None", ":", "args", "=", "sys", ".", "argv", "_loadlib", "(", "lib", ")", "arr", "=", "(", "ctypes", ".", "c_char_p", "*", "len", "(", "args", ...
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/src/external/xgboost/subtree/rabit/wrapper/rabit.py#L56-L73
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/CGIHTTPServer.py
python
CGIHTTPRequestHandler.do_POST
(self)
Serve a POST request. This is only implemented for CGI scripts.
Serve a POST request.
[ "Serve", "a", "POST", "request", "." ]
def do_POST(self): """Serve a POST request. This is only implemented for CGI scripts. """ if self.is_cgi(): self.run_cgi() else: self.send_error(501, "Can only POST to CGI scripts")
[ "def", "do_POST", "(", "self", ")", ":", "if", "self", ".", "is_cgi", "(", ")", ":", "self", ".", "run_cgi", "(", ")", "else", ":", "self", ".", "send_error", "(", "501", ",", "\"Can only POST to CGI scripts\"", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/CGIHTTPServer.py#L54-L64
oracle/graaljs
36a56e8e993d45fc40939a3a4d9c0c24990720f1
graal-nodejs/tools/gyp/pylib/gyp/generator/make.py
python
EscapeCppDefine
(s)
return s.replace("#", r"\#")
Escapes a CPP define so that it will reach the compiler unaltered.
Escapes a CPP define so that it will reach the compiler unaltered.
[ "Escapes", "a", "CPP", "define", "so", "that", "it", "will", "reach", "the", "compiler", "unaltered", "." ]
def EscapeCppDefine(s): """Escapes a CPP define so that it will reach the compiler unaltered.""" s = EscapeShellArgument(s) s = EscapeMakeVariableExpansion(s) # '#' characters must be escaped even embedded in a string, else Make will # treat it as the start of a comment. return s.replace("#", r"...
[ "def", "EscapeCppDefine", "(", "s", ")", ":", "s", "=", "EscapeShellArgument", "(", "s", ")", "s", "=", "EscapeMakeVariableExpansion", "(", "s", ")", "# '#' characters must be escaped even embedded in a string, else Make will", "# treat it as the start of a comment.", "return...
https://github.com/oracle/graaljs/blob/36a56e8e993d45fc40939a3a4d9c0c24990720f1/graal-nodejs/tools/gyp/pylib/gyp/generator/make.py#L629-L635
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/contrib/learn/python/learn/models.py
python
logistic_regression
(x, y, class_weight=None, init_mean=None, init_stddev=1.0)
Creates logistic regression TensorFlow subgraph. Args: x: tensor or placeholder for input features, shape should be [batch_size, n_features]. y: tensor or placeholder for target, shape should be [batch_size, n_classes]. class_weight: tensor, [n_classes], where for each class ...
Creates logistic regression TensorFlow subgraph.
[ "Creates", "logistic", "regression", "TensorFlow", "subgraph", "." ]
def logistic_regression(x, y, class_weight=None, init_mean=None, init_stddev=1.0): """Creates logistic regression TensorFlow subgraph. Args: x: tensor or placeholder for input features, shape should be [batch...
[ "def", "logistic_regression", "(", "x", ",", "y", ",", "class_weight", "=", "None", ",", "init_mean", "=", "None", ",", "init_stddev", "=", "1.0", ")", ":", "with", "vs", ".", "variable_scope", "(", "'logistic_regression'", ")", ":", "logging_ops", ".", "h...
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/contrib/learn/python/learn/models.py#L109-L175
v8mips/v8mips
f0c9cc0bbfd461c7f516799d9a58e9a7395f737e
tools/push-to-trunk/releases.py
python
BuildRevisionRanges
(cr_releases)
return dict((rev, ", ".join(ran)) for rev, ran in range_lists.iteritems())
Returns a mapping of v8 revision -> chromium ranges. The ranges are comma-separated, each range has the form R1:R2. The newest entry is the only one of the form R1, as there is no end range. cr_releases is a list of [cr_rev, v8_rev] reverse-sorted by cr_rev. cr_rev either refers to a chromium svn revision or a...
Returns a mapping of v8 revision -> chromium ranges. The ranges are comma-separated, each range has the form R1:R2. The newest entry is the only one of the form R1, as there is no end range.
[ "Returns", "a", "mapping", "of", "v8", "revision", "-", ">", "chromium", "ranges", ".", "The", "ranges", "are", "comma", "-", "separated", "each", "range", "has", "the", "form", "R1", ":", "R2", ".", "The", "newest", "entry", "is", "the", "only", "one"...
def BuildRevisionRanges(cr_releases): """Returns a mapping of v8 revision -> chromium ranges. The ranges are comma-separated, each range has the form R1:R2. The newest entry is the only one of the form R1, as there is no end range. cr_releases is a list of [cr_rev, v8_rev] reverse-sorted by cr_rev. cr_rev ei...
[ "def", "BuildRevisionRanges", "(", "cr_releases", ")", ":", "range_lists", "=", "{", "}", "cr_releases", "=", "FilterDuplicatesAndReverse", "(", "cr_releases", ")", "# Visit pairs of cr releases from oldest to newest.", "for", "cr_from", ",", "cr_to", "in", "itertools", ...
https://github.com/v8mips/v8mips/blob/f0c9cc0bbfd461c7f516799d9a58e9a7395f737e/tools/push-to-trunk/releases.py#L85-L114
msitt/blpapi-python
bebcf43668c9e5f5467b1f685f9baebbfc45bc87
src/blpapi/utils.py
python
invoke_if_valid
(cb, value)
return cb(value)
Returns the result of cb(value) if cb is callable, else -- just value
Returns the result of cb(value) if cb is callable, else -- just value
[ "Returns", "the", "result", "of", "cb", "(", "value", ")", "if", "cb", "is", "callable", "else", "--", "just", "value" ]
def invoke_if_valid(cb, value): """Returns the result of cb(value) if cb is callable, else -- just value""" if cb is None or not callable(cb): return value return cb(value)
[ "def", "invoke_if_valid", "(", "cb", ",", "value", ")", ":", "if", "cb", "is", "None", "or", "not", "callable", "(", "cb", ")", ":", "return", "value", "return", "cb", "(", "value", ")" ]
https://github.com/msitt/blpapi-python/blob/bebcf43668c9e5f5467b1f685f9baebbfc45bc87/src/blpapi/utils.py#L93-L97
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/share/doc/python3.7/examples/Tools/scripts/highlight.py
python
raw_highlight
(classified_text)
return ''.join(result)
Straight text display of text classifications
Straight text display of text classifications
[ "Straight", "text", "display", "of", "text", "classifications" ]
def raw_highlight(classified_text): 'Straight text display of text classifications' result = [] for kind, text in classified_text: result.append('%15s: %r\n' % (kind or 'plain', text)) return ''.join(result)
[ "def", "raw_highlight", "(", "classified_text", ")", ":", "result", "=", "[", "]", "for", "kind", ",", "text", "in", "classified_text", ":", "result", ".", "append", "(", "'%15s: %r\\n'", "%", "(", "kind", "or", "'plain'", ",", "text", ")", ")", "return...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/share/doc/python3.7/examples/Tools/scripts/highlight.py#L68-L73
hughperkins/tf-coriander
970d3df6c11400ad68405f22b0c42a52374e94ca
tensorflow/contrib/copy_graph/python/util/copy_elements.py
python
copy_op_to_graph
(org_instance, to_graph, variables, scope="")
Given an `Operation` 'org_instance` from one `Graph`, initializes and returns a copy of it from another `Graph`, under the specified scope (default `""`). The copying is done recursively, so any `Operation` whose output is required to evaluate the `org_instance`, is also copied (unless already done). Sinc...
Given an `Operation` 'org_instance` from one `Graph`, initializes and returns a copy of it from another `Graph`, under the specified scope (default `""`).
[ "Given", "an", "Operation", "org_instance", "from", "one", "Graph", "initializes", "and", "returns", "a", "copy", "of", "it", "from", "another", "Graph", "under", "the", "specified", "scope", "(", "default", ")", "." ]
def copy_op_to_graph(org_instance, to_graph, variables, scope=""): """Given an `Operation` 'org_instance` from one `Graph`, initializes and returns a copy of it from another `Graph`, under the specified scope (default `""`). The copying is done recursively, so any `Operation` whose output ...
[ "def", "copy_op_to_graph", "(", "org_instance", ",", "to_graph", ",", "variables", ",", "scope", "=", "\"\"", ")", ":", "#The name of the new instance", "if", "scope", "!=", "''", ":", "new_name", "=", "scope", "+", "'/'", "+", "org_instance", ".", "name", "...
https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/contrib/copy_graph/python/util/copy_elements.py#L101-L234
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/dataview.py
python
DataViewRenderer.StartEditing
(*args, **kwargs)
return _dataview.DataViewRenderer_StartEditing(*args, **kwargs)
StartEditing(self, DataViewItem item, Rect labelRect) -> bool
StartEditing(self, DataViewItem item, Rect labelRect) -> bool
[ "StartEditing", "(", "self", "DataViewItem", "item", "Rect", "labelRect", ")", "-", ">", "bool" ]
def StartEditing(*args, **kwargs): """StartEditing(self, DataViewItem item, Rect labelRect) -> bool""" return _dataview.DataViewRenderer_StartEditing(*args, **kwargs)
[ "def", "StartEditing", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_dataview", ".", "DataViewRenderer_StartEditing", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/dataview.py#L1221-L1223
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/plat-mac/lib-scriptpackages/Explorer/Standard_Suite.py
python
Standard_Suite_Events.get
(self, _object, _attributes={}, **_arguments)
get: Required argument: an AE object reference Keyword argument as: undocumented, typecode 'type' Keyword argument _attributes: AppleEvent attribute dictionary Returns: anything
get: Required argument: an AE object reference Keyword argument as: undocumented, typecode 'type' Keyword argument _attributes: AppleEvent attribute dictionary Returns: anything
[ "get", ":", "Required", "argument", ":", "an", "AE", "object", "reference", "Keyword", "argument", "as", ":", "undocumented", "typecode", "type", "Keyword", "argument", "_attributes", ":", "AppleEvent", "attribute", "dictionary", "Returns", ":", "anything" ]
def get(self, _object, _attributes={}, **_arguments): """get: Required argument: an AE object reference Keyword argument as: undocumented, typecode 'type' Keyword argument _attributes: AppleEvent attribute dictionary Returns: anything """ _code = 'core' _s...
[ "def", "get", "(", "self", ",", "_object", ",", "_attributes", "=", "{", "}", ",", "*", "*", "_arguments", ")", ":", "_code", "=", "'core'", "_subcode", "=", "'getd'", "aetools", ".", "keysubst", "(", "_arguments", ",", "self", ".", "_argmap_get", ")",...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/plat-mac/lib-scriptpackages/Explorer/Standard_Suite.py#L19-L39
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/email/generator.py
python
Generator.__init__
(self, outfp, mangle_from_=None, maxheaderlen=None, *, policy=None)
Create the generator for message flattening. outfp is the output file-like object for writing the message to. It must have a write() method. Optional mangle_from_ is a flag that, when True (the default if policy is not set), escapes From_ lines in the body of the message by putting ...
Create the generator for message flattening.
[ "Create", "the", "generator", "for", "message", "flattening", "." ]
def __init__(self, outfp, mangle_from_=None, maxheaderlen=None, *, policy=None): """Create the generator for message flattening. outfp is the output file-like object for writing the message to. It must have a write() method. Optional mangle_from_ is a flag that, when ...
[ "def", "__init__", "(", "self", ",", "outfp", ",", "mangle_from_", "=", "None", ",", "maxheaderlen", "=", "None", ",", "*", ",", "policy", "=", "None", ")", ":", "if", "mangle_from_", "is", "None", ":", "mangle_from_", "=", "True", "if", "policy", "is"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/email/generator.py#L36-L66
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/distributions/python/ops/batch_reshape.py
python
BatchReshape._call_reshape_input_output
(self, fn, x)
Calls `fn`, appropriately reshaping its input `x` and output.
Calls `fn`, appropriately reshaping its input `x` and output.
[ "Calls", "fn", "appropriately", "reshaping", "its", "input", "x", "and", "output", "." ]
def _call_reshape_input_output(self, fn, x): """Calls `fn`, appropriately reshaping its input `x` and output.""" with ops.control_dependencies( self._runtime_assertions + self._validate_sample_arg(x)): sample_shape, static_sample_shape = self._sample_shape(x) old_shape = array_ops.concat([ ...
[ "def", "_call_reshape_input_output", "(", "self", ",", "fn", ",", "x", ")", ":", "with", "ops", ".", "control_dependencies", "(", "self", ".", "_runtime_assertions", "+", "self", ".", "_validate_sample_arg", "(", "x", ")", ")", ":", "sample_shape", ",", "sta...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/contrib/distributions/python/ops/batch_reshape.py#L235-L256
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/pkg_resources/__init__.py
python
get_entry_map
(dist, group=None)
return get_distribution(dist).get_entry_map(group)
Return the entry point map for `group`, or the full entry map
Return the entry point map for `group`, or the full entry map
[ "Return", "the", "entry", "point", "map", "for", "group", "or", "the", "full", "entry", "map" ]
def get_entry_map(dist, group=None): """Return the entry point map for `group`, or the full entry map""" return get_distribution(dist).get_entry_map(group)
[ "def", "get_entry_map", "(", "dist", ",", "group", "=", "None", ")", ":", "return", "get_distribution", "(", "dist", ")", ".", "get_entry_map", "(", "group", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/pkg_resources/__init__.py#L575-L577
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/training/saving/functional_saver.py
python
sharded_filename
(filename_tensor, shard, num_shards)
return gen_io_ops.sharded_filename(filename_tensor, shard, num_shards)
Append sharding information to a filename. Args: filename_tensor: A string tensor. shard: Integer. The shard for the filename. num_shards: An int Tensor for the number of shards. Returns: A string tensor.
Append sharding information to a filename.
[ "Append", "sharding", "information", "to", "a", "filename", "." ]
def sharded_filename(filename_tensor, shard, num_shards): """Append sharding information to a filename. Args: filename_tensor: A string tensor. shard: Integer. The shard for the filename. num_shards: An int Tensor for the number of shards. Returns: A string tensor. """ return gen_io_ops.sha...
[ "def", "sharded_filename", "(", "filename_tensor", ",", "shard", ",", "num_shards", ")", ":", "return", "gen_io_ops", ".", "sharded_filename", "(", "filename_tensor", ",", "shard", ",", "num_shards", ")" ]
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/training/saving/functional_saver.py#L117-L128
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scikit-learn/py3/sklearn/linear_model/_stochastic_gradient.py
python
BaseSGD.fit
(self, X, y)
Fit model.
Fit model.
[ "Fit", "model", "." ]
def fit(self, X, y): """Fit model."""
[ "def", "fit", "(", "self", ",", "X", ",", "y", ")", ":" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scikit-learn/py3/sklearn/linear_model/_stochastic_gradient.py#L119-L120
interpretml/interpret
29466bffc04505fe4f836a83fcfebfd313ac8454
python/interpret-core/interpret/perf/curve.py
python
ROC.explain_perf
(self, X, y, name=None)
return ROCExplanation( "perf", internal_obj, feature_names=self.feature_names, feature_types=self.feature_types, name=name, )
Produce ROC curves. Args: X: Numpy array for X to compare predict function against. y: Numpy vector for y to compare predict function against. name: User-defined explanation name. Returns: An explanation object.
Produce ROC curves.
[ "Produce", "ROC", "curves", "." ]
def explain_perf(self, X, y, name=None): """ Produce ROC curves. Args: X: Numpy array for X to compare predict function against. y: Numpy vector for y to compare predict function against. name: User-defined explanation name. Returns: An explanati...
[ "def", "explain_perf", "(", "self", ",", "X", ",", "y", ",", "name", "=", "None", ")", ":", "if", "name", "is", "None", ":", "name", "=", "gen_name_from_class", "(", "self", ")", "X", ",", "y", ",", "self", ".", "feature_names", ",", "self", ".", ...
https://github.com/interpretml/interpret/blob/29466bffc04505fe4f836a83fcfebfd313ac8454/python/interpret-core/interpret/perf/curve.py#L98-L141
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/data_flow_ops.py
python
RecordInput.__init__
(self, file_pattern, batch_size=1, buffer_size=1, parallelism=1, shift_ratio=0, seed=0, name=None, batches=None, compression_type=None)
Constructs a RecordInput Op. Args: file_pattern: File path to the dataset, possibly containing wildcards. All matching files will be iterated over each epoch. batch_size: How many records to return at a time. buffer_size: The maximum number of records the buffer will contain. parall...
Constructs a RecordInput Op.
[ "Constructs", "a", "RecordInput", "Op", "." ]
def __init__(self, file_pattern, batch_size=1, buffer_size=1, parallelism=1, shift_ratio=0, seed=0, name=None, batches=None, compression_type=None): """Constructs a RecordInput Op. ...
[ "def", "__init__", "(", "self", ",", "file_pattern", ",", "batch_size", "=", "1", ",", "buffer_size", "=", "1", ",", "parallelism", "=", "1", ",", "shift_ratio", "=", "0", ",", "seed", "=", "0", ",", "name", "=", "None", ",", "batches", "=", "None", ...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/data_flow_ops.py#L2395-L2440
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
gpu/command_buffer/build_gles2_cmd_buffer.py
python
BucketFunction.WriteServiceImplementation
(self, file)
Overridden from Function
Overridden from Function
[ "Overridden", "from", "Function" ]
def WriteServiceImplementation(self, file): """Overridden from Function""" self.type_handler.WriteBucketServiceImplementation(self, file)
[ "def", "WriteServiceImplementation", "(", "self", ",", "file", ")", ":", "self", ".", "type_handler", ".", "WriteBucketServiceImplementation", "(", "self", ",", "file", ")" ]
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/gpu/command_buffer/build_gles2_cmd_buffer.py#L5514-L5516
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/ros_comm/roslaunch/src/roslaunch/core.py
python
Master.is_running
(self)
Check if master is running. :returns:: True if the master is running, ``bool``
Check if master is running. :returns:: True if the master is running, ``bool``
[ "Check", "if", "master", "is", "running", ".", ":", "returns", "::", "True", "if", "the", "master", "is", "running", "bool" ]
def is_running(self): """ Check if master is running. :returns:: True if the master is running, ``bool`` """ try: try: to_orig = socket.getdefaulttimeout() # enable timeout socket.setdefaulttimeout(5.0) ...
[ "def", "is_running", "(", "self", ")", ":", "try", ":", "try", ":", "to_orig", "=", "socket", ".", "getdefaulttimeout", "(", ")", "# enable timeout ", "socket", ".", "setdefaulttimeout", "(", "5.0", ")", "logging", ".", "getLogger", "(", "'roslaunch'", ")", ...
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/ros_comm/roslaunch/src/roslaunch/core.py#L301-L321
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBModuleSpec.__init__
(self, *args)
__init__(self) -> SBModuleSpec __init__(self, SBModuleSpec rhs) -> SBModuleSpec
__init__(self) -> SBModuleSpec __init__(self, SBModuleSpec rhs) -> SBModuleSpec
[ "__init__", "(", "self", ")", "-", ">", "SBModuleSpec", "__init__", "(", "self", "SBModuleSpec", "rhs", ")", "-", ">", "SBModuleSpec" ]
def __init__(self, *args): """ __init__(self) -> SBModuleSpec __init__(self, SBModuleSpec rhs) -> SBModuleSpec """ this = _lldb.new_SBModuleSpec(*args) try: self.this.append(this) except: self.this = this
[ "def", "__init__", "(", "self", ",", "*", "args", ")", ":", "this", "=", "_lldb", ".", "new_SBModuleSpec", "(", "*", "args", ")", "try", ":", "self", ".", "this", ".", "append", "(", "this", ")", "except", ":", "self", ".", "this", "=", "this" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L6505-L6512
macchina-io/macchina.io
ef24ba0e18379c3dd48fb84e6dbf991101cb8db0
platform/JS/V8/tools/gyp/pylib/gyp/generator/analyzer.py
python
_WasBuildFileModified
(build_file, data, files, toplevel_dir)
return False
Returns true if the build file |build_file| is either in |files| or one of the files included by |build_file| is in |files|. |toplevel_dir| is the root of the source tree.
Returns true if the build file |build_file| is either in |files| or one of the files included by |build_file| is in |files|. |toplevel_dir| is the root of the source tree.
[ "Returns", "true", "if", "the", "build", "file", "|build_file|", "is", "either", "in", "|files|", "or", "one", "of", "the", "files", "included", "by", "|build_file|", "is", "in", "|files|", ".", "|toplevel_dir|", "is", "the", "root", "of", "the", "source", ...
def _WasBuildFileModified(build_file, data, files, toplevel_dir): """Returns true if the build file |build_file| is either in |files| or one of the files included by |build_file| is in |files|. |toplevel_dir| is the root of the source tree.""" if _ToLocalPath(toplevel_dir, _ToGypPath(build_file)) in files: ...
[ "def", "_WasBuildFileModified", "(", "build_file", ",", "data", ",", "files", ",", "toplevel_dir", ")", ":", "if", "_ToLocalPath", "(", "toplevel_dir", ",", "_ToGypPath", "(", "build_file", ")", ")", "in", "files", ":", "if", "debug", ":", "print", "'gyp fil...
https://github.com/macchina-io/macchina.io/blob/ef24ba0e18379c3dd48fb84e6dbf991101cb8db0/platform/JS/V8/tools/gyp/pylib/gyp/generator/analyzer.py#L275-L297
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/collections/__init__.py
python
OrderedDict.__delitem__
(self, key, dict_delitem=dict.__delitem__)
od.__delitem__(y) <==> del od[y]
od.__delitem__(y) <==> del od[y]
[ "od", ".", "__delitem__", "(", "y", ")", "<", "==", ">", "del", "od", "[", "y", "]" ]
def __delitem__(self, key, dict_delitem=dict.__delitem__): 'od.__delitem__(y) <==> del od[y]' # Deleting an existing item uses self.__map to find the link which gets # removed by updating the links in the predecessor and successor nodes. dict_delitem(self, key) link = self.__map....
[ "def", "__delitem__", "(", "self", ",", "key", ",", "dict_delitem", "=", "dict", ".", "__delitem__", ")", ":", "# Deleting an existing item uses self.__map to find the link which gets", "# removed by updating the links in the predecessor and successor nodes.", "dict_delitem", "(", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/collections/__init__.py#L129-L140
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/pycc/compiler.py
python
_ModuleCompiler._emit_module_init_code
(self, llvm_module, builder, modobj, method_array, env_array, envgv_array)
Emit call to "external" init function, if any.
Emit call to "external" init function, if any.
[ "Emit", "call", "to", "external", "init", "function", "if", "any", "." ]
def _emit_module_init_code(self, llvm_module, builder, modobj, method_array, env_array, envgv_array): """ Emit call to "external" init function, if any. """ if self.external_init_function: fnty = ir.FunctionType(lt._int32, ...
[ "def", "_emit_module_init_code", "(", "self", ",", "llvm_module", ",", "builder", ",", "modobj", ",", "method_array", ",", "env_array", ",", "envgv_array", ")", ":", "if", "self", ".", "external_init_function", ":", "fnty", "=", "ir", ".", "FunctionType", "(",...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/pycc/compiler.py#L291-L304
pskun/finance_news_analysis
6ac13e32deede37a4cf57bba8b2897941ae3d80d
strategy/plottools.py
python
get_datetime_date
(curdate)
return dt.date(curdate/10000, (curdate%10000)/100, curdate%100)
curdate is integer like: 20090101
curdate is integer like: 20090101
[ "curdate", "is", "integer", "like", ":", "20090101" ]
def get_datetime_date(curdate): '''curdate is integer like: 20090101''' return dt.date(curdate/10000, (curdate%10000)/100, curdate%100)
[ "def", "get_datetime_date", "(", "curdate", ")", ":", "return", "dt", ".", "date", "(", "curdate", "/", "10000", ",", "(", "curdate", "%", "10000", ")", "/", "100", ",", "curdate", "%", "100", ")" ]
https://github.com/pskun/finance_news_analysis/blob/6ac13e32deede37a4cf57bba8b2897941ae3d80d/strategy/plottools.py#L9-L11
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Draft/importDXF.py
python
getBlock
(sh, obj, lwPoly=False)
return block
Return a DXF block with the contents of the object. It creates a `block` object using `dxfLibrary.Block`, and then writes the given shape with `writeShape(sh, obj, block, lwPoly)`. Parameters ---------- sh : Part::TopoShape Any shape in the document. obj : App::DocumentObject ...
Return a DXF block with the contents of the object.
[ "Return", "a", "DXF", "block", "with", "the", "contents", "of", "the", "object", "." ]
def getBlock(sh, obj, lwPoly=False): """Return a DXF block with the contents of the object. It creates a `block` object using `dxfLibrary.Block`, and then writes the given shape with `writeShape(sh, obj, block, lwPoly)`. Parameters ---------- sh : Part::TopoShape Any shape in the d...
[ "def", "getBlock", "(", "sh", ",", "obj", ",", "lwPoly", "=", "False", ")", ":", "block", "=", "dxfLibrary", ".", "Block", "(", "name", "=", "obj", ".", "Name", ",", "layer", "=", "getStrGroup", "(", "obj", ")", ")", "writeShape", "(", "sh", ",", ...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Draft/importDXF.py#L3134-L3161
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_windows.py
python
VarScrollHelperBase.GetVisibleEnd
(*args, **kwargs)
return _windows_.VarScrollHelperBase_GetVisibleEnd(*args, **kwargs)
GetVisibleEnd(self) -> size_t
GetVisibleEnd(self) -> size_t
[ "GetVisibleEnd", "(", "self", ")", "-", ">", "size_t" ]
def GetVisibleEnd(*args, **kwargs): """GetVisibleEnd(self) -> size_t""" return _windows_.VarScrollHelperBase_GetVisibleEnd(*args, **kwargs)
[ "def", "GetVisibleEnd", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_windows_", ".", "VarScrollHelperBase_GetVisibleEnd", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_windows.py#L2222-L2224
KhronosGroup/OpenXR-SDK
458984d7f59d1ae6dc1b597d94b02e4f7132eaba
src/external/jsoncpp/devtools/antglob.py
python
ant_pattern_to_re
(ant_pattern)
return re.compile(''.join(rex))
Generates a regular expression from the ant pattern. Matching convention: **/a: match 'a', 'dir/a', 'dir1/dir2/a' a/**/b: match 'a/b', 'a/c/b', 'a/d/c/b' *.py: match 'script.py' but not 'a/script.py'
Generates a regular expression from the ant pattern. Matching convention: **/a: match 'a', 'dir/a', 'dir1/dir2/a' a/**/b: match 'a/b', 'a/c/b', 'a/d/c/b' *.py: match 'script.py' but not 'a/script.py'
[ "Generates", "a", "regular", "expression", "from", "the", "ant", "pattern", ".", "Matching", "convention", ":", "**", "/", "a", ":", "match", "a", "dir", "/", "a", "dir1", "/", "dir2", "/", "a", "a", "/", "**", "/", "b", ":", "match", "a", "/", "...
def ant_pattern_to_re(ant_pattern): """Generates a regular expression from the ant pattern. Matching convention: **/a: match 'a', 'dir/a', 'dir1/dir2/a' a/**/b: match 'a/b', 'a/c/b', 'a/d/c/b' *.py: match 'script.py' but not 'a/script.py' """ rex = ['^'] next_pos = 0 sep_rex = r'(?:/...
[ "def", "ant_pattern_to_re", "(", "ant_pattern", ")", ":", "rex", "=", "[", "'^'", "]", "next_pos", "=", "0", "sep_rex", "=", "r'(?:/|%s)'", "%", "re", ".", "escape", "(", "os", ".", "path", ".", "sep", ")", "## print 'Converting', ant_pattern", "for", "...
https://github.com/KhronosGroup/OpenXR-SDK/blob/458984d7f59d1ae6dc1b597d94b02e4f7132eaba/src/external/jsoncpp/devtools/antglob.py#L62-L92
rdkit/rdkit
ede860ae316d12d8568daf5ee800921c3389c84e
rdkit/Chem/Crippen.py
python
_pyMolMR
(inMol, patts=None, order=None, verbose=0, addHs=1)
return numpy.sum(atomContribs, 0)[1]
DEPRECATED
DEPRECATED
[ "DEPRECATED" ]
def _pyMolMR(inMol, patts=None, order=None, verbose=0, addHs=1): """ DEPRECATED """ if addHs < 0: mol = Chem.AddHs(inMol, 1) elif addHs > 0: mol = Chem.AddHs(inMol, 0) else: mol = inMol if patts is None: global _smartsPatterns, _patternOrder if _smartsPatterns == {}: _patternOrder...
[ "def", "_pyMolMR", "(", "inMol", ",", "patts", "=", "None", ",", "order", "=", "None", ",", "verbose", "=", "0", ",", "addHs", "=", "1", ")", ":", "if", "addHs", "<", "0", ":", "mol", "=", "Chem", ".", "AddHs", "(", "inMol", ",", "1", ")", "e...
https://github.com/rdkit/rdkit/blob/ede860ae316d12d8568daf5ee800921c3389c84e/rdkit/Chem/Crippen.py#L147-L165
macchina-io/macchina.io
ef24ba0e18379c3dd48fb84e6dbf991101cb8db0
platform/JS/V8/v8/third_party/jinja2/compiler.py
python
CodeGenerator.visit_Import
(self, node, frame)
Visit regular imports.
Visit regular imports.
[ "Visit", "regular", "imports", "." ]
def visit_Import(self, node, frame): """Visit regular imports.""" if node.with_context: self.unoptimize_scope(frame) self.writeline('l_%s = ' % node.target, node) if frame.toplevel: self.write('context.vars[%r] = ' % node.target) self.write('environment.ge...
[ "def", "visit_Import", "(", "self", ",", "node", ",", "frame", ")", ":", "if", "node", ".", "with_context", ":", "self", ".", "unoptimize_scope", "(", "frame", ")", "self", ".", "writeline", "(", "'l_%s = '", "%", "node", ".", "target", ",", "node", ")...
https://github.com/macchina-io/macchina.io/blob/ef24ba0e18379c3dd48fb84e6dbf991101cb8db0/platform/JS/V8/v8/third_party/jinja2/compiler.py#L969-L985
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/aui.py
python
AuiToolBar.FindToolByPosition
(*args, **kwargs)
return _aui.AuiToolBar_FindToolByPosition(*args, **kwargs)
FindToolByPosition(self, int x, int y) -> AuiToolBarItem
FindToolByPosition(self, int x, int y) -> AuiToolBarItem
[ "FindToolByPosition", "(", "self", "int", "x", "int", "y", ")", "-", ">", "AuiToolBarItem" ]
def FindToolByPosition(*args, **kwargs): """FindToolByPosition(self, int x, int y) -> AuiToolBarItem""" return _aui.AuiToolBar_FindToolByPosition(*args, **kwargs)
[ "def", "FindToolByPosition", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_aui", ".", "AuiToolBar_FindToolByPosition", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/aui.py#L2058-L2060
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/datamodel/models.py
python
DataModel.contains_nrt_meminfo
(self)
return any(model.has_nrt_meminfo() for model in self.traverse_models())
Recursively check all contained types for need for NRT meminfo.
Recursively check all contained types for need for NRT meminfo.
[ "Recursively", "check", "all", "contained", "types", "for", "need", "for", "NRT", "meminfo", "." ]
def contains_nrt_meminfo(self): """ Recursively check all contained types for need for NRT meminfo. """ return any(model.has_nrt_meminfo() for model in self.traverse_models())
[ "def", "contains_nrt_meminfo", "(", "self", ")", ":", "return", "any", "(", "model", ".", "has_nrt_meminfo", "(", ")", "for", "model", "in", "self", ".", "traverse_models", "(", ")", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/datamodel/models.py#L125-L129
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/plotting/_misc.py
python
_Options.use
(self, key, value)
Temporarily set a parameter value using the with statement. Aliasing allowed.
Temporarily set a parameter value using the with statement. Aliasing allowed.
[ "Temporarily", "set", "a", "parameter", "value", "using", "the", "with", "statement", ".", "Aliasing", "allowed", "." ]
def use(self, key, value): """ Temporarily set a parameter value using the with statement. Aliasing allowed. """ old_value = self[key] try: self[key] = value yield self finally: self[key] = old_value
[ "def", "use", "(", "self", ",", "key", ",", "value", ")", ":", "old_value", "=", "self", "[", "key", "]", "try", ":", "self", "[", "key", "]", "=", "value", "yield", "self", "finally", ":", "self", "[", "key", "]", "=", "old_value" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/plotting/_misc.py#L474-L484
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/random_ops.py
python
random_normal
(shape, mean=0.0, stddev=1.0, dtype=dtypes.float32, seed=None, name=None)
Outputs random values from a normal distribution. Args: shape: A 1-D integer Tensor or Python array. The shape of the output tensor. mean: A 0-D Tensor or Python value of type `dtype`. The mean of the normal distribution. stddev: A 0-D Tensor or Python value of type `dtype`. The standard deviation ...
Outputs random values from a normal distribution.
[ "Outputs", "random", "values", "from", "a", "normal", "distribution", "." ]
def random_normal(shape, mean=0.0, stddev=1.0, dtype=dtypes.float32, seed=None, name=None): """Outputs random values from a normal distribution. Args: shape: A 1-D integer Tensor or Python array. The shape of the output t...
[ "def", "random_normal", "(", "shape", ",", "mean", "=", "0.0", ",", "stddev", "=", "1.0", ",", "dtype", "=", "dtypes", ".", "float32", ",", "seed", "=", "None", ",", "name", "=", "None", ")", ":", "with", "ops", ".", "name_scope", "(", "name", ",",...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/ops/random_ops.py#L44-L78
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/feature_column/feature_column_v2.py
python
BucketizedColumn._get_sparse_tensors
(self, inputs, weight_collections=None, trainable=None)
return self._get_sparse_tensors_for_input_tensor(input_tensor)
Converts dense inputs to SparseTensor so downstream code can use it.
Converts dense inputs to SparseTensor so downstream code can use it.
[ "Converts", "dense", "inputs", "to", "SparseTensor", "so", "downstream", "code", "can", "use", "it", "." ]
def _get_sparse_tensors(self, inputs, weight_collections=None, trainable=None): """Converts dense inputs to SparseTensor so downstream code can use it.""" del weight_collections del trainable input_tensor = inputs.get(self) return self._get_sparse_tensors_for_input_tensor(i...
[ "def", "_get_sparse_tensors", "(", "self", ",", "inputs", ",", "weight_collections", "=", "None", ",", "trainable", "=", "None", ")", ":", "del", "weight_collections", "del", "trainable", "input_tensor", "=", "inputs", ".", "get", "(", "self", ")", "return", ...
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/feature_column/feature_column_v2.py#L2993-L2999
mlpack/mlpack
cf190e11f2109de4d4d8694aad5dd07850f04a82
src/mlpack/bindings/python/mlpack/preprocess_json_params.py
python
value_resolver
(pairs)
return OrderedDict(pairs)
This function converts multiple "elem" occurences to a list when used with json.loads(). Eg: str({ vec_state: 1, n_rows: 2, n_cols: 1, elem: 1, elem: 2 }) will be converted to dict({ vec_state: 1, n_rows: 2, n_cols: 1, elem: [1,2] }) This is done to handle same keys...
This function converts multiple "elem" occurences to a list when used with json.loads(). Eg: str({ vec_state: 1, n_rows: 2, n_cols: 1, elem: 1, elem: 2 })
[ "This", "function", "converts", "multiple", "elem", "occurences", "to", "a", "list", "when", "used", "with", "json", ".", "loads", "()", ".", "Eg", ":", "str", "(", "{", "vec_state", ":", "1", "n_rows", ":", "2", "n_cols", ":", "1", "elem", ":", "1",...
def value_resolver(pairs): ''' This function converts multiple "elem" occurences to a list when used with json.loads(). Eg: str({ vec_state: 1, n_rows: 2, n_cols: 1, elem: 1, elem: 2 }) will be converted to dict({ vec_state: 1, n_rows: 2, n_cols: 1, elem: [1,2] })...
[ "def", "value_resolver", "(", "pairs", ")", ":", "has_elem", "=", "False", "for", "key", ",", "val", "in", "pairs", ":", "if", "key", "==", "\"elem\"", ":", "has_elem", "=", "True", "break", "if", "has_elem", ":", "val_list", "=", "[", "val", "for", ...
https://github.com/mlpack/mlpack/blob/cf190e11f2109de4d4d8694aad5dd07850f04a82/src/mlpack/bindings/python/mlpack/preprocess_json_params.py#L188-L221
PixarAnimationStudios/USD
faed18ce62c8736b02413635b584a2f637156bad
pxr/usdImaging/usdviewq/pythonInterpreter.py
python
_Completer.Complete
(self, text, state)
Return the next possible completion for 'text'. This is called successively with state == 0, 1, 2, ... until it returns None. The completion should begin with 'text'.
Return the next possible completion for 'text'. This is called successively with state == 0, 1, 2, ... until it returns None. The completion should begin with 'text'.
[ "Return", "the", "next", "possible", "completion", "for", "text", ".", "This", "is", "called", "successively", "with", "state", "==", "0", "1", "2", "...", "until", "it", "returns", "None", ".", "The", "completion", "should", "begin", "with", "text", "." ]
def Complete(self, text, state): """Return the next possible completion for 'text'. This is called successively with state == 0, 1, 2, ... until it returns None. The completion should begin with 'text'. """ if state == 0: if "." in text: self.matches ...
[ "def", "Complete", "(", "self", ",", "text", ",", "state", ")", ":", "if", "state", "==", "0", ":", "if", "\".\"", "in", "text", ":", "self", ".", "matches", "=", "self", ".", "_AttrMatches", "(", "text", ")", "else", ":", "self", ".", "matches", ...
https://github.com/PixarAnimationStudios/USD/blob/faed18ce62c8736b02413635b584a2f637156bad/pxr/usdImaging/usdviewq/pythonInterpreter.py#L60-L73
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/_op_impl/akg/ascend/less_equal.py
python
_less_equal_akg
()
return
Equal Akg register
Equal Akg register
[ "Equal", "Akg", "register" ]
def _less_equal_akg(): """Equal Akg register""" return
[ "def", "_less_equal_akg", "(", ")", ":", "return" ]
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/_op_impl/akg/ascend/less_equal.py#L33-L35
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/python2_version/klampt/math/symbolic.py
python
Function.optimized
(self,*args)
Similar to ``self(*args).simplify(depth=1)``, but optimized to reduce complexity earlier. In particular, this directly applies the operation if all arguments are constants, and it will try to apply the simplifier immediately.
Similar to ``self(*args).simplify(depth=1)``, but optimized to reduce complexity earlier. In particular, this directly applies the operation if all arguments are constants, and it will try to apply the simplifier immediately.
[ "Similar", "to", "self", "(", "*", "args", ")", ".", "simplify", "(", "depth", "=", "1", ")", "but", "optimized", "to", "reduce", "complexity", "earlier", ".", "In", "particular", "this", "directly", "applies", "the", "operation", "if", "all", "arguments",...
def optimized(self,*args): """Similar to ``self(*args).simplify(depth=1)``, but optimized to reduce complexity earlier. In particular, this directly applies the operation if all arguments are constants, and it will try to apply the simplifier immediately.""" if self.presimplifier...
[ "def", "optimized", "(", "self", ",", "*", "args", ")", ":", "if", "self", ".", "presimplifier", "!=", "None", ":", "res", "=", "self", ".", "presimplifier", "(", "*", "args", ")", "if", "res", "is", "not", "None", ":", "if", "isinstance", "(", "re...
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/python2_version/klampt/math/symbolic.py#L1638-L1675
metashell/metashell
f4177e4854ea00c8dbc722cadab26ef413d798ea
3rd/templight/compiler-rt/lib/sanitizer_common/scripts/cpplint.py
python
_SetFilters
(filters)
Sets the module's error-message filters. These filters are applied when deciding whether to emit a given error message. Args: filters: A string of comma-separated filters (eg "whitespace/indent"). Each filter should start with + or -; else we die.
Sets the module's error-message filters.
[ "Sets", "the", "module", "s", "error", "-", "message", "filters", "." ]
def _SetFilters(filters): """Sets the module's error-message filters. These filters are applied when deciding whether to emit a given error message. Args: filters: A string of comma-separated filters (eg "whitespace/indent"). Each filter should start with + or -; else we die. """ _cpplint...
[ "def", "_SetFilters", "(", "filters", ")", ":", "_cpplint_state", ".", "SetFilters", "(", "filters", ")" ]
https://github.com/metashell/metashell/blob/f4177e4854ea00c8dbc722cadab26ef413d798ea/3rd/templight/compiler-rt/lib/sanitizer_common/scripts/cpplint.py#L1001-L1011
nucleic/atom
9f0cb2a8101dd63c354a98ebc7489b2c616dc82a
atom/list.py
python
List.set_index
(self, index)
Assign the index to this member. This method ensures that the item member index is also updated.
Assign the index to this member.
[ "Assign", "the", "index", "to", "this", "member", "." ]
def set_index(self, index): """Assign the index to this member. This method ensures that the item member index is also updated. """ super(List, self).set_index(index) if self.item is not None: self.item.set_index(index)
[ "def", "set_index", "(", "self", ",", "index", ")", ":", "super", "(", "List", ",", "self", ")", ".", "set_index", "(", "index", ")", "if", "self", ".", "item", "is", "not", "None", ":", "self", ".", "item", ".", "set_index", "(", "index", ")" ]
https://github.com/nucleic/atom/blob/9f0cb2a8101dd63c354a98ebc7489b2c616dc82a/atom/list.py#L57-L65
qt/qt
0a2f2382541424726168804be2c90b91381608c6
src/3rdparty/webkit/Source/ThirdParty/gyp/pylib/gyp/MSVSProject.py
python
Writer._AddFilesToNode
(self, parent, files)
Adds files and/or filters to the parent node. Args: parent: Destination node files: A list of Filter objects and/or relative paths to files. Will call itself recursively, if the files list contains Filter objects.
Adds files and/or filters to the parent node.
[ "Adds", "files", "and", "/", "or", "filters", "to", "the", "parent", "node", "." ]
def _AddFilesToNode(self, parent, files): """Adds files and/or filters to the parent node. Args: parent: Destination node files: A list of Filter objects and/or relative paths to files. Will call itself recursively, if the files list contains Filter objects. """ for f in files: i...
[ "def", "_AddFilesToNode", "(", "self", ",", "parent", ",", "files", ")", ":", "for", "f", "in", "files", ":", "if", "isinstance", "(", "f", ",", "Filter", ")", ":", "node", "=", "self", ".", "doc", ".", "createElement", "(", "'Filter'", ")", "node", ...
https://github.com/qt/qt/blob/0a2f2382541424726168804be2c90b91381608c6/src/3rdparty/webkit/Source/ThirdParty/gyp/pylib/gyp/MSVSProject.py#L183-L201
NREL/EnergyPlus
fadc5973b85c70e8cc923efb69c144e808a26078
src/EnergyPlus/api/datatransfer.py
python
DataExchange.get_actuator_value
(self, state: c_void_p, actuator_handle: int)
return self.api.getActuatorValue(state, actuator_handle)
Gets the most recent value of an actuator. In some applications, actuators are altered by multiple scripts, and this allows getting the most recent value. :param state: An active EnergyPlus "state" that is returned from a call to `api.state_manager.new_state()`. :param actuator_handle: An inte...
Gets the most recent value of an actuator. In some applications, actuators are altered by multiple scripts, and this allows getting the most recent value.
[ "Gets", "the", "most", "recent", "value", "of", "an", "actuator", ".", "In", "some", "applications", "actuators", "are", "altered", "by", "multiple", "scripts", "and", "this", "allows", "getting", "the", "most", "recent", "value", "." ]
def get_actuator_value(self, state: c_void_p, actuator_handle: int) -> float: """ Gets the most recent value of an actuator. In some applications, actuators are altered by multiple scripts, and this allows getting the most recent value. :param state: An active EnergyPlus "state" that i...
[ "def", "get_actuator_value", "(", "self", ",", "state", ":", "c_void_p", ",", "actuator_handle", ":", "int", ")", "->", "float", ":", "if", "not", "is_number", "(", "actuator_handle", ")", ":", "raise", "EnergyPlusException", "(", "\"`get_actuator_value` expects `...
https://github.com/NREL/EnergyPlus/blob/fadc5973b85c70e8cc923efb69c144e808a26078/src/EnergyPlus/api/datatransfer.py#L530-L545
google/certificate-transparency
2588562fd306a447958471b6f06c1069619c1641
python/ct/crypto/in_memory_merkle_tree.py
python
InMemoryMerkleTree._calculate_subproof
(self, m, leaves, complete_subtree)
return res
SUBPROOF, see RFC6962 section 2.1.2.
SUBPROOF, see RFC6962 section 2.1.2.
[ "SUBPROOF", "see", "RFC6962", "section", "2", ".", "1", ".", "2", "." ]
def _calculate_subproof(self, m, leaves, complete_subtree): """SUBPROOF, see RFC6962 section 2.1.2.""" n = len(leaves) if m == n or n == 1: if complete_subtree: return [] else: return [self.__hasher.hash_full_tree(leaves)] k = _dow...
[ "def", "_calculate_subproof", "(", "self", ",", "m", ",", "leaves", ",", "complete_subtree", ")", ":", "n", "=", "len", "(", "leaves", ")", "if", "m", "==", "n", "or", "n", "==", "1", ":", "if", "complete_subtree", ":", "return", "[", "]", "else", ...
https://github.com/google/certificate-transparency/blob/2588562fd306a447958471b6f06c1069619c1641/python/ct/crypto/in_memory_merkle_tree.py#L60-L78
Samsung/veles
95ed733c2e49bc011ad98ccf2416ecec23fbf352
veles/memory.py
python
Array.__setitem__
(self, key, value)
To enable [] operator.
To enable [] operator.
[ "To", "enable", "[]", "operator", "." ]
def __setitem__(self, key, value): """To enable [] operator. """ self._mem[key] = value
[ "def", "__setitem__", "(", "self", ",", "key", ",", "value", ")", ":", "self", ".", "_mem", "[", "key", "]", "=", "value" ]
https://github.com/Samsung/veles/blob/95ed733c2e49bc011ad98ccf2416ecec23fbf352/veles/memory.py#L326-L329
apache/kudu
90895ce76590f10730ad7aac3613b69d89ff5422
build-support/iwyu/fix_includes.py
python
ProcessIWYUOutput
(f, files_to_process, flags, cwd)
return FixManyFiles(records, flags)
Fix the #include and forward-declare lines as directed by f. Given a file object that has the output of the include_what_you_use script, see every file to be edited and edit it, if appropriate. Arguments: f: an iterable object that is the output of include_what_you_use. files_to_process: A set of filena...
Fix the #include and forward-declare lines as directed by f.
[ "Fix", "the", "#include", "and", "forward", "-", "declare", "lines", "as", "directed", "by", "f", "." ]
def ProcessIWYUOutput(f, files_to_process, flags, cwd): """Fix the #include and forward-declare lines as directed by f. Given a file object that has the output of the include_what_you_use script, see every file to be edited and edit it, if appropriate. Arguments: f: an iterable object that is the output o...
[ "def", "ProcessIWYUOutput", "(", "f", ",", "files_to_process", ",", "flags", ",", "cwd", ")", ":", "if", "files_to_process", "is", "not", "None", ":", "files_to_process", "=", "[", "NormalizeFilePath", "(", "cwd", ",", "fname", ")", "for", "fname", "in", "...
https://github.com/apache/kudu/blob/90895ce76590f10730ad7aac3613b69d89ff5422/build-support/iwyu/fix_includes.py#L2332-L2358
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/_op_impl/_custom_op/batchnorm_fold2_grad.py
python
batchnorm_fold2_grad_compute
(dout, dout_reduce, dout_x_reduce, gamma, batch_std, batch_mean, running_std, kernel_name="batchnorm_fold2_grad")
return [d_batch_std, d_batch_mean, d_gamma, dx]
_BatchNormFold2Grad
_BatchNormFold2Grad
[ "_BatchNormFold2Grad" ]
def batchnorm_fold2_grad_compute(dout, dout_reduce, dout_x_reduce, gamma, batch_std, batch_mean, running_std, kernel_name="batchnorm_fold2_grad"): """_BatchNormFold2Grad""" shape_x = te.lang.cce.util.shape_to_list(dout.shape) d_batch_std_1 = te.lang.cce.vmul(dout_reduce, ba...
[ "def", "batchnorm_fold2_grad_compute", "(", "dout", ",", "dout_reduce", ",", "dout_x_reduce", ",", "gamma", ",", "batch_std", ",", "batch_mean", ",", "running_std", ",", "kernel_name", "=", "\"batchnorm_fold2_grad\"", ")", ":", "shape_x", "=", "te", ".", "lang", ...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/_op_impl/_custom_op/batchnorm_fold2_grad.py#L57-L80
OpenChemistry/tomviz
0a903679318f191cb7dd3eb5ff5bc3a7d3320d9a
tomviz/python/tomviz/io/dm.py
python
FileDM.seek
(self, fid, offset, from_what=0)
Positions the reading head for fid. fid can be a file or memory map. Follows the same convention as file.seek Parameters ---------- fid : file id File or memory map. offset : int Number of bytes to move the head forward (positive value) ...
Positions the reading head for fid. fid can be a file or memory map. Follows the same convention as file.seek
[ "Positions", "the", "reading", "head", "for", "fid", ".", "fid", "can", "be", "a", "file", "or", "memory", "map", ".", "Follows", "the", "same", "convention", "as", "file", ".", "seek" ]
def seek(self, fid, offset, from_what=0): """Positions the reading head for fid. fid can be a file or memory map. Follows the same convention as file.seek Parameters ---------- fid : file id File or memory map. offset : int Number ...
[ "def", "seek", "(", "self", ",", "fid", ",", "offset", ",", "from_what", "=", "0", ")", ":", "if", "self", ".", "_on_memory", ":", "offset", "=", "int", "(", "offset", ")", "if", "from_what", "==", "0", ":", "self", ".", "_buffer_offset", "=", "off...
https://github.com/OpenChemistry/tomviz/blob/0a903679318f191cb7dd3eb5ff5bc3a7d3320d9a/tomviz/python/tomviz/io/dm.py#L306-L336
bulletphysics/bullet3
f0f2a952e146f016096db6f85cf0c44ed75b0b9a
examples/pybullet/gym/pybullet_envs/agents/ppo/utility.py
python
diag_normal_logpdf
(mean, logstd, loc)
return tf.reduce_sum(constant + value, -1)
Log density of a normal with diagonal covariance.
Log density of a normal with diagonal covariance.
[ "Log", "density", "of", "a", "normal", "with", "diagonal", "covariance", "." ]
def diag_normal_logpdf(mean, logstd, loc): """Log density of a normal with diagonal covariance.""" constant = -0.5 * math.log(2 * math.pi) - logstd value = -0.5 * ((loc - mean) / tf.exp(logstd))**2 return tf.reduce_sum(constant + value, -1)
[ "def", "diag_normal_logpdf", "(", "mean", ",", "logstd", ",", "loc", ")", ":", "constant", "=", "-", "0.5", "*", "math", ".", "log", "(", "2", "*", "math", ".", "pi", ")", "-", "logstd", "value", "=", "-", "0.5", "*", "(", "(", "loc", "-", "mea...
https://github.com/bulletphysics/bullet3/blob/f0f2a952e146f016096db6f85cf0c44ed75b0b9a/examples/pybullet/gym/pybullet_envs/agents/ppo/utility.py#L132-L136
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/ipython/py3/IPython/terminal/pt_inputhooks/asyncio.py
python
inputhook
(context)
Inputhook for asyncio event loop integration.
Inputhook for asyncio event loop integration.
[ "Inputhook", "for", "asyncio", "event", "loop", "integration", "." ]
def inputhook(context): """ Inputhook for asyncio event loop integration. """ # For prompt_toolkit 3.0, this input hook literally doesn't do anything. # The event loop integration here is implemented in `interactiveshell.py` # by running the prompt itself in the current asyncio loop. The main re...
[ "def", "inputhook", "(", "context", ")", ":", "# For prompt_toolkit 3.0, this input hook literally doesn't do anything.", "# The event loop integration here is implemented in `interactiveshell.py`", "# by running the prompt itself in the current asyncio loop. The main reason", "# for this is that ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/ipython/py3/IPython/terminal/pt_inputhooks/asyncio.py#L41-L63
qt/qt
0a2f2382541424726168804be2c90b91381608c6
src/3rdparty/webkit/Source/ThirdParty/gyp/pylib/gyp/MSVSVersion.py
python
SelectVisualStudioVersion
(version='auto')
return _CreateVersion(version)
Select which version of Visual Studio projects to generate. Arguments: version: Hook to allow caller to force a particular version (vs auto). Returns: An object representing a visual studio project format version.
Select which version of Visual Studio projects to generate.
[ "Select", "which", "version", "of", "Visual", "Studio", "projects", "to", "generate", "." ]
def SelectVisualStudioVersion(version='auto'): """Select which version of Visual Studio projects to generate. Arguments: version: Hook to allow caller to force a particular version (vs auto). Returns: An object representing a visual studio project format version. """ # In auto mode, check environment...
[ "def", "SelectVisualStudioVersion", "(", "version", "=", "'auto'", ")", ":", "# In auto mode, check environment variable for override.", "if", "version", "==", "'auto'", ":", "version", "=", "os", ".", "environ", ".", "get", "(", "'GYP_MSVS_VERSION'", ",", "'auto'", ...
https://github.com/qt/qt/blob/0a2f2382541424726168804be2c90b91381608c6/src/3rdparty/webkit/Source/ThirdParty/gyp/pylib/gyp/MSVSVersion.py#L181-L200
macchina-io/macchina.io
ef24ba0e18379c3dd48fb84e6dbf991101cb8db0
platform/JS/V8/v8/tools/grokdump.py
python
InspectionShell.do_do
(self, address)
return self.do_display_object(address)
see display_object
see display_object
[ "see", "display_object" ]
def do_do(self, address): """ see display_object """ return self.do_display_object(address)
[ "def", "do_do", "(", "self", ",", "address", ")", ":", "return", "self", ".", "do_display_object", "(", "address", ")" ]
https://github.com/macchina-io/macchina.io/blob/ef24ba0e18379c3dd48fb84e6dbf991101cb8db0/platform/JS/V8/v8/tools/grokdump.py#L3390-L3392
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/ninja/misc/write_fake_manifests.py
python
write_master_ninja
(master_ninja, targets)
Writes master build.ninja file, referencing all given subninjas.
Writes master build.ninja file, referencing all given subninjas.
[ "Writes", "master", "build", ".", "ninja", "file", "referencing", "all", "given", "subninjas", "." ]
def write_master_ninja(master_ninja, targets): """Writes master build.ninja file, referencing all given subninjas.""" master_ninja.variable('cxx', 'c++') master_ninja.variable('ld', '$cxx') if sys.platform == 'darwin': master_ninja.variable('alink', 'libtool -static') else: master_ni...
[ "def", "write_master_ninja", "(", "master_ninja", ",", "targets", ")", ":", "master_ninja", ".", "variable", "(", "'cxx'", ",", "'c++'", ")", "master_ninja", ".", "variable", "(", "'ld'", ",", "'$cxx'", ")", "if", "sys", ".", "platform", "==", "'darwin'", ...
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/ninja/misc/write_fake_manifests.py#L177-L211
ceph/ceph
959663007321a369c83218414a29bd9dbc8bda3a
src/pybind/mgr/volumes/fs/operations/subvolume.py
python
remove_subvol
(mgr, fs, vol_spec, group, subvolname, force=False, retainsnaps=False)
remove a subvolume. :param fs: ceph filesystem handle :param vol_spec: volume specification :param group: group object for the subvolume :param subvolname: subvolume name :param force: force remove subvolumes :return: None
remove a subvolume.
[ "remove", "a", "subvolume", "." ]
def remove_subvol(mgr, fs, vol_spec, group, subvolname, force=False, retainsnaps=False): """ remove a subvolume. :param fs: ceph filesystem handle :param vol_spec: volume specification :param group: group object for the subvolume :param subvolname: subvolume name :param force: force remove ...
[ "def", "remove_subvol", "(", "mgr", ",", "fs", ",", "vol_spec", ",", "group", ",", "subvolname", ",", "force", "=", "False", ",", "retainsnaps", "=", "False", ")", ":", "op_type", "=", "SubvolumeOpType", ".", "REMOVE", "if", "not", "force", "else", "Subv...
https://github.com/ceph/ceph/blob/959663007321a369c83218414a29bd9dbc8bda3a/src/pybind/mgr/volumes/fs/operations/subvolume.py#L44-L57
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/traitlets/py3/traitlets/utils/importstring.py
python
import_item
(name)
Import and return ``bar`` given the string ``foo.bar``. Calling ``bar = import_item("foo.bar")`` is the functional equivalent of executing the code ``from foo import bar``. Parameters ---------- name : string The fully qualified name of the module/package being imported. Returns -...
Import and return ``bar`` given the string ``foo.bar``.
[ "Import", "and", "return", "bar", "given", "the", "string", "foo", ".", "bar", "." ]
def import_item(name): """Import and return ``bar`` given the string ``foo.bar``. Calling ``bar = import_item("foo.bar")`` is the functional equivalent of executing the code ``from foo import bar``. Parameters ---------- name : string The fully qualified name of the module/package bein...
[ "def", "import_item", "(", "name", ")", ":", "if", "not", "isinstance", "(", "name", ",", "str", ")", ":", "raise", "TypeError", "(", "\"import_item accepts strings, not '%s'.\"", "%", "type", "(", "name", ")", ")", "parts", "=", "name", ".", "rsplit", "("...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/traitlets/py3/traitlets/utils/importstring.py#L8-L38
dolphin-emu/dolphin
b4c7f2b1e834ce5ea4b2301f9d4fb07c11afeabb
Externals/discord-rpc/build.py
python
archive
()
create zip of install dir
create zip of install dir
[ "create", "zip", "of", "install", "dir" ]
def archive(): """ create zip of install dir """ click.echo('--- Archiving') archive_file_path = os.path.join(SCRIPT_PATH, 'builds', 'discord-rpc-%s.zip' % get_platform()) archive_file = zipfile.ZipFile(archive_file_path, 'w', zipfile.ZIP_DEFLATED) archive_src_base_path = INSTALL_ROOT archive_ds...
[ "def", "archive", "(", ")", ":", "click", ".", "echo", "(", "'--- Archiving'", ")", "archive_file_path", "=", "os", ".", "path", ".", "join", "(", "SCRIPT_PATH", ",", "'builds'", ",", "'discord-rpc-%s.zip'", "%", "get_platform", "(", ")", ")", "archive_file"...
https://github.com/dolphin-emu/dolphin/blob/b4c7f2b1e834ce5ea4b2301f9d4fb07c11afeabb/Externals/discord-rpc/build.py#L184-L197
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py3/numpy/distutils/fcompiler/__init__.py
python
FCompiler.update_executables
(self)
Called at the beginning of customisation. Subclasses should override this if they need to set up the executables dictionary. Note that self.find_executables() is run afterwards, so the self.executables dictionary values can contain <F77> or <F90> as the command, which will be replaced b...
Called at the beginning of customisation. Subclasses should override this if they need to set up the executables dictionary.
[ "Called", "at", "the", "beginning", "of", "customisation", ".", "Subclasses", "should", "override", "this", "if", "they", "need", "to", "set", "up", "the", "executables", "dictionary", "." ]
def update_executables(self): """Called at the beginning of customisation. Subclasses should override this if they need to set up the executables dictionary. Note that self.find_executables() is run afterwards, so the self.executables dictionary values can contain <F77> or <F90> as ...
[ "def", "update_executables", "(", "self", ")", ":", "pass" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py3/numpy/distutils/fcompiler/__init__.py#L359-L368
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/Blast/Editor/Scripts/external/scripts/transformations.py
python
concatenate_matrices
(*matrices)
return M
Return concatenation of series of transformation matrices. >>> M = numpy.random.rand(16).reshape((4, 4)) - 0.5 >>> numpy.allclose(M, concatenate_matrices(M)) True >>> numpy.allclose(numpy.dot(M, M.T), concatenate_matrices(M, M.T)) True
Return concatenation of series of transformation matrices.
[ "Return", "concatenation", "of", "series", "of", "transformation", "matrices", "." ]
def concatenate_matrices(*matrices): """Return concatenation of series of transformation matrices. >>> M = numpy.random.rand(16).reshape((4, 4)) - 0.5 >>> numpy.allclose(M, concatenate_matrices(M)) True >>> numpy.allclose(numpy.dot(M, M.T), concatenate_matrices(M, M.T)) True """ M = nu...
[ "def", "concatenate_matrices", "(", "*", "matrices", ")", ":", "M", "=", "numpy", ".", "identity", "(", "4", ")", "for", "i", "in", "matrices", ":", "M", "=", "numpy", ".", "dot", "(", "M", ",", "i", ")", "return", "M" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/Blast/Editor/Scripts/external/scripts/transformations.py#L1649-L1662
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/keras/backend.py
python
batch_normalization
(x, mean, var, beta, gamma, axis=-1, epsilon=1e-3)
return nn.batch_normalization(x, mean, var, beta, gamma, epsilon)
Applies batch normalization on x given mean, var, beta and gamma. I.e. returns: `output = (x - mean) / (sqrt(var) + epsilon) * gamma + beta` Args: x: Input tensor or variable. mean: Mean of batch. var: Variance of batch. beta: Tensor with which to center the input. gamma: Tensor by...
Applies batch normalization on x given mean, var, beta and gamma.
[ "Applies", "batch", "normalization", "on", "x", "given", "mean", "var", "beta", "and", "gamma", "." ]
def batch_normalization(x, mean, var, beta, gamma, axis=-1, epsilon=1e-3): """Applies batch normalization on x given mean, var, beta and gamma. I.e. returns: `output = (x - mean) / (sqrt(var) + epsilon) * gamma + beta` Args: x: Input tensor or variable. mean: Mean of batch. var: Variance of ...
[ "def", "batch_normalization", "(", "x", ",", "mean", ",", "var", ",", "beta", ",", "gamma", ",", "axis", "=", "-", "1", ",", "epsilon", "=", "1e-3", ")", ":", "if", "ndim", "(", "x", ")", "==", "4", ":", "# The CPU implementation of `fused_batch_norm` on...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/keras/backend.py#L3008-L3063
Xilinx/Vitis-AI
fc74d404563d9951b57245443c73bef389f3657f
tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/keras/layers/merge.py
python
maximum
(inputs, **kwargs)
return Maximum(**kwargs)(inputs)
Functional interface to the `Maximum` layer that computes the maximum (element-wise) list of `inputs`. For example: ```python input1 = tf.keras.layers.Input(shape=(16,)) x1 = tf.keras.layers.Dense(8, activation='relu')(input1) #shape=(None, 8) input2 = tf.keras.layers.Input(shape=(32,)) x2 = tf.kera...
Functional interface to the `Maximum` layer that computes
[ "Functional", "interface", "to", "the", "Maximum", "layer", "that", "computes" ]
def maximum(inputs, **kwargs): """Functional interface to the `Maximum` layer that computes the maximum (element-wise) list of `inputs`. For example: ```python input1 = tf.keras.layers.Input(shape=(16,)) x1 = tf.keras.layers.Dense(8, activation='relu')(input1) #shape=(None, 8) input2 = tf.keras.laye...
[ "def", "maximum", "(", "inputs", ",", "*", "*", "kwargs", ")", ":", "return", "Maximum", "(", "*", "*", "kwargs", ")", "(", "inputs", ")" ]
https://github.com/Xilinx/Vitis-AI/blob/fc74d404563d9951b57245443c73bef389f3657f/tools/Vitis-AI-Quantizer/vai_q_tensorflow1.x/tensorflow/python/keras/layers/merge.py#L648-L676
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_vendor/requests/utils.py
python
parse_list_header
(value)
return result
Parse lists as described by RFC 2068 Section 2. In particular, parse comma-separated lists where the elements of the list may include quoted-strings. A quoted-string could contain a comma. A non-quoted string could have quotes in the middle. Quotes are removed automatically after parsing. It ba...
Parse lists as described by RFC 2068 Section 2.
[ "Parse", "lists", "as", "described", "by", "RFC", "2068", "Section", "2", "." ]
def parse_list_header(value): """Parse lists as described by RFC 2068 Section 2. In particular, parse comma-separated lists where the elements of the list may include quoted-strings. A quoted-string could contain a comma. A non-quoted string could have quotes in the middle. Quotes are removed au...
[ "def", "parse_list_header", "(", "value", ")", ":", "result", "=", "[", "]", "for", "item", "in", "_parse_list_header", "(", "value", ")", ":", "if", "item", "[", ":", "1", "]", "==", "item", "[", "-", "1", ":", "]", "==", "'\"'", ":", "item", "=...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/pip/_vendor/requests/utils.py#L323-L351
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/nn/transformer/layers.py
python
FixedSparseAttention._generate_attention_mask
(self, attention_mask)
return local_mask, global_mask
generate global attention mask and local attention mask from origin attention mask
generate global attention mask and local attention mask from origin attention mask
[ "generate", "global", "attention", "mask", "and", "local", "attention", "mask", "from", "origin", "attention", "mask" ]
def _generate_attention_mask(self, attention_mask): """ generate global attention mask and local attention mask from origin attention mask """ attention_mask = self.reshape(attention_mask, (-1, self.seq_length, self.seq_length)) input_mask = self.slice1(attention_mask, (0, self.s...
[ "def", "_generate_attention_mask", "(", "self", ",", "attention_mask", ")", ":", "attention_mask", "=", "self", ".", "reshape", "(", "attention_mask", ",", "(", "-", "1", ",", "self", ".", "seq_length", ",", "self", ".", "seq_length", ")", ")", "input_mask",...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/nn/transformer/layers.py#L647-L680
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/contrib/lookup/lookup_ops.py
python
InitializableLookupTableBase.table_ref
(self)
return self._table_ref
Get the underlying table reference.
Get the underlying table reference.
[ "Get", "the", "underlying", "table", "reference", "." ]
def table_ref(self): """Get the underlying table reference.""" return self._table_ref
[ "def", "table_ref", "(", "self", ")", ":", "return", "self", ".", "_table_ref" ]
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/contrib/lookup/lookup_ops.py#L119-L121
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/AWSPythonSDK/1.5.8/botocore/vendored/requests/packages/urllib3/poolmanager.py
python
PoolManager.connection_from_host
(self, host, port=None, scheme='http')
return pool
Get a :class:`ConnectionPool` based on the host, port, and scheme. If ``port`` isn't given, it will be derived from the ``scheme`` using ``urllib3.connectionpool.port_by_scheme``.
Get a :class:`ConnectionPool` based on the host, port, and scheme.
[ "Get", "a", ":", "class", ":", "ConnectionPool", "based", "on", "the", "host", "port", "and", "scheme", "." ]
def connection_from_host(self, host, port=None, scheme='http'): """ Get a :class:`ConnectionPool` based on the host, port, and scheme. If ``port`` isn't given, it will be derived from the ``scheme`` using ``urllib3.connectionpool.port_by_scheme``. """ if not host: ...
[ "def", "connection_from_host", "(", "self", ",", "host", ",", "port", "=", "None", ",", "scheme", "=", "'http'", ")", ":", "if", "not", "host", ":", "raise", "LocationValueError", "(", "\"No host specified.\"", ")", "scheme", "=", "scheme", "or", "'http'", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/AWSPythonSDK/1.5.8/botocore/vendored/requests/packages/urllib3/poolmanager.py#L101-L127
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Path/PathScripts/PathUtils.py
python
addToJob
(obj, jobname=None)
return job
adds a path object to a job obj = obj jobname = None
adds a path object to a job obj = obj jobname = None
[ "adds", "a", "path", "object", "to", "a", "job", "obj", "=", "obj", "jobname", "=", "None" ]
def addToJob(obj, jobname=None): """adds a path object to a job obj = obj jobname = None""" PathLog.track(jobname) job = None if jobname is not None: jobs = GetJobs(jobname) if len(jobs) == 1: job = jobs[0] else: PathLog.error(translate("Path", "D...
[ "def", "addToJob", "(", "obj", ",", "jobname", "=", "None", ")", ":", "PathLog", ".", "track", "(", "jobname", ")", "job", "=", "None", "if", "jobname", "is", "not", "None", ":", "jobs", "=", "GetJobs", "(", "jobname", ")", "if", "len", "(", "jobs"...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Path/PathScripts/PathUtils.py#L417-L442
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py2/pandas/tseries/holiday.py
python
next_monday
(dt)
return dt
If holiday falls on Saturday, use following Monday instead; if holiday falls on Sunday, use Monday instead
If holiday falls on Saturday, use following Monday instead; if holiday falls on Sunday, use Monday instead
[ "If", "holiday", "falls", "on", "Saturday", "use", "following", "Monday", "instead", ";", "if", "holiday", "falls", "on", "Sunday", "use", "Monday", "instead" ]
def next_monday(dt): """ If holiday falls on Saturday, use following Monday instead; if holiday falls on Sunday, use Monday instead """ if dt.weekday() == 5: return dt + timedelta(2) elif dt.weekday() == 6: return dt + timedelta(1) return dt
[ "def", "next_monday", "(", "dt", ")", ":", "if", "dt", ".", "weekday", "(", ")", "==", "5", ":", "return", "dt", "+", "timedelta", "(", "2", ")", "elif", "dt", ".", "weekday", "(", ")", "==", "6", ":", "return", "dt", "+", "timedelta", "(", "1"...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py2/pandas/tseries/holiday.py#L15-L24
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/ops/ragged/row_partition.py
python
RowPartition.with_precomputed_nrows
(self)
return RowPartition( row_splits=self._row_splits, row_lengths=self._row_lengths, value_rowids=self._value_rowids, nrows=self.nrows(), nvals=self._nvals, uniform_row_length=self._uniform_row_length, internal=_row_partition_factory_key)
Returns a copy of `self` with `nrows` precomputed.
Returns a copy of `self` with `nrows` precomputed.
[ "Returns", "a", "copy", "of", "self", "with", "nrows", "precomputed", "." ]
def with_precomputed_nrows(self): """Returns a copy of `self` with `nrows` precomputed.""" return RowPartition( row_splits=self._row_splits, row_lengths=self._row_lengths, value_rowids=self._value_rowids, nrows=self.nrows(), nvals=self._nvals, uniform_row_length=s...
[ "def", "with_precomputed_nrows", "(", "self", ")", ":", "return", "RowPartition", "(", "row_splits", "=", "self", ".", "_row_splits", ",", "row_lengths", "=", "self", ".", "_row_lengths", ",", "value_rowids", "=", "self", ".", "_value_rowids", ",", "nrows", "=...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/ops/ragged/row_partition.py#L1103-L1112
Kitware/ParaView
f760af9124ff4634b23ebbeab95a4f56e0261955
Plugins/pvblot/blotish.py
python
xlabel
(*args)
Set the X axis label
Set the X axis label
[ "Set", "the", "X", "axis", "label" ]
def xlabel(*args): """Set the X axis label""" label = " ".join(args) state.tplot.set_xlabel(label)
[ "def", "xlabel", "(", "*", "args", ")", ":", "label", "=", "\" \"", ".", "join", "(", "args", ")", "state", ".", "tplot", ".", "set_xlabel", "(", "label", ")" ]
https://github.com/Kitware/ParaView/blob/f760af9124ff4634b23ebbeab95a4f56e0261955/Plugins/pvblot/blotish.py#L875-L878
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/pdb.py
python
Pdb.onecmd
(self, line)
Interpret the argument as though it had been typed in response to the prompt. Checks whether this line is typed at the normal prompt or in a breakpoint command list definition.
Interpret the argument as though it had been typed in response to the prompt.
[ "Interpret", "the", "argument", "as", "though", "it", "had", "been", "typed", "in", "response", "to", "the", "prompt", "." ]
def onecmd(self, line): """Interpret the argument as though it had been typed in response to the prompt. Checks whether this line is typed at the normal prompt or in a breakpoint command list definition. """ if not self.commands_defining: return cmd.Cmd.onecm...
[ "def", "onecmd", "(", "self", ",", "line", ")", ":", "if", "not", "self", ".", "commands_defining", ":", "return", "cmd", ".", "Cmd", ".", "onecmd", "(", "self", ",", "line", ")", "else", ":", "return", "self", ".", "handle_command_def", "(", "line", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/pdb.py#L271-L281
msitt/blpapi-python
bebcf43668c9e5f5467b1f685f9baebbfc45bc87
src/blpapi/auth.py
python
AuthOptions._create_app_handle
(appName)
return app_handle
For internal use only.
For internal use only.
[ "For", "internal", "use", "only", "." ]
def _create_app_handle(appName): """For internal use only.""" retcode, app_handle = internals \ .blpapi_AuthApplication_create(appName) _ExceptionUtil.raiseOnError(retcode) return app_handle
[ "def", "_create_app_handle", "(", "appName", ")", ":", "retcode", ",", "app_handle", "=", "internals", ".", "blpapi_AuthApplication_create", "(", "appName", ")", "_ExceptionUtil", ".", "raiseOnError", "(", "retcode", ")", "return", "app_handle" ]
https://github.com/msitt/blpapi-python/blob/bebcf43668c9e5f5467b1f685f9baebbfc45bc87/src/blpapi/auth.py#L117-L122
mongodb/mongo
d8ff665343ad29cf286ee2cf4a1960d29371937b
buildscripts/idl/idl/generator.py
python
_CppSourceFileWriter._gen_server_parameter_class_definitions
(self, param)
Generate storage for default and/or append method for a specialized ServerParameter.
Generate storage for default and/or append method for a specialized ServerParameter.
[ "Generate", "storage", "for", "default", "and", "/", "or", "append", "method", "for", "a", "specialized", "ServerParameter", "." ]
def _gen_server_parameter_class_definitions(self, param): # type: (ast.ServerParameter) -> None """Generate storage for default and/or append method for a specialized ServerParameter.""" cls = param.cpp_class if param.default or param.redact or not cls.override_set: self.gen...
[ "def", "_gen_server_parameter_class_definitions", "(", "self", ",", "param", ")", ":", "# type: (ast.ServerParameter) -> None", "cls", "=", "param", ".", "cpp_class", "if", "param", ".", "default", "or", "param", ".", "redact", "or", "not", "cls", ".", "override_s...
https://github.com/mongodb/mongo/blob/d8ff665343ad29cf286ee2cf4a1960d29371937b/buildscripts/idl/idl/generator.py#L2287-L2315
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/tools/gyp/pylib/gyp/xcodeproj_file.py
python
PBXGroup.TakeOverOnlyChild
(self, recurse=False)
If this PBXGroup has only one child and it's also a PBXGroup, take it over by making all of its children this object's children. This function will continue to take over only children when those children are groups. If there are three PBXGroups representing a, b, and c, with c inside b and b inside a,...
If this PBXGroup has only one child and it's also a PBXGroup, take it over by making all of its children this object's children.
[ "If", "this", "PBXGroup", "has", "only", "one", "child", "and", "it", "s", "also", "a", "PBXGroup", "take", "it", "over", "by", "making", "all", "of", "its", "children", "this", "object", "s", "children", "." ]
def TakeOverOnlyChild(self, recurse=False): """If this PBXGroup has only one child and it's also a PBXGroup, take it over by making all of its children this object's children. This function will continue to take over only children when those children are groups. If there are three PBXGroups representi...
[ "def", "TakeOverOnlyChild", "(", "self", ",", "recurse", "=", "False", ")", ":", "# At this stage, check that child class types are PBXGroup exactly,", "# instead of using isinstance. The only subclass of PBXGroup,", "# PBXVariantGroup, should not participate in reparenting in the same way:...
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/tools/gyp/pylib/gyp/xcodeproj_file.py#L1333-L1401
google/fhir
d77f57706c1a168529b0b87ca7ccb1c0113e83c2
py/google/fhir/primitive_handler.py
python
PrimitiveHandler.date_time_cls
(self)
A date, date-time, or partial date. See more at: https://www.hl7.org/fhir/datatypes.html#datetime.
A date, date-time, or partial date.
[ "A", "date", "date", "-", "time", "or", "partial", "date", "." ]
def date_time_cls(self) -> Type[message.Message]: """A date, date-time, or partial date. See more at: https://www.hl7.org/fhir/datatypes.html#datetime. """ raise NotImplementedError('Subclasses *must* implement date_time_cls.')
[ "def", "date_time_cls", "(", "self", ")", "->", "Type", "[", "message", ".", "Message", "]", ":", "raise", "NotImplementedError", "(", "'Subclasses *must* implement date_time_cls.'", ")" ]
https://github.com/google/fhir/blob/d77f57706c1a168529b0b87ca7ccb1c0113e83c2/py/google/fhir/primitive_handler.py#L93-L98
zhaoweicai/cascade-rcnn
2252f46158ea6555868ca6fa5c221ea71d9b5e6c
python/caffe/io.py
python
Transformer.set_raw_scale
(self, in_, scale)
Set the scale of raw features s.t. the input blob = input * scale. While Python represents images in [0, 1], certain Caffe models like CaffeNet and AlexNet represent images in [0, 255] so the raw_scale of these models must be 255. Parameters ---------- in_ : which input ...
Set the scale of raw features s.t. the input blob = input * scale. While Python represents images in [0, 1], certain Caffe models like CaffeNet and AlexNet represent images in [0, 255] so the raw_scale of these models must be 255.
[ "Set", "the", "scale", "of", "raw", "features", "s", ".", "t", ".", "the", "input", "blob", "=", "input", "*", "scale", ".", "While", "Python", "represents", "images", "in", "[", "0", "1", "]", "certain", "Caffe", "models", "like", "CaffeNet", "and", ...
def set_raw_scale(self, in_, scale): """ Set the scale of raw features s.t. the input blob = input * scale. While Python represents images in [0, 1], certain Caffe models like CaffeNet and AlexNet represent images in [0, 255] so the raw_scale of these models must be 255. ...
[ "def", "set_raw_scale", "(", "self", ",", "in_", ",", "scale", ")", ":", "self", ".", "__check_input", "(", "in_", ")", "self", ".", "raw_scale", "[", "in_", "]", "=", "scale" ]
https://github.com/zhaoweicai/cascade-rcnn/blob/2252f46158ea6555868ca6fa5c221ea71d9b5e6c/python/caffe/io.py#L221-L234