'Computer Science/Python' 카테고리의 글 목록 (2 Page) — Archive

Computer Science/Python

Computer Science/Python

[Python] Docstring Convention | Docstring 작성법

Docstring Convention Docstring 작성법 Parameter Explanation (매개변수 설명에 대한 관례) Type 1 def complex(real=0.0, imag=0.0): """Form a complex number. Keyword arguments: real -- the real part (default 0.0) imag -- the imaginary part (default 0.0) """ if imag == 0.0 and real == 0.0: return complex_zero ... Type 2 def fetch_words(url): """ url주소에서 파일을 가져와 단어 리스트를 반환합니다. :param url: 불러올 url :return: """ with ..

Computer Science/Python

[Python] virtualenvwrapper Extension | virtualenvwrapper 확장팩

\(\texttt{virtualenvwrapper}\) Extension \(\texttt{virtualenvwrapper}\) 확장팩 * Official \(\texttt{Virtualenvwrapper}\) Document (URL) virtualenvwrapper 5.0.1.dev2 — virtualenvwrapper 5.0.1.dev2 documentation Shell Aliases Since virtualenvwrapper is largely a shell script, it uses shell commands for a lot of its actions. If your environment makes heavy use of shell aliases or other customizations,..

Computer Science/Python

[Python] Chapter 12. 파이 환경 설정 및 도구: 파이써니스타 되기

Introducing Python(처음 시작하는 파이썬) Chapter 12. 파이 환경 설정 및 도구: 파이써니스타 되기 12.5 Name and Document (이름과 문서) * 상수값에 근거한 계산은 먼저 수행되므로, 모듈의 맨 위에 위치시키는 것이 바람직하다. - 이 덕분에, ftoc() 함수를 호출할 때마다 매번 계산하지 않고, 한 번만 계산한다. Example. 수정 전 & 수정 후 코드 def ftoc(f_temp): "Convert Fahrenheit temperature to Celsius and return it." f_boil_temp = 212.0 f_freeze_temp = 32.0 c_boil_temp = 100.0 c_freeze_temp = 0.0 f_range = f_bo..

Computer Science/Python

[Python] Chapter 11. 병행성과 네트워크

Introducing Python(처음 시작하는 파이썬) Chapter 11. 병행성과 네트워크 * Distributed Computing 혹은 Networking 환경에서 Concurrency를 보장함으로써 얻을 수 있는 점 1) Performance 2) Robustness (H/W 및 S/W Failures를 피하기 위해 Task를 복제하여 여러 가지 안정적 방식으로 운영) 3) Simplicity 4) Communication 11.1 Concurrency (병행성) (URL) multiprocessing Module (URL) JoinableQueue() Function multiprocessing.JoinableQueue( [maxsize] ) Return: - Queue의 Subclass인 ..

Computer Science/Python

[Python] Chapter 10. 시스템

Introducing Python(처음 시작하는 파이썬) Chapter 10. 시스템 ※ Module \(\texttt{os}\)는 다양한 System Call을 포함하고 있다. 10.1 Files (파일) * Python File Management Functions - open() Function - exists() Function - isfile() Function - isdir() Function - isabs() Function - copy() Function - move() Function - rename() Function - link() Function - symlink() Function - islink() Function - chmod() Function - chown() Functio..

Computer Science/Python

[Python] Chapter 9. 웹

Introducing Python(처음 시작하는 파이썬) Chapter 9. 웹 * World Wide Web 구현의 3가지 아이디어 1) HTTP (Hypertext Transfer Protocol) - Request와 Response를 교환하기 위한 Web Server와 Client의 Specification이다. 2) HTML (Hypertext Markup Language) - 결과에 대한 표현 형식이다. 3) URL (Uniform Resource Locator) - 교유의 해당 서버와 자원을 나타내는 방법이다. 9.1 Web Clients (웹 클라이언트) * HTTP - 웹 데이터를 교환하는데 사용되는 표준 프로토콜이다. - Stateless(무상태)하다. (이에 대한 해결책으로 Cookie..

Computer Science/Python

[Python] Chapter 8. 흘러가는 데이터

Introducing Python(처음 시작하는 파이썬) Chapter 8. 흘러가는 데이터 * Python Reference (URL) * Python File Methods (URL) 8.1 FIle Input/Output (파일 입출력) * 파일 열기 - open() Function * 파일 읽기 - read() Function - readline() Function - readlines() Function - seek() Function - tell() Function * 파일 쓰기 - write() Function - print() Function * 파일 닫기 - close() Function \(\texttt{open()}\) Function (\(\texttt{open()}\) 함수) op..

Computer Science/Python

[Python] Chapter 7. 데이터 주무르기

Introducing Python(처음 시작하는 파이썬) Chapter 7. 데이터 주무르기 * Python Built-In Data Type 1) Strings - Unicode 문자의 Sequence - 텍스트 데이터 표현에 사용된다. 2) Bytes & Bytearrays - 8-bit Integer Sequence - Binary Data 표현에 사용된다. 7.1 Text Strings (텍스트 문자열) ※ Python 3의 String은 Byte의 Array가 아닌, Unicode String이다. - Python 3에서는 일반적인 Byte Array와 Unicode 문자가 구별된다. Unicode (유니코드) (URL) - 전 세계 언어의 문자를 정의하기 위한 국제 표준 코드이다. - 플랫폼,..

lww7438
'Computer Science/Python' 카테고리의 글 목록 (2 Page)