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
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/gsutil/gslib/util.py
python
GetCloudApiInstance
(cls, thread_state=None)
return thread_state or cls.gsutil_api
Gets a gsutil Cloud API instance. Since Cloud API implementations are not guaranteed to be thread-safe, each thread needs its own instance. These instances are passed to each thread via the thread pool logic in command. Args: cls: Command class to be used for single-threaded case. thread_state: Per th...
Gets a gsutil Cloud API instance.
[ "Gets", "a", "gsutil", "Cloud", "API", "instance", "." ]
def GetCloudApiInstance(cls, thread_state=None): """Gets a gsutil Cloud API instance. Since Cloud API implementations are not guaranteed to be thread-safe, each thread needs its own instance. These instances are passed to each thread via the thread pool logic in command. Args: cls: Command class to be u...
[ "def", "GetCloudApiInstance", "(", "cls", ",", "thread_state", "=", "None", ")", ":", "return", "thread_state", "or", "cls", ".", "gsutil_api" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/gslib/util.py#L870-L885
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/pkg_resources/_vendor/pyparsing.py
python
_makeTags
(tagStr, xml)
return openTag, closeTag
Internal helper to construct opening and closing tag expressions, given a tag name
Internal helper to construct opening and closing tag expressions, given a tag name
[ "Internal", "helper", "to", "construct", "opening", "and", "closing", "tag", "expressions", "given", "a", "tag", "name" ]
def _makeTags(tagStr, xml): """Internal helper to construct opening and closing tag expressions, given a tag name""" if isinstance(tagStr,basestring): resname = tagStr tagStr = Keyword(tagStr, caseless=not xml) else: resname = tagStr.name tagAttrName = Word(alphas,alphanums+"_-:...
[ "def", "_makeTags", "(", "tagStr", ",", "xml", ")", ":", "if", "isinstance", "(", "tagStr", ",", "basestring", ")", ":", "resname", "=", "tagStr", "tagStr", "=", "Keyword", "(", "tagStr", ",", "caseless", "=", "not", "xml", ")", "else", ":", "resname",...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/pkg_resources/_vendor/pyparsing.py#L4834-L4861
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/distribute/numpy_dataset.py
python
one_host_numpy_dataset
(numpy_input, colocate_with, session)
return dataset_ops.Dataset.from_tensor_slices(vars_nested)
Create a dataset on `colocate_with` from `numpy_input`.
Create a dataset on `colocate_with` from `numpy_input`.
[ "Create", "a", "dataset", "on", "colocate_with", "from", "numpy_input", "." ]
def one_host_numpy_dataset(numpy_input, colocate_with, session): """Create a dataset on `colocate_with` from `numpy_input`.""" def create_colocated_variable(next_creator, **kwargs): kwargs["colocate_with"] = colocate_with return next_creator(**kwargs) numpy_flat = nest.flatten(numpy_input) with variab...
[ "def", "one_host_numpy_dataset", "(", "numpy_input", ",", "colocate_with", ",", "session", ")", ":", "def", "create_colocated_variable", "(", "next_creator", ",", "*", "*", "kwargs", ")", ":", "kwargs", "[", "\"colocate_with\"", "]", "=", "colocate_with", "return"...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/distribute/numpy_dataset.py#L72-L87
RobotLocomotion/drake
0e18a34604c45ed65bc9018a54f7610f91cdad5b
tools/lint/buildifier.py
python
_passes_check_mode
(args)
The `args` list should be as per subprocess.check_call. Returns True iff builfidier runs with exitcode 0 and no output, or else returns False iff reformat is needed, or else raises an exception.
The `args` list should be as per subprocess.check_call. Returns True iff builfidier runs with exitcode 0 and no output, or else returns False iff reformat is needed, or else raises an exception.
[ "The", "args", "list", "should", "be", "as", "per", "subprocess", ".", "check_call", ".", "Returns", "True", "iff", "builfidier", "runs", "with", "exitcode", "0", "and", "no", "output", "or", "else", "returns", "False", "iff", "reformat", "is", "needed", "...
def _passes_check_mode(args): """The `args` list should be as per subprocess.check_call. Returns True iff builfidier runs with exitcode 0 and no output, or else returns False iff reformat is needed, or else raises an exception. """ try: output = subprocess.check_output(args) return ...
[ "def", "_passes_check_mode", "(", "args", ")", ":", "try", ":", "output", "=", "subprocess", ".", "check_output", "(", "args", ")", "return", "(", "len", "(", "output", ")", "==", "0", ")", "except", "subprocess", ".", "CalledProcessError", "as", "e", ":...
https://github.com/RobotLocomotion/drake/blob/0e18a34604c45ed65bc9018a54f7610f91cdad5b/tools/lint/buildifier.py#L64-L77
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/requests/cookies.py
python
extract_cookies_to_jar
(jar, request, response)
Extract the cookies from the response into a CookieJar. :param jar: cookielib.CookieJar (not necessarily a RequestsCookieJar) :param request: our own requests.Request object :param response: urllib3.HTTPResponse object
Extract the cookies from the response into a CookieJar.
[ "Extract", "the", "cookies", "from", "the", "response", "into", "a", "CookieJar", "." ]
def extract_cookies_to_jar(jar, request, response): """Extract the cookies from the response into a CookieJar. :param jar: cookielib.CookieJar (not necessarily a RequestsCookieJar) :param request: our own requests.Request object :param response: urllib3.HTTPResponse object """ if not (hasattr(r...
[ "def", "extract_cookies_to_jar", "(", "jar", ",", "request", ",", "response", ")", ":", "if", "not", "(", "hasattr", "(", "response", ",", "'_original_response'", ")", "and", "response", ".", "_original_response", ")", ":", "return", "# the _original_response fiel...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/requests/cookies.py#L118-L132
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
python
NinjaWriter.ComputeExportEnvString
(self, env)
return ' '.join(export_str)
Given an environment, returns a string looking like 'export FOO=foo; export BAR="${FOO} bar;' that exports |env| to the shell.
Given an environment, returns a string looking like 'export FOO=foo; export BAR="${FOO} bar;' that exports |env| to the shell.
[ "Given", "an", "environment", "returns", "a", "string", "looking", "like", "export", "FOO", "=", "foo", ";", "export", "BAR", "=", "$", "{", "FOO", "}", "bar", ";", "that", "exports", "|env|", "to", "the", "shell", "." ]
def ComputeExportEnvString(self, env): """Given an environment, returns a string looking like 'export FOO=foo; export BAR="${FOO} bar;' that exports |env| to the shell.""" export_str = [] for k, v in env: export_str.append('export %s=%s;' % (k, ninja_syntax.escape(gyp.common.Enco...
[ "def", "ComputeExportEnvString", "(", "self", ",", "env", ")", ":", "export_str", "=", "[", "]", "for", "k", ",", "v", "in", "env", ":", "export_str", ".", "append", "(", "'export %s=%s;'", "%", "(", "k", ",", "ninja_syntax", ".", "escape", "(", "gyp",...
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py#L1409-L1417
yyzybb537/libgo
4af17b7c67643c4d54aa354dcc77963ea07847d0
third_party/boost.context/tools/build/src/build/property.py
python
split_conditional
(property)
return None
If 'property' is conditional property, returns condition and the property, e.g <variant>debug,<toolset>gcc:<inlining>full will become <variant>debug,<toolset>gcc <inlining>full. Otherwise, returns empty string.
If 'property' is conditional property, returns condition and the property, e.g <variant>debug,<toolset>gcc:<inlining>full will become <variant>debug,<toolset>gcc <inlining>full. Otherwise, returns empty string.
[ "If", "property", "is", "conditional", "property", "returns", "condition", "and", "the", "property", "e", ".", "g", "<variant", ">", "debug", "<toolset", ">", "gcc", ":", "<inlining", ">", "full", "will", "become", "<variant", ">", "debug", "<toolset", ">", ...
def split_conditional (property): """ If 'property' is conditional property, returns condition and the property, e.g <variant>debug,<toolset>gcc:<inlining>full will become <variant>debug,<toolset>gcc <inlining>full. Otherwise, returns empty string. """ assert isinstance(prope...
[ "def", "split_conditional", "(", "property", ")", ":", "assert", "isinstance", "(", "property", ",", "basestring", ")", "m", "=", "__re_split_conditional", ".", "match", "(", "property", ")", "if", "m", ":", "return", "(", "m", ".", "group", "(", "1", ")...
https://github.com/yyzybb537/libgo/blob/4af17b7c67643c4d54aa354dcc77963ea07847d0/third_party/boost.context/tools/build/src/build/property.py#L297-L310
v8/v8
fee3bf095260bf657a3eea4d3d41f90c42c6c857
tools/stats-viewer.py
python
Counter.__init__
(self, data, offset)
Create a new instance. Args: data: the shared data access object containing the counter offset: the byte offset of the start of this counter
Create a new instance.
[ "Create", "a", "new", "instance", "." ]
def __init__(self, data, offset): """Create a new instance. Args: data: the shared data access object containing the counter offset: the byte offset of the start of this counter """ self.data = data self.offset = offset
[ "def", "__init__", "(", "self", ",", "data", ",", "offset", ")", ":", "self", ".", "data", "=", "data", "self", ".", "offset", "=", "offset" ]
https://github.com/v8/v8/blob/fee3bf095260bf657a3eea4d3d41f90c42c6c857/tools/stats-viewer.py#L333-L341
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/python/training/supervisor.py
python
Supervisor.managed_session
(self, master="", config=None, start_standard_services=True, close_summary_writer=True)
Returns a context manager for a managed session. This context manager creates and automatically recovers a session. It optionally starts the standard services that handle checkpoints and summaries. It monitors exceptions raised from the `with` block or from the services and stops the supervisor as ne...
Returns a context manager for a managed session.
[ "Returns", "a", "context", "manager", "for", "a", "managed", "session", "." ]
def managed_session(self, master="", config=None, start_standard_services=True, close_summary_writer=True): """Returns a context manager for a managed session. This context manager creates and automatically recovers a session. It optionally starts the standard s...
[ "def", "managed_session", "(", "self", ",", "master", "=", "\"\"", ",", "config", "=", "None", ",", "start_standard_services", "=", "True", ",", "close_summary_writer", "=", "True", ")", ":", "try", ":", "sess", "=", "self", ".", "prepare_or_wait_for_session",...
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/python/training/supervisor.py#L856-L940
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/contrib/distributions/python/ops/vector_student_t.py
python
_VectorStudentT.loc
(self)
return self.bijector.shift
Locations of these Student's t distribution(s).
Locations of these Student's t distribution(s).
[ "Locations", "of", "these", "Student", "s", "t", "distribution", "(", "s", ")", "." ]
def loc(self): """Locations of these Student's t distribution(s).""" return self.bijector.shift
[ "def", "loc", "(", "self", ")", ":", "return", "self", ".", "bijector", ".", "shift" ]
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/contrib/distributions/python/ops/vector_student_t.py#L306-L308
hpi-xnor/BMXNet
ed0b201da6667887222b8e4b5f997c4f6b61943d
python/mxnet/symbol/random.py
python
uniform
(low=0, high=1, shape=_Null, dtype=_Null, **kwargs)
return _random_helper(_internal._random_uniform, _internal._sample_uniform, [low, high], shape, dtype, kwargs)
Draw random samples from a uniform distribution. Samples are uniformly distributed over the half-open interval *[low, high)* (includes *low*, but excludes *high*). Parameters ---------- low : float or Symbol Lower boundary of the output interval. All values generated will be greate...
Draw random samples from a uniform distribution.
[ "Draw", "random", "samples", "from", "a", "uniform", "distribution", "." ]
def uniform(low=0, high=1, shape=_Null, dtype=_Null, **kwargs): """Draw random samples from a uniform distribution. Samples are uniformly distributed over the half-open interval *[low, high)* (includes *low*, but excludes *high*). Parameters ---------- low : float or Symbol Lower bound...
[ "def", "uniform", "(", "low", "=", "0", ",", "high", "=", "1", ",", "shape", "=", "_Null", ",", "dtype", "=", "_Null", ",", "*", "*", "kwargs", ")", ":", "return", "_random_helper", "(", "_internal", ".", "_random_uniform", ",", "_internal", ".", "_s...
https://github.com/hpi-xnor/BMXNet/blob/ed0b201da6667887222b8e4b5f997c4f6b61943d/python/mxnet/symbol/random.py#L48-L71
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/feature_column/feature_column_v2.py
python
bucketized_column
(source_column, boundaries)
return BucketizedColumn(source_column, tuple(boundaries))
Represents discretized dense input bucketed by `boundaries`. Buckets include the left boundary, and exclude the right boundary. Namely, `boundaries=[0., 1., 2.]` generates buckets `(-inf, 0.)`, `[0., 1.)`, `[1., 2.)`, and `[2., +inf)`. For example, if the inputs are ```python boundaries = [0, 10, 100] ...
Represents discretized dense input bucketed by `boundaries`.
[ "Represents", "discretized", "dense", "input", "bucketed", "by", "boundaries", "." ]
def bucketized_column(source_column, boundaries): """Represents discretized dense input bucketed by `boundaries`. Buckets include the left boundary, and exclude the right boundary. Namely, `boundaries=[0., 1., 2.]` generates buckets `(-inf, 0.)`, `[0., 1.)`, `[1., 2.)`, and `[2., +inf)`. For example, if the...
[ "def", "bucketized_column", "(", "source_column", ",", "boundaries", ")", ":", "if", "not", "isinstance", "(", "source_column", ",", "(", "NumericColumn", ",", "fc_old", ".", "_NumericColumn", ")", ")", ":", "# pylint: disable=protected-access", "raise", "ValueError...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/feature_column/feature_column_v2.py#L1087-L1169
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/client/timeline.py
python
_ChromeTraceFormatter.emit_pid
(self, name, pid)
Adds a process metadata event to the trace. Args: name: The process name as a string. pid: Identifier of the process as an integer.
Adds a process metadata event to the trace.
[ "Adds", "a", "process", "metadata", "event", "to", "the", "trace", "." ]
def emit_pid(self, name, pid): """Adds a process metadata event to the trace. Args: name: The process name as a string. pid: Identifier of the process as an integer. """ event = {} event['name'] = 'process_name' event['ph'] = 'M' event['pid'] = pid event['args'] = {'name':...
[ "def", "emit_pid", "(", "self", ",", "name", ",", "pid", ")", ":", "event", "=", "{", "}", "event", "[", "'name'", "]", "=", "'process_name'", "event", "[", "'ph'", "]", "=", "'M'", "event", "[", "'pid'", "]", "=", "pid", "event", "[", "'args'", ...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/client/timeline.py#L91-L103
eventql/eventql
7ca0dbb2e683b525620ea30dc40540a22d5eb227
deps/3rdparty/spidermonkey/mozjs/build/pymake/pymake/data.py
python
Variables.get
(self, name, expand=True)
return (None, None, None)
Get the value of a named variable. Returns a tuple (flavor, source, value) If the variable is not present, returns (None, None, None) @param expand If true, the value will be returned as an expansion. If false, it will be returned as an unexpanded string.
Get the value of a named variable. Returns a tuple (flavor, source, value)
[ "Get", "the", "value", "of", "a", "named", "variable", ".", "Returns", "a", "tuple", "(", "flavor", "source", "value", ")" ]
def get(self, name, expand=True): """ Get the value of a named variable. Returns a tuple (flavor, source, value) If the variable is not present, returns (None, None, None) @param expand If true, the value will be returned as an expansion. If false, it will be returned as an une...
[ "def", "get", "(", "self", ",", "name", ",", "expand", "=", "True", ")", ":", "flavor", ",", "source", ",", "valuestr", ",", "valueexp", "=", "self", ".", "_map", ".", "get", "(", "name", ",", "(", "None", ",", "None", ",", "None", ",", "None", ...
https://github.com/eventql/eventql/blob/7ca0dbb2e683b525620ea30dc40540a22d5eb227/deps/3rdparty/spidermonkey/mozjs/build/pymake/pymake/data.py#L453-L505
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
tools/symsrc/pefile.py
python
PE.parse_data_directories
(self)
Parse and process the PE file's data directories.
Parse and process the PE file's data directories.
[ "Parse", "and", "process", "the", "PE", "file", "s", "data", "directories", "." ]
def parse_data_directories(self): """Parse and process the PE file's data directories.""" directory_parsing = ( ('IMAGE_DIRECTORY_ENTRY_IMPORT', self.parse_import_directory), ('IMAGE_DIRECTORY_ENTRY_EXPORT', self.parse_export_directory), ('IMAGE_DIRECTORY_ENT...
[ "def", "parse_data_directories", "(", "self", ")", ":", "directory_parsing", "=", "(", "(", "'IMAGE_DIRECTORY_ENTRY_IMPORT'", ",", "self", ".", "parse_import_directory", ")", ",", "(", "'IMAGE_DIRECTORY_ENTRY_EXPORT'", ",", "self", ".", "parse_export_directory", ")", ...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/tools/symsrc/pefile.py#L1810-L1834
rdkit/rdkit
ede860ae316d12d8568daf5ee800921c3389c84e
rdkit/Chem/Draw/__init__.py
python
_MolsToGridSVG
(mols, molsPerRow=3, subImgSize=(200, 200), legends=None, highlightAtomLists=None, highlightBondLists=None, drawOptions=None, **kwargs)
return res
returns an SVG of the grid
returns an SVG of the grid
[ "returns", "an", "SVG", "of", "the", "grid" ]
def _MolsToGridSVG(mols, molsPerRow=3, subImgSize=(200, 200), legends=None, highlightAtomLists=None, highlightBondLists=None, drawOptions=None, **kwargs): """ returns an SVG of the grid """ if legends is None: legends = [''] * len(mols) nRows = len(mols) // molsPerRow if len(mols) % mo...
[ "def", "_MolsToGridSVG", "(", "mols", ",", "molsPerRow", "=", "3", ",", "subImgSize", "=", "(", "200", ",", "200", ")", ",", "legends", "=", "None", ",", "highlightAtomLists", "=", "None", ",", "highlightBondLists", "=", "None", ",", "drawOptions", "=", ...
https://github.com/rdkit/rdkit/blob/ede860ae316d12d8568daf5ee800921c3389c84e/rdkit/Chem/Draw/__init__.py#L566-L594
gimli-org/gimli
17aa2160de9b15ababd9ef99e89b1bc3277bbb23
pygimli/physics/sNMR/mrs.py
python
MRS.setBoundaries
(self)
Set parameter boundaries for inversion.
Set parameter boundaries for inversion.
[ "Set", "parameter", "boundaries", "for", "inversion", "." ]
def setBoundaries(self): """Set parameter boundaries for inversion.""" for i in range(3): self.fop.region(i).setParameters(self.startval[i], self.lowerBound[i], self.upperBound[i], "log")
[ "def", "setBoundaries", "(", "self", ")", ":", "for", "i", "in", "range", "(", "3", ")", ":", "self", ".", "fop", ".", "region", "(", "i", ")", ".", "setParameters", "(", "self", ".", "startval", "[", "i", "]", ",", "self", ".", "lowerBound", "["...
https://github.com/gimli-org/gimli/blob/17aa2160de9b15ababd9ef99e89b1bc3277bbb23/pygimli/physics/sNMR/mrs.py#L393-L398
libLAS/libLAS
e6a1aaed412d638687b8aec44f7b12df7ca2bbbb
python/liblas/header.py
python
Header.get_minorversion
(self)
return core.las.LASHeader_GetVersionMinor(self.handle)
Returns the minor version of the file. Expect this value to always be 0, 1, or 2
Returns the minor version of the file. Expect this value to always be 0, 1, or 2
[ "Returns", "the", "minor", "version", "of", "the", "file", ".", "Expect", "this", "value", "to", "always", "be", "0", "1", "or", "2" ]
def get_minorversion(self): """Returns the minor version of the file. Expect this value to always be 0, 1, or 2""" return core.las.LASHeader_GetVersionMinor(self.handle)
[ "def", "get_minorversion", "(", "self", ")", ":", "return", "core", ".", "las", ".", "LASHeader_GetVersionMinor", "(", "self", ".", "handle", ")" ]
https://github.com/libLAS/libLAS/blob/e6a1aaed412d638687b8aec44f7b12df7ca2bbbb/python/liblas/header.py#L211-L214
qboticslabs/mastering_ros
d83e78f30acc45b0f18522c1d5fae3a7f52974b9
chapter_10_codes/seven_dof_arm_gazebo/scripts/pick_and_place_working_1.py
python
CokeCanPickAndPlace._place
(self, group, target, place)
return True
Place a target using the planning group
Place a target using the planning group
[ "Place", "a", "target", "using", "the", "planning", "group" ]
def _place(self, group, target, place): """ Place a target using the planning group """ # Obtain possible places: places = self._generate_places(place) # Create and send Place goal: goal = self._create_place_goal(group, target, places) state = self._pla...
[ "def", "_place", "(", "self", ",", "group", ",", "target", ",", "place", ")", ":", "# Obtain possible places:", "places", "=", "self", ".", "_generate_places", "(", "place", ")", "# Create and send Place goal:", "goal", "=", "self", ".", "_create_place_goal", "(...
https://github.com/qboticslabs/mastering_ros/blob/d83e78f30acc45b0f18522c1d5fae3a7f52974b9/chapter_10_codes/seven_dof_arm_gazebo/scripts/pick_and_place_working_1.py#L324-L349
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/site-packages/boto3/docs/collection.py
python
document_batch_action
(section, resource_name, event_emitter, batch_action_model, service_model, collection_model, include_signature=True)
Documents a collection's batch action :param section: The section to write to :param resource_name: The name of the resource :param action_name: The name of collection action. Currently only can be all, filter, limit, or page_size :param event_emitter: The event emitter to use to emit events...
Documents a collection's batch action
[ "Documents", "a", "collection", "s", "batch", "action" ]
def document_batch_action(section, resource_name, event_emitter, batch_action_model, service_model, collection_model, include_signature=True): """Documents a collection's batch action :param section: The section to write to :param resource_name: The name...
[ "def", "document_batch_action", "(", "section", ",", "resource_name", ",", "event_emitter", ",", "batch_action_model", ",", "service_model", ",", "collection_model", ",", "include_signature", "=", "True", ")", ":", "operation_model", "=", "service_model", ".", "operat...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/site-packages/boto3/docs/collection.py#L87-L135
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/ConfigParser.py
python
ConfigParser.get
(self, section, option, raw=False, vars=None)
Get an option value for a given section. If `vars' is provided, it must be a dictionary. The option is looked up in `vars' (if provided), `section', and in `defaults' in that order. All % interpolations are expanded in the return values, unless the optional argument `raw' is true. Valu...
Get an option value for a given section.
[ "Get", "an", "option", "value", "for", "a", "given", "section", "." ]
def get(self, section, option, raw=False, vars=None): """Get an option value for a given section. If `vars' is provided, it must be a dictionary. The option is looked up in `vars' (if provided), `section', and in `defaults' in that order. All % interpolations are expanded in the return...
[ "def", "get", "(", "self", ",", "section", ",", "option", ",", "raw", "=", "False", ",", "vars", "=", "None", ")", ":", "sectiondict", "=", "{", "}", "try", ":", "sectiondict", "=", "self", ".", "_sections", "[", "section", "]", "except", "KeyError",...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/ConfigParser.py#L590-L623
apache/incubator-mxnet
f03fb23f1d103fec9541b5ae59ee06b1734a51d9
python/mxnet/numpy/multiarray.py
python
median
(a, axis=None, out=None, overwrite_input=None, keepdims=False)
return _mx_nd_np.median(a, axis=axis, overwrite_input=overwrite_input, keepdims=keepdims, out=out)
r"""Compute the median along the specified axis. Returns the median of the array elements. Parameters ---------- a : array_like Input array or object that can be converted to an array. axis : {int, sequence of int, None}, optional Axis or axes along which the medians are computed. T...
r"""Compute the median along the specified axis. Returns the median of the array elements.
[ "r", "Compute", "the", "median", "along", "the", "specified", "axis", ".", "Returns", "the", "median", "of", "the", "array", "elements", "." ]
def median(a, axis=None, out=None, overwrite_input=None, keepdims=False): r"""Compute the median along the specified axis. Returns the median of the array elements. Parameters ---------- a : array_like Input array or object that can be converted to an array. axis : {int, sequence of int...
[ "def", "median", "(", "a", ",", "axis", "=", "None", ",", "out", "=", "None", ",", "overwrite_input", "=", "None", ",", "keepdims", "=", "False", ")", ":", "return", "_mx_nd_np", ".", "median", "(", "a", ",", "axis", "=", "axis", ",", "overwrite_inpu...
https://github.com/apache/incubator-mxnet/blob/f03fb23f1d103fec9541b5ae59ee06b1734a51d9/python/mxnet/numpy/multiarray.py#L11143-L11191
KratosMultiphysics/Kratos
0000833054ed0503424eb28205d6508d9ca6cbbc
applications/SwimmingDEMApplication/python_scripts/custom_body_force/manufactured_solution.py
python
ManufacturedSolution.dp1
(self, x1, x2, t)
return 0.0
By default, pressure is 0
By default, pressure is 0
[ "By", "default", "pressure", "is", "0" ]
def dp1(self, x1, x2, t): ''' By default, pressure is 0 ''' return 0.0
[ "def", "dp1", "(", "self", ",", "x1", ",", "x2", ",", "t", ")", ":", "return", "0.0" ]
https://github.com/KratosMultiphysics/Kratos/blob/0000833054ed0503424eb28205d6508d9ca6cbbc/applications/SwimmingDEMApplication/python_scripts/custom_body_force/manufactured_solution.py#L121-L125
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/doctools.py
python
DocPositionMgr.GetPreviousNaviPos
(cls, fname=None)
return item
Get the last stored navigation position The optional fname parameter will get the last found position for the given file. @param cls: Class @param fname: filename (note currently not supported) @return: int or None @note: fname is currently not used
Get the last stored navigation position The optional fname parameter will get the last found position for the given file. @param cls: Class @param fname: filename (note currently not supported) @return: int or None @note: fname is currently not used
[ "Get", "the", "last", "stored", "navigation", "position", "The", "optional", "fname", "parameter", "will", "get", "the", "last", "found", "position", "for", "the", "given", "file", ".", "@param", "cls", ":", "Class", "@param", "fname", ":", "filename", "(", ...
def GetPreviousNaviPos(cls, fname=None): """Get the last stored navigation position The optional fname parameter will get the last found position for the given file. @param cls: Class @param fname: filename (note currently not supported) @return: int or None @note...
[ "def", "GetPreviousNaviPos", "(", "cls", ",", "fname", "=", "None", ")", ":", "item", "=", "cls", ".", "_poscache", ".", "GetPreviousItem", "(", ")", "return", "item" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/doctools.py#L135-L146
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/closure_linter/closure_linter/ecmametadatapass.py
python
EcmaContext.__init__
(self, context_type, start_token, parent=None)
Initializes the context object. Args: context_type: The context type. start_token: The token where this context starts. parent: The parent context. Attributes: type: The context type. start_token: The token where this context starts. end_token: The token where this context ...
Initializes the context object.
[ "Initializes", "the", "context", "object", "." ]
def __init__(self, context_type, start_token, parent=None): """Initializes the context object. Args: context_type: The context type. start_token: The token where this context starts. parent: The parent context. Attributes: type: The context type. start_token: The token where ...
[ "def", "__init__", "(", "self", ",", "context_type", ",", "start_token", ",", "parent", "=", "None", ")", ":", "self", ".", "type", "=", "context_type", "self", ".", "start_token", "=", "start_token", "self", ".", "end_token", "=", "None", "self", ".", "...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/closure_linter/closure_linter/ecmametadatapass.py#L118-L141
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/urllib3/connectionpool.py
python
HTTPConnectionPool.urlopen
( self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=_Default, pool_timeout=None, release_conn=None, chunked=False, body_pos=None, **response_kw )
return response
Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details. .. note:: More commonly, it's appropriate to use a convenience method provided by :class:`.RequestMethods`, such ...
Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details.
[ "Get", "a", "connection", "from", "the", "pool", "and", "perform", "an", "HTTP", "request", ".", "This", "is", "the", "lowest", "level", "call", "for", "making", "a", "request", "so", "you", "ll", "need", "to", "specify", "all", "the", "raw", "details", ...
def urlopen( self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=_Default, pool_timeout=None, release_conn=None, chunked=False, body_pos=None, **response_kw...
[ "def", "urlopen", "(", "self", ",", "method", ",", "url", ",", "body", "=", "None", ",", "headers", "=", "None", ",", "retries", "=", "None", ",", "redirect", "=", "True", ",", "assert_same_host", "=", "True", ",", "timeout", "=", "_Default", ",", "p...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/urllib3/connectionpool.py#L494-L849
microsoft/TSS.MSR
0f2516fca2cd9929c31d5450e39301c9bde43688
TSS.Py/src/TpmTypes.py
python
StartAuthSessionResponse.fromBytes
(buffer)
return TpmBuffer(buffer).createObj(StartAuthSessionResponse)
Returns new StartAuthSessionResponse object constructed from its marshaled representation in the given byte buffer
Returns new StartAuthSessionResponse object constructed from its marshaled representation in the given byte buffer
[ "Returns", "new", "StartAuthSessionResponse", "object", "constructed", "from", "its", "marshaled", "representation", "in", "the", "given", "byte", "buffer" ]
def fromBytes(buffer): """ Returns new StartAuthSessionResponse object constructed from its marshaled representation in the given byte buffer """ return TpmBuffer(buffer).createObj(StartAuthSessionResponse)
[ "def", "fromBytes", "(", "buffer", ")", ":", "return", "TpmBuffer", "(", "buffer", ")", ".", "createObj", "(", "StartAuthSessionResponse", ")" ]
https://github.com/microsoft/TSS.MSR/blob/0f2516fca2cd9929c31d5450e39301c9bde43688/TSS.Py/src/TpmTypes.py#L9394-L9398
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/py3/scipy/optimize/_tstutils.py
python
aps14_f
(x, n)
return n / 20.0 * (x / 1.5 + np.sin(x) - 1)
r"""0 for negative x-values, trigonometric+linear for x positive
r"""0 for negative x-values, trigonometric+linear for x positive
[ "r", "0", "for", "negative", "x", "-", "values", "trigonometric", "+", "linear", "for", "x", "positive" ]
def aps14_f(x, n): r"""0 for negative x-values, trigonometric+linear for x positive""" if x <= 0: return -n / 20.0 return n / 20.0 * (x / 1.5 + np.sin(x) - 1)
[ "def", "aps14_f", "(", "x", ",", "n", ")", ":", "if", "x", "<=", "0", ":", "return", "-", "n", "/", "20.0", "return", "n", "/", "20.0", "*", "(", "x", "/", "1.5", "+", "np", ".", "sin", "(", "x", ")", "-", "1", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/py3/scipy/optimize/_tstutils.py#L354-L358
tpfister/caffe-heatmap
4db69ef53e6b8a0b3b4ebb29328b0ab3dbf67c4e
scripts/cpp_lint.py
python
FileInfo.FullName
(self)
return os.path.abspath(self._filename).replace('\\', '/')
Make Windows paths like Unix.
Make Windows paths like Unix.
[ "Make", "Windows", "paths", "like", "Unix", "." ]
def FullName(self): """Make Windows paths like Unix.""" return os.path.abspath(self._filename).replace('\\', '/')
[ "def", "FullName", "(", "self", ")", ":", "return", "os", ".", "path", ".", "abspath", "(", "self", ".", "_filename", ")", ".", "replace", "(", "'\\\\'", ",", "'/'", ")" ]
https://github.com/tpfister/caffe-heatmap/blob/4db69ef53e6b8a0b3b4ebb29328b0ab3dbf67c4e/scripts/cpp_lint.py#L881-L883
ukoethe/vigra
093d57d15c8c237adf1704d96daa6393158ce299
vigranumpy/lib/arraytypes.py
python
VigraArray.transpose
(self, *axes, **keepTags)
return res
An additional keyword parameter 'keepTags' can be provided (it has to be passed as an explicit keyword parameter). If it is True, the axistags will remain unchanged such that the transposed axes aquire a new meaning.
An additional keyword parameter 'keepTags' can be provided (it has to be passed as an explicit keyword parameter). If it is True, the axistags will remain unchanged such that the transposed axes aquire a new meaning.
[ "An", "additional", "keyword", "parameter", "keepTags", "can", "be", "provided", "(", "it", "has", "to", "be", "passed", "as", "an", "explicit", "keyword", "parameter", ")", ".", "If", "it", "is", "True", "the", "axistags", "will", "remain", "unchanged", "...
def transpose(self, *axes, **keepTags): ''' An additional keyword parameter 'keepTags' can be provided (it has to be passed as an explicit keyword parameter). If it is True, the axistags will remain unchanged such that the transposed axes aquire a new meaning. ''' keepTag...
[ "def", "transpose", "(", "self", ",", "*", "axes", ",", "*", "*", "keepTags", ")", ":", "keepTags", "=", "keepTags", ".", "get", "(", "'keepTags'", ",", "False", ")", "res", "=", "numpy", ".", "ndarray", ".", "transpose", "(", "self", ",", "*", "ax...
https://github.com/ukoethe/vigra/blob/093d57d15c8c237adf1704d96daa6393158ce299/vigranumpy/lib/arraytypes.py#L1571-L1581
NicknineTheEagle/TF2-Base
20459c5a7fbc995b6bf54fa85c2f62a101e9fb64
src/thirdparty/protobuf-2.3.0/python/google/protobuf/descriptor.py
python
_NestedDescriptorBase.CopyToProto
(self, proto)
Copies this to the matching proto in descriptor_pb2. Args: proto: An empty proto instance from descriptor_pb2. Raises: Error: If self couldnt be serialized, due to to few constructor arguments.
Copies this to the matching proto in descriptor_pb2.
[ "Copies", "this", "to", "the", "matching", "proto", "in", "descriptor_pb2", "." ]
def CopyToProto(self, proto): """Copies this to the matching proto in descriptor_pb2. Args: proto: An empty proto instance from descriptor_pb2. Raises: Error: If self couldnt be serialized, due to to few constructor arguments. """ if (self.file is not None and self._serialized_...
[ "def", "CopyToProto", "(", "self", ",", "proto", ")", ":", "if", "(", "self", ".", "file", "is", "not", "None", "and", "self", ".", "_serialized_start", "is", "not", "None", "and", "self", ".", "_serialized_end", "is", "not", "None", ")", ":", "proto",...
https://github.com/NicknineTheEagle/TF2-Base/blob/20459c5a7fbc995b6bf54fa85c2f62a101e9fb64/src/thirdparty/protobuf-2.3.0/python/google/protobuf/descriptor.py#L141-L156
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/mapreduce/mapreduce/model.py
python
ShardState.copy_from
(self, other_state)
Copy data from another shard state entity to self.
Copy data from another shard state entity to self.
[ "Copy", "data", "from", "another", "shard", "state", "entity", "to", "self", "." ]
def copy_from(self, other_state): """Copy data from another shard state entity to self.""" for prop in self.properties().values(): setattr(self, prop.name, getattr(other_state, prop.name))
[ "def", "copy_from", "(", "self", ",", "other_state", ")", ":", "for", "prop", "in", "self", ".", "properties", "(", ")", ".", "values", "(", ")", ":", "setattr", "(", "self", ",", "prop", ".", "name", ",", "getattr", "(", "other_state", ",", "prop", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/mapreduce/mapreduce/model.py#L1026-L1029
msracver/Deep-Image-Analogy
632b9287b42552e32dad64922967c8c9ec7fc4d3
python/caffe/net_spec.py
python
Top.to_proto
(self)
return to_proto(self)
Generate a NetParameter that contains all layers needed to compute this top.
Generate a NetParameter that contains all layers needed to compute this top.
[ "Generate", "a", "NetParameter", "that", "contains", "all", "layers", "needed", "to", "compute", "this", "top", "." ]
def to_proto(self): """Generate a NetParameter that contains all layers needed to compute this top.""" return to_proto(self)
[ "def", "to_proto", "(", "self", ")", ":", "return", "to_proto", "(", "self", ")" ]
https://github.com/msracver/Deep-Image-Analogy/blob/632b9287b42552e32dad64922967c8c9ec7fc4d3/python/caffe/net_spec.py#L90-L94
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/contrib/framework/python/framework/checkpoint_utils.py
python
load_variable
(checkpoint_dir, name)
return reader.get_tensor(name)
Returns a Tensor with the contents of the given variable in the checkpoint. Args: checkpoint_dir: Directory with checkpoints file or path to checkpoint. name: Name of the tensor to return. Returns: `Tensor` object.
Returns a Tensor with the contents of the given variable in the checkpoint.
[ "Returns", "a", "Tensor", "with", "the", "contents", "of", "the", "given", "variable", "in", "the", "checkpoint", "." ]
def load_variable(checkpoint_dir, name): """Returns a Tensor with the contents of the given variable in the checkpoint. Args: checkpoint_dir: Directory with checkpoints file or path to checkpoint. name: Name of the tensor to return. Returns: `Tensor` object. """ # TODO(b/29227106): Fix this in t...
[ "def", "load_variable", "(", "checkpoint_dir", ",", "name", ")", ":", "# TODO(b/29227106): Fix this in the right place and remove this.", "if", "name", ".", "endswith", "(", "\":0\"", ")", ":", "name", "=", "name", "[", ":", "-", "2", "]", "reader", "=", "load_c...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/contrib/framework/python/framework/checkpoint_utils.py#L66-L80
giuspen/cherrytree
84712f206478fcf9acf30174009ad28c648c6344
pygtk2/modules/core.py
python
CherryTree.zoom_text
(self, is_increase)
Increase or Decrease Text Font
Increase or Decrease Text Font
[ "Increase", "or", "Decrease", "Text", "Font" ]
def zoom_text(self, is_increase): """Increase or Decrease Text Font""" text_view, text_buffer, syntax_highl, from_codebox = self.get_text_view_n_buffer_codebox_proof() if not text_buffer: return from_table = False if syntax_highl == cons.RICH_TEXT_ID: anchor_table = s...
[ "def", "zoom_text", "(", "self", ",", "is_increase", ")", ":", "text_view", ",", "text_buffer", ",", "syntax_highl", ",", "from_codebox", "=", "self", ".", "get_text_view_n_buffer_codebox_proof", "(", ")", "if", "not", "text_buffer", ":", "return", "from_table", ...
https://github.com/giuspen/cherrytree/blob/84712f206478fcf9acf30174009ad28c648c6344/pygtk2/modules/core.py#L736-L772
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/Tix.py
python
Grid.move_row
(self, from_, to, offset)
Moves the range of rows from position FROM through TO by the distance indicated by OFFSET. For example, move_row(2, 4, 1) moves the rows 2,3,4 to rows 3,4,5.
Moves the range of rows from position FROM through TO by the distance indicated by OFFSET. For example, move_row(2, 4, 1) moves the rows 2,3,4 to rows 3,4,5.
[ "Moves", "the", "range", "of", "rows", "from", "position", "FROM", "through", "TO", "by", "the", "distance", "indicated", "by", "OFFSET", ".", "For", "example", "move_row", "(", "2", "4", "1", ")", "moves", "the", "rows", "2", "3", "4", "to", "rows", ...
def move_row(self, from_, to, offset): """Moves the range of rows from position FROM through TO by the distance indicated by OFFSET. For example, move_row(2, 4, 1) moves the rows 2,3,4 to rows 3,4,5.""" self.tk.call(self, 'move', 'row', from_, to, offset)
[ "def", "move_row", "(", "self", ",", "from_", ",", "to", ",", "offset", ")", ":", "self", ".", "tk", ".", "call", "(", "self", ",", "'move'", ",", "'row'", ",", "from_", ",", "to", ",", "offset", ")" ]
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/Tix.py#L1882-L1886
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/ros_comm/rosbag/src/rosbag/bag.py
python
Bag.get_message_count
(self, topic_filters=None)
return num_messages
Returns the number of messages in the bag. Can be filtered by Topic @param topic_filters: One or more topics to filter by @type topic_filters: Could be either a single str or a list of str. @return: The number of messages in the bag, optionally filtered by topic @rtype: int
Returns the number of messages in the bag. Can be filtered by Topic
[ "Returns", "the", "number", "of", "messages", "in", "the", "bag", ".", "Can", "be", "filtered", "by", "Topic" ]
def get_message_count(self, topic_filters=None): """ Returns the number of messages in the bag. Can be filtered by Topic @param topic_filters: One or more topics to filter by @type topic_filters: Could be either a single str or a list of str. @return: The number of messages in th...
[ "def", "get_message_count", "(", "self", ",", "topic_filters", "=", "None", ")", ":", "num_messages", "=", "0", "if", "topic_filters", "is", "not", "None", ":", "info", "=", "self", ".", "get_type_and_topic_info", "(", "topic_filters", "=", "topic_filters", ")...
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/ros_comm/rosbag/src/rosbag/bag.py#L468-L491
gem5/gem5
141cc37c2d4b93959d4c249b8f7e6a8b2ef75338
util/gem5art/artifact/gem5art/artifact/_artifactdb.py
python
ArtifactDB.upload
(self, key: UUID, path: Path)
Upload the file at path to the database with _id of key
Upload the file at path to the database with _id of key
[ "Upload", "the", "file", "at", "path", "to", "the", "database", "with", "_id", "of", "key" ]
def upload(self, key: UUID, path: Path) -> None: """Upload the file at path to the database with _id of key""" pass
[ "def", "upload", "(", "self", ",", "key", ":", "UUID", ",", "path", ":", "Path", ")", "->", "None", ":", "pass" ]
https://github.com/gem5/gem5/blob/141cc37c2d4b93959d4c249b8f7e6a8b2ef75338/util/gem5art/artifact/gem5art/artifact/_artifactdb.py#L74-L76
wy1iu/LargeMargin_Softmax_Loss
c3e9f20e4f16e2b4daf7d358a614366b9b39a6ec
python/caffe/pycaffe.py
python
_Net_batch
(self, blobs)
Batch blob lists according to net's batch size. Parameters ---------- blobs: Keys blob names and values are lists of blobs (of any length). Naturally, all the lists should have the same length. Yields ------ batch: {blob name: list of blobs} dict for a single batch.
Batch blob lists according to net's batch size.
[ "Batch", "blob", "lists", "according", "to", "net", "s", "batch", "size", "." ]
def _Net_batch(self, blobs): """ Batch blob lists according to net's batch size. Parameters ---------- blobs: Keys blob names and values are lists of blobs (of any length). Naturally, all the lists should have the same length. Yields ------ batch: {blob name: list of blobs} ...
[ "def", "_Net_batch", "(", "self", ",", "blobs", ")", ":", "num", "=", "len", "(", "six", ".", "next", "(", "six", ".", "itervalues", "(", "blobs", ")", ")", ")", "batch_size", "=", "six", ".", "next", "(", "six", ".", "itervalues", "(", "self", "...
https://github.com/wy1iu/LargeMargin_Softmax_Loss/blob/c3e9f20e4f16e2b4daf7d358a614366b9b39a6ec/python/caffe/pycaffe.py#L262-L293
sdhash/sdhash
b9eff63e4e5867e910f41fd69032bbb1c94a2a5e
sdhash-ui/cherrypy/wsgiserver/wsgiserver3.py
python
ThreadPool.start
(self)
Start the pool of threads.
Start the pool of threads.
[ "Start", "the", "pool", "of", "threads", "." ]
def start(self): """Start the pool of threads.""" for i in range(self.min): self._threads.append(WorkerThread(self.server)) for worker in self._threads: worker.setName("CP Server " + worker.getName()) worker.start() for worker in self._threads: ...
[ "def", "start", "(", "self", ")", ":", "for", "i", "in", "range", "(", "self", ".", "min", ")", ":", "self", ".", "_threads", ".", "append", "(", "WorkerThread", "(", "self", ".", "server", ")", ")", "for", "worker", "in", "self", ".", "_threads", ...
https://github.com/sdhash/sdhash/blob/b9eff63e4e5867e910f41fd69032bbb1c94a2a5e/sdhash-ui/cherrypy/wsgiserver/wsgiserver3.py#L1209-L1218
crosslife/OpenBird
9e0198a1a2295f03fa1e8676e216e22c9c7d380b
cocos2d/tools/bindings-generator/backup/clang-llvm-3.3-pybinding/cindex.py
python
SourceLocation.offset
(self)
return self._get_instantiation()[3]
Get the file offset represented by this source location.
Get the file offset represented by this source location.
[ "Get", "the", "file", "offset", "represented", "by", "this", "source", "location", "." ]
def offset(self): """Get the file offset represented by this source location.""" return self._get_instantiation()[3]
[ "def", "offset", "(", "self", ")", ":", "return", "self", ".", "_get_instantiation", "(", ")", "[", "3", "]" ]
https://github.com/crosslife/OpenBird/blob/9e0198a1a2295f03fa1e8676e216e22c9c7d380b/cocos2d/tools/bindings-generator/backup/clang-llvm-3.3-pybinding/cindex.py#L213-L215
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python3/src/Lib/_pydecimal.py
python
Decimal.next_toward
(self, other, context=None)
return ans
Returns the number closest to self, in the direction towards other. The result is the closest representable number to self (excluding self) that is in the direction towards other, unless both have the same value. If the two operands are numerically equal, then the result is a copy of s...
Returns the number closest to self, in the direction towards other.
[ "Returns", "the", "number", "closest", "to", "self", "in", "the", "direction", "towards", "other", "." ]
def next_toward(self, other, context=None): """Returns the number closest to self, in the direction towards other. The result is the closest representable number to self (excluding self) that is in the direction towards other, unless both have the same value. If the two operands are ...
[ "def", "next_toward", "(", "self", ",", "other", ",", "context", "=", "None", ")", ":", "other", "=", "_convert_other", "(", "other", ",", "raiseit", "=", "True", ")", "if", "context", "is", "None", ":", "context", "=", "getcontext", "(", ")", "ans", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python3/src/Lib/_pydecimal.py#L3544-L3588
kamyu104/LeetCode-Solutions
77605708a927ea3b85aee5a479db733938c7c211
Python/capacity-to-ship-packages-within-d-days.py
python
Solution.shipWithinDays
(self, weights, D)
return left
:type weights: List[int] :type D: int :rtype: int
:type weights: List[int] :type D: int :rtype: int
[ ":", "type", "weights", ":", "List", "[", "int", "]", ":", "type", "D", ":", "int", ":", "rtype", ":", "int" ]
def shipWithinDays(self, weights, D): """ :type weights: List[int] :type D: int :rtype: int """ def possible(weights, D, mid): result, curr = 1, 0 for w in weights: if curr+w > mid: result += 1 ...
[ "def", "shipWithinDays", "(", "self", ",", "weights", ",", "D", ")", ":", "def", "possible", "(", "weights", ",", "D", ",", "mid", ")", ":", "result", ",", "curr", "=", "1", ",", "0", "for", "w", "in", "weights", ":", "if", "curr", "+", "w", ">...
https://github.com/kamyu104/LeetCode-Solutions/blob/77605708a927ea3b85aee5a479db733938c7c211/Python/capacity-to-ship-packages-within-d-days.py#L5-L27
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/stc.py
python
StyledTextCtrl.BraceHighlightIndicator
(*args, **kwargs)
return _stc.StyledTextCtrl_BraceHighlightIndicator(*args, **kwargs)
BraceHighlightIndicator(self, bool useBraceHighlightIndicator, int indicator)
BraceHighlightIndicator(self, bool useBraceHighlightIndicator, int indicator)
[ "BraceHighlightIndicator", "(", "self", "bool", "useBraceHighlightIndicator", "int", "indicator", ")" ]
def BraceHighlightIndicator(*args, **kwargs): """BraceHighlightIndicator(self, bool useBraceHighlightIndicator, int indicator)""" return _stc.StyledTextCtrl_BraceHighlightIndicator(*args, **kwargs)
[ "def", "BraceHighlightIndicator", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextCtrl_BraceHighlightIndicator", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/stc.py#L4807-L4809
openvinotoolkit/openvino
dedcbeafa8b84cccdc55ca64b8da516682b381c7
tools/mo/openvino/tools/mo/front/caffe/extractors/utils.py
python
get_list_from_container
(param, prop: str, t)
return []
Takes proto parameter and extracts a value it stores. Args: param: proto parameter prop: name of the property to take t: type of the value (int, float etc.) - only primitive ones Returns: If it is a container, returns the list with values. If it is a single value of the ...
Takes proto parameter and extracts a value it stores. Args: param: proto parameter prop: name of the property to take t: type of the value (int, float etc.) - only primitive ones
[ "Takes", "proto", "parameter", "and", "extracts", "a", "value", "it", "stores", ".", "Args", ":", "param", ":", "proto", "parameter", "prop", ":", "name", "of", "the", "property", "to", "take", "t", ":", "type", "of", "the", "value", "(", "int", "float...
def get_list_from_container(param, prop: str, t): """ Takes proto parameter and extracts a value it stores. Args: param: proto parameter prop: name of the property to take t: type of the value (int, float etc.) - only primitive ones Returns: If it is a container, returns...
[ "def", "get_list_from_container", "(", "param", ",", "prop", ":", "str", ",", "t", ")", ":", "if", "not", "param", "or", "(", "param", "and", "not", "hasattr", "(", "param", ",", "prop", ")", ")", ":", "return", "[", "]", "prop_val", "=", "getattr", ...
https://github.com/openvinotoolkit/openvino/blob/dedcbeafa8b84cccdc55ca64b8da516682b381c7/tools/mo/openvino/tools/mo/front/caffe/extractors/utils.py#L105-L129
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/idlelib/query.py
python
HelpSource.__init__
(self, parent, title, *, menuitem='', filepath='', used_names={}, _htest=False, _utest=False)
Get menu entry and url/local file for Additional Help. User enters a name for the Help resource and a web url or file name. The user can browse for the file.
Get menu entry and url/local file for Additional Help.
[ "Get", "menu", "entry", "and", "url", "/", "local", "file", "for", "Additional", "Help", "." ]
def __init__(self, parent, title, *, menuitem='', filepath='', used_names={}, _htest=False, _utest=False): """Get menu entry and url/local file for Additional Help. User enters a name for the Help resource and a web url or file name. The user can browse for the file. ""...
[ "def", "__init__", "(", "self", ",", "parent", ",", "title", ",", "*", ",", "menuitem", "=", "''", ",", "filepath", "=", "''", ",", "used_names", "=", "{", "}", ",", "_htest", "=", "False", ",", "_utest", "=", "False", ")", ":", "self", ".", "fil...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/idlelib/query.py#L246-L257
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
src/python/turicreate/toolkits/_feature_engineering/_autovectorizer.py
python
_interpretations_class.categorical__float
(self, column_name, output_column_prefix)
return [ _ColumnFunctionTransformation( features=[column_name], output_column_prefix=output_column_prefix, transform_function=lambda col: col.astype(str), transform_function_name="astype(str)", ) ]
Interprets a float column as a categorical variable.
Interprets a float column as a categorical variable.
[ "Interprets", "a", "float", "column", "as", "a", "categorical", "variable", "." ]
def categorical__float(self, column_name, output_column_prefix): """ Interprets a float column as a categorical variable. """ return [ _ColumnFunctionTransformation( features=[column_name], output_column_prefix=output_column_prefix, ...
[ "def", "categorical__float", "(", "self", ",", "column_name", ",", "output_column_prefix", ")", ":", "return", "[", "_ColumnFunctionTransformation", "(", "features", "=", "[", "column_name", "]", ",", "output_column_prefix", "=", "output_column_prefix", ",", "transfor...
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/src/python/turicreate/toolkits/_feature_engineering/_autovectorizer.py#L325-L337
Project-OSRM/osrm-backend
f2e284623e25b5570dd2a5e6985abcb3790fd348
third_party/flatbuffers/python/flatbuffers/util.py
python
GetSizePrefix
(buf, offset)
return encode.Get(packer.int32, buf, offset)
Extract the size prefix from a buffer.
Extract the size prefix from a buffer.
[ "Extract", "the", "size", "prefix", "from", "a", "buffer", "." ]
def GetSizePrefix(buf, offset): """Extract the size prefix from a buffer.""" return encode.Get(packer.int32, buf, offset)
[ "def", "GetSizePrefix", "(", "buf", ",", "offset", ")", ":", "return", "encode", ".", "Get", "(", "packer", ".", "int32", ",", "buf", ",", "offset", ")" ]
https://github.com/Project-OSRM/osrm-backend/blob/f2e284623e25b5570dd2a5e6985abcb3790fd348/third_party/flatbuffers/python/flatbuffers/util.py#L19-L21
raspberrypi/tools
13474ee775d0c5ec8a7da4fb0a9fa84187abfc87
arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/share/gdb/python/gdb/prompt.py
python
_prompt_pwd
(ignore)
return os.getcwdu()
The current working directory.
The current working directory.
[ "The", "current", "working", "directory", "." ]
def _prompt_pwd(ignore): "The current working directory." return os.getcwdu()
[ "def", "_prompt_pwd", "(", "ignore", ")", ":", "return", "os", ".", "getcwdu", "(", ")" ]
https://github.com/raspberrypi/tools/blob/13474ee775d0c5ec8a7da4fb0a9fa84187abfc87/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/share/gdb/python/gdb/prompt.py#L22-L24
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/imputil.py
python
ImportManager.install
(self, namespace=vars(__builtin__))
Install this ImportManager into the specified namespace.
Install this ImportManager into the specified namespace.
[ "Install", "this", "ImportManager", "into", "the", "specified", "namespace", "." ]
def install(self, namespace=vars(__builtin__)): "Install this ImportManager into the specified namespace." if isinstance(namespace, _ModuleType): namespace = vars(namespace) # Note: we have no notion of "chaining" # Record the previous import hook, then install our own. ...
[ "def", "install", "(", "self", ",", "namespace", "=", "vars", "(", "__builtin__", ")", ")", ":", "if", "isinstance", "(", "namespace", ",", "_ModuleType", ")", ":", "namespace", "=", "vars", "(", "namespace", ")", "# Note: we have no notion of \"chaining\"", "...
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/imputil.py#L33-L44
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py2/pandas/core/resample.py
python
Resampler.backfill
(self, limit=None)
return self._upsample('backfill', limit=limit)
Backward fill the new missing values in the resampled data. In statistics, imputation is the process of replacing missing data with substituted values [1]_. When resampling data, missing values may appear (e.g., when the resampling frequency is higher than the original frequency). The b...
Backward fill the new missing values in the resampled data.
[ "Backward", "fill", "the", "new", "missing", "values", "in", "the", "resampled", "data", "." ]
def backfill(self, limit=None): """ Backward fill the new missing values in the resampled data. In statistics, imputation is the process of replacing missing data with substituted values [1]_. When resampling data, missing values may appear (e.g., when the resampling frequency i...
[ "def", "backfill", "(", "self", ",", "limit", "=", "None", ")", ":", "return", "self", ".", "_upsample", "(", "'backfill'", ",", "limit", "=", "limit", ")" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py2/pandas/core/resample.py#L498-L599
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/ops/nn_ops.py
python
_SoftmaxCrossEntropyWithLogitsShape
(op)
return [tensor_shape.vector(batch_size.value), input_shape]
Shape function for SoftmaxCrossEntropyWithLogits op.
Shape function for SoftmaxCrossEntropyWithLogits op.
[ "Shape", "function", "for", "SoftmaxCrossEntropyWithLogits", "op", "." ]
def _SoftmaxCrossEntropyWithLogitsShape(op): """Shape function for SoftmaxCrossEntropyWithLogits op.""" logits_shape = op.inputs[0].get_shape() labels_shape = op.inputs[1].get_shape() input_shape = logits_shape.merge_with(labels_shape).with_rank(2) batch_size = input_shape[0] return [tensor_shape.vector(bat...
[ "def", "_SoftmaxCrossEntropyWithLogitsShape", "(", "op", ")", ":", "logits_shape", "=", "op", ".", "inputs", "[", "0", "]", ".", "get_shape", "(", ")", "labels_shape", "=", "op", ".", "inputs", "[", "1", "]", ".", "get_shape", "(", ")", "input_shape", "=...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/ops/nn_ops.py#L599-L605
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scikit-learn/py3/sklearn/discriminant_analysis.py
python
_class_cov
(X, y, priors, shrinkage=None)
return cov
Compute class covariance matrix. Parameters ---------- X : array-like, shape (n_samples, n_features) Input data. y : array-like, shape (n_samples,) or (n_samples, n_targets) Target values. priors : array-like, shape (n_classes,) Class priors. shrinkage : string or flo...
Compute class covariance matrix.
[ "Compute", "class", "covariance", "matrix", "." ]
def _class_cov(X, y, priors, shrinkage=None): """Compute class covariance matrix. Parameters ---------- X : array-like, shape (n_samples, n_features) Input data. y : array-like, shape (n_samples,) or (n_samples, n_targets) Target values. priors : array-like, shape (n_classes,)...
[ "def", "_class_cov", "(", "X", ",", "y", ",", "priors", ",", "shrinkage", "=", "None", ")", ":", "classes", "=", "np", ".", "unique", "(", "y", ")", "cov", "=", "np", ".", "zeros", "(", "shape", "=", "(", "X", ".", "shape", "[", "1", "]", ","...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scikit-learn/py3/sklearn/discriminant_analysis.py#L96-L126
xiaolonw/caffe-video_triplet
c39ea1ad6e937ccf7deba4510b7e555165abf05f
python/caffe/draw.py
python
draw_net_to_file
(caffe_net, filename, rankdir='LR')
Draws a caffe net, and saves it to file using the format given as the file extension. Use '.raw' to output raw text that you can manually feed to graphviz to draw graphs. Parameters ---------- caffe_net : a caffe.proto.caffe_pb2.NetParameter protocol buffer. filename : string The path t...
Draws a caffe net, and saves it to file using the format given as the file extension. Use '.raw' to output raw text that you can manually feed to graphviz to draw graphs.
[ "Draws", "a", "caffe", "net", "and", "saves", "it", "to", "file", "using", "the", "format", "given", "as", "the", "file", "extension", ".", "Use", ".", "raw", "to", "output", "raw", "text", "that", "you", "can", "manually", "feed", "to", "graphviz", "t...
def draw_net_to_file(caffe_net, filename, rankdir='LR'): """Draws a caffe net, and saves it to file using the format given as the file extension. Use '.raw' to output raw text that you can manually feed to graphviz to draw graphs. Parameters ---------- caffe_net : a caffe.proto.caffe_pb2.NetPar...
[ "def", "draw_net_to_file", "(", "caffe_net", ",", "filename", ",", "rankdir", "=", "'LR'", ")", ":", "ext", "=", "filename", "[", "filename", ".", "rfind", "(", "'.'", ")", "+", "1", ":", "]", "with", "open", "(", "filename", ",", "'wb'", ")", "as", ...
https://github.com/xiaolonw/caffe-video_triplet/blob/c39ea1ad6e937ccf7deba4510b7e555165abf05f/python/caffe/draw.py#L198-L213
Kitware/ParaView
f760af9124ff4634b23ebbeab95a4f56e0261955
Wrapping/Python/paraview/catalyst/v2_internals.py
python
CatalystV1Information.cycle
(self)
return self._dataDescription.GetTimeStep()
returns the current simulation cycle or timestep index
returns the current simulation cycle or timestep index
[ "returns", "the", "current", "simulation", "cycle", "or", "timestep", "index" ]
def cycle(self): """returns the current simulation cycle or timestep index""" return self._dataDescription.GetTimeStep()
[ "def", "cycle", "(", "self", ")", ":", "return", "self", ".", "_dataDescription", ".", "GetTimeStep", "(", ")" ]
https://github.com/Kitware/ParaView/blob/f760af9124ff4634b23ebbeab95a4f56e0261955/Wrapping/Python/paraview/catalyst/v2_internals.py#L50-L52
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
third_party/python_gflags/gflags.py
python
_StrOrUnicode
(value)
Converts value to a python string or, if necessary, unicode-string.
Converts value to a python string or, if necessary, unicode-string.
[ "Converts", "value", "to", "a", "python", "string", "or", "if", "necessary", "unicode", "-", "string", "." ]
def _StrOrUnicode(value): """Converts value to a python string or, if necessary, unicode-string.""" try: return str(value) except UnicodeEncodeError: return unicode(value)
[ "def", "_StrOrUnicode", "(", "value", ")", ":", "try", ":", "return", "str", "(", "value", ")", "except", "UnicodeEncodeError", ":", "return", "unicode", "(", "value", ")" ]
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/third_party/python_gflags/gflags.py#L1767-L1772
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py2/numpy/core/fromnumeric.py
python
partition
(a, kth, axis=-1, kind='introselect', order=None)
return a
Return a partitioned copy of an array. Creates a copy of the array with its elements rearranged in such a way that the value of the element in k-th position is in the position it would be in a sorted array. All elements smaller than the k-th element are moved before this element and all equal or gr...
Return a partitioned copy of an array.
[ "Return", "a", "partitioned", "copy", "of", "an", "array", "." ]
def partition(a, kth, axis=-1, kind='introselect', order=None): """ Return a partitioned copy of an array. Creates a copy of the array with its elements rearranged in such a way that the value of the element in k-th position is in the position it would be in a sorted array. All elements smaller tha...
[ "def", "partition", "(", "a", ",", "kth", ",", "axis", "=", "-", "1", ",", "kind", "=", "'introselect'", ",", "order", "=", "None", ")", ":", "if", "axis", "is", "None", ":", "# flatten returns (1, N) for np.matrix, so always use the last axis", "a", "=", "a...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py2/numpy/core/fromnumeric.py#L647-L735
baidu/sofa-pbrpc
fb1a1cbf0b3b0e09706eefdbca8335f48df2f5aa
python/sofa/pbrpc/client.py
python
Connection.WriteData
(self, data, deadline=None)
Write data into the socket.
Write data into the socket.
[ "Write", "data", "into", "the", "socket", "." ]
def WriteData(self, data, deadline=None): """Write data into the socket. """ if self.conn == None: try: self.conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM) except socket.error as err: self.Close() raise Error('Create connection fail: %s' % err) try: ...
[ "def", "WriteData", "(", "self", ",", "data", ",", "deadline", "=", "None", ")", ":", "if", "self", ".", "conn", "==", "None", ":", "try", ":", "self", ".", "conn", "=", "socket", ".", "socket", "(", "socket", ".", "AF_INET", ",", "socket", ".", ...
https://github.com/baidu/sofa-pbrpc/blob/fb1a1cbf0b3b0e09706eefdbca8335f48df2f5aa/python/sofa/pbrpc/client.py#L144-L166
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/functools.py
python
_gt_from_le
(self, other, NotImplemented=NotImplemented)
return not op_result
Return a > b. Computed by @total_ordering from (not a <= b).
Return a > b. Computed by
[ "Return", "a", ">", "b", ".", "Computed", "by" ]
def _gt_from_le(self, other, NotImplemented=NotImplemented): 'Return a > b. Computed by @total_ordering from (not a <= b).' op_result = self.__le__(other) if op_result is NotImplemented: return op_result return not op_result
[ "def", "_gt_from_le", "(", "self", ",", "other", ",", "NotImplemented", "=", "NotImplemented", ")", ":", "op_result", "=", "self", ".", "__le__", "(", "other", ")", "if", "op_result", "is", "NotImplemented", ":", "return", "op_result", "return", "not", "op_r...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/functools.py#L124-L129
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
tools/isolate/trace_inputs.py
python
Strace.parse_log
(cls, filename, blacklist)
return ( set(os.path.realpath(f) for f in context.files), set(os.path.realpath(f) for f in context.non_existent))
Processes a strace log and returns the files opened and the files that do not exist. It does not track directories. Most of the time, files that do not exist are temporary test files that should be put in /tmp instead. See http://crbug.com/116251
Processes a strace log and returns the files opened and the files that do not exist.
[ "Processes", "a", "strace", "log", "and", "returns", "the", "files", "opened", "and", "the", "files", "that", "do", "not", "exist", "." ]
def parse_log(cls, filename, blacklist): """Processes a strace log and returns the files opened and the files that do not exist. It does not track directories. Most of the time, files that do not exist are temporary test files that should be put in /tmp instead. See http://crbug.com/116251 """...
[ "def", "parse_log", "(", "cls", ",", "filename", ",", "blacklist", ")", ":", "logging", ".", "info", "(", "'parse_log(%s, %s)'", "%", "(", "filename", ",", "blacklist", ")", ")", "context", "=", "cls", ".", "_Context", "(", "blacklist", ")", "for", "line...
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/tools/isolate/trace_inputs.py#L404-L420
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/python/ops/embedding_ops.py
python
embedding_lookup
(params, ids, partition_strategy="mod", name=None, validate_indices=True)
Looks up `ids` in a list of embedding tensors. This function is used to perform parallel lookups on the list of tensors in `params`. It is a generalization of [`tf.gather()`](../../api_docs/python/array_ops.md#gather), where `params` is interpreted as a partition of a larger embedding tensor. If `len(param...
Looks up `ids` in a list of embedding tensors.
[ "Looks", "up", "ids", "in", "a", "list", "of", "embedding", "tensors", "." ]
def embedding_lookup(params, ids, partition_strategy="mod", name=None, validate_indices=True): """Looks up `ids` in a list of embedding tensors. This function is used to perform parallel lookups on the list of tensors in `params`. It is a generalization of [`tf.gather()`](../../api_docs/p...
[ "def", "embedding_lookup", "(", "params", ",", "ids", ",", "partition_strategy", "=", "\"mod\"", ",", "name", "=", "None", ",", "validate_indices", "=", "True", ")", ":", "if", "params", "is", "None", "or", "params", "==", "[", "]", ":", "# pylint: disable...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/python/ops/embedding_ops.py#L31-L170
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/propgrid.py
python
PropertyGridManager.GetGrid
(*args)
return _propgrid.PropertyGridManager_GetGrid(*args)
GetGrid(self) -> PropertyGrid GetGrid(self) -> PropertyGrid
GetGrid(self) -> PropertyGrid GetGrid(self) -> PropertyGrid
[ "GetGrid", "(", "self", ")", "-", ">", "PropertyGrid", "GetGrid", "(", "self", ")", "-", ">", "PropertyGrid" ]
def GetGrid(*args): """ GetGrid(self) -> PropertyGrid GetGrid(self) -> PropertyGrid """ return _propgrid.PropertyGridManager_GetGrid(*args)
[ "def", "GetGrid", "(", "*", "args", ")", ":", "return", "_propgrid", ".", "PropertyGridManager_GetGrid", "(", "*", "args", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/propgrid.py#L3462-L3467
snap-stanford/snap-python
d53c51b0a26aa7e3e7400b014cdf728948fde80a
setup/snap.py
python
TBool.__eq__
(self, *args)
return _snap.TBool___eq__(self, *args)
__eq__(TBool self, TBool Bool) -> bool Parameters: Bool: TBool const &
__eq__(TBool self, TBool Bool) -> bool
[ "__eq__", "(", "TBool", "self", "TBool", "Bool", ")", "-", ">", "bool" ]
def __eq__(self, *args): """ __eq__(TBool self, TBool Bool) -> bool Parameters: Bool: TBool const & """ return _snap.TBool___eq__(self, *args)
[ "def", "__eq__", "(", "self", ",", "*", "args", ")", ":", "return", "_snap", ".", "TBool___eq__", "(", "self", ",", "*", "args", ")" ]
https://github.com/snap-stanford/snap-python/blob/d53c51b0a26aa7e3e7400b014cdf728948fde80a/setup/snap.py#L12153-L12161
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/Blast/Editor/Scripts/external/pyassimp/core.py
python
load
(filename, file_type = None, processing = postprocess.aiProcess_Triangulate)
return scene
Load a model into a scene. On failure throws AssimpError. Arguments --------- filename: Either a filename or a file object to load model from. If a file object is passed, file_type MUST be specified Otherwise Assimp has no idea which importer to use. This i...
Load a model into a scene. On failure throws AssimpError.
[ "Load", "a", "model", "into", "a", "scene", ".", "On", "failure", "throws", "AssimpError", "." ]
def load(filename, file_type = None, processing = postprocess.aiProcess_Triangulate): ''' Load a model into a scene. On failure throws AssimpError. Arguments --------- filename: Either a filename or a file object to load model from. If a file object is passed, f...
[ "def", "load", "(", "filename", ",", "file_type", "=", "None", ",", "processing", "=", "postprocess", ".", "aiProcess_Triangulate", ")", ":", "if", "hasattr", "(", "filename", ",", "'read'", ")", ":", "# This is the case where a file object has been passed to load.", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/Blast/Editor/Scripts/external/pyassimp/core.py#L275-L322
panda3d/panda3d
833ad89ebad58395d0af0b7ec08538e5e4308265
direct/src/showbase/DistancePhasedNode.py
python
DistancePhasedNode.__disableCollisions
(self, cleanup = False)
Disables all collision geometry by stashing the geometry. If autoCleanup == True and we're not currently cleaning up, leave the exit event and collision sphere active for the largest(thus lowest) phase. This is so that we can still cleanup if the phase node exits the largest sp...
Disables all collision geometry by stashing the geometry. If autoCleanup == True and we're not currently cleaning up, leave the exit event and collision sphere active for the largest(thus lowest) phase. This is so that we can still cleanup if the phase node exits the largest sp...
[ "Disables", "all", "collision", "geometry", "by", "stashing", "the", "geometry", ".", "If", "autoCleanup", "==", "True", "and", "we", "re", "not", "currently", "cleaning", "up", "leave", "the", "exit", "event", "and", "collision", "sphere", "active", "for", ...
def __disableCollisions(self, cleanup = False): """ Disables all collision geometry by stashing the geometry. If autoCleanup == True and we're not currently cleaning up, leave the exit event and collision sphere active for the largest(thus lowest) phase. This is so that...
[ "def", "__disableCollisions", "(", "self", ",", "cleanup", "=", "False", ")", ":", "for", "x", ",", "sphere", "in", "enumerate", "(", "self", ".", "_colSpheres", ")", ":", "phaseName", "=", "self", ".", "getPhaseAlias", "(", "x", ")", "self", ".", "ign...
https://github.com/panda3d/panda3d/blob/833ad89ebad58395d0af0b7ec08538e5e4308265/direct/src/showbase/DistancePhasedNode.py#L214-L228
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python3/src/Lib/inspect.py
python
_signature_from_builtin
(cls, func, skip_bound_arg=True)
return _signature_fromstr(cls, func, s, skip_bound_arg)
Private helper function to get signature for builtin callables.
Private helper function to get signature for builtin callables.
[ "Private", "helper", "function", "to", "get", "signature", "for", "builtin", "callables", "." ]
def _signature_from_builtin(cls, func, skip_bound_arg=True): """Private helper function to get signature for builtin callables. """ if not _signature_is_builtin(func): raise TypeError("{!r} is not a Python builtin " "function".format(func)) s = getattr(func, "__text...
[ "def", "_signature_from_builtin", "(", "cls", ",", "func", ",", "skip_bound_arg", "=", "True", ")", ":", "if", "not", "_signature_is_builtin", "(", "func", ")", ":", "raise", "TypeError", "(", "\"{!r} is not a Python builtin \"", "\"function\"", ".", "format", "("...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python3/src/Lib/inspect.py#L2136-L2149
NeoGeographyToolkit/StereoPipeline
eedf54a919fb5cce1ab0e280bb0df4050763aa11
src/asp/IceBridge/regenerate_summary_images.py
python
sendEmail
(address, subject, body)
Send a simple email from the command line
Send a simple email from the command line
[ "Send", "a", "simple", "email", "from", "the", "command", "line" ]
def sendEmail(address, subject, body): '''Send a simple email from the command line''' # Remove any quotes, as that confuses the command line. subject = subject.replace("\"", "") body = body.replace("\"", "") try: cmd = 'mail -s "' + subject + '" ' + address + ' <<< "' + body + '"' ...
[ "def", "sendEmail", "(", "address", ",", "subject", ",", "body", ")", ":", "# Remove any quotes, as that confuses the command line.", "subject", "=", "subject", ".", "replace", "(", "\"\\\"\"", ",", "\"\"", ")", "body", "=", "body", ".", "replace", "(", "\"\\\"\...
https://github.com/NeoGeographyToolkit/StereoPipeline/blob/eedf54a919fb5cce1ab0e280bb0df4050763aa11/src/asp/IceBridge/regenerate_summary_images.py#L103-L113
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
third_party/pymock/mock.py
python
_patch.stop
(self)
return self.__exit__()
Stop an active patch.
Stop an active patch.
[ "Stop", "an", "active", "patch", "." ]
def stop(self): """Stop an active patch.""" self._active_patches.discard(self) return self.__exit__()
[ "def", "stop", "(", "self", ")", ":", "self", ".", "_active_patches", ".", "discard", "(", "self", ")", "return", "self", ".", "__exit__", "(", ")" ]
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/third_party/pymock/mock.py#L1401-L1404
hughperkins/tf-coriander
970d3df6c11400ad68405f22b0c42a52374e94ca
tensorflow/python/framework/device.py
python
DeviceSpec.from_string
(spec)
return DeviceSpec().parse_from_string(spec)
Construct a `DeviceSpec` from a string. Args: spec: a string of the form /job:<name>/replica:<id>/task:<id>/device:CPU:<id> or /job:<name>/replica:<id>/task:<id>/device:GPU:<id> as cpu and gpu are mutually exclusive. All entries are optional. Returns: A DeviceSpec.
Construct a `DeviceSpec` from a string.
[ "Construct", "a", "DeviceSpec", "from", "a", "string", "." ]
def from_string(spec): """Construct a `DeviceSpec` from a string. Args: spec: a string of the form /job:<name>/replica:<id>/task:<id>/device:CPU:<id> or /job:<name>/replica:<id>/task:<id>/device:GPU:<id> as cpu and gpu are mutually exclusive. All entries are optional. ...
[ "def", "from_string", "(", "spec", ")", ":", "return", "DeviceSpec", "(", ")", ".", "parse_from_string", "(", "spec", ")" ]
https://github.com/hughperkins/tf-coriander/blob/970d3df6c11400ad68405f22b0c42a52374e94ca/tensorflow/python/framework/device.py#L214-L228
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/_pydecimal.py
python
Context.sqrt
(self, a)
return a.sqrt(context=self)
Square root of a non-negative number to context precision. If the result must be inexact, it is rounded using the round-half-even algorithm. >>> ExtendedContext.sqrt(Decimal('0')) Decimal('0') >>> ExtendedContext.sqrt(Decimal('-0')) Decimal('-0') >>> ExtendedCon...
Square root of a non-negative number to context precision.
[ "Square", "root", "of", "a", "non", "-", "negative", "number", "to", "context", "precision", "." ]
def sqrt(self, a): """Square root of a non-negative number to context precision. If the result must be inexact, it is rounded using the round-half-even algorithm. >>> ExtendedContext.sqrt(Decimal('0')) Decimal('0') >>> ExtendedContext.sqrt(Decimal('-0')) Decimal...
[ "def", "sqrt", "(", "self", ",", "a", ")", ":", "a", "=", "_convert_other", "(", "a", ",", "raiseit", "=", "True", ")", "return", "a", ".", "sqrt", "(", "context", "=", "self", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/_pydecimal.py#L5461-L5491
kamyu104/LeetCode-Solutions
77605708a927ea3b85aee5a479db733938c7c211
Python/subarray-sum-equals-k.py
python
Solution.subarraySum
(self, nums, k)
return result
:type nums: List[int] :type k: int :rtype: int
:type nums: List[int] :type k: int :rtype: int
[ ":", "type", "nums", ":", "List", "[", "int", "]", ":", "type", "k", ":", "int", ":", "rtype", ":", "int" ]
def subarraySum(self, nums, k): """ :type nums: List[int] :type k: int :rtype: int """ result = 0 accumulated_sum = 0 lookup = collections.defaultdict(int) lookup[0] += 1 for num in nums: accumulated_sum += num resul...
[ "def", "subarraySum", "(", "self", ",", "nums", ",", "k", ")", ":", "result", "=", "0", "accumulated_sum", "=", "0", "lookup", "=", "collections", ".", "defaultdict", "(", "int", ")", "lookup", "[", "0", "]", "+=", "1", "for", "num", "in", "nums", ...
https://github.com/kamyu104/LeetCode-Solutions/blob/77605708a927ea3b85aee5a479db733938c7c211/Python/subarray-sum-equals-k.py#L8-L22
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/logging/handlers.py
python
SocketHandler.makePickle
(self, record)
return slen + s
Pickles the record in binary format with a length prefix, and returns it ready for transmission across the socket.
Pickles the record in binary format with a length prefix, and returns it ready for transmission across the socket.
[ "Pickles", "the", "record", "in", "binary", "format", "with", "a", "length", "prefix", "and", "returns", "it", "ready", "for", "transmission", "across", "the", "socket", "." ]
def makePickle(self, record): """ Pickles the record in binary format with a length prefix, and returns it ready for transmission across the socket. """ ei = record.exc_info if ei: # just to get traceback text into record.exc_text ... dummy = self....
[ "def", "makePickle", "(", "self", ",", "record", ")", ":", "ei", "=", "record", ".", "exc_info", "if", "ei", ":", "# just to get traceback text into record.exc_text ...", "dummy", "=", "self", ".", "format", "(", "record", ")", "# See issue #14436: If msg or args ar...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/logging/handlers.py#L585-L605
weolar/miniblink49
1c4678db0594a4abde23d3ebbcc7cd13c3170777
third_party/jinja2/environment.py
python
Template.new_context
(self, vars=None, shared=False, locals=None)
return new_context(self.environment, self.name, self.blocks, vars, shared, self.globals, locals)
Create a new :class:`Context` for this template. The vars provided will be passed to the template. Per default the globals are added to the context. If shared is set to `True` the data is passed as it to the context without adding the globals. `locals` can be a dict of local variable...
Create a new :class:`Context` for this template. The vars provided will be passed to the template. Per default the globals are added to the context. If shared is set to `True` the data is passed as it to the context without adding the globals.
[ "Create", "a", "new", ":", "class", ":", "Context", "for", "this", "template", ".", "The", "vars", "provided", "will", "be", "passed", "to", "the", "template", ".", "Per", "default", "the", "globals", "are", "added", "to", "the", "context", ".", "If", ...
def new_context(self, vars=None, shared=False, locals=None): """Create a new :class:`Context` for this template. The vars provided will be passed to the template. Per default the globals are added to the context. If shared is set to `True` the data is passed as it to the context witho...
[ "def", "new_context", "(", "self", ",", "vars", "=", "None", ",", "shared", "=", "False", ",", "locals", "=", "None", ")", ":", "return", "new_context", "(", "self", ".", "environment", ",", "self", ".", "name", ",", "self", ".", "blocks", ",", "vars...
https://github.com/weolar/miniblink49/blob/1c4678db0594a4abde23d3ebbcc7cd13c3170777/third_party/jinja2/environment.py#L995-L1004
ChromiumWebApps/chromium
c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7
build/android/gyp/generate_v14_compatible_resources.py
python
ErrorIfStyleResourceExistsInDir
(input_dir)
If a style resource is in input_dir, raises an exception.
If a style resource is in input_dir, raises an exception.
[ "If", "a", "style", "resource", "is", "in", "input_dir", "raises", "an", "exception", "." ]
def ErrorIfStyleResourceExistsInDir(input_dir): """If a style resource is in input_dir, raises an exception.""" for input_filename in build_utils.FindInDirectory(input_dir, '*.xml'): dom = minidom.parse(input_filename) if HasStyleResource(dom): raise Exception('error: style file ' + input_filename + ...
[ "def", "ErrorIfStyleResourceExistsInDir", "(", "input_dir", ")", ":", "for", "input_filename", "in", "build_utils", ".", "FindInDirectory", "(", "input_dir", ",", "'*.xml'", ")", ":", "dom", "=", "minidom", ".", "parse", "(", "input_filename", ")", "if", "HasSty...
https://github.com/ChromiumWebApps/chromium/blob/c7361d39be8abd1574e6ce8957c8dbddd4c6ccf7/build/android/gyp/generate_v14_compatible_resources.py#L100-L108
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_core.py
python
CallLater.Notify
(self)
The timer has expired so call the callable.
The timer has expired so call the callable.
[ "The", "timer", "has", "expired", "so", "call", "the", "callable", "." ]
def Notify(self): """ The timer has expired so call the callable. """ if self.callable and getattr(self.callable, 'im_self', True): self.runCount += 1 self.running = False self.result = self.callable(*self.args, **self.kwargs) self.hasRun = Tru...
[ "def", "Notify", "(", "self", ")", ":", "if", "self", ".", "callable", "and", "getattr", "(", "self", ".", "callable", ",", "'im_self'", ",", "True", ")", ":", "self", ".", "runCount", "+=", "1", "self", ".", "running", "=", "False", "self", ".", "...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_core.py#L16866-L16877
jiangxiluning/FOTS.PyTorch
b1851c170b4f1ad18406766352cb5171648ce603
FOTS/utils/eval_tools/icdar2015/eval.py
python
evaluate_method
(pred: Tuple[dict], gt: Tuple[dict], evaluationParams:dict)
return resDict
Method evaluate_method: evaluate method and returns the results Results. Dictionary with the following values: - method (required) Global method metrics. Ex: { 'Precision':0.8,'Recall':0.9 } - samples (optional) Per sample metrics. Ex: {'sample1' : { 'Precision':0.8,'Recall':0.9 } , 'sample2' :...
Method evaluate_method: evaluate method and returns the results Results. Dictionary with the following values: - method (required) Global method metrics. Ex: { 'Precision':0.8,'Recall':0.9 } - samples (optional) Per sample metrics. Ex: {'sample1' : { 'Precision':0.8,'Recall':0.9 } , 'sample2' :...
[ "Method", "evaluate_method", ":", "evaluate", "method", "and", "returns", "the", "results", "Results", ".", "Dictionary", "with", "the", "following", "values", ":", "-", "method", "(", "required", ")", "Global", "method", "metrics", ".", "Ex", ":", "{", "Pre...
def evaluate_method(pred: Tuple[dict], gt: Tuple[dict], evaluationParams:dict) -> dict: """ Method evaluate_method: evaluate method and returns the results Results. Dictionary with the following values: - method (required) Global method metrics. Ex: { 'Precision':0.8,'Recall':0.9 } - sa...
[ "def", "evaluate_method", "(", "pred", ":", "Tuple", "[", "dict", "]", ",", "gt", ":", "Tuple", "[", "dict", "]", ",", "evaluationParams", ":", "dict", ")", "->", "dict", ":", "def", "polygon_from_points", "(", "points", ",", "correctOffset", "=", "False...
https://github.com/jiangxiluning/FOTS.PyTorch/blob/b1851c170b4f1ad18406766352cb5171648ce603/FOTS/utils/eval_tools/icdar2015/eval.py#L61-L447
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/third_party/lib_x86_64/python2.7/dist-packages/yaml/__init__.py
python
safe_dump
(data, stream=None, **kwds)
return dump_all([data], stream, Dumper=SafeDumper, **kwds)
Serialize a Python object into a YAML stream. Produce only basic YAML tags. If stream is None, return the produced string instead.
Serialize a Python object into a YAML stream. Produce only basic YAML tags. If stream is None, return the produced string instead.
[ "Serialize", "a", "Python", "object", "into", "a", "YAML", "stream", ".", "Produce", "only", "basic", "YAML", "tags", ".", "If", "stream", "is", "None", "return", "the", "produced", "string", "instead", "." ]
def safe_dump(data, stream=None, **kwds): """ Serialize a Python object into a YAML stream. Produce only basic YAML tags. If stream is None, return the produced string instead. """ return dump_all([data], stream, Dumper=SafeDumper, **kwds)
[ "def", "safe_dump", "(", "data", ",", "stream", "=", "None", ",", "*", "*", "kwds", ")", ":", "return", "dump_all", "(", "[", "data", "]", ",", "stream", ",", "Dumper", "=", "SafeDumper", ",", "*", "*", "kwds", ")" ]
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/third_party/lib_x86_64/python2.7/dist-packages/yaml/__init__.py#L212-L218
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python/src/Lib/optparse.py
python
OptionParser.enable_interspersed_args
(self)
Set parsing to not stop on the first non-option, allowing interspersing switches with command arguments. This is the default behavior. See also disable_interspersed_args() and the class documentation description of the attribute allow_interspersed_args.
Set parsing to not stop on the first non-option, allowing interspersing switches with command arguments. This is the default behavior. See also disable_interspersed_args() and the class documentation description of the attribute allow_interspersed_args.
[ "Set", "parsing", "to", "not", "stop", "on", "the", "first", "non", "-", "option", "allowing", "interspersing", "switches", "with", "command", "arguments", ".", "This", "is", "the", "default", "behavior", ".", "See", "also", "disable_interspersed_args", "()", ...
def enable_interspersed_args(self): """Set parsing to not stop on the first non-option, allowing interspersing switches with command arguments. This is the default behavior. See also disable_interspersed_args() and the class documentation description of the attribute allow_inters...
[ "def", "enable_interspersed_args", "(", "self", ")", ":", "self", ".", "allow_interspersed_args", "=", "True" ]
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python/src/Lib/optparse.py#L1288-L1294
apache/incubator-mxnet
f03fb23f1d103fec9541b5ae59ee06b1734a51d9
python/mxnet/ndarray/numpy/_op.py
python
exp
(x, out=None, **kwargs)
return _pure_unary_func_helper(x, _api_internal.exp, _np.exp, out=out, **kwargs)
r""" Calculate the exponential of all elements in the input array. Parameters ---------- x : ndarray or scalar Input values. out : ndarray or None, optional A location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not pro...
r""" Calculate the exponential of all elements in the input array.
[ "r", "Calculate", "the", "exponential", "of", "all", "elements", "in", "the", "input", "array", "." ]
def exp(x, out=None, **kwargs): r""" Calculate the exponential of all elements in the input array. Parameters ---------- x : ndarray or scalar Input values. out : ndarray or None, optional A location into which the result is stored. If provided, it must have a shape that...
[ "def", "exp", "(", "x", ",", "out", "=", "None", ",", "*", "*", "kwargs", ")", ":", "return", "_pure_unary_func_helper", "(", "x", ",", "_api_internal", ".", "exp", ",", "_np", ".", "exp", ",", "out", "=", "out", ",", "*", "*", "kwargs", ")" ]
https://github.com/apache/incubator-mxnet/blob/f03fb23f1d103fec9541b5ae59ee06b1734a51d9/python/mxnet/ndarray/numpy/_op.py#L2976-L3003
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_windows.py
python
SplitterWindow.UpdateSize
(*args, **kwargs)
return _windows_.SplitterWindow_UpdateSize(*args, **kwargs)
UpdateSize(self) Causes any pending sizing of the sash and child panes to take place immediately. Such resizing normally takes place in idle time, in order to wait for layout to be completed. However, this can cause unacceptable flicker as the panes are resized after the window...
UpdateSize(self)
[ "UpdateSize", "(", "self", ")" ]
def UpdateSize(*args, **kwargs): """ UpdateSize(self) Causes any pending sizing of the sash and child panes to take place immediately. Such resizing normally takes place in idle time, in order to wait for layout to be completed. However, this can cause unacceptable flic...
[ "def", "UpdateSize", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_windows_", ".", "SplitterWindow_UpdateSize", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_windows.py#L1501-L1515
sdhash/sdhash
b9eff63e4e5867e910f41fd69032bbb1c94a2a5e
external/tools/build/v2/build/generators.py
python
reset
()
Clear the module state. This is mainly for testing purposes.
Clear the module state. This is mainly for testing purposes.
[ "Clear", "the", "module", "state", ".", "This", "is", "mainly", "for", "testing", "purposes", "." ]
def reset (): """ Clear the module state. This is mainly for testing purposes. """ global __generators, __type_to_generators, __generators_for_toolset, __construct_stack global __overrides, __active_generators global __viable_generators_cache, __viable_source_types_cache global __vstg_cached_gen...
[ "def", "reset", "(", ")", ":", "global", "__generators", ",", "__type_to_generators", ",", "__generators_for_toolset", ",", "__construct_stack", "global", "__overrides", ",", "__active_generators", "global", "__viable_generators_cache", ",", "__viable_source_types_cache", "...
https://github.com/sdhash/sdhash/blob/b9eff63e4e5867e910f41fd69032bbb1c94a2a5e/external/tools/build/v2/build/generators.py#L64-L84
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/telemetry/third_party/mox3/mox3/mox.py
python
MockMethod.GetPossibleGroup
(self)
return group
Returns a possible group from the end of the call queue. Return None if no other methods are on the stack.
Returns a possible group from the end of the call queue.
[ "Returns", "a", "possible", "group", "from", "the", "end", "of", "the", "call", "queue", "." ]
def GetPossibleGroup(self): """Returns a possible group from the end of the call queue. Return None if no other methods are on the stack. """ # Remove this method from the tail of the queue so we can add it # to a group. this_method = self._call_queue.pop() asse...
[ "def", "GetPossibleGroup", "(", "self", ")", ":", "# Remove this method from the tail of the queue so we can add it", "# to a group.", "this_method", "=", "self", ".", "_call_queue", ".", "pop", "(", ")", "assert", "this_method", "==", "self", "# Determine if the tail of th...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/telemetry/third_party/mox3/mox3/mox.py#L1217-L1236
google/angle
d5df233189cad620b8e0de653fe5e6cb778e209d
src/libANGLE/renderer/vulkan/gen_vk_format_table.py
python
verify_vk_map_keys
(angle_to_gl, vk_json_data)
return no_error
Verify that the keys in Vulkan format tables exist in the ANGLE table. If they don't, the entry in the Vulkan file is incorrect and needs to be fixed.
Verify that the keys in Vulkan format tables exist in the ANGLE table. If they don't, the entry in the Vulkan file is incorrect and needs to be fixed.
[ "Verify", "that", "the", "keys", "in", "Vulkan", "format", "tables", "exist", "in", "the", "ANGLE", "table", ".", "If", "they", "don", "t", "the", "entry", "in", "the", "Vulkan", "file", "is", "incorrect", "and", "needs", "to", "be", "fixed", "." ]
def verify_vk_map_keys(angle_to_gl, vk_json_data): """Verify that the keys in Vulkan format tables exist in the ANGLE table. If they don't, the entry in the Vulkan file is incorrect and needs to be fixed.""" no_error = True for table in ["map", "fallbacks"]: for angle_format in vk_json_data[ta...
[ "def", "verify_vk_map_keys", "(", "angle_to_gl", ",", "vk_json_data", ")", ":", "no_error", "=", "True", "for", "table", "in", "[", "\"map\"", ",", "\"fallbacks\"", "]", ":", "for", "angle_format", "in", "vk_json_data", "[", "table", "]", ".", "keys", "(", ...
https://github.com/google/angle/blob/d5df233189cad620b8e0de653fe5e6cb778e209d/src/libANGLE/renderer/vulkan/gen_vk_format_table.py#L116-L127
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/datetime.py
python
time.replace
(self, hour=None, minute=None, second=None, microsecond=None, tzinfo=True, *, fold=None)
return type(self)(hour, minute, second, microsecond, tzinfo, fold=fold)
Return a new time with new values for the specified fields.
Return a new time with new values for the specified fields.
[ "Return", "a", "new", "time", "with", "new", "values", "for", "the", "specified", "fields", "." ]
def replace(self, hour=None, minute=None, second=None, microsecond=None, tzinfo=True, *, fold=None): """Return a new time with new values for the specified fields.""" if hour is None: hour = self.hour if minute is None: minute = self.minute if seco...
[ "def", "replace", "(", "self", ",", "hour", "=", "None", ",", "minute", "=", "None", ",", "second", "=", "None", ",", "microsecond", "=", "None", ",", "tzinfo", "=", "True", ",", "*", ",", "fold", "=", "None", ")", ":", "if", "hour", "is", "None"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/datetime.py#L1452-L1467
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/urllib.py
python
thishost
()
return _thishost
Return the IP address of the current host.
Return the IP address of the current host.
[ "Return", "the", "IP", "address", "of", "the", "current", "host", "." ]
def thishost(): """Return the IP address of the current host.""" global _thishost if _thishost is None: _thishost = socket.gethostbyname(socket.gethostname()) return _thishost
[ "def", "thishost", "(", ")", ":", "global", "_thishost", "if", "_thishost", "is", "None", ":", "_thishost", "=", "socket", ".", "gethostbyname", "(", "socket", ".", "gethostname", "(", ")", ")", "return", "_thishost" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/urllib.py#L818-L823
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/singledispatch.py
python
singledispatch
(func)
return wrapper
Single-dispatch generic function decorator. Transforms a function into a generic function, which can have different behaviours depending upon the type of its first argument. The decorated function acts as the default implementation, and additional implementations can be registered using the register() ...
Single-dispatch generic function decorator.
[ "Single", "-", "dispatch", "generic", "function", "decorator", "." ]
def singledispatch(func): """Single-dispatch generic function decorator. Transforms a function into a generic function, which can have different behaviours depending upon the type of its first argument. The decorated function acts as the default implementation, and additional implementations can be...
[ "def", "singledispatch", "(", "func", ")", ":", "registry", "=", "{", "}", "dispatch_cache", "=", "WeakKeyDictionary", "(", ")", "def", "ns", "(", ")", ":", "pass", "ns", ".", "cache_token", "=", "None", "def", "dispatch", "(", "cls", ")", ":", "\"\"\"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/singledispatch.py#L158-L218
Komnomnomnom/swigibpy
cfd307fdbfaffabc69a2dc037538d7e34a8b8daf
swigibpy.py
python
EClient.reqContractDetails
(self, reqId, contract)
return _swigibpy.EClient_reqContractDetails(self, reqId, contract)
reqContractDetails(EClient self, int reqId, Contract contract)
reqContractDetails(EClient self, int reqId, Contract contract)
[ "reqContractDetails", "(", "EClient", "self", "int", "reqId", "Contract", "contract", ")" ]
def reqContractDetails(self, reqId, contract): """reqContractDetails(EClient self, int reqId, Contract contract)""" return _swigibpy.EClient_reqContractDetails(self, reqId, contract)
[ "def", "reqContractDetails", "(", "self", ",", "reqId", ",", "contract", ")", ":", "return", "_swigibpy", ".", "EClient_reqContractDetails", "(", "self", ",", "reqId", ",", "contract", ")" ]
https://github.com/Komnomnomnom/swigibpy/blob/cfd307fdbfaffabc69a2dc037538d7e34a8b8daf/swigibpy.py#L1160-L1162
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/ops/inplace_ops.py
python
_inplace_helper
(x, i, v, op)
return op(x, i, v)
Applies an inplace op on (x, i, v). op is one of gen_array_ops.alias_inplace_update, gen_array_ops.alias_inplace_add, or gen_array_ops.alias_inplace_sub. If i is None, x and v must be the same shape. Computes x op v; If i is a scalar, x has a rank 1 higher than v's. Computes x[i, :] op v; Otherwise,...
Applies an inplace op on (x, i, v).
[ "Applies", "an", "inplace", "op", "on", "(", "x", "i", "v", ")", "." ]
def _inplace_helper(x, i, v, op): """Applies an inplace op on (x, i, v). op is one of gen_array_ops.alias_inplace_update, gen_array_ops.alias_inplace_add, or gen_array_ops.alias_inplace_sub. If i is None, x and v must be the same shape. Computes x op v; If i is a scalar, x has a rank 1 higher than v's. ...
[ "def", "_inplace_helper", "(", "x", ",", "i", ",", "v", ",", "op", ")", ":", "x", "=", "ops", ".", "convert_to_tensor", "(", "x", ")", "v", "=", "ops", ".", "convert_to_tensor", "(", "v", ",", "x", ".", "dtype", ")", "if", "i", "is", "None", ":...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/ops/inplace_ops.py#L26-L60
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/setuptools/sandbox.py
python
AbstractSandbox._remap_pair
(self, operation, src, dst, *args, **kw)
return ( self._remap_input(operation + '-from', src, *args, **kw), self._remap_input(operation + '-to', dst, *args, **kw) )
Called for path pairs like rename, link, and symlink operations
Called for path pairs like rename, link, and symlink operations
[ "Called", "for", "path", "pairs", "like", "rename", "link", "and", "symlink", "operations" ]
def _remap_pair(self, operation, src, dst, *args, **kw): """Called for path pairs like rename, link, and symlink operations""" return ( self._remap_input(operation + '-from', src, *args, **kw), self._remap_input(operation + '-to', dst, *args, **kw) )
[ "def", "_remap_pair", "(", "self", ",", "operation", ",", "src", ",", "dst", ",", "*", "args", ",", "*", "*", "kw", ")", ":", "return", "(", "self", ".", "_remap_input", "(", "operation", "+", "'-from'", ",", "src", ",", "*", "args", ",", "*", "*...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/setuptools/sandbox.py#L368-L373
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/python/ops/sparse_ops.py
python
deserialize_many_sparse
(serialized_sparse, dtype, rank=None, name=None)
return sparse_tensor.SparseTensor(output_indices, output_values, output_shape)
Deserialize and concatenate `SparseTensors` from a serialized minibatch. The input `serialized_sparse` must be a string matrix of shape `[N x 3]` where `N` is the minibatch size and the rows correspond to packed outputs of `serialize_sparse`. The ranks of the original `SparseTensor` objects must all match. W...
Deserialize and concatenate `SparseTensors` from a serialized minibatch.
[ "Deserialize", "and", "concatenate", "SparseTensors", "from", "a", "serialized", "minibatch", "." ]
def deserialize_many_sparse(serialized_sparse, dtype, rank=None, name=None): """Deserialize and concatenate `SparseTensors` from a serialized minibatch. The input `serialized_sparse` must be a string matrix of shape `[N x 3]` where `N` is the minibatch size and the rows correspond to packed outputs of `seriali...
[ "def", "deserialize_many_sparse", "(", "serialized_sparse", ",", "dtype", ",", "rank", "=", "None", ",", "name", "=", "None", ")", ":", "output_indices", ",", "output_values", ",", "output_shape", "=", "(", "gen_sparse_ops", ".", "_deserialize_many_sparse", "(", ...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/python/ops/sparse_ops.py#L1435-L1501
kristjankorjus/Replicating-DeepMind
68539394e792b34a4d6b430a2eb73b8b8f91d8db
src/ai/NeuralNet.py
python
NeuralNet.train
(self, inputs, outputs)
return cost
Train neural net with inputs and outputs. @param inputs: NxM numpy.ndarray, where N is number of inputs and M is batch size @param outputs: KxM numpy.ndarray, where K is number of outputs and M is batch size @return cost?
Train neural net with inputs and outputs.
[ "Train", "neural", "net", "with", "inputs", "and", "outputs", "." ]
def train(self, inputs, outputs): """ Train neural net with inputs and outputs. @param inputs: NxM numpy.ndarray, where N is number of inputs and M is batch size @param outputs: KxM numpy.ndarray, where K is number of outputs and M is batch size @return cost? """ ...
[ "def", "train", "(", "self", ",", "inputs", ",", "outputs", ")", ":", "assert", "inputs", ".", "shape", "[", "0", "]", "==", "self", ".", "nr_inputs", "assert", "outputs", ".", "shape", "[", "0", "]", "==", "self", ".", "nr_outputs", "assert", "input...
https://github.com/kristjankorjus/Replicating-DeepMind/blob/68539394e792b34a4d6b430a2eb73b8b8f91d8db/src/ai/NeuralNet.py#L54-L72
kismetwireless/kismet
a7c0dc270c960fb1f58bd9cec4601c201885fd4e
capture_sdr_rtlamr/KismetCaptureRtlamr/kismetexternal/__init__.py
python
ExternalInterface.__init__
(self, config)
Initialize the external interface; interfaces launched by Kismet are mapped to a pipe passed via --in-fd and --out-fd arguments; remote interfaces are initialized with a host:port :return: nothing
Initialize the external interface; interfaces launched by Kismet are mapped to a pipe passed via --in-fd and --out-fd arguments; remote interfaces are initialized with a host:port
[ "Initialize", "the", "external", "interface", ";", "interfaces", "launched", "by", "Kismet", "are", "mapped", "to", "a", "pipe", "passed", "via", "--", "in", "-", "fd", "and", "--", "out", "-", "fd", "arguments", ";", "remote", "interfaces", "are", "initia...
def __init__(self, config): """ Initialize the external interface; interfaces launched by Kismet are mapped to a pipe passed via --in-fd and --out-fd arguments; remote interfaces are initialized with a host:port :return: nothing """ self.set_config(config) ...
[ "def", "__init__", "(", "self", ",", "config", ")", ":", "self", ".", "set_config", "(", "config", ")", "self", ".", "loop", "=", "asyncio", ".", "get_event_loop", "(", ")", "# Core task for forced cancelling", "self", ".", "main_io_task", "=", "None", "# An...
https://github.com/kismetwireless/kismet/blob/a7c0dc270c960fb1f58bd9cec4601c201885fd4e/capture_sdr_rtlamr/KismetCaptureRtlamr/kismetexternal/__init__.py#L53-L111
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/HFIR_4Circle_Reduction/reduce4circleControl.py
python
CWSCDReductionControl.get_raw_detector_counts
(self, exp_no, scan_no, pt_no)
return array2d
Get counts on raw detector :param exp_no: :param scan_no: :param pt_no: :return: boolean, 2D numpy data
Get counts on raw detector :param exp_no: :param scan_no: :param pt_no: :return: boolean, 2D numpy data
[ "Get", "counts", "on", "raw", "detector", ":", "param", "exp_no", ":", ":", "param", "scan_no", ":", ":", "param", "pt_no", ":", ":", "return", ":", "boolean", "2D", "numpy", "data" ]
def get_raw_detector_counts(self, exp_no, scan_no, pt_no): """ Get counts on raw detector :param exp_no: :param scan_no: :param pt_no: :return: boolean, 2D numpy data """ # Get workspace (in memory or loading) raw_ws = self.get_raw_data_workspace(e...
[ "def", "get_raw_detector_counts", "(", "self", ",", "exp_no", ",", "scan_no", ",", "pt_no", ")", ":", "# Get workspace (in memory or loading)", "raw_ws", "=", "self", ".", "get_raw_data_workspace", "(", "exp_no", ",", "scan_no", ",", "pt_no", ")", "if", "raw_ws", ...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/HFIR_4Circle_Reduction/reduce4circleControl.py#L1230-L1253
fatih/subvim
241b6d170597857105da219c9b7d36059e9f11fb
vim/base/YouCompleteMe/third_party/requests/requests/cookies.py
python
RequestsCookieJar.items
(self)
return items
Dict-like items() that returns a list of name-value tuples from the jar. See keys() and values(). Allows client-code to call "dict(RequestsCookieJar) and get a vanilla python dict of key value pairs.
Dict-like items() that returns a list of name-value tuples from the jar. See keys() and values(). Allows client-code to call "dict(RequestsCookieJar) and get a vanilla python dict of key value pairs.
[ "Dict", "-", "like", "items", "()", "that", "returns", "a", "list", "of", "name", "-", "value", "tuples", "from", "the", "jar", ".", "See", "keys", "()", "and", "values", "()", ".", "Allows", "client", "-", "code", "to", "call", "dict", "(", "Request...
def items(self): """Dict-like items() that returns a list of name-value tuples from the jar. See keys() and values(). Allows client-code to call "dict(RequestsCookieJar) and get a vanilla python dict of key value pairs.""" items = [] for cookie in iter(self): items.ap...
[ "def", "items", "(", "self", ")", ":", "items", "=", "[", "]", "for", "cookie", "in", "iter", "(", "self", ")", ":", "items", ".", "append", "(", "(", "cookie", ".", "name", ",", "cookie", ".", "value", ")", ")", "return", "items" ]
https://github.com/fatih/subvim/blob/241b6d170597857105da219c9b7d36059e9f11fb/vim/base/YouCompleteMe/third_party/requests/requests/cookies.py#L206-L213
tangzhenyu/Scene-Text-Understanding
0f7ffc7aea5971a50cdc03d33d0a41075285948b
SynthText_Chinese/gen_cartoon.py
python
get_data
()
return h5py.File(DB_FNAME,'r')
Download the image,depth and segmentation data: Returns, the h5 database.
Download the image,depth and segmentation data: Returns, the h5 database.
[ "Download", "the", "image", "depth", "and", "segmentation", "data", ":", "Returns", "the", "h5", "database", "." ]
def get_data(): """ Download the image,depth and segmentation data: Returns, the h5 database. """ if not osp.exists(DB_FNAME): try: colorprint(Color.BLUE,'\tdownloading data (56 M) from: '+DATA_URL,bold=True) print sys.stdout.flush() out_fname = 'data.tar.gz' wget.download(DA...
[ "def", "get_data", "(", ")", ":", "if", "not", "osp", ".", "exists", "(", "DB_FNAME", ")", ":", "try", ":", "colorprint", "(", "Color", ".", "BLUE", ",", "'\\tdownloading data (56 M) from: '", "+", "DATA_URL", ",", "bold", "=", "True", ")", "print", "sys...
https://github.com/tangzhenyu/Scene-Text-Understanding/blob/0f7ffc7aea5971a50cdc03d33d0a41075285948b/SynthText_Chinese/gen_cartoon.py#L38-L61
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pandas/py3/pandas/plotting/_misc.py
python
scatter_matrix
( frame, alpha=0.5, figsize=None, ax=None, grid=False, diagonal="hist", marker=".", density_kwds=None, hist_kwds=None, range_padding=0.05, **kwargs, )
return plot_backend.scatter_matrix( frame=frame, alpha=alpha, figsize=figsize, ax=ax, grid=grid, diagonal=diagonal, marker=marker, density_kwds=density_kwds, hist_kwds=hist_kwds, range_padding=range_padding, **kwargs, )
Draw a matrix of scatter plots. Parameters ---------- frame : DataFrame alpha : float, optional Amount of transparency applied. figsize : (float,float), optional A tuple (width, height) in inches. ax : Matplotlib axis object, optional grid : bool, optional Setting th...
Draw a matrix of scatter plots.
[ "Draw", "a", "matrix", "of", "scatter", "plots", "." ]
def scatter_matrix( frame, alpha=0.5, figsize=None, ax=None, grid=False, diagonal="hist", marker=".", density_kwds=None, hist_kwds=None, range_padding=0.05, **kwargs, ): """ Draw a matrix of scatter plots. Parameters ---------- frame : DataFrame alpha...
[ "def", "scatter_matrix", "(", "frame", ",", "alpha", "=", "0.5", ",", "figsize", "=", "None", ",", "ax", "=", "None", ",", "grid", "=", "False", ",", "diagonal", "=", "\"hist\"", ",", "marker", "=", "\".\"", ",", "density_kwds", "=", "None", ",", "hi...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pandas/py3/pandas/plotting/_misc.py#L72-L140
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/_controls.py
python
ToolBarBase.SetRows
(*args, **kwargs)
return _controls_.ToolBarBase_SetRows(*args, **kwargs)
SetRows(self, int nRows)
SetRows(self, int nRows)
[ "SetRows", "(", "self", "int", "nRows", ")" ]
def SetRows(*args, **kwargs): """SetRows(self, int nRows)""" return _controls_.ToolBarBase_SetRows(*args, **kwargs)
[ "def", "SetRows", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "ToolBarBase_SetRows", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/_controls.py#L3871-L3873
glotzerlab/hoomd-blue
f7f97abfa3fcc2522fa8d458d65d0aeca7ba781a
hoomd/data/typeparam.py
python
TypeParameter.__setitem__
(self, key, value)
Set parameters by key.
Set parameters by key.
[ "Set", "parameters", "by", "key", "." ]
def __setitem__(self, key, value): """Set parameters by key.""" self.param_dict[key] = value
[ "def", "__setitem__", "(", "self", ",", "key", ",", "value", ")", ":", "self", ".", "param_dict", "[", "key", "]", "=", "value" ]
https://github.com/glotzerlab/hoomd-blue/blob/f7f97abfa3fcc2522fa8d458d65d0aeca7ba781a/hoomd/data/typeparam.py#L143-L145
GoSSIP-SJTU/Armariris
ad5d868482956b2194a77b39c8d543c7c2318200
tools/clang/bindings/python/clang/cindex.py
python
CompilationDatabase.getAllCompileCommands
(self)
return conf.lib.clang_CompilationDatabase_getAllCompileCommands(self)
Get an iterable object providing all the CompileCommands available from the database.
Get an iterable object providing all the CompileCommands available from the database.
[ "Get", "an", "iterable", "object", "providing", "all", "the", "CompileCommands", "available", "from", "the", "database", "." ]
def getAllCompileCommands(self): """ Get an iterable object providing all the CompileCommands available from the database. """ return conf.lib.clang_CompilationDatabase_getAllCompileCommands(self)
[ "def", "getAllCompileCommands", "(", "self", ")", ":", "return", "conf", ".", "lib", ".", "clang_CompilationDatabase_getAllCompileCommands", "(", "self", ")" ]
https://github.com/GoSSIP-SJTU/Armariris/blob/ad5d868482956b2194a77b39c8d543c7c2318200/tools/clang/bindings/python/clang/cindex.py#L2840-L2845
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py3/numpy/polynomial/hermite_e.py
python
hermeder
(c, m=1, scl=1, axis=0)
return c
Differentiate a Hermite_e series. Returns the series coefficients `c` differentiated `m` times along `axis`. At each iteration the result is multiplied by `scl` (the scaling factor is for use in a linear change of variable). The argument `c` is an array of coefficients from low to high degree along ea...
Differentiate a Hermite_e series.
[ "Differentiate", "a", "Hermite_e", "series", "." ]
def hermeder(c, m=1, scl=1, axis=0): """ Differentiate a Hermite_e series. Returns the series coefficients `c` differentiated `m` times along `axis`. At each iteration the result is multiplied by `scl` (the scaling factor is for use in a linear change of variable). The argument `c` is an array...
[ "def", "hermeder", "(", "c", ",", "m", "=", "1", ",", "scl", "=", "1", ",", "axis", "=", "0", ")", ":", "c", "=", "np", ".", "array", "(", "c", ",", "ndmin", "=", "1", ",", "copy", "=", "True", ")", "if", "c", ".", "dtype", ".", "char", ...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py3/numpy/polynomial/hermite_e.py#L590-L670