Fred

joined 1 year ago
[–] Fred@programming.dev 9 points 2 weeks ago* (last edited 2 weeks ago) (2 children)

Inside the lambda expression you can have a comprehension to unpack the keys list to get the same sort of uplet as your "manual" example, like this:

>>> items = [{"core_name": "a", "label": "b"},{"core_name": "c", "label": "d"}, ]
>>> keys = ["core_name", "label"]

>>> tuple(items[0][k] for k in keys)
('a', 'b')

>>> sorted(items, key=lambda d: tuple(d[k] for k in keys))
[{'core_name': 'a', 'label': 'b'}, {'core_name': 'c', 'label': 'd'}]
[–] Fred@programming.dev 2 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

Would some battons (like that: https://www.wickes.co.uk/Wickes-Redwood-PSE-Timber---44-x-44-x-2400mm/p/9000281515, or possible smaller depending of the profile of your table), fixed to the underside of the gaming top so that they're leaving a negative image of the fixed table top? That way, once installed, the gaming top can't slide around. That would only work well in my mind if the gaming top is a single piece.

Edit: with that idea, minimal length of the gaming is that of the table plus two thicknesses of the baton you'd use, ie. more than the 20mm you seem to have in mind. Maybe, maybe not an issue.

For the cover, I'd consider a felt with a waterproof backing, although I don't have a specific material in mind. If you don't add felt, I'd soften the angles of the MDF.

[–] Fred@programming.dev 1 points 4 months ago

I actually had to look it up when writing that post, I think I searched for "garden gate lock" at first :)

[–] Fred@programming.dev 19 points 4 months ago (2 children)

Offering a crate as a safe and cosy space to relax, sleep, etc. is recommended by the RSPCA (and the Dog Trust, Battersea, and many more).

In normal use it's fitted with a small mattress, vet bed, toys (that I didn't show because I didn't make those myself).

[–] Fred@programming.dev 6 points 4 months ago

A standard poodle. In that picture he hadn't had his first trim yet, so he's showing gloriously fluffy puppy hair

[–] Fred@programming.dev 2 points 4 months ago (1 children)

Since I have a few pictures and you're asking nicely 😃 I opened another post: https://programming.dev/post/25943048

The second thing I mentionned were some shelves that had to fit in a very specific spot, but I don't have pictures to hand

 

I made a crate for puppy! He keeps outgrowing the ones we bought, so I made a large one out of his playpen panels that should be big enough until he's fully grown.

The floor is a sheet of plywood. I put vinyl wrap on it for waterproofing (turns out it's too fragile, by the time I made the rest I made a couple of tears).

For the top, I made a lip out of PSE wood (I think 25mm), to give more rigidity and allow fitting a hinged top.

Cabin hooks for the door, but they turned out to be too loose, so I added a Brenton bolt.

Puppy likes it, so overall a success!

Progress pictures :

The host of the crate:

[–] Fred@programming.dev 1 points 4 months ago

As a beginner who mostly learned from the University of YouTube, I hear you, it was more involved and messier work than I thought it'd be

[–] Fred@programming.dev 2 points 4 months ago (3 children)

We're a couple months later, I ended up doing a second small project, this time I used half tung oil half orang oil, and adjusted my technique: wiped with a clean rag after application, and I think the room was warmer them last time.

Got better results, more even and it didn't take 2+ weeks for the first coat to cure (more like a few days).

Thanks for the advice 🙂

[–] Fred@programming.dev 5 points 7 months ago (1 children)

There was a discussion of pathlib a few days ago: https://programming.dev/post/21864360

[–] Fred@programming.dev 2 points 7 months ago

You clearly have more experience than I do; the only explanation for why my (one) attempt is not going so well is that I had less than ideal conditions. Both temperature and user technique, probably the latter is most to blame!...

[–] Fred@programming.dev 2 points 7 months ago (2 children)

It is pure oil, maybe I'm being too impatient then, a month is a long time though!

/u/NataliePortland@lemmy.ca suggested a wipe with solvent, is that the role of orange oil? I think ill try that when I have time in few days

[–] Fred@programming.dev 1 points 7 months ago

It's inside the house, but this being winter, is not super warm.

I disn't do the two steps apply liberally, wipe the excess a few minutes later. Of well, top late to go back and do that :)

I think I'll try your suggestion when I have time in a few days

 

Hi,

Weekend before last (ie Sunday 24th) I applied tung oil to plywood (simply described as "12mm hardwood plywood" by the DIY shop). One week and a bit later, it looks dry to the eye, there is no shiny spot, the wood has a warmer colour, but if I run my fingers on the surface I get a tiny amount of oil.

I applied the oil by pouring a small amount on the surface of the wood then rubbing with an old rag, leaving no pool of oil.

Sunday (the day before yesterday ) I used kitchen towels to try to dry it off. The towels picked up a tiny bit of oil, but evidently not everything.

Is tung oil that slow to dry? Should I wait another week? Can I do something to help the process along? (Sanding or steel wool? Too aggressive for the thin veneer of plywood? Rub with a small amount of white spirit? )

I'm making a crate for Puppy who has outgrown two crates already, I picked the oil that was advertised as food & toy safe without realising how difficult it'd be to apply. In fact that's my most ambitious project to date, I'm really a beginner.

Puppy tax: Proud puppy on a trunk

 

Hi,

I have to interface with systems that use iso-8859-x encoding (not by choice...), and I'm surprised that the following doesn't throw an error:

>>> str(bytes(range(256)), encoding="iso-8859-1", errors="strict")
'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0¡¢£¤¥¦§¨©ª«¬\xad®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'

Bytes in the 0x80—0x9f range are not valid iso-8859-1, and I was expecting the above to raise a DecodeError of some sort; instead it looks like those are passed through.

I'm perfectly happy with this behaviour, I would like to make sure I can depend on it. Can I take an arbitrary byte buffer, decode as ISO-8859-1, and never get any error? Is it guaranteed to be lossless ?

view more: next ›