repo stringlengths 7 55 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 19 28.4k | docstring stringlengths 1 46.9k | docstring_tokens listlengths 1 1.97k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
lvieirajr/mongorest | mongorest/resource.py | CreateResourceMixin.create | def create(self, request):
"""
Creates a new document based on the given data
"""
document = self.collection(request.json)
document.created_at = datetime.utcnow()
document.updated_at = document.created_at
created = document.insert()
return Response(
... | python | def create(self, request):
"""
Creates a new document based on the given data
"""
document = self.collection(request.json)
document.created_at = datetime.utcnow()
document.updated_at = document.created_at
created = document.insert()
return Response(
... | [
"def",
"create",
"(",
"self",
",",
"request",
")",
":",
"document",
"=",
"self",
".",
"collection",
"(",
"request",
".",
"json",
")",
"document",
".",
"created_at",
"=",
"datetime",
".",
"utcnow",
"(",
")",
"document",
".",
"updated_at",
"=",
"document",... | Creates a new document based on the given data | [
"Creates",
"a",
"new",
"document",
"based",
"on",
"the",
"given",
"data"
] | 00f4487ded33254434bc51ff09d48c7a936bd465 | https://github.com/lvieirajr/mongorest/blob/00f4487ded33254434bc51ff09d48c7a936bd465/mongorest/resource.py#L96-L114 | train |
lvieirajr/mongorest | mongorest/resource.py | RetrieveResourceMixin.retrieve | def retrieve(self, request, _id):
"""
Returns the document containing the given _id or 404
"""
_id = deserialize(_id)
retrieved = self.collection.find_one({'_id': _id})
if retrieved:
return Response(serialize(retrieved))
else:
return Respo... | python | def retrieve(self, request, _id):
"""
Returns the document containing the given _id or 404
"""
_id = deserialize(_id)
retrieved = self.collection.find_one({'_id': _id})
if retrieved:
return Response(serialize(retrieved))
else:
return Respo... | [
"def",
"retrieve",
"(",
"self",
",",
"request",
",",
"_id",
")",
":",
"_id",
"=",
"deserialize",
"(",
"_id",
")",
"retrieved",
"=",
"self",
".",
"collection",
".",
"find_one",
"(",
"{",
"'_id'",
":",
"_id",
"}",
")",
"if",
"retrieved",
":",
"return",... | Returns the document containing the given _id or 404 | [
"Returns",
"the",
"document",
"containing",
"the",
"given",
"_id",
"or",
"404"
] | 00f4487ded33254434bc51ff09d48c7a936bd465 | https://github.com/lvieirajr/mongorest/blob/00f4487ded33254434bc51ff09d48c7a936bd465/mongorest/resource.py#L123-L138 | train |
lvieirajr/mongorest | mongorest/resource.py | UpdateResourceMixin.update | def update(self, request, _id):
"""
Updates the document with the given _id using the given data
"""
_id = deserialize(_id)
to_update = self.collection.find_one({'_id': _id})
if to_update:
document = self.collection(dict(to_update, **request.json))
... | python | def update(self, request, _id):
"""
Updates the document with the given _id using the given data
"""
_id = deserialize(_id)
to_update = self.collection.find_one({'_id': _id})
if to_update:
document = self.collection(dict(to_update, **request.json))
... | [
"def",
"update",
"(",
"self",
",",
"request",
",",
"_id",
")",
":",
"_id",
"=",
"deserialize",
"(",
"_id",
")",
"to_update",
"=",
"self",
".",
"collection",
".",
"find_one",
"(",
"{",
"'_id'",
":",
"_id",
"}",
")",
"if",
"to_update",
":",
"document",... | Updates the document with the given _id using the given data | [
"Updates",
"the",
"document",
"with",
"the",
"given",
"_id",
"using",
"the",
"given",
"data"
] | 00f4487ded33254434bc51ff09d48c7a936bd465 | https://github.com/lvieirajr/mongorest/blob/00f4487ded33254434bc51ff09d48c7a936bd465/mongorest/resource.py#L147-L175 | train |
lvieirajr/mongorest | mongorest/resource.py | DeleteResourceMixin.delete | def delete(self, request, _id):
"""
Deletes the document with the given _id if it exists
"""
_id = deserialize(_id)
to_delete = self.collection.get({'_id': _id})
if to_delete:
deleted = to_delete.delete()
return Response(
response... | python | def delete(self, request, _id):
"""
Deletes the document with the given _id if it exists
"""
_id = deserialize(_id)
to_delete = self.collection.get({'_id': _id})
if to_delete:
deleted = to_delete.delete()
return Response(
response... | [
"def",
"delete",
"(",
"self",
",",
"request",
",",
"_id",
")",
":",
"_id",
"=",
"deserialize",
"(",
"_id",
")",
"to_delete",
"=",
"self",
".",
"collection",
".",
"get",
"(",
"{",
"'_id'",
":",
"_id",
"}",
")",
"if",
"to_delete",
":",
"deleted",
"="... | Deletes the document with the given _id if it exists | [
"Deletes",
"the",
"document",
"with",
"the",
"given",
"_id",
"if",
"it",
"exists"
] | 00f4487ded33254434bc51ff09d48c7a936bd465 | https://github.com/lvieirajr/mongorest/blob/00f4487ded33254434bc51ff09d48c7a936bd465/mongorest/resource.py#L184-L210 | train |
pydron/utwist | utwist/_utwist.py | with_reactor | def with_reactor(*dec_args, **dec_kwargs):
"""
Decorator for test functions that require a running reactor.
Can be used like this::
@with_reactor
def test_connect_to_server(self):
...
Or like this::
@with_reactor(timeout=10)
def test_connec... | python | def with_reactor(*dec_args, **dec_kwargs):
"""
Decorator for test functions that require a running reactor.
Can be used like this::
@with_reactor
def test_connect_to_server(self):
...
Or like this::
@with_reactor(timeout=10)
def test_connec... | [
"def",
"with_reactor",
"(",
"*",
"dec_args",
",",
"*",
"*",
"dec_kwargs",
")",
":",
"# This method takes care of the decorator protocol, it",
"# distinguishes between using the decorator with brackets",
"# and without brackets. It then calls `_twisted_test_sync()`.",
"if",
"len",
"("... | Decorator for test functions that require a running reactor.
Can be used like this::
@with_reactor
def test_connect_to_server(self):
...
Or like this::
@with_reactor(timeout=10)
def test_connect_to_server(self):
...
If the ... | [
"Decorator",
"for",
"test",
"functions",
"that",
"require",
"a",
"running",
"reactor",
".",
"Can",
"be",
"used",
"like",
"this",
"::"
] | 31670bdd7630874e2d24e663dbfce8b863b1f02e | https://github.com/pydron/utwist/blob/31670bdd7630874e2d24e663dbfce8b863b1f02e/utwist/_utwist.py#L33-L98 | train |
pydron/utwist | utwist/_utwist.py | _ensure_reactor_running | def _ensure_reactor_running():
"""
Starts the twisted reactor if it is not running already.
The reactor is started in a new daemon-thread.
Has to perform dirty hacks so that twisted can register
signals even if it is not running in the main-thread.
"""
if not reactor.running:
... | python | def _ensure_reactor_running():
"""
Starts the twisted reactor if it is not running already.
The reactor is started in a new daemon-thread.
Has to perform dirty hacks so that twisted can register
signals even if it is not running in the main-thread.
"""
if not reactor.running:
... | [
"def",
"_ensure_reactor_running",
"(",
")",
":",
"if",
"not",
"reactor",
".",
"running",
":",
"# Some of the `signal` API can only be called",
"# from the main-thread. So we do a dirty workaround.",
"#",
"# `signal.signal()` and `signal.wakeup_fd_capture()`",
"# are temporarily monkey-... | Starts the twisted reactor if it is not running already.
The reactor is started in a new daemon-thread.
Has to perform dirty hacks so that twisted can register
signals even if it is not running in the main-thread. | [
"Starts",
"the",
"twisted",
"reactor",
"if",
"it",
"is",
"not",
"running",
"already",
".",
"The",
"reactor",
"is",
"started",
"in",
"a",
"new",
"daemon",
"-",
"thread",
".",
"Has",
"to",
"perform",
"dirty",
"hacks",
"so",
"that",
"twisted",
"can",
"regis... | 31670bdd7630874e2d24e663dbfce8b863b1f02e | https://github.com/pydron/utwist/blob/31670bdd7630874e2d24e663dbfce8b863b1f02e/utwist/_utwist.py#L254-L308 | train |
pydron/utwist | utwist/_utwist.py | _timeoutDeferred | def _timeoutDeferred(deferred, timeout):
"""
Cancels the given deferred after the given time, if it has not yet callbacked/errbacked it.
"""
delayedCall = reactor.callLater(timeout, deferred.cancel)
def gotResult(result):
if delayedCall.active():
delayedCall.cancel()
retu... | python | def _timeoutDeferred(deferred, timeout):
"""
Cancels the given deferred after the given time, if it has not yet callbacked/errbacked it.
"""
delayedCall = reactor.callLater(timeout, deferred.cancel)
def gotResult(result):
if delayedCall.active():
delayedCall.cancel()
retu... | [
"def",
"_timeoutDeferred",
"(",
"deferred",
",",
"timeout",
")",
":",
"delayedCall",
"=",
"reactor",
".",
"callLater",
"(",
"timeout",
",",
"deferred",
".",
"cancel",
")",
"def",
"gotResult",
"(",
"result",
")",
":",
"if",
"delayedCall",
".",
"active",
"("... | Cancels the given deferred after the given time, if it has not yet callbacked/errbacked it. | [
"Cancels",
"the",
"given",
"deferred",
"after",
"the",
"given",
"time",
"if",
"it",
"has",
"not",
"yet",
"callbacked",
"/",
"errbacked",
"it",
"."
] | 31670bdd7630874e2d24e663dbfce8b863b1f02e | https://github.com/pydron/utwist/blob/31670bdd7630874e2d24e663dbfce8b863b1f02e/utwist/_utwist.py#L311-L320 | train |
MSchnei/pyprf_feature | pyprf_feature/analysis/find_prf_cpu.py | find_prf_cpu | def find_prf_cpu(idxPrc, aryFuncChnk, aryPrfTc, aryMdlParams, strVersion,
lgcXval, varNumXval, queOut, lgcRstr=None, lgcPrint=True):
"""
Find best fitting pRF model for voxel time course, using the CPU.
Parameters
----------
idxPrc : int
Process ID of the process calling th... | python | def find_prf_cpu(idxPrc, aryFuncChnk, aryPrfTc, aryMdlParams, strVersion,
lgcXval, varNumXval, queOut, lgcRstr=None, lgcPrint=True):
"""
Find best fitting pRF model for voxel time course, using the CPU.
Parameters
----------
idxPrc : int
Process ID of the process calling th... | [
"def",
"find_prf_cpu",
"(",
"idxPrc",
",",
"aryFuncChnk",
",",
"aryPrfTc",
",",
"aryMdlParams",
",",
"strVersion",
",",
"lgcXval",
",",
"varNumXval",
",",
"queOut",
",",
"lgcRstr",
"=",
"None",
",",
"lgcPrint",
"=",
"True",
")",
":",
"# Number of models in the... | Find best fitting pRF model for voxel time course, using the CPU.
Parameters
----------
idxPrc : int
Process ID of the process calling this function (for CPU
multi-threading). In GPU version, this parameter is 0 (just one thread
on CPU).
aryFunc : np.array
2D array with ... | [
"Find",
"best",
"fitting",
"pRF",
"model",
"for",
"voxel",
"time",
"course",
"using",
"the",
"CPU",
"."
] | 49004ede7ae1ddee07a30afe9ce3e2776750805c | https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/find_prf_cpu.py#L30-L465 | train |
mediawiki-utilities/python-mwreverts | mwreverts/db.py | check | def check(schema, rev_id, page_id=None, radius=defaults.RADIUS,
before=None, window=None):
"""
Checks the revert status of a revision. With this method, you can
determine whether an edit is a 'reverting' edit, was 'reverted' by another
edit and/or was 'reverted_to' by another edit.
:Para... | python | def check(schema, rev_id, page_id=None, radius=defaults.RADIUS,
before=None, window=None):
"""
Checks the revert status of a revision. With this method, you can
determine whether an edit is a 'reverting' edit, was 'reverted' by another
edit and/or was 'reverted_to' by another edit.
:Para... | [
"def",
"check",
"(",
"schema",
",",
"rev_id",
",",
"page_id",
"=",
"None",
",",
"radius",
"=",
"defaults",
".",
"RADIUS",
",",
"before",
"=",
"None",
",",
"window",
"=",
"None",
")",
":",
"rev_id",
"=",
"int",
"(",
"rev_id",
")",
"radius",
"=",
"in... | Checks the revert status of a revision. With this method, you can
determine whether an edit is a 'reverting' edit, was 'reverted' by another
edit and/or was 'reverted_to' by another edit.
:Parameters:
session : :class:`mwapi.Session`
An API session to make use of
rev_id : int
... | [
"Checks",
"the",
"revert",
"status",
"of",
"a",
"revision",
".",
"With",
"this",
"method",
"you",
"can",
"determine",
"whether",
"an",
"edit",
"is",
"a",
"reverting",
"edit",
"was",
"reverted",
"by",
"another",
"edit",
"and",
"/",
"or",
"was",
"reverted_to... | d379ac941e14e235ad82a48bd445a3dfa6cc022e | https://github.com/mediawiki-utilities/python-mwreverts/blob/d379ac941e14e235ad82a48bd445a3dfa6cc022e/mwreverts/db.py#L57-L153 | train |
mediawiki-utilities/python-mwreverts | mwreverts/db.py | check_archive | def check_archive(schema, rev_id, namespace=None, title=None, timestamp=None,
radius=defaults.RADIUS,
before=None, window=None):
"""
Checks the revert status of an archived revision (from a deleted page).
With this method, you can determine whether an edit is a 'reverting... | python | def check_archive(schema, rev_id, namespace=None, title=None, timestamp=None,
radius=defaults.RADIUS,
before=None, window=None):
"""
Checks the revert status of an archived revision (from a deleted page).
With this method, you can determine whether an edit is a 'reverting... | [
"def",
"check_archive",
"(",
"schema",
",",
"rev_id",
",",
"namespace",
"=",
"None",
",",
"title",
"=",
"None",
",",
"timestamp",
"=",
"None",
",",
"radius",
"=",
"defaults",
".",
"RADIUS",
",",
"before",
"=",
"None",
",",
"window",
"=",
"None",
")",
... | Checks the revert status of an archived revision (from a deleted page).
With this method, you can determine whether an edit is a 'reverting'
edit, was 'reverted' by another edit and/or was 'reverted_to' by
another edit.
:Parameters:
session : :class:`mwapi.Session`
An API session to... | [
"Checks",
"the",
"revert",
"status",
"of",
"an",
"archived",
"revision",
"(",
"from",
"a",
"deleted",
"page",
")",
".",
"With",
"this",
"method",
"you",
"can",
"determine",
"whether",
"an",
"edit",
"is",
"a",
"reverting",
"edit",
"was",
"reverted",
"by",
... | d379ac941e14e235ad82a48bd445a3dfa6cc022e | https://github.com/mediawiki-utilities/python-mwreverts/blob/d379ac941e14e235ad82a48bd445a3dfa6cc022e/mwreverts/db.py#L202-L282 | train |
genialis/resolwe-runtime-utils | resolwe_runtime_utils.py | _get_json | def _get_json(value):
"""Convert the given value to a JSON object."""
if hasattr(value, 'replace'):
value = value.replace('\n', ' ')
try:
return json.loads(value)
except json.JSONDecodeError:
# Escape double quotes.
if hasattr(value, 'replace'):
value = value.... | python | def _get_json(value):
"""Convert the given value to a JSON object."""
if hasattr(value, 'replace'):
value = value.replace('\n', ' ')
try:
return json.loads(value)
except json.JSONDecodeError:
# Escape double quotes.
if hasattr(value, 'replace'):
value = value.... | [
"def",
"_get_json",
"(",
"value",
")",
":",
"if",
"hasattr",
"(",
"value",
",",
"'replace'",
")",
":",
"value",
"=",
"value",
".",
"replace",
"(",
"'\\n'",
",",
"' '",
")",
"try",
":",
"return",
"json",
".",
"loads",
"(",
"value",
")",
"except",
"j... | Convert the given value to a JSON object. | [
"Convert",
"the",
"given",
"value",
"to",
"a",
"JSON",
"object",
"."
] | 5657d7cf981972a5259b9b475eae220479401001 | https://github.com/genialis/resolwe-runtime-utils/blob/5657d7cf981972a5259b9b475eae220479401001/resolwe_runtime_utils.py#L37-L48 | train |
genialis/resolwe-runtime-utils | resolwe_runtime_utils.py | save_list | def save_list(key, *values):
"""Convert the given list of parameters to a JSON object.
JSON object is of the form:
{ key: [values[0], values[1], ... ] },
where values represent the given list of parameters.
"""
return json.dumps({key: [_get_json(value) for value in values]}) | python | def save_list(key, *values):
"""Convert the given list of parameters to a JSON object.
JSON object is of the form:
{ key: [values[0], values[1], ... ] },
where values represent the given list of parameters.
"""
return json.dumps({key: [_get_json(value) for value in values]}) | [
"def",
"save_list",
"(",
"key",
",",
"*",
"values",
")",
":",
"return",
"json",
".",
"dumps",
"(",
"{",
"key",
":",
"[",
"_get_json",
"(",
"value",
")",
"for",
"value",
"in",
"values",
"]",
"}",
")"
] | Convert the given list of parameters to a JSON object.
JSON object is of the form:
{ key: [values[0], values[1], ... ] },
where values represent the given list of parameters. | [
"Convert",
"the",
"given",
"list",
"of",
"parameters",
"to",
"a",
"JSON",
"object",
"."
] | 5657d7cf981972a5259b9b475eae220479401001 | https://github.com/genialis/resolwe-runtime-utils/blob/5657d7cf981972a5259b9b475eae220479401001/resolwe_runtime_utils.py#L62-L70 | train |
genialis/resolwe-runtime-utils | resolwe_runtime_utils.py | save_file | def save_file(key, file_path, *refs):
"""Convert the given parameters to a special JSON object.
JSON object is of the form:
{ key: {"file": file_path}}, or
{ key: {"file": file_path, "refs": [refs[0], refs[1], ... ]}}
"""
if not os.path.isfile(file_path):
return error("Output '{}' set ... | python | def save_file(key, file_path, *refs):
"""Convert the given parameters to a special JSON object.
JSON object is of the form:
{ key: {"file": file_path}}, or
{ key: {"file": file_path, "refs": [refs[0], refs[1], ... ]}}
"""
if not os.path.isfile(file_path):
return error("Output '{}' set ... | [
"def",
"save_file",
"(",
"key",
",",
"file_path",
",",
"*",
"refs",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"isfile",
"(",
"file_path",
")",
":",
"return",
"error",
"(",
"\"Output '{}' set to a missing file: '{}'.\"",
".",
"format",
"(",
"key",
",",... | Convert the given parameters to a special JSON object.
JSON object is of the form:
{ key: {"file": file_path}}, or
{ key: {"file": file_path, "refs": [refs[0], refs[1], ... ]}} | [
"Convert",
"the",
"given",
"parameters",
"to",
"a",
"special",
"JSON",
"object",
"."
] | 5657d7cf981972a5259b9b475eae220479401001 | https://github.com/genialis/resolwe-runtime-utils/blob/5657d7cf981972a5259b9b475eae220479401001/resolwe_runtime_utils.py#L73-L98 | train |
genialis/resolwe-runtime-utils | resolwe_runtime_utils.py | save_file_list | def save_file_list(key, *files_refs):
"""Convert the given parameters to a special JSON object.
Each parameter is a file-refs specification of the form:
<file-path>:<reference1>,<reference2>, ...,
where the colon ':' and the list of references are optional.
JSON object is of the form:
{ key: {... | python | def save_file_list(key, *files_refs):
"""Convert the given parameters to a special JSON object.
Each parameter is a file-refs specification of the form:
<file-path>:<reference1>,<reference2>, ...,
where the colon ':' and the list of references are optional.
JSON object is of the form:
{ key: {... | [
"def",
"save_file_list",
"(",
"key",
",",
"*",
"files_refs",
")",
":",
"file_list",
"=",
"[",
"]",
"for",
"file_refs",
"in",
"files_refs",
":",
"if",
"':'",
"in",
"file_refs",
":",
"try",
":",
"file_name",
",",
"refs",
"=",
"file_refs",
".",
"split",
"... | Convert the given parameters to a special JSON object.
Each parameter is a file-refs specification of the form:
<file-path>:<reference1>,<reference2>, ...,
where the colon ':' and the list of references are optional.
JSON object is of the form:
{ key: {"file": file_path}}, or
{ key: {"file": f... | [
"Convert",
"the",
"given",
"parameters",
"to",
"a",
"special",
"JSON",
"object",
"."
] | 5657d7cf981972a5259b9b475eae220479401001 | https://github.com/genialis/resolwe-runtime-utils/blob/5657d7cf981972a5259b9b475eae220479401001/resolwe_runtime_utils.py#L101-L143 | train |
genialis/resolwe-runtime-utils | resolwe_runtime_utils.py | save_dir | def save_dir(key, dir_path, *refs):
"""Convert the given parameters to a special JSON object.
JSON object is of the form:
{ key: {"dir": dir_path}}, or
{ key: {"dir": dir_path, "refs": [refs[0], refs[1], ... ]}}
"""
if not os.path.isdir(dir_path):
return error(
"Output '{}'... | python | def save_dir(key, dir_path, *refs):
"""Convert the given parameters to a special JSON object.
JSON object is of the form:
{ key: {"dir": dir_path}}, or
{ key: {"dir": dir_path, "refs": [refs[0], refs[1], ... ]}}
"""
if not os.path.isdir(dir_path):
return error(
"Output '{}'... | [
"def",
"save_dir",
"(",
"key",
",",
"dir_path",
",",
"*",
"refs",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"isdir",
"(",
"dir_path",
")",
":",
"return",
"error",
"(",
"\"Output '{}' set to a missing directory: '{}'.\"",
".",
"format",
"(",
"key",
","... | Convert the given parameters to a special JSON object.
JSON object is of the form:
{ key: {"dir": dir_path}}, or
{ key: {"dir": dir_path, "refs": [refs[0], refs[1], ... ]}} | [
"Convert",
"the",
"given",
"parameters",
"to",
"a",
"special",
"JSON",
"object",
"."
] | 5657d7cf981972a5259b9b475eae220479401001 | https://github.com/genialis/resolwe-runtime-utils/blob/5657d7cf981972a5259b9b475eae220479401001/resolwe_runtime_utils.py#L146-L173 | train |
genialis/resolwe-runtime-utils | resolwe_runtime_utils.py | save_dir_list | def save_dir_list(key, *dirs_refs):
"""Convert the given parameters to a special JSON object.
Each parameter is a dir-refs specification of the form:
<dir-path>:<reference1>,<reference2>, ...,
where the colon ':' and the list of references are optional.
JSON object is of the form:
{ key: {"dir... | python | def save_dir_list(key, *dirs_refs):
"""Convert the given parameters to a special JSON object.
Each parameter is a dir-refs specification of the form:
<dir-path>:<reference1>,<reference2>, ...,
where the colon ':' and the list of references are optional.
JSON object is of the form:
{ key: {"dir... | [
"def",
"save_dir_list",
"(",
"key",
",",
"*",
"dirs_refs",
")",
":",
"dir_list",
"=",
"[",
"]",
"for",
"dir_refs",
"in",
"dirs_refs",
":",
"if",
"':'",
"in",
"dir_refs",
":",
"try",
":",
"dir_path",
",",
"refs",
"=",
"dir_refs",
".",
"split",
"(",
"'... | Convert the given parameters to a special JSON object.
Each parameter is a dir-refs specification of the form:
<dir-path>:<reference1>,<reference2>, ...,
where the colon ':' and the list of references are optional.
JSON object is of the form:
{ key: {"dir": dir_path}}, or
{ key: {"dir": dir_pa... | [
"Convert",
"the",
"given",
"parameters",
"to",
"a",
"special",
"JSON",
"object",
"."
] | 5657d7cf981972a5259b9b475eae220479401001 | https://github.com/genialis/resolwe-runtime-utils/blob/5657d7cf981972a5259b9b475eae220479401001/resolwe_runtime_utils.py#L176-L218 | train |
genialis/resolwe-runtime-utils | resolwe_runtime_utils.py | progress | def progress(progress):
"""Convert given progress to a JSON object.
Check that progress can be represented as float between 0 and 1 and
return it in JSON of the form:
{"proc.progress": progress}
"""
if isinstance(progress, int) or isinstance(progress, float):
progress = float(prog... | python | def progress(progress):
"""Convert given progress to a JSON object.
Check that progress can be represented as float between 0 and 1 and
return it in JSON of the form:
{"proc.progress": progress}
"""
if isinstance(progress, int) or isinstance(progress, float):
progress = float(prog... | [
"def",
"progress",
"(",
"progress",
")",
":",
"if",
"isinstance",
"(",
"progress",
",",
"int",
")",
"or",
"isinstance",
"(",
"progress",
",",
"float",
")",
":",
"progress",
"=",
"float",
"(",
"progress",
")",
"else",
":",
"try",
":",
"progress",
"=",
... | Convert given progress to a JSON object.
Check that progress can be represented as float between 0 and 1 and
return it in JSON of the form:
{"proc.progress": progress} | [
"Convert",
"given",
"progress",
"to",
"a",
"JSON",
"object",
"."
] | 5657d7cf981972a5259b9b475eae220479401001 | https://github.com/genialis/resolwe-runtime-utils/blob/5657d7cf981972a5259b9b475eae220479401001/resolwe_runtime_utils.py#L236-L256 | train |
genialis/resolwe-runtime-utils | resolwe_runtime_utils.py | checkrc | def checkrc(rc, *args):
"""Check if ``rc`` (return code) meets requirements.
Check if ``rc`` is 0 or is in ``args`` list that contains
acceptable return codes.
Last argument of ``args`` can optionally be error message that
is printed if ``rc`` doesn't meet requirements.
Output is JSON of the f... | python | def checkrc(rc, *args):
"""Check if ``rc`` (return code) meets requirements.
Check if ``rc`` is 0 or is in ``args`` list that contains
acceptable return codes.
Last argument of ``args`` can optionally be error message that
is printed if ``rc`` doesn't meet requirements.
Output is JSON of the f... | [
"def",
"checkrc",
"(",
"rc",
",",
"*",
"args",
")",
":",
"try",
":",
"rc",
"=",
"int",
"(",
"rc",
")",
"except",
"(",
"TypeError",
",",
"ValueError",
")",
":",
"return",
"error",
"(",
"\"Invalid return code: '{}'.\"",
".",
"format",
"(",
"rc",
")",
"... | Check if ``rc`` (return code) meets requirements.
Check if ``rc`` is 0 or is in ``args`` list that contains
acceptable return codes.
Last argument of ``args`` can optionally be error message that
is printed if ``rc`` doesn't meet requirements.
Output is JSON of the form:
{"proc.rc": <rc>,... | [
"Check",
"if",
"rc",
"(",
"return",
"code",
")",
"meets",
"requirements",
"."
] | 5657d7cf981972a5259b9b475eae220479401001 | https://github.com/genialis/resolwe-runtime-utils/blob/5657d7cf981972a5259b9b475eae220479401001/resolwe_runtime_utils.py#L259-L302 | train |
genialis/resolwe-runtime-utils | resolwe_runtime_utils.py | export_file | def export_file(file_path):
"""Prepend the given parameter with ``export``"""
if not os.path.isfile(file_path):
return error("Referenced file does not exist: '{}'.".format(file_path))
return "export {}".format(file_path) | python | def export_file(file_path):
"""Prepend the given parameter with ``export``"""
if not os.path.isfile(file_path):
return error("Referenced file does not exist: '{}'.".format(file_path))
return "export {}".format(file_path) | [
"def",
"export_file",
"(",
"file_path",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"isfile",
"(",
"file_path",
")",
":",
"return",
"error",
"(",
"\"Referenced file does not exist: '{}'.\"",
".",
"format",
"(",
"file_path",
")",
")",
"return",
"\"export {}\... | Prepend the given parameter with ``export`` | [
"Prepend",
"the",
"given",
"parameter",
"with",
"export"
] | 5657d7cf981972a5259b9b475eae220479401001 | https://github.com/genialis/resolwe-runtime-utils/blob/5657d7cf981972a5259b9b475eae220479401001/resolwe_runtime_utils.py#L305-L311 | train |
genialis/resolwe-runtime-utils | resolwe_runtime_utils.py | import_file | def import_file(
src,
file_name,
imported_format=ImportedFormat.BOTH,
progress_from=0.0,
progress_to=None,
):
"""Import file to working directory.
:param src: Source file path or URL
:param file_name: Source file name
:param imported_format: Import file format (extracted, compressed... | python | def import_file(
src,
file_name,
imported_format=ImportedFormat.BOTH,
progress_from=0.0,
progress_to=None,
):
"""Import file to working directory.
:param src: Source file path or URL
:param file_name: Source file name
:param imported_format: Import file format (extracted, compressed... | [
"def",
"import_file",
"(",
"src",
",",
"file_name",
",",
"imported_format",
"=",
"ImportedFormat",
".",
"BOTH",
",",
"progress_from",
"=",
"0.0",
",",
"progress_to",
"=",
"None",
",",
")",
":",
"if",
"progress_to",
"is",
"not",
"None",
":",
"if",
"not",
... | Import file to working directory.
:param src: Source file path or URL
:param file_name: Source file name
:param imported_format: Import file format (extracted, compressed or both)
:param progress_from: Initial progress value
:param progress_to: Final progress value
:return: Destination file pat... | [
"Import",
"file",
"to",
"working",
"directory",
"."
] | 5657d7cf981972a5259b9b475eae220479401001 | https://github.com/genialis/resolwe-runtime-utils/blob/5657d7cf981972a5259b9b475eae220479401001/resolwe_runtime_utils.py#L325-L530 | train |
MSchnei/pyprf_feature | pyprf_feature/analysis/old/pRF_utils.py | loadNiiData | def loadNiiData(lstNiiFls,
strPathNiiMask=None,
strPathNiiFunc=None):
"""load nii data.
Parameters
----------
lstNiiFls : list, list of str with nii file names
strPathNiiMask : str, path to nii file with mask (optional)
strPathNiiFunc : str, p... | python | def loadNiiData(lstNiiFls,
strPathNiiMask=None,
strPathNiiFunc=None):
"""load nii data.
Parameters
----------
lstNiiFls : list, list of str with nii file names
strPathNiiMask : str, path to nii file with mask (optional)
strPathNiiFunc : str, p... | [
"def",
"loadNiiData",
"(",
"lstNiiFls",
",",
"strPathNiiMask",
"=",
"None",
",",
"strPathNiiFunc",
"=",
"None",
")",
":",
"print",
"(",
"'---------Loading nii data'",
")",
"# check whether a mask is available",
"if",
"strPathNiiMask",
"is",
"not",
"None",
":",
"ary... | load nii data.
Parameters
----------
lstNiiFls : list, list of str with nii file names
strPathNiiMask : str, path to nii file with mask (optional)
strPathNiiFunc : str, parent path to nii files (optional)
Returns
-------
aryFunc : np.array
Nii... | [
"load",
"nii",
"data",
"."
] | 49004ede7ae1ddee07a30afe9ce3e2776750805c | https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/old/pRF_utils.py#L29-L67 | train |
MSchnei/pyprf_feature | pyprf_feature/analysis/old/pRF_utils.py | calcR2 | def calcR2(predTst, yTest, axis=0):
"""calculate coefficient of determination. Assumes that axis=0 is time
Parameters
----------
predTst : np.array, predicted reponse for yTest
yTest : np.array, acxtually observed response for yTest
Returns
-------
aryFunc : ... | python | def calcR2(predTst, yTest, axis=0):
"""calculate coefficient of determination. Assumes that axis=0 is time
Parameters
----------
predTst : np.array, predicted reponse for yTest
yTest : np.array, acxtually observed response for yTest
Returns
-------
aryFunc : ... | [
"def",
"calcR2",
"(",
"predTst",
",",
"yTest",
",",
"axis",
"=",
"0",
")",
":",
"rss",
"=",
"np",
".",
"sum",
"(",
"(",
"yTest",
"-",
"predTst",
")",
"**",
"2",
",",
"axis",
"=",
"axis",
")",
"tss",
"=",
"np",
".",
"sum",
"(",
"(",
"yTest",
... | calculate coefficient of determination. Assumes that axis=0 is time
Parameters
----------
predTst : np.array, predicted reponse for yTest
yTest : np.array, acxtually observed response for yTest
Returns
-------
aryFunc : np.array
R2 | [
"calculate",
"coefficient",
"of",
"determination",
".",
"Assumes",
"that",
"axis",
"=",
"0",
"is",
"time"
] | 49004ede7ae1ddee07a30afe9ce3e2776750805c | https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/old/pRF_utils.py#L90-L105 | train |
MSchnei/pyprf_feature | pyprf_feature/analysis/old/pRF_utils.py | calcFstats | def calcFstats(predTst, yTest, p, axis=0):
"""calculate coefficient of determination. Assumes that axis=0 is time
Parameters
----------
predTst : np.array, predicted reponse for yTest
yTest : np.array, acxtually observed response for yTest
p: float, number of predictors
... | python | def calcFstats(predTst, yTest, p, axis=0):
"""calculate coefficient of determination. Assumes that axis=0 is time
Parameters
----------
predTst : np.array, predicted reponse for yTest
yTest : np.array, acxtually observed response for yTest
p: float, number of predictors
... | [
"def",
"calcFstats",
"(",
"predTst",
",",
"yTest",
",",
"p",
",",
"axis",
"=",
"0",
")",
":",
"rss",
"=",
"np",
".",
"sum",
"(",
"(",
"yTest",
"-",
"predTst",
")",
"**",
"2",
",",
"axis",
"=",
"axis",
")",
"tss",
"=",
"np",
".",
"sum",
"(",
... | calculate coefficient of determination. Assumes that axis=0 is time
Parameters
----------
predTst : np.array, predicted reponse for yTest
yTest : np.array, acxtually observed response for yTest
p: float, number of predictors
Returns
-------
aryFunc : np.a... | [
"calculate",
"coefficient",
"of",
"determination",
".",
"Assumes",
"that",
"axis",
"=",
"0",
"is",
"time"
] | 49004ede7ae1ddee07a30afe9ce3e2776750805c | https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/old/pRF_utils.py#L108-L132 | train |
MSchnei/pyprf_feature | pyprf_feature/analysis/old/pRF_utils.py | calcMse | def calcMse(predTst, yTest, axis=0):
"""calculate mean squared error. Assumes that axis=0 is time
Parameters
----------
predTst : np.array, predicted reponse for yTest
yTest : np.array, acxtually observed response for yTest
Returns
-------
aryFunc : np.array
... | python | def calcMse(predTst, yTest, axis=0):
"""calculate mean squared error. Assumes that axis=0 is time
Parameters
----------
predTst : np.array, predicted reponse for yTest
yTest : np.array, acxtually observed response for yTest
Returns
-------
aryFunc : np.array
... | [
"def",
"calcMse",
"(",
"predTst",
",",
"yTest",
",",
"axis",
"=",
"0",
")",
":",
"return",
"np",
".",
"mean",
"(",
"(",
"yTest",
"-",
"predTst",
")",
"**",
"2",
",",
"axis",
"=",
"axis",
")"
] | calculate mean squared error. Assumes that axis=0 is time
Parameters
----------
predTst : np.array, predicted reponse for yTest
yTest : np.array, acxtually observed response for yTest
Returns
-------
aryFunc : np.array
MSE | [
"calculate",
"mean",
"squared",
"error",
".",
"Assumes",
"that",
"axis",
"=",
"0",
"is",
"time"
] | 49004ede7ae1ddee07a30afe9ce3e2776750805c | https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/old/pRF_utils.py#L135-L147 | train |
askedrelic/journal | journal/parse.py | Parse.n_day | def n_day(date_string):
"""
date_string string in format "(number|a) day(s) ago"
"""
today = datetime.date.today()
match = re.match(r'(\d{1,3}|a) days? ago', date_string)
groups = match.groups()
if groups:
decrement = groups[0]
if decrement... | python | def n_day(date_string):
"""
date_string string in format "(number|a) day(s) ago"
"""
today = datetime.date.today()
match = re.match(r'(\d{1,3}|a) days? ago', date_string)
groups = match.groups()
if groups:
decrement = groups[0]
if decrement... | [
"def",
"n_day",
"(",
"date_string",
")",
":",
"today",
"=",
"datetime",
".",
"date",
".",
"today",
"(",
")",
"match",
"=",
"re",
".",
"match",
"(",
"r'(\\d{1,3}|a) days? ago'",
",",
"date_string",
")",
"groups",
"=",
"match",
".",
"groups",
"(",
")",
"... | date_string string in format "(number|a) day(s) ago" | [
"date_string",
"string",
"in",
"format",
"(",
"number|a",
")",
"day",
"(",
"s",
")",
"ago"
] | 848b8ec67ed124ec112926211ebeccbc8d11f2b0 | https://github.com/askedrelic/journal/blob/848b8ec67ed124ec112926211ebeccbc8d11f2b0/journal/parse.py#L27-L39 | train |
mediawiki-utilities/python-mwreverts | mwreverts/functions.py | detect | def detect(checksum_revisions, radius=defaults.RADIUS):
"""
Detects reverts that occur in a sequence of revisions. Note that,
`revision` data meta will simply be returned in the case of a revert.
This function serves as a convenience wrapper around calls to
:class:`mwreverts.Detector`'s :func:`~mw... | python | def detect(checksum_revisions, radius=defaults.RADIUS):
"""
Detects reverts that occur in a sequence of revisions. Note that,
`revision` data meta will simply be returned in the case of a revert.
This function serves as a convenience wrapper around calls to
:class:`mwreverts.Detector`'s :func:`~mw... | [
"def",
"detect",
"(",
"checksum_revisions",
",",
"radius",
"=",
"defaults",
".",
"RADIUS",
")",
":",
"revert_detector",
"=",
"Detector",
"(",
"radius",
")",
"for",
"checksum",
",",
"revision",
"in",
"checksum_revisions",
":",
"revert",
"=",
"revert_detector",
... | Detects reverts that occur in a sequence of revisions. Note that,
`revision` data meta will simply be returned in the case of a revert.
This function serves as a convenience wrapper around calls to
:class:`mwreverts.Detector`'s :func:`~mwreverts.Detector.process`
method.
:Parameters:
chec... | [
"Detects",
"reverts",
"that",
"occur",
"in",
"a",
"sequence",
"of",
"revisions",
".",
"Note",
"that",
"revision",
"data",
"meta",
"will",
"simply",
"be",
"returned",
"in",
"the",
"case",
"of",
"a",
"revert",
"."
] | d379ac941e14e235ad82a48bd445a3dfa6cc022e | https://github.com/mediawiki-utilities/python-mwreverts/blob/d379ac941e14e235ad82a48bd445a3dfa6cc022e/mwreverts/functions.py#L5-L46 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.getChargeInfo | def getChargeInfo(self, CorpNum, ItemCode, UserID=None):
""" 과금정보 확인
args
CorpNum : 회원 사업자번호
ItemCode : 전자명세서 종류코드
UserID : 팝빌 회원아이디
return
과금정보 객체
raise
PopbillException
"""
... | python | def getChargeInfo(self, CorpNum, ItemCode, UserID=None):
""" 과금정보 확인
args
CorpNum : 회원 사업자번호
ItemCode : 전자명세서 종류코드
UserID : 팝빌 회원아이디
return
과금정보 객체
raise
PopbillException
"""
... | [
"def",
"getChargeInfo",
"(",
"self",
",",
"CorpNum",
",",
"ItemCode",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"ItemCode",
"==",
"None",
"or",
"ItemCode",
"==",
"''",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"명세서 종류 코드가 입력되지 않았습니다.\"... | 과금정보 확인
args
CorpNum : 회원 사업자번호
ItemCode : 전자명세서 종류코드
UserID : 팝빌 회원아이디
return
과금정보 객체
raise
PopbillException | [
"과금정보",
"확인",
"args",
"CorpNum",
":",
"회원",
"사업자번호",
"ItemCode",
":",
"전자명세서",
"종류코드",
"UserID",
":",
"팝빌",
"회원아이디",
"return",
"과금정보",
"객체",
"raise",
"PopbillException"
] | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L31-L45 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.getUnitCost | def getUnitCost(self, CorpNum, ItemCode):
""" 전자명세서 발행단가 확인.
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
return
... | python | def getUnitCost(self, CorpNum, ItemCode):
""" 전자명세서 발행단가 확인.
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
return
... | [
"def",
"getUnitCost",
"(",
"self",
",",
"CorpNum",
",",
"ItemCode",
")",
":",
"if",
"ItemCode",
"==",
"None",
"or",
"ItemCode",
"==",
"\"\"",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"명세서 종류 코드가 입력되지 않았습니다.\")\r",
"",
"result",
"=",
"se... | 전자명세서 발행단가 확인.
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
return
발행단가 by float
raise
Pop... | [
"전자명세서",
"발행단가",
"확인",
".",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"ItemCode",
":",
"명세서",
"종류",
"코드",
"[",
"121",
"-",
"거래명세서",
"]",
"[",
"122",
"-",
"청구서",
"]",
"[",
"123",
"-",
"견적서",
"]",
"[",
"124",
"-",
"발주서",
"]",
"[",
"125",
"-",
"입... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L64-L80 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.FAXSend | def FAXSend(self, CorpNum, statement, SendNum, ReceiveNum, UserID=None):
""" 선팩스 전송
args
CorpNum : 팝빌회원 사업자번호
statement : 전자명세서 객체
SendNum : 팩스 발신번호
ReceiveNum : 팩스 수신번호
UserID : 팝빌회원 아이디
return
... | python | def FAXSend(self, CorpNum, statement, SendNum, ReceiveNum, UserID=None):
""" 선팩스 전송
args
CorpNum : 팝빌회원 사업자번호
statement : 전자명세서 객체
SendNum : 팩스 발신번호
ReceiveNum : 팩스 수신번호
UserID : 팝빌회원 아이디
return
... | [
"def",
"FAXSend",
"(",
"self",
",",
"CorpNum",
",",
"statement",
",",
"SendNum",
",",
"ReceiveNum",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"statement",
"==",
"None",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"전송할 전자명세서 정보가 입력되지 않았습니... | 선팩스 전송
args
CorpNum : 팝빌회원 사업자번호
statement : 전자명세서 객체
SendNum : 팩스 발신번호
ReceiveNum : 팩스 수신번호
UserID : 팝빌회원 아이디
return
팩스전송 접수번호(receiptNum)
raise
PopbillException | [
"선팩스",
"전송",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"statement",
":",
"전자명세서",
"객체",
"SendNum",
":",
"팩스",
"발신번호",
"ReceiveNum",
":",
"팩스",
"수신번호",
"UserID",
":",
"팝빌회원",
"아이디",
"return",
"팩스전송",
"접수번호",
"(",
"receiptNum",
")",
"raise",
"PopbillException... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L109-L134 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.registIssue | def registIssue(self, CorpNum, statement, Memo=None, UserID=None):
""" 즉시발행
args
CorpNum : 팝빌회원 사업자번호
statement : 등록할 전자명세서 object. made with Statement(...)
Memo : 즉시발행메모
UserID : 팝빌회원 아이디
return
처리... | python | def registIssue(self, CorpNum, statement, Memo=None, UserID=None):
""" 즉시발행
args
CorpNum : 팝빌회원 사업자번호
statement : 등록할 전자명세서 object. made with Statement(...)
Memo : 즉시발행메모
UserID : 팝빌회원 아이디
return
처리... | [
"def",
"registIssue",
"(",
"self",
",",
"CorpNum",
",",
"statement",
",",
"Memo",
"=",
"None",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"statement",
"==",
"None",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"등록할 전자명세서 정보가 입력되지 않았습니다.\")... | 즉시발행
args
CorpNum : 팝빌회원 사업자번호
statement : 등록할 전자명세서 object. made with Statement(...)
Memo : 즉시발행메모
UserID : 팝빌회원 아이디
return
처리결과. consist of code and message
raise
PopbillExcep... | [
"즉시발행",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"statement",
":",
"등록할",
"전자명세서",
"object",
".",
"made",
"with",
"Statement",
"(",
"...",
")",
"Memo",
":",
"즉시발행메모",
"UserID",
":",
"팝빌회원",
"아이디",
"return",
"처리결과",
".",
"consist",
"of",
"code",
"and",
... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L136-L157 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.register | def register(self, CorpNum, statement, UserID=None):
""" 임시저장
args
CorpNum : 팝빌회원 사업자번호
statement : 등록할 전자명세서 object. made with Statement(...)
UserID : 팝빌회원 아이디
return
처리결과. consist of code and message
ra... | python | def register(self, CorpNum, statement, UserID=None):
""" 임시저장
args
CorpNum : 팝빌회원 사업자번호
statement : 등록할 전자명세서 object. made with Statement(...)
UserID : 팝빌회원 아이디
return
처리결과. consist of code and message
ra... | [
"def",
"register",
"(",
"self",
",",
"CorpNum",
",",
"statement",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"statement",
"==",
"None",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"등록할 전자명세서 정보가 입력되지 않았습니다.\")\r",
"",
"postData",
"=",
"se... | 임시저장
args
CorpNum : 팝빌회원 사업자번호
statement : 등록할 전자명세서 object. made with Statement(...)
UserID : 팝빌회원 아이디
return
처리결과. consist of code and message
raise
PopbillException | [
"임시저장",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"statement",
":",
"등록할",
"전자명세서",
"object",
".",
"made",
"with",
"Statement",
"(",
"...",
")",
"UserID",
":",
"팝빌회원",
"아이디",
"return",
"처리결과",
".",
"consist",
"of",
"code",
"and",
"message",
"raise",
"Popb... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L159-L175 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.update | def update(self, CorpNum, ItemCode, MgtKey, Statement, UserID=None):
""" 임시저장
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
M... | python | def update(self, CorpNum, ItemCode, MgtKey, Statement, UserID=None):
""" 임시저장
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
M... | [
"def",
"update",
"(",
"self",
",",
"CorpNum",
",",
"ItemCode",
",",
"MgtKey",
",",
"Statement",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"Statement",
"==",
"None",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"등록할 전자명세서 정보가 입력되지 않았습니다.\"... | 임시저장
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문서관리번호
Statement : 등록할 전자명세서 object. made with Statem... | [
"임시저장",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"ItemCode",
":",
"명세서",
"종류",
"코드",
"[",
"121",
"-",
"거래명세서",
"]",
"[",
"122",
"-",
"청구서",
"]",
"[",
"123",
"-",
"견적서",
"]",
"[",
"124",
"-",
"발주서",
"]",
"[",
"125",
"-",
"입금표",
"]",
"[",
"126"... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L177-L202 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.issue | def issue(self, CorpNum, ItemCode, MgtKey, Memo=None, EmailSubject=None, UserID=None):
""" 발행
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
... | python | def issue(self, CorpNum, ItemCode, MgtKey, Memo=None, EmailSubject=None, UserID=None):
""" 발행
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
... | [
"def",
"issue",
"(",
"self",
",",
"CorpNum",
",",
"ItemCode",
",",
"MgtKey",
",",
"Memo",
"=",
"None",
",",
"EmailSubject",
"=",
"None",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"MgtKey",
"==",
"None",
"or",
"MgtKey",
"==",
"\"\"",
":",
"raise",
... | 발행
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문서관리번호
Memo : 처리메모
EmailSubject : 발행메일... | [
"발행",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"ItemCode",
":",
"명세서",
"종류",
"코드",
"[",
"121",
"-",
"거래명세서",
"]",
"[",
"122",
"-",
"청구서",
"]",
"[",
"123",
"-",
"견적서",
"]",
"[",
"124",
"-",
"발주서",
"]",
"[",
"125",
"-",
"입금표",
"]",
"[",
"126",
... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L204-L235 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.cancel | def cancel(self, CorpNum, ItemCode, MgtKey, Memo=None, UserID=None):
""" 발행취소
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
M... | python | def cancel(self, CorpNum, ItemCode, MgtKey, Memo=None, UserID=None):
""" 발행취소
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
M... | [
"def",
"cancel",
"(",
"self",
",",
"CorpNum",
",",
"ItemCode",
",",
"MgtKey",
",",
"Memo",
"=",
"None",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"MgtKey",
"==",
"None",
"or",
"MgtKey",
"==",
"\"\"",
":",
"raise",
"PopbillException",
"(",
"-",
"999... | 발행취소
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문서관리번호
Memo : 처리메모
UserID : 팝빌회원 아이디... | [
"발행취소",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"ItemCode",
":",
"명세서",
"종류",
"코드",
"[",
"121",
"-",
"거래명세서",
"]",
"[",
"122",
"-",
"청구서",
"]",
"[",
"123",
"-",
"견적서",
"]",
"[",
"124",
"-",
"발주서",
"]",
"[",
"125",
"-",
"입금표",
"]",
"[",
"126"... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L237-L263 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.delete | def delete(self, CorpNum, ItemCode, MgtKey, UserID=None):
""" 삭제
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문... | python | def delete(self, CorpNum, ItemCode, MgtKey, UserID=None):
""" 삭제
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문... | [
"def",
"delete",
"(",
"self",
",",
"CorpNum",
",",
"ItemCode",
",",
"MgtKey",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"MgtKey",
"==",
"None",
"or",
"MgtKey",
"==",
"\"\"",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"관리번호가 입력되지 않았습... | 삭제
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문서관리번호
UserID : 팝빌회원 아이디
return
... | [
"삭제",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"ItemCode",
":",
"명세서",
"종류",
"코드",
"[",
"121",
"-",
"거래명세서",
"]",
"[",
"122",
"-",
"청구서",
"]",
"[",
"123",
"-",
"견적서",
"]",
"[",
"124",
"-",
"발주서",
"]",
"[",
"125",
"-",
"입금표",
"]",
"[",
"126",
... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L265-L284 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.search | def search(self, CorpNum, DType, SDate, EDate, State, ItemCode, Page, PerPage, Order, UserID=None, QString=None):
""" 목록 조회
args
CorpNum : 팝빌회원 사업자번호
DType : 일자유형, R-등록일시, W-작성일자, I-발행일시 중 택 1
SDate : 시작일자, 표시형식(yyyyMMdd)
EDate : ... | python | def search(self, CorpNum, DType, SDate, EDate, State, ItemCode, Page, PerPage, Order, UserID=None, QString=None):
""" 목록 조회
args
CorpNum : 팝빌회원 사업자번호
DType : 일자유형, R-등록일시, W-작성일자, I-발행일시 중 택 1
SDate : 시작일자, 표시형식(yyyyMMdd)
EDate : ... | [
"def",
"search",
"(",
"self",
",",
"CorpNum",
",",
"DType",
",",
"SDate",
",",
"EDate",
",",
"State",
",",
"ItemCode",
",",
"Page",
",",
"PerPage",
",",
"Order",
",",
"UserID",
"=",
"None",
",",
"QString",
"=",
"None",
")",
":",
"if",
"DType",
"=="... | 목록 조회
args
CorpNum : 팝빌회원 사업자번호
DType : 일자유형, R-등록일시, W-작성일자, I-발행일시 중 택 1
SDate : 시작일자, 표시형식(yyyyMMdd)
EDate : 종료일자, 표시형식(yyyyMMdd)
State : 상태코드, 2,3번째 자리에 와일드카드(*) 사용가능
ItemCode : 명세서 종류코드 배열, 121-명세서, 1... | [
"목록",
"조회",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"DType",
":",
"일자유형",
"R",
"-",
"등록일시",
"W",
"-",
"작성일자",
"I",
"-",
"발행일시",
"중",
"택",
"1",
"SDate",
":",
"시작일자",
"표시형식",
"(",
"yyyyMMdd",
")",
"EDate",
":",
"종료일자",
"표시형식",
"(",
"yyyyMMdd",
")"... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L286-L324 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.getInfo | def getInfo(self, CorpNum, ItemCode, MgtKey):
""" 상태/요약 정보 확인
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문서관리... | python | def getInfo(self, CorpNum, ItemCode, MgtKey):
""" 상태/요약 정보 확인
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문서관리... | [
"def",
"getInfo",
"(",
"self",
",",
"CorpNum",
",",
"ItemCode",
",",
"MgtKey",
")",
":",
"if",
"MgtKey",
"==",
"None",
"or",
"MgtKey",
"==",
"\"\"",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"관리번호가 입력되지 않았습니다.\")\r",
"",
"if",
"ItemCod... | 상태/요약 정보 확인
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문서관리번호
return
문서 상태/요약정보 object
... | [
"상태",
"/",
"요약",
"정보",
"확인",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"ItemCode",
":",
"명세서",
"종류",
"코드",
"[",
"121",
"-",
"거래명세서",
"]",
"[",
"122",
"-",
"청구서",
"]",
"[",
"123",
"-",
"견적서",
"]",
"[",
"124",
"-",
"발주서",
"]",
"[",
"125",
"-",
... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L326-L344 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.getDetailInfo | def getDetailInfo(self, CorpNum, ItemCode, MgtKey):
""" 전자명세서 상세정보 확인
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : ... | python | def getDetailInfo(self, CorpNum, ItemCode, MgtKey):
""" 전자명세서 상세정보 확인
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : ... | [
"def",
"getDetailInfo",
"(",
"self",
",",
"CorpNum",
",",
"ItemCode",
",",
"MgtKey",
")",
":",
"if",
"MgtKey",
"==",
"None",
"or",
"MgtKey",
"==",
"\"\"",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"관리번호가 입력되지 않았습니다.\")\r",
"",
"if",
"I... | 전자명세서 상세정보 확인
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문서관리번호
return
문서 상세정보 object
... | [
"전자명세서",
"상세정보",
"확인",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"ItemCode",
":",
"명세서",
"종류",
"코드",
"[",
"121",
"-",
"거래명세서",
"]",
"[",
"122",
"-",
"청구서",
"]",
"[",
"123",
"-",
"견적서",
"]",
"[",
"124",
"-",
"발주서",
"]",
"[",
"125",
"-",
"입금표",
... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L366-L384 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.sendSMS | def sendSMS(self, CorpNum, ItemCode, MgtKey, Sender, Receiver, Contents, UserID=None):
""" 알림문자 전송
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수... | python | def sendSMS(self, CorpNum, ItemCode, MgtKey, Sender, Receiver, Contents, UserID=None):
""" 알림문자 전송
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수... | [
"def",
"sendSMS",
"(",
"self",
",",
"CorpNum",
",",
"ItemCode",
",",
"MgtKey",
",",
"Sender",
",",
"Receiver",
",",
"Contents",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"MgtKey",
"==",
"None",
"or",
"MgtKey",
"==",
"\"\"",
":",
"raise",
"PopbillExce... | 알림문자 전송
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문서관리번호
Sender : 발신번호
Receiver : 수... | [
"알림문자",
"전송",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"ItemCode",
":",
"명세서",
"종류",
"코드",
"[",
"121",
"-",
"거래명세서",
"]",
"[",
"122",
"-",
"청구서",
"]",
"[",
"123",
"-",
"견적서",
"]",
"[",
"124",
"-",
"발주서",
"]",
"[",
"125",
"-",
"입금표",
"]",
"[",... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L410-L439 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.getLogs | def getLogs(self, CorpNum, ItemCode, MgtKey):
""" 전자명세서 문서이력 목록 확인
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너... | python | def getLogs(self, CorpNum, ItemCode, MgtKey):
""" 전자명세서 문서이력 목록 확인
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너... | [
"def",
"getLogs",
"(",
"self",
",",
"CorpNum",
",",
"ItemCode",
",",
"MgtKey",
")",
":",
"if",
"MgtKey",
"==",
"None",
"or",
"MgtKey",
"==",
"\"\"",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"관리번호가 입력되지 않았습니다.\")\r",
"",
"if",
"ItemCod... | 전자명세서 문서이력 목록 확인
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문서관리번호
return
문서이력 정보 목록 as ... | [
"전자명세서",
"문서이력",
"목록",
"확인",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"ItemCode",
":",
"명세서",
"종류",
"코드",
"[",
"121",
"-",
"거래명세서",
"]",
"[",
"122",
"-",
"청구서",
"]",
"[",
"123",
"-",
"견적서",
"]",
"[",
"124",
"-",
"발주서",
"]",
"[",
"125",
"-",
"... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L469-L487 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.attachFile | def attachFile(self, CorpNum, ItemCode, MgtKey, FilePath, UserID=None):
""" 파일 첨부
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
... | python | def attachFile(self, CorpNum, ItemCode, MgtKey, FilePath, UserID=None):
""" 파일 첨부
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
... | [
"def",
"attachFile",
"(",
"self",
",",
"CorpNum",
",",
"ItemCode",
",",
"MgtKey",
",",
"FilePath",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"MgtKey",
"==",
"None",
"or",
"MgtKey",
"==",
"\"\"",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
... | 파일 첨부
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문서관리번호
FilePath : 첨부파일의 경로
UserID :... | [
"파일",
"첨부",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"ItemCode",
":",
"명세서",
"종류",
"코드",
"[",
"121",
"-",
"거래명세서",
"]",
"[",
"122",
"-",
"청구서",
"]",
"[",
"123",
"-",
"견적서",
"]",
"[",
"124",
"-",
"발주서",
"]",
"[",
"125",
"-",
"입금표",
"]",
"[",
... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L489-L521 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.getFiles | def getFiles(self, CorpNum, ItemCode, MgtKey):
""" 첨부파일 목록 확인
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문서관리... | python | def getFiles(self, CorpNum, ItemCode, MgtKey):
""" 첨부파일 목록 확인
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문서관리... | [
"def",
"getFiles",
"(",
"self",
",",
"CorpNum",
",",
"ItemCode",
",",
"MgtKey",
")",
":",
"if",
"MgtKey",
"==",
"None",
"or",
"MgtKey",
"==",
"\"\"",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"관리번호가 입력되지 않았습니다.\")\r",
"",
"if",
"ItemCo... | 첨부파일 목록 확인
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문서관리번호
return
첨부파일 목록 as List
... | [
"첨부파일",
"목록",
"확인",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"ItemCode",
":",
"명세서",
"종류",
"코드",
"[",
"121",
"-",
"거래명세서",
"]",
"[",
"122",
"-",
"청구서",
"]",
"[",
"123",
"-",
"견적서",
"]",
"[",
"124",
"-",
"발주서",
"]",
"[",
"125",
"-",
"입금표",
"]"... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L523-L541 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.deleteFile | def deleteFile(self, CorpNum, ItemCode, MgtKey, FileID, UserID=None):
""" 첨부파일 삭제
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
... | python | def deleteFile(self, CorpNum, ItemCode, MgtKey, FileID, UserID=None):
""" 첨부파일 삭제
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
... | [
"def",
"deleteFile",
"(",
"self",
",",
"CorpNum",
",",
"ItemCode",
",",
"MgtKey",
",",
"FileID",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"MgtKey",
"==",
"None",
"or",
"MgtKey",
"==",
"\"\"",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
"... | 첨부파일 삭제
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKey : 파트너 문서관리번호
FileID : 파일아이디, 첨부파일 목록확인(getFiles) API 응답전... | [
"첨부파일",
"삭제",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"ItemCode",
":",
"명세서",
"종류",
"코드",
"[",
"121",
"-",
"거래명세서",
"]",
"[",
"122",
"-",
"청구서",
"]",
"[",
"123",
"-",
"견적서",
"]",
"[",
"124",
"-",
"발주서",
"]",
"[",
"125",
"-",
"입금표",
"]",
"[",... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L543-L568 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.getMassPrintURL | def getMassPrintURL(self, CorpNum, ItemCode, MgtKeyList, UserID=None):
""" 다량 인쇄 URL 확인
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
... | python | def getMassPrintURL(self, CorpNum, ItemCode, MgtKeyList, UserID=None):
""" 다량 인쇄 URL 확인
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
... | [
"def",
"getMassPrintURL",
"(",
"self",
",",
"CorpNum",
",",
"ItemCode",
",",
"MgtKeyList",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"MgtKeyList",
"==",
"None",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"관리번호 배열이 입력되지 않았습니다.\")\r",
"",
... | 다량 인쇄 URL 확인
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 명세서 종류 코드
[121 - 거래명세서], [122 - 청구서], [123 - 견적서],
[124 - 발주서], [125 - 입금표], [126 - 영수증]
MgtKeyList : 파트너 문서관리번호 목록
UserID : 팝빌회원 아이디
... | [
"다량",
"인쇄",
"URL",
"확인",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"ItemCode",
":",
"명세서",
"종류",
"코드",
"[",
"121",
"-",
"거래명세서",
"]",
"[",
"122",
"-",
"청구서",
"]",
"[",
"123",
"-",
"견적서",
"]",
"[",
"124",
"-",
"발주서",
"]",
"[",
"125",
"-",
"입금표"... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L662-L685 | train |
linkhub-sdk/popbill.py | popbill/statementService.py | StatementService.attachStatement | def attachStatement(self, CorpNum, ItemCode, MgtKey, SubItemCode, SubMgtKey, UserID=None):
""" 다른 전자명세서 첨부
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 전자명세서 종류코드, 121-명세서, 122-청구서, 123-견적서, 124-발주서 125-입금표, 126-영수증
MgtKey : 전자명세서 문서관리번호
... | python | def attachStatement(self, CorpNum, ItemCode, MgtKey, SubItemCode, SubMgtKey, UserID=None):
""" 다른 전자명세서 첨부
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 전자명세서 종류코드, 121-명세서, 122-청구서, 123-견적서, 124-발주서 125-입금표, 126-영수증
MgtKey : 전자명세서 문서관리번호
... | [
"def",
"attachStatement",
"(",
"self",
",",
"CorpNum",
",",
"ItemCode",
",",
"MgtKey",
",",
"SubItemCode",
",",
"SubMgtKey",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"MgtKey",
"==",
"None",
"or",
"MgtKey",
"==",
"\"\"",
":",
"raise",
"PopbillException",... | 다른 전자명세서 첨부
args
CorpNum : 팝빌회원 사업자번호
ItemCode : 전자명세서 종류코드, 121-명세서, 122-청구서, 123-견적서, 124-발주서 125-입금표, 126-영수증
MgtKey : 전자명세서 문서관리번호
SubItemCode : 첨부할 명세서 종류코드, 121-명세서, 122-청구서, 123-견적서, 124-발주서 125-입금표, 126-영수증
SubMgtK... | [
"다른",
"전자명세서",
"첨부",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"ItemCode",
":",
"전자명세서",
"종류코드",
"121",
"-",
"명세서",
"122",
"-",
"청구서",
"123",
"-",
"견적서",
"124",
"-",
"발주서",
"125",
"-",
"입금표",
"126",
"-",
"영수증",
"MgtKey",
":",
"전자명세서",
"문서관리번호",
"Sub... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/statementService.py#L687-L710 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/package/__init__.py | Package.process | def process(self, article):
"""
Ingests an article and processes it for metadata and elements to provide
proper references in the EPUB spine.
This method may only be called once unless the Package was instantiated
in collection mode using ``Package(collection=True)``. It places ... | python | def process(self, article):
"""
Ingests an article and processes it for metadata and elements to provide
proper references in the EPUB spine.
This method may only be called once unless the Package was instantiated
in collection mode using ``Package(collection=True)``. It places ... | [
"def",
"process",
"(",
"self",
",",
"article",
")",
":",
"if",
"self",
".",
"article",
"is",
"not",
"None",
"and",
"not",
"self",
".",
"collection",
":",
"log",
".",
"warning",
"(",
"'Could not process additional article. Package only \\\nhandles one article unless ... | Ingests an article and processes it for metadata and elements to provide
proper references in the EPUB spine.
This method may only be called once unless the Package was instantiated
in collection mode using ``Package(collection=True)``. It places entries
in an internal spine list for th... | [
"Ingests",
"an",
"article",
"and",
"processes",
"it",
"for",
"metadata",
"and",
"elements",
"to",
"provide",
"proper",
"references",
"in",
"the",
"EPUB",
"spine",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/package/__init__.py#L70-L120 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/package/__init__.py | Package.acquire_metadata | def acquire_metadata(self):
"""
Handles the acquisition of metadata for both collection mode and single
mode, uses the metadata methods belonging to the article's publisher
attribute.
"""
#For space economy
publisher = self.article.publisher
if self.colle... | python | def acquire_metadata(self):
"""
Handles the acquisition of metadata for both collection mode and single
mode, uses the metadata methods belonging to the article's publisher
attribute.
"""
#For space economy
publisher = self.article.publisher
if self.colle... | [
"def",
"acquire_metadata",
"(",
"self",
")",
":",
"#For space economy",
"publisher",
"=",
"self",
".",
"article",
".",
"publisher",
"if",
"self",
".",
"collection",
":",
"# collection mode metadata gathering",
"pass",
"else",
":",
"# single mode metadata gathering",
"... | Handles the acquisition of metadata for both collection mode and single
mode, uses the metadata methods belonging to the article's publisher
attribute. | [
"Handles",
"the",
"acquisition",
"of",
"metadata",
"for",
"both",
"collection",
"mode",
"and",
"single",
"mode",
"uses",
"the",
"metadata",
"methods",
"belonging",
"to",
"the",
"article",
"s",
"publisher",
"attribute",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/package/__init__.py#L122-L156 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/package/__init__.py | Package.file_manifest | def file_manifest(self, location):
"""
An iterator through the files in a location which yields item elements
suitable for insertion into the package manifest.
"""
#Maps file extensions to mimetypes
mimetypes = {'.jpg': 'image/jpeg',
'.jpeg': 'image/j... | python | def file_manifest(self, location):
"""
An iterator through the files in a location which yields item elements
suitable for insertion into the package manifest.
"""
#Maps file extensions to mimetypes
mimetypes = {'.jpg': 'image/jpeg',
'.jpeg': 'image/j... | [
"def",
"file_manifest",
"(",
"self",
",",
"location",
")",
":",
"#Maps file extensions to mimetypes",
"mimetypes",
"=",
"{",
"'.jpg'",
":",
"'image/jpeg'",
",",
"'.jpeg'",
":",
"'image/jpeg'",
",",
"'.xml'",
":",
"'application/xhtml+xml'",
",",
"'.png'",
":",
"'im... | An iterator through the files in a location which yields item elements
suitable for insertion into the package manifest. | [
"An",
"iterator",
"through",
"the",
"files",
"in",
"a",
"location",
"which",
"yields",
"item",
"elements",
"suitable",
"for",
"insertion",
"into",
"the",
"package",
"manifest",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/package/__init__.py#L158-L199 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.get_contrib_names | def get_contrib_names(self, contrib):
"""
Returns an appropriate Name and File-As-Name for a contrib element.
This code was refactored out of nav_contributors and
package_contributors to provide a single definition point for a common
job. This is a useful utility that may be wel... | python | def get_contrib_names(self, contrib):
"""
Returns an appropriate Name and File-As-Name for a contrib element.
This code was refactored out of nav_contributors and
package_contributors to provide a single definition point for a common
job. This is a useful utility that may be wel... | [
"def",
"get_contrib_names",
"(",
"self",
",",
"contrib",
")",
":",
"collab",
"=",
"contrib",
".",
"find",
"(",
"'collab'",
")",
"anon",
"=",
"contrib",
".",
"find",
"(",
"'anonymous'",
")",
"if",
"collab",
"is",
"not",
"None",
":",
"proper_name",
"=",
... | Returns an appropriate Name and File-As-Name for a contrib element.
This code was refactored out of nav_contributors and
package_contributors to provide a single definition point for a common
job. This is a useful utility that may be well-employed for other
publishers as well. | [
"Returns",
"an",
"appropriate",
"Name",
"and",
"File",
"-",
"As",
"-",
"Name",
"for",
"a",
"contrib",
"element",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L31-L63 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.package_description | def package_description(self):
"""
Given an Article class instance, this is responsible for returning an
article description. For this method I have taken the approach of
serializing the article's first abstract, if it has one. This results
in 0 or 1 descriptions per article.
... | python | def package_description(self):
"""
Given an Article class instance, this is responsible for returning an
article description. For this method I have taken the approach of
serializing the article's first abstract, if it has one. This results
in 0 or 1 descriptions per article.
... | [
"def",
"package_description",
"(",
"self",
")",
":",
"abstract",
"=",
"self",
".",
"article",
".",
"root",
".",
"xpath",
"(",
"'./front/article-meta/abstract'",
")",
"return",
"serialize",
"(",
"abstract",
"[",
"0",
"]",
",",
"strip",
"=",
"True",
")",
"if... | Given an Article class instance, this is responsible for returning an
article description. For this method I have taken the approach of
serializing the article's first abstract, if it has one. This results
in 0 or 1 descriptions per article. | [
"Given",
"an",
"Article",
"class",
"instance",
"this",
"is",
"responsible",
"for",
"returning",
"an",
"article",
"description",
".",
"For",
"this",
"method",
"I",
"have",
"taken",
"the",
"approach",
"of",
"serializing",
"the",
"article",
"s",
"first",
"abstrac... | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L112-L120 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.heading_title | def heading_title(self):
"""
Makes the Article Title for the Heading.
Metadata element, content derived from FrontMatter
"""
art_title = self.article.root.xpath('./front/article-meta/title-group/article-title')[0]
article_title = deepcopy(art_title)
article_title... | python | def heading_title(self):
"""
Makes the Article Title for the Heading.
Metadata element, content derived from FrontMatter
"""
art_title = self.article.root.xpath('./front/article-meta/title-group/article-title')[0]
article_title = deepcopy(art_title)
article_title... | [
"def",
"heading_title",
"(",
"self",
")",
":",
"art_title",
"=",
"self",
".",
"article",
".",
"root",
".",
"xpath",
"(",
"'./front/article-meta/title-group/article-title'",
")",
"[",
"0",
"]",
"article_title",
"=",
"deepcopy",
"(",
"art_title",
")",
"article_tit... | Makes the Article Title for the Heading.
Metadata element, content derived from FrontMatter | [
"Makes",
"the",
"Article",
"Title",
"for",
"the",
"Heading",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L182-L193 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_heading_authors | def make_heading_authors(self, authors):
"""
Constructs the Authors content for the Heading. This should display
directly after the Article Title.
Metadata element, content derived from FrontMatter
"""
author_element = etree.Element('h3', {'class': 'authors'})
#C... | python | def make_heading_authors(self, authors):
"""
Constructs the Authors content for the Heading. This should display
directly after the Article Title.
Metadata element, content derived from FrontMatter
"""
author_element = etree.Element('h3', {'class': 'authors'})
#C... | [
"def",
"make_heading_authors",
"(",
"self",
",",
"authors",
")",
":",
"author_element",
"=",
"etree",
".",
"Element",
"(",
"'h3'",
",",
"{",
"'class'",
":",
"'authors'",
"}",
")",
"#Construct content for the author element",
"first",
"=",
"True",
"for",
"author"... | Constructs the Authors content for the Heading. This should display
directly after the Article Title.
Metadata element, content derived from FrontMatter | [
"Constructs",
"the",
"Authors",
"content",
"for",
"the",
"Heading",
".",
"This",
"should",
"display",
"directly",
"after",
"the",
"Article",
"Title",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L195-L251 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_heading_affiliations | def make_heading_affiliations(self, heading_div):
"""
Makes the content for the Author Affiliations, displays after the
Authors segment in the Heading.
Metadata element, content derived from FrontMatter
"""
#Get all of the aff element tuples from the metadata
aff... | python | def make_heading_affiliations(self, heading_div):
"""
Makes the content for the Author Affiliations, displays after the
Authors segment in the Heading.
Metadata element, content derived from FrontMatter
"""
#Get all of the aff element tuples from the metadata
aff... | [
"def",
"make_heading_affiliations",
"(",
"self",
",",
"heading_div",
")",
":",
"#Get all of the aff element tuples from the metadata",
"affs",
"=",
"self",
".",
"article",
".",
"root",
".",
"xpath",
"(",
"'./front/article-meta/aff'",
")",
"#Create a list of all those pertai... | Makes the content for the Author Affiliations, displays after the
Authors segment in the Heading.
Metadata element, content derived from FrontMatter | [
"Makes",
"the",
"content",
"for",
"the",
"Author",
"Affiliations",
"displays",
"after",
"the",
"Authors",
"segment",
"in",
"the",
"Heading",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L253-L286 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_heading_abstracts | def make_heading_abstracts(self, heading_div):
"""
An article may contain data for various kinds of abstracts. This method
works on those that are included in the Heading. This is displayed
after the Authors and Affiliations.
Metadata element, content derived from FrontMatter
... | python | def make_heading_abstracts(self, heading_div):
"""
An article may contain data for various kinds of abstracts. This method
works on those that are included in the Heading. This is displayed
after the Authors and Affiliations.
Metadata element, content derived from FrontMatter
... | [
"def",
"make_heading_abstracts",
"(",
"self",
",",
"heading_div",
")",
":",
"for",
"abstract",
"in",
"self",
".",
"article",
".",
"root",
".",
"xpath",
"(",
"'./front/article-meta/abstract'",
")",
":",
"#Make a copy of the abstract",
"abstract_copy",
"=",
"deepcopy"... | An article may contain data for various kinds of abstracts. This method
works on those that are included in the Heading. This is displayed
after the Authors and Affiliations.
Metadata element, content derived from FrontMatter | [
"An",
"article",
"may",
"contain",
"data",
"for",
"various",
"kinds",
"of",
"abstracts",
".",
"This",
"method",
"works",
"on",
"those",
"that",
"are",
"included",
"in",
"the",
"Heading",
".",
"This",
"is",
"displayed",
"after",
"the",
"Authors",
"and",
"Af... | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L298-L348 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_article_info | def make_article_info(self):
"""
The Article Info contains the (self) Citation, Editors, Dates,
Copyright, Funding Statement, Competing Interests Statement,
Correspondence, and Footnotes. Maybe more...
This content follows the Heading and precedes the Main segment in the
... | python | def make_article_info(self):
"""
The Article Info contains the (self) Citation, Editors, Dates,
Copyright, Funding Statement, Competing Interests Statement,
Correspondence, and Footnotes. Maybe more...
This content follows the Heading and precedes the Main segment in the
... | [
"def",
"make_article_info",
"(",
"self",
")",
":",
"body",
"=",
"self",
".",
"main",
".",
"getroot",
"(",
")",
".",
"find",
"(",
"'body'",
")",
"#Create a div for ArticleInfo, exposing it to linking and formatting",
"article_info_div",
"=",
"etree",
".",
"Element",
... | The Article Info contains the (self) Citation, Editors, Dates,
Copyright, Funding Statement, Competing Interests Statement,
Correspondence, and Footnotes. Maybe more...
This content follows the Heading and precedes the Main segment in the
output.
This function accepts the recei... | [
"The",
"Article",
"Info",
"contains",
"the",
"(",
"self",
")",
"Citation",
"Editors",
"Dates",
"Copyright",
"Funding",
"Statement",
"Competing",
"Interests",
"Statement",
"Correspondence",
"and",
"Footnotes",
".",
"Maybe",
"more",
"..."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L352-L384 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_article_info_citation | def make_article_info_citation(self):
"""
Creates a self citation node for the ArticleInfo of the article.
This method uses code from this page as a reference implementation:
https://github.com/PLOS/ambra/blob/master/base/src/main/resources/articleTransform-v3.xsl
"""
ci... | python | def make_article_info_citation(self):
"""
Creates a self citation node for the ArticleInfo of the article.
This method uses code from this page as a reference implementation:
https://github.com/PLOS/ambra/blob/master/base/src/main/resources/articleTransform-v3.xsl
"""
ci... | [
"def",
"make_article_info_citation",
"(",
"self",
")",
":",
"citation_div",
"=",
"etree",
".",
"Element",
"(",
"'div'",
",",
"{",
"'id'",
":",
"'article-citation'",
"}",
")",
"b",
"=",
"etree",
".",
"SubElement",
"(",
"citation_div",
",",
"'b'",
")",
"b",
... | Creates a self citation node for the ArticleInfo of the article.
This method uses code from this page as a reference implementation:
https://github.com/PLOS/ambra/blob/master/base/src/main/resources/articleTransform-v3.xsl | [
"Creates",
"a",
"self",
"citation",
"node",
"for",
"the",
"ArticleInfo",
"of",
"the",
"article",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L386-L476 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_article_info_dates | def make_article_info_dates(self):
"""
Makes the section containing important dates for the article: typically
Received, Accepted, and Published.
"""
dates_div = etree.Element('div', {'id': 'article-dates'})
d = './front/article-meta/history/date'
received = self... | python | def make_article_info_dates(self):
"""
Makes the section containing important dates for the article: typically
Received, Accepted, and Published.
"""
dates_div = etree.Element('div', {'id': 'article-dates'})
d = './front/article-meta/history/date'
received = self... | [
"def",
"make_article_info_dates",
"(",
"self",
")",
":",
"dates_div",
"=",
"etree",
".",
"Element",
"(",
"'div'",
",",
"{",
"'id'",
":",
"'article-dates'",
"}",
")",
"d",
"=",
"'./front/article-meta/history/date'",
"received",
"=",
"self",
".",
"article",
".",... | Makes the section containing important dates for the article: typically
Received, Accepted, and Published. | [
"Makes",
"the",
"section",
"containing",
"important",
"dates",
"for",
"the",
"article",
":",
"typically",
"Received",
"Accepted",
"and",
"Published",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L524-L554 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_article_info_copyright | def make_article_info_copyright(self, article_info_div):
"""
Makes the copyright section for the ArticleInfo. For PLoS, this means
handling the information contained in the metadata <permissions>
element.
"""
perm = self.article.root.xpath('./front/article-meta/permission... | python | def make_article_info_copyright(self, article_info_div):
"""
Makes the copyright section for the ArticleInfo. For PLoS, this means
handling the information contained in the metadata <permissions>
element.
"""
perm = self.article.root.xpath('./front/article-meta/permission... | [
"def",
"make_article_info_copyright",
"(",
"self",
",",
"article_info_div",
")",
":",
"perm",
"=",
"self",
".",
"article",
".",
"root",
".",
"xpath",
"(",
"'./front/article-meta/permissions'",
")",
"if",
"not",
"perm",
":",
"return",
"copyright_div",
"=",
"etree... | Makes the copyright section for the ArticleInfo. For PLoS, this means
handling the information contained in the metadata <permissions>
element. | [
"Makes",
"the",
"copyright",
"section",
"for",
"the",
"ArticleInfo",
".",
"For",
"PLoS",
"this",
"means",
"handling",
"the",
"information",
"contained",
"in",
"the",
"metadata",
"<permissions",
">",
"element",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L556-L575 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_article_info_funding | def make_article_info_funding(self, article_info_div):
"""
Creates the element for declaring Funding in the article info.
"""
funding_group = self.article.root.xpath('./front/article-meta/funding-group')
if funding_group:
funding_div = etree.SubElement(article_info_di... | python | def make_article_info_funding(self, article_info_div):
"""
Creates the element for declaring Funding in the article info.
"""
funding_group = self.article.root.xpath('./front/article-meta/funding-group')
if funding_group:
funding_div = etree.SubElement(article_info_di... | [
"def",
"make_article_info_funding",
"(",
"self",
",",
"article_info_div",
")",
":",
"funding_group",
"=",
"self",
".",
"article",
".",
"root",
".",
"xpath",
"(",
"'./front/article-meta/funding-group'",
")",
"if",
"funding_group",
":",
"funding_div",
"=",
"etree",
... | Creates the element for declaring Funding in the article info. | [
"Creates",
"the",
"element",
"for",
"declaring",
"Funding",
"in",
"the",
"article",
"info",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L577-L590 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_article_info_competing_interests | def make_article_info_competing_interests(self, article_info_div):
"""
Creates the element for declaring competing interests in the article
info.
"""
#Check for author-notes
con_expr = "./front/article-meta/author-notes/fn[@fn-type='conflict']"
conflict = self.art... | python | def make_article_info_competing_interests(self, article_info_div):
"""
Creates the element for declaring competing interests in the article
info.
"""
#Check for author-notes
con_expr = "./front/article-meta/author-notes/fn[@fn-type='conflict']"
conflict = self.art... | [
"def",
"make_article_info_competing_interests",
"(",
"self",
",",
"article_info_div",
")",
":",
"#Check for author-notes",
"con_expr",
"=",
"\"./front/article-meta/author-notes/fn[@fn-type='conflict']\"",
"conflict",
"=",
"self",
".",
"article",
".",
"root",
".",
"xpath",
"... | Creates the element for declaring competing interests in the article
info. | [
"Creates",
"the",
"element",
"for",
"declaring",
"competing",
"interests",
"in",
"the",
"article",
"info",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L592-L609 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_article_info_correspondences | def make_article_info_correspondences(self, article_info_div):
"""
Articles generally provide a first contact, typically an email address
for one of the authors. This will supply that content.
"""
corresps = self.article.root.xpath('./front/article-meta/author-notes/corresp')
... | python | def make_article_info_correspondences(self, article_info_div):
"""
Articles generally provide a first contact, typically an email address
for one of the authors. This will supply that content.
"""
corresps = self.article.root.xpath('./front/article-meta/author-notes/corresp')
... | [
"def",
"make_article_info_correspondences",
"(",
"self",
",",
"article_info_div",
")",
":",
"corresps",
"=",
"self",
".",
"article",
".",
"root",
".",
"xpath",
"(",
"'./front/article-meta/author-notes/corresp'",
")",
"if",
"corresps",
":",
"corresp_div",
"=",
"etree... | Articles generally provide a first contact, typically an email address
for one of the authors. This will supply that content. | [
"Articles",
"generally",
"provide",
"a",
"first",
"contact",
"typically",
"an",
"email",
"address",
"for",
"one",
"of",
"the",
"authors",
".",
"This",
"will",
"supply",
"that",
"content",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L611-L625 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_article_info_footnotes_other | def make_article_info_footnotes_other(self, article_info_div):
"""
This will catch all of the footnotes of type 'other' in the <fn-group>
of the <back> element.
"""
other_fn_expr = "./back/fn-group/fn[@fn-type='other']"
other_fns = self.article.root.xpath(other_fn_expr)
... | python | def make_article_info_footnotes_other(self, article_info_div):
"""
This will catch all of the footnotes of type 'other' in the <fn-group>
of the <back> element.
"""
other_fn_expr = "./back/fn-group/fn[@fn-type='other']"
other_fns = self.article.root.xpath(other_fn_expr)
... | [
"def",
"make_article_info_footnotes_other",
"(",
"self",
",",
"article_info_div",
")",
":",
"other_fn_expr",
"=",
"\"./back/fn-group/fn[@fn-type='other']\"",
"other_fns",
"=",
"self",
".",
"article",
".",
"root",
".",
"xpath",
"(",
"other_fn_expr",
")",
"if",
"other_f... | This will catch all of the footnotes of type 'other' in the <fn-group>
of the <back> element. | [
"This",
"will",
"catch",
"all",
"of",
"the",
"footnotes",
"of",
"type",
"other",
"in",
"the",
"<fn",
"-",
"group",
">",
"of",
"the",
"<back",
">",
"element",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L627-L639 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_back_matter | def make_back_matter(self):
"""
The <back> element may have 0 or 1 <label> elements and 0 or 1 <title>
elements. Then it may have any combination of the following: <ack>,
<app-group>, <bio>, <fn-group>, <glossary>, <ref-list>, <notes>, and
<sec>. <sec> is employed here as a catch... | python | def make_back_matter(self):
"""
The <back> element may have 0 or 1 <label> elements and 0 or 1 <title>
elements. Then it may have any combination of the following: <ack>,
<app-group>, <bio>, <fn-group>, <glossary>, <ref-list>, <notes>, and
<sec>. <sec> is employed here as a catch... | [
"def",
"make_back_matter",
"(",
"self",
")",
":",
"#Back is technically metadata content that needs to be interpreted to",
"#presentable content",
"body",
"=",
"self",
".",
"main",
".",
"getroot",
"(",
")",
".",
"find",
"(",
"'body'",
")",
"if",
"self",
".",
"articl... | The <back> element may have 0 or 1 <label> elements and 0 or 1 <title>
elements. Then it may have any combination of the following: <ack>,
<app-group>, <bio>, <fn-group>, <glossary>, <ref-list>, <notes>, and
<sec>. <sec> is employed here as a catch-all for material that does not
fall und... | [
"The",
"<back",
">",
"element",
"may",
"have",
"0",
"or",
"1",
"<label",
">",
"elements",
"and",
"0",
"or",
"1",
"<title",
">",
"elements",
".",
"Then",
"it",
"may",
"have",
"any",
"combination",
"of",
"the",
"following",
":",
"<ack",
">",
"<app",
"-... | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L643-L678 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.move_back_boxed_texts | def move_back_boxed_texts(self):
"""
The only intended use for this function is to patch a problem seen in
at least one PLoS article (journal.pgen.0020002). This will move any
<boxed-text> elements over to the receiving element, which is probably
the main body.
"""
... | python | def move_back_boxed_texts(self):
"""
The only intended use for this function is to patch a problem seen in
at least one PLoS article (journal.pgen.0020002). This will move any
<boxed-text> elements over to the receiving element, which is probably
the main body.
"""
... | [
"def",
"move_back_boxed_texts",
"(",
"self",
")",
":",
"body",
"=",
"self",
".",
"main",
".",
"getroot",
"(",
")",
".",
"find",
"(",
"'body'",
")",
"back",
"=",
"self",
".",
"article",
".",
"root",
".",
"find",
"(",
"'back'",
")",
"if",
"back",
"is... | The only intended use for this function is to patch a problem seen in
at least one PLoS article (journal.pgen.0020002). This will move any
<boxed-text> elements over to the receiving element, which is probably
the main body. | [
"The",
"only",
"intended",
"use",
"for",
"this",
"function",
"is",
"to",
"patch",
"a",
"problem",
"seen",
"in",
"at",
"least",
"one",
"PLoS",
"article",
"(",
"journal",
".",
"pgen",
".",
"0020002",
")",
".",
"This",
"will",
"move",
"any",
"<boxed",
"-"... | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L682-L695 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_back_acknowledgments | def make_back_acknowledgments(self):
"""
The <ack> is an important piece of back matter information, and will be
including immediately after the main text.
This element should only occur once, optionally, for PLoS, if a need
becomes known, then multiple instances may be supporte... | python | def make_back_acknowledgments(self):
"""
The <ack> is an important piece of back matter information, and will be
including immediately after the main text.
This element should only occur once, optionally, for PLoS, if a need
becomes known, then multiple instances may be supporte... | [
"def",
"make_back_acknowledgments",
"(",
"self",
")",
":",
"acks",
"=",
"self",
".",
"article",
".",
"root",
".",
"xpath",
"(",
"'./back/ack'",
")",
"if",
"not",
"acks",
":",
"return",
"ack",
"=",
"deepcopy",
"(",
"acks",
"[",
"0",
"]",
")",
"#Modify t... | The <ack> is an important piece of back matter information, and will be
including immediately after the main text.
This element should only occur once, optionally, for PLoS, if a need
becomes known, then multiple instances may be supported. | [
"The",
"<ack",
">",
"is",
"an",
"important",
"piece",
"of",
"back",
"matter",
"information",
"and",
"will",
"be",
"including",
"immediately",
"after",
"the",
"main",
"text",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L697-L718 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_back_author_contributions | def make_back_author_contributions(self, body):
"""
Though this goes in the back of the document with the rest of the back
matter, it is not an element found under <back>.
I don't expect to see more than one of these. Compare this method to
make_article_info_competing_interests(... | python | def make_back_author_contributions(self, body):
"""
Though this goes in the back of the document with the rest of the back
matter, it is not an element found under <back>.
I don't expect to see more than one of these. Compare this method to
make_article_info_competing_interests(... | [
"def",
"make_back_author_contributions",
"(",
"self",
",",
"body",
")",
":",
"cont_expr",
"=",
"\"./front/article-meta/author-notes/fn[@fn-type='con']\"",
"contribution",
"=",
"self",
".",
"article",
".",
"root",
".",
"xpath",
"(",
"cont_expr",
")",
"if",
"contributio... | Though this goes in the back of the document with the rest of the back
matter, it is not an element found under <back>.
I don't expect to see more than one of these. Compare this method to
make_article_info_competing_interests() | [
"Though",
"this",
"goes",
"in",
"the",
"back",
"of",
"the",
"document",
"with",
"the",
"rest",
"of",
"the",
"back",
"matter",
"it",
"is",
"not",
"an",
"element",
"found",
"under",
"<back",
">",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L720-L739 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_back_glossary | def make_back_glossary(self, body):
"""
Glossaries are a fairly common item in papers for PLoS, but it also
seems that they are rarely incorporated into the PLoS web-site or PDF
formats. They are included in the ePub output however because they are
helpful and because we can.
... | python | def make_back_glossary(self, body):
"""
Glossaries are a fairly common item in papers for PLoS, but it also
seems that they are rarely incorporated into the PLoS web-site or PDF
formats. They are included in the ePub output however because they are
helpful and because we can.
... | [
"def",
"make_back_glossary",
"(",
"self",
",",
"body",
")",
":",
"for",
"glossary",
"in",
"self",
".",
"article",
".",
"root",
".",
"xpath",
"(",
"'./back/glossary'",
")",
":",
"gloss_copy",
"=",
"deepcopy",
"(",
"glossary",
")",
"gloss_copy",
".",
"tag",
... | Glossaries are a fairly common item in papers for PLoS, but it also
seems that they are rarely incorporated into the PLoS web-site or PDF
formats. They are included in the ePub output however because they are
helpful and because we can. | [
"Glossaries",
"are",
"a",
"fairly",
"common",
"item",
"in",
"papers",
"for",
"PLoS",
"but",
"it",
"also",
"seems",
"that",
"they",
"are",
"rarely",
"incorporated",
"into",
"the",
"PLoS",
"web",
"-",
"site",
"or",
"PDF",
"formats",
".",
"They",
"are",
"in... | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L741-L752 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.make_back_notes | def make_back_notes(self, body):
"""
The notes element in PLoS articles can be employed for posting notices
of corrections or adjustments in proof. The <notes> element has a very
diverse content model, but PLoS practice appears to be fairly
consistent: a single <sec> containing a... | python | def make_back_notes(self, body):
"""
The notes element in PLoS articles can be employed for posting notices
of corrections or adjustments in proof. The <notes> element has a very
diverse content model, but PLoS practice appears to be fairly
consistent: a single <sec> containing a... | [
"def",
"make_back_notes",
"(",
"self",
",",
"body",
")",
":",
"for",
"notes",
"in",
"self",
".",
"article",
".",
"root",
".",
"xpath",
"(",
"'./back/notes'",
")",
":",
"notes_sec",
"=",
"deepcopy",
"(",
"notes",
".",
"find",
"(",
"'sec'",
")",
")",
"... | The notes element in PLoS articles can be employed for posting notices
of corrections or adjustments in proof. The <notes> element has a very
diverse content model, but PLoS practice appears to be fairly
consistent: a single <sec> containing a <title> and a <p> | [
"The",
"notes",
"element",
"in",
"PLoS",
"articles",
"can",
"be",
"employed",
"for",
"posting",
"notices",
"of",
"corrections",
"or",
"adjustments",
"in",
"proof",
".",
"The",
"<notes",
">",
"element",
"has",
"a",
"very",
"diverse",
"content",
"model",
"but"... | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L754-L765 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.convert_disp_formula_elements | def convert_disp_formula_elements(self):
"""
<disp-formula> elements must be converted to conforming elements
"""
for disp in self.main.getroot().findall('.//disp-formula'):
#find label element
label_el = disp.find('label')
graphic_el = disp.find('grap... | python | def convert_disp_formula_elements(self):
"""
<disp-formula> elements must be converted to conforming elements
"""
for disp in self.main.getroot().findall('.//disp-formula'):
#find label element
label_el = disp.find('label')
graphic_el = disp.find('grap... | [
"def",
"convert_disp_formula_elements",
"(",
"self",
")",
":",
"for",
"disp",
"in",
"self",
".",
"main",
".",
"getroot",
"(",
")",
".",
"findall",
"(",
"'.//disp-formula'",
")",
":",
"#find label element",
"label_el",
"=",
"disp",
".",
"find",
"(",
"'label'"... | <disp-formula> elements must be converted to conforming elements | [
"<disp",
"-",
"formula",
">",
"elements",
"must",
"be",
"converted",
"to",
"conforming",
"elements"
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L769-L814 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.convert_inline_formula_elements | def convert_inline_formula_elements(self):
"""
<inline-formula> elements must be converted to be conforming
These elements may contain <inline-graphic> elements, textual content,
or both.
"""
for inline in self.main.getroot().findall('.//inline-formula'):
#in... | python | def convert_inline_formula_elements(self):
"""
<inline-formula> elements must be converted to be conforming
These elements may contain <inline-graphic> elements, textual content,
or both.
"""
for inline in self.main.getroot().findall('.//inline-formula'):
#in... | [
"def",
"convert_inline_formula_elements",
"(",
"self",
")",
":",
"for",
"inline",
"in",
"self",
".",
"main",
".",
"getroot",
"(",
")",
".",
"findall",
"(",
"'.//inline-formula'",
")",
":",
"#inline-formula elements will be modified in situ",
"remove_all_attributes",
"... | <inline-formula> elements must be converted to be conforming
These elements may contain <inline-graphic> elements, textual content,
or both. | [
"<inline",
"-",
"formula",
">",
"elements",
"must",
"be",
"converted",
"to",
"be",
"conforming"
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L818-L848 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.convert_disp_quote_elements | def convert_disp_quote_elements(self):
"""
Extract or extended quoted passage from another work, usually made
typographically distinct from surrounding text
<disp-quote> elements have a relatively complex content model, but PLoS
appears to employ either <p>s or <list>s.
... | python | def convert_disp_quote_elements(self):
"""
Extract or extended quoted passage from another work, usually made
typographically distinct from surrounding text
<disp-quote> elements have a relatively complex content model, but PLoS
appears to employ either <p>s or <list>s.
... | [
"def",
"convert_disp_quote_elements",
"(",
"self",
")",
":",
"for",
"disp_quote",
"in",
"self",
".",
"main",
".",
"getroot",
"(",
")",
".",
"findall",
"(",
"'.//disp-quote'",
")",
":",
"if",
"disp_quote",
".",
"getparent",
"(",
")",
".",
"tag",
"==",
"'p... | Extract or extended quoted passage from another work, usually made
typographically distinct from surrounding text
<disp-quote> elements have a relatively complex content model, but PLoS
appears to employ either <p>s or <list>s. | [
"Extract",
"or",
"extended",
"quoted",
"passage",
"from",
"another",
"work",
"usually",
"made",
"typographically",
"distinct",
"from",
"surrounding",
"text"
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L852-L864 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.convert_boxed_text_elements | def convert_boxed_text_elements(self):
"""
Textual material that is part of the body of text but outside the
flow of the narrative text, for example, a sidebar, marginalia, text
insert (whether enclosed in a box or not), caution, tip, note box, etc.
<boxed-text> elements for PLo... | python | def convert_boxed_text_elements(self):
"""
Textual material that is part of the body of text but outside the
flow of the narrative text, for example, a sidebar, marginalia, text
insert (whether enclosed in a box or not), caution, tip, note box, etc.
<boxed-text> elements for PLo... | [
"def",
"convert_boxed_text_elements",
"(",
"self",
")",
":",
"for",
"boxed_text",
"in",
"self",
".",
"main",
".",
"getroot",
"(",
")",
".",
"findall",
"(",
"'.//boxed-text'",
")",
":",
"sec_el",
"=",
"boxed_text",
".",
"find",
"(",
"'sec'",
")",
"if",
"s... | Textual material that is part of the body of text but outside the
flow of the narrative text, for example, a sidebar, marginalia, text
insert (whether enclosed in a box or not), caution, tip, note box, etc.
<boxed-text> elements for PLoS appear to all contain a single <sec>
element whic... | [
"Textual",
"material",
"that",
"is",
"part",
"of",
"the",
"body",
"of",
"text",
"but",
"outside",
"the",
"flow",
"of",
"the",
"narrative",
"text",
"for",
"example",
"a",
"sidebar",
"marginalia",
"text",
"insert",
"(",
"whether",
"enclosed",
"in",
"a",
"box... | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L868-L895 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.convert_supplementary_material_elements | def convert_supplementary_material_elements(self):
"""
Supplementary material are not, nor are they generally expected to be,
packaged into the epub file. Though this is a technical possibility,
and certain epub reading systems (such as those run on a PC) might be
reasonably capa... | python | def convert_supplementary_material_elements(self):
"""
Supplementary material are not, nor are they generally expected to be,
packaged into the epub file. Though this is a technical possibility,
and certain epub reading systems (such as those run on a PC) might be
reasonably capa... | [
"def",
"convert_supplementary_material_elements",
"(",
"self",
")",
":",
"for",
"supplementary",
"in",
"self",
".",
"main",
".",
"getroot",
"(",
")",
".",
"findall",
"(",
"'.//supplementary-material'",
")",
":",
"#Create a div element to hold the supplementary content",
... | Supplementary material are not, nor are they generally expected to be,
packaged into the epub file. Though this is a technical possibility,
and certain epub reading systems (such as those run on a PC) might be
reasonably capable of the external handling of diverse file formats
I presume ... | [
"Supplementary",
"material",
"are",
"not",
"nor",
"are",
"they",
"generally",
"expected",
"to",
"be",
"packaged",
"into",
"the",
"epub",
"file",
".",
"Though",
"this",
"is",
"a",
"technical",
"possibility",
"and",
"certain",
"epub",
"reading",
"systems",
"(",
... | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L899-L952 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.fetch_single_representation | def fetch_single_representation(self, item_xlink_href):
"""
This function will render a formatted URL for accessing the PLoS' server
SingleRepresentation of an object.
"""
#A dict of URLs for PLoS subjournals
journal_urls = {'pgen': 'http://www.plosgenetics.org/article/{0... | python | def fetch_single_representation(self, item_xlink_href):
"""
This function will render a formatted URL for accessing the PLoS' server
SingleRepresentation of an object.
"""
#A dict of URLs for PLoS subjournals
journal_urls = {'pgen': 'http://www.plosgenetics.org/article/{0... | [
"def",
"fetch_single_representation",
"(",
"self",
",",
"item_xlink_href",
")",
":",
"#A dict of URLs for PLoS subjournals",
"journal_urls",
"=",
"{",
"'pgen'",
":",
"'http://www.plosgenetics.org/article/{0}'",
",",
"'pcbi'",
":",
"'http://www.ploscompbiol.org/article/{0}'",
",... | This function will render a formatted URL for accessing the PLoS' server
SingleRepresentation of an object. | [
"This",
"function",
"will",
"render",
"a",
"formatted",
"URL",
"for",
"accessing",
"the",
"PLoS",
"server",
"SingleRepresentation",
"of",
"an",
"object",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L954-L973 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.convert_fig_elements | def convert_fig_elements(self):
"""
Responsible for the correct conversion of JPTS 3.0 <fig> elements to
EPUB xhtml. Aside from translating <fig> to <img>, the content model
must be edited.
"""
for fig in self.main.getroot().findall('.//fig'):
if fig.getparent... | python | def convert_fig_elements(self):
"""
Responsible for the correct conversion of JPTS 3.0 <fig> elements to
EPUB xhtml. Aside from translating <fig> to <img>, the content model
must be edited.
"""
for fig in self.main.getroot().findall('.//fig'):
if fig.getparent... | [
"def",
"convert_fig_elements",
"(",
"self",
")",
":",
"for",
"fig",
"in",
"self",
".",
"main",
".",
"getroot",
"(",
")",
".",
"findall",
"(",
"'.//fig'",
")",
":",
"if",
"fig",
".",
"getparent",
"(",
")",
".",
"tag",
"==",
"'p'",
":",
"elevate_elemen... | Responsible for the correct conversion of JPTS 3.0 <fig> elements to
EPUB xhtml. Aside from translating <fig> to <img>, the content model
must be edited. | [
"Responsible",
"for",
"the",
"correct",
"conversion",
"of",
"JPTS",
"3",
".",
"0",
"<fig",
">",
"elements",
"to",
"EPUB",
"xhtml",
".",
"Aside",
"from",
"translating",
"<fig",
">",
"to",
"<img",
">",
"the",
"content",
"model",
"must",
"be",
"edited",
"."... | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L977-L1025 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.convert_verse_group_elements | def convert_verse_group_elements(self):
"""
A song, poem, or verse
Implementor’s Note: No attempt has been made to retain the look or
visual form of the original poetry.
This unusual element, <verse-group> is used to convey poetry and is
recursive in nature (it may cont... | python | def convert_verse_group_elements(self):
"""
A song, poem, or verse
Implementor’s Note: No attempt has been made to retain the look or
visual form of the original poetry.
This unusual element, <verse-group> is used to convey poetry and is
recursive in nature (it may cont... | [
"def",
"convert_verse_group_elements",
"(",
"self",
")",
":",
"for",
"verse_group",
"in",
"self",
".",
"main",
".",
"getroot",
"(",
")",
".",
"findall",
"(",
"'.//verse-group'",
")",
":",
"#Find some possible sub elements for the heading",
"label",
"=",
"verse_group... | A song, poem, or verse
Implementor’s Note: No attempt has been made to retain the look or
visual form of the original poetry.
This unusual element, <verse-group> is used to convey poetry and is
recursive in nature (it may contain further <verse-group> elements).
Examples of the... | [
"A",
"song",
"poem",
"or",
"verse"
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L1029-L1068 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.convert_fn_elements | def convert_fn_elements(self):
"""
<fn> elements may be used in the main text body outside of tables and
figures for purposes such as erratum notes. It appears that PLoS
practice is to not show erratum notes in the web or pdf formats after
the appropriate corrections have been ma... | python | def convert_fn_elements(self):
"""
<fn> elements may be used in the main text body outside of tables and
figures for purposes such as erratum notes. It appears that PLoS
practice is to not show erratum notes in the web or pdf formats after
the appropriate corrections have been ma... | [
"def",
"convert_fn_elements",
"(",
"self",
")",
":",
"for",
"footnote",
"in",
"self",
".",
"main",
".",
"getroot",
"(",
")",
".",
"findall",
"(",
"'.//fn'",
")",
":",
"#Use only the first paragraph",
"paragraph",
"=",
"footnote",
".",
"find",
"(",
"'p'",
"... | <fn> elements may be used in the main text body outside of tables and
figures for purposes such as erratum notes. It appears that PLoS
practice is to not show erratum notes in the web or pdf formats after
the appropriate corrections have been made to the text. The erratum
notes are thus ... | [
"<fn",
">",
"elements",
"may",
"be",
"used",
"in",
"the",
"main",
"text",
"body",
"outside",
"of",
"tables",
"and",
"figures",
"for",
"purposes",
"such",
"as",
"erratum",
"notes",
".",
"It",
"appears",
"that",
"PLoS",
"practice",
"is",
"to",
"not",
"show... | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L1072-L1104 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.convert_list_elements | def convert_list_elements(self):
"""
A sequence of two or more items, which may or may not be ordered.
The <list> element has an optional <label> element and optional <title>
element, followed by one or more <list-item> elements. This is element
is recursive as the <list-item> e... | python | def convert_list_elements(self):
"""
A sequence of two or more items, which may or may not be ordered.
The <list> element has an optional <label> element and optional <title>
element, followed by one or more <list-item> elements. This is element
is recursive as the <list-item> e... | [
"def",
"convert_list_elements",
"(",
"self",
")",
":",
"#I have yet to gather many examples of this element, and may have to",
"#write a recursive method for the processing of lists depending on how",
"#PLoS produces their XML, for now this method is ignorant of nesting",
"#TODO: prefix-words, one... | A sequence of two or more items, which may or may not be ordered.
The <list> element has an optional <label> element and optional <title>
element, followed by one or more <list-item> elements. This is element
is recursive as the <list-item> elements may contain further <list> or
<def-li... | [
"A",
"sequence",
"of",
"two",
"or",
"more",
"items",
"which",
"may",
"or",
"may",
"not",
"be",
"ordered",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L1108-L1149 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.convert_def_list_elements | def convert_def_list_elements(self):
"""
A list in which each item consists of two parts: a word, phrase, term,
graphic, chemical structure, or equation paired with one of more
descriptions, discussions, explanations, or definitions of it.
<def-list> elements are lists of <def-i... | python | def convert_def_list_elements(self):
"""
A list in which each item consists of two parts: a word, phrase, term,
graphic, chemical structure, or equation paired with one of more
descriptions, discussions, explanations, or definitions of it.
<def-list> elements are lists of <def-i... | [
"def",
"convert_def_list_elements",
"(",
"self",
")",
":",
"for",
"def_list",
"in",
"self",
".",
"main",
".",
"getroot",
"(",
")",
".",
"findall",
"(",
"'.//def-list'",
")",
":",
"#Remove the attributes, excepting id",
"remove_all_attributes",
"(",
"def_list",
","... | A list in which each item consists of two parts: a word, phrase, term,
graphic, chemical structure, or equation paired with one of more
descriptions, discussions, explanations, or definitions of it.
<def-list> elements are lists of <def-item> elements which are in turn
composed of a pai... | [
"A",
"list",
"in",
"which",
"each",
"item",
"consists",
"of",
"two",
"parts",
":",
"a",
"word",
"phrase",
"term",
"graphic",
"chemical",
"structure",
"or",
"equation",
"paired",
"with",
"one",
"of",
"more",
"descriptions",
"discussions",
"explanations",
"or",
... | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L1153-L1188 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.convert_ref_list_elements | def convert_ref_list_elements(self):
"""
List of references (citations) for an article, which is often called
“References”, “Bibliography”, or “Additional Reading”.
No distinction is made between lists of cited references and lists of
suggested references.
This method s... | python | def convert_ref_list_elements(self):
"""
List of references (citations) for an article, which is often called
“References”, “Bibliography”, or “Additional Reading”.
No distinction is made between lists of cited references and lists of
suggested references.
This method s... | [
"def",
"convert_ref_list_elements",
"(",
"self",
")",
":",
"#TODO: Handle nested ref-lists",
"for",
"ref_list",
"in",
"self",
".",
"main",
".",
"getroot",
"(",
")",
".",
"findall",
"(",
"'.//ref-list'",
")",
":",
"remove_all_attributes",
"(",
"ref_list",
")",
"r... | List of references (citations) for an article, which is often called
“References”, “Bibliography”, or “Additional Reading”.
No distinction is made between lists of cited references and lists of
suggested references.
This method should not be confused with the method(s) employed for the... | [
"List",
"of",
"references",
"(",
"citations",
")",
"for",
"an",
"article",
"which",
"is",
"often",
"called",
"“References”",
"“Bibliography”",
"or",
"“Additional",
"Reading”",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L1192-L1216 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.convert_table_wrap_elements | def convert_table_wrap_elements(self):
"""
Responsible for the correct conversion of JPTS 3.0 <table-wrap>
elements to EPUB content.
The 'id' attribute is treated as mandatory by this method.
"""
for table_wrap in self.main.getroot().findall('.//table-wrap'):
... | python | def convert_table_wrap_elements(self):
"""
Responsible for the correct conversion of JPTS 3.0 <table-wrap>
elements to EPUB content.
The 'id' attribute is treated as mandatory by this method.
"""
for table_wrap in self.main.getroot().findall('.//table-wrap'):
... | [
"def",
"convert_table_wrap_elements",
"(",
"self",
")",
":",
"for",
"table_wrap",
"in",
"self",
".",
"main",
".",
"getroot",
"(",
")",
".",
"findall",
"(",
"'.//table-wrap'",
")",
":",
"table_div",
"=",
"etree",
".",
"Element",
"(",
"'div'",
",",
"{",
"'... | Responsible for the correct conversion of JPTS 3.0 <table-wrap>
elements to EPUB content.
The 'id' attribute is treated as mandatory by this method. | [
"Responsible",
"for",
"the",
"correct",
"conversion",
"of",
"JPTS",
"3",
".",
"0",
"<table",
"-",
"wrap",
">",
"elements",
"to",
"EPUB",
"content",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L1220-L1323 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/publisher/plos.py | PLoS.convert_graphic_elements | def convert_graphic_elements(self):
"""
This is a method for the odd special cases where <graphic> elements are
standalone, or rather, not a part of a standard graphical element such
as a figure or a table. This method should always be employed after the
standard cases have alrea... | python | def convert_graphic_elements(self):
"""
This is a method for the odd special cases where <graphic> elements are
standalone, or rather, not a part of a standard graphical element such
as a figure or a table. This method should always be employed after the
standard cases have alrea... | [
"def",
"convert_graphic_elements",
"(",
"self",
")",
":",
"for",
"graphic",
"in",
"self",
".",
"main",
".",
"getroot",
"(",
")",
".",
"findall",
"(",
"'.//graphic'",
")",
":",
"graphic",
".",
"tag",
"=",
"'img'",
"graphic",
".",
"attrib",
"[",
"'alt'",
... | This is a method for the odd special cases where <graphic> elements are
standalone, or rather, not a part of a standard graphical element such
as a figure or a table. This method should always be employed after the
standard cases have already been handled. | [
"This",
"is",
"a",
"method",
"for",
"the",
"odd",
"special",
"cases",
"where",
"<graphic",
">",
"elements",
"are",
"standalone",
"or",
"rather",
"not",
"a",
"part",
"of",
"a",
"standard",
"graphical",
"element",
"such",
"as",
"a",
"figure",
"or",
"a",
"t... | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/publisher/plos.py#L1344-L1361 | train |
linkhub-sdk/popbill.py | popbill/messageService.py | MessageService.getChargeInfo | def getChargeInfo(self, CorpNum, MsgType, UserID=None):
""" 과금정보 확인
args
CorpNum : 회원 사업자번호
MsgType : 문자전송 유형
UserID : 팝빌 회원아이디
return
과금정보 객체
raise
PopbillException
"""
... | python | def getChargeInfo(self, CorpNum, MsgType, UserID=None):
""" 과금정보 확인
args
CorpNum : 회원 사업자번호
MsgType : 문자전송 유형
UserID : 팝빌 회원아이디
return
과금정보 객체
raise
PopbillException
"""
... | [
"def",
"getChargeInfo",
"(",
"self",
",",
"CorpNum",
",",
"MsgType",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"MsgType",
"==",
"None",
"or",
"MsgType",
"==",
"\"\"",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"전송유형이 입력되지 않았습니다.\")\r",
... | 과금정보 확인
args
CorpNum : 회원 사업자번호
MsgType : 문자전송 유형
UserID : 팝빌 회원아이디
return
과금정보 객체
raise
PopbillException | [
"과금정보",
"확인",
"args",
"CorpNum",
":",
"회원",
"사업자번호",
"MsgType",
":",
"문자전송",
"유형",
"UserID",
":",
"팝빌",
"회원아이디",
"return",
"과금정보",
"객체",
"raise",
"PopbillException"
] | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/messageService.py#L30-L44 | train |
linkhub-sdk/popbill.py | popbill/messageService.py | MessageService.sendSMS_multi | def sendSMS_multi(self, CorpNum, Sender, Contents, Messages, reserveDT, adsYN=False, UserID=None, RequestNum=None):
""" 단문 문자메시지 다량전송
args
CorpNum : 팝빌회원 사업자번호
Sender : 발신자번호 (동보전송용)
Contents : 문자 내용 (동보전송용)
Messages : 개별전송정보 배열
... | python | def sendSMS_multi(self, CorpNum, Sender, Contents, Messages, reserveDT, adsYN=False, UserID=None, RequestNum=None):
""" 단문 문자메시지 다량전송
args
CorpNum : 팝빌회원 사업자번호
Sender : 발신자번호 (동보전송용)
Contents : 문자 내용 (동보전송용)
Messages : 개별전송정보 배열
... | [
"def",
"sendSMS_multi",
"(",
"self",
",",
"CorpNum",
",",
"Sender",
",",
"Contents",
",",
"Messages",
",",
"reserveDT",
",",
"adsYN",
"=",
"False",
",",
"UserID",
"=",
"None",
",",
"RequestNum",
"=",
"None",
")",
":",
"return",
"self",
".",
"sendMessage"... | 단문 문자메시지 다량전송
args
CorpNum : 팝빌회원 사업자번호
Sender : 발신자번호 (동보전송용)
Contents : 문자 내용 (동보전송용)
Messages : 개별전송정보 배열
reserveDT : 예약전송시간 (형식. yyyyMMddHHmmss)
UserID : 팝빌회원 아이디
RequestNum : 전송요청번호
... | [
"단문",
"문자메시지",
"다량전송",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"Sender",
":",
"발신자번호",
"(",
"동보전송용",
")",
"Contents",
":",
"문자",
"내용",
"(",
"동보전송용",
")",
"Messages",
":",
"개별전송정보",
"배열",
"reserveDT",
":",
"예약전송시간",
"(",
"형식",
".",
"yyyyMMddHHmmss",
")... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/messageService.py#L104-L121 | train |
linkhub-sdk/popbill.py | popbill/messageService.py | MessageService.sendLMS | def sendLMS(self, CorpNum, Sender, Receiver, ReceiverName, Subject, Contents, reserveDT, adsYN=False, UserID=None,
SenderName=None, RequestNum=None):
""" 장문 문자메시지 단건 전송
args
CorpNum : 팝빌회원 사업자번호
Sender : 발신번호
Receiver : 수신번호
... | python | def sendLMS(self, CorpNum, Sender, Receiver, ReceiverName, Subject, Contents, reserveDT, adsYN=False, UserID=None,
SenderName=None, RequestNum=None):
""" 장문 문자메시지 단건 전송
args
CorpNum : 팝빌회원 사업자번호
Sender : 발신번호
Receiver : 수신번호
... | [
"def",
"sendLMS",
"(",
"self",
",",
"CorpNum",
",",
"Sender",
",",
"Receiver",
",",
"ReceiverName",
",",
"Subject",
",",
"Contents",
",",
"reserveDT",
",",
"adsYN",
"=",
"False",
",",
"UserID",
"=",
"None",
",",
"SenderName",
"=",
"None",
",",
"RequestNu... | 장문 문자메시지 단건 전송
args
CorpNum : 팝빌회원 사업자번호
Sender : 발신번호
Receiver : 수신번호
ReceiverName : 수신자명
Subject : 메시지 제목
Contents : 메시지 내용(2000Byte 초과시 길이가 조정되어 전송됨)
reserveDT : 예약전송시간 (형식. yyyyMMddHHm... | [
"장문",
"문자메시지",
"단건",
"전송",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"Sender",
":",
"발신번호",
"Receiver",
":",
"수신번호",
"ReceiverName",
":",
"수신자명",
"Subject",
":",
"메시지",
"제목",
"Contents",
":",
"메시지",
"내용",
"(",
"2000Byte",
"초과시",
"길이가",
"조정되어",
"전송됨",
")... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/messageService.py#L123-L154 | train |
linkhub-sdk/popbill.py | popbill/messageService.py | MessageService.sendLMS_multi | def sendLMS_multi(self, CorpNum, Sender, Subject, Contents, Messages, reserveDT, adsYN=False, UserID=None,
RequestNum=None):
""" 장문 문자메시지 다량전송
args
CorpNum : 팝빌회원 사업자번호
Sender : 발신자번호 (동보전송용)
Subject : 장문 메시지 제목 (동보전송용)
... | python | def sendLMS_multi(self, CorpNum, Sender, Subject, Contents, Messages, reserveDT, adsYN=False, UserID=None,
RequestNum=None):
""" 장문 문자메시지 다량전송
args
CorpNum : 팝빌회원 사업자번호
Sender : 발신자번호 (동보전송용)
Subject : 장문 메시지 제목 (동보전송용)
... | [
"def",
"sendLMS_multi",
"(",
"self",
",",
"CorpNum",
",",
"Sender",
",",
"Subject",
",",
"Contents",
",",
"Messages",
",",
"reserveDT",
",",
"adsYN",
"=",
"False",
",",
"UserID",
"=",
"None",
",",
"RequestNum",
"=",
"None",
")",
":",
"return",
"self",
... | 장문 문자메시지 다량전송
args
CorpNum : 팝빌회원 사업자번호
Sender : 발신자번호 (동보전송용)
Subject : 장문 메시지 제목 (동보전송용)
Contents : 장문 문자 내용 (동보전송용)
Messages : 개별전송정보 배열
reserveDT : 예약시간 (형식. yyyyMMddHHmmss)
UserID : 팝... | [
"장문",
"문자메시지",
"다량전송",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"Sender",
":",
"발신자번호",
"(",
"동보전송용",
")",
"Subject",
":",
"장문",
"메시지",
"제목",
"(",
"동보전송용",
")",
"Contents",
":",
"장문",
"문자",
"내용",
"(",
"동보전송용",
")",
"Messages",
":",
"개별전송정보",
"배열",
... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/messageService.py#L156-L175 | train |
linkhub-sdk/popbill.py | popbill/messageService.py | MessageService.sendMMS_Multi | def sendMMS_Multi(self, CorpNum, Sender, Subject, Contents, Messages, FilePath, reserveDT, adsYN=False, UserID=None,
RequestNum=None):
""" 멀티 문자메시지 다량 전송
args
CorpNum : 팝빌회원 사업자번호
Sender : 발신자번호 (동보전송용)
Subject : 장문 메시지 제목 (... | python | def sendMMS_Multi(self, CorpNum, Sender, Subject, Contents, Messages, FilePath, reserveDT, adsYN=False, UserID=None,
RequestNum=None):
""" 멀티 문자메시지 다량 전송
args
CorpNum : 팝빌회원 사업자번호
Sender : 발신자번호 (동보전송용)
Subject : 장문 메시지 제목 (... | [
"def",
"sendMMS_Multi",
"(",
"self",
",",
"CorpNum",
",",
"Sender",
",",
"Subject",
",",
"Contents",
",",
"Messages",
",",
"FilePath",
",",
"reserveDT",
",",
"adsYN",
"=",
"False",
",",
"UserID",
"=",
"None",
",",
"RequestNum",
"=",
"None",
")",
":",
"... | 멀티 문자메시지 다량 전송
args
CorpNum : 팝빌회원 사업자번호
Sender : 발신자번호 (동보전송용)
Subject : 장문 메시지 제목 (동보전송용)
Contents : 장문 문자 내용 (동보전송용)
Messages : 개별전송정보 배열
FilePath : 전송하고자 하는 파일 경로
reserveDT : 예약전송시간 (형... | [
"멀티",
"문자메시지",
"다량",
"전송",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"Sender",
":",
"발신자번호",
"(",
"동보전송용",
")",
"Subject",
":",
"장문",
"메시지",
"제목",
"(",
"동보전송용",
")",
"Contents",
":",
"장문",
"문자",
"내용",
"(",
"동보전송용",
")",
"Messages",
":",
"개별전송정보",
"배... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/messageService.py#L210-L261 | train |
linkhub-sdk/popbill.py | popbill/messageService.py | MessageService.sendMessage | def sendMessage(self, MsgType, CorpNum, Sender, SenderName, Subject, Contents, Messages, reserveDT, adsYN=False,
UserID=None, RequestNum=None):
""" 문자 메시지 전송
args
MsgType : 문자 전송 유형(단문:SMS, 장문:LMS, 단/장문:XMS)
CorpNum : 팝빌회원 사업자번호
... | python | def sendMessage(self, MsgType, CorpNum, Sender, SenderName, Subject, Contents, Messages, reserveDT, adsYN=False,
UserID=None, RequestNum=None):
""" 문자 메시지 전송
args
MsgType : 문자 전송 유형(단문:SMS, 장문:LMS, 단/장문:XMS)
CorpNum : 팝빌회원 사업자번호
... | [
"def",
"sendMessage",
"(",
"self",
",",
"MsgType",
",",
"CorpNum",
",",
"Sender",
",",
"SenderName",
",",
"Subject",
",",
"Contents",
",",
"Messages",
",",
"reserveDT",
",",
"adsYN",
"=",
"False",
",",
"UserID",
"=",
"None",
",",
"RequestNum",
"=",
"None... | 문자 메시지 전송
args
MsgType : 문자 전송 유형(단문:SMS, 장문:LMS, 단/장문:XMS)
CorpNum : 팝빌회원 사업자번호
Sender : 발신자번호 (동보전송용)
Subject : 장문 메시지 제목 (동보전송용)
Contents : 장문 문자 내용 (동보전송용)
Messages : 개별전송정보 배열
reserve... | [
"문자",
"메시지",
"전송",
"args",
"MsgType",
":",
"문자",
"전송",
"유형",
"(",
"단문",
":",
"SMS",
"장문",
":",
"LMS",
"단",
"/",
"장문",
":",
"XMS",
")",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"Sender",
":",
"발신자번호",
"(",
"동보전송용",
")",
"Subject",
":",
"장문",
"메시지",
"제목"... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/messageService.py#L316-L363 | train |
linkhub-sdk/popbill.py | popbill/messageService.py | MessageService.getMessages | def getMessages(self, CorpNum, ReceiptNum, UserID=None):
""" 문자 전송결과 조회
args
CorpNum : 팝빌회원 사업자번호
ReceiptNum : 전송요청시 발급받은 접수번호
UserID : 팝빌회원 아이디
return
전송정보 as list
raise
PopbillException... | python | def getMessages(self, CorpNum, ReceiptNum, UserID=None):
""" 문자 전송결과 조회
args
CorpNum : 팝빌회원 사업자번호
ReceiptNum : 전송요청시 발급받은 접수번호
UserID : 팝빌회원 아이디
return
전송정보 as list
raise
PopbillException... | [
"def",
"getMessages",
"(",
"self",
",",
"CorpNum",
",",
"ReceiptNum",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"ReceiptNum",
"==",
"None",
"or",
"len",
"(",
"ReceiptNum",
")",
"!=",
"18",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
... | 문자 전송결과 조회
args
CorpNum : 팝빌회원 사업자번호
ReceiptNum : 전송요청시 발급받은 접수번호
UserID : 팝빌회원 아이디
return
전송정보 as list
raise
PopbillException | [
"문자",
"전송결과",
"조회",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"ReceiptNum",
":",
"전송요청시",
"발급받은",
"접수번호",
"UserID",
":",
"팝빌회원",
"아이디",
"return",
"전송정보",
"as",
"list",
"raise",
"PopbillException"
] | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/messageService.py#L365-L379 | train |
linkhub-sdk/popbill.py | popbill/messageService.py | MessageService.getMessagesRN | def getMessagesRN(self, CorpNum, RequestNum, UserID=None):
""" 문자 전송결과 조회
args
CorpNum : 팝빌회원 사업자번호
RequestNum : 전송요청시 할당한 전송요청번호
UserID : 팝빌회원 아이디
return
전송정보 as list
raise
PopbillExcept... | python | def getMessagesRN(self, CorpNum, RequestNum, UserID=None):
""" 문자 전송결과 조회
args
CorpNum : 팝빌회원 사업자번호
RequestNum : 전송요청시 할당한 전송요청번호
UserID : 팝빌회원 아이디
return
전송정보 as list
raise
PopbillExcept... | [
"def",
"getMessagesRN",
"(",
"self",
",",
"CorpNum",
",",
"RequestNum",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"RequestNum",
"==",
"None",
"or",
"RequestNum",
"==",
"''",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"요청번호가 입력되지 않았습니다.\... | 문자 전송결과 조회
args
CorpNum : 팝빌회원 사업자번호
RequestNum : 전송요청시 할당한 전송요청번호
UserID : 팝빌회원 아이디
return
전송정보 as list
raise
PopbillException | [
"문자",
"전송결과",
"조회",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"RequestNum",
":",
"전송요청시",
"할당한",
"전송요청번호",
"UserID",
":",
"팝빌회원",
"아이디",
"return",
"전송정보",
"as",
"list",
"raise",
"PopbillException"
] | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/messageService.py#L381-L395 | train |
linkhub-sdk/popbill.py | popbill/messageService.py | MessageService.cancelReserveRN | def cancelReserveRN(self, CorpNum, RequestNum, UserID=None):
""" 문자 예약전송 취소
args
CorpNum : 팝빌회원 사업자번호
RequestNum : 전송요청시 할당한 전송요청번호
UserID : 팝빌회원 아이디
return
처리결과. consist of code and message
raise
... | python | def cancelReserveRN(self, CorpNum, RequestNum, UserID=None):
""" 문자 예약전송 취소
args
CorpNum : 팝빌회원 사업자번호
RequestNum : 전송요청시 할당한 전송요청번호
UserID : 팝빌회원 아이디
return
처리결과. consist of code and message
raise
... | [
"def",
"cancelReserveRN",
"(",
"self",
",",
"CorpNum",
",",
"RequestNum",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"RequestNum",
"==",
"None",
"or",
"RequestNum",
"==",
"''",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"요청번호가 입력되지 않았습니다... | 문자 예약전송 취소
args
CorpNum : 팝빌회원 사업자번호
RequestNum : 전송요청시 할당한 전송요청번호
UserID : 팝빌회원 아이디
return
처리결과. consist of code and message
raise
PopbillException | [
"문자",
"예약전송",
"취소",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"RequestNum",
":",
"전송요청시",
"할당한",
"전송요청번호",
"UserID",
":",
"팝빌회원",
"아이디",
"return",
"처리결과",
".",
"consist",
"of",
"code",
"and",
"message",
"raise",
"PopbillException"
] | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/messageService.py#L413-L427 | train |
linkhub-sdk/popbill.py | popbill/messageService.py | MessageService.getURL | def getURL(self, CorpNum, UserID, ToGo):
""" 문자 관련 팝빌 URL
args
CorpNum : 팝빌회원 사업자번호
UserID : 팝빌회원 아이디
TOGO : BOX (전송내역조회 팝업)
return
팝빌 URL
raise
PopbillException
"""
if ... | python | def getURL(self, CorpNum, UserID, ToGo):
""" 문자 관련 팝빌 URL
args
CorpNum : 팝빌회원 사업자번호
UserID : 팝빌회원 아이디
TOGO : BOX (전송내역조회 팝업)
return
팝빌 URL
raise
PopbillException
"""
if ... | [
"def",
"getURL",
"(",
"self",
",",
"CorpNum",
",",
"UserID",
",",
"ToGo",
")",
":",
"if",
"ToGo",
"==",
"None",
"or",
"ToGo",
"==",
"''",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"TOGO값이 입력되지 않았습니다.\")\r",
"",
"result",
"=",
"self",... | 문자 관련 팝빌 URL
args
CorpNum : 팝빌회원 사업자번호
UserID : 팝빌회원 아이디
TOGO : BOX (전송내역조회 팝업)
return
팝빌 URL
raise
PopbillException | [
"문자",
"관련",
"팝빌",
"URL",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"UserID",
":",
"팝빌회원",
"아이디",
"TOGO",
":",
"BOX",
"(",
"전송내역조회",
"팝업",
")",
"return",
"팝빌",
"URL",
"raise",
"PopbillException"
] | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/messageService.py#L468-L484 | train |
linkhub-sdk/popbill.py | popbill/messageService.py | MessageService.getStates | def getStates(self, Corpnum, reciptNumList, UserID=None):
""" 전송내역 요약정보 확인
args
CorpNum : 팝빌회원 사업자번호
reciptNumList : 문자전송 접수번호 배열
UserID : 팝빌회원 아이디
return
전송정보 as list
raise
PopbillExcept... | python | def getStates(self, Corpnum, reciptNumList, UserID=None):
""" 전송내역 요약정보 확인
args
CorpNum : 팝빌회원 사업자번호
reciptNumList : 문자전송 접수번호 배열
UserID : 팝빌회원 아이디
return
전송정보 as list
raise
PopbillExcept... | [
"def",
"getStates",
"(",
"self",
",",
"Corpnum",
",",
"reciptNumList",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"reciptNumList",
"==",
"None",
"or",
"len",
"(",
"reciptNumList",
")",
"<",
"1",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",... | 전송내역 요약정보 확인
args
CorpNum : 팝빌회원 사업자번호
reciptNumList : 문자전송 접수번호 배열
UserID : 팝빌회원 아이디
return
전송정보 as list
raise
PopbillException | [
"전송내역",
"요약정보",
"확인",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"reciptNumList",
":",
"문자전송",
"접수번호",
"배열",
"UserID",
":",
"팝빌회원",
"아이디",
"return",
"전송정보",
"as",
"list",
"raise",
"PopbillException"
] | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/messageService.py#L524-L540 | train |
MSchnei/pyprf_feature | pyprf_feature/analysis/old/pRF_fitBetaCurve.py | funcGauss1D | def funcGauss1D(x, mu, sig):
""" Create 1D Gaussian. Source:
http://mathworld.wolfram.com/GaussianFunction.html
"""
arrOut = np.exp(-np.power((x - mu)/sig, 2.)/2)
# normalize
arrOut = arrOut/(np.sqrt(2.*np.pi)*sig)
return arrOut | python | def funcGauss1D(x, mu, sig):
""" Create 1D Gaussian. Source:
http://mathworld.wolfram.com/GaussianFunction.html
"""
arrOut = np.exp(-np.power((x - mu)/sig, 2.)/2)
# normalize
arrOut = arrOut/(np.sqrt(2.*np.pi)*sig)
return arrOut | [
"def",
"funcGauss1D",
"(",
"x",
",",
"mu",
",",
"sig",
")",
":",
"arrOut",
"=",
"np",
".",
"exp",
"(",
"-",
"np",
".",
"power",
"(",
"(",
"x",
"-",
"mu",
")",
"/",
"sig",
",",
"2.",
")",
"/",
"2",
")",
"# normalize",
"arrOut",
"=",
"arrOut",
... | Create 1D Gaussian. Source:
http://mathworld.wolfram.com/GaussianFunction.html | [
"Create",
"1D",
"Gaussian",
".",
"Source",
":",
"http",
":",
"//",
"mathworld",
".",
"wolfram",
".",
"com",
"/",
"GaussianFunction",
".",
"html"
] | 49004ede7ae1ddee07a30afe9ce3e2776750805c | https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/old/pRF_fitBetaCurve.py#L77-L85 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/commands/configure.py | absolute_path | def absolute_path(user_path):
"""
Some paths must be made absolute, this will attempt to convert them.
"""
if os.path.abspath(user_path):
return unix_path_coercion(user_path)
else:
try:
openaccess_epub.utils.evaluate_relative_path(relative=user_path)
except:
... | python | def absolute_path(user_path):
"""
Some paths must be made absolute, this will attempt to convert them.
"""
if os.path.abspath(user_path):
return unix_path_coercion(user_path)
else:
try:
openaccess_epub.utils.evaluate_relative_path(relative=user_path)
except:
... | [
"def",
"absolute_path",
"(",
"user_path",
")",
":",
"if",
"os",
".",
"path",
".",
"abspath",
"(",
"user_path",
")",
":",
"return",
"unix_path_coercion",
"(",
"user_path",
")",
"else",
":",
"try",
":",
"openaccess_epub",
".",
"utils",
".",
"evaluate_relative_... | Some paths must be made absolute, this will attempt to convert them. | [
"Some",
"paths",
"must",
"be",
"made",
"absolute",
"this",
"will",
"attempt",
"to",
"convert",
"them",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/commands/configure.py#L131-L141 | train |
SavinaRoja/OpenAccess_EPUB | src/openaccess_epub/commands/configure.py | configure | def configure(default=None, dev=None):
"""
The inner control loops for user interaction during quickstart
configuration.
"""
cache_loc = openaccess_epub.utils.cache_location()
config_loc = openaccess_epub.utils.config_location()
#Make the cache directory
openaccess_epub.utils.mkdir_p(ca... | python | def configure(default=None, dev=None):
"""
The inner control loops for user interaction during quickstart
configuration.
"""
cache_loc = openaccess_epub.utils.cache_location()
config_loc = openaccess_epub.utils.config_location()
#Make the cache directory
openaccess_epub.utils.mkdir_p(ca... | [
"def",
"configure",
"(",
"default",
"=",
"None",
",",
"dev",
"=",
"None",
")",
":",
"cache_loc",
"=",
"openaccess_epub",
".",
"utils",
".",
"cache_location",
"(",
")",
"config_loc",
"=",
"openaccess_epub",
".",
"utils",
".",
"config_location",
"(",
")",
"#... | The inner control loops for user interaction during quickstart
configuration. | [
"The",
"inner",
"control",
"loops",
"for",
"user",
"interaction",
"during",
"quickstart",
"configuration",
"."
] | 6b77ba30b7394fd003920e7a7957bca963a90656 | https://github.com/SavinaRoja/OpenAccess_EPUB/blob/6b77ba30b7394fd003920e7a7957bca963a90656/src/openaccess_epub/commands/configure.py#L191-L344 | train |
linkhub-sdk/popbill.py | popbill/taxinvoiceService.py | TaxinvoiceService.getCertificateExpireDate | def getCertificateExpireDate(self, CorpNum):
""" 공인인증서 만료일 확인, 등록여부 확인용도로 활용가능
args
CorpNum : 확인할 회원 사업자번호
return
등록시 만료일자, 미등록시 해당 PopbillException raise.
raise
PopbillException
"""
result = self._httpget('/Taxi... | python | def getCertificateExpireDate(self, CorpNum):
""" 공인인증서 만료일 확인, 등록여부 확인용도로 활용가능
args
CorpNum : 확인할 회원 사업자번호
return
등록시 만료일자, 미등록시 해당 PopbillException raise.
raise
PopbillException
"""
result = self._httpget('/Taxi... | [
"def",
"getCertificateExpireDate",
"(",
"self",
",",
"CorpNum",
")",
":",
"result",
"=",
"self",
".",
"_httpget",
"(",
"'/Taxinvoice?cfg=CERT'",
",",
"CorpNum",
")",
"return",
"datetime",
".",
"strptime",
"(",
"result",
".",
"certificateExpiration",
",",
"'%Y%m%... | 공인인증서 만료일 확인, 등록여부 확인용도로 활용가능
args
CorpNum : 확인할 회원 사업자번호
return
등록시 만료일자, 미등록시 해당 PopbillException raise.
raise
PopbillException | [
"공인인증서",
"만료일",
"확인",
"등록여부",
"확인용도로",
"활용가능",
"args",
"CorpNum",
":",
"확인할",
"회원",
"사업자번호",
"return",
"등록시",
"만료일자",
"미등록시",
"해당",
"PopbillException",
"raise",
".",
"raise",
"PopbillException"
] | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L72-L82 | train |
linkhub-sdk/popbill.py | popbill/taxinvoiceService.py | TaxinvoiceService.checkMgtKeyInUse | def checkMgtKeyInUse(self, CorpNum, MgtKeyType, MgtKey):
""" 파트너 관리번호 사용중 여부 확인.
args
CorpNum : 회원 사업자 번호
MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE']
MgtKey : 파트너 관리번호
return
사용중 여부 by True/False
raise
... | python | def checkMgtKeyInUse(self, CorpNum, MgtKeyType, MgtKey):
""" 파트너 관리번호 사용중 여부 확인.
args
CorpNum : 회원 사업자 번호
MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE']
MgtKey : 파트너 관리번호
return
사용중 여부 by True/False
raise
... | [
"def",
"checkMgtKeyInUse",
"(",
"self",
",",
"CorpNum",
",",
"MgtKeyType",
",",
"MgtKey",
")",
":",
"if",
"MgtKeyType",
"not",
"in",
"self",
".",
"__MgtKeyTypes",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"관리번호 형태가 올바르지 않습니다.\")",
"",
"if"... | 파트너 관리번호 사용중 여부 확인.
args
CorpNum : 회원 사업자 번호
MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE']
MgtKey : 파트너 관리번호
return
사용중 여부 by True/False
raise
PopbillException | [
"파트너",
"관리번호",
"사용중",
"여부",
"확인",
".",
"args",
"CorpNum",
":",
"회원",
"사업자",
"번호",
"MgtKeyType",
":",
"관리번호",
"유형",
"one",
"of",
"[",
"SELL",
"BUY",
"TRUSTEE",
"]",
"MgtKey",
":",
"파트너",
"관리번호",
"return",
"사용중",
"여부",
"by",
"True",
"/",
"False",
"ra... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L95-L117 | train |
linkhub-sdk/popbill.py | popbill/taxinvoiceService.py | TaxinvoiceService.register | def register(self, CorpNum, taxinvoice, writeSpecification=False, UserID=None):
""" 임시저장
args
CorpNum : 회원 사업자 번호
taxinvoice : 등록할 세금계산서 object. Made with Taxinvoice(...)
writeSpecification : 등록시 거래명세서 동시 작성 여부
UserID : 팝빌 회원아이디
... | python | def register(self, CorpNum, taxinvoice, writeSpecification=False, UserID=None):
""" 임시저장
args
CorpNum : 회원 사업자 번호
taxinvoice : 등록할 세금계산서 object. Made with Taxinvoice(...)
writeSpecification : 등록시 거래명세서 동시 작성 여부
UserID : 팝빌 회원아이디
... | [
"def",
"register",
"(",
"self",
",",
"CorpNum",
",",
"taxinvoice",
",",
"writeSpecification",
"=",
"False",
",",
"UserID",
"=",
"None",
")",
":",
"if",
"taxinvoice",
"==",
"None",
":",
"raise",
"PopbillException",
"(",
"-",
"99999999",
",",
"\"등록할 세금계산서 정보가 ... | 임시저장
args
CorpNum : 회원 사업자 번호
taxinvoice : 등록할 세금계산서 object. Made with Taxinvoice(...)
writeSpecification : 등록시 거래명세서 동시 작성 여부
UserID : 팝빌 회원아이디
return
처리결과. consist of code and message
raise
... | [
"임시저장",
"args",
"CorpNum",
":",
"회원",
"사업자",
"번호",
"taxinvoice",
":",
"등록할",
"세금계산서",
"object",
".",
"Made",
"with",
"Taxinvoice",
"(",
"...",
")",
"writeSpecification",
":",
"등록시",
"거래명세서",
"동시",
"작성",
"여부",
"UserID",
":",
"팝빌",
"회원아이디",
"return",
"처리결과... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L119-L138 | train |
linkhub-sdk/popbill.py | popbill/taxinvoiceService.py | TaxinvoiceService.registIssue | def registIssue(self, CorpNum, taxinvoice, writeSpecification=False, forceIssue=False, dealInvoiceMgtKey=None,
memo=None, emailSubject=None, UserID=None):
""" 즉시 발행
args
CorpNum : 팝빌회원 사업자번호
taxinvoice : 세금계산서 객체
writeSpecification ... | python | def registIssue(self, CorpNum, taxinvoice, writeSpecification=False, forceIssue=False, dealInvoiceMgtKey=None,
memo=None, emailSubject=None, UserID=None):
""" 즉시 발행
args
CorpNum : 팝빌회원 사업자번호
taxinvoice : 세금계산서 객체
writeSpecification ... | [
"def",
"registIssue",
"(",
"self",
",",
"CorpNum",
",",
"taxinvoice",
",",
"writeSpecification",
"=",
"False",
",",
"forceIssue",
"=",
"False",
",",
"dealInvoiceMgtKey",
"=",
"None",
",",
"memo",
"=",
"None",
",",
"emailSubject",
"=",
"None",
",",
"UserID",
... | 즉시 발행
args
CorpNum : 팝빌회원 사업자번호
taxinvoice : 세금계산서 객체
writeSpecification : 거래명세서 동시작성 여부
forceIssue : 지연발행 강제여부
dealInvoiceMgtKey : 거래명세서 문서관리번호
memo : 메모
emailSubject : 메일제목, 미기재시 기본제목으로 전송
... | [
"즉시",
"발행",
"args",
"CorpNum",
":",
"팝빌회원",
"사업자번호",
"taxinvoice",
":",
"세금계산서",
"객체",
"writeSpecification",
":",
"거래명세서",
"동시작성",
"여부",
"forceIssue",
":",
"지연발행",
"강제여부",
"dealInvoiceMgtKey",
":",
"거래명세서",
"문서관리번호",
"memo",
":",
"메모",
"emailSubject",
":",
"... | 68a0dd7f7a937603318e93be321fde73c50b96cc | https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L140-L174 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.