Skip to content

Instantly share code, notes, and snippets.

View pollend's full-sized avatar
:octocat:
working on random stuff

Michael Pollind pollend

:octocat:
working on random stuff
View GitHub Profile
import org.lwjgl.*;
import org.lwjgl.glfw.*;
import org.lwjgl.opengl.*;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.system.MemoryUtil.*;
public class Benchmark {
Person = {
name:string, age:number, gender:string
mary, 12, female
jon, 12, male
geoerge, 12, male
sam, 12, male
lisa, 12, female
jenna, 23, female
}
"""
.. versionadded:: 1.1.0
This demo depends on new features added to contourf3d.
"""
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
from matplotlib import cm
import srtm
import numpy as np
{
"ext": {
"shell": {
"theme": "default_leftonly"
}
}
}
@pollend
pollend / markdown.js
Last active May 22, 2018 17:26
Quill Delta to markdown
import Delta from 'quill-delta/lib/delta'
const _preInline: [] = {
link: (attr, insert) => {
return '[' + attr.link + '](' + insert + ')'
}
}
const _inline: [] = {
italic: (attr, insert) => {
@pollend
pollend / fractal.m
Last active September 18, 2017 03:50
Julian set in matlab
[X,Y] = meshgrid(-1:.001:1);
Z = ones(size(X));
for x_ = 1: size(X,1)
for y_ = 1: size(X,1)
u = [X(x_,y_),Y(x_,y_)];
for i = 1:100
v = [u(1) * u(1) - u(2) * u(2)+ -0.550, u(2) * u(1) + u(2) * u(1)+ -0.550];
if((v(1) * v(1) + v(2) * v(2)) > 4)
break
@pollend
pollend / animated_fractal.m
Created September 18, 2017 17:14
animated fractal
[X,Y] = meshgrid(-2:.008:2);
Z = ones(size(X));
h = figure;
for frame = -2:.01:2
for x_ = 1: size(X,1)
for y_ = 1: size(X,2)
u = [X(x_,y_),Y(x_,y_)];
for i = 1:100
% julian set
@pollend
pollend / spiral_zoom.m
Created September 20, 2017 02:34
zooming into a spiral fractal
h = figure;
set(h, 'Position', [0 0 700 700])
left = linspace(-.75, -.7367,100)
right = linspace(-.72, -.7364,100)
top = linspace(-.7, -.6928,100)
bottom = linspace(-.684, -.6926,100)
h = figure;
set(h, 'Position', [0 0 (1280+100) (720 + 100)])
WIDTH = 1280;
HEIGHT = 720;
center = [-.73659007459575,-.69270903692418];
[XX,YY] = meshgrid(linspace(0,1,720),linspace(0,1,1280));
Z = ones(size(XX));
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
using System.IO;
#endif
using System.Collections;
/** Utility class for handling singleton ScriptableObjects for data management */
public abstract class ScriptableSingleton<T> : ScriptableObject where T : ScriptableSingleton<T>{