sentence1
stringlengths
52
3.87M
sentence2
stringlengths
1
47.2k
label
stringclasses
1 value
def Mx(mt, x): """ Return the Mx """ n = len(mt.Cx) sum1 = 0 for j in range(x, n): k = mt.Cx[j] sum1 += k return sum1
Return the Mx
entailment
def nEx(mt, x, n): """ nEx : Returns the EPV of a pure endowment (deferred capital). Pure endowment benefits are conditional on the survival of the policyholder. (v^n * npx) """ return mt.Dx[x + n] / mt.Dx[x]
nEx : Returns the EPV of a pure endowment (deferred capital). Pure endowment benefits are conditional on the survival of the policyholder. (v^n * npx)
entailment
def Axn(mt, x, n): """ (A^1)x:n : Returns the EPV (net single premium) of a term insurance. """ return (mt.Mx[x] - mt.Mx[x + n]) / mt.Dx[x]
(A^1)x:n : Returns the EPV (net single premium) of a term insurance.
entailment
def AExn(mt, x, n): """ AExn : Returns the EPV of a endowment insurance. An endowment insurance provides a combination of a term insurance and a pure endowment """ return (mt.Mx[x] - mt.Mx[x + n]) / mt.Dx[x] + mt.Dx[x + n] / mt.Dx[x]
AExn : Returns the EPV of a endowment insurance. An endowment insurance provides a combination of a term insurance and a pure endowment
entailment
def tAx(mt, x, t): """ n/Ax : Returns the EPV (net single premium) of a deferred whole life insurance. """ return mt.Mx[x + t] / mt.Dx[x]
n/Ax : Returns the EPV (net single premium) of a deferred whole life insurance.
entailment
def qAx(mt, x, q): """ This function evaluates the APV of a geometrically increasing annual annuity-due """ q = float(q) j = (mt.i - q) / (1 + q) mtj = Actuarial(nt=mt.nt, i=j) return Ax(mtj, x)
This function evaluates the APV of a geometrically increasing annual annuity-due
entailment
def aaxn(mt, x, n, m=1): """ Γ€xn : Return the actuarial present value of a (immediate) temporal (term certain) annuity: n-year temporary life annuity-anticipatory. Payable 'm' per year at the beginning of the period """ if m == 1: return (mt.Nx[x] - mt.Nx[x + n]) / mt.Dx[x] else: r...
Γ€xn : Return the actuarial present value of a (immediate) temporal (term certain) annuity: n-year temporary life annuity-anticipatory. Payable 'm' per year at the beginning of the period
entailment
def aax(mt, x, m=1): """ Γ€x : Returns the actuarial present value of an (immediate) annuity of 1 per time period (whole life annuity-anticipatory). Payable 'm' per year at the beginning of the period """ return mt.Nx[x] / mt.Dx[x] - (float(m - 1) / float(m * 2))
Γ€x : Returns the actuarial present value of an (immediate) annuity of 1 per time period (whole life annuity-anticipatory). Payable 'm' per year at the beginning of the period
entailment
def ax(mt, x, m=1): """ ax : Returns the actuarial present value of an (immediate) annuity of 1 per time period (whole life annuity-late). Payable 'm' per year at the ends of the period """ return (mt.Nx[x] / mt.Dx[x] - 1) + (float(m - 1) / float(m * 2))
ax : Returns the actuarial present value of an (immediate) annuity of 1 per time period (whole life annuity-late). Payable 'm' per year at the ends of the period
entailment
def taax(mt, x, t, m=1): """ n/Γ€x : Return the actuarial present value of a deferred annuity (deferred n years): n-year deferred whole life annuity-anticipatory. Payable 'm' per year at the beginning of the period """ return mt.Nx[x + t] / mt.Dx[x] - ((float(m - 1) / float(m * 2)) * (1 - nEx(mt, x, t)...
n/Γ€x : Return the actuarial present value of a deferred annuity (deferred n years): n-year deferred whole life annuity-anticipatory. Payable 'm' per year at the beginning of the period
entailment
def Iaaxn(mt, x, n, *args): """ during a term certain, IAn """ return (Sx(mt, x) - Sx(nt, x + n) - n * Nx(nt, x + n)) / Dx(nt, x)
during a term certain, IAn
entailment
def Iaxn(mt, x, n, *args): """ during a term certain, IAn """ return (Sx(mt, x + 1) - Sx(mt, x + n + 1) - n * Nx(mt, x + n + 1)) / Dx(mt, x)
during a term certain, IAn
entailment
def Iaax(mt, x, *args): """ (IΓ€)x : Returns the present value of annuity-certain at the beginning of the first year and increasing linerly. Arithmetically increasing annuity-anticipatory """ return Sx(mt, x) / Dx(mt, x)
(IΓ€)x : Returns the present value of annuity-certain at the beginning of the first year and increasing linerly. Arithmetically increasing annuity-anticipatory
entailment
def Iax(mt, x, *args): """ (Ia)x : Returns the present value of annuity-certain at the end of the first year and increasing linerly. Arithmetically increasing annuity-late """ return Sx(mt, x + 1) / Dx(mt, x)
(Ia)x : Returns the present value of annuity-certain at the end of the first year and increasing linerly. Arithmetically increasing annuity-late
entailment
def Itaax(mt, x, t): """ deffered t years """ return (Sx(mt, x) - Sx(mt, x + t)) / Dx(mt, x)
deffered t years
entailment
def Itax(mt, x, t): """ deffered t years """ return (Sx(mt, x + 1) - Sx(mt, x + t + 1)) / Dx(mt, x)
deffered t years
entailment
def qax(mt, x, q, m=1): """ geometrica """ q = float(q) j = (mt.i - q) / (1 + q) mtj = Actuarial(nt=mt.nt, i=j) return ax(mtj, x, m)
geometrica
entailment
def qaax(mt, x, q, m=1): """ geometrica """ q = float(q) j = (mt.i - q) / (1 + q) mtj = Actuarial(nt=mt.nt, i=j) return aax(mtj, x, m)
geometrica
entailment
def qaxn(mt, x, n, q, m=1): """ geometrica """ q = float(q) j = (mt.i - q) / (1 + q) mtj = Actuarial(nt=mt.nt, i=j) return axn(mtj, x, n, m)
geometrica
entailment
def qaaxn(mt, x, n, q, m = 1): """ geometrica """ #i = float(nt[1]) q = float(q) j = (mt.i - q) / (1 + q) mtj = Actuarial(nt=mt.nt, i=j) return aaxn(mtj, x, n, m)
geometrica
entailment
def qtax(mt, x, t, q, m=1): """ geometrica """ q = float(q) j = (mt.i - q) / (1 + q) mtj = Actuarial(nt=mt.nt, i=j) return tax(mtj, x, t) + ((float(m - 1) / float(m * 2)) * (1 - nEx(mt, x, t)))
geometrica
entailment
def qtaax(mt, x, t, q, m=1): """ geometrica """ q = float(q) j = (mt.i - q) / (1 + q) mtj = Actuarial(nt=mt.nt, i=j) return taax(mtj, x, t) - ((float(m - 1) / float(m * 2)) * (1 - nEx(mt, x, t)))
geometrica
entailment
def annuity(mt, x, n, p, m=1 , *args): """Syntax: annuity(nt, x, n, p, m, ['a/g', q], -d) Args: mt = the mortality table x = the age as integer number. n = A integer number (term of insurance in years) or 'w' = whole-life. (Also, 99 years is defined to be whole-life). ...
Syntax: annuity(nt, x, n, p, m, ['a/g', q], -d) Args: mt = the mortality table x = the age as integer number. n = A integer number (term of insurance in years) or 'w' = whole-life. (Also, 99 years is defined to be whole-life). p = Moment of payment. Syntaxis: 0 = begi...
entailment
def _meanvalueattr(self,v): """ find new position of vertex v according to adjacency in prevlayer. position is given by the mean value of adjacent positions. experiments show that meanvalue heuristic performs better than median. """ sug = self.layout if not self.p...
find new position of vertex v according to adjacency in prevlayer. position is given by the mean value of adjacent positions. experiments show that meanvalue heuristic performs better than median.
entailment
def _medianindex(self,v): """ find new position of vertex v according to adjacency in layer l+dir. position is given by the median value of adjacent positions. median heuristic is proven to achieve at most 3 times the minimum of crossings (while barycenter achieve in theory the o...
find new position of vertex v according to adjacency in layer l+dir. position is given by the median value of adjacent positions. median heuristic is proven to achieve at most 3 times the minimum of crossings (while barycenter achieve in theory the order of |V|)
entailment
def _neighbors(self,v): """ neighbors refer to upper/lower adjacent nodes. Note that v.N() provides neighbors of v in the graph, while this method provides the Vertex and DummyVertex adjacent to v in the upper or lower layer (depending on layout.dirv state). """ a...
neighbors refer to upper/lower adjacent nodes. Note that v.N() provides neighbors of v in the graph, while this method provides the Vertex and DummyVertex adjacent to v in the upper or lower layer (depending on layout.dirv state).
entailment
def _crossings(self): """ counts (inefficently but at least accurately) the number of crossing edges between layer l and l+dirv. P[i][j] counts the number of crossings from j-th edge of vertex i. The total count of crossings is the sum of flattened P: x = sum(sum(P,[])) ...
counts (inefficently but at least accurately) the number of crossing edges between layer l and l+dirv. P[i][j] counts the number of crossings from j-th edge of vertex i. The total count of crossings is the sum of flattened P: x = sum(sum(P,[]))
entailment
def _cc(self): """ implementation of the efficient bilayer cross counting by insert-sort (see Barth & Mutzel paper "Simple and Efficient Bilayer Cross Counting") """ g=self.layout.grx P=[] for v in self: P.extend(sorted([g[x].pos for x in self._neighbo...
implementation of the efficient bilayer cross counting by insert-sort (see Barth & Mutzel paper "Simple and Efficient Bilayer Cross Counting")
entailment
def init_all(self,roots=None,inverted_edges=None,optimize=False): """initializes the layout algorithm by computing roots (unless provided), inverted edges (unless provided), vertices ranks and creates all dummy vertices and layers. Parameters: ro...
initializes the layout algorithm by computing roots (unless provided), inverted edges (unless provided), vertices ranks and creates all dummy vertices and layers. Parameters: roots (list[Vertex]): set *root* vertices (layer 0) inverted_ed...
entailment
def draw(self,N=1.5): """compute every node coordinates after converging to optimal ordering by N rounds, and finally perform the edge routing. """ while N>0.5: for (l,mvmt) in self.ordering_step(): pass N = N-1 if N>0: for (...
compute every node coordinates after converging to optimal ordering by N rounds, and finally perform the edge routing.
entailment
def rank_all(self,roots,optimize=False): """Computes rank of all vertices. add provided roots to rank 0 vertices, otherwise update ranking from provided roots. The initial rank is based on precedence relationships, optimal ranking may be derived from network flow (simplex). ...
Computes rank of all vertices. add provided roots to rank 0 vertices, otherwise update ranking from provided roots. The initial rank is based on precedence relationships, optimal ranking may be derived from network flow (simplex).
entailment
def _rank_init(self,unranked): """Computes rank of provided unranked list of vertices and all their children. A vertex will be asign a rank when all its inward edges have been *scanned*. When a vertex is asigned a rank, its outward edges are marked *scanned*. """ ...
Computes rank of provided unranked list of vertices and all their children. A vertex will be asign a rank when all its inward edges have been *scanned*. When a vertex is asigned a rank, its outward edges are marked *scanned*.
entailment
def _rank_optimize(self): """optimize ranking by pushing long edges toward lower layers as much as possible. see other interersting network flow solver to minimize total edge length (http://jgaa.info/accepted/2005/EiglspergerSiebenhallerKaufmann2005.9.3.pdf) """ assert self.dag ...
optimize ranking by pushing long edges toward lower layers as much as possible. see other interersting network flow solver to minimize total edge length (http://jgaa.info/accepted/2005/EiglspergerSiebenhallerKaufmann2005.9.3.pdf)
entailment
def setrank(self,v): """set rank value for vertex v and add it to the corresponding layer. The Layer is created if it is the first vertex with this rank. """ assert self.dag r=max([self.grx[x].rank for x in v.N(-1)]+[-1])+1 self.grx[v].rank=r # add it to its la...
set rank value for vertex v and add it to the corresponding layer. The Layer is created if it is the first vertex with this rank.
entailment
def dummyctrl(self,r,ctrl): """creates a DummyVertex at rank r inserted in the ctrl dict of the associated edge and layer. Arguments: r (int): rank value ctrl (dict): the edge's control vertices Returns: DummyVertex : the cr...
creates a DummyVertex at rank r inserted in the ctrl dict of the associated edge and layer. Arguments: r (int): rank value ctrl (dict): the edge's control vertices Returns: DummyVertex : the created DummyVertex.
entailment
def setdummies(self,e): """creates and defines all needed dummy vertices for edge e. """ v0,v1 = e.v r0,r1 = self.grx[v0].rank,self.grx[v1].rank if r0>r1: assert e in self.alt_e v0,v1 = v1,v0 r0,r1 = r1,r0 if (r1-r0)>1: # "d...
creates and defines all needed dummy vertices for edge e.
entailment
def draw_step(self): """iterator that computes all vertices coordinates and edge routing after just one step (one layer after the other from top to bottom to top). Purely inefficient ! Use it only for "animation" or debugging purpose. """ ostep = self.ordering_step() ...
iterator that computes all vertices coordinates and edge routing after just one step (one layer after the other from top to bottom to top). Purely inefficient ! Use it only for "animation" or debugging purpose.
entailment
def ordering_step(self,oneway=False): """iterator that computes all vertices ordering in their layers (one layer after the other from top to bottom, to top again unless oneway is True). """ self.dirv=-1 crossings = 0 for l in self.layers: mvmt = ...
iterator that computes all vertices ordering in their layers (one layer after the other from top to bottom, to top again unless oneway is True).
entailment
def setxy(self): """computes all vertex coordinates (x,y) using an algorithm by Brandes & Kopf. """ self._edge_inverter() self._detect_alignment_conflicts() inf = float('infinity') # initialize vertex coordinates attributes: for l in self.layers: ...
computes all vertex coordinates (x,y) using an algorithm by Brandes & Kopf.
entailment
def _detect_alignment_conflicts(self): """mark conflicts between edges: inner edges are edges between dummy nodes type 0 is regular crossing regular (or sharing vertex) type 1 is inner crossing regular (targeted crossings) type 2 is inner crossing inner (avoided by reduce_crossin...
mark conflicts between edges: inner edges are edges between dummy nodes type 0 is regular crossing regular (or sharing vertex) type 1 is inner crossing regular (targeted crossings) type 2 is inner crossing inner (avoided by reduce_crossings phase)
entailment
def _coord_vertical_alignment(self): """performs vertical alignment according to current dirvh internal state. """ dirh,dirv = self.dirh,self.dirv g = self.grx for l in self.layers[::-dirv]: if not l.prevlayer(): continue r=None for vk in l[::d...
performs vertical alignment according to current dirvh internal state.
entailment
def draw_edges(self): """Basic edge routing applied only for edges with dummy points. Enhanced edge routing can be performed by using the apropriate *route_with_xxx* functions from :ref:routing_ in the edges' view. """ for e in self.g.E(): if hasattr(e,'view'): ...
Basic edge routing applied only for edges with dummy points. Enhanced edge routing can be performed by using the apropriate *route_with_xxx* functions from :ref:routing_ in the edges' view.
entailment
def pyprf(strCsvCnfg, lgcTest=False, varRat=None, strPathHrf=None): """ Main function for pRF mapping. Parameters ---------- strCsvCnfg : str Absolute file path of config file. lgcTest : Boolean Whether this is a test (pytest). If yes, absolute path of pyprf libary will ...
Main function for pRF mapping. Parameters ---------- strCsvCnfg : str Absolute file path of config file. lgcTest : Boolean Whether this is a test (pytest). If yes, absolute path of pyprf libary will be prepended to config file paths. varRat : float, default None Rati...
entailment
def make_request(cls, url, method, params=None, basic_auth=None, timeout=600): """ Makes a cURL POST request to the given URL, specifying the data to be passed in as {"method": method, "params": parameters} :param str url: URL to connect to. :param str method: The API method to call. ...
Makes a cURL POST request to the given URL, specifying the data to be passed in as {"method": method, "params": parameters} :param str url: URL to connect to. :param str method: The API method to call. :param dict params: Dictionary object of the parameters associated with the `method`...
entailment
def load_png(varNumVol, strPathPng, tplVslSpcSze=(200, 200), varStrtIdx=0, varZfill=3): """ Load PNGs with stimulus information for pRF model creation. Parameters ---------- varNumVol : int Number of PNG files. strPathPng : str Parent directory of PNG files. PNG fil...
Load PNGs with stimulus information for pRF model creation. Parameters ---------- varNumVol : int Number of PNG files. strPathPng : str Parent directory of PNG files. PNG files need to be organsied in numerical order (e.g. `file_001.png`, `file_002.png`, etc.). tplVslSpcSze ...
entailment
def load_ev_txt(strPthEv): """Load information from event text file. Parameters ---------- input1 : str Path to event text file Returns ------- aryEvTxt : 2d numpy array, shape [n_measurements, 3] Array with info about conditions: type, onset, duration Notes ----- ...
Load information from event text file. Parameters ---------- input1 : str Path to event text file Returns ------- aryEvTxt : 2d numpy array, shape [n_measurements, 3] Array with info about conditions: type, onset, duration Notes ----- Part of py_pRF_mapping library.
entailment
def adjust_status(info: dict) -> dict: """Apply status mapping to a raw API result.""" modified_info = deepcopy(info) modified_info.update({ 'level': get_nearest_by_numeric_key(STATUS_MAP, int(info['level'])), 'level2': STATUS_MAP[99] if info['level2'] is None else ...
Apply status mapping to a raw API result.
entailment
async def status_by_coordinates( self, latitude: float, longitude: float) -> dict: """Return the CDC status for the provided latitude/longitude.""" cdc_data = await self.raw_cdc_data() nearest = await self.nearest_by_coordinates(latitude, longitude) return adjust_status(cdc_d...
Return the CDC status for the provided latitude/longitude.
entailment
async def status_by_state(self, state: str) -> dict: """Return the CDC status for the specified state.""" data = await self.raw_cdc_data() try: info = next((v for k, v in data.items() if state in k)) except StopIteration: return {} return adjust_status(i...
Return the CDC status for the specified state.
entailment
def brief_exception_text(exception, secret_values): """ Returns the Exception class and the message of the exception as string. :param exception: The exception to format :param secret_values: Values to hide in output """ exception_text = _hide_secret_values(str(exception), secret_values) re...
Returns the Exception class and the message of the exception as string. :param exception: The exception to format :param secret_values: Values to hide in output
entailment
def print_exception(exception, secret_values=None): """ Prints the exception message and the name of the exception class to stderr. :param exception: The exception to print :param secret_values: Values to hide in output """ print(brief_exception_text(exception, secret_values), file=sys.stderr)
Prints the exception message and the name of the exception class to stderr. :param exception: The exception to print :param secret_values: Values to hide in output
entailment
def insert(self, **kwargs): """ Saves the Document to the database if it is valid. Returns errors otherwise. """ if self.is_valid: before = self.before_insert() if before: return before try: self._document['_id'...
Saves the Document to the database if it is valid. Returns errors otherwise.
entailment
def update(self, **kwargs): """ Updates the document with the given _id saved in the collection if it is valid. Returns errors otherwise. """ if self.is_valid: if '_id' in self._document: to_update = self.find_one({'_id': self._id}) ...
Updates the document with the given _id saved in the collection if it is valid. Returns errors otherwise.
entailment
def delete(self, **kwargs): """ Deletes the document if it is saved in the collection. """ if self.is_valid: if '_id' in self._document: to_delete = self.find_one({'_id': self._id}) if to_delete: before = self.before_delete...
Deletes the document if it is saved in the collection.
entailment
def find_one(cls, filter=None, *args, **kwargs): """ Returns one document dict if one passes the filter. Returns None otherwise. """ return cls.collection.find_one(filter, *args, **kwargs)
Returns one document dict if one passes the filter. Returns None otherwise.
entailment
def find(cls, *args, **kwargs): """ Returns all document dicts that pass the filter """ return list(cls.collection.find(*args, **kwargs))
Returns all document dicts that pass the filter
entailment
def aggregate(cls, pipeline=None, **kwargs): """ Returns the document dicts returned from the Aggregation Pipeline """ return list(cls.collection.aggregate(pipeline or [], **kwargs))
Returns the document dicts returned from the Aggregation Pipeline
entailment
def insert_many(cls, documents, ordered=True): """ Inserts a list of documents into the Collection and returns their _ids """ return cls.collection.insert_many(documents, ordered).inserted_ids
Inserts a list of documents into the Collection and returns their _ids
entailment
def update_one(cls, filter, update, upsert=False): """ Updates a document that passes the filter with the update value Will upsert a new document if upsert=True and no document is filtered """ return cls.collection.update_one(filter, update, upsert).raw_result
Updates a document that passes the filter with the update value Will upsert a new document if upsert=True and no document is filtered
entailment
def update_many(cls, filter, update, upsert=False): """ Updates all documents that pass the filter with the update value Will upsert a new document if upsert=True and no document is filtered """ return cls.collection.update_many(filter, update, upsert).raw_result
Updates all documents that pass the filter with the update value Will upsert a new document if upsert=True and no document is filtered
entailment
def replace_one(cls, filter, replacement, upsert=False): """ Replaces a document that passes the filter. Will upsert a new document if upsert=True and no document is filtered """ return cls.collection.replace_one( filter, replacement, upsert ).raw_result
Replaces a document that passes the filter. Will upsert a new document if upsert=True and no document is filtered
entailment
def get(cls, filter=None, **kwargs): """ Returns a Document if any document is filtered, returns None otherwise """ document = cls(cls.find_one(filter, **kwargs)) return document if document.document else None
Returns a Document if any document is filtered, returns None otherwise
entailment
def documents(cls, filter=None, **kwargs): """ Returns a list of Documents if any document is filtered """ documents = [cls(document) for document in cls.find(filter, **kwargs)] return [document for document in documents if document.document]
Returns a list of Documents if any document is filtered
entailment
def in_file(self, fn: str) -> Iterator[Statement]: """ Returns an iterator over all of the statements belonging to a file. """ yield from self.__file_to_statements.get(fn, [])
Returns an iterator over all of the statements belonging to a file.
entailment
def at_line(self, line: FileLine) -> Iterator[Statement]: """ Returns an iterator over all of the statements located at a given line. """ num = line.num for stmt in self.in_file(line.filename): if stmt.location.start.line == num: yield stmt
Returns an iterator over all of the statements located at a given line.
entailment
def funcFindPrfGpu(idxPrc, vecMdlXpos, vecMdlYpos, vecMdlSd, aryFunc, # noqa aryPrfTc, varL2reg, queOut, lgcPrint=True): """ Find best pRF model for voxel time course. Parameters ---------- idxPrc : int Process ID of the process calling this function (for CPU mul...
Find best pRF model for voxel time course. 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). vecMdlXpos : np.array 1D array with pRF model x position...
entailment
def wrap(text, width=70, **kwargs): """Wrap multiple paragraphs of text, returning a list of wrapped lines. Reformat the multiple paragraphs 'text' so they fit in lines of no more than 'width' columns, and return a list of wrapped lines. By default, tabs in 'text' are expanded with string.expandtabs(...
Wrap multiple paragraphs of text, returning a list of wrapped lines. Reformat the multiple paragraphs 'text' so they fit in lines of no more than 'width' columns, and return a list of wrapped lines. By default, tabs in 'text' are expanded with string.expandtabs(), and all other whitespace characters ...
entailment
def fill(text, width=70, **kwargs): """Fill multiple paragraphs of text, returning a new string. Reformat multiple paragraphs in 'text' to fit in lines of no more than 'width' columns, and return a new string containing the entire wrapped text. As with wrap(), tabs are expanded and other whitespac...
Fill multiple paragraphs of text, returning a new string. Reformat multiple paragraphs in 'text' to fit in lines of no more than 'width' columns, and return a new string containing the entire wrapped text. As with wrap(), tabs are expanded and other whitespace characters converted to space. See Parag...
entailment
def split(cls, text): """split(text : string) -> [string] Splits 'text' into multiple paragraphs and return a list of each paragraph. """ result = [line.strip('\n') for line in cls.parasep_re.split(text)] if result == ['', '']: result = [''] return re...
split(text : string) -> [string] Splits 'text' into multiple paragraphs and return a list of each paragraph.
entailment
def wrap(self, text): """wrap(text : string) -> [string] Reformat the multiple paragraphs in 'text' so they fit in lines of no more than 'self.width' columns, and return a list of wrapped lines. Tabs in 'text' are expanded with string.expandtabs(), and all other whitespace char...
wrap(text : string) -> [string] Reformat the multiple paragraphs in 'text' so they fit in lines of no more than 'self.width' columns, and return a list of wrapped lines. Tabs in 'text' are expanded with string.expandtabs(), and all other whitespace characters (including newline) are ...
entailment
def getSenderNumberMgtURL(self, CorpNum, UserID): """ 팩슀 전솑내역 νŒμ—… URL args CorpNum : νšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ UserID : νšŒμ› νŒλΉŒμ•„μ΄λ”” return 30초 λ³΄μ•ˆ 토큰을 ν¬ν•¨ν•œ url raise PopbillException """ result = self._httpget('/FAX/?T...
팩슀 전솑내역 νŒμ—… URL args CorpNum : νšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ UserID : νšŒμ› νŒλΉŒμ•„μ΄λ”” return 30초 λ³΄μ•ˆ 토큰을 ν¬ν•¨ν•œ url raise PopbillException
entailment
def getUnitCost(self, CorpNum): """ 팩슀 전솑 단가 확인 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ return 전솑 단가 by float raise PopbillException """ result = self._httpget('/FAX/UnitCost', CorpNum) return int(result.unitCost)
팩슀 전솑 단가 확인 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ return 전솑 단가 by float raise PopbillException
entailment
def getFaxResult(self, CorpNum, ReceiptNum, UserID=None): """ 팩슀 전솑결과 쑰회 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ ReceiptNum : μ „μ†‘μš”μ²­μ‹œ λ°œκΈ‰λ°›μ€ μ ‘μˆ˜λ²ˆν˜Έ UserID : νŒλΉŒνšŒμ› 아이디 return νŒ©μŠ€μ „μ†‘μ •λ³΄ as list raise PopbillException ...
팩슀 전솑결과 쑰회 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ ReceiptNum : μ „μ†‘μš”μ²­μ‹œ λ°œκΈ‰λ°›μ€ μ ‘μˆ˜λ²ˆν˜Έ UserID : νŒλΉŒνšŒμ› 아이디 return νŒ©μŠ€μ „μ†‘μ •λ³΄ as list raise PopbillException
entailment
def getFaxResultRN(self, CorpNum, RequestNum, UserID=None): """ 팩슀 전솑결과 쑰회 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ RequestNum : μ „μ†‘μš”μ²­μ‹œ ν• λ‹Ήν•œ μ „μ†‘μš”μ²­λ²ˆν˜Έ UserID : νŒλΉŒνšŒμ› 아이디 return νŒ©μŠ€μ „μ†‘μ •λ³΄ as list raise PopbillException ...
팩슀 전솑결과 쑰회 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ RequestNum : μ „μ†‘μš”μ²­μ‹œ ν• λ‹Ήν•œ μ „μ†‘μš”μ²­λ²ˆν˜Έ UserID : νŒλΉŒνšŒμ› 아이디 return νŒ©μŠ€μ „μ†‘μ •λ³΄ as list raise PopbillException
entailment
def sendFax(self, CorpNum, SenderNum, ReceiverNum, ReceiverName, FilePath, ReserveDT=None, UserID=None, SenderName=None, adsYN=False, title=None, RequestNum=None): """ 팩슀 단건 전솑 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ SenderNum : λ°œμ‹ μž 번호 ReceiverNum : ...
팩슀 단건 전솑 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ SenderNum : λ°œμ‹ μž 번호 ReceiverNum : μˆ˜μ‹ μž 번호 ReceiverName : μˆ˜μ‹ μž λͺ… FilePath : λ°œμ‹  파일경둜 ReserveDT : μ˜ˆμ•½μ‹œκ°„(ν˜•μ‹ yyyyMMddHHmmss) UserID : νŒλΉŒνšŒμ› 아이디 SenderName ...
entailment
def sendFax_multi(self, CorpNum, SenderNum, Receiver, FilePath, ReserveDT=None, UserID=None, SenderName=None, adsYN=False, title=None, RequestNum=None): """ 팩슀 전솑 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ SenderNum : λ°œμ‹ μž 번호 (λ™λ³΄μ „μ†‘μš©) Receiver : μˆ˜μ‹ μž...
팩슀 전솑 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ SenderNum : λ°œμ‹ μž 번호 (λ™λ³΄μ „μ†‘μš©) Receiver : μˆ˜μ‹ μž 번호(λ™λ³΄μ „μ†‘μš©) FilePath : λ°œμ‹  파일경둜 ReserveDT : μ˜ˆμ•½μ‹œκ°„(ν˜•μ‹ yyyyMMddHHmmss) UserID : νŒλΉŒνšŒμ› 아이디 SenderName : λ°œμ‹ μžλͺ… (λ™λ³΄μ „μ†‘μš©) ...
entailment
def resendFax(self, CorpNum, ReceiptNum, SenderNum, SenderName, ReceiverNum, ReceiverName, ReserveDT=None, UserID=None, title=None, RequestNum=None): """ 팩슀 단건 전솑 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ ReceiptNum : 팩슀 μ ‘μˆ˜λ²ˆν˜Έ SenderNum : λ°œμ‹ μž 번호 ...
팩슀 단건 전솑 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ ReceiptNum : 팩슀 μ ‘μˆ˜λ²ˆν˜Έ SenderNum : λ°œμ‹ μž 번호 SenderName : λ°œμ‹ μžλͺ… ReceiverNum : μˆ˜μ‹ λ²ˆν˜Έ ReceiverName : μˆ˜μ‹ μžλͺ… ReserveDT : μ˜ˆμ•½μ‹œκ°„(ν˜•μ‹ yyyyMMddHHmmss) UserID : 팝빌회...
entailment
def resendFaxRN(self, CorpNum, OrgRequestNum, SenderNum, SenderName, ReceiverNum, ReceiverName, ReserveDT=None, UserID=None, title=None, RequestNum=None): """ 팩슀 단건 전솑 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ OrgRequestNum : 원본 팩슀 μ „μ†‘μ‹œ ν• λ‹Ήν•œ μ „μ†‘μš”μ²­λ²ˆν˜Έ R...
팩슀 단건 전솑 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ OrgRequestNum : 원본 팩슀 μ „μ†‘μ‹œ ν• λ‹Ήν•œ μ „μ†‘μš”μ²­λ²ˆν˜Έ ReceiptNum : 팩슀 μ ‘μˆ˜λ²ˆν˜Έ SenderNum : λ°œμ‹ μž 번호 SenderName : λ°œμ‹ μžλͺ… ReceiverNum : μˆ˜μ‹ λ²ˆν˜Έ ReceiverName : μˆ˜μ‹ μžλͺ… ReserveDT :...
entailment
def resendFaxRN_multi(self, CorpNum, OrgRequestNum, SenderNum, SenderName, Receiver, ReserveDT=None, UserID=None, title=None, RequestNum=None): """ 팩슀 전솑 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ OrgRequestNum : 원본 팩슀 μ „μ†‘μ‹œ ν• λ‹Ήν•œ μ „μ†‘μš”μ²­λ²ˆν˜Έ SenderNum...
팩슀 전솑 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ OrgRequestNum : 원본 팩슀 μ „μ†‘μ‹œ ν• λ‹Ήν•œ μ „μ†‘μš”μ²­λ²ˆν˜Έ SenderNum : λ°œμ‹ μž 번호 SenderName : λ°œμ‹ μžλͺ… Receiver : μˆ˜μ‹ μžμ •λ³΄ λ°°μ—΄ ReserveDT : μ˜ˆμ•½μ‹œκ°„(ν˜•μ‹ yyyyMMddHHmmss) UserID : νŒλΉŒνšŒμ› 아이디 ...
entailment
def getPreviewURL(self, CorpNum, ReceiptNum, UserID): """ 팩슀 λ°œμ‹ λ²ˆν˜Έ λͺ©λ‘ 확인 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ UserID : νŒλΉŒνšŒμ› 아이디 return 처리결과. list of SenderNumber raise PopbillException """ return self._httpge...
팩슀 λ°œμ‹ λ²ˆν˜Έ λͺ©λ‘ 확인 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ UserID : νŒλΉŒνšŒμ› 아이디 return 처리결과. list of SenderNumber raise PopbillException
entailment
def prepare_outdir(outdir): """ Creates the output directory if not existing. If outdir is None or if no output_files are provided nothing happens. :param outdir: The output directory to create. """ if outdir: outdir = os.path.expanduser(outdir) if not os.path.isdir(outdir): ...
Creates the output directory if not existing. If outdir is None or if no output_files are provided nothing happens. :param outdir: The output directory to create.
entailment
def requestJob(self, CorpNum, Type, SDate, EDate, UserID=None): """ μˆ˜μ§‘ μš”μ²­ args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ Type : λ¬Έμ„œν˜•νƒœ, SELL-맀좜, BUY-λ§€μž…, SDate : μ‹œμž‘μΌμž, ν‘œμ‹œν˜•μ‹(yyyyMMdd) EDate : μ’…λ£ŒμΌμž, ν‘œμ‹œν˜•μ‹(yyyyMMdd) UserID : νŒλΉŒνšŒμ› 아이디 re...
μˆ˜μ§‘ μš”μ²­ args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ Type : λ¬Έμ„œν˜•νƒœ, SELL-맀좜, BUY-λ§€μž…, SDate : μ‹œμž‘μΌμž, ν‘œμ‹œν˜•μ‹(yyyyMMdd) EDate : μ’…λ£ŒμΌμž, ν‘œμ‹œν˜•μ‹(yyyyMMdd) UserID : νŒλΉŒνšŒμ› 아이디 return μž‘μ—…μ•„μ΄λ”” (jobID) raise Popbill...
entailment
def search(self, CorpNum, JobID, TradeType, TradeUsage, Page, PerPage, Order, UserID=None): """ μˆ˜μ§‘ κ²°κ³Ό 쑰회 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ JobID : μž‘μ—…μ•„μ΄λ”” TradeType : λ¬Έμ„œν˜•νƒœ λ°°μ—΄, N-일반 ν˜„κΈˆμ˜μˆ˜μ¦, C-μ·¨μ†Œ ν˜„κΈˆμ˜μˆ˜μ¦ TradeUsage : κ±°λž˜κ΅¬λΆ„ λ°°μ—΄, P-μ†Œλ“±κ³΅μ œμš©, C-μ§€μΆœμ¦λΉ™μš© ...
μˆ˜μ§‘ κ²°κ³Ό 쑰회 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ JobID : μž‘μ—…μ•„μ΄λ”” TradeType : λ¬Έμ„œν˜•νƒœ λ°°μ—΄, N-일반 ν˜„κΈˆμ˜μˆ˜μ¦, C-μ·¨μ†Œ ν˜„κΈˆμ˜μˆ˜μ¦ TradeUsage : κ±°λž˜κ΅¬λΆ„ λ°°μ—΄, P-μ†Œλ“±κ³΅μ œμš©, C-μ§€μΆœμ¦λΉ™μš© Page : νŽ˜μ΄μ§€ 번호 PerPage : νŽ˜μ΄μ§€λ‹Ή λͺ©λ‘ 개수, μ΅œλŒ€ 1000개 Order : μ •λ ¬ λ°©ν–₯, D-λ‚΄λ¦Ό...
entailment
def summary(self, CorpNum, JobID, TradeType, TradeUsage, UserID=None): """ μˆ˜μ§‘ κ²°κ³Ό μš”μ•½μ •λ³΄ 쑰회 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ JobID : μž‘μ—…μ•„μ΄λ”” TradeType : λ¬Έμ„œν˜•νƒœ λ°°μ—΄, N-일반 ν˜„κΈˆμ˜μˆ˜μ¦, C-μ·¨μ†Œ ν˜„κΈˆμ˜μˆ˜μ¦ TradeUsage : κ±°λž˜κ΅¬λΆ„ λ°°μ—΄, P-μ†Œλ“±κ³΅μ œμš©, C-μ§€μΆœμ¦λΉ™μš© UserID :...
μˆ˜μ§‘ κ²°κ³Ό μš”μ•½μ •λ³΄ 쑰회 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ JobID : μž‘μ—…μ•„μ΄λ”” TradeType : λ¬Έμ„œν˜•νƒœ λ°°μ—΄, N-일반 ν˜„κΈˆμ˜μˆ˜μ¦, C-μ·¨μ†Œ ν˜„κΈˆμ˜μˆ˜μ¦ TradeUsage : κ±°λž˜κ΅¬λΆ„ λ°°μ—΄, P-μ†Œλ“±κ³΅μ œμš©, C-μ§€μΆœμ¦λΉ™μš© UserID : νŒλΉŒνšŒμ› 아이디 return μˆ˜μ§‘ κ²°κ³Ό μš”μ•½μ •λ³΄ raise ...
entailment
def registDeptUser(self, CorpNum, DeptUserID, DeptUserPWD, UserID=None): """ ν™ˆνƒμŠ€ ν˜„κΈˆμ˜μˆ˜μ¦ λΆ€μ„œμ‚¬μš©μž 계정 등둝 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ DeptUserID : ν™ˆνƒμŠ€ λΆ€μ„œμ‚¬μš©μž 계정아이디 DeptUserPWD : ν™ˆνƒμŠ€ λΆ€μ„œμ‚¬μš©μž κ³„μ •λΉ„λ°€λ²ˆν˜Έ UserID : νŒλΉŒνšŒμ› 아이디 return ...
ν™ˆνƒμŠ€ ν˜„κΈˆμ˜μˆ˜μ¦ λΆ€μ„œμ‚¬μš©μž 계정 등둝 args CorpNum : νŒλΉŒνšŒμ› μ‚¬μ—…μžλ²ˆν˜Έ DeptUserID : ν™ˆνƒμŠ€ λΆ€μ„œμ‚¬μš©μž 계정아이디 DeptUserPWD : ν™ˆνƒμŠ€ λΆ€μ„œμ‚¬μš©μž κ³„μ •λΉ„λ°€λ²ˆν˜Έ UserID : νŒλΉŒνšŒμ› 아이디 return 처리결과. consist of code and message raise PopbillExceptio...
entailment
def model_node(**kwargs): """ Decorates a ``schematics.Model`` class to add it as a field of type ``schematic.types.ModelType``. Keyword arguments are passed to ``schematic.types.ModelType``. Example: .. code-block:: python :emphasize-lines: 8,13 from schematics import Model,...
Decorates a ``schematics.Model`` class to add it as a field of type ``schematic.types.ModelType``. Keyword arguments are passed to ``schematic.types.ModelType``. Example: .. code-block:: python :emphasize-lines: 8,13 from schematics import Model, types from rafter.contrib.sch...
entailment
def for_each_file(base_dir, func): """ Calls func(filename) for every file under base_dir. :param base_dir: A directory containing files :param func: The function to call with every file. """ for dir_path, _, file_names in os.walk(base_dir): for filename in file_names: func...
Calls func(filename) for every file under base_dir. :param base_dir: A directory containing files :param func: The function to call with every file.
entailment
def make_file_read_only(file_path): """ Removes the write permissions for the given file for owner, groups and others. :param file_path: The file whose privileges are revoked. :raise FileNotFoundError: If the given file does not exist. """ old_permissions = os.stat(file_path).st_mode os.chm...
Removes the write permissions for the given file for owner, groups and others. :param file_path: The file whose privileges are revoked. :raise FileNotFoundError: If the given file does not exist.
entailment
def load_config(strCsvCnfg, lgcTest=False, lgcPrint=True): """ Load py_pRF_mapping config file. Parameters ---------- strCsvCnfg : string Absolute file path of config file. lgcTest : Boolean Whether this is a test (pytest). If yes, absolute path of this function will be ...
Load py_pRF_mapping config file. Parameters ---------- strCsvCnfg : string Absolute file path of config file. lgcTest : Boolean Whether this is a test (pytest). If yes, absolute path of this function will be prepended to config file paths. lgcPrint : Boolean Print co...
entailment
async def status_by_coordinates( self, latitude: float, longitude: float) -> dict: """Get symptom data for the location nearest to the user's lat/lon.""" return await self.nearest_by_coordinates(latitude, longitude)
Get symptom data for the location nearest to the user's lat/lon.
entailment
async def status_by_zip(self, zip_code: str) -> dict: """Get symptom data for the provided ZIP code.""" try: location = next(( d for d in await self.user_reports() if d['zip'] == zip_code)) except StopIteration: return {} return aw...
Get symptom data for the provided ZIP code.
entailment
def print_request(request): """ Prints a prepared request to give the user info as to what they're sending :param request.PreparedRequest request: PreparedRequest object to be printed :return: Nothing """ print('{}\n{}\n{}\n\n{}'.format( '-----------START-----------', request.method...
Prints a prepared request to give the user info as to what they're sending :param request.PreparedRequest request: PreparedRequest object to be printed :return: Nothing
entailment
def filter_validate_schemas(get_response, params): """ This filter validates input data against the resource's ``request_schema`` and fill the request's ``validated`` dict. Data from ``request.params`` and ``request.body`` (when the request body is of a form type) will be converted using the schema...
This filter validates input data against the resource's ``request_schema`` and fill the request's ``validated`` dict. Data from ``request.params`` and ``request.body`` (when the request body is of a form type) will be converted using the schema in order to get proper lists or unique values. .. imp...
entailment
def filter_validate_response(get_response, params): """ This filter process the returned response. It does 2 things: - If the response is a ``sanic.response.HTTPResponse`` and not a :class:`rafter.http.Response`, return it immediately. - It processes, validates and serializes this response when a...
This filter process the returned response. It does 2 things: - If the response is a ``sanic.response.HTTPResponse`` and not a :class:`rafter.http.Response`, return it immediately. - It processes, validates and serializes this response when a schema is provided. That means that you can always r...
entailment
def make_EPUB(parsed_article, output_directory, input_path, image_directory, config_module=None, epub_version=None, batch=False): """ Standard workflow for creating an EPUB document. make_EPUB is used to produce an EPUB fil...
Standard workflow for creating an EPUB document. make_EPUB is used to produce an EPUB file from a parsed article. In addition to the article it also requires a path to the appropriate image directory which it will insert into the EPUB file, as well the output directory location for the EPUB file. ...
entailment
def make_epub_base(location): """ Creates the base structure for an EPUB file in a specified location. This function creates constant components for the structure of the EPUB in a specified directory location. Parameters ---------- location : str A path string to a local directory ...
Creates the base structure for an EPUB file in a specified location. This function creates constant components for the structure of the EPUB in a specified directory location. Parameters ---------- location : str A path string to a local directory in which the EPUB is to be built
entailment
def epub_zip(outdirect): """ Zips up the input file directory into an EPUB file. """ def recursive_zip(zipf, directory, folder=None): if folder is None: folder = '' for item in os.listdir(directory): if os.path.isfile(os.path.join(directory, item)): ...
Zips up the input file directory into an EPUB file.
entailment
def _write_int(fname, data, append=True): """Write data to CSV file with validation.""" # pylint: disable=W0705 data_ex = pexdoc.exh.addex(ValueError, "There is no data to save to file") fos_ex = pexdoc.exh.addex( OSError, "File *[fname]* could not be created: *[reason]*" ) data_ex((len(...
Write data to CSV file with validation.
entailment
def _input_directory_description(input_identifier, arg_item, input_dir): """ Produces a directory description. A directory description is a dictionary containing the following information. - 'path': An array containing the paths to the specified directories. - 'debugInfo': A field to possibly provid...
Produces a directory description. A directory description is a dictionary containing the following information. - 'path': An array containing the paths to the specified directories. - 'debugInfo': A field to possibly provide debug information. - 'found': A boolean that indicates, if the directory exists...
entailment
def _check_input_directory_listing(base_directory, listing): """ Raises an DirectoryError if files or directories, given in the listing, could not be found in the local filesystem. :param base_directory: The path to the directory to check :param listing: A listing given as dictionary :raise Directo...
Raises an DirectoryError if files or directories, given in the listing, could not be found in the local filesystem. :param base_directory: The path to the directory to check :param listing: A listing given as dictionary :raise DirectoryError: If the given base directory does not contain all of the subdirec...
entailment