Just a few things that i'm learning
- Built into the AF SDK.
- Uses packages:
- OSIsoft.AF.UI
- OSIsoft.AFSDK
#! ruby | |
if ARGV.length == 1 | |
if File.exists?(ARGV[0]) | |
file = File.open(ARGV[0], "r") | |
puts "File name: #{ARGV[0]}" | |
count = 1 | |
file.each do |line| | |
line_count = line.split("\t").count |
#! ruby | |
# | |
# Gets the unique OPC methods from the OPC analyzer trace log of all the methods TopView Configurator and Engine uses | |
# Assumes that it has been given a valid file name | |
if ARGV.length == 1 and File.exists?(ARGV[0]) | |
input = File.open(ARGV.first, "r").read | |
# Build up a unique array of OPC methods | |
opc_methods = [] |
#! ruby | |
# This will generate a negative number set that i can use for testing my compression analysis | |
# | |
# Example: | |
# NegNumSet numberOfPoints [max] [freq] | |
# | |
# Arguments (all are optional so far): | |
# 1: numberOfPoints - the number of points to generate | |
# 2: Max - the maximum distance from zero that the data point values can have |
class Chop | |
def chop(target, values) | |
size = values.size | |
if size == 0 | |
-1 | |
elsif size == 1 | |
(values[0] == target ? 0 : -1) | |
else | |
if target < values[size/2] |
#! ruby | |
# This script will take the words in a file or passed argument and alphabetize them. Then they will be put out with a line for each starting letter. | |
# This will help me with grabbing all the keywords and organzing them alphabetically by line so that in the future adding keywords to the Edict language spec will be easier since they are in an alphabetical list. | |
if ARGV.size == 1 | |
lines = [] | |
input = "" | |
output = "" |