Skip to content

Instantly share code, notes, and snippets.

View AlexRogalskiy's full-sized avatar
🛰️
Work on stuff that matters

Alexander AlexRogalskiy

🛰️
Work on stuff that matters
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Miha-x64
Miha-x64 / GsonNullValueSkipping.java
Last active June 9, 2022 14:19
Gson has serializeNulls() setting but doesn't have dontDeserializeNulls(). This is useful to avoid assigning nulls to properties keeping their default values assigned in constructor instead.
import com.google.gson.Gson;
import com.google.gson.JsonIOException;
import com.google.gson.TypeAdapter;
import com.google.gson.internal.JsonReaderInternalAccess;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import com.google.gson.stream.MalformedJsonException;
import okhttp3.MediaType;
@MachineLearningIsEasy
MachineLearningIsEasy / ner.ipynb
Created September 21, 2021 12:26
NER with tensorflow
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MachineLearningIsEasy
MachineLearningIsEasy / imdb_conv_nn.ipynb
Created September 17, 2021 09:21
IMDB convolution NN
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MachineLearningIsEasy
MachineLearningIsEasy / lstm.ipynb
Last active February 8, 2022 21:58
IMDB classification via LSTM
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Slach
Slach / Dockerfile
Last active November 14, 2024 16:47
clickhouse with odbc, for docker-compose and kubernetes
FROM yandex/clickhouse-server:${CLICKHOUSE_VERSION:-latest}
USER root
ARG UBUNTU_NAME=focal
ARG UBUNTU_VERSION=20.04
RUN echo "Begin ODBC install" && \
#MySQL repo
wget -qO- "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0xa4a9406876fcbd3c456770c88c718d3b5072e1f5" | apt-key add - && \
echo "deb http://repo.mysql.com/apt/ubuntu/ ${UBUNTU_NAME} mysql-8.0" >/etc/apt/sources.list.d/mysql-oracle.list && \
@amaembo
amaembo / InnerClassLambdaMetafactory.java.patch
Created July 21, 2021 17:08
Patch for InnerClassLambdaMetafactory to generate line number debug info
diff --git a/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java b/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java
--- a/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java (revision 57611b30219191160f7faccb811b41a31c25c0b8)
+++ b/src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java (date 1626887157914)
@@ -315,6 +315,18 @@
return generateInnerClass();
}
+ private static StackTraceElement getCallerFrame() {
+ StackTraceElement[] trace = new Exception().getStackTrace();
+ for (int i = 0; i < trace.length - 1; i++) {
package net.aquadc.util;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.Iterator;
import java.util.function.Consumer;
import java.util.stream.Stream;
public final class Iterators {
private Iterators() {}