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
pytorch/pytorch
7176c92687d3cc847cc046bf002269c6949a21c2
torch/distributed/pipeline/sync/skip/portal.py
python
Portal.put_grad
(self, grad: Tensor)
Stores a gradient into this portal.
Stores a gradient into this portal.
[ "Stores", "a", "gradient", "into", "this", "portal", "." ]
def put_grad(self, grad: Tensor) -> None: """Stores a gradient into this portal.""" self.grad = grad
[ "def", "put_grad", "(", "self", ",", "grad", ":", "Tensor", ")", "->", "None", ":", "self", ".", "grad", "=", "grad" ]
https://github.com/pytorch/pytorch/blob/7176c92687d3cc847cc046bf002269c6949a21c2/torch/distributed/pipeline/sync/skip/portal.py#L140-L142
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/XRCed/component.py
python
Container.isSizer
(self)
return False
If this container manages children positions and sizes.
If this container manages children positions and sizes.
[ "If", "this", "container", "manages", "children", "positions", "and", "sizes", "." ]
def isSizer(self): '''If this container manages children positions and sizes.''' return False
[ "def", "isSizer", "(", "self", ")", ":", "return", "False" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/XRCed/component.py#L372-L374
bairdzhang/smallhardface
76fa1d87a9602d9b13d7a7fe693fc7aec91cab80
caffe/python/caffe/io.py
python
load_image
(filename, color=True)
return img
Load an image converting from grayscale or alpha as needed. Parameters ---------- filename : string color : boolean flag for color format. True (default) loads as RGB while False loads as intensity (if image is already grayscale). Returns ------- image : an image with type ...
Load an image converting from grayscale or alpha as needed.
[ "Load", "an", "image", "converting", "from", "grayscale", "or", "alpha", "as", "needed", "." ]
def load_image(filename, color=True): """ Load an image converting from grayscale or alpha as needed. Parameters ---------- filename : string color : boolean flag for color format. True (default) loads as RGB while False loads as intensity (if image is already grayscale). R...
[ "def", "load_image", "(", "filename", ",", "color", "=", "True", ")", ":", "img", "=", "skimage", ".", "img_as_float", "(", "skimage", ".", "io", ".", "imread", "(", "filename", ",", "as_grey", "=", "not", "color", ")", ")", ".", "astype", "(", "np",...
https://github.com/bairdzhang/smallhardface/blob/76fa1d87a9602d9b13d7a7fe693fc7aec91cab80/caffe/python/caffe/io.py#L279-L303
PrincetonUniversity/athena-public-version
9c266692b9423743d8e23509b3ab266a232a92d2
tst/style/cpplint.py
python
CleansedLines.NumLines
(self)
return self.num_lines
Returns the number of lines represented.
Returns the number of lines represented.
[ "Returns", "the", "number", "of", "lines", "represented", "." ]
def NumLines(self): """Returns the number of lines represented.""" return self.num_lines
[ "def", "NumLines", "(", "self", ")", ":", "return", "self", ".", "num_lines" ]
https://github.com/PrincetonUniversity/athena-public-version/blob/9c266692b9423743d8e23509b3ab266a232a92d2/tst/style/cpplint.py#L1678-L1680
abforce/xposed_art_n
ec3fbe417d74d4664cec053d91dd4e3881176374
tools/cpplint.py
python
_NestingState.SeenOpenBrace
(self)
return (not self.stack) or self.stack[-1].seen_open_brace
Check if we have seen the opening brace for the innermost block. Returns: True if we have seen the opening brace, False if the innermost block is still expecting an opening brace.
Check if we have seen the opening brace for the innermost block.
[ "Check", "if", "we", "have", "seen", "the", "opening", "brace", "for", "the", "innermost", "block", "." ]
def SeenOpenBrace(self): """Check if we have seen the opening brace for the innermost block. Returns: True if we have seen the opening brace, False if the innermost block is still expecting an opening brace. """ return (not self.stack) or self.stack[-1].seen_open_brace
[ "def", "SeenOpenBrace", "(", "self", ")", ":", "return", "(", "not", "self", ".", "stack", ")", "or", "self", ".", "stack", "[", "-", "1", "]", ".", "seen_open_brace" ]
https://github.com/abforce/xposed_art_n/blob/ec3fbe417d74d4664cec053d91dd4e3881176374/tools/cpplint.py#L1543-L1550
nsnam/ns-3-dev-git
efdb2e21f45c0a87a60b47c547b68fa140a7b686
src/visualizer/visualizer/plugins/interface_statistics.py
python
StatisticsCollector.__init__
(self, visualizer)
! Collects interface statistics for all nodes. @param self this object @param visualizer visualizer object
! Collects interface statistics for all nodes.
[ "!", "Collects", "interface", "statistics", "for", "all", "nodes", "." ]
def __init__(self, visualizer): """! Collects interface statistics for all nodes. @param self this object @param visualizer visualizer object """ self.node_statistics = {} # nodeid -> list(raw statistics) self.visualizer = visualizer
[ "def", "__init__", "(", "self", ",", "visualizer", ")", ":", "self", ".", "node_statistics", "=", "{", "}", "# nodeid -> list(raw statistics)", "self", ".", "visualizer", "=", "visualizer" ]
https://github.com/nsnam/ns-3-dev-git/blob/efdb2e21f45c0a87a60b47c547b68fa140a7b686/src/visualizer/visualizer/plugins/interface_statistics.py#L25-L32
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/fluid/layers/control_flow.py
python
equal
(x, y, cond=None, name=None)
return cond
This layer returns the truth value of :math:`x == y` elementwise. Args: x(Variable): Tensor, data type is float32, float64, int32, int64. y(Variable): Tensor, data type is float32, float64, int32, int64. cond(Variable, optional): Optional output which can be any created Variabl...
This layer returns the truth value of :math:`x == y` elementwise.
[ "This", "layer", "returns", "the", "truth", "value", "of", ":", "math", ":", "x", "==", "y", "elementwise", "." ]
def equal(x, y, cond=None, name=None): """ This layer returns the truth value of :math:`x == y` elementwise. Args: x(Variable): Tensor, data type is float32, float64, int32, int64. y(Variable): Tensor, data type is float32, float64, int32, int64. cond(Variable, optional): Optional o...
[ "def", "equal", "(", "x", ",", "y", ",", "cond", "=", "None", ",", "name", "=", "None", ")", ":", "check_variable_and_dtype", "(", "x", ",", "\"x\"", ",", "[", "\"float32\"", ",", "\"float64\"", ",", "\"int32\"", ",", "\"int64\"", "]", ",", "\"equal\""...
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/fluid/layers/control_flow.py#L1847-L1891
liulei01/DRBox
b5c76e033c555c9009590ab384e1f7bd3c66c237
scripts/cpp_lint.py
python
_SetOutputFormat
(output_format)
Sets the module's output format.
Sets the module's output format.
[ "Sets", "the", "module", "s", "output", "format", "." ]
def _SetOutputFormat(output_format): """Sets the module's output format.""" _cpplint_state.SetOutputFormat(output_format)
[ "def", "_SetOutputFormat", "(", "output_format", ")", ":", "_cpplint_state", ".", "SetOutputFormat", "(", "output_format", ")" ]
https://github.com/liulei01/DRBox/blob/b5c76e033c555c9009590ab384e1f7bd3c66c237/scripts/cpp_lint.py#L772-L774
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/gsutil/third_party/boto/boto/kinesis/layer1.py
python
KinesisConnection.merge_shards
(self, stream_name, shard_to_merge, adjacent_shard_to_merge)
return self.make_request(action='MergeShards', body=json.dumps(params))
Merges two adjacent shards in a stream and combines them into a single shard to reduce the stream's capacity to ingest and transport data. Two shards are considered adjacent if the union of the hash key ranges for the two shards form a contiguous set with no gaps. For example, if you hav...
Merges two adjacent shards in a stream and combines them into a single shard to reduce the stream's capacity to ingest and transport data. Two shards are considered adjacent if the union of the hash key ranges for the two shards form a contiguous set with no gaps. For example, if you hav...
[ "Merges", "two", "adjacent", "shards", "in", "a", "stream", "and", "combines", "them", "into", "a", "single", "shard", "to", "reduce", "the", "stream", "s", "capacity", "to", "ingest", "and", "transport", "data", ".", "Two", "shards", "are", "considered", ...
def merge_shards(self, stream_name, shard_to_merge, adjacent_shard_to_merge): """ Merges two adjacent shards in a stream and combines them into a single shard to reduce the stream's capacity to ingest and transport data. Two shards are considered adjacent if the ...
[ "def", "merge_shards", "(", "self", ",", "stream_name", ",", "shard_to_merge", ",", "adjacent_shard_to_merge", ")", ":", "params", "=", "{", "'StreamName'", ":", "stream_name", ",", "'ShardToMerge'", ":", "shard_to_merge", ",", "'AdjacentShardToMerge'", ":", "adjace...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/third_party/boto/boto/kinesis/layer1.py#L491-L557
whai362/PSENet
4d95395658662f2223805c36dcd573d9e190ce26
eval/tt_rec/rrc_evaluation_funcs_1_1.py
python
get_tl_line_values
(line,LTRB=True,withTranscription=False,withConfidence=False,imWidth=0,imHeight=0)
return points,confidence,transcription
Validate the format of the line. If the line is not valid an exception will be raised. If maxWidth and maxHeight are specified, all points must be inside the imgage bounds. Posible values are: LTRB=True: xmin,ymin,xmax,ymax[,confidence][,transcription] LTRB=False: x1,y1,x2,y2,x3,y3,x4,y4[,confidence][,...
Validate the format of the line. If the line is not valid an exception will be raised. If maxWidth and maxHeight are specified, all points must be inside the imgage bounds. Posible values are: LTRB=True: xmin,ymin,xmax,ymax[,confidence][,transcription] LTRB=False: x1,y1,x2,y2,x3,y3,x4,y4[,confidence][,...
[ "Validate", "the", "format", "of", "the", "line", ".", "If", "the", "line", "is", "not", "valid", "an", "exception", "will", "be", "raised", ".", "If", "maxWidth", "and", "maxHeight", "are", "specified", "all", "points", "must", "be", "inside", "the", "i...
def get_tl_line_values(line,LTRB=True,withTranscription=False,withConfidence=False,imWidth=0,imHeight=0): """ Validate the format of the line. If the line is not valid an exception will be raised. If maxWidth and maxHeight are specified, all points must be inside the imgage bounds. Posible values are: ...
[ "def", "get_tl_line_values", "(", "line", ",", "LTRB", "=", "True", ",", "withTranscription", "=", "False", ",", "withConfidence", "=", "False", ",", "imWidth", "=", "0", ",", "imHeight", "=", "0", ")", ":", "confidence", "=", "0.0", "transcription", "=", ...
https://github.com/whai362/PSENet/blob/4d95395658662f2223805c36dcd573d9e190ce26/eval/tt_rec/rrc_evaluation_funcs_1_1.py#L122-L219
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/extern/pubsub.py
python
PublisherClass.isSubscribed
(self, listener, topic=None)
return self.__topicTree.isSubscribed(listener, topic)
Return true if listener has subscribed to topic specified. If no topic specified, return true if subscribed to something. Use topic=getStrAllTopics() to determine if a listener will receive messages for all topics.
Return true if listener has subscribed to topic specified. If no topic specified, return true if subscribed to something. Use topic=getStrAllTopics() to determine if a listener will receive messages for all topics.
[ "Return", "true", "if", "listener", "has", "subscribed", "to", "topic", "specified", ".", "If", "no", "topic", "specified", "return", "true", "if", "subscribed", "to", "something", ".", "Use", "topic", "=", "getStrAllTopics", "()", "to", "determine", "if", "...
def isSubscribed(self, listener, topic=None): """Return true if listener has subscribed to topic specified. If no topic specified, return true if subscribed to something. Use topic=getStrAllTopics() to determine if a listener will receive messages for all topics.""" return self...
[ "def", "isSubscribed", "(", "self", ",", "listener", ",", "topic", "=", "None", ")", ":", "return", "self", ".", "__topicTree", ".", "isSubscribed", "(", "listener", ",", "topic", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/extern/pubsub.py#L685-L690
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/dbm/dumb.py
python
open
(file, flag='c', mode=0o666)
return _Database(file, mode, flag=flag)
Open the database file, filename, and return corresponding object. The flag argument, used to control how the database is opened in the other DBM implementations, supports only the semantics of 'c' and 'n' values. Other values will default to the semantics of 'c' value: the database will always opened...
Open the database file, filename, and return corresponding object.
[ "Open", "the", "database", "file", "filename", "and", "return", "corresponding", "object", "." ]
def open(file, flag='c', mode=0o666): """Open the database file, filename, and return corresponding object. The flag argument, used to control how the database is opened in the other DBM implementations, supports only the semantics of 'c' and 'n' values. Other values will default to the semantics of '...
[ "def", "open", "(", "file", ",", "flag", "=", "'c'", ",", "mode", "=", "0o666", ")", ":", "# Modify mode depending on the umask", "try", ":", "um", "=", "_os", ".", "umask", "(", "0", ")", "_os", ".", "umask", "(", "um", ")", "except", "AttributeError"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/dbm/dumb.py#L301-L329
Kitware/ParaView
f760af9124ff4634b23ebbeab95a4f56e0261955
Wrapping/Python/paraview/smtrace.py
python
Trace.get_varname
(cls, name)
return name
returns an unique variable name given a suggested variable name. If the suggested variable name is already taken, this method will try to find a good suffix that's available.
returns an unique variable name given a suggested variable name. If the suggested variable name is already taken, this method will try to find a good suffix that's available.
[ "returns", "an", "unique", "variable", "name", "given", "a", "suggested", "variable", "name", ".", "If", "the", "suggested", "variable", "name", "is", "already", "taken", "this", "method", "will", "try", "to", "find", "a", "good", "suffix", "that", "s", "a...
def get_varname(cls, name): """returns an unique variable name given a suggested variable name. If the suggested variable name is already taken, this method will try to find a good suffix that's available.""" name = sm._make_name_valid(name) name = name[0].lower() + name[1:] ...
[ "def", "get_varname", "(", "cls", ",", "name", ")", ":", "name", "=", "sm", ".", "_make_name_valid", "(", "name", ")", "name", "=", "name", "[", "0", "]", ".", "lower", "(", ")", "+", "name", "[", "1", ":", "]", "original_name", "=", "name", "suf...
https://github.com/Kitware/ParaView/blob/f760af9124ff4634b23ebbeab95a4f56e0261955/Wrapping/Python/paraview/smtrace.py#L139-L152
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Tools/scripts/parse_html5_entities.py
python
compare_dicts
(old, new)
Compare the old and new dicts and print the differences.
Compare the old and new dicts and print the differences.
[ "Compare", "the", "old", "and", "new", "dicts", "and", "print", "the", "differences", "." ]
def compare_dicts(old, new): """Compare the old and new dicts and print the differences.""" added = new.keys() - old.keys() if added: print('{} entitie(s) have been added:'.format(len(added))) for name in sorted(added): print(' {!r}: {!r}'.format(name, new[name])) removed = ...
[ "def", "compare_dicts", "(", "old", ",", "new", ")", ":", "added", "=", "new", ".", "keys", "(", ")", "-", "old", ".", "keys", "(", ")", "if", "added", ":", "print", "(", "'{} entitie(s) have been added:'", ".", "format", "(", "len", "(", "added", ")...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Tools/scripts/parse_html5_entities.py#L32-L51
nvdla/sw
79538ba1b52b040a4a4645f630e457fa01839e90
umd/external/protobuf-2.6/python/google/protobuf/message.py
python
Message.__unicode__
(self)
Outputs a human-readable representation of the message.
Outputs a human-readable representation of the message.
[ "Outputs", "a", "human", "-", "readable", "representation", "of", "the", "message", "." ]
def __unicode__(self): """Outputs a human-readable representation of the message.""" raise NotImplementedError
[ "def", "__unicode__", "(", "self", ")", ":", "raise", "NotImplementedError" ]
https://github.com/nvdla/sw/blob/79538ba1b52b040a4a4645f630e457fa01839e90/umd/external/protobuf-2.6/python/google/protobuf/message.py#L90-L92
gnuradio/gnuradio
09c3c4fa4bfb1a02caac74cb5334dfe065391e3b
grc/gui/Executor.py
python
ExecFlowGraphThread._popen
(self)
return subprocess.Popen( args=run_command_args, cwd=dirname, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=False, universal_newlines=True )
Execute this python flow graph.
Execute this python flow graph.
[ "Execute", "this", "python", "flow", "graph", "." ]
def _popen(self): """ Execute this python flow graph. """ generator = self.page.get_generator() run_command = self.flow_graph.get_run_command(generator.file_path) run_command_args = shlex.split(run_command) # When in no gui mode on linux, use a graphical terminal...
[ "def", "_popen", "(", "self", ")", ":", "generator", "=", "self", ".", "page", ".", "get_generator", "(", ")", "run_command", "=", "self", ".", "flow_graph", ".", "get_run_command", "(", "generator", ".", "file_path", ")", "run_command_args", "=", "shlex", ...
https://github.com/gnuradio/gnuradio/blob/09c3c4fa4bfb1a02caac74cb5334dfe065391e3b/grc/gui/Executor.py#L48-L76
papyrussolution/OpenPapyrus
bbfb5ec2ea2109b8e2f125edd838e12eaf7b8b91
Src/OSF/protobuf-3.19.1/python/google/protobuf/service.py
python
Service.CallMethod
(self, method_descriptor, rpc_controller, request, done)
Calls a method of the service specified by method_descriptor. If "done" is None then the call is blocking and the response message will be returned directly. Otherwise the call is asynchronous and "done" will later be called with the response value. In the blocking case, RpcException will be raised o...
Calls a method of the service specified by method_descriptor.
[ "Calls", "a", "method", "of", "the", "service", "specified", "by", "method_descriptor", "." ]
def CallMethod(self, method_descriptor, rpc_controller, request, done): """Calls a method of the service specified by method_descriptor. If "done" is None then the call is blocking and the response message will be returned directly. Otherwise the call is asynchronous and "done" will l...
[ "def", "CallMethod", "(", "self", ",", "method_descriptor", ",", "rpc_controller", ",", "request", ",", "done", ")", ":", "raise", "NotImplementedError" ]
https://github.com/papyrussolution/OpenPapyrus/blob/bbfb5ec2ea2109b8e2f125edd838e12eaf7b8b91/Src/OSF/protobuf-3.19.1/python/google/protobuf/service.py#L65-L93
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/setuptools/dist.py
python
Distribution._exclude_misc
(self, name, value)
Handle 'exclude()' for list/tuple attrs without a special handler
Handle 'exclude()' for list/tuple attrs without a special handler
[ "Handle", "exclude", "()", "for", "list", "/", "tuple", "attrs", "without", "a", "special", "handler" ]
def _exclude_misc(self, name, value): """Handle 'exclude()' for list/tuple attrs without a special handler""" if not isinstance(value, sequence): raise DistutilsSetupError( "%s: setting must be a list or tuple (%r)" % (name, value) ) try: old =...
[ "def", "_exclude_misc", "(", "self", ",", "name", ",", "value", ")", ":", "if", "not", "isinstance", "(", "value", ",", "sequence", ")", ":", "raise", "DistutilsSetupError", "(", "\"%s: setting must be a list or tuple (%r)\"", "%", "(", "name", ",", "value", "...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemDefectReporter/v1/AWS/common-code/Lib/setuptools/dist.py#L675-L692
SpaceNetChallenge/BuildingDetectors
3def3c44b5847c744cd2f3356182892d92496579
qinhaifang/src/caffe-mnc/python/caffe/draw.py
python
get_edge_label
(layer)
return edge_label
Define edge label based on layer type.
Define edge label based on layer type.
[ "Define", "edge", "label", "based", "on", "layer", "type", "." ]
def get_edge_label(layer): """Define edge label based on layer type. """ if layer.type == 'Data': edge_label = 'Batch ' + str(layer.data_param.batch_size) elif layer.type == 'Convolution' or layer.type == 'Deconvolution': edge_label = str(layer.convolution_param.num_output) elif lay...
[ "def", "get_edge_label", "(", "layer", ")", ":", "if", "layer", ".", "type", "==", "'Data'", ":", "edge_label", "=", "'Batch '", "+", "str", "(", "layer", ".", "data_param", ".", "batch_size", ")", "elif", "layer", ".", "type", "==", "'Convolution'", "or...
https://github.com/SpaceNetChallenge/BuildingDetectors/blob/3def3c44b5847c744cd2f3356182892d92496579/qinhaifang/src/caffe-mnc/python/caffe/draw.py#L46-L59
OSGeo/gdal
3748fc4ba4fba727492774b2b908a2130c864a83
swig/python/osgeo/osr.py
python
GetUseExceptions
(*args)
return _osr.GetUseExceptions(*args)
r"""GetUseExceptions() -> int
r"""GetUseExceptions() -> int
[ "r", "GetUseExceptions", "()", "-", ">", "int" ]
def GetUseExceptions(*args): r"""GetUseExceptions() -> int""" return _osr.GetUseExceptions(*args)
[ "def", "GetUseExceptions", "(", "*", "args", ")", ":", "return", "_osr", ".", "GetUseExceptions", "(", "*", "args", ")" ]
https://github.com/OSGeo/gdal/blob/3748fc4ba4fba727492774b2b908a2130c864a83/swig/python/osgeo/osr.py#L257-L259
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemFramework/v1/ResourceManager/lib/Crypto/Hash/RIPEMD160.py
python
RIPEMD160Hash.new
(self, data=None)
return RIPEMD160Hash(data)
Create a fresh RIPEMD-160 hash object.
Create a fresh RIPEMD-160 hash object.
[ "Create", "a", "fresh", "RIPEMD", "-", "160", "hash", "object", "." ]
def new(self, data=None): """Create a fresh RIPEMD-160 hash object.""" return RIPEMD160Hash(data)
[ "def", "new", "(", "self", ",", "data", "=", "None", ")", ":", "return", "RIPEMD160Hash", "(", "data", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemFramework/v1/ResourceManager/lib/Crypto/Hash/RIPEMD160.py#L146-L149
microsoft/SPTAG
c674f6cd8ed742c564515d15994cf591435f38e6
docs/examples/features_extractor.py
python
extract_features
(imgs_np, pretrained_model="resnet50", pooling_method='avg')
return embeddings_np
Takes in an array of fixed size images and returns features/embeddings returned by one of the selected pretrained networks. Parameters ---------- imgs_np : numpy.array Numpy array of images pretrained_model : str, optional Name of the pretrained model to be used, by default "res...
Takes in an array of fixed size images and returns features/embeddings returned by one of the selected pretrained networks. Parameters ---------- imgs_np : numpy.array Numpy array of images pretrained_model : str, optional Name of the pretrained model to be used, by default "res...
[ "Takes", "in", "an", "array", "of", "fixed", "size", "images", "and", "returns", "features", "/", "embeddings", "returned", "by", "one", "of", "the", "selected", "pretrained", "networks", ".", "Parameters", "----------", "imgs_np", ":", "numpy", ".", "array", ...
def extract_features(imgs_np, pretrained_model="resnet50", pooling_method='avg'): """Takes in an array of fixed size images and returns features/embeddings returned by one of the selected pretrained networks. Parameters ---------- imgs_np : numpy.array Numpy array of images pret...
[ "def", "extract_features", "(", "imgs_np", ",", "pretrained_model", "=", "\"resnet50\"", ",", "pooling_method", "=", "'avg'", ")", ":", "print", "(", "'Input images shape: '", ",", "imgs_np", ".", "shape", ")", "pretrained_model", "=", "pretrained_model", ".", "lo...
https://github.com/microsoft/SPTAG/blob/c674f6cd8ed742c564515d15994cf591435f38e6/docs/examples/features_extractor.py#L116-L163
GoSSIP-SJTU/TripleDoggy
03648d6b19c812504b14e8b98c8c7b3f443f4e54
bindings/python/llvm/object.py
python
Symbol.section
(self)
return Section(sections)
The Section to which this Symbol belongs. The returned Section instance does not expire, unlike Sections that are commonly obtained through iteration. Because this obtains a new section iterator each time it is accessed, calling this on a number of Symbol instances could be expensive.
The Section to which this Symbol belongs.
[ "The", "Section", "to", "which", "this", "Symbol", "belongs", "." ]
def section(self): """The Section to which this Symbol belongs. The returned Section instance does not expire, unlike Sections that are commonly obtained through iteration. Because this obtains a new section iterator each time it is accessed, calling this on a number of Symbol ...
[ "def", "section", "(", "self", ")", ":", "sections", "=", "lib", ".", "LLVMGetSections", "(", "self", ".", "_object_file", ")", "lib", ".", "LLVMMoveToContainingSection", "(", "sections", ",", "self", ")", "return", "Section", "(", "sections", ")" ]
https://github.com/GoSSIP-SJTU/TripleDoggy/blob/03648d6b19c812504b14e8b98c8c7b3f443f4e54/bindings/python/llvm/object.py#L330-L342
apache/impala
8ddac48f3428c86f2cbd037ced89cfb903298b12
shell/impala_shell.py
python
ImpalaShell.onecmd
(self, line)
Overridden to ensure the variable replacement is processed in interactive as well as non-interactive mode, since the precmd method would only work for the interactive case, when cmdloop is called.
Overridden to ensure the variable replacement is processed in interactive as well as non-interactive mode, since the precmd method would only work for the interactive case, when cmdloop is called.
[ "Overridden", "to", "ensure", "the", "variable", "replacement", "is", "processed", "in", "interactive", "as", "well", "as", "non", "-", "interactive", "mode", "since", "the", "precmd", "method", "would", "only", "work", "for", "the", "interactive", "case", "wh...
def onecmd(self, line): """Overridden to ensure the variable replacement is processed in interactive as well as non-interactive mode, since the precmd method would only work for the interactive case, when cmdloop is called. """ # Replace variables in the statement before it's executed line...
[ "def", "onecmd", "(", "self", ",", "line", ")", ":", "# Replace variables in the statement before it's executed", "line", "=", "replace_variables", "(", "self", ".", "set_variables", ",", "line", ")", "# Cmd is an old-style class, hence we need to call the method directly", "...
https://github.com/apache/impala/blob/8ddac48f3428c86f2cbd037ced89cfb903298b12/shell/impala_shell.py#L698-L735
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/setuptools/msvc.py
python
EnvironmentInfo.NetFxSDKIncludes
(self)
return [join(self.si.NetFxSdkDir, r'include\um')]
Microsoft .Net Framework SDK Includes. Return ------ list of str paths
Microsoft .Net Framework SDK Includes.
[ "Microsoft", ".", "Net", "Framework", "SDK", "Includes", "." ]
def NetFxSDKIncludes(self): """ Microsoft .Net Framework SDK Includes. Return ------ list of str paths """ if self.vs_ver < 14.0 or not self.si.NetFxSdkDir: return [] return [join(self.si.NetFxSdkDir, r'include\um')]
[ "def", "NetFxSDKIncludes", "(", "self", ")", ":", "if", "self", ".", "vs_ver", "<", "14.0", "or", "not", "self", ".", "si", ".", "NetFxSdkDir", ":", "return", "[", "]", "return", "[", "join", "(", "self", ".", "si", ".", "NetFxSdkDir", ",", "r'includ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/setuptools/msvc.py#L1554-L1566
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/klampt/src/motionplanning.py
python
CSpaceInterface.destroy
(self)
return _motionplanning.CSpaceInterface_destroy(self)
r""" destroy(CSpaceInterface self)
r""" destroy(CSpaceInterface self)
[ "r", "destroy", "(", "CSpaceInterface", "self", ")" ]
def destroy(self) -> "void": r""" destroy(CSpaceInterface self) """ return _motionplanning.CSpaceInterface_destroy(self)
[ "def", "destroy", "(", "self", ")", "->", "\"void\"", ":", "return", "_motionplanning", ".", "CSpaceInterface_destroy", "(", "self", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/klampt/src/motionplanning.py#L494-L500
ValveSoftware/source-sdk-2013
0d8dceea4310fde5706b3ce1c70609d72a38efdf
sp/src/thirdparty/protobuf-2.3.0/python/google/protobuf/message.py
python
Message.ParseFromString
(self, serialized)
Like MergeFromString(), except we clear the object first.
Like MergeFromString(), except we clear the object first.
[ "Like", "MergeFromString", "()", "except", "we", "clear", "the", "object", "first", "." ]
def ParseFromString(self, serialized): """Like MergeFromString(), except we clear the object first.""" self.Clear() self.MergeFromString(serialized)
[ "def", "ParseFromString", "(", "self", ",", "serialized", ")", ":", "self", ".", "Clear", "(", ")", "self", ".", "MergeFromString", "(", "serialized", ")" ]
https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/sp/src/thirdparty/protobuf-2.3.0/python/google/protobuf/message.py#L165-L168
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/importlib-metadata/py3/importlib_metadata/_compat.py
python
disable_stdlib_finder
()
Give the backport primacy for discovering path-based distributions by monkey-patching the stdlib O_O. See #91 for more background for rationale on this sketchy behavior.
Give the backport primacy for discovering path-based distributions by monkey-patching the stdlib O_O.
[ "Give", "the", "backport", "primacy", "for", "discovering", "path", "-", "based", "distributions", "by", "monkey", "-", "patching", "the", "stdlib", "O_O", "." ]
def disable_stdlib_finder(): """ Give the backport primacy for discovering path-based distributions by monkey-patching the stdlib O_O. See #91 for more background for rationale on this sketchy behavior. """ def matches(finder): return getattr( finder, '__module__', None...
[ "def", "disable_stdlib_finder", "(", ")", ":", "def", "matches", "(", "finder", ")", ":", "return", "getattr", "(", "finder", ",", "'__module__'", ",", "None", ")", "==", "'_frozen_importlib_external'", "and", "hasattr", "(", "finder", ",", "'find_distributions'...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/importlib-metadata/py3/importlib_metadata/_compat.py#L30-L45
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLDiagnostics.py
python
DirectILLDiagnostics._defaultMask
(self, mainWS)
return defaultMaskWS
Load instrument specific default mask or return None if not available.
Load instrument specific default mask or return None if not available.
[ "Load", "instrument", "specific", "default", "mask", "or", "return", "None", "if", "not", "available", "." ]
def _defaultMask(self, mainWS): """Load instrument specific default mask or return None if not available.""" option = self.getProperty(common.PROP_DEFAULT_MASK).value if option == common.DEFAULT_MASK_OFF: return None instrument = mainWS.getInstrument() instrumentName ...
[ "def", "_defaultMask", "(", "self", ",", "mainWS", ")", ":", "option", "=", "self", ".", "getProperty", "(", "common", ".", "PROP_DEFAULT_MASK", ")", ".", "value", "if", "option", "==", "common", ".", "DEFAULT_MASK_OFF", ":", "return", "None", "instrument", ...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/DirectILLDiagnostics.py#L685-L704
arangodb/arangodb
0d658689c7d1b721b314fa3ca27d38303e1570c8
3rdParty/V8/v7.9.317/third_party/jinja2/idtracking.py
python
FrameSymbolVisitor.visit_OverlayScope
(self, node, **kwargs)
Do not visit into overlay scopes.
Do not visit into overlay scopes.
[ "Do", "not", "visit", "into", "overlay", "scopes", "." ]
def visit_OverlayScope(self, node, **kwargs): """Do not visit into overlay scopes."""
[ "def", "visit_OverlayScope", "(", "self", ",", "node", ",", "*", "*", "kwargs", ")", ":" ]
https://github.com/arangodb/arangodb/blob/0d658689c7d1b721b314fa3ca27d38303e1570c8/3rdParty/V8/v7.9.317/third_party/jinja2/idtracking.py#L285-L286
microsoft/TSS.MSR
0f2516fca2cd9929c31d5450e39301c9bde43688
TSS.Py/src/TpmMarshaler.py
python
TpmBuffer.curPos
(self, newPos)
Sets current read/write position in the the backing byte buffer
Sets current read/write position in the the backing byte buffer
[ "Sets", "current", "read", "/", "write", "position", "in", "the", "the", "backing", "byte", "buffer" ]
def curPos(self, newPos): """ Sets current read/write position in the the backing byte buffer """ self.__pos = newPos self.__outOfBounds = self.size < newPos
[ "def", "curPos", "(", "self", ",", "newPos", ")", ":", "self", ".", "__pos", "=", "newPos", "self", ".", "__outOfBounds", "=", "self", ".", "size", "<", "newPos" ]
https://github.com/microsoft/TSS.MSR/blob/0f2516fca2cd9929c31d5450e39301c9bde43688/TSS.Py/src/TpmMarshaler.py#L97-L100
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/external/bazel_tools/third_party/py/gflags/__init__.py
python
TextWrap
(text, length=None, indent='', firstline_indent=None, tabs=' ')
return '\n'.join(result)
Wraps a given text to a maximum line length and returns it. We turn lines that only contain whitespace into empty lines. We keep new lines and tabs (e.g., we do not treat tabs as spaces). Args: text: text to wrap length: maximum length of a line, includes indentation ...
Wraps a given text to a maximum line length and returns it.
[ "Wraps", "a", "given", "text", "to", "a", "maximum", "line", "length", "and", "returns", "it", "." ]
def TextWrap(text, length=None, indent='', firstline_indent=None, tabs=' '): """Wraps a given text to a maximum line length and returns it. We turn lines that only contain whitespace into empty lines. We keep new lines and tabs (e.g., we do not treat tabs as spaces). Args: text: text to wr...
[ "def", "TextWrap", "(", "text", ",", "length", "=", "None", ",", "indent", "=", "''", ",", "firstline_indent", "=", "None", ",", "tabs", "=", "' '", ")", ":", "# Get defaults where callee used None", "if", "length", "is", "None", ":", "length", "=", "Ge...
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/external/bazel_tools/third_party/py/gflags/__init__.py#L593-L703
francinexue/xuefu
b6ff79747a42e020588c0c0a921048e08fe4680c
ctpx/ctp2/ctptd.py
python
CtpTd.onErrRtnQueryBankBalanceByFuture
(self, ReqQueryAccountField, RspInfoField)
期货发起查询银行余额错误回报
期货发起查询银行余额错误回报
[ "期货发起查询银行余额错误回报" ]
def onErrRtnQueryBankBalanceByFuture(self, ReqQueryAccountField, RspInfoField): """期货发起查询银行余额错误回报""" pass
[ "def", "onErrRtnQueryBankBalanceByFuture", "(", "self", ",", "ReqQueryAccountField", ",", "RspInfoField", ")", ":", "pass" ]
https://github.com/francinexue/xuefu/blob/b6ff79747a42e020588c0c0a921048e08fe4680c/ctpx/ctp2/ctptd.py#L511-L513
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/mailbox.py
python
BabylMessage.add_label
(self, label)
Add label to list of labels on the message.
Add label to list of labels on the message.
[ "Add", "label", "to", "list", "of", "labels", "on", "the", "message", "." ]
def add_label(self, label): """Add label to list of labels on the message.""" if isinstance(label, str): if label not in self._labels: self._labels.append(label) else: raise TypeError('label must be a string: %s' % type(label))
[ "def", "add_label", "(", "self", ",", "label", ")", ":", "if", "isinstance", "(", "label", ",", "str", ")", ":", "if", "label", "not", "in", "self", ".", "_labels", ":", "self", ".", "_labels", ".", "append", "(", "label", ")", "else", ":", "raise"...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/mailbox.py#L1840-L1846
gnina/gnina
b9ae032f52fc7a8153987bde09c0efa3620d8bb6
caffe/scripts/cpp_lint.py
python
IsBlankLine
(line)
return not line or line.isspace()
Returns true if the given line is blank. We consider a line to be blank if the line is empty or consists of only white spaces. Args: line: A line of a string. Returns: True, if the given line is blank.
Returns true if the given line is blank.
[ "Returns", "true", "if", "the", "given", "line", "is", "blank", "." ]
def IsBlankLine(line): """Returns true if the given line is blank. We consider a line to be blank if the line is empty or consists of only white spaces. Args: line: A line of a string. Returns: True, if the given line is blank. """ return not line or line.isspace()
[ "def", "IsBlankLine", "(", "line", ")", ":", "return", "not", "line", "or", "line", ".", "isspace", "(", ")" ]
https://github.com/gnina/gnina/blob/b9ae032f52fc7a8153987bde09c0efa3620d8bb6/caffe/scripts/cpp_lint.py#L2373-L2385
carla-simulator/carla
8854804f4d7748e14d937ec763a2912823a7e5f5
Co-Simulation/Sumo/util/create_sumo_vtypes.py
python
write_vtype_xml
(filename, vtypes)
Write route xml file.
Write route xml file.
[ "Write", "route", "xml", "file", "." ]
def write_vtype_xml(filename, vtypes): """ Write route xml file. """ root = ET.Element('routes') root.addprevious( ET.Comment('generated on {date:%Y-%m-%d %H:%M:%S} by {script:}'.format( date=datetime.datetime.now(), script=os.path.basename(__file__)))) for vtype in vtypes:...
[ "def", "write_vtype_xml", "(", "filename", ",", "vtypes", ")", ":", "root", "=", "ET", ".", "Element", "(", "'routes'", ")", "root", ".", "addprevious", "(", "ET", ".", "Comment", "(", "'generated on {date:%Y-%m-%d %H:%M:%S} by {script:}'", ".", "format", "(", ...
https://github.com/carla-simulator/carla/blob/8854804f4d7748e14d937ec763a2912823a7e5f5/Co-Simulation/Sumo/util/create_sumo_vtypes.py#L58-L72
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/python/client/session.py
python
BaseSession.graph_def
(self)
return self._graph.as_graph_def(add_shapes=self._add_shapes)
A serializable version of the underlying TensorFlow graph. Returns: A graph_pb2.GraphDef proto containing nodes for all of the Operations in the underlying TensorFlow graph.
A serializable version of the underlying TensorFlow graph.
[ "A", "serializable", "version", "of", "the", "underlying", "TensorFlow", "graph", "." ]
def graph_def(self): """A serializable version of the underlying TensorFlow graph. Returns: A graph_pb2.GraphDef proto containing nodes for all of the Operations in the underlying TensorFlow graph. """ return self._graph.as_graph_def(add_shapes=self._add_shapes)
[ "def", "graph_def", "(", "self", ")", ":", "return", "self", ".", "_graph", ".", "as_graph_def", "(", "add_shapes", "=", "self", ".", "_add_shapes", ")" ]
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/python/client/session.py#L714-L721
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/dispatcher.py
python
Dispatcher.get_metadata
(self, signature=None)
Obtain the compilation metadata for a given signature.
Obtain the compilation metadata for a given signature.
[ "Obtain", "the", "compilation", "metadata", "for", "a", "given", "signature", "." ]
def get_metadata(self, signature=None): """ Obtain the compilation metadata for a given signature. """ if signature is not None: return self.overloads[signature].metadata else: return dict((sig, self.overloads[sig].metadata) for sig in self.signatures)
[ "def", "get_metadata", "(", "self", ",", "signature", "=", "None", ")", ":", "if", "signature", "is", "not", "None", ":", "return", "self", ".", "overloads", "[", "signature", "]", ".", "metadata", "else", ":", "return", "dict", "(", "(", "sig", ",", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/dispatcher.py#L821-L828
p4lang/p4c
3272e79369f20813cc1a555a5eb26f44432f84a4
tools/stf/stf_runner.py
python
STFRunner.genProcessPacket
(self, pkt_pair)
Generate a send_packet/check_packet pair.
Generate a send_packet/check_packet pair.
[ "Generate", "a", "send_packet", "/", "check_packet", "pair", "." ]
def genProcessPacket(self, pkt_pair): """ Generate a send_packet/check_packet pair. """ if pkt_pair[0] is not None: self.genSendPacket(pkt_pair[0]) if pkt_pair[1] is not None: self.genExpectPacket(pkt_pair[1], pkt_pair[0])
[ "def", "genProcessPacket", "(", "self", ",", "pkt_pair", ")", ":", "if", "pkt_pair", "[", "0", "]", "is", "not", "None", ":", "self", ".", "genSendPacket", "(", "pkt_pair", "[", "0", "]", ")", "if", "pkt_pair", "[", "1", "]", "is", "not", "None", "...
https://github.com/p4lang/p4c/blob/3272e79369f20813cc1a555a5eb26f44432f84a4/tools/stf/stf_runner.py#L112-L118
oracle/graaljs
36a56e8e993d45fc40939a3a4d9c0c24990720f1
graal-nodejs/tools/gyp/pylib/gyp/common.py
python
EnsureDirExists
(path)
Make sure the directory for |path| exists.
Make sure the directory for |path| exists.
[ "Make", "sure", "the", "directory", "for", "|path|", "exists", "." ]
def EnsureDirExists(path): """Make sure the directory for |path| exists.""" try: os.makedirs(os.path.dirname(path)) except OSError: pass
[ "def", "EnsureDirExists", "(", "path", ")", ":", "try", ":", "os", ".", "makedirs", "(", "os", ".", "path", ".", "dirname", "(", "path", ")", ")", "except", "OSError", ":", "pass" ]
https://github.com/oracle/graaljs/blob/36a56e8e993d45fc40939a3a4d9c0c24990720f1/graal-nodejs/tools/gyp/pylib/gyp/common.py#L425-L430
neoml-lib/neoml
a0d370fba05269a1b2258cef126f77bbd2054a3e
NeoML/Python/neoml/Dnn/Conv.py
python
TransposedConv.stride_size
(self)
return self._internal.get_stride_height(), self._internal.get_stride_width()
Gets the convolution stride.
Gets the convolution stride.
[ "Gets", "the", "convolution", "stride", "." ]
def stride_size(self): """Gets the convolution stride. """ return self._internal.get_stride_height(), self._internal.get_stride_width()
[ "def", "stride_size", "(", "self", ")", ":", "return", "self", ".", "_internal", ".", "get_stride_height", "(", ")", ",", "self", ".", "_internal", ".", "get_stride_width", "(", ")" ]
https://github.com/neoml-lib/neoml/blob/a0d370fba05269a1b2258cef126f77bbd2054a3e/NeoML/Python/neoml/Dnn/Conv.py#L712-L715
google/mysql-protobuf
467cda676afaa49e762c5c9164a43f6ad31a1fbf
storage/ndb/mcc/clusterhost.py
python
ABClusterHost.path_module
(self)
return self.hostInfo.path_module
Path module to use when manipulating file paths.
Path module to use when manipulating file paths.
[ "Path", "module", "to", "use", "when", "manipulating", "file", "paths", "." ]
def path_module(self): """Path module to use when manipulating file paths.""" return self.hostInfo.path_module
[ "def", "path_module", "(", "self", ")", ":", "return", "self", ".", "hostInfo", ".", "path_module" ]
https://github.com/google/mysql-protobuf/blob/467cda676afaa49e762c5c9164a43f6ad31a1fbf/storage/ndb/mcc/clusterhost.py#L282-L284
ZintrulCre/LeetCode_Archiver
de23e16ead29336b5ee7aa1898a392a5d6463d27
LeetCode/python3/145.py
python
Solution.postorderTraversal
(self, root)
return ret[::-1]
:type root: TreeNode :rtype: List[int]
:type root: TreeNode :rtype: List[int]
[ ":", "type", "root", ":", "TreeNode", ":", "rtype", ":", "List", "[", "int", "]" ]
def postorderTraversal(self, root): """ :type root: TreeNode :rtype: List[int] """ if not root: return [] ret = [] stack = [root] while stack: node = stack.pop() ret.append(node.val) if node.left: ...
[ "def", "postorderTraversal", "(", "self", ",", "root", ")", ":", "if", "not", "root", ":", "return", "[", "]", "ret", "=", "[", "]", "stack", "=", "[", "root", "]", "while", "stack", ":", "node", "=", "stack", ".", "pop", "(", ")", "ret", ".", ...
https://github.com/ZintrulCre/LeetCode_Archiver/blob/de23e16ead29336b5ee7aa1898a392a5d6463d27/LeetCode/python3/145.py#L2-L18
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/aui/framemanager.py
python
AuiManager.SetDockSizeConstraint
(self, width_pct, height_pct)
When a user creates a new dock by dragging a window into a docked position, often times the large size of the window will create a dock that is unwieldly large. :class:`AuiManager` by default limits the size of any new dock to 1/3 of the window size. For horizontal docks, this would be ...
When a user creates a new dock by dragging a window into a docked position, often times the large size of the window will create a dock that is unwieldly large.
[ "When", "a", "user", "creates", "a", "new", "dock", "by", "dragging", "a", "window", "into", "a", "docked", "position", "often", "times", "the", "large", "size", "of", "the", "window", "will", "create", "a", "dock", "that", "is", "unwieldly", "large", "....
def SetDockSizeConstraint(self, width_pct, height_pct): """ When a user creates a new dock by dragging a window into a docked position, often times the large size of the window will create a dock that is unwieldly large. :class:`AuiManager` by default limits the size of any new ...
[ "def", "SetDockSizeConstraint", "(", "self", ",", "width_pct", ",", "height_pct", ")", ":", "self", ".", "_dock_constraint_x", "=", "max", "(", "0.0", ",", "min", "(", "1.0", ",", "width_pct", ")", ")", "self", ".", "_dock_constraint_y", "=", "max", "(", ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/aui/framemanager.py#L6304-L6323
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py
python
Listbox.selection_anchor
(self, index)
Set the fixed end oft the selection to INDEX.
Set the fixed end oft the selection to INDEX.
[ "Set", "the", "fixed", "end", "oft", "the", "selection", "to", "INDEX", "." ]
def selection_anchor(self, index): """Set the fixed end oft the selection to INDEX.""" self.tk.call(self._w, 'selection', 'anchor', index)
[ "def", "selection_anchor", "(", "self", ",", "index", ")", ":", "self", ".", "tk", ".", "call", "(", "self", ".", "_w", ",", "'selection'", ",", "'anchor'", ",", "index", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py#L2596-L2598
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/ma/core.py
python
MaskedArray.shrink_mask
(self)
return self
Reduce a mask to nomask when possible. Parameters ---------- None Returns ------- None Examples -------- >>> x = np.ma.array([[1,2 ], [3, 4]], mask=[0]*4) >>> x.mask array([[False, False], [False, False]]) ...
Reduce a mask to nomask when possible.
[ "Reduce", "a", "mask", "to", "nomask", "when", "possible", "." ]
def shrink_mask(self): """ Reduce a mask to nomask when possible. Parameters ---------- None Returns ------- None Examples -------- >>> x = np.ma.array([[1,2 ], [3, 4]], mask=[0]*4) >>> x.mask array([[False, False...
[ "def", "shrink_mask", "(", "self", ")", ":", "self", ".", "_mask", "=", "_shrink_mask", "(", "self", ".", "_mask", ")", "return", "self" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/ma/core.py#L3557-L3586
SFTtech/openage
d6a08c53c48dc1e157807471df92197f6ca9e04d
openage/convert/entity_object/conversion/aoc/genie_tech.py
python
CivBonus.replaces_researchable_tech
(self)
return None
Checks if this bonus replaces a researchable Tech and returns the tech group if thats the case. Otherwise None is returned.
Checks if this bonus replaces a researchable Tech and returns the tech group if thats the case. Otherwise None is returned.
[ "Checks", "if", "this", "bonus", "replaces", "a", "researchable", "Tech", "and", "returns", "the", "tech", "group", "if", "thats", "the", "case", ".", "Otherwise", "None", "is", "returned", "." ]
def replaces_researchable_tech(self): """ Checks if this bonus replaces a researchable Tech and returns the tech group if thats the case. Otherwise None is returned. """ for tech_group in self.data.tech_groups.values(): if tech_group.is_researchable(): ...
[ "def", "replaces_researchable_tech", "(", "self", ")", ":", "for", "tech_group", "in", "self", ".", "data", ".", "tech_groups", ".", "values", "(", ")", ":", "if", "tech_group", ".", "is_researchable", "(", ")", ":", "bonus_effect_id", "=", "self", ".", "t...
https://github.com/SFTtech/openage/blob/d6a08c53c48dc1e157807471df92197f6ca9e04d/openage/convert/entity_object/conversion/aoc/genie_tech.py#L441-L454
tcpexmachina/remy
687b5db29b81df7ae8737889c78b47e7f9788297
scripts/datautils.py
python
RunData.get_action_change_times
(self, sender)
return times
Returns a list of times where the action changes.
Returns a list of times where the action changes.
[ "Returns", "a", "list", "of", "times", "where", "the", "action", "changes", "." ]
def get_action_change_times(self, sender): """Returns a list of times where the action changes.""" assert self.actions is not None, "RunData needs a actions object for this function" times = [] last_action = None for point in filter(self._in_range, self.pb.point): act...
[ "def", "get_action_change_times", "(", "self", ",", "sender", ")", ":", "assert", "self", ".", "actions", "is", "not", "None", ",", "\"RunData needs a actions object for this function\"", "times", "=", "[", "]", "last_action", "=", "None", "for", "point", "in", ...
https://github.com/tcpexmachina/remy/blob/687b5db29b81df7ae8737889c78b47e7f9788297/scripts/datautils.py#L262-L272
OSGeo/gdal
3748fc4ba4fba727492774b2b908a2130c864a83
swig/python/gdal-utils/osgeo_utils/gdal2tiles.py
python
GDAL2Tiles.__init__
(self, input_file: str, output_folder: str, options: Options)
Constructor function - initialization
Constructor function - initialization
[ "Constructor", "function", "-", "initialization" ]
def __init__(self, input_file: str, output_folder: str, options: Options) -> None: """Constructor function - initialization""" self.out_drv = None self.mem_drv = None self.warped_input_dataset = None self.out_srs = None self.nativezoom = None self.tminmax = None ...
[ "def", "__init__", "(", "self", ",", "input_file", ":", "str", ",", "output_folder", ":", "str", ",", "options", ":", "Options", ")", "->", "None", ":", "self", ".", "out_drv", "=", "None", "self", ".", "mem_drv", "=", "None", "self", ".", "warped_inpu...
https://github.com/OSGeo/gdal/blob/3748fc4ba4fba727492774b2b908a2130c864a83/swig/python/gdal-utils/osgeo_utils/gdal2tiles.py#L1582-L1647
raspberrypi/tools
13474ee775d0c5ec8a7da4fb0a9fa84187abfc87
arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/share/gdb/python/gdb/command/explore.py
python
Explorer.return_to_parent_value
()
A utility function which prints that the current exploration session is returning to the parent value. Useful when exploring values.
A utility function which prints that the current exploration session is returning to the parent value. Useful when exploring values.
[ "A", "utility", "function", "which", "prints", "that", "the", "current", "exploration", "session", "is", "returning", "to", "the", "parent", "value", ".", "Useful", "when", "exploring", "values", "." ]
def return_to_parent_value(): """A utility function which prints that the current exploration session is returning to the parent value. Useful when exploring values. """ print ("\nReturning to parent value...\n")
[ "def", "return_to_parent_value", "(", ")", ":", "print", "(", "\"\\nReturning to parent value...\\n\"", ")" ]
https://github.com/raspberrypi/tools/blob/13474ee775d0c5ec8a7da4fb0a9fa84187abfc87/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/share/gdb/python/gdb/command/explore.py#L159-L163
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/numpy/py3/numpy/fft/_pocketfft.py
python
hfft
(a, n=None, axis=-1, norm=None)
return output
Compute the FFT of a signal that has Hermitian symmetry, i.e., a real spectrum. Parameters ---------- a : array_like The input array. n : int, optional Length of the transformed axis of the output. For `n` output points, ``n//2 + 1`` input points are necessary. If the input...
Compute the FFT of a signal that has Hermitian symmetry, i.e., a real spectrum.
[ "Compute", "the", "FFT", "of", "a", "signal", "that", "has", "Hermitian", "symmetry", "i", ".", "e", ".", "a", "real", "spectrum", "." ]
def hfft(a, n=None, axis=-1, norm=None): """ Compute the FFT of a signal that has Hermitian symmetry, i.e., a real spectrum. Parameters ---------- a : array_like The input array. n : int, optional Length of the transformed axis of the output. For `n` output points, `...
[ "def", "hfft", "(", "a", ",", "n", "=", "None", ",", "axis", "=", "-", "1", ",", "norm", "=", "None", ")", ":", "a", "=", "asarray", "(", "a", ")", "if", "n", "is", "None", ":", "n", "=", "(", "a", ".", "shape", "[", "axis", "]", "-", "...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/numpy/py3/numpy/fft/_pocketfft.py#L518-L612
weolar/miniblink49
1c4678db0594a4abde23d3ebbcc7cd13c3170777
v8_4_5/build/get_landmines.py
python
main
()
return 0
ALL LANDMINES ARE EMITTED FROM HERE.
ALL LANDMINES ARE EMITTED FROM HERE.
[ "ALL", "LANDMINES", "ARE", "EMITTED", "FROM", "HERE", "." ]
def main(): """ ALL LANDMINES ARE EMITTED FROM HERE. """ print 'Need to clobber after ICU52 roll.' print 'Landmines test.' print 'Activating MSVS 2013.' print 'Revert activation of MSVS 2013.' print 'Activating MSVS 2013 again.' print 'Clobber after ICU roll.' print 'Moar clobbering...' print 'Rem...
[ "def", "main", "(", ")", ":", "print", "'Need to clobber after ICU52 roll.'", "print", "'Landmines test.'", "print", "'Activating MSVS 2013.'", "print", "'Revert activation of MSVS 2013.'", "print", "'Activating MSVS 2013 again.'", "print", "'Clobber after ICU roll.'", "print", "...
https://github.com/weolar/miniblink49/blob/1c4678db0594a4abde23d3ebbcc7cd13c3170777/v8_4_5/build/get_landmines.py#L14-L26
openvinotoolkit/openvino
dedcbeafa8b84cccdc55ca64b8da516682b381c7
cmake/developer_package/cpplint/cpplint.py
python
_SetOutputFormat
(output_format)
Sets the module's output format.
Sets the module's output format.
[ "Sets", "the", "module", "s", "output", "format", "." ]
def _SetOutputFormat(output_format): """Sets the module's output format.""" _cpplint_state.SetOutputFormat(output_format)
[ "def", "_SetOutputFormat", "(", "output_format", ")", ":", "_cpplint_state", ".", "SetOutputFormat", "(", "output_format", ")" ]
https://github.com/openvinotoolkit/openvino/blob/dedcbeafa8b84cccdc55ca64b8da516682b381c7/cmake/developer_package/cpplint/cpplint.py#L1176-L1178
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/aui.py
python
AuiToolBarArt.GetFont
(*args, **kwargs)
return _aui.AuiToolBarArt_GetFont(*args, **kwargs)
GetFont(self) -> Font
GetFont(self) -> Font
[ "GetFont", "(", "self", ")", "-", ">", "Font" ]
def GetFont(*args, **kwargs): """GetFont(self) -> Font""" return _aui.AuiToolBarArt_GetFont(*args, **kwargs)
[ "def", "GetFont", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_aui", ".", "AuiToolBarArt_GetFont", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/aui.py#L1906-L1908
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/plat-mac/aetools.py
python
TalkTo.newevent
(self, code, subcode, parameters = {}, attributes = {})
return event
Create a complete structure for an apple event
Create a complete structure for an apple event
[ "Create", "a", "complete", "structure", "for", "an", "apple", "event" ]
def newevent(self, code, subcode, parameters = {}, attributes = {}): """Create a complete structure for an apple event""" event = AE.AECreateAppleEvent(code, subcode, self.target, AppleEvents.kAutoGenerateReturnID, AppleEvents.kAnyTransactionID) packevent(event, parameters, at...
[ "def", "newevent", "(", "self", ",", "code", ",", "subcode", ",", "parameters", "=", "{", "}", ",", "attributes", "=", "{", "}", ")", ":", "event", "=", "AE", ".", "AECreateAppleEvent", "(", "code", ",", "subcode", ",", "self", ".", "target", ",", ...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/plat-mac/aetools.py#L210-L216
rodeofx/OpenWalter
6116fbe3f04f1146c854afbfbdbe944feaee647e
walter/maya/scripts/AEwalterStandinTemplate.py
python
AEwalterStandinTemplate.__build
(self, plug)
Called to create some UI objects when a new node type is edited.
Called to create some UI objects when a new node type is edited.
[ "Called", "to", "create", "some", "UI", "objects", "when", "a", "new", "node", "type", "is", "edited", "." ]
def __build(self, plug): """Called to create some UI objects when a new node type is edited.""" self.__replace(plug)
[ "def", "__build", "(", "self", ",", "plug", ")", ":", "self", ".", "__replace", "(", "plug", ")" ]
https://github.com/rodeofx/OpenWalter/blob/6116fbe3f04f1146c854afbfbdbe944feaee647e/walter/maya/scripts/AEwalterStandinTemplate.py#L360-L362
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/masked/maskededit.py
python
MaskedEditMixin.GetFieldParameter
(self, field_index, paramname)
Routine provided for getting a parameter of an individual field.
Routine provided for getting a parameter of an individual field.
[ "Routine", "provided", "for", "getting", "a", "parameter", "of", "an", "individual", "field", "." ]
def GetFieldParameter(self, field_index, paramname): """ Routine provided for getting a parameter of an individual field. """ if field_index not in self._field_indices: ie = IndexError('%s is not a valid field for control "%s".' % (str(field_index), self.name)) ie...
[ "def", "GetFieldParameter", "(", "self", ",", "field_index", ",", "paramname", ")", ":", "if", "field_index", "not", "in", "self", ".", "_field_indices", ":", "ie", "=", "IndexError", "(", "'%s is not a valid field for control \"%s\".'", "%", "(", "str", "(", "f...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/masked/maskededit.py#L2167-L2180
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/Jinja2/py3/jinja2/filters.py
python
sync_do_slice
( value: "t.Collection[V]", slices: int, fill_with: "t.Optional[V]" = None )
Slice an iterator and return a list of lists containing those items. Useful if you want to create a div containing three ul tags that represent columns: .. sourcecode:: html+jinja <div class="columnwrapper"> {%- for column in items|slice(3) %} <ul class="column-{{ loop.index ...
Slice an iterator and return a list of lists containing those items. Useful if you want to create a div containing three ul tags that represent columns:
[ "Slice", "an", "iterator", "and", "return", "a", "list", "of", "lists", "containing", "those", "items", ".", "Useful", "if", "you", "want", "to", "create", "a", "div", "containing", "three", "ul", "tags", "that", "represent", "columns", ":" ]
def sync_do_slice( value: "t.Collection[V]", slices: int, fill_with: "t.Optional[V]" = None ) -> "t.Iterator[t.List[V]]": """Slice an iterator and return a list of lists containing those items. Useful if you want to create a div containing three ul tags that represent columns: .. sourcecode:: html+...
[ "def", "sync_do_slice", "(", "value", ":", "\"t.Collection[V]\"", ",", "slices", ":", "int", ",", "fill_with", ":", "\"t.Optional[V]\"", "=", "None", ")", "->", "\"t.Iterator[t.List[V]]\"", ":", "seq", "=", "list", "(", "value", ")", "length", "=", "len", "(...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/Jinja2/py3/jinja2/filters.py#L1041-L1081
liudong1983/mybus
9e2ad1413992c952eb5ffbae143ed8f4b73f8605
bus_manager/business/hbase/THBaseService.py
python
Client.exists
(self, table, get)
return self.recv_exists()
Test for the existence of columns in the table, as specified in the TGet. @return true if the specified TGet matches one or more keys, false if not Parameters: - table: the table to check on - get: the TGet to check for
Test for the existence of columns in the table, as specified in the TGet.
[ "Test", "for", "the", "existence", "of", "columns", "in", "the", "table", "as", "specified", "in", "the", "TGet", "." ]
def exists(self, table, get): """ Test for the existence of columns in the table, as specified in the TGet. @return true if the specified TGet matches one or more keys, false if not Parameters: - table: the table to check on - get: the TGet to check for """ self.send_exists(table, ge...
[ "def", "exists", "(", "self", ",", "table", ",", "get", ")", ":", "self", ".", "send_exists", "(", "table", ",", "get", ")", "return", "self", ".", "recv_exists", "(", ")" ]
https://github.com/liudong1983/mybus/blob/9e2ad1413992c952eb5ffbae143ed8f4b73f8605/bus_manager/business/hbase/THBaseService.py#L213-L224
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/_op_impl/tbe/elu_grad.py
python
_elu_grad_tbe
()
return
EluGrad TBE register
EluGrad TBE register
[ "EluGrad", "TBE", "register" ]
def _elu_grad_tbe(): """EluGrad TBE register""" return
[ "def", "_elu_grad_tbe", "(", ")", ":", "return" ]
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/_op_impl/tbe/elu_grad.py#L41-L43
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/ogl/_composit.py
python
DivisionShape.SetBottomSide
(self, shape)
Set the the division on the bottom side of this division.
Set the the division on the bottom side of this division.
[ "Set", "the", "the", "division", "on", "the", "bottom", "side", "of", "this", "division", "." ]
def SetBottomSide(self, shape): """Set the the division on the bottom side of this division.""" self._bottomSide = shape
[ "def", "SetBottomSide", "(", "self", ",", "shape", ")", ":", "self", ".", "_bottomSide", "=", "shape" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/ogl/_composit.py#L928-L930
manutdzou/KITTI_SSD
5b620c2f291d36a0fe14489214f22a992f173f44
scripts/cpp_lint.py
python
_CppLintState.SetVerboseLevel
(self, level)
return last_verbose_level
Sets the module's verbosity, and returns the previous setting.
Sets the module's verbosity, and returns the previous setting.
[ "Sets", "the", "module", "s", "verbosity", "and", "returns", "the", "previous", "setting", "." ]
def SetVerboseLevel(self, level): """Sets the module's verbosity, and returns the previous setting.""" last_verbose_level = self.verbose_level self.verbose_level = level return last_verbose_level
[ "def", "SetVerboseLevel", "(", "self", ",", "level", ")", ":", "last_verbose_level", "=", "self", ".", "verbose_level", "self", ".", "verbose_level", "=", "level", "return", "last_verbose_level" ]
https://github.com/manutdzou/KITTI_SSD/blob/5b620c2f291d36a0fe14489214f22a992f173f44/scripts/cpp_lint.py#L707-L711
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/python2_version/klampt/src/doxy2swig.py
python
Doxy2SWIG.start_new_paragraph
(self)
Make sure to create an empty line. This is overridden, if the previous text ends with the special marker ''. In that case, nothing is done.
Make sure to create an empty line. This is overridden, if the previous text ends with the special marker ''. In that case, nothing is done.
[ "Make", "sure", "to", "create", "an", "empty", "line", ".", "This", "is", "overridden", "if", "the", "previous", "text", "ends", "with", "the", "special", "marker", ".", "In", "that", "case", "nothing", "is", "done", "." ]
def start_new_paragraph(self): """Make sure to create an empty line. This is overridden, if the previous text ends with the special marker ''. In that case, nothing is done. """ if self.pieces[-1:] == ['']: # respect special marker return elif self.pieces == []: # fir...
[ "def", "start_new_paragraph", "(", "self", ")", ":", "if", "self", ".", "pieces", "[", "-", "1", ":", "]", "==", "[", "''", "]", ":", "# respect special marker", "return", "elif", "self", ".", "pieces", "==", "[", "]", ":", "# first paragraph, add '\\n', o...
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/python2_version/klampt/src/doxy2swig.py#L293-L304
xswang/xflow
7ef0ef798a6c722613d1e0ccef0b46ffd44c5a93
scripts/tracker.py
python
RabitTracker.get_link_map
(self, nslave)
return tree_map_, parent_map_, ring_map_
get the link map, this is a bit hacky, call for better algorithm to place similar nodes together
get the link map, this is a bit hacky, call for better algorithm to place similar nodes together
[ "get", "the", "link", "map", "this", "is", "a", "bit", "hacky", "call", "for", "better", "algorithm", "to", "place", "similar", "nodes", "together" ]
def get_link_map(self, nslave): """ get the link map, this is a bit hacky, call for better algorithm to place similar nodes together """ tree_map, parent_map = self.get_tree(nslave) ring_map = self.get_ring(tree_map, parent_map) rmap = {0 : 0} k = 0 ...
[ "def", "get_link_map", "(", "self", ",", "nslave", ")", ":", "tree_map", ",", "parent_map", "=", "self", ".", "get_tree", "(", "nslave", ")", "ring_map", "=", "self", ".", "get_ring", "(", "tree_map", ",", "parent_map", ")", "rmap", "=", "{", "0", ":",...
https://github.com/xswang/xflow/blob/7ef0ef798a6c722613d1e0ccef0b46ffd44c5a93/scripts/tracker.py#L208-L233
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/_op_impl/aicpu/fused_sparse_ftrl.py
python
_fused_sparse_ftrl_aicpu
()
return
FusedSparseFtrl aicpu register
FusedSparseFtrl aicpu register
[ "FusedSparseFtrl", "aicpu", "register" ]
def _fused_sparse_ftrl_aicpu(): """FusedSparseFtrl aicpu register""" return
[ "def", "_fused_sparse_ftrl_aicpu", "(", ")", ":", "return" ]
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/_op_impl/aicpu/fused_sparse_ftrl.py#L39-L41
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/requests/cookies.py
python
RequestsCookieJar.multiple_domains
(self)
return False
Returns True if there are multiple domains in the jar. Returns False otherwise. :rtype: bool
Returns True if there are multiple domains in the jar.
[ "Returns", "True", "if", "there", "are", "multiple", "domains", "in", "the", "jar", "." ]
def multiple_domains(self): """Returns True if there are multiple domains in the jar. Returns False otherwise. :rtype: bool """ domains = [] for cookie in iter(self): if cookie.domain is not None and cookie.domain in domains: return T...
[ "def", "multiple_domains", "(", "self", ")", ":", "domains", "=", "[", "]", "for", "cookie", "in", "iter", "(", "self", ")", ":", "if", "cookie", ".", "domain", "is", "not", "None", "and", "cookie", ".", "domain", "in", "domains", ":", "return", "Tru...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/requests/cookies.py#L571-L593
miyosuda/TensorFlowAndroidDemo
35903e0221aa5f109ea2dbef27f20b52e317f42d
jni-build/jni/include/tensorflow/models/image/alexnet/alexnet_benchmark.py
python
run_benchmark
()
Run the benchmark on AlexNet.
Run the benchmark on AlexNet.
[ "Run", "the", "benchmark", "on", "AlexNet", "." ]
def run_benchmark(): """Run the benchmark on AlexNet.""" with tf.Graph().as_default(): # Generate some dummy images. image_size = 224 # Note that our padding definition is slightly different the cuda-convnet. # In order to force the model to start with the same activations sizes, # we add 3 to t...
[ "def", "run_benchmark", "(", ")", ":", "with", "tf", ".", "Graph", "(", ")", ".", "as_default", "(", ")", ":", "# Generate some dummy images.", "image_size", "=", "224", "# Note that our padding definition is slightly different the cuda-convnet.", "# In order to force the m...
https://github.com/miyosuda/TensorFlowAndroidDemo/blob/35903e0221aa5f109ea2dbef27f20b52e317f42d/jni-build/jni/include/tensorflow/models/image/alexnet/alexnet_benchmark.py#L193-L228
RamadhanAmizudin/malware
2c6c53c8b0d556f5d8078d6ca0fc4448f4697cf1
Fuzzbunch/fuzzbunch/fuzzbunch.py
python
Fuzzbunch.readconfig
(self, file)
Parse the Fuzzbunch.xml file to setup the Fuzzbunch initial environment
Parse the Fuzzbunch.xml file to setup the Fuzzbunch initial environment
[ "Parse", "the", "Fuzzbunch", ".", "xml", "file", "to", "setup", "the", "Fuzzbunch", "initial", "environment" ]
def readconfig(self, file): """Parse the Fuzzbunch.xml file to setup the Fuzzbunch initial environment""" try: import xml.dom.minidom xmlDoc = xml.dom.minidom.parse(file) config = edfmeta.get_elements(xmlDoc, "config")[0] redir = edfmeta.get_elements(c...
[ "def", "readconfig", "(", "self", ",", "file", ")", ":", "try", ":", "import", "xml", ".", "dom", ".", "minidom", "xmlDoc", "=", "xml", ".", "dom", ".", "minidom", ".", "parse", "(", "file", ")", "config", "=", "edfmeta", ".", "get_elements", "(", ...
https://github.com/RamadhanAmizudin/malware/blob/2c6c53c8b0d556f5d8078d6ca0fc4448f4697cf1/Fuzzbunch/fuzzbunch/fuzzbunch.py#L202-L243
fengbingchun/NN_Test
d6305825d5273e4569ccd1eda9ffa2a9c72e18d2
src/tiny-dnn/third_party/cpplint.py
python
IsErrorSuppressedByNolint
(category, linenum)
return (_global_error_suppressions.get(category, False) or linenum in _error_suppressions.get(category, set()) or linenum in _error_suppressions.get(None, set()))
Returns true if the specified error category is suppressed on this line. Consults the global error_suppressions map populated by ParseNolintSuppressions/ProcessGlobalSuppresions/ResetNolintSuppressions. Args: category: str, the category of the error. linenum: int, the current line number. Returns: ...
Returns true if the specified error category is suppressed on this line.
[ "Returns", "true", "if", "the", "specified", "error", "category", "is", "suppressed", "on", "this", "line", "." ]
def IsErrorSuppressedByNolint(category, linenum): """Returns true if the specified error category is suppressed on this line. Consults the global error_suppressions map populated by ParseNolintSuppressions/ProcessGlobalSuppresions/ResetNolintSuppressions. Args: category: str, the category of the error. ...
[ "def", "IsErrorSuppressedByNolint", "(", "category", ",", "linenum", ")", ":", "return", "(", "_global_error_suppressions", ".", "get", "(", "category", ",", "False", ")", "or", "linenum", "in", "_error_suppressions", ".", "get", "(", "category", ",", "set", "...
https://github.com/fengbingchun/NN_Test/blob/d6305825d5273e4569ccd1eda9ffa2a9c72e18d2/src/tiny-dnn/third_party/cpplint.py#L739-L754
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
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/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/tools/symsrc/pefile.py#L1810-L1834
borglab/gtsam
a5bee157efce6a0563704bce6a5d188c29817f39
wrap/docs/doc_template.py
python
Docs.get_class_docs
(self, class_name)
return self.class_docs.get(class_name)
Get the documentation for the class. Arguments: class_name -- the name of the class Returns: The ClassDoc with the class's documentation. None if the class does not exist.
Get the documentation for the class.
[ "Get", "the", "documentation", "for", "the", "class", "." ]
def get_class_docs(self, class_name): '''Get the documentation for the class. Arguments: class_name -- the name of the class Returns: The ClassDoc with the class's documentation. None if the class does not exist. ''' return self.class_docs.get(class_name...
[ "def", "get_class_docs", "(", "self", ",", "class_name", ")", ":", "return", "self", ".", "class_docs", ".", "get", "(", "class_name", ")" ]
https://github.com/borglab/gtsam/blob/a5bee157efce6a0563704bce6a5d188c29817f39/wrap/docs/doc_template.py#L38-L48
moflow/moflow
2dfb27c799c90c6caf1477508eca3eec616ef7d2
bap/libtracewrap/libtrace/protobuf/python/google/protobuf/text_format.py
python
_Tokenizer.ConsumeInt64
(self)
return result
Consumes a signed 64bit integer number. Returns: The integer parsed. Raises: ParseError: If a signed 64bit integer couldn't be consumed.
Consumes a signed 64bit integer number.
[ "Consumes", "a", "signed", "64bit", "integer", "number", "." ]
def ConsumeInt64(self): """Consumes a signed 64bit integer number. Returns: The integer parsed. Raises: ParseError: If a signed 64bit integer couldn't be consumed. """ try: result = ParseInteger(self.token, is_signed=True, is_long=True) except ValueError, e: raise self....
[ "def", "ConsumeInt64", "(", "self", ")", ":", "try", ":", "result", "=", "ParseInteger", "(", "self", ".", "token", ",", "is_signed", "=", "True", ",", "is_long", "=", "True", ")", "except", "ValueError", ",", "e", ":", "raise", "self", ".", "_ParseErr...
https://github.com/moflow/moflow/blob/2dfb27c799c90c6caf1477508eca3eec616ef7d2/bap/libtracewrap/libtrace/protobuf/python/google/protobuf/text_format.py#L427-L441
echronos/echronos
c996f1d2c8af6c6536205eb319c1bf1d4d84569c
pylib/cmdline.py
python
add_commands_to_parser
(global_attributes, parser)
Configure an argparse.ArgumentParser with commands and options based on the @cmd decorators found in the global attributes.
Configure an argparse.ArgumentParser with commands and options based on the
[ "Configure", "an", "argparse", ".", "ArgumentParser", "with", "commands", "and", "options", "based", "on", "the" ]
def add_commands_to_parser(global_attributes, parser): """Configure an argparse.ArgumentParser with commands and options based on the @cmd decorators found in the global attributes.""" cmds = _get_cmds(global_attributes) _add_cmds_to_parser(cmds, parser)
[ "def", "add_commands_to_parser", "(", "global_attributes", ",", "parser", ")", ":", "cmds", "=", "_get_cmds", "(", "global_attributes", ")", "_add_cmds_to_parser", "(", "cmds", ",", "parser", ")" ]
https://github.com/echronos/echronos/blob/c996f1d2c8af6c6536205eb319c1bf1d4d84569c/pylib/cmdline.py#L94-L98
smilehao/xlua-framework
a03801538be2b0e92d39332d445b22caca1ef61f
ConfigData/trunk/tools/protobuf-2.5.0/protobuf-2.5.0/python/build/lib/google/protobuf/internal/python_message.py
python
_ExtensionDict._FindExtensionByName
(self, name)
return self._extended_message._extensions_by_name.get(name, None)
Tries to find a known extension with the specified name. Args: name: Extension full name. Returns: Extension field descriptor.
Tries to find a known extension with the specified name.
[ "Tries", "to", "find", "a", "known", "extension", "with", "the", "specified", "name", "." ]
def _FindExtensionByName(self, name): """Tries to find a known extension with the specified name. Args: name: Extension full name. Returns: Extension field descriptor. """ return self._extended_message._extensions_by_name.get(name, None)
[ "def", "_FindExtensionByName", "(", "self", ",", "name", ")", ":", "return", "self", ".", "_extended_message", ".", "_extensions_by_name", ".", "get", "(", "name", ",", "None", ")" ]
https://github.com/smilehao/xlua-framework/blob/a03801538be2b0e92d39332d445b22caca1ef61f/ConfigData/trunk/tools/protobuf-2.5.0/protobuf-2.5.0/python/build/lib/google/protobuf/internal/python_message.py#L1141-L1150
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py
python
Canvas.canvasx
(self, screenx, gridspacing=None)
return getdouble(self.tk.call( self._w, 'canvasx', screenx, gridspacing))
Return the canvas x coordinate of pixel position SCREENX rounded to nearest multiple of GRIDSPACING units.
Return the canvas x coordinate of pixel position SCREENX rounded to nearest multiple of GRIDSPACING units.
[ "Return", "the", "canvas", "x", "coordinate", "of", "pixel", "position", "SCREENX", "rounded", "to", "nearest", "multiple", "of", "GRIDSPACING", "units", "." ]
def canvasx(self, screenx, gridspacing=None): """Return the canvas x coordinate of pixel position SCREENX rounded to nearest multiple of GRIDSPACING units.""" return getdouble(self.tk.call( self._w, 'canvasx', screenx, gridspacing))
[ "def", "canvasx", "(", "self", ",", "screenx", ",", "gridspacing", "=", "None", ")", ":", "return", "getdouble", "(", "self", ".", "tk", ".", "call", "(", "self", ".", "_w", ",", "'canvasx'", ",", "screenx", ",", "gridspacing", ")", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/x86/toolchain/lib/python2.7/lib-tk/Tkinter.py#L2225-L2229
ricardoquesada/Spidermonkey
4a75ea2543408bd1b2c515aa95901523eeef7858
python/mozbuild/mozpack/packager/__init__.py
python
preprocess
(input, parser, defines={})
Preprocess the file-like input with the given defines, and send the preprocessed output line by line to the given parser.
Preprocess the file-like input with the given defines, and send the preprocessed output line by line to the given parser.
[ "Preprocess", "the", "file", "-", "like", "input", "with", "the", "given", "defines", "and", "send", "the", "preprocessed", "output", "line", "by", "line", "to", "the", "given", "parser", "." ]
def preprocess(input, parser, defines={}): ''' Preprocess the file-like input with the given defines, and send the preprocessed output line by line to the given parser. ''' pp = Preprocessor() pp.context.update(defines) pp.do_filter('substitution') pp.out = PreprocessorOutputWrapper(pp, ...
[ "def", "preprocess", "(", "input", ",", "parser", ",", "defines", "=", "{", "}", ")", ":", "pp", "=", "Preprocessor", "(", ")", "pp", ".", "context", ".", "update", "(", "defines", ")", "pp", ".", "do_filter", "(", "'substitution'", ")", "pp", ".", ...
https://github.com/ricardoquesada/Spidermonkey/blob/4a75ea2543408bd1b2c515aa95901523eeef7858/python/mozbuild/mozpack/packager/__init__.py#L181-L190
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scipy/scipy/signal/windows.py
python
kaiser
(M, beta, sym=True)
return _truncate(w, needs_trunc)
r"""Return a Kaiser window. The Kaiser window is a taper formed by using a Bessel function. Parameters ---------- M : int Number of points in the output window. If zero or less, an empty array is returned. beta : float Shape parameter, determines trade-off between main-lobe...
r"""Return a Kaiser window.
[ "r", "Return", "a", "Kaiser", "window", "." ]
def kaiser(M, beta, sym=True): r"""Return a Kaiser window. The Kaiser window is a taper formed by using a Bessel function. Parameters ---------- M : int Number of points in the output window. If zero or less, an empty array is returned. beta : float Shape parameter, det...
[ "def", "kaiser", "(", "M", ",", "beta", ",", "sym", "=", "True", ")", ":", "# Docstring adapted from NumPy's kaiser function", "if", "_len_guards", "(", "M", ")", ":", "return", "np", ".", "ones", "(", "M", ")", "M", ",", "needs_trunc", "=", "_extend", "...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scipy/scipy/signal/windows.py#L1042-L1157
apiaryio/drafter
4634ebd07f6c6f257cc656598ccd535492fdfb55
tools/gyp/pylib/gyp/generator/android.py
python
AndroidMkWriter.Write
(self, qualified_target, relative_target, base_path, output_filename, spec, configs, part_of_all)
return self.android_module
The main entry point: writes a .mk file for a single target. Arguments: qualified_target: target we're generating relative_target: qualified target name relative to the root base_path: path relative to source root we're building in, used to resolve target-relative paths out...
The main entry point: writes a .mk file for a single target.
[ "The", "main", "entry", "point", ":", "writes", "a", ".", "mk", "file", "for", "a", "single", "target", "." ]
def Write(self, qualified_target, relative_target, base_path, output_filename, spec, configs, part_of_all): """The main entry point: writes a .mk file for a single target. Arguments: qualified_target: target we're generating relative_target: qualified target name relative to the root ...
[ "def", "Write", "(", "self", ",", "qualified_target", ",", "relative_target", ",", "base_path", ",", "output_filename", ",", "spec", ",", "configs", ",", "part_of_all", ")", ":", "gyp", ".", "common", ".", "EnsureDirExists", "(", "output_filename", ")", "self"...
https://github.com/apiaryio/drafter/blob/4634ebd07f6c6f257cc656598ccd535492fdfb55/tools/gyp/pylib/gyp/generator/android.py#L135-L241
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py
python
_EscapeCppDefineForMSVS
(s)
return s
Escapes a CPP define so that it will reach the compiler unaltered.
Escapes a CPP define so that it will reach the compiler unaltered.
[ "Escapes", "a", "CPP", "define", "so", "that", "it", "will", "reach", "the", "compiler", "unaltered", "." ]
def _EscapeCppDefineForMSVS(s): """Escapes a CPP define so that it will reach the compiler unaltered.""" s = _EscapeEnvironmentVariableExpansion(s) s = _EscapeCommandLineArgumentForMSVS(s) s = _EscapeVCProjCommandLineArgListItem(s) # cl.exe replaces literal # characters with = in preprocesor definitions for ...
[ "def", "_EscapeCppDefineForMSVS", "(", "s", ")", ":", "s", "=", "_EscapeEnvironmentVariableExpansion", "(", "s", ")", "s", "=", "_EscapeCommandLineArgumentForMSVS", "(", "s", ")", "s", "=", "_EscapeVCProjCommandLineArgListItem", "(", "s", ")", "# cl.exe replaces liter...
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py#L763-L771
snap-stanford/snap-python
d53c51b0a26aa7e3e7400b014cdf728948fde80a
setup/snap.py
python
PNEANet.New
()
return _snap.PNEANet_New()
New() -> PNEANet
New() -> PNEANet
[ "New", "()", "-", ">", "PNEANet" ]
def New(): """New() -> PNEANet""" return _snap.PNEANet_New()
[ "def", "New", "(", ")", ":", "return", "_snap", ".", "PNEANet_New", "(", ")" ]
https://github.com/snap-stanford/snap-python/blob/d53c51b0a26aa7e3e7400b014cdf728948fde80a/setup/snap.py#L23024-L23026
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/ogl/_composit.py
python
DivisionShape.GetTopSide
(self)
return self._topSide
Return the division on the top side of this division.
Return the division on the top side of this division.
[ "Return", "the", "division", "on", "the", "top", "side", "of", "this", "division", "." ]
def GetTopSide(self): """Return the division on the top side of this division.""" return self._topSide
[ "def", "GetTopSide", "(", "self", ")", ":", "return", "self", ".", "_topSide" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/ogl/_composit.py#L936-L938
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib-tk/Tkinter.py
python
Canvas.coords
(self, *args)
return map(getdouble, self.tk.splitlist( self.tk.call((self._w, 'coords') + args)))
Return a list of coordinates for the item given in ARGS.
Return a list of coordinates for the item given in ARGS.
[ "Return", "a", "list", "of", "coordinates", "for", "the", "item", "given", "in", "ARGS", "." ]
def coords(self, *args): """Return a list of coordinates for the item given in ARGS.""" # XXX Should use _flatten on args return map(getdouble, self.tk.splitlist( self.tk.call((self._w, 'coords') + args)))
[ "def", "coords", "(", "self", ",", "*", "args", ")", ":", "# XXX Should use _flatten on args", "return", "map", "(", "getdouble", ",", "self", ".", "tk", ".", "splitlist", "(", "self", ".", "tk", ".", "call", "(", "(", "self", ".", "_w", ",", "'coords'...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi/toolchain/lib/python2.7/lib-tk/Tkinter.py#L2235-L2240
ros/geometry
63c3c7b404b8f390061bdadc5bc675e7ae5808be
tf/src/tf/transformations.py
python
euler_from_matrix
(matrix, axes='sxyz')
return ax, ay, az
Return Euler angles from rotation matrix for specified axis sequence. axes : One of 24 axis sequences as string or encoded tuple Note that many Euler angle triplets can describe one matrix. >>> R0 = euler_matrix(1, 2, 3, 'syxz') >>> al, be, ga = euler_from_matrix(R0, 'syxz') >>> R1 = euler_matrix...
Return Euler angles from rotation matrix for specified axis sequence.
[ "Return", "Euler", "angles", "from", "rotation", "matrix", "for", "specified", "axis", "sequence", "." ]
def euler_from_matrix(matrix, axes='sxyz'): """Return Euler angles from rotation matrix for specified axis sequence. axes : One of 24 axis sequences as string or encoded tuple Note that many Euler angle triplets can describe one matrix. >>> R0 = euler_matrix(1, 2, 3, 'syxz') >>> al, be, ga = eule...
[ "def", "euler_from_matrix", "(", "matrix", ",", "axes", "=", "'sxyz'", ")", ":", "try", ":", "firstaxis", ",", "parity", ",", "repetition", ",", "frame", "=", "_AXES2TUPLE", "[", "axes", ".", "lower", "(", ")", "]", "except", "(", "AttributeError", ",", ...
https://github.com/ros/geometry/blob/63c3c7b404b8f390061bdadc5bc675e7ae5808be/tf/src/tf/transformations.py#L1031-L1086
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/contrib/timeseries/python/timeseries/model_utils.py
python
_identity_metric_nested
(name, input_tensors)
return (nest.pack_sequence_as(input_tensors, value_tensors), control_flow_ops.group(*update_ops))
Create identity metrics for a nested tuple of Tensors.
Create identity metrics for a nested tuple of Tensors.
[ "Create", "identity", "metrics", "for", "a", "nested", "tuple", "of", "Tensors", "." ]
def _identity_metric_nested(name, input_tensors): """Create identity metrics for a nested tuple of Tensors.""" update_ops = [] value_tensors = [] for tensor_number, tensor in enumerate(nest.flatten(input_tensors)): value_tensor, update_op = _identity_metric_single( name="{}_{}".format(name, tensor_n...
[ "def", "_identity_metric_nested", "(", "name", ",", "input_tensors", ")", ":", "update_ops", "=", "[", "]", "value_tensors", "=", "[", "]", "for", "tensor_number", ",", "tensor", "in", "enumerate", "(", "nest", ".", "flatten", "(", "input_tensors", ")", ")",...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/contrib/timeseries/python/timeseries/model_utils.py#L158-L169
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/tools/gyp/pylib/gyp/ordered_dict.py
python
OrderedDict.viewvalues
(self)
return ValuesView(self)
od.viewvalues() -> an object providing a view on od's values
od.viewvalues() -> an object providing a view on od's values
[ "od", ".", "viewvalues", "()", "-", ">", "an", "object", "providing", "a", "view", "on", "od", "s", "values" ]
def viewvalues(self): "od.viewvalues() -> an object providing a view on od's values" return ValuesView(self)
[ "def", "viewvalues", "(", "self", ")", ":", "return", "ValuesView", "(", "self", ")" ]
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/tools/gyp/pylib/gyp/ordered_dict.py#L282-L284
macchina-io/macchina.io
ef24ba0e18379c3dd48fb84e6dbf991101cb8db0
platform/JS/V8/tools/gyp/pylib/gyp/msvs_emulation.py
python
MsvsSettings.GetCflagsC
(self, config)
return self._GetPchFlags(config, '.c')
Returns the flags that need to be added to .c compilations.
Returns the flags that need to be added to .c compilations.
[ "Returns", "the", "flags", "that", "need", "to", "be", "added", "to", ".", "c", "compilations", "." ]
def GetCflagsC(self, config): """Returns the flags that need to be added to .c compilations.""" config = self._TargetConfig(config) return self._GetPchFlags(config, '.c')
[ "def", "GetCflagsC", "(", "self", ",", "config", ")", ":", "config", "=", "self", ".", "_TargetConfig", "(", "config", ")", "return", "self", ".", "_GetPchFlags", "(", "config", ",", "'.c'", ")" ]
https://github.com/macchina-io/macchina.io/blob/ef24ba0e18379c3dd48fb84e6dbf991101cb8db0/platform/JS/V8/tools/gyp/pylib/gyp/msvs_emulation.py#L503-L506
sigmaai/self-driving-golf-cart
8d891600af3d851add27a10ae45cf3c2108bb87c
ros/src/segmentation/scripts/BirdsEyeView.py
python
BirdsEyeView.compute_BEV_look_up_table
(self, cropping_ul=None, cropping_size=None)
:param cropping_ul: :param cropping_size: :return:
[]
def compute_BEV_look_up_table(self, cropping_ul=None, cropping_size=None): """ :param cropping_ul: :param cropping_size: :return: """ # compute X,Z mesh from BEV params mgrid = np.lib.index_tricks.nd_grid() res = self.bevParams.bev_res x_vec = n...
[ "def", "compute_BEV_look_up_table", "(", "self", ",", "cropping_ul", "=", "None", ",", "cropping_size", "=", "None", ")", ":", "# compute X,Z mesh from BEV params", "mgrid", "=", "np", ".", "lib", ".", "index_tricks", ".", "nd_grid", "(", ")", "res", "=", "sel...
https://github.com/sigmaai/self-driving-golf-cart/blob/8d891600af3d851add27a10ae45cf3c2108bb87c/ros/src/segmentation/scripts/BirdsEyeView.py#L357-L408
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/plot.py
python
PlotCanvas.__init__
(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, name="plotCanvas")
Constructs a panel, which can be a child of a frame or any other non-control window
Constructs a panel, which can be a child of a frame or any other non-control window
[ "Constructs", "a", "panel", "which", "can", "be", "a", "child", "of", "a", "frame", "or", "any", "other", "non", "-", "control", "window" ]
def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, name="plotCanvas"): """Constructs a panel, which can be a child of a frame or any other non-control window""" wx.Panel.__init__(self, parent, id, pos, size, style, name) size...
[ "def", "__init__", "(", "self", ",", "parent", ",", "id", "=", "wx", ".", "ID_ANY", ",", "pos", "=", "wx", ".", "DefaultPosition", ",", "size", "=", "wx", ".", "DefaultSize", ",", "style", "=", "0", ",", "name", "=", "\"plotCanvas\"", ")", ":", "wx...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/plot.py#L550-L672
benoitsteiner/tensorflow-opencl
cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5
tensorflow/contrib/labeled_tensor/python/ops/ops.py
python
rename_axis
(labeled_tensor, existing_name, new_name, name=None)
Rename an axis of LabeledTensor. Args: labeled_tensor: The input tensor. existing_name: Name for an existing axis on the input. new_name: Desired replacement name. name: Optional op name. Returns: LabeledTensor with renamed axis. Raises: ValueError: If `existing_name` is not an axis on ...
Rename an axis of LabeledTensor.
[ "Rename", "an", "axis", "of", "LabeledTensor", "." ]
def rename_axis(labeled_tensor, existing_name, new_name, name=None): """Rename an axis of LabeledTensor. Args: labeled_tensor: The input tensor. existing_name: Name for an existing axis on the input. new_name: Desired replacement name. name: Optional op name. Returns: LabeledTensor with rena...
[ "def", "rename_axis", "(", "labeled_tensor", ",", "existing_name", ",", "new_name", ",", "name", "=", "None", ")", ":", "with", "ops", ".", "name_scope", "(", "name", ",", "'lt_rename_axis'", ",", "[", "labeled_tensor", "]", ")", "as", "scope", ":", "if", ...
https://github.com/benoitsteiner/tensorflow-opencl/blob/cb7cb40a57fde5cfd4731bc551e82a1e2fef43a5/tensorflow/contrib/labeled_tensor/python/ops/ops.py#L377-L398
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/aui.py
python
AuiToolBar.GetToolEnabled
(*args, **kwargs)
return _aui.AuiToolBar_GetToolEnabled(*args, **kwargs)
GetToolEnabled(self, int toolId) -> bool
GetToolEnabled(self, int toolId) -> bool
[ "GetToolEnabled", "(", "self", "int", "toolId", ")", "-", ">", "bool" ]
def GetToolEnabled(*args, **kwargs): """GetToolEnabled(self, int toolId) -> bool""" return _aui.AuiToolBar_GetToolEnabled(*args, **kwargs)
[ "def", "GetToolEnabled", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_aui", ".", "AuiToolBar_GetToolEnabled", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/aui.py#L2158-L2160
natanielruiz/android-yolo
1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f
jni-build/jni/include/tensorflow/python/ops/data_flow_ops.py
python
QueueBase.names
(self)
return self._names
The list of names for each component of a queue element.
The list of names for each component of a queue element.
[ "The", "list", "of", "names", "for", "each", "component", "of", "a", "queue", "element", "." ]
def names(self): """The list of names for each component of a queue element.""" return self._names
[ "def", "names", "(", "self", ")", ":", "return", "self", ".", "_names" ]
https://github.com/natanielruiz/android-yolo/blob/1ebb54f96a67a20ff83ddfc823ed83a13dc3a47f/jni-build/jni/include/tensorflow/python/ops/data_flow_ops.py#L211-L213
krishauser/Klampt
972cc83ea5befac3f653c1ba20f80155768ad519
Python/python2_version/klampt/src/robotsim.py
python
SimBody.getVelocity
(self)
return _robotsim.SimBody_getVelocity(self)
getVelocity(SimBody self) Returns the angular velocity and translational velocity.
getVelocity(SimBody self)
[ "getVelocity", "(", "SimBody", "self", ")" ]
def getVelocity(self): """ getVelocity(SimBody self) Returns the angular velocity and translational velocity. """ return _robotsim.SimBody_getVelocity(self)
[ "def", "getVelocity", "(", "self", ")", ":", "return", "_robotsim", ".", "SimBody_getVelocity", "(", "self", ")" ]
https://github.com/krishauser/Klampt/blob/972cc83ea5befac3f653c1ba20f80155768ad519/Python/python2_version/klampt/src/robotsim.py#L8008-L8017
google/motive
8e6e850de1f645a690920eaaaa6e6e57ca934cc4
disttools/push_package.py
python
main
()
return disttools.push_package.main(disttools.push_package.parse_arguments( project_dir=PROJECT_DIR, config_json=CONFIG_JSON))
See fplutil/disttools/push_package.py. Returns: 0 if successful, non-zero otherwise.
See fplutil/disttools/push_package.py.
[ "See", "fplutil", "/", "disttools", "/", "push_package", ".", "py", "." ]
def main(): """See fplutil/disttools/push_package.py. Returns: 0 if successful, non-zero otherwise. """ return disttools.push_package.main(disttools.push_package.parse_arguments( project_dir=PROJECT_DIR, config_json=CONFIG_JSON))
[ "def", "main", "(", ")", ":", "return", "disttools", ".", "push_package", ".", "main", "(", "disttools", ".", "push_package", ".", "parse_arguments", "(", "project_dir", "=", "PROJECT_DIR", ",", "config_json", "=", "CONFIG_JSON", ")", ")" ]
https://github.com/google/motive/blob/8e6e850de1f645a690920eaaaa6e6e57ca934cc4/disttools/push_package.py#L43-L50
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/ultimatelistctrl.py
python
UltimateListItemAttr.GetBackgroundColour
(self)
return self._colBack
Returns the currently set background colour.
Returns the currently set background colour.
[ "Returns", "the", "currently", "set", "background", "colour", "." ]
def GetBackgroundColour(self): """ Returns the currently set background colour. """ return self._colBack
[ "def", "GetBackgroundColour", "(", "self", ")", ":", "return", "self", ".", "_colBack" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/ultimatelistctrl.py#L1302-L1305
mongodb/mongo
d8ff665343ad29cf286ee2cf4a1960d29371937b
buildscripts/resmokelib/powercycle/powercycle.py
python
exit_handler
()
Exit handler to generate report.json, kill spawned processes, delete temporary files.
Exit handler to generate report.json, kill spawned processes, delete temporary files.
[ "Exit", "handler", "to", "generate", "report", ".", "json", "kill", "spawned", "processes", "delete", "temporary", "files", "." ]
def exit_handler(): """Exit handler to generate report.json, kill spawned processes, delete temporary files.""" if REPORT_JSON: LOGGER.debug("Exit handler: Updating report file %s", REPORT_JSON_FILE) try: test_start = REPORT_JSON["results"][0]["start"] test_end = int(tim...
[ "def", "exit_handler", "(", ")", ":", "if", "REPORT_JSON", ":", "LOGGER", ".", "debug", "(", "\"Exit handler: Updating report file %s\"", ",", "REPORT_JSON_FILE", ")", "try", ":", "test_start", "=", "REPORT_JSON", "[", "\"results\"", "]", "[", "0", "]", "[", "...
https://github.com/mongodb/mongo/blob/d8ff665343ad29cf286ee2cf4a1960d29371937b/buildscripts/resmokelib/powercycle/powercycle.py#L92-L141
rsummers11/CADLab
976ed959a0b5208bb4173127a7ef732ac73a9b6f
panreas_hnn/hed-globalweight/python/caffe/io.py
python
blobprotovector_str_to_arraylist
(str)
return [blobproto_to_array(blob) for blob in vec.blobs]
Converts a serialized blobprotovec to a list of arrays.
Converts a serialized blobprotovec to a list of arrays.
[ "Converts", "a", "serialized", "blobprotovec", "to", "a", "list", "of", "arrays", "." ]
def blobprotovector_str_to_arraylist(str): """Converts a serialized blobprotovec to a list of arrays. """ vec = caffe_pb2.BlobProtoVector() vec.ParseFromString(str) return [blobproto_to_array(blob) for blob in vec.blobs]
[ "def", "blobprotovector_str_to_arraylist", "(", "str", ")", ":", "vec", "=", "caffe_pb2", ".", "BlobProtoVector", "(", ")", "vec", ".", "ParseFromString", "(", "str", ")", "return", "[", "blobproto_to_array", "(", "blob", ")", "for", "blob", "in", "vec", "."...
https://github.com/rsummers11/CADLab/blob/976ed959a0b5208bb4173127a7ef732ac73a9b6f/panreas_hnn/hed-globalweight/python/caffe/io.py#L55-L60
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/scikit-learn/py2/sklearn/cluster/birch.py
python
Birch._global_clustering
(self, X=None)
Global clustering for the subclusters obtained after fitting
Global clustering for the subclusters obtained after fitting
[ "Global", "clustering", "for", "the", "subclusters", "obtained", "after", "fitting" ]
def _global_clustering(self, X=None): """ Global clustering for the subclusters obtained after fitting """ clusterer = self.n_clusters centroids = self.subcluster_centers_ compute_labels = (X is not None) and self.compute_labels # Preprocessing for the global clu...
[ "def", "_global_clustering", "(", "self", ",", "X", "=", "None", ")", ":", "clusterer", "=", "self", ".", "n_clusters", "centroids", "=", "self", ".", "subcluster_centers_", "compute_labels", "=", "(", "X", "is", "not", "None", ")", "and", "self", ".", "...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/scikit-learn/py2/sklearn/cluster/birch.py#L571-L611
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/idlelib/editor.py
python
EditorWindow.fill_menus
(self, menudefs=None, keydefs=None)
Add appropriate entries to the menus and submenus Menus that are absent or None in self.menudict are ignored.
Add appropriate entries to the menus and submenus
[ "Add", "appropriate", "entries", "to", "the", "menus", "and", "submenus" ]
def fill_menus(self, menudefs=None, keydefs=None): """Add appropriate entries to the menus and submenus Menus that are absent or None in self.menudict are ignored. """ if menudefs is None: menudefs = self.mainmenu.menudefs if keydefs is None: keydefs = se...
[ "def", "fill_menus", "(", "self", ",", "menudefs", "=", "None", ",", "keydefs", "=", "None", ")", ":", "if", "menudefs", "is", "None", ":", "menudefs", "=", "self", ".", "mainmenu", ".", "menudefs", "if", "keydefs", "is", "None", ":", "keydefs", "=", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/idlelib/editor.py#L1157-L1192
smilehao/xlua-framework
a03801538be2b0e92d39332d445b22caca1ef61f
ConfigData/trunk/tools/protobuf-2.5.0/protobuf-2.5.0/python/build/lib/google/protobuf/service.py
python
RpcController.StartCancel
(self)
Initiate cancellation. Advises the RPC system that the caller desires that the RPC call be canceled. The RPC system may cancel it immediately, may wait awhile and then cancel it, or may not even cancel the call at all. If the call is canceled, the "done" callback will still be called and the RpcContr...
Initiate cancellation.
[ "Initiate", "cancellation", "." ]
def StartCancel(self): """Initiate cancellation. Advises the RPC system that the caller desires that the RPC call be canceled. The RPC system may cancel it immediately, may wait awhile and then cancel it, or may not even cancel the call at all. If the call is canceled, the "done" callback will st...
[ "def", "StartCancel", "(", "self", ")", ":", "raise", "NotImplementedError" ]
https://github.com/smilehao/xlua-framework/blob/a03801538be2b0e92d39332d445b22caca1ef61f/ConfigData/trunk/tools/protobuf-2.5.0/protobuf-2.5.0/python/build/lib/google/protobuf/service.py#L154-L163
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py
python
_WasBuildFileModified
(build_file, data, files, toplevel_dir)
return False
Returns true if the build file |build_file| is either in |files| or one of the files included by |build_file| is in |files|. |toplevel_dir| is the root of the source tree.
Returns true if the build file |build_file| is either in |files| or one of the files included by |build_file| is in |files|. |toplevel_dir| is the root of the source tree.
[ "Returns", "true", "if", "the", "build", "file", "|build_file|", "is", "either", "in", "|files|", "or", "one", "of", "the", "files", "included", "by", "|build_file|", "is", "in", "|files|", ".", "|toplevel_dir|", "is", "the", "root", "of", "the", "source", ...
def _WasBuildFileModified(build_file, data, files, toplevel_dir): """Returns true if the build file |build_file| is either in |files| or one of the files included by |build_file| is in |files|. |toplevel_dir| is the root of the source tree.""" if _ToLocalPath(toplevel_dir, _ToGypPath(build_file)) in files: ...
[ "def", "_WasBuildFileModified", "(", "build_file", ",", "data", ",", "files", ",", "toplevel_dir", ")", ":", "if", "_ToLocalPath", "(", "toplevel_dir", ",", "_ToGypPath", "(", "build_file", ")", ")", "in", "files", ":", "if", "debug", ":", "print", "'gyp fil...
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py#L275-L297