🎤 Ready to take your public speaking skills to the next level? PyCon AU has your back!
Whether you're a Student, Educator, Graduate, or Professional, we want YOU! We're seeking talks from first-time or seasoned speakers, and we have a fantastic mentoring program to help your proposal shine.
Read more about it here: pycon.org.au/program/#mentors-and-feedback
#askFedi#fediHelp Is the following pattern known and does it have a name?
I have a number of classes (call them C1, C2, etc) that all derive from the same class B. I have a superclass (template, actually) D that derives from C1, C2 etc. To have a single B, the standard solution is to go with virtual inheritance to close the diamond (so far, so good).
I've just tagged a new release of Crell/Serde, version 1.2.
This release includes support for Unix timestamps, makes TypeFields more flexible and customizable, and fixes an issue with handling null values. Note that the latter fix has a very small BC break that only impacts a select number of custom Importers, so odds are you won't notice.
I wonder if there's a more efficient way of implementing decimal to #binary conversion in #python
Without recursion, it's ok, but there will be variable assignments operations, which seems to me as something not so efficient, comparing with recursion...
@desertplains You could make a helper function which is a generator and just yield digits instead of appending to a string. Then call ''.join(helper_function(n)) to get the final result. That avoids a bunch of string concatenations. Or another (slightly less elegant IMO, but totally valid) way to do it is to build up a list of characters in the loop instead of appending to a string. You may find working with a list is more efficient.
If you really want to get into high efficiency (within the constraints of what Python allows, of course; it'll never be as fast as C), you might try something like using a lookup table and accumulator to produce blocks of 3 bits at a time. I don't know if that'd actually turn out faster, but it may be worth checking. I can elaborate if you're interested.
Looks like my #TidyDensity and #healthyR.data #R packages are doing well post release. Seems the newest TidyDensity maybe the fastest downloaded for me yet!
helathyR.data I think will be the fastest yet for it as well, I'll be posting more about it as time goes on!
Thank you everyone who has tried them, contributed or offered advice and suggestions, would not be here without you!
When programming a function to check if something is allowed, is it a better pattern to start with a True variable and negate it or start with a False variable and confirm it?
The great thing about writing software is that after you spend 3 days figuring out a simple solution to a complex problem you're left with no evidence as to what you did with the rest of your week.
"You wrote 15 lines of code?"
"No, I wrote 4500 lines of code. Those 15 were the ones worth keeping."
Watch out if you use iTerm2 on a mac. The latest version (3.5.x) integrates OpenAI/ChatGPT. It looks like you have to set keys to use it, but I don't want it even in the mix so I'm sticking with the 3.4.x release.