Skip to content

Instantly share code, notes, and snippets.

Remo Mueller remomueller

Block or report user

Report or block remomueller

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
@remomueller
remomueller / xml_testing.rb
Last active Jun 9, 2017
XML Integrity Checking
View xml_testing.rb
# frozen_string_literal: true
# https://gist.github.com/remomueller/c853734a2f85937b69b373c46760fcdd
# gem install xml-simple colorize --no-document
# ruby xml_testing.rb
# XML Integrity Checking
# I think checking through all XML for the following would be a good place to
@remomueller
remomueller / tutorial_05.rb
Created Jan 31, 2017
Counting Apneas in EDF Annotations
View tutorial_05.rb
# tutorial_05.rb
# sleepdata.org
# author: @remomueller
#
# Required Gems:
#
# gem install colorize nsrr xml-simple --no-document
#
# To Run Script:
#
@remomueller
remomueller / tutorial_04.rb
Last active Jan 31, 2017
Compute EDF Signal Averages
View tutorial_04.rb
# tutorial_04.rb
# sleepdata.org
# author: @remomueller
#
# Required Gems:
#
# gem install colorize edfize nsrr --no-document
#
# To Run Script:
#
@remomueller
remomueller / tutorial_03.rb
Last active Jan 31, 2017
Rewrite EDF Header Start Date of Recording
View tutorial_03.rb
# tutorial_03.rb
# sleepdata.org
# author: @remomueller
#
# Required Gems:
#
# gem install colorize edfize nsrr --no-document
#
# To Run Script:
#
@remomueller
remomueller / tutorial_02.rb
Created Jan 30, 2017
Read EDF Header and Signal Header
View tutorial_02.rb
# tutorial_02.rb
# sleepdata.org
# author: @remomueller
#
# Required Gems:
#
# gem install colorize edfize nsrr --no-document
#
# To Run Script:
#
@remomueller
remomueller / tutorial_01.rb
Last active Jan 30, 2017
Download EDFs programmatically
View tutorial_01.rb
# tutorial_01.rb
# sleepdata.org
# author: @remomueller
#
# Required Gems:
#
# gem install colorize edfize nsrr --no-document
#
# To Run Script:
#
@remomueller
remomueller / ruby_2_4_0_integer_fixes.rb
Last active Feb 20, 2017
Cleans up some deprecation notices that can clutter up tests on Ruby 2.4.0, can be placed in `config/initializers`.
View ruby_2_4_0_integer_fixes.rb
# Fixes gems that reference Fixnum explicitly. Replaces `Fixnum` with `0.class`.
# mail-2.6.4/lib/mail/attachments_list.rb:33
module Mail
class AttachmentsList < Array
def [](index_value)
if index_value.is_a?(0.class)
self.fetch(index_value)
else
self.select { |a| a.filename == index_value }.first
@remomueller
remomueller / loading_annotations.rb
Last active Dec 14, 2016
Simple script for loading and retrieving information from annotation files.
View loading_annotations.rb
# frozen_string_literal: true
# gem install xml-simple --no-document
# ruby loading_annotations.rb
require 'rubygems'
require 'csv'
require 'xmlsimple'
@remomueller
remomueller / annotation_testing.rb
Last active Dec 9, 2016
Parse XML Annotation Files and retrieve time asleep and number of obstructive apnea events.
View annotation_testing.rb
# frozen_string_literal: true
# gem install xml-simple colorize --no-document
# ruby annotation_testing.rb
require 'rubygems'
require 'colorize'
require 'json'
require 'xmlsimple'
@remomueller
remomueller / rewrite_signal_date.rb
Last active Dec 8, 2016
A simple edfize ruby script that efficiently replaces zero dates "00.00.00" with a valid EDF start date "01.01.85"
View rewrite_signal_date.rb
# frozen_string_literal: true
# gem install edfize --no-document
# ruby rewrite_signal_date.rb
require 'rubygems'
require 'edfize'
WRONG_DATE = '00.00.00'
CLIPPING_DATE = '01.01.85'
You can’t perform that action at this time.