Skip to content

Instantly share code, notes, and snippets.

View iwanbolzern's full-sized avatar

Iwan Bolzern iwanbolzern

View GitHub Profile
@iwanbolzern
iwanbolzern / multi_feature_done_callback.py
Created January 22, 2020 07:17
Simple code snipped for adding a done callback to multiple features ✨
def multi_feature_done_callback(futures: List[Future], final_cb: Callable):
head = futures.pop(0)
if len(futures) <= 0:
head.add_done_callback(lambda future: final_cb())
return
head.add_done_callback(lambda _: self._wait_future_async(futures, final_cb))
@iwanbolzern
iwanbolzern / readme.md
Last active March 14, 2022 11:12
Have you ever been in a situation where you would have liked others to give you a data frame with the right columns? If no, you're a lucky one. 🤩 If yes, check out this gist 🧐

First step in the direction of a really typed DataFrame

I come across many great libraries every day, but unfortunately most of them are not well suited for enterprise or medical projects, because they lack the possibility for proper interface definitions or the ussage of refactoring capabilities of your IDE.

This is especially true if it comes to libraries in the data science area. Just remember your last df['my_feature'] = df['my_feature'] * 2 😉 And unfortunately, exactly these libraries are also the ones that are written for super fast computations.

Well it seems that we have the choice between the super fast not typed option and a bunch of slow crappy other implementations...

Hard life... 😥