text:
import os

DEFAULT_FILE_NAME = 'D:\\fuzzy_gui\\matchbox.fcl'
DEFAULT_FILE_NAME_DEF = DEFAULT_FILE_NAME.replace('.fcl','-def.fcl')
OUTPUT_RULE = 0
INPUT_RULE = 1
LINE_WIDTH = 2
X_START = 20
Y_START = 20
ADD_RULE_ID = 0
REMOVE_RULE_ID = 1
RUN_ID = 2
EXPORT_ID = 3
WIDTH = 100
HEIGHT = 20
DX = 20
DY = 40
FONT_SIZE = 10
ID_PLOT = 4

# dialog
ADD_TERM = 1
# the number of terms
TERM_NUMBER = 4
# the number of range input fields
RANGE_NUMBER = TERM_NUMBER*2

try:
    import numpy as N
    import numpy.random as RandomArray
    haveNumpy = True
    #print "Using numpy, version:", N.__version__
except ImportError:
            # numpy isn't there
            haveNumpy = False
            errorText = (
            "The Expert System Tool requires the numpy module, version 1.* \n\n"
            "You can get info about it at:\n"
            "http://numpy.scipy.org/\n\n"
            )

#---------------------------------------------------------------------------

def BuildDrawFrame(): # this gets called when needed, rather than on import
    try:
        from floatcanvas import NavCanvas, FloatCanvas, Resources
    except ImportError: # if it's not there locally, try the wxPython lib.
        from wx.lib.floatcanvas import NavCanvas, FloatCanvas, Resources
    import wx.lib.colourdb
    import time, random
    import wx.lib.dialogs

    class RuleEditDialog(wx.Dialog):
         def __init__(self, parent, id, title):
             wx.Dialog.__init__(self, parent, id, 'Edit rule: ' + title, size=(935,140))

             self.ruleName = title
             self.sizer = wx.FlexGridSizer(cols=4 + RANGE_NUMBER, hgap=6, vgap=6)
             self.terms = [0 for x in xrange(TERM_NUMBER)]
             self.ranges = [[0 for x in xrange(RANGE_NUMBER)] for x in xrange(TERM_NUMBER)]
             self.removeFlags = [0 for x in xrange(TERM_NUMBER)]
             print 'dialog rectangle terms', len(Model.terms)
             termIdx = 0
             for term in Model.terms:
                print 'term name: ', term.rule, 'title: ', title.replace(' ', '_')
                if term.rule == title.replace(' ', '_'):
                    print 'term.range: ', len(term.range_dict)
                    termLabel = wx.StaticText(self, -1, "Term:")
                    self.terms[termIdx] = wx.TextCtrl(self, -1, term.name, size=(175, -1))
                    self.terms[termIdx].SetInsertionPoint(0)
                    rangeLabel = wx.StaticText(self, -1, "Range:")
                    print 'range str: ', term.range_dict
                    range_size = len(term.range_dict)
                    for i, value in enumerate(term.range_dict):
                        #if value is not None:
                        initRange = wx.TextCtrl(self, -1, "kkk" + str(i), size=(6000, -1000))
                        self.ranges[termIdx][i] = initRange
                        print 'added init range: ', self.ranges[termIdx][i].GetValue(), 'termIdx: ', termIdx, 'i: ', i

                    print 'init self.ranges len: ', len(self.ranges[termIdx])
                    for i, value in enumerate(term.range_dict):
                        rangeValue = ""
                        if value is not None:
                            rangeValue = value
                        curRange = wx.TextCtrl(self, -1, rangeValue, size=(60, -1))
                        self.ranges[termIdx][i] = curRange
                        print 'current ranges: ', self.ranges[termIdx][i].GetValue(), 'termIdx: ', termIdx, 'i: ', i

                    print 'range size: ', range_size
                    if range_size < RANGE_NUMBER:
                        count = range_size
                        while (count < RANGE_NUMBER):
                            print 'The count is:', count
                            curRange = wx.TextCtrl(self, -1, "", size=(60, -1))
                            self.ranges[termIdx][count] = curRange
                            print 'place holder ranges: ', self.ranges[termIdx][count].GetValue(), 'termIdx: ', termIdx, 'count: ', count
                            count = count + 1

                    self.removeFlags[termIdx] = wx.CheckBox(self, -1, 'Remove Term', (10, 10))
                    self.removeFlags[termIdx].SetValue(False)
                    wx.EVT_CHECKBOX(self, self.removeFlags[termIdx].GetId(), self.RemoveTerm(termIdx))

                    print 'self.ranges len: ', len(self.ranges[termIdx])
                    self.sizer.AddMany([termLabel, self.terms[termIdx], rangeLabel,
                            self.ranges[termIdx][0], self.ranges[termIdx][1],
                            self.ranges[termIdx][2], self.ranges[termIdx][3],
                            self.ranges[termIdx][4], self.ranges[termIdx][5],
                            self.ranges[termIdx][6], self.ranges[termIdx][7],
                            self.removeFlags[termIdx]])

                    termIdx = termIdx + 1

             okButton = wx.Button(self, wx.ID_OK, "OK")
             self.sizer.Add(okButton)
             cancelButton = wx.Button(self, wx.ID_CANCEL, "Cancel", (50, 50))
             self.sizer.Add(cancelButton)
             plotButton = wx.Button(self, ID_PLOT, "Plot")
             self.sizer.Add(plotButton, 1, wx.EXPAND)
             self.Bind(wx.EVT_BUTTON, self.OnCmdButton, plotButton)

             self.SetSizer(self.sizer)

         def RemoveTerm(self, termIdx):
             if self.removeFlags[termIdx].GetValue():
                 self.SetTitle('checkbox.py')
             else: self.SetTitle('')

         def OnCmdButton(self, event):
            if event.GetId() == ID_PLOT:
                self.showPlot(self.ruleName)

         def showPlot(self, rule):
            import os
            import sys
            import string
            from PIL import Image
            from pylab import plot
            from pylab import title
            from pylab import show
            from pylab import ylabel
            from pylab import xlabel
            from pylab import text
            from pylab import legend
            x = 100
            col_averages = 200
            width = 100
            mean = 50
            left_x = 0
            min_left_rand = 20
            max_left_rand = 80
            right_x = 0
            min_right_rand = 20
            max_right_rand = 80
            FLAG_SIZE = 100
            GAP_RATIO = 2
            idx = 0
            colours = []
            colours.extend('r')
            colours.extend('b')
            colours.extend('g')
            termNames = []
            for term in Model.terms:
                #print 'term name: ', term.rule, 'title: ', rule.replace(' ', '_')
                if term.rule == rule.replace(' ', '_'):
                    print 'plot term size: ', len(term.range_dict)
                    print 'range str: ', term.range_dict
                    x_values = term.range_dict[::2]
                    y_values = term.range_dict[1::2]
                    print 'x_values', x_values, 'y_values', y_values
                    print 'x_max', max(x_values), 'y_max', max(y_values)
                    range_size = len(term.range_dict)
                    # define max on X and on Y
                    max_x = 0
                    max_y = 0

                    termNames.append(term.name)
                    # First term is blue, second term is red, third term is orange
                    # if multiple lines in one term
                    isAddZero = False
                    if len(term.range_dict) > 2 and term.range_dict[1] is not None:
                        for i in range(range_size/2):
                            print 'i plot', i
                            if i < len(term.range_dict)/2 - 1:
                                print 'plot term name', term.name, 'i', i, 'idx', idx, 'x_value1', x_values[i], 'x_value2', x_values[i+1], 'y_value1', y_values[i], 'y_value2', y_values[i+1], 'color', colours[idx]
                                plot([x_values[i],x_values[i+1]],[y_values[i],y_values[i+1]],colours[idx]+'-', label=term.name, linewidth=2)
                    # if flag term
                    else:
                        if term.range_dict[1] is None:
##                            plot([0,FLAG_SIZE*idx],[0,FLAG_SIZE],colours[idx], label=term.name, linewidth=2)
                            print 'plot term name', term.name
                            #if idx == 0:
                            isAddZero = True
                            plot([0,FLAG_SIZE],[term.range_dict[0],term.range_dict[0]],colours[idx]+'-', label=term.name, linewidth=2)
##                            plot([0,FLAG_SIZE*idx],[0,FLAG_SIZE],colours[idx], label=term.name, linewidth=2)
                    idx = idx + 1
##                    plot([0, int(max_x)+1],[0, int(max_y)+1])
            print 'isAddZero', isAddZero
            if isAddZero:
                plot([0,FLAG_SIZE],[0,0],'b-', linewidth=2)

            title('Rule: ' + rule)

            ylabel('Y axis')
            xlabel('X axis ')
            print termNames
            legend( termNames )

            show()

    class Rule(object):

        def __init__(self, name, type):
            super(Rule, self).__init__()

            self.initUI(name, type)

        def initUI(self, name, type):

            self.name = name
            self.type = type
            #self.start = 0
            #self.end = 0

    class Dependency(object):

        def __init__(self, name, dependency_dict):
            super(Dependency, self).__init__()

            self.initUI(name, dependency_dict)

        def initUI(self, name, dependency_dict):

            self.name = name
            self.dependency_dict = dependency_dict

    class Decision(object):

        def __init__(self, name, condition):
            super(Decision, self).__init__()

            self.initUI(name, condition)

        def initUI(self, name, condition):

            self.name = name
            self.condition = condition

    class Term(object):

        def __init__(self, rule, name, range_dict):
            super(Term, self).__init__()

            self.initUI(rule, name, range_dict)

        def initUI(self, rule, name, range_dict):

            self.rule = rule
            self.name = name
            self.range_dict = range_dict

    class Input(object):

        def __init__(self, name, min_range, max_range, weight):
            super(Input, self).__init__()

            self.initUI(name, min_range, max_range, weight)

        def initUI(self, name, min_range, max_range, weight):

            self.name = name
            self.min_range = min_range
            self.max_range = max_range
            self.weight = weight

    class Output(Input):
            pass

    class Model():

        rules = []
        inputs = []
        outputs = []
        exp_values = []
        dependencies = []
        terms = []
        headers = []
        decisions = []
        res_str = ''
        rule_counter = 0
        isRun = False

        def __init__(self):
            super(Model, self).__init__()

            self.initUI()

    class DrawFrame(wx.Frame):

        """
        A frame used for the FloatCanvas Demo

        """

        def __init__(self,parent, id,title,position,size):
            wx.Frame.__init__(self,parent, id,title,position, size)

            self.data = None
            self.filename = DEFAULT_FILE_NAME
            self.dirname = None

            self.data_def = None
            self.filename_def = DEFAULT_FILE_NAME_DEF
            self.dirname_def = None

            ## Set up the MenuBar
            MenuBar = wx.MenuBar()

            file_menu = wx.Menu()
            item = file_menu.Append(-1, "&Close","Close this frame")
            self.Bind(wx.EVT_MENU, self.OnQuit, item)

            menuOpen = file_menu.Append(-1, "&Open"," Open a file to edit")
            self.Bind(wx.EVT_MENU, self.OnOpen, menuOpen)

            showFlcFile = file_menu.Append(wx.ID_OPEN, "&OpenFLC"," Open an FLC file to read")
            self.Bind(wx.EVT_MENU, self.ShowFlcFile, showFlcFile)

            item = file_menu.Append(-1, "&SavePNG","Save the current image as a PNG")
            self.Bind(wx.EVT_MENU, self.OnSavePNG, item)
            MenuBar.Append(file_menu, "&File")

            draw_menu = wx.Menu()

            item = draw_menu.Append(-1, "&Clear","Clear the Canvas")
            self.Bind(wx.EVT_MENU, self.Clear, item)

            MenuBar.Append(draw_menu, "&Tests")

            view_menu = wx.Menu()
            item = view_menu.Append(-1, "Zoom to &Fit","Zoom to fit the window")
            self.Bind(wx.EVT_MENU, self.ZoomToFit, item)
            MenuBar.Append(view_menu, "&View")

            help_menu = wx.Menu()
            item = help_menu.Append(-1, "&About",
                                    "More information About this program")
            self.Bind(wx.EVT_MENU, self.OnAbout, item)
            MenuBar.Append(help_menu, "&Help")

            self.SetMenuBar(MenuBar)

            self.CreateStatusBar()

            self.sizer2 = wx.BoxSizer(wx.HORIZONTAL)
            self.buttons = []
            self.buttons.append(wx.Button(self, ADD_RULE_ID, "Add Rule"))
            self.sizer2.Add(self.buttons[ADD_RULE_ID], 1, wx.EXPAND)
            self.Bind(wx.EVT_BUTTON, self.OnCmdButton, self.buttons[ADD_RULE_ID])
            self.buttons.append(wx.Button(self, REMOVE_RULE_ID, "Remove Rule"))
            self.sizer2.Add(self.buttons[REMOVE_RULE_ID], 1, wx.EXPAND)
            self.Bind(wx.EVT_BUTTON, self.OnCmdButton, self.buttons[REMOVE_RULE_ID])
            self.buttons.append(wx.Button(self, RUN_ID, "Run"))
            self.sizer2.Add(self.buttons[RUN_ID], 1, wx.EXPAND)
            self.Bind(wx.EVT_BUTTON, self.OnCmdButton, self.buttons[RUN_ID])
            self.buttons.append(wx.Button(self, EXPORT_ID, "Export Rule Engine"))
            self.sizer2.Add(self.buttons[EXPORT_ID], 1, wx.EXPAND)
            self.Bind(wx.EVT_BUTTON, self.OnCmdButton, self.buttons[EXPORT_ID])

            # Add the Canvas
            NC = NavCanvas.NavCanvas(self,
                                     Debug = 0,
                                     BackgroundColor = "DARK SLATE BLUE")

            self.Canvas = NC.Canvas # reference the contained FloatCanvas

            self.MsgWindow = wx.TextCtrl(self, wx.ID_ANY,
                                         "Look Here for output from events\n",
                                         style = (wx.TE_MULTILINE |
                                                  wx.TE_READONLY |
                                                  wx.SUNKEN_BORDER)
                                         )

            ##Create a sizer to manage the Canvas and message window
            MainSizer = wx.BoxSizer(wx.VERTICAL)
            MainSizer.Add(NC, 4, wx.EXPAND)
            MainSizer.Add(self.sizer2, 0, wx.EXPAND)
            MainSizer.Add(self.MsgWindow, 1, wx.EXPAND | wx.ALL, 5)

            self.SetSizer(MainSizer)
            self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)

            self.Canvas.Bind(FloatCanvas.EVT_MOTION, self.OnMove)
            self.Canvas.Bind(FloatCanvas.EVT_MOUSEWHEEL, self.OnWheel)

            self.EventsAreBound = False

            ## getting all the colors for random objects
            wx.lib.colourdb.updateColourDB()
            self.colors = wx.lib.colourdb.getColourList()

            return None

        def Log(self, text):
            self.MsgWindow.AppendText(text)
            if not text[-1] == "\n":
                self.MsgWindow.AppendText("\n")

        def BindAllMouseEvents(self):
            if not self.EventsAreBound:
                ## Here is how you catch FloatCanvas mouse events
                self.Canvas.Bind(FloatCanvas.EVT_LEFT_DOWN, self.OnLeftDown)
                self.Canvas.Bind(FloatCanvas.EVT_LEFT_UP, self.OnLeftUp)
                self.Canvas.Bind(FloatCanvas.EVT_LEFT_DCLICK, self.OnLeftDouble)

                self.Canvas.Bind(FloatCanvas.EVT_MIDDLE_DOWN, self.OnMiddleDown)
                self.Canvas.Bind(FloatCanvas.EVT_MIDDLE_UP, self.OnMiddleUp)
                self.Canvas.Bind(FloatCanvas.EVT_MIDDLE_DCLICK, self.OnMiddleDouble)

                self.Canvas.Bind(FloatCanvas.EVT_RIGHT_DOWN, self.OnRightDown)
                self.Canvas.Bind(FloatCanvas.EVT_RIGHT_UP, self.OnRightUp)
                self.Canvas.Bind(FloatCanvas.EVT_RIGHT_DCLICK, self.OnRightDouble)

            self.EventsAreBound = True

        def UnBindAllMouseEvents(self):
            ## Here is how you unbind FloatCanvas mouse events
            self.Canvas.Unbind(FloatCanvas.EVT_LEFT_DOWN)
            self.Canvas.Unbind(FloatCanvas.EVT_LEFT_UP)
            self.Canvas.Unbind(FloatCanvas.EVT_LEFT_DCLICK)

            self.Canvas.Unbind(FloatCanvas.EVT_MIDDLE_DOWN)
            self.Canvas.Unbind(FloatCanvas.EVT_MIDDLE_UP)
            self.Canvas.Unbind(FloatCanvas.EVT_MIDDLE_DCLICK)

            self.Canvas.Unbind(FloatCanvas.EVT_RIGHT_DOWN)
            self.Canvas.Unbind(FloatCanvas.EVT_RIGHT_UP)
            self.Canvas.Unbind(FloatCanvas.EVT_RIGHT_DCLICK)

            self.EventsAreBound = False

        def PrintCoords(self,event):
            self.Log("coords are: %s"%(event.Coords,))
            self.Log("pixel coords are: %s\n"%(event.GetPosition(),))

        def OnOpen(self,e):
            """ Open a file"""
            dlg = wx.FileDialog(self, "Choose a file", "", "", "*.fcl", wx.OPEN)
            if dlg.ShowModal() == wx.ID_OK:
                self.filename = dlg.GetFilename()
                self.dirname = dlg.GetDirectory()
            self.filename = dlg.GetPath()
            print 'open a file', self.filename
            self.Clear()
            Model.rules = []
            Model.terms = []
            Model.decisions = []
            Model.inputs = []
            Model.outputs = []
            self.ReadRuleEngine()
            dlg.Destroy()

        def ShowFlcFile(self, evt):
            dlg = wx.FileDialog(self, "Choose an FLC file", "", "", "*.*", wx.OPEN)
            if dlg.ShowModal() == wx.ID_OK:
                self.filename = dlg.GetFilename()
                self.dirname = dlg.GetDirectory()
                self.Log("selected dir: " + dlg.GetDirectory() + ", file: " + dlg.GetFilename())

            f = open(dlg.GetDirectory() + '\\' + dlg.GetFilename(), "r")
            msg = f.read()
            f.close()

            dlg = wx.lib.dialogs.ScrolledMessageDialog(self, msg, "message test")
            dlg.ShowModal()

        def OnSavePNG(self, event=None):
            import os
            dlg = wx.FileDialog(
                self, message="Save file as ...", defaultDir=os.getcwd(),
                defaultFile="", wildcard="*.png", style=wx.SAVE
                )
            if dlg.ShowModal() == wx.ID_OK:
                path = dlg.GetPath()
                if not(path[-4:].lower() == ".png"):
                    path = path+".png"
                self.Canvas.SaveAsImage(path)

        def OnLeftDown(self, event):
            self.Log("LeftDown")
            self.PrintCoords(event)

        def OnLeftUp(self, event):
            self.Log("LeftUp")
            self.PrintCoords(event)

        def OnLeftDouble(self, event):
            self.Log("LeftDouble")
            self.PrintCoords(event)

        def OnMiddleDown(self, event):
            self.Log("MiddleDown")
            self.PrintCoords(event)

        def OnMiddleUp(self, event):
            self.Log("MiddleUp")
            self.PrintCoords(event)

        def OnMiddleDouble(self, event):
            self.Log("MiddleDouble")
            self.PrintCoords(event)

        def OnRightDown(self, event):
            self.Log("RightDown")
            self.PrintCoords(event)

        def OnRightUp(self, event):
            self.Log("RightUp")
            self.PrintCoords(event)

        def OnRightDouble(self, event):
            self.Log("RightDouble")
            self.PrintCoords(event)

        def OnWheel(self, event):
            self.Log("Mouse Wheel")
            self.PrintCoords(event)
            Rot = event.GetWheelRotation()
            Rot = Rot / abs(Rot) * 0.1
            if event.ControlDown(): # move left-right
                self.Canvas.MoveImage( (Rot, 0), "Panel" )
            else: # move up-down
                self.Canvas.MoveImage( (0, Rot), "Panel" )

        def OnMove(self, event):
            """
            Updates the status bar with the world coordinates
            """
            self.SetStatusText("%.2f, %.2f"%tuple(event.Coords))
            event.Skip()

        def OnAbout(self, event):
            dlg = wx.MessageDialog(self,
                                   "This is a program to create and handle rules \n"
                                   "using the fuzzy logic\n",
                                   "AIT",
                                   wx.OK | wx.ICON_INFORMATION)
            dlg.ShowModal()
            dlg.Destroy()

        def ZoomToFit(self,event):
            self.Canvas.ZoomToBB()

        def Clear(self,event = None):
            self.UnBindAllMouseEvents()
            self.Canvas.InitAll()
            self.Canvas.Draw()

        def OnQuit(self,event):
            self.Close(True)

        def OnCloseWindow(self, event):
            self.Destroy()

        def ShowFrame(self):
            Object = self.MovingObject
            Range = self.Range
            if  self.TimeStep < self.NumTimeSteps:
                x,y = Object.XY
                if x > Range[1] or x < Range[0]:
                    self.dx = -self.dx
                if y > Range[1] or y < Range[0]:
                    self.dy = -self.dy
                Object.Move( (self.dx,self.dy) )
                Object.Text.Move( (self.dx,self.dy))
                self.Canvas.Draw()
                self.TimeStep += 1
                wx.GetApp().Yield(True)
            else:
                self.Timer.Stop()

        def MoveMe(self, Object):
            self.MovingObject = Object
            Range = self.Range
            self.dx = random.uniform(Range[0]/4,Range[1]/4)
            self.dy = random.uniform(Range[0]/4,Range[1]/4)
            #import time
            #start = time.time()
            self.NumTimeSteps = 200
            self.TimeStep = 1
            self.Timer.Start(self.FrameDelay)
            #print "Did %i frames in %f seconds"%(N, (time.time() - start) )

        def AddRule(self,event):
            self.Canvas.ZoomToBB()

        def ReadRuleEngine(self, event=None):
            if self.filename != None:
                self.Log('Opened rule engine: ' + self.filename + "\n")
                f = open(self.filename, 'r')

                with f:
                    self.data = f.read()
                self.data = self.data.replace('\t','    ')

                self.Log('Opened definitions: ' + self.filename_def + "\n")
                fdef = open(self.filename_def, 'r')

                with fdef:
                    self.datadef = fdef.read()
                self.datadef = self.datadef.replace('\t','    ')

                # read input settings and values
                if 'EXPERIMENTBLOCK' in self.datadef:
                    experiment_block_begin_pos = self.datadef.find('EXPERIMENTBLOCK')
                    experiment_block_end_pos = self.datadef.find('END_EXPERIMENTBLOCK')
                    experiment_block = self.datadef[experiment_block_begin_pos:experiment_block_end_pos].replace(' ', '').replace('\n\n', '\n').split('\n')[1:-1]
                    print 'experiment block', experiment_block
                    Model.headers = experiment_block[0].split(';')
                    Model.exp_values = experiment_block[1::]

                # read positive decisions
                decision_pos = self.datadef.find('VAR_POSITIVE_DECISION')
                ruleblock_pos = self.datadef.find('EXPERIMENTBLOCK')
                decision_block = self.datadef[ decision_pos : ruleblock_pos : ]
                var_decisions_part = decision_block.replace(' ', '').replace('\n\n','\n').split('VAR_POSITIVE_DECISION')[1::]
                #print 'decision part: ', var_decisions_part
                for var_decisions in var_decisions_part[::2]:
                    v = var_decisions.replace('END_DECISION_VAR\n', '').replace('\n\n','\n').split('\n')
                    ##print 'decision: ', v, ', decision name: ', v[0]
                    allconditions = []
                    for condition in v[1::]:
                        if ':=' in condition:
                            eq_pos = condition.find(':=')
                            end_pos = condition.find(';')
                            d = []
                            print 'condition: ', condition
                            condition = condition.replace(' ', '')
                            condition_row = condition.split(':=')
                            print 'condition_row', condition_row
                            #print 'condition_row0', condition_row[0], 'condition_row1', condition_row[1]
                            if len(condition_row[0]) > 0:
                                print 'condition_row: ', condition_row
                                allconditions.append(condition_row)
                            print 'decision', v[0], 'allconditions', allconditions
                    Model.decisions.append(Decision(v[0], allconditions))

                # read defuzzify rules
                defuzzify_pos = self.data.find('DEFUZZIFY')
                end_defuzzify_pos = self.data.find('END_DEFUZZIFY')
                rules_block = self.data[ defuzzify_pos : end_defuzzify_pos : ]
                #print 'rules_block', rules_block
                first_break_pos = rules_block.find('\n')
                #print 'defuzzify_pos', defuzzify_pos, 'first_break_pos', first_break_pos
                defuzzifyRuleName = rules_block[len('DEFUZZIFY') : first_break_pos].replace(' ', '')
                var_rules_part = rules_block.replace(' ', '').replace('\n\n','\n').split('\n')[1::]
                print 'defuzzify rules part: ', var_rules_part
                for term in var_rules_part:
                    if 'TERM' in term:
                        term_name_pos = term.find('TERM')
                        eq_pos = term.find(':=')
                        end_pos = term.find(';')
                        term_name = term[term_name_pos + 4 : eq_pos]
                        d = []
                        d.extend([term[eq_pos + 2 : end_pos], None])
                        if (len(term_name) > 0):
                            print 'defuzzifyRuleName', defuzzifyRuleName, 'term_name', term_name, 'd: ', d
                            Model.terms.append(Term(defuzzifyRuleName, term_name, d))

                # read rules
                fuzzify_pos = self.data.find('FUZZIFY')
                defuzzify_pos = self.data.find('DEFUZZIFY')
                rules_block = self.data[ fuzzify_pos : defuzzify_pos : ]
                var_rules_part = rules_block.replace(' ', '').replace('\n\n','\n').split('FUZZIFY')[1::]
                #print 'rules part: ', var_rules_part
                for var_rules in var_rules_part[::2]:
                    v = var_rules.replace('END_FUZZIFY\n', '').replace('\n\n','\n').split('\n')
                    ##print 'rules: ', v, ', rule name: ', v[0]
                    for term in v[1::]:
                        #print 'term: ', term
                        term_name_pos = term.find('TERM')
                        eq_pos = term.find(':=')
                        end_pos = term.find(';')
                        range_pos = term.find('(')
                        term_name = term[term_name_pos + 4 : eq_pos]
                        d = []
                        if (range_pos > 0):
                            for row in term.split('(')[1:]:
                                #print 'row: ', row
                            	range_pair = row.replace(' ', '')
                                range_end_pos = range_pair.find(')')
                                range = range_pair[:range_end_pos].split(',')
                                #print 'range: ', range
                                d.extend([range[0], range[1]])
                        else:
                            d.extend([term[eq_pos + 2 : end_pos], None])

                        if (len(term_name) > 0):
                            #print 'd: ', d
                            Model.terms.append(Term(v[0], term_name, d))

                    var_inputs_part = self.data.split('VAR_INPUT')
                    var_inputs = var_inputs_part[1].replace(':','').split('END_VAR')
                    ##print 'var_inputs: ', var_inputs[0]

                    var_outputs_part = self.data.split('VAR_OUTPUT')
                    var_outputs = var_outputs_part[1].replace(':','').split('END_VAR')
                    ##print 'var_outputs: ', var_outputs[0]

                    # read inputs
                    input_names = var_inputs[0].split('\n')
                    for n in input_names:
                       x = n.replace(' ', '')
                       real_pos = x.find('REAL')
                       range_pos = x.find('RANGE(')
                       sep_pos = x.find('..')
                       end_pos = x.find(')')
                       if (real_pos > 0): # TODO save inputs and outputs only once
                           add = True
                           for inputObj in Model.inputs:
                              if inputObj.name == x[:real_pos]:
                                add = False
                                break
                           if add == True:
                                Model.inputs.append(Input(x[:real_pos], x[range_pos + 6:sep_pos], x[sep_pos + 2: end_pos], None)) #weight))

                    output_names = var_outputs[0].split('\n')
                    for n in output_names:
                       x = n.replace(' ', '')
                       real_pos = x.find('REAL')
                       range_pos = x.find('RANGE(')
                       sep_pos = x.find('..')
                       end_pos = x.find(')')
                       if (real_pos > 0):
                           add = True
                           for outputObj in Model.outputs:
                              if outputObj.name == x[:real_pos]:
                                add = False
                                break
                           if add == True:
                               Model.outputs.append(Output(x[:real_pos], x[range_pos + 6:sep_pos], x[sep_pos + 2: end_pos], 0.5))

                for n in input_names:
                    if len(n) > 0:
                        rule = n.replace(' ', '')
                        real_pos = rule.find('REAL')
                        rule_str = rule[:real_pos]
                        Model.rules.append(Rule(rule_str,INPUT_RULE));

                for n in output_names:
                    if len(n) > 0:
                        rule = n.replace(' ', '')
                        real_pos = rule.find('REAL')
                        rule_str = rule[:real_pos]
                        Model.rules.append(Rule(rule_str,OUTPUT_RULE));
                self.ShowRuleEngine()
            self.Canvas.ZoomToBB()

        def ShowRuleEngine(self, event=None):#, isRun=False):
            print 'ShowRuleEngine() isRun', Model.isRun
            wx.GetApp().Yield(True)

            self.UnBindAllMouseEvents()
            Canvas = self.Canvas
            Canvas.InitAll()

            w, h = WIDTH, HEIGHT
            dx = DX
            dy = DY
            x, y = X_START, Y_START
            FontSize = FONT_SIZE

            if self.filename != None:
                self.Log('Opened rule engine: ' + self.filename + "\n")
                #print Model.rules
                input_rules_count = 0;
                for n in Model.rules:
                    str = n.name
                    ##print 'str:',str,';'
                    if len(str) > 0 and n.type == INPUT_RULE:
                        #print 'n: ', n
                        rule_str = n.name.replace('_',' ')
                        x = X_START
                        y += dy
                        color = "RED"
                        R = Canvas.AddRectangle((x, y), (w, h), LineWidth = 2, FillColor = color)
                        L1 = Canvas.AddLine(( (x-dx, y+h/2), (x, y+h/2) ), LineWidth = LINE_WIDTH, LineColor = "Green") # line before rule
                        L2 = Canvas.AddLine(( (x+w, y+h/2), (x+w+dx*2, y+h/2) ), LineWidth = LINE_WIDTH, LineColor = "Green") # line after rule
                        R.Name = rule_str
                        R.Bind(FloatCanvas.EVT_FC_RIGHT_DOWN, self.RectGotHitRight)
                        R.Bind(FloatCanvas.EVT_FC_LEFT_DOWN, self.RectGotHitLeft)
                        #Canvas.AddText("L and R Click", (x, y), Size = FontSize, Position = "bl")
                        Canvas.AddText(rule_str, (x, y+h), Size = FontSize, Position = "tl")
                        if Model.isRun == True:
                            #print 'isRun', Model.isRun
                            inputValues = Model.exp_values[0].split(';')
                            inputValue = inputValues[input_rules_count]
                            Canvas.AddText(inputValue, (x-dx, y+h/2+10), Size = FontSize, Position = "tl", Color = "White")
                        input_rules_count = input_rules_count+1;

                L3 = Canvas.AddLine(( (x+w+dx*2, y+h/2), (x+w+dx*2, Y_START+dy+h/2) ), LineWidth = LINE_WIDTH, LineColor = "Green") # vertical line
                # arrow before output rule
                L4 = Canvas.AddLine(( (x+w+dx*2,(y+h+dy+Y_START)/2), (x+2*w, (y+h+dy+Y_START)/2) ), LineWidth = LINE_WIDTH, LineColor = "Green") # line after rule
                #print 'y: ', y
                for n in Model.rules:
                    str = n.name
                    if len(str) > 0 and n.type == OUTPUT_RULE:
                        #print 'n: ', n
                        rule_str = n.name.replace('_',' ')
                        x = 2*w
                        y = HEIGHT+dy*(input_rules_count+1)/2
                        color = "CYAN"
                        #print 'y2: ', y
                        R = Canvas.AddRectangle((x, y), (w, h), LineWidth = 2, FillColor = color)
                        R.Name = rule_str
                        R.Bind(FloatCanvas.EVT_FC_RIGHT_DOWN, self.RectGotHitRight)
                        R.Bind(FloatCanvas.EVT_FC_LEFT_DOWN, self.RectGotHitLeft)
                        Canvas.AddText(rule_str, (x, y+h), Size = FontSize, Position = "tl")
                        if Model.isRun == True:
                            outputValue = Model.outputs[0]
                            print 'outputValue', outputValue
                            res = repr(outputValue)
                            Canvas.AddText(res, (x+w+2*dx-10, y+h/2+10), Size = FontSize, Position = "tl", Color = "White")
                # arrow after output rule
                Canvas.AddArrow((x+w,y+h/2),Length = 2*dx, Direction = 90,LineWidth = LINE_WIDTH, LineColor = "Green",  ArrowHeadAngle = 50)
            self.Canvas.ZoomToBB()
            Model.isRun = False

        def RectMoveLeft(self,Object):
            self.MoveRects("left")

        def RectMoveRight(self,Object):
            self.MoveRects("right")

        def RectMoveUp(self,Object):
            self.MoveRects("up")

        def RectMoveDown(self,Object):
            self.MoveRects("down")

        def MoveRects(self, Dir):
            for Object in self.MovingRects:
                X,Y = Object.XY
                if Dir == "left": X -= 10
                elif Dir == "right": X += 10
                elif Dir == "up": Y += 10
                elif Dir == "down": Y -= 10
                Object.SetPoint((X,Y))
            self.Canvas.Draw()

        def PointSetGotHit(self, Object):
            self.Log(Object.Name + " Got Hit\n")

        def RectGotHit(self, Object):
            self.Log(Object.Name + " Got Hit\n")

        def RectGotHitRight(self, Object):
            self.Log(Object.Name + " Got Hit With Right\n")

        def RectGotHitLeft(self, Object):
            self.Log(Object.Name + " Got Hit with Left\n")

            dlg = RuleEditDialog(self, -1, Object.Name)
            dlg.SetTitle(Object.Name)
            if dlg.ShowModal() == wx.ID_OK:
                rowsCount = len(dlg.ranges)
                print 'ok: ', rowsCount
                #origTerms = range(rowsCount)
                termIdx = 0
                for term in Model.terms:
                    if term.rule == Object.Name.replace(' ', '_'):
                        #origTerms[termIdx] = term.name
                        curTerm = dlg.terms[termIdx].GetValue()
                        if term.name != curTerm:
                            term.name = curTerm
                        termIdx = termIdx + 1

                for row in range(rowsCount):
                    termText = dlg.terms[row].GetValue()
                    removeFlag = dlg.removeFlags[row].GetValue()
                    positiveFlag = dlg.positiveFlags[row].GetValue()
                    print 'removeFlag: ', removeFlag
                    print 'positiveFlag: ', positiveFlag
                    if removeFlag == True:
                        resTerm = None
                        for term in Model.terms:
                            if term.rule == Object.Name.replace(' ', '_') and termText == term.name:
                                resTerm = term
                                break
                        if resTerm is not None:
                            Model.terms.remove(resTerm)
                    else:
                        range1 = dlg.ranges[0][0].GetValue()
                        self.Log('range00: ' + range1)

                        d = []
                        if (len(dlg.ranges[row]) > 1):
                            for field in dlg.ranges[row]:
                                print 'field: ', field.GetValue()
                                d.extend([field.GetValue()])
                        else:
                            d.extend([dlg.ranges[row][0], None])

                        print 'd: ', d
                        for term in Model.terms:
                            if term.rule == Object.Name.replace(' ', '_') and termText == term.name:
                                term.range_dict = d
            dlg.Destroy()

        def RectMouseOver(self, Object):
            self.Log("Mouse entered: " +  Object.Name)

        def RectMouseLeave(self, Object):
            self.Log("Mouse left " +  Object.Name)

        def binding2(self, event):
            self.Log("I'm the TextBox")

        def SelectPointHit(self, Point):
            self.Log("Point Num: %i Hit"%Point.VerticeNum)
            self.SelectedPoint = Point

        def OnCmdButton(self,event):
            self.Log("Click on button with Id %d\n" %event.GetId())
            if event.GetId() == ADD_RULE_ID:
                dlg = wx.TextEntryDialog(
                    self, 'Rule name',
                    'Add Rule', 'Python')

                dlg.SetValue("New rule")

                if dlg.ShowModal() == wx.ID_OK:
                    self.Log('You entered: %s\n' % dlg.GetValue())
                    Model.rules.append(Rule(dlg.GetValue(),INPUT_RULE));
                    for i in range(TERM_NUMBER):
                        d = ['0'] * RANGE_NUMBER
                        ruleName = dlg.GetValue().replace(" ", "_")
                        print 'empty terms: ', d, ' for rule: ', ruleName
                        Model.terms.append(Term(ruleName, 'Term' + str(i), d))

                dlg.Destroy()
                self.ShowRuleEngine()

            elif event.GetId() == REMOVE_RULE_ID:
                lst = []
                for n in Model.rules:
                    if len(n.name) > 0 and n.type == INPUT_RULE:
                        lst.append(n.name)

                dlg = wx.MultiChoiceDialog( self,
                                           "Select rules to delete from\nthis list",
                                           "wx.MultiChoiceDialog", lst)

                if (dlg.ShowModal() == wx.ID_OK):
                    selections = dlg.GetSelections()
                    strings = [lst[x] for x in selections]
                    self.Log("Selections: %s -> %s\n" % (selections, strings))
                    for n in Model.rules:
                        if n.name in strings:
                            Model.rules.remove(n)

                dlg.Destroy()
                self.ShowRuleEngine()

            elif event.GetId() == EXPORT_ID:
                dlg = wx.FileDialog(self, "Choose an FCL import file for rule engine", "", "import.fcl", "*.fcl", wx.OPEN)
                if dlg.ShowModal() == wx.ID_OK:
                    self.path = dlg.GetPath()
                    self.Log("selected import path: " + dlg.GetPath())

                f = open(dlg.GetPath(),'w')
                f.write('FUNCTION_BLOCK fb\n') # name is important for standard and pyfuzzy
                f.write('\n')

                f.write('VAR_INPUT\n')
                for i in Model.inputs:
                    f.write('\t' + i.name + ': REAL; (* RANGE(' + i.min_range + ' .. ' + i.max_range + ') *)\n')
                f.write('END_VAR\n\n')

                f.write('VAR_OUTPUT\n')
                for i in Model.outputs:
                    f.write('\t' + i.name + ': REAL; (* RANGE(' + i.min_range + ' .. ' + i.max_range + ') *)\n')
                f.write('END_VAR\n\n')

                outputFileName = ''
                for n in Model.rules:
                    if len(n.name) > 0 and n.type == OUTPUT_RULE:
                        outputFileName = n.name
                        break

                positiveDecisionTerm = ''
                negativeDecisionTerm = ''
                for n in Model.rules:
                    if len(n.name) > 0 and n.type == INPUT_RULE:
                        f.write('\n')
                        f.write('FUZZIFY\t' + n.name + '\n')
                        print 'fuzzify', n.name
                        for term in Model.terms:
                            if term.rule == n.name.replace(' ', '_'):
                                f.write('\tTERM\t' + term.name + '\t:=\t')
##                                print 'output file name', outputFileName, 'term rule', term.rule, 'term.name', term.name
                                if len(term.range_dict) > 2:
                                    res = ''
                                    for number, val in enumerate(term.range_dict):
                                        if number % 2 != 0:
                                            res = res + ', ' + val + ') '
                                        else:
                                            res = res + '(' +  val
                                    f.write(res + ' ;\n')
                                else:
                                    f.write(term.range_dict[0] + ' ;\n')
                        f.write('END_FUZZIFY\n')

                for n in Model.rules:
                    if len(n.name) > 0 and n.type == OUTPUT_RULE:
                        f.write('\n')
                        f.write('DEFUZZIFY\t' + n.name + '\n')
                        print 'defuzzify', n.name
                        for term in Model.terms:
                            if term.rule == n.name.replace(' ', '_'):
                                f.write('\tTERM\t' + term.name + '\t:=\t')
                                print 'output file name', outputFileName, 'term rule', term.rule, 'term.name', term.name
                                if outputFileName == term.rule and 'Not' not in term.name:
                                    positiveDecisionTerm = term.name
                                if outputFileName == term.rule and 'Not' in term.name:
                                    negativeDecisionTerm = term.name
                                if len(term.range_dict) > 2:
                                    res = ''
                                    for number, val in enumerate(term.range_dict):
                                        if number % 2 != 0:
                                            res = res + ', ' + val + ') '
                                        else:
                                            res = res + '(' +  val
                                    f.write(res + ' ;\n')
                                else:
                                    f.write(term.range_dict[0] + ' ;\n')
                        f.write('\tACCU : MAX;\n')
                        f.write('\tMETHOD : COGS;\n')
                        f.write('\tDEFAULT := 0;\n')
                        f.write('END_DEFUZZIFY\n')
                        f.write('\n')

                print 'export decisions size: ', len(Model.decisions)
                decisions = []
                curDecisionStr = ''
                for decision in Model.decisions:
                    print len(decision.condition)
                    for curCondition in decision.condition:
                        print 'condition: ', curCondition
                        curDecisionStr = curDecisionStr + curCondition[0] + ' IS ' + curCondition[1] + ' AND '

                f.write('RULEBLOCK first\n')
                f.write('\n')
                f.write('AND : MIN;\n')

                termList = range(len(Model.terms))
                for i, term in enumerate(Model.terms):
                    termList[i] = term.name
                import itertools
                allterms = []
                for n in Model.rules:
                    if len(n.name) > 0 and n.type == INPUT_RULE:
                        ruleterms = []
                        for term in Model.terms:
                            if term.rule == n.name.replace(' ', '_'):
                                ruleterms.append(term.rule + ' IS ' + term.name)
                        allterms.append(ruleterms)
                print 'dec', positiveDecisionTerm, negativeDecisionTerm
                for idx, element in enumerate(itertools.product(*allterms)):
                    ruleStr = 'RULE ' + str(idx) + ': IF ' + str(element)[1:-1].replace(',', ' AND').replace('\'','') + ' THEN ' + outputFileName
                    ###print 'ruleStr', ruleStr, 'curDecisionStr', curDecisionStr[:-4]
                    if curDecisionStr[:-4] in ruleStr:
                        ###print 'positiveDecisionTerm'
                        ruleStr = ruleStr + ' IS ' + positiveDecisionTerm + ';\n'
                    else:
                        ruleStr = ruleStr + ' IS ' + negativeDecisionTerm + ';\n'
                    f.write(ruleStr)
                f.write('END_RULEBLOCK\n')
                f.write('END_FUNCTION_BLOCK\n')
                f.close()

                dlg.Destroy()
                self.ShowRuleEngine()

            elif event.GetId() == RUN_ID:
                print 'headers', Model.headers
                print 'experiment values', Model.exp_values
                import fuzzy.storage.fcl.Reader
                system = fuzzy.storage.fcl.Reader.Reader().load_from_file(self.filename)
                # preallocate input and output values
                values = Model.exp_values[0].split(';')
                my_input = {}
                my_output = {}
                for idx, header in enumerate(Model.headers):
                    if len(header) > 0:
                        my_input[header] = int(values[idx])
                print 'my_input', my_input
                for n in Model.rules:
                    if len(n.name) > 0 and n.type == OUTPUT_RULE:
                        print 'rule name', n.name, 'n.type', n.type
                        my_output[n.name] = 0
                print 'my_output', my_output

                # calculate
                system.calculate(my_input, my_output)

                # now use outputs
                print my_output
                Model.outputs = []
                Model.outputs.extend(my_output.values())
                Model.isRun = True
                self.ShowRuleEngine()#True)

            if event.GetId() == ID_PLOT:
                self.showPlot("Plot")
                dlg.Destroy()
                self.ShowRuleEngine()

    return DrawFrame

#---------------------------------------------------------------------------

if __name__ == "__main__":

    import wx

    # check options:
    import sys, getopt
    optlist, args = getopt.getopt(sys.argv[1:],'l',["all",
                                                    "hit",
                                                    "hitf",
                                                    "hide"])

    if not haveNumpy:
        raise ImportError(errorText)
    StartUpDemo = "hit" # the default
    if optlist:
        StartUpDemo = optlist[0][0][2:]

    class DemoApp(wx.App):
        """
        How the tool works:

        Under the Draw menu, there are three options:

        *Clear: Clears the Canvas.

        """

        def __init__(self, *args, **kwargs):
            wx.App.__init__(self, *args, **kwargs)

        def OnInit(self):
            wx.InitAllImageHandlers()
            DrawFrame = BuildDrawFrame()
            frame = DrawFrame(None, -1, "Expert System Tool",wx.DefaultPosition,(900,700))

            self.SetTopWindow(frame)
            frame.Show()

            if StartUpDemo == "text":
                frame.TestText()
            elif StartUpDemo == "bitmap":
                frame.TestBitmap()
            elif StartUpDemo == "hit":
                frame.ReadRuleEngine()
            elif StartUpDemo == "hide":
                frame.HideTest()

            return True

    app = DemoApp(False)# put in True if you want output to go to it's own window.
    app.MainLoop()

else:
    # It's not running stand-alone, set up for wxPython demo.
    # don't  neeed wxversion here.
    import wx
    if not haveNumpy:
        ## TestPanel and runTest used for integration into wxPython Demo
        class TestPanel(wx.Panel):
            def __init__(self, parent, log):
                self.log = log
                wx.Panel.__init__(self, parent, -1)

                from wx.lib.floatcanvas.ScreenShot import getScreenShotBitmap

                note1 = wx.StaticText(self, -1, errorText)
                note2 = wx.StaticText(self, -1, "This is what the Expert System Tool can look like:")
                S = wx.BoxSizer(wx.VERTICAL)
                S.Add((10, 10), 1)
                S.Add(note1, 0, wx.ALIGN_CENTER)
                S.Add(note2, 0, wx.ALIGN_CENTER | wx.BOTTOM, 4)
                S.Add(wx.StaticBitmap(self,-1,getScreenShotBitmap()),0,wx.ALIGN_CENTER)
                S.Add((10, 10), 1)
                self.SetSizer(S)
                self.Layout()

    else:
        ## TestPanel and runTest used for integration into wxPython Demo
        class TestPanel(wx.Panel):
            def __init__(self, parent, log):
                self.log = log
                wx.Panel.__init__(self, parent, -1)
                note1 = wx.StaticText(self, -1, "The Expert System Tool needs")
                note2 = wx.StaticText(self, -1, "a separate frame")
                b = wx.Button(self, -1, "Open Demo Frame Now")
                b.Bind(wx.EVT_BUTTON, self.OnButton)

                S = wx.BoxSizer(wx.VERTICAL)
                S.Add((10, 10), 1)
                S.Add(note1, 0, wx.ALIGN_CENTER)
                S.Add(note2, 0, wx.ALIGN_CENTER | wx.BOTTOM, 5)
                S.Add(b, 0, wx.ALIGN_CENTER | wx.ALL, 5)
                S.Add((10, 10), 1)
                self.SetSizer(S)
                self.Layout()

            def OnButton(self, evt):
                DrawFrame = BuildDrawFrame()
                frame = DrawFrame(None, -1, "Expert System Tool",wx.DefaultPosition,(500,500))

                frame.Show()
                frame.ReadRuleEngine()

    def runTest(frame, nb, log):
        win = TestPanel(nb, log)
        return win

    # import to get the doc
    from wx.lib import floatcanvas
    overview = floatcanvas.__doc__


When students from Armand Larive Middle School attended a Culinary Workshop in Umatilla, hosted by Oregon Department of Education and the Oregon Dairy and Nutrition Council, they saw their school nutrition professionals in action. This post debuts a great new video they created to share their experience.
The Culinary Workshop is one of six regional workshops offered to school nutrition professionals throughout Oregon to help improve child nutrition programs. "I want to make sure we have a variety of foods represented, because these folks help make the menus for schools," said Chef and Registered Dietitian Garrett Berdan.
Many of the recipes used for this workshop are from Food Hero (www.foodhero.org) , an online resource with shopping hints, cooking tips and videos, to help Oregonians improve their health with affordable and healthy recipes.
While attending the workshop, Armand Larive Middle School students interviewed, taste-tested and even gave their feedback on the finished recipes to re-cap the day. This is one of many video projects they have done with video equipment provided through a Fuel Up to Play 60 Grant.
Fuel Up to Play 60 is a school nutrition and exercise program launched by the National Dairy Council and the NFL to improve health and encourage today's youth to live healthier lives. Grants are available to qualified K-12 schools to jump start healthy changes in the school environment.
Try this delicious, hearty chili on a cold, wintery day or any day.
For a simple dessert or snack later on, choose fruit.
Heat oil in a large saucepan. Sauté chicken, onion and garlic powder until chicken is no longer pink inside.
Add the beans, broth, chilies, and seasonings.
Bring to a boil. Reduce heat. Simmer uncovered for 30 minutes.
Remove from the heat. Stir in sour cream and milk.
Fuel Up to Play 60 grant funding provided by local dairy farmers is making a difference in Oregon schools.
Armand Larive Middle School in Hermiston received a grant of $3,555 to purchase a computer, accessories and software for video production. The new computer equipment enables students to make Food Hero time lapse recipe videos to help educate students on healthy recipes.
For the application, the school teamed with Angie Treadwell, Family and Community Health Umatilla-Morrow SNAP-Ed Program Coordinator for Oregon State University Extension Center. "We are excited for the opportunity to help Armand Larive students gain additional experience in video production while educating and promoting healthy behaviors among their peers and perhaps, the community at large," said Treadwell.
Additionally, with the new computer equipment purchased, students were able to compete at the Student Television Network Conference in Anaheim, California in March. Under the category of Middle School Anchor Team, Armand Larive took 2nd honorable mention.
At a special school assembly in April, the Food Hero videos were shown to the student body while they enjoyed tasting the ever-popular"Popeye Power Smoothie." All of the videos created by the students are now on www.FoodHero.org.
Fuel Up to Play 60 is an in-school nutrition and physical activity program launched by the National Dairy Council and NFL, in collaboration with the USDA, to help encourage today's youth to lead healthier lives. To learn more about the grant visit www.fueluptoplay60.com.
Sponsored by the Oregon Dairy and Nutrition Council and the Oregon Department of Education, Child Nutrition Programs, a new series of five popular culinary training events are underway to help improve school cafeteria menus for Oregon students.
For the past seven years, Chef Garrett Berdan, RDN, has been coaching child nutrition program professionals at regional trainings on cooking innovative, healthy meals using nutrient-rich, local foods. At the training events, participants prepare and taste test 15 actual recipes they can bring back to their students.
The preparation of healthy meals for students emphasizes nutrient-rich foods, because studies show that well-nourished kids perform better at school. Participants practice menu planning, weights and measures, knife skills and other culinary techniques.
This year's series includes stops in Klamath Falls, Ontario, Lincoln City, Central Point and Aurora, Oregon. Trainings were held last year in Albany, Hermiston, McMinnville, Central Point, Salem and La Grande. Schools and childcare programs in each region are invited to participate in the two day training free of charge.
As part of an ongoing commitment to youth wellness and education, Oregon's 228 dairy farm families and 29 dairy processors are involved with schools across the state, supporting programs such as this training.
Schools across Oregon have innovative projects underway focused on youth engagement, nutrition and physical activity, thanks to Fuel Up to Play 60 grants funded by Oregon dairy farmers. Fuel Up to Play 60 is the largest in-school health and wellness program in the country.
The Oregon Dairy and Nutrition Council, in partnership with the National Football League, U.S. Department of Agriculture and the National Dairy Council, awarded grants to eight schools throughout the state last fall.
With grant funding, schools are purchasing blenders for yogurt smoothie classroom celebrations and carts for grab-and-go breakfast options. Brand new pans and salad bar inserts will be featuring fruits and vegetables from school gardens in cafeterias. Noise cancelling blankets are going up in one cafeteria to reduce noise and bring Smarter Lunch Room concepts to students. One school is using funding to create time lapse videos featuring Food Hero recipes highlighting whole grains, fruit and low fat dairy.
Physical activity goes hand in hand with nutrition for Oregon students. Students will be energized and ready to focus on learning throughout the day by participating in brain breaks in class. Students will be stretching out in yoga poses, checking their heart rates with monitors and counting steps with pedometers.


I don't know about you, but I can never get enough advice on growing great tomatoes. Over the years, we've put a number of articles on our website and in our newsletters. You can click here and here to read them.
Recently we came across this cornucopia of advice and tips from Mother Earth News. Yes, it's a US site and you will have to search for those tips that apply to the Pacific Northwest, but it's so full of useful information that we wanted to share it with all the tomato lovers out there.


9 out of 10 based on 851 ratings. 3,072 user reviews.
Integrated Physics and Chemistry. Physics. Science 300. Science 400. Science 500. Odysseyware Answers - Home odysseywareanswersly Odysseyware Answers: Home; GEt the odysseyware answer pack! Are you having odysseyware answer key biology 2 is universally compatible with any devices to read.
Learn integrated physics and chemistry matter with free interactive flashcards. Choose from 500 different sets of integrated physics and chemistry matter flashcards on Quizlet.


Apovlakocic. By ANORIMOI. • 11 songs. Play on Spotify. 1. To Megethos Apovlakocic/xristos Kai Antixristos. Club Da How. Apovlakocic, a Metal album by Anorimoi on ReverbNation. 13 Jun Listen to songs from the album Apovlakocic, including "To Megethos Metraei", " Stixiomeno Psygeio", "Tasi Aftokatastrofis" and many more.
Stream "Apovlakocic" by Anorimoi - powered by DistroKid. Το υπεραριστούργημα που κυκλοφορήσαμε το Δεν θα χάσετε. Θα τα χάσετε. Καλο;. ΕΙΔΙΚΟ e-shop για το Αποβλάκωcιc: grassrootsalute.com All the lyrics and translations to the album Apovlakocic by Anorimoi. Watch the video, get the download or listen to Anorimoi – Prionokordela for free. Prionokordela appears on the album Apovlakocic. Discover more music, gig. Project Details. Artist ANORIMOI Album Apovlakocic Date September 6, Genre Metal/Punk Rock · Visit Artist Page.
Unlimited free Anorimoi music - Click to play To Megethos Metraei and whatever else you want! Anorimoi Radio. Custom Mix Buy "Apovlakocic" CD. Kings of Feta. Explicit. Anorimoi March 26, Metal Afigisi (Anorimoi Live). 1. $ 9. Kings of Feta. Apovlakocic · Anorimoi. 1. $ 1. $ Video Streaming Anorimoi Making Apovlakocic Episode 3 and enjoy the full of Anorimoi Making Apovlakocic Episode 3. Collections about Anorimoi Making. This is a guitar playthrough video for the anorimoi song " porque tasia", which is included in our latest record apovlakocic. Anorimoi I Xontri Me Goustarei.


TERRE HAUTE, IND. -- The 26th-ranked Furman men's cross country team placed fourth and the Paladin women finished 24th at the Indiana State Pre-National Invitational Saturday in Terre Haute, Ind.
Forty-six men's teams and 43 women's teams, including eight men's teams and six women's teams ranked among the nation's top 30, competed in the Blue Race. Each team in the races held a regional ranking entering Saturday's competition.
"Today was definitely a big day for our program," said Paladin head coach Robert Gary. "When we first started at Furman, we asked a group of recruits to share our vision of building a national distance powerhouse program here. Watching our team leading at the 2k mark against the #1 and #2 ranked teams in the country is one of the snapshots that everyone envisions."
Top-ranked Colorado won the men's 8K meet with 38 points, and second-ranked Oregon finished second with 88 points. Georgetown placed third with 143 points, followed by the Paladins with 257 points.
Senior Tripp Hurt paced the Paladins, finishing 41st with a time of 24:56.8, while freshman Aaron Templeton was just behind Hurt, placing 43rd at 24:57.8. Rookie Mark Hadley turned in a time of 25:04.7 for 50th place, and sophomore Tanner Hinkle was 63rd with a time of 25:13.6. Rookie Frank Lara finished just behind Hinkle, placing 65th at 25:13.8, and just ahead of sophomore Troy Reeder who crossed the line in 25:15.2 to place 68th. Freshman Austin Sprague completed the Furman slate with a time of 25:55.7 for 169th place.
Fourth-ranked Georgetown claimed the women's 6K title with 110 points over No. 3 Oregon, who placed second with 139 points. Top-ranked Michigan finished third with 143 points, and No. 7 Colorado took fourth place with 186 points. The Paladin women scored 633 points for 24th place.
"Today's race marked the first time at this meet for our women's program, and it's an extremely unique and competitive environment," said Gary. "The women's team should take comfort in and be excited by the fact the men were 30th at this meet last year and developed to fourth this season."
Sophomore Allie Buchalski led the Paladin women, turning in a time of 21:42.9 for 60th place, and senior Sinead Haughey finished 65th at 21:45.4. Sophomore Grace Tinkey placed 117th with a time of 22:12.8, while fellow sophomore Laura Miller crossed the line in 22:35.6 for 180th place. Sophomore Julia Rodriguez placed 211th with a time of 22:49.9, followed immediately by freshman Emma Mashburn in 212th place (22:50.8). Sophomore Bryce Seymour finished 220th with a time of 22:56.3.
Following an off weekend next weekend, the Paladins will compete at the Southern Conference Championships on Oct. 31 in Greensboro, N.C.
"Championship season has now started, and we are very excited to defend our SoCon title and attempting to qualify for the NCAA Championships for the first time in school history," added Gary.


If you have been charged with an offence of failing to stop, under the Police Powers and Responsibilities Act section 754 (2) Fail to Stop Motor Vehicle, or given a notice under s 755 of the PPRA to identify the driver, you may have a good defence if you can establish on the balance of probabilities that you were not the driver.We recently resolved a case where the Police in Maroochydore charged someone regardless of the fact that the person had provided strong evidence that she was not the driver, and was not in control of the car at the time – in fact she had an alibi. In that case, she did not have control of all of the keys for the vehicle, and was not aware who was driving the vehicle, it being kept at a different address. She told the police this at the earliest opportunity, and was nevertheless given a s 755 PPRA notice. No doubt this was designed to place pressure on her, but when she in fact could not say who was driving, and the police strongly suspected another to be the driver, this tactic was wrong in law.Although she was given a notice under s 755 of the PPRA, this should only be done in circumstances where it "appears to the police officer" that giving the owner of the motor vehicle a notice under that section may help the investigation. Notwithstanding that our client could not identify the driver of the vehicle, she has provided sufficient information for the Police to identify that person. She had confirmed the police suspicion that, care and control of the vehicle was with another. However, not even being present at the time, it was wrong to expect her to be able to know for sure that that person was driving, as she had no physical sight of the vehicle.The arresting officer could have had no reasonable suspicion that she was driving, and it was clear from the conduct of the matter that the police suspected that another person was driving.What Further Declaration is Required? It is difficult to see what further information the police officer expected our client to declare, in order to have escape being charged. Of course, putting any person before the Courts is a very serious thing, which we often see happen far too readily, forcing the lawyers to make submissions, and the Prosecutors to exercise their judgement to discontinue. In this case, any further declaration beyond what she had told the police already would have been tantamount to stating information outside of her knowledge, and would have been mere speculation.In this case, the Prosecutor in Maroochydore accepted that submission, but unfortunately, not until the matter had been set down for a trial thus causing our client to incur expense, and also wasting the Court's time.


Josua at the programming and Distortiongirl as live keyboardist.
They were formed in 1992 out of Malaga, Southern Spain, evolving a sound, along the lines of Electronic Body Music with distorted voices, crossing with an Electro feel and some driving rhythms, as well as melodic synths and meaningful lyrics.
After they signed with Out of Line in 1999 they have supported the Mexican band Hocico on their Tierra Electrica '99 Tour, played in mayor festivals as WGT, M'era Luna, Infest & Eurorock, performing gigs in USA, Mexico and Canada, and included on dozens of songs in different compilations.
Their EP "DNA Slaves" reached number 10 in the DAC charts (German alternative charts), and their second album, Revenge, contains hits that have been spun all over the world, becoming an Alternative club classic.
The band has released in June 2005 a new album called Reborn, which has received excellent reviews from the press and also reached position 3 at the DAC charts.
The 2010 album 'Spirit' represents the perfect mix between hard melodies, club oriented rhythms, and dark lyrics.
There is more in their work apart from danceable tracks that have made this band popular. Its heavy beats, catchy choruses, real life topics, and vital attitude make them a band that represents the present of underground Electropop.
This page was last modified on 17 June 2016, at 03:44.


text:
How Big Data Enabled Spotify To Change The Music Industry
Dr Mark van Rijmenam / 2 min read.
floq.to/i6BPc
The commercial music streaming service Spotify was launched in 2008 and since then is has registered over 24 million active users of which 6 million are paying users. The have 3.7 million Facebook fans. It has over 20 million songs online and every day 20.000 new songs are added to the database. Users created over 1 billion playlists and over $ 500 million has been paid out to rights holders since the launch of Spotify. It may be clear that without big data techniques and tools used, Spotify would not be able to exist.
Spotify is a data-driven company, meaning that data is used in almost any part of the organisation. The numbers confirm this: Spotify users create 600 Gigabyte of data per day and 150 Gigabyte of data per day via different services. Every day 4 Terabyte of data is generated in Hadoop, a 700-node cluster running over 2.000 jobs per day. They currently have 28 Petabytes of storage, spread out over 4 data centres across the world.
They also developed a workflow manager, Luigi, which they open sourced. Luigi is a Python framework for data flow definition and execution. Luigi is used to crunch a lot of data. Most of the data is user-centric data, such as billions of log messages that allows Spotify to provide music recommendations or select for example the next song heard on the radio. The data however is also used in decision-making, providing forecasting information and business analytics. According to the Jason Palmer from Spotify Labs, data is part of their culture.
Just recently, Spotify updated its discovery page to a Pinterest-like design. This feature uses a lot of data to create the recommendations for the user. Data such as user profiles, which music played and playlists made and other historical data are used for this feature. With millions of users, a user does not have to have a large playlist or extensive profile to receive qualitative recommendations.
Spotify uses all that data also for other, fun and interesting, facts. In the beginning of 2013, Spotify used streaming data to predict the Grammy Awards winners. Spotify did this by breaking down its users' listening habit, taking into account song and album streaming, to determine the popularity of the music. In the end, 4 out of the 6 predictions made by Spotify turned out correctly.
Without big data, Spotify would not have turned out the way it did. With an ever-growing presence in many countries and a growing listeners base only more data will be created in the coming years. More data will mean better recommendations, better predictions, more users and thus more payouts to the rights holders. Big data truly enabled Spotify to change the music industry.
Image: Courtesy of Spotify
Tags: algorithms, analytics, big, Data, forecast, Hadoop, organisation, predictive, recommendation, strategy
About Dr Mark van Rijmenam
Dr Mark van Rijmenam is The Digital Speaker and available for (virtual) keynotes in-person, as an avatar or as a hologram.
He is the Founder of Datafloq and Mavin. Van Rijmenam is the author of the three best-selling management books, including The Organisation of Tomorrow, which discusses how AI, blockchain and analytics turn your business into a data organisation. He holds PhD in management from the University of Technology Sydney on how organizations should deal with Big Data, Blockchain and (Responsible) AI and he is the publisher of the 'f(x) = ex' newsletter read by thousands of executives.
January 15, 2022 By Javeria Gauhar
Big Data Testing – How to Improve Productivity and Increase Test Coverage
January 11, 2022 By Hemanth Kumar
How to Use Data Lakes to Improve Data Visualization
January 6, 2022 By Ayodele Johnson
Data Engineer / Senior Data Engineer (Java / Big Data) – Home Based | UK, GB - January 07, 2022
Investment Data Manager – Market Data – Data Sourcing – Fund management | Charing Cross, GB - January 07, 2022
Senior Data Engineer, FinTech – Big Data Insurance | Selhurst, GB - January 06, 2022

redpajama_set_name: RedPajamaCommonCrawl


text:
Edmond Baudoin (1942) – disegnatore, illustratore e sceneggiatore di fumetti francese
 Jan Niecislaw Baudoin de Courtenay (1845-1929) – linguista polacco
 Jean Baudoin (1590-1650) – traduttore e scrittore francese
 Jean-Baptiste Baudoin (1831-1875) – sacerdote e missionario cattolico francese
 L. Baudoin (... – ...) – nuotatore francese

Pagine correlate
 Baudouin

redpajama_set_name: RedPajamaWikipedia


text:
Q: Toggle form in nested v-for loop in VueJS I have a list of nested comments. Under each comment, I'd like to add a "reply" button that, when click, show a reply form.
For now, everytime I click a "reply" button, it shows the form. But the thing is, I'd like to show only one form on the whole page. So basically, when I click on "reply" it should close the other form alreay opened and open a new one under the right comment.
Edit :
So I was able to make some slight progress. Now I'm able to only have one active form opening on each level of depth in the nested loop. Obviously, what I'm trying to do now is to only have one at all.
What I did was emitting an event from the child component and handle everything in the parent component. The thing is, it would work great in a non-nested comment list but not so much in my case...
Here is the new code:
In the parentComponent, I have a handleSelected method as such:
handleSelected (id) {
  if(this.selectedItem === id)
    this.selectedItem = null;
  else
    this.selectedItem = id;
},

And my childComponent:
<template>

{{ comment.author.name }}
{{ comment.created_at }}

{{ comment.content }}

            <button class="button" @click="toggle(comment.id)">Répondre</button>
            <button class="button" @click="remove(comment.id)">Supprimer</button>

                <form @submit.prevent="submit">

                        Votre réponse
                        <textarea class="form-control" name="comment" id="comment" rows="5" v-model="fields.comment"></textarea>

{{ errors.comment[0] }}

                    <button type="submit" class="btn btn-primary">Envoyer</button>

                        Votre réponse a bien été envoyée !

                </form>

                <comment v-for="comment in comments"
                    :key="comment.id"
                    :comment="comment" @remove-comment="remove"
                    :is-selected="selectedItem" @selected="handleSelected($event)">
                </comment>

</template>

Thanks in advance for your help!

redpajama_set_name: RedPajamaStackExchange


text:
Женский образ Германия — национальная персонификация, аллегорический символ ФРГ, особой популярностью пользовался в XIX веке.

Образ Германии появился ещё во время римских цезарей. На монетах Домициана она изображалась с надписью Germania capta («взятая в плен Германия») по случаю победы Рима над хаттами). В Средние века персонифицированная Германия стоит рядом с фигурами Roma, Gallia und Sclavinia в евангелиаре Оттона III.

В первой половине XIX века усилились стремления объединить раздробленную на множество мелких государств Германию в единое государство. Это стремление сопровождалось ростом национализма и нашло своё отражение во всех областях искусства и культуры.

Было создано множество памятников, изображающих Германию, самый известный из них — в парке Нидервальд под Рюдесхаймом.

Центральной фигурой и олицетворением Германии в клипе 2019 года Deutschland музыкальной группы Rammstein выступила темнокожая актриса Руби Комми. Видео вызвало неоднозначную реакцию слушателей и критиков.

Изображения
Аллегорическая Германия в большинстве случаев изображается воинственной и сильной женщиной, похожей на валькирию, некой девой-воительницей. Тем самым она становится персонификацией страны Германия и германского национализма. С ней часто изображаются имперские клейноды, чаще всего императорский меч и имперская корона.

См. также
 Саксония (аллегория)
 Беролина
 Германия на монетах Древнего Рима
Немецкий Михель — национальная персонификация Германии
Персонаж-талисман

Примечания

Ссылки

 «Германия». Картина Фридриха Августа Каульбаха

Государственные символы Германии
Национальные персонификации
Вымышленные женщины


text:
Egypt sponsors establishment of African academy for cochlear implants - Daily News Egypt
Egypt Egypt sponsors establishment of African academy for cochlear implants
Egypt sponsors establishment of African academy for cochlear implants
4,000 children need cochlear implants in Egypt annually, says Khalifa
Daily News Egypt October 8, 2019 Comments Off on Egypt sponsors establishment of African academy for cochlear implants
Egypt sponsors the establishment of an African academy for cochlear implants in developing countries under Egypt's presidency of the African Union, Fathy Abdel Baky, professor of ear, nose and throat surgery at the Faculty of Medicine, Alexandria University, announced.
This came during a Monday press conference to announce the launch of the 5th World Congress on Cochlear Implants in Emerging Nations, to be held in Egypt on 9-11 October.
The international conference is co-organised by the International Association of Cochlear Implants in Developing Countries and the Egyptian Society for Cochlear Implantation on, in the presence of 65 experts and speakers from 30 countries.
Abdel Baky explained that the establishment of the African Academy of Cochlear Implants in developing countries comes to build on the successful Egyptian experience in the field of cochlear implants under the auspices of President Abdel Fattah Al-Sisi, after the launch of the presidential initiative to detect the weakness and hearing loss of newborns and treat illnesses free of charge.
He noted that one of the recommendations to be concluded by the conference is to start taking legal procedures to enter the Group of 77 for emerging countries to work under the umbrella of the United Nations.
Adel Khalifa, Professor of Ear, Nose, and Throat Surgery at the Faculty of Medicine, University of Tanta, and Secretary of the Egyptian Society of Cochlear Implants, confirmed that about 466 million people worldwide suffer from hearing loss caused by disability, including 34 million children. A third of people with hearing loss is from developing countries, where three in every 1,000 newborns suffer this illness worldwide.
He pointed out that 4,000 Egyptians need implants per year, at a cost of EGP 200,000 per case, while the state managed to secure these implants at EGP 130,000 only.
Khalifa said that developing countries face many problems and challenges in this area of cochlear implants, which are economic problems; there are long waiting lists for cochlear implants, which pushes people to implant cochlea in only one ear per child.
Amira El Shennawy, professor of audiology and head of the cochlear implant unit at the Faculty of Medicine at Cairo University, explained that hearing disability is the fourth most common disability in the world and does not appear at the beginning of birth, but early detection contributes significantly to reducing them. She highlighted a few problems to identify the problem, such as the newborn not reacting to sounds, or answering to their names, nor show reflexes to ambient sounds by the age of 4-6 months.
Topics: African academy cochlear implants Egypt
More in Egypt
More in Daily News Egypt
Egypt Prosecutor General orders autopsy and investigation over Egyptian- US prisoner death
2.2 million citizens registered in 1st phase of health insurance system
Analysing DNA in soil could be an effective way of tracking animals
https://cdn1.dailynewsegypt.com/2019/10/08/egypt-sponsors-establishment-of-african-academy-for-cochlear-implants/
Family planning services benefited 234,838 women in nine governorates
MED-EL, WKO organise roundtable on education for cochlear implants users in Egypt
Parliament demands government to put end to waiting lists of patients waiting to undergo surgeries: committee secretary
About 7,000 Egyptian children need cochlear implant surgery annually: El Shazly
October 8, 2019 Breaking News


text:
NGO report
USA: More about politics than child protection: The death penalty for sex crimes against children
By Amnesty International, on 1 January 2006
See the document
On 8 June, the Governor of South Carolina signed a bill allowing the death penalty for a person convicted for a second time of sex crimes against children under the age of 11 and a day later, the Governor of Oklahoma signed a similar bill. Amnesty International urges all legislative, executive and judicial authorities in the United States to meet their human rights obligations by not permitting any expansion of the death penalty to non-lethal crimes such as sexual assault. The organization renews its call for a total moratorium on executions in the United States.
Document type NGO report
Themes list Most Serious Crimes,
Available languages ESTADOS UNIDOS DE AMÉRICA : Cuestión de política, más que de protección de menores : La pena de muerte por delitos sexuales cometidos contra menores de edad
World Day
19th World Day Against the Death Penalty – Women and the death penalty, an invisible reality
On 10 October 2021, the World Day will be dedicated to women who risk being sentenced to death, who have received a death sentence, who have been executed, and to those who have had their death sentences commuted, exonerated, or pardoned.
In 2007, the World Coalition made one of the most important decisions in its young history: to support the Resolution of the United Nations General Assembly for a moratorium on the use of the death penalty as a step towards universal abolition. A moratorium is temporary suspension of executions and, more rarely, of death sentences. […]


text:
Ad Options
2018 Planning Guide
Info For Agencies
Info for Small Business Owners
Info for Banks
Client Campaigns
Shelter Ad Saves A Life
May 9, 2018 /0 Comments/in News /by Samantha
In 2018, Counseling & Recovery Services of Oklahoma created a series of shelter ads through Transit Advertising, Inc. to promote their "Don't Suffer Alone" message.
The powerful advertisement displayed a dark silhouette of an individual sitting on the ground with their head lowered on a bright background. The phrase, "Don't Suffer Alone" was boldly displayed across the top of the ad with the call to action, "We can help" proceeded by contact information.
One day, Counseling & Recovery Services of Oklahoma received a phone call from a client that had experienced trauma and was planning to end his life. The man shared that he had packed his belongings and was planning to drive to the state of his birth where he would end his life.
On his way out of Tulsa, the man saw the "Don't Suffer Alone" bus shelter ad. Rather than proceeding with his plan, he decided to call the number on the advertisement and make an appointment as a last-ditch effort to find a reason to live. After his initial meeting, the man started a treatment plan and is on a path to recovery.
Tulsa bus shelter advertisements receive up to 16K views per day! Shelter ads are located on bus shelter coverings. Drivers, pedestrians and bus riders see these ads. Transit Advertising, Inc.'s team helped Counseling & Recovery Services of Oklahoma create a plan to maximize ad exposure given their budget. The counseling center also did a great job of choosing impactful imagery and language that propels those in need to act. Together, the powerful advertisement design and plan for maximum exposure ensured a person in need received life-saving assistance.
The bus shelter advertisement strategy was effective! Counseling & Recovery Services of Oklahoma's advertising strategy with Transit Advertising, Inc. helped to save a life.
https://transitadvertisinginc.com/wp-content/uploads/2018/05/Shelter-Ad-Saves-A-Life1-1.jpg 1500 3000 Samantha https://transitadvertisinginc.com/wp-content/uploads/2015/09/TAI-340x87-300x77.png Samantha2018-05-09 20:43:552018-05-09 20:53:24Shelter Ad Saves A Life
Transit Advertising, Inc. Takes Home Top Awards
March 12, 2016 /3 Comments/in News /by Samantha
Transit Advertising, Inc. received three awards from the Tulsa International Association of Business Communicators 2016 Bronze Quill Awards on March 3.
We were honored for our rebranding, website and social media efforts.
Transit Advertising, Inc. came under new ownership in July 2015 and the company found itself without a brand identity, website or social presence. Owner Ryan Myers put together a team to rebrand the company.
It was important to Ryan that Transit Advertising, Inc. was easy to find online and communicated what the company has to offer. Our team created a new logo, implemented consistent messaging and created a strong web presence in only six months.
Tulsa's IABC chapter launched the call for submissions in late 2015. Our team submitted three entrees for the company's rebranding and website launch, blog and social media, and website design. Each submission was honored with an Award of Excellence, the highest award offered by local IABC chapters.
IABC Bronze Quill Awards recognize outstanding employee communications, public relations, media relations, community relations, government affairs and marketing communication efforts. A panel of seasoned communications professionals judges each IABC Bronze Quill entry. Bronze Quill Award entries are scored using a seven-point global scale of excellence, also used in the Gold Quill Award and Silver Quill Award programs. Entries must receive a score of 5.75 or higher receive an Award of Excellence.
We are proud of our team and excited to share the benefits of transit adverting with the communities we serve.
See Our Ad Options
https://transitadvertisinginc.com/wp-content/uploads/2016/03/bronzequillcover.jpg 216 720 Samantha https://transitadvertisinginc.com/wp-content/uploads/2015/09/TAI-340x87-300x77.png Samantha2016-03-12 01:19:032017-01-09 15:42:19Transit Advertising, Inc. Takes Home Top Awards
Seeking Sitters Work Life Balance Tour 2016
March 8, 2016 /0 Comments/in News /by Samantha
In 2015, SeekingSitters husband and wife team, David and Adrienne Kallweit, designed the Work/Life Balance Tour. The goal is to travel across the nation visiting franchisee owners and tell the SeekingSitters story.
SeekingSitters was founded in 2004 in Tulsa, Oklahoma and franchised in 2006. SeekingSitters services hundreds of cities in 15 states. SeekingSitters is a nationally recognized babysitting service providing a reliable, convenient and trustworthy babysitting solution for families.
Adrienne worked with Transit Advertising, Inc.'s Art Director to design a wrap for the RV. The RV is the heart of the Work/Life Balance Tour and serves as a moving billboard that travels with them across the U.S. Utilizing SeekingSitters key messages, graphics, and the map of the United States, the final design was composed.
Our team of expert installers wrapped the RV and in January 2016, the Kallweit's were off on their tour of 28 locations in eight months.
The wrap on the RV is designed to capture attention on the road and while the family is stopped at tour destinations.
The Kallweit's use the RV as a base camp for SeekingSitter events.
Franchisee owners pin their location on the map on the side of the RV.
The full Work/Life Balance campaign includes three online contests for their target audience to engage with the brand.
Win a Franchise – Asking future franchisee owners to share their story on why they deserve to win a franchise. (WIN A PHOTO)
Win $500 in cash – Tweet a picture of the SEEKINGSITTERS RV and you in it with #SSWLB
Win a Balance Box – Show off your best balance pose and take a photo with the RV, tag 3 of your friends with #SSWLB. All shared photos are entered for a monthly drawing. (BALANCE PHOTO)
The SeekingSitters Work/Life Balance Tour is a great example of how advertising on a transit vehicle can be used as the nucleus to a strong campaign that utilizes events, word-of-mouth, and social media.
How could you tell your brand's story with Transit Advertising, Inc.?
https://transitadvertisinginc.com/wp-content/uploads/2016/03/SeekingSittersRVweb.jpg 481 1200 Samantha https://transitadvertisinginc.com/wp-content/uploads/2015/09/TAI-340x87-300x77.png Samantha2016-03-08 23:44:292017-01-09 15:13:42Seeking Sitters Work Life Balance Tour 2016
Transit Bus To Moving Art
February 17, 2016 /1 Comment/in News /by Samantha
Imagine a 35-foot vintage Harley-Davidson cruising on busy city streets.
This is happening in Tulsa, Oklahoma. For the remainder of 2016, Douglas Henderson's photography of a 1948 Harley-Davidson Flathead, equipped with the historic Panhead engine, is massively displayed on a Tulsa Transit bus. This large-scale form of public art is running on Tulsa's streets 14 hours a day, six days a week.
The third annual Art In Transit Tulsa contest, in partnership with Tulsa Transit, Transit Advertising, Inc., and Acrobat Ant, called for Oklahoma artists to submit bus designs for a chance at their design being showcased on a transit bus for one year.
Out of nineteen submissions, Henderson's photography was selected and is now bringing public art to the urban landscape. As a world-renowned professional photographer he saw the contest as a way to stretch his artistic and graphic design ability.
"I did not expect to win. I first photographed this bike for a poster design. I thought the bike was beautiful and knew I would use the photographs again somewhere down the road," Henderson said. "This is now, by far, the largest image I have had printed to date."
The owner of this now famous Harley-Davidson wishes to remain anonymous but the details of the bike are on full display.
"You can see every chip and scratch this bike has collected over the last 68 years," Henderson said. "If you look closely, you can see a fly that landed on the bike during the shoot."
As an Adobe Certified Expert in Photoshop, Henderson used his artistic skills to add details of Tulsa's skyline and Tulsa Transit's downtown station in the reflection of the motor's air cleaner. The saddlebags have 'Art In Transit' digitally etched into the rustic leather and, if one looks close enough, a self-portrait of the photographer can be seen in the engine.
Myers-Duren Harley-Davidson of Tulsa hosted the unveiling of the bus on February 16. Tulsa photographer, David Maloney, came to see the bus in person.
"I love how he added the downtown transit station into the photo. It brings the design home to our Oklahoma roots. This is our Tulsa, our bus. He is representing our city well," Maloney said. "Doug is a genuinely humble guy. Winning this contest gives him the recognition he deserves among our photography community."
Henderson and runner-up Randy Riggs also have their work displayed on Tulsa Transit bench and shelter bus stops.
Our team printed and installed the art onto the bus, shelters and benches. It's exciting to see the creativity submitted by our fellow Oklahomans for the Art In Transit contest and we were thrilled when we saw the winning design. Installing this design on a Tulsa Transit bus brings a recognizable piece of American tradition onto a much larger scale.
Transit buses provide a large versatile canvas that can transform any message, advertisement or image into moving art.
See our ad options.
All the bus stop designs can be viewed at the following locations in Tulsa.
Benches:
2021 E. 71
212 E. 10
315 S. Gilcrease
1653 E. 6 Street.
Shelters:
5025 S. Sheridan
1079 S. Utica
1905 S. Bolder.
https://transitadvertisinginc.com/wp-content/uploads/2016/02/4O5A4022-2.jpg 450 800 Samantha https://transitadvertisinginc.com/wp-content/uploads/2015/09/TAI-340x87-300x77.png Samantha2016-02-17 19:03:512017-01-12 12:39:02Transit Bus To Moving Art
Agency Buyers
© Copyright - Transit Advertising, Inc. - Enfold WordPress Theme by Kriesi


Seldom do we live on purpose. It's like we have gotten use to the idea of being receivers of whatever comes our way instead of initiators of our own lives. We see ourselves as always playing defense. We talk of playing offense, and maybe take an offensive position from time to time, but do we ever consider we do not have to be responders at all?
Of course, we respond to God. But in life we do not need to always be the one preparing to defend against or attack an opponent. While there is a time for each of these, a constant position of defense or attack will wear us out. Our job is to initiate the Kingdom from a place of victory. Consider Jesus.
The disciples were in a boat with Jesus. A storm raged with strong wind and waves assaulting their fishing boat. The waves were breaking over the boat. All the while, Jesus slept in the back of the boat. Afraid, the disciples woke Jesus and asked if he cared if they drowned. Rising, Jesus spoke to the wind and water, commanding them to be still. The storm abated at his words and he turned and asked the disciples why they were so afraid and questioned their continued lack of faith.
Jesus did not take a defensive or offensive posture against the storm until the disciples peace of mind necessitated his rebuking of the storm. He simply slept and let it rage. It was not going to hurt him or the boat. He was of a Kingdom that could not be shaken. No matter the natural assault brought by the storm, Jesus, and those with Him, were safe.
The disciples were with Jesus and yet somehow thought that a storm would be the end of all of them. The storm was not a threat to Jesus or to those with Him. The disciples could have slept safely alongside Jesus.
How often are we worrying about the storms of life while Jesus is looking for us to rest in Him? We want the storm to be calmed so that we can be calm. He wants us to be calm despite the storm. Jesus could bring peace to the storm because He already is Peace.
When we are tossed around by every piece of news and current events, we are like the disciples asking Jesus if He cares that we are being assaulted by so much turmoil. If we are being assaulted by the turmoil of the world we are wearing ourselves out fighting a storm that cannot harm us. We can choose weather the storm tosses our boat or if our boat will sail on in safety.
We have taken on the false idea that God needs to remove us from the dangerous darkness so that we can be safe. Instead, we are safe in the middle of darkness. We do not fend off darkness to protect ourselves. We are already protected. We are the ones that can invade the darkness and set the captives free.
We choose to let in what assails us. This is difficult to read because it removes all our excuses of powerlessness and our victim identities. We do not need the darkness to stop being so dark. We do not need society to start behaving like good Bible believing Christians should in order to be the salt and light in the earth. They can't start behaving like Christians unless Christians start going into the dark places and loving the people they find there into the Kingdom.
We are afraid of those who practice evil. We think the darkness can overpower the light. There is no realm in heaven or on earth that the darkness can extinguish the light. Only the light can vanquish the darkness. But we do not do so by making people caught up in darkness our enemies, but by laying down our lives to serve the broken, rejected, and lost people.
Do you want to make a difference in your city? Bless and do not curse. Do good to those who wrong you. Be kind to atheists. Befriend a Muslim. Show the power of God's love to the most difficult to love. Practice not being offended by sin. Love those who hate you. Bless those who persecute you. Consider it joy to serve those who want to take God out of school. Love those who want to remove Christian symbols from public buildings.
If you don't know where to start, think of the people who are doing the things in this world that irritates you the most. Then find those people to serve. It will break the hold of darkness over them and you.
It does not matter what storms people create that swirl around us. We are of another world, another atmosphere altogether. Only when we live from the reality of the Kingdom of Heaven can we change the atmosphere of earth around us. When you have the peace that allows you to sleep in the midst of a storm, you have the peace that can calm the storm.
We can set the captives free in any area that we are not held captive. When we live in victory we can lead others to a place of victory. When we are impressed by the storms of life, we cannot free others who are trapped in them. But the choice is ours. God already set us free and empowered us to demonstrate His Kingdom in every place that we go.
He did this over 2000 years ago, what are we waiting for?
Awesome word Carla thanks for sharing that. I see why God anointed you as a writer to help the church.
I also enjoyed your article here Karla. I think sometimes we from western christianity forget who we are as Christians, and confuse bring christian with being "american".


text:
France Says to Work With India to Promote Multilateral Order | World News
PARIS (Reuters) – France's foreign affairs minister agreed with his Indian counterpart to work on a programme to promote "a truly multilateral international order," the French foreign ministry said on Saturday.
Jean-Yves Le Drian and Subrahmanyam Jaishankar also agreed during a call to deepen their strategic partnership, "based on a relationship of political trust between two great sovereign nations of the Indo-Pacific," the ministry said in a statement.
France on Friday recalled its ambassadors from the United States and Australia after Canberra ditched a multi-billion-dollar order for French submarines in favour of a partnership with Washington and London in the Indo-Pacific region.
(Reporting by Gus Trompiz, editing by Louise Heavens)