This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker service update \ | |
| --update-parallelism 1 \ | |
| --update-delay 5s \ | |
| --update-order stop-first \ | |
| --image 460957833:나의 이미지 예시 \ | |
| --force \ | |
| --with-registry-auth \ | |
| api |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker service update \ | |
| --update-parallelism 1 \ | |
| --update-delay 5s \ | |
| --update-order stop-first \ | |
| --image 460957833:나의 이미지 예시 \ | |
| --force \ | |
| --with-registry-auth \ | |
| api |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker service update \ | |
| --update-parallelism 1 \ | |
| --update-delay 5s \ | |
| --update-order stop-first \ | |
| --image { your docker iamge } \ | |
| --force \ | |
| --with-registry-auth \ | |
| api |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker service create \ | |
| --name=api \ | |
| --replicas=4 \ | |
| --detach=true \ | |
| --network={YOUR NET WORK} \ | |
| --publish 80:80 \ | |
| --publish 443:80 \ | |
| --with-registry-auth \ | |
| --label com.docker.aws.lb.arn=arn:aws:acm:ap-no{YOUR: AWS : ARN ! ! !} \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def youreducer(func, seq): | |
| tally = seq[0] | |
| for next in seq[1:]: | |
| tally = func(tally, next) | |
| return tally | |
| def add(x, y): | |
| return x + y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import operator, functools | |
| functools.reduce(operator.add, [1, 2, 3, 4, 5]) | |
| >> 15 | |
| functools.reduce((lambda x, y: x + y), [1, 2, 3, 4, 5]) | |
| >> 120 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def youreducer(func, seq): | |
| tally = seq[0] | |
| for next in seq[1:]: | |
| tally = func(tally, next) | |
| return tally | |
| def add(x, y): | |
| return x + y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def youreducer(func, seq): | |
| tally = seq[0] | |
| for next in seq[1:]: | |
| tally = func(tally, next) | |
| return tally | |
| def add(x, y): | |
| return x + y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def myfunc(func, *args): | |
| res = [] | |
| for args in zip(*args): | |
| res.append(func(*args)) | |
| return res | |
| myfunc(abs, [-1, 2, 3]) | |
| >> [1, 2, 3] | |
| myfunc(abc, [-1, -2, -3] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def myfunc(func, *args): | |
| return [func(*arg)for arg in zip(*args)] | |