Skip to content

Instantly share code, notes, and snippets.

View SoerenHenning's full-sized avatar

Sören Henning SoerenHenning

  • Johannes Kepler University Linz, JKU/Dynatrace Co-Innovation Lab
  • Linz, Austria
View GitHub Profile
@pfandzelter
pfandzelter / bar_chart.ipynb
Last active January 29, 2024 16:57
Bar Chart With a Broken Y Axis in Python Using Seaborn
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bmaggi
bmaggi / Scratch.java
Last active July 8, 2022 02:34
Transform KafakFuture <-> CompletableFuture
// See https://issues.apache.org/jira/browse/KAFKA-6987 for ongoing work on KafkaFuture implementation of CompletableFuture
private <T> CompletableFuture<T> toCompletableFuture(final KafkaFuture<T> kafkaFuture) {
final CompletableFuture<T> wrappingFuture = new CompletableFuture<>();
kafkaFuture.whenComplete((value, throwable) -> {
if (throwable != null) {
wrappingFuture.completeExceptionally(throwable);
} else {
wrappingFuture.complete(value);
}
});