nwo
stringlengths
5
86
sha
stringlengths
40
40
path
stringlengths
4
189
language
stringclasses
1 value
identifier
stringlengths
1
94
parameters
stringlengths
2
4.03k
argument_list
stringclasses
1 value
return_statement
stringlengths
0
11.5k
docstring
stringlengths
1
33.2k
docstring_summary
stringlengths
0
5.15k
docstring_tokens
list
function
stringlengths
34
151k
function_tokens
list
url
stringlengths
90
278
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/idlelib/parenmatch.py
python
ParenMatch.set_timeout_none
(self)
Highlight will remain until user input turns it off or the insert has moved
Highlight will remain until user input turns it off or the insert has moved
[ "Highlight", "will", "remain", "until", "user", "input", "turns", "it", "off", "or", "the", "insert", "has", "moved" ]
def set_timeout_none(self): """Highlight will remain until user input turns it off or the insert has moved""" # After CHECK_DELAY, call a function which disables the "paren" tag # if the event is for the most recent timer and the insert has changed, # or schedules another call fo...
[ "def", "set_timeout_none", "(", "self", ")", ":", "# After CHECK_DELAY, call a function which disables the \"paren\" tag", "# if the event is for the most recent timer and the insert has changed,", "# or schedules another call for itself.", "self", ".", "counter", "+=", "1", "def", "ca...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/idlelib/parenmatch.py#L153-L166
KratosMultiphysics/Kratos
0000833054ed0503424eb28205d6508d9ca6cbbc
applications/MeshingApplication/python_scripts/mmg_process.py
python
MmgProcess._debug_output_gid
(self, label, name, prefix)
Debug postprocess with GiD.
Debug postprocess with GiD.
[ "Debug", "postprocess", "with", "GiD", "." ]
def _debug_output_gid(self, label, name, prefix): '''Debug postprocess with GiD.''' gid_mode = KratosMultiphysics.GiDPostMode.GiD_PostBinary singlefile = KratosMultiphysics.MultiFileFlag.SingleFile deformed_mesh_flag = KratosMultiphysics.WriteDeformedMeshFlag.WriteUndeformed writ...
[ "def", "_debug_output_gid", "(", "self", ",", "label", ",", "name", ",", "prefix", ")", ":", "gid_mode", "=", "KratosMultiphysics", ".", "GiDPostMode", ".", "GiD_PostBinary", "singlefile", "=", "KratosMultiphysics", ".", "MultiFileFlag", ".", "SingleFile", "deform...
https://github.com/KratosMultiphysics/Kratos/blob/0000833054ed0503424eb28205d6508d9ca6cbbc/applications/MeshingApplication/python_scripts/mmg_process.py#L815-L846
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py2/numpy/lib/financial.py
python
pmt
(rate, nper, pv, fv=0, when='end')
return -(fv + pv*temp) / fact
Compute the payment against loan principal plus interest. Given: * a present value, `pv` (e.g., an amount borrowed) * a future value, `fv` (e.g., 0) * an interest `rate` compounded once per period, of which there are * `nper` total * and (optional) specification of whether payment i...
Compute the payment against loan principal plus interest.
[ "Compute", "the", "payment", "against", "loan", "principal", "plus", "interest", "." ]
def pmt(rate, nper, pv, fv=0, when='end'): """ Compute the payment against loan principal plus interest. Given: * a present value, `pv` (e.g., an amount borrowed) * a future value, `fv` (e.g., 0) * an interest `rate` compounded once per period, of which there are * `nper` total ...
[ "def", "pmt", "(", "rate", ",", "nper", ",", "pv", ",", "fv", "=", "0", ",", "when", "=", "'end'", ")", ":", "when", "=", "_convert_when", "(", "when", ")", "(", "rate", ",", "nper", ",", "pv", ",", "fv", ",", "when", ")", "=", "map", "(", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py2/numpy/lib/financial.py#L146-L236
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py2/scipy/integrate/quadrature.py
python
_romberg_diff
(b, c, k)
return (tmp * c - b)/(tmp - 1.0)
Compute the differences for the Romberg quadrature corrections. See Forman Acton's "Real Computing Made Real," p 143.
Compute the differences for the Romberg quadrature corrections. See Forman Acton's "Real Computing Made Real," p 143.
[ "Compute", "the", "differences", "for", "the", "Romberg", "quadrature", "corrections", ".", "See", "Forman", "Acton", "s", "Real", "Computing", "Made", "Real", "p", "143", "." ]
def _romberg_diff(b, c, k): """ Compute the differences for the Romberg quadrature corrections. See Forman Acton's "Real Computing Made Real," p 143. """ tmp = 4.0**k return (tmp * c - b)/(tmp - 1.0)
[ "def", "_romberg_diff", "(", "b", ",", "c", ",", "k", ")", ":", "tmp", "=", "4.0", "**", "k", "return", "(", "tmp", "*", "c", "-", "b", ")", "/", "(", "tmp", "-", "1.0", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py2/scipy/integrate/quadrature.py#L645-L651
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/dtypes/cast.py
python
infer_dtype_from
(val, pandas_dtype: bool = False)
return infer_dtype_from_array(val, pandas_dtype=pandas_dtype)
Interpret the dtype from a scalar or array. Parameters ---------- val : object pandas_dtype : bool, default False whether to infer dtype including pandas extension types. If False, scalar/array belongs to pandas extension types is inferred as object
Interpret the dtype from a scalar or array.
[ "Interpret", "the", "dtype", "from", "a", "scalar", "or", "array", "." ]
def infer_dtype_from(val, pandas_dtype: bool = False): """ Interpret the dtype from a scalar or array. Parameters ---------- val : object pandas_dtype : bool, default False whether to infer dtype including pandas extension types. If False, scalar/array belongs to pandas extensio...
[ "def", "infer_dtype_from", "(", "val", ",", "pandas_dtype", ":", "bool", "=", "False", ")", ":", "if", "is_scalar", "(", "val", ")", ":", "return", "infer_dtype_from_scalar", "(", "val", ",", "pandas_dtype", "=", "pandas_dtype", ")", "return", "infer_dtype_fro...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/dtypes/cast.py#L532-L546
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_controls.py
python
TextAttr.HasFontFamily
(*args, **kwargs)
return _controls_.TextAttr_HasFontFamily(*args, **kwargs)
HasFontFamily(self) -> bool
HasFontFamily(self) -> bool
[ "HasFontFamily", "(", "self", ")", "-", ">", "bool" ]
def HasFontFamily(*args, **kwargs): """HasFontFamily(self) -> bool""" return _controls_.TextAttr_HasFontFamily(*args, **kwargs)
[ "def", "HasFontFamily", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "TextAttr_HasFontFamily", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_controls.py#L1820-L1822
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/Pygments/py3/pygments/lexers/scripting.py
python
HybrisLexer.analyse_text
(text)
return result
public method and private method don't seem to be quite common elsewhere.
public method and private method don't seem to be quite common elsewhere.
[ "public", "method", "and", "private", "method", "don", "t", "seem", "to", "be", "quite", "common", "elsewhere", "." ]
def analyse_text(text): """public method and private method don't seem to be quite common elsewhere.""" result = 0 if re.search(r'\b(?:public|private)\s+method\b', text): result += 0.01 return result
[ "def", "analyse_text", "(", "text", ")", ":", "result", "=", "0", "if", "re", ".", "search", "(", "r'\\b(?:public|private)\\s+method\\b'", ",", "text", ")", ":", "result", "+=", "0.01", "return", "result" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/Pygments/py3/pygments/lexers/scripting.py#L946-L952
PixarAnimationStudios/OpenSubdiv
ff76e0f2dc9c9202b7d2f965f264bfd6f41866d5
build_scripts/build_osd.py
python
CopyDirectory
(context, srcDir, destDir)
Copy directory like shutil.copytree.
Copy directory like shutil.copytree.
[ "Copy", "directory", "like", "shutil", ".", "copytree", "." ]
def CopyDirectory(context, srcDir, destDir): """Copy directory like shutil.copytree.""" instDestDir = os.path.join(context.instDir, destDir) if os.path.isdir(instDestDir): shutil.rmtree(instDestDir) PrintCommandOutput("Copying {srcDir} to {destDir}\n" .format(srcDir=srcDi...
[ "def", "CopyDirectory", "(", "context", ",", "srcDir", ",", "destDir", ")", ":", "instDestDir", "=", "os", ".", "path", ".", "join", "(", "context", ".", "instDir", ",", "destDir", ")", "if", "os", ".", "path", ".", "isdir", "(", "instDestDir", ")", ...
https://github.com/PixarAnimationStudios/OpenSubdiv/blob/ff76e0f2dc9c9202b7d2f965f264bfd6f41866d5/build_scripts/build_osd.py#L208-L216
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/scipy/spatial/distance.py
python
matching
(u, v)
return hamming(u, v)
Computes the Hamming distance between two boolean 1-D arrays. This is a deprecated synonym for :func:`hamming`.
Computes the Hamming distance between two boolean 1-D arrays.
[ "Computes", "the", "Hamming", "distance", "between", "two", "boolean", "1", "-", "D", "arrays", "." ]
def matching(u, v): """ Computes the Hamming distance between two boolean 1-D arrays. This is a deprecated synonym for :func:`hamming`. """ return hamming(u, v)
[ "def", "matching", "(", "u", ",", "v", ")", ":", "return", "hamming", "(", "u", ",", "v", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/scipy/spatial/distance.py#L733-L739
GJDuck/LowFat
ecf6a0f0fa1b73a27a626cf493cc39e477b6faea
llvm-4.0.0.src/tools/clang/bindings/python/clang/cindex.py
python
Cursor.canonical
(self)
return self._canonical
Return the canonical Cursor corresponding to this Cursor. The canonical cursor is the cursor which is representative for the underlying entity. For example, if you have multiple forward declarations for the same class, the canonical cursor for the forward declarations will be identical.
Return the canonical Cursor corresponding to this Cursor.
[ "Return", "the", "canonical", "Cursor", "corresponding", "to", "this", "Cursor", "." ]
def canonical(self): """Return the canonical Cursor corresponding to this Cursor. The canonical cursor is the cursor which is representative for the underlying entity. For example, if you have multiple forward declarations for the same class, the canonical cursor for the forward ...
[ "def", "canonical", "(", "self", ")", ":", "if", "not", "hasattr", "(", "self", ",", "'_canonical'", ")", ":", "self", ".", "_canonical", "=", "conf", ".", "lib", ".", "clang_getCanonicalCursor", "(", "self", ")", "return", "self", ".", "_canonical" ]
https://github.com/GJDuck/LowFat/blob/ecf6a0f0fa1b73a27a626cf493cc39e477b6faea/llvm-4.0.0.src/tools/clang/bindings/python/clang/cindex.py#L1513-L1524
tangzhenyu/Scene-Text-Understanding
0f7ffc7aea5971a50cdc03d33d0a41075285948b
ctpn_crnn_ocr/CTPN/caffe/scripts/cpp_lint.py
python
_CppLintState.SetVerboseLevel
(self, level)
return last_verbose_level
Sets the module's verbosity, and returns the previous setting.
Sets the module's verbosity, and returns the previous setting.
[ "Sets", "the", "module", "s", "verbosity", "and", "returns", "the", "previous", "setting", "." ]
def SetVerboseLevel(self, level): """Sets the module's verbosity, and returns the previous setting.""" last_verbose_level = self.verbose_level self.verbose_level = level return last_verbose_level
[ "def", "SetVerboseLevel", "(", "self", ",", "level", ")", ":", "last_verbose_level", "=", "self", ".", "verbose_level", "self", ".", "verbose_level", "=", "level", "return", "last_verbose_level" ]
https://github.com/tangzhenyu/Scene-Text-Understanding/blob/0f7ffc7aea5971a50cdc03d33d0a41075285948b/ctpn_crnn_ocr/CTPN/caffe/scripts/cpp_lint.py#L707-L711
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/xrc.py
python
XmlResource.AddHandler
(*args, **kwargs)
return _xrc.XmlResource_AddHandler(*args, **kwargs)
AddHandler(self, XmlResourceHandler handler)
AddHandler(self, XmlResourceHandler handler)
[ "AddHandler", "(", "self", "XmlResourceHandler", "handler", ")" ]
def AddHandler(*args, **kwargs): """AddHandler(self, XmlResourceHandler handler)""" return _xrc.XmlResource_AddHandler(*args, **kwargs)
[ "def", "AddHandler", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_xrc", ".", "XmlResource_AddHandler", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/xrc.py#L102-L104
intel/caffe
3f494b442ee3f9d17a07b09ecbd5fa2bbda00836
examples/rfcn/lib/nms/py_cpu_nms.py
python
py_cpu_nms
(dets, thresh)
return keep
Pure Python NMS baseline.
Pure Python NMS baseline.
[ "Pure", "Python", "NMS", "baseline", "." ]
def py_cpu_nms(dets, thresh): """Pure Python NMS baseline.""" x1 = dets[:, 0] y1 = dets[:, 1] x2 = dets[:, 2] y2 = dets[:, 3] scores = dets[:, 4] areas = (x2 - x1 + 1) * (y2 - y1 + 1) order = scores.argsort()[::-1] keep = [] while order.size > 0: i = order[0] ke...
[ "def", "py_cpu_nms", "(", "dets", ",", "thresh", ")", ":", "x1", "=", "dets", "[", ":", ",", "0", "]", "y1", "=", "dets", "[", ":", ",", "1", "]", "x2", "=", "dets", "[", ":", ",", "2", "]", "y2", "=", "dets", "[", ":", ",", "3", "]", "...
https://github.com/intel/caffe/blob/3f494b442ee3f9d17a07b09ecbd5fa2bbda00836/examples/rfcn/lib/nms/py_cpu_nms.py#L10-L38
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/webapp2/webapp2_extras/sessions.py
python
SessionStore.get_secure_cookie
(self, name, max_age=_default_value)
Returns a deserialized secure cookie value. :param name: Cookie name. :param max_age: Maximum age in seconds for a valid cookie. If the cookie is older than this, returns None. :returns: A secure cookie value or None if it is not set.
Returns a deserialized secure cookie value.
[ "Returns", "a", "deserialized", "secure", "cookie", "value", "." ]
def get_secure_cookie(self, name, max_age=_default_value): """Returns a deserialized secure cookie value. :param name: Cookie name. :param max_age: Maximum age in seconds for a valid cookie. If the cookie is older than this, returns None. :returns: ...
[ "def", "get_secure_cookie", "(", "self", ",", "name", ",", "max_age", "=", "_default_value", ")", ":", "if", "max_age", "is", "_default_value", ":", "max_age", "=", "self", ".", "config", "[", "'session_max_age'", "]", "value", "=", "self", ".", "request", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/webapp2/webapp2_extras/sessions.py#L377-L393
Kitware/ParaView
f760af9124ff4634b23ebbeab95a4f56e0261955
Adaptors/Cam/Python/fv_coprocess.py
python
DoCoProcessing
(datadescription)
Callback to do co-processing for current timestep
Callback to do co-processing for current timestep
[ "Callback", "to", "do", "co", "-", "processing", "for", "current", "timestep" ]
def DoCoProcessing(datadescription): "Callback to do co-processing for current timestep" global coprocessor # Update the coprocessor by providing it the newly generated simulation data. # If the pipeline hasn't been setup yet, this will setup the pipeline. coprocessor.UpdateProducers(datadescriptio...
[ "def", "DoCoProcessing", "(", "datadescription", ")", ":", "global", "coprocessor", "# Update the coprocessor by providing it the newly generated simulation data.", "# If the pipeline hasn't been setup yet, this will setup the pipeline.", "coprocessor", ".", "UpdateProducers", "(", "data...
https://github.com/Kitware/ParaView/blob/f760af9124ff4634b23ebbeab95a4f56e0261955/Adaptors/Cam/Python/fv_coprocess.py#L97-L112
zy445566/llvm-guide-zh
edaf7d5b6c29812f90ba0e1929a70c24f5005d6a
MCJIT/cached/genk-timing.py
python
KScriptGenerator.setCallWeighting
(self, weight)
Sets the probably of generating a function call
Sets the probably of generating a function call
[ "Sets", "the", "probably", "of", "generating", "a", "function", "call" ]
def setCallWeighting(self, weight): """ Sets the probably of generating a function call""" self.callWeighting = weight
[ "def", "setCallWeighting", "(", "self", ",", "weight", ")", ":", "self", ".", "callWeighting", "=", "weight" ]
https://github.com/zy445566/llvm-guide-zh/blob/edaf7d5b6c29812f90ba0e1929a70c24f5005d6a/MCJIT/cached/genk-timing.py#L80-L82
intel-iot-devkit/how-to-code-samples
b4ea616f36bbfa2e042beb1698f968cfd651d79f
fire-alarm/python/iot_fire_alarm/log.py
python
send
(payload)
Publish payload to MQTT server, data store and SMS.
Publish payload to MQTT server, data store and SMS.
[ "Publish", "payload", "to", "MQTT", "server", "data", "store", "and", "SMS", "." ]
def send(payload): """ Publish payload to MQTT server, data store and SMS. """ service_message(payload) store_message(payload, method="GET") send_sms(payload)
[ "def", "send", "(", "payload", ")", ":", "service_message", "(", "payload", ")", "store_message", "(", "payload", ",", "method", "=", "\"GET\"", ")", "send_sms", "(", "payload", ")" ]
https://github.com/intel-iot-devkit/how-to-code-samples/blob/b4ea616f36bbfa2e042beb1698f968cfd651d79f/fire-alarm/python/iot_fire_alarm/log.py#L28-L36
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/python/framework/ops.py
python
add_to_collection
(name, value)
Wrapper for `Graph.add_to_collection()` using the default graph. See @{tf.Graph.add_to_collection} for more details. Args: name: The key for the collection. For example, the `GraphKeys` class contains many standard names for collections. value: The value to add to the collection.
Wrapper for `Graph.add_to_collection()` using the default graph.
[ "Wrapper", "for", "Graph", ".", "add_to_collection", "()", "using", "the", "default", "graph", "." ]
def add_to_collection(name, value): """Wrapper for `Graph.add_to_collection()` using the default graph. See @{tf.Graph.add_to_collection} for more details. Args: name: The key for the collection. For example, the `GraphKeys` class contains many standard names for collections. value: The value to...
[ "def", "add_to_collection", "(", "name", ",", "value", ")", ":", "get_default_graph", "(", ")", ".", "add_to_collection", "(", "name", ",", "value", ")" ]
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/python/framework/ops.py#L4400-L4411
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
src/external/coremltools_wrap/coremltools/coremltools/converters/onnx/_operators_nd.py
python
_convert_tanh
(builder, node, graph, err)
convert to CoreML Tanh Layer: https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L3881
convert to CoreML Tanh Layer: https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L3881
[ "convert", "to", "CoreML", "Tanh", "Layer", ":", "https", ":", "//", "github", ".", "com", "/", "apple", "/", "coremltools", "/", "blob", "/", "655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492", "/", "mlmodel", "/", "format", "/", "NeuralNetwork", ".", "proto#L3881" ]
def _convert_tanh(builder, node, graph, err): """ convert to CoreML Tanh Layer: https://github.com/apple/coremltools/blob/655b3be5cc0d42c3c4fa49f0f0e4a93a26b3e492/mlmodel/format/NeuralNetwork.proto#L3881 """ load_input_constants(builder, node, graph, err) builder.add_tanh( name=node.name...
[ "def", "_convert_tanh", "(", "builder", ",", "node", ",", "graph", ",", "err", ")", ":", "load_input_constants", "(", "builder", ",", "node", ",", "graph", ",", "err", ")", "builder", ".", "add_tanh", "(", "name", "=", "node", ".", "name", ",", "input_...
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/src/external/coremltools_wrap/coremltools/coremltools/converters/onnx/_operators_nd.py#L2523-L2531
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
native_client_sdk/src/build_tools/nacl_sdk_scons/site_tools/nacl_tools.py
python
FilterOut
(env, **kw)
Removes values from existing construction variables in an Environment. The values to remove should be a list. For example: env.FilterOut(CPPDEFINES=['REMOVE_ME', 'ME_TOO']) Args: env: Environment to alter. kw: (Any other named arguments are values to remove).
Removes values from existing construction variables in an Environment.
[ "Removes", "values", "from", "existing", "construction", "variables", "in", "an", "Environment", "." ]
def FilterOut(env, **kw): """Removes values from existing construction variables in an Environment. The values to remove should be a list. For example: env.FilterOut(CPPDEFINES=['REMOVE_ME', 'ME_TOO']) Args: env: Environment to alter. kw: (Any other named arguments are values to remove). """ kw...
[ "def", "FilterOut", "(", "env", ",", "*", "*", "kw", ")", ":", "kw", "=", "SCons", ".", "Environment", ".", "copy_non_reserved_keywords", "(", "kw", ")", "for", "key", ",", "val", "in", "kw", ".", "items", "(", ")", ":", "if", "key", "in", "env", ...
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/native_client_sdk/src/build_tools/nacl_sdk_scons/site_tools/nacl_tools.py#L15-L35
BitMEX/api-connectors
37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812
auto-generated/python/swagger_client/api/user_api.py
python
UserApi.user_communication_token_with_http_info
(self, token, platform_agent, **kwargs)
return self.api_client.call_api( '/user/communicationToken', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_type='list[CommunicationToken]', # no...
Register your communication token for mobile clients # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.user_communication_token_with_http_info(token, platform_agent, async_req=True) >>...
Register your communication token for mobile clients # noqa: E501
[ "Register", "your", "communication", "token", "for", "mobile", "clients", "#", "noqa", ":", "E501" ]
def user_communication_token_with_http_info(self, token, platform_agent, **kwargs): # noqa: E501 """Register your communication token for mobile clients # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True ...
[ "def", "user_communication_token_with_http_info", "(", "self", ",", "token", ",", "platform_agent", ",", "*", "*", "kwargs", ")", ":", "# noqa: E501", "all_params", "=", "[", "'token'", ",", "'platform_agent'", "]", "# noqa: E501", "all_params", ".", "append", "("...
https://github.com/BitMEX/api-connectors/blob/37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812/auto-generated/python/swagger_client/api/user_api.py#L250-L331
BitMEX/api-connectors
37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812
auto-generated/python/swagger_client/models/quote_fill_ratio.py
python
QuoteFillRatio.quote_fill_ratio_mavg7
(self, quote_fill_ratio_mavg7)
Sets the quote_fill_ratio_mavg7 of this QuoteFillRatio. :param quote_fill_ratio_mavg7: The quote_fill_ratio_mavg7 of this QuoteFillRatio. # noqa: E501 :type: float
Sets the quote_fill_ratio_mavg7 of this QuoteFillRatio.
[ "Sets", "the", "quote_fill_ratio_mavg7", "of", "this", "QuoteFillRatio", "." ]
def quote_fill_ratio_mavg7(self, quote_fill_ratio_mavg7): """Sets the quote_fill_ratio_mavg7 of this QuoteFillRatio. :param quote_fill_ratio_mavg7: The quote_fill_ratio_mavg7 of this QuoteFillRatio. # noqa: E501 :type: float """ self._quote_fill_ratio_mavg7 = quote_fill_ratio...
[ "def", "quote_fill_ratio_mavg7", "(", "self", ",", "quote_fill_ratio_mavg7", ")", ":", "self", ".", "_quote_fill_ratio_mavg7", "=", "quote_fill_ratio_mavg7" ]
https://github.com/BitMEX/api-connectors/blob/37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812/auto-generated/python/swagger_client/models/quote_fill_ratio.py#L218-L226
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/re.py
python
compile
(pattern, flags=0)
return _compile(pattern, flags)
Compile a regular expression pattern, returning a pattern object.
Compile a regular expression pattern, returning a pattern object.
[ "Compile", "a", "regular", "expression", "pattern", "returning", "a", "pattern", "object", "." ]
def compile(pattern, flags=0): "Compile a regular expression pattern, returning a pattern object." return _compile(pattern, flags)
[ "def", "compile", "(", "pattern", ",", "flags", "=", "0", ")", ":", "return", "_compile", "(", "pattern", ",", "flags", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/re.py#L188-L190
OSGeo/PROJ
ca1ec7b147087f18bec0b3cf0b0548f3f034c675
scripts/build_db_from_esri.py
python
get_parameter_value
(wkt_definition: List)
return ParameterValue(value=value, unit_type=unit_type, unit=get_wkt_unit(*wkt_definition[1][unit_type_str]))
Retrieves a WKT parameter value from its definition
Retrieves a WKT parameter value from its definition
[ "Retrieves", "a", "WKT", "parameter", "value", "from", "its", "definition" ]
def get_parameter_value(wkt_definition: List) -> ParameterValue: """ Retrieves a WKT parameter value from its definition """ value = wkt_definition[0] assert len(wkt_definition[1]) == 1 unit_type_str = list(wkt_definition[1].keys())[0] unit_type = STRING_TO_UNIT_TYPE[unit_type_str] retu...
[ "def", "get_parameter_value", "(", "wkt_definition", ":", "List", ")", "->", "ParameterValue", ":", "value", "=", "wkt_definition", "[", "0", "]", "assert", "len", "(", "wkt_definition", "[", "1", "]", ")", "==", "1", "unit_type_str", "=", "list", "(", "wk...
https://github.com/OSGeo/PROJ/blob/ca1ec7b147087f18bec0b3cf0b0548f3f034c675/scripts/build_db_from_esri.py#L924-L935
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py2/scipy/stats/mstats_basic.py
python
stde_median
(data, axis=None)
Returns the McKean-Schrader estimate of the standard error of the sample median along the given axis. masked values are discarded. Parameters ---------- data : ndarray Data to trim. axis : {None,int}, optional Axis along which to perform the trimming. If None, the input arra...
Returns the McKean-Schrader estimate of the standard error of the sample median along the given axis. masked values are discarded.
[ "Returns", "the", "McKean", "-", "Schrader", "estimate", "of", "the", "standard", "error", "of", "the", "sample", "median", "along", "the", "given", "axis", ".", "masked", "values", "are", "discarded", "." ]
def stde_median(data, axis=None): """Returns the McKean-Schrader estimate of the standard error of the sample median along the given axis. masked values are discarded. Parameters ---------- data : ndarray Data to trim. axis : {None,int}, optional Axis along which to perform the ...
[ "def", "stde_median", "(", "data", ",", "axis", "=", "None", ")", ":", "def", "_stdemed_1D", "(", "data", ")", ":", "data", "=", "np", ".", "sort", "(", "data", ".", "compressed", "(", ")", ")", "n", "=", "len", "(", "data", ")", "z", "=", "2.5...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py2/scipy/stats/mstats_basic.py#L2309-L2336
openweave/openweave-core
11ceb6b7efd39fe05de7f79229247a5774d56766
src/device-manager/python/weave-device-mgr.py
python
DeviceMgrCmd.do_removenetwork
(self, line)
remove-network <network-id> Remove a provisioned network.
remove-network <network-id>
[ "remove", "-", "network", "<network", "-", "id", ">" ]
def do_removenetwork(self, line): """ remove-network <network-id> Remove a provisioned network. """ args = shlex.split(line) if (len(args) == 0): print("Usage:") self.do_help('remove-network') return if (len(args) < 1): ...
[ "def", "do_removenetwork", "(", "self", ",", "line", ")", ":", "args", "=", "shlex", ".", "split", "(", "line", ")", "if", "(", "len", "(", "args", ")", "==", "0", ")", ":", "print", "(", "\"Usage:\"", ")", "self", ".", "do_help", "(", "'remove-net...
https://github.com/openweave/openweave-core/blob/11ceb6b7efd39fe05de7f79229247a5774d56766/src/device-manager/python/weave-device-mgr.py#L1459-L1493
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/joblib/joblib/_store_backends.py
python
StoreBackendBase._open_item
(self, f, mode)
Opens an item on the store and return a file-like object. This method is private and only used by the StoreBackendMixin object. Parameters ---------- f: a file-like object The file-like object where an item is stored and retrieved mode: string, optional ...
Opens an item on the store and return a file-like object.
[ "Opens", "an", "item", "on", "the", "store", "and", "return", "a", "file", "-", "like", "object", "." ]
def _open_item(self, f, mode): """Opens an item on the store and return a file-like object. This method is private and only used by the StoreBackendMixin object. Parameters ---------- f: a file-like object The file-like object where an item is stored and retrieved ...
[ "def", "_open_item", "(", "self", ",", "f", ",", "mode", ")", ":" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/joblib/joblib/_store_backends.py#L40-L56
eric612/Caffe-YOLOv3-Windows
6736ca6e16781789b828cc64218ff77cc3454e5d
python/caffe/coord_map.py
python
coord_map
(fn)
Define the coordinate mapping by its - axis - scale: output coord[i * scale] <- input_coord[i] - shift: output coord[i] <- output_coord[i + shift] s.t. the identity mapping, as for pointwise layers like ReLu, is defined by (None, 1, 0) since it is independent of axis and does not transform coords.
Define the coordinate mapping by its - axis - scale: output coord[i * scale] <- input_coord[i] - shift: output coord[i] <- output_coord[i + shift] s.t. the identity mapping, as for pointwise layers like ReLu, is defined by (None, 1, 0) since it is independent of axis and does not transform coords.
[ "Define", "the", "coordinate", "mapping", "by", "its", "-", "axis", "-", "scale", ":", "output", "coord", "[", "i", "*", "scale", "]", "<", "-", "input_coord", "[", "i", "]", "-", "shift", ":", "output", "coord", "[", "i", "]", "<", "-", "output_co...
def coord_map(fn): """ Define the coordinate mapping by its - axis - scale: output coord[i * scale] <- input_coord[i] - shift: output coord[i] <- output_coord[i + shift] s.t. the identity mapping, as for pointwise layers like ReLu, is defined by (None, 1, 0) since it is independent of axis a...
[ "def", "coord_map", "(", "fn", ")", ":", "if", "fn", ".", "type_name", "in", "[", "'Convolution'", ",", "'Pooling'", ",", "'Im2col'", "]", ":", "axis", ",", "stride", ",", "ks", ",", "pad", "=", "conv_params", "(", "fn", ")", "return", "axis", ",", ...
https://github.com/eric612/Caffe-YOLOv3-Windows/blob/6736ca6e16781789b828cc64218ff77cc3454e5d/python/caffe/coord_map.py#L57-L79
root-project/root
fcd3583bb14852bf2e8cd2415717cbaac0e75896
bindings/pyroot/cppyy/cppyy-backend/cling/python/cppyy_backend/bindings_utils.py
python
initialise
(pkg, __init__py, cmake_shared_library_prefix, cmake_shared_library_suffix)
Initialise the bindings module. :param pkg: The bindings package. :param __init__py: Base __init__.py file of the bindings. :param cmake_shared_library_prefix: ${cmake_shared_library_prefix} :param cmake_shared_library_suffix: ${c...
Initialise the bindings module.
[ "Initialise", "the", "bindings", "module", "." ]
def initialise(pkg, __init__py, cmake_shared_library_prefix, cmake_shared_library_suffix): """ Initialise the bindings module. :param pkg: The bindings package. :param __init__py: Base __init__.py file of the bindings. :param cmake_shared_library_prefix: ...
[ "def", "initialise", "(", "pkg", ",", "__init__py", ",", "cmake_shared_library_prefix", ",", "cmake_shared_library_suffix", ")", ":", "def", "add_to_pkg", "(", "file", ",", "keyword", ",", "simplenames", ",", "children", ")", ":", "def", "map_operator_name", "(", ...
https://github.com/root-project/root/blob/fcd3583bb14852bf2e8cd2415717cbaac0e75896/bindings/pyroot/cppyy/cppyy-backend/cling/python/cppyy_backend/bindings_utils.py#L49-L202
Studio3T/robomongo
2411cd032e2e69b968dadda13ac91ca4ef3483b0
src/third-party/qscintilla-2.8.4/sources/Python/configure.py
python
_run_command
(cmd, verbose)
Run a command and display the output if requested. cmd is the command to run. verbose is set if the output is to be displayed.
Run a command and display the output if requested. cmd is the command to run. verbose is set if the output is to be displayed.
[ "Run", "a", "command", "and", "display", "the", "output", "if", "requested", ".", "cmd", "is", "the", "command", "to", "run", ".", "verbose", "is", "set", "if", "the", "output", "is", "to", "be", "displayed", "." ]
def _run_command(cmd, verbose): """ Run a command and display the output if requested. cmd is the command to run. verbose is set if the output is to be displayed. """ if verbose: sys.stdout.write(cmd + "\n") fout = _get_command_output(cmd) # Read stdout and stderr until there is no ...
[ "def", "_run_command", "(", "cmd", ",", "verbose", ")", ":", "if", "verbose", ":", "sys", ".", "stdout", ".", "write", "(", "cmd", "+", "\"\\n\"", ")", "fout", "=", "_get_command_output", "(", "cmd", ")", "# Read stdout and stderr until there is no more output."...
https://github.com/Studio3T/robomongo/blob/2411cd032e2e69b968dadda13ac91ca4ef3483b0/src/third-party/qscintilla-2.8.4/sources/Python/configure.py#L1512-L1538
tfwu/FaceDetection-ConvNet-3D
f9251c48eb40c5aec8fba7455115c355466555be
python/build/lib.linux-x86_64-2.7/mxnet/executor_manager.py
python
DataParallelExecutorGroup.forward
(self, is_train=False)
Perform a forward pass on each executor
Perform a forward pass on each executor
[ "Perform", "a", "forward", "pass", "on", "each", "executor" ]
def forward(self, is_train=False): """ Perform a forward pass on each executor """ for texec in self.train_execs: texec.forward(is_train=is_train)
[ "def", "forward", "(", "self", ",", "is_train", "=", "False", ")", ":", "for", "texec", "in", "self", ".", "train_execs", ":", "texec", ".", "forward", "(", "is_train", "=", "is_train", ")" ]
https://github.com/tfwu/FaceDetection-ConvNet-3D/blob/f9251c48eb40c5aec8fba7455115c355466555be/python/build/lib.linux-x86_64-2.7/mxnet/executor_manager.py#L235-L238
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/io/pytables.py
python
HDFStore.root
(self)
return self._handle.root
return the root node
return the root node
[ "return", "the", "root", "node" ]
def root(self): """return the root node""" self._check_if_open() assert self._handle is not None # for mypy return self._handle.root
[ "def", "root", "(", "self", ")", ":", "self", ".", "_check_if_open", "(", ")", "assert", "self", ".", "_handle", "is", "not", "None", "# for mypy", "return", "self", ".", "_handle", ".", "root" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/io/pytables.py#L597-L601
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/ops/variable_scope.py
python
VariableScope.local_variables
(self)
return self.get_collection(ops.GraphKeys.LOCAL_VARIABLES)
Get this scope's local variables.
Get this scope's local variables.
[ "Get", "this", "scope", "s", "local", "variables", "." ]
def local_variables(self): """Get this scope's local variables.""" return self.get_collection(ops.GraphKeys.LOCAL_VARIABLES)
[ "def", "local_variables", "(", "self", ")", ":", "return", "self", ".", "get_collection", "(", "ops", ".", "GraphKeys", ".", "LOCAL_VARIABLES", ")" ]
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/ops/variable_scope.py#L1026-L1028
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/win32/lib/win32timezone.py
python
utcnow
()
return now
Return the UTC time now with timezone awareness as enabled by this module >>> now = utcnow()
Return the UTC time now with timezone awareness as enabled by this module >>> now = utcnow()
[ "Return", "the", "UTC", "time", "now", "with", "timezone", "awareness", "as", "enabled", "by", "this", "module", ">>>", "now", "=", "utcnow", "()" ]
def utcnow(): """ Return the UTC time now with timezone awareness as enabled by this module >>> now = utcnow() """ now = datetime.datetime.utcnow() now = now.replace(tzinfo=TimeZoneInfo.utc()) return now
[ "def", "utcnow", "(", ")", ":", "now", "=", "datetime", ".", "datetime", ".", "utcnow", "(", ")", "now", "=", "now", ".", "replace", "(", "tzinfo", "=", "TimeZoneInfo", ".", "utc", "(", ")", ")", "return", "now" ]
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/site-packages/win32/lib/win32timezone.py#L808-L816
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
Framework/PythonInterface/plugins/algorithms/EnggVanadiumCorrections.py
python
EnggVanadiumCorrections._apply_pix_by_pix_correction
(self, ws, van_curves_ws)
Applies the second step of the Vanadium correction on the given workspace: pixel by pixel divides by a curve fitted to the sum of the set of spectra of the corresponding bank. @param ws :: workspace to work on / correct @param van_curves_ws :: a workspace with the per-bank curves for Vanadium d...
Applies the second step of the Vanadium correction on the given workspace: pixel by pixel divides by a curve fitted to the sum of the set of spectra of the corresponding bank.
[ "Applies", "the", "second", "step", "of", "the", "Vanadium", "correction", "on", "the", "given", "workspace", ":", "pixel", "by", "pixel", "divides", "by", "a", "curve", "fitted", "to", "the", "sum", "of", "the", "set", "of", "spectra", "of", "the", "cor...
def _apply_pix_by_pix_correction(self, ws, van_curves_ws): """ Applies the second step of the Vanadium correction on the given workspace: pixel by pixel divides by a curve fitted to the sum of the set of spectra of the corresponding bank. @param ws :: workspace to work on / correct ...
[ "def", "_apply_pix_by_pix_correction", "(", "self", ",", "ws", ",", "van_curves_ws", ")", ":", "curves_dict", "=", "self", ".", "_fit_results_to_dict", "(", "van_curves_ws", ")", "self", ".", "_divide_by_curves", "(", "ws", ",", "curves_dict", ")" ]
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/Framework/PythonInterface/plugins/algorithms/EnggVanadiumCorrections.py#L156-L167
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scikit-learn/py3/sklearn/linear_model/_ridge.py
python
_RidgeGCV._solve_eigen_gram
(self, alpha, y, sqrt_sw, X_mean, eigvals, Q, QT_y)
return G_inverse_diag, c
Compute dual coefficients and diagonal of G^-1. Used when we have a decomposition of X.X^T (n_samples <= n_features).
Compute dual coefficients and diagonal of G^-1.
[ "Compute", "dual", "coefficients", "and", "diagonal", "of", "G^", "-", "1", "." ]
def _solve_eigen_gram(self, alpha, y, sqrt_sw, X_mean, eigvals, Q, QT_y): """Compute dual coefficients and diagonal of G^-1. Used when we have a decomposition of X.X^T (n_samples <= n_features). """ w = 1. / (eigvals + alpha) if self.fit_intercept: # the vector conta...
[ "def", "_solve_eigen_gram", "(", "self", ",", "alpha", ",", "y", ",", "sqrt_sw", ",", "X_mean", ",", "eigvals", ",", "Q", ",", "QT_y", ")", ":", "w", "=", "1.", "/", "(", "eigvals", "+", "alpha", ")", "if", "self", ".", "fit_intercept", ":", "# the...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scikit-learn/py3/sklearn/linear_model/_ridge.py#L1269-L1290
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/distutils/msvc9compiler.py
python
query_vcvarsall
(version, arch="x86")
return result
Launch vcvarsall.bat and read the settings from its environment
Launch vcvarsall.bat and read the settings from its environment
[ "Launch", "vcvarsall", ".", "bat", "and", "read", "the", "settings", "from", "its", "environment" ]
def query_vcvarsall(version, arch="x86"): """Launch vcvarsall.bat and read the settings from its environment """ vcvarsall = find_vcvarsall(version) interesting = {"include", "lib", "libpath", "path"} result = {} if vcvarsall is None: raise DistutilsPlatformError("Unable to find vcvarsa...
[ "def", "query_vcvarsall", "(", "version", ",", "arch", "=", "\"x86\"", ")", ":", "vcvarsall", "=", "find_vcvarsall", "(", "version", ")", "interesting", "=", "{", "\"include\"", ",", "\"lib\"", ",", "\"libpath\"", ",", "\"path\"", "}", "result", "=", "{", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/distutils/msvc9compiler.py#L253-L291
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/_osx_support.py
python
_override_all_archs
(_config_vars)
return _config_vars
Allow override of all archs with ARCHFLAGS env var
Allow override of all archs with ARCHFLAGS env var
[ "Allow", "override", "of", "all", "archs", "with", "ARCHFLAGS", "env", "var" ]
def _override_all_archs(_config_vars): """Allow override of all archs with ARCHFLAGS env var""" # NOTE: This name was introduced by Apple in OSX 10.5 and # is used by several scripting languages distributed with # that OS release. if 'ARCHFLAGS' in os.environ: arch = os.environ['ARCHFLAGS'] ...
[ "def", "_override_all_archs", "(", "_config_vars", ")", ":", "# NOTE: This name was introduced by Apple in OSX 10.5 and", "# is used by several scripting languages distributed with", "# that OS release.", "if", "'ARCHFLAGS'", "in", "os", ".", "environ", ":", "arch", "=", "os", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/_osx_support.py#L260-L274
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py
python
SBFunction.__ne__
(self, *args)
return _lldb.SBFunction___ne__(self, *args)
__ne__(self, SBFunction rhs) -> bool
__ne__(self, SBFunction rhs) -> bool
[ "__ne__", "(", "self", "SBFunction", "rhs", ")", "-", ">", "bool" ]
def __ne__(self, *args): """__ne__(self, SBFunction rhs) -> bool""" return _lldb.SBFunction___ne__(self, *args)
[ "def", "__ne__", "(", "self", ",", "*", "args", ")", ":", "return", "_lldb", ".", "SBFunction___ne__", "(", "self", ",", "*", "args", ")" ]
https://github.com/Polidea/SiriusObfuscator/blob/b0e590d8130e97856afe578869b83a209e2b19be/SymbolExtractorAndRenamer/lldb/scripts/Python/static-binding/lldb.py#L5004-L5006
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/python/ops/array_grad.py
python
_CheckNumericsGrad
(_, grad)
return grad
Gradient for check_numerics op.
Gradient for check_numerics op.
[ "Gradient", "for", "check_numerics", "op", "." ]
def _CheckNumericsGrad(_, grad): """Gradient for check_numerics op.""" return grad
[ "def", "_CheckNumericsGrad", "(", "_", ",", "grad", ")", ":", "return", "grad" ]
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/python/ops/array_grad.py#L278-L280
zeakey/DeepSkeleton
dc70170f8fd2ec8ca1157484ce66129981104486
python/caffe/pycaffe.py
python
_Net_blobs
(self)
return OrderedDict(zip(self._blob_names, self._blobs))
An OrderedDict (bottom to top, i.e., input to output) of network blobs indexed by name
An OrderedDict (bottom to top, i.e., input to output) of network blobs indexed by name
[ "An", "OrderedDict", "(", "bottom", "to", "top", "i", ".", "e", ".", "input", "to", "output", ")", "of", "network", "blobs", "indexed", "by", "name" ]
def _Net_blobs(self): """ An OrderedDict (bottom to top, i.e., input to output) of network blobs indexed by name """ return OrderedDict(zip(self._blob_names, self._blobs))
[ "def", "_Net_blobs", "(", "self", ")", ":", "return", "OrderedDict", "(", "zip", "(", "self", ".", "_blob_names", ",", "self", ".", "_blobs", ")", ")" ]
https://github.com/zeakey/DeepSkeleton/blob/dc70170f8fd2ec8ca1157484ce66129981104486/python/caffe/pycaffe.py#L22-L27
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
tools/idl_parser/idl_parser.py
python
IDLParser.p_UnionMemberTypes
(self, p)
UnionMemberTypes : OR UnionMemberType UnionMemberTypes |
UnionMemberTypes : OR UnionMemberType UnionMemberTypes |
[ "UnionMemberTypes", ":", "OR", "UnionMemberType", "UnionMemberTypes", "|" ]
def p_UnionMemberTypes(self, p): """UnionMemberTypes : OR UnionMemberType UnionMemberTypes |"""
[ "def", "p_UnionMemberTypes", "(", "self", ",", "p", ")", ":" ]
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/tools/idl_parser/idl_parser.py#L678-L680
CRYTEK/CRYENGINE
232227c59a220cbbd311576f0fbeba7bb53b2a8c
Editor/Python/windows/Lib/site-packages/pip/_vendor/pkg_resources/__init__.py
python
yield_lines
(strs)
Yield non-empty/non-comment lines of a string or sequence
Yield non-empty/non-comment lines of a string or sequence
[ "Yield", "non", "-", "empty", "/", "non", "-", "comment", "lines", "of", "a", "string", "or", "sequence" ]
def yield_lines(strs): """Yield non-empty/non-comment lines of a string or sequence""" if isinstance(strs, string_types): for s in strs.splitlines(): s = s.strip() # skip blank lines/comments if s and not s.startswith('#'): yield s else: fo...
[ "def", "yield_lines", "(", "strs", ")", ":", "if", "isinstance", "(", "strs", ",", "string_types", ")", ":", "for", "s", "in", "strs", ".", "splitlines", "(", ")", ":", "s", "=", "s", ".", "strip", "(", ")", "# skip blank lines/comments", "if", "s", ...
https://github.com/CRYTEK/CRYENGINE/blob/232227c59a220cbbd311576f0fbeba7bb53b2a8c/Editor/Python/windows/Lib/site-packages/pip/_vendor/pkg_resources/__init__.py#L2257-L2268
eclipse/sumo
7132a9b8b6eea734bdec38479026b4d8c4336d03
tools/traci/_vehicletype.py
python
VehicleTypeDomain.getDecel
(self, typeID)
return self._getUniversal(tc.VAR_DECEL, typeID)
getDecel(string) -> double Returns the maximal comfortable deceleration in m/s^2 of vehicles of this type.
getDecel(string) -> double
[ "getDecel", "(", "string", ")", "-", ">", "double" ]
def getDecel(self, typeID): """getDecel(string) -> double Returns the maximal comfortable deceleration in m/s^2 of vehicles of this type. """ return self._getUniversal(tc.VAR_DECEL, typeID)
[ "def", "getDecel", "(", "self", ",", "typeID", ")", ":", "return", "self", ".", "_getUniversal", "(", "tc", ".", "VAR_DECEL", ",", "typeID", ")" ]
https://github.com/eclipse/sumo/blob/7132a9b8b6eea734bdec38479026b4d8c4336d03/tools/traci/_vehicletype.py#L67-L72
apache/trafodion
8455c839ad6b6d7b6e04edda5715053095b78046
install/python-installer/scripts/httplib2/__init__.py
python
Http.clear_credentials
(self)
Remove all the names and passwords that are used for authentication
Remove all the names and passwords that are used for authentication
[ "Remove", "all", "the", "names", "and", "passwords", "that", "are", "used", "for", "authentication" ]
def clear_credentials(self): """Remove all the names and passwords that are used for authentication""" self.credentials.clear() self.authorizations = []
[ "def", "clear_credentials", "(", "self", ")", ":", "self", ".", "credentials", ".", "clear", "(", ")", "self", ".", "authorizations", "=", "[", "]" ]
https://github.com/apache/trafodion/blob/8455c839ad6b6d7b6e04edda5715053095b78046/install/python-installer/scripts/httplib2/__init__.py#L1301-L1305
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py
python
Misc.after_cancel
(self, id)
Cancel scheduling of function identified with ID. Identifier returned by after or after_idle must be given as first parameter.
Cancel scheduling of function identified with ID.
[ "Cancel", "scheduling", "of", "function", "identified", "with", "ID", "." ]
def after_cancel(self, id): """Cancel scheduling of function identified with ID. Identifier returned by after or after_idle must be given as first parameter. """ if not id: raise ValueError('id must be a valid identifier returned from ' '...
[ "def", "after_cancel", "(", "self", ",", "id", ")", ":", "if", "not", "id", ":", "raise", "ValueError", "(", "'id must be a valid identifier returned from '", "'after or after_idle'", ")", "try", ":", "data", "=", "self", ".", "tk", ".", "call", "(", "'after'"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py#L765-L780
RobotLocomotion/drake
0e18a34604c45ed65bc9018a54f7610f91cdad5b
bindings/pydrake/systems/planar_scenegraph_visualizer.py
python
PlanarSceneGraphVisualizer._update_body_fill_verts
(self, body_fill, patch_V)
Takes a convex hull if necessary and uses in-place replacement of vertices to update the fill.
Takes a convex hull if necessary and uses in-place replacement of vertices to update the fill.
[ "Takes", "a", "convex", "hull", "if", "necessary", "and", "uses", "in", "-", "place", "replacement", "of", "vertices", "to", "update", "the", "fill", "." ]
def _update_body_fill_verts(self, body_fill, patch_V): """ Takes a convex hull if necessary and uses in-place replacement of vertices to update the fill. """ # Take a convex hull to get an accurate shape for drawing, with verts # coming out in ccw order. if patch...
[ "def", "_update_body_fill_verts", "(", "self", ",", "body_fill", ",", "patch_V", ")", ":", "# Take a convex hull to get an accurate shape for drawing, with verts", "# coming out in ccw order.", "if", "patch_V", ".", "shape", "[", "1", "]", ">", "3", ":", "hull", "=", ...
https://github.com/RobotLocomotion/drake/blob/0e18a34604c45ed65bc9018a54f7610f91cdad5b/bindings/pydrake/systems/planar_scenegraph_visualizer.py#L364-L381
google/nucleus
68d3947fafba1337f294c0668a6e1c7f3f1273e3
nucleus/util/variantcall_utils.py
python
ploidy
(variant_call)
return sum(gt >= -1 for gt in variant_call.genotype)
Returns the ploidy of the VariantCall. Args: variant_call: VariantCall proto. The VariantCall to evaluate. Returns: The ploidy of the call (a non-negative integer).
Returns the ploidy of the VariantCall.
[ "Returns", "the", "ploidy", "of", "the", "VariantCall", "." ]
def ploidy(variant_call): """Returns the ploidy of the VariantCall. Args: variant_call: VariantCall proto. The VariantCall to evaluate. Returns: The ploidy of the call (a non-negative integer). """ # Unknown genotypes are represented as -1 in VariantCall protos. When # a VCF is parsed that contain...
[ "def", "ploidy", "(", "variant_call", ")", ":", "# Unknown genotypes are represented as -1 in VariantCall protos. When", "# a VCF is parsed that contains multiple ploidies in different samples,", "# a separate padding value of -2**30 - 1 is inserted into the calls.", "return", "sum", "(", "g...
https://github.com/google/nucleus/blob/68d3947fafba1337f294c0668a6e1c7f3f1273e3/nucleus/util/variantcall_utils.py#L223-L235
google/mysql-protobuf
467cda676afaa49e762c5c9164a43f6ad31a1fbf
protobuf/python/google/protobuf/internal/wire_format.py
python
UnpackTag
(tag)
return (tag >> TAG_TYPE_BITS), (tag & TAG_TYPE_MASK)
The inverse of PackTag(). Given an unsigned 32-bit number, returns a (field_number, wire_type) tuple.
The inverse of PackTag(). Given an unsigned 32-bit number, returns a (field_number, wire_type) tuple.
[ "The", "inverse", "of", "PackTag", "()", ".", "Given", "an", "unsigned", "32", "-", "bit", "number", "returns", "a", "(", "field_number", "wire_type", ")", "tuple", "." ]
def UnpackTag(tag): """The inverse of PackTag(). Given an unsigned 32-bit number, returns a (field_number, wire_type) tuple. """ return (tag >> TAG_TYPE_BITS), (tag & TAG_TYPE_MASK)
[ "def", "UnpackTag", "(", "tag", ")", ":", "return", "(", "tag", ">>", "TAG_TYPE_BITS", ")", ",", "(", "tag", "&", "TAG_TYPE_MASK", ")" ]
https://github.com/google/mysql-protobuf/blob/467cda676afaa49e762c5c9164a43f6ad31a1fbf/protobuf/python/google/protobuf/internal/wire_format.py#L93-L97
cms-sw/cmssw
fd9de012d503d3405420bcbeec0ec879baa57cf2
Alignment/CommonAlignment/scripts/tkal_create_file_lists.py
python
FileListCreator._define_parser
(self)
return parser
Definition of command line argument parser.
Definition of command line argument parser.
[ "Definition", "of", "command", "line", "argument", "parser", "." ]
def _define_parser(self): """Definition of command line argument parser.""" parser = argparse.ArgumentParser( description = "Create file lists for alignment", epilog = ("The tool will create a directory containing all file " "lists and a log file with all r...
[ "def", "_define_parser", "(", "self", ")", ":", "parser", "=", "argparse", ".", "ArgumentParser", "(", "description", "=", "\"Create file lists for alignment\"", ",", "epilog", "=", "(", "\"The tool will create a directory containing all file \"", "\"lists and a log file with...
https://github.com/cms-sw/cmssw/blob/fd9de012d503d3405420bcbeec0ec879baa57cf2/Alignment/CommonAlignment/scripts/tkal_create_file_lists.py#L129-L211
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/ma/core.py
python
put
(a, indices, values, mode='raise')
Set storage-indexed locations to corresponding values. This function is equivalent to `MaskedArray.put`, see that method for details. See Also -------- MaskedArray.put
Set storage-indexed locations to corresponding values.
[ "Set", "storage", "-", "indexed", "locations", "to", "corresponding", "values", "." ]
def put(a, indices, values, mode='raise'): """ Set storage-indexed locations to corresponding values. This function is equivalent to `MaskedArray.put`, see that method for details. See Also -------- MaskedArray.put """ # We can't use 'frommethod', the order of arguments is differe...
[ "def", "put", "(", "a", ",", "indices", ",", "values", ",", "mode", "=", "'raise'", ")", ":", "# We can't use 'frommethod', the order of arguments is different", "try", ":", "return", "a", ".", "put", "(", "indices", ",", "values", ",", "mode", "=", "mode", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/ma/core.py#L6947-L6963
y123456yz/reading-and-annotate-mongodb-3.6
93280293672ca7586dc24af18132aa61e4ed7fcf
mongo/buildscripts/idl/idl/cpp_types.py
python
get_cpp_type
(field)
return cpp_type_info
Get the C++ Type information for the given field.
Get the C++ Type information for the given field.
[ "Get", "the", "C", "++", "Type", "information", "for", "the", "given", "field", "." ]
def get_cpp_type(field): # type: (ast.Field) -> CppTypeBase # pylint: disable=redefined-variable-type """Get the C++ Type information for the given field.""" cpp_type_info = None # type: Any if field.cpp_type == 'std::string': cpp_type_info = _CppTypeView(field, 'std::string', 'StringData...
[ "def", "get_cpp_type", "(", "field", ")", ":", "# type: (ast.Field) -> CppTypeBase", "# pylint: disable=redefined-variable-type", "cpp_type_info", "=", "None", "# type: Any", "if", "field", ".", "cpp_type", "==", "'std::string'", ":", "cpp_type_info", "=", "_CppTypeView", ...
https://github.com/y123456yz/reading-and-annotate-mongodb-3.6/blob/93280293672ca7586dc24af18132aa61e4ed7fcf/mongo/buildscripts/idl/idl/cpp_types.py#L517-L537
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/richtext.py
python
RichTextBuffer.BatchingUndo
(*args, **kwargs)
return _richtext.RichTextBuffer_BatchingUndo(*args, **kwargs)
BatchingUndo(self) -> bool
BatchingUndo(self) -> bool
[ "BatchingUndo", "(", "self", ")", "-", ">", "bool" ]
def BatchingUndo(*args, **kwargs): """BatchingUndo(self) -> bool""" return _richtext.RichTextBuffer_BatchingUndo(*args, **kwargs)
[ "def", "BatchingUndo", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_richtext", ".", "RichTextBuffer_BatchingUndo", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/richtext.py#L2277-L2279
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/propgrid.py
python
PropertyGridIteratorBase.Prev
(*args, **kwargs)
return _propgrid.PropertyGridIteratorBase_Prev(*args, **kwargs)
Prev(self)
Prev(self)
[ "Prev", "(", "self", ")" ]
def Prev(*args, **kwargs): """Prev(self)""" return _propgrid.PropertyGridIteratorBase_Prev(*args, **kwargs)
[ "def", "Prev", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_propgrid", ".", "PropertyGridIteratorBase_Prev", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/propgrid.py#L955-L957
facebookincubator/katran
192eb988c398afc673620254097defb7035d669e
build/fbcode_builder/getdeps/cargo.py
python
CargoBuilder._extract_crates
(cargo_toml_file, dep_to_git)
return deps_to_crates
This functions reads content of provided cargo toml file and extracts crate names per each dependency. The extraction is done by a heuristic so it might be incorrect.
This functions reads content of provided cargo toml file and extracts crate names per each dependency. The extraction is done by a heuristic so it might be incorrect.
[ "This", "functions", "reads", "content", "of", "provided", "cargo", "toml", "file", "and", "extracts", "crate", "names", "per", "each", "dependency", ".", "The", "extraction", "is", "done", "by", "a", "heuristic", "so", "it", "might", "be", "incorrect", "." ...
def _extract_crates(cargo_toml_file, dep_to_git): """ This functions reads content of provided cargo toml file and extracts crate names per each dependency. The extraction is done by a heuristic so it might be incorrect. """ deps_to_crates = {} with open(cargo_tom...
[ "def", "_extract_crates", "(", "cargo_toml_file", ",", "dep_to_git", ")", ":", "deps_to_crates", "=", "{", "}", "with", "open", "(", "cargo_toml_file", ",", "\"r\"", ")", "as", "f", ":", "for", "line", "in", "f", ".", "readlines", "(", ")", ":", "if", ...
https://github.com/facebookincubator/katran/blob/192eb988c398afc673620254097defb7035d669e/build/fbcode_builder/getdeps/cargo.py#L276-L297
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/stc.py
python
StyledTextCtrl.ToggleCaretSticky
(*args, **kwargs)
return _stc.StyledTextCtrl_ToggleCaretSticky(*args, **kwargs)
ToggleCaretSticky(self) Switch between sticky and non-sticky: meant to be bound to a key.
ToggleCaretSticky(self)
[ "ToggleCaretSticky", "(", "self", ")" ]
def ToggleCaretSticky(*args, **kwargs): """ ToggleCaretSticky(self) Switch between sticky and non-sticky: meant to be bound to a key. """ return _stc.StyledTextCtrl_ToggleCaretSticky(*args, **kwargs)
[ "def", "ToggleCaretSticky", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextCtrl_ToggleCaretSticky", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/stc.py#L5583-L5589
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/propgrid.py
python
PropertyGridEvent.GetPropertyValue
(*args, **kwargs)
return _propgrid.PropertyGridEvent_GetPropertyValue(*args, **kwargs)
GetPropertyValue(self) -> wxVariant
GetPropertyValue(self) -> wxVariant
[ "GetPropertyValue", "(", "self", ")", "-", ">", "wxVariant" ]
def GetPropertyValue(*args, **kwargs): """GetPropertyValue(self) -> wxVariant""" return _propgrid.PropertyGridEvent_GetPropertyValue(*args, **kwargs)
[ "def", "GetPropertyValue", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_propgrid", ".", "PropertyGridEvent_GetPropertyValue", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/propgrid.py#L2536-L2538
oracle/graaljs
36a56e8e993d45fc40939a3a4d9c0c24990720f1
graal-nodejs/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
python
Writer.__init__
(self, project_path, version, name, guid=None, platforms=None)
Initializes the project. Args: project_path: Path to the project file. version: Format version to emit. name: Name of the project. guid: GUID to use for project, if not None. platforms: Array of string, the supported platforms. If null, ['Win32']
Initializes the project.
[ "Initializes", "the", "project", "." ]
def __init__(self, project_path, version, name, guid=None, platforms=None): """Initializes the project. Args: project_path: Path to the project file. version: Format version to emit. name: Name of the project. guid: GUID to use for project, if not None. platforms: Array of str...
[ "def", "__init__", "(", "self", ",", "project_path", ",", "version", ",", "name", ",", "guid", "=", "None", ",", "platforms", "=", "None", ")", ":", "self", ".", "project_path", "=", "project_path", "self", ".", "version", "=", "version", "self", ".", ...
https://github.com/oracle/graaljs/blob/36a56e8e993d45fc40939a3a4d9c0c24990720f1/graal-nodejs/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py#L54-L82
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
scripts/DiamondAttenuationCorrection/FitTransReadUB.py
python
showx3
(x)
%showx displays all parameters for refinement in reasonably intelligible %form Input : parameter vector and the sets of hkl indices for the diamonds
%showx displays all parameters for refinement in reasonably intelligible %form Input : parameter vector and the sets of hkl indices for the diamonds
[ "%showx", "displays", "all", "parameters", "for", "refinement", "in", "reasonably", "intelligible", "%form", "Input", ":", "parameter", "vector", "and", "the", "sets", "of", "hkl", "indices", "for", "the", "diamonds" ]
def showx3(x): ''' %showx displays all parameters for refinement in reasonably intelligible %form Input : parameter vector and the sets of hkl indices for the diamonds ''' global hkl1, hkl2 global UB1, pkcalcint1 global UB2, pkcalcint2 global pktype global lam, y, e, TOF glob...
[ "def", "showx3", "(", "x", ")", ":", "global", "hkl1", ",", "hkl2", "global", "UB1", ",", "pkcalcint1", "global", "UB2", ",", "pkcalcint2", "global", "pktype", "global", "lam", ",", "y", ",", "e", ",", "TOF", "global", "L1", "global", "ttot", "global",...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/scripts/DiamondAttenuationCorrection/FitTransReadUB.py#L552-L600
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/multiprocessing/connection.py
python
address_type
(address)
Return the types of the address This can be 'AF_INET', 'AF_UNIX', or 'AF_PIPE'
Return the types of the address
[ "Return", "the", "types", "of", "the", "address" ]
def address_type(address): ''' Return the types of the address This can be 'AF_INET', 'AF_UNIX', or 'AF_PIPE' ''' if type(address) == tuple: return 'AF_INET' elif type(address) is str and address.startswith('\\\\'): return 'AF_PIPE' elif type(address) is str: return ...
[ "def", "address_type", "(", "address", ")", ":", "if", "type", "(", "address", ")", "==", "tuple", ":", "return", "'AF_INET'", "elif", "type", "(", "address", ")", "is", "str", "and", "address", ".", "startswith", "(", "'\\\\\\\\'", ")", ":", "return", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/multiprocessing/connection.py#L98-L111
rsummers11/CADLab
976ed959a0b5208bb4173127a7ef732ac73a9b6f
panreas_hnn/hed-globalweight/scripts/cpp_lint.py
python
_ClassifyInclude
(fileinfo, include, is_system)
return _OTHER_HEADER
Figures out what kind of header 'include' is. Args: fileinfo: The current file cpplint is running over. A FileInfo instance. include: The path to a #included file. is_system: True if the #include used <> rather than "". Returns: One of the _XXX_HEADER constants. For example: >>> _ClassifyIn...
Figures out what kind of header 'include' is.
[ "Figures", "out", "what", "kind", "of", "header", "include", "is", "." ]
def _ClassifyInclude(fileinfo, include, is_system): """Figures out what kind of header 'include' is. Args: fileinfo: The current file cpplint is running over. A FileInfo instance. include: The path to a #included file. is_system: True if the #include used <> rather than "". Returns: One of the _...
[ "def", "_ClassifyInclude", "(", "fileinfo", ",", "include", ",", "is_system", ")", ":", "# This is a list of all standard c++ header files, except", "# those already checked for above.", "is_cpp_h", "=", "include", "in", "_CPP_HEADERS", "if", "is_system", ":", "if", "is_cpp...
https://github.com/rsummers11/CADLab/blob/976ed959a0b5208bb4173127a7ef732ac73a9b6f/panreas_hnn/hed-globalweight/scripts/cpp_lint.py#L3620-L3676
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/build/waf-1.7.13/lmbrwaflib/msvs.py
python
vsnode_target.collect_properties
(self)
Visual studio projects are associated with platforms and configurations (for building especially)
Visual studio projects are associated with platforms and configurations (for building especially)
[ "Visual", "studio", "projects", "are", "associated", "with", "platforms", "and", "configurations", "(", "for", "building", "especially", ")" ]
def collect_properties(self): """ Visual studio projects are associated with platforms and configurations (for building especially) """ project_generator_node = self.ctx.bldnode.make_node('project_generator') project_generator_prefix = project_generator_node.abspath() b...
[ "def", "collect_properties", "(", "self", ")", ":", "project_generator_node", "=", "self", ".", "ctx", ".", "bldnode", ".", "make_node", "(", "'project_generator'", ")", "project_generator_prefix", "=", "project_generator_node", ".", "abspath", "(", ")", "bintemp_pr...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/build/waf-1.7.13/lmbrwaflib/msvs.py#L1357-L1580
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/wsgiref/headers.py
python
Headers.items
(self)
return self._headers[:]
Get all the header fields and values. These will be sorted in the order they were in the original header list, or were added to this instance, and may contain duplicates. Any fields deleted and re-inserted are always appended to the header list.
Get all the header fields and values.
[ "Get", "all", "the", "header", "fields", "and", "values", "." ]
def items(self): """Get all the header fields and values. These will be sorted in the order they were in the original header list, or were added to this instance, and may contain duplicates. Any fields deleted and re-inserted are always appended to the header list. """ ...
[ "def", "items", "(", "self", ")", ":", "return", "self", ".", "_headers", "[", ":", "]" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/wsgiref/headers.py#L123-L131
google/iree
1224bbdbe65b0d1fdf40e7324f60f68beeaf7c76
scripts/download_file.py
python
parse_arguments
()
return parser.parse_args()
Parses command line arguments.
Parses command line arguments.
[ "Parses", "command", "line", "arguments", "." ]
def parse_arguments(): """Parses command line arguments.""" parser = argparse.ArgumentParser() parser.add_argument("source_url", type=str, metavar="<source-url>", help="Source URL to download") parser.add_argument("-o", "--o...
[ "def", "parse_arguments", "(", ")", ":", "parser", "=", "argparse", ".", "ArgumentParser", "(", ")", "parser", ".", "add_argument", "(", "\"source_url\"", ",", "type", "=", "str", ",", "metavar", "=", "\"<source-url>\"", ",", "help", "=", "\"Source URL to down...
https://github.com/google/iree/blob/1224bbdbe65b0d1fdf40e7324f60f68beeaf7c76/scripts/download_file.py#L16-L29
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/profiler/parser/integrator.py
python
Integrator._query_and_sort_by_op_type
(self, filter_condition, op_type_order: list)
return { 'col_name_detail': self._display_col_names_detail, 'object': result }
Query the AICORE operator detail information by `filter_condition`, and sort by `op_type_order` and execution time. Args: filter_condition (dict): The filter condition. op_type_order (list[str]): The name of the operator type in order. Returns: dict, The res...
Query the AICORE operator detail information by `filter_condition`, and sort by `op_type_order` and execution time.
[ "Query", "the", "AICORE", "operator", "detail", "information", "by", "filter_condition", "and", "sort", "by", "op_type_order", "and", "execution", "time", "." ]
def _query_and_sort_by_op_type(self, filter_condition, op_type_order: list): """ Query the AICORE operator detail information by `filter_condition`, and sort by `op_type_order` and execution time. Args: filter_condition (dict): The filter condition. op_type_order...
[ "def", "_query_and_sort_by_op_type", "(", "self", ",", "filter_condition", ",", "op_type_order", ":", "list", ")", ":", "self", ".", "_aicore_detail_data_load", "(", ")", "if", "filter_condition", "is", "None", ":", "filter_condition", "=", "{", "}", "self", "."...
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/profiler/parser/integrator.py#L361-L400
livecode/livecode
4606a10ea10b16d5071d0f9f263ccdd7ede8b31d
gyp/pylib/gyp/MSVSSettings.py
python
ValidateMSBuildSettings
(settings, stderr=sys.stderr)
Validates that the names of the settings are valid for MSBuild. Args: settings: A dictionary. The key is the tool name. The values are themselves dictionaries of settings and their values. stderr: The stream receiving the error messages.
Validates that the names of the settings are valid for MSBuild.
[ "Validates", "that", "the", "names", "of", "the", "settings", "are", "valid", "for", "MSBuild", "." ]
def ValidateMSBuildSettings(settings, stderr=sys.stderr): """Validates that the names of the settings are valid for MSBuild. Args: settings: A dictionary. The key is the tool name. The values are themselves dictionaries of settings and their values. stderr: The stream receiving the error me...
[ "def", "ValidateMSBuildSettings", "(", "settings", ",", "stderr", "=", "sys", ".", "stderr", ")", ":", "_ValidateSettings", "(", "_msbuild_validators", ",", "settings", ",", "stderr", ")" ]
https://github.com/livecode/livecode/blob/4606a10ea10b16d5071d0f9f263ccdd7ede8b31d/gyp/pylib/gyp/MSVSSettings.py#L491-L499
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/_core.py
python
Image.HSVtoRGB
(*args, **kwargs)
return _core_.Image_HSVtoRGB(*args, **kwargs)
HSVtoRGB(Image_HSVValue hsv) -> Image_RGBValue Converts a color in HSV color space to RGB color space.
HSVtoRGB(Image_HSVValue hsv) -> Image_RGBValue
[ "HSVtoRGB", "(", "Image_HSVValue", "hsv", ")", "-", ">", "Image_RGBValue" ]
def HSVtoRGB(*args, **kwargs): """ HSVtoRGB(Image_HSVValue hsv) -> Image_RGBValue Converts a color in HSV color space to RGB color space. """ return _core_.Image_HSVtoRGB(*args, **kwargs)
[ "def", "HSVtoRGB", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_core_", ".", "Image_HSVtoRGB", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/_core.py#L3670-L3676
facebookresearch/minirts
859e747a5e2fab2355bea083daffa6a36820a7f2
scripts/behavior_clone/cmd_heads.py
python
DotMoveHead.forward
(self, ufeat, mapfeat, globfeat)
return logit
ufeat: [batch, pnum_unit, ufeat_dim] mapfeat: [batch, x*y, mapfeat_dim] globfeat: [batch, pnum_unit, globfeat_dim] return logit: [batch, pnum_unit, mapfeat_dim]
ufeat: [batch, pnum_unit, ufeat_dim] mapfeat: [batch, x*y, mapfeat_dim] globfeat: [batch, pnum_unit, globfeat_dim]
[ "ufeat", ":", "[", "batch", "pnum_unit", "ufeat_dim", "]", "mapfeat", ":", "[", "batch", "x", "*", "y", "mapfeat_dim", "]", "globfeat", ":", "[", "batch", "pnum_unit", "globfeat_dim", "]" ]
def forward(self, ufeat, mapfeat, globfeat): """ ufeat: [batch, pnum_unit, ufeat_dim] mapfeat: [batch, x*y, mapfeat_dim] globfeat: [batch, pnum_unit, globfeat_dim] return logit: [batch, pnum_unit, mapfeat_dim] """ pnum_unit = ufeat.size(1) map_dim = mapfe...
[ "def", "forward", "(", "self", ",", "ufeat", ",", "mapfeat", ",", "globfeat", ")", ":", "pnum_unit", "=", "ufeat", ".", "size", "(", "1", ")", "map_dim", "=", "mapfeat", ".", "size", "(", "1", ")", "assert", "globfeat", "is", "None", "and", "self", ...
https://github.com/facebookresearch/minirts/blob/859e747a5e2fab2355bea083daffa6a36820a7f2/scripts/behavior_clone/cmd_heads.py#L217-L234
CGRU/cgru
1881a4128530e3d31ac6c25314c18314fc50c2c7
lib/python/cgruutils.py
python
getIconFileName
(iconname)
return None
Missing DocString :param iconname: :return:
Missing DocString
[ "Missing", "DocString" ]
def getIconFileName(iconname): """Missing DocString :param iconname: :return: """ icon_path = os.path.join( os.path.join( cgruconfig.VARS['CGRU_LOCATION'], 'icons' ) ) icon_paths = cgruconfig.VARS['icons_path'] if icon_paths is None: icon_...
[ "def", "getIconFileName", "(", "iconname", ")", ":", "icon_path", "=", "os", ".", "path", ".", "join", "(", "os", ".", "path", ".", "join", "(", "cgruconfig", ".", "VARS", "[", "'CGRU_LOCATION'", "]", ",", "'icons'", ")", ")", "icon_paths", "=", "cgruc...
https://github.com/CGRU/cgru/blob/1881a4128530e3d31ac6c25314c18314fc50c2c7/lib/python/cgruutils.py#L307-L343
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/contrib/labeled_tensor/python/ops/core.py
python
Axis.labels
(self)
return self._labels
Returns the tuple containing coordinate labels, else None.
Returns the tuple containing coordinate labels, else None.
[ "Returns", "the", "tuple", "containing", "coordinate", "labels", "else", "None", "." ]
def labels(self): """Returns the tuple containing coordinate labels, else None.""" return self._labels
[ "def", "labels", "(", "self", ")", ":", "return", "self", ".", "_labels" ]
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/contrib/labeled_tensor/python/ops/core.py#L163-L165
microsoft/DirectXShaderCompiler
8348ff8d9e0287610ba05d3a828e10af981a1c05
tools/clang/utils/check_cfc/check_cfc.py
python
get_input_file
(args)
Return the input file string if it can be found (and there is only one).
Return the input file string if it can be found (and there is only one).
[ "Return", "the", "input", "file", "string", "if", "it", "can", "be", "found", "(", "and", "there", "is", "only", "one", ")", "." ]
def get_input_file(args): """Return the input file string if it can be found (and there is only one).""" inputFiles = list() for arg in args: testarg = arg quotes = ('"', "'") while testarg.endswith(quotes): testarg = testarg[:-1] testarg = os.path.normcase(te...
[ "def", "get_input_file", "(", "args", ")", ":", "inputFiles", "=", "list", "(", ")", "for", "arg", "in", "args", ":", "testarg", "=", "arg", "quotes", "=", "(", "'\"'", ",", "\"'\"", ")", "while", "testarg", ".", "endswith", "(", "quotes", ")", ":", ...
https://github.com/microsoft/DirectXShaderCompiler/blob/8348ff8d9e0287610ba05d3a828e10af981a1c05/tools/clang/utils/check_cfc/check_cfc.py#L184-L201
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/propgrid.py
python
PropertyGridManager.GetValuesFromPage
(self, page, dict_=None, as_strings=False, inc_attributes=False)
return page.GetPropertyValues(dict_, as_strings, inc_attributes)
Same as GetValues, but returns values from specific page only.
Same as GetValues, but returns values from specific page only.
[ "Same", "as", "GetValues", "but", "returns", "values", "from", "specific", "page", "only", "." ]
def GetValuesFromPage(self, page, dict_=None, as_strings=False, inc_attributes=False): "Same as GetValues, but returns values from specific page only." "For argument descriptions, see GetValues." ...
[ "def", "GetValuesFromPage", "(", "self", ",", "page", ",", "dict_", "=", "None", ",", "as_strings", "=", "False", ",", "inc_attributes", "=", "False", ")", ":", "\"For argument descriptions, see GetValues.\"", "return", "page", ".", "GetPropertyValues", "(", "dict...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/propgrid.py#L3642-L3649
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/propgrid.py
python
PropertyGrid.IsMainButtonEvent
(*args, **kwargs)
return _propgrid.PropertyGrid_IsMainButtonEvent(*args, **kwargs)
IsMainButtonEvent(self, Event event) -> bool
IsMainButtonEvent(self, Event event) -> bool
[ "IsMainButtonEvent", "(", "self", "Event", "event", ")", "-", ">", "bool" ]
def IsMainButtonEvent(*args, **kwargs): """IsMainButtonEvent(self, Event event) -> bool""" return _propgrid.PropertyGrid_IsMainButtonEvent(*args, **kwargs)
[ "def", "IsMainButtonEvent", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_propgrid", ".", "PropertyGrid_IsMainButtonEvent", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/propgrid.py#L2431-L2433
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/contrib/keras/python/keras/utils/generic_utils.py
python
func_load
(code, defaults=None, closure=None, globs=None)
return python_types.FunctionType( code, globs, name=code.co_name, argdefs=defaults, closure=closure)
Deserializes a user defined function. Arguments: code: bytecode of the function. defaults: defaults of the function. closure: closure of the function. globs: dictionary of global objects. Returns: A function object.
Deserializes a user defined function.
[ "Deserializes", "a", "user", "defined", "function", "." ]
def func_load(code, defaults=None, closure=None, globs=None): """Deserializes a user defined function. Arguments: code: bytecode of the function. defaults: defaults of the function. closure: closure of the function. globs: dictionary of global objects. Returns: A function object. ...
[ "def", "func_load", "(", "code", ",", "defaults", "=", "None", ",", "closure", "=", "None", ",", "globs", "=", "None", ")", ":", "if", "isinstance", "(", "code", ",", "(", "tuple", ",", "list", ")", ")", ":", "# unpack previous dump", "code", ",", "d...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/contrib/keras/python/keras/utils/generic_utils.py#L207-L227
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/tkinter/__init__.py
python
Misc.tk_focusNext
(self)
return self._nametowidget(name)
Return the next widget in the focus order which follows widget which has currently the focus. The focus order first goes to the next child, then to the children of the child recursively and then to the next sibling which is higher in the stacking order. A widget is omitted if i...
Return the next widget in the focus order which follows widget which has currently the focus.
[ "Return", "the", "next", "widget", "in", "the", "focus", "order", "which", "follows", "widget", "which", "has", "currently", "the", "focus", "." ]
def tk_focusNext(self): """Return the next widget in the focus order which follows widget which has currently the focus. The focus order first goes to the next child, then to the children of the child recursively and then to the next sibling which is higher in the stacking order...
[ "def", "tk_focusNext", "(", "self", ")", ":", "name", "=", "self", ".", "tk", ".", "call", "(", "'tk_focusNext'", ",", "self", ".", "_w", ")", "if", "not", "name", ":", "return", "None", "return", "self", ".", "_nametowidget", "(", "name", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/tkinter/__init__.py#L718-L729
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/core/overrides.py
python
array_function_dispatch
(dispatcher, module=None, verify=True, docs_from_dispatcher=False)
return decorator
Decorator for adding dispatch with the __array_function__ protocol. See NEP-18 for example usage. Parameters ---------- dispatcher : callable Function that when called like ``dispatcher(*args, **kwargs)`` with arguments from the NumPy function call returns an iterable of array-...
Decorator for adding dispatch with the __array_function__ protocol.
[ "Decorator", "for", "adding", "dispatch", "with", "the", "__array_function__", "protocol", "." ]
def array_function_dispatch(dispatcher, module=None, verify=True, docs_from_dispatcher=False): """Decorator for adding dispatch with the __array_function__ protocol. See NEP-18 for example usage. Parameters ---------- dispatcher : callable Function that when cal...
[ "def", "array_function_dispatch", "(", "dispatcher", ",", "module", "=", "None", ",", "verify", "=", "True", ",", "docs_from_dispatcher", "=", "False", ")", ":", "if", "not", "ARRAY_FUNCTION_ENABLED", ":", "def", "decorator", "(", "implementation", ")", ":", "...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numpy/core/overrides.py#L124-L199
lballabio/quantlib-old
136336947ed4fea9ecc1da6edad188700e821739
gensrc/gensrc/configuration/environment.py
python
Environment.addinConfigPath
(self)
return self.addinConfigPath_
Return the current working directory.
Return the current working directory.
[ "Return", "the", "current", "working", "directory", "." ]
def addinConfigPath(self): """Return the current working directory.""" return self.addinConfigPath_
[ "def", "addinConfigPath", "(", "self", ")", ":", "return", "self", ".", "addinConfigPath_" ]
https://github.com/lballabio/quantlib-old/blob/136336947ed4fea9ecc1da6edad188700e821739/gensrc/gensrc/configuration/environment.py#L50-L52
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py2/scipy/stats/mstats_basic.py
python
count_tied_groups
(x, use_missing=False)
return nties
Counts the number of tied values. Parameters ---------- x : sequence Sequence of data on which to counts the ties use_missing : bool, optional Whether to consider missing values as tied. Returns ------- count_tied_groups : dict Returns a dictionary (nb of ties: nb o...
Counts the number of tied values.
[ "Counts", "the", "number", "of", "tied", "values", "." ]
def count_tied_groups(x, use_missing=False): """ Counts the number of tied values. Parameters ---------- x : sequence Sequence of data on which to counts the ties use_missing : bool, optional Whether to consider missing values as tied. Returns ------- count_tied_gro...
[ "def", "count_tied_groups", "(", "x", ",", "use_missing", "=", "False", ")", ":", "nmasked", "=", "ma", ".", "getmask", "(", "x", ")", ".", "sum", "(", ")", "# We need the copy as find_repeats will overwrite the initial data", "data", "=", "ma", ".", "compressed...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py2/scipy/stats/mstats_basic.py#L172-L220
hughperkins/tf-coriander
970d3df6c11400ad68405f22b0c42a52374e94ca
tensorflow/python/training/optimizer.py
python
Optimizer._apply_sparse
(self, grad, var)
Add ops to apply sparse gradients to `var`. Args: grad: `IndexedSlices`. var: A `Variable` object. Return: An `Operation`.
Add ops to apply sparse gradients to `var`.
[ "Add", "ops", "to", "apply", "sparse", "gradients", "to", "var", "." ]
def _apply_sparse(self, grad, var): """Add ops to apply sparse gradients to `var`. Args: grad: `IndexedSlices`. var: A `Variable` object. Return: An `Operation`. """ raise NotImplementedError()
[ "def", "_apply_sparse", "(", "self", ",", "grad", ",", "var", ")", ":", "raise", "NotImplementedError", "(", ")" ]
https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/python/training/optimizer.py#L424-L434
rootm0s/Protectors
5b3f4d11687a5955caf9c3af30666c4bfc2c19ab
OWASP-ZSC/module/readline_windows/pyreadline/modes/notemacs.py
python
NotEmacsMode.digit_argument
(self, e)
Add this digit to the argument already accumulating, or start a new argument. M-- starts a negative argument.
Add this digit to the argument already accumulating, or start a new argument. M-- starts a negative argument.
[ "Add", "this", "digit", "to", "the", "argument", "already", "accumulating", "or", "start", "a", "new", "argument", ".", "M", "--", "starts", "a", "negative", "argument", "." ]
def digit_argument(self, e): # (M-0, M-1, ... M--) '''Add this digit to the argument already accumulating, or start a new argument. M-- starts a negative argument.''' pass
[ "def", "digit_argument", "(", "self", ",", "e", ")", ":", "# (M-0, M-1, ... M--)", "pass" ]
https://github.com/rootm0s/Protectors/blob/5b3f4d11687a5955caf9c3af30666c4bfc2c19ab/OWASP-ZSC/module/readline_windows/pyreadline/modes/notemacs.py#L443-L446
pmq20/node-packer
12c46c6e44fbc14d9ee645ebd17d5296b324f7e0
lts/tools/inspector_protocol/markupsafe/_native.py
python
soft_unicode
(s)
return s
Make a string unicode if it isn't already. That way a markup string is not converted back to unicode.
Make a string unicode if it isn't already. That way a markup string is not converted back to unicode.
[ "Make", "a", "string", "unicode", "if", "it", "isn", "t", "already", ".", "That", "way", "a", "markup", "string", "is", "not", "converted", "back", "to", "unicode", "." ]
def soft_unicode(s): """Make a string unicode if it isn't already. That way a markup string is not converted back to unicode. """ if not isinstance(s, text_type): s = text_type(s) return s
[ "def", "soft_unicode", "(", "s", ")", ":", "if", "not", "isinstance", "(", "s", ",", "text_type", ")", ":", "s", "=", "text_type", "(", "s", ")", "return", "s" ]
https://github.com/pmq20/node-packer/blob/12c46c6e44fbc14d9ee645ebd17d5296b324f7e0/lts/tools/inspector_protocol/markupsafe/_native.py#L40-L46
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/python/ops/linalg_ops.py
python
_BatchSvdShape
(op)
return _SvdShapeHelper(op.inputs[0].get_shape().with_rank_at_least(2), op)
Shape function for batch SVD op.
Shape function for batch SVD op.
[ "Shape", "function", "for", "batch", "SVD", "op", "." ]
def _BatchSvdShape(op): """Shape function for batch SVD op.""" return _SvdShapeHelper(op.inputs[0].get_shape().with_rank_at_least(2), op)
[ "def", "_BatchSvdShape", "(", "op", ")", ":", "return", "_SvdShapeHelper", "(", "op", ".", "inputs", "[", "0", "]", ".", "get_shape", "(", ")", ".", "with_rank_at_least", "(", "2", ")", ",", "op", ")" ]
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/python/ops/linalg_ops.py#L156-L158
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/tools/inspect_checkpoint.py
python
print_tensors_in_checkpoint_file
(file_name, tensor_name)
Prints tensors in a checkpoint file. If no `tensor_name` is provided, prints the tensor names and shapes in the checkpoint file. If `tensor_name` is provided, prints the content of the tensor. Args: file_name: Name of the checkpoint file. tensor_name: Name of the tensor in the checkpoint file to prin...
Prints tensors in a checkpoint file.
[ "Prints", "tensors", "in", "a", "checkpoint", "file", "." ]
def print_tensors_in_checkpoint_file(file_name, tensor_name): """Prints tensors in a checkpoint file. If no `tensor_name` is provided, prints the tensor names and shapes in the checkpoint file. If `tensor_name` is provided, prints the content of the tensor. Args: file_name: Name of the checkpoint file....
[ "def", "print_tensors_in_checkpoint_file", "(", "file_name", ",", "tensor_name", ")", ":", "try", ":", "reader", "=", "tf", ".", "train", ".", "NewCheckpointReader", "(", "file_name", ")", "if", "not", "tensor_name", ":", "print", "(", "reader", ".", "debug_st...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/tools/inspect_checkpoint.py#L30-L53
yyzybb537/libgo
4af17b7c67643c4d54aa354dcc77963ea07847d0
third_party/boost.context/tools/build/src/tools/common.py
python
find_tool
(name, additional_paths = [], path_last = False)
Attempts to find tool (binary) named 'name' in PATH and in 'additional-paths'. If found in path, returns 'name'. If found in additional paths, returns full name. If the tool is found in several directories, returns the first path found. Otherwise, returns the empty string. If 'path_l...
Attempts to find tool (binary) named 'name' in PATH and in 'additional-paths'. If found in path, returns 'name'. If found in additional paths, returns full name. If the tool is found in several directories, returns the first path found. Otherwise, returns the empty string. If 'path_l...
[ "Attempts", "to", "find", "tool", "(", "binary", ")", "named", "name", "in", "PATH", "and", "in", "additional", "-", "paths", ".", "If", "found", "in", "path", "returns", "name", ".", "If", "found", "in", "additional", "paths", "returns", "full", "name",...
def find_tool(name, additional_paths = [], path_last = False): """ Attempts to find tool (binary) named 'name' in PATH and in 'additional-paths'. If found in path, returns 'name'. If found in additional paths, returns full name. If the tool is found in several directories, returns the fir...
[ "def", "find_tool", "(", "name", ",", "additional_paths", "=", "[", "]", ",", "path_last", "=", "False", ")", ":", "assert", "isinstance", "(", "name", ",", "basestring", ")", "assert", "is_iterable_typed", "(", "additional_paths", ",", "basestring", ")", "a...
https://github.com/yyzybb537/libgo/blob/4af17b7c67643c4d54aa354dcc77963ea07847d0/third_party/boost.context/tools/build/src/tools/common.py#L370-L402
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/graphics.py
python
GraphicsContext.Rotate
(self, angle)
Modifies the current transformation matrix by rotating the user-space axes by angle radians.
Modifies the current transformation matrix by rotating the user-space axes by angle radians.
[ "Modifies", "the", "current", "transformation", "matrix", "by", "rotating", "the", "user", "-", "space", "axes", "by", "angle", "radians", "." ]
def Rotate(self, angle): """ Modifies the current transformation matrix by rotating the user-space axes by angle radians. """ self._context.rotate(angle)
[ "def", "Rotate", "(", "self", ",", "angle", ")", ":", "self", ".", "_context", ".", "rotate", "(", "angle", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/graphics.py#L1210-L1215
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/advancedsplash.py
python
AdvancedSplash.OnCharEvents
(self, event)
Handles the ``wx.EVT_CHAR`` event for :class:`AdvancedSplash`. :param `event`: a :class:`KeyEvent` to be processed. :note: This reproduces the behavior of :class:`SplashScreen`.
Handles the ``wx.EVT_CHAR`` event for :class:`AdvancedSplash`.
[ "Handles", "the", "wx", ".", "EVT_CHAR", "event", "for", ":", "class", ":", "AdvancedSplash", "." ]
def OnCharEvents(self, event): """ Handles the ``wx.EVT_CHAR`` event for :class:`AdvancedSplash`. :param `event`: a :class:`KeyEvent` to be processed. :note: This reproduces the behavior of :class:`SplashScreen`. """ self.Close()
[ "def", "OnCharEvents", "(", "self", ",", "event", ")", ":", "self", ".", "Close", "(", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/advancedsplash.py#L368-L377
INK-USC/USC-DS-RelationExtraction
eebcfa7fd2eda5bba92f3ef8158797cdf91e6981
code/Model/baselines/hypenet/evaluation.py
python
evaluate_rm
(prediction, ground_truth)
return precision, recall, f1
Evaluation matrix. :param prediction: a dictionary of labels. e.g {0:[1,0],1:[2],2:[3,4],3:[5,6,7]} :param ground_truth: a dictionary of labels :return:
Evaluation matrix. :param prediction: a dictionary of labels. e.g {0:[1,0],1:[2],2:[3,4],3:[5,6,7]} :param ground_truth: a dictionary of labels :return:
[ "Evaluation", "matrix", ".", ":", "param", "prediction", ":", "a", "dictionary", "of", "labels", ".", "e", ".", "g", "{", "0", ":", "[", "1", "0", "]", "1", ":", "[", "2", "]", "2", ":", "[", "3", "4", "]", "3", ":", "[", "5", "6", "7", "...
def evaluate_rm(prediction, ground_truth): """ Evaluation matrix. :param prediction: a dictionary of labels. e.g {0:[1,0],1:[2],2:[3,4],3:[5,6,7]} :param ground_truth: a dictionary of labels :return: """ pos_pred = 0.0 pos_gt = 0.0 + len(ground_truth) true_pos = 0.0 for i in pre...
[ "def", "evaluate_rm", "(", "prediction", ",", "ground_truth", ")", ":", "pos_pred", "=", "0.0", "pos_gt", "=", "0.0", "+", "len", "(", "ground_truth", ")", "true_pos", "=", "0.0", "for", "i", "in", "prediction", ":", "# classified as pos example (Is-A-Relation)"...
https://github.com/INK-USC/USC-DS-RelationExtraction/blob/eebcfa7fd2eda5bba92f3ef8158797cdf91e6981/code/Model/baselines/hypenet/evaluation.py#L100-L123
francinexue/xuefu
b6ff79747a42e020588c0c0a921048e08fe4680c
ctpx/ctp2/ctptd.py
python
CtpTd.onErrRtnRepealBankToFutureByFutureManual
(self, ReqRepealField, RspInfoField)
系统运行时期货端手工发起冲正银行转期货错误回报
系统运行时期货端手工发起冲正银行转期货错误回报
[ "系统运行时期货端手工发起冲正银行转期货错误回报" ]
def onErrRtnRepealBankToFutureByFutureManual(self, ReqRepealField, RspInfoField): """系统运行时期货端手工发起冲正银行转期货错误回报""" pass
[ "def", "onErrRtnRepealBankToFutureByFutureManual", "(", "self", ",", "ReqRepealField", ",", "RspInfoField", ")", ":", "pass" ]
https://github.com/francinexue/xuefu/blob/b6ff79747a42e020588c0c0a921048e08fe4680c/ctpx/ctp2/ctptd.py#L503-L505
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/python/ops/numerics.py
python
verify_tensor_all_finite
(t, msg, name=None)
return out
Assert that the tensor does not contain any NaN's or Inf's. Args: t: Tensor to check. msg: Message to log on failure. name: A name for this operation (optional). Returns: Same tensor as `t`.
Assert that the tensor does not contain any NaN's or Inf's.
[ "Assert", "that", "the", "tensor", "does", "not", "contain", "any", "NaN", "s", "or", "Inf", "s", "." ]
def verify_tensor_all_finite(t, msg, name=None): """Assert that the tensor does not contain any NaN's or Inf's. Args: t: Tensor to check. msg: Message to log on failure. name: A name for this operation (optional). Returns: Same tensor as `t`. """ with ops.name_scope(name, "VerifyFinite", [t]...
[ "def", "verify_tensor_all_finite", "(", "t", ",", "msg", ",", "name", "=", "None", ")", ":", "with", "ops", ".", "name_scope", "(", "name", ",", "\"VerifyFinite\"", ",", "[", "t", "]", ")", "as", "name", ":", "t", "=", "ops", ".", "convert_to_tensor", ...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/python/ops/numerics.py#L28-L44
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/telemetry/third_party/mox3/mox3/mox.py
python
IgnoreArg.equals
(self, unused_rhs)
return True
Ignores arguments and returns True. Args: unused_rhs: any python object Returns: always returns True
Ignores arguments and returns True.
[ "Ignores", "arguments", "and", "returns", "True", "." ]
def equals(self, unused_rhs): """Ignores arguments and returns True. Args: unused_rhs: any python object Returns: always returns True """ return True
[ "def", "equals", "(", "self", ",", "unused_rhs", ")", ":", "return", "True" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/telemetry/third_party/mox3/mox3/mox.py#L1861-L1871
mapsme/omim
1892903b63f2c85b16ed4966d21fe76aba06b9ba
tools/python/ResponseProvider.py
python
Payload.message
(self)
return self.__message
The message to send to the client.
The message to send to the client.
[ "The", "message", "to", "send", "to", "the", "client", "." ]
def message(self): """ The message to send to the client. """ return self.__message
[ "def", "message", "(", "self", ")", ":", "return", "self", ".", "__message" ]
https://github.com/mapsme/omim/blob/1892903b63f2c85b16ed4966d21fe76aba06b9ba/tools/python/ResponseProvider.py#L25-L29
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_misc.py
python
MetafileDataObject.GetMetafile
(*args, **kwargs)
return _misc_.MetafileDataObject_GetMetafile(*args, **kwargs)
GetMetafile(self) -> MetaFile
GetMetafile(self) -> MetaFile
[ "GetMetafile", "(", "self", ")", "-", ">", "MetaFile" ]
def GetMetafile(*args, **kwargs): """GetMetafile(self) -> MetaFile""" return _misc_.MetafileDataObject_GetMetafile(*args, **kwargs)
[ "def", "GetMetafile", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_misc_", ".", "MetafileDataObject_GetMetafile", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_misc.py#L5473-L5475
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/contrib/learn/python/learn/monitors.py
python
BaseMonitor.begin
(self, max_steps=None)
Called at the beginning of training. When called, the default graph is the one we are executing. Args: max_steps: `int`, the maximum global step this training will run until. Raises: ValueError: if we've already begun a run.
Called at the beginning of training.
[ "Called", "at", "the", "beginning", "of", "training", "." ]
def begin(self, max_steps=None): """Called at the beginning of training. When called, the default graph is the one we are executing. Args: max_steps: `int`, the maximum global step this training will run until. Raises: ValueError: if we've already begun a run. """ if self._begun: ...
[ "def", "begin", "(", "self", ",", "max_steps", "=", "None", ")", ":", "if", "self", ".", "_begun", ":", "raise", "ValueError", "(", "\"begin called twice without end.\"", ")", "self", ".", "_max_steps", "=", "max_steps", "self", ".", "_begun", "=", "True" ]
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/contrib/learn/python/learn/monitors.py#L98-L112
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/distributed/fleet/dataset/dataset.py
python
InMemoryDataset.update_settings
(self, **kwargs)
:api_attr: Static Graph should be called in user's python scripts to update setings of dataset instance. Args: kwargs: Keyword arguments. Currently, we support following keys in **kwargs, including single node settings and advanced distributed related settings: ...
:api_attr: Static Graph
[ ":", "api_attr", ":", "Static", "Graph" ]
def update_settings(self, **kwargs): """ :api_attr: Static Graph should be called in user's python scripts to update setings of dataset instance. Args: kwargs: Keyword arguments. Currently, we support following keys in **kwargs, including single node set...
[ "def", "update_settings", "(", "self", ",", "*", "*", "kwargs", ")", ":", "for", "key", "in", "kwargs", ":", "if", "key", "==", "\"pipe_command\"", ":", "self", ".", "_set_pipe_command", "(", "kwargs", "[", "key", "]", ")", "elif", "key", "==", "\"batc...
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/distributed/fleet/dataset/dataset.py#L432-L511
apache/arrow
af33dd1157eb8d7d9bfac25ebf61445b793b7943
cpp/build-support/cpplint.py
python
IsDecltype
(clean_lines, linenum, column)
return False
Check if the token ending on (linenum, column) is decltype(). Args: clean_lines: A CleansedLines instance containing the file. linenum: the number of the line to check. column: end column of the token to check. Returns: True if this token is decltype() expression, False otherwise.
Check if the token ending on (linenum, column) is decltype().
[ "Check", "if", "the", "token", "ending", "on", "(", "linenum", "column", ")", "is", "decltype", "()", "." ]
def IsDecltype(clean_lines, linenum, column): """Check if the token ending on (linenum, column) is decltype(). Args: clean_lines: A CleansedLines instance containing the file. linenum: the number of the line to check. column: end column of the token to check. Returns: True if this token is declty...
[ "def", "IsDecltype", "(", "clean_lines", ",", "linenum", ",", "column", ")", ":", "(", "text", ",", "_", ",", "start_col", ")", "=", "ReverseCloseExpression", "(", "clean_lines", ",", "linenum", ",", "column", ")", "if", "start_col", "<", "0", ":", "retu...
https://github.com/apache/arrow/blob/af33dd1157eb8d7d9bfac25ebf61445b793b7943/cpp/build-support/cpplint.py#L3783-L3798
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/python/ops/io_ops.py
python
_MatchingFilesShape
(op)
return [tensor_shape.unknown_shape(ndims=1)]
Shape function for the MatchingFiles op.
Shape function for the MatchingFiles op.
[ "Shape", "function", "for", "the", "MatchingFiles", "op", "." ]
def _MatchingFilesShape(op): """Shape function for the MatchingFiles op.""" unused_patern_shape = op.inputs[0].get_shape().merge_with( tensor_shape.scalar()) return [tensor_shape.unknown_shape(ndims=1)]
[ "def", "_MatchingFilesShape", "(", "op", ")", ":", "unused_patern_shape", "=", "op", ".", "inputs", "[", "0", "]", ".", "get_shape", "(", ")", ".", "merge_with", "(", "tensor_shape", ".", "scalar", "(", ")", ")", "return", "[", "tensor_shape", ".", "unkn...
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/python/ops/io_ops.py#L628-L632
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/idlelib/configHandler.py
python
IdleUserConfParser.RemoveOption
(self,section,option)
If section/option exists, remove it. Returns 1 if option was removed, 0 otherwise.
If section/option exists, remove it. Returns 1 if option was removed, 0 otherwise.
[ "If", "section", "/", "option", "exists", "remove", "it", ".", "Returns", "1", "if", "option", "was", "removed", "0", "otherwise", "." ]
def RemoveOption(self,section,option): """ If section/option exists, remove it. Returns 1 if option was removed, 0 otherwise. """ if self.has_section(section): return self.remove_option(section,option)
[ "def", "RemoveOption", "(", "self", ",", "section", ",", "option", ")", ":", "if", "self", ".", "has_section", "(", "section", ")", ":", "return", "self", ".", "remove_option", "(", "section", ",", "option", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/idlelib/configHandler.py#L102-L108
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/utils/misc.py
python
redact_auth_from_url
(url)
return _transform_url(url, _redact_netloc)[0]
Replace the password in a given url with ****.
Replace the password in a given url with ****.
[ "Replace", "the", "password", "in", "a", "given", "url", "with", "****", "." ]
def redact_auth_from_url(url): # type: (str) -> str """Replace the password in a given url with ****.""" return _transform_url(url, _redact_netloc)[0]
[ "def", "redact_auth_from_url", "(", "url", ")", ":", "# type: (str) -> str", "return", "_transform_url", "(", "url", ",", "_redact_netloc", ")", "[", "0", "]" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/utils/misc.py#L794-L797
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/share/doc/python3.7/examples/Tools/unicode/gencodec.py
python
codegen
(name, map, encodingname, comments=1)
return '\n'.join(l).expandtabs()
Returns Python source for the given map. Comments are included in the source, if comments is true (default).
Returns Python source for the given map.
[ "Returns", "Python", "source", "for", "the", "given", "map", "." ]
def codegen(name, map, encodingname, comments=1): """ Returns Python source for the given map. Comments are included in the source, if comments is true (default). """ # Generate code decoding_map_code = python_mapdef_code( 'decoding_map', map, comments=comments) de...
[ "def", "codegen", "(", "name", ",", "map", ",", "encodingname", ",", "comments", "=", "1", ")", ":", "# Generate code", "decoding_map_code", "=", "python_mapdef_code", "(", "'decoding_map'", ",", "map", ",", "comments", "=", "comments", ")", "decoding_table_code...
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/unicode/gencodec.py#L254-L357
InsightSoftwareConsortium/ITK
87acfce9a93d928311c38bc371b666b515b9f19d
Modules/ThirdParty/pygccxml/src/pygccxml/declarations/decl_factory.py
python
decl_factory_t.create_destructor
(self, *arguments, **keywords)
return destructor_t(*arguments, **keywords)
creates instance of class that describes destructor declaration
creates instance of class that describes destructor declaration
[ "creates", "instance", "of", "class", "that", "describes", "destructor", "declaration" ]
def create_destructor(self, *arguments, **keywords): """creates instance of class that describes destructor declaration""" return destructor_t(*arguments, **keywords)
[ "def", "create_destructor", "(", "self", ",", "*", "arguments", ",", "*", "*", "keywords", ")", ":", "return", "destructor_t", "(", "*", "arguments", ",", "*", "*", "keywords", ")" ]
https://github.com/InsightSoftwareConsortium/ITK/blob/87acfce9a93d928311c38bc371b666b515b9f19d/Modules/ThirdParty/pygccxml/src/pygccxml/declarations/decl_factory.py#L44-L46