This is now on PyPI and GitHub:
A lazy sequence makes an iterator look like an immutable sequence:
# Install XQuartz | |
wget http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.5.dmg | |
mkdir /Volumes/XQuartz-2.7.5 | |
hdiutil attach -mountpoint /Volumes/XQuartz-2.7.5 XQuartz-2.7.5.dmg | |
sudo installer -pkg /Volumes/XQuartz-2.7.5/*.pkg -target / | |
hdiutil detach -mountpoint /Volumes/XQuartz-2.7.5 XQuartz-2.7.5.dmg | |
rmdir /Volumes/XQuartz-2.7.5 | |
rm XQuartz-2.7.5.dmg | |
# Install GTK. |
FROM python:3.8.1 | |
RUN pip install virtualenv==20.0.2 | |
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python | |
ENV PATH "/root/.poetry/bin:$PATH" | |
RUN virtualenv /venv | |
ENV VIRTUAL_ENV /venv | |
ENV PATH "/venv/bin:$PATH" | |
RUN poetry new foobar | |
WORKDIR foobar | |
CMD ["poetry", "install", "-vvv"] |
FROM python:3.7.6-alpine3.11 as base | |
ENV PYTHONFAULTHANDLER=1 \ | |
PYTHONHASHSEED=random \ | |
PYTHONUNBUFFERED=1 | |
WORKDIR /app | |
FROM base as builder |
FROM python:3.9.0a4 | |
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python | |
ENV PATH /root/.poetry/bin:$PATH | |
ENTRYPOINT ["poetry"] |
repos: | |
- repo: https://github.com/prettier/prettier | |
rev: 2.0.4 | |
hooks: | |
- id: prettier |
This is now on PyPI and GitHub:
A lazy sequence makes an iterator look like an immutable sequence:
These are abbreviated notes taken from Martin Fowler's Refactoring.
(This is an atomic refactoring.)
(This is an atomic refactoring.)
"test"
import time | |
import pytest | |
@pytest.hookimpl(hookwrapper=True) | |
def pytest_fixture_setup(fixturedef, request): | |
start = time.time() | |
yield | |
total = time.time() - start |