text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="e1e7e826-64f9-4144-8d0b-0d370ee23761" name="Default" comment="">
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/notes/computer_vision/face.md" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/notes/deep_learning/acceleration.md" />
      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/notes/productive_tools/git.md" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/index.html" afterPath="$PROJECT_DIR$/index.html" />
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/notes/productive_tools/tools_usage.md" afterPath="$PROJECT_DIR$/notes/productive_tools/tools_usage.md" />
    </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="FileEditorManager">
    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
      <file leaf-file-name="index.html" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/index.html">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="663">
              <caret line="93" column="17" lean-forward="false" selection-start-line="93" selection-start-column="17" selection-end-line="93" selection-end-column="17" />
              <folding>
                <element signature="n#div#0;n#div#1;n#!!top" expanded="false" />
                <element signature="n#div#1;n#div#1;n#!!top" expanded="false" />
                <element signature="n#div#2;n#div#1;n#!!top" expanded="false" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="FindInProjectRecents">
    <findStrings>
      <find>av</find>
      <find>date</find>
      <find>Notes</find>
    </findStrings>
  </component>
  <component name="Git.Settings">
    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
    <option name="PUSH_TAGS">
      <GitPushTagMode />
    </option>
  </component>
  <component name="IdeDocumentHistory">
    <option name="CHANGED_PATHS">
      <list>
        <option value="$PROJECT_DIR$/_includes/docs_contents.html" />
        <option value="$PROJECT_DIR$/_includes/docs_ul.html" />
        <option value="$PROJECT_DIR$/_includes/docs_contents_mobile.html" />
        <option value="$PROJECT_DIR$/_includes/docs_option.html" />
        <option value="$PROJECT_DIR$/_layouts/news.html" />
        <option value="$PROJECT_DIR$/_layouts/page.html" />
        <option value="$PROJECT_DIR$/_layouts/error.html" />
        <option value="$PROJECT_DIR$/_includes/anchor_links.html" />
        <option value="$PROJECT_DIR$/_includes/analytics.html" />
        <option value="$PROJECT_DIR$/_includes/new_contents_mobile.html" />
        <option value="$PROJECT_DIR$/_includes/news_contents.html" />
        <option value="$PROJECT_DIR$/_includes/news_item.html" />
        <option value="$PROJECT_DIR$/_layouts/news_item.html" />
        <option value="$PROJECT_DIR$/_layouts/tutorials.html" />
        <option value="$PROJECT_DIR$/_includes/header.html" />
        <option value="$PROJECT_DIR$/_includes/top.html" />
        <option value="$PROJECT_DIR$/_docs/machine_learning/baseline.md" />
        <option value="$PROJECT_DIR$/_docs/index.md" />
        <option value="$PROJECT_DIR$/_docs/deep_learning/image classification.md" />
        <option value="$PROJECT_DIR$/_docs/deep_learning/image_classification.md" />
        <option value="$PROJECT_DIR$/_docs/deep_learning/index.md" />
        <option value="$PROJECT_DIR$/_docs/productive_tools/docker.md" />
        <option value="$PROJECT_DIR$/_docs/productive_tools/index.md" />
        <option value="$PROJECT_DIR$/_includes/primary-nav-items.html" />
        <option value="$PROJECT_DIR$/_includes/section_nav.html" />
        <option value="$PROJECT_DIR$/_data/docs.yml" />
        <option value="$PROJECT_DIR$/_docs/productive_tools/dev-tools.md" />
        <option value="$PROJECT_DIR$/_docs/productive_tools/tensorflow-seving.md" />
        <option value="$PROJECT_DIR$/_layouts/default.html" />
        <option value="$PROJECT_DIR$/Gemfile" />
        <option value="$PROJECT_DIR$/Readme.md" />
        <option value="$PROJECT_DIR$/notes/readme.md" />
        <option value="$PROJECT_DIR$/.gitignore" />
        <option value="$PROJECT_DIR$/_config.yml" />
        <option value="$PROJECT_DIR$/notes/index.md" />
        <option value="$PROJECT_DIR$/mirrors.md" />
        <option value="$PROJECT_DIR$/notes/test.md" />
        <option value="$PROJECT_DIR$/notes/deep_learning/image_classification.md" />
        <option value="$PROJECT_DIR$/notes/productive_tools/docker.md" />
        <option value="$PROJECT_DIR$/notes/productive_tools/mirrors.md" />
        <option value="$PROJECT_DIR$/notes/computer_vision/image_classification.md" />
        <option value="$PROJECT_DIR$/notes/computer_vision/object_detection.md" />
        <option value="$PROJECT_DIR$/notes/computer_vision/segmentation.md" />
        <option value="$PROJECT_DIR$/notes/machine_learning/overview.md" />
        <option value="$PROJECT_DIR$/notes/deep_learning/regularization.md" />
        <option value="$PROJECT_DIR$/notes/deep_learning/acceleration.md" />
        <option value="$PROJECT_DIR$/notes/computer_vision/facial_landmark.md" />
        <option value="$PROJECT_DIR$/notes/computer_vision/face.md" />
        <option value="$PROJECT_DIR$/index.html" />
        <option value="$PROJECT_DIR$/notes/productive_tools/tools_usage.md" />
        <option value="$PROJECT_DIR$/notes/productive_tools/git.md" />
      </list>
    </option>
  </component>
  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
  <component name="JsGulpfileManager">
    <detection-done>true</detection-done>
    <sorting>DEFINITION_ORDER</sorting>
  </component>
  <component name="ProjectFrameBounds" fullScreen="true">
    <option name="width" value="1440" />
    <option name="height" value="900" />
  </component>
  <component name="ProjectLevelVcsManager">
    <ConfirmationsSetting value="2" id="Add" />
  </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="Scope" />
      <pane id="ProjectPane">
        <subPane>
          <expand>
            <path>
              <item name="lsy643.github.io" type="b2602c69:ProjectViewProjectNode" />
              <item name="lsy643.github.io" type="462c0819:PsiDirectoryNode" />
            </path>
            <path>
              <item name="lsy643.github.io" type="b2602c69:ProjectViewProjectNode" />
              <item name="lsy643.github.io" type="462c0819:PsiDirectoryNode" />
              <item name="notes" type="462c0819:PsiDirectoryNode" />
            </path>
            <path>
              <item name="lsy643.github.io" type="b2602c69:ProjectViewProjectNode" />
              <item name="lsy643.github.io" type="462c0819:PsiDirectoryNode" />
              <item name="notes" type="462c0819:PsiDirectoryNode" />
              <item name="productive_tools" type="462c0819:PsiDirectoryNode" />
            </path>
          </expand>
          <select />
        </subPane>
      </pane>
      <pane id="Scratches" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="WebServerToolWindowFactoryState" value="false" />
    <property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
    <property name="add_unversioned_files" value="true
/home/siyuanli/Codes/tf_lab/lsy643.github.io/_site/404.html" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$/about" />
    <property name="ignore_missing_gitignore" value="true" />
  </component>
  <component name="RecentsManager">
    <key name="MoveFile.RECENT_KEYS">
      <recent name="$PROJECT_DIR$/notes/computer_vision" />
      <recent name="$PROJECT_DIR$/notes" />
      <recent name="$PROJECT_DIR$" />
      <recent name="$PROJECT_DIR$/notes/productive_tools" />
      <recent name="$PROJECT_DIR$/_docs/deep_learning" />
    </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">
    <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
      <node-interpreter>project</node-interpreter>
      <node-options />
      <gulpfile />
      <tasks />
      <arguments />
      <envs />
    </configuration>
    <configuration default="true" type="BashConfigurationType" factoryName="Bash">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="INTERPRETER_PATH" value="/bin/bash" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="PARENT_ENVS" value="true" />
      <option name="SCRIPT_NAME" value="" />
      <option name="PARAMETERS" value="" />
      <module name="" />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="DjangoTestsConfigurationType" factoryName="Django tests">
      <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="lsy643.github.io" />
      <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
      <option name="TARGET" value="" />
      <option name="SETTINGS_FILE" value="" />
      <option name="CUSTOM_SETTINGS" value="false" />
      <option name="USE_OPTIONS" value="false" />
      <option name="OPTIONS" value="" />
      <method />
    </configuration>
    <configuration default="true" type="JavaScriptTestRunnerJest" factoryName="Jest">
      <node-interpreter value="project" />
      <working-dir value="" />
      <envs />
      <scope-kind value="ALL" />
      <method />
    </configuration>
    <configuration default="true" type="JavaScriptTestRunnerProtractor" factoryName="Protractor">
      <config-file value="" />
      <node-interpreter value="project" />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
      <method />
    </configuration>
    <configuration default="true" type="PyBehaveRunConfigurationType" factoryName="Behave">
      <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="lsy643.github.io" />
      <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
      <option name="ADDITIONAL_ARGS" value="" />
      <method />
    </configuration>
    <configuration default="true" type="PyLettuceRunConfigurationType" factoryName="Lettuce">
      <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="lsy643.github.io" />
      <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
      <option name="ADDITIONAL_ARGS" value="" />
      <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="lsy643.github.io" />
      <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
      <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" />
      <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
      <module name="lsy643.github.io" />
      <method />
    </configuration>
    <configuration default="true" type="js.build_tools.npm" factoryName="npm">
      <command value="run" />
      <scripts />
      <node-interpreter value="project" />
      <envs />
      <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="lsy643.github.io" />
      <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
      <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="Nosetests">
      <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="lsy643.github.io" />
      <EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
      <option name="_new_regexPattern" value="""" />
      <option name="_new_additionalArguments" value="""" />
      <option name="_new_target" value=""."" />
      <option name="_new_targetType" value=""PATH"" />
      <method />
    </configuration>
  </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="e1e7e826-64f9-4144-8d0b-0d370ee23761" name="Default" comment="" />
      <created>1493298756939</created>
      <option name="number" value="Default" />
      <option name="presentableId" value="Default" />
      <updated>1493298756939</updated>
    </task>
    <task id="LOCAL-00001" summary="add readme">
      <created>1493299205947</created>
      <option name="number" value="00001" />
      <option name="presentableId" value="LOCAL-00001" />
      <option name="project" value="LOCAL" />
      <updated>1493299205947</updated>
    </task>
    <task id="LOCAL-00002" summary="copy from others">
      <created>1493299994344</created>
      <option name="number" value="00002" />
      <option name="presentableId" value="LOCAL-00002" />
      <option name="project" value="LOCAL" />
      <updated>1493299994344</updated>
    </task>
    <task id="LOCAL-00003" summary="copy from others">
      <created>1493300236433</created>
      <option name="number" value="00003" />
      <option name="presentableId" value="LOCAL-00003" />
      <option name="project" value="LOCAL" />
      <updated>1493300236433</updated>
    </task>
    <task id="LOCAL-00004" summary="whatever">
      <created>1496461119037</created>
      <option name="number" value="00004" />
      <option name="presentableId" value="LOCAL-00004" />
      <option name="project" value="LOCAL" />
      <updated>1496461119037</updated>
    </task>
    <task id="LOCAL-00005" summary="whatever">
      <created>1496467998043</created>
      <option name="number" value="00005" />
      <option name="presentableId" value="LOCAL-00005" />
      <option name="project" value="LOCAL" />
      <updated>1496467998043</updated>
    </task>
    <task id="LOCAL-00006" summary="tools">
      <created>1496468684271</created>
      <option name="number" value="00006" />
      <option name="presentableId" value="LOCAL-00006" />
      <option name="project" value="LOCAL" />
      <updated>1496468684271</updated>
    </task>
    <task id="LOCAL-00007" summary="tools">
      <created>1496468741127</created>
      <option name="number" value="00007" />
      <option name="presentableId" value="LOCAL-00007" />
      <option name="project" value="LOCAL" />
      <updated>1496468741127</updated>
    </task>
    <task id="LOCAL-00008" summary="docker">
      <created>1496470007578</created>
      <option name="number" value="00008" />
      <option name="presentableId" value="LOCAL-00008" />
      <option name="project" value="LOCAL" />
      <updated>1496470007578</updated>
    </task>
    <task id="LOCAL-00009" summary="docker">
      <created>1496474043930</created>
      <option name="number" value="00009" />
      <option name="presentableId" value="LOCAL-00009" />
      <option name="project" value="LOCAL" />
      <updated>1496474043930</updated>
    </task>
    <task id="LOCAL-00010" summary="repair links">
      <created>1498290618858</created>
      <option name="number" value="00010" />
      <option name="presentableId" value="LOCAL-00010" />
      <option name="project" value="LOCAL" />
      <updated>1498290618858</updated>
    </task>
    <task id="LOCAL-00011" summary="add theme">
      <created>1498291284693</created>
      <option name="number" value="00011" />
      <option name="presentableId" value="LOCAL-00011" />
      <option name="project" value="LOCAL" />
      <updated>1498291284693</updated>
    </task>
    <task id="LOCAL-00012" summary="serving markdown">
      <created>1498297059321</created>
      <option name="number" value="00012" />
      <option name="presentableId" value="LOCAL-00012" />
      <option name="project" value="LOCAL" />
      <updated>1498297059322</updated>
    </task>
    <task id="LOCAL-00013" summary="tool markdown">
      <created>1498308109003</created>
      <option name="number" value="00013" />
      <option name="presentableId" value="LOCAL-00013" />
      <option name="project" value="LOCAL" />
      <updated>1498308109003</updated>
    </task>
    <task id="LOCAL-00014" summary="tool markdown">
      <created>1498308198030</created>
      <option name="number" value="00014" />
      <option name="presentableId" value="LOCAL-00014" />
      <option name="project" value="LOCAL" />
      <updated>1498308198030</updated>
    </task>
    <task id="LOCAL-00015" summary="tool markdown">
      <created>1498308263457</created>
      <option name="number" value="00015" />
      <option name="presentableId" value="LOCAL-00015" />
      <option name="project" value="LOCAL" />
      <updated>1498308263457</updated>
    </task>
    <task id="LOCAL-00016" summary="clean">
      <created>1498308732517</created>
      <option name="number" value="00016" />
      <option name="presentableId" value="LOCAL-00016" />
      <option name="project" value="LOCAL" />
      <updated>1498308732517</updated>
    </task>
    <task id="LOCAL-00017" summary="what the hell">
      <created>1498375490074</created>
      <option name="number" value="00017" />
      <option name="presentableId" value="LOCAL-00017" />
      <option name="project" value="LOCAL" />
      <updated>1498375490074</updated>
    </task>
    <task id="LOCAL-00018" summary="what the hell">
      <created>1498375866106</created>
      <option name="number" value="00018" />
      <option name="presentableId" value="LOCAL-00018" />
      <option name="project" value="LOCAL" />
      <updated>1498375866106</updated>
    </task>
    <task id="LOCAL-00019" summary="what the hell">
      <created>1498376731136</created>
      <option name="number" value="00019" />
      <option name="presentableId" value="LOCAL-00019" />
      <option name="project" value="LOCAL" />
      <updated>1498376731136</updated>
    </task>
    <task id="LOCAL-00020" summary="what the hell">
      <created>1498376965449</created>
      <option name="number" value="00020" />
      <option name="presentableId" value="LOCAL-00020" />
      <option name="project" value="LOCAL" />
      <updated>1498376965449</updated>
    </task>
    <task id="LOCAL-00021" summary="mother fucker">
      <created>1498378406458</created>
      <option name="number" value="00021" />
      <option name="presentableId" value="LOCAL-00021" />
      <option name="project" value="LOCAL" />
      <updated>1498378406458</updated>
    </task>
    <task id="LOCAL-00022" summary="mother fucker">
      <created>1498378646091</created>
      <option name="number" value="00022" />
      <option name="presentableId" value="LOCAL-00022" />
      <option name="project" value="LOCAL" />
      <updated>1498378646091</updated>
    </task>
    <task id="LOCAL-00023" summary="mother fucker">
      <created>1498378727565</created>
      <option name="number" value="00023" />
      <option name="presentableId" value="LOCAL-00023" />
      <option name="project" value="LOCAL" />
      <updated>1498378727565</updated>
    </task>
    <task id="LOCAL-00024" summary="mother fucker">
      <created>1498378780711</created>
      <option name="number" value="00024" />
      <option name="presentableId" value="LOCAL-00024" />
      <option name="project" value="LOCAL" />
      <updated>1498378780711</updated>
    </task>
    <task id="LOCAL-00025" summary="mirrors">
      <created>1507713871933</created>
      <option name="number" value="00025" />
      <option name="presentableId" value="LOCAL-00025" />
      <option name="project" value="LOCAL" />
      <updated>1507713871933</updated>
    </task>
    <task id="LOCAL-00026" summary="mirrors">
      <created>1507714285223</created>
      <option name="number" value="00026" />
      <option name="presentableId" value="LOCAL-00026" />
      <option name="project" value="LOCAL" />
      <updated>1507714285223</updated>
    </task>
    <task id="LOCAL-00027" summary="framework">
      <created>1507730014715</created>
      <option name="number" value="00027" />
      <option name="presentableId" value="LOCAL-00027" />
      <option name="project" value="LOCAL" />
      <updated>1507730014715</updated>
    </task>
    <option name="localTasksCounter" value="28" />
    <servers />
  </component>
  <component name="ToolWindowManager">
    <frame x="0" y="0" width="1440" height="900" extended-state="0" />
    <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.18731989" 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.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
      <window_info id="Database" 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="Run" 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="2" 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.32736573" sideWeight="0.5" 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.33" sideWeight="0.5" order="7" 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.2497332" 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="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="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="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.22038421" 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="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.32736573" 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="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.33" sideWeight="0.5" order="7" 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="Run" 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="2" 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.32736573" sideWeight="0.5" order="8" 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.33" sideWeight="0.5" order="9" 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="10" 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.17867436" 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="Database" 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="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32847896" 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.2497332" 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="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="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="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.22038421" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
    </layout-to-restore>
  </component>
  <component name="TypeScriptGeneratedFilesManager">
    <option name="version" value="1" />
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="VcsManagerConfiguration">
    <MESSAGE value="add readme" />
    <MESSAGE value="copy from others" />
    <MESSAGE value="whatever" />
    <MESSAGE value="tools" />
    <MESSAGE value="docker" />
    <MESSAGE value="repair links" />
    <MESSAGE value="add theme" />
    <MESSAGE value="serving markdown" />
    <MESSAGE value="tool markdown" />
    <MESSAGE value="clean" />
    <MESSAGE value="what the hell" />
    <MESSAGE value="mother fucker" />
    <MESSAGE value="mirrors" />
    <MESSAGE value="framework" />
    <option name="LAST_COMMIT_MESSAGE" value="framework" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager />
    <watches-manager />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/_docs/machine_learning/baseline.md" />
    <entry file="file://$PROJECT_DIR$/_includes/section_nav_tutorials.html" />
    <entry file="file://$PROJECT_DIR$/_site/issues.html" />
    <entry file="file://$PROJECT_DIR$/_site/help/index.html" />
    <entry file="file://$PROJECT_DIR$/notes/deep_learning/index.md" />
    <entry file="file://$PROJECT_DIR$/_posts/2017-06-24-dev-tools.md" />
    <entry file="file://$PROJECT_DIR$/_posts/2017-06-24-tensorflow-serving.md" />
    <entry file="file://$PROJECT_DIR$/blogs/index.html" />
    <entry file="file://$PROJECT_DIR$/_layouts/docs.html" />
    <entry file="file://$PROJECT_DIR$/_layouts/error.html" />
    <entry file="file://$PROJECT_DIR$/_layouts/page.html">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="322">
          <caret line="14" column="29" lean-forward="false" selection-start-line="14" selection-start-column="29" selection-end-line="14" selection-end-column="29" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/_includes/anchor_links.html" />
    <entry file="file://$PROJECT_DIR$/_includes/docs_contents.html" />
    <entry file="file://$PROJECT_DIR$/_includes/docs_contents_mobile.html" />
    <entry file="file://$PROJECT_DIR$/_includes/docs_option.html" />
    <entry file="file://$PROJECT_DIR$/_includes/docs_ul.html" />
    <entry file="file://$PROJECT_DIR$/_includes/primary-nav-items.html" />
    <entry file="file://$PROJECT_DIR$/_includes/section_nav.html" />
    <entry file="file://$PROJECT_DIR$/_includes/analytics.html" />
    <entry file="file://$PROJECT_DIR$/_includes/top.html" />
    <entry file="file://$PROJECT_DIR$/_layouts/default.html">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="242">
          <caret line="11" column="7" lean-forward="false" selection-start-line="11" selection-start-column="7" selection-end-line="11" selection-end-column="7" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/Gemfile" />
    <entry file="file://$PROJECT_DIR$/_data/docs.yml" />
    <entry file="file://$PROJECT_DIR$/assignments/2017/assignment3.md" />
    <entry file="file://$PROJECT_DIR$/Readme.md" />
    <entry file="file://$PROJECT_DIR$/assignment2_google_cloud.md" />
    <entry file="file://$PROJECT_DIR$/LICENSE">
      <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$/ipython-tutorial.md" />
    <entry file="file://$PROJECT_DIR$/assets/conv-demo/index.html" />
    <entry file="file://$PROJECT_DIR$/_includes/footer.html">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="-571">
          <caret line="7" column="25" lean-forward="false" selection-start-line="7" selection-start-column="25" selection-end-line="7" selection-end-column="25" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/.gitignore">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="46" lean-forward="false" selection-start-line="0" selection-start-column="46" selection-end-line="0" selection-end-column="46" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/_includes/head.html">
      <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$/notes/test.md" />
    <entry file="file://$PROJECT_DIR$/notes/productive_tools/index.md" />
    <entry file="file://$PROJECT_DIR$/_includes/header.html">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="154">
          <caret line="7" column="0" lean-forward="false" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/_config.yml">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="22">
          <caret line="1" column="73" lean-forward="false" selection-start-line="1" selection-start-column="73" selection-end-line="1" selection-end-column="73" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/notes/productive_tools/docker.md" />
    <entry file="file://$PROJECT_DIR$/notes/productive_tools/dev-tools.md" />
    <entry file="file://$PROJECT_DIR$/notes/computer_vision/object_detection.md" />
    <entry file="file://$PROJECT_DIR$/notes/computer_vision/segmentation.md" />
    <entry file="file://$PROJECT_DIR$/css/main.css">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="-4938">
          <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$/notes/deep_learning/regularization.md" />
    <entry file="file://$PROJECT_DIR$/notes/productive_tools/tensorflow-seving.md" />
    <entry file="file://$PROJECT_DIR$/notes/deep_learning/acceleration.md">
      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
        <state split_layout="SPLIT">
          <first_editor relative-caret-position="352">
            <caret line="16" column="8" lean-forward="false" selection-start-line="16" selection-start-column="8" selection-end-line="16" selection-end-column="8" />
            <folding />
          </first_editor>
          <second_editor />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/notes/machine_learning/overview.md">
      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
        <state split_layout="SPLIT">
          <first_editor 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 />
          </first_editor>
          <second_editor />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/notes/computer_vision/face.md">
      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
        <state split_layout="FIRST">
          <first_editor relative-caret-position="259">
            <caret line="19" column="0" lean-forward="false" selection-start-line="19" selection-start-column="0" selection-end-line="19" selection-end-column="0" />
            <folding />
          </first_editor>
          <second_editor />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/notes/productive_tools/mirrors.md">
      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
        <state split_layout="SPLIT">
          <first_editor relative-caret-position="-127">
            <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="4" selection-end-column="3" />
            <folding />
          </first_editor>
          <second_editor />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/notes/computer_vision/image_classification.md">
      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
        <state split_layout="SPLIT">
          <first_editor relative-caret-position="0">
            <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="4" selection-end-column="3" />
            <folding />
          </first_editor>
          <second_editor />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/notes/productive_tools/git.md">
      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
        <state split_layout="SPLIT">
          <first_editor relative-caret-position="264">
            <caret line="12" column="0" lean-forward="true" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
            <folding />
          </first_editor>
          <second_editor />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/notes/productive_tools/tools_usage.md">
      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
        <state split_layout="FIRST">
          <first_editor relative-caret-position="589">
            <caret line="86" column="0" lean-forward="false" selection-start-line="86" selection-start-column="0" selection-end-line="86" selection-end-column="0" />
            <folding />
          </first_editor>
          <second_editor />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/index.html">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="663">
          <caret line="93" column="17" lean-forward="false" selection-start-line="93" selection-start-column="17" selection-end-line="93" selection-end-column="17" />
          <folding>
            <element signature="n#div#0;n#div#1;n#!!top" expanded="false" />
            <element signature="n#div#1;n#div#1;n#!!top" expanded="false" />
            <element signature="n#div#2;n#div#1;n#!!top" expanded="false" />
          </folding>
        </state>
      </provider>
    </entry>
  </component>
</project>


text:
/* eslint no-unused-vars:0 */
import {util} from '../../math';

/**
 * Tw2ParticleConstraint base class
 * - Not implemented yet
 *
 * @property {string|number} _id
 * @property {string} name
 */
export class Tw2ParticleConstraint
{
    constructor()
    {
        this._id = util.generateID();
        this.name = '';
    }

    /**
     * Applies constraints
     * @param {Array} buffers
     * @param {Array} instanceStride
     * @param {number} aliveCount
     * @param {number} dt
     */
    ApplyConstraint(buffers, instanceStride, aliveCount, dt)
    {

    }
}

redpajama_set_name: RedPajamaGithub


text:
import csv
import sys
import json
import pprint
import logging
from GoogleScraper.database import Link, SERP

"""Stores SERP results in the appropriate output format.

Streamline process, one serp object at the time, because GoogleScraper works incrementally.
Furthermore we cannot accumulate all results and then process them, because it would be
impossible to launch lang scrape jobs with millions of keywords.
"""

output_format = 'stdout'
outfile = sys.stdout
csv_fieldnames = set(Link.__table__.columns._data.keys() + SERP.__table__.columns._data.keys()) - {'id', 'serp_id'}

logger = logging.getLogger(__name__)

class JsonStreamWriter():
    """Writes consecutive objects to an json output file."""

    def __init__(self, filename):
        self.file = open(filename, 'wt')
        self.file.write('[')
        self.last_object = None

    def write(self, obj):
        if self.last_object:
            self.file.write(',')
        json.dump(obj, self.file, indent=2, sort_keys=True)
        self.last_object = id(obj)

    def end(self):
        self.file.write(']')
        self.file.close()

class CsvStreamWriter():
    """
    Writes consecutive objects to an csv output file.
    """
    def __init__(self, filename):
        # every row in the csv output file should contain all fields
        # that are in the table definition. Except the id, they have the
        # same name in both tables
        self.file = open(filename, 'wt')
        self.dict_writer = csv.DictWriter(self.file, fieldnames=csv_fieldnames, delimiter=',')
        self.dict_writer.writeheader()

    def write(self, data, serp):
        # one row per link
        for row in data['results']:
            d = row2dict(serp)
            d.update(row)
            d = ({k: v if type(v) is str else v for k, v in d.items() if k in csv_fieldnames})
            self.dict_writer.writerow(d)

    def end(self):
        self.file.close()

def init_outfile(config, force_reload=False):
    global outfile, output_format

    if not outfile or force_reload:

        output_file = config.get('output_filename', '')

        if output_file.endswith('.json'):
            output_format = 'json'
        elif output_file.endswith('.csv'):
            output_format = 'csv'

        # the output files. Either CSV or JSON or STDOUT
        # It's little bit tricky to write the JSON output file, since we need to
        # create the array of the most outer results ourselves because we write
        # results as soon as we get them (it's impossible to hold the whole search in memory).
        if output_format == 'json':
            outfile = JsonStreamWriter(output_file)
        elif output_format == 'csv':
            outfile = CsvStreamWriter(output_file)
        elif output_format == 'stdout':
            outfile = sys.stdout

def store_serp_result(serp, config):
    """Store the parsed SERP page.

    Stores the results from scraping in the appropriate output format.

    Either stdout, json or csv output format.

    This function may be called from a SearchEngineScrape or from
    caching functionality. When called from SearchEngineScrape, then
    a parser object is passed.
    When called from caching, a list of serp object are given.

    Args:
        serp: A serp object
    """
    global outfile, output_format

    if outfile:
        data = row2dict(serp)
        data['results'] = []
        for link in serp.links:
            data['results'].append(row2dict(link))

        if output_format == 'json':
            # The problem here is, that we need to stream write the json data.
            outfile.write(data)
        elif output_format == 'csv':
            outfile.write(data, serp)
        elif output_format == 'stdout':
            if config.get('print_results') == 'summarize':
                print(serp)
            elif config.get('print_results') == 'all':
                pprint.pprint(data)

def row2dict(obj):
    """Convert sql alchemy object to dictionary."""
    d = {}
    for column in obj.__table__.columns:
        d[column.name] = str(getattr(obj, column.name))

    return d

def close_outfile():
    """
    Closes the outfile.
    """
    global outfile
    if output_format in ('json', 'csv'):
        outfile.end()


text:
Node.js middleware for serving a favicon.

## Install

    npm install serve-favicon

## API

### favicon(path, options)

Create new middleware to serve a favicon from the given `path` to a favicon file.
`path` may also be a `Buffer` of the icon to serve.

#### options

  - `maxAge` - cache-control max-age directive in `ms`, defaulting to 1 day.

## Examples

Typically this middleware will come very early in your stack (maybe even first) to avoid processing any other middleware if we already know the request is for `/favicon.ico`.

### express 3.x/4.x

```javascript
var express = require('express');
var favicon = require('serve-favicon');

var app = express();
app.use(favicon(__dirname + '/public/favicon.ico'));

// Add your routes here, etc.

app.listen(3000);
```

### connect

```javascript
var connect = require('connect');
var favicon = require('serve-favicon');

var app = connect();
app.use(favicon(__dirname + '/public/favicon.ico'));

// Add your middleware here, etc.

app.listen(3000);
```

### vanilla http server

This middleware can be used anywhere, even outside express/connect. It takes `req`, `res`, and `callback`.

```javascript
var http = require('http');
var favicon = require('serve-favicon');

var _favicon = favicon(__dirname + '/public/favicon.ico');

var server = http.createServer(function onRequest(req, res) {
  _favicon(req, res, function onNext(err) {
    if (err) {
      res.statusCode = 500;
      res.end();
      return;
    }

    // continue to process the request here, etc.

    res.statusCode = 404;
    res.end('oops');
  });
});

server.listen(3000);
```

## License

[MIT](LICENSE)


text:
// import {FindClass} from '../components/helpers/FindClassList';
//
// export class ProgressBar extends FindClass{
//
//     /**
//      * @return {null}
//      */
//     constructor(progress) {
//         super(progress);
//         this._items = document.getElementsByTagName("progress");
//         if(!this._items) return null;
//         this._values = new FindClass(this._items).get();
//         console.log(this.checkForContentClass());
//     }
//
//     checkForContentClass(){
//         let contents = ['label', 'percentage'];
//
//         for(let i=0; i<this._values.length;i++){
//             if(this._values[i] == 'content'){
//
//                 // //check for label
//                 // if true
//                 //     execute class
//
//                 //check for percentage
//                 // if true
//                 //     execute class
//
//             }else{
//                return null;
//             }
//         }
//
//     }
// }


text:
package org.neo4j.kernel.ha.com.master;

public interface SlavePriority
{
    Iterable<Slave> prioritize( Iterable<Slave> slaves );
}


text:
module Validators
	class EventSpeakerValidator < ActiveModel::Validator
		def validate(record)
			if( record && record.event_type && !record.event_type.speaker_event && record.speaker_id )
				record.errors[:speaker_id] << 'error: you can\'t choose speaker to this eventtype'
			end

			if( record && record.event_type && record.event_type.speaker_event && !record.speaker_id )
				record.errors[:speaker_id] <<  'error: please, start typing speakers name and select speaker from the list'
			end
		end
	end
end


text:
// Main application logic lives here
// by @sauliuz

// These files will be bundled with below JS by Grunt
// to produce bundle.js - for usage in app

// constants used across the funcionality
var userCacheTTL = '';
var apiKey = '';

// TODO: add to config
var projectServiceUrl = 'https://psdev-yt5t7wyhlwjcrfs3sldt4zm6-evals-dev.mbaas1.tom.redhatmobile.com/projects';
var userServiceUrl = 'https://psdev-yt5t7w6ayhgkm527grvejshb-evals-dev.mbaas1.tom.redhatmobile.com/users';
//var projectServiceUrl = 'http://localhost:8002/projects';
//var userServiceUrl = 'http://localhost:8001/users';

// Framework7 stuff
// Init App
var myApp = new Framework7({
    modalTitle: 'SEMAT App',
    // Enable Material theme
    material: true,
    cache: false,
    template7Pages: true
});

// Expose Internal DOM library
var $$ = Dom7;

// Add main view
var mainView = myApp.addView('.view-main');

// General tasks on application startup //

// warn if no network connection
if (!navigator.onLine) {
    myApp.alert('It appears your network connection is down. You need internet connection to use SEMAT App!');
}

// if user is already loged in
// we move him to projects flow
if (localStorage.w7Data && localStorage.w7Data !== ''){
    // debug
    console.log('detected logged in user. moving to projects');
    loadProjects();
}

// returns the MD5 hash of currentlly loged in users email
// or some random email hash ir cannot find the user
function currentUserEmailGravatarHash(){

    var user = '';
    if (localStorage.w7Data && localStorage.w7Data !== ''){
        user = JSON.parse(localStorage.w7Data);
    }
    else {
        user.email = 'random@email.com';
    }

    var gravatarHash = 'https://www.gravatar.com/avatar/'+md5(''+user.email);
    console.log('user gravatar hash: '+gravatarHash);
    return gravatarHash;
}

// global logout function
function logout(){
    console.log('global logout called');
    // delete user data from local storage
    localStorage.w7Data = '';

    // move user to home page
    mainView.router.load({
        url: 'index.html',
        context: {
            logout: 'true'
        }
    });
}

// global load projects
function loadProjects(){

    // 1. first we will check if user has associated project data stored locally
    // 2. if project data is found we are going to display it. if not, validate with project service
    // 3. load up projects page with relevant project information.

    var user = '';
    var gravatarUrl = currentUserEmailGravatarHash();

    if (localStorage.w7Data && localStorage.w7Data !== ''){

        user = JSON.parse(localStorage.w7Data);

        // if user has projects, use local project data
        if (user.projects) {
            var projectData = user.projects;

            // debug
            console.log('user has local projects. using local project data: '+JSON.stringify(projectData));

            // move to projects view
            myApp.hideIndicator();

            mainView.router.load({
                url: 'projects.html',
                context: {
                    firstname: ''+user.firstname,
                    lastname: ''+user.lastname,
                    email: ''+user.email,
                    gravatarUrl: ''+gravatarUrl,
                    projects: projectData
                }
            });
        }
        else {
            // if user has no local project data
            // we ask service for information

            var requestUrl = projectServiceUrl+'/user/'+user.guid;
            console.log('user token: '+user.token);

            $$.ajax({
                url: requestUrl,
                type: "GET",
                contentType: "application/json",
                headers: {'token': user.token},
                success: function(data, status, xhr){
                    // debug
                    console.log('received user projects data: '+data);

                    // better safe then sorry
                    try {
                        var projectsJSON = JSON.parse(data);
                        if (!projectsJSON.status ||  projectsJSON.status !== 'success') {
                            myApp.alert('Cannot parse projects data. Internal error, contact SEMAT app team');
                            return
                        }
                    } catch (e) {
                        myApp.alert('Cannot parse projects data. Internal error, contact SEMAT app team');
                        return
                    }

                    // if user has any associated projects push them to the view
                    if (projectsJSON.projects.length > 0){
                        var projectData = projectsJSON.projects;
                    }
                    else {
                        var projectData = null;
                    }

                    // add the projects to locally stored user profile
                    var localUser = JSON.parse(localStorage.w7Data);
                    localUser.projects = projectData;
                    localStorage.w7Data = JSON.stringify(localUser);

                    console.log(projectData);

                    // move to projects view
                    myApp.hideIndicator();

                    mainView.router.load({
                        url: 'projects.html',
                        context: {
                            firstname: ''+user.firstname,
                            lastname: ''+user.lastname,
                            email: ''+user.email,
                            projects: projectData
                        }
                    });
                },
                error: function(xhr, status ){ // error while communicating with projects service
                    console.log('error from projects service: '+status);

                    if (status == 302){
                        // user token has expired
                        console.log('user token has expired. asking to relogin');
                        myApp.hideIndicator();
                        myApp.alert('We could not access your project information.. Contact SEMAT team');
                        logout();
                    } else {
                        // error while communicating with user service
                        // we cannot show any projects associated with this user
                        myApp.hideIndicator();
                        myApp.alert('We could not access your project information and your project list might be not up to date.');
                        // move to projects view
                        mainView.router.load({
                            url: 'projects.html',
                            context: {
                                firstname: ''+user.firstname,
                                lastname: ''+user.lastname,
                                email: ''+user.email,
                                projects: null
                            }
                        });
                    }
                }
            });
        }
    }
    else {
        // if user is not logged in
        // redirect to standard not logged in flow
        logout();
    }
}

// global method
// reloads user projects from remote services.
// if supplied the specific project id it will reload projects from the remote services first
// and will attempt to load the specific project page

function reloadProjects(projectId){

    // preparing variables
    var user = '';
    var gravatarUrl = currentUserEmailGravatarHash();
    var projectId = typeof projectId !== 'undefined' ?  projectId : '';

    if (localStorage.w7Data && localStorage.w7Data !== ''){

        user = JSON.parse(localStorage.w7Data);

        var requestUrl = projectServiceUrl+'/user/'+user.guid;
        console.log('releading projects for user: '+user.guid);

        $$.ajax({
            url: requestUrl,
            type: "GET",
            contentType: "application/json",
            headers: {'token': user.token},
            success: function(data, status, xhr){
                // debug
                console.log('received user projects data: '+data);

                // better safe then sorry
                try {
                    var projectsJSON = JSON.parse(data);
                    if (!projectsJSON.status ||  projectsJSON.status !== 'success') {
                        myApp.alert('Cannot parse projects data. Internal error, contact SEMAT app team');
                        return
                    }
                } catch (e) {
                    myApp.alert('Cannot parse projects data. Internal error, contact SEMAT app team');
                    return
                }

                // if user has any associated projects push them to the view
                if (projectsJSON.projects.length > 0){
                    var projectData = projectsJSON.projects;
                }
                else {
                    var projectData = null;
                }

                // add the projects to locally stored user profile
                var localUser = JSON.parse(localStorage.w7Data);
                localUser.projects = projectData;
                localStorage.w7Data = JSON.stringify(localUser);

                // move to projects view
                myApp.hideIndicator();

                console.log('I want to load the single project with id: '+projectId);
                // if projectId was supplied we will relead the specific project
                if (projectId !== ''){

                    loadProject(projectId);
                }
                else { // load the main projects page

                    mainView.router.load({
                        url: 'projects.html',
                        context: {
                            firstname: ''+user.firstname,
                            lastname: ''+user.lastname,
                            email: ''+user.email,
                            gravatarUrl: ''+gravatarUrl,
                            projects: projectData
                        }
                    });
                }
            },
            error: function(xhr, status ){ // error while communicating with projects service
                console.log('error from projects service: '+status);

                if (status == 302){
                    // user token has expired
                    console.log('user token has expired. asking to relogin');
                    myApp.hideIndicator();
                    myApp.alert('We could not access your project information.. Contact SEMAT team');
                    logout();
                }
                else {
                    // error while communicating with user service
                    // we cannot show any projects associated with this user
                    myApp.hideIndicator();
                    myApp.alert('We could not access your project information and your project list might be not up to date.');
                    // move to projects view
                    mainView.router.load({
                        url: 'projects.html',
                        context: {
                            firstname: ''+user.firstname,
                            lastname: ''+user.lastname,
                            email: ''+user.email,
                            projects: null
                        }
                    });
                }
            }
        });
    }
    else {
        // if user is not logged in
        // redirect to standard not logged in flow
        logout();
    }
}

// load a single project page
// from by the project id
function loadProject(projectId){

    // 1. search user local projects for the project id to this method
    // 2. load up project page with relevant project information.

    console.log('single project requested with id: '+projectId);

    var user = '';
    if (localStorage.w7Data && localStorage.w7Data !== ''){

        user = JSON.parse(localStorage.w7Data);
        //console.log(user);

        // finding if the project exists in the array
        // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find

        function findProjectId(project) {
            return project.projectid === ''+projectId;
        }
        var selectedProject = user.projects.find(findProjectId);

        // arrange project data before sending to template
        // adding the object name dynamically
        selectedProject.opportunity = {};
        selectedProject.opportunity[selectedProject.semat_alphas.opportunity] = 'true';

        selectedProject.requirements = {};
        selectedProject.requirements[selectedProject.semat_alphas.requirements] = 'true';

        selectedProject.stakeholders = {};
        selectedProject.stakeholders[selectedProject.semat_alphas.stakeholders] = 'true';

        selectedProject.team = {};
        selectedProject.team[selectedProject.semat_alphas.team] = 'true';

        selectedProject.way_of_working = {};
        selectedProject.way_of_working[selectedProject.semat_alphas.way_of_working] = 'true';

        selectedProject.work = {};
        selectedProject.work[selectedProject.semat_alphas.work] = 'true';

        selectedProject.software_system = {};
        selectedProject.software_system[selectedProject.semat_alphas.software_system] = 'true';

        console.log(selectedProject);

        if (selectedProject){
            // project data is now found
            // navigate to single project page
            mainView.router.load({
                url: 'project.html',
                context: {
                    project: selectedProject
                }
            });

        } else {
            // could't find project by id
            // something went wrong, needs to sync projects
            myApp.alert('Cannot retrieve local project information. Please logout and login again in order to sync your projects information.');
            return;
        }

    }
    else {
        // if user is not logged in
        // redirect to standard not logged in flow
        logout();
    }
}

// load history of the single project
function loadProjectHistory(projectId){

    // 1. find user local projects with the project id
    // 2. load up the project history page with relevant history (if exists)

    console.log('loading project history for id: '+projectId);

    var user = '';
    if (localStorage.w7Data && localStorage.w7Data !== ''){

        user = JSON.parse(localStorage.w7Data);
        console.log(user);

        // finding if the project exists in the array
        // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find

        function findProjectId(project) {
            return project.projectid === ''+projectId;
        }
        var selectedProject = user.projects.find(findProjectId);

        // load project history template
        mainView.router.load({
            url: 'project-history.html',
            context: {
                project: selectedProject
            }
        });

    }
    else {
        // if user is not logged in
        // redirect to standard not logged in flow
        logout();
    }
}

/*** Pages & page specific page actions ***/

// Left menu sub-page
myApp.onPageInit('panel-left', function (page) {
    console.log('left menu page');

    // submit logout
    $$('#user-logout').on('click', function () {
        // delete user data from local storage
        localStorage.w7Data = '';

        // move user to home page
        mainView.router.load({
            url: 'index.html',
            context: {
                logout: 'true'
            }
        });
    });
});

// Index page
myApp.onPageInit('index', function (page) {
    console.log('index page init');
});

// Login page
myApp.onPageInit('login', function (page) {

    console.log('login page init');

    if (!navigator.onLine) {
        myApp.alert('It appears your network connection is down. You need internet connection to use SEMAT App!');
    }

    // submit login
    $$('#submmit-login').on('click', function () {

        var username = $$('#login-username').val();
        var password = $$('#login-password').val();

        // simple validation for empty fields
        if (!username || !password){

            myApp.alert('Please fill in all Login form fields');
            return;
        }

        // build the http request
        var requestUrl = userServiceUrl+'/login';
        var postdata = {};
        postdata.username = username;
        postdata.password = password;

        // show activity indicator
        myApp.showIndicator();

        // Ajax for making http communication
        // HTTP communication responses are handled
        // based on HTTP response codes
        // documentation: http://framework7.io/docs/dom.html

        $$.ajax({
            url: requestUrl,
            //headers: {"X-Semat-Id":"somestuff","X-Semat-Message":"morestuff"},
            type: "POST",
            contentType: "application/json",
            data: JSON.stringify(postdata),

            success: function(data, status, xhr){

                console.log('received user login data: '+data);

                // better safe then sorry
                try {

                    var responseJSON = JSON.parse(data);
                    if (!responseJSON.firstname || !responseJSON.token) {
                        myApp.alert('Login was unsuccessful, we are experiencing internal errors, contact SEMAT team');
                        return
                    }

                } catch (e) {
                    myApp.alert('Login was unsuccessful, we are experiencing internal errors, contact SEMAT team');
                    return
                }

                // preparing for storing user data locally
                var userData = {};
                userData.firstname = responseJSON.firstname;
                userData.lastname = responseJSON.lastname;
                userData.email = responseJSON.email;
                userData.token = responseJSON.token;
                userData.guid = responseJSON.guid;
                userData.timestamp = new Date().getTime();

                localStorage.w7Data = JSON.stringify(userData);

                loadProjects();
            },

            error: function(xhr, status ){

                // we have received response and can hide activity indicator
                myApp.hideIndicator();

                myApp.alert('Login was unsuccessful, please verify your credentials and try again');

                $$('#login-username').val('');
                $$('#login-password').val('');

            }

        });
    });
}).trigger();

// Registration page
myApp.onPageInit('register', function (page) {

    console.log('register page init');

    if (!navigator.onLine) {
        myApp.alert('It appears your network connection is down. You need internet connection to use SEMAT App!');
    }

    // submit login
    $$('#submmit-register').on('click', function () {

        var firstname = $$('#register-firstname').val();
        var lastname = $$('#register-lastname').val();
        var email = $$('#register-email').val();
        var password = $$('#register-password').val();

        // simple validation for empty fields
        if (!firstname || !lastname || !email || !password){

            myApp.alert('Please fill in all Login form fields');
            return;
        }

        // build the http request
        var requestUrl = userServiceUrl+'/register';
        var postdata = {};
        postdata.firstname = firstname;
        postdata.lastname = lastname;
        postdata.email = email;
        postdata.password = password;

        // show activity indicator
        myApp.showIndicator();

        // Ajax for making http communication
        // HTTP communication responses are handled
        // based on HTTP response codes
        // documentation: http://framework7.io/docs/dom.html

        $$.ajax({
            url: requestUrl,
            //headers: {"X-Semat-Id":"somestuff","X-Semat-Message":"morestuff"},
            type: "POST",
            contentType: "application/json",
            data: JSON.stringify(postdata),

            success: function(data, status, xhr){

                // we have received response and can hide activity indicator
                myApp.hideIndicator();

                console.log('data: '+data);
                console.log('status: '+status);

                // better safe then sorry
                try {

                    var responseJSON = JSON.parse(data);

                    if (!responseJSON.firstname || !responseJSON.token) {
                        myApp.alert('Registration was unsuccessful, we are experiencing internal errors, contact SEMAT team');
                        return;
                    }

                } catch (e) {
                    myApp.alert('Registration was unsuccessful, we are experiencing internal errors, contact SEMAT team');

                }

                // storing user data locally
                var userData = {};
                userData.firstname = responseJSON.firstname;
                userData.lastname = responseJSON.lastname;
                userData.email = responseJSON.email;
                userData.token = responseJSON.token;
                userData.guid = responseJSON.guid;
                userData.timestamp = new Date().getTime();
                localStorage.w7Data = JSON.stringify(userData);

                mainView.router.load({
                    url: 'projects.html',
                    context: {
                        firstname: ''+responseJSON.firstname,
                        lastname: ''+responseJSON.lastname,
                        email: ''+responseJSON.email,
                        newRegistration: 'true'
                    }
                });
            },

            error: function(xhr, status ){

                // we have received response and can hide activity indicator
                myApp.hideIndicator();

                console.log('status: '+status);

                // 409 status represents already existing email
                if (status == 409) {

                    myApp.alert('Registration was unsuccessful, email already exists. Either use another email address, or Login');

                } else {

                    myApp.alert('Registration was unsuccessful, please try again');

                    $$('#register-firstname').val('');
                    $$('#register-lastname').val('');
                    $$('#register-email').val('');
                    $$('#register-password').val('');

                }
            }
        });
    });
});

// Projects page
myApp.onPageInit('projects', function (page) {

    console.log('projects page init');

    // read local storage, see what projects
    // user is associated with
    // If user is logged in, he goes directly to the projects page
    if (localStorage.w7Data && localStorage.w7Data !== ''){
        var user = JSON.parse(localStorage.w7Data);
    } else {logout();}

    // once user clicks on the specific project

    // new project page
    $$('#user-new-project').on('click', function () {

        // myApp.confirm('A new version is available. Do you want to load it right now?', function () {
        //         window.location.reload();
        // });

        // remove user details from local storage
        mainView.router.load({
            url: 'createProject.html',
            context: {
                something: 'true'
            }
        });

    });
});

// Projects page
myApp.onPageInit('project', function (page) {

    console.log('single project page init');

    // project update button clicked
    // - capture the app user comment for project update
    // - collect the data about the current project status
    // - update the project on project service
    // - update local project details

    $$('.project-update').on('click', function () {

        // myApp.confirm('A new version is available. Do you want to load it right now?', function () {
        //         window.location.reload();
        // });
        myApp.prompt('Please add the comment before updating the project', function (data) {
            console.log('comment added by app user: '+data);

            // collect current values

            if (localStorage.w7Data && localStorage.w7Data !== ''){
                var user = JSON.parse(localStorage.w7Data);
            } else {logout();}

            var current_projectid = $$('#current_projectid').text();
            var current_project_name = $$('#current_project_name').text();
            var projectUpdatePayload = {};
            var history = [];
            var semat_alphas = {};
            semat_alphas.opportunity = $$('#opportunity').val();
            semat_alphas.requirements = $$('#requirements').val();
            semat_alphas.stakeholders = $$('#stakeholders').val();
            semat_alphas.team = $$('#team').val();
            semat_alphas.way_of_working = $$('#way_of_working').val();
            semat_alphas.work = $$('#work').val();
            semat_alphas.software_system = $$('#software_system').val();

            var now = moment();
            history.push({'time': now.format('YYYY-MM-DD HH:mm:ss'), 'message':''+data, 'author':''+user.firstname+' '+user.lastname});

            projectUpdatePayload.semat_alphas = semat_alphas;
            projectUpdatePayload.history = history;

            // debug
            console.log('updating project with id: '+current_projectid);
            //console.log(projectUpdatePayload);

            // we have all data for the request
            myApp.showIndicator();

            // http comms
            var requestUrl = projectServiceUrl+'/'+current_projectid;

            $$.ajax({
                url: requestUrl,
                //headers: {"X-Semat-Id":"somestuff","X-Semat-Message":"morestuff"},
                type: "PUT",
                contentType: "application/json",
                data: JSON.stringify(projectUpdatePayload),

                success: function(data, status, xhr){

                    console.log('project updated: '+data);
                    myApp.hideIndicator();

                    myApp.alert(current_project_name+ ' project has been successfully updated!');
                    // reload user local projects
                    reloadProjects(current_projectid);
                },
                error: function(xhr, status ){
                    // we have received response and can hide activity indicator
                    myApp.hideIndicator();
                    myApp.alert('Error while updating the project service. Status code: '+status);
                }
            });
        });
    });

});

// Create project page
myApp.onPageInit('createProject', function (page) {

    console.log('createProject page init');

    // read local storage, see what projects
    // user is assotiated with
    // If user is loged in, he goes directly to the projects page
    if (localStorage.w7Data && localStorage.w7Data !== ''){
        var user = JSON.parse(localStorage.w7Data);
    }
    else {
        // redirect to login
        logout();
    }

    // once user clicks on the specific project

    // new project page
    $$('#create-new-project').on('click', function () {

        var projectName = $$('#project-name').val();
        console.log('creating new project with the name: '+projectName);
        console.log('assigning user: '+user.guid+' to the new project');

        //remove spaces from project name
        projectName = projectName.replace(/\s+/g, '');

        // new project
        // build the http request
        var requestUrl = projectServiceUrl+'/';
        var postdata = {};
        postdata.project_name = projectName;
        postdata.users = [{'userid':''+user.guid}];

        // show activity indicator
        myApp.showIndicator();
        // http
        $$.ajax({
            url: requestUrl,
            //headers: {"X-Semat-Id":"somestuff","X-Semat-Message":"morestuff"},
            type: "POST",
            contentType: "application/json",
            data: JSON.stringify(postdata),

            success: function(data, status, xhr){

                // nex step is to add the new project to the user profile
                console.log('new project is created, updating the user info');
                var requestUrl = userServiceUrl+'/'+user.guid+'/projects';

                data = JSON.parse(data);
                postdata = {"projectid": data.project.projectid};

                $$.ajax({
                    url: requestUrl,
                    type: "PUT",
                    contentType: "application/json",
                    headers: {'token': user.token},
                    data: JSON.stringify(postdata),

                    success: function(data, status, xhr){
                        // debug
                        console.log('successfully updated user service profile : '+data);

                        // done
                        myApp.hideIndicator();
                        // re-load user projects
                        reloadProjects();

                    },
                    error: function(xhr, status ){
                        console.log(status);
                        // done
                        myApp.hideIndicator();
                        myApp.alert('Sorry, cannot update user profile at the moment');
                    }
                });
            },
            error: function(xhr, status ){
                console.log(status);
                // done
                myApp.hideIndicator();
                myApp.alert('Sorry, cannot create new project at the moment');
            }
        });

        // myApp.confirm('A new version is available. Do you want to load it right now?', function () {
        //         window.location.reload();
        // });

        // // remove user details from local storage
        // mainView.router.load({
        //     url: 'createProject.html',
        //     context: {
        //         something: 'true'
        //     }
        // });

    });
});

// Project history page hooks
myApp.onPageInit('project-history', function (page) {
    console.log('project-history page init');
});


text:
import _ from 'lodash';
import React, {Component, PropTypes} from 'react';
import classNames from 'classnames'
import FileInput from 'react-file-input'
import Remarkable from 'remarkable'
import colors from '../utils/colors'
import ReactTooltip from 'react-tooltip'
import ReactCSSTransitionGroup from 'react-addons-css-transition-group'
import {getInitials} from '../lib/person'
import DateTimePicker from 'react-widgets/lib/DateTimePicker'

export const DateLabel = ({label, date}) => {
  return (
    <fieldset className="form-group">
       {label}
      <DateTimePicker
        defaultValue={date}
        time={false}
        readOnly={true}
        />
    </fieldset>
  )
}

Date.propTypes = {
  label:    PropTypes.string.isRequired,
  date:     PropTypes.object
}

export class ToggleBox extends Component {
  state = { hidden: true }

  componentWillMount(){
    const {hidden} = this.props
    this.setState({hidden})
  }

  handleClick = (e) => {
    e.preventDefault()
    this.setState({ hidden: !this.state.hidden })
  }

  render() {
    const {children, label} = this.props

    const styles = {
      link:{
        cursor: 'pointer',
      },
      text: {
        marginLeft: '4px',
      },
      box: {
        marginTop: '10px',
      }
    }

    const panel = this.state.hidden ? undefined :
{children}

    return (

            {(this.state.hidden ? 'Show ' : 'Hide ') + label}

        <ReactCSSTransitionGroup transitionName="togglebox" transitionEnterTimeout={400} transitionLeaveTimeout={400}>
          {panel}
        </ReactCSSTransitionGroup>

    )
  }
}

ToggleBox.PropTypes = {
  hide: PropTypes.bool,
}

export const AvatarView = ({obj, size, label, style}) => {
  if(!obj || !obj.get('avatar')) return
<Avatar size={size} name={"?"}/>
;

  const avatar = obj.get('avatar').toJS();
  const tooltip = label || obj.get('name');
  const defaultAvatar =
<Avatar size={size} label={tooltip} name={obj.get('name')} color={avatar.color}/>
;

  switch(avatar.type){
    case 'url':
      return avatar.url ?
<Avatar size={size} label={tooltip} src={avatar.url}/>
 : defaultAvatar;
    case 'src':
      return avatar.src ?
<Avatar size={size} label={tooltip} src={avatar.src}/>
 : defaultAvatar;
    default:
      return defaultAvatar;
  }
}

AvatarView.propTypes = {
  obj:    PropTypes.object,
  size:   PropTypes.number,
  label:  PropTypes.string
}

export class Avatar extends Component {
  rndColor() {
    let index = Math.floor(Math.random()*colors.length);
    return colors[ index ];
  }

  render(){
    const size = this.props.size || 36;
    const styleSize = `${size}px`;
    const imageStyle =  {
      width: styleSize || '36px',
      height: styleSize || '36px',
      borderRadius: '50%'
    };

    const initialsStyle = {
      display: 'flex',
      justifyContent: 'center',
      alignItems: 'center',
      background: this.props.color || this.rndColor(),
      width: styleSize || '36px',
      height: styleSize || '36px',
      color: '#FFF',
      textTransform: 'uppercase',
      borderRadius: '50%',
      fontSize: `${size/36}rem`,
    }

    if(this.props.src){
      return (

          <ReactTooltip effect="solid" />

      )
    }else{
      return (

{getInitials(this.props.name)}

          <ReactTooltip effect="solid" />

      )
    }
  }

}

Avatar.propTypes = {
  size:   PropTypes.number,
  color:  PropTypes.string,
  src:    PropTypes.string,
  label:  PropTypes.string
}

export const NewLabel = () => {
  return (
    new
  )
}

export const UpdatedLabel = () => {
  return (
    updated
  )
}

export const TextLabel = ({label, value, url, onClick}) => {
  const labelUrl = () => {
    if(!url && !onClick) return '';
    if(onClick) return ;
    if(url) return ;
  }

  return(
    <fieldset className="form-group">

        {label}
        {labelUrl()}

      {value}
    </fieldset>
  )
}

TextLabel.proptypes = {
  label:    PropTypes.string,
  value:    PropTypes.string,
  url:      PropTypes.string,
  onClick:  PropTypes.func
}

export const Labels = ({label, value, onClick}) => {
  const styles = {
    label:{
      color: '#cfd2da',
      padding: '.3rem',
    }
  };

  const handleClick = (label, e) => {
    onClick(label);
    e.preventDefault();
  }

  let labels;
  if(!onClick){
   labels = _.map(value.toJS(), v => {v});
  }else{
   labels = _.map(value.toJS(), v => {
    return (

        {v}

    )
   })
  }

  return(
    <fieldset className="form-group">

        {label}

        {labels}

    </fieldset>
  )
}

Labels.propTypes = {
  label:    PropTypes.string,
  value:    PropTypes.object,
  onClick:  PropTypes.func
}

export const MarkdownText = ({label, value}) => {
  const md = new Remarkable();
  const text = {__html: md.render(value)};
  return(
    <fieldset className="form-group">

        {label}

    </fieldset>
  )
}

MarkdownText.propTypes = {
  label: PropTypes.string,
  value: PropTypes.string
}

export const GoBack = ({history, goBack, isLoading}) => {
  const handleChange = (e) => {
    if(goBack) goBack();
    else history.goBack();
    e.preventDefault();
  }

  if (isLoading) {
      return ()
  }
  else {
    return (

    )
  }
}

GoBack.propTypes = {
  history:    PropTypes.object,
  goBack:     PropTypes.func,
  isLoading:  PropTypes.bool
}

export const Title =({title}) => {
  const styles={
    name:{
      flexShrink: 0,
    },
  }

  return (

      {title}

  )
}

Title.propTypes = {
  title: PropTypes.string
}

export const HeaderLeft = ({children}) => {
  const styles={
    left:{
      display: 'flex',
      alignItems: 'center',
      flex: 1,
      minWidth: '500px',
    },
  }

  return (

      {children}

  )
}

HeaderLeft.propTypes = {
  children: PropTypes.node
}

export const HeaderRight = ({children}) => {
  const styles={
    right:{
      display: 'flex',
      justifyContent: 'flex-end',
      alignItems: 'center',
      flex: 1,
    },
  }

  return (

      {children}

  )
}

HeaderRight.propTypes = {
  children: PropTypes.node
}

export const Header = ({obj, children}) => {
  const styles={
    container:{
      paddingTop: '1rem',
      display: 'flex',
      justifyContent: 'space-between',
      flexWrap: 'wrap',
    },
    name:{
      flexShrink: 0,
    },
    time: {
      fontSize: '.7rem',
      fontStyle: 'italic',
      display: 'block',
      float: 'right',
    },
  }

  const left = () => {
    return React.Children.toArray(children).find(child => child.type === HeaderLeft);
  };

  const right = () => {
    return React.Children.toArray(children).find(child => child.type === HeaderRight);
  };

  const timeLabels = (obj) => {
    if(!obj || !obj.get('createdAt'))return ;
    const res = [`Created ${obj.get('createdAt').fromNow()}`];
    if(obj.get('updatedAt')) res.push(`Updated ${obj.get('updatedAt').fromNow()}`);
    return {res.join(' - ')}
  }

  const time = () => {
    if(!obj) return '';
    return (

        {timeLabels(obj)}

    );
  };

  return (

        {left()}
        {right()}

      {time()}

  )
}

Header.propTypes = {
  obj:      PropTypes.object,
  children: PropTypes.node
}

export const Form = ({children}) => {
  return(
    <form>
      {children}
    </form>
  )
}

Form.propTypes = {
  children: PropTypes.node
}

export const AddBtn = ({onSubmit, canSubmit}) => {
  const handleChange = (e) => {
    onSubmit();
    e.preventDefault();
  }

  return (
    <button type="button" className="btn btn-primary m-l-1" disabled={!canSubmit} onClick={handleChange}>Create</button>
  )
}

AddBtn.propTypes = {
  onSubmit:   PropTypes.func.isRequired,
  canSubmit:  PropTypes.bool
}

export const UpdateBtn = ({onSubmit, canSubmit, label, size}) => {
  const handleChange = (e) => {
    onSubmit();
    e.preventDefault();
  }

  const classnames = classNames('btn btn-primary m-l-1', {
    'btn-sm': size === 'small',
    'btn-lg': size === 'large',
  });

  return (
    <button type="button" className={classnames} disabled={!canSubmit} onClick={handleChange}>{label || 'Update'}</button>
  )
}

UpdateBtn.propTypes = {
  onSubmit:   PropTypes.func.isRequired,
  canSubmit:  PropTypes.bool,
  label:      PropTypes.string,
  size:       PropTypes.string
}

export const CancelBtn = ({onCancel, label, size}) => {
  const handleChange = (e) => {
    onCancel();
    e.preventDefault();
  }

  const classnames = classNames('btn btn-warning m-l-1', {
    'btn-sm': size === 'small',
    'btn-lg': size === 'large',
  });

  return (
    <button type="button" className={classnames} onClick={handleChange}>{label || 'Cancel'}</button>
  )
}

CancelBtn.propTypes = {
  onCancel:   PropTypes.func.isRequired,
  label:      PropTypes.string,
  size:       PropTypes.string
}

export const DeleteBtn = ({onDelete, label, size}) => {
  const handleChange = (e) => {
    onDelete();
    e.preventDefault();
  }

  const classnames = classNames("btn btn-danger m-l-1", {
    'btn-sm': size === 'small',
    'btn-lg': size === 'large',
  });

  return (
    <button type="button" className={classnames} onClick={handleChange}>{label || 'Delete'}</button>
  )
}

CancelBtn.propTypes = {
  onCancel:   PropTypes.func.isRequired,
  label:      PropTypes.string,
  size:       PropTypes.string
}

export const ResetBtn = ({obj, label, size}) => {
  const handleChange = (e) => {
    obj.reset();
    e.preventDefault();
  }

  const classnames = classNames('btn btn-danger m-l-1', {
    'btn-sm': size === 'small',
    'btn-lg': size === 'large',
  });

  return (
    <button type="button" className={classnames} onClick={handleChange}>{label || 'Reset'}</button>
  )
}

ResetBtn.propTypes = {
  obj:    PropTypes.object.isRequired,
  label:  PropTypes.string,
  size:   PropTypes.string
}

export const IconButton = ({name, onClick, label}) => {
  const handleChange = (e) => {
    onClick();
    e.preventDefault();
  }

  const style={
    fontSize: '1.5rem',
  }

  return (

        <i style={style} className={`iconButton fa fa-${name}`}/>

      {label && <ReactTooltip effect="solid" />}

  )
}

IconButton.PropTypes = {
  onClick: PropTypes.func.isRequired,
  name: PropTypes.string.isRequired,
}

export const Refresh =({onClick}) => {
  const handleChange = (e) => {
    onClick();
    e.preventDefault();
  }

  const style={
    fontSize: '1.5rem',
  }

  return (

  )
}

Refresh.propTypes = {
  onClick: PropTypes.func.isRequired
}

export const Filter = ({filter, onChange, onReset}) => {
  const handleChange = (e) => {
    onChange(e.target.value);
    e.preventDefault();
  }

  const handleClick = (e) => {
    onReset();
    e.preventDefault();
  }

  const styles={
    container:{
      position: 'relative',
    },
    icon:{
      position: 'absolute',
      padding: '10px',
      right: '0px',
      top: '-1px',
      fontSize: '1.2rem',
      zIndex: 10,
      color: 'grey',
    }
  }

  const icon= ;

  return (

      <input className="tm input form-control" type='text' value={filter} placeholder='search ...' onChange={handleChange}/>

  )
}

Filter.propTypes = {
  onChange: PropTypes.func.isRequired,
  onReset:  PropTypes.func.isRequired,
  filter: PropTypes.string
}

export const FilterPreferred = ({preferred, onClick}) => {
  const handleChange = (e) => {
    onClick();
    e.preventDefault();
  }

  const style={
    fontSize: '1.5rem',
    color: preferred ? '#00BCD4' : 'grey',
  }

  return (

  )
}

FilterPreferred.propTypes = {
  preferred:  PropTypes.bool,
  onClick:    PropTypes.func.isRequired
}

export const Sort = ({sortMenu, sortCond, onClick}) => {
  const handleClick = (mode, e) => {
    onClick(mode);
    e.preventDefault();
  }

  function getSortIcon(sortCond, item){
    if(item.key === sortCond.by){
      const classnames = sortCond.order === 'desc' ? 'fa fa-sort-desc p-l-1' : 'fa fa-sort-asc p-l-1';
      return
    }
  }

  const styles = {
    button:{
      fontSize: '1.5rem',
    },
    menu:{
      marginTop: '15px',
    }
  }

  const menu = _.map(sortMenu, item => {
    return (

        {item.label}
        {getSortIcon(sortCond, item)}

    )
  });

  return (

        {menu}

  )
}

Sort.propTypes = {
  sortMenu: PropTypes.arrayOf(PropTypes.object).isRequired,
  sortCond: PropTypes.object.isRequired,
  onClick:  PropTypes.func.isRequired
}

export const TitleIcon = ({icon, isLoading}) => {
  return isLoading ?  : <i className={`fa fa-${icon} m-r-1`}/>;
}

TitleIcon.propTypes = {
  icon:       PropTypes.string.isRequired,
  isLoading:  PropTypes.bool
}

export const FadeIn = ({children}) =>
      <ReactCSSTransitionGroup
          transitionName="fade-in"
          transitionAppear={true}
          transitionAppearTimeout={300}
          transitionEnterTimeout={300}
          transitionLeaveTimeout={300}
      >
        {children ||
}
      </ReactCSSTransitionGroup>

FadeIn.propTypes = {
  children:   PropTypes.node,
}