It does it’s job but it’s suuper ineffective - you have to have a window open to suck in (hot outside) air that the portable AC cools itself with and throws out.
That open window even with that “sock” cover it comes with, lets back so much of the outside air and if you are like me renting a badly insulated flat, you are comfortable only when the AC is running, it won’t really cool down (and keep cool) the living space.
I do wonder why they don’t make a dual hose portable systems so that at least the unit is not pulling the air directly from the window, mixing already cool inside air with the hotter outside one.
Great wizard of the bitrates, grant me your wisdom…
I can’t wrap my head around bitrate - if I have a full hd monitor and the media is in full hd then how is it that the rate of bits can make so much difference?
If each frame in the media contains the exact 1920 × 1080 pixels beamed into their respective positions in the display then how can there be a difference, does it have to do something with compression?
Thanks!
Thank you for asking! Yeah, I am reading Stormlight Archive by B. Sanderson and their communities seemed to contain most memes specific to the lore haha
also RawTherapee
MAS is open-source meaning anyone with the skill can verify what the powershell code does. This does not mean it’s absolutely safe and trustworthy but does give it a big plus.
(the way I understand it is that) It also uses a loophole in the free upgrades from older win versions to 10/11 to get you a valid license from Windoze servers directly - it is not a keygen or cracker.
So, I will vouch for MAS but care has to be taken to download it from the official site/repository.
What/who wrote this article? There seem to be extra words here and there
Happy cake day !
So, the word here is parallelism. It’s not something specific to python, asyncio
in python is just the implementation of asynchronous execution allowing for parallelism.
Imagine a pizza restaurant that has one cook. This is your typical non-async, non-threading python script - single-threaded.
The cook checks for new orders, pickups the first one and starts making the pizza one instruction at the time - fetching the doug, waiting for the ham slicer to finish slicing, … eventually putting the unbaked pizza into oven and sitting there waiting for the pizza to bake.
The cook is rather inefficient here, instead of waiting for the ham slicer and oven to finish it’s job he could be picking up new orders, starting new pizzas and fetching/making other different ingredients.
This is where asynchronicity comes in as a solution, the cook is your single-thread and the machines would be mechanisms that have to be started but don’t have to be waited on - these are usually various sockets, file buffers (notice these are what your OS can handle for you on the side, asyncIO ).
With proper asynchronicity your cook can now handle a lot more pizza orders, simply because their time is not spent so much on waiting.
Making a single pizza is not faster but in-total the cook can handle making more of them in the same time, this is the important bit, more in the closing note.
Coming back to why a async REPL is useful comes simply to how python implements async - with special (“colored”) functions:
async def prepare_and_bake(pizza):
await oven.is_empty() # await - a context switch can occur and python will check if other asynchronous tasks can be continued/finalized
# so instead of blocking here, waiting for the oven to be empty the cook looks for other tasks to be done
await oven.bake(pizza)
...
The function prepare_and_bake()
is asynchronous function (async def
) which makes it special, I would have to dive into asynchronous loops here to fully explain why async REPL is useful but in short, you can’t call async functions directly to execute them - you have to schedule the func.
Async REPL is here to help with that, allowing you to do await prepare_and_bake()
directly, in the REPL.
And to give you an example where async does not help, you can’t speed up cutting up onions with a knife, or grating cheese.
Now, if every ordered pizza required a lot of cheese you might want to employ a secondary cook to preemptively do these tasks (and “buffer” the processed ingredients in a bowl so that your primary cook does not have to always wait for the other cook to start and finish).
This is called concurrency, multiple tasks that require direct work and can’t be relegated to a machine (OS) are done at the same time.
In a real example if something requires a lot of computation (calculating something - like getting nth fibonnaci number, applying a function to list with a lot of entries, …) you would want to employ secondary threads or processes so that your main thread does not get blocked.
Hopefully this was somewhat understandable explanation haha. Here is some recommended reading https://realpython.com/async-io-python/
Not necessarily a trick that’s always useful but I always forget this.
You can get async REPL by calling python -m asyncio
.
Also, old trick - in need of simple http server serving static files?
python -m http.server
A bit offtopic but eother way, have you ever tried applying NN agents on games with incomplete information, card games with opponents and alike?
The pawn knows where it is at all times. It knows this because it knows where it isn’t.
Yeah kinda, unix socket does count as ipc
Alternatively you could use capabilities:
I have been pretty content with just zsh with fzf - extends the ctrl+R with interactive fuzzy search across the history.
In theory some session like behaviour should be easy to make with a little script that changes $HISTFILE
Using pip to install packages outside of venv was always a risk, (newer) pip now has this mechanism to really drive the point home that this can break stuff.
Do I have to do this everytime I start the script via console?
Yes, one way to get rid of this requirement is to package the script as binary/executable package (add pyproject.toml with some sane defaults and with proper [
) and then install the project using pipx - ]pipx install -e path/to/the/project/
, the -e
flag stands for editable and is nice to have here as you won’t have to reinstall everytime you change the script.
What pipx does is that it creates the local virtualenv, installs everything the package declares as needed and adds a special executable script into location like ~/.local/bin/
that first sources the venv and then starts the entry script - keeping everything isolated.
Ah right, didn’t understand the “contract” part