Skip to main content

Feb
26
comment botocore.exceptions.SSLError: SSL validation failed on WIndows
As much as I don't endorse code-only answers, this is a valid WORKAROUND and should be used only as a very last resort. As much as possible, do verify your TLS connections people! This snippet disables all the safeties of TLS and host verifications, so you could leave yourself open to MITM attacks. Do not use in production.
2023
Dec
1
comment How to pass environment variables to pytest
This is the way of doing it, and pytest documentation takes a tiny bit further creating fixtures out of this. docs.pytest.org/en/6.2.x/…
Dec
1
comment How to pass environment variables to pytest
I've spent a while figuring out why this didn't reliably work for me, and it was because this changes the actual environment values. The better way to write the fixture is with monkeypatch: docs.pytest.org/en/6.2.x/…
Aug
14
awarded Revival
Mar
15
awarded Yearling
Feb
16
answered Invalid start byte when using decode()
2022
Nov
5
awarded Famous Question
Oct
25
comment cannot open /lib/ld-linux-aarch64.so.1 in qemu or gem5
I have no idea how you figured this out, but this worked for my issue (running a arm64-compiled binary, on an arm64 container, on an amd64 host (a 2017 Macbook Pro). Thank you!! I only needed to add a RUN apk update before the add
Jul
13
awarded Yearling
Jul
13
awarded Yearling
Apr
25
answered How to create users and passwords for Jenkins using JCASC
Feb
8
comment setPlaceholderText for QComboBox
One tiny thing I had to do to make option #2 work, is to do setCurrentIndex(-1). Otherwise it was selecting one of the items by default, instead of showing the placeholder
Jan
26
comment Pixel-perfect jitter-free motion
I've recently starting diving deeper into gamedev so I may be completely off track here, but sounds like what Unity refers to as 2D camera size? blog.unity.com/technology/pixel-perfect-2d AFAIU, this allows movement to take place perfectly on the grid, avoiding having to deal with sub-pixel calculations. Again, maybe completely off track, but this whole PPU and camera size tunings blew my (very novice) mind.
2021
Oct
19
awarded Custodian
Aug
11
awarded Necromancer
May
10
awarded Notable Question
Jan
12
awarded Supporter
2020
Oct
12
comment Disable output buffering
For more info on streams buffering, give this a read: eklitzke.org/stdout-buffering It mentions the behavior that tzp explains above.
Oct
9
comment Unbuffered stdout in python (as in python -u) from within the program
As Aaron says, plainly adding the option to the shebang doesn't work. Instead, pass the -S option to the env command, like so: #!/usr/bin/env -S python3 -u
Oct
8
comment How to specify multiple return types using type-hints
As per the docs, this is the correct way to do it (returning N types): docs.python.org/3/library/typing.html#typing.Tuple; whereas returning an Union should actually return ONE of N type values.
1 2 3 4 5