Skip to content

Instantly share code, notes, and snippets.

View sween's full-sized avatar
💭
Mostly Good Intentions

Ron Sweeney sween

💭
Mostly Good Intentions
View GitHub Profile
require 'rubygems'
require 'twitter'
require 'htmlentities'
require 'optparse'
require 'ostruct'
require 'shorturl'
def self.arstweet(title,author,teachingfileurl)
httpauth = Twitter::HTTPAuth.new("arsteach", "")
# Ron Sweeney
# Dev Arboretum
# Original Post: http://www.clubpacswestmi.net/articles/2007/4/1/a-ruby-hl7-sniffer
require 'pcap'
require 'Ethernet'
require 'rubygems'
require 'ruby-hl7'
# Go Socks.
# Pings block me no more.
ssh -D 8080 -f -C -q -N [email protected]
# dcm4che2 Toolkit with the elegance of Ruby
# Read File Example - Ron Sweeney
require 'java'
include_class 'java.io.BufferedInputStream'
include_class 'java.io.FileInputStream'
include_class 'org.dcm4che2.io.DicomInputStream'
include_class 'org.dcm4che2.data.BasicDicomObject'
def PrintTag(tagvalue)
# build command for dcmtk on Mac OSX
env ARCH='-arch ppc -arch i386 -arch ppc64 -arch x86_64' CFLAGS='-D_DARWIN_C_SOURCE -arch ppc -arch i386 -arch ppc64 -arch x86_64' CXXFLAGS='-D_DARWIN_C_SOURCE -arch ppc -arch i386 -arch ppc64 -arch x86_64' ./configure --prefix=$HOME/dicom
{
"file-format": {
"data-set": {
"@name": "LittleEndianExplicit",
"sequence": [
{
"@name": "ProcedureCodeSequence",
"@card": "1",
"@vr": "SQ",
"item": {
Jabber IM with circuitshaman <[email protected]>7/2/09 2:38 PM
Ron Sweeney
ping
2:54 PM
circuitshaman
pong
3:02 PM
Ron Sweeney
are you familiar with document based db's ?
circuitshaman
# This program will convert how much xbox points are per point.
# Quentin Sweeney's first Ruby program. 08/08/2009
# numofpoints (variable) divided by(operator) the cost(variable)
puts "################################"
puts "## XBOX Actual Cost ##"
puts "################################"
puts " by oO Sween Oo"
# Rip through some DICOM, and anonymize
require 'rubygems'
require 'dicom'
require 'benchmark'
a = DICOM::Anonymizer.new
a.add_folder("/Users/sween/Desktop/DICOMA")
puts Benchmark.measure { a.execute }
public static string GetNodeValue2(XPathDocument sdoc, string sSelectExpression)
{
string sRetVal = "";
// Read the XML document
//XPathDocument myXPathDocument = new XPathDocument(sFileName);
XPathNavigator myXPathNavigator = sdoc.CreateNavigator();
XPathNodeIterator myXPathNodeIterator = myXPathNavigator.Select(sSelectExpression);
while (myXPathNodeIterator.MoveNext())
{