pyenv-installer
yapf
Our great sponsors
pyenv-installer | yapf | |
---|---|---|
17 | 21 | |
3,838 | 13,617 | |
0.9% | 0.4% | |
3.7 | 8.3 | |
10 months ago | 9 days ago | |
Shell | Python | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pyenv-installer
-
pyenv - manage python versions
To install it make sure that all prerequisites are met. Then use the pyenv-installer project like this to get the tool installed:
-
Your own Stable Diffusion endpoint with AWS SageMaker
For python, it's recommended to use pyenv, which allows you to install several versions of python at the same time with simple commands like this: pyenv install 3.9.13
-
Zellij: A terminal workspace with batteries included
Please don't contribute worthless and irrelevant comments like this. As you doubtless well know, piping from curl into bash is something that a large subset of respected programmers think is reasonable, and another rather tedious subset do not. For example, the entire Rust community clearly has a consensus that it's reasonable: https://rustup.rs/ As does homebrew https://brew.sh/ and pyenv https://github.com/pyenv/pyenv-installer#install to name whatever came to my mind in 30s thought.
Since the debate has such large numbers on both sides, your individual opinion on it is neither interesting nor germane.
- Cómo instalar y crear un entorno virtual con pyenv en ubuntu 22.04 LTS
-
Pytest is failing on GitHub Actions but succeeds locally
name: Test, build and release # whenever a branch or commit is pushed on: [push] jobs: # use pytest test: # used to ensure testing is done right env: DEVELOPMENT: '1' runs-on: ubuntu-latest # to avoid using old sqlite version container: image: debian:latest options: --user root steps: # check out repo - uses: actions/checkout@v2 # prevent from asking user for input - run: export DEBIAN_FRONTEND=noninteractive # install recommended tools for building Python - run: apt -q update - run: apt -q install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git sqlite3 -y - run: apt -q upgrade -y # install pyenv - run: curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash - run: exec $SHELL - run: ~/.pyenv/bin/pyenv update # install and set up required Python - run: ~/.pyenv/bin/pyenv install 3.10.2 - run: ~/.pyenv/bin/pyenv virtualenv 3.10.2 npbc - run: ~/.pyenv/bin/pyenv local 3.10.2/envs/npbc # print version info (debugging) - run: ~/.pyenv/shims/python -V - run: ~/.pyenv/shims/python -c "import sqlite3; print(sqlite3.version)" # install pip packages - run: ~/.pyenv/shims/pip install -r requirements.txt pytest # run test - run: ~/.pyenv/shims/pytest -vv
-
Managing multiple versions of Python using pyenv and virtualenvwrapper
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
-
Trying to install python 3.8.5 on ubuntu 18.04
--- - name: Configure server. hosts: pyenv2 vars: python3_tmpdir: "~/python3" python3_command: python3 python3_bashrc: "{{ ansible_user_dir}}/.bash_profile" python3_local: "{{ ansible_user_dir}}/.local/bin" pre_tasks: - name: update apt become: yes apt: update_cache=yes cache_valid_time=7200 tasks: - name: Install requirements for package install become: yes package: name: - python3-pip - python3-virtualenv - python3-dev - virtualenv state: present - name: Install system packages required for pyenv become: yes package: name: - curl - gcc - git - libbz2-dev - libreadline-dev - libssl-dev - libsqlite3-dev - make - zlib1g-dev state: present - name: Install Python using pyenv environment: PATH: "{{ ansible_env.PATH }}:{{ ansible_user_dir }}/.pyenv/bin" block: - name: Create download directory file: path: "{{ python3_tmpdir }}" state: directory mode: 0700 changed_when: false # tmpdir role removes directory automatically - name: Download pyenv installer get_url: url: https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer dest: "{{ python3_tmpdir }}" changed_when: false # temporary directory is removed when play ends - name: Run pyenv installer command: "bash pyenv-installer" args: chdir: "{{ python3_tmpdir }}" creates: "{{ ansible_user_dir }}/.pyenv" - name: Update login file blockinfile: path: "{{ python3_bashrc }}" create: true block: | export PATH="{{ ansible_user_dir }}/.pyenv/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)" mode: 0644 - name: Update pyenv command: pyenv update - name: Install Python block: - name: Install Python command: "pyenv install 3.8.5" args: creates: "{{ ansible_user_dir }}/.pyenv/versions/3.8.5" - name: Execute pyenv rehash command: "pyenv rehash" - name: Define python3 command set_fact: # can't rely on changes to $PATH yet python3_command: "{{ ansible_user_dir }}/.pyenv/shims/{{ python3_command }}"
- name: Install requirements for package install become: true package: name: - python3-pip - python3-virtualenv - python3-dev - virtualenv state: present - name: Install system packages required for pyenv become: true package: name: - curl - gcc - git - libbz2-dev - libreadline-dev - libssl-dev - libsqlite3-dev - make - zlib1g-dev state: present - name: Install Python using pyenv environment: PATH: "{{ ansible_env.PATH }}:{{ ansible_user_dir }}/.pyenv/bin" block: - name: Create download directory file: path: "{{ python3_tmpdir }}" state: directory mode: 0600 changed_when: false # tmpdir role removes directory automatically - name: Install pyenv block: - name: Download pyenv installer get_url: url: https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer dest: "{{ python3_tmpdir }}" changed_when: false # temporary directory is removed when play ends - name: Run pyenv installer command: "bash pyenv-installer" args: chdir: "{{ python3_tmpdir }}" creates: "{{ ansible_user_dir }}/.pyenv" - name: Update login file blockinfile: path: "{{ python3_bashrc }}" create: true block: | export PATH="{{ ansible_user_dir }}/.pyenv/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)" mode: 0644 - name: Update pyenv command: pyenv update - name: Install Python block: - name: Install Python command: "pyenv install 3.8.5" args: creates: "{{ ansible_user_dir }}/.pyenv/versions/3.8.5" - name: Execute pyenv rehash command: "pyenv rehash" - name: Define python3 command set_fact: # can't rely on changes to $PATH yet python3_command: "{{ ansible_user_dir }}/.pyenv/shims/{{ python3_command }}"
-
Upgrade to Python 3.8
Then, well just run the installer script provided by the devs: curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash Note: Always inspect the code of shell scripts before running them
-
Installing tensorflow with gpu makes me want to blow my brains out
I personally have been having a lot of fun with pyenv these days which allows you to set a different python version to any given folder auto-magically, just by being in it. Of course from there you're using pip.
yapf
-
Enhance Your Project Quality with These Top Python Libraries
YAPF (Yet Another Python Formatter): YAPF takes a different approach in that it’s based off of ‘clang-format’, a popular formatter for C++ code. YAPF reformats Python code so that it conforms to the style guide and looks good.
-
Why is Prettier rock solid?
I think I agree about the testing and labor of complicated translation rules.
But it doesn't appear that almost every pretty printer uses the Wadler pretty printing paper. It seems like MOST of them don't?
e.g. clang-format is one of the biggest and best, and it has a model that includes "unwrapped lines", a "layouter", a line break cost function, exhaustive search with memoization, and Dijikstra's algorithm:
https://llvm.org/devmtg/2013-04/jasper-slides.pdf
The YAPF Python formatter is based on this same algorithm - https://github.com/google/yapf
The Dart formatter used a model of "chunks, rules, and spans"
https://journal.stuffwithstuff.com/2015/09/08/the-hardest-pr...
It almost seems like there are 2 camps -- the functional algorithms for functional/expression-based languages, and other algorithms for more statement-based languages.
Though I guess Prettier/JavaScript falls on the functional side.
I just ran across this survey on lobste.rs and it seems to cover the functional pretty printing languages influenced by Wadler, but functional style, but not the other kind of formatter ("Google" formatters perhaps)
-
A Tale of Two Kitchens - Hypermodernizing Your Python Code Base
To get all your code into a consistent format the next step is to run a formatter. I recommend black, the well-known uncompromising code formatter, which is the most popular choice. Alternatives to black are autoflake, prettier and yapf, if you do not agree with blacks constraints.
-
Front page news headline scraping data engineering project
Use yapf to format code -> https://github.com/google/yapf
-
Not sure if this is the worst or most genius indentation I've seen
https://github.com/google/yapf has configs, do ctrl+f SPLIT_COMPLEX_COMPREHENSION in the readme
- Google Python Style Guide
-
Enable hyphenation only for code blocks
Only as recommendation: If the lines of the source code (here: you C code you aim to document) are kept short, in manageable bytes (similar to entries parser.add_argument in Clark's "Tiny Python Projects", example seldomly pass beyond the frequently recommended threshold of 80 characters/line), reporting with listings becomes easier (equally, the reading of the difference logs/views by git and vimdiff), than with lines of say 120 characters per line. Though we no longer are constrained to 80 characters per line by terminals/screens and punch cards (when Fortran still was FORTRAN), this is a reason e.g., yapf for Python allows you to choose between 4 spaces/indentation (PEP8 style), or 2 spaces/indentation (Google style).
-
Which code formatter do you use?
YAPF. Black would have been fine too but I absolutely need tabs, not spaces, and Black won't do that. (Why tabs? Because they make my proportional font work better.)
- Automatically rearranging Python code?
-
From Python to Dart - Day 2, Meet the dart CLI
When working with several people on one project, it is very often necessary to use a single style of code design, writing comments, using variable names, etc. In the Python world, we use linters flake8, various formatters (black, yapf, autopep8) and mypy for type checking. How can Dart help meet these challenges?
What are some alternatives?
black - The uncompromising Python code formatter
isort - A Python utility / library to sort imports.
flake8
autopep8 - A tool that automatically formats Python code to conform to the PEP 8 style guide.
awesome-python-typing - Collection of awesome Python types, stubs, plugins, and tools to work with them.
pyright - Static Type Checker for Python
pyenv - Simple Python version management
vim-sleuth - sleuth.vim: Heuristically set buffer options
pycodestyle - Simple Python style checker in one Python file
prettier - Prettier is an opinionated code formatter.
yolov4-deepsort - Object tracking implemented with YOLOv4, DeepSort, and TensorFlow.