Skip to content

Instantly share code, notes, and snippets.

ERROR SparkContext: Error initializing SparkContext.
org.apache.spark.SparkException: Exception when registering SparkListener
at org.apache.spark.SparkContext.setupAndStartListenerBus(SparkContext.scala:2549)
at org.apache.spark.SparkContext.<init>(SparkContext.scala:641)
at org.apache.spark.api.java.JavaSparkContext.<init>(JavaSparkContext.scala:58)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:247)
@KernelA
KernelA / fig1.tex
Created September 30, 2023 15:01
fig1
\documentclass[tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{math}
\begin{document}
\begin{tikzpicture}
\tikzmath { \total = 6; }
\draw [help lines] (0,0) grid (\total, \total);
\foreach \row in {1,2,...,\total}
@KernelA
KernelA / hello_xelatex_toc.tex
Created September 30, 2023 14:36
hello_xelatex_toc
\documentclass[12pt, oneside]{extarticle}
\usepackage{polyglossia}
\setdefaultlanguage[indentfirst=true,forceheadingpunctuation=false]{russian}
\setotherlanguages{english}
\IfFontExistsTF{Times New Roman}
{\setmainfont{Times New Roman}
\newfontfamily\cyrillicfont{Times New Roman}[Script=Cyrillic]}
{\setmainfont[Script=Cyrillic]{FreeSerif}}
@KernelA
KernelA / hello_xelatex.tex
Created September 30, 2023 14:17
hello_xelatex
\documentclass[12pt, oneside]{extarticle}
\usepackage{polyglossia}
\setdefaultlanguage[indentfirst=true,forceheadingpunctuation=false]{russian}
\setotherlanguages{english}
\IfFontExistsTF{Times New Roman}
{\setmainfont{Times New Roman}
\newfontfamily\cyrillicfont{Times New Roman}[Script=Cyrillic]}
{\setmainfont[Script=Cyrillic]{FreeSerif}}
@KernelA
KernelA / egl_offscreen_rednering.ipynb
Last active February 14, 2023 19:10
egl_offscreen_rednering.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
active environment : None
user config file : /root/.condarc
populated config files :
conda version : 4.11.0
conda-build version : not installed
python version : 3.8.12.final.0
virtual packages : __cuda=11.6=0
__linux=5.13.0=0
__glibc=2.31=0
__unix=0=0
root@fe83e7c706f1:/home/ICON/apps# python infer.py -cfg ../configs/icon-filter.yaml -gpu 0 -in_dir ../examples -out_dir ../results
Using /root/.cache/torch_extensions as PyTorch extensions root...
Creating extension directory /root/.cache/torch_extensions/voxelize_cuda...
Detected CUDA files, patching ldflags
Emitting ninja build file /root/.cache/torch_extensions/voxelize_cuda/build.ninja...
Building extension module voxelize_cuda...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/3] c++ -MMD -MF voxelize_cuda.o.d -DTORCH_EXTENSION_NAME=voxelize_cuda -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /opt/conda/lib/python3.8/site-packages/torch/include -isystem /opt/conda/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -isystem /opt/conda/lib/python3.8/site-packages/torch/include/TH -isystem /opt/conda/lib/python3.8/site-packages/
@KernelA
KernelA / Dockerfile
Created October 27, 2021 21:29
Jupyter Lab with Scala and Spark
FROM bde2020/spark-master:3.1.1-hadoop3.2
RUN apk add gcc python3-dev linux-headers libc-dev libffi-dev g++
RUN --mount=type=cache,target=/root/.cache/pip pip3 install spylon-kernel jupyterlab~=3.2
RUN python3 -m spylon_kernel install
WORKDIR /home/app
@KernelA
KernelA / .dockerignore
Created February 1, 2020 20:31
.dockerignore example for Python projects
# Git
.git
.gitignore
.gitattributes
# CI
.codeclimate.yml
.travis.yml
.taskcluster.yml
@KernelA
KernelA / rgb_hsi.h
Last active November 11, 2020 10:35 — forked from rzhukov/rgb_hsi.h
RGB to HSI and HSI to RGB color space conversion
inline void HSI2RGB(double h, double s, double i, double* r, double* g, double* b)
{
double x = i * (1 - s);
// For black, white and grayscale h is NaN. Conversion works incorrectly.
if(std::isnan(h))
{
*r = i;
*g = i;
*b = i;