Skip to content

Instantly share code, notes, and snippets.

View romainecarter's full-sized avatar
🚀
Learning!

rcarter romainecarter

🚀
Learning!
View GitHub Profile
using System;
using System.Data;
using System.Net.Mime;
using System.Text;
using System.Net;
using System.Xml;
using System.IO;
public class ConnectWBX
{
@romainecarter
romainecarter / hmm.ipynb
Last active October 7, 2016 00:30
Example Hidden Markov Model
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@romainecarter
romainecarter / ConnectADP.cs
Created October 6, 2016 18:19
Adobe Connect Adapter Class
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Xml;
using URL = System.Uri;
namespace ConnectADP
{
public class ConnectADP
@romainecarter
romainecarter / unittest.cs
Created October 1, 2016 14:22
Unit Testing In LinqPad
void Main()
{
new NUnitLite.Runner.TextUI().Execute(new[]{"-noheader"});
}
public class Dog
{
public string Howl()
{
return "awhooo!";
@romainecarter
romainecarter / monad.cs
Last active October 1, 2016 14:20
Maybe Monad Implementation in C#
void Main()
{
var me = new person{name = "Romaine", weight = 170, height = 83};
Console.WriteLine(new Maybe<int>(me.height).bind(() => new Maybe<int>((703 * me.weight) / (me.height * me.height))));
}
class Maybe<T>;
{
public T value;
@romainecarter
romainecarter / binarysearch.py
Last active April 5, 2018 14:13
Binary Search Implementation In Python
def binary_search(seq, value):
if len(seq) == 0:
return False
else:
mid = len(seq) // 2
if value == seq[mid]:
return True
elif value < seq[mid]:
return binary(seq[:mid], value)
elif value > seq[mid]:
@romainecarter
romainecarter / singlelinked.py
Created October 1, 2016 14:08
Single Linked List In Python
class Node:
def __init__(self, value):
self.next = None
self.value = value
class List:
def __init__(self, value):
self.head = Node(value)
def insert(self, value):
@romainecarter
romainecarter / struct2xml.m
Last active August 26, 2017 20:41
DICOM To XML Converter
%Convert Struct to XML
function obj = struct2xml(param)
doc = com.mathworks.xml.XMLUtils.createDocument(inputname(1));
root = doc.getDocumentElement;
obj = xmlwrite(parse(param, doc, root));
end
function obj = parse(param, doc, root)