Skip to content

Instantly share code, notes, and snippets.

View egemenertugrul's full-sized avatar


View GitHub Profile
egemenertugrul /
Last active August 10, 2023 18:00
Python Websockets Full Duplex Asynchronous Multiprocessing Server
import asyncio
import multiprocessing as mp
from websockets.server import serve
from websockets.exceptions import ConnectionClosedOK
import time
class DuplexWebsocketsServerProcess(mp.Process):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._send_queue = mp.Queue()
egemenertugrul /
Last active November 7, 2022 11:39
Matplotlib Dynamic Multiple Subplots
import math
from matplotlib import pyplot as plt
class AxesWrapper:
def __init__(self, lines, ax, max_display_capacity=None):
self.lines = lines
egemenertugrul / ResourcesExtension.cs
Last active January 3, 2023 09:14
StreamingAssets/Resources Extensions for Unity
using System.Collections.Generic;
using System.IO;
using UnityEngine;
public static class ResourcesExtension
/// <summary>
/// Recursively traverses each folder under <paramref name="path"/> and returns the list of file paths.
/// It will only work in Editor mode.
/// </summary>
egemenertugrul /
Last active January 17, 2020 08:05 modified for Python 3.6
# Copyright (C) 2012 Daniel Maturana
# This file is part of binvox-rw-py.
# binvox-rw-py is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# binvox-rw-py is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
from threading import Thread
import socket
import time
import sys
VERBOSE = False # Enables/Disables printing of debug messages
IP_PORT = 22000 # the port that tinkerboard listens to
TIME_INTERVAL = 10 # sec