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 sort(L): | |
| '''(list) -> list | |
| Returns a sorted version of list L, where every element in L | |
| must have the same number of dimensions.''' | |
| m_len = len(max(L, key=len)) | |
| assert(all([len(x) == m_len for x in L])) #Make sure all elements have same length | |
| return _sort(L, 0, m_len) |
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
| from string import ascii_letters | |
| from math import log | |
| from math import ceil | |
| def product(alphabet, up_to, repeat=1): | |
| ''' (list of strs, int, int) -> (list of strs) | |
| Return the bounded cartesian product of alphabet with (repeat - 1) | |
| other copies of itself, containing at most up_to elements.''' | |
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
| FROM node:boron | |
| RUN mkdir -p /home/app | |
| WORKDIR /home/app | |
| COPY . /home/app | |
| RUN npm install --production | |
| CMD ["node", "app.js"] |
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
| FROM node:boron | |
| RUN mkdir -p /home/app | |
| WORKDIR /home/app | |
| COPY . /home/app | |
| RUN npm install --production |
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
| FROM node:boron-alpine | |
| RUN mkdir -p /home/app | |
| WORKDIR /home/app | |
| COPY . /home/app | |
| CMD ["node", "app.js"] |
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
| FROM node:boron as installer | |
| RUN mkdir -p /home/app | |
| WORKDIR /home/app | |
| COPY . /home/app | |
| RUN npm install --production | |
| FROM node:boron-alpine as release |
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
| FROM node:boron | |
| RUN mkdir -p /home/app | |
| WORKDIR /home/app | |
| COPY . /home/app | |
| RUN npm install --production | |
| FROM node:boron-alpine |
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
| FROM node:boron | |
| RUN mkdir -p /home/app | |
| WORKDIR /home/app | |
| COPY . /home/app | |
| RUN npm install --production |
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
| FROM node:boron-alpine | |
| RUN mkdir -p /home/app | |
| WORKDIR /home/app | |
| COPY . /home/app | |
| COPY --from=$BUILD_FROM /home/app . | |
| CMD ["node", "app.js"] |
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
| const I = x => x; | |
| const K = x => y => x; | |
| const A = f => x => f(x); | |
| const T = x => f => f(x); | |
| const W = f => x => f(x)(x); | |
| const C = f => y => x => f(x)(y); | |
| const B = f => g => x => f(g(x)); | |
| const S = f => g => x => f(x)(g(x)); | |
| const P = f => g => x => y => f(g(x))(g(y)); | |
| const Y = f => (g => g(g))(g => f(x => g(g)(x))); |
OlderNewer