Skip to content

Instantly share code, notes, and snippets.

View logGraph.py
import sys
import string
import matplotlib.dates as mdates
#lines, warnings, errors
timeBuckets = [[],[],[]]
hoursList = []
@Aeium
Aeium / shapecutter.py
Last active Jun 18, 2019
Functions to assist using shapely and ezdzf
View shapecutter.py
# Draws shape to modelspace
def drawShape(shape,msp):
if(shape.type == 'Polygon'):
drawLineRing(shape.exterior,msp)
for linering in shape.interiors:
View A320440
import math
import numpy as np
# very simple discrete "convolution" of 1D filter [1,1,0] over input B
# example: input: 00010
# output: 00110
# input: 01110
# output: 12210
def convoleBasic(a,b):
@Aeium
Aeium / nginx.conf
Created Jul 12, 2018
nginx.conf for local + broadcast
View nginx.conf
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@Aeium
Aeium / padfunc.html
Created May 14, 2018
array padding function
View padfunc.html
<script src="https://cdn.jsdelivr.net/gh/nicolaspanel/numjs@0.15.1/dist/numjs.min.js"></script>
<script>
function modularPaddArray(prePadArray, border){ // buffer should be input tile radius
var ppa = prePadArray
var b = border
// 9 parts, original array in center, 4 sides, 4 corners
View germ_game_onearray_working.html
<!DOCTYPE html>
<html>
<body>
<div id="container">
<canvas id="myCanvas" width= 450%; height= 450%; style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
<canvas id="myCanvas2" width= 450%; height= 450%; style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
@Aeium
Aeium / germ_game_onearray.html
Created Aug 30, 2017
Go life onearray refactor
View germ_game_onearray.html
<!DOCTYPE html>
<html>
<body>
<div id="container">
<canvas id="myCanvas" width= 450%; height= 450%; style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
<canvas id="myCanvas2" width= 450%; height= 450%; style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
@Aeium
Aeium / germ_game_onearray.html
Created Aug 30, 2017
Go life onearray refactor
View germ_game_onearray.html
<!DOCTYPE html>
<html>
<body>
<div id="container">
<canvas id="myCanvas" width= 450%; height= 450%; style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
<canvas id="myCanvas2" width= 450%; height= 450%; style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
@Aeium
Aeium / germ_game.html
Created Aug 29, 2017
Germ (Go + Life)
View germ_game.html
<!DOCTYPE html>
<html>
<body>
<div id="container">
<canvas id="myCanvas" width= 950%; height= 950%; style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
</div>
<script>
View gist:4c11dc9c98f0cd9e286902b2b5a6bdd9
<!DOCTYPE html>
<html>
<body>
<div id="container">
<canvas id="myCanvas" width= 950%; height= 950%; style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
</div>
<script>