[-] mapto@lemmy.world 3 points 2 months ago

I'm sorry, but doesn't sound very convincing. The strongest (reiterated) argument is "venv is standard", but so is docker.

[-] mapto@lemmy.world 3 points 5 months ago

Your seem to insist to twist this towards vegan wars, but this is you. It's not the graphics, it's not me.

[-] mapto@lemmy.world 2 points 5 months ago

Upfront analysis and design is very close to independent from the technology, particularly at the I/O level

[-] mapto@lemmy.world 4 points 5 months ago

Q: what do we do? A: profile and decompose. Should not be that distant as a thought

[-] mapto@lemmy.world 2 points 6 months ago

Definitely my preference. However, for someone just starting (and not used to pressing TAB or calling help() ), an empty prompt might be intimidating.

That's why I typically suggest interactive tutorials, e.g. any of these two: https://www.learnpython.org/en/Hello%2C_World%21 https://futurecoder.io/course/#IntroducingTheShell

[-] mapto@lemmy.world 2 points 6 months ago
[-] mapto@lemmy.world 2 points 8 months ago

Even looking into the readme and pink.lang, I'm still unsure what this does. I can imagine, but one single example would be nice. Bonus points if it is actually something useful

22

What Philip Zimbardo tells us about human psychology is that everyday war crimes are committed by people that hide behind uniforms. Keeping a register of offenders in what appears as potential war crimes would have two positive effects:

  1. Provide the evidence for these people to be put on trial in better times
  2. Deter future offenders by making them think twice about their own future before unleashing their hate
[-] mapto@lemmy.world 4 points 8 months ago

I keeps amazing me how one could criticise capitalism and still talk exclusively in terms of capitalism.

Not a single word of the accelerating extreme deforestation of the world's forests all over the planet. And this is just an example. The same holds about drilling and plastics, about industrial farming, construction,... I don't care if they are profitable. They're just aggravating the problem and there are alternatives that reduce the problem. These need to be enforced, regardless whether they are profitable (some of them are, but they still don't overtake the problematic ones). We don't have collective enforcement and we need it. Call it green new deal if you want, call it anarcho-communism, whatever. As long as it is just theory and no practice, it's pointless.

Politics and growth are irrelevant if they are so detached from the problem.

[-] mapto@lemmy.world 2 points 9 months ago* (last edited 9 months ago)

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
8
submitted 9 months ago* (last edited 9 months ago) by mapto@lemmy.world to c/python@programming.dev

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.

[-] mapto@lemmy.world 2 points 10 months ago

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

[-] mapto@lemmy.world 2 points 10 months ago* (last edited 10 months ago)

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.

[-] mapto@lemmy.world 2 points 10 months ago

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 ›

mapto

joined 10 months ago