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
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.update
def update(self, CorpNum, MgtKeyType, MgtKey, taxinvoice, writeSpecification=False, UserID=None): """ 수정 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 taxinvoice : 수정할 세금계산서 object. Made...
python
def update(self, CorpNum, MgtKeyType, MgtKey, taxinvoice, writeSpecification=False, UserID=None): """ 수정 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 taxinvoice : 수정할 세금계산서 object. Made...
[ "def", "update", "(", "self", ",", "CorpNum", ",", "MgtKeyType", ",", "MgtKey", ",", "taxinvoice", ",", "writeSpecification", "=", "False", ",", "UserID", "=", "None", ")", ":", "if", "MgtKeyType", "not", "in", "self", ".", "__MgtKeyTypes", ":", "raise", ...
수정 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 taxinvoice : 수정할 세금계산서 object. Made with Taxinvoice(...) writeSpecification : 등록시 거래명세서 동시 작성 여부 UserID : 팝빌 회원아이...
[ "수정", "args", "CorpNum", ":", "회원", "사업자", "번호", "MgtKeyType", ":", "관리번호", "유형", "one", "of", "[", "SELL", "BUY", "TRUSTEE", "]", "MgtKey", ":", "파트너", "관리번호", "taxinvoice", ":", "수정할", "세금계산서", "object", ".", "Made", "with", "Taxinvoice", "(", "...",...
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L176-L201
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.getInfo
def getInfo(self, CorpNum, MgtKeyType, MgtKey): """ 상태정보 확인 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 return 처리결과. consist of code and message raise ...
python
def getInfo(self, CorpNum, MgtKeyType, MgtKey): """ 상태정보 확인 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 return 처리결과. consist of code and message raise ...
[ "def", "getInfo", "(", "self", ",", "CorpNum", ",", "MgtKeyType", ",", "MgtKey", ")", ":", "if", "MgtKeyType", "not", "in", "self", ".", "__MgtKeyTypes", ":", "raise", "PopbillException", "(", "-", "99999999", ",", "\"관리번호 형태가 올바르지 않습니다.\")", "", "if", "MgtK...
상태정보 확인 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 return 처리결과. consist of code and message raise PopbillException
[ "상태정보", "확인", "args", "CorpNum", ":", "회원", "사업자", "번호", "MgtKeyType", ":", "관리번호", "유형", "one", "of", "[", "SELL", "BUY", "TRUSTEE", "]", "MgtKey", ":", "파트너", "관리번호", "return", "처리결과", ".", "consist", "of", "code", "and", "message", "raise", "Popbill...
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L203-L219
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.getDetailInfo
def getDetailInfo(self, CorpNum, MgtKeyType, MgtKey): """ 상세정보 확인 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 return 처리결과. consist of code and message raise ...
python
def getDetailInfo(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", ")", ":", "if", "MgtKeyType", "not", "in", "self", ".", "__MgtKeyTypes", ":", "raise", "PopbillException", "(", "-", "99999999", ",", "\"관리번호 형태가 올바르지 않습니다.\")", "", "if", ...
상세정보 확인 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 return 처리결과. consist of code and message raise PopbillException
[ "상세정보", "확인", "args", "CorpNum", ":", "회원", "사업자", "번호", "MgtKeyType", ":", "관리번호", "유형", "one", "of", "[", "SELL", "BUY", "TRUSTEE", "]", "MgtKey", ":", "파트너", "관리번호", "return", "처리결과", ".", "consist", "of", "code", "and", "message", "raise", "Popbill...
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L221-L237
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.delete
def delete(self, CorpNum, MgtKeyType, MgtKey, UserID=None): """ 삭제 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 UserID : 팝빌 회원아이디 return 처리결과. consist of cod...
python
def delete(self, CorpNum, MgtKeyType, MgtKey, UserID=None): """ 삭제 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 UserID : 팝빌 회원아이디 return 처리결과. consist of cod...
[ "def", "delete", "(", "self", ",", "CorpNum", ",", "MgtKeyType", ",", "MgtKey", ",", "UserID", "=", "None", ")", ":", "if", "MgtKeyType", "not", "in", "self", ".", "__MgtKeyTypes", ":", "raise", "PopbillException", "(", "-", "99999999", ",", "\"관리번호 형태가 올바...
삭제 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 UserID : 팝빌 회원아이디 return 처리결과. consist of code and message raise PopbillException
[ "삭제", "args", "CorpNum", ":", "회원", "사업자", "번호", "MgtKeyType", ":", "관리번호", "유형", "one", "of", "[", "SELL", "BUY", "TRUSTEE", "]", "MgtKey", ":", "파트너", "관리번호", "UserID", ":", "팝빌", "회원아이디", "return", "처리결과", ".", "consist", "of", "code", "and", "mes...
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L239-L256
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.send
def send(self, CorpNum, MgtKeyType, MgtKey, Memo=None, EmailSubject=None, UserID=None): """ 승인요청 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 Memo : 처리 메모 UserID : 팝빌 회원...
python
def send(self, CorpNum, MgtKeyType, MgtKey, Memo=None, EmailSubject=None, UserID=None): """ 승인요청 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 Memo : 처리 메모 UserID : 팝빌 회원...
[ "def", "send", "(", "self", ",", "CorpNum", ",", "MgtKeyType", ",", "MgtKey", ",", "Memo", "=", "None", ",", "EmailSubject", "=", "None", ",", "UserID", "=", "None", ")", ":", "if", "MgtKeyType", "not", "in", "self", ".", "__MgtKeyTypes", ":", "raise",...
승인요청 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 Memo : 처리 메모 UserID : 팝빌 회원아이디 return 처리결과. consist of code and message raise ...
[ "승인요청", "args", "CorpNum", ":", "회원", "사업자", "번호", "MgtKeyType", ":", "관리번호", "유형", "one", "of", "[", "SELL", "BUY", "TRUSTEE", "]", "MgtKey", ":", "파트너", "관리번호", "Memo", ":", "처리", "메모", "UserID", ":", "팝빌", "회원아이디", "return", "처리결과", ".", "consist"...
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L258-L285
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.cancelSend
def cancelSend(self, CorpNum, MgtKeyType, MgtKey, Memo=None, UserID=None): """ 승인요청 취소 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 Memo : 처리 메모 UserID : 팝빌 회원아이디 ...
python
def cancelSend(self, CorpNum, MgtKeyType, MgtKey, Memo=None, UserID=None): """ 승인요청 취소 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 Memo : 처리 메모 UserID : 팝빌 회원아이디 ...
[ "def", "cancelSend", "(", "self", ",", "CorpNum", ",", "MgtKeyType", ",", "MgtKey", ",", "Memo", "=", "None", ",", "UserID", "=", "None", ")", ":", "if", "MgtKeyType", "not", "in", "self", ".", "__MgtKeyTypes", ":", "raise", "PopbillException", "(", "-",...
승인요청 취소 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 Memo : 처리 메모 UserID : 팝빌 회원아이디 return 처리결과. consist of code and message raise ...
[ "승인요청", "취소", "args", "CorpNum", ":", "회원", "사업자", "번호", "MgtKeyType", ":", "관리번호", "유형", "one", "of", "[", "SELL", "BUY", "TRUSTEE", "]", "MgtKey", ":", "파트너", "관리번호", "Memo", ":", "처리", "메모", "UserID", ":", "팝빌", "회원아이디", "return", "처리결과", ".", "...
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L287-L310
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.issue
def issue(self, CorpNum, MgtKeyType, MgtKey, Memo=None, EmailSubject=None, ForceIssue=False, UserID=None): """ 발행 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 Memo : 처리 메모 ...
python
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", "issue", "(", "self", ",", "CorpNum", ",", "MgtKeyType", ",", "MgtKey", ",", "Memo", "=", "None", ",", "EmailSubject", "=", "None", ",", "ForceIssue", "=", "False", ",", "UserID", "=", "None", ")", ":", "if", "MgtKeyType", "not", "in", "self", ...
발행 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 Memo : 처리 메모 EmailSubject : 발행메일 이메일 제목 ForceIssue : 지연발행 세금계산서 강제발행 여부. UserID : 팝빌 회원아이디 ...
[ "발행", "args", "CorpNum", ":", "회원", "사업자", "번호", "MgtKeyType", ":", "관리번호", "유형", "one", "of", "[", "SELL", "BUY", "TRUSTEE", "]", "MgtKey", ":", "파트너", "관리번호", "Memo", ":", "처리", "메모", "EmailSubject", ":", "발행메일", "이메일", "제목", "ForceIssue", ":", "지연...
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L362-L392
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.registRequest
def registRequest(self, CorpNum, taxinvoice, memo=None, UserID=None): """ 즉시 요청 args CorpNum : 팝빌회원 사업자번호 taxinvoice : 세금계산서 객체 memo : 메모 UsreID : 팝빌회원 아이디 return 검색결과 정보 raise Pop...
python
def registRequest(self, CorpNum, taxinvoice, memo=None, UserID=None): """ 즉시 요청 args CorpNum : 팝빌회원 사업자번호 taxinvoice : 세금계산서 객체 memo : 메모 UsreID : 팝빌회원 아이디 return 검색결과 정보 raise Pop...
[ "def", "registRequest", "(", "self", ",", "CorpNum", ",", "taxinvoice", ",", "memo", "=", "None", ",", "UserID", "=", "None", ")", ":", "if", "memo", "!=", "None", "and", "memo", "!=", "''", ":", "taxinvoice", ".", "memo", "=", "memo", "postData", "=...
즉시 요청 args CorpNum : 팝빌회원 사업자번호 taxinvoice : 세금계산서 객체 memo : 메모 UsreID : 팝빌회원 아이디 return 검색결과 정보 raise PopbillException
[ "즉시", "요청", "args", "CorpNum", ":", "팝빌회원", "사업자번호", "taxinvoice", ":", "세금계산서", "객체", "memo", ":", "메모", "UsreID", ":", "팝빌회원", "아이디", "return", "검색결과", "정보", "raise", "PopbillException" ]
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L419-L437
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.sendToNTS
def sendToNTS(self, CorpNum, MgtKeyType, MgtKey, UserID=None): """ 국세청 즉시전송 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 UserID : 팝빌 회원아이디 return 처리결과. consi...
python
def sendToNTS(self, CorpNum, MgtKeyType, MgtKey, UserID=None): """ 국세청 즉시전송 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 UserID : 팝빌 회원아이디 return 처리결과. consi...
[ "def", "sendToNTS", "(", "self", ",", "CorpNum", ",", "MgtKeyType", ",", "MgtKey", ",", "UserID", "=", "None", ")", ":", "if", "MgtKeyType", "not", "in", "self", ".", "__MgtKeyTypes", ":", "raise", "PopbillException", "(", "-", "99999999", ",", "\"관리번호 형태가...
국세청 즉시전송 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 UserID : 팝빌 회원아이디 return 처리결과. consist of code and message raise PopbillException
[ "국세청", "즉시전송", "args", "CorpNum", ":", "회원", "사업자", "번호", "MgtKeyType", ":", "관리번호", "유형", "one", "of", "[", "SELL", "BUY", "TRUSTEE", "]", "MgtKey", ":", "파트너", "관리번호", "UserID", ":", "팝빌", "회원아이디", "return", "처리결과", ".", "consist", "of", "code", "a...
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L514-L533
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.getLogs
def getLogs(self, CorpNum, MgtKeyType, MgtKey): """ 세금계산서 문서이력 목록 확인 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 return 문서이력 정보 목록 as List raise ...
python
def getLogs(self, CorpNum, MgtKeyType, MgtKey): """ 세금계산서 문서이력 목록 확인 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 return 문서이력 정보 목록 as List raise ...
[ "def", "getLogs", "(", "self", ",", "CorpNum", ",", "MgtKeyType", ",", "MgtKey", ")", ":", "if", "MgtKeyType", "not", "in", "self", ".", "__MgtKeyTypes", ":", "raise", "PopbillException", "(", "-", "99999999", ",", "\"관리번호 형태가 올바르지 않습니다.\")", "", "if", "MgtK...
세금계산서 문서이력 목록 확인 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 return 문서이력 정보 목록 as List raise PopbillException
[ "세금계산서", "문서이력", "목록", "확인", "args", "CorpNum", ":", "회원", "사업자", "번호", "MgtKeyType", ":", "관리번호", "유형", "one", "of", "[", "SELL", "BUY", "TRUSTEE", "]", "MgtKey", ":", "파트너", "관리번호", "return", "문서이력", "정보", "목록", "as", "List", "raise", "PopbillExcepti...
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L611-L627
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.getFiles
def getFiles(self, CorpNum, MgtKeyType, MgtKey): """ 첨부파일 목록 확인 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 return 첩부파일 정보 목록 as List raise Popb...
python
def getFiles(self, CorpNum, MgtKeyType, MgtKey): """ 첨부파일 목록 확인 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 return 첩부파일 정보 목록 as List raise Popb...
[ "def", "getFiles", "(", "self", ",", "CorpNum", ",", "MgtKeyType", ",", "MgtKey", ")", ":", "if", "MgtKeyType", "not", "in", "self", ".", "__MgtKeyTypes", ":", "raise", "PopbillException", "(", "-", "99999999", ",", "\"관리번호 형태가 올바르지 않습니다.\")", "", "if", "Mgt...
첨부파일 목록 확인 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 return 첩부파일 정보 목록 as List raise PopbillException
[ "첨부파일", "목록", "확인", "args", "CorpNum", ":", "회원", "사업자", "번호", "MgtKeyType", ":", "관리번호", "유형", "one", "of", "[", "SELL", "BUY", "TRUSTEE", "]", "MgtKey", ":", "파트너", "관리번호", "return", "첩부파일", "정보", "목록", "as", "List", "raise", "PopbillException" ]
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L660-L676
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.deleteFile
def deleteFile(self, CorpNum, MgtKeyType, MgtKey, FileID, UserID=None): """ 첨부파일 삭제 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 UserID : 팝빌 회원아이디 return 처리결...
python
def deleteFile(self, CorpNum, MgtKeyType, MgtKey, FileID, UserID=None): """ 첨부파일 삭제 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 UserID : 팝빌 회원아이디 return 처리결...
[ "def", "deleteFile", "(", "self", ",", "CorpNum", ",", "MgtKeyType", ",", "MgtKey", ",", "FileID", ",", "UserID", "=", "None", ")", ":", "if", "MgtKeyType", "not", "in", "self", ".", "__MgtKeyTypes", ":", "raise", "PopbillException", "(", "-", "99999999", ...
첨부파일 삭제 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKey : 파트너 관리번호 UserID : 팝빌 회원아이디 return 처리결과. consist of code and message raise PopbillException
[ "첨부파일", "삭제", "args", "CorpNum", ":", "회원", "사업자", "번호", "MgtKeyType", ":", "관리번호", "유형", "one", "of", "[", "SELL", "BUY", "TRUSTEE", "]", "MgtKey", ":", "파트너", "관리번호", "UserID", ":", "팝빌", "회원아이디", "return", "처리결과", ".", "consist", "of", "code", "an...
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L678-L700
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.getMassPrintURL
def getMassPrintURL(self, CorpNum, MgtKeyType, MgtKeyList, UserID=None): """ 다량 인쇄 URL 확인 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKeyList : 파트너 관리번호 목록 UserID : 팝빌 회원아이디 return ...
python
def getMassPrintURL(self, CorpNum, MgtKeyType, MgtKeyList, UserID=None): """ 다량 인쇄 URL 확인 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKeyList : 파트너 관리번호 목록 UserID : 팝빌 회원아이디 return ...
[ "def", "getMassPrintURL", "(", "self", ",", "CorpNum", ",", "MgtKeyType", ",", "MgtKeyList", ",", "UserID", "=", "None", ")", ":", "if", "MgtKeyList", "==", "None", "or", "len", "(", "MgtKeyList", ")", "<", "1", ":", "raise", "PopbillException", "(", "-"...
다량 인쇄 URL 확인 args CorpNum : 회원 사업자 번호 MgtKeyType : 관리번호 유형 one of ['SELL','BUY','TRUSTEE'] MgtKeyList : 파트너 관리번호 목록 UserID : 팝빌 회원아이디 return 팝빌 URL as str raise PopbillException
[ "다량", "인쇄", "URL", "확인", "args", "CorpNum", ":", "회원", "사업자", "번호", "MgtKeyType", ":", "관리번호", "유형", "one", "of", "[", "SELL", "BUY", "TRUSTEE", "]", "MgtKeyList", ":", "파트너", "관리번호", "목록", "UserID", ":", "팝빌", "회원아이디", "return", "팝빌", "URL", "as", ...
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L825-L844
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.search
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...
python
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", "search", "(", "self", ",", "CorpNum", ",", "MgtKeyType", ",", "DType", ",", "SDate", ",", "EDate", ",", "State", ",", "Type", ",", "TaxType", ",", "LateOnly", ",", "TaxRegIDYN", ",", "TaxRegIDType", ",", "TaxRegID", ",", "Page", ",", "PerPage", ...
목록 조회 args CorpNum : 팝빌회원 사업자번호 MgtKeyType : 세금계산서유형, SELL-매출, BUY-매입, TRUSTEE-위수탁 DType : 일자유형, R-등록일시, W-작성일자, I-발행일시 중 택 1 SDate : 시작일자, 표시형식(yyyyMMdd) EDate : 종료일자, 표시형식(yyyyMMdd) State : 상태코드, 2,3번째 자리에 와일드카...
[ "목록", "조회", "args", "CorpNum", ":", "팝빌회원", "사업자번호", "MgtKeyType", ":", "세금계산서유형", "SELL", "-", "매출", "BUY", "-", "매입", "TRUSTEE", "-", "위수탁", "DType", ":", "일자유형", "R", "-", "등록일시", "W", "-", "작성일자", "I", "-", "발행일시", "중", "택", "1", "SDate", ":"...
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L846-L912
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.attachStatement
def attachStatement(self, CorpNum, MgtKeyType, MgtKey, ItemCode, StmtMgtKey, UserID=None): """ 전자명세서 첨부 args CorpNum : 팝빌회원 사업자번호 MgtKeyType : 세금계산서 유형, SELL-매출, BUY-매입, TRUSTEE-위수탁 MgtKey : 세금계산서 문서관리번호 StmtCode : 명세서 종류코드, 121-명세서, 12...
python
def attachStatement(self, CorpNum, MgtKeyType, MgtKey, ItemCode, StmtMgtKey, UserID=None): """ 전자명세서 첨부 args CorpNum : 팝빌회원 사업자번호 MgtKeyType : 세금계산서 유형, SELL-매출, BUY-매입, TRUSTEE-위수탁 MgtKey : 세금계산서 문서관리번호 StmtCode : 명세서 종류코드, 121-명세서, 12...
[ "def", "attachStatement", "(", "self", ",", "CorpNum", ",", "MgtKeyType", ",", "MgtKey", ",", "ItemCode", ",", "StmtMgtKey", ",", "UserID", "=", "None", ")", ":", "if", "MgtKeyType", "not", "in", "self", ".", "__MgtKeyTypes", ":", "raise", "PopbillException"...
전자명세서 첨부 args CorpNum : 팝빌회원 사업자번호 MgtKeyType : 세금계산서 유형, SELL-매출, BUY-매입, TRUSTEE-위수탁 MgtKey : 세금계산서 문서관리번호 StmtCode : 명세서 종류코드, 121-명세서, 122-청구서, 123-견적서, 124-발주서 125-입금표, 126-영수증 StmtMgtKey : 전자명세서 문서관리번호 User...
[ "전자명세서", "첨부", "args", "CorpNum", ":", "팝빌회원", "사업자번호", "MgtKeyType", ":", "세금계산서", "유형", "SELL", "-", "매출", "BUY", "-", "매입", "TRUSTEE", "-", "위수탁", "MgtKey", ":", "세금계산서", "문서관리번호", "StmtCode", ":", "명세서", "종류코드", "121", "-", "명세서", "122", "-", "청구...
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L914-L938
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.assignMgtKey
def assignMgtKey(self, CorpNum, MgtKeyType, ItemKey, MgtKey, UserID=None): """ 관리번호할당 args CorpNum : 팝빌회원 사업자번호 MgtKeyType : 세금계산서 유형, SELL-매출, BUY-매입, TRUSTEE-위수탁 ItemKey : 아이템키 (Search API로 조회 가능) MgtKey : 세금계산서에 할당할 파트너 관리 번호 ...
python
def assignMgtKey(self, CorpNum, MgtKeyType, ItemKey, MgtKey, UserID=None): """ 관리번호할당 args CorpNum : 팝빌회원 사업자번호 MgtKeyType : 세금계산서 유형, SELL-매출, BUY-매입, TRUSTEE-위수탁 ItemKey : 아이템키 (Search API로 조회 가능) MgtKey : 세금계산서에 할당할 파트너 관리 번호 ...
[ "def", "assignMgtKey", "(", "self", ",", "CorpNum", ",", "MgtKeyType", ",", "ItemKey", ",", "MgtKey", ",", "UserID", "=", "None", ")", ":", "if", "MgtKeyType", "==", "None", "or", "MgtKeyType", "==", "''", ":", "raise", "PopbillException", "(", "-", "999...
관리번호할당 args CorpNum : 팝빌회원 사업자번호 MgtKeyType : 세금계산서 유형, SELL-매출, BUY-매입, TRUSTEE-위수탁 ItemKey : 아이템키 (Search API로 조회 가능) MgtKey : 세금계산서에 할당할 파트너 관리 번호 UserID : 팝빌회원 아이디 return 처리결과. consist of code and...
[ "관리번호할당", "args", "CorpNum", ":", "팝빌회원", "사업자번호", "MgtKeyType", ":", "세금계산서", "유형", "SELL", "-", "매출", "BUY", "-", "매입", "TRUSTEE", "-", "위수탁", "ItemKey", ":", "아이템키", "(", "Search", "API로", "조회", "가능", ")", "MgtKey", ":", "세금계산서에", "할당할", "파트너", "관...
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L972-L996
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.getSealURL
def getSealURL(self, CorpNum, UserID): """ 팝빌 인감 및 첨부문서 등록 URL args CorpNum : 회원 사업자번호 UserID : 회원 팝빌아이디 return 30초 보안 토큰을 포함한 url raise PopbillException """ result = self._httpget('/?TG=SEAL', C...
python
def getSealURL(self, CorpNum, UserID): """ 팝빌 인감 및 첨부문서 등록 URL args CorpNum : 회원 사업자번호 UserID : 회원 팝빌아이디 return 30초 보안 토큰을 포함한 url raise PopbillException """ result = self._httpget('/?TG=SEAL', C...
[ "def", "getSealURL", "(", "self", ",", "CorpNum", ",", "UserID", ")", ":", "result", "=", "self", ".", "_httpget", "(", "'/?TG=SEAL'", ",", "CorpNum", ",", "UserID", ")", "return", "result", ".", "url" ]
팝빌 인감 및 첨부문서 등록 URL args CorpNum : 회원 사업자번호 UserID : 회원 팝빌아이디 return 30초 보안 토큰을 포함한 url raise PopbillException
[ "팝빌", "인감", "및", "첨부문서", "등록", "URL", "args", "CorpNum", ":", "회원", "사업자번호", "UserID", ":", "회원", "팝빌아이디", "return", "30초", "보안", "토큰을", "포함한", "url", "raise", "PopbillException" ]
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L1043-L1054
train
linkhub-sdk/popbill.py
popbill/taxinvoiceService.py
TaxinvoiceService.getTaxCertURL
def getTaxCertURL(self, CorpNum, UserID): """ 공인인증서 등록 URL args CorpNum : 회원 사업자번호 UserID : 회원 팝빌아이디 return 30초 보안 토큰을 포함한 url raise PopbillException """ result = self._httpget('/?TG=CERT', CorpN...
python
def getTaxCertURL(self, CorpNum, UserID): """ 공인인증서 등록 URL args CorpNum : 회원 사업자번호 UserID : 회원 팝빌아이디 return 30초 보안 토큰을 포함한 url raise PopbillException """ result = self._httpget('/?TG=CERT', CorpN...
[ "def", "getTaxCertURL", "(", "self", ",", "CorpNum", ",", "UserID", ")", ":", "result", "=", "self", ".", "_httpget", "(", "'/?TG=CERT'", ",", "CorpNum", ",", "UserID", ")", "return", "result", ".", "url" ]
공인인증서 등록 URL args CorpNum : 회원 사업자번호 UserID : 회원 팝빌아이디 return 30초 보안 토큰을 포함한 url raise PopbillException
[ "공인인증서", "등록", "URL", "args", "CorpNum", ":", "회원", "사업자번호", "UserID", ":", "회원", "팝빌아이디", "return", "30초", "보안", "토큰을", "포함한", "url", "raise", "PopbillException" ]
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/taxinvoiceService.py#L1056-L1067
train
ChrisTimperley/Kaskara
python/kaskara/functions.py
FunctionDB.encloses
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...
python
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", "encloses", "(", "self", ",", "location", ":", "FileLocation", ")", "->", "Optional", "[", "FunctionDesc", "]", ":", "for", "func", "in", "self", ".", "in_file", "(", "location", ".", "filename", ")", ":", "if", "location", "in", "func", ".", "l...
Returns the function, if any, that encloses a given location.
[ "Returns", "the", "function", "if", "any", "that", "encloses", "a", "given", "location", "." ]
3d182d95b2938508e5990eddd30321be15e2f2ef
https://github.com/ChrisTimperley/Kaskara/blob/3d182d95b2938508e5990eddd30321be15e2f2ef/python/kaskara/functions.py#L97-L106
train
ChrisTimperley/Kaskara
python/kaskara/functions.py
FunctionDB.in_file
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, [])
python
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", "in_file", "(", "self", ",", "filename", ":", "str", ")", "->", "Iterator", "[", "FunctionDesc", "]", ":", "yield", "from", "self", ".", "__filename_to_functions", ".", "get", "(", "filename", ",", "[", "]", ")" ]
Returns an iterator over all of the functions definitions that are contained within a given file.
[ "Returns", "an", "iterator", "over", "all", "of", "the", "functions", "definitions", "that", "are", "contained", "within", "a", "given", "file", "." ]
3d182d95b2938508e5990eddd30321be15e2f2ef
https://github.com/ChrisTimperley/Kaskara/blob/3d182d95b2938508e5990eddd30321be15e2f2ef/python/kaskara/functions.py#L108-L113
train
MSchnei/pyprf_feature
pyprf_feature/analysis/model_creation_opt.py
model_creation_opt
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 ...
python
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", "model_creation_opt", "(", "dicCnfg", ",", "aryMdlParams", ",", "strPathHrf", "=", "None", ",", "varRat", "=", "None", ",", "lgcPrint", "=", "True", ")", ":", "# *************************************************************************", "# *** Load parameters from c...
Create or load pRF model time courses. Parameters ---------- dicCnfg : dict Dictionary containing config parameters. aryMdlParams : numpy arrays x, y and sigma parameters. strPathHrf : str or None: Path to npy file with custom hrf parameters. If None, default paramet...
[ "Create", "or", "load", "pRF", "model", "time", "courses", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/model_creation_opt.py#L27-L163
train
askedrelic/journal
journal/main.py
parse_config
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...
python
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", "parse_config", "(", "args", ")", ":", "# Try user config or return default location early", "config_path", "=", "path", ".", "expanduser", "(", "args", ".", "config_file", ")", "if", "not", "path", ".", "exists", "(", "config_path", ")", ":", "# Complain i...
Try to load config, to load other journal locations Otherwise, return default location Returns journal location
[ "Try", "to", "load", "config", "to", "load", "other", "journal", "locations", "Otherwise", "return", "default", "location" ]
848b8ec67ed124ec112926211ebeccbc8d11f2b0
https://github.com/askedrelic/journal/blob/848b8ec67ed124ec112926211ebeccbc8d11f2b0/journal/main.py#L72-L100
train
askedrelic/journal
journal/main.py
record_entries
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...
python
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", "record_entries", "(", "journal_location", ",", "entries", ")", ":", "check_journal_dest", "(", "journal_location", ")", "current_date", "=", "datetime", ".", "datetime", ".", "today", "(", ")", "date_header", "=", "current_date", ".", "strftime", "(", "\...
args entry - list of entries to record
[ "args", "entry", "-", "list", "of", "entries", "to", "record" ]
848b8ec67ed124ec112926211ebeccbc8d11f2b0
https://github.com/askedrelic/journal/blob/848b8ec67ed124ec112926211ebeccbc8d11f2b0/journal/main.py#L111-L128
train
askedrelic/journal
journal/main.py
get_entry
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...
python
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", "get_entry", "(", "journal_location", ",", "date", ")", ":", "if", "not", "isinstance", "(", "date", ",", "datetime", ".", "date", ")", ":", "return", "None", "try", ":", "with", "open", "(", "build_journal_path", "(", "journal_location", ",", "date...
args date - date object returns entry text or None if entry doesn't exist
[ "args", "date", "-", "date", "object", "returns", "entry", "text", "or", "None", "if", "entry", "doesn", "t", "exist" ]
848b8ec67ed124ec112926211ebeccbc8d11f2b0
https://github.com/askedrelic/journal/blob/848b8ec67ed124ec112926211ebeccbc8d11f2b0/journal/main.py#L136-L148
train
pmacosta/pcsv
pcsv/replace.py
replace
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 ...
python
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", "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 that contains the columns to be replaced :type fname1: FileNameExists_ :param fname2: Name of the replacement comma-separated values file, the ...
[ "r", "Replace", "data", "in", "one", "file", "with", "data", "from", "another", "file", "." ]
cd1588c19b0cd58c38bc672e396db940f88ffbd7
https://github.com/pmacosta/pcsv/blob/cd1588c19b0cd58c38bc672e396db940f88ffbd7/pcsv/replace.py#L43-L186
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_hrf.py
spmt
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(...
python
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", "spmt", "(", "t", ",", "peak_delay", "=", "6", ",", "under_delay", "=", "16", ",", "peak_disp", "=", "1", ",", "under_disp", "=", "1", ",", "p_u_ratio", "=", "6", ")", ":", "return", "spm_hrf_compat", "(", "t", ",", "peak_delay", "=", "peak_de...
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(t)`` of samples from HRF at times `t` Notes ----- [1] This is the canonical HRF functi...
[ "Normalized", "SPM", "HRF", "function", "from", "sum", "of", "two", "gamma", "PDFs" ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_hrf.py#L96-L129
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_hrf.py
dspmt
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 ...
python
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", "dspmt", "(", "t", ",", "peak_delay", "=", "6", ",", "under_delay", "=", "16", ",", "peak_disp", "=", "1", ",", "under_disp", "=", "1", ",", "p_u_ratio", "=", "6", ")", ":", "t", "=", "np", ".", "asarray", "(", "t", ")", "aryRsp1", "=", ...
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 vector length ``len(t)`` of samples from HRF at times `t` Notes ----- [1] This is the can...
[ "SPM", "canonical", "HRF", "derivative", "HRF", "derivative", "values", "for", "time", "values", "t" ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_hrf.py#L132-L165
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_hrf.py
ddspmt
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...
python
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", "ddspmt", "(", "t", ",", "peak_delay", "=", "6", ",", "under_delay", "=", "16", ",", "peak_disp", "=", "1", ",", "under_disp", "=", "1", ",", "p_u_ratio", "=", "6", ")", ":", "_spm_dd_func", "=", "partial", "(", "spmt", ",", "peak_delay", "=",...
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 vector length ``len(t)`` of samples from HRF at times `t` Notes ----- [1] This is the canonic...
[ "SPM", "canonical", "HRF", "dispersion", "derivative", "values", "for", "time", "values", "t" ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_hrf.py#L168-L200
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_hrf.py
create_boxcar
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...
python
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", "create_boxcar", "(", "aryCnd", ",", "aryOns", ",", "aryDrt", ",", "varTr", ",", "varNumVol", ",", "aryExclCnd", "=", "None", ",", "varTmpOvsmpl", "=", "1000.", ")", ":", "if", "aryExclCnd", "is", "not", "None", ":", "for", "cond", "in", "aryExclC...
Creation of condition time courses in temporally upsampled space. Parameters ---------- aryCnd : np.array 1D array with condition identifiers (every condition has its own int) aryOns : np.array, same len as aryCnd 1D array with condition onset times in seconds. aryDrt : np.array, s...
[ "Creation", "of", "condition", "time", "courses", "in", "temporally", "upsampled", "space", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_hrf.py#L203-L263
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_hrf.py
cnvl_tc
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...
python
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", "cnvl_tc", "(", "idxPrc", ",", "aryPrfTcChunk", ",", "lstHrf", ",", "varTr", ",", "varNumVol", ",", "varTmpOvsmpl", ",", "queOut", ",", "varHrfLen", "=", "32.", ",", "dctPrm", "=", "None", ")", ":", "# Adjust the input, if necessary, such that input is 2D, ...
Convolution of time courses with HRF model. Parameters ---------- idxPrc : int, positive Process ID of the process calling this function (for CPU multi-threading). In GPU version, this parameter is 0 (just one thread on CPU). aryPrfTcChunk : np.array 2D array with model ...
[ "Convolution", "of", "time", "courses", "with", "HRF", "model", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_hrf.py#L266-L371
train
curious-containers/cc-core
cc_core/commons/input_references.py
create_inputs_to_reference
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 ...
python
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", "create_inputs_to_reference", "(", "job_data", ",", "input_files", ",", "input_directories", ")", ":", "return", "{", "*", "*", "deepcopy", "(", "job_data", ")", ",", "*", "*", "deepcopy", "(", "input_files", ")", ",", "*", "*", "deepcopy", "(", "in...
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 describing the input files. :param input_directories: A dictionary describing the ...
[ "Creates", "a", "dictionary", "with", "the", "summarized", "information", "in", "job_data", "input_files", "and", "input_directories" ]
eaeb03a4366016aff54fcc6953d052ae12ed599b
https://github.com/curious-containers/cc-core/blob/eaeb03a4366016aff54fcc6953d052ae12ed599b/cc_core/commons/input_references.py#L22-L32
train
curious-containers/cc-core
cc_core/commons/input_references.py
_partition_all_internal
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)) ...
python
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_internal", "(", "s", ",", "sep", ")", ":", "parts", "=", "list", "(", "s", ".", "partition", "(", "sep", ")", ")", "# if sep found", "if", "parts", "[", "1", "]", "==", "sep", ":", "new_parts", "=", "partition_all", "(", "parts",...
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
[ "Uses", "str", ".", "partition", "()", "to", "split", "every", "occurrence", "of", "sep", "in", "s", ".", "The", "returned", "list", "does", "not", "contain", "empty", "strings", "." ]
eaeb03a4366016aff54fcc6953d052ae12ed599b
https://github.com/curious-containers/cc-core/blob/eaeb03a4366016aff54fcc6953d052ae12ed599b/cc_core/commons/input_references.py#L35-L55
train
curious-containers/cc-core
cc_core/commons/input_references.py
partition_all
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...
python
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", "partition_all", "(", "s", ",", "sep", ")", ":", "if", "isinstance", "(", "sep", ",", "list", ")", ":", "parts", "=", "_partition_all_internal", "(", "s", ",", "sep", "[", "0", "]", ")", "sep", "=", "sep", "[", "1", ":", "]", "for", "s", ...
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 list of parts split by 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...
eaeb03a4366016aff54fcc6953d052ae12ed599b
https://github.com/curious-containers/cc-core/blob/eaeb03a4366016aff54fcc6953d052ae12ed599b/cc_core/commons/input_references.py#L58-L79
train
curious-containers/cc-core
cc_core/commons/input_references.py
split_input_references
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...
python
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_input_references", "(", "to_split", ")", ":", "parts", "=", "partition_all", "(", "to_split", ",", "[", "INPUT_REFERENCE_START", ",", "INPUT_REFERENCE_END", "]", ")", "result", "=", "[", "]", "part", "=", "[", "]", "in_reference", "=", "False", ...
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: The string to split :raise InvalidInputRefer...
[ "Returns", "the", "given", "string", "in", "normal", "strings", "and", "unresolved", "input", "references", ".", "An", "input", "reference", "is", "identified", "as", "something", "of", "the", "following", "form", "$", "(", "...", ")", "." ]
eaeb03a4366016aff54fcc6953d052ae12ed599b
https://github.com/curious-containers/cc-core/blob/eaeb03a4366016aff54fcc6953d052ae12ed599b/cc_core/commons/input_references.py#L82-L125
train
curious-containers/cc-core
cc_core/commons/input_references.py
split_all
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 ...
python
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", "split_all", "(", "reference", ",", "sep", ")", ":", "parts", "=", "partition_all", "(", "reference", ",", "sep", ")", "return", "[", "p", "for", "p", "in", "parts", "if", "p", "not", "in", "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
[ "Splits", "a", "given", "string", "at", "a", "given", "separator", "or", "list", "of", "separators", "." ]
eaeb03a4366016aff54fcc6953d052ae12ed599b
https://github.com/curious-containers/cc-core/blob/eaeb03a4366016aff54fcc6953d052ae12ed599b/cc_core/commons/input_references.py#L138-L147
train
curious-containers/cc-core
cc_core/commons/input_references.py
_resolve_file
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 ...
python
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_file", "(", "attributes", ",", "input_file", ",", "input_identifier", ",", "input_reference", ")", ":", "if", "input_file", "[", "'isArray'", "]", ":", "raise", "InvalidInputReference", "(", "'Input References to Arrays of input files are currently not supp...
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 identifier of the given file. :param input_reference: The reference string :return...
[ "Returns", "the", "attributes", "in", "demand", "of", "the", "input", "file", "." ]
eaeb03a4366016aff54fcc6953d052ae12ed599b
https://github.com/curious-containers/cc-core/blob/eaeb03a4366016aff54fcc6953d052ae12ed599b/cc_core/commons/input_references.py#L150-L170
train
curious-containers/cc-core
cc_core/commons/input_references.py
_resolve_directory
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...
python
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_directory", "(", "attributes", ",", "input_directory", ",", "input_identifier", ",", "input_reference", ")", ":", "if", "input_directory", "[", "'isArray'", "]", ":", "raise", "InvalidInputReference", "(", "'Input References to Arrays of input directories a...
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. :param input_identifier: The input identifier of the given directory. :param input_reference: The ref...
[ "Returns", "the", "attributes", "in", "demand", "of", "the", "input", "directory", "." ]
eaeb03a4366016aff54fcc6953d052ae12ed599b
https://github.com/curious-containers/cc-core/blob/eaeb03a4366016aff54fcc6953d052ae12ed599b/cc_core/commons/input_references.py#L173-L193
train
curious-containers/cc-core
cc_core/commons/input_references.py
resolve_input_reference
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...
python
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_reference", "(", "reference", ",", "inputs_to_reference", ")", ":", "if", "not", "reference", ".", "startswith", "(", "'{}inputs.'", ".", "format", "(", "INPUT_REFERENCE_START", ")", ")", ":", "raise", "InvalidInputReference", "(", "'An input r...
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 InvalidInputReference: If the given input reference could not be resolved. ...
[ "Replaces", "a", "given", "input_reference", "by", "a", "string", "extracted", "from", "inputs_to_reference", "." ]
eaeb03a4366016aff54fcc6953d052ae12ed599b
https://github.com/curious-containers/cc-core/blob/eaeb03a4366016aff54fcc6953d052ae12ed599b/cc_core/commons/input_references.py#L196-L239
train
curious-containers/cc-core
cc_core/commons/input_references.py
resolve_input_references
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" ...
python
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", "resolve_input_references", "(", "to_resolve", ",", "inputs_to_reference", ")", ":", "splitted", "=", "split_input_references", "(", "to_resolve", ")", "result", "=", "[", "]", "for", "part", "in", "splitted", ":", "if", "is_input_reference", "(", "part", ...
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" :param to_resolve: The path to match :param inputs_to_reference: I...
[ "Resolves", "input", "references", "given", "in", "the", "string", "to_resolve", "by", "using", "the", "inputs_to_reference", "." ]
eaeb03a4366016aff54fcc6953d052ae12ed599b
https://github.com/curious-containers/cc-core/blob/eaeb03a4366016aff54fcc6953d052ae12ed599b/cc_core/commons/input_references.py#L242-L267
train
olivier-m/rafter
rafter/contrib/schematics/exceptions.py
ValidationErrors.data
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
python
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", "data", "(", "self", ")", ":", "res", "=", "{", "'error_list'", ":", "self", ".", "error_list", "}", "res", ".", "update", "(", "super", "(", "ValidationErrors", ",", "self", ")", ".", "data", ")", "return", "res" ]
Returns a dictionnary containing all the passed data and an item ``error_list`` which holds the result of :attr:`error_list`.
[ "Returns", "a", "dictionnary", "containing", "all", "the", "passed", "data", "and", "an", "item", "error_list", "which", "holds", "the", "result", "of", ":", "attr", ":", "error_list", "." ]
aafcf8fd019f24abcf519307c4484cc6b4697c04
https://github.com/olivier-m/rafter/blob/aafcf8fd019f24abcf519307c4484cc6b4697c04/rafter/contrib/schematics/exceptions.py#L24-L31
train
MSchnei/pyprf_feature
pyprf_feature/simulation/pRF_sim_compTngCrvs.py
circDiff
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...
python
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", "circDiff", "(", "length", ",", "ary1", ",", "ary2", ")", ":", "x", "=", "np", ".", "arange", "(", "length", ")", "mod", "=", "length", "%", "2", "if", "mod", "==", "0", ":", "temp", "=", "np", ".", "ones", "(", "length", ")", "temp", ...
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 between 0 and 3 will not be 3, but 1...
[ "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", ...
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/simulation/pRF_sim_compTngCrvs.py#L54-L80
train
linkhub-sdk/popbill.py
popbill/base.py
PopbillBase.getPartnerURL
def getPartnerURL(self, CorpNum, TOGO): """ 팝빌 회원 잔여포인트 확인 args CorpNum : 팝빌회원 사업자번호 TOGO : "CHRG" return URL raise PopbillException """ try: return linkhub.getPartnerURL(self._getToke...
python
def getPartnerURL(self, CorpNum, TOGO): """ 팝빌 회원 잔여포인트 확인 args CorpNum : 팝빌회원 사업자번호 TOGO : "CHRG" return URL raise PopbillException """ try: return linkhub.getPartnerURL(self._getToke...
[ "def", "getPartnerURL", "(", "self", ",", "CorpNum", ",", "TOGO", ")", ":", "try", ":", "return", "linkhub", ".", "getPartnerURL", "(", "self", ".", "_getToken", "(", "CorpNum", ")", ",", "TOGO", ")", "except", "LinkhubException", "as", "LE", ":", "raise...
팝빌 회원 잔여포인트 확인 args CorpNum : 팝빌회원 사업자번호 TOGO : "CHRG" return URL raise PopbillException
[ "팝빌", "회원", "잔여포인트", "확인", "args", "CorpNum", ":", "팝빌회원", "사업자번호", "TOGO", ":", "CHRG", "return", "URL", "raise", "PopbillException" ]
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/base.py#L80-L93
train
linkhub-sdk/popbill.py
popbill/base.py
PopbillBase.getBalance
def getBalance(self, CorpNum): """ 팝빌 회원 잔여포인트 확인 args CorpNum : 확인하고자 하는 회원 사업자번호 return 잔여포인트 by float raise PopbillException """ try: return linkhub.getBalance(self._getToken(CorpNum)) exce...
python
def getBalance(self, CorpNum): """ 팝빌 회원 잔여포인트 확인 args CorpNum : 확인하고자 하는 회원 사업자번호 return 잔여포인트 by float raise PopbillException """ try: return linkhub.getBalance(self._getToken(CorpNum)) exce...
[ "def", "getBalance", "(", "self", ",", "CorpNum", ")", ":", "try", ":", "return", "linkhub", ".", "getBalance", "(", "self", ".", "_getToken", "(", "CorpNum", ")", ")", "except", "LinkhubException", "as", "LE", ":", "raise", "PopbillException", "(", "LE", ...
팝빌 회원 잔여포인트 확인 args CorpNum : 확인하고자 하는 회원 사업자번호 return 잔여포인트 by float raise PopbillException
[ "팝빌", "회원", "잔여포인트", "확인", "args", "CorpNum", ":", "확인하고자", "하는", "회원", "사업자번호", "return", "잔여포인트", "by", "float", "raise", "PopbillException" ]
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/base.py#L95-L107
train
linkhub-sdk/popbill.py
popbill/base.py
PopbillBase.getAccessURL
def getAccessURL(self, CorpNum, UserID): """ 팝빌 로그인 URL args CorpNum : 회원 사업자번호 UserID : 회원 팝빌아이디 return 30초 보안 토큰을 포함한 url raise PopbillException """ result = self._httpget('/?TG=LOGIN', CorpNum...
python
def getAccessURL(self, CorpNum, UserID): """ 팝빌 로그인 URL args CorpNum : 회원 사업자번호 UserID : 회원 팝빌아이디 return 30초 보안 토큰을 포함한 url raise PopbillException """ result = self._httpget('/?TG=LOGIN', CorpNum...
[ "def", "getAccessURL", "(", "self", ",", "CorpNum", ",", "UserID", ")", ":", "result", "=", "self", ".", "_httpget", "(", "'/?TG=LOGIN'", ",", "CorpNum", ",", "UserID", ")", "return", "result", ".", "url" ]
팝빌 로그인 URL args CorpNum : 회원 사업자번호 UserID : 회원 팝빌아이디 return 30초 보안 토큰을 포함한 url raise PopbillException
[ "팝빌", "로그인", "URL", "args", "CorpNum", ":", "회원", "사업자번호", "UserID", ":", "회원", "팝빌아이디", "return", "30초", "보안", "토큰을", "포함한", "url", "raise", "PopbillException" ]
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/base.py#L140-L151
train
linkhub-sdk/popbill.py
popbill/base.py
PopbillBase.getChargeURL
def getChargeURL(self, CorpNum, UserID): """ 팝빌 연동회원 포인트 충전 URL args CorpNum : 회원 사업자번호 UserID : 회원 팝빌아이디 return 30초 보안 토큰을 포함한 url raise PopbillException """ result = self._httpget('/?TG=CHRG', ...
python
def getChargeURL(self, CorpNum, UserID): """ 팝빌 연동회원 포인트 충전 URL args CorpNum : 회원 사업자번호 UserID : 회원 팝빌아이디 return 30초 보안 토큰을 포함한 url raise PopbillException """ result = self._httpget('/?TG=CHRG', ...
[ "def", "getChargeURL", "(", "self", ",", "CorpNum", ",", "UserID", ")", ":", "result", "=", "self", ".", "_httpget", "(", "'/?TG=CHRG'", ",", "CorpNum", ",", "UserID", ")", "return", "result", ".", "url" ]
팝빌 연동회원 포인트 충전 URL args CorpNum : 회원 사업자번호 UserID : 회원 팝빌아이디 return 30초 보안 토큰을 포함한 url raise PopbillException
[ "팝빌", "연동회원", "포인트", "충전", "URL", "args", "CorpNum", ":", "회원", "사업자번호", "UserID", ":", "회원", "팝빌아이디", "return", "30초", "보안", "토큰을", "포함한", "url", "raise", "PopbillException" ]
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/base.py#L153-L164
train
linkhub-sdk/popbill.py
popbill/base.py
PopbillBase.checkIsMember
def checkIsMember(self, CorpNum): """ 회원가입여부 확인 args CorpNum : 회원 사업자번호 return 회원가입여부 True/False raise PopbillException """ if CorpNum == None or CorpNum == '': raise PopbillException(-99999999, "사업자번...
python
def checkIsMember(self, CorpNum): """ 회원가입여부 확인 args CorpNum : 회원 사업자번호 return 회원가입여부 True/False raise PopbillException """ if CorpNum == None or CorpNum == '': raise PopbillException(-99999999, "사업자번...
[ "def", "checkIsMember", "(", "self", ",", "CorpNum", ")", ":", "if", "CorpNum", "==", "None", "or", "CorpNum", "==", "''", ":", "raise", "PopbillException", "(", "-", "99999999", ",", "\"사업자번호가 입력되지 않았습니다.\")", "", "return", "self", ".", "_httpget", "(", "...
회원가입여부 확인 args CorpNum : 회원 사업자번호 return 회원가입여부 True/False raise PopbillException
[ "회원가입여부", "확인", "args", "CorpNum", ":", "회원", "사업자번호", "return", "회원가입여부", "True", "/", "False", "raise", "PopbillException" ]
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/base.py#L166-L178
train
linkhub-sdk/popbill.py
popbill/base.py
PopbillBase.joinMember
def joinMember(self, JoinInfo): """ 팝빌 회원가입 args JoinInfo : 회원가입정보. Reference JoinForm class return 처리결과. consist of code and message raise PopbillException """ JoinInfo.LinkID = self.__linkID postData = ...
python
def joinMember(self, JoinInfo): """ 팝빌 회원가입 args JoinInfo : 회원가입정보. Reference JoinForm class return 처리결과. consist of code and message raise PopbillException """ JoinInfo.LinkID = self.__linkID postData = ...
[ "def", "joinMember", "(", "self", ",", "JoinInfo", ")", ":", "JoinInfo", ".", "LinkID", "=", "self", ".", "__linkID", "postData", "=", "self", ".", "_stringtify", "(", "JoinInfo", ")", "return", "self", ".", "_httppost", "(", "'/Join'", ",", "postData", ...
팝빌 회원가입 args JoinInfo : 회원가입정보. Reference JoinForm class return 처리결과. consist of code and message raise PopbillException
[ "팝빌", "회원가입", "args", "JoinInfo", ":", "회원가입정보", ".", "Reference", "JoinForm", "class", "return", "처리결과", ".", "consist", "of", "code", "and", "message", "raise", "PopbillException" ]
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/base.py#L180-L191
train
linkhub-sdk/popbill.py
popbill/base.py
PopbillBase.updateContact
def updateContact(self, CorpNum, ContactInfo, UserID=None): """ 담당자 정보 수정 args CorpNum : 회원 사업자번호 ContactInfo : 담당자 정보, Reference ContactInfo class UserID : 회원 아이디 return 처리결과. consist of code and message raise ...
python
def updateContact(self, CorpNum, ContactInfo, UserID=None): """ 담당자 정보 수정 args CorpNum : 회원 사업자번호 ContactInfo : 담당자 정보, Reference ContactInfo class UserID : 회원 아이디 return 처리결과. consist of code and message raise ...
[ "def", "updateContact", "(", "self", ",", "CorpNum", ",", "ContactInfo", ",", "UserID", "=", "None", ")", ":", "postData", "=", "self", ".", "_stringtify", "(", "ContactInfo", ")", "return", "self", ".", "_httppost", "(", "'/IDs'", ",", "postData", ",", ...
담당자 정보 수정 args CorpNum : 회원 사업자번호 ContactInfo : 담당자 정보, Reference ContactInfo class UserID : 회원 아이디 return 처리결과. consist of code and message raise PopbillException
[ "담당자", "정보", "수정", "args", "CorpNum", ":", "회원", "사업자번호", "ContactInfo", ":", "담당자", "정보", "Reference", "ContactInfo", "class", "UserID", ":", "회원", "아이디", "return", "처리결과", ".", "consist", "of", "code", "and", "message", "raise", "PopbillException" ]
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/base.py#L219-L231
train
linkhub-sdk/popbill.py
popbill/base.py
PopbillBase.updateCorpInfo
def updateCorpInfo(self, CorpNum, CorpInfo, UserID=None): """ 담당자 정보 수정 args CorpNum : 회원 사업자번호 CorpInfo : 회사 정보, Reference CorpInfo class UserID : 회원 아이디 return 처리결과. consist of code and message raise ...
python
def updateCorpInfo(self, CorpNum, CorpInfo, UserID=None): """ 담당자 정보 수정 args CorpNum : 회원 사업자번호 CorpInfo : 회사 정보, Reference CorpInfo class UserID : 회원 아이디 return 처리결과. consist of code and message raise ...
[ "def", "updateCorpInfo", "(", "self", ",", "CorpNum", ",", "CorpInfo", ",", "UserID", "=", "None", ")", ":", "postData", "=", "self", ".", "_stringtify", "(", "CorpInfo", ")", "return", "self", ".", "_httppost", "(", "'/CorpInfo'", ",", "postData", ",", ...
담당자 정보 수정 args CorpNum : 회원 사업자번호 CorpInfo : 회사 정보, Reference CorpInfo class UserID : 회원 아이디 return 처리결과. consist of code and message raise PopbillException
[ "담당자", "정보", "수정", "args", "CorpNum", ":", "회원", "사업자번호", "CorpInfo", ":", "회사", "정보", "Reference", "CorpInfo", "class", "UserID", ":", "회원", "아이디", "return", "처리결과", ".", "consist", "of", "code", "and", "message", "raise", "PopbillException" ]
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/base.py#L245-L257
train
linkhub-sdk/popbill.py
popbill/base.py
PopbillBase.registContact
def registContact(self, CorpNum, ContactInfo, UserID=None): """ 담당자 추가 args CorpNum : 회원 사업자번호 ContactInfo : 담당자 정보, Reference ContactInfo class UserID : 회원 아이디 return 처리결과. consist of code and message raise ...
python
def registContact(self, CorpNum, ContactInfo, UserID=None): """ 담당자 추가 args CorpNum : 회원 사업자번호 ContactInfo : 담당자 정보, Reference ContactInfo class UserID : 회원 아이디 return 처리결과. consist of code and message raise ...
[ "def", "registContact", "(", "self", ",", "CorpNum", ",", "ContactInfo", ",", "UserID", "=", "None", ")", ":", "postData", "=", "self", ".", "_stringtify", "(", "ContactInfo", ")", "return", "self", ".", "_httppost", "(", "'/IDs/New'", ",", "postData", ","...
담당자 추가 args CorpNum : 회원 사업자번호 ContactInfo : 담당자 정보, Reference ContactInfo class UserID : 회원 아이디 return 처리결과. consist of code and message raise PopbillException
[ "담당자", "추가", "args", "CorpNum", ":", "회원", "사업자번호", "ContactInfo", ":", "담당자", "정보", "Reference", "ContactInfo", "class", "UserID", ":", "회원", "아이디", "return", "처리결과", ".", "consist", "of", "code", "and", "message", "raise", "PopbillException" ]
68a0dd7f7a937603318e93be321fde73c50b96cc
https://github.com/linkhub-sdk/popbill.py/blob/68a0dd7f7a937603318e93be321fde73c50b96cc/popbill/base.py#L259-L271
train
mpasternak/django-flexible-reports
flexible_reports/models/validators.py
TemplateValidator
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} )
python
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", "TemplateValidator", "(", "value", ")", ":", "try", ":", "Template", "(", "value", ")", "except", "Exception", "as", "e", ":", "raise", "ValidationError", "(", "_", "(", "\"Cannot compile template (%(exception)s)\"", ")", ",", "params", "=", "{", "\"exc...
Try to compile a string into a Django template
[ "Try", "to", "compile", "a", "string", "into", "a", "Django", "template" ]
7a9a657bc3778c150357f1efe7208077b1a1490b
https://github.com/mpasternak/django-flexible-reports/blob/7a9a657bc3778c150357f1efe7208077b1a1490b/flexible_reports/models/validators.py#L7-L16
train
pmacosta/pcsv
pcsv/merge.py
merge
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...
python
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", "merge", "(", "fname1", ",", "fname2", ",", "dfilter1", "=", "None", ",", "dfilter2", "=", "None", ",", "has_header1", "=", "True", ",", "has_header2", "=", "True", ",", "frow1", "=", "0", ",", "frow2", "=", "0", ",", "ofname", "=", "None", ...
r""" Merge two comma-separated values files. Data columns from the second file are appended after data columns from the first file. Empty values in columns are used if the files have different number of rows :param fname1: Name of the first comma-separated values file, the file ...
[ "r", "Merge", "two", "comma", "-", "separated", "values", "files", "." ]
cd1588c19b0cd58c38bc672e396db940f88ffbd7
https://github.com/pmacosta/pcsv/blob/cd1588c19b0cd58c38bc672e396db940f88ffbd7/pcsv/merge.py#L43-L197
train
MSchnei/pyprf_feature
pyprf_feature/analysis/pyprf_opt_brute.py
pyprf_opt_brute
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...
python
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", "pyprf_opt_brute", "(", "strCsvCnfg", ",", "objNspc", ",", "lgcTest", "=", "False", ",", "strPathHrf", "=", "None", ",", "varRat", "=", "None", ")", ":", "# *************************************************************************", "# *** Check time", "print", "...
Function for optimizing given pRF paramaters using brute-force grid search. Parameters ---------- strCsvCnfg : str Absolute file path of config file. objNspc : object Name space from command line arguments. lgcTest : Boolean Whether this is a test (pytest). If yes, absolute ...
[ "Function", "for", "optimizing", "given", "pRF", "paramaters", "using", "brute", "-", "force", "grid", "search", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/pyprf_opt_brute.py#L48-L577
train
osilkin98/PyBRY
generator.py
get_lbry_api_function_docs
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...
python
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", "get_lbry_api_function_docs", "(", "url", "=", "LBRY_API_RAW_JSON_URL", ")", ":", "try", ":", "# Grab the page content", "docs_page", "=", "urlopen", "(", "url", ")", "# Read the contents of the actual url we grabbed and decode them into UTF-8", "contents", "=", "docs_...
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 from the `url` given :rtype: list
[ "Scrapes", "the", "given", "URL", "to", "a", "page", "in", "JSON", "format", "to", "obtain", "the", "documentation", "for", "the", "LBRY", "API" ]
af86805a8077916f72f3fe980943d4cd741e61f0
https://github.com/osilkin98/PyBRY/blob/af86805a8077916f72f3fe980943d4cd741e61f0/generator.py#L10-L36
train
osilkin98/PyBRY
generator.py
generate_method_definition
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...
python
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_method_definition", "(", "func", ")", ":", "indent", "=", "4", "# initial definition", "method_definition", "=", "(", "\" \"", "*", "indent", ")", "+", "\"def \"", "+", "func", "[", "\"name\"", "]", "# Here we just create a queue and put all the param...
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
[ "Generates", "the", "body", "for", "the", "given", "function" ]
af86805a8077916f72f3fe980943d4cd741e61f0
https://github.com/osilkin98/PyBRY/blob/af86805a8077916f72f3fe980943d4cd741e61f0/generator.py#L39-L162
train
osilkin98/PyBRY
generator.py
generate_lbryd_wrapper
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 ...
python
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", "generate_lbryd_wrapper", "(", "url", "=", "LBRY_API_RAW_JSON_URL", ",", "read_file", "=", "__LBRYD_BASE_FPATH__", ",", "write_file", "=", "LBRYD_FPATH", ")", ":", "functions", "=", "get_lbry_api_function_docs", "(", "url", ")", "# Open the actual file for appendin...
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 :param str read_file: This is the path to the file from which we will be reading :param str write_file: Path from p...
[ "Generates", "the", "actual", "functions", "for", "lbryd_api", ".", "py", "based", "on", "lbry", "s", "documentation" ]
af86805a8077916f72f3fe980943d4cd741e61f0
https://github.com/osilkin98/PyBRY/blob/af86805a8077916f72f3fe980943d4cd741e61f0/generator.py#L167-L205
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_general.py
load_nii
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....
python
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_nii", "(", "strPathIn", ",", "varSzeThr", "=", "5000.0", ")", ":", "# Load nii file (this does not load the data into memory yet):", "objNii", "=", "nb", ".", "load", "(", "strPathIn", ")", "# Get size of nii file:", "varNiiSze", "=", "os", ".", "path", ...
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. Default threshold is 1000 MB. Returns ...
[ "Load", "nii", "file", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_general.py#L26-L102
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_general.py
load_res_prm
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...
python
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", "load_res_prm", "(", "lstFunc", ",", "lstFlsMsk", "=", "None", ")", ":", "# load parameter/functional maps into a list", "lstPrm", "=", "[", "]", "for", "ind", ",", "path", "in", "enumerate", "(", "lstFunc", ")", ":", "aryFnc", "=", "load_nii", "(", "...
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 mask/s Returns ------- lstPrmAry : li...
[ "Load", "result", "parameters", "from", "multiple", "nii", "files", "with", "optional", "mask", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_general.py#L105-L173
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_general.py
export_nii
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...
python
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", "export_nii", "(", "ary2dNii", ",", "lstNiiNames", ",", "aryLgcMsk", ",", "aryLgcVar", ",", "tplNiiShp", ",", "aryAff", ",", "hdrMsk", ",", "outFormat", "=", "'3D'", ")", ":", "# Number of voxels that were included in the mask:", "varNumVoxMsk", "=", "np", ...
Export nii file(s). Parameters ---------- ary2dNii : numpy array Numpy array with results to be exported to nii. lstNiiNames : list List that contains strings with the complete file names. aryLgcMsk : numpy array If the nii file is larger than this threshold (in MB), the fil...
[ "Export", "nii", "file", "(", "s", ")", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_general.py#L176-L270
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_general.py
joinRes
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...
python
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", "joinRes", "(", "lstPrfRes", ",", "varPar", ",", "idxPos", ",", "inFormat", "=", "'1D'", ")", ":", "if", "inFormat", "==", "'1D'", ":", "# initialize output array", "aryOut", "=", "np", ".", "zeros", "(", "(", "0", ",", ")", ")", "# gather arrays ...
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 idxPos : integer, positive List position index that we e...
[ "Join", "results", "from", "different", "processing", "units", "(", "here", "cores", ")", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_general.py#L273-L309
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_general.py
cmp_res_R2
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 ...
python
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", "cmp_res_R2", "(", "lstRat", ",", "lstNiiNames", ",", "strPathOut", ",", "strPathMdl", ",", "lgcSveMdlTc", "=", "True", ",", "lgcDel", "=", "False", ",", "strNmeExt", "=", "''", ")", ":", "print", "(", "'---Compare results for different ratios'", ")", "...
Compare results for different exponents and create winner nii. Parameters ---------- lstRat : list List of floats containing the ratios that were tested for surround suppression. lstNiiNames : list List of names of the different pRF maps (e.g. xpos, ypos, SD) strPathOut : st...
[ "Compare", "results", "for", "different", "exponents", "and", "create", "winner", "nii", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_general.py#L312-L529
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_general.py
map_crt_to_pol
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...
python
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_crt_to_pol", "(", "aryXCrds", ",", "aryYrds", ")", ":", "aryRad", "=", "np", ".", "sqrt", "(", "aryXCrds", "**", "2", "+", "aryYrds", "**", "2", ")", "aryTht", "=", "np", ".", "arctan2", "(", "aryYrds", ",", "aryXCrds", ")", "return", "ar...
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 Angle of coordinates aryRad : 1D numpy arra...
[ "Remap", "coordinates", "from", "cartesian", "to", "polar" ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_general.py#L532-L553
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_general.py
map_pol_to_crt
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...
python
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", "map_pol_to_crt", "(", "aryTht", ",", "aryRad", ")", ":", "aryXCrds", "=", "aryRad", "*", "np", ".", "cos", "(", "aryTht", ")", "aryYrds", "=", "aryRad", "*", "np", ".", "sin", "(", "aryTht", ")", "return", "aryXCrds", ",", "aryYrds" ]
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 values. aryYrds : 1D numpy array ...
[ "Remap", "coordinates", "from", "polar", "to", "cartesian" ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_general.py#L556-L577
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_general.py
find_near_pol_ang
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 ...
python
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", "find_near_pol_ang", "(", "aryEmpPlrAng", ",", "aryExpPlrAng", ")", ":", "dist", "=", "np", ".", "abs", "(", "np", ".", "subtract", "(", "aryEmpPlrAng", "[", ":", ",", "None", "]", ",", "aryExpPlrAng", "[", "None", ",", ":", "]", ")", ")", "re...
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 ------- aryXCrds : 1D numpy array Indices of ...
[ "Return", "index", "of", "nearest", "expected", "polar", "angle", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_general.py#L580-L601
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_general.py
rmp_rng
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...
python
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_rng", "(", "aryVls", ",", "varNewMin", ",", "varNewMax", ",", "varOldThrMin", "=", "None", ",", "varOldAbsMax", "=", "None", ")", ":", "if", "varOldThrMin", "is", "None", ":", "varOldMin", "=", "aryVls", ".", "min", "(", ")", "else", ":", "...
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 new, remapped array. varNewMax : float Desired maximum value of new, remapped array. v...
[ "Remap", "values", "in", "an", "array", "from", "one", "range", "to", "another", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_general.py#L604-L644
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_general.py
rmp_deg_pixel_xys
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 ...
python
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", "rmp_deg_pixel_xys", "(", "vecX", ",", "vecY", ",", "vecPrfSd", ",", "tplPngSize", ",", "varExtXmin", ",", "varExtXmax", ",", "varExtYmin", ",", "varExtYmax", ")", ":", "# Remap modelled x-positions of the pRFs:", "vecXpxl", "=", "rmp_rng", "(", "vecX", ","...
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 Array with possible y parametrs in degree vecPrfSd : 1D numpy array Array with possible sd parametrs in degree ...
[ "Remap", "x", "y", "sigma", "parameters", "from", "degrees", "to", "pixel", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_general.py#L647-L705
train
MSchnei/pyprf_feature
pyprf_feature/analysis/utils_general.py
cnvl_2D_gauss
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...
python
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", "cnvl_2D_gauss", "(", "idxPrc", ",", "aryMdlParamsChnk", ",", "arySptExpInf", ",", "tplPngSize", ",", "queOut", ",", "strCrd", "=", "'crt'", ")", ":", "# Number of combinations of model parameters in the current chunk:", "varChnkSze", "=", "aryMdlParamsChnk", ".", ...
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, this parameter is 0 (just one thread on CPU). aryMdlParamsChnk : 2d numpy array, shape [n_models, n_mode...
[ "Spatially", "convolve", "input", "with", "2D", "Gaussian", "model", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/utils_general.py#L747-L835
train
mediawiki-utilities/python-mwreverts
mwreverts/detector.py
Detector.process
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...
python
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", "process", "(", "self", ",", "checksum", ",", "revision", "=", "None", ")", ":", "revert", "=", "None", "if", "checksum", "in", "self", ":", "# potential revert", "reverteds", "=", "list", "(", "self", ".", "up_to", "(", "checksum", ")", ")", "i...
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 Any identity-machable string-based hash of revision content ...
[ "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", ...
d379ac941e14e235ad82a48bd445a3dfa6cc022e
https://github.com/mediawiki-utilities/python-mwreverts/blob/d379ac941e14e235ad82a48bd445a3dfa6cc022e/mwreverts/detector.py#L39-L65
train
MSchnei/pyprf_feature
pyprf_feature/analysis/__main__.py
main
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...
python
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", "main", "(", ")", ":", "# %% Print Welcome message", "strWelcome", "=", "'pyprf_feature '", "+", "__version__", "strDec", "=", "'='", "*", "len", "(", "strWelcome", ")", "print", "(", "strDec", "+", "'\\n'", "+", "strWelcome", "+", "'\\n'", "+", "strD...
pyprf_feature entry point.
[ "pyprf_feature", "entry", "point", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/__main__.py#L39-L196
train
MSchnei/pyprf_feature
pyprf_feature/analysis/old/pRF_filtering.py
funcSmthSpt
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...
python
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", "funcSmthSpt", "(", "aryFuncChnk", ",", "varSdSmthSpt", ")", ":", "varNdim", "=", "aryFuncChnk", ".", "ndim", "# Number of time points in this chunk:", "varNumVol", "=", "aryFuncChnk", ".", "shape", "[", "-", "1", "]", "# Loop through volumes:", "if", "varNdi...
Apply spatial smoothing to the input data. Parameters ---------- aryFuncChnk : np.array TODO varSdSmthSpt : float (?) Extent of smoothing. Returns ------- aryFuncChnk : np.array Smoothed data.
[ "Apply", "spatial", "smoothing", "to", "the", "input", "data", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/old/pRF_filtering.py#L27-L68
train
MSchnei/pyprf_feature
pyprf_feature/analysis/old/pRF_filtering.py
funcSmthTmp
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 """ ...
python
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", "funcSmthTmp", "(", "aryFuncChnk", ",", "varSdSmthTmp", ")", ":", "# For the filtering to perform well at the ends of the time series, we", "# set the method to 'nearest' and place a volume with mean intensity", "# (over time) at the beginning and at the end.", "aryFuncChnkMean", "=",...
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
[ "Apply", "temporal", "smoothing", "to", "fMRI", "data", "&", "pRF", "time", "course", "models", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/old/pRF_filtering.py#L72-L111
train
MSchnei/pyprf_feature
pyprf_feature/analysis/prepare.py
prep_models
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 ...
python
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_models", "(", "aryPrfTc", ",", "varSdSmthTmp", "=", "2.0", ",", "lgcPrint", "=", "True", ")", ":", "if", "lgcPrint", ":", "print", "(", "'------Prepare pRF time course models'", ")", "# Define temporal smoothing of pRF time course models", "def", "funcSmthT...
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 Extent of temporal smoothing that is applied to functional data a...
[ "Prepare", "pRF", "model", "time", "courses", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/prepare.py#L25-L119
train
MSchnei/pyprf_feature
pyprf_feature/analysis/prepare.py
prep_func
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...
python
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", "prep_func", "(", "strPathNiiMask", ",", "lstPathNiiFunc", ",", "varAvgThr", "=", "100.", ",", "varVarThr", "=", "0.0001", ",", "strPrePro", "=", "'demean'", ")", ":", "print", "(", "'------Load & prepare nii data'", ")", "# Load mask (to restrict model fitting...
Load & prepare functional data. Parameters ---------- strPathNiiMask: str Path to mask used to restrict pRF model finding. Only voxels with a value greater than zero in the mask are considered. lstPathNiiFunc : list List of paths of functional data (nii files). varAvgThr : f...
[ "Load", "&", "prepare", "functional", "data", "." ]
49004ede7ae1ddee07a30afe9ce3e2776750805c
https://github.com/MSchnei/pyprf_feature/blob/49004ede7ae1ddee07a30afe9ce3e2776750805c/pyprf_feature/analysis/prepare.py#L122-L328
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
StyleStack.get
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
python
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", "get", "(", "self", ",", "style", ")", ":", "level", "=", "len", "(", "self", ".", "stack", ")", "-", "1", "while", "level", ">=", "0", ":", "if", "style", "in", "self", ".", "stack", "[", "level", "]", ":", "return", "self", ".", "stack...
what's the value of a style at the current stack level
[ "what", "s", "the", "value", "of", "a", "style", "at", "the", "current", "stack", "level" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L124-L132
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
StyleStack.enforce_type
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: ...
python
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", "enforce_type", "(", "self", ",", "attr", ",", "val", ")", ":", "if", "not", "attr", "in", "self", ".", "types", ":", "return", "utfstr", "(", "val", ")", "elif", "self", ".", "types", "[", "attr", "]", "==", "'int'", ":", "return", "int", ...
converts a value to the attribute's type
[ "converts", "a", "value", "to", "the", "attribute", "s", "type" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L134-L143
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
StyleStack.push
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: '+...
python
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", "push", "(", "self", ",", "style", "=", "{", "}", ")", ":", "_style", "=", "{", "}", "for", "attr", "in", "style", ":", "if", "attr", "in", "self", ".", "cmds", "and", "not", "style", "[", "attr", "]", "in", "self", ".", "cmds", "[", "...
push a new level on the stack with a style dictionnary containing style:value pairs
[ "push", "a", "new", "level", "on", "the", "stack", "with", "a", "style", "dictionnary", "containing", "style", ":", "value", "pairs" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L145-L153
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
StyleStack.set
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: '+...
python
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", "set", "(", "self", ",", "style", "=", "{", "}", ")", ":", "_style", "=", "{", "}", "for", "attr", "in", "style", ":", "if", "attr", "in", "self", ".", "cmds", "and", "not", "style", "[", "attr", "]", "in", "self", ".", "cmds", "[", "a...
overrides style values at the current stack level
[ "overrides", "style", "values", "at", "the", "current", "stack", "level" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L155-L162
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
StyleStack.to_escpos
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(...
python
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(...
[ "def", "to_escpos", "(", "self", ")", ":", "cmd", "=", "''", "ordered_cmds", "=", "self", ".", "cmds", ".", "keys", "(", ")", "ordered_cmds", ".", "sort", "(", "lambda", "x", ",", "y", ":", "cmp", "(", "self", ".", "cmds", "[", "x", "]", "[", "...
converts the current style to an escpos command string
[ "converts", "the", "current", "style", "to", "an", "escpos", "command", "string" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L169-L176
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
XmlSerializer.start_inline
def start_inline(self,stylestack=None): """ starts an inline entity with an optional style definition """ self.stack.append('inline') if self.dirty: self.escpos._raw(' ') if stylestack: self.style(stylestack)
python
def start_inline(self,stylestack=None): """ starts an inline entity with an optional style definition """ self.stack.append('inline') if self.dirty: self.escpos._raw(' ') if stylestack: self.style(stylestack)
[ "def", "start_inline", "(", "self", ",", "stylestack", "=", "None", ")", ":", "self", ".", "stack", ".", "append", "(", "'inline'", ")", "if", "self", ".", "dirty", ":", "self", ".", "escpos", ".", "_raw", "(", "' '", ")", "if", "stylestack", ":", ...
starts an inline entity with an optional style definition
[ "starts", "an", "inline", "entity", "with", "an", "optional", "style", "definition" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L189-L195
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
XmlSerializer.start_block
def start_block(self,stylestack=None): """ starts a block entity with an optional style definition """ if self.dirty: self.escpos._raw('\n') self.dirty = False self.stack.append('block') if stylestack: self.style(stylestack)
python
def start_block(self,stylestack=None): """ starts a block entity with an optional style definition """ if self.dirty: self.escpos._raw('\n') self.dirty = False self.stack.append('block') if stylestack: self.style(stylestack)
[ "def", "start_block", "(", "self", ",", "stylestack", "=", "None", ")", ":", "if", "self", ".", "dirty", ":", "self", ".", "escpos", ".", "_raw", "(", "'\\n'", ")", "self", ".", "dirty", "=", "False", "self", ".", "stack", ".", "append", "(", "'blo...
starts a block entity with an optional style definition
[ "starts", "a", "block", "entity", "with", "an", "optional", "style", "definition" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L197-L204
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
XmlSerializer.end_entity
def end_entity(self): """ ends the entity definition. (but does not cancel the active style!) """ if self.stack[-1] == 'block' and self.dirty: self.escpos._raw('\n') self.dirty = False if len(self.stack) > 1: self.stack = self.stack[:-1]
python
def end_entity(self): """ ends the entity definition. (but does not cancel the active style!) """ if self.stack[-1] == 'block' and self.dirty: self.escpos._raw('\n') self.dirty = False if len(self.stack) > 1: self.stack = self.stack[:-1]
[ "def", "end_entity", "(", "self", ")", ":", "if", "self", ".", "stack", "[", "-", "1", "]", "==", "'block'", "and", "self", ".", "dirty", ":", "self", ".", "escpos", ".", "_raw", "(", "'\\n'", ")", "self", ".", "dirty", "=", "False", "if", "len",...
ends the entity definition. (but does not cancel the active style!)
[ "ends", "the", "entity", "definition", ".", "(", "but", "does", "not", "cancel", "the", "active", "style!", ")" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L206-L212
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
XmlSerializer.pre
def pre(self,text): """ puts a string of text in the entity keeping the whitespace intact """ if text: self.escpos.text(text) self.dirty = True
python
def pre(self,text): """ puts a string of text in the entity keeping the whitespace intact """ if text: self.escpos.text(text) self.dirty = True
[ "def", "pre", "(", "self", ",", "text", ")", ":", "if", "text", ":", "self", ".", "escpos", ".", "text", "(", "text", ")", "self", ".", "dirty", "=", "True" ]
puts a string of text in the entity keeping the whitespace intact
[ "puts", "a", "string", "of", "text", "in", "the", "entity", "keeping", "the", "whitespace", "intact" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L214-L218
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
XmlSerializer.text
def text(self,text): """ puts text in the entity. Whitespace and newlines are stripped to single spaces. """ if text: text = utfstr(text) text = text.strip() text = re.sub('\s+',' ',text) if text: self.dirty = True self.escp...
python
def text(self,text): """ puts text in the entity. Whitespace and newlines are stripped to single spaces. """ if text: text = utfstr(text) text = text.strip() text = re.sub('\s+',' ',text) if text: self.dirty = True self.escp...
[ "def", "text", "(", "self", ",", "text", ")", ":", "if", "text", ":", "text", "=", "utfstr", "(", "text", ")", "text", "=", "text", ".", "strip", "(", ")", "text", "=", "re", ".", "sub", "(", "'\\s+'", ",", "' '", ",", "text", ")", "if", "tex...
puts text in the entity. Whitespace and newlines are stripped to single spaces.
[ "puts", "text", "in", "the", "entity", ".", "Whitespace", "and", "newlines", "are", "stripped", "to", "single", "spaces", "." ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L220-L228
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
Escpos._check_image_size
def _check_image_size(self, size): """ Check and fix the size of the image to 32 bits """ if size % 32 == 0: return (0, 0) else: image_border = 32 - (size % 32) if (image_border % 2) == 0: return (image_border / 2, image_border / 2) ...
python
def _check_image_size(self, size): """ Check and fix the size of the image to 32 bits """ if size % 32 == 0: return (0, 0) else: image_border = 32 - (size % 32) if (image_border % 2) == 0: return (image_border / 2, image_border / 2) ...
[ "def", "_check_image_size", "(", "self", ",", "size", ")", ":", "if", "size", "%", "32", "==", "0", ":", "return", "(", "0", ",", "0", ")", "else", ":", "image_border", "=", "32", "-", "(", "size", "%", "32", ")", "if", "(", "image_border", "%", ...
Check and fix the size of the image to 32 bits
[ "Check", "and", "fix", "the", "size", "of", "the", "image", "to", "32", "bits" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L314-L323
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
Escpos._print_image
def _print_image(self, line, size): """ Print formatted image """ i = 0 cont = 0 buffer = "" self._raw(S_RASTER_N) buffer = "%02X%02X%02X%02X" % (((size[0]/size[1])/8), 0, size[1], 0) self._raw(buffer.decode('hex')) buffer = "" while i < ...
python
def _print_image(self, line, size): """ Print formatted image """ i = 0 cont = 0 buffer = "" self._raw(S_RASTER_N) buffer = "%02X%02X%02X%02X" % (((size[0]/size[1])/8), 0, size[1], 0) self._raw(buffer.decode('hex')) buffer = "" while i < ...
[ "def", "_print_image", "(", "self", ",", "line", ",", "size", ")", ":", "i", "=", "0", "cont", "=", "0", "buffer", "=", "\"\"", "self", ".", "_raw", "(", "S_RASTER_N", ")", "buffer", "=", "\"%02X%02X%02X%02X\"", "%", "(", "(", "(", "size", "[", "0"...
Print formatted image
[ "Print", "formatted", "image" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L325-L345
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
Escpos._raw_print_image
def _raw_print_image(self, line, size, output=None ): """ Print formatted image """ i = 0 cont = 0 buffer = "" raw = "" def __raw(string): if output: output(string) else: self._raw(string) raw += S_R...
python
def _raw_print_image(self, line, size, output=None ): """ Print formatted image """ i = 0 cont = 0 buffer = "" raw = "" def __raw(string): if output: output(string) else: self._raw(string) raw += S_R...
[ "def", "_raw_print_image", "(", "self", ",", "line", ",", "size", ",", "output", "=", "None", ")", ":", "i", "=", "0", "cont", "=", "0", "buffer", "=", "\"\"", "raw", "=", "\"\"", "def", "__raw", "(", "string", ")", ":", "if", "output", ":", "out...
Print formatted image
[ "Print", "formatted", "image" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L347-L375
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
Escpos._convert_image
def _convert_image(self, im): """ Parse image and prepare it to a printable format """ pixels = [] pix_line = "" im_left = "" im_right = "" switch = 0 img_size = [ 0, 0 ] if im.size[0] > 512: print "WARNING: Image is wider than 512 and ...
python
def _convert_image(self, im): """ Parse image and prepare it to a printable format """ pixels = [] pix_line = "" im_left = "" im_right = "" switch = 0 img_size = [ 0, 0 ] if im.size[0] > 512: print "WARNING: Image is wider than 512 and ...
[ "def", "_convert_image", "(", "self", ",", "im", ")", ":", "pixels", "=", "[", "]", "pix_line", "=", "\"\"", "im_left", "=", "\"\"", "im_right", "=", "\"\"", "switch", "=", "0", "img_size", "=", "[", "0", ",", "0", "]", "if", "im", ".", "size", "...
Parse image and prepare it to a printable format
[ "Parse", "image", "and", "prepare", "it", "to", "a", "printable", "format" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L377-L422
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
Escpos.image
def image(self,path_img): """ Open image file """ im_open = Image.open(path_img) im = im_open.convert("RGB") # Convert the RGB image in printable image pix_line, img_size = self._convert_image(im) self._print_image(pix_line, img_size)
python
def image(self,path_img): """ Open image file """ im_open = Image.open(path_img) im = im_open.convert("RGB") # Convert the RGB image in printable image pix_line, img_size = self._convert_image(im) self._print_image(pix_line, img_size)
[ "def", "image", "(", "self", ",", "path_img", ")", ":", "im_open", "=", "Image", ".", "open", "(", "path_img", ")", "im", "=", "im_open", ".", "convert", "(", "\"RGB\"", ")", "# Convert the RGB image in printable image", "pix_line", ",", "img_size", "=", "se...
Open image file
[ "Open", "image", "file" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L424-L430
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
Escpos.qr
def qr(self,text): """ Print QR Code for the provided string """ qr_code = qrcode.QRCode(version=4, box_size=4, border=1) qr_code.add_data(text) qr_code.make(fit=True) qr_img = qr_code.make_image() im = qr_img._img.convert("RGB") # Convert the RGB image in printab...
python
def qr(self,text): """ Print QR Code for the provided string """ qr_code = qrcode.QRCode(version=4, box_size=4, border=1) qr_code.add_data(text) qr_code.make(fit=True) qr_img = qr_code.make_image() im = qr_img._img.convert("RGB") # Convert the RGB image in printab...
[ "def", "qr", "(", "self", ",", "text", ")", ":", "qr_code", "=", "qrcode", ".", "QRCode", "(", "version", "=", "4", ",", "box_size", "=", "4", ",", "border", "=", "1", ")", "qr_code", ".", "add_data", "(", "text", ")", "qr_code", ".", "make", "("...
Print QR Code for the provided string
[ "Print", "QR", "Code", "for", "the", "provided", "string" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L467-L475
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
Escpos.barcode
def barcode(self, code, bc, width=255, height=2, pos='below', font='a'): """ Print Barcode """ # Align Bar Code() self._raw(TXT_ALIGN_CT) # Height if height >=2 or height <=6: self._raw(BARCODE_HEIGHT) else: raise BarcodeSizeError() # Width...
python
def barcode(self, code, bc, width=255, height=2, pos='below', font='a'): """ Print Barcode """ # Align Bar Code() self._raw(TXT_ALIGN_CT) # Height if height >=2 or height <=6: self._raw(BARCODE_HEIGHT) else: raise BarcodeSizeError() # Width...
[ "def", "barcode", "(", "self", ",", "code", ",", "bc", ",", "width", "=", "255", ",", "height", "=", "2", ",", "pos", "=", "'below'", ",", "font", "=", "'a'", ")", ":", "# Align Bar Code()", "self", ".", "_raw", "(", "TXT_ALIGN_CT", ")", "# Height", ...
Print Barcode
[ "Print", "Barcode" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L477-L526
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
Escpos.receipt
def receipt(self,xml): """ Prints an xml based receipt definition """ def strclean(string): if not string: string = '' string = string.strip() string = re.sub('\s+',' ',string) return string def format_value(value,...
python
def receipt(self,xml): """ Prints an xml based receipt definition """ def strclean(string): if not string: string = '' string = string.strip() string = re.sub('\s+',' ',string) return string def format_value(value,...
[ "def", "receipt", "(", "self", ",", "xml", ")", ":", "def", "strclean", "(", "string", ")", ":", "if", "not", "string", ":", "string", "=", "''", "string", "=", "string", ".", "strip", "(", ")", "string", "=", "re", ".", "sub", "(", "'\\s+'", ","...
Prints an xml based receipt definition
[ "Prints", "an", "xml", "based", "receipt", "definition" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L528-L721
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
Escpos.text
def text(self,txt): """ Print Utf8 encoded alpha-numeric text """ if not txt: return try: txt = txt.decode('utf-8') except: try: txt = txt.decode('utf-16') except: pass self.extra_chars = 0 ...
python
def text(self,txt): """ Print Utf8 encoded alpha-numeric text """ if not txt: return try: txt = txt.decode('utf-8') except: try: txt = txt.decode('utf-16') except: pass self.extra_chars = 0 ...
[ "def", "text", "(", "self", ",", "txt", ")", ":", "if", "not", "txt", ":", "return", "try", ":", "txt", "=", "txt", ".", "decode", "(", "'utf-8'", ")", "except", ":", "try", ":", "txt", "=", "txt", ".", "decode", "(", "'utf-16'", ")", "except", ...
Print Utf8 encoded alpha-numeric text
[ "Print", "Utf8", "encoded", "alpha", "-", "numeric", "text" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L723-L834
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
Escpos.set
def set(self, align='left', font='a', type='normal', width=1, height=1): """ Set text properties """ # Align if align.upper() == "CENTER": self._raw(TXT_ALIGN_CT) elif align.upper() == "RIGHT": self._raw(TXT_ALIGN_RT) elif align.upper() == "LEFT": ...
python
def set(self, align='left', font='a', type='normal', width=1, height=1): """ Set text properties """ # Align if align.upper() == "CENTER": self._raw(TXT_ALIGN_CT) elif align.upper() == "RIGHT": self._raw(TXT_ALIGN_RT) elif align.upper() == "LEFT": ...
[ "def", "set", "(", "self", ",", "align", "=", "'left'", ",", "font", "=", "'a'", ",", "type", "=", "'normal'", ",", "width", "=", "1", ",", "height", "=", "1", ")", ":", "# Align", "if", "align", ".", "upper", "(", ")", "==", "\"CENTER\"", ":", ...
Set text properties
[ "Set", "text", "properties" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L836-L880
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
Escpos.cut
def cut(self, mode=''): """ Cut paper """ # Fix the size between last line and cut # TODO: handle this with a line feed self._raw("\n\n\n\n\n\n") if mode.upper() == "PART": self._raw(PAPER_PART_CUT) else: # DEFAULT MODE: FULL CUT self._raw(PAPER_FU...
python
def cut(self, mode=''): """ Cut paper """ # Fix the size between last line and cut # TODO: handle this with a line feed self._raw("\n\n\n\n\n\n") if mode.upper() == "PART": self._raw(PAPER_PART_CUT) else: # DEFAULT MODE: FULL CUT self._raw(PAPER_FU...
[ "def", "cut", "(", "self", ",", "mode", "=", "''", ")", ":", "# Fix the size between last line and cut", "# TODO: handle this with a line feed", "self", ".", "_raw", "(", "\"\\n\\n\\n\\n\\n\\n\"", ")", "if", "mode", ".", "upper", "(", ")", "==", "\"PART\"", ":", ...
Cut paper
[ "Cut", "paper" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L883-L891
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
Escpos.cashdraw
def cashdraw(self, pin): """ Send pulse to kick the cash drawer """ if pin == 2: self._raw(CD_KICK_2) elif pin == 5: self._raw(CD_KICK_5) else: raise CashDrawerError()
python
def cashdraw(self, pin): """ Send pulse to kick the cash drawer """ if pin == 2: self._raw(CD_KICK_2) elif pin == 5: self._raw(CD_KICK_5) else: raise CashDrawerError()
[ "def", "cashdraw", "(", "self", ",", "pin", ")", ":", "if", "pin", "==", "2", ":", "self", ".", "_raw", "(", "CD_KICK_2", ")", "elif", "pin", "==", "5", ":", "self", ".", "_raw", "(", "CD_KICK_5", ")", "else", ":", "raise", "CashDrawerError", "(", ...
Send pulse to kick the cash drawer
[ "Send", "pulse", "to", "kick", "the", "cash", "drawer" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L894-L901
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
Escpos.hw
def hw(self, hw): """ Hardware operations """ if hw.upper() == "INIT": self._raw(HW_INIT) elif hw.upper() == "SELECT": self._raw(HW_SELECT) elif hw.upper() == "RESET": self._raw(HW_RESET) else: # DEFAULT: DOES NOTHING pass
python
def hw(self, hw): """ Hardware operations """ if hw.upper() == "INIT": self._raw(HW_INIT) elif hw.upper() == "SELECT": self._raw(HW_SELECT) elif hw.upper() == "RESET": self._raw(HW_RESET) else: # DEFAULT: DOES NOTHING pass
[ "def", "hw", "(", "self", ",", "hw", ")", ":", "if", "hw", ".", "upper", "(", ")", "==", "\"INIT\"", ":", "self", ".", "_raw", "(", "HW_INIT", ")", "elif", "hw", ".", "upper", "(", ")", "==", "\"SELECT\"", ":", "self", ".", "_raw", "(", "HW_SEL...
Hardware operations
[ "Hardware", "operations" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L904-L913
train
fvdsn/py-xml-escpos
xmlescpos/escpos.py
Escpos.control
def control(self, ctl): """ Feed control sequences """ if ctl.upper() == "LF": self._raw(CTL_LF) elif ctl.upper() == "FF": self._raw(CTL_FF) elif ctl.upper() == "CR": self._raw(CTL_CR) elif ctl.upper() == "HT": self._raw(CTL_HT) ...
python
def control(self, ctl): """ Feed control sequences """ if ctl.upper() == "LF": self._raw(CTL_LF) elif ctl.upper() == "FF": self._raw(CTL_FF) elif ctl.upper() == "CR": self._raw(CTL_CR) elif ctl.upper() == "HT": self._raw(CTL_HT) ...
[ "def", "control", "(", "self", ",", "ctl", ")", ":", "if", "ctl", ".", "upper", "(", ")", "==", "\"LF\"", ":", "self", ".", "_raw", "(", "CTL_LF", ")", "elif", "ctl", ".", "upper", "(", ")", "==", "\"FF\"", ":", "self", ".", "_raw", "(", "CTL_F...
Feed control sequences
[ "Feed", "control", "sequences" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/escpos.py#L916-L927
train
fvdsn/py-xml-escpos
xmlescpos/printer.py
Usb.open
def open(self): """ Search device on USB tree and set is as escpos device """ self.device = usb.core.find(idVendor=self.idVendor, idProduct=self.idProduct) if self.device is None: raise NoDeviceError() try: if self.device.is_kernel_driver_active(self.inte...
python
def open(self): """ Search device on USB tree and set is as escpos device """ self.device = usb.core.find(idVendor=self.idVendor, idProduct=self.idProduct) if self.device is None: raise NoDeviceError() try: if self.device.is_kernel_driver_active(self.inte...
[ "def", "open", "(", "self", ")", ":", "self", ".", "device", "=", "usb", ".", "core", ".", "find", "(", "idVendor", "=", "self", ".", "idVendor", ",", "idProduct", "=", "self", ".", "idProduct", ")", "if", "self", ".", "device", "is", "None", ":", ...
Search device on USB tree and set is as escpos device
[ "Search", "device", "on", "USB", "tree", "and", "set", "is", "as", "escpos", "device" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/printer.py#L34-L46
train
fvdsn/py-xml-escpos
xmlescpos/printer.py
Usb._raw
def _raw(self, msg): """ Print any command sent in raw format """ if len(msg) != self.device.write(self.out_ep, msg, self.interface): self.device.write(self.out_ep, self.errorText, self.interface) raise TicketNotPrinted()
python
def _raw(self, msg): """ Print any command sent in raw format """ if len(msg) != self.device.write(self.out_ep, msg, self.interface): self.device.write(self.out_ep, self.errorText, self.interface) raise TicketNotPrinted()
[ "def", "_raw", "(", "self", ",", "msg", ")", ":", "if", "len", "(", "msg", ")", "!=", "self", ".", "device", ".", "write", "(", "self", ".", "out_ep", ",", "msg", ",", "self", ".", "interface", ")", ":", "self", ".", "device", ".", "write", "("...
Print any command sent in raw format
[ "Print", "any", "command", "sent", "in", "raw", "format" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/printer.py#L66-L70
train
fvdsn/py-xml-escpos
xmlescpos/printer.py
Serial.open
def open(self): """ Setup serial port and set is as escpos device """ self.device = serial.Serial(port=self.devfile, baudrate=self.baudrate, bytesize=self.bytesize, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=self.timeout, dsrdtr=True) if self.device is not None: ...
python
def open(self): """ Setup serial port and set is as escpos device """ self.device = serial.Serial(port=self.devfile, baudrate=self.baudrate, bytesize=self.bytesize, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=self.timeout, dsrdtr=True) if self.device is not None: ...
[ "def", "open", "(", "self", ")", ":", "self", ".", "device", "=", "serial", ".", "Serial", "(", "port", "=", "self", ".", "devfile", ",", "baudrate", "=", "self", ".", "baudrate", ",", "bytesize", "=", "self", ".", "bytesize", ",", "parity", "=", "...
Setup serial port and set is as escpos device
[ "Setup", "serial", "port", "and", "set", "is", "as", "escpos", "device" ]
7f77e039c960d5773fb919aed02ba392dccbc360
https://github.com/fvdsn/py-xml-escpos/blob/7f77e039c960d5773fb919aed02ba392dccbc360/xmlescpos/printer.py#L151-L158
train