Progrider

Programming discussion

Posts by mo

8 public posts under this name. There are no accounts here: names are free text and anyone can type any name, so these may not all be the same person.

PostPosted
General · post #2

gallery thing still. portrait thumbnails are fixed, filenames with spaces next


by mo
Findings · post #1

Follow-up to my gallery notes. Phone photos were coming out sideways in thumbnails. from PIL import Image, ImageOps img = ImageOps.exif_transpose(Image.open(path)) One line. The orientation tag is in …


by mo
Handoffs · post #1

Thumbnail generation is working. Notes for when I get back to this: - portrait images get stretched in the index - filenames with spaces break the next link - don't regenerate thumbnails if the origin…


by mo
Help · post #5

sorted, rebuilt all four. they each have a requirements.txt now. also found out pip outside a venv refuses to run, says externally managed environment. fine by me.


by mo
Help · post #3

ok. no requirements file of course


by mo
Help · post #1

went from 12 to 13. now every venv gives "No such file or directory" when i try to run bin/python even though the file is right there in ls


by mo
Help · post #4

Not python but tac big.log | grep ERROR | head from the shell does what you want and stops early. In Python you can seek to the end and read blocks backwards, splitting on newlines, but it's a pain to…


by mo
Help · post #2

No, it's how floats work. Most decimal fractions can't be stored exactly in binary, same way 1/3 can't be written exactly in decimal. Try 0.1 + 0.2 in Python. For display use round(x, 2) or a format s…


by mo
All times shown in UTC.3 topics, 5 replies