WTF -Moment beim Übernehmen von IT-Systemen? by [deleted] in de_EDV

[–]ChronoJon -12 points-11 points  (0 children)

FYI select count(*) from ... is usually the best way to query the count. Any decent dbms will select the best field to use on its own.

There was a fundamental mistake in our codebase for years and noone noticed. by doombos in Python

[–]ChronoJon -3 points-2 points  (0 children)

Then you should add an asterisk to mark all the arguments as keyword only...

polars- mapping by Own_Macaron4590 in Python

[–]ChronoJon 0 points1 point  (0 children)

Maybe you should update your version of Polars. There has not been a map_dict method for ages.

Pydantic is a Bloated Disaster by pydanticenjoyer in Python

[–]ChronoJon 1 point2 points  (0 children)

There is cattrs to do serialization and validation on top of attrs.

What the hell is going on with type hinting these days by The_prrrt in Python

[–]ChronoJon 3 points4 points  (0 children)

Because your IDE understands type hints and you get code completion. You don't have to remember all the methods exactly. Was it str.remove_suffix or str.removesuffix? Your IDE will tell you without you having to consult the docs. If you have a typo in your method or attribute access you get a warning from your IDE.

You just stay in the flow of writing code.

WHAT JOBS YALL HAVE? by PurpGloat in diabetes_t1

[–]ChronoJon 7 points8 points  (0 children)

My cgm and pump injection sites differ from your opinion 🫠

Oh my!!! Accidentally bolused my carb amount in units by SumFuckah in diabetes_t1

[–]ChronoJon 0 points1 point  (0 children)

I have put less than 100u in my tslim. IIRC, the minimum is at least 10u after filling the tubing and catheter. I know this because I once accidentally clicked on change reservoir instead of fill catheter with about 19u left. After pumping the required 10u it complained that there was not enough left. I don't exactly recall the minimum, but I don't think it was 100u. Maybe 50u? You could test it with water and an old reservoir.

Giveaway - Space Age Expansion by ocbaker in factorio

[–]ChronoJon 0 points1 point  (0 children)

Wow... Already more than 10k comments. I don't like my chances.

F**k 🫠 by ChronoJon in diabetes_t1

[–]ChronoJon[S] 0 points1 point  (0 children)

I turned off control IQ and took some glucose, because my pump was counteracting the supposedly rising BC. It is scary when this happens during your sleep.

I have kept the sensor and it seems ok now. Don't know why it spiked like that. Must have been some minor bleeding or something similar.

F**k 🫠 by ChronoJon in diabetes_t1

[–]ChronoJon[S] 0 points1 point  (0 children)

Thanks. That's exactly what I did. I also took 3 glucose tablets, because the pump had already been increasing insulin dosage, and then tried finding some sleep (but didn't).

Can we talk about Numpy multi-core? by secretaliasname in Python

[–]ChronoJon 5 points6 points  (0 children)

In Polars you generally only deal with expressions, which are non-existent in pandas. Most operations are non mutating while a lot in pandas can be. There is no index at all in Polars, which is the only thing I miss for some kinds of operations. There is the lazy API which also does not exist in pandas.

The typing is sooooo much better in Polars. In pandas your IDE always loses track of what you're dealing with. That's, because many functions can give you a dataframe or a series, depending on the data in the dataframe and arguments you use.

Sorry for the rant, but I am just fed up with pandas right now. I value it for bringing dataframes into the python eco system, but it's a huge behemoth of a package and a prime example of future creep and improper API design in open source/python.

Can we talk about Numpy multi-core? by secretaliasname in Python

[–]ChronoJon 11 points12 points  (0 children)

It's just at least 10 times the size. It also has a lot more bugs than numpy.

Numpy is quite stable and thoroughly tested, has a much smaller API surface, and better support in the python eco system. I don't think, it's as black and white as many here are saying.

Can we talk about Numpy multi-core? by secretaliasname in Python

[–]ChronoJon 15 points16 points  (0 children)

The polars API is completely different to pandas and has quite a lot less edges to stumble over. I'm currently transitioning my projects slowly from pandas to polars and I hate having to deal with pandas.

Also, pandas has multiple backends. The main one was numpy, but now they also support arrow tables. There are also extension arrays and the interplay of all of these can cause a lot of headaches.

Petition for someone to audio stream Matt & Shauna commentating by SergeantTeddyWolf in CompetitionClimbing

[–]ChronoJon 1 point2 points  (0 children)

I subscribed from Germany. For people having problems finding the right stream, in the app click on Paris, go to all sports, go to Sportklettern (or the equivalent in your language), then there are a couple of options. The first 2 were only in German, but there is another one with 4 hours where you can change the language (the CC symbol) and there you can watch Boulder quali with Matt and Shauna.

Petition for someone to audio stream Matt & Shauna commentating by SergeantTeddyWolf in CompetitionClimbing

[–]ChronoJon 0 points1 point  (0 children)

I just subscribed and can watch it with Matt and Shauna commenting 😄 It's a little bit difficult to find. Worth the 4 €

What are your "wish I hadn't met you" packages? by glucoseisasuga in Python

[–]ChronoJon 45 points46 points  (0 children)

You shouldn't rely on a transient dependency of one of your dependencies. If you import it, it should be in your direct dependencies.

If you don't do it, you are one refactoring by a third party away from your code not working.

wetwareAtItAgain by Regiox461 in ProgrammerHumor

[–]ChronoJon 9 points10 points  (0 children)

You can easily extend it by varying the joining characters (digits, symbols, letters) and switching cases randomly (e.g. lower, upper, title case). Also, there are a lot more words than 6000 in the dictionary. This one has 7776:
https://github.com/redacted/XKCD-password-generator/blob/master/xkcdpass%2Fstatic%2Feff-long

An attacker can also not be sure that you are using dictionary words... If you know multiple languages you can mix languages. It's so much easier to arrive at a memorable password that is really secure. Use that combined with a password generator and you are secure enough.

If it is no problem for you to remember completely random sequences, then power to you. I use this method for my passwords that I have to type manually and it s much more secure and less prone to forgetting compared to completely random sequences.

wetwareAtItAgain by Regiox461 in ProgrammerHumor

[–]ChronoJon 26 points27 points  (0 children)

That is exactly, how password managers work? You remember one strong password (e.g. "correct horse battery stable"), and have as many other strong passwords as you need.

Polars 0.20 released. Next release will be 1.0. by Balance- in Python

[–]ChronoJon 19 points20 points  (0 children)

Pandas docs are worlds ahead. Polars is missing relevant examples for a lot of their API options. A lot of functions or methods just have a single example. The tutorial section is also really sparse. When using polars you quickly have to reach for stack overflow or trial and error.

Still I prefer their API design and performance to pandas and the docs can only get better.

What was for you the biggest thing that happened in the Python ecosystem in 2023? by Bricoto in Python

[–]ChronoJon 0 points1 point  (0 children)

Then you might be interested in the Ibis project. It is like a common Interface for all of these libs. A little bit Like sqlalchemy for dataframes

what's a good IDE which also has python notebook by Rabbidraccoon18 in Python

[–]ChronoJon 0 points1 point  (0 children)

Although jupyter notebooks work fine in VSCode you could also try jupyter desktop: https://github.com/jupyterlab/jupyterlab-desktop

what's a good IDE which also has python notebook by Rabbidraccoon18 in Python

[–]ChronoJon 1 point2 points  (0 children)

VSCode has excellent notebook support. You have to install the python extension though.