Skip to content

Instantly share code, notes, and snippets.

View DanielKotik's full-sized avatar
💭
I may be slow to respond.

Daniel Kotik DanielKotik

💭
I may be slow to respond.
View GitHub Profile
@DanielKotik
DanielKotik / UDPClient.hpp
Last active September 5, 2018 08:52 — forked from kaimallea/UDPClient.hpp
Super simple UDP client using boost
/*
This Program uses OS independet boost library 'asio'.
Below are some web links for programming UDP sockets with linux specific libraries using functions: 'gethostbyname', 'bind' and
'socket'. Please note, however, that these functions are superseded by 'getaddrinfo' and 'getnameinfo' nowadays. These functions
provide better support for IPv6.
https://www.ibm.com/developerworks/library/wa-ipv6.html
http://openbook.rheinwerk-verlag.de/linux_unix_programmierung/Kap11-016.htm#RxxKap11016040003951F04F100
https://www.cs.rutgers.edu/~pxk/417/notes/sockets/udp.html
@DanielKotik
DanielKotik / SetMidpoint.py
Created April 19, 2018 11:01 — forked from bdjackson/SetMidpoint.py
Setting the midpoint of a matplotlib colormap
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
class MidpointNormalize(mpl.colors.Normalize):
"""
class to help renormalize the color scale
"""
def __init__(self, vmin=None, vmax=None, midpoint=None, clip=False):
self.midpoint = midpoint
@DanielKotik
DanielKotik / divtags.rst
Last active April 30, 2025 17:12
Colored note boxes inside Jupyter notebooks

############# Markdown parser in Jupyter notebooks ##################

<div class="alert alert-block alert-info"> <b>NOTE</b> Use blue boxes for Tips and notes. </div>

<div class="alert alert-block alert-success"> Use green boxes sparingly, and only for some specific purpose that the other boxes can't cover. For example, if you have a lot of related content to link to, maybe you decide to use green boxes for related links from each section of a notebook.

@DanielKotik
DanielKotik / .gitconfig
Created January 2, 2018 15:17
.gitconfig with useful aliases
[user]
name = ....
email = ....
[color]
ui = auto
diff = auto
status = auto
branch = auto
[push]
default = simple
@DanielKotik
DanielKotik / .gitignore
Created December 25, 2017 11:17
.gitignore file for LaTeX projects using latexmk
## project specific files:
maindocument.pdf
## latexmk, latex, pdflatex, bibtex and other(?) auxiliary files:
*.fls
*.aux
*.glo
*.idx
*.log
*.toc