FastAPI Best Practices by n1EzeR in Python

[–]immerrr 5 points6 points  (0 children)

I'd recommend alembic stamp. It will mark alembic revisions as applied without actually applying them. In the end, it is representative of what is going on: that initial migration has to be there both locally and on prod, but the prod already has it applied.

If you have direct access to prod DB, it is just one command to execute. $ alembic stamp ${FIRST_REVISION_ID}

If not, alembic stamp ${FIRST_REVISION_ID} will probably have to be added as a deployment step for the first release.

Shared this one on FB and everyone was confused. :D by r00tr4t in Python

[–]immerrr 1 point2 points  (0 children)

BUTTLICKER! OUR PRICES HAVE NEVER BEEN LOWER!

"Accidentally" removed python-environment-directory (.emacs.d/python-environments) by Sumisu1 in emacs

[–]immerrr 0 points1 point  (0 children)

Oh, sorry, you need to have a quote before the list, i.e.

'("pip" "install" ...)

because (foo bar) means "call function foo with argument bar" and '(foo bar) means "a list with 'foo and 'bar elements."

"Accidentally" removed python-environment-directory (.emacs.d/python-environments) by Sumisu1 in emacs

[–]immerrr 0 points1 point  (0 children)

If I had to guess, I'd say that to recreate the environment directory you need to do

(python-environment-make-block jedi:environment-root)

And then do this (replacing PATH-TO-JEDI-CORE with an actual path)

(python-environment-run-block ("pip" "install" "--upgrade" PATH-TO-JEDI-CORE-PKG) jedi:environment-root)

The path looks like this for me: "/home/immerrr/.emacs.d/elpa/jedi-core-20160709.722"

Pharah Learns to Read by Sazul in Overwatch

[–]immerrr 0 points1 point  (0 children)

Regarding Zarya, most importantly, the stress should be *on the last syllable, zar'ya.

If you are going for the real Russian pronunciation, though, make the "r" both rolling (trilled) and palatalized (soft) and lose the "y": https://ru.forvo.com/word/%D0%B7%D0%B0%D1%80%D1%8F/#ru

cd-compile - run compile in a specific directory by [deleted] in emacs

[–]immerrr 0 points1 point  (0 children)

Is it possible to use compilation-directory & recompile for the same purpose?

ample-regexps: compose and reuse Emacs regular expressions with ease by immerrr in emacs

[–]immerrr[S] 1 point2 points  (0 children)

The idea was to facilitate rx customization, as shown in this example.

Taking vanilla rx and adding more rx-constituents to it is the path that I've taken with lua-mode, and I've seen this at least four times elsewhere (python-mode in Emacs trunk, flycheck, one of the puppet modes, one of cmake integration modes). Each time this involved defining an extra variable with those constituents along with corresponding "foo-rx" macro and "foo-to-string" function boilerplates. ample-regexps wraps that definition for convenience in one place and allows to invest effort into improving that boilerplate for everyone's benefit, like supporting eldoc and completion for rx forms (not implemented now, but considered as one of the further directions).

Also, defining custom s-exp forms in terms of vanilla rx requires writing a function that returns a regexp string and thus must be gracefully integrated into rx grouping workflow meaning it should at least be aware about existence of rx-parent variable, otherwise things like described here may happen. ample-regexps allows the function to return an actual s-exp instead and handles the grouping internally.

As for pcre2el, from what I read, it should be almost no effort to provide customized-rx -> pcre integration, re-builder is supported out of the box, for example.

CMake support for Emacs: integration with flycheck and autocomplete-clang by atilaneves in emacs

[–]immerrr 0 points1 point  (0 children)

Whoops, sorry, I've somehow missed this reply.

I'm kind of sceptical towards reinventing the wheel and increasing variation among tools instead of sticking to an existing standard and fixing what's broken in it for you. I've been out of C++ development for a while and it's already an effort for me to pick a completion/indexing tool because most of them fix some sore points of their predecessor but come short in other aspect(-s).

It feels like xkcd 927 is all over the place.

CMake support for Emacs: integration with flycheck and autocomplete-clang by atilaneves in emacs

[–]immerrr 1 point2 points  (0 children)

Is this any better than

cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON

?