Skip to content

Instantly share code, notes, and snippets.

View rogovski's full-sized avatar

Michael Rogowski rogovski

  • Connecticut, USA
View GitHub Profile
@rogovski
rogovski / hessian.py
Created April 20, 2015 23:04
second partial derivative test
import sympy as s
from sympy.interactive.printing import init_printing
from sympy.matrices import Matrix
init_printing(use_unicode=False, wrap_line=False, no_global=True)
# In [1]: %load_ext autoreload
#
# In [2]: %autoreload 2
@rogovski
rogovski / newton.py
Created April 9, 2015 21:52
Newtons Method
import sympy as s
from sympy.interactive.printing import init_printing
from sympy.matrices import Matrix
init_printing(use_unicode=False, wrap_line=False, no_global=True)
# In [1]: %load_ext autoreload
#
# In [2]: %autoreload 2
@rogovski
rogovski / gist:de49eec46923e3005ae3
Created March 18, 2015 12:31
convert utc epoch to local date with javascript
// http://stackoverflow.com/questions/4631928/convert-utc-epoch-to-local-date-with-javascript
var utcSeconds = 1234567890;
var d = new Date(0); // The 0 there is the key, which sets the date to the epoch
d.setUTCSeconds(utcSeconds);
@rogovski
rogovski / TreeTraversals
Created June 19, 2014 15:28
"Imperative" Tree Traversals in C# using stacks and queues
using System;
using System.Collections.Generic;
namespace TreeTraversals
{
public static class RT {
public static RoseTree<T> Node<T>(T value)
{
return new RoseTree<T>()