Skip to content

Instantly share code, notes, and snippets.

View Kruptein's full-sized avatar

Darragh Van Tichelen Kruptein

View GitHub Profile
input: asset of a certain resolution (e.g. 200 x 200 pixels)
case A: 5ft/ 50px grid cells
case B: 10ft/ 50px grid cells
case C: 5ft/100px grid cells
case D: 10ft/100px grid cells
without any extra information:
drop on A] 4 by 4 cells (20 x 20 ft)
"""
PlanarAlly backend server code.
This is the code responsible for starting the backend and reacting to socket IO events.
"""
# Mimetype recognition for js files apparently is not always properly setup out of the box for some users out there.
import mimetypes
mimetypes.init()
mimetypes.types_map['.js'] = "application/javascript; charset=utf-8"
"""
PlanarAlly backend server code.
This is the code responsible for starting the backend and reacting to socket IO events.
"""
# Mimetype recognition for js files apparently is not always properly setup out of the box for some users out there.
import mimetypes
js_mime = mimetypes.guess_type(".js")[0]
if js_mime == "text/plain" or js_mime is None:
final = ''
for i in range(len(s)):
if i == len(s) - 1:
final = s
elif s[i] > s[i+1]:
final = s[:i]
break
import queue
from threading import Thread
import logging
import numpy as np
import time
from bokeh.models import Range1d
from bokeh.plotting import figure, curdoc
from bokeh.models.sources import ColumnDataSource
<Separator@Widget>:
color: 200/255.0, 200/255.0, 200/255.0, 1
canvas:
Color:
rgba: self.color
Rectangle:
pos: self.pos.x
size: self.size
<HSeparator@Separator>:
Feb 24 04:36:26 luxiefluxie-arch systemd[1]: Starting Cleanup of Temporary Directories...
Feb 24 04:36:27 luxiefluxie-arch systemd[1]: Started Cleanup of Temporary Directories.
Feb 24 04:43:04 luxiefluxie-arch kernel: kvm: exiting hardware virtualization
Feb 24 04:43:04 luxiefluxie-arch kernel: pcieport 0000:00:1c.0: System wakeup enabled by ACPI
Feb 24 04:45:16 luxiefluxie-arch kernel: INFO: task kworker/5:2:116 blocked for more than 120 seconds.
Feb 24 04:45:16 luxiefluxie-arch kernel: Not tainted 4.4.1-2-ARCH #1
Feb 24 04:45:16 luxiefluxie-arch kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Feb 24 04:45:16 luxiefluxie-arch kernel: kworker/5:2 D ffff8804818b3be8 0 116 2 0x00000000
Feb 24 04:45:16 luxiefluxie-arch kernel: Workqueue: events acpi_ec_event_processor
Feb 24 04:45:16 luxiefluxie-arch kernel: ffff8804818b3be8 ffffffff810e0124 ffff880483abe740 ffff88048312d880