nwo stringlengths 5 106 | sha stringlengths 40 40 | path stringlengths 4 174 | language stringclasses 1
value | identifier stringlengths 1 140 | parameters stringlengths 0 87.7k | argument_list stringclasses 1
value | return_statement stringlengths 0 426k | docstring stringlengths 0 64.3k | docstring_summary stringlengths 0 26.3k | docstring_tokens list | function stringlengths 18 4.83M | function_tokens list | url stringlengths 83 304 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
datalad/datalad | d8c8383d878a207bb586415314219a60c345f732 | datalad/runner/gitrunner.py | python | GitRunnerBase.get_git_environ_adjusted | (env=None) | return git_env | Replaces GIT_DIR and GIT_WORK_TREE with absolute paths if relative path and defined | Replaces GIT_DIR and GIT_WORK_TREE with absolute paths if relative path and defined | [
"Replaces",
"GIT_DIR",
"and",
"GIT_WORK_TREE",
"with",
"absolute",
"paths",
"if",
"relative",
"path",
"and",
"defined"
] | def get_git_environ_adjusted(env=None):
"""
Replaces GIT_DIR and GIT_WORK_TREE with absolute paths if relative path and defined
"""
# if env set copy else get os environment
git_env = env.copy() if env else os.environ.copy()
if GitRunnerBase._GIT_PATH:
git_env... | [
"def",
"get_git_environ_adjusted",
"(",
"env",
"=",
"None",
")",
":",
"# if env set copy else get os environment",
"git_env",
"=",
"env",
".",
"copy",
"(",
")",
"if",
"env",
"else",
"os",
".",
"environ",
".",
"copy",
"(",
")",
"if",
"GitRunnerBase",
".",
"_G... | https://github.com/datalad/datalad/blob/d8c8383d878a207bb586415314219a60c345f732/datalad/runner/gitrunner.py#L84-L115 | |
Tramac/awesome-semantic-segmentation-pytorch | 5843f75215dadc5d734155a238b425a753a665d9 | core/models/segbase.py | python | SegBaseModel.evaluate | (self, x) | return self.forward(x)[0] | evaluating network with inputs and targets | evaluating network with inputs and targets | [
"evaluating",
"network",
"with",
"inputs",
"and",
"targets"
] | def evaluate(self, x):
"""evaluating network with inputs and targets"""
return self.forward(x)[0] | [
"def",
"evaluate",
"(",
"self",
",",
"x",
")",
":",
"return",
"self",
".",
"forward",
"(",
"x",
")",
"[",
"0",
"]"
] | https://github.com/Tramac/awesome-semantic-segmentation-pytorch/blob/5843f75215dadc5d734155a238b425a753a665d9/core/models/segbase.py#L52-L54 | |
deepmind/bsuite | f305972cf05042f6ce23d638477ea9b33918ba17 | bsuite/logging/sqlite_logging.py | python | Logger.__init__ | (self,
db_path: str,
experiment_name: str,
setting_index: int,
connection: Optional[sqlite3.Connection] = None,
skip_name_validation: bool = False) | Initializes a new SQLite logger.
Args:
db_path: Path to the database file. The logger will create the file on the
first write if it does not exist.
experiment_name: The name of the bsuite experiment, e.g. 'deep_sea'.
setting_index: The index of the corresponding environment setting as
... | Initializes a new SQLite logger. | [
"Initializes",
"a",
"new",
"SQLite",
"logger",
"."
] | def __init__(self,
db_path: str,
experiment_name: str,
setting_index: int,
connection: Optional[sqlite3.Connection] = None,
skip_name_validation: bool = False):
"""Initializes a new SQLite logger.
Args:
db_path: Path to the databa... | [
"def",
"__init__",
"(",
"self",
",",
"db_path",
":",
"str",
",",
"experiment_name",
":",
"str",
",",
"setting_index",
":",
"int",
",",
"connection",
":",
"Optional",
"[",
"sqlite3",
".",
"Connection",
"]",
"=",
"None",
",",
"skip_name_validation",
":",
"bo... | https://github.com/deepmind/bsuite/blob/f305972cf05042f6ce23d638477ea9b33918ba17/bsuite/logging/sqlite_logging.py#L54-L86 | ||
cloudera/hue | 23f02102d4547c17c32bd5ea0eb24e9eadd657a4 | apps/impala/gen-py/hive_metastore/ThriftHiveMetastore.py | python | Client.get_table_objects_by_name | (self, dbname, tbl_names) | return self.recv_get_table_objects_by_name() | Parameters:
- dbname
- tbl_names | Parameters:
- dbname
- tbl_names | [
"Parameters",
":",
"-",
"dbname",
"-",
"tbl_names"
] | def get_table_objects_by_name(self, dbname, tbl_names):
"""
Parameters:
- dbname
- tbl_names
"""
self.send_get_table_objects_by_name(dbname, tbl_names)
return self.recv_get_table_objects_by_name() | [
"def",
"get_table_objects_by_name",
"(",
"self",
",",
"dbname",
",",
"tbl_names",
")",
":",
"self",
".",
"send_get_table_objects_by_name",
"(",
"dbname",
",",
"tbl_names",
")",
"return",
"self",
".",
"recv_get_table_objects_by_name",
"(",
")"
] | https://github.com/cloudera/hue/blob/23f02102d4547c17c32bd5ea0eb24e9eadd657a4/apps/impala/gen-py/hive_metastore/ThriftHiveMetastore.py#L2098-L2106 | |
WerWolv/EdiZon_CheatsConfigsAndScripts | d16d36c7509c01dca770f402babd83ff2e9ae6e7 | Scripts/lib/python3.5/heapq.py | python | merge | (*iterables, key=None, reverse=False) | Merge multiple sorted inputs into a single sorted output.
Similar to sorted(itertools.chain(*iterables)) but returns a generator,
does not pull the data into memory all at once, and assumes that each of
the input streams is already sorted (smallest to largest).
>>> list(merge([1,3,5,7], [0,2,4,8], [5,... | Merge multiple sorted inputs into a single sorted output. | [
"Merge",
"multiple",
"sorted",
"inputs",
"into",
"a",
"single",
"sorted",
"output",
"."
] | def merge(*iterables, key=None, reverse=False):
'''Merge multiple sorted inputs into a single sorted output.
Similar to sorted(itertools.chain(*iterables)) but returns a generator,
does not pull the data into memory all at once, and assumes that each of
the input streams is already sorted (smallest to ... | [
"def",
"merge",
"(",
"*",
"iterables",
",",
"key",
"=",
"None",
",",
"reverse",
"=",
"False",
")",
":",
"h",
"=",
"[",
"]",
"h_append",
"=",
"h",
".",
"append",
"if",
"reverse",
":",
"_heapify",
"=",
"_heapify_max",
"_heappop",
"=",
"_heappop_max",
"... | https://github.com/WerWolv/EdiZon_CheatsConfigsAndScripts/blob/d16d36c7509c01dca770f402babd83ff2e9ae6e7/Scripts/lib/python3.5/heapq.py#L314-L392 | ||
openai/kubernetes-ec2-autoscaler | 1d4d1314e9ee2cb2ae0e17b8b8d8d7845fe8b168 | autoscaler/azure.py | python | AzureVirtualScaleSet.terminate_instances | (self, vm_ids) | return AllCompletedFuture(futures) | [] | def terminate_instances(self, vm_ids):
vm_ids = list(vm_ids)
instances = {}
for vm_id in vm_ids:
scale_set_name, instance = self.vm_id_to_instance[vm_id]
# Update our cached copy of the Scale Set
self.scale_sets[scale_set_name].capacity -= 1
instan... | [
"def",
"terminate_instances",
"(",
"self",
",",
"vm_ids",
")",
":",
"vm_ids",
"=",
"list",
"(",
"vm_ids",
")",
"instances",
"=",
"{",
"}",
"for",
"vm_id",
"in",
"vm_ids",
":",
"scale_set_name",
",",
"instance",
"=",
"self",
".",
"vm_id_to_instance",
"[",
... | https://github.com/openai/kubernetes-ec2-autoscaler/blob/1d4d1314e9ee2cb2ae0e17b8b8d8d7845fe8b168/autoscaler/azure.py#L217-L230 | |||
miyosuda/unreal | 31d4886149412fa248f6efa490ab65bd2f425cde | model/model.py | python | UnrealModel._get2d_deconv_output_size | (self,
input_height, input_width,
filter_height, filter_width,
stride, padding_type) | return out_height, out_width | [] | def _get2d_deconv_output_size(self,
input_height, input_width,
filter_height, filter_width,
stride, padding_type):
if padding_type == 'VALID':
out_height = (input_height - 1) * stride + filter_height
out_widt... | [
"def",
"_get2d_deconv_output_size",
"(",
"self",
",",
"input_height",
",",
"input_width",
",",
"filter_height",
",",
"filter_width",
",",
"stride",
",",
"padding_type",
")",
":",
"if",
"padding_type",
"==",
"'VALID'",
":",
"out_height",
"=",
"(",
"input_height",
... | https://github.com/miyosuda/unreal/blob/31d4886149412fa248f6efa490ab65bd2f425cde/model/model.py#L471-L483 | |||
pytorch/ignite | e452884afa36b63447b9029c4773f6f59cf41340 | ignite/handlers/lr_finder.py | python | FastaiLRFinder.attach | (
self,
trainer: Engine,
to_save: Mapping,
output_transform: Callable = lambda output: output,
num_iter: Optional[int] = None,
start_lr: Optional[float] = None,
end_lr: float = 10.0,
step_mode: str = "exp",
smooth_f: float = 0.05,
diverge_t... | Attaches lr_finder to a given trainer. It also resets model and optimizer at the end of the run.
Args:
trainer: lr_finder is attached to this trainer. Please, keep in mind that all attached handlers
will be executed.
to_save: dictionary with optimizer and other objects t... | Attaches lr_finder to a given trainer. It also resets model and optimizer at the end of the run. | [
"Attaches",
"lr_finder",
"to",
"a",
"given",
"trainer",
".",
"It",
"also",
"resets",
"model",
"and",
"optimizer",
"at",
"the",
"end",
"of",
"the",
"run",
"."
] | def attach(
self,
trainer: Engine,
to_save: Mapping,
output_transform: Callable = lambda output: output,
num_iter: Optional[int] = None,
start_lr: Optional[float] = None,
end_lr: float = 10.0,
step_mode: str = "exp",
smooth_f: float = 0.05,
... | [
"def",
"attach",
"(",
"self",
",",
"trainer",
":",
"Engine",
",",
"to_save",
":",
"Mapping",
",",
"output_transform",
":",
"Callable",
"=",
"lambda",
"output",
":",
"output",
",",
"num_iter",
":",
"Optional",
"[",
"int",
"]",
"=",
"None",
",",
"start_lr"... | https://github.com/pytorch/ignite/blob/e452884afa36b63447b9029c4773f6f59cf41340/ignite/handlers/lr_finder.py#L364-L473 | ||
Azure/azure-linux-extensions | a42ef718c746abab2b3c6a21da87b29e76364558 | Common/libpsutil/py2.7-glibc-2.12+/psutil/_pswindows.py | python | users | () | return retlist | Return currently connected users as a list of namedtuples. | Return currently connected users as a list of namedtuples. | [
"Return",
"currently",
"connected",
"users",
"as",
"a",
"list",
"of",
"namedtuples",
"."
] | def users():
"""Return currently connected users as a list of namedtuples."""
retlist = []
rawlist = cext.users()
for item in rawlist:
user, hostname, tstamp = item
nt = _common.suser(user, None, hostname, tstamp)
retlist.append(nt)
return retlist | [
"def",
"users",
"(",
")",
":",
"retlist",
"=",
"[",
"]",
"rawlist",
"=",
"cext",
".",
"users",
"(",
")",
"for",
"item",
"in",
"rawlist",
":",
"user",
",",
"hostname",
",",
"tstamp",
"=",
"item",
"nt",
"=",
"_common",
".",
"suser",
"(",
"user",
",... | https://github.com/Azure/azure-linux-extensions/blob/a42ef718c746abab2b3c6a21da87b29e76364558/Common/libpsutil/py2.7-glibc-2.12+/psutil/_pswindows.py#L182-L190 | |
holzschu/Carnets | 44effb10ddfc6aa5c8b0687582a724ba82c6b547 | Library/lib/python3.7/site-packages/sympy/utilities/iterables.py | python | _iproduct2 | (iterable1, iterable2) | Cartesian product of two possibly infinite iterables | Cartesian product of two possibly infinite iterables | [
"Cartesian",
"product",
"of",
"two",
"possibly",
"infinite",
"iterables"
] | def _iproduct2(iterable1, iterable2):
'''Cartesian product of two possibly infinite iterables'''
it1 = iter(iterable1)
it2 = iter(iterable2)
elems1 = []
elems2 = []
sentinel = object()
def append(it, elems):
e = next(it, sentinel)
if e is not sentinel:
elems.ap... | [
"def",
"_iproduct2",
"(",
"iterable1",
",",
"iterable2",
")",
":",
"it1",
"=",
"iter",
"(",
"iterable1",
")",
"it2",
"=",
"iter",
"(",
"iterable2",
")",
"elems1",
"=",
"[",
"]",
"elems2",
"=",
"[",
"]",
"sentinel",
"=",
"object",
"(",
")",
"def",
"... | https://github.com/holzschu/Carnets/blob/44effb10ddfc6aa5c8b0687582a724ba82c6b547/Library/lib/python3.7/site-packages/sympy/utilities/iterables.py#L199-L223 | ||
ajinabraham/OWASP-Xenotix-XSS-Exploit-Framework | cb692f527e4e819b6c228187c5702d990a180043 | external/Scripting Engine/Xenotix Python Scripting Engine/Lib/codecs.py | python | IncrementalEncoder.getstate | (self) | return 0 | Return the current state of the encoder. | Return the current state of the encoder. | [
"Return",
"the",
"current",
"state",
"of",
"the",
"encoder",
"."
] | def getstate(self):
"""
Return the current state of the encoder.
"""
return 0 | [
"def",
"getstate",
"(",
"self",
")",
":",
"return",
"0"
] | https://github.com/ajinabraham/OWASP-Xenotix-XSS-Exploit-Framework/blob/cb692f527e4e819b6c228187c5702d990a180043/external/Scripting Engine/Xenotix Python Scripting Engine/Lib/codecs.py#L184-L188 | |
trakt/Plex-Trakt-Scrobbler | aeb0bfbe62fad4b06c164f1b95581da7f35dce0b | Trakttv.bundle/Contents/Libraries/Shared/elftools/construct/macros.py | python | EmbeddedBitStruct | (*subcons) | return Bitwise(Embedded(Struct(None, *subcons))) | an embedded BitStruct. no name is necessary.
* subcons - the subcons that make up this structure | an embedded BitStruct. no name is necessary.
* subcons - the subcons that make up this structure | [
"an",
"embedded",
"BitStruct",
".",
"no",
"name",
"is",
"necessary",
".",
"*",
"subcons",
"-",
"the",
"subcons",
"that",
"make",
"up",
"this",
"structure"
] | def EmbeddedBitStruct(*subcons):
"""an embedded BitStruct. no name is necessary.
* subcons - the subcons that make up this structure
"""
return Bitwise(Embedded(Struct(None, *subcons))) | [
"def",
"EmbeddedBitStruct",
"(",
"*",
"subcons",
")",
":",
"return",
"Bitwise",
"(",
"Embedded",
"(",
"Struct",
"(",
"None",
",",
"*",
"subcons",
")",
")",
")"
] | https://github.com/trakt/Plex-Trakt-Scrobbler/blob/aeb0bfbe62fad4b06c164f1b95581da7f35dce0b/Trakttv.bundle/Contents/Libraries/Shared/elftools/construct/macros.py#L459-L463 | |
jython/jython3 | def4f8ec47cb7a9c799ea4c745f12badf92c5769 | Lib/decimal.py | python | Context.max_mag | (self, a, b) | return a.max_mag(b, context=self) | Compares the values numerically with their sign ignored.
>>> ExtendedContext.max_mag(Decimal('7'), Decimal('NaN'))
Decimal('7')
>>> ExtendedContext.max_mag(Decimal('7'), Decimal('-10'))
Decimal('-10')
>>> ExtendedContext.max_mag(1, -2)
Decimal('-2')
>>> ExtendedC... | Compares the values numerically with their sign ignored. | [
"Compares",
"the",
"values",
"numerically",
"with",
"their",
"sign",
"ignored",
"."
] | def max_mag(self, a, b):
"""Compares the values numerically with their sign ignored.
>>> ExtendedContext.max_mag(Decimal('7'), Decimal('NaN'))
Decimal('7')
>>> ExtendedContext.max_mag(Decimal('7'), Decimal('-10'))
Decimal('-10')
>>> ExtendedContext.max_mag(1, -2)
... | [
"def",
"max_mag",
"(",
"self",
",",
"a",
",",
"b",
")",
":",
"a",
"=",
"_convert_other",
"(",
"a",
",",
"raiseit",
"=",
"True",
")",
"return",
"a",
".",
"max_mag",
"(",
"b",
",",
"context",
"=",
"self",
")"
] | https://github.com/jython/jython3/blob/def4f8ec47cb7a9c799ea4c745f12badf92c5769/Lib/decimal.py#L4679-L4694 | |
securesystemslab/zippy | ff0e84ac99442c2c55fe1d285332cfd4e185e089 | zippy/lib-python/3/datetime.py | python | tzinfo.__reduce__ | (self) | [] | def __reduce__(self):
getinitargs = getattr(self, "__getinitargs__", None)
if getinitargs:
args = getinitargs()
else:
args = ()
getstate = getattr(self, "__getstate__", None)
if getstate:
state = getstate()
else:
state = get... | [
"def",
"__reduce__",
"(",
"self",
")",
":",
"getinitargs",
"=",
"getattr",
"(",
"self",
",",
"\"__getinitargs__\"",
",",
"None",
")",
"if",
"getinitargs",
":",
"args",
"=",
"getinitargs",
"(",
")",
"else",
":",
"args",
"=",
"(",
")",
"getstate",
"=",
"... | https://github.com/securesystemslab/zippy/blob/ff0e84ac99442c2c55fe1d285332cfd4e185e089/zippy/lib-python/3/datetime.py#L986-L1000 | ||||
hydroshare/hydroshare | 7ba563b55412f283047fb3ef6da367d41dec58c6 | hs_tools_resource/models.py | python | ToolResource.get_supported_upload_file_types | (cls) | return () | [] | def get_supported_upload_file_types(cls):
# no file types are supported
return () | [
"def",
"get_supported_upload_file_types",
"(",
"cls",
")",
":",
"# no file types are supported",
"return",
"(",
")"
] | https://github.com/hydroshare/hydroshare/blob/7ba563b55412f283047fb3ef6da367d41dec58c6/hs_tools_resource/models.py#L40-L42 | |||
kindredresearch/SenseAct | e7acbeb7918d0069ea82f0bab09ecb99807fdc9b | senseact/rtrl_base_env.py | python | RTRLBaseEnv._act_singlethread | (self, action) | Processes actions in single thread mode.
Args:
action: A numpy array containing action. | Processes actions in single thread mode. | [
"Processes",
"actions",
"in",
"single",
"thread",
"mode",
"."
] | def _act_singlethread(self, action):
"""Processes actions in single thread mode.
Args:
action: A numpy array containing action.
"""
self._write_action(action)
self._action_to_actuator_() | [
"def",
"_act_singlethread",
"(",
"self",
",",
"action",
")",
":",
"self",
".",
"_write_action",
"(",
"action",
")",
"self",
".",
"_action_to_actuator_",
"(",
")"
] | https://github.com/kindredresearch/SenseAct/blob/e7acbeb7918d0069ea82f0bab09ecb99807fdc9b/senseact/rtrl_base_env.py#L423-L430 | ||
exodrifter/unity-python | bef6e4e9ddfbbf1eaf7acbbb973e9aa3dd64a20d | Lib/mailbox.py | python | _mboxMMDFMessage._explain_to | (self, message) | Copy mbox- or MMDF-specific state to message insofar as possible. | Copy mbox- or MMDF-specific state to message insofar as possible. | [
"Copy",
"mbox",
"-",
"or",
"MMDF",
"-",
"specific",
"state",
"to",
"message",
"insofar",
"as",
"possible",
"."
] | def _explain_to(self, message):
"""Copy mbox- or MMDF-specific state to message insofar as possible."""
if isinstance(message, MaildirMessage):
flags = set(self.get_flags())
if 'O' in flags:
message.set_subdir('cur')
if 'F' in flags:
me... | [
"def",
"_explain_to",
"(",
"self",
",",
"message",
")",
":",
"if",
"isinstance",
"(",
"message",
",",
"MaildirMessage",
")",
":",
"flags",
"=",
"set",
"(",
"self",
".",
"get_flags",
"(",
")",
")",
"if",
"'O'",
"in",
"flags",
":",
"message",
".",
"set... | https://github.com/exodrifter/unity-python/blob/bef6e4e9ddfbbf1eaf7acbbb973e9aa3dd64a20d/Lib/mailbox.py#L1647-L1696 | ||
buke/GreenOdoo | 3d8c55d426fb41fdb3f2f5a1533cfe05983ba1df | runtime/python/lib/python2.7/site-packages/pytz-2012j-py2.7.egg/pytz/tzinfo.py | python | DstTzInfo.localize | (self, dt, is_dst=False) | return sorting_keys[first_key] | Convert naive time to local time.
This method should be used to construct localtimes, rather
than passing a tzinfo argument to a datetime constructor.
is_dst is used to determine the correct timezone in the ambigous
period at the end of daylight savings time.
>>> from pytz imp... | Convert naive time to local time. | [
"Convert",
"naive",
"time",
"to",
"local",
"time",
"."
] | def localize(self, dt, is_dst=False):
'''Convert naive time to local time.
This method should be used to construct localtimes, rather
than passing a tzinfo argument to a datetime constructor.
is_dst is used to determine the correct timezone in the ambigous
period at the end of ... | [
"def",
"localize",
"(",
"self",
",",
"dt",
",",
"is_dst",
"=",
"False",
")",
":",
"if",
"dt",
".",
"tzinfo",
"is",
"not",
"None",
":",
"raise",
"ValueError",
"(",
"'Not naive datetime (tzinfo is already set)'",
")",
"# Find the two best possibilities.",
"possible_... | https://github.com/buke/GreenOdoo/blob/3d8c55d426fb41fdb3f2f5a1533cfe05983ba1df/runtime/python/lib/python2.7/site-packages/pytz-2012j-py2.7.egg/pytz/tzinfo.py#L244-L378 | |
securesystemslab/zippy | ff0e84ac99442c2c55fe1d285332cfd4e185e089 | zippy/benchmarks/src/benchmarks/sympy/sympy/combinatorics/subsets.py | python | Subset.prev_lexicographic | (self) | return Subset(ret_set, super_set) | Generates the previous lexicographically ordered subset.
Examples
========
>>> from sympy.combinatorics.subsets import Subset
>>> a = Subset([], ['a','b','c','d'])
>>> a.prev_lexicographic().subset
['d']
>>> a = Subset(['c','d'], ['a','b','c','d'])
>>> a... | Generates the previous lexicographically ordered subset. | [
"Generates",
"the",
"previous",
"lexicographically",
"ordered",
"subset",
"."
] | def prev_lexicographic(self):
"""
Generates the previous lexicographically ordered subset.
Examples
========
>>> from sympy.combinatorics.subsets import Subset
>>> a = Subset([], ['a','b','c','d'])
>>> a.prev_lexicographic().subset
['d']
>>> a = ... | [
"def",
"prev_lexicographic",
"(",
"self",
")",
":",
"i",
"=",
"self",
".",
"superset_size",
"-",
"1",
"indices",
"=",
"Subset",
".",
"subset_indices",
"(",
"self",
".",
"subset",
",",
"self",
".",
"superset",
")",
"while",
"i",
"not",
"in",
"indices",
... | https://github.com/securesystemslab/zippy/blob/ff0e84ac99442c2c55fe1d285332cfd4e185e089/zippy/benchmarks/src/benchmarks/sympy/sympy/combinatorics/subsets.py#L177-L214 | |
SmirkCao/Lihang | ad8dc2b82df421ed6be88a77921d941a75f69055 | CH05/decision_tree.py | python | cal_condition_ent | (x, y) | return ent | calculate condition ent(y|x)
:param x: feature
:param y: class
:return: ent(y|x) | calculate condition ent(y|x)
:param x: feature
:param y: class
:return: ent(y|x) | [
"calculate",
"condition",
"ent",
"(",
"y|x",
")",
":",
"param",
"x",
":",
"feature",
":",
"param",
"y",
":",
"class",
":",
"return",
":",
"ent",
"(",
"y|x",
")"
] | def cal_condition_ent(x, y):
"""
calculate condition ent(y|x)
:param x: feature
:param y: class
:return: ent(y|x)
"""
ent = 0
x_values = set(x)
for x_value in x_values:
sub_y = y[x == x_value]
tmp_ent = cal_ent(sub_y)
p = sub_y.shape[0]/y.shape[0]
ent ... | [
"def",
"cal_condition_ent",
"(",
"x",
",",
"y",
")",
":",
"ent",
"=",
"0",
"x_values",
"=",
"set",
"(",
"x",
")",
"for",
"x_value",
"in",
"x_values",
":",
"sub_y",
"=",
"y",
"[",
"x",
"==",
"x_value",
"]",
"tmp_ent",
"=",
"cal_ent",
"(",
"sub_y",
... | https://github.com/SmirkCao/Lihang/blob/ad8dc2b82df421ed6be88a77921d941a75f69055/CH05/decision_tree.py#L211-L225 | |
sympy/sympy | d822fcba181155b85ff2b29fe525adbafb22b448 | sympy/combinatorics/coset_table.py | python | CosetTable.modified_merge | (self, k, lamda, w, q) | r"""
Parameters
==========
'k', 'lamda' -- the two class representatives to be merged.
q -- queue of length l of elements to be deleted from `\Omega` *.
w -- Word in (YUY^-1)
See Also
========
merge | r"""
Parameters
========== | [
"r",
"Parameters",
"=========="
] | def modified_merge(self, k, lamda, w, q):
r"""
Parameters
==========
'k', 'lamda' -- the two class representatives to be merged.
q -- queue of length l of elements to be deleted from `\Omega` *.
w -- Word in (YUY^-1)
See Also
========
merge
... | [
"def",
"modified_merge",
"(",
"self",
",",
"k",
",",
"lamda",
",",
"w",
",",
"q",
")",
":",
"self",
".",
"merge",
"(",
"k",
",",
"lamda",
",",
"q",
",",
"w",
"=",
"w",
",",
"modified",
"=",
"True",
")"
] | https://github.com/sympy/sympy/blob/d822fcba181155b85ff2b29fe525adbafb22b448/sympy/combinatorics/coset_table.py#L914-L928 | ||
paulwinex/pw_MultiScriptEditor | e447e99f87cb07e238baf693b7e124e50efdbc51 | multi_script_editor/jedi/evaluate/compiled/__init__.py | python | _a_generator | (foo) | Used to have an object to return for generators. | Used to have an object to return for generators. | [
"Used",
"to",
"have",
"an",
"object",
"to",
"return",
"for",
"generators",
"."
] | def _a_generator(foo):
"""Used to have an object to return for generators."""
yield 42
yield foo | [
"def",
"_a_generator",
"(",
"foo",
")",
":",
"yield",
"42",
"yield",
"foo"
] | https://github.com/paulwinex/pw_MultiScriptEditor/blob/e447e99f87cb07e238baf693b7e124e50efdbc51/multi_script_editor/jedi/evaluate/compiled/__init__.py#L372-L375 | ||
pypa/pipenv | b21baade71a86ab3ee1429f71fbc14d4f95fb75d | pipenv/patched/notpip/_vendor/distlib/util.py | python | parse_requirement | (req) | return Container(name=distname, extras=extras, constraints=versions,
marker=mark_expr, url=uri, requirement=rs) | Parse a requirement passed in as a string. Return a Container
whose attributes contain the various parts of the requirement. | Parse a requirement passed in as a string. Return a Container
whose attributes contain the various parts of the requirement. | [
"Parse",
"a",
"requirement",
"passed",
"in",
"as",
"a",
"string",
".",
"Return",
"a",
"Container",
"whose",
"attributes",
"contain",
"the",
"various",
"parts",
"of",
"the",
"requirement",
"."
] | def parse_requirement(req):
"""
Parse a requirement passed in as a string. Return a Container
whose attributes contain the various parts of the requirement.
"""
remaining = req.strip()
if not remaining or remaining.startswith('#'):
return None
m = IDENTIFIER.match(remaining)
if n... | [
"def",
"parse_requirement",
"(",
"req",
")",
":",
"remaining",
"=",
"req",
".",
"strip",
"(",
")",
"if",
"not",
"remaining",
"or",
"remaining",
".",
"startswith",
"(",
"'#'",
")",
":",
"return",
"None",
"m",
"=",
"IDENTIFIER",
".",
"match",
"(",
"remai... | https://github.com/pypa/pipenv/blob/b21baade71a86ab3ee1429f71fbc14d4f95fb75d/pipenv/patched/notpip/_vendor/distlib/util.py#L145-L263 | |
pypa/pipenv | b21baade71a86ab3ee1429f71fbc14d4f95fb75d | pipenv/vendor/packaging/specifiers.py | python | BaseSpecifier.prereleases | (self, value: bool) | Sets whether or not pre-releases as a whole are allowed by this
specifier. | Sets whether or not pre-releases as a whole are allowed by this
specifier. | [
"Sets",
"whether",
"or",
"not",
"pre",
"-",
"releases",
"as",
"a",
"whole",
"are",
"allowed",
"by",
"this",
"specifier",
"."
] | def prereleases(self, value: bool) -> None:
"""
Sets whether or not pre-releases as a whole are allowed by this
specifier.
""" | [
"def",
"prereleases",
"(",
"self",
",",
"value",
":",
"bool",
")",
"->",
"None",
":"
] | https://github.com/pypa/pipenv/blob/b21baade71a86ab3ee1429f71fbc14d4f95fb75d/pipenv/vendor/packaging/specifiers.py#L75-L79 | ||
boto/boto | b2a6f08122b2f1b89888d2848e730893595cd001 | boto/vpc/__init__.py | python | VPCConnection.create_subnet | (self, vpc_id, cidr_block, availability_zone=None,
dry_run=False) | return self.get_object('CreateSubnet', params, Subnet) | Create a new Subnet
:type vpc_id: str
:param vpc_id: The ID of the VPC where you want to create the subnet.
:type cidr_block: str
:param cidr_block: The CIDR block you want the subnet to cover.
:type availability_zone: str
:param availability_zone: The AZ you want the ... | Create a new Subnet | [
"Create",
"a",
"new",
"Subnet"
] | def create_subnet(self, vpc_id, cidr_block, availability_zone=None,
dry_run=False):
"""
Create a new Subnet
:type vpc_id: str
:param vpc_id: The ID of the VPC where you want to create the subnet.
:type cidr_block: str
:param cidr_block: The CIDR bl... | [
"def",
"create_subnet",
"(",
"self",
",",
"vpc_id",
",",
"cidr_block",
",",
"availability_zone",
"=",
"None",
",",
"dry_run",
"=",
"False",
")",
":",
"params",
"=",
"{",
"'VpcId'",
":",
"vpc_id",
",",
"'CidrBlock'",
":",
"cidr_block",
"}",
"if",
"availabil... | https://github.com/boto/boto/blob/b2a6f08122b2f1b89888d2848e730893595cd001/boto/vpc/__init__.py#L1154-L1180 | |
omz/PythonistaAppTemplate | f560f93f8876d82a21d108977f90583df08d55af | PythonistaAppTemplate/PythonistaKit.framework/pylib/site-packages/reportlab/pdfbase/pdfdoc.py | python | NoEncryption.encode | (self, t) | return t | encode a string, stream, text | encode a string, stream, text | [
"encode",
"a",
"string",
"stream",
"text"
] | def encode(self, t):
"encode a string, stream, text"
return t | [
"def",
"encode",
"(",
"self",
",",
"t",
")",
":",
"return",
"t"
] | https://github.com/omz/PythonistaAppTemplate/blob/f560f93f8876d82a21d108977f90583df08d55af/PythonistaAppTemplate/PythonistaKit.framework/pylib/site-packages/reportlab/pdfbase/pdfdoc.py#L101-L103 | |
oracle/oci-python-sdk | 3c1604e4e212008fb6718e2f68cdb5ef71fd5793 | src/oci/identity/identity_client.py | python | IdentityClient.bulk_delete_resources | (self, compartment_id, bulk_delete_resources_details, **kwargs) | Deletes multiple resources in the compartment. All resources must be in the same compartment. You must have the appropriate
permissions to delete the resources in the request. This API can only be invoked from the tenancy's
`home region`__. This operation creates a
:class:`WorkRequest`. Use the ... | Deletes multiple resources in the compartment. All resources must be in the same compartment. You must have the appropriate
permissions to delete the resources in the request. This API can only be invoked from the tenancy's
`home region`__. This operation creates a
:class:`WorkRequest`. Use the ... | [
"Deletes",
"multiple",
"resources",
"in",
"the",
"compartment",
".",
"All",
"resources",
"must",
"be",
"in",
"the",
"same",
"compartment",
".",
"You",
"must",
"have",
"the",
"appropriate",
"permissions",
"to",
"delete",
"the",
"resources",
"in",
"the",
"reques... | def bulk_delete_resources(self, compartment_id, bulk_delete_resources_details, **kwargs):
"""
Deletes multiple resources in the compartment. All resources must be in the same compartment. You must have the appropriate
permissions to delete the resources in the request. This API can only be invok... | [
"def",
"bulk_delete_resources",
"(",
"self",
",",
"compartment_id",
",",
"bulk_delete_resources_details",
",",
"*",
"*",
"kwargs",
")",
":",
"resource_path",
"=",
"\"/compartments/{compartmentId}/actions/bulkDeleteResources\"",
"method",
"=",
"\"POST\"",
"# Don't accept unkno... | https://github.com/oracle/oci-python-sdk/blob/3c1604e4e212008fb6718e2f68cdb5ef71fd5793/src/oci/identity/identity_client.py#L474-L571 | ||
missionpinball/mpf | 8e6b74cff4ba06d2fec9445742559c1068b88582 | mpf/core/config_player.py | python | ConfigPlayer.get_full_config | (self, value) | return self.machine.config_validator.validate_config(
self.config_file_section, value, base_spec='config_player_common') | Return full config. | Return full config. | [
"Return",
"full",
"config",
"."
] | def get_full_config(self, value):
"""Return full config."""
return self.machine.config_validator.validate_config(
self.config_file_section, value, base_spec='config_player_common') | [
"def",
"get_full_config",
"(",
"self",
",",
"value",
")",
":",
"return",
"self",
".",
"machine",
".",
"config_validator",
".",
"validate_config",
"(",
"self",
".",
"config_file_section",
",",
"value",
",",
"base_spec",
"=",
"'config_player_common'",
")"
] | https://github.com/missionpinball/mpf/blob/8e6b74cff4ba06d2fec9445742559c1068b88582/mpf/core/config_player.py#L214-L217 | |
scrtlabs/catalyst | 2e8029780f2381da7a0729f7b52505e5db5f535b | catalyst/data/data_portal.py | python | DataPortal.get_current_future_chain | (self, continuous_future, dt) | return self.asset_finder.retrieve_all(chain) | Retrieves the future chain for the contract at the given `dt` according
the `continuous_future` specification.
Returns
-------
future_chain : list[Future]
A list of active futures, where the first index is the current
contract specified by the continuous future ... | Retrieves the future chain for the contract at the given `dt` according
the `continuous_future` specification. | [
"Retrieves",
"the",
"future",
"chain",
"for",
"the",
"contract",
"at",
"the",
"given",
"dt",
"according",
"the",
"continuous_future",
"specification",
"."
] | def get_current_future_chain(self, continuous_future, dt):
"""
Retrieves the future chain for the contract at the given `dt` according
the `continuous_future` specification.
Returns
-------
future_chain : list[Future]
A list of active futures, where the firs... | [
"def",
"get_current_future_chain",
"(",
"self",
",",
"continuous_future",
",",
"dt",
")",
":",
"rf",
"=",
"self",
".",
"_roll_finders",
"[",
"continuous_future",
".",
"roll_style",
"]",
"session",
"=",
"self",
".",
"trading_calendar",
".",
"minute_to_session_label... | https://github.com/scrtlabs/catalyst/blob/2e8029780f2381da7a0729f7b52505e5db5f535b/catalyst/data/data_portal.py#L1398-L1419 | |
PyTorchLightning/lightning-bolts | 22e494e546e7fe322d6b4cf36258819c7ba58e02 | pl_bolts/models/rl/common/gym_wrappers.py | python | MaxAndSkipEnv.reset | (self) | return obs | Clear past frame buffer and init.
to first obs. from inner env. | Clear past frame buffer and init. | [
"Clear",
"past",
"frame",
"buffer",
"and",
"init",
"."
] | def reset(self):
"""Clear past frame buffer and init.
to first obs. from inner env.
"""
self._obs_buffer.clear()
obs = self.env.reset()
self._obs_buffer.append(obs)
return obs | [
"def",
"reset",
"(",
"self",
")",
":",
"self",
".",
"_obs_buffer",
".",
"clear",
"(",
")",
"obs",
"=",
"self",
".",
"env",
".",
"reset",
"(",
")",
"self",
".",
"_obs_buffer",
".",
"append",
"(",
"obs",
")",
"return",
"obs"
] | https://github.com/PyTorchLightning/lightning-bolts/blob/22e494e546e7fe322d6b4cf36258819c7ba58e02/pl_bolts/models/rl/common/gym_wrappers.py#L97-L105 | |
django-nonrel/djangotoolbox | 7e2c47e2ab5ee98d0c0f47c5ccce08e75feda48a | djangotoolbox/db/base.py | python | NonrelDatabaseOperations._value_for_db_key | (self, value, field_kind) | Converts value to be used as a key to an acceptable type.
On default we do no encoding, only allowing key values directly
acceptable by the database for its key type (if any).
The conversion has to be reversible given the field type,
encoding should preserve comparisons.
Use th... | Converts value to be used as a key to an acceptable type.
On default we do no encoding, only allowing key values directly
acceptable by the database for its key type (if any). | [
"Converts",
"value",
"to",
"be",
"used",
"as",
"a",
"key",
"to",
"an",
"acceptable",
"type",
".",
"On",
"default",
"we",
"do",
"no",
"encoding",
"only",
"allowing",
"key",
"values",
"directly",
"acceptable",
"by",
"the",
"database",
"for",
"its",
"key",
... | def _value_for_db_key(self, value, field_kind):
"""
Converts value to be used as a key to an acceptable type.
On default we do no encoding, only allowing key values directly
acceptable by the database for its key type (if any).
The conversion has to be reversible given the field... | [
"def",
"_value_for_db_key",
"(",
"self",
",",
"value",
",",
"field_kind",
")",
":",
"raise",
"DatabaseError",
"(",
"\"%s may not be used as primary key field.\"",
"%",
"field_kind",
")"
] | https://github.com/django-nonrel/djangotoolbox/blob/7e2c47e2ab5ee98d0c0f47c5ccce08e75feda48a/djangotoolbox/db/base.py#L622-L636 | ||
matplotlib/matplotlib | 8d7a2b9d2a38f01ee0d6802dd4f9e98aec812322 | lib/matplotlib/spines.py | python | Spine.set_patch_arc | (self, center, radius, theta1, theta2) | Set the spine to be arc-like. | Set the spine to be arc-like. | [
"Set",
"the",
"spine",
"to",
"be",
"arc",
"-",
"like",
"."
] | def set_patch_arc(self, center, radius, theta1, theta2):
"""Set the spine to be arc-like."""
self._patch_type = 'arc'
self._center = center
self._width = radius * 2
self._height = radius * 2
self._theta1 = theta1
self._theta2 = theta2
self._path = mpath.Pa... | [
"def",
"set_patch_arc",
"(",
"self",
",",
"center",
",",
"radius",
",",
"theta1",
",",
"theta2",
")",
":",
"self",
".",
"_patch_type",
"=",
"'arc'",
"self",
".",
"_center",
"=",
"center",
"self",
".",
"_width",
"=",
"radius",
"*",
"2",
"self",
".",
"... | https://github.com/matplotlib/matplotlib/blob/8d7a2b9d2a38f01ee0d6802dd4f9e98aec812322/lib/matplotlib/spines.py#L87-L98 | ||
pantsbuild/pex | 473c6ac732ed4bc338b4b20a9ec930d1d722c9b4 | pex/vendor/_vendored/pip/pip/_vendor/distlib/wheel.py | python | Wheel.tags | (self) | [] | def tags(self):
for pyver in self.pyver:
for abi in self.abi:
for arch in self.arch:
yield pyver, abi, arch | [
"def",
"tags",
"(",
"self",
")",
":",
"for",
"pyver",
"in",
"self",
".",
"pyver",
":",
"for",
"abi",
"in",
"self",
".",
"abi",
":",
"for",
"arch",
"in",
"self",
".",
"arch",
":",
"yield",
"pyver",
",",
"abi",
",",
"arch"
] | https://github.com/pantsbuild/pex/blob/473c6ac732ed4bc338b4b20a9ec930d1d722c9b4/pex/vendor/_vendored/pip/pip/_vendor/distlib/wheel.py#L209-L213 | ||||
argoai/argoverse-api | 575c222e7d7fa0c56bdc9dc20f71464c4bea2e6d | argoverse/utils/frustum_clipping.py | python | form_top_clipping_plane | (fx: float, img_height: int) | return top_plane | r"""Form the top clipping plane for a camera view frustum.
In the camera coordinate frame, y is down the imager, x is across the imager,
and z is along the optical axis. The focal length is the distance to the center
of the image plane. We know that a similar triangle is formed as follows::
(x,y... | r"""Form the top clipping plane for a camera view frustum. | [
"r",
"Form",
"the",
"top",
"clipping",
"plane",
"for",
"a",
"camera",
"view",
"frustum",
"."
] | def form_top_clipping_plane(fx: float, img_height: int) -> np.ndarray:
r"""Form the top clipping plane for a camera view frustum.
In the camera coordinate frame, y is down the imager, x is across the imager,
and z is along the optical axis. The focal length is the distance to the center
of the image pl... | [
"def",
"form_top_clipping_plane",
"(",
"fx",
":",
"float",
",",
"img_height",
":",
"int",
")",
"->",
"np",
".",
"ndarray",
":",
"top_plane",
"=",
"np",
".",
"array",
"(",
"[",
"0.0",
",",
"fx",
",",
"img_height",
"/",
"2.0",
",",
"0.0",
"]",
")",
"... | https://github.com/argoai/argoverse-api/blob/575c222e7d7fa0c56bdc9dc20f71464c4bea2e6d/argoverse/utils/frustum_clipping.py#L110-L143 | |
mozillazg/pypy | 2ff5cd960c075c991389f842c6d59e71cf0cb7d0 | lib-python/2.7/distutils/util.py | python | byte_compile | (py_files,
optimize=0, force=0,
prefix=None, base_dir=None,
verbose=1, dry_run=0,
direct=None) | Byte-compile a collection of Python source files to either .pyc
or .pyo files in the same directory. 'py_files' is a list of files
to compile; any files that don't end in ".py" are silently skipped.
'optimize' must be one of the following:
0 - don't optimize (generate .pyc)
1 - normal optimizat... | Byte-compile a collection of Python source files to either .pyc
or .pyo files in the same directory. 'py_files' is a list of files
to compile; any files that don't end in ".py" are silently skipped.
'optimize' must be one of the following:
0 - don't optimize (generate .pyc)
1 - normal optimizat... | [
"Byte",
"-",
"compile",
"a",
"collection",
"of",
"Python",
"source",
"files",
"to",
"either",
".",
"pyc",
"or",
".",
"pyo",
"files",
"in",
"the",
"same",
"directory",
".",
"py_files",
"is",
"a",
"list",
"of",
"files",
"to",
"compile",
";",
"any",
"file... | def byte_compile (py_files,
optimize=0, force=0,
prefix=None, base_dir=None,
verbose=1, dry_run=0,
direct=None):
"""Byte-compile a collection of Python source files to either .pyc
or .pyo files in the same directory. 'py_files' is a list o... | [
"def",
"byte_compile",
"(",
"py_files",
",",
"optimize",
"=",
"0",
",",
"force",
"=",
"0",
",",
"prefix",
"=",
"None",
",",
"base_dir",
"=",
"None",
",",
"verbose",
"=",
"1",
",",
"dry_run",
"=",
"0",
",",
"direct",
"=",
"None",
")",
":",
"# nothin... | https://github.com/mozillazg/pypy/blob/2ff5cd960c075c991389f842c6d59e71cf0cb7d0/lib-python/2.7/distutils/util.py#L336-L475 | ||
securesystemslab/zippy | ff0e84ac99442c2c55fe1d285332cfd4e185e089 | zippy/benchmarks/src/benchmarks/sympy/sympy/interactive/ipythonprinting.py | python | load_ipython_extension | (ip) | Load the extension in IPython. | Load the extension in IPython. | [
"Load",
"the",
"extension",
"in",
"IPython",
"."
] | def load_ipython_extension(ip):
"""Load the extension in IPython."""
# Since Python filters deprecation warnings by default,
# we add a filter to make sure this message will be shown.
warnings.simplefilter("once", SymPyDeprecationWarning)
SymPyDeprecationWarning(
feature="using %load_ext sym... | [
"def",
"load_ipython_extension",
"(",
"ip",
")",
":",
"# Since Python filters deprecation warnings by default,",
"# we add a filter to make sure this message will be shown.",
"warnings",
".",
"simplefilter",
"(",
"\"once\"",
",",
"SymPyDeprecationWarning",
")",
"SymPyDeprecationWarni... | https://github.com/securesystemslab/zippy/blob/ff0e84ac99442c2c55fe1d285332cfd4e185e089/zippy/benchmarks/src/benchmarks/sympy/sympy/interactive/ipythonprinting.py#L40-L51 | ||
bitcoin-core/HWI | 6871946c2176f2f9777b6ac8f0614d96d99bfa0e | hwilib/descriptor.py | python | _parse_descriptor | (desc: str, ctx: '_ParseDescriptorContext') | :meta private:
Parse a descriptor given the context level we are in.
Used recursively to parse subdescriptors
:param desc: The descriptor string to parse
:param ctx: The :class:`_ParseDescriptorContext` indicating the level we are in
:return: The parsed descriptor
:raises: ValueError: if the d... | :meta private: | [
":",
"meta",
"private",
":"
] | def _parse_descriptor(desc: str, ctx: '_ParseDescriptorContext') -> 'Descriptor':
"""
:meta private:
Parse a descriptor given the context level we are in.
Used recursively to parse subdescriptors
:param desc: The descriptor string to parse
:param ctx: The :class:`_ParseDescriptorContext` indic... | [
"def",
"_parse_descriptor",
"(",
"desc",
":",
"str",
",",
"ctx",
":",
"'_ParseDescriptorContext'",
")",
"->",
"'Descriptor'",
":",
"func",
",",
"expr",
"=",
"_get_func_expr",
"(",
"desc",
")",
"if",
"func",
"==",
"\"pk\"",
":",
"pubkey",
",",
"expr",
"=",
... | https://github.com/bitcoin-core/HWI/blob/6871946c2176f2f9777b6ac8f0614d96d99bfa0e/hwilib/descriptor.py#L512-L615 | ||
ThilinaRajapakse/simpletransformers | 9323c0398baea0157044e080617b2c4be59de7a9 | simpletransformers/question_answering/qa_dataset_loading_script/qa_dataset_loading_script.py | python | QA._split_generators | (self, dl_manager) | return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={"filepath": self.config.data_files},
),
] | Returns SplitGenerators. | Returns SplitGenerators. | [
"Returns",
"SplitGenerators",
"."
] | def _split_generators(self, dl_manager):
"""Returns SplitGenerators."""
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs={"filepath": self.config.data_files},
),
] | [
"def",
"_split_generators",
"(",
"self",
",",
"dl_manager",
")",
":",
"return",
"[",
"datasets",
".",
"SplitGenerator",
"(",
"name",
"=",
"datasets",
".",
"Split",
".",
"TRAIN",
",",
"gen_kwargs",
"=",
"{",
"\"filepath\"",
":",
"self",
".",
"config",
".",
... | https://github.com/ThilinaRajapakse/simpletransformers/blob/9323c0398baea0157044e080617b2c4be59de7a9/simpletransformers/question_answering/qa_dataset_loading_script/qa_dataset_loading_script.py#L49-L57 | |
oilshell/oil | 94388e7d44a9ad879b12615f6203b38596b5a2d3 | Python-2.7.13/Lib/modulefinder.py | python | ModuleFinder.find_all_submodules | (self, m) | return modules.keys() | [] | def find_all_submodules(self, m):
if not m.__path__:
return
modules = {}
# 'suffixes' used to be a list hardcoded to [".py", ".pyc", ".pyo"].
# But we must also collect Python extension modules - although
# we cannot separate normal dlls from Python extensions.
... | [
"def",
"find_all_submodules",
"(",
"self",
",",
"m",
")",
":",
"if",
"not",
"m",
".",
"__path__",
":",
"return",
"modules",
"=",
"{",
"}",
"# 'suffixes' used to be a list hardcoded to [\".py\", \".pyc\", \".pyo\"].",
"# But we must also collect Python extension modules - alth... | https://github.com/oilshell/oil/blob/94388e7d44a9ad879b12615f6203b38596b5a2d3/Python-2.7.13/Lib/modulefinder.py#L244-L269 | |||
KaihuaTang/VQA2.0-Recent-Approachs-2018.pytorch | 1a4aa392a510a6fb7e1037ca90d06c2eb0dd6cd9 | preprocess-vocab.py | python | extract_vocab | (iterable, top_k=None, start=0) | return vocab | Turns an iterable of list of tokens into a vocabulary.
These tokens could be single answers or word tokens in questions. | Turns an iterable of list of tokens into a vocabulary.
These tokens could be single answers or word tokens in questions. | [
"Turns",
"an",
"iterable",
"of",
"list",
"of",
"tokens",
"into",
"a",
"vocabulary",
".",
"These",
"tokens",
"could",
"be",
"single",
"answers",
"or",
"word",
"tokens",
"in",
"questions",
"."
] | def extract_vocab(iterable, top_k=None, start=0):
""" Turns an iterable of list of tokens into a vocabulary.
These tokens could be single answers or word tokens in questions.
"""
all_tokens = itertools.chain.from_iterable(iterable)
counter = Counter(all_tokens)
if top_k:
most_common ... | [
"def",
"extract_vocab",
"(",
"iterable",
",",
"top_k",
"=",
"None",
",",
"start",
"=",
"0",
")",
":",
"all_tokens",
"=",
"itertools",
".",
"chain",
".",
"from_iterable",
"(",
"iterable",
")",
"counter",
"=",
"Counter",
"(",
"all_tokens",
")",
"if",
"top_... | https://github.com/KaihuaTang/VQA2.0-Recent-Approachs-2018.pytorch/blob/1a4aa392a510a6fb7e1037ca90d06c2eb0dd6cd9/preprocess-vocab.py#L11-L25 | |
frappe/frappe | b64cab6867dfd860f10ccaf41a4ec04bc890b583 | frappe/database/database.py | python | Database.get_description | (self) | return self._cursor.description | Returns result metadata. | Returns result metadata. | [
"Returns",
"result",
"metadata",
"."
] | def get_description(self):
"""Returns result metadata."""
return self._cursor.description | [
"def",
"get_description",
"(",
"self",
")",
":",
"return",
"self",
".",
"_cursor",
".",
"description"
] | https://github.com/frappe/frappe/blob/b64cab6867dfd860f10ccaf41a4ec04bc890b583/frappe/database/database.py#L322-L324 | |
bbrodriges/pholcidae | 71c83571ad3ab7c60d44b912bd17dcbdd3903a10 | pholcidae2/__init__.py | python | SyncStorage.is_parsed | (self, value) | return value in self._set | Checks if value has been already parsed | Checks if value has been already parsed | [
"Checks",
"if",
"value",
"has",
"been",
"already",
"parsed"
] | def is_parsed(self, value):
"""
Checks if value has been already parsed
"""
return value in self._set | [
"def",
"is_parsed",
"(",
"self",
",",
"value",
")",
":",
"return",
"value",
"in",
"self",
".",
"_set"
] | https://github.com/bbrodriges/pholcidae/blob/71c83571ad3ab7c60d44b912bd17dcbdd3903a10/pholcidae2/__init__.py#L480-L486 | |
Pyomo/pyomo | dbd4faee151084f343b893cc2b0c04cf2b76fd92 | pyomo/core/base/componentuid.py | python | ComponentUID.__le__ | (self, other) | return self < other or self == other | Return True if this CUID <= the 'other' CUID | Return True if this CUID <= the 'other' CUID | [
"Return",
"True",
"if",
"this",
"CUID",
"<",
"=",
"the",
"other",
"CUID"
] | def __le__(self, other):
"Return True if this CUID <= the 'other' CUID"
return self < other or self == other | [
"def",
"__le__",
"(",
"self",
",",
"other",
")",
":",
"return",
"self",
"<",
"other",
"or",
"self",
"==",
"other"
] | https://github.com/Pyomo/pyomo/blob/dbd4faee151084f343b893cc2b0c04cf2b76fd92/pyomo/core/base/componentuid.py#L186-L188 | |
ales-tsurko/cells | 4cf7e395cd433762bea70cdc863a346f3a6fe1d0 | packaging/macos/python/lib/python3.7/tkinter/__init__.py | python | Scrollbar.identify | (self, x, y) | return self.tk.call(self._w, 'identify', x, y) | Return the element under position X,Y as one of
"arrow1","slider","arrow2" or "". | Return the element under position X,Y as one of
"arrow1","slider","arrow2" or "". | [
"Return",
"the",
"element",
"under",
"position",
"X",
"Y",
"as",
"one",
"of",
"arrow1",
"slider",
"arrow2",
"or",
"."
] | def identify(self, x, y):
"""Return the element under position X,Y as one of
"arrow1","slider","arrow2" or ""."""
return self.tk.call(self._w, 'identify', x, y) | [
"def",
"identify",
"(",
"self",
",",
"x",
",",
"y",
")",
":",
"return",
"self",
".",
"tk",
".",
"call",
"(",
"self",
".",
"_w",
",",
"'identify'",
",",
"x",
",",
"y",
")"
] | https://github.com/ales-tsurko/cells/blob/4cf7e395cd433762bea70cdc863a346f3a6fe1d0/packaging/macos/python/lib/python3.7/tkinter/__init__.py#L3061-L3064 | |
TencentCloud/tencentcloud-sdk-python | 3677fd1cdc8c5fd626ce001c13fd3b59d1f279d2 | tencentcloud/cpdp/v20190820/models.py | python | QueryAnchorContractInfoRequest.__init__ | (self) | r"""
:param BeginTime: 起始时间,格式为yyyy-MM-dd
:type BeginTime: str
:param EndTime: 起始时间,格式为yyyy-MM-dd
:type EndTime: str | r"""
:param BeginTime: 起始时间,格式为yyyy-MM-dd
:type BeginTime: str
:param EndTime: 起始时间,格式为yyyy-MM-dd
:type EndTime: str | [
"r",
":",
"param",
"BeginTime",
":",
"起始时间,格式为yyyy",
"-",
"MM",
"-",
"dd",
":",
"type",
"BeginTime",
":",
"str",
":",
"param",
"EndTime",
":",
"起始时间,格式为yyyy",
"-",
"MM",
"-",
"dd",
":",
"type",
"EndTime",
":",
"str"
] | def __init__(self):
r"""
:param BeginTime: 起始时间,格式为yyyy-MM-dd
:type BeginTime: str
:param EndTime: 起始时间,格式为yyyy-MM-dd
:type EndTime: str
"""
self.BeginTime = None
self.EndTime = None | [
"def",
"__init__",
"(",
"self",
")",
":",
"self",
".",
"BeginTime",
"=",
"None",
"self",
".",
"EndTime",
"=",
"None"
] | https://github.com/TencentCloud/tencentcloud-sdk-python/blob/3677fd1cdc8c5fd626ce001c13fd3b59d1f279d2/tencentcloud/cpdp/v20190820/models.py#L9140-L9148 | ||
lpty/nlp_base | e82f5a317a335b382e106307c9f047850c6da6f4 | ner/src/corpus.py | python | Corpus.pos_perform | (cls, pos) | 去除词性携带的标签先验知识 | 去除词性携带的标签先验知识 | [
"去除词性携带的标签先验知识"
] | def pos_perform(cls, pos):
"""
去除词性携带的标签先验知识
"""
if pos in cls._maps.keys() and pos != u't':
return u'n'
else:
return pos | [
"def",
"pos_perform",
"(",
"cls",
",",
"pos",
")",
":",
"if",
"pos",
"in",
"cls",
".",
"_maps",
".",
"keys",
"(",
")",
"and",
"pos",
"!=",
"u't'",
":",
"return",
"u'n'",
"else",
":",
"return",
"pos"
] | https://github.com/lpty/nlp_base/blob/e82f5a317a335b382e106307c9f047850c6da6f4/ner/src/corpus.py#L132-L139 | ||
7sDream/zhihu-py3 | bcb4aa8325f8b54d3b44bd0bdc959edd9761fcfc | zhihu/answer.py | python | Answer.comment_num | (self) | return int(number) if number.isdigit() else 0 | :return: 答案下评论的数量
:rtype: int | :return: 答案下评论的数量
:rtype: int | [
":",
"return",
":",
"答案下评论的数量",
":",
"rtype",
":",
"int"
] | def comment_num(self):
"""
:return: 答案下评论的数量
:rtype: int
"""
comment = self.soup.select_one("div.answer-actions a.toggle-comment")
comment_num_string = comment.text
number = comment_num_string.split()[0]
return int(number) if number.isdigit() else 0 | [
"def",
"comment_num",
"(",
"self",
")",
":",
"comment",
"=",
"self",
".",
"soup",
".",
"select_one",
"(",
"\"div.answer-actions a.toggle-comment\"",
")",
"comment_num_string",
"=",
"comment",
".",
"text",
"number",
"=",
"comment_num_string",
".",
"split",
"(",
"... | https://github.com/7sDream/zhihu-py3/blob/bcb4aa8325f8b54d3b44bd0bdc959edd9761fcfc/zhihu/answer.py#L267-L275 | |
FateScript/CenterNet-better | 972dbf2882375d54ec0e06ada21f39baaa997f0c | dl_lib/checkpoint/c2_model_loading.py | python | align_and_update_state_dicts | (model_state_dict, ckpt_state_dict, c2_conversion=True) | Match names between the two state-dict, and update the values of model_state_dict in-place with
copies of the matched tensor in ckpt_state_dict.
If `c2_conversion==True`, `ckpt_state_dict` is assumed to be a Caffe2
model and will be renamed at first.
Strategy: suppose that the models that we will creat... | Match names between the two state-dict, and update the values of model_state_dict in-place with
copies of the matched tensor in ckpt_state_dict.
If `c2_conversion==True`, `ckpt_state_dict` is assumed to be a Caffe2
model and will be renamed at first. | [
"Match",
"names",
"between",
"the",
"two",
"state",
"-",
"dict",
"and",
"update",
"the",
"values",
"of",
"model_state_dict",
"in",
"-",
"place",
"with",
"copies",
"of",
"the",
"matched",
"tensor",
"in",
"ckpt_state_dict",
".",
"If",
"c2_conversion",
"==",
"T... | def align_and_update_state_dicts(model_state_dict, ckpt_state_dict, c2_conversion=True):
"""
Match names between the two state-dict, and update the values of model_state_dict in-place with
copies of the matched tensor in ckpt_state_dict.
If `c2_conversion==True`, `ckpt_state_dict` is assumed to be a Caf... | [
"def",
"align_and_update_state_dicts",
"(",
"model_state_dict",
",",
"ckpt_state_dict",
",",
"c2_conversion",
"=",
"True",
")",
":",
"model_keys",
"=",
"sorted",
"(",
"list",
"(",
"model_state_dict",
".",
"keys",
"(",
")",
")",
")",
"if",
"c2_conversion",
":",
... | https://github.com/FateScript/CenterNet-better/blob/972dbf2882375d54ec0e06ada21f39baaa997f0c/dl_lib/checkpoint/c2_model_loading.py#L211-L313 | ||
landlab/landlab | a5dd80b8ebfd03d1ba87ef6c4368c409485f222c | landlab/components/species_evolution/zone_taxon.py | python | ZoneTaxon.zones | (self) | return self._zones | The zones of the taxon. | The zones of the taxon. | [
"The",
"zones",
"of",
"the",
"taxon",
"."
] | def zones(self):
"""The zones of the taxon."""
return self._zones | [
"def",
"zones",
"(",
"self",
")",
":",
"return",
"self",
".",
"_zones"
] | https://github.com/landlab/landlab/blob/a5dd80b8ebfd03d1ba87ef6c4368c409485f222c/landlab/components/species_evolution/zone_taxon.py#L136-L138 | |
etetoolkit/ete | 2b207357dc2a40ccad7bfd8f54964472c72e4726 | ete3/nexml/_nexml.py | python | RnaSeqs.exportLiteralChildren | (self, outfile, level, name_) | [] | def exportLiteralChildren(self, outfile, level, name_):
super(RnaSeqs, self).exportLiteralChildren(outfile, level, name_)
showIndent(outfile, level)
outfile.write('meta=[\n')
level += 1
for meta_ in self.meta:
showIndent(outfile, level)
outfile.write('mode... | [
"def",
"exportLiteralChildren",
"(",
"self",
",",
"outfile",
",",
"level",
",",
"name_",
")",
":",
"super",
"(",
"RnaSeqs",
",",
"self",
")",
".",
"exportLiteralChildren",
"(",
"outfile",
",",
"level",
",",
"name_",
")",
"showIndent",
"(",
"outfile",
",",
... | https://github.com/etetoolkit/ete/blob/2b207357dc2a40ccad7bfd8f54964472c72e4726/ete3/nexml/_nexml.py#L14738-L14763 | ||||
lilydjwg/winterpy | 3864a463386202b9c9c6ce8ba902878e40f3084c | pylib/htmlutils.py | python | parse_document_from_requests | (response, session=None, *, encoding=None) | return doc | ``response``: requests ``Response`` object, or URL
``encoding``: override detected encoding | ``response``: requests ``Response`` object, or URL
``encoding``: override detected encoding | [
"response",
":",
"requests",
"Response",
"object",
"or",
"URL",
"encoding",
":",
"override",
"detected",
"encoding"
] | def parse_document_from_requests(response, session=None, *, encoding=None):
'''
``response``: requests ``Response`` object, or URL
``encoding``: override detected encoding
'''
if isinstance(response, str):
if session is None:
raise ValueError('URL given but no session')
r = session.get(response)... | [
"def",
"parse_document_from_requests",
"(",
"response",
",",
"session",
"=",
"None",
",",
"*",
",",
"encoding",
"=",
"None",
")",
":",
"if",
"isinstance",
"(",
"response",
",",
"str",
")",
":",
"if",
"session",
"is",
"None",
":",
"raise",
"ValueError",
"... | https://github.com/lilydjwg/winterpy/blob/3864a463386202b9c9c6ce8ba902878e40f3084c/pylib/htmlutils.py#L58-L78 | |
Source-Python-Dev-Team/Source.Python | d0ffd8ccbd1e9923c9bc44936f20613c1c76b7fb | addons/source-python/Python3/telnetlib.py | python | Telnet.open | (self, host, port=0, timeout=socket._GLOBAL_DEFAULT_TIMEOUT) | Connect to a host.
The optional second argument is the port number, which
defaults to the standard telnet port (23).
Don't try to reopen an already connected instance. | Connect to a host. | [
"Connect",
"to",
"a",
"host",
"."
] | def open(self, host, port=0, timeout=socket._GLOBAL_DEFAULT_TIMEOUT):
"""Connect to a host.
The optional second argument is the port number, which
defaults to the standard telnet port (23).
Don't try to reopen an already connected instance.
"""
self.eof = 0
if n... | [
"def",
"open",
"(",
"self",
",",
"host",
",",
"port",
"=",
"0",
",",
"timeout",
"=",
"socket",
".",
"_GLOBAL_DEFAULT_TIMEOUT",
")",
":",
"self",
".",
"eof",
"=",
"0",
"if",
"not",
"port",
":",
"port",
"=",
"TELNET_PORT",
"self",
".",
"host",
"=",
"... | https://github.com/Source-Python-Dev-Team/Source.Python/blob/d0ffd8ccbd1e9923c9bc44936f20613c1c76b7fb/addons/source-python/Python3/telnetlib.py#L220-L234 | ||
home-assistant/core | 265ebd17a3f17ed8dc1e9bdede03ac8e323f1ab1 | homeassistant/components/insteon/api/properties.py | python | _get_radio_button_properties | (device) | return props, schema | Return the values and schema to set KPL buttons as radio buttons. | Return the values and schema to set KPL buttons as radio buttons. | [
"Return",
"the",
"values",
"and",
"schema",
"to",
"set",
"KPL",
"buttons",
"as",
"radio",
"buttons",
"."
] | def _get_radio_button_properties(device):
"""Return the values and schema to set KPL buttons as radio buttons."""
rb_groups = _calc_radio_button_groups(device)
props = []
schema = {}
index = 0
remaining_buttons = []
buttons_in_groups = list(chain.from_iterable(rb_groups))
# Identify bu... | [
"def",
"_get_radio_button_properties",
"(",
"device",
")",
":",
"rb_groups",
"=",
"_calc_radio_button_groups",
"(",
"device",
")",
"props",
"=",
"[",
"]",
"schema",
"=",
"{",
"}",
"index",
"=",
"0",
"remaining_buttons",
"=",
"[",
"]",
"buttons_in_groups",
"=",... | https://github.com/home-assistant/core/blob/265ebd17a3f17ed8dc1e9bdede03ac8e323f1ab1/homeassistant/components/insteon/api/properties.py#L188-L251 | |
django-nonrel/django-nonrel | 4fbfe7344481a5eab8698f79207f09124310131b | django/utils/dictconfig.py | python | BaseConfigurator.as_tuple | (self, value) | return value | Utility function which converts lists to tuples. | Utility function which converts lists to tuples. | [
"Utility",
"function",
"which",
"converts",
"lists",
"to",
"tuples",
"."
] | def as_tuple(self, value):
"""Utility function which converts lists to tuples."""
if isinstance(value, list):
value = tuple(value)
return value | [
"def",
"as_tuple",
"(",
"self",
",",
"value",
")",
":",
"if",
"isinstance",
"(",
"value",
",",
"list",
")",
":",
"value",
"=",
"tuple",
"(",
"value",
")",
"return",
"value"
] | https://github.com/django-nonrel/django-nonrel/blob/4fbfe7344481a5eab8698f79207f09124310131b/django/utils/dictconfig.py#L260-L264 | |
zhl2008/awd-platform | 0416b31abea29743387b10b3914581fbe8e7da5e | web_flaskbb/Python-2.7.9/Lib/plat-mac/lib-scriptpackages/SystemEvents/Standard_Suite.py | python | Standard_Suite_Events.move | (self, _object, _attributes={}, **_arguments) | move: Move object(s) to a new location.
Required argument: the object for the command
Keyword argument to: The new location for the object(s).
Keyword argument _attributes: AppleEvent attribute dictionary | move: Move object(s) to a new location.
Required argument: the object for the command
Keyword argument to: The new location for the object(s).
Keyword argument _attributes: AppleEvent attribute dictionary | [
"move",
":",
"Move",
"object",
"(",
"s",
")",
"to",
"a",
"new",
"location",
".",
"Required",
"argument",
":",
"the",
"object",
"for",
"the",
"command",
"Keyword",
"argument",
"to",
":",
"The",
"new",
"location",
"for",
"the",
"object",
"(",
"s",
")",
... | def move(self, _object, _attributes={}, **_arguments):
"""move: Move object(s) to a new location.
Required argument: the object for the command
Keyword argument to: The new location for the object(s).
Keyword argument _attributes: AppleEvent attribute dictionary
"""
_code... | [
"def",
"move",
"(",
"self",
",",
"_object",
",",
"_attributes",
"=",
"{",
"}",
",",
"*",
"*",
"_arguments",
")",
":",
"_code",
"=",
"'core'",
"_subcode",
"=",
"'move'",
"aetools",
".",
"keysubst",
"(",
"_arguments",
",",
"self",
".",
"_argmap_move",
")... | https://github.com/zhl2008/awd-platform/blob/0416b31abea29743387b10b3914581fbe8e7da5e/web_flaskbb/Python-2.7.9/Lib/plat-mac/lib-scriptpackages/SystemEvents/Standard_Suite.py#L193-L212 | ||
tensorflow/lingvo | ce10019243d954c3c3ebe739f7589b5eebfdf907 | lingvo/tasks/car/detection_3d_lib.py | python | RandomPadOrTrimTo | (tensor_list, num_points_out, seed=None) | return (data, padding_tensor) | Pads or Trims a list of Tensors on the major dimension.
Slices if there are more points, or pads if not enough.
In this implementation:
Padded points are random duplications of real points.
Sliced points are a random subset of the real points.
Args:
tensor_list: A list of tf.Tensor objects to pad o... | Pads or Trims a list of Tensors on the major dimension. | [
"Pads",
"or",
"Trims",
"a",
"list",
"of",
"Tensors",
"on",
"the",
"major",
"dimension",
"."
] | def RandomPadOrTrimTo(tensor_list, num_points_out, seed=None):
"""Pads or Trims a list of Tensors on the major dimension.
Slices if there are more points, or pads if not enough.
In this implementation:
Padded points are random duplications of real points.
Sliced points are a random subset of the real po... | [
"def",
"RandomPadOrTrimTo",
"(",
"tensor_list",
",",
"num_points_out",
",",
"seed",
"=",
"None",
")",
":",
"actual_num",
"=",
"tf",
".",
"shape",
"(",
"tensor_list",
"[",
"0",
"]",
")",
"[",
"0",
"]",
"point_idx",
"=",
"tf",
".",
"range",
"(",
"num_poi... | https://github.com/tensorflow/lingvo/blob/ce10019243d954c3c3ebe739f7589b5eebfdf907/lingvo/tasks/car/detection_3d_lib.py#L818-L874 | |
hydroshare/hydroshare | 7ba563b55412f283047fb3ef6da367d41dec58c6 | hs_core/hydroshare/utils.py | python | get_user_party_name | (user) | return party_name | [] | def get_user_party_name(user):
user_profile = get_profile(user)
if user.last_name and user.first_name:
if user_profile.middle_name:
party_name = '%s, %s %s' % (user.last_name, user.first_name,
user_profile.middle_name)
else:
par... | [
"def",
"get_user_party_name",
"(",
"user",
")",
":",
"user_profile",
"=",
"get_profile",
"(",
"user",
")",
"if",
"user",
".",
"last_name",
"and",
"user",
".",
"first_name",
":",
"if",
"user_profile",
".",
"middle_name",
":",
"party_name",
"=",
"'%s, %s %s'",
... | https://github.com/hydroshare/hydroshare/blob/7ba563b55412f283047fb3ef6da367d41dec58c6/hs_core/hydroshare/utils.py#L837-L853 | |||
cuthbertLab/music21 | bd30d4663e52955ed922c10fdf541419d8c67671 | music21/tree/verticality.py | python | Verticality.timeToNextEvent | (self) | return common.opFrac(nextOffset - self.offset) | Returns a float or Fraction of the quarterLength to the next
event (usually the next Verticality, but also to the end of the piece).
Returns None if there is no next event, such as when the verticality
is divorced from its tree. | Returns a float or Fraction of the quarterLength to the next
event (usually the next Verticality, but also to the end of the piece). | [
"Returns",
"a",
"float",
"or",
"Fraction",
"of",
"the",
"quarterLength",
"to",
"the",
"next",
"event",
"(",
"usually",
"the",
"next",
"Verticality",
"but",
"also",
"to",
"the",
"end",
"of",
"the",
"piece",
")",
"."
] | def timeToNextEvent(self) -> Optional[OffsetQL]:
'''
Returns a float or Fraction of the quarterLength to the next
event (usually the next Verticality, but also to the end of the piece).
Returns None if there is no next event, such as when the verticality
is divorced from its tre... | [
"def",
"timeToNextEvent",
"(",
"self",
")",
"->",
"Optional",
"[",
"OffsetQL",
"]",
":",
"nextOffset",
"=",
"self",
".",
"nextStartOffset",
"if",
"nextOffset",
"is",
"None",
":",
"if",
"self",
".",
"timespanTree",
"is",
"None",
":",
"return",
"None",
"next... | https://github.com/cuthbertLab/music21/blob/bd30d4663e52955ed922c10fdf541419d8c67671/music21/tree/verticality.py#L536-L549 | |
apple/ccs-calendarserver | 13c706b985fb728b9aab42dc0fef85aae21921c3 | calendarserver/tap/util.py | python | MemoryLimitService.__init__ | (self, processMonitor, intervalSeconds, limitBytes, residentOnly, reactor=None) | @param processMonitor: the DelayedStartupProcessMonitor
@param intervalSeconds: how often to check
@type intervalSeconds: C{int}
@param limitBytes: any monitored process over this limit is stopped
@type limitBytes: C{int}
@param residentOnly: whether only resident memory should b... | [] | def __init__(self, processMonitor, intervalSeconds, limitBytes, residentOnly, reactor=None):
"""
@param processMonitor: the DelayedStartupProcessMonitor
@param intervalSeconds: how often to check
@type intervalSeconds: C{int}
@param limitBytes: any monitored process over this lim... | [
"def",
"__init__",
"(",
"self",
",",
"processMonitor",
",",
"intervalSeconds",
",",
"limitBytes",
",",
"residentOnly",
",",
"reactor",
"=",
"None",
")",
":",
"self",
".",
"_processMonitor",
"=",
"processMonitor",
"self",
".",
"_seconds",
"=",
"intervalSeconds",
... | https://github.com/apple/ccs-calendarserver/blob/13c706b985fb728b9aab42dc0fef85aae21921c3/calendarserver/tap/util.py#L925-L946 | |||
JoinMarket-Org/joinmarket-clientserver | 8b3d21f226185e31aa10e8e16cdfc719cea4a98e | jmclient/jmclient/podle.py | python | add_external_commitments | (ecs) | To allow external functions to add
PoDLE commitments that were calculated elsewhere. | To allow external functions to add
PoDLE commitments that were calculated elsewhere. | [
"To",
"allow",
"external",
"functions",
"to",
"add",
"PoDLE",
"commitments",
"that",
"were",
"calculated",
"elsewhere",
"."
] | def add_external_commitments(ecs):
"""To allow external functions to add
PoDLE commitments that were calculated elsewhere.
"""
update_commitments(external_to_add=ecs) | [
"def",
"add_external_commitments",
"(",
"ecs",
")",
":",
"update_commitments",
"(",
"external_to_add",
"=",
"ecs",
")"
] | https://github.com/JoinMarket-Org/joinmarket-clientserver/blob/8b3d21f226185e31aa10e8e16cdfc719cea4a98e/jmclient/jmclient/podle.py#L372-L376 | ||
Toblerity/rtree | eb04ef8933418ab108a45b6576abea95d6cbcbdb | setup.py | python | InstallPlatlib.finalize_options | (self) | Copy the shared libraries into the wheel. Note that this
will *only* check in `rtree/lib` rather than anywhere on
the system so if you are building a wheel you *must* copy or
symlink the `.so`/`.dll`/`.dylib` files into `rtree/lib`. | Copy the shared libraries into the wheel. Note that this
will *only* check in `rtree/lib` rather than anywhere on
the system so if you are building a wheel you *must* copy or
symlink the `.so`/`.dll`/`.dylib` files into `rtree/lib`. | [
"Copy",
"the",
"shared",
"libraries",
"into",
"the",
"wheel",
".",
"Note",
"that",
"this",
"will",
"*",
"only",
"*",
"check",
"in",
"rtree",
"/",
"lib",
"rather",
"than",
"anywhere",
"on",
"the",
"system",
"so",
"if",
"you",
"are",
"building",
"a",
"wh... | def finalize_options(self):
"""
Copy the shared libraries into the wheel. Note that this
will *only* check in `rtree/lib` rather than anywhere on
the system so if you are building a wheel you *must* copy or
symlink the `.so`/`.dll`/`.dylib` files into `rtree/lib`.
"""
... | [
"def",
"finalize_options",
"(",
"self",
")",
":",
"# use for checking extension types",
"from",
"fnmatch",
"import",
"fnmatch",
"install",
".",
"finalize_options",
"(",
"self",
")",
"if",
"self",
".",
"distribution",
".",
"has_ext_modules",
"(",
")",
":",
"self",
... | https://github.com/Toblerity/rtree/blob/eb04ef8933418ab108a45b6576abea95d6cbcbdb/setup.py#L38-L89 | ||
makerbot/ReplicatorG | d6f2b07785a5a5f1e172fb87cb4303b17c575d5d | skein_engines/skeinforge-35/fabmetheus_utilities/geometry/geometry_utilities/evaluate.py | python | EvaluatorConcatenate.executePairOperation | (self, evaluators, evaluatorIndex, operationLevel) | Operate on two evaluators. | Operate on two evaluators. | [
"Operate",
"on",
"two",
"evaluators",
"."
] | def executePairOperation(self, evaluators, evaluatorIndex, operationLevel):
'Operate on two evaluators.'
if operationLevel != 80:
return
leftIndex = evaluatorIndex - 1
if leftIndex < 0:
del evaluators[evaluatorIndex]
return
rightIndex = evaluatorIndex + 1
if rightIndex >= len(evaluators):
del ev... | [
"def",
"executePairOperation",
"(",
"self",
",",
"evaluators",
",",
"evaluatorIndex",
",",
"operationLevel",
")",
":",
"if",
"operationLevel",
"!=",
"80",
":",
"return",
"leftIndex",
"=",
"evaluatorIndex",
"-",
"1",
"if",
"leftIndex",
"<",
"0",
":",
"del",
"... | https://github.com/makerbot/ReplicatorG/blob/d6f2b07785a5a5f1e172fb87cb4303b17c575d5d/skein_engines/skeinforge-35/fabmetheus_utilities/geometry/geometry_utilities/evaluate.py#L1358-L1389 | ||
securesystemslab/zippy | ff0e84ac99442c2c55fe1d285332cfd4e185e089 | zippy/benchmarks/src/benchmarks/sympy/sympy/logic/inference.py | python | KB.__init__ | (self, sentence=None) | [] | def __init__(self, sentence=None):
self.clauses = []
if sentence:
self.tell(sentence) | [
"def",
"__init__",
"(",
"self",
",",
"sentence",
"=",
"None",
")",
":",
"self",
".",
"clauses",
"=",
"[",
"]",
"if",
"sentence",
":",
"self",
".",
"tell",
"(",
"sentence",
")"
] | https://github.com/securesystemslab/zippy/blob/ff0e84ac99442c2c55fe1d285332cfd4e185e089/zippy/benchmarks/src/benchmarks/sympy/sympy/logic/inference.py#L169-L172 | ||||
bokeh/bokeh | a00e59da76beb7b9f83613533cfd3aced1df5f06 | bokeh/server/server.py | python | BaseServer.get_session | (self, app_path: str, session_id: ID) | return self._tornado.get_session(app_path, session_id) | Get an active a session by name application path and session ID.
Args:
app_path (str) :
The configured application path for the application to return
a session for.
session_id (str) :
The session ID of the session to retrieve.
Re... | Get an active a session by name application path and session ID. | [
"Get",
"an",
"active",
"a",
"session",
"by",
"name",
"application",
"path",
"and",
"session",
"ID",
"."
] | def get_session(self, app_path: str, session_id: ID) -> ServerSession:
''' Get an active a session by name application path and session ID.
Args:
app_path (str) :
The configured application path for the application to return
a session for.
sessio... | [
"def",
"get_session",
"(",
"self",
",",
"app_path",
":",
"str",
",",
"session_id",
":",
"ID",
")",
"->",
"ServerSession",
":",
"return",
"self",
".",
"_tornado",
".",
"get_session",
"(",
"app_path",
",",
"session_id",
")"
] | https://github.com/bokeh/bokeh/blob/a00e59da76beb7b9f83613533cfd3aced1df5f06/bokeh/server/server.py#L214-L229 | |
cloudera/hue | 23f02102d4547c17c32bd5ea0eb24e9eadd657a4 | desktop/core/ext-py/lxml-3.3.6/src/lxml/html/diff.py | python | htmldiff | (old_html, new_html) | return fixup_ins_del_tags(result) | Do a diff of the old and new document. The documents are HTML
*fragments* (str/UTF8 or unicode), they are not complete documents
(i.e., no <html> tag).
Returns HTML with <ins> and <del> tags added around the
appropriate text.
Markup is generally ignored, with the markup from new_html
preser... | Do a diff of the old and new document. The documents are HTML
*fragments* (str/UTF8 or unicode), they are not complete documents
(i.e., no <html> tag). | [
"Do",
"a",
"diff",
"of",
"the",
"old",
"and",
"new",
"document",
".",
"The",
"documents",
"are",
"HTML",
"*",
"fragments",
"*",
"(",
"str",
"/",
"UTF8",
"or",
"unicode",
")",
"they",
"are",
"not",
"complete",
"documents",
"(",
"i",
".",
"e",
".",
"... | def htmldiff(old_html, new_html):
## FIXME: this should take parsed documents too, and use their body
## or other content.
""" Do a diff of the old and new document. The documents are HTML
*fragments* (str/UTF8 or unicode), they are not complete documents
(i.e., no <html> tag).
Returns HTML wi... | [
"def",
"htmldiff",
"(",
"old_html",
",",
"new_html",
")",
":",
"## FIXME: this should take parsed documents too, and use their body",
"## or other content.",
"old_html_tokens",
"=",
"tokenize",
"(",
"old_html",
")",
"new_html_tokens",
"=",
"tokenize",
"(",
"new_html",
")",
... | https://github.com/cloudera/hue/blob/23f02102d4547c17c32bd5ea0eb24e9eadd657a4/desktop/core/ext-py/lxml-3.3.6/src/lxml/html/diff.py#L154-L175 | |
xhochy/fletcher | 39ce11d71e4ac1e95725d46be21bb38f3ea04349 | benchmarks/text.py | python | TimeSuiteText.time_casefold | (self) | [] | def time_casefold(self):
self.df["str"].str.casefold() | [
"def",
"time_casefold",
"(",
"self",
")",
":",
"self",
".",
"df",
"[",
"\"str\"",
"]",
".",
"str",
".",
"casefold",
"(",
")"
] | https://github.com/xhochy/fletcher/blob/39ce11d71e4ac1e95725d46be21bb38f3ea04349/benchmarks/text.py#L99-L100 | ||||
pikpikcu/Pentest-Tools-Framework | cd6e6107764a809943dc4e073cde8149c1a2cd03 | modules/dirsearch/thirdparty/requests/utils.py | python | get_environ_proxies | (url) | Return a dict of environment proxies. | Return a dict of environment proxies. | [
"Return",
"a",
"dict",
"of",
"environment",
"proxies",
"."
] | def get_environ_proxies(url):
"""Return a dict of environment proxies."""
if should_bypass_proxies(url):
return {}
else:
return getproxies() | [
"def",
"get_environ_proxies",
"(",
"url",
")",
":",
"if",
"should_bypass_proxies",
"(",
"url",
")",
":",
"return",
"{",
"}",
"else",
":",
"return",
"getproxies",
"(",
")"
] | https://github.com/pikpikcu/Pentest-Tools-Framework/blob/cd6e6107764a809943dc4e073cde8149c1a2cd03/modules/dirsearch/thirdparty/requests/utils.py#L533-L538 | ||
rlpy/rlpy | af25d2011fff1d61cb7c5cc8992549808f0c6103 | rlpy/Representations/Representation.py | python | Representation.post_discover | (self, s, terminal, a, td_error, phi_s) | return 0 | Identifies and adds ("discovers") new features for this adaptive
representation AFTER having obtained the TD-Error.
For example, see :py:class:`~rlpy.Representations.iFDD.iFDD`.
In that class, a new feature is added based on regions of high TD-Error.
.. note::
For adaptive r... | Identifies and adds ("discovers") new features for this adaptive
representation AFTER having obtained the TD-Error.
For example, see :py:class:`~rlpy.Representations.iFDD.iFDD`.
In that class, a new feature is added based on regions of high TD-Error. | [
"Identifies",
"and",
"adds",
"(",
"discovers",
")",
"new",
"features",
"for",
"this",
"adaptive",
"representation",
"AFTER",
"having",
"obtained",
"the",
"TD",
"-",
"Error",
".",
"For",
"example",
"see",
":",
"py",
":",
"class",
":",
"~rlpy",
".",
"Represe... | def post_discover(self, s, terminal, a, td_error, phi_s):
"""
Identifies and adds ("discovers") new features for this adaptive
representation AFTER having obtained the TD-Error.
For example, see :py:class:`~rlpy.Representations.iFDD.iFDD`.
In that class, a new feature is added ba... | [
"def",
"post_discover",
"(",
"self",
",",
"s",
",",
"terminal",
",",
"a",
",",
"td_error",
",",
"phi_s",
")",
":",
"return",
"0"
] | https://github.com/rlpy/rlpy/blob/af25d2011fff1d61cb7c5cc8992549808f0c6103/rlpy/Representations/Representation.py#L398-L419 | |
yampelo/beagle | 8bb2b615fd5968e07af42d41a173d98541fc1e85 | beagle/transformers/fireeye_hx_transformer.py | python | FireEyeHXTransformer.make_file | (self, event: dict) | return (file_node, process, proc_file_node) | Converts a fileWriteEvent to two nodes, a file and the process manipulated the file.
Generates a process - (Wrote) -> File edge.
Parameters
----------
event : dict
The fileWriteEvent event.
Returns
-------
Optional[Tuple[File, Process, File]]
... | Converts a fileWriteEvent to two nodes, a file and the process manipulated the file.
Generates a process - (Wrote) -> File edge. | [
"Converts",
"a",
"fileWriteEvent",
"to",
"two",
"nodes",
"a",
"file",
"and",
"the",
"process",
"manipulated",
"the",
"file",
".",
"Generates",
"a",
"process",
"-",
"(",
"Wrote",
")",
"-",
">",
"File",
"edge",
"."
] | def make_file(self, event: dict) -> Optional[Tuple[File, Process, File]]:
"""Converts a fileWriteEvent to two nodes, a file and the process manipulated the file.
Generates a process - (Wrote) -> File edge.
Parameters
----------
event : dict
The fileWriteEvent event.
... | [
"def",
"make_file",
"(",
"self",
",",
"event",
":",
"dict",
")",
"->",
"Optional",
"[",
"Tuple",
"[",
"File",
",",
"Process",
",",
"File",
"]",
"]",
":",
"if",
"\"filePath\"",
"not",
"in",
"event",
":",
"return",
"None",
"# Add the drive where possible.",
... | https://github.com/yampelo/beagle/blob/8bb2b615fd5968e07af42d41a173d98541fc1e85/beagle/transformers/fireeye_hx_transformer.py#L142-L197 | |
KalleHallden/AutoTimer | 2d954216700c4930baa154e28dbddc34609af7ce | env/lib/python2.7/site-packages/pip/_vendor/packaging/specifiers.py | python | Specifier._compare_compatible | (self, prospective, spec) | return self._get_operator(">=")(prospective, spec) and self._get_operator("==")(
prospective, prefix
) | [] | def _compare_compatible(self, prospective, spec):
# Compatible releases have an equivalent combination of >= and ==. That
# is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to
# implement this in terms of the other specifiers instead of
# implementing it ourselves. The only thi... | [
"def",
"_compare_compatible",
"(",
"self",
",",
"prospective",
",",
"spec",
")",
":",
"# Compatible releases have an equivalent combination of >= and ==. That",
"# is that ~=2.2 is equivalent to >=2.2,==2.*. This allows us to",
"# implement this in terms of the other specifiers instead of",
... | https://github.com/KalleHallden/AutoTimer/blob/2d954216700c4930baa154e28dbddc34609af7ce/env/lib/python2.7/site-packages/pip/_vendor/packaging/specifiers.py#L375-L399 | |||
mpdavis/python-jose | cfbb868efffe05352546f064a47e6d90a53bbae0 | jose/jwe.py | python | _get_random_cek_bytes_for_enc | (enc) | return cek_bytes | Get the random cek bytes based on the encryptionn algorithm
Args:
enc (str): Encryption algorithm
Returns:
(bytes) random bytes for cek key | Get the random cek bytes based on the encryptionn algorithm | [
"Get",
"the",
"random",
"cek",
"bytes",
"based",
"on",
"the",
"encryptionn",
"algorithm"
] | def _get_random_cek_bytes_for_enc(enc):
"""
Get the random cek bytes based on the encryptionn algorithm
Args:
enc (str): Encryption algorithm
Returns:
(bytes) random bytes for cek key
"""
if enc == ALGORITHMS.A128GCM:
num_bits = 128
elif enc == ALGORITHMS.A192GCM:
... | [
"def",
"_get_random_cek_bytes_for_enc",
"(",
"enc",
")",
":",
"if",
"enc",
"==",
"ALGORITHMS",
".",
"A128GCM",
":",
"num_bits",
"=",
"128",
"elif",
"enc",
"==",
"ALGORITHMS",
".",
"A192GCM",
":",
"num_bits",
"=",
"192",
"elif",
"enc",
"in",
"(",
"ALGORITHM... | https://github.com/mpdavis/python-jose/blob/cfbb868efffe05352546f064a47e6d90a53bbae0/jose/jwe.py#L531-L554 | |
log2timeline/dfvfs | 4ca7bf06b15cdc000297a7122a065f0ca71de544 | dfvfs/vfs/ext_file_entry.py | python | EXTFileEntry.GetEXTFileEntry | (self) | return self._fsext_file_entry | Retrieves the EXT file entry.
Returns:
pyfsext.file_entry: EXT file entry. | Retrieves the EXT file entry. | [
"Retrieves",
"the",
"EXT",
"file",
"entry",
"."
] | def GetEXTFileEntry(self):
"""Retrieves the EXT file entry.
Returns:
pyfsext.file_entry: EXT file entry.
"""
return self._fsext_file_entry | [
"def",
"GetEXTFileEntry",
"(",
"self",
")",
":",
"return",
"self",
".",
"_fsext_file_entry"
] | https://github.com/log2timeline/dfvfs/blob/4ca7bf06b15cdc000297a7122a065f0ca71de544/dfvfs/vfs/ext_file_entry.py#L273-L279 | |
AppScale/gts | 46f909cf5dc5ba81faf9d81dc9af598dcf8a82a9 | AppServer/google/appengine/api/datastore_types.py | python | Key.kind | (self) | Returns this entity's kind, as a string. | Returns this entity's kind, as a string. | [
"Returns",
"this",
"entity",
"s",
"kind",
"as",
"a",
"string",
"."
] | def kind(self):
"""Returns this entity's kind, as a string."""
if self.__reference.path().element_size() > 0:
encoded = self.__reference.path().element_list()[-1].type()
return unicode(encoded.decode('utf-8'))
else:
return None | [
"def",
"kind",
"(",
"self",
")",
":",
"if",
"self",
".",
"__reference",
".",
"path",
"(",
")",
".",
"element_size",
"(",
")",
">",
"0",
":",
"encoded",
"=",
"self",
".",
"__reference",
".",
"path",
"(",
")",
".",
"element_list",
"(",
")",
"[",
"-... | https://github.com/AppScale/gts/blob/46f909cf5dc5ba81faf9d81dc9af598dcf8a82a9/AppServer/google/appengine/api/datastore_types.py#L541-L547 | ||
google/jax | bebe9845a873b3203f8050395255f173ba3bbb71 | jax/example_libraries/stax.py | python | GeneralConvTranspose | (dimension_numbers, out_chan, filter_shape,
strides=None, padding='VALID', W_init=None,
b_init=normal(1e-6)) | return init_fun, apply_fun | Layer construction function for a general transposed-convolution layer. | Layer construction function for a general transposed-convolution layer. | [
"Layer",
"construction",
"function",
"for",
"a",
"general",
"transposed",
"-",
"convolution",
"layer",
"."
] | def GeneralConvTranspose(dimension_numbers, out_chan, filter_shape,
strides=None, padding='VALID', W_init=None,
b_init=normal(1e-6)):
"""Layer construction function for a general transposed-convolution layer."""
lhs_spec, rhs_spec, out_spec = dimension_numbers
one... | [
"def",
"GeneralConvTranspose",
"(",
"dimension_numbers",
",",
"out_chan",
",",
"filter_shape",
",",
"strides",
"=",
"None",
",",
"padding",
"=",
"'VALID'",
",",
"W_init",
"=",
"None",
",",
"b_init",
"=",
"normal",
"(",
"1e-6",
")",
")",
":",
"lhs_spec",
",... | https://github.com/google/jax/blob/bebe9845a873b3203f8050395255f173ba3bbb71/jax/example_libraries/stax.py#L87-L110 | |
sfepy/sfepy | 02ec7bb2ab39ee1dfe1eb4cd509f0ffb7dcc8b25 | sfepy/homogenization/coefs_base.py | python | MiniAppBase.process_options | (self) | Setup application-specific options.
Subclasses should implement this method as needed.
Returns
-------
app_options : Struct instance
The application options. | Setup application-specific options. | [
"Setup",
"application",
"-",
"specific",
"options",
"."
] | def process_options(self):
"""
Setup application-specific options.
Subclasses should implement this method as needed.
Returns
-------
app_options : Struct instance
The application options.
""" | [
"def",
"process_options",
"(",
"self",
")",
":"
] | https://github.com/sfepy/sfepy/blob/02ec7bb2ab39ee1dfe1eb4cd509f0ffb7dcc8b25/sfepy/homogenization/coefs_base.py#L44-L54 | ||
openrazer/openrazer | 1615f8516e8014bad7f78c781c91e6529679718f | daemon/openrazer_daemon/hardware/mouse.py | python | RazerAbyssus1800._suspend_device | (self) | Suspend the device
Get the current logo state, store it for later and then set the logo to off | Suspend the device | [
"Suspend",
"the",
"device"
] | def _suspend_device(self):
"""
Suspend the device
Get the current logo state, store it for later and then set the logo to off
"""
self.suspend_args.clear()
self.suspend_args['active'] = _da_get_logo_active(self)
# Todo make it context?
self.disable_notif... | [
"def",
"_suspend_device",
"(",
"self",
")",
":",
"self",
".",
"suspend_args",
".",
"clear",
"(",
")",
"self",
".",
"suspend_args",
"[",
"'active'",
"]",
"=",
"_da_get_logo_active",
"(",
"self",
")",
"# Todo make it context?",
"self",
".",
"disable_notify",
"="... | https://github.com/openrazer/openrazer/blob/1615f8516e8014bad7f78c781c91e6529679718f/daemon/openrazer_daemon/hardware/mouse.py#L1563-L1575 | ||
mesalock-linux/mesapy | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | lib-python/2.7/idlelib/configDialog.py | python | ConfigDialog.SaveNewTheme | (self, themeName, theme) | save a newly created theme.
themeName - string, the name of the new theme
theme - dictionary containing the new theme | save a newly created theme.
themeName - string, the name of the new theme
theme - dictionary containing the new theme | [
"save",
"a",
"newly",
"created",
"theme",
".",
"themeName",
"-",
"string",
"the",
"name",
"of",
"the",
"new",
"theme",
"theme",
"-",
"dictionary",
"containing",
"the",
"new",
"theme"
] | def SaveNewTheme(self, themeName, theme):
"""
save a newly created theme.
themeName - string, the name of the new theme
theme - dictionary containing the new theme
"""
if not idleConf.userCfg['highlight'].has_section(themeName):
idleConf.userCfg['highlight'].a... | [
"def",
"SaveNewTheme",
"(",
"self",
",",
"themeName",
",",
"theme",
")",
":",
"if",
"not",
"idleConf",
".",
"userCfg",
"[",
"'highlight'",
"]",
".",
"has_section",
"(",
"themeName",
")",
":",
"idleConf",
".",
"userCfg",
"[",
"'highlight'",
"]",
".",
"add... | https://github.com/mesalock-linux/mesapy/blob/ed546d59a21b36feb93e2309d5c6b75aa0ad95c9/lib-python/2.7/idlelib/configDialog.py#L1140-L1150 | ||
conjure-up/conjure-up | d2bf8ab8e71ff01321d0e691a8d3e3833a047678 | conjureup/bundle.py | python | BundleApplicationFragment.constraints | (self, val) | [] | def constraints(self, val):
self._constraints = val | [
"def",
"constraints",
"(",
"self",
",",
"val",
")",
":",
"self",
".",
"_constraints",
"=",
"val"
] | https://github.com/conjure-up/conjure-up/blob/d2bf8ab8e71ff01321d0e691a8d3e3833a047678/conjureup/bundle.py#L36-L37 | ||||
Tautulli/Tautulli | 2410eb33805aaac4bd1c5dad0f71e4f15afaf742 | plexpy/notifiers.py | python | OSX.validate | (self) | [] | def validate(self):
try:
self.objc = __import__("objc")
self.AppKit = __import__("AppKit")
return True
except:
return False | [
"def",
"validate",
"(",
"self",
")",
":",
"try",
":",
"self",
".",
"objc",
"=",
"__import__",
"(",
"\"objc\"",
")",
"self",
".",
"AppKit",
"=",
"__import__",
"(",
"\"AppKit\"",
")",
"return",
"True",
"except",
":",
"return",
"False"
] | https://github.com/Tautulli/Tautulli/blob/2410eb33805aaac4bd1c5dad0f71e4f15afaf742/plexpy/notifiers.py#L2494-L2500 | ||||
entropy1337/infernal-twin | 10995cd03312e39a48ade0f114ebb0ae3a711bb8 | Modules/build/pillow/PIL/OleFileIO.py | python | OleFileIO.getmtime | (self, filename) | return entry.getmtime() | Return modification time of a stream/storage.
:param filename: path of stream/storage in storage tree. (see openstream for
syntax)
:returns: None if modification time is null, a python datetime object
otherwise (UTC timezone)
new in version 0.26 | Return modification time of a stream/storage. | [
"Return",
"modification",
"time",
"of",
"a",
"stream",
"/",
"storage",
"."
] | def getmtime(self, filename):
"""
Return modification time of a stream/storage.
:param filename: path of stream/storage in storage tree. (see openstream for
syntax)
:returns: None if modification time is null, a python datetime object
otherwise (UTC timezone)
... | [
"def",
"getmtime",
"(",
"self",
",",
"filename",
")",
":",
"sid",
"=",
"self",
".",
"_find",
"(",
"filename",
")",
"entry",
"=",
"self",
".",
"direntries",
"[",
"sid",
"]",
"return",
"entry",
".",
"getmtime",
"(",
")"
] | https://github.com/entropy1337/infernal-twin/blob/10995cd03312e39a48ade0f114ebb0ae3a711bb8/Modules/build/pillow/PIL/OleFileIO.py#L1963-L1976 | |
zhl2008/awd-platform | 0416b31abea29743387b10b3914581fbe8e7da5e | check_server/check_scripts/8.py | python | check.admin_check | (self) | return False | [] | def admin_check(self):
data = 'eval(666)'
headers['Cookie'] = 'PHPSESSID=ujg0tpds1u9d23b969f2duj5c7;'
res = http('get',host,port,'/admin/tools/database?type=export',data,headers)
tmp = http('get',host,port,'/admin/login/loginout.html','',headers)
if 'qq3479015851_article_type' in res:
return True
if debu... | [
"def",
"admin_check",
"(",
"self",
")",
":",
"data",
"=",
"'eval(666)'",
"headers",
"[",
"'Cookie'",
"]",
"=",
"'PHPSESSID=ujg0tpds1u9d23b969f2duj5c7;'",
"res",
"=",
"http",
"(",
"'get'",
",",
"host",
",",
"port",
",",
"'/admin/tools/database?type=export'",
",",
... | https://github.com/zhl2008/awd-platform/blob/0416b31abea29743387b10b3914581fbe8e7da5e/check_server/check_scripts/8.py#L119-L128 | |||
joxeankoret/pyew | 8eb3e49a9bf57c0787fa79ecae0671129ef3f2e8 | plugins/ole2.py | python | ole2Explore | (pyew, doprint=True, args=None) | Get the OLE2 directory | Get the OLE2 directory | [
"Get",
"the",
"OLE2",
"directory"
] | def ole2Explore(pyew, doprint=True, args=None):
""" Get the OLE2 directory """
if not pyew.physical:
filename = tempfile.mkstemp("pyew")[1]
f = file(filename, "wb")
f.write(pyew.getBuffer())
f.close()
else:
filename = pyew.filename
ole = OleFileIO(filename, raise_def... | [
"def",
"ole2Explore",
"(",
"pyew",
",",
"doprint",
"=",
"True",
",",
"args",
"=",
"None",
")",
":",
"if",
"not",
"pyew",
".",
"physical",
":",
"filename",
"=",
"tempfile",
".",
"mkstemp",
"(",
"\"pyew\"",
")",
"[",
"1",
"]",
"f",
"=",
"file",
"(",
... | https://github.com/joxeankoret/pyew/blob/8eb3e49a9bf57c0787fa79ecae0671129ef3f2e8/plugins/ole2.py#L32-L87 | ||
google-research/language | 61fa7260ac7d690d11ef72ca863e45a37c0bdc80 | language/search_agents/t5/t5_agent_lib.py | python | query_to_prompt | (query: str, addition_terms: Sequence[Term],
subtraction_terms: Sequence[Term],
or_terms: Sequence[Term]) | return " ".join(r for r in res if r) | Produces a plaintext form of the current query with all modifiers.
This is not the form to be used with Lucence but part of the T5 input.
Args:
query: The original query.
addition_terms: Forced terms.
subtraction_terms: Prohibited terms.
or_terms: Optional terms.
Returns:
query_with_modifie... | Produces a plaintext form of the current query with all modifiers. | [
"Produces",
"a",
"plaintext",
"form",
"of",
"the",
"current",
"query",
"with",
"all",
"modifiers",
"."
] | def query_to_prompt(query: str, addition_terms: Sequence[Term],
subtraction_terms: Sequence[Term],
or_terms: Sequence[Term]) -> str:
"""Produces a plaintext form of the current query with all modifiers.
This is not the form to be used with Lucence but part of the T5 input.
... | [
"def",
"query_to_prompt",
"(",
"query",
":",
"str",
",",
"addition_terms",
":",
"Sequence",
"[",
"Term",
"]",
",",
"subtraction_terms",
":",
"Sequence",
"[",
"Term",
"]",
",",
"or_terms",
":",
"Sequence",
"[",
"Term",
"]",
")",
"->",
"str",
":",
"res",
... | https://github.com/google-research/language/blob/61fa7260ac7d690d11ef72ca863e45a37c0bdc80/language/search_agents/t5/t5_agent_lib.py#L121-L164 | |
fonttools/fonttools | 892322aaff6a89bea5927379ec06bc0da3dfb7df | Lib/fontTools/feaLib/ast.py | python | MarkClassDefinition.glyphSet | (self) | return self.glyphs.glyphSet() | The glyphs in this class as a tuple of :class:`GlyphName` objects. | The glyphs in this class as a tuple of :class:`GlyphName` objects. | [
"The",
"glyphs",
"in",
"this",
"class",
"as",
"a",
"tuple",
"of",
":",
"class",
":",
"GlyphName",
"objects",
"."
] | def glyphSet(self):
"""The glyphs in this class as a tuple of :class:`GlyphName` objects."""
return self.glyphs.glyphSet() | [
"def",
"glyphSet",
"(",
"self",
")",
":",
"return",
"self",
".",
"glyphs",
".",
"glyphSet",
"(",
")"
] | https://github.com/fonttools/fonttools/blob/892322aaff6a89bea5927379ec06bc0da3dfb7df/Lib/fontTools/feaLib/ast.py#L585-L587 | |
oilshell/oil | 94388e7d44a9ad879b12615f6203b38596b5a2d3 | opy/callgraph.py | python | Class.__init__ | (self, cls, mod_name, mod_path) | [] | def __init__(self, cls, mod_name, mod_path):
self.cls = cls
self.mod_name = mod_name
self.mod_path = mod_path
self.methods = [] | [
"def",
"__init__",
"(",
"self",
",",
"cls",
",",
"mod_name",
",",
"mod_path",
")",
":",
"self",
".",
"cls",
"=",
"cls",
"self",
".",
"mod_name",
"=",
"mod_name",
"self",
".",
"mod_path",
"=",
"mod_path",
"self",
".",
"methods",
"=",
"[",
"]"
] | https://github.com/oilshell/oil/blob/94388e7d44a9ad879b12615f6203b38596b5a2d3/opy/callgraph.py#L294-L298 | ||||
exodrifter/unity-python | bef6e4e9ddfbbf1eaf7acbbb973e9aa3dd64a20d | Lib/lib2to3/patcomp.py | python | PatternCompiler.__init__ | (self, grammar_file=None) | Initializer.
Takes an optional alternative filename for the pattern grammar. | Initializer. | [
"Initializer",
"."
] | def __init__(self, grammar_file=None):
"""Initializer.
Takes an optional alternative filename for the pattern grammar.
"""
if grammar_file is None:
self.grammar = pygram.pattern_grammar
self.syms = pygram.pattern_symbols
else:
self.grammar = d... | [
"def",
"__init__",
"(",
"self",
",",
"grammar_file",
"=",
"None",
")",
":",
"if",
"grammar_file",
"is",
"None",
":",
"self",
".",
"grammar",
"=",
"pygram",
".",
"pattern_grammar",
"self",
".",
"syms",
"=",
"pygram",
".",
"pattern_symbols",
"else",
":",
"... | https://github.com/exodrifter/unity-python/blob/bef6e4e9ddfbbf1eaf7acbbb973e9aa3dd64a20d/Lib/lib2to3/patcomp.py#L40-L53 | ||
ilius/pyglossary | d599b3beda3ae17642af5debd83bb991148e6425 | pyglossary/xdxf_transform.py | python | xdxf_to_html_transformer | () | return transform | [] | def xdxf_to_html_transformer():
from lxml import etree
from lxml.etree import tostring
from os.path import join
try:
from lxml import etree as ET
except ModuleNotFoundError as e:
e.msg += f", run `{core.pip} install lxml` to install"
raise e
with open(join(rootDir, "pyglossary", "xdxf.xsl"), "r") as f:
x... | [
"def",
"xdxf_to_html_transformer",
"(",
")",
":",
"from",
"lxml",
"import",
"etree",
"from",
"lxml",
".",
"etree",
"import",
"tostring",
"from",
"os",
".",
"path",
"import",
"join",
"try",
":",
"from",
"lxml",
"import",
"etree",
"as",
"ET",
"except",
"Modu... | https://github.com/ilius/pyglossary/blob/d599b3beda3ae17642af5debd83bb991148e6425/pyglossary/xdxf_transform.py#L10-L33 | |||
vivisect/vivisect | 37b0b655d8dedfcf322e86b0f144b096e48d547e | cobra/cluster.py | python | ClusterWork.done | (self) | This is called back on the server once a work unit
is complete and returned. | This is called back on the server once a work unit
is complete and returned. | [
"This",
"is",
"called",
"back",
"on",
"the",
"server",
"once",
"a",
"work",
"unit",
"is",
"complete",
"and",
"returned",
"."
] | def done(self):
"""
This is called back on the server once a work unit
is complete and returned.
"""
pass | [
"def",
"done",
"(",
"self",
")",
":",
"pass"
] | https://github.com/vivisect/vivisect/blob/37b0b655d8dedfcf322e86b0f144b096e48d547e/cobra/cluster.py#L83-L88 | ||
holzschu/Carnets | 44effb10ddfc6aa5c8b0687582a724ba82c6b547 | Library/lib/python3.7/multiprocessing/pool.py | python | Pool.imap_unordered | (self, func, iterable, chunksize=1) | Like `imap()` method but ordering of results is arbitrary. | Like `imap()` method but ordering of results is arbitrary. | [
"Like",
"imap",
"()",
"method",
"but",
"ordering",
"of",
"results",
"is",
"arbitrary",
"."
] | def imap_unordered(self, func, iterable, chunksize=1):
'''
Like `imap()` method but ordering of results is arbitrary.
'''
if self._state != RUN:
raise ValueError("Pool not running")
if chunksize == 1:
result = IMapUnorderedIterator(self._cache)
... | [
"def",
"imap_unordered",
"(",
"self",
",",
"func",
",",
"iterable",
",",
"chunksize",
"=",
"1",
")",
":",
"if",
"self",
".",
"_state",
"!=",
"RUN",
":",
"raise",
"ValueError",
"(",
"\"Pool not running\"",
")",
"if",
"chunksize",
"==",
"1",
":",
"result",... | https://github.com/holzschu/Carnets/blob/44effb10ddfc6aa5c8b0687582a724ba82c6b547/Library/lib/python3.7/multiprocessing/pool.py#L349-L376 | ||
hyunwoongko/kochat | b23308bdac63e58c347906c3bd45d3c14302a6c4 | kochat/proc/utils/metrics.py | python | Metrics.evaluate | (self, label: Tensor, predict: Tensor, mode: str) | return {'accuracy': accuracy_score(label, predict),
'precision': precision_score(label, predict, average='macro'),
'recall': recall_score(label, predict, average='macro'),
'f1_score': f1_score(label, predict, average='macro')} | 여러가지 메트릭에 의한 결과를 반환합니다.
:param label: 라벨
:param predict: 예측
:param mode: train or test
:return: 정확도 | 여러가지 메트릭에 의한 결과를 반환합니다. | [
"여러가지",
"메트릭에",
"의한",
"결과를",
"반환합니다",
"."
] | def evaluate(self, label: Tensor, predict: Tensor, mode: str) -> dict:
"""
여러가지 메트릭에 의한 결과를 반환합니다.
:param label: 라벨
:param predict: 예측
:param mode: train or test
:return: 정확도
"""
if not isinstance(label, np.ndarray):
label = label.detach().cp... | [
"def",
"evaluate",
"(",
"self",
",",
"label",
":",
"Tensor",
",",
"predict",
":",
"Tensor",
",",
"mode",
":",
"str",
")",
"->",
"dict",
":",
"if",
"not",
"isinstance",
"(",
"label",
",",
"np",
".",
"ndarray",
")",
":",
"label",
"=",
"label",
".",
... | https://github.com/hyunwoongko/kochat/blob/b23308bdac63e58c347906c3bd45d3c14302a6c4/kochat/proc/utils/metrics.py#L24-L57 | |
sagemath/sage | f9b2db94f675ff16963ccdefba4f1a3393b3fe0d | src/sage/dynamics/arithmetic_dynamics/wehlerK3.py | python | WehlerK3Surface_ring.canonical_height_minus | (self, P, N, badprimes=None, prec=100) | return h | r"""
Evaluates the canonical height minus function of Call-Silverman
for ``P`` with ``N`` terms of the series of the local heights.
Must be over `\ZZ` or `\QQ`.
ALGORITHM:
Sum over the lambda minus heights (local heights) in a convergent series,
for more detail see sec... | r"""
Evaluates the canonical height minus function of Call-Silverman
for ``P`` with ``N`` terms of the series of the local heights. | [
"r",
"Evaluates",
"the",
"canonical",
"height",
"minus",
"function",
"of",
"Call",
"-",
"Silverman",
"for",
"P",
"with",
"N",
"terms",
"of",
"the",
"series",
"of",
"the",
"local",
"heights",
"."
] | def canonical_height_minus(self, P, N, badprimes=None, prec=100):
r"""
Evaluates the canonical height minus function of Call-Silverman
for ``P`` with ``N`` terms of the series of the local heights.
Must be over `\ZZ` or `\QQ`.
ALGORITHM:
Sum over the lambda minus heigh... | [
"def",
"canonical_height_minus",
"(",
"self",
",",
"P",
",",
"N",
",",
"badprimes",
"=",
"None",
",",
"prec",
"=",
"100",
")",
":",
"if",
"badprimes",
"is",
"None",
":",
"badprimes",
"=",
"self",
".",
"degenerate_primes",
"(",
")",
"m",
"=",
"2",
"wh... | https://github.com/sagemath/sage/blob/f9b2db94f675ff16963ccdefba4f1a3393b3fe0d/src/sage/dynamics/arithmetic_dynamics/wehlerK3.py#L1850-L1912 | |
jliljebl/flowblade | 995313a509b80e99eb1ad550d945bdda5995093b | flowblade-trunk/Flowblade/containeractions.py | python | MLTXMLContainerActions._launch_render | (self, clip, range_in, range_out, clip_start_offset) | [] | def _launch_render(self, clip, range_in, range_out, clip_start_offset):
self.create_data_dirs_if_needed()
self.render_range_in = range_in
self.render_range_out = range_out
self.clip_start_offset = clip_start_offset
mltxmlheadless.clear_flag_files(self.get_container_program_id()... | [
"def",
"_launch_render",
"(",
"self",
",",
"clip",
",",
"range_in",
",",
"range_out",
",",
"clip_start_offset",
")",
":",
"self",
".",
"create_data_dirs_if_needed",
"(",
")",
"self",
".",
"render_range_in",
"=",
"range_in",
"self",
".",
"render_range_out",
"=",
... | https://github.com/jliljebl/flowblade/blob/995313a509b80e99eb1ad550d945bdda5995093b/flowblade-trunk/Flowblade/containeractions.py#L839-L872 | ||||
openstack/octavia | 27e5b27d31c695ba72fb6750de2bdafd76e0d7d9 | octavia/common/validate.py | python | header_value_string | (value, what=None) | return True | Raises an error if the value string contains invalid characters. | Raises an error if the value string contains invalid characters. | [
"Raises",
"an",
"error",
"if",
"the",
"value",
"string",
"contains",
"invalid",
"characters",
"."
] | def header_value_string(value, what=None):
"""Raises an error if the value string contains invalid characters."""
p = re.compile(constants.HTTP_HEADER_VALUE_REGEX)
q = re.compile(constants.HTTP_QUOTED_HEADER_VALUE_REGEX)
if not p.match(value) and not q.match(value):
raise exceptions.InvalidStrin... | [
"def",
"header_value_string",
"(",
"value",
",",
"what",
"=",
"None",
")",
":",
"p",
"=",
"re",
".",
"compile",
"(",
"constants",
".",
"HTTP_HEADER_VALUE_REGEX",
")",
"q",
"=",
"re",
".",
"compile",
"(",
"constants",
".",
"HTTP_QUOTED_HEADER_VALUE_REGEX",
")... | https://github.com/openstack/octavia/blob/27e5b27d31c695ba72fb6750de2bdafd76e0d7d9/octavia/common/validate.py#L87-L93 | |
bruderstein/PythonScript | df9f7071ddf3a079e3a301b9b53a6dc78cf1208f | PythonLib/full/email/_header_value_parser.py | python | AddressList.addresses | (self) | return [x for x in self if x.token_type=='address'] | [] | def addresses(self):
return [x for x in self if x.token_type=='address'] | [
"def",
"addresses",
"(",
"self",
")",
":",
"return",
"[",
"x",
"for",
"x",
"in",
"self",
"if",
"x",
".",
"token_type",
"==",
"'address'",
"]"
] | https://github.com/bruderstein/PythonScript/blob/df9f7071ddf3a079e3a301b9b53a6dc78cf1208f/PythonLib/full/email/_header_value_parser.py#L294-L295 | |||
googlefonts/fontbakery | cb8196c3a636b63654f8370636cb3f438b60d5b1 | Lib/fontbakery/profiles/googlefonts.py | python | com_google_fonts_check_cjk_vertical_metrics | (ttFont) | Check font follows the Google Fonts CJK vertical metric schema | Check font follows the Google Fonts CJK vertical metric schema | [
"Check",
"font",
"follows",
"the",
"Google",
"Fonts",
"CJK",
"vertical",
"metric",
"schema"
] | def com_google_fonts_check_cjk_vertical_metrics(ttFont):
"""Check font follows the Google Fonts CJK vertical metric schema"""
from .shared_conditions import is_cjk_font, typo_metrics_enabled
filename = os.path.basename(ttFont.reader.file.name)
# Check necessary tables are present.
missing_tables = ... | [
"def",
"com_google_fonts_check_cjk_vertical_metrics",
"(",
"ttFont",
")",
":",
"from",
".",
"shared_conditions",
"import",
"is_cjk_font",
",",
"typo_metrics_enabled",
"filename",
"=",
"os",
".",
"path",
".",
"basename",
"(",
"ttFont",
".",
"reader",
".",
"file",
"... | https://github.com/googlefonts/fontbakery/blob/cb8196c3a636b63654f8370636cb3f438b60d5b1/Lib/fontbakery/profiles/googlefonts.py#L4738-L4817 | ||
PokemonGoF/PokemonGo-Bot-Desktop | 4bfa94f0183406c6a86f93645eff7abd3ad4ced8 | build/pywin/Lib/bisect.py | python | bisect_left | (a, x, lo=0, hi=None) | return lo | Return the index where to insert item x in list a, assuming a is sorted.
The return value i is such that all e in a[:i] have e < x, and all e in
a[i:] have e >= x. So if x already appears in the list, a.insert(x) will
insert just before the leftmost x already there.
Optional args lo (default 0) and h... | Return the index where to insert item x in list a, assuming a is sorted. | [
"Return",
"the",
"index",
"where",
"to",
"insert",
"item",
"x",
"in",
"list",
"a",
"assuming",
"a",
"is",
"sorted",
"."
] | def bisect_left(a, x, lo=0, hi=None):
"""Return the index where to insert item x in list a, assuming a is sorted.
The return value i is such that all e in a[:i] have e < x, and all e in
a[i:] have e >= x. So if x already appears in the list, a.insert(x) will
insert just before the leftmost x already t... | [
"def",
"bisect_left",
"(",
"a",
",",
"x",
",",
"lo",
"=",
"0",
",",
"hi",
"=",
"None",
")",
":",
"if",
"lo",
"<",
"0",
":",
"raise",
"ValueError",
"(",
"'lo must be non-negative'",
")",
"if",
"hi",
"is",
"None",
":",
"hi",
"=",
"len",
"(",
"a",
... | https://github.com/PokemonGoF/PokemonGo-Bot-Desktop/blob/4bfa94f0183406c6a86f93645eff7abd3ad4ced8/build/pywin/Lib/bisect.py#L67-L86 | |
Nuitka/Nuitka | 39262276993757fa4e299f497654065600453fc9 | nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/rpcgen.py | python | generate | (env) | Add RPCGEN Builders and construction variables for an Environment. | Add RPCGEN Builders and construction variables for an Environment. | [
"Add",
"RPCGEN",
"Builders",
"and",
"construction",
"variables",
"for",
"an",
"Environment",
"."
] | def generate(env):
"Add RPCGEN Builders and construction variables for an Environment."
client = Builder(action=rpcgen_client, suffix='_clnt.c', src_suffix='.x')
header = Builder(action=rpcgen_header, suffix='.h', src_suffix='.x')
service = Builder(action=rpcgen_service, suffix='_svc.c', src_... | [
"def",
"generate",
"(",
"env",
")",
":",
"client",
"=",
"Builder",
"(",
"action",
"=",
"rpcgen_client",
",",
"suffix",
"=",
"'_clnt.c'",
",",
"src_suffix",
"=",
"'.x'",
")",
"header",
"=",
"Builder",
"(",
"action",
"=",
"rpcgen_header",
",",
"suffix",
"=... | https://github.com/Nuitka/Nuitka/blob/39262276993757fa4e299f497654065600453fc9/nuitka/build/inline_copy/lib/scons-2.3.2/SCons/Tool/rpcgen.py#L45-L61 | ||
eyounx/ZOOpt | 49c750daf842639ee6407848a867091689571810 | zoopt/algos/opt_algorithms/racos/sracos.py | python | SRacosTune.__init__ | (self, dimension, parameter) | return | Initialization.
:param dimension: instance of Dimension2 class
:param parameter: instance of Parameter class | Initialization. | [
"Initialization",
"."
] | def __init__(self, dimension, parameter):
"""
Initialization.
:param dimension: instance of Dimension2 class
:param parameter: instance of Parameter class
"""
RacosCommon.__init__(self)
self.clear()
objective = Objective(None, dimension)
self.set... | [
"def",
"__init__",
"(",
"self",
",",
"dimension",
",",
"parameter",
")",
":",
"RacosCommon",
".",
"__init__",
"(",
"self",
")",
"self",
".",
"clear",
"(",
")",
"objective",
"=",
"Objective",
"(",
"None",
",",
"dimension",
")",
"self",
".",
"set_objective... | https://github.com/eyounx/ZOOpt/blob/49c750daf842639ee6407848a867091689571810/zoopt/algos/opt_algorithms/racos/sracos.py#L227-L247 | |
deepgully/me | f7ad65edc2fe435310c6676bc2e322cfe5d4c8f0 | libs/sqlalchemy/pool.py | python | Pool._return_conn | (self, record) | Given a _ConnectionRecord, return it to the :class:`.Pool`.
This method is called when an instrumented DBAPI connection
has its ``close()`` method called. | Given a _ConnectionRecord, return it to the :class:`.Pool`. | [
"Given",
"a",
"_ConnectionRecord",
"return",
"it",
"to",
"the",
":",
"class",
":",
".",
"Pool",
"."
] | def _return_conn(self, record):
"""Given a _ConnectionRecord, return it to the :class:`.Pool`.
This method is called when an instrumented DBAPI connection
has its ``close()`` method called.
"""
if self._use_threadlocal:
try:
del self._threadconns.cur... | [
"def",
"_return_conn",
"(",
"self",
",",
"record",
")",
":",
"if",
"self",
".",
"_use_threadlocal",
":",
"try",
":",
"del",
"self",
".",
"_threadconns",
".",
"current",
"except",
"AttributeError",
":",
"pass",
"self",
".",
"_do_return_conn",
"(",
"record",
... | https://github.com/deepgully/me/blob/f7ad65edc2fe435310c6676bc2e322cfe5d4c8f0/libs/sqlalchemy/pool.py#L344-L356 | ||
caiiiac/Machine-Learning-with-Python | 1a26c4467da41ca4ebc3d5bd789ea942ef79422f | MachineLearning/venv/lib/python3.5/site-packages/pandas/core/dtypes/concat.py | python | _get_series_result_type | (result) | return appropriate class of Series concat
input is either dict or array-like | return appropriate class of Series concat
input is either dict or array-like | [
"return",
"appropriate",
"class",
"of",
"Series",
"concat",
"input",
"is",
"either",
"dict",
"or",
"array",
"-",
"like"
] | def _get_series_result_type(result):
"""
return appropriate class of Series concat
input is either dict or array-like
"""
if isinstance(result, dict):
# concat Series with axis 1
if all(is_sparse(c) for c in compat.itervalues(result)):
from pandas.core.sparse.api import S... | [
"def",
"_get_series_result_type",
"(",
"result",
")",
":",
"if",
"isinstance",
"(",
"result",
",",
"dict",
")",
":",
"# concat Series with axis 1",
"if",
"all",
"(",
"is_sparse",
"(",
"c",
")",
"for",
"c",
"in",
"compat",
".",
"itervalues",
"(",
"result",
... | https://github.com/caiiiac/Machine-Learning-with-Python/blob/1a26c4467da41ca4ebc3d5bd789ea942ef79422f/MachineLearning/venv/lib/python3.5/site-packages/pandas/core/dtypes/concat.py#L64-L84 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.