$ cat t.py
from pprint import pprint
from pytheory import Tone, Fretboard, charts_for_fretboard
tones = (
Tone.from_string("F2"),
Tone.from_string("C3"),
Tone.from_string("G3"),
Tone.from_string("D4"),
$ cat t.py
from pprint import pprint
from pytheory import Tone, Fretboard, charts_for_fretboard
tones = (
Tone.from_string("F2"),
Tone.from_string("C3"),
Tone.from_string("G3"),
Tone.from_string("D4"),
$ ./runtests.py
================================================================ test session starts =================================================================
platform linux -- Python 3.6.13, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
django: settings: project.settings.testing (from env)
rootdir: /home/delusionalinsanity/bbrepos/valuta, configfile: pytest.ini
plugins: ordering-0.6, django-4.3.0, Faker-8.1.4, pythonpath-0.7.3, cov-2.12.0
collected 35 items
src/valuta/contrib/django_integration/tests/test_models.py .................
I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.
from django.core.exceptions import ValidationError | |
from django.db.models import Field, CharField | |
__all__ = ['MultiColumnField'] | |
try: | |
from hashlib import md5 | |
except ImportError: | |
from md5 import new as md5 |
#look also | |
# https://github.com/dcramer/django-ratings/blob/master/djangoratings/fields.py | |
from django.core.exceptions import ValidationError | |
from django.db.models import Field, CharField | |
__all__ = ['MultiColumnField'] | |
try: | |
from hashlib import md5 |
Enable bash completion:
source <(flutter bash-completion)
Or simply add it to your ~/.bashrc
DocX
soffice --headless --convert-to png test.docx
soffice --headless --convert-to png test.pdf
DocX
convert -verbose -quality 100 -fill "rgba(255,255,255,1.00)" -density 300 -alpha off test.docx test_docx.png
convert -verbose -quality 100 -fill "rgba(255,255,255,1.00)" -density 300 -alpha off test.pdf test_pdf.png
git branch | grep -ve " master$" | xargs git branch -D
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just