일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
- 하나머니
- 리뷰
- MongoEngine
- S3
- codecommit
- network
- 토스카드
- docker network
- 도커
- 커피머니불리기
- 포인트앱
- Container
- Python
- 실사용
- 후기
- clone
- python3
- namespace
- 앱테크
- docker
- VPC
- MongoDB
- AWS
- mininet
- 재테크
- built-in
- aws codecommit
- DocumentDB
- 리워드앱
- Linux
- Today
- Total
목록분류 전체보기 (86)
ㅍㅍㅋㄷ
python - filter() filter 함수는 built-in 함수로 list 나 dictionary 같은 iterable 한 데이터를 특정 조건에 일치하는 값만 추출해 낼때 사용하는 함수이다. 먼저, python docs 의 filter 에 대한 정의를 보면 아래와 같다. filter(function, iterable) Construct an iterator from those elements of iterable for which function returns true. iterable may be either a sequence, a container which supports iteration, or an iterator. If function is None, the identity func..
python - literal_eval 은 정말 안전한 eval 인 것인가. 지난 포스팅에서 eval() 에 대해 알아 보았는데(eval()함수 사용을 조심해야 하는 이유), 마지막에 literal_eval 에 대해 잠깐 언급하였다. 이번 포스팅에서는 literal_eval 이 어떤 놈인지, eval 과는 어떤 차이가 있는지 알아보려 한다. literal_eval은 eval 과는 다르게 built-in 함수는 아니며, AST(Abstract Syntax Trees) module 에서 제공하는 함수 중 하나이다. AST 모듈은 문법을 구조화 시켜주는 모듈 정도로 이해하고 넘어가자. literal_eval에 대한 Python docs 를 보면 아래와 같이 설명되어 있다. ast.literal_eval(nod..
python eval() 함수 python 의 built-in 함수 중 하나인 eval 함수는 매우 강력하면서도 사용을 자제 하도록 권고하는 양날의 검과 같은 기능이다. 먼저 python docs 의 정의를 보자. eval(expression, globals=None, locals=None) The arguments are a string and optional globals and locals. If provided, globals must be a dictionary. If provided, locals can be any mapping object. The expression argument is parsed and evaluated as a Python expression (technically ..
python lambda - 어렵지 않아요 python docs 의 lambda 에 대한 정의를 보자. Lambdas Lambda expressions (sometimes called lambda forms) are used to create anonymous functions. The expression lambda parameters: expression yields a function object. The unnamed object behaves like a function object defined with: Lambda 는 간단히 얘기하면 이름을 정의하지 않는(anonymous) 함수 표현 방법이다. 즉, 마치 일회용품 처럼 간단히 이용할 목적으로 사용되는 표현 방식 정도로 이해하면 된다. 아래..
python ABC(Abstract Base Class) 추상화 클래스 python 의 ABC 클래스는 Base 클래스를 상속받는 파생 클래스가 반드시 Base 클래스의 메서드를 명시적으로 선언해서 구현하도록 강제하는 추상화 클래스 기능이다. 그렇다면 이러한 기능이 왜 필요한가? 이 기능의 필요성을 이해하려면 먼저 상속과 다형성에 대한 이해가 필요하다. OOP 의 가장 강력한 기능 중 하나인 상속(Inheritance)은 클래스의 재사용성을 높임으로서, 코드의 반복에 따른 유지 보수 비용을 낮추는데 큰 역할을 하였다. 이러한 상속의 개념과 함께 OOP 의 가장 중요한 특징 중 하나가 바로 다형성(Polymorphism) 이다. 여기서는 다형성에 대해서 좀 더 자세히 알아보자. 다형성(Polymorphis..
python map() 함수 python docs 의 map 함수에 대한 정의를 보자. map(function, iterable, ...) Apply function to every item of iterable and return a list of the results. If additional iterable arguments are passed, function must take that many arguments and is applied to the items from all iterables in parallel. If one iterable is shorter than another it is assumed to be extended with None items. If function is ..
python range() 와 xrange() 차이 * python 2.X 기준 입니다. 해당 포스팅은 python 2를 기반으로 한 내용이다.python 3 에서는 range() 와 xrange() 가 통합되어 range() 만 제공되며, 그 특성은 xrange() 와 동일하다. range() 먼저, python docs 에서 range() 함수에 대한 설명을 보자. range(start, stop[, step]) This is a versatile function to create lists containing arithmetic progressions. It is most often used in for loops. The arguments must be plain integers. If the s..
Python Generator 먼저 python docs 의 generator 에 대한 정의를 보자. generator A function which returns an iterator. It looks like a normal function except that it contains yield statements for producing a series of values usable in a for-loop or that can be retrieved one at a time with the next() function. Each yield temporarily suspends processing, remembering the location execution state (including local..
Python iterable과 iterator의 의미 Iterable (이터러블) iterable에 대한 python docs의 정의를 보자. Iterable An object capable of returning its members one at a time. Examples of iterables include all sequence types (such as list, str, and tuple) and some non-sequence types like dict and file and objects of any classes you define with an __iter__() or __getitem__() method. Iterables can be used in a for loop and in..
Docker Network 구조 (4) - Container link 구조 [Contents] 1. Docker Network 구조(1) - docker0와 container network 구조 2. Docker Network 구조(2) - Container network 방식 4가지 3. Docker Network 구조(3) - Container 외부 통신 구조 4. Docker Network 구조(4) - Container link 구조 web 서버 역할의 컨테이너와 DB 서버 역할의 컨테이너가 있다고 가정해 보자. 만약, 이 두 container 사이를 연동하고 싶을때는 어떻게 해야 할까. 이번 포스팅에는 container 사이 연동에 필요한 link 옵션에 대한 사용법과 동작 구조에 대해 알아보고..