Skip to content

Instantly share code, notes, and snippets.

View wallstop's full-sized avatar
🎯
Focusing

Eli Pinkerton wallstop

🎯
Focusing
View GitHub Profile
@wallstop
wallstop / CodeGolfParser.java
Last active December 13, 2015 19:39
Basic evaluator for SMCM Code Golf
import java.io.BufferedReader;
import java.io.FileReader;
public class CodeGolfParser
{
public static void parse(String fileName) throws Exception
{
BufferedReader fReader;
int characterCount;
# Finds the all potential sums for some 3-space configuration of x y z dimensions
# with values corresponding to inputArray, stacked in precedence of x, y, z
def sumFinder(x, y, z, inputArray):
foundZeroSum = False
# Checks all potential sets starting with a single value
for i in range(0, len(inputArray)):
xSum = list()
ySum = list()
@wallstop
wallstop / raycasting.py
Last active December 20, 2015 23:49
Daily Programming Challenge #131
import math
def raycast(grid, x, y, radian):
radian += math.pi
unitVector = [math.cos(radian), math.sin(radian)]
found = False
while not found:
x += unitVector[0]
template<typename T>
LinkedList<T>::LinkedList()
{
head = new node;
tail = new node;
head->prev = 0; //This can also be null, same thing.
head->next = tail;
tail->next = 0;
public class main
{
public static void main(String [] args)
{
fib(10);
}
// These can be inside the function, but it saves computation time not to redefine them everytime
static final double alpha = (1 + Math.sqrt(5)) / 2;
static final double omega = (1 - Math.sqrt(5)) / 2;
import java.util.HashSet;
public class main
{
public static void main(String [] args)
{
fib(10);
}
@wallstop
wallstop / Seal.java
Last active December 24, 2015 10:59
package edu.smcm.ButterSealGame;
import android.content.Context;
import android.util.DisplayMetrics;
import android.view.Display;
import android.view.WindowManager;
import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.audio.Music;
@wallstop
wallstop / ConcurrentQueueTest.cpp
Created February 28, 2014 03:51
Test of DX/ConcurrentQueue.h
#include <ConcurrentDX/ConcurrentDX.h>
#include <thread>
#include <atomic>
#include <iostream>
#include <vector>
using namespace DX;
import math
def fibonacci(index):
if(index < 1):
return -1
return int(1/math.sqrt(5) * math.pow(((1 + math.sqrt(5)) / 2), index) - 1/math.sqrt(5) * math.pow(((1 - math.sqrt(5)) / 2), index))
alphabet = "abcdefghijklmnopqrstuvwxzy"
masterSet = list()
def generateSet():
global masterSet
masterSet.clear()
basis = list(alphabet)
masterSet = list(alphabet)
for i in range(0, 26):
newList = list()