Django
- 706 ответов
- 0 вопросов
574
Вклад в тег
If we have data, let’s look at data. If all we have are opinions, let’s go with mineJim Barksdale,
pseudo_encrypt(int) can be used as a pseudo-random generator of unique values. It produces an integer output that is uniquely associated to its integer input (by a mathematical permutation), but looks random at the same time, with zero collision. This is useful to communicate numbers generated sequentially without revealing their ordinal position in the sequence (for ticket numbers, URLs shorteners, promo codes...)
sudo apt-get install jpegoptim imagemagick optipng
find . -type f \( -name "*.jpeg" -or -name "*.jpg" \) -exec mogrify -resize x100 -quality 90 {} \; -exec jpegoptim -o --strip-all {} \;
find . -type f -name "*.png" -exec mogrify -resize x100 {} \; -exec optipng -o1 {} \;
mogrify -resize ШИРИНАxВЫСОТА -quality КАЧЕСТВО
optipng -o9 file.png
optipng -o5 file.png
python3.7 -v
python3 -v
which python3.7; which python3
apt-get install -y \
build-essential git libexpat1-dev libssl-dev zlib1g-dev \
libncurses5-dev libbz2-dev liblzma-dev \
libsqlite3-dev libffi-dev\
libffi-dev tcl-dev linux-headers-generic libgdbm-dev \
libreadline-dev tk-dev \
libdb-dev \
libmpdec-dev \
libncursesw5-dev
cd /tmp
git clone https://github.com/python/cpython.git
cd cpython
git checkout 3.7
--prefix=$HOME/.local/bin
а --prefix=$HOME/.local
Инсталлер создаст такие диры ${prefix}/{bin,include,lib,share}
tree .local
до и после make install
, тогда не возникнет вопросов, что поставил питон./configure --help
--with-lto
может сильно ускорить процесс ./configure --prefix=$HOME/.local --enable-optimizations
make -j4
make install
├── bin
│ ├── 2to3 -> 2to3-3.7
│ ├── 2to3-3.7
│ ├── easy_install-3.7
│ ├── idle3 -> idle3.7
│ ├── idle3.7
│ ├── pip3
│ ├── pip3.7
│ ├── pydoc3 -> pydoc3.7
│ ├── pydoc3.7
│ ├── python3 -> python3.7
│ ├── python3.7
│ ├── python3.7-config -> python3.7m-config
│ ├── python3.7m
│ ├── python3.7m-config
│ ├── python3-config -> python3.7-config
│ ├── pyvenv -> pyvenv-3.7
│ └── pyvenv-3.7
├── include
│ └── python3.7m
├── lib
│ ├── libpython3.7m.a
│ ├── pkgconfig
│ └── python3.7
│ └── man
which python3.7
не дает результата - проверьте наличие в PATH ~./local/bin$ grep "$HOME/.local/bin:" <<< "$PATH"
/home/sim3x/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin: