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
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/random.py
python
SystemRandom.random
(self)
return (long(_hexlify(_urandom(7)), 16) >> 3) * RECIP_BPF
Get the next random number in the range [0.0, 1.0).
Get the next random number in the range [0.0, 1.0).
[ "Get", "the", "next", "random", "number", "in", "the", "range", "[", "0", ".", "0", "1", ".", "0", ")", "." ]
def random(self): """Get the next random number in the range [0.0, 1.0).""" return (long(_hexlify(_urandom(7)), 16) >> 3) * RECIP_BPF
[ "def", "random", "(", "self", ")", ":", "return", "(", "long", "(", "_hexlify", "(", "_urandom", "(", "7", ")", ")", ",", "16", ")", ">>", "3", ")", "*", "RECIP_BPF" ]
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/random.py#L801-L803
google/syzygy
8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5
syzygy/scripts/benchmark/optimize.py
python
_ProcessBBEntries
(log_files, output_dir)
return output_file
Summarize the basic-block entry counts in @p log_files to a JSON file in @p output_dir. The file path to the generated JSON file is returned.
Summarize the basic-block entry counts in @p log_files to a JSON file in @p output_dir.
[ "Summarize", "the", "basic", "-", "block", "entry", "counts", "in", "@p", "log_files", "to", "a", "JSON", "file", "in", "@p", "output_dir", "." ]
def _ProcessBBEntries(log_files, output_dir): """Summarize the basic-block entry counts in @p log_files to a JSON file in @p output_dir. The file path to the generated JSON file is returned. """ output_file = os.path.join(output_dir, 'bbentries.json') cmd = [ runner._GetExePath('grinder.exe'), # pyl...
[ "def", "_ProcessBBEntries", "(", "log_files", ",", "output_dir", ")", ":", "output_file", "=", "os", ".", "path", ".", "join", "(", "output_dir", ",", "'bbentries.json'", ")", "cmd", "=", "[", "runner", ".", "_GetExePath", "(", "'grinder.exe'", ")", ",", "...
https://github.com/google/syzygy/blob/8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5/syzygy/scripts/benchmark/optimize.py#L39-L55
rapidsai/cudf
d5b2448fc69f17509304d594f029d0df56984962
python/cudf/cudf/core/_base_index.py
python
BaseIndex.difference
(self, other, sort=None)
return difference
Return a new Index with elements from the index that are not in `other`. This is the set difference of two Index objects. Parameters ---------- other : Index or array-like sort : False or None, default None Whether to sort the resulting index. By default, th...
Return a new Index with elements from the index that are not in `other`.
[ "Return", "a", "new", "Index", "with", "elements", "from", "the", "index", "that", "are", "not", "in", "other", "." ]
def difference(self, other, sort=None): """ Return a new Index with elements from the index that are not in `other`. This is the set difference of two Index objects. Parameters ---------- other : Index or array-like sort : False or None, default None ...
[ "def", "difference", "(", "self", ",", "other", ",", "sort", "=", "None", ")", ":", "if", "sort", "not", "in", "{", "None", ",", "False", "}", ":", "raise", "ValueError", "(", "f\"The 'sort' keyword only takes the values \"", "f\"of None or False; {sort} was passe...
https://github.com/rapidsai/cudf/blob/d5b2448fc69f17509304d594f029d0df56984962/python/cudf/cudf/core/_base_index.py#L640-L695
raspberrypi/tools
13474ee775d0c5ec8a7da4fb0a9fa84187abfc87
arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/share/gdb/python/gdb/command/explore.py
python
ArrayExplorer.explore_type
(name, datatype, is_child)
return False
Function to explore array types. See Explorer.explore_type for more information.
Function to explore array types. See Explorer.explore_type for more information.
[ "Function", "to", "explore", "array", "types", ".", "See", "Explorer", ".", "explore_type", "for", "more", "information", "." ]
def explore_type(name, datatype, is_child): """Function to explore array types. See Explorer.explore_type for more information. """ target_type = datatype.target() print ("%s is an array of '%s'." % (name, str(target_type))) Explorer.explore_type("the array element of %s...
[ "def", "explore_type", "(", "name", ",", "datatype", ",", "is_child", ")", ":", "target_type", "=", "datatype", ".", "target", "(", ")", "print", "(", "\"%s is an array of '%s'.\"", "%", "(", "name", ",", "str", "(", "target_type", ")", ")", ")", "Explorer...
https://github.com/raspberrypi/tools/blob/13474ee775d0c5ec8a7da4fb0a9fa84187abfc87/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/share/gdb/python/gdb/command/explore.py#L355-L364
baidu-research/tensorflow-allreduce
66d5b855e90b0949e9fa5cca5599fd729a70e874
tensorflow/contrib/integrate/python/ops/odes.py
python
_scaled_dot_product
(scale, xs, ys, name=None)
Calculate a scaled, vector inner product between lists of Tensors.
Calculate a scaled, vector inner product between lists of Tensors.
[ "Calculate", "a", "scaled", "vector", "inner", "product", "between", "lists", "of", "Tensors", "." ]
def _scaled_dot_product(scale, xs, ys, name=None): """Calculate a scaled, vector inner product between lists of Tensors.""" with ops.name_scope(name, 'scaled_dot_product', [scale, xs, ys]) as scope: # Some of the parameters in our Butcher tableau include zeros. Using # _possibly_nonzero lets us avoid wasted...
[ "def", "_scaled_dot_product", "(", "scale", ",", "xs", ",", "ys", ",", "name", "=", "None", ")", ":", "with", "ops", ".", "name_scope", "(", "name", ",", "'scaled_dot_product'", ",", "[", "scale", ",", "xs", ",", "ys", "]", ")", "as", "scope", ":", ...
https://github.com/baidu-research/tensorflow-allreduce/blob/66d5b855e90b0949e9fa5cca5599fd729a70e874/tensorflow/contrib/integrate/python/ops/odes.py#L70-L78
Vipermdl/OCR_detection_IC15
8eebd353d6fac97f5832a138d7af3bd3071670db
model/model.py
python
FOTSModel.forward
(self, input)
:param input: :return:
[]
def forward(self, input): ''' :param input: :return: ''' score_map, geo_map = self.sharedConv.forward(input) if self.mode == 'detection': return score_map, geo_map, None elif self.mode == 'recognition': recog_map = self.recognizer(score_...
[ "def", "forward", "(", "self", ",", "input", ")", ":", "score_map", ",", "geo_map", "=", "self", ".", "sharedConv", ".", "forward", "(", "input", ")", "if", "self", ".", "mode", "==", "'detection'", ":", "return", "score_map", ",", "geo_map", ",", "Non...
https://github.com/Vipermdl/OCR_detection_IC15/blob/8eebd353d6fac97f5832a138d7af3bd3071670db/model/model.py#L20-L33
ceph/ceph
959663007321a369c83218414a29bd9dbc8bda3a
src/pybind/mgr/cephadm/services/cephadmservice.py
python
CephService.get_auth_entity
(self, daemon_id: str, host: str = "")
Map the daemon id to a cephx keyring entity name
Map the daemon id to a cephx keyring entity name
[ "Map", "the", "daemon", "id", "to", "a", "cephx", "keyring", "entity", "name" ]
def get_auth_entity(self, daemon_id: str, host: str = "") -> AuthEntity: """ Map the daemon id to a cephx keyring entity name """ # despite this mapping entity names to daemons, self.TYPE within # the CephService class refers to service types, not daemon types if self.TYP...
[ "def", "get_auth_entity", "(", "self", ",", "daemon_id", ":", "str", ",", "host", ":", "str", "=", "\"\"", ")", "->", "AuthEntity", ":", "# despite this mapping entity names to daemons, self.TYPE within", "# the CephService class refers to service types, not daemon types", "i...
https://github.com/ceph/ceph/blob/959663007321a369c83218414a29bd9dbc8bda3a/src/pybind/mgr/cephadm/services/cephadmservice.py#L447-L465
CanalTP/navitia
cb84ce9859070187e708818b058e6a7e0b7f891b
source/tyr/tyr/validations.py
python
datetime_format
(value)
return datetime.strptime(value, "%Y%m%dT%H%M%SZ")
Parse a valid looking date in the format YYYYmmddTHHmmss
Parse a valid looking date in the format YYYYmmddTHHmmss
[ "Parse", "a", "valid", "looking", "date", "in", "the", "format", "YYYYmmddTHHmmss" ]
def datetime_format(value): """Parse a valid looking date in the format YYYYmmddTHHmmss""" return datetime.strptime(value, "%Y%m%dT%H%M%SZ")
[ "def", "datetime_format", "(", "value", ")", ":", "return", "datetime", ".", "strptime", "(", "value", ",", "\"%Y%m%dT%H%M%SZ\"", ")" ]
https://github.com/CanalTP/navitia/blob/cb84ce9859070187e708818b058e6a7e0b7f891b/source/tyr/tyr/validations.py#L10-L13
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/xml/sax/xmlreader.py
python
InputSource.setEncoding
(self, encoding)
Sets the character encoding of this InputSource. The encoding must be a string acceptable for an XML encoding declaration (see section 4.3.3 of the XML recommendation). The encoding attribute of the InputSource is ignored if the InputSource also contains a character stream.
Sets the character encoding of this InputSource.
[ "Sets", "the", "character", "encoding", "of", "this", "InputSource", "." ]
def setEncoding(self, encoding): """Sets the character encoding of this InputSource. The encoding must be a string acceptable for an XML encoding declaration (see section 4.3.3 of the XML recommendation). The encoding attribute of the InputSource is ignored if the InputSource a...
[ "def", "setEncoding", "(", "self", ",", "encoding", ")", ":", "self", ".", "__encoding", "=", "encoding" ]
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/xml/sax/xmlreader.py#L226-L234
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/tools/python3/src/Lib/_osx_support.py
python
compiler_fixup
(compiler_so, cc_args)
return compiler_so
This function will strip '-isysroot PATH' and '-arch ARCH' from the compile flags if the user has specified one them in extra_compile_flags. This is needed because '-arch ARCH' adds another architecture to the build, without a way to remove an architecture. Furthermore GCC will barf if multiple '-isysr...
This function will strip '-isysroot PATH' and '-arch ARCH' from the compile flags if the user has specified one them in extra_compile_flags.
[ "This", "function", "will", "strip", "-", "isysroot", "PATH", "and", "-", "arch", "ARCH", "from", "the", "compile", "flags", "if", "the", "user", "has", "specified", "one", "them", "in", "extra_compile_flags", "." ]
def compiler_fixup(compiler_so, cc_args): """ This function will strip '-isysroot PATH' and '-arch ARCH' from the compile flags if the user has specified one them in extra_compile_flags. This is needed because '-arch ARCH' adds another architecture to the build, without a way to remove an architect...
[ "def", "compiler_fixup", "(", "compiler_so", ",", "cc_args", ")", ":", "stripArch", "=", "stripSysroot", "=", "False", "compiler_so", "=", "list", "(", "compiler_so", ")", "if", "not", "_supports_universal_builds", "(", ")", ":", "# OSX before 10.4.0, these don't su...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/tools/python3/src/Lib/_osx_support.py#L358-L436
nyuwireless-unipd/ns3-mmwave
4ff9e87e8079764e04cbeccd8e85bff15ae16fb3
src/visualizer/visualizer/ipython_view.py
python
IPythonView._processLine
(self)
! Process current command line. @return none
! Process current command line.
[ "!", "Process", "current", "command", "line", "." ]
def _processLine(self): """! Process current command line. @return none """ self.history_pos = 0 self.execute() rv = self.cout.getvalue() if rv: rv = rv.strip('\n') self.showReturned(rv) self.cout.truncate(0) self.cout.seek(0)
[ "def", "_processLine", "(", "self", ")", ":", "self", ".", "history_pos", "=", "0", "self", ".", "execute", "(", ")", "rv", "=", "self", ".", "cout", ".", "getvalue", "(", ")", "if", "rv", ":", "rv", "=", "rv", ".", "strip", "(", "'\\n'", ")", ...
https://github.com/nyuwireless-unipd/ns3-mmwave/blob/4ff9e87e8079764e04cbeccd8e85bff15ae16fb3/src/visualizer/visualizer/ipython_view.py#L646-L657
neoml-lib/neoml
a0d370fba05269a1b2258cef126f77bbd2054a3e
NeoML/Python/neoml/Dnn/Solver.py
python
NesterovGradient.epsilon
(self, value)
Sets the small value used to avoid division by zero when calculating second moment.
Sets the small value used to avoid division by zero when calculating second moment.
[ "Sets", "the", "small", "value", "used", "to", "avoid", "division", "by", "zero", "when", "calculating", "second", "moment", "." ]
def epsilon(self, value): """Sets the small value used to avoid division by zero when calculating second moment. """ self._internal.set_epsilon(value)
[ "def", "epsilon", "(", "self", ",", "value", ")", ":", "self", ".", "_internal", ".", "set_epsilon", "(", "value", ")" ]
https://github.com/neoml-lib/neoml/blob/a0d370fba05269a1b2258cef126f77bbd2054a3e/NeoML/Python/neoml/Dnn/Solver.py#L334-L338
srbcheema1/Algo_Ds
d69ddbb67cd8135119abab254dfacb5784bf3822
Data Structures/Python/Graphs/Graph.py
python
Graph.remove
(self, node)
Remove all references to node
Remove all references to node
[ "Remove", "all", "references", "to", "node" ]
def remove(self, node): """ Remove all references to node """ for n, cxns in self._graph.iteritems(): try: cxns.remove(node) except KeyError: pass try: del self._graph[node] except KeyError: pass
[ "def", "remove", "(", "self", ",", "node", ")", ":", "for", "n", ",", "cxns", "in", "self", ".", "_graph", ".", "iteritems", "(", ")", ":", "try", ":", "cxns", ".", "remove", "(", "node", ")", "except", "KeyError", ":", "pass", "try", ":", "del",...
https://github.com/srbcheema1/Algo_Ds/blob/d69ddbb67cd8135119abab254dfacb5784bf3822/Data Structures/Python/Graphs/Graph.py#L25-L36
RLBot/RLBot
34332b12cf158b3ef8dbf174ae67c53683368a9d
src/main/python/rlbot/agents/base_agent.py
python
BaseAgent.get_output
(self, game_tick_packet: GameTickPacket)
return SimpleControllerState()
Where all the logic of your bot gets its input and returns its output. :param game_tick_packet: see https://github.com/drssoccer55/RLBot/wiki/Input-and-Output-Data-(current) :return: [throttle, steer, pitch, yaw, roll, jump, boost, handbrake]
Where all the logic of your bot gets its input and returns its output. :param game_tick_packet: see https://github.com/drssoccer55/RLBot/wiki/Input-and-Output-Data-(current) :return: [throttle, steer, pitch, yaw, roll, jump, boost, handbrake]
[ "Where", "all", "the", "logic", "of", "your", "bot", "gets", "its", "input", "and", "returns", "its", "output", ".", ":", "param", "game_tick_packet", ":", "see", "https", ":", "//", "github", ".", "com", "/", "drssoccer55", "/", "RLBot", "/", "wiki", ...
def get_output(self, game_tick_packet: GameTickPacket) -> SimpleControllerState: """ Where all the logic of your bot gets its input and returns its output. :param game_tick_packet: see https://github.com/drssoccer55/RLBot/wiki/Input-and-Output-Data-(current) :return: [throttle, steer, pi...
[ "def", "get_output", "(", "self", ",", "game_tick_packet", ":", "GameTickPacket", ")", "->", "SimpleControllerState", ":", "return", "SimpleControllerState", "(", ")" ]
https://github.com/RLBot/RLBot/blob/34332b12cf158b3ef8dbf174ae67c53683368a9d/src/main/python/rlbot/agents/base_agent.py#L113-L119
giuspen/cherrytree
84712f206478fcf9acf30174009ad28c648c6344
pygtk2/modules/core.py
python
CherryTree.toggle_tree_node_expanded_collapsed
(self, *args)
Toggle Selected Tree Node Expanded/Collapsed
Toggle Selected Tree Node Expanded/Collapsed
[ "Toggle", "Selected", "Tree", "Node", "Expanded", "/", "Collapsed" ]
def toggle_tree_node_expanded_collapsed(self, *args): """Toggle Selected Tree Node Expanded/Collapsed""" if not self.is_there_selected_node_or_error(): return if self.treeview.row_expanded(self.treestore.get_path(self.curr_tree_iter)): self.treeview.collapse_row(self.treestore.get_pa...
[ "def", "toggle_tree_node_expanded_collapsed", "(", "self", ",", "*", "args", ")", ":", "if", "not", "self", ".", "is_there_selected_node_or_error", "(", ")", ":", "return", "if", "self", ".", "treeview", ".", "row_expanded", "(", "self", ".", "treestore", ".",...
https://github.com/giuspen/cherrytree/blob/84712f206478fcf9acf30174009ad28c648c6344/pygtk2/modules/core.py#L781-L787
devsisters/libquic
8954789a056d8e7d5fcb6452fd1572ca57eb5c4e
src/third_party/protobuf/python/google/protobuf/internal/enum_type_wrapper.py
python
EnumTypeWrapper.Name
(self, number)
Returns a string containing the name of an enum value.
Returns a string containing the name of an enum value.
[ "Returns", "a", "string", "containing", "the", "name", "of", "an", "enum", "value", "." ]
def Name(self, number): """Returns a string containing the name of an enum value.""" if number in self._enum_type.values_by_number: return self._enum_type.values_by_number[number].name raise ValueError('Enum %s has no name defined for value %d' % ( self._enum_type.name, number))
[ "def", "Name", "(", "self", ",", "number", ")", ":", "if", "number", "in", "self", ".", "_enum_type", ".", "values_by_number", ":", "return", "self", ".", "_enum_type", ".", "values_by_number", "[", "number", "]", ".", "name", "raise", "ValueError", "(", ...
https://github.com/devsisters/libquic/blob/8954789a056d8e7d5fcb6452fd1572ca57eb5c4e/src/third_party/protobuf/python/google/protobuf/internal/enum_type_wrapper.py#L51-L56
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/gsutil/third_party/boto/boto/rds/__init__.py
python
RDSConnection.get_all_dbinstances
(self, instance_id=None, max_records=None, marker=None)
return self.get_list('DescribeDBInstances', params, [('DBInstance', DBInstance)])
Retrieve all the DBInstances in your account. :type instance_id: str :param instance_id: DB Instance identifier. If supplied, only information this instance will be returned. Otherwise, info about all DB Instances will ...
Retrieve all the DBInstances in your account.
[ "Retrieve", "all", "the", "DBInstances", "in", "your", "account", "." ]
def get_all_dbinstances(self, instance_id=None, max_records=None, marker=None): """ Retrieve all the DBInstances in your account. :type instance_id: str :param instance_id: DB Instance identifier. If supplied, only information thi...
[ "def", "get_all_dbinstances", "(", "self", ",", "instance_id", "=", "None", ",", "max_records", "=", "None", ",", "marker", "=", "None", ")", ":", "params", "=", "{", "}", "if", "instance_id", ":", "params", "[", "'DBInstanceIdentifier'", "]", "=", "instan...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/gsutil/third_party/boto/boto/rds/__init__.py#L105-L136
apple/swift-lldb
d74be846ef3e62de946df343e8c234bde93a8912
scripts/Python/static-binding/lldb.py
python
SBValue.GetChildMemberWithName
(self, *args)
return _lldb.SBValue_GetChildMemberWithName(self, *args)
GetChildMemberWithName(SBValue self, char const * name) -> SBValue GetChildMemberWithName(SBValue self, char const * name, lldb::DynamicValueType use_dynamic) -> SBValue Returns the child member value. Matches child members of this object and child members of any base classes. ...
GetChildMemberWithName(SBValue self, char const * name) -> SBValue GetChildMemberWithName(SBValue self, char const * name, lldb::DynamicValueType use_dynamic) -> SBValue
[ "GetChildMemberWithName", "(", "SBValue", "self", "char", "const", "*", "name", ")", "-", ">", "SBValue", "GetChildMemberWithName", "(", "SBValue", "self", "char", "const", "*", "name", "lldb", "::", "DynamicValueType", "use_dynamic", ")", "-", ">", "SBValue" ]
def GetChildMemberWithName(self, *args): """ GetChildMemberWithName(SBValue self, char const * name) -> SBValue GetChildMemberWithName(SBValue self, char const * name, lldb::DynamicValueType use_dynamic) -> SBValue Returns the child member value. Matches child members of this ...
[ "def", "GetChildMemberWithName", "(", "self", ",", "*", "args", ")", ":", "return", "_lldb", ".", "SBValue_GetChildMemberWithName", "(", "self", ",", "*", "args", ")" ]
https://github.com/apple/swift-lldb/blob/d74be846ef3e62de946df343e8c234bde93a8912/scripts/Python/static-binding/lldb.py#L14482-L14504
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/third_party/webapp2/webapp2.py
python
BaseRoute.get_routes
(self)
Generator to get all routes from a route. :yields: This route or all nested routes that it contains.
Generator to get all routes from a route.
[ "Generator", "to", "get", "all", "routes", "from", "a", "route", "." ]
def get_routes(self): """Generator to get all routes from a route. :yields: This route or all nested routes that it contains. """ yield self
[ "def", "get_routes", "(", "self", ")", ":", "yield", "self" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/third_party/webapp2/webapp2.py#L796-L802
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
qt/python/mantidqtinterfaces/mantidqtinterfaces/drill/view/DrillSettingsDialog.py
python
DrillSettingsDialog.__init__
(self, presenter, parent=None)
Initialize ths dialog. Connect the static buttons.
Initialize ths dialog. Connect the static buttons.
[ "Initialize", "ths", "dialog", ".", "Connect", "the", "static", "buttons", "." ]
def __init__(self, presenter, parent=None): """ Initialize ths dialog. Connect the static buttons. """ super(DrillSettingsDialog, self).__init__(parent) self.here = os.path.dirname(os.path.realpath(__file__)) # setup ui uic.loadUi(os.path.join(self.here, self.ui_...
[ "def", "__init__", "(", "self", ",", "presenter", ",", "parent", "=", "None", ")", ":", "super", "(", "DrillSettingsDialog", ",", "self", ")", ".", "__init__", "(", "parent", ")", "self", ".", "here", "=", "os", ".", "path", ".", "dirname", "(", "os"...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/qt/python/mantidqtinterfaces/mantidqtinterfaces/drill/view/DrillSettingsDialog.py#L187-L207
sdhash/sdhash
b9eff63e4e5867e910f41fd69032bbb1c94a2a5e
sdhash-ui/cherrypy/lib/sessions.py
python
Session.load
(self)
Copy stored session data into this session instance.
Copy stored session data into this session instance.
[ "Copy", "stored", "session", "data", "into", "this", "session", "instance", "." ]
def load(self): """Copy stored session data into this session instance.""" data = self._load() # data is either None or a tuple (session_data, expiration_time) if data is None or data[1] < self.now(): if self.debug: cherrypy.log('Expired session, flushing data...
[ "def", "load", "(", "self", ")", ":", "data", "=", "self", ".", "_load", "(", ")", "# data is either None or a tuple (session_data, expiration_time)", "if", "data", "is", "None", "or", "data", "[", "1", "]", "<", "self", ".", "now", "(", ")", ":", "if", ...
https://github.com/sdhash/sdhash/blob/b9eff63e4e5867e910f41fd69032bbb1c94a2a5e/sdhash-ui/cherrypy/lib/sessions.py#L232-L255
BitMEX/api-connectors
37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812
auto-generated/python/swagger_client/models/instrument.py
python
Instrument.lot_size
(self)
return self._lot_size
Gets the lot_size of this Instrument. # noqa: E501 :return: The lot_size of this Instrument. # noqa: E501 :rtype: float
Gets the lot_size of this Instrument. # noqa: E501
[ "Gets", "the", "lot_size", "of", "this", "Instrument", ".", "#", "noqa", ":", "E501" ]
def lot_size(self): """Gets the lot_size of this Instrument. # noqa: E501 :return: The lot_size of this Instrument. # noqa: E501 :rtype: float """ return self._lot_size
[ "def", "lot_size", "(", "self", ")", ":", "return", "self", ".", "_lot_size" ]
https://github.com/BitMEX/api-connectors/blob/37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812/auto-generated/python/swagger_client/models/instrument.py#L1129-L1136
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/OpenSCAD/importCSG.py
python
p_union_action
(p)
union_action : union LPAREN RPAREN OBRACE block_list EBRACE
union_action : union LPAREN RPAREN OBRACE block_list EBRACE
[ "union_action", ":", "union", "LPAREN", "RPAREN", "OBRACE", "block_list", "EBRACE" ]
def p_union_action(p): 'union_action : union LPAREN RPAREN OBRACE block_list EBRACE' if printverbose: print("union") newpart = fuse(p[5],p[1]) if printverbose: print("Push Union Result") p[0] = [newpart] if printverbose: print("End Union")
[ "def", "p_union_action", "(", "p", ")", ":", "if", "printverbose", ":", "print", "(", "\"union\"", ")", "newpart", "=", "fuse", "(", "p", "[", "5", "]", ",", "p", "[", "1", "]", ")", "if", "printverbose", ":", "print", "(", "\"Push Union Result\"", "...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/OpenSCAD/importCSG.py#L626-L632
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/msw/_misc.py
python
FileDataObject.__init__
(self, *args, **kwargs)
__init__(self) -> FileDataObject
__init__(self) -> FileDataObject
[ "__init__", "(", "self", ")", "-", ">", "FileDataObject" ]
def __init__(self, *args, **kwargs): """__init__(self) -> FileDataObject""" _misc_.FileDataObject_swiginit(self,_misc_.new_FileDataObject(*args, **kwargs))
[ "def", "__init__", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "_misc_", ".", "FileDataObject_swiginit", "(", "self", ",", "_misc_", ".", "new_FileDataObject", "(", "*", "args", ",", "*", "*", "kwargs", ")", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/msw/_misc.py#L5336-L5338
BlzFans/wke
b0fa21158312e40c5fbd84682d643022b6c34a93
cygwin/lib/python2.6/logging/handlers.py
python
SysLogHandler.mapPriority
(self, levelName)
return self.priority_map.get(levelName, "warning")
Map a logging level name to a key in the priority_names map. This is useful in two scenarios: when custom levels are being used, and in the case where you can't do a straightforward mapping by lowercasing the logging level name because of locale- specific issues (see SF #1524081).
Map a logging level name to a key in the priority_names map. This is useful in two scenarios: when custom levels are being used, and in the case where you can't do a straightforward mapping by lowercasing the logging level name because of locale- specific issues (see SF #1524081).
[ "Map", "a", "logging", "level", "name", "to", "a", "key", "in", "the", "priority_names", "map", ".", "This", "is", "useful", "in", "two", "scenarios", ":", "when", "custom", "levels", "are", "being", "used", "and", "in", "the", "case", "where", "you", ...
def mapPriority(self, levelName): """ Map a logging level name to a key in the priority_names map. This is useful in two scenarios: when custom levels are being used, and in the case where you can't do a straightforward mapping by lowercasing the logging level name because of loc...
[ "def", "mapPriority", "(", "self", ",", "levelName", ")", ":", "return", "self", ".", "priority_map", ".", "get", "(", "levelName", ",", "\"warning\"", ")" ]
https://github.com/BlzFans/wke/blob/b0fa21158312e40c5fbd84682d643022b6c34a93/cygwin/lib/python2.6/logging/handlers.py#L754-L762
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/propgrid.py
python
PGChoices.Assign
(*args, **kwargs)
return _propgrid.PGChoices_Assign(*args, **kwargs)
Assign(self, PGChoices a)
Assign(self, PGChoices a)
[ "Assign", "(", "self", "PGChoices", "a", ")" ]
def Assign(*args, **kwargs): """Assign(self, PGChoices a)""" return _propgrid.PGChoices_Assign(*args, **kwargs)
[ "def", "Assign", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_propgrid", ".", "PGChoices_Assign", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/propgrid.py#L247-L249
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/compat/_inspect.py
python
formatargvalues
(args, varargs, varkw, locals, formatarg=str, formatvarargs=lambda name: '*' + name, formatvarkw=lambda name: '**' + name, formatvalue=lambda value: '=' + repr(value), join=joinseq)
return '(' + ', '.join(specs) + ')'
Format an argument spec from the 4 values returned by getargvalues. The first four arguments are (args, varargs, varkw, locals). The next four arguments are the corresponding optional formatting functions that are called to turn names and values into strings. The ninth argument is an optional functio...
Format an argument spec from the 4 values returned by getargvalues.
[ "Format", "an", "argument", "spec", "from", "the", "4", "values", "returned", "by", "getargvalues", "." ]
def formatargvalues(args, varargs, varkw, locals, formatarg=str, formatvarargs=lambda name: '*' + name, formatvarkw=lambda name: '**' + name, formatvalue=lambda value: '=' + repr(value), join=joinseq): """Format an a...
[ "def", "formatargvalues", "(", "args", ",", "varargs", ",", "varkw", ",", "locals", ",", "formatarg", "=", "str", ",", "formatvarargs", "=", "lambda", "name", ":", "'*'", "+", "name", ",", "formatvarkw", "=", "lambda", "name", ":", "'**'", "+", "name", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numpy/compat/_inspect.py#L170-L193
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/compiler/xla/experimental/xla_sharding/xla_sharding.py
python
Sharding.tile
(cls, tile_assignment)
return Sharding( proto=xla_data_pb2.OpSharding( type=xla_data_pb2.OpSharding.OTHER, tile_assignment_dimensions=dims, tile_assignment_devices=list(flattened_devices)))
Returns a Tiled sharding attribute. This causes an op to be partially computed on multiple cores in the XLA device. Args: tile_assignment: An np.ndarray describing the topology of the tiling and which device will compute which part of the topology. Raises: TypeError: tile_assignme...
Returns a Tiled sharding attribute.
[ "Returns", "a", "Tiled", "sharding", "attribute", "." ]
def tile(cls, tile_assignment): """Returns a Tiled sharding attribute. This causes an op to be partially computed on multiple cores in the XLA device. Args: tile_assignment: An np.ndarray describing the topology of the tiling and which device will compute which part of the topology. ...
[ "def", "tile", "(", "cls", ",", "tile_assignment", ")", ":", "if", "not", "isinstance", "(", "tile_assignment", ",", "_np", ".", "ndarray", ")", ":", "raise", "TypeError", "(", "'Tile assignment must be of type np.ndarray'", ")", "dims", "=", "list", "(", "til...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/compiler/xla/experimental/xla_sharding/xla_sharding.py#L71-L96
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/dataview.py
python
DataViewIconText.SetIcon
(*args, **kwargs)
return _dataview.DataViewIconText_SetIcon(*args, **kwargs)
SetIcon(self, Icon icon)
SetIcon(self, Icon icon)
[ "SetIcon", "(", "self", "Icon", "icon", ")" ]
def SetIcon(*args, **kwargs): """SetIcon(self, Icon icon)""" return _dataview.DataViewIconText_SetIcon(*args, **kwargs)
[ "def", "SetIcon", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_dataview", ".", "DataViewIconText_SetIcon", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/dataview.py#L1311-L1313
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/telemetry/third_party/pyfakefs/pyfakefs/fake_filesystem.py
python
FakeOsModule.makedirs
(self, dir_name, mode=PERM_DEF)
Create a leaf Fake directory + create any non-existent parent dirs. Args: dir_name: (str) Name of directory to create. mode: (int) Mode to create directory (and any necessary parent directories) with. This argument defaults to 0o777. The umask is applied to this mode. Raises: ...
Create a leaf Fake directory + create any non-existent parent dirs.
[ "Create", "a", "leaf", "Fake", "directory", "+", "create", "any", "non", "-", "existent", "parent", "dirs", "." ]
def makedirs(self, dir_name, mode=PERM_DEF): """Create a leaf Fake directory + create any non-existent parent dirs. Args: dir_name: (str) Name of directory to create. mode: (int) Mode to create directory (and any necessary parent directories) with. This argument defaults to 0o777. The umas...
[ "def", "makedirs", "(", "self", ",", "dir_name", ",", "mode", "=", "PERM_DEF", ")", ":", "dir_name", "=", "self", ".", "filesystem", ".", "NormalizePath", "(", "dir_name", ")", "path_components", "=", "self", ".", "filesystem", ".", "GetPathComponents", "(",...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/telemetry/third_party/pyfakefs/pyfakefs/fake_filesystem.py#L1665-L1693
chromiumembedded/cef
80caf947f3fe2210e5344713c5281d8af9bdc295
tools/yapf/yapf/yapflib/format_decision_state.py
python
FormatDecisionState.MoveStateToNextToken
(self)
return penalty
Calculate format decision state information and move onto the next token. Before moving onto the next token, we first calculate the format decision state given the current token and its formatting decisions. Then the format decision state is set up so that the next token can be added. Returns: T...
Calculate format decision state information and move onto the next token.
[ "Calculate", "format", "decision", "state", "information", "and", "move", "onto", "the", "next", "token", "." ]
def MoveStateToNextToken(self): """Calculate format decision state information and move onto the next token. Before moving onto the next token, we first calculate the format decision state given the current token and its formatting decisions. Then the format decision state is set up so that the next to...
[ "def", "MoveStateToNextToken", "(", "self", ")", ":", "current", "=", "self", ".", "next_token", "if", "not", "current", ".", "OpensScope", "(", ")", "and", "not", "current", ".", "ClosesScope", "(", ")", ":", "self", ".", "lowest_level_on_line", "=", "min...
https://github.com/chromiumembedded/cef/blob/80caf947f3fe2210e5344713c5281d8af9bdc295/tools/yapf/yapf/yapflib/format_decision_state.py#L578-L629
AcademySoftwareFoundation/OpenColorIO
73508eb5230374df8d96147a0627c015d359a641
src/apps/pyociodisplay/pyociodisplay.py
python
ImagePlane.load_image
(self, image_path)
Load an image into the image plane texture. :param str image_path: Image file path :return: Input color space name :rtype: str
Load an image into the image plane texture.
[ "Load", "an", "image", "into", "the", "image", "plane", "texture", "." ]
def load_image(self, image_path): """ Load an image into the image plane texture. :param str image_path: Image file path :return: Input color space name :rtype: str """ config = ocio.GetCurrentConfig() # Get input color space (file rule) cs_name,...
[ "def", "load_image", "(", "self", ",", "image_path", ")", ":", "config", "=", "ocio", ".", "GetCurrentConfig", "(", ")", "# Get input color space (file rule)", "cs_name", ",", "rule_idx", "=", "config", ".", "getColorSpaceFromFilepath", "(", "image_path", ")", "if...
https://github.com/AcademySoftwareFoundation/OpenColorIO/blob/73508eb5230374df8d96147a0627c015d359a641/src/apps/pyociodisplay/pyociodisplay.py#L330-L408
PaddlePaddle/Paddle
1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c
python/paddle/fluid/dygraph/jit.py
python
load
(path, **configs)
return TranslatedLayer._construct(model_path, config)
:api_attr: imperative Load model saved by ``paddle.jit.save`` or ``paddle.static.save_inference_model`` or paddle 1.x API ``paddle.fluid.io.save_inference_model`` as ``paddle.jit.TranslatedLayer``, then performing inference or fine-tune training. .. note:: If you load model saved by ``paddle.s...
:api_attr: imperative
[ ":", "api_attr", ":", "imperative" ]
def load(path, **configs): """ :api_attr: imperative Load model saved by ``paddle.jit.save`` or ``paddle.static.save_inference_model`` or paddle 1.x API ``paddle.fluid.io.save_inference_model`` as ``paddle.jit.TranslatedLayer``, then performing inference or fine-tune training. .. note:: ...
[ "def", "load", "(", "path", ",", "*", "*", "configs", ")", ":", "# 1. construct correct config", "config", "=", "_parse_load_config", "(", "configs", ")", "model_path", ",", "config", "=", "_build_load_path_and_config", "(", "path", ",", "config", ")", "return",...
https://github.com/PaddlePaddle/Paddle/blob/1252f4bb3e574df80aa6d18c7ddae1b3a90bd81c/python/paddle/fluid/dygraph/jit.py#L1002-L1227
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/windows/Lib/idlelib/editor.py
python
EditorWindow.help_dialog
(self, event=None)
return "break"
Handle Help 'IDLE Help' event.
Handle Help 'IDLE Help' event.
[ "Handle", "Help", "IDLE", "Help", "event", "." ]
def help_dialog(self, event=None): "Handle Help 'IDLE Help' event." # Synchronize with macosx.overrideRootMenu.help_dialog. if self.root: parent = self.root else: parent = self.top help.show_idlehelp(parent) return "break"
[ "def", "help_dialog", "(", "self", ",", "event", "=", "None", ")", ":", "# Synchronize with macosx.overrideRootMenu.help_dialog.", "if", "self", ".", "root", ":", "parent", "=", "self", ".", "root", "else", ":", "parent", "=", "self", ".", "top", "help", "."...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/windows/Lib/idlelib/editor.py#L584-L592
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_controls.py
python
TextAttr.Combine
(*args, **kwargs)
return _controls_.TextAttr_Combine(*args, **kwargs)
Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr
Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr
[ "Combine", "(", "TextAttr", "attr", "TextAttr", "attrDef", "TextCtrl", "text", ")", "-", ">", "TextAttr" ]
def Combine(*args, **kwargs): """Combine(TextAttr attr, TextAttr attrDef, TextCtrl text) -> TextAttr""" return _controls_.TextAttr_Combine(*args, **kwargs)
[ "def", "Combine", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_controls_", ".", "TextAttr_Combine", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_controls.py#L1920-L1922
qgis/QGIS
15a77662d4bb712184f6aa60d0bd663010a76a75
python/plugins/grassprovider/ext/i.py
python
importSigFile
(alg, group, subgroup, src, sigDir='sig')
return shortSigFile
Import a signature file into an internal GRASSDB folder
Import a signature file into an internal GRASSDB folder
[ "Import", "a", "signature", "file", "into", "an", "internal", "GRASSDB", "folder" ]
def importSigFile(alg, group, subgroup, src, sigDir='sig'): """ Import a signature file into an internal GRASSDB folder """ shortSigFile = os.path.basename(src) interSig = os.path.join(Grass7Utils.grassMapsetFolder(), 'PERMANENT', 'group', group, 'subgroup', ...
[ "def", "importSigFile", "(", "alg", ",", "group", ",", "subgroup", ",", "src", ",", "sigDir", "=", "'sig'", ")", ":", "shortSigFile", "=", "os", ".", "path", ".", "basename", "(", "src", ")", "interSig", "=", "os", ".", "path", ".", "join", "(", "G...
https://github.com/qgis/QGIS/blob/15a77662d4bb712184f6aa60d0bd663010a76a75/python/plugins/grassprovider/ext/i.py#L120-L130
domino-team/openwrt-cc
8b181297c34d14d3ca521cc9f31430d561dbc688
package/gli-pub/openwrt-node-packages-master/node/node-v6.9.1/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py
python
QuoteForRspFile
(arg)
return '"' + arg + '"'
Quote a command line argument so that it appears as one argument when processed via cmd.exe and parsed by CommandLineToArgvW (as is typical for Windows programs).
Quote a command line argument so that it appears as one argument when processed via cmd.exe and parsed by CommandLineToArgvW (as is typical for Windows programs).
[ "Quote", "a", "command", "line", "argument", "so", "that", "it", "appears", "as", "one", "argument", "when", "processed", "via", "cmd", ".", "exe", "and", "parsed", "by", "CommandLineToArgvW", "(", "as", "is", "typical", "for", "Windows", "programs", ")", ...
def QuoteForRspFile(arg): """Quote a command line argument so that it appears as one argument when processed via cmd.exe and parsed by CommandLineToArgvW (as is typical for Windows programs).""" # See http://goo.gl/cuFbX and http://goo.gl/dhPnp including the comment # threads. This is actually the quoting rul...
[ "def", "QuoteForRspFile", "(", "arg", ")", ":", "# See http://goo.gl/cuFbX and http://goo.gl/dhPnp including the comment", "# threads. This is actually the quoting rules for CommandLineToArgvW, not", "# for the shell, because the shell doesn't do anything in Windows. This", "# works more or less b...
https://github.com/domino-team/openwrt-cc/blob/8b181297c34d14d3ca521cc9f31430d561dbc688/package/gli-pub/openwrt-node-packages-master/node/node-v6.9.1/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py#L23-L50
OSGeo/gdal
3748fc4ba4fba727492774b2b908a2130c864a83
swig/python/osgeo/ogr.py
python
Layer.Clip
(self, *args, **kwargs)
return _ogr.Layer_Clip(self, *args, **kwargs)
r""" Clip(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr OGRErr OGR_L_Clip(OGRLayerH pLayerInput, OGRLayerH pLayerMethod, OGRLayerH pLayerResult, char **papszOptions, GDALProgressFunc pfnProgress...
r""" Clip(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr OGRErr OGR_L_Clip(OGRLayerH pLayerInput, OGRLayerH pLayerMethod, OGRLayerH pLayerResult, char **papszOptions, GDALProgressFunc pfnProgress...
[ "r", "Clip", "(", "Layer", "self", "Layer", "method_layer", "Layer", "result_layer", "char", "**", "options", "=", "None", "GDALProgressFunc", "callback", "=", "0", "void", "*", "callback_data", "=", "None", ")", "-", ">", "OGRErr", "OGRErr", "OGR_L_Clip", "...
def Clip(self, *args, **kwargs): r""" Clip(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr OGRErr OGR_L_Clip(OGRLayerH pLayerInput, OGRLayerH pLayerMethod, OGRLayerH pLayerResult, char **papszOpti...
[ "def", "Clip", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_ogr", ".", "Layer_Clip", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/OSGeo/gdal/blob/3748fc4ba4fba727492774b2b908a2130c864a83/swig/python/osgeo/ogr.py#L2561-L2621
adobe/chromium
cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7
native_client_sdk/src/project_templates/init_project.py
python
ProjectInitializer._GetShutil
(self)
return self.__shutil
Accessor for shutil property.
Accessor for shutil property.
[ "Accessor", "for", "shutil", "property", "." ]
def _GetShutil(self): """Accessor for shutil property.""" return self.__shutil
[ "def", "_GetShutil", "(", "self", ")", ":", "return", "self", ".", "__shutil" ]
https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/native_client_sdk/src/project_templates/init_project.py#L428-L430
BitMEX/api-connectors
37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812
auto-generated/python/swagger_client/models/margin.py
python
Margin.risk_limit
(self)
return self._risk_limit
Gets the risk_limit of this Margin. # noqa: E501 :return: The risk_limit of this Margin. # noqa: E501 :rtype: float
Gets the risk_limit of this Margin. # noqa: E501
[ "Gets", "the", "risk_limit", "of", "this", "Margin", ".", "#", "noqa", ":", "E501" ]
def risk_limit(self): """Gets the risk_limit of this Margin. # noqa: E501 :return: The risk_limit of this Margin. # noqa: E501 :rtype: float """ return self._risk_limit
[ "def", "risk_limit", "(", "self", ")", ":", "return", "self", ".", "_risk_limit" ]
https://github.com/BitMEX/api-connectors/blob/37a3a5b806ad5d0e0fc975ab86d9ed43c3bcd812/auto-generated/python/swagger_client/models/margin.py#L295-L302
priyankchheda/algorithms
c361aa9071573fa9966d5b02d05e524815abcf2b
linked_list/library/doubly_linked_list.py
python
DoublyLinkedList.insert_at
(self, position, data)
inserts node at particular position in doubly linked list. index starts from 0.
inserts node at particular position in doubly linked list. index starts from 0.
[ "inserts", "node", "at", "particular", "position", "in", "doubly", "linked", "list", ".", "index", "starts", "from", "0", "." ]
def insert_at(self, position, data): """ inserts node at particular position in doubly linked list. index starts from 0. """ dll_size = len(self) if position < 0 or position > dll_size: raise Exception("Invalid position") if position == dll_size: ...
[ "def", "insert_at", "(", "self", ",", "position", ",", "data", ")", ":", "dll_size", "=", "len", "(", "self", ")", "if", "position", "<", "0", "or", "position", ">", "dll_size", ":", "raise", "Exception", "(", "\"Invalid position\"", ")", "if", "position...
https://github.com/priyankchheda/algorithms/blob/c361aa9071573fa9966d5b02d05e524815abcf2b/linked_list/library/doubly_linked_list.py#L71-L96
qgis/QGIS
15a77662d4bb712184f6aa60d0bd663010a76a75
python/plugins/db_manager/db_plugins/oracle/connector.py
python
OracleDBConnector.getSchemasCache
(self)
return res
Get the list of schemas from the cache.
Get the list of schemas from the cache.
[ "Get", "the", "list", "of", "schemas", "from", "the", "cache", "." ]
def getSchemasCache(self): """Get the list of schemas from the cache.""" sql = u""" SELECT DISTINCT ownername FROM "oracle_{}" ORDER BY ownername """.format(self.connName) c = self.cache_connection.cursor() c.execute(sql) res = c.fetchall() ...
[ "def", "getSchemasCache", "(", "self", ")", ":", "sql", "=", "u\"\"\"\n SELECT DISTINCT ownername\n FROM \"oracle_{}\"\n ORDER BY ownername\n \"\"\"", ".", "format", "(", "self", ".", "connName", ")", "c", "=", "self", ".", "cache_connection", "....
https://github.com/qgis/QGIS/blob/15a77662d4bb712184f6aa60d0bd663010a76a75/python/plugins/db_manager/db_plugins/oracle/connector.py#L285-L297
shader-slang/slang
b8982fcf43b86c1e39dcc3dd19bff2821633eda6
external/vulkan/registry/conventions.py
python
ConventionsBase.generate_max_enum_in_docs
(self)
return False
Return True if MAX_ENUM tokens should be generated in documentation includes.
Return True if MAX_ENUM tokens should be generated in documentation includes.
[ "Return", "True", "if", "MAX_ENUM", "tokens", "should", "be", "generated", "in", "documentation", "includes", "." ]
def generate_max_enum_in_docs(self): """Return True if MAX_ENUM tokens should be generated in documentation includes.""" return False
[ "def", "generate_max_enum_in_docs", "(", "self", ")", ":", "return", "False" ]
https://github.com/shader-slang/slang/blob/b8982fcf43b86c1e39dcc3dd19bff2821633eda6/external/vulkan/registry/conventions.py#L327-L330
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/plugins/filebrowser/filebrowser/browser.py
python
PathMarkConfig.Load
(self)
return True
Loads the configuration data into the dictionary
Loads the configuration data into the dictionary
[ "Loads", "the", "configuration", "data", "into", "the", "dictionary" ]
def Load(self): """Loads the configuration data into the dictionary""" file_h = util.GetFileReader(self._base) if file_h != -1: lines = file_h.readlines() file_h.close() else: return False for line in lines: vals = line.strip().spl...
[ "def", "Load", "(", "self", ")", ":", "file_h", "=", "util", ".", "GetFileReader", "(", "self", ".", "_base", ")", "if", "file_h", "!=", "-", "1", ":", "lines", "=", "file_h", ".", "readlines", "(", ")", "file_h", ".", "close", "(", ")", "else", ...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/plugins/filebrowser/filebrowser/browser.py#L1004-L1019
hfinkel/llvm-project-cxxjit
91084ef018240bbb8e24235ff5cd8c355a9c1a1e
compiler-rt/lib/sanitizer_common/scripts/cpplint.py
python
CheckMakePairUsesDeduction
(filename, clean_lines, linenum, error)
Check that make_pair's template arguments are deduced. G++ 4.6 in C++0x mode fails badly if make_pair's template arguments are specified explicitly, and such use isn't intended in any case. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linen...
Check that make_pair's template arguments are deduced.
[ "Check", "that", "make_pair", "s", "template", "arguments", "are", "deduced", "." ]
def CheckMakePairUsesDeduction(filename, clean_lines, linenum, error): """Check that make_pair's template arguments are deduced. G++ 4.6 in C++0x mode fails badly if make_pair's template arguments are specified explicitly, and such use isn't intended in any case. Args: filename: The name of the current fi...
[ "def", "CheckMakePairUsesDeduction", "(", "filename", ",", "clean_lines", ",", "linenum", ",", "error", ")", ":", "raw", "=", "clean_lines", ".", "raw_lines", "line", "=", "raw", "[", "linenum", "]", "match", "=", "_RE_PATTERN_EXPLICIT_MAKEPAIR", ".", "search", ...
https://github.com/hfinkel/llvm-project-cxxjit/blob/91084ef018240bbb8e24235ff5cd8c355a9c1a1e/compiler-rt/lib/sanitizer_common/scripts/cpplint.py#L3753-L3772
thalium/icebox
99d147d5b9269222225443ce171b4fd46d8985d4
third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2.py
python
uCSIsCombiningHalfMarks
(code)
return ret
Check whether the character is part of CombiningHalfMarks UCS Block
Check whether the character is part of CombiningHalfMarks UCS Block
[ "Check", "whether", "the", "character", "is", "part", "of", "CombiningHalfMarks", "UCS", "Block" ]
def uCSIsCombiningHalfMarks(code): """Check whether the character is part of CombiningHalfMarks UCS Block """ ret = libxml2mod.xmlUCSIsCombiningHalfMarks(code) return ret
[ "def", "uCSIsCombiningHalfMarks", "(", "code", ")", ":", "ret", "=", "libxml2mod", ".", "xmlUCSIsCombiningHalfMarks", "(", "code", ")", "return", "ret" ]
https://github.com/thalium/icebox/blob/99d147d5b9269222225443ce171b4fd46d8985d4/third_party/virtualbox/src/libs/libxml2-2.9.4/python/libxml2.py#L2443-L2447
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py
python
AppleScript_Suite_Events._26_
(self, _object, _attributes={}, **_arguments)
&: Concatenation Required argument: an AE object reference Keyword argument _attributes: AppleEvent attribute dictionary Returns: anything
&: Concatenation Required argument: an AE object reference Keyword argument _attributes: AppleEvent attribute dictionary Returns: anything
[ "&", ":", "Concatenation", "Required", "argument", ":", "an", "AE", "object", "reference", "Keyword", "argument", "_attributes", ":", "AppleEvent", "attribute", "dictionary", "Returns", ":", "anything" ]
def _26_(self, _object, _attributes={}, **_arguments): """&: Concatenation Required argument: an AE object reference Keyword argument _attributes: AppleEvent attribute dictionary Returns: anything """ _code = 'ascr' _subcode = 'ccat' if _arguments: raise ...
[ "def", "_26_", "(", "self", ",", "_object", ",", "_attributes", "=", "{", "}", ",", "*", "*", "_arguments", ")", ":", "_code", "=", "'ascr'", "_subcode", "=", "'ccat'", "if", "_arguments", ":", "raise", "TypeError", ",", "'No optional args expected'", "_ar...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/plat-mac/lib-scriptpackages/StdSuites/AppleScript_Suite.py#L15-L34
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/stc.py
python
StyledTextCtrl.StopRecord
(*args, **kwargs)
return _stc.StyledTextCtrl_StopRecord(*args, **kwargs)
StopRecord(self) Stop notifying the container of all key presses and commands.
StopRecord(self)
[ "StopRecord", "(", "self", ")" ]
def StopRecord(*args, **kwargs): """ StopRecord(self) Stop notifying the container of all key presses and commands. """ return _stc.StyledTextCtrl_StopRecord(*args, **kwargs)
[ "def", "StopRecord", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_stc", ".", "StyledTextCtrl_StopRecord", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/stc.py#L6405-L6411
baidu/bigflow
449245016c0df7d1252e85581e588bfc60cefad3
bigflow_python/python/bigflow/pipeline/pipeline_base.py
python
PipelineBase.read
(self, source)
return source.transform_from_node(load_node, self)
将外部存储的数据映射为一个PCollection,并在运行时读取数据 Args: source (Source): 表示外部存储的Source实例 Returns: PCollection: 读取结果
将外部存储的数据映射为一个PCollection,并在运行时读取数据
[ "将外部存储的数据映射为一个PCollection,并在运行时读取数据" ]
def read(self, source): """ 将外部存储的数据映射为一个PCollection,并在运行时读取数据 Args: source (Source): 表示外部存储的Source实例 Returns: PCollection: 读取结果 """ from bigflow import input #from bigflow.io import ComplexInputFormat if isinstance(source, input.Us...
[ "def", "read", "(", "self", ",", "source", ")", ":", "from", "bigflow", "import", "input", "#from bigflow.io import ComplexInputFormat", "if", "isinstance", "(", "source", ",", "input", ".", "UserInputBase", ")", ":", "source", "=", "input", ".", "user_define_fo...
https://github.com/baidu/bigflow/blob/449245016c0df7d1252e85581e588bfc60cefad3/bigflow_python/python/bigflow/pipeline/pipeline_base.py#L208-L246
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_carbon/_windows.py
python
HScrolledWindow.__init__
(self, *args, **kwargs)
__init__(self, Window parent, int id=ID_ANY, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, String name=PanelNameStr) -> HScrolledWindow
__init__(self, Window parent, int id=ID_ANY, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, String name=PanelNameStr) -> HScrolledWindow
[ "__init__", "(", "self", "Window", "parent", "int", "id", "=", "ID_ANY", "Point", "pos", "=", "DefaultPosition", "Size", "size", "=", "DefaultSize", "long", "style", "=", "0", "String", "name", "=", "PanelNameStr", ")", "-", ">", "HScrolledWindow" ]
def __init__(self, *args, **kwargs): """ __init__(self, Window parent, int id=ID_ANY, Point pos=DefaultPosition, Size size=DefaultSize, long style=0, String name=PanelNameStr) -> HScrolledWindow """ _windows_.HScrolledWindow_swiginit(self,_windows_.new_HScrolledWindow(*args...
[ "def", "__init__", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "_windows_", ".", "HScrolledWindow_swiginit", "(", "self", ",", "_windows_", ".", "new_HScrolledWindow", "(", "*", "args", ",", "*", "*", "kwargs", ")", ")", "self", "...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_carbon/_windows.py#L2501-L2507
windystrife/UnrealEngine_NVIDIAGameWorks
b50e6338a7c5b26374d66306ebc7807541ff815e
Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/Tkinter.py
python
Canvas.create_arc
(self, *args, **kw)
return self._create('arc', args, kw)
Create arc shaped region with coordinates x1,y1,x2,y2.
Create arc shaped region with coordinates x1,y1,x2,y2.
[ "Create", "arc", "shaped", "region", "with", "coordinates", "x1", "y1", "x2", "y2", "." ]
def create_arc(self, *args, **kw): """Create arc shaped region with coordinates x1,y1,x2,y2.""" return self._create('arc', args, kw)
[ "def", "create_arc", "(", "self", ",", "*", "args", ",", "*", "*", "kw", ")", ":", "return", "self", ".", "_create", "(", "'arc'", ",", "args", ",", "kw", ")" ]
https://github.com/windystrife/UnrealEngine_NVIDIAGameWorks/blob/b50e6338a7c5b26374d66306ebc7807541ff815e/Engine/Extras/ThirdPartyNotUE/emsdk/Win64/python/2.7.5.3_64bit/Lib/lib-tk/Tkinter.py#L2252-L2254
nest/nest-simulator
f2623eb78518cdbd55e77e0ed486bf1111bcb62f
doc/extractor_userdocs.py
python
ExtractUserDocs
(listoffiles, basedir='..', outdir='userdocs/')
Extract and build all user documentation and build tag indices. Writes extracted information to JSON files in outdir. In particular the list of seen tags mapped to files they appear in, and the indices generated from all combinations of tags. Parameters are the same as for `UserDocExtractor` and are h...
Extract and build all user documentation and build tag indices.
[ "Extract", "and", "build", "all", "user", "documentation", "and", "build", "tag", "indices", "." ]
def ExtractUserDocs(listoffiles, basedir='..', outdir='userdocs/'): """ Extract and build all user documentation and build tag indices. Writes extracted information to JSON files in outdir. In particular the list of seen tags mapped to files they appear in, and the indices generated from all combin...
[ "def", "ExtractUserDocs", "(", "listoffiles", ",", "basedir", "=", "'..'", ",", "outdir", "=", "'userdocs/'", ")", ":", "data", "=", "JsonWriter", "(", "outdir", ")", "# Gather all information and write RSTs", "tags", "=", "UserDocExtractor", "(", "listoffiles", "...
https://github.com/nest/nest-simulator/blob/f2623eb78518cdbd55e77e0ed486bf1111bcb62f/doc/extractor_userdocs.py#L537-L565
ValveSoftware/source-sdk-2013
0d8dceea4310fde5706b3ce1c70609d72a38efdf
mp/src/thirdparty/protobuf-2.3.0/python/mox.py
python
IsAlmost.equals
(self, rhs)
Check to see if RHS is almost equal to float_value Args: rhs: the value to compare to float_value Returns: bool
Check to see if RHS is almost equal to float_value
[ "Check", "to", "see", "if", "RHS", "is", "almost", "equal", "to", "float_value" ]
def equals(self, rhs): """Check to see if RHS is almost equal to float_value Args: rhs: the value to compare to float_value Returns: bool """ try: return round(rhs-self._float_value, self._places) == 0 except TypeError: # This is probably because either float_value or ...
[ "def", "equals", "(", "self", ",", "rhs", ")", ":", "try", ":", "return", "round", "(", "rhs", "-", "self", ".", "_float_value", ",", "self", ".", "_places", ")", "==", "0", "except", "TypeError", ":", "# This is probably because either float_value or rhs is n...
https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/mp/src/thirdparty/protobuf-2.3.0/python/mox.py#L846-L860
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
build/util/version.py
python
subst_file
(file_name, values)
return subst_template(template, values)
Returns the contents of the specified file_name with substituted values from the specified dictionary. This is like subst_template, except it operates on a file.
Returns the contents of the specified file_name with substituted values from the specified dictionary.
[ "Returns", "the", "contents", "of", "the", "specified", "file_name", "with", "substituted", "values", "from", "the", "specified", "dictionary", "." ]
def subst_file(file_name, values): """ Returns the contents of the specified file_name with substituted values from the specified dictionary. This is like subst_template, except it operates on a file. """ template = open(file_name, 'r').read() return subst_template(template, values);
[ "def", "subst_file", "(", "file_name", ",", "values", ")", ":", "template", "=", "open", "(", "file_name", ",", "'r'", ")", ".", "read", "(", ")", "return", "subst_template", "(", "template", ",", "values", ")" ]
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/build/util/version.py#L75-L83
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/dashboard/dashboard/buildbucket_service.py
python
GetJobStatus
(job_id, credentials=None)
return response_content
Gets the details of a job via buildbucket's API.
Gets the details of a job via buildbucket's API.
[ "Gets", "the", "details", "of", "a", "job", "via", "buildbucket", "s", "API", "." ]
def GetJobStatus(job_id, credentials=None): """Gets the details of a job via buildbucket's API.""" service = _DiscoverService() request = service.get(id=job_id) response_content = request.execute(http=_AuthenticatedHttp(credentials)) return response_content
[ "def", "GetJobStatus", "(", "job_id", ",", "credentials", "=", "None", ")", ":", "service", "=", "_DiscoverService", "(", ")", "request", "=", "service", ".", "get", "(", "id", "=", "job_id", ")", "response_content", "=", "request", ".", "execute", "(", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/dashboard/dashboard/buildbucket_service.py#L73-L78
lilypond/lilypond
2a14759372979f5b796ee802b0ee3bc15d28b06b
python/auxiliar/postprocess_html.py
python
build_pages_dict
(filelist)
return pages_dict
Build dictionary of available translations of each page. Returns: basename => list of languages dict
Build dictionary of available translations of each page.
[ "Build", "dictionary", "of", "available", "translations", "of", "each", "page", "." ]
def build_pages_dict(filelist): """Build dictionary of available translations of each page. Returns: basename => list of languages dict""" pages_dict = {} language_codes = set([l.webext for l in langdefs.LANGUAGES]) for f in filelist: m = html_re.match(f) if m: g = m.gr...
[ "def", "build_pages_dict", "(", "filelist", ")", ":", "pages_dict", "=", "{", "}", "language_codes", "=", "set", "(", "[", "l", ".", "webext", "for", "l", "in", "langdefs", ".", "LANGUAGES", "]", ")", "for", "f", "in", "filelist", ":", "m", "=", "htm...
https://github.com/lilypond/lilypond/blob/2a14759372979f5b796ee802b0ee3bc15d28b06b/python/auxiliar/postprocess_html.py#L83-L106
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/distlib/_backport/shutil.py
python
_make_zipfile
(base_name, base_dir, verbose=0, dry_run=0, logger=None)
return zip_filename
Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_name' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search path). If neither tool is available, raises ExecError. ...
Create a zip file from all the files under 'base_dir'.
[ "Create", "a", "zip", "file", "from", "all", "the", "files", "under", "base_dir", "." ]
def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_name' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found ...
[ "def", "_make_zipfile", "(", "base_name", ",", "base_dir", ",", "verbose", "=", "0", ",", "dry_run", "=", "0", ",", "logger", "=", "None", ")", ":", "zip_filename", "=", "base_name", "+", "\".zip\"", "archive_dir", "=", "os", ".", "path", ".", "dirname",...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_vendor/distlib/_backport/shutil.py#L909-L999
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
scripts/reduction_gui/reduction/diffraction/diffraction_run_setup_script.py
python
RunSetupScript.to_xml
(self)
return xml_str
'Public' method to create XML from the current data.
'Public' method to create XML from the current data.
[ "Public", "method", "to", "create", "XML", "from", "the", "current", "data", "." ]
def to_xml(self): """ 'Public' method to create XML from the current data. """ parnamevaluedict = self.buildParameterDict() xml_str = "<RunSetup>\n" for parname in self.parnamelist: keyname = parname.lower() parvalue = parnamevaluedict[parname] ...
[ "def", "to_xml", "(", "self", ")", ":", "parnamevaluedict", "=", "self", ".", "buildParameterDict", "(", ")", "xml_str", "=", "\"<RunSetup>\\n\"", "for", "parname", "in", "self", ".", "parnamelist", ":", "keyname", "=", "parname", ".", "lower", "(", ")", "...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/scripts/reduction_gui/reduction/diffraction/diffraction_run_setup_script.py#L158-L175
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pexpect/pexpect/popen_spawn.py
python
PopenSpawn._read_incoming
(self)
Run in a thread to move output from a pipe to a queue.
Run in a thread to move output from a pipe to a queue.
[ "Run", "in", "a", "thread", "to", "move", "output", "from", "a", "pipe", "to", "a", "queue", "." ]
def _read_incoming(self): """Run in a thread to move output from a pipe to a queue.""" fileno = self.proc.stdout.fileno() while 1: buf = b'' try: buf = os.read(fileno, 1024) except OSError as e: self._log(e, 'read') ...
[ "def", "_read_incoming", "(", "self", ")", ":", "fileno", "=", "self", ".", "proc", ".", "stdout", ".", "fileno", "(", ")", "while", "1", ":", "buf", "=", "b''", "try", ":", "buf", "=", "os", ".", "read", "(", "fileno", ",", "1024", ")", "except"...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pexpect/pexpect/popen_spawn.py#L100-L115
ablab/spades
3a754192b88540524ce6fb69eef5ea9273a38465
assembler/ext/src/python_libs/pyyaml2/__init__.py
python
safe_dump_all
(documents, stream=None, **kwds)
return dump_all(documents, stream, Dumper=SafeDumper, **kwds)
Serialize a sequence of Python objects into a YAML stream. Produce only basic YAML tags. If stream is None, return the produced string instead.
Serialize a sequence of Python objects into a YAML stream. Produce only basic YAML tags. If stream is None, return the produced string instead.
[ "Serialize", "a", "sequence", "of", "Python", "objects", "into", "a", "YAML", "stream", ".", "Produce", "only", "basic", "YAML", "tags", ".", "If", "stream", "is", "None", "return", "the", "produced", "string", "instead", "." ]
def safe_dump_all(documents, stream=None, **kwds): """ Serialize a sequence of Python objects into a YAML stream. Produce only basic YAML tags. If stream is None, return the produced string instead. """ return dump_all(documents, stream, Dumper=SafeDumper, **kwds)
[ "def", "safe_dump_all", "(", "documents", ",", "stream", "=", "None", ",", "*", "*", "kwds", ")", ":", "return", "dump_all", "(", "documents", ",", "stream", ",", "Dumper", "=", "SafeDumper", ",", "*", "*", "kwds", ")" ]
https://github.com/ablab/spades/blob/3a754192b88540524ce6fb69eef5ea9273a38465/assembler/ext/src/python_libs/pyyaml2/__init__.py#L212-L218
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/osx_cocoa/html.py
python
HtmlWinParser.SetFontItalic
(*args, **kwargs)
return _html.HtmlWinParser_SetFontItalic(*args, **kwargs)
SetFontItalic(self, int x)
SetFontItalic(self, int x)
[ "SetFontItalic", "(", "self", "int", "x", ")" ]
def SetFontItalic(*args, **kwargs): """SetFontItalic(self, int x)""" return _html.HtmlWinParser_SetFontItalic(*args, **kwargs)
[ "def", "SetFontItalic", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "_html", ".", "HtmlWinParser_SetFontItalic", "(", "*", "args", ",", "*", "*", "kwargs", ")" ]
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/osx_cocoa/html.py#L312-L314
leela-zero/leela-zero
e3ed6310d33d75078ba74c3adf887d18439fc2e3
scripts/cpplint.py
python
IsOutOfLineMethodDefinition
(clean_lines, linenum)
return False
Check if current line contains an out-of-line method definition. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. Returns: True if current line contains an out-of-line method definition.
Check if current line contains an out-of-line method definition.
[ "Check", "if", "current", "line", "contains", "an", "out", "-", "of", "-", "line", "method", "definition", "." ]
def IsOutOfLineMethodDefinition(clean_lines, linenum): """Check if current line contains an out-of-line method definition. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. Returns: True if current line contains an out-of-line method definition...
[ "def", "IsOutOfLineMethodDefinition", "(", "clean_lines", ",", "linenum", ")", ":", "# Scan back a few lines for start of current function", "for", "i", "in", "xrange", "(", "linenum", ",", "max", "(", "-", "1", ",", "linenum", "-", "10", ")", ",", "-", "1", "...
https://github.com/leela-zero/leela-zero/blob/e3ed6310d33d75078ba74c3adf887d18439fc2e3/scripts/cpplint.py#L5014-L5027
hanpfei/chromium-net
392cc1fa3a8f92f42e4071ab6e674d8e0482f83f
third_party/catapult/catapult_base/catapult_base/cloud_storage.py
python
CalculateHash
(file_path)
return sha1.hexdigest()
Calculates and returns the hash of the file at file_path.
Calculates and returns the hash of the file at file_path.
[ "Calculates", "and", "returns", "the", "hash", "of", "the", "file", "at", "file_path", "." ]
def CalculateHash(file_path): """Calculates and returns the hash of the file at file_path.""" sha1 = hashlib.sha1() with open(file_path, 'rb') as f: while True: # Read in 1mb chunks, so it doesn't all have to be loaded into memory. chunk = f.read(1024 * 1024) if not chunk: break ...
[ "def", "CalculateHash", "(", "file_path", ")", ":", "sha1", "=", "hashlib", ".", "sha1", "(", ")", "with", "open", "(", "file_path", ",", "'rb'", ")", "as", "f", ":", "while", "True", ":", "# Read in 1mb chunks, so it doesn't all have to be loaded into memory.", ...
https://github.com/hanpfei/chromium-net/blob/392cc1fa3a8f92f42e4071ab6e674d8e0482f83f/third_party/catapult/catapult_base/catapult_base/cloud_storage.py#L361-L371
apple/turicreate
cce55aa5311300e3ce6af93cb45ba791fd1bdf49
src/python/turicreate/toolkits/clustering/kmeans.py
python
KmeansModel.__str__
(self)
return self.__repr__()
Return a string description of the model to the ``print`` method. Returns ------- out : string A description of the KMeansModel.
Return a string description of the model to the ``print`` method.
[ "Return", "a", "string", "description", "of", "the", "model", "to", "the", "print", "method", "." ]
def __str__(self): """ Return a string description of the model to the ``print`` method. Returns ------- out : string A description of the KMeansModel. """ return self.__repr__()
[ "def", "__str__", "(", "self", ")", ":", "return", "self", ".", "__repr__", "(", ")" ]
https://github.com/apple/turicreate/blob/cce55aa5311300e3ce6af93cb45ba791fd1bdf49/src/python/turicreate/toolkits/clustering/kmeans.py#L367-L376
tensorflow/tensorflow
419e3a6b650ea4bd1b0cba23c4348f8a69f3272e
tensorflow/python/data/util/structure.py
python
_from_tensor_list_helper
(decode_fn, element_spec, tensor_list)
return nest.pack_sequence_as(element_spec, flat_ret)
Returns an element constructed from the given spec and tensor list. Args: decode_fn: Method that constructs an element component from the element spec component and a tensor list. element_spec: A nested structure of `tf.TypeSpec` objects representing to element type specification. tensor_list...
Returns an element constructed from the given spec and tensor list.
[ "Returns", "an", "element", "constructed", "from", "the", "given", "spec", "and", "tensor", "list", "." ]
def _from_tensor_list_helper(decode_fn, element_spec, tensor_list): """Returns an element constructed from the given spec and tensor list. Args: decode_fn: Method that constructs an element component from the element spec component and a tensor list. element_spec: A nested structure of `tf.TypeSpec` ...
[ "def", "_from_tensor_list_helper", "(", "decode_fn", ",", "element_spec", ",", "tensor_list", ")", ":", "# pylint: disable=protected-access", "flat_specs", "=", "nest", ".", "flatten", "(", "element_spec", ")", "flat_spec_lengths", "=", "[", "len", "(", "spec", ".",...
https://github.com/tensorflow/tensorflow/blob/419e3a6b650ea4bd1b0cba23c4348f8a69f3272e/tensorflow/python/data/util/structure.py#L188-L220
LiquidPlayer/LiquidCore
9405979363f2353ac9a71ad8ab59685dd7f919c9
deps/node-10.15.3/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py
python
GetSpecPostbuildCommands
(spec, quiet=False)
return postbuilds
Returns the list of postbuilds explicitly defined on |spec|, in a form executable by a shell.
Returns the list of postbuilds explicitly defined on |spec|, in a form executable by a shell.
[ "Returns", "the", "list", "of", "postbuilds", "explicitly", "defined", "on", "|spec|", "in", "a", "form", "executable", "by", "a", "shell", "." ]
def GetSpecPostbuildCommands(spec, quiet=False): """Returns the list of postbuilds explicitly defined on |spec|, in a form executable by a shell.""" postbuilds = [] for postbuild in spec.get('postbuilds', []): if not quiet: postbuilds.append('echo POSTBUILD\\(%s\\) %s' % ( spec['target_nam...
[ "def", "GetSpecPostbuildCommands", "(", "spec", ",", "quiet", "=", "False", ")", ":", "postbuilds", "=", "[", "]", "for", "postbuild", "in", "spec", ".", "get", "(", "'postbuilds'", ",", "[", "]", ")", ":", "if", "not", "quiet", ":", "postbuilds", ".",...
https://github.com/LiquidPlayer/LiquidCore/blob/9405979363f2353ac9a71ad8ab59685dd7f919c9/deps/node-10.15.3/deps/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py#L1612-L1621
OSGeo/gdal
3748fc4ba4fba727492774b2b908a2130c864a83
swig/python/osgeo/gnm.py
python
GenericNetwork.ReconnectFeatures
(self, *args)
return _gnm.GenericNetwork_ReconnectFeatures(self, *args)
r"""ReconnectFeatures(GenericNetwork self, GIntBig nSrcFID, GIntBig nTgtFID, GIntBig nConFID, double dfCost, double dfInvCost, GNMDirection eDir) -> CPLErr
r"""ReconnectFeatures(GenericNetwork self, GIntBig nSrcFID, GIntBig nTgtFID, GIntBig nConFID, double dfCost, double dfInvCost, GNMDirection eDir) -> CPLErr
[ "r", "ReconnectFeatures", "(", "GenericNetwork", "self", "GIntBig", "nSrcFID", "GIntBig", "nTgtFID", "GIntBig", "nConFID", "double", "dfCost", "double", "dfInvCost", "GNMDirection", "eDir", ")", "-", ">", "CPLErr" ]
def ReconnectFeatures(self, *args): r"""ReconnectFeatures(GenericNetwork self, GIntBig nSrcFID, GIntBig nTgtFID, GIntBig nConFID, double dfCost, double dfInvCost, GNMDirection eDir) -> CPLErr""" return _gnm.GenericNetwork_ReconnectFeatures(self, *args)
[ "def", "ReconnectFeatures", "(", "self", ",", "*", "args", ")", ":", "return", "_gnm", ".", "GenericNetwork_ReconnectFeatures", "(", "self", ",", "*", "args", ")" ]
https://github.com/OSGeo/gdal/blob/3748fc4ba4fba727492774b2b908a2130c864a83/swig/python/osgeo/gnm.py#L209-L211
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/Tkinter.py
python
Canvas.focus
(self, *args)
return self.tk.call((self._w, 'focus') + args)
Set focus to the first item specified in ARGS.
Set focus to the first item specified in ARGS.
[ "Set", "focus", "to", "the", "first", "item", "specified", "in", "ARGS", "." ]
def focus(self, *args): """Set focus to the first item specified in ARGS.""" return self.tk.call((self._w, 'focus') + args)
[ "def", "focus", "(", "self", ",", "*", "args", ")", ":", "return", "self", ".", "tk", ".", "call", "(", "(", "self", ".", "_w", ",", "'focus'", ")", "+", "args", ")" ]
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/Tkinter.py#L2320-L2322
ApolloAuto/apollo-platform
86d9dc6743b496ead18d597748ebabd34a513289
ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/matrixlib/defmatrix.py
python
matrix.getT
(self)
return self.transpose()
Returns the transpose of the matrix. Does *not* conjugate! For the complex conjugate transpose, use `getH`. Parameters ---------- None Returns ------- ret : matrix object The (non-conjugated) transpose of the matrix. See Also -----...
Returns the transpose of the matrix.
[ "Returns", "the", "transpose", "of", "the", "matrix", "." ]
def getT(self): """ Returns the transpose of the matrix. Does *not* conjugate! For the complex conjugate transpose, use `getH`. Parameters ---------- None Returns ------- ret : matrix object The (non-conjugated) transpose of the mat...
[ "def", "getT", "(", "self", ")", ":", "return", "self", ".", "transpose", "(", ")" ]
https://github.com/ApolloAuto/apollo-platform/blob/86d9dc6743b496ead18d597748ebabd34a513289/ros/third_party/lib_x86_64/python2.7/dist-packages/numpy/matrixlib/defmatrix.py#L928-L958
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/groupby/grouper.py
python
get_grouper
( obj: FrameOrSeries, key=None, axis: int = 0, level=None, sort: bool = True, observed: bool = False, mutated: bool = False, validate: bool = True, )
return grouper, exclusions, obj
Create and return a BaseGrouper, which is an internal mapping of how to create the grouper indexers. This may be composed of multiple Grouping objects, indicating multiple groupers Groupers are ultimately index mappings. They can originate as: index mappings, keys to columns, functions, or Groupers...
Create and return a BaseGrouper, which is an internal mapping of how to create the grouper indexers. This may be composed of multiple Grouping objects, indicating multiple groupers
[ "Create", "and", "return", "a", "BaseGrouper", "which", "is", "an", "internal", "mapping", "of", "how", "to", "create", "the", "grouper", "indexers", ".", "This", "may", "be", "composed", "of", "multiple", "Grouping", "objects", "indicating", "multiple", "grou...
def get_grouper( obj: FrameOrSeries, key=None, axis: int = 0, level=None, sort: bool = True, observed: bool = False, mutated: bool = False, validate: bool = True, ) -> "Tuple[ops.BaseGrouper, List[Hashable], FrameOrSeries]": """ Create and return a BaseGrouper, which is an intern...
[ "def", "get_grouper", "(", "obj", ":", "FrameOrSeries", ",", "key", "=", "None", ",", "axis", ":", "int", "=", "0", ",", "level", "=", "None", ",", "sort", ":", "bool", "=", "True", ",", "observed", ":", "bool", "=", "False", ",", "mutated", ":", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/pandas/core/groupby/grouper.py#L426-L638
catboost/catboost
167f64f237114a4d10b2b4ee42adb4569137debe
contrib/python/pyparsing/py3/pyparsing/core.py
python
ParserElement.transform_string
(self, instring: str, *, debug: bool = False)
Extension to :class:`scan_string`, to modify matching text with modified tokens that may be returned from a parse action. To use ``transform_string``, define a grammar and attach a parse action to it that modifies the returned token list. Invoking ``transform_string()`` on a target string will ...
Extension to :class:`scan_string`, to modify matching text with modified tokens that may be returned from a parse action. To use ``transform_string``, define a grammar and attach a parse action to it that modifies the returned token list. Invoking ``transform_string()`` on a target string will ...
[ "Extension", "to", ":", "class", ":", "scan_string", "to", "modify", "matching", "text", "with", "modified", "tokens", "that", "may", "be", "returned", "from", "a", "parse", "action", ".", "To", "use", "transform_string", "define", "a", "grammar", "and", "at...
def transform_string(self, instring: str, *, debug: bool = False) -> str: """ Extension to :class:`scan_string`, to modify matching text with modified tokens that may be returned from a parse action. To use ``transform_string``, define a grammar and attach a parse action to it that modi...
[ "def", "transform_string", "(", "self", ",", "instring", ":", "str", ",", "*", ",", "debug", ":", "bool", "=", "False", ")", "->", "str", ":", "out", ":", "List", "[", "str", "]", "=", "[", "]", "lastE", "=", "0", "# force preservation of <TAB>s, to mi...
https://github.com/catboost/catboost/blob/167f64f237114a4d10b2b4ee42adb4569137debe/contrib/python/pyparsing/py3/pyparsing/core.py#L1227-L1271
miyosuda/TensorFlowAndroidMNIST
7b5a4603d2780a8a2834575706e9001977524007
jni-build/jni/include/tensorflow/contrib/losses/python/losses/loss_ops.py
python
log_loss
(predictions, targets, weight=1.0, epsilon=1e-7, scope=None)
Adds a Log Loss term to the training procedure. `weight` acts as a coefficient for the loss. If a scalar is provided, then the loss is simply scaled by the given value. If `weight` is a tensor of size [batch_size], then the total loss for each sample of the batch is rescaled by the corresponding element in the...
Adds a Log Loss term to the training procedure.
[ "Adds", "a", "Log", "Loss", "term", "to", "the", "training", "procedure", "." ]
def log_loss(predictions, targets, weight=1.0, epsilon=1e-7, scope=None): """Adds a Log Loss term to the training procedure. `weight` acts as a coefficient for the loss. If a scalar is provided, then the loss is simply scaled by the given value. If `weight` is a tensor of size [batch_size], then the total loss...
[ "def", "log_loss", "(", "predictions", ",", "targets", ",", "weight", "=", "1.0", ",", "epsilon", "=", "1e-7", ",", "scope", "=", "None", ")", ":", "with", "ops", ".", "op_scope", "(", "[", "predictions", ",", "targets", "]", ",", "scope", ",", "\"lo...
https://github.com/miyosuda/TensorFlowAndroidMNIST/blob/7b5a4603d2780a8a2834575706e9001977524007/jni-build/jni/include/tensorflow/contrib/losses/python/losses/loss_ops.py#L375-L412
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/tools/Editra/src/ed_pages.py
python
EdPages.GetUiHandlers
(self)
return [(ed_glob.ID_FIND_NEXT, self._searchctrl.OnUpdateFindUI), (ed_glob.ID_FIND_PREVIOUS, self._searchctrl.OnUpdateFindUI), (ed_glob.ID_NEXT_POS, self.OnUpdateNaviUI), (ed_glob.ID_PRE_POS, self.OnUpdateNaviUI)]
Get the update ui handlers that this window supplies @return: list of tuples
Get the update ui handlers that this window supplies @return: list of tuples
[ "Get", "the", "update", "ui", "handlers", "that", "this", "window", "supplies", "@return", ":", "list", "of", "tuples" ]
def GetUiHandlers(self): """Get the update ui handlers that this window supplies @return: list of tuples """ return [(ed_glob.ID_FIND_NEXT, self._searchctrl.OnUpdateFindUI), (ed_glob.ID_FIND_PREVIOUS, self._searchctrl.OnUpdateFindUI), (ed_glob.ID_NEXT_POS...
[ "def", "GetUiHandlers", "(", "self", ")", ":", "return", "[", "(", "ed_glob", ".", "ID_FIND_NEXT", ",", "self", ".", "_searchctrl", ".", "OnUpdateFindUI", ")", ",", "(", "ed_glob", ".", "ID_FIND_PREVIOUS", ",", "self", ".", "_searchctrl", ".", "OnUpdateFindU...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/tools/Editra/src/ed_pages.py#L306-L314
intel/llvm
e6d0547e9d99b5a56430c4749f6c7e328bf221ab
llvm/examples/Kaleidoscope/MCJIT/cached/genk-timing.py
python
KScriptGenerator.updateCalledFunctionList
(self, callee)
Maintains a list of functions that will actually be called
Maintains a list of functions that will actually be called
[ "Maintains", "a", "list", "of", "functions", "that", "will", "actually", "be", "called" ]
def updateCalledFunctionList(self, callee): """Maintains a list of functions that will actually be called""" # Update the total call count self.updateTotalCallCount(callee) # If this function is already in the list, don't do anything else if callee in self.calledFunctions: ...
[ "def", "updateCalledFunctionList", "(", "self", ",", "callee", ")", ":", "# Update the total call count", "self", ".", "updateTotalCallCount", "(", "callee", ")", "# If this function is already in the list, don't do anything else", "if", "callee", "in", "self", ".", "called...
https://github.com/intel/llvm/blob/e6d0547e9d99b5a56430c4749f6c7e328bf221ab/llvm/examples/Kaleidoscope/MCJIT/cached/genk-timing.py#L68-L80
bitconch/bitconch-core
5537f3215b3e3b76f6720d6f908676a6c34bc5db
deploy-stable.py
python
prnt_warn
(in_text)
Print a warning message
Print a warning message
[ "Print", "a", "warning", "message" ]
def prnt_warn(in_text): """ Print a warning message """ print(Fore.YELLOW + "[!]"+in_text) print(Style.RESET_ALL)
[ "def", "prnt_warn", "(", "in_text", ")", ":", "print", "(", "Fore", ".", "YELLOW", "+", "\"[!]\"", "+", "in_text", ")", "print", "(", "Style", ".", "RESET_ALL", ")" ]
https://github.com/bitconch/bitconch-core/blob/5537f3215b3e3b76f6720d6f908676a6c34bc5db/deploy-stable.py#L56-L61
zyq8709/DexHunter
9d829a9f6f608ebad26923f29a294ae9c68d0441
art/tools/cpplint.py
python
Match
(pattern, s)
return _regexp_compile_cache[pattern].match(s)
Matches the string with the pattern, caching the compiled regexp.
Matches the string with the pattern, caching the compiled regexp.
[ "Matches", "the", "string", "with", "the", "pattern", "caching", "the", "compiled", "regexp", "." ]
def Match(pattern, s): """Matches the string with the pattern, caching the compiled regexp.""" # The regexp compilation caching is inlined in both Match and Search for # performance reasons; factoring it out into a separate function turns out # to be noticeably expensive. if not pattern in _regexp_compile_cac...
[ "def", "Match", "(", "pattern", ",", "s", ")", ":", "# The regexp compilation caching is inlined in both Match and Search for", "# performance reasons; factoring it out into a separate function turns out", "# to be noticeably expensive.", "if", "not", "pattern", "in", "_regexp_compile_...
https://github.com/zyq8709/DexHunter/blob/9d829a9f6f608ebad26923f29a294ae9c68d0441/art/tools/cpplint.py#L409-L416
snap-stanford/snap-python
d53c51b0a26aa7e3e7400b014cdf728948fde80a
snapx/snapx/utils/decorator.py
python
FunctionMaker.update
(self, func, **kw)
Update the signature of func with the data in self
Update the signature of func with the data in self
[ "Update", "the", "signature", "of", "func", "with", "the", "data", "in", "self" ]
def update(self, func, **kw): "Update the signature of func with the data in self" func.__name__ = self.name func.__doc__ = getattr(self, 'doc', None) func.__dict__ = getattr(self, 'dict', {}) func.__defaults__ = self.defaults func.__kwdefaults__ = self.kwonlydefaults or ...
[ "def", "update", "(", "self", ",", "func", ",", "*", "*", "kw", ")", ":", "func", ".", "__name__", "=", "self", ".", "name", "func", ".", "__doc__", "=", "getattr", "(", "self", ",", "'doc'", ",", "None", ")", "func", ".", "__dict__", "=", "getat...
https://github.com/snap-stanford/snap-python/blob/d53c51b0a26aa7e3e7400b014cdf728948fde80a/snapx/snapx/utils/decorator.py#L145-L160
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/ops/composite/multitype_ops/getitem_impl.py
python
_tensor_getitem_by_number
(data, number_index)
return compile_utils.tensor_index_by_number(data, number_index)
Getting item of tensor by number index. Inputs: data (Tensor): A tensor. number_index (Number): Index in scalar. Outputs: Tensor, element type is as same as the element type of data.
Getting item of tensor by number index.
[ "Getting", "item", "of", "tensor", "by", "number", "index", "." ]
def _tensor_getitem_by_number(data, number_index): """ Getting item of tensor by number index. Inputs: data (Tensor): A tensor. number_index (Number): Index in scalar. Outputs: Tensor, element type is as same as the element type of data. """ return compile_utils.tensor_...
[ "def", "_tensor_getitem_by_number", "(", "data", ",", "number_index", ")", ":", "return", "compile_utils", ".", "tensor_index_by_number", "(", "data", ",", "number_index", ")" ]
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/ops/composite/multitype_ops/getitem_impl.py#L153-L164
okex/V3-Open-API-SDK
c5abb0db7e2287718e0055e17e57672ce0ec7fd9
okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/distlib/_backport/tarfile.py
python
nti
(s)
return n
Convert a number field to a python number.
Convert a number field to a python number.
[ "Convert", "a", "number", "field", "to", "a", "python", "number", "." ]
def nti(s): """Convert a number field to a python number. """ # There are two possible encodings for a number field, see # itn() below. if s[0] != chr(0o200): try: n = int(nts(s, "ascii", "strict") or "0", 8) except ValueError: raise InvalidHeaderError("invali...
[ "def", "nti", "(", "s", ")", ":", "# There are two possible encodings for a number field, see", "# itn() below.", "if", "s", "[", "0", "]", "!=", "chr", "(", "0o200", ")", ":", "try", ":", "n", "=", "int", "(", "nts", "(", "s", ",", "\"ascii\"", ",", "\"...
https://github.com/okex/V3-Open-API-SDK/blob/c5abb0db7e2287718e0055e17e57672ce0ec7fd9/okex-python-sdk-api/venv/Lib/site-packages/pip-19.0.3-py3.8.egg/pip/_vendor/distlib/_backport/tarfile.py#L199-L214
trilinos/Trilinos
6168be6dd51e35e1cd681e9c4b24433e709df140
packages/seacas/libraries/ioss/src/visualization/catalyst/phactori/phactori.py
python
CreateParaviewItemsForImagesetC
(inImageset)
given a json block structure as discussed in the catalyst sierra insitu wiki, create the corresponding one imageset (view) based on a particular imageset block and the availa
given a json block structure as discussed in the catalyst sierra insitu wiki, create the corresponding one imageset (view) based on a particular imageset block and the availa
[ "given", "a", "json", "block", "structure", "as", "discussed", "in", "the", "catalyst", "sierra", "insitu", "wiki", "create", "the", "corresponding", "one", "imageset", "(", "view", ")", "based", "on", "a", "particular", "imageset", "block", "and", "the", "a...
def CreateParaviewItemsForImagesetC(inImageset): """given a json block structure as discussed in the catalyst sierra insitu wiki, create the corresponding one imageset (view) based on a particular imageset block and the availa""" theCamera = inImageset.mCamera #we are setting this up, for now, so that...
[ "def", "CreateParaviewItemsForImagesetC", "(", "inImageset", ")", ":", "theCamera", "=", "inImageset", ".", "mCamera", "#we are setting this up, for now, so that you MUST have a camera at this", "#point--default should have been added and referenced earlier", "if", "theCamera", "==", ...
https://github.com/trilinos/Trilinos/blob/6168be6dd51e35e1cd681e9c4b24433e709df140/packages/seacas/libraries/ioss/src/visualization/catalyst/phactori/phactori.py#L4286-L4310
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
src/gtk/aui.py
python
AuiTabCtrl.__init__
(self, *args, **kwargs)
__init__(self, Window parent, int id=ID_ANY, Point pos=DefaultPosition, Size size=DefaultSize, long style=0) -> AuiTabCtrl
__init__(self, Window parent, int id=ID_ANY, Point pos=DefaultPosition, Size size=DefaultSize, long style=0) -> AuiTabCtrl
[ "__init__", "(", "self", "Window", "parent", "int", "id", "=", "ID_ANY", "Point", "pos", "=", "DefaultPosition", "Size", "size", "=", "DefaultSize", "long", "style", "=", "0", ")", "-", ">", "AuiTabCtrl" ]
def __init__(self, *args, **kwargs): """ __init__(self, Window parent, int id=ID_ANY, Point pos=DefaultPosition, Size size=DefaultSize, long style=0) -> AuiTabCtrl """ _aui.AuiTabCtrl_swiginit(self,_aui.new_AuiTabCtrl(*args, **kwargs)) self._setOORInfo(self)
[ "def", "__init__", "(", "self", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "_aui", ".", "AuiTabCtrl_swiginit", "(", "self", ",", "_aui", ".", "new_AuiTabCtrl", "(", "*", "args", ",", "*", "*", "kwargs", ")", ")", "self", ".", "_setOORInfo",...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/src/gtk/aui.py#L1268-L1274
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/psutil/_psaix.py
python
cpu_stats
()
return _common.scpustats( ctx_switches, interrupts, soft_interrupts, syscalls)
Return various CPU stats as a named tuple.
Return various CPU stats as a named tuple.
[ "Return", "various", "CPU", "stats", "as", "a", "named", "tuple", "." ]
def cpu_stats(): """Return various CPU stats as a named tuple.""" ctx_switches, interrupts, soft_interrupts, syscalls = cext.cpu_stats() return _common.scpustats( ctx_switches, interrupts, soft_interrupts, syscalls)
[ "def", "cpu_stats", "(", ")", ":", "ctx_switches", ",", "interrupts", ",", "soft_interrupts", ",", "syscalls", "=", "cext", ".", "cpu_stats", "(", ")", "return", "_common", ".", "scpustats", "(", "ctx_switches", ",", "interrupts", ",", "soft_interrupts", ",", ...
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/psutil/_psaix.py#L160-L164
facebook/proxygen
a9ca025af207787815cb01eee1971cd572c7a81e
build/fbcode_builder/getdeps/builder.py
python
BuilderBase.run_tests
( self, install_dirs, schedule_type, owner, test_filter, retry, no_testpilot )
Execute any tests that we know how to run. If they fail, raise an exception.
Execute any tests that we know how to run. If they fail, raise an exception.
[ "Execute", "any", "tests", "that", "we", "know", "how", "to", "run", ".", "If", "they", "fail", "raise", "an", "exception", "." ]
def run_tests( self, install_dirs, schedule_type, owner, test_filter, retry, no_testpilot ): """Execute any tests that we know how to run. If they fail, raise an exception.""" pass
[ "def", "run_tests", "(", "self", ",", "install_dirs", ",", "schedule_type", ",", "owner", ",", "test_filter", ",", "retry", ",", "no_testpilot", ")", ":", "pass" ]
https://github.com/facebook/proxygen/blob/a9ca025af207787815cb01eee1971cd572c7a81e/build/fbcode_builder/getdeps/builder.py#L109-L114
strukturag/libheif
0082fea96ee70a20c8906a0373bedec0c01777bc
scripts/cpplint.py
python
NestingState.InNamespaceBody
(self)
return self.stack and isinstance(self.stack[-1], _NamespaceInfo)
Check if we are currently one level inside a namespace body. Returns: True if top of the stack is a namespace block, False otherwise.
Check if we are currently one level inside a namespace body.
[ "Check", "if", "we", "are", "currently", "one", "level", "inside", "a", "namespace", "body", "." ]
def InNamespaceBody(self): """Check if we are currently one level inside a namespace body. Returns: True if top of the stack is a namespace block, False otherwise. """ return self.stack and isinstance(self.stack[-1], _NamespaceInfo)
[ "def", "InNamespaceBody", "(", "self", ")", ":", "return", "self", ".", "stack", "and", "isinstance", "(", "self", ".", "stack", "[", "-", "1", "]", ",", "_NamespaceInfo", ")" ]
https://github.com/strukturag/libheif/blob/0082fea96ee70a20c8906a0373bedec0c01777bc/scripts/cpplint.py#L2320-L2326
mantidproject/mantid
03deeb89254ec4289edb8771e0188c2090a02f32
scripts/SANS/sans/algorithm_detail/batch_execution.py
python
provide_loaded_data
(state, use_optimizations, workspace_to_name, workspace_to_monitor)
return workspaces, monitors
Provide the data for reduction. :param state: a SANSState object. :param use_optimizations: if optimizations are enabled, then the load mechanism will search for workspaces on the ADS. :param workspace_to_name: a map of SANSDataType vs output-property name of SANSLoad for wor...
Provide the data for reduction.
[ "Provide", "the", "data", "for", "reduction", "." ]
def provide_loaded_data(state, use_optimizations, workspace_to_name, workspace_to_monitor): """ Provide the data for reduction. :param state: a SANSState object. :param use_optimizations: if optimizations are enabled, then the load mechanism will search for workspaces on the ...
[ "def", "provide_loaded_data", "(", "state", ",", "use_optimizations", ",", "workspace_to_name", ",", "workspace_to_monitor", ")", ":", "# Load the data", "state_serialized", "=", "Serializer", ".", "to_json", "(", "state", ")", "load_name", "=", "\"SANSLoad\"", "load_...
https://github.com/mantidproject/mantid/blob/03deeb89254ec4289edb8771e0188c2090a02f32/scripts/SANS/sans/algorithm_detail/batch_execution.py#L405-L448
wxWidgets/wxPython-Classic
19571e1ae65f1ac445f5491474121998c97a1bf0
wx/lib/agw/ribbon/buttonbar.py
python
RibbonButtonBar.MakeResizedBitmap
(self, original, size)
return wx.BitmapFromImage(img)
Resize and scale the `original` bitmap to the dimensions specified in `size`. :param `original`: the original bitmap, an instance of :class:`Bitmap`; :param `size`: the size to which the input bitmap must be rescaled, an instance of :class:`Size`. :return: A scaled representation of the input ...
Resize and scale the `original` bitmap to the dimensions specified in `size`.
[ "Resize", "and", "scale", "the", "original", "bitmap", "to", "the", "dimensions", "specified", "in", "size", "." ]
def MakeResizedBitmap(self, original, size): """ Resize and scale the `original` bitmap to the dimensions specified in `size`. :param `original`: the original bitmap, an instance of :class:`Bitmap`; :param `size`: the size to which the input bitmap must be rescaled, an instance of :clas...
[ "def", "MakeResizedBitmap", "(", "self", ",", "original", ",", "size", ")", ":", "img", "=", "original", ".", "ConvertToImage", "(", ")", "img", ".", "Rescale", "(", "size", ".", "GetWidth", "(", ")", ",", "size", ".", "GetHeight", "(", ")", ",", "wx...
https://github.com/wxWidgets/wxPython-Classic/blob/19571e1ae65f1ac445f5491474121998c97a1bf0/wx/lib/agw/ribbon/buttonbar.py#L537-L549
gimli-org/gimli
17aa2160de9b15ababd9ef99e89b1bc3277bbb23
doc/paper/cg17/example-2.py
python
HydroGeophysicalModelling.response
(self, par)
return self.response_mt(par)
Return response. Simulate resistivity data for a given hydraulic conductivity.
Return response.
[ "Return", "response", "." ]
def response(self, par): """Return response. Simulate resistivity data for a given hydraulic conductivity. """ return self.response_mt(par)
[ "def", "response", "(", "self", ",", "par", ")", ":", "return", "self", ".", "response_mt", "(", "par", ")" ]
https://github.com/gimli-org/gimli/blob/17aa2160de9b15ababd9ef99e89b1bc3277bbb23/doc/paper/cg17/example-2.py#L159-L164
jeog/TDAmeritradeAPI
91c738afd7d57b54f6231170bd64c2550fafd34d
python/tdma_api/get.py
python
MoversGetter.set_direction_type
(self, direction_type)
Sets/changes MOVERS_DIRECTION_TYPE_[] constant to use.
Sets/changes MOVERS_DIRECTION_TYPE_[] constant to use.
[ "Sets", "/", "changes", "MOVERS_DIRECTION_TYPE_", "[]", "constant", "to", "use", "." ]
def set_direction_type(self, direction_type): """Sets/changes MOVERS_DIRECTION_TYPE_[] constant to use.""" clib.set_val(self._abi('SetDirectionType'), c_int, direction_type, self._obj)
[ "def", "set_direction_type", "(", "self", ",", "direction_type", ")", ":", "clib", ".", "set_val", "(", "self", ".", "_abi", "(", "'SetDirectionType'", ")", ",", "c_int", ",", "direction_type", ",", "self", ".", "_obj", ")" ]
https://github.com/jeog/TDAmeritradeAPI/blob/91c738afd7d57b54f6231170bd64c2550fafd34d/python/tdma_api/get.py#L373-L376
Genius-x/genius-x
9fc9f194e6d1fb92dd0e33d43db19ddb67cda7b0
cocos2d/tools/bindings-generator/generator.py
python
Generator.sorted_classes
(self)
return no_dupes
sorted classes in order of inheritance
sorted classes in order of inheritance
[ "sorted", "classes", "in", "order", "of", "inheritance" ]
def sorted_classes(self): ''' sorted classes in order of inheritance ''' sorted_list = [] for class_name in self.generated_classes.iterkeys(): nclass = self.generated_classes[class_name] sorted_list += self._sorted_parents(nclass) # remove dupes fr...
[ "def", "sorted_classes", "(", "self", ")", ":", "sorted_list", "=", "[", "]", "for", "class_name", "in", "self", ".", "generated_classes", ".", "iterkeys", "(", ")", ":", "nclass", "=", "self", ".", "generated_classes", "[", "class_name", "]", "sorted_list",...
https://github.com/Genius-x/genius-x/blob/9fc9f194e6d1fb92dd0e33d43db19ddb67cda7b0/cocos2d/tools/bindings-generator/generator.py#L924-L935
facebookincubator/BOLT
88c70afe9d388ad430cc150cc158641701397f70
mlir/python/mlir/dialects/linalg/opdsl/lang/comprehension.py
python
TensorExpression.collect_tensor_uses
(self, uses: Set["TensorUse"])
Collects all TensorUses reachable through this expression.
Collects all TensorUses reachable through this expression.
[ "Collects", "all", "TensorUses", "reachable", "through", "this", "expression", "." ]
def collect_tensor_uses(self, uses: Set["TensorUse"]): """Collects all TensorUses reachable through this expression.""" def visit_tensor_use(expr): if isinstance(expr, TensorUse): uses.add(expr) self.visit_tensor_exprs(visit_tensor_use)
[ "def", "collect_tensor_uses", "(", "self", ",", "uses", ":", "Set", "[", "\"TensorUse\"", "]", ")", ":", "def", "visit_tensor_use", "(", "expr", ")", ":", "if", "isinstance", "(", "expr", ",", "TensorUse", ")", ":", "uses", ".", "add", "(", "expr", ")"...
https://github.com/facebookincubator/BOLT/blob/88c70afe9d388ad430cc150cc158641701397f70/mlir/python/mlir/dialects/linalg/opdsl/lang/comprehension.py#L52-L59
wlanjie/AndroidFFmpeg
7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf
tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/turtle.py
python
TurtleScreen.tracer
(self, n=None, delay=None)
Turns turtle animation on/off and set delay for update drawings. Optional arguments: n -- nonnegative integer delay -- nonnegative integer If n is given, only each n-th regular screen update is really performed. (Can be used to accelerate the drawing of complex graphics.) ...
Turns turtle animation on/off and set delay for update drawings.
[ "Turns", "turtle", "animation", "on", "/", "off", "and", "set", "delay", "for", "update", "drawings", "." ]
def tracer(self, n=None, delay=None): """Turns turtle animation on/off and set delay for update drawings. Optional arguments: n -- nonnegative integer delay -- nonnegative integer If n is given, only each n-th regular screen update is really performed. (Can be used to...
[ "def", "tracer", "(", "self", ",", "n", "=", "None", ",", "delay", "=", "None", ")", ":", "if", "n", "is", "None", ":", "return", "self", ".", "_tracing", "self", ".", "_tracing", "=", "int", "(", "n", ")", "self", ".", "_updatecounter", "=", "0"...
https://github.com/wlanjie/AndroidFFmpeg/blob/7baf9122f4b8e1c74e7baf4be5c422c7a5ba5aaf/tools/fdk-aac-build/armeabi-v7a/toolchain/lib/python2.7/lib-tk/turtle.py#L1192-L1218
commaai/openpilot
4416c21b1e738ab7d04147c5ae52b5135e0cdb40
selfdrive/controls/lib/vehicle_model.py
python
create_dyn_state_matrices
(u: float, VM: VehicleModel)
return A, B
Returns the A and B matrix for the dynamics system Args: u: Vehicle speed [m/s] VM: Vehicle model Returns: A tuple with the 2x2 A matrix, and 2x2 B matrix Parameters in the vehicle model: cF: Tire stiffness Front [N/rad] cR: Tire stiffness Front [N/rad] aF: Distance from CG to front whe...
Returns the A and B matrix for the dynamics system
[ "Returns", "the", "A", "and", "B", "matrix", "for", "the", "dynamics", "system" ]
def create_dyn_state_matrices(u: float, VM: VehicleModel) -> Tuple[np.ndarray, np.ndarray]: """Returns the A and B matrix for the dynamics system Args: u: Vehicle speed [m/s] VM: Vehicle model Returns: A tuple with the 2x2 A matrix, and 2x2 B matrix Parameters in the vehicle model: cF: Tire s...
[ "def", "create_dyn_state_matrices", "(", "u", ":", "float", ",", "VM", ":", "VehicleModel", ")", "->", "Tuple", "[", "np", ".", "ndarray", ",", "np", ".", "ndarray", "]", ":", "A", "=", "np", ".", "zeros", "(", "(", "2", ",", "2", ")", ")", "B", ...
https://github.com/commaai/openpilot/blob/4416c21b1e738ab7d04147c5ae52b5135e0cdb40/selfdrive/controls/lib/vehicle_model.py#L172-L206
mindspore-ai/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
mindspore/python/mindspore/_extends/remote/kernel_build_server.py
python
Messager.send_ack
(self, success=True)
Send ack to remote Args: success: True or False
Send ack to remote
[ "Send", "ack", "to", "remote" ]
def send_ack(self, success=True): """ Send ack to remote Args: success: True or False """ if success: self.send_res('ACK') else: self.send_res('ERR')
[ "def", "send_ack", "(", "self", ",", "success", "=", "True", ")", ":", "if", "success", ":", "self", ".", "send_res", "(", "'ACK'", ")", "else", ":", "self", ".", "send_res", "(", "'ERR'", ")" ]
https://github.com/mindspore-ai/mindspore/blob/fb8fd3338605bb34fa5cea054e535a8b1d753fab/mindspore/python/mindspore/_extends/remote/kernel_build_server.py#L86-L96
gem5/gem5
141cc37c2d4b93959d4c249b8f7e6a8b2ef75338
configs/example/read_config.py
python
ConfigFile.get_param
(self, object_name, param_name)
Get a single param or SimObject reference from the configuration as a string
Get a single param or SimObject reference from the configuration as a string
[ "Get", "a", "single", "param", "or", "SimObject", "reference", "from", "the", "configuration", "as", "a", "string" ]
def get_param(self, object_name, param_name): """Get a single param or SimObject reference from the configuration as a string""" pass
[ "def", "get_param", "(", "self", ",", "object_name", ",", "param_name", ")", ":", "pass" ]
https://github.com/gem5/gem5/blob/141cc37c2d4b93959d4c249b8f7e6a8b2ef75338/configs/example/read_config.py#L388-L391
FreeCAD/FreeCAD
ba42231b9c6889b89e064d6d563448ed81e376ec
src/Mod/Path/PathScripts/PathHelixGui.py
python
TaskPanelOpPage.populateCombobox
(self, form, enumTups, comboBoxesPropertyMap)
fillComboboxes(form, comboBoxesPropertyMap) ... populate comboboxes with translated enumerations ** comboBoxesPropertyMap will be unnecessary if UI files use strict combobox naming protocol. Args: form = UI form enumTups = list of (translated_text, data_string) tuples ...
fillComboboxes(form, comboBoxesPropertyMap) ... populate comboboxes with translated enumerations ** comboBoxesPropertyMap will be unnecessary if UI files use strict combobox naming protocol. Args: form = UI form enumTups = list of (translated_text, data_string) tuples ...
[ "fillComboboxes", "(", "form", "comboBoxesPropertyMap", ")", "...", "populate", "comboboxes", "with", "translated", "enumerations", "**", "comboBoxesPropertyMap", "will", "be", "unnecessary", "if", "UI", "files", "use", "strict", "combobox", "naming", "protocol", ".",...
def populateCombobox(self, form, enumTups, comboBoxesPropertyMap): """fillComboboxes(form, comboBoxesPropertyMap) ... populate comboboxes with translated enumerations ** comboBoxesPropertyMap will be unnecessary if UI files use strict combobox naming protocol. Args: form = UI form ...
[ "def", "populateCombobox", "(", "self", ",", "form", ",", "enumTups", ",", "comboBoxesPropertyMap", ")", ":", "# Load appropriate enumerations in each combobox", "for", "cb", ",", "prop", "in", "comboBoxesPropertyMap", ":", "box", "=", "getattr", "(", "form", ",", ...
https://github.com/FreeCAD/FreeCAD/blob/ba42231b9c6889b89e064d6d563448ed81e376ec/src/Mod/Path/PathScripts/PathHelixGui.py#L62-L75
trilinos/Trilinos
6168be6dd51e35e1cd681e9c4b24433e709df140
packages/seacas/scripts/exomerge2.py
python
ExodusModel._new_node_field_name
(self)
return name
Return a node field name which is not used in the model.
Return a node field name which is not used in the model.
[ "Return", "a", "node", "field", "name", "which", "is", "not", "used", "in", "the", "model", "." ]
def _new_node_field_name(self): """Return a node field name which is not used in the model.""" id_ = 1 name = 'temp%d' % id_ while name in self.get_node_field_names(): id_ += 1 name = 'temp%d' % id_ return name
[ "def", "_new_node_field_name", "(", "self", ")", ":", "id_", "=", "1", "name", "=", "'temp%d'", "%", "id_", "while", "name", "in", "self", ".", "get_node_field_names", "(", ")", ":", "id_", "+=", "1", "name", "=", "'temp%d'", "%", "id_", "return", "nam...
https://github.com/trilinos/Trilinos/blob/6168be6dd51e35e1cd681e9c4b24433e709df140/packages/seacas/scripts/exomerge2.py#L561-L568
apache/arrow
af33dd1157eb8d7d9bfac25ebf61445b793b7943
dev/archery/archery/docker/cli.py
python
docker_run
(obj, image, command, *, env, user, force_pull, force_build, build_only, using_docker_cli, using_docker_buildx, use_cache, use_leaf_cache, resource_limit, volume)
Execute docker-compose builds. To see the available builds run `archery docker images`. Examples: # execute a single build archery docker run conda-python # execute the builds but disable the image pulling archery docker run --no-cache conda-python # pass a docker-compose parameter, lik...
Execute docker-compose builds.
[ "Execute", "docker", "-", "compose", "builds", "." ]
def docker_run(obj, image, command, *, env, user, force_pull, force_build, build_only, using_docker_cli, using_docker_buildx, use_cache, use_leaf_cache, resource_limit, volume): """ Execute docker-compose builds. To see the available builds run `archery docker images`. Ex...
[ "def", "docker_run", "(", "obj", ",", "image", ",", "command", ",", "*", ",", "env", ",", "user", ",", "force_pull", ",", "force_build", ",", "build_only", ",", "using_docker_cli", ",", "using_docker_buildx", ",", "use_cache", ",", "use_leaf_cache", ",", "re...
https://github.com/apache/arrow/blob/af33dd1157eb8d7d9bfac25ebf61445b793b7943/dev/archery/archery/docker/cli.py#L169-L233
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py
python
BaseEventLoop.stop
(self)
Stop running the event loop. Every callback already scheduled will still run. This simply informs run_forever to stop looping after a complete iteration.
Stop running the event loop.
[ "Stop", "running", "the", "event", "loop", "." ]
def stop(self): """Stop running the event loop. Every callback already scheduled will still run. This simply informs run_forever to stop looping after a complete iteration. """ self._stopping = True
[ "def", "stop", "(", "self", ")", ":", "self", ".", "_stopping", "=", "True" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/Python/3.7.10/mac/Python.framework/Versions/3.7/lib/python3.7/asyncio/base_events.py#L589-L595
bulletphysics/bullet3
f0f2a952e146f016096db6f85cf0c44ed75b0b9a
examples/pybullet/gym/pybullet_envs/bullet/minitaur_gym_env.py
python
MinitaurBulletEnv.is_fallen
(self)
return (np.dot(np.asarray([0, 0, 1]), np.asarray(local_up)) < 0.85 or pos[2] < 0.13)
Decide whether the minitaur has fallen. If the up directions between the base and the world is larger (the dot product is smaller than 0.85) or the base is very low on the ground (the height is smaller than 0.13 meter), the minitaur is considered fallen. Returns: Boolean value that indicates whe...
Decide whether the minitaur has fallen.
[ "Decide", "whether", "the", "minitaur", "has", "fallen", "." ]
def is_fallen(self): """Decide whether the minitaur has fallen. If the up directions between the base and the world is larger (the dot product is smaller than 0.85) or the base is very low on the ground (the height is smaller than 0.13 meter), the minitaur is considered fallen. Returns: Bool...
[ "def", "is_fallen", "(", "self", ")", ":", "orientation", "=", "self", ".", "minitaur", ".", "GetBaseOrientation", "(", ")", "rot_mat", "=", "self", ".", "_pybullet_client", ".", "getMatrixFromQuaternion", "(", "orientation", ")", "local_up", "=", "rot_mat", "...
https://github.com/bulletphysics/bullet3/blob/f0f2a952e146f016096db6f85cf0c44ed75b0b9a/examples/pybullet/gym/pybullet_envs/bullet/minitaur_gym_env.py#L335-L349
aws/lumberyard
f85344403c1c2e77ec8c75deb2c116e97b713217
dev/Tools/build/waf-1.7.13/waflib/Logs.py
python
info
(*k, **kw)
Wrap logging.info
Wrap logging.info
[ "Wrap", "logging", ".", "info" ]
def info(*k, **kw): """ Wrap logging.info """ global log log.info(*k, **kw)
[ "def", "info", "(", "*", "k", ",", "*", "*", "kw", ")", ":", "global", "log", "log", ".", "info", "(", "*", "k", ",", "*", "*", "kw", ")" ]
https://github.com/aws/lumberyard/blob/f85344403c1c2e77ec8c75deb2c116e97b713217/dev/Tools/build/waf-1.7.13/waflib/Logs.py#L257-L262