Search is not available for this dataset
text stringlengths 75 104k |
|---|
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_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_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_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 getChargeInfo(self, CorpNum, MsgType, UserID=None):
""" κ³ΌκΈμ 보 νμΈ
args
CorpNum : νμ μ¬μ
μλ²νΈ
MsgType : λ¬Έμμ μ‘ μ ν
UserID : νλΉ νμμμ΄λ
return
κ³ΌκΈμ 보 κ°μ²΄
raise
PopbillException
"""
... |
def sendSMS_multi(self, CorpNum, Sender, Contents, Messages, reserveDT, adsYN=False, UserID=None, RequestNum=None):
""" λ¨λ¬Έ λ¬Έμλ©μμ§ λ€λμ μ‘
args
CorpNum : νλΉνμ μ¬μ
μλ²νΈ
Sender : λ°μ μλ²νΈ (λ보μ μ‘μ©)
Contents : λ¬Έμ λ΄μ© (λ보μ μ‘μ©)
Messages : κ°λ³μ μ‘μ 보 λ°°μ΄
... |
def sendLMS(self, CorpNum, Sender, Receiver, ReceiverName, Subject, Contents, reserveDT, adsYN=False, UserID=None,
SenderName=None, RequestNum=None):
""" μ₯λ¬Έ λ¬Έμλ©μμ§ λ¨κ±΄ μ μ‘
args
CorpNum : νλΉνμ μ¬μ
μλ²νΈ
Sender : λ°μ λ²νΈ
Receiver : μμ λ²νΈ
... |
def sendLMS_multi(self, CorpNum, Sender, Subject, Contents, Messages, 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 : μ₯λ¬Έ λ©μμ§ μ λͺ© (... |
def sendMessage(self, MsgType, CorpNum, Sender, SenderName, Subject, Contents, Messages, reserveDT, adsYN=False,
UserID=None, RequestNum=None):
""" λ¬Έμ λ©μμ§ μ μ‘
args
MsgType : λ¬Έμ μ μ‘ μ ν(λ¨λ¬Έ:SMS, μ₯λ¬Έ:LMS, λ¨/μ₯λ¬Έ:XMS)
CorpNum : νλΉνμ μ¬μ
μλ²νΈ
... |
def getMessages(self, CorpNum, ReceiptNum, UserID=None):
""" λ¬Έμ μ μ‘κ²°κ³Ό μ‘°ν
args
CorpNum : νλΉνμ μ¬μ
μλ²νΈ
ReceiptNum : μ μ‘μμ²μ λ°κΈλ°μ μ μλ²νΈ
UserID : νλΉνμ μμ΄λ
return
μ μ‘μ 보 as list
raise
PopbillException... |
def getMessagesRN(self, CorpNum, RequestNum, UserID=None):
""" λ¬Έμ μ μ‘κ²°κ³Ό μ‘°ν
args
CorpNum : νλΉνμ μ¬μ
μλ²νΈ
RequestNum : μ μ‘μμ²μ ν λΉν μ μ‘μμ²λ²νΈ
UserID : νλΉνμ μμ΄λ
return
μ μ‘μ 보 as list
raise
PopbillExcept... |
def cancelReserveRN(self, CorpNum, RequestNum, UserID=None):
""" λ¬Έμ μμ½μ μ‘ μ·¨μ
args
CorpNum : νλΉνμ μ¬μ
μλ²νΈ
RequestNum : μ μ‘μμ²μ ν λΉν μ μ‘μμ²λ²νΈ
UserID : νλΉνμ μμ΄λ
return
μ²λ¦¬κ²°κ³Ό. consist of code and message
raise
... |
def getURL(self, CorpNum, UserID, ToGo):
""" λ¬Έμ κ΄λ ¨ νλΉ URL
args
CorpNum : νλΉνμ μ¬μ
μλ²νΈ
UserID : νλΉνμ μμ΄λ
TOGO : BOX (μ μ‘λ΄μμ‘°ν νμ
)
return
νλΉ URL
raise
PopbillException
"""
if ... |
def getStates(self, Corpnum, reciptNumList, UserID=None):
""" μ μ‘λ΄μ μμ½μ 보 νμΈ
args
CorpNum : νλΉνμ μ¬μ
μλ²νΈ
reciptNumList : λ¬Έμμ μ‘ μ μλ²νΈ λ°°μ΄
UserID : νλΉνμ μμ΄λ
return
μ μ‘μ 보 as list
raise
PopbillExcept... |
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 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 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 getCertificateExpireDate(self, CorpNum):
""" 곡μΈμΈμ¦μ λ§λ£μΌ νμΈ, λ±λ‘μ¬λΆ νμΈμ©λλ‘ νμ©κ°λ₯
args
CorpNum : νμΈν νμ μ¬μ
μλ²νΈ
return
λ±λ‘μ λ§λ£μΌμ, λ―Έλ±λ‘μ ν΄λΉ PopbillException raise.
raise
PopbillException
"""
result = self._httpget('/Taxi... |
def checkMgtKeyInUse(self, CorpNum, MgtKeyType, MgtKey):
""" ννΈλ κ΄λ¦¬λ²νΈ μ¬μ©μ€ μ¬λΆ νμΈ.
args
CorpNum : νμ μ¬μ
μ λ²νΈ
MgtKeyType : κ΄λ¦¬λ²νΈ μ ν one of ['SELL','BUY','TRUSTEE']
MgtKey : ννΈλ κ΄λ¦¬λ²νΈ
return
μ¬μ©μ€ μ¬λΆ by True/False
raise
... |
def register(self, CorpNum, taxinvoice, writeSpecification=False, UserID=None):
""" μμμ μ₯
args
CorpNum : νμ μ¬μ
μ λ²νΈ
taxinvoice : λ±λ‘ν μΈκΈκ³μ°μ object. Made with Taxinvoice(...)
writeSpecification : λ±λ‘μ κ±°λλͺ
μΈμ λμ μμ± μ¬λΆ
UserID : νλΉ νμμμ΄λ
... |
def registIssue(self, CorpNum, taxinvoice, writeSpecification=False, forceIssue=False, dealInvoiceMgtKey=None,
memo=None, emailSubject=None, UserID=None):
""" μ¦μ λ°ν
args
CorpNum : νλΉνμ μ¬μ
μλ²νΈ
taxinvoice : μΈκΈκ³μ°μ κ°μ²΄
writeSpecification ... |
def update(self, CorpNum, MgtKeyType, MgtKey, taxinvoice, writeSpecification=False, UserID=None):
""" μμ
args
CorpNum : νμ μ¬μ
μ λ²νΈ
MgtKeyType : κ΄λ¦¬λ²νΈ μ ν one of ['SELL','BUY','TRUSTEE']
MgtKey : ννΈλ κ΄λ¦¬λ²νΈ
taxinvoice : μμ ν μΈκΈκ³μ°μ object. Made... |
def getInfo(self, CorpNum, MgtKeyType, MgtKey):
""" μνμ 보 νμΈ
args
CorpNum : νμ μ¬μ
μ λ²νΈ
MgtKeyType : κ΄λ¦¬λ²νΈ μ ν one of ['SELL','BUY','TRUSTEE']
MgtKey : ννΈλ κ΄λ¦¬λ²νΈ
return
μ²λ¦¬κ²°κ³Ό. consist of code and message
raise
... |
def getDetailInfo(self, CorpNum, MgtKeyType, MgtKey):
""" μμΈμ 보 νμΈ
args
CorpNum : νμ μ¬μ
μ λ²νΈ
MgtKeyType : κ΄λ¦¬λ²νΈ μ ν one of ['SELL','BUY','TRUSTEE']
MgtKey : ννΈλ κ΄λ¦¬λ²νΈ
return
μ²λ¦¬κ²°κ³Ό. consist of code and message
raise
... |
def delete(self, CorpNum, MgtKeyType, MgtKey, UserID=None):
""" μμ
args
CorpNum : νμ μ¬μ
μ λ²νΈ
MgtKeyType : κ΄λ¦¬λ²νΈ μ ν one of ['SELL','BUY','TRUSTEE']
MgtKey : ννΈλ κ΄λ¦¬λ²νΈ
UserID : νλΉ νμμμ΄λ
return
μ²λ¦¬κ²°κ³Ό. consist of cod... |
def send(self, CorpNum, MgtKeyType, MgtKey, Memo=None, EmailSubject=None, UserID=None):
""" μΉμΈμμ²
args
CorpNum : νμ μ¬μ
μ λ²νΈ
MgtKeyType : κ΄λ¦¬λ²νΈ μ ν one of ['SELL','BUY','TRUSTEE']
MgtKey : ννΈλ κ΄λ¦¬λ²νΈ
Memo : μ²λ¦¬ λ©λͺ¨
UserID : νλΉ νμ... |
def cancelSend(self, CorpNum, MgtKeyType, MgtKey, Memo=None, UserID=None):
""" μΉμΈμμ² μ·¨μ
args
CorpNum : νμ μ¬μ
μ λ²νΈ
MgtKeyType : κ΄λ¦¬λ²νΈ μ ν one of ['SELL','BUY','TRUSTEE']
MgtKey : ννΈλ κ΄λ¦¬λ²νΈ
Memo : μ²λ¦¬ λ©λͺ¨
UserID : νλΉ νμμμ΄λ
... |
def issue(self, CorpNum, MgtKeyType, MgtKey, Memo=None, EmailSubject=None, ForceIssue=False, UserID=None):
""" λ°ν
args
CorpNum : νμ μ¬μ
μ λ²νΈ
MgtKeyType : κ΄λ¦¬λ²νΈ μ ν one of ['SELL','BUY','TRUSTEE']
MgtKey : ννΈλ κ΄λ¦¬λ²νΈ
Memo : μ²λ¦¬ λ©λͺ¨
... |
def registRequest(self, CorpNum, taxinvoice, memo=None, UserID=None):
""" μ¦μ μμ²
args
CorpNum : νλΉνμ μ¬μ
μλ²νΈ
taxinvoice : μΈκΈκ³μ°μ κ°μ²΄
memo : λ©λͺ¨
UsreID : νλΉνμ μμ΄λ
return
κ²μκ²°κ³Ό μ 보
raise
Pop... |
def sendToNTS(self, CorpNum, MgtKeyType, MgtKey, UserID=None):
""" κ΅μΈμ² μ¦μμ μ‘
args
CorpNum : νμ μ¬μ
μ λ²νΈ
MgtKeyType : κ΄λ¦¬λ²νΈ μ ν one of ['SELL','BUY','TRUSTEE']
MgtKey : ννΈλ κ΄λ¦¬λ²νΈ
UserID : νλΉ νμμμ΄λ
return
μ²λ¦¬κ²°κ³Ό. consi... |
def getLogs(self, CorpNum, MgtKeyType, MgtKey):
""" μΈκΈκ³μ°μ λ¬Έμμ΄λ ₯ λͺ©λ‘ νμΈ
args
CorpNum : νμ μ¬μ
μ λ²νΈ
MgtKeyType : κ΄λ¦¬λ²νΈ μ ν one of ['SELL','BUY','TRUSTEE']
MgtKey : ννΈλ κ΄λ¦¬λ²νΈ
return
λ¬Έμμ΄λ ₯ μ 보 λͺ©λ‘ as List
raise
... |
def getFiles(self, CorpNum, MgtKeyType, MgtKey):
""" 첨λΆνμΌ λͺ©λ‘ νμΈ
args
CorpNum : νμ μ¬μ
μ λ²νΈ
MgtKeyType : κ΄λ¦¬λ²νΈ μ ν one of ['SELL','BUY','TRUSTEE']
MgtKey : ννΈλ κ΄λ¦¬λ²νΈ
return
첩λΆνμΌ μ 보 λͺ©λ‘ as List
raise
Popb... |
def deleteFile(self, CorpNum, MgtKeyType, MgtKey, FileID, UserID=None):
""" 첨λΆνμΌ μμ
args
CorpNum : νμ μ¬μ
μ λ²νΈ
MgtKeyType : κ΄λ¦¬λ²νΈ μ ν one of ['SELL','BUY','TRUSTEE']
MgtKey : ννΈλ κ΄λ¦¬λ²νΈ
UserID : νλΉ νμμμ΄λ
return
μ²λ¦¬κ²°... |
def getMassPrintURL(self, CorpNum, MgtKeyType, MgtKeyList, UserID=None):
""" λ€λ μΈμ URL νμΈ
args
CorpNum : νμ μ¬μ
μ λ²νΈ
MgtKeyType : κ΄λ¦¬λ²νΈ μ ν one of ['SELL','BUY','TRUSTEE']
MgtKeyList : ννΈλ κ΄λ¦¬λ²νΈ λͺ©λ‘
UserID : νλΉ νμμμ΄λ
return
... |
def search(self, CorpNum, MgtKeyType, DType, SDate, EDate, State, Type, TaxType, LateOnly, TaxRegIDYN, TaxRegIDType,
TaxRegID, Page, PerPage, Order, UserID=None, QString=None, InterOPYN=None, IssueType=None):
""" λͺ©λ‘ μ‘°ν
args
CorpNum : νλΉνμ μ¬μ
μλ²νΈ
MgtKeyTy... |
def attachStatement(self, CorpNum, MgtKeyType, MgtKey, ItemCode, StmtMgtKey, UserID=None):
""" μ μλͺ
μΈμ 첨λΆ
args
CorpNum : νλΉνμ μ¬μ
μλ²νΈ
MgtKeyType : μΈκΈκ³μ°μ μ ν, SELL-λ§€μΆ, BUY-λ§€μ
, TRUSTEE-μμν
MgtKey : μΈκΈκ³μ°μ λ¬Έμκ΄λ¦¬λ²νΈ
StmtCode : λͺ
μΈμ μ’
λ₯μ½λ, 121-λͺ
μΈμ, 12... |
def assignMgtKey(self, CorpNum, MgtKeyType, ItemKey, MgtKey, UserID=None):
""" κ΄λ¦¬λ²νΈν λΉ
args
CorpNum : νλΉνμ μ¬μ
μλ²νΈ
MgtKeyType : μΈκΈκ³μ°μ μ ν, SELL-λ§€μΆ, BUY-λ§€μ
, TRUSTEE-μμν
ItemKey : μμ΄ν
ν€ (Search APIλ‘ μ‘°ν κ°λ₯)
MgtKey : μΈκΈκ³μ°μμ ν λΉν ννΈλ κ΄λ¦¬ λ²νΈ
... |
def getSealURL(self, CorpNum, UserID):
""" νλΉ μΈκ° λ° μ²¨λΆλ¬Έμ λ±λ‘ URL
args
CorpNum : νμ μ¬μ
μλ²νΈ
UserID : νμ νλΉμμ΄λ
return
30μ΄ λ³΄μ ν ν°μ ν¬ν¨ν url
raise
PopbillException
"""
result = self._httpget('/?TG=SEAL', C... |
def getTaxCertURL(self, CorpNum, UserID):
""" 곡μΈμΈμ¦μ λ±λ‘ URL
args
CorpNum : νμ μ¬μ
μλ²νΈ
UserID : νμ νλΉμμ΄λ
return
30μ΄ λ³΄μ ν ν°μ ν¬ν¨ν url
raise
PopbillException
"""
result = self._httpget('/?TG=CERT', CorpN... |
def encloses(self,
location: FileLocation
) -> Optional[FunctionDesc]:
"""
Returns the function, if any, that encloses a given location.
"""
for func in self.in_file(location.filename):
if location in func.location:
return fun... |
def in_file(self, filename: str) -> Iterator[FunctionDesc]:
"""
Returns an iterator over all of the functions definitions that are
contained within a given file.
"""
yield from self.__filename_to_functions.get(filename, []) |
def model_creation_opt(dicCnfg, aryMdlParams, strPathHrf=None, varRat=None,
lgcPrint=True):
"""
Create or load pRF model time courses.
Parameters
----------
dicCnfg : dict
Dictionary containing config parameters.
aryMdlParams : numpy arrays
x, y and sigma ... |
def parse_config(args):
"""
Try to load config, to load other journal locations
Otherwise, return default location
Returns journal location
"""
# Try user config or return default location early
config_path = path.expanduser(args.config_file)
if not path.exists(config_path):
# C... |
def record_entries(journal_location, entries):
"""
args
entry - list of entries to record
"""
check_journal_dest(journal_location)
current_date = datetime.datetime.today()
date_header = current_date.strftime("%a %H:%M:%S %Y-%m-%d") + "\n"
with open(build_journal_path(journal_location, cu... |
def get_entry(journal_location, date):
"""
args
date - date object
returns entry text or None if entry doesn't exist
"""
if not isinstance(date, datetime.date):
return None
try:
with open(build_journal_path(journal_location, date), "r") as entry_file:
return entry... |
def replace(
fname1,
fname2,
dfilter1,
dfilter2,
has_header1=True,
has_header2=True,
frow1=0,
frow2=0,
ofname=None,
ocols=None,
):
r"""
Replace data in one file with data from another file.
:param fname1: Name of the input comma-separated values file, the file
... |
def spmt(t, peak_delay=6, under_delay=16, peak_disp=1, under_disp=1,
p_u_ratio=6):
"""Normalized SPM HRF function from sum of two gamma PDFs
Parameters
----------
t : array-like
vector of times at which to sample HRF
Returns
-------
hrf : array
vector length ``len(... |
def dspmt(t, peak_delay=6, under_delay=16, peak_disp=1, under_disp=1,
p_u_ratio=6):
""" SPM canonical HRF derivative, HRF derivative values for time values `t`
Parameters
----------
t : array-like
vector of times at which to sample HRF
Returns
-------
hrf : array
... |
def ddspmt(t, peak_delay=6, under_delay=16, peak_disp=1, under_disp=1,
p_u_ratio=6):
""" SPM canonical HRF dispersion derivative, values for time values `t`
Parameters
----------
t : array-like
vector of times at which to sample HRF
Returns
-------
hrf : array
ve... |
def create_boxcar(aryCnd, aryOns, aryDrt, varTr, varNumVol,
aryExclCnd=None, varTmpOvsmpl=1000.):
"""
Creation of condition time courses in temporally upsampled space.
Parameters
----------
aryCnd : np.array
1D array with condition identifiers (every condition has its own... |
def cnvl_tc(idxPrc, aryPrfTcChunk, lstHrf, varTr, varNumVol, varTmpOvsmpl,
queOut, varHrfLen=32., dctPrm=None):
"""Convolution of time courses with HRF model.
Parameters
----------
idxPrc : int, positive
Process ID of the process calling this function (for CPU
multi-threadin... |
def create_inputs_to_reference(job_data, input_files, input_directories):
"""
Creates a dictionary with the summarized information in job_data, input_files and input_directories
:param job_data: The job data specifying input parameters other than files and directories.
:param input_files: A dictionary ... |
def _partition_all_internal(s, sep):
"""
Uses str.partition() to split every occurrence of sep in s. The returned list does not contain empty strings.
:param s: The string to split.
:param sep: A separator string.
:return: A list of parts split by sep
"""
parts = list(s.partition(sep))
... |
def partition_all(s, sep):
"""
Uses str.partition() to split every occurrence of sep in s. The returned list does not contain empty strings.
If sep is a list, all separators are evaluated.
:param s: The string to split.
:param sep: A separator string or a list of separator strings.
:return: A l... |
def split_input_references(to_split):
"""
Returns the given string in normal strings and unresolved input references.
An input reference is identified as something of the following form $(...).
Example:
split_input_reference("a$(b)cde()$(fg)") == ["a", "$(b)", "cde()", "$(fg)"]
:param to_split... |
def split_all(reference, sep):
"""
Splits a given string at a given separator or list of separators.
:param reference: The reference to split.
:param sep: Separator string or list of separator strings.
:return: A list of split strings
"""
parts = partition_all(reference, sep)
return [p ... |
def _resolve_file(attributes, input_file, input_identifier, input_reference):
"""
Returns the attributes in demand of the input file.
:param attributes: A list of attributes to get from the input_file.
:param input_file: The file from which to get the attributes.
:param input_identifier: The input ... |
def _resolve_directory(attributes, input_directory, input_identifier, input_reference):
"""
Returns the attributes in demand of the input directory.
:param attributes: A list of attributes to get from the input directory.
:param input_directory: The directory from which to get the attributes.
:para... |
def resolve_input_reference(reference, inputs_to_reference):
"""
Replaces a given input_reference by a string extracted from inputs_to_reference.
:param reference: The input reference to resolve.
:param inputs_to_reference: A dictionary containing information about the given inputs.
:raise Invalid... |
def resolve_input_references(to_resolve, inputs_to_reference):
"""
Resolves input references given in the string to_resolve by using the inputs_to_reference.
See http://www.commonwl.org/user_guide/06-params/index.html for more information.
Example:
"$(inputs.my_file.nameroot).md" -> "filename.md"
... |
def data(self):
"""
Returns a dictionnary containing all the passed data and an item
``error_list`` which holds the result of :attr:`error_list`.
"""
res = {'error_list': self.error_list}
res.update(super(ValidationErrors, self).data)
return res |
def circDiff(length, ary1, ary2):
"""calculate the circular difference between two paired arrays.
This function will return the difference between pairs of numbers; however
the difference that is output will be minimal in the sense that if we
assume an array with length = 4: [0, 1, 2, 3], the difference... |
def getPartnerURL(self, CorpNum, TOGO):
""" νλΉ νμ μμ¬ν¬μΈνΈ νμΈ
args
CorpNum : νλΉνμ μ¬μ
μλ²νΈ
TOGO : "CHRG"
return
URL
raise
PopbillException
"""
try:
return linkhub.getPartnerURL(self._getToke... |
def getBalance(self, CorpNum):
""" νλΉ νμ μμ¬ν¬μΈνΈ νμΈ
args
CorpNum : νμΈνκ³ μ νλ νμ μ¬μ
μλ²νΈ
return
μμ¬ν¬μΈνΈ by float
raise
PopbillException
"""
try:
return linkhub.getBalance(self._getToken(CorpNum))
exce... |
def getAccessURL(self, CorpNum, UserID):
""" νλΉ λ‘κ·ΈμΈ URL
args
CorpNum : νμ μ¬μ
μλ²νΈ
UserID : νμ νλΉμμ΄λ
return
30μ΄ λ³΄μ ν ν°μ ν¬ν¨ν url
raise
PopbillException
"""
result = self._httpget('/?TG=LOGIN', CorpNum... |
def getChargeURL(self, CorpNum, UserID):
""" νλΉ μ°λνμ ν¬μΈνΈ μΆ©μ URL
args
CorpNum : νμ μ¬μ
μλ²νΈ
UserID : νμ νλΉμμ΄λ
return
30μ΄ λ³΄μ ν ν°μ ν¬ν¨ν url
raise
PopbillException
"""
result = self._httpget('/?TG=CHRG', ... |
def checkIsMember(self, CorpNum):
""" νμκ°μ
μ¬λΆ νμΈ
args
CorpNum : νμ μ¬μ
μλ²νΈ
return
νμκ°μ
μ¬λΆ True/False
raise
PopbillException
"""
if CorpNum == None or CorpNum == '':
raise PopbillException(-99999999, "μ¬μ
μλ²... |
def joinMember(self, JoinInfo):
""" νλΉ νμκ°μ
args
JoinInfo : νμκ°μ
μ 보. Reference JoinForm class
return
μ²λ¦¬κ²°κ³Ό. consist of code and message
raise
PopbillException
"""
JoinInfo.LinkID = self.__linkID
postData = ... |
def updateContact(self, CorpNum, ContactInfo, UserID=None):
""" λ΄λΉμ μ 보 μμ
args
CorpNum : νμ μ¬μ
μλ²νΈ
ContactInfo : λ΄λΉμ μ 보, Reference ContactInfo class
UserID : νμ μμ΄λ
return
μ²λ¦¬κ²°κ³Ό. consist of code and message
raise
... |
def updateCorpInfo(self, CorpNum, CorpInfo, UserID=None):
""" λ΄λΉμ μ 보 μμ
args
CorpNum : νμ μ¬μ
μλ²νΈ
CorpInfo : νμ¬ μ 보, Reference CorpInfo class
UserID : νμ μμ΄λ
return
μ²λ¦¬κ²°κ³Ό. consist of code and message
raise
... |
def registContact(self, CorpNum, ContactInfo, UserID=None):
""" λ΄λΉμ μΆκ°
args
CorpNum : νμ μ¬μ
μλ²νΈ
ContactInfo : λ΄λΉμ μ 보, Reference ContactInfo class
UserID : νμ μμ΄λ
return
μ²λ¦¬κ²°κ³Ό. consist of code and message
raise
... |
def TemplateValidator(value):
"""Try to compile a string into a Django template"""
try:
Template(value)
except Exception as e:
raise ValidationError(
_("Cannot compile template (%(exception)s)"),
params={"exception": e}
) |
def merge(
fname1,
fname2,
dfilter1=None,
dfilter2=None,
has_header1=True,
has_header2=True,
frow1=0,
frow2=0,
ofname=None,
ocols=None,
):
r"""
Merge two comma-separated values files.
Data columns from the second file are appended after data columns from the
firs... |
def pyprf_opt_brute(strCsvCnfg, objNspc, lgcTest=False, strPathHrf=None,
varRat=None):
"""
Function for optimizing given pRF paramaters using brute-force grid search.
Parameters
----------
strCsvCnfg : str
Absolute file path of config file.
objNspc : object
N... |
def get_lbry_api_function_docs(url=LBRY_API_RAW_JSON_URL):
""" Scrapes the given URL to a page in JSON format to obtain the documentation for the LBRY API
:param str url: URL to the documentation we need to obtain,
pybry.constants.LBRY_API_RAW_JSON_URL by default
:return: List of functions retrieved f... |
def generate_method_definition(func):
""" Generates the body for the given function
:param dict func: dict of a JSON-Formatted function as defined by the API docs
:return: A String containing the definition for the function as it should be written in code
:rtype: str
"""
indent = 4
# initi... |
def generate_lbryd_wrapper(url=LBRY_API_RAW_JSON_URL, read_file=__LBRYD_BASE_FPATH__, write_file=LBRYD_FPATH):
""" Generates the actual functions for lbryd_api.py based on lbry's documentation
:param str url: URL to the documentation we need to obtain,
pybry.constants.LBRY_API_RAW_JSON_URL by default
... |
def load_nii(strPathIn, varSzeThr=5000.0):
"""
Load nii file.
Parameters
----------
strPathIn : str
Path to nii file to load.
varSzeThr : float
If the nii file is larger than this threshold (in MB), the file is
loaded volume-by-volume in order to prevent memory overflow.... |
def load_res_prm(lstFunc, lstFlsMsk=None):
"""Load result parameters from multiple nii files, with optional mask.
Parameters
----------
lstFunc : list,
list of str with file names of 3D or 4D nii files
lstFlsMsk : list, optional
list of str with paths to 3D nii files that can act as... |
def export_nii(ary2dNii, lstNiiNames, aryLgcMsk, aryLgcVar, tplNiiShp, aryAff,
hdrMsk, outFormat='3D'):
"""
Export nii file(s).
Parameters
----------
ary2dNii : numpy array
Numpy array with results to be exported to nii.
lstNiiNames : list
List that contains strin... |
def joinRes(lstPrfRes, varPar, idxPos, inFormat='1D'):
"""Join results from different processing units (here cores).
Parameters
----------
lstPrfRes : list
Output of results from parallelization.
varPar : integer, positive
Number of cores that were used during parallelization
id... |
def cmp_res_R2(lstRat, lstNiiNames, strPathOut, strPathMdl, lgcSveMdlTc=True,
lgcDel=False, strNmeExt=''):
""""Compare results for different exponents and create winner nii.
Parameters
----------
lstRat : list
List of floats containing the ratios that were tested for surround
... |
def map_crt_to_pol(aryXCrds, aryYrds):
"""Remap coordinates from cartesian to polar
Parameters
----------
aryXCrds : 1D numpy array
Array with x coordinate values.
aryYrds : 1D numpy array
Array with y coordinate values.
Returns
-------
aryTht : 1D numpy array
A... |
def map_pol_to_crt(aryTht, aryRad):
"""Remap coordinates from polar to cartesian
Parameters
----------
aryTht : 1D numpy array
Angle of coordinates
aryRad : 1D numpy array
Radius of coordinates.
Returns
-------
aryXCrds : 1D numpy array
Array with x coordinate v... |
def find_near_pol_ang(aryEmpPlrAng, aryExpPlrAng):
"""Return index of nearest expected polar angle.
Parameters
----------
aryEmpPlrAng : 1D numpy array
Empirically found polar angle estimates
aryExpPlrAng : 1D numpy array
Theoretically expected polar angle estimates
Returns
... |
def rmp_rng(aryVls, varNewMin, varNewMax, varOldThrMin=None,
varOldAbsMax=None):
"""Remap values in an array from one range to another.
Parameters
----------
aryVls : 1D numpy array
Array with values that need to be remapped.
varNewMin : float
Desired minimum value of ne... |
def rmp_deg_pixel_xys(vecX, vecY, vecPrfSd, tplPngSize,
varExtXmin, varExtXmax, varExtYmin, varExtYmax):
"""Remap x, y, sigma parameters from degrees to pixel.
Parameters
----------
vecX : 1D numpy array
Array with possible x parametrs in degree
vecY : 1D numpy array
... |
def cnvl_2D_gauss(idxPrc, aryMdlParamsChnk, arySptExpInf, tplPngSize, queOut,
strCrd='crt'):
"""Spatially convolve input with 2D Gaussian model.
Parameters
----------
idxPrc : int
Process ID of the process calling this function (for CPU
multi-threading). In GPU version... |
def process(self, checksum, revision=None):
"""
Process a new revision and detect a revert if it occurred. Note that
you can pass whatever you like as `revision` and it will be returned in
the case that a revert occurs.
:Parameters:
checksum : str
An... |
def main():
"""pyprf_feature entry point."""
# %% Print Welcome message
strWelcome = 'pyprf_feature ' + __version__
strDec = '=' * len(strWelcome)
print(strDec + '\n' + strWelcome + '\n' + strDec)
# %% Get list of input arguments
# Create parser object:
objParser = argparse.ArgumentP... |
def funcSmthSpt(aryFuncChnk, varSdSmthSpt):
"""Apply spatial smoothing to the input data.
Parameters
----------
aryFuncChnk : np.array
TODO
varSdSmthSpt : float (?)
Extent of smoothing.
Returns
-------
aryFuncChnk : np.array
Smoothed data.
"""
varNdim = a... |
def funcSmthTmp(aryFuncChnk, varSdSmthTmp):
"""Apply temporal smoothing to fMRI data & pRF time course models.
Parameters
----------
aryFuncChnk : np.array
TODO
varSdSmthTmp : float (?)
extend of smoothing
Returns
-------
aryFuncChnk : np.array
TODO
"""
... |
def prep_models(aryPrfTc, varSdSmthTmp=2.0, lgcPrint=True):
"""
Prepare pRF model time courses.
Parameters
----------
aryPrfTc : np.array
4D numpy array with pRF time course models, with following dimensions:
`aryPrfTc[x-position, y-position, SD, volume]`.
varSdSmthTmp : float
... |
def prep_func(strPathNiiMask, lstPathNiiFunc, varAvgThr=100.,
varVarThr=0.0001, strPrePro='demean'):
"""
Load & prepare functional data.
Parameters
----------
strPathNiiMask: str
Path to mask used to restrict pRF model finding. Only voxels with
a value greater than zer... |
def get(self,style):
""" what's the value of a style at the current stack level"""
level = len(self.stack) -1
while level >= 0:
if style in self.stack[level]:
return self.stack[level][style]
else:
level = level - 1
return None |
def enforce_type(self, attr, val):
"""converts a value to the attribute's type"""
if not attr in self.types:
return utfstr(val)
elif self.types[attr] == 'int':
return int(float(val))
elif self.types[attr] == 'float':
return float(val)
else:
... |
def push(self, style={}):
"""push a new level on the stack with a style dictionnary containing style:value pairs"""
_style = {}
for attr in style:
if attr in self.cmds and not style[attr] in self.cmds[attr]:
print 'WARNING: ESC/POS PRINTING: ignoring invalid value: '+... |
def set(self, style={}):
"""overrides style values at the current stack level"""
_style = {}
for attr in style:
if attr in self.cmds and not style[attr] in self.cmds[attr]:
print 'WARNING: ESC/POS PRINTING: ignoring invalid value: '+utfstr(style[attr])+' for style: '+... |
def to_escpos(self):
""" converts the current style to an escpos command string """
cmd = ''
ordered_cmds = self.cmds.keys()
ordered_cmds.sort(lambda x,y: cmp(self.cmds[x]['_order'], self.cmds[y]['_order']))
for style in ordered_cmds:
cmd += self.cmds[style][self.get(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.