mapto

joined 8 months ago
[–] [email protected] 3 points 3 weeks ago

Thanks, corrected

71
submitted 3 weeks ago* (last edited 3 weeks ago) by [email protected] to c/[email protected]
 

During the siege 10 years ago today, Russia agreed to open a humanitarian corridor to allow evacuation. Then they ambushed anyone who passed through this corridor.

[–] [email protected] 1 points 2 months ago

Thanks. I didn't know this and it is very useful information.

[–] [email protected] 1 points 2 months ago (1 children)

Even if so, your unreasonably pessimistic assumption is that this would be an exclusive source of revenue. Once content is created, cross-posting is free.

[–] [email protected] 1 points 2 months ago (3 children)

Thanks for doing the maths. Actually, it does show that there's a small, but unexploited market here. $2-3K a month is a very good income for the most of the world. And this doesn't have to be the only revenue stream.

[–] [email protected] 1 points 2 months ago (2 children)

Could you elaborate, please. I'm genuinely interested

[–] [email protected] 0 points 4 months ago (1 children)

Researching on time and place of arrival is a nice gift for anyone who wants to intercept these and is being cut off from doing this research themselves.

 

The new European AI Office launched its first job opportunities.

[–] [email protected] 1 points 7 months ago

To me it depends on the base image. Some don't have curl, but have wget. I would go with the flow instead of installing it myself. Especially if I can get away with not having to add more layers for an image of my own and/or using the same command for all containers

[–] [email protected] 2 points 7 months ago* (last edited 7 months ago) (2 children)

Ok, that was stupid. Doing healthcheck with wget, does what wget does: it downloads the result. I had to add --spider to stop doing that

  wget -nv --spider http://localhost:8000 || exit 1
[–] [email protected] 1 points 7 months ago

Well, I do need OpenAPI (Swagger). What I don't need is the generation of thousands of equal static files. Out of all these generated files, index.html would've been enough and I don't need index.html.1, etc.

8
submitted 7 months ago* (last edited 7 months ago) by [email protected] to c/[email protected]
 

I deploy a FastAPI service with docker (see my docker-compose.yml and app).

My service directory gets filled with files index.html, index.html.1, index.html.2,... that all contain

They seem to be generated any time the docker healthcheck pings the service.

How can I get rid of these?

PS: I had to put a screenshot, because Lemmy stripped my HTML in the code quote.

[–] [email protected] 2 points 8 months ago (1 children)

https://github.com/pgp/XFiles is what I've been using and am pretty happy about it

[–] [email protected] 2 points 8 months ago* (last edited 8 months ago) (1 children)

In both XML and JSON you have lists and embedding hierarchichies (I use this term to abstract away from dictionaries/maps which are not exactly represented in XML). These allow for browsing/iterating and filtering when after a particular node.

One difference is that nodes in XML are named (tags). Another thing that you have in XML and not in JSON is attributes. A good example of their use is querying by tag name, node id or class attributes in HTML (which is a loose example of XML). To do the equivalent in JSON, you need to work with keys and values which are less structured and (arguably as consequence) often missing such meta-data. HTML is a popular example, but pretty much any XML has ids and other meta tags and attributes. JSON standards typically don't and it's a long separate topic whether this is due to the characteristics of the format itself.

PS: another big difference is that XML also allows for comments, which allows to also encode intent, not only content.

[–] [email protected] 2 points 8 months ago (3 children)

Actually XPATH is arguably more flexible than JSON. There's also jsonpath, but I don't think I've seen it meaningfully used

view more: next ›