Skip to content

Instantly share code, notes, and snippets.

Stachu Korick StachuDotNet

Block or report user

Report or block StachuDotNet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@akabe
akabe / maze_solver.ml
Last active Aug 29, 2015
A maze solver by A* algorithm on OCaml
View maze_solver.ml
(* ========================================================================== *
* General implementation of A-star algorithm
* ========================================================================== *)
module Astar :
sig
type 'a t =
{
cost : 'a -> 'a -> int;
goal : 'a;
@markrendle
markrendle / MITEA.license
Created Mar 30, 2015
The "MIT Except Apple" License
View MITEA.license
The MIT-except-Apple License (MIT-EA)
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person (except
anybody associated with Apple Inc.) obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the
Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@mavnn
mavnn / Game.fsx
Created Nov 21, 2014
Conway's Game of Life (1 hour, 74 lines...)
View Game.fsx
open System
let (|Alive|Dead|) i =
match i with
| 0 -> Dead
| 1 -> Alive
| _ -> failwith "What?"
let rand = Random()
@darylteo
darylteo / NinjectWebCommon.cs
Created Jul 5, 2014
Ninject injection into Signalr Hubs with ninject.mvc5.
View NinjectWebCommon.cs
[assembly: WebActivatorEx.PreApplicationStartMethod(typeof(Ascend.Core.Application.App_Start.NinjectWebCommon), "Start")]
[assembly: WebActivatorEx.ApplicationShutdownMethodAttribute(typeof(Ascend.Core.Application.App_Start.NinjectWebCommon), "Stop")]
namespace Ascend.Core.Application.App_Start
{
using System;
using System.Linq;
using System.Web;
using Microsoft.Web.Infrastructure.DynamicModuleHelper;
View 2048.py
import os,tty;tty.setcbreak(0);M=['']*16
def G(v):
p=['']*4;u=list(filter(str,v));i=3
while u:z=u.pop();p[i]=u and z==u[-1]and 2*u.pop()or z;i-=1
return p
def Y(M,k):i=1;M=zip(*[iter(M)]*4);exec'M=map([list,G][i*k==k*k],zip(*M))[::-1];i+=1;'*4;return sum(M,[])
while 1:
r=id(M)%71+17
while M[r%16]*r:r-=1
if r:M[r%16]=r%7%2*2+2
You can’t perform that action at this time.