text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="46df5f5b-46f9-4aaa-a43d-dceb66d9ef57" name="Default" comment="">
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Procfile" afterPath="$PROJECT_DIR$/Procfile" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/haikubot/twitbot.py" afterPath="$PROJECT_DIR$/haikubot/twitbot.py" />
    </list>
    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FileEditorManager">
    <leaf SIDE_TABS_SIZE_LIMIT_KEY="450">
      <file leaf-file-name="train.py" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/haikubot/train.py">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="300">
              <caret line="12" column="80" lean-forward="true" selection-start-line="12" selection-start-column="4" selection-end-line="12" selection-end-column="80" />
              <folding>
                <element signature="e#37#54#0" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="twitbot.py" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/haikubot/twitbot.py">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="325">
              <caret line="13" column="24" lean-forward="false" selection-start-line="13" selection-start-column="24" selection-end-line="13" selection-end-column="24" />
              <folding>
                <element signature="e#0#13#0" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Procfile" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/Procfile">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="0">
              <caret line="0" column="24" lean-forward="false" selection-start-line="0" selection-start-column="24" selection-end-line="0" selection-end-column="24" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name=".env" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/.env">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="75">
              <caret line="3" column="65" lean-forward="false" selection-start-line="3" selection-start-column="65" selection-end-line="3" selection-end-column="65" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name=".gitignore" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/.gitignore">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="16">
              <caret line="1" column="21" lean-forward="false" selection-start-line="1" selection-start-column="21" selection-end-line="1" selection-end-column="21" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="FileTemplateManagerImpl">
    <option name="RECENT_TEMPLATES">
      <list>
        <option value="Python Script" />
      </list>
    </option>
  </component>
  <component name="FindInProjectRecents">
    <findStrings>
      <find>newli</find>
      <find>file</find>
      <find>TRAIN</find>
    </findStrings>
  </component>
  <component name="Git.Settings">
    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
  </component>
  <component name="IdeDocumentHistory">
    <option name="CHANGED_PATHS">
      <list>
        <option value="$PROJECT_DIR$/haikubot/build.py" />
        <option value="$PROJECT_DIR$/buildModel.py" />
        <option value="$PROJECT_DIR$/markovify/splitters.py" />
        <option value="$PROJECT_DIR$/haikubot/scratch.txt" />
        <option value="$PROJECT_DIR$/haikubot/credentials.py" />
        <option value="$PROJECT_DIR$/haikubot/auth.py" />
        <option value="$PROJECT_DIR$/haikubot/__init__.py" />
        <option value="$PROJECT_DIR$/haikubot/train.py" />
        <option value="$PROJECT_DIR$/markovify/chain.py" />
        <option value="$PROJECT_DIR$/.gitignore" />
        <option value="$PROJECT_DIR$/requirements.txt" />
        <option value="$PROJECT_DIR$/.env" />
        <option value="$PROJECT_DIR$/Procfile" />
        <option value="$PROJECT_DIR$/haikubot/twitbot.py" />
      </list>
    </option>
  </component>
  <component name="ProjectFrameBounds">
    <option name="x" value="-11" />
    <option name="y" value="-11" />
    <option name="width" value="1942" />
    <option name="height" value="1042" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
      <manualOrder />
      <foldersAlwaysOnTop value="true" />
    </navigator>
    <panes>
      <pane id="Scratches" />
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="HaikuGen" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="HaikuGen" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="HaikuGen" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="HaikuGen" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="markovify" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="HaikuGen" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="HaikuGen" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="haikubot" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="Scope" />
    </panes>
  </component>
  <component name="RecentsManager">
    <key name="MoveFile.RECENT_KEYS">
      <recent name="C:\CS Stuff\HaikuGen" />
      <recent name="C:\CS Stuff\HaikuGen\haikubot" />
    </key>
  </component>
  <component name="RunDashboard">
    <option name="ruleStates">
      <list>
        <RuleState>
          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
        </RuleState>
        <RuleState>
          <option name="name" value="StatusDashboardGroupingRule" />
        </RuleState>
      </list>
    </option>
  </component>
  <component name="RunManager" selected="Python.twitbot">
    <configuration default="false" name="buildModel" type="PythonConfigurationType" factoryName="Python" temporary="true">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs>
        <env name="PYTHONUNBUFFERED" value="1" />
      </envs>
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
      <option name="IS_MODULE_SDK" value="true" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="HaikuGen" />
      <option name="SCRIPT_NAME" value="$PROJECT_DIR$/buildModel.py" />
      <option name="PARAMETERS" value="" />
      <option name="SHOW_COMMAND_LINE" value="false" />
      <option name="EMULATE_TERMINAL" value="false" />
      <method />
    </configuration>
    <configuration default="false" name="train" type="PythonConfigurationType" factoryName="Python" temporary="true">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs>
        <env name="PYTHONUNBUFFERED" value="1" />
      </envs>
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/haikubot" />
      <option name="IS_MODULE_SDK" value="true" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="HaikuGen" />
      <option name="SCRIPT_NAME" value="$PROJECT_DIR$/haikubot/train.py" />
      <option name="PARAMETERS" value="" />
      <option name="SHOW_COMMAND_LINE" value="false" />
      <option name="EMULATE_TERMINAL" value="false" />
      <method />
    </configuration>
    <configuration default="false" name="Unittests in test_combine.py" type="tests" factoryName="Unittests" temporary="true" nameIsGenerated="true">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/test-markovify" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="HaikuGen" />
      <option name="_new_additionalArguments" value="""" />
      <option name="_new_target" value=""$PROJECT_DIR$/test-markovify/test_combine.py"" />
      <option name="_new_targetType" value=""PATH"" />
      <method />
    </configuration>
    <configuration default="false" name="twitbot" type="PythonConfigurationType" factoryName="Python" temporary="true">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs>
        <env name="PYTHONUNBUFFERED" value="1" />
      </envs>
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/haikubot" />
      <option name="IS_MODULE_SDK" value="true" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="HaikuGen" />
      <option name="SCRIPT_NAME" value="$PROJECT_DIR$/haikubot/twitbot.py" />
      <option name="PARAMETERS" value="" />
      <option name="SHOW_COMMAND_LINE" value="false" />
      <option name="EMULATE_TERMINAL" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="PythonConfigurationType" factoryName="Python">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs>
        <env name="PYTHONUNBUFFERED" value="1" />
      </envs>
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="HaikuGen" />
      <option name="SCRIPT_NAME" value="" />
      <option name="PARAMETERS" value="" />
      <option name="SHOW_COMMAND_LINE" value="false" />
      <option name="EMULATE_TERMINAL" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="Tox" factoryName="Tox">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="HaikuGen" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Doctests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="HaikuGen" />
      <option name="SCRIPT_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="FOLDER_NAME" value="" />
      <option name="TEST_TYPE" value="TEST_SCRIPT" />
      <option name="PATTERN" value="" />
      <option name="USE_PATTERN" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Unittests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="HaikuGen" />
      <option name="_new_additionalArguments" value="""" />
      <option name="_new_target" value=""."" />
      <option name="_new_targetType" value=""PATH"" />
      <method />
    </configuration>
    <list size="4">
      <item index="0" class="java.lang.String" itemvalue="Python.buildModel" />
      <item index="1" class="java.lang.String" itemvalue="Python.train" />
      <item index="2" class="java.lang.String" itemvalue="Python tests.Unittests in test_combine.py" />
      <item index="3" class="java.lang.String" itemvalue="Python.twitbot" />
    </list>
    <recent_temporary>
      <list size="4">
        <item index="0" class="java.lang.String" itemvalue="Python.twitbot" />
        <item index="1" class="java.lang.String" itemvalue="Python.train" />
        <item index="2" class="java.lang.String" itemvalue="Python tests.Unittests in test_combine.py" />
        <item index="3" class="java.lang.String" itemvalue="Python.buildModel" />
      </list>
    </recent_temporary>
  </component>
  <component name="ShelveChangesManager" show_recycled="false">
    <option name="remove_strategy" value="false" />
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="46df5f5b-46f9-4aaa-a43d-dceb66d9ef57" name="Default" comment="" />
      <created>1497367718001</created>
      <option name="number" value="Default" />
      <option name="presentableId" value="Default" />
      <updated>1497367718001</updated>
    </task>
    <task id="LOCAL-00001" summary="Basic implementation completed. TODO: refine word-selection">
      <created>1497720907816</created>
      <option name="number" value="00001" />
      <option name="presentableId" value="LOCAL-00001" />
      <option name="project" value="LOCAL" />
      <updated>1497720907816</updated>
    </task>
    <task id="LOCAL-00002" summary="Code cleaned up.">
      <created>1498465489756</created>
      <option name="number" value="00002" />
      <option name="presentableId" value="LOCAL-00002" />
      <option name="project" value="LOCAL" />
      <updated>1498465489756</updated>
    </task>
    <task id="LOCAL-00003" summary="Code restructured.">
      <created>1498557833242</created>
      <option name="number" value="00003" />
      <option name="presentableId" value="LOCAL-00003" />
      <option name="project" value="LOCAL" />
      <updated>1498557833242</updated>
    </task>
    <task id="LOCAL-00004" summary="Twitter bot functionality added.">
      <created>1498557884853</created>
      <option name="number" value="00004" />
      <option name="presentableId" value="LOCAL-00004" />
      <option name="project" value="LOCAL" />
      <updated>1498557884853</updated>
    </task>
    <task id="LOCAL-00005" summary="Twitter bot now tweets daily.">
      <created>1499793823492</created>
      <option name="number" value="00005" />
      <option name="presentableId" value="LOCAL-00005" />
      <option name="project" value="LOCAL" />
      <updated>1499793823492</updated>
    </task>
    <task id="LOCAL-00006" summary="Procfile created for deployment on Heroku">
      <created>1499852253610</created>
      <option name="number" value="00006" />
      <option name="presentableId" value="LOCAL-00006" />
      <option name="project" value="LOCAL" />
      <updated>1499852253610</updated>
    </task>
    <task id="LOCAL-00007" summary="requirements.txt created for deployment on Heroku">
      <created>1499852284159</created>
      <option name="number" value="00007" />
      <option name="presentableId" value="LOCAL-00007" />
      <option name="project" value="LOCAL" />
      <updated>1499852284159</updated>
    </task>
    <task id="LOCAL-00008" summary=".gitignore updated">
      <created>1499861718869</created>
      <option name="number" value="00008" />
      <option name="presentableId" value="LOCAL-00008" />
      <option name="project" value="LOCAL" />
      <updated>1499861718869</updated>
    </task>
    <task id="LOCAL-00009" summary=".gitignore updated">
      <created>1499861818740</created>
      <option name="number" value="00009" />
      <option name="presentableId" value="LOCAL-00009" />
      <option name="project" value="LOCAL" />
      <updated>1499861818740</updated>
    </task>
    <option name="localTasksCounter" value="10" />
    <servers />
  </component>
  <component name="TestHistory">
    <history-entry file="Unittests_in_test_combine_py - 2017.06.17 at 05h 40m 17s.xml">
      <configuration name="Unittests in test_combine.py" configurationId="tests" />
    </history-entry>
  </component>
  <component name="ToolWindowManager">
    <frame x="-11" y="-11" width="1942" height="1042" extended-state="6" />
    <editor active="true" />
    <layout>
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.19243243" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.34363854" sideWeight="0.50864863" order="7" side_tool="true" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32936978" sideWeight="0.49351352" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32990867" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.34363854" sideWeight="0.49135137" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32990867" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
    </layout>
    <layout-to-restore>
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.34363854" sideWeight="0.50864863" order="8" side_tool="true" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32936978" sideWeight="0.49351352" order="9" side_tool="false" content_ui="tabs" />
      <window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32990867" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.34363854" sideWeight="0.49135137" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.19243243" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32990867" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
    </layout-to-restore>
  </component>
  <component name="Vcs.Log.History.Properties">
    <option name="COLUMN_ORDER">
      <list>
        <option value="0" />
        <option value="2" />
        <option value="3" />
        <option value="1" />
      </list>
    </option>
  </component>
  <component name="Vcs.Log.Tabs.Properties">
    <option name="TAB_STATES">
      <map>
        <entry key="MAIN">
          <value>
            <State>
              <option name="RECENTLY_FILTERED_USER_GROUPS">
                <collection />
              </option>
              <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
                <collection />
              </option>
              <option name="COLUMN_ORDER">
                <list>
                  <option value="0" />
                  <option value="1" />
                  <option value="2" />
                  <option value="3" />
                </list>
              </option>
            </State>
          </value>
        </entry>
      </map>
    </option>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="VcsManagerConfiguration">
    <MESSAGE value="Basic implementation completed. TODO: refine word-selection" />
    <MESSAGE value="Code cleaned up." />
    <MESSAGE value="Code restructured." />
    <MESSAGE value="Twitter bot functionality added." />
    <MESSAGE value="Twitter bot now tweets daily." />
    <MESSAGE value="Procfile created for deployment on Heroku" />
    <MESSAGE value="requirements.txt created for deployment on Heroku" />
    <MESSAGE value=".gitignore updated" />
    <option name="LAST_COMMIT_MESSAGE" value=".gitignore updated" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager />
    <watches-manager />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/haikubot/twitbot.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="150">
          <caret line="8" column="0" lean-forward="true" selection-start-line="8" selection-start-column="0" selection-end-line="8" selection-end-column="0" />
          <folding>
            <element signature="e#0#13#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/__init__.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/train.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="1025">
          <caret line="43" column="29" lean-forward="false" selection-start-line="43" selection-start-column="29" selection-end-line="43" selection-end-column="29" />
          <folding>
            <element signature="e#37#54#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/scratch.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="25">
          <caret line="1" column="33" lean-forward="false" selection-start-line="1" selection-start-column="33" selection-end-line="1" selection-end-column="33" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/credentials.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="75">
          <caret line="3" column="23" lean-forward="false" selection-start-line="3" selection-start-column="23" selection-end-line="3" selection-end-column="23" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/__init__.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/markovify/text.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="4325">
          <caret line="177" column="11" lean-forward="false" selection-start-line="177" selection-start-column="11" selection-end-line="177" selection-end-column="11" />
          <folding>
            <element signature="e#0#9#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test-markovify/test_combine.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="1425">
          <caret line="60" column="0" lean-forward="false" selection-start-line="60" selection-start-column="0" selection-end-line="60" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/twitbot.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="325">
          <caret line="15" column="17" lean-forward="true" selection-start-line="15" selection-start-column="17" selection-end-line="15" selection-end-column="17" />
          <folding>
            <element signature="e#0#13#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/train.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="1025">
          <caret line="43" column="29" lean-forward="false" selection-start-line="43" selection-start-column="29" selection-end-line="43" selection-end-column="29" />
          <folding>
            <element signature="e#37#54#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/scratch.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="25">
          <caret line="1" column="33" lean-forward="true" selection-start-line="1" selection-start-column="33" selection-end-line="1" selection-end-column="33" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/credentials.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="75">
          <caret line="3" column="23" lean-forward="true" selection-start-line="3" selection-start-column="23" selection-end-line="3" selection-end-column="23" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/__init__.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/markovify/text.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="4325">
          <caret line="177" column="11" lean-forward="false" selection-start-line="177" selection-start-column="11" selection-end-line="177" selection-end-column="11" />
          <folding>
            <element signature="e#0#9#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test-markovify/test_combine.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="1425">
          <caret line="60" column="0" lean-forward="false" selection-start-line="60" selection-start-column="0" selection-end-line="60" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/twitbot.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="175">
          <caret line="9" column="0" lean-forward="true" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
          <folding>
            <element signature="e#0#13#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/buildModel.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="100">
          <caret line="4" column="0" lean-forward="false" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/train.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="550">
          <caret line="22" column="24" lean-forward="true" selection-start-line="22" selection-start-column="24" selection-end-line="22" selection-end-column="24" />
          <folding>
            <element signature="e#37#54#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/scratch.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="175">
          <caret line="7" column="80" lean-forward="false" selection-start-line="7" selection-start-column="80" selection-end-line="7" selection-end-column="80" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/credentials.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="75">
          <caret line="3" column="52" lean-forward="true" selection-start-line="3" selection-start-column="52" selection-end-line="3" selection-end-column="52" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/markovify/text.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="4425">
          <caret line="177" column="11" lean-forward="false" selection-start-line="177" selection-start-column="11" selection-end-line="177" selection-end-column="11" />
          <folding>
            <element signature="e#0#9#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test-markovify/test_combine.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="1425">
          <caret line="60" column="0" lean-forward="false" selection-start-line="60" selection-start-column="0" selection-end-line="60" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/twitbot.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="175">
          <caret line="7" column="24" lean-forward="true" selection-start-line="7" selection-start-column="24" selection-end-line="7" selection-end-column="24" />
          <folding>
            <element signature="e#0#13#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/buildModel.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="100">
          <caret line="4" column="0" lean-forward="false" selection-start-line="4" selection-start-column="0" selection-end-line="4" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/train.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="475">
          <caret line="19" column="0" lean-forward="true" selection-start-line="19" selection-start-column="0" selection-end-line="19" selection-end-column="0" />
          <folding>
            <element signature="e#37#54#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/markovify/text.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="4425">
          <caret line="177" column="11" lean-forward="true" selection-start-line="177" selection-start-column="11" selection-end-line="177" selection-end-column="11" />
          <folding>
            <element signature="e#0#9#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test-markovify/test_combine.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="1500">
          <caret line="60" column="0" lean-forward="true" selection-start-line="60" selection-start-column="0" selection-end-line="60" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/scratch.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="175">
          <caret line="7" column="80" lean-forward="true" selection-start-line="7" selection-start-column="80" selection-end-line="7" selection-end-column="80" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/code/__init__.py" />
    <entry file="file://$PROJECT_DIR$/markovify/utils.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="50">
          <caret line="8" column="31" lean-forward="true" selection-start-line="8" selection-start-column="31" selection-end-line="8" selection-end-column="31" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test-markovify/__init__.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/build.py" />
    <entry file="file://$PROJECT_DIR$/markovify/splitters.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="139">
          <caret line="23" column="37" lean-forward="true" selection-start-line="23" selection-start-column="37" selection-end-line="23" selection-end-column="37" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test-markovify/test_basic.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="2700">
          <caret line="108" column="19" lean-forward="true" selection-start-line="108" selection-start-column="19" selection-end-line="108" selection-end-column="19" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test-markovify/test_combine.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="1425">
          <caret line="60" column="0" lean-forward="false" selection-start-line="60" selection-start-column="0" selection-end-line="60" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/requirements.txt" />
    <entry file="file://$PROJECT_DIR$/buildModel.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="150">
          <caret line="6" column="40" lean-forward="true" selection-start-line="6" selection-start-column="40" selection-end-line="6" selection-end-column="40" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/markovify-master/tox.ini">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/credentials.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="75">
          <caret line="3" column="40" lean-forward="false" selection-start-line="3" selection-start-column="40" selection-end-line="3" selection-end-column="40" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/scratch.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="22" lean-forward="false" selection-start-line="0" selection-start-column="22" selection-end-line="0" selection-end-column="22" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/markovify/chain.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="385">
          <caret line="148" column="19" lean-forward="false" selection-start-line="148" selection-start-column="19" selection-end-line="148" selection-end-column="19" />
          <folding>
            <element signature="e#0#13#0" expanded="false" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python35/Lib/site-packages/boto/__init__.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="321">
          <caret line="142" column="0" lean-forward="true" selection-start-line="142" selection-start-column="0" selection-end-line="142" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/.gitignore">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="16">
          <caret line="1" column="21" lean-forward="false" selection-start-line="1" selection-start-column="21" selection-end-line="1" selection-end-column="21" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/markovify/text.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="175">
          <caret line="7" column="30" lean-forward="true" selection-start-line="7" selection-start-column="30" selection-end-line="7" selection-end-column="30" />
          <folding>
            <element signature="e#0#9#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/requirements.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="725">
          <caret line="29" column="11" lean-forward="false" selection-start-line="29" selection-start-column="11" selection-end-line="29" selection-end-column="11" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/__init__.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/.env">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="75">
          <caret line="3" column="65" lean-forward="false" selection-start-line="3" selection-start-column="65" selection-end-line="3" selection-end-column="65" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python35/Lib/site-packages/dotenv/main.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="121">
          <caret line="21" column="7" lean-forward="true" selection-start-line="21" selection-start-column="7" selection-end-line="21" selection-end-column="7" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Procfile">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="24" lean-forward="false" selection-start-line="0" selection-start-column="24" selection-end-line="0" selection-end-column="24" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/train.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="300">
          <caret line="12" column="80" lean-forward="true" selection-start-line="12" selection-start-column="4" selection-end-line="12" selection-end-column="80" />
          <folding>
            <element signature="e#37#54#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/haikubot/twitbot.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="325">
          <caret line="13" column="24" lean-forward="false" selection-start-line="13" selection-start-column="24" selection-end-line="13" selection-end-column="24" />
          <folding>
            <element signature="e#0#13#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
  </component>
</project>


text:
{-# LANGUAGE TemplateHaskell #-}
module Main(main) where

import Data.Int

import DNA

import DDP
import DDP_Slice

----------------------------------------------------------------
-- Distributed dot product
----------------------------------------------------------------

-- | Actor for calculating dot product
ddpDotProduct :: Actor Int64 Double
ddpDotProduct = actor $ \size -> do
    -- Chunk & send out
    res   <- selectMany (Frac 1) (NNodes 1) [UseLocal]
    shell <- startGroup res Failout $(mkStaticClosure 'ddpProductSlice)
    sendParam (Slice 0 size) (broadcast shell)
    -- Collect results
    partials <- delayGroup shell
    x <- duration "collecting vectors" $ gather partials (+) 0
    return x

main :: IO ()
main =  dnaRun rtable $ do
    -- Vector size:
    --
    -- > 100e4 doubles per node = 800 MB per node
    -- > 4 nodes
    let n        = 400*1000*1000
        expected = fromIntegral n*(fromIntegral n-1)/2 * 0.1
    -- Run it
    b <- eval ddpDotProduct n
    liftIO $ putStrLn $ concat
      [ "RESULT: ", show b
      , " EXPECTED: ", show expected
      , if b == expected then " -- ok" else " -- WRONG!"
      ]

  where
    rtable = DDP.__remoteTable
           . DDP_Slice.__remoteTable

redpajama_set_name: RedPajamaGithub


text:
package com.deleidos.rtws.commons.dao.tmsdb;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Collection;

import javax.sql.DataSource;

import com.deleidos.rtws.commons.dao.exception.DataRetrievalException;
import com.deleidos.rtws.commons.dao.jdbc.DataAccessSession;
import com.deleidos.rtws.commons.dao.jdbc.DataAccessUtil;
import com.deleidos.rtws.commons.dao.jdbc.DefaultStatementHandler;
import com.deleidos.rtws.commons.dao.jdbc.RecordBuilder;
import com.deleidos.rtws.commons.model.tmsdb.TransportConfig;

/**
 * DAO class for the TMS DB table TransportConfig.
 *
 * @author LUCECU
 *
 * @deprecated this database table no longer exists
 */
public class TransportConfigDao {

	/** Data source through which SQL operations should be performed. */
	private DataSource dataSource;

	/** Utility instance used to manage connections. */
	private DataAccessSession session;

	public TransportConfigDao(){

	}

	/**
	 * Data source through which SQL operations should be performed.
	 */
	public DataSource getDataSource() {
		return dataSource;
	}

	/**
	 * Data source through which SQL operations should be performed.
	 */
	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
		this.session = DataAccessUtil.session(dataSource);
	}

	/**
	 * Queries for all transport configurations.
	 *
	 * @return a list of{@link TransportConfig}
	 */
	public Collection<TransportConfig> getTransportConfigurations(){
		Collection<TransportConfig> configs = session.executeMultiRowQuery("select * from transport_config", new DefaultStatementHandler(), new TransportConfigBuilder());

		return configs;
	}

	/**
	 * Inner class used to populate beans with data from a result set.
	 */
	protected static final class TransportConfigBuilder implements RecordBuilder<TransportConfig> {
		public TransportConfig buildRecord(ResultSet rs) {
			try {

				TransportConfig config = new TransportConfig();
				config.setFqn(rs.getString("fqn"));
				config.setDescription(rs.getString("description"));
				config.setTransportXmlTemplate(rs.getString("transport_xml_template"));

				return config;
			} catch (SQLException e) {
				e.printStackTrace();
				throw new DataRetrievalException(e);
			}
		}
	}
}


text:
#import "NSObject+BSN_GFJson.h"
#import <objc/runtime.h>
#import "BSN_GFDateFormatter.h"

// log macros (adding features to NSLog) that output the code line number
// debug() is enabled by a compilation flag
#ifdef GF_DEBUG
#   define debug(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#   define debug(...)
#endif
// info() always displays
#define info(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);

@implementation NSObject (BSN_GFJson)

/*
 Populates an NSObject from a JSON object
 */
- (id)initWithJsonObject:(id)jsonObject {
    debug(@"examining jsonObject of class %@", [jsonObject class]);
    if ([self isJsonPrimitive] && [jsonObject isJsonPrimitive]) {
        /*
         * JSON primitive (return the primitive)
         */
        debug(@"returning object of class %@", [jsonObject class]);
        return jsonObject;
    } else if ([self isKindOfClass:[NSDate class]]) {
        if ([jsonObject isKindOfClass:[NSString class]]) {
            self = [self initWithDateString:(NSString*)jsonObject];
        }
        debug(@"returning object of class %@", [self class]);
        return self;
    } else if ([jsonObject isKindOfClass:[NSArray class]]) {
        /*
         * JSON array (return an NSArray)
         */
        if ([self isKindOfClass:[NSArray class]]) {
            // return the array plain and simple
            return jsonObject;
        } else {
            // the JSON contained an array, but I'm not an array; we'll instantate an array with my class as elements
            NSArray *jsonArray = (NSArray*)jsonObject;
            NSMutableArray *results = [[NSMutableArray alloc] initWithCapacity:jsonArray.count];
            for (id jsonElem in jsonArray) {
                id elem = [[[self class] alloc] initWithJsonObject:jsonElem];
                [results addObject:elem];
            }
            debug(@"returning object of class %@", [results class]);
            return results;
        }
    } else if ([jsonObject isKindOfClass:[NSDictionary class]]) {
        /*
         * JSON object
         */
        if ([self isKindOfClass:[NSDictionary class]]) {
            // a dictionary is expected so pass through the jsonObject dictionary unchanged
            debug(@"returning object of class %@", [jsonObject class]);
            return jsonObject;
        } else {
            NSDictionary *dict = (NSDictionary*)jsonObject;
            // populate self from this dictionary, which represents self in JSON object notation
            NSDictionary *props = [self getPropertiesAndClasses];
            for (NSString *jsonName in [dict allKeys]) {
                // check jsonMapping for any special configuration on this field
                NSString *mappingPropertyName = [[self jsonMapping] objectForKey:jsonName];
                NSString *propertyName;
                if (mappingPropertyName) {
                    propertyName = mappingPropertyName;
                } else {
                    propertyName = jsonName;
                }

                // look at the class of the property itself
                Class propertyClass = [props objectForKey:propertyName];

                // check jsonClasses for any special configuration on this field
                Class jsonClass = [self getJsonClass:propertyName];
                Class instantiateClass = jsonClass ? jsonClass : propertyClass;
                if (propertyClass) {
                    if ([propertyClass isSubclassOfClass:[NSDictionary class]] && jsonClass && ![jsonClass isSubclassOfClass:[NSDictionary class]]) {
                        // special case: normally we try to instantiate an NSDictionary as a custom class
                        NSMutableDictionary *result = [[NSMutableDictionary alloc] initWithCapacity:[dict count]];
                        for (NSString *key in [dict allKeys]) {
                            id customValue = [[instantiateClass alloc] initWithJsonObject:[dict objectForKey:jsonName]];
                            [result setObject:customValue forKey:key];
                        }
                        debug(@"returning object of class %@", result);
                        return result;
                    } else {
                        // this block handles both custom classes and NSArrays
                        if ([[dict objectForKey:jsonName] isKindOfClass:[NSNull class]] || ![dict objectForKey:jsonName]) {
                            // do nothing; accept default value of property, which should be nil or zero or false
                        } else {
                            id propertyValue = [[instantiateClass alloc] initWithJsonObject:[dict objectForKey:jsonName]];
                            [self setValue:propertyValue forKey:propertyName];
                        }
                    }
                } else {
                    debug(@"did not find a property in class %@ that matches JSON name %@", [self class], jsonName);
                }
            }
            debug(@"returning object of class %@", [self class]);
            return self;
        }
    } else if ([jsonObject isKindOfClass:[NSNull class]]) {
        // do nothing; leave this property nil
        return nil;
    } else {
        NSLog(@"unsupported JSON object class %@", [jsonObject class]);
        debug(@"returning nil");
        return nil;
    }
}

- (id)initWithDateString:(NSString*)dateString {
    return [[BSN_GFDateFormatter sharedInstance] dateFromString:dateString];
}

- (Class)getJsonClass:(NSString*)propertyName {
    Class jsonClass = [[self jsonClasses] objectForKey:propertyName];
    if (!jsonClass) {
        // support legacy GoldenFleece functionality that was based on NSObject+AutomagicCoding
        SEL selector = sel_registerName("AMCElementClassForCollectionWithKey:");
        if ([self respondsToSelector:selector]) {

            // if you don't understand this part, please read http://stackoverflow.com/a/20058585/318912
            IMP imp = [self methodForSelector:selector];
            Class (*func)(id, SEL, NSString*) = (void *)imp;
            jsonClass = func(self, selector, propertyName);

            if (jsonClass == [NSObject class]) {
                // the legacy method returned NSObject as the default, but here we expect nil as the default
                jsonClass = nil;
            }
        }
    }
    return jsonClass;
}

/*
 Converts an NSObject to a JSON object, which Apple defines as...

 "An object that may be converted to JSON must have the following properties:
 The top level object is an NSArray or NSDictionary.
 All objects are instances of NSString, NSNumber, NSArray, NSDictionary, or NSNull.
 All dictionary keys are instances of NSString.
 Numbers are not NaN or infinity."
 */
- (id)jsonObject {
    if ([self isKindOfClass:[NSArray class]]) {
        return [self toJsonArray];
    } else if ([self isKindOfClass:[NSDictionary class]]) {
        return [self toJsonDictionary];
    } else if ([self isJsonPrimitive]) {
        return self;
    } else if ([self isKindOfClass:[NSDate class]]) {
        return [[BSN_GFDateFormatter sharedInstance] stringFromDate:(NSDate*)self];
    } else {
        return [self toJsonDictionary]; // any other NSObject subclass
    }
}

- (NSMutableArray*)toJsonArray {
    NSArray *array = (NSArray*)self;
    NSMutableArray *result = [[NSMutableArray alloc] initWithCapacity:[array count]];
    for (NSObject *elem in array) {
        [result addObject:[elem jsonObject]];
    }
    return result;
}

- (NSMutableDictionary*)toJsonDictionary {
    if ([self isKindOfClass:[NSDictionary class]]) {
        NSDictionary *dict = (NSDictionary*)self;
        NSMutableDictionary *result = [[NSMutableDictionary alloc] initWithCapacity:[dict count]];
        for (id key in [dict allKeys]) {
            [result setValue:[dict objectForKey:key] forKey:key];
        }
        return result;
    } else {
        // any NSObject subclass
        NSDictionary *props = [self getPropertiesAndClasses];
        NSMutableDictionary *result = [[NSMutableDictionary alloc] initWithCapacity:[props count]];
        NSDictionary *reverseMapping = [self reverseMapping];
        for (NSString *propName in [props allKeys]) {
            NSString *jsonName = [reverseMapping objectForKey:propName];
            if (!jsonName) {
                jsonName = propName;
            }
            id propValue = [self valueForKeyPath:propName];
            if (propValue) {
                [result setObject:[propValue jsonObject] forKey:jsonName];
            } else {
                [result setObject:[NSNull null] forKey:jsonName];
            }
        }
        return result;
    }
}

- (NSDictionary*)reverseMapping {
    NSMutableDictionary *result = [[NSMutableDictionary alloc] initWithCapacity:[[self jsonMapping] count]];
    for (NSString *jsonName in [self jsonMapping]) {
        [result setObject:jsonName forKey:[[self jsonMapping] objectForKey:jsonName]];
    }
    return result;
}

- (NSDictionary*)getPropertiesAndClasses {
    return [self getPropertiesAndClasses:[self class]];
}

- (NSDictionary*)getPropertiesAndClasses:(Class)clazz {
    NSMutableDictionary *result = [[NSMutableDictionary alloc] init];
    if (!([clazz superclass] == [NSObject class])) {
        [result addEntriesFromDictionary:[self getPropertiesAndClasses:[clazz superclass]]];
    }
    unsigned int count;
    objc_property_t *props = class_copyPropertyList(clazz, &count);
    for (int i = 0; i < count; i++) {
        objc_property_t property = props[i];
        const char *name = property_getName(property);
        NSString *propertyName = [NSString stringWithCString:name encoding:NSUTF8StringEncoding];
        const char *type = property_getAttributes(property);
        NSString *typeString = [NSString stringWithUTF8String:type];
        NSArray *attributes = [typeString componentsSeparatedByString:@","];
        NSString *typeAttribute = [attributes objectAtIndex:0];
        NSString *propertyType = [typeAttribute substringFromIndex:1];
        const char *rawPropertyType = [propertyType UTF8String];

        if ([typeAttribute hasPrefix:@"T@"] && [typeAttribute length] > 1) {
            NSString * className = [typeAttribute substringWithRange:NSMakeRange(3, [typeAttribute length]-4)];  // remove T@"..."
            debug(@"property %@ has class %@", propertyName, className);
            Class clazz = NSClassFromString(className);
            if (clazz != nil) {
                [result setObject:clazz forKey:propertyName];
            } else {
                debug(@"ERROR could not get class of property %@", propertyName);
            }
        } else if (strcmp(rawPropertyType, @encode(int)) == 0) {
            debug(@"ERROR property %@ has type int, which is not supported", propertyName);
        } else if (strcmp(rawPropertyType, @encode(BOOL)) == 0) {
            [result setObject:[NSNumber class] forKey:propertyName];
        } else if (strcmp(rawPropertyType, @encode(float)) == 0) {
            debug(@"ERROR property %@ has type float, which is not supported", propertyName);
        }  else {
            debug(@"ERROR property %@ has unrecognized type %s", propertyName, rawPropertyType);
        }
    }
    free(props);

    return result;
}

- (BOOL)isJsonPrimitive {
    return
    [self isKindOfClass:[NSString class]] ||
    [self isKindOfClass:[NSNumber class]] ||
    [self isKindOfClass:[NSNull class]];
}

/*
 Override this method to specify an element class for NSArray or NSDictionary contents.

 Return an NSDictionary of NSString : Class. While deserializing JSON, if GoldenFleece
 encounters an NSArray or NSDictionary property with a name matching the key, it will
 deserialize the contents by instantiating and populting the specified Class as a nested
 custom object for each element in the JSON array. Please note that the keys in this
 dictionary correspond to the property names (not the JSON keys).

 Example:
 - (NSDictionary*)jsonClasses {
    return @{
             @"comments" : [MyComment class],
             @"addresses" : [MyAddress class]
             };
 }
 */
- (NSDictionary*)jsonClasses {
    return @{};
}

/*
 Override this method if the properties in your custom object do not match the keys in
 the JSON object. For example, if the JSON object contains keys that are disallowed in
 Objective-C, you may need to names those properties differently in your object.

 Return an NSDictionary in which the keys correspond to the JSON keys and the values
 correspond to your property names.

 Example:
 - (NSDictionary*)jsonMapping {
    return @{
             @"signed" : @"isSigned"
             }
 }
 */
- (NSDictionary*)jsonMapping {
    return @{};
}

@end


text:
This project demonstrates how multiple A-MQ brokers can be set up in a mesh in
OpenShift without sharing a `DeploymentConfig` (that is, how an A-MQ mesh can
work without a `ReplicationController`, just several stand-alone independent
pods).

## the problem

This project uses RWO (`ReadWriteOnce`) PVCs (`PersistentVolumeClaim`s), which
is apparently the only write-access mode currently supported by EBS storage
backend. This means that only one pod will be able to acquire write access and
all others trying to access that particular PVC will have to be happy just
observing.

That is also why a PVC with this access mode can not be shared by multiple
brokers in *split* mode (that is, sharing one PVC by creating multiple message
stores inside subdirectories, one per pod replica), and herein lies the root of
all evil, and the reason for this sample project to exist in the first place.

Using a `ReplicationController` to scale A-MQ pods up to create a mesh works
wonderfully when there are RWM (`ReadWriteMany`) PVCs available - there is
almost nothing to do except deploy the pod and scale it.

In RWO access mode, however, each broker must have its own PVC (and a
corresponding PV on the cluster side), which means we can not control their
number simply by scaling the pods - scaled pods will use the *exact* same pod
template, all of them, which also means their `Volume`s and `VolumeMount`s will
be the same - referring to the same `PersistentVolumeClaim`.

For this reason, we create one PVC per broker, deploy each of them using its
own `DeploymentConfig` which has a shared label between all the pods we
deployed, to enable the mesh `Service` to find all pods using a `selector` over
the common label.

To be able to prove that messages are indeed being forwarded between the
brokers (i.e. *store-and-forward* federation), we also use two additional
services, an `incoming` and and `outgoing` service used by the JMS producer and
consumer applications, respectively - we want to be sure they connect to
different brokers so as to trigger the message forwarding, of course.

## before you begin

* Log in to OpenShift (either online or on-premise).

```shell
$ oc login -u johndoe -p password https://your.on-premise.broker:8443/
$ oc login --token=xxxxxx https://api.preview.openshift.com/
```

NOTE: amq images are currently not available in OSO (developer preview)

* Create a new OpenShift project or reuse an existing one (switch to it).

```shell
$ oc new-project <new-project>
$ oc project <existing-project>
```

* Make sure there are as many `PersistentVolume`s available as the number of
  brokers you intend to run. (Unfortunately there is no way to obtain a list of
  PVs as a normal user - ask your cluster admin, check the project limits, or
  look it up in documentation.)

## deploying

### create dependencies

* Create the `PersistentVolumeClaim`s for the brokers:
```shell
    $ oc create -f json/amq-claims.json
```

* Create the three services: incoming, outgoing and amq-mesh:
```shell
    $ oc create -f json/amq-service.json
```

* Create the A-MQ broker service account (optional, but remove the reference from the DC and forget about Kube discovery type if you want to run without it):
```shell
    $ oc create -f json/amq-svc-account.json
```

### edit and create the two brokers

We have two options with the brokers. We can either use the DNS or the Kube API
mesh discovery type.

The DNS discovery type is excellent because it is lightweight, requires no
special privileges and works nicely across projects (provided you have a
cross-project SDN established).

The Kube API discovery type is simpler to set up (no project references) but
requires a special privilege for the serviceaccount used to run the broker
pods, and will only work if all the brokers are defined in the same project.

Edit the deployment configurations in `amq-incoming.json` and
`amq-outgoing.json` to select the discovery type (and fill in your project
name).

* option 1: use the internal DNS for resolving service endpoints
    (replace "`<project-name>`" with the actual project name)

```json
    {
	"name": "AMQ_MESH_DISCOVERY_TYPE",
	"value": "dns"
    },
    {
	"name": "AMQ_MESH_SERVICE_NAME",
	"value": "amq-mesh.<project-name>.svc.cluster.local"
    },
```

* option 2: use Kube API for resolving service endpoints

```json
    {
	"name": "AMQ_MESH_DISCOVERY_TYPE",
	"value": "kube"
    },
    {
	"name": "AMQ_MESH_SERVICE_NAME",
	"value": "amq-mesh"
    },
```

NOTE: You must add the "view" privilege to the service account used to run
  the pods if using the Kube API:

```shell
    $ oc adm policy add-role-to-user view system:serviceaccount:<project-name>:amq-service-account
```

Create the deployment configurations:

```shell
    $ oc create -f amq-incoming.json
    $ oc create -f amq-outgoing.json
```

### start the brokers

Having created the DCs, there are no triggers that would start a deployment, so
do it manually:

```shell
    $ oc deploy amq-incoming --latest
    $ oc deploy amq-outgoing --latest
```

Upon start-up, the last log messages displayed by either broker should be:

```
 INFO | Adding service: [tcp://10.x.y.z:61616, failed:false, connectionFailures:0]
 INFO | Establishing network connection from
	vm://amq-outgoing-x-yyyyy?async=false&network=true to tcp://10.x.y.z:61616
 INFO | Connector vm://amq-outgoing-x-yyyyy started
 INFO | Network connection between vm://amq-outgoing-x-yyyyy#0 and
	tcp:///10.x.y.z:61616@36988 (amq-incoming-x-yyyyy) has been established.
```

This proves that the two brokers have been able to resolve each other's
endpoints through the use of a common service (set by the environment variable
`AMQ_MESH_SERVICE_NAME`).

## deploying the clients

### create new apps

Once the brokers are running, simply create two new apps, the producer and the
consumer.

NOTE: It is recommended to create the producer first, and only proceed to the
consumer once the former one is up and running. This will make debugging any
potential problems easier and also prove that messages will indeed be *stored*,
not just forwarded while both clients are alive and running.

We will be using the `fis-karaf-openshift` image with those to initiate a S2I
build of the OSGi bundles that will eventually do the sending and receiving of
the JMS messages.

NOTE: Since these two sample bundles are just subdirectories of this Git
repository, you need to use the `--context-dir=` option to tell the S2I build
not to invoke Maven from the top level of the Git module.

```shell
$ oc new-app --name=producer --context-dir=producer \
	fis-karaf-openshift~http://github.com/benko/amq-openshift/
$ oc new-app --name=consumer --context-dir=consumer \
	fis-karaf-openshift~http://github.com/benko/amq-openshift/
```

Wait for the builds to finish and the pods to be deployed to start seeing the
messages being passed between the two every 5 seconds (the environment should
already contain the service lookup variables as required to use the services).

### monitor the output

When these two are built and deployed, the following messages of level INFO
should appear at the start in the logs of the producer and consumer pods
(respectively):

*TODO: WTF is up with initializers?*

The following messages of level INFO (among others) should also appear
periodically every 5 seconds, in the logs of the producer and consumer pods
(respectively):

```
yyyy-mm-dd hh:mm:ss,µµµ
| INFO
| #0 - timer://foo
| route1
| 69 - org.apache.camel.camel-core - 2.17.2
| Sending message Ohai! to jms:queue:testQueue
yyyy-mm-dd hh:mm:ss,µµµ
| INFO
| sumer[testQueue]
| route1
| 69 - org.apache.camel.camel-core - 2.17.2
| Got message Ohai! from jms:queue:testQueue
```


text:
package com.blogspot.sontx.chatsocket.server.model.account;

import com.blogspot.sontx.chatsocket.lib.bean.Profile;
import lombok.Data;

@Data
class Account {
    private String id;
    private String username;
    private String passwordHash;
    private Profile profile;
}


text:
import { Injectable } from '@angular/core';

import { ApiHttpService } from './../http/http-api.service';

export class Device {
    public id: string;
    public name: string;
}

class editDeviceRequest {
    public name: string;
}

class DeviceListResponse {
    public devices: Device[];
}

@Injectable()
export class DeviceService {

    constructor(private apiHttpService: ApiHttpService) { }

    getDevices(): Promise<Device[]> {
        return new Promise((resolve, reject) => {
            this.apiHttpService.get('/Application/Device/List')
                .subscribe(response => {
                    let result = <DeviceListResponse>response.json();
                    resolve(result.devices);
                }, error => {
                    reject(error);
                });
        });
    }

    deleteDevice(device: Device): Promise<any> {
        return new Promise((resolve, reject) => {
            this.apiHttpService.delete('/Application/Device/' + device.id)
                .subscribe(response => {
                    resolve(response);
                }, error => {
                    reject(error);
                });
        });
    }

    editDevice(id: string, name: string) {
        let request = new editDeviceRequest();
        request.name = name;

        return new Promise((resolve, reject) => {
            this.apiHttpService.putForm('/Application/Device/' + id, request)
                .subscribe(response => {
                    resolve(response);
                },
                error => {
                    reject(error);
                })
        })
    }
}


text:
The repository contains the PassportPayments SDK (VB)ASP.NET Class Library (PassportPayments.dll) and the PassportPaymentsDemo Sample (VB)ASP.NET Web Application.

## Requirements
 * Sign up for a PassportPayments Merchant account at [passportpayments.com](https://passportpayments.com)
 * VisualStudio 2013 or later

## Setup
### Download
Obtain the latest version of the PassportPayments .Net bindings at:

```
git clone https://github.com/passportpayments/dotnet
```

### Referencing the wrapper
Dependent library references: Newtonsoft.Json.dll

* right click on your solution (dont do the project, do the solution)
* select 'Manage Nuget Packages for Solution'
* If you see JSON.Net in the installed packages list, skip the next two steps.
* click 'online', in the search box type 'newtonsoft'
* click 'Install' on 'Json.NET' (probably, what your looking for might be in another package, I'll ask you to track it down).

Now add the PassportPayments wrapper refernce:

* In Solution Explorer, select your Web project.
* On the Website menu (for Web site projects) or the Project menu (for Web application projects), choose Add Reference. Alternatively, you can right-click the name of your Web project in Solution Explorer and then select Add Reference.
* The Add Reference dialog box is displayed.
* Select the Browse tab.
* Browse to the folder that you just cloned and select the PassportPayments.dll under libs folder, and then click OK.
* Adding a reference in this way ensures that all file dependencies (debug files, XML document files, and so on) are copied.

## Getting Started
Namespaces:
PassportPayments.Wrapper

Simple usage looks like:

```aspx-vb
  Dim ppWrapper = New PassportPayments.Wrapper(CLIENT_ID, CLIENT_SECRET, API_URL)
  Dim apiResponse As GetCustomersResponse = ppWrapper.getCustomers()
  If (apiResponse.getResponseType() = PResponseStatus.RESPONSE_STATUS_SUCCESS) Then
      'Do Something with apiResponse.getData()
      Me.Label1.Text = apiResponse.getData().ToString()
  Else
      Me.Label1.Text = apiResponse.getError()
  End If

```

## Documentation
Please see [PassportPayments API docs](https://api.passportpayments.com/docs/?vb#) for up-to-date documentation.

## Tests
###Pre-requisites

* Visual Studio 2013 (.NET Framework 4.5) or higher Or
* Visual Studio 2012 (.NET Framework 4.5) or higher

### Please note: bin and obj folders
Please delete the bin and obj folders before switching between different versions of Visual Studio

### Loading the app
* open Visual Studio
* File > Open > Project/Solution
* Browse to the folder that you just cloned and select PassportPayments.sln
* Add libs reference
* Open AppConfig.vb, Fill in your **client Id**, **client Secret**, **apiUrl** provided

```
  Const API_URL = "https://sandbox.passportpayments.com/"
  Const CLIENT_ID = "xxxx"
  Const CLIENT_SECRET = "yyyyyyyy"
```
* Open Scripts/config.js, add your appKey provided
```js
  var API_END_POINT = "https://sandbox.passportpayments.com/";
  var APP_KEY = "APP_KEY";
```
* Enter F9
* This should load the app in your default browser

Note: The sample app uses [JS Client Lib](https://github.com/passportpayments/js) You can use any of PassportPayments' client librares for your app


text:
<template name="manageSites">

Manage Sites

        Add Site
        Export Sites
        Import Sites

        {{> tabular table=TabularTables.Sites class="table table-striped table-bordered table-condensed"}}

</template>

<template name="addSite">

Add a Site

  {{> quickForm collection="Sites" id="insertSitesForm" type="insert" style="padding: 45px;"}}

</template>

<template name="editSiteButton">
  Edit Site

</template>

<template name="editSite">

Edit Site

      {{> quickForm collection="Sites" doc=currentSite id="updateSitesForm" type="update" style="padding: 45px;"}}
      Cancel

</template>


text:
package net.didion.jwnl.dictionary.morph;

import net.didion.jwnl.JWNLException;
import net.didion.jwnl.JWNLRuntimeException;
import net.didion.jwnl.data.IndexWord;
import net.didion.jwnl.data.POS;
import net.didion.jwnl.dictionary.Dictionary;
import net.didion.jwnl.dictionary.MorphologicalProcessor;
import net.didion.jwnl.dictionary.POSKey;
import net.didion.jwnl.util.cache.Cache;
import net.didion.jwnl.util.cache.LRUCache;
import net.didion.jwnl.util.factory.Param;
import net.didion.jwnl.util.factory.ParamList;

import java.util.List;
import java.util.Map;

/**
 * Default implementation of MorphologicalProcessor. This isn't a true
 * morpological analyzer (it doesn't figure out all the characteristics of each word
 * it processes). This is basically a stemmer that uses WordNet exception files instead
 * of complex stemming rules. It also tries to be intelligent by removing delimiters and
 * doing concatanation.
 */
public class DefaultMorphologicalProcessor implements MorphologicalProcessor {
	/** Parameter that determines the size of the base form cache */
	public static final String CACHE_CAPACITY = "cache_capacity";
	/** Parameter that determines the operations this morphological processor will perform */
	public static final String OPERATIONS = "operations";

	private static final int DEFAULT_CACHE_CAPACITY = 1000;

	private Cache _lookupCache;;
	private Operation[] _operations;

	public DefaultMorphologicalProcessor() {
	}

	public DefaultMorphologicalProcessor(Operation[] operations) {
		this(operations, DEFAULT_CACHE_CAPACITY);
	}

	public DefaultMorphologicalProcessor(Operation[] operations, int cacheCapacity) {
		_lookupCache = new LRUCache(cacheCapacity);
		_operations = operations;
	}

	public Object create(Map params) throws JWNLException {
		ParamList operationParams = (ParamList) params.get(OPERATIONS);
		if (operationParams == null) {
			throw new JWNLException("DICTIONARY_EXCEPTION_026");
		}
		List operations = (List)operationParams.create();
		Operation[] operationArray = (Operation[])operations.toArray(new Operation[operations.size()]);

		Param param = (Param) params.get(CACHE_CAPACITY);
		int capacity = (param == null) ?
		    DEFAULT_CACHE_CAPACITY : new Integer(param.getValue()).intValue();

		return new DefaultMorphologicalProcessor(operationArray, capacity);
	}

	/**
	 * Lookup the base form of a word. Given a lemma, finds the WordNet
	 * entry most like that lemma. This function returns the first base form
	 * found. Subsequent calls to this function with the same part-of-speech
	 * and word will return the same base form. To find another base form for
	 * the pos/word, call lookupNextBaseForm.
	 * @param pos the part-of-speech of the word to look up
	 * @param derivation the word to look up
	 * @return IndexWord the IndexWord found during lookup
	 */
	public IndexWord lookupBaseForm(POS pos, String derivation) throws JWNLException {
		// See if we've already looked this word up
		LookupInfo info = getCachedLookupInfo(new POSKey(pos, derivation));
		if (info != null && info.getBaseForms().isCurrentFormAvailable()) {
			// get the last base form we retrieved. if you want
			// the next possible base form, use lookupNextBaseForm
			return Dictionary.getInstance().getIndexWord(pos, info.getBaseForms().getCurrentForm());
		} else {
			return lookupNextBaseForm(pos, derivation, info);
		}
	}

	private void cacheLookupInfo(POSKey key, LookupInfo info) {
		_lookupCache.put(key, info);
	}

	private LookupInfo getCachedLookupInfo(POSKey key) {
		return (LookupInfo) _lookupCache.get(key);
	}

	/**
	 * Lookup the next base form of a pos/word pair. If a base form has not
	 * yet been found for the pos/word, it will find the first base form,
	 * otherwise it will find the next base form.
	 * @param pos the part-of-speech of the word to look up
	 * @param derivation the word to look up
	 * @return IndexWord the IndexWord found during lookup, or null if an IndexWord is not found
	 */
	private IndexWord lookupNextBaseForm(POS pos, String derivation, LookupInfo info) throws JWNLException {
		if (derivation.equals("") || derivation == null) {
			return null;
		}

		String str = null;
		if (info == null) {
			POSKey key = new POSKey(pos, derivation);
			info = getCachedLookupInfo(key);
			if (info == null) {
				info = new LookupInfo(pos, derivation, _operations);
				cacheLookupInfo(key, info);
			}
		}

		// if we've already found another possible base form, return that one
		if (info.getBaseForms().isMoreFormsAvailable()) {
			str = info.getBaseForms().getNextForm();
		} else {
			while (str == null && info.isNextOperationAvailable() && !info.executeNextOperation());
			if (info.getBaseForms().isMoreFormsAvailable()) {
				str = info.getBaseForms().getNextForm();
			}
		}

		return (str == null) ? null : Dictionary.getInstance().getIndexWord(pos, str);
	}

	public List lookupAllBaseForms(POS pos, String derivation) throws JWNLException {
		LookupInfo info = getCachedLookupInfo(new POSKey(pos, derivation));
		if (info == null) {
			info = new LookupInfo(pos, derivation, _operations);
			cacheLookupInfo(new POSKey(pos, derivation), info);
		}
		int index = info.getBaseForms().getIndex();
		while (info.isNextOperationAvailable()) {
			lookupNextBaseForm(pos, derivation, info);
		}
		info.getBaseForms().setIndex(index);
		return info.getBaseForms().getForms();
	}

	private class LookupInfo {
		private POS _pos;
		private String _derivation;
		private BaseFormSet _baseForms;
		private Operation[] _operations;
		private int _currentOperation;

		public LookupInfo(POS pos, String derivation, Operation[] operations) {
			_pos = pos;
			_derivation = derivation;
			_operations = operations;
			_baseForms = new BaseFormSet();
			_currentOperation = -1;
		}

		public boolean isNextOperationAvailable() {
			return _currentOperation + 1 < _operations.length;
		}

		public boolean executeNextOperation() throws JWNLException {
			if (!isNextOperationAvailable()) {
				throw new JWNLRuntimeException("DICTIONARY_EXCEPTION_027");
			}
			Operation oper = _operations[++_currentOperation];
			return oper.execute(_pos, _derivation, _baseForms);
		}

		public BaseFormSet getBaseForms() {
			return _baseForms;
		}
	}
}


text:
<?php
/**
 * EWKT (Extended Well Known Text) Adapter
 */
class EWKT extends WKT
{

  /**
   * Serialize geometries into an EWKT string.
   *
   * @param Geometry $geometry
   *
   * @return string The Extended-WKT string representation of the input geometries
   */
  public function write(Geometry $geometry) {
    $srid = $geometry->SRID();
    $wkt = '';
    if ($srid) {
      $wkt = 'SRID=' . $srid . ';';
      $wkt .= $geometry->out('wkt');
      return $wkt;
    }
    else {
      return $geometry->out('wkt');
    }
  }
}


text:
using namespace std;
using namespace google::protobuf;

#define CHECK_STR_OPT(chkname)	\
if (strcmp(name_, #chkname) == 0){\
	string chkname_val = proto_desc->options().GetExtension(chkname); \
	return chkname_val; \
}

#define CHECK_INT_OPT(chkname, chktype)	\
if (strcmp(name_, #chkname) == 0){\
	chktype chkname_val = proto_desc->options().GetExtension(chkname); \
	return to_string(chkname_val); \
}

string proto_msg_opt(const Descriptor * proto_desc, const char * name_){
	CHECK_STR_OPT(m_pks);
	CHECK_STR_OPT(m_divkey);
	CHECK_INT_OPT(m_divnum, uint32_t);
	CHECK_STR_OPT(m_cn);
	CHECK_STR_OPT(m_desc);
	CHECK_STR_OPT(m_relchk);
	CHECK_STR_OPT(m_autoinc);
	return "";
}
string proto_field_opt(const FieldDescriptor * proto_desc, const char * name_){
	CHECK_STR_OPT(f_cn);
	CHECK_STR_OPT(f_count);
	CHECK_STR_OPT(f_desc);
	CHECK_STR_OPT(f_length);
	return "";
}
string proto_enum_opt(const EnumValueDescriptor * proto_desc, const char * name_){
	CHECK_STR_OPT(e_cn);
	CHECK_STR_OPT(e_desc);
	return "";
}


text:
from __future__ import print_function

import argparse

from bloom.git import branch_exists
from bloom.git import checkout
from bloom.git import create_branch
from bloom.git import ensure_clean_working_env
from bloom.git import ensure_git_root
from bloom.git import get_commit_hash
from bloom.git import get_current_branch
from bloom.git import ls_tree
from bloom.git import tag_exists
from bloom.git import track_branches

from bloom.logging import ansi
from bloom.logging import debug
from bloom.logging import error
from bloom.logging import info
from bloom.logging import log_prefix
from bloom.logging import warning

from bloom.commands.git.patch.common import get_patch_config
from bloom.commands.git.patch.common import set_patch_config

from bloom.util import add_global_arguments
from bloom.util import handle_global_arguments
from bloom.util import maybe_continue

@log_prefix('[git-bloom-branch]: ')
def execute_branch(src, dst, interactive, directory=None):
    """
    Changes to the destination branch, creates branch and patches/branch
    if they do not exist.

    If the dst branch does not exist yet, then it is created by branching the
    current working branch or the specified SRC_BRANCH.

    If the patches/dst branch branch does not exist yet then it is created.

    If the branches are created successful, then the working branch will be
    set to the dst branch, otherwise the working branch will remain unchanged.

    :param src: source branch from which to copy
    :param dst: destination branch
    :param interactive: if True actions are summarized before committing
    :param directory: directory in which to preform this action

    :raises: subprocess.CalledProcessError if any git calls fail
    """
    # Determine if the srouce branch exists
    if src is None:
        error("No source specified and/or not a branch currently", exit=True)
    if branch_exists(src, local_only=False, directory=directory):
        if not branch_exists(src, local_only=True, directory=directory):
            debug("Tracking source branch: {0}".format(src))
            track_branches(src, directory)
    elif tag_exists(src):
        pass
    else:
        error("Specified source branch does not exist: {0}".format(src),
              exit=True)

    # Determine if the destination branch needs to be created
    create_dst_branch = False
    if branch_exists(dst, local_only=False, directory=directory):
        if not branch_exists(dst, local_only=True, directory=directory):
            debug("Tracking destination branch: {0}".format(dst))
            track_branches(dst, directory)
    else:
        create_dst_branch = True

    # Determine if the destination patches branch needs to be created
    create_dst_patches_branch = False
    dst_patches = 'patches/' + dst
    if branch_exists(dst_patches, False, directory=directory):
        if not branch_exists(dst_patches, True, directory=directory):
            track_branches(dst_patches, directory)
    else:
        create_dst_patches_branch = True

    # Summarize
    if interactive:
        info("Summary of changes:")
        if create_dst_branch:
            info(" " * 22 + "- The specified destination branch, " +
                 ansi('boldon') + dst + ansi('reset') +
                 ", does not exist; it will be created from the source "
                 "branch " + ansi('boldon') + src + ansi('reset'))
        if create_dst_patches_branch:
            info(" " * 22 + "- The destination patches branch, " +
                 ansi('boldon') + dst_patches + ansi('reset') +
                 ", does not exist; it will be created")
        info(" " * 22 + "- The working branch will be set to " +
             ansi('boldon') + dst + ansi('reset'))
        if not maybe_continue():
            error("Answered no to continue, aborting.", exit=True)

    # Make changes to the layout
    current_branch = get_current_branch(directory)
    try:
        # Change to the src branch
        checkout(src, directory=directory)
        # Create the dst branch if needed
        if create_dst_branch:
            create_branch(dst, changeto=True, directory=directory)
        else:
            checkout(dst, directory=directory)
        # Create the dst patches branch if needed
        if create_dst_patches_branch:
            create_branch(dst_patches, orphaned=True, directory=directory)
        # Create the starting config data if it does not exist
        patches_ls = ls_tree(dst_patches, directory=directory)
        if 'patches.conf' not in patches_ls:
            # Patches config not setup, set it up
            config = {
                'parent': src,
                'previous': '',
                'base': get_commit_hash(dst, directory=directory),
                'trim': '',
                'trimbase': ''
            }
            set_patch_config(dst_patches, config, directory=directory)
        else:
            config = get_patch_config(dst_patches, directory=directory)
            if config['parent'] != src:
                warning("Updated parent to '{0}' from '{1}'"
                        .format(src, config['parent']))
                config['parent'] = src
                config['base'] = get_commit_hash(dst, directory=directory)
            set_patch_config(dst_patches, config, directory=directory)
        # Command successful, do not switch back to previous branch
        current_branch = None
    finally:
        if current_branch is not None:
            checkout(current_branch, directory=directory)

def get_parser():
    parser = argparse.ArgumentParser(description="""\
If the DESTINATION_BRANCH does not exist yet, then it is created by
branching the current working branch or the specified SOURCE_BRANCH.

If the patches/DESTINATION_BRANCH branch does not exist yet then it is created.

If the branches are created successful, then the working branch will be set to
the DESTINATION_BRANCH, otherwise the working branch will remain unchanged.
""", formatter_class=argparse.RawTextHelpFormatter)
    add = parser.add_argument
    add('destination_branch', metavar='DESTINATION_BRANCH',
        help="destination branch name")
    add('-s', '--src', '--source-branch', metavar='SOURCE_BRANCH', dest='src',
        help="(optional) specifies which local git branch to branch from")
    add('-i', '--interactive', dest='interactive',
        help="asks before committing any changes",
        action='store_true', default=False)
    return parser

def main(sysargs=None):
    from bloom.config import upconvert_bloom_to_config_branch
    upconvert_bloom_to_config_branch()

    parser = get_parser()
    parser = add_global_arguments(parser)
    args = parser.parse_args(sysargs)
    handle_global_arguments(args)

    # Check that the current directory is a serviceable git/bloom repo
    try:
        ensure_clean_working_env()
        ensure_git_root()
    except SystemExit:
        parser.print_usage()
        raise

    # If the src argument isn't set, use the current branch
    if args.src is None:
        args.src = get_current_branch()
    # Execute the branching
    execute_branch(args.src, args.destination_branch, args.interactive)