Skip to content

Instantly share code, notes, and snippets.

View N-Coder's full-sized avatar

Niko Fink N-Coder

  • TU Wien
  • Vienna
  • 01:01 (UTC +02:00)
View GitHub Profile
@N-Coder
N-Coder / install-cppyy.sh
Created November 14, 2023 22:28
cppyy CI installer
#!/bin/bash
set -e
set -x
if command -v dnf &> /dev/null
then
dnf install -y git g++ python3-devel python3-pip unzip util-linux
else
apt-get update && apt-get install -y git g++ python3-dev python3-pip python3-venv unzip curl util-linux
@N-Coder
N-Coder / C++.ipynb
Last active March 7, 2023 15:23
OGDF binder
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@N-Coder
N-Coder / Dockerfile
Last active June 10, 2022 10:46
ogdf-python-widget Notebook for simulating a Kami Graph
# Docker container for running OGDF Jupyter notebooks on mybinder.org
# based on https://mybinder.readthedocs.io/en/latest/tutorials/dockerfile.html
FROM ncoder/ogdf:2022.02-dogwood
RUN pip install -U --no-cache-dir notebook jupyterhub jupyterlab ogdf-python-widget==0.1.0a0 git+https://github.com/N-Coder/ogdf-python.git
ARG NB_USER=jovyan
ARG NB_UID=1000
ENV USER ${NB_USER}
@N-Coder
N-Coder / output.txt
Last active September 24, 2021 15:43
cppyy __doc__ testing
<class cppyy.gbl.Test at 0x55b79cb89e70> {'__module__': '__main__', '__dict__': <attribute '__dict__' of 'Test' objects>, '__weakref__': <attribute '__weakref__' of 'Test' objects>, '__doc__': None, 'templ': cppyy template proxy (internal), '__assign__': <cppyy.CPPOverload object at 0x7f7673be1580>, '__init__': <cppyy.CPPOverload object at 0x7f7673bda840>, 'method': <cppyy.CPPOverload object at 0x7f7673bda8c0>, 'overload': <cppyy.CPPOverload object at 0x7f7673bdd800>, 'field': <cppyy.CPPDataMember object at 0x7f7673bdd830>}
Attr 'field' in __dict__, but not accessible via getattr.
<class cppyy.gbl.Test at 0x55b79cb89e70> {'__module__': '__main__', '__dict__': <attribute '__dict__' of 'Test' objects>, '__weakref__': <attribute '__weakref__' of 'Test' objects>, '__doc__': 'Description of the class.', 'templ': Description of the templ., '__assign__': <cppyy.CPPOverload object at 0x7f7673be1580>, '__init__': <cppyy.CPPOverload object at 0x7f7673bda840>, 'method': <cppyy.CPPOverload object at 0x7f7673bda8c0>, 'ove
@N-Coder
N-Coder / Dockerfile
Created September 19, 2021 08:37
yFiles Live - OGDF GraphML Compatibility
FROM ncoder/ogdf:v0.1.2.1-dev
RUN pip install --no-cache-dir jupyter jupyterlab
ARG NB_USER=jovyan
ARG NB_UID=1000
ENV USER ${NB_USER}
ENV NB_UID ${NB_UID}
ENV HOME /home/${NB_USER}
@N-Coder
N-Coder / Dockerfile
Last active March 2, 2022 13:31
mybinder.org ogdf-python
FROM ncoder/ogdf:2022.02-dogwood
RUN pip install --no-cache-dir notebook jupyterhub jupyterlab
ARG NB_USER=jovyan
ARG NB_UID=1000
ENV USER ${NB_USER}
ENV NB_UID ${NB_UID}
ENV HOME /home/${NB_USER}
@N-Coder
N-Coder / README.md
Created February 7, 2021 20:03
vTimezone Europe/Berlin

tzdb.txt

The rule definition in the Olson database. A tool called zic parses these rules, instantiates all individual transitions in a given timeframe and then stores these instances in a binary format that ships with most UNIXes and the python zoneinfo module. All clients just parse those binary files with the specific transition dates, which do not contain any 'meta' information about the rules behind the transition dates.

zoneinfo.txt

The data I was able to extract from zoneinfo instances, as long as the plain-python implementation was used instead of the C-module.

apple-ccs-pycalendar-zonal.ics

@N-Coder
N-Coder / contentline-parser.txt
Created October 18, 2020 13:52
ics.py importtime comparision
$ git checkout contentline-parser
$ python -X importtime -c "import ics"
import time: self [us] | cumulative | imported package
import time: 1169 | 1169 | _frozen_importlib_external
import time: 197 | 197 | time
import time: 640 | 836 | zipimport
import time: 153 | 153 | _codecs
import time: 1065 | 1218 | codecs
import time: 896 | 896 | encodings.aliases
import time: 1214 | 3327 | encodings
@N-Coder
N-Coder / parser.py
Created May 12, 2020 16:28
ics ContentLineParser
@attr.s(slots=True)
class ContentLineParser(object):
CONTROL = "\x00-\x08\x0A-\x1F\x7F" # All the controls except HTAB
DQUOTE = "\""
ESCAPE = "\\"
QSAFE_CHARS = "[^" + CONTROL + DQUOTE + "]*"
SAFE_CHARS = "[^" + CONTROL + DQUOTE + ",:;]*"
VALUE_CHARS = "[^" + CONTROL + "]*"
IDENTIFIER = "[a-zA-Z0-9\-]+"