This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Implementing basic list functions for fun and profit | |
import Data.List | |
myLength :: [a] -> Int | |
myLength = foldl (\acc _ -> acc + 1) 0 | |
myLength' :: [a] -> Int | |
myLength' [] = 0 | |
myLength' (x:xs) = 1 + myLength' xs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Garage Parking Assistant | |
// Uses Aiko event library, located at https://github.com/geekscape/Aiko | |
#include <AikoEvents.h> | |
using namespace Aiko; | |
// PING))) Ultrasonic Distance Sensor from Parallax. | |
// Uses the Ping library by Caleb Zulawski, located at http://arduino.cc/playground/Code/Ping | |
#include <Ping.h> | |
const int PingPin = 6; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import unittest | |
import vtk, qt, ctk, slicer | |
from slicer.ScriptedLoadableModule import * | |
from array import array | |
import logging | |
import vtk.util.numpy_support | |
import numpy as np | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
original_Segment_Name = 'Segment_Name_Here' | |
low_island_size = 20 | |
high_island_size = 200 | |
# | |
# Switch to segment editor and pick logical effects, and get the segment to work on. | |
# | |
slicer.util.selectModule('SegmentEditor') | |
segmentEditorWidget = slicer.modules.segmenteditor.widgetRepresentation().self().editor | |
segmentEditorWidget.setActiveEffectByName("Logical operators") |