text:
<?xml version="1.0"?>
<!--AccuWeatherToQE, Version=1.3.3.0, Culture=neutral, PublicKeyToken=null-->
<uservar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <variables>
    <variable>
      <category>text</category>
      <name>Baltimore Day 1 Low</name>
      <value>32F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 1 High</name>
      <value>52F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 1 Hour 19 Temperature</name>
      <value>44F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 1 Hour 19 Gr</name>
      <value>None</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Clear A</value_name>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 1 Day Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\partly_cloudy\partly_cloudy00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Partly sunny A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 1 Day Wind Speed</name>
      <value>16.1 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 1 Day Wind Direction</name>
      <value>WNW</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 1 Night Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\clear_night_sky\clear_night_sky00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Night Clear A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 1 Night Wind Speed</name>
      <value>3.5 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 1 Night Wind Direction</name>
      <value>W</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 2 Low</name>
      <value>36F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 2 High</name>
      <value>60F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 2 Hour 7 Temperature</name>
      <value>32F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 2 Hour 7 Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\mostly_sunny\mostly_sunny00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Mostly sunny A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 2 Hour 12 Temperature</name>
      <value>55F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 2 Hour 12 Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\mostly_sunny\mostly_sunny00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Mostly sunny A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 2 Hour 19 Temperature</name>
      <value>49F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 2 Hour 19 Gr</name>
      <value>None</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Clear A</value_name>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 2 Day Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\mostly_sunny\mostly_sunny00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Mostly sunny A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 2 Day Wind Speed</name>
      <value>5.8 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 2 Day Wind Direction</name>
      <value>WSW</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 2 Night Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\clear_night_sky\clear_night_sky00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Night Clear A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 2 Night Wind Speed</name>
      <value>3.5 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 2 Night Wind Direction</name>
      <value>W</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 3 Low</name>
      <value>42F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 3 High</name>
      <value>64F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 3 Hour 7 Temperature</name>
      <value>36F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 3 Hour 7 Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\sunny\sunny00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Sunny A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 3 Hour 12 Temperature</name>
      <value>59F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 3 Hour 12 Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\mostly_sunny\mostly_sunny00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Mostly sunny A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 3 Hour 19 Temperature</name>
      <value>50F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 3 Hour 19 Gr</name>
      <value>None</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Clear A</value_name>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 3 Day Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\sunny\sunny00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Sunny A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 3 Day Wind Speed</name>
      <value>2.3 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 3 Day Wind Direction</name>
      <value>WSW</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 3 Night Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\partly_cloudy_night\partly_cloudy_night00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Night Partly cloudy A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 3 Night Wind Speed</name>
      <value>1.2 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 3 Night Wind Direction</name>
      <value>NW</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 4 Low</name>
      <value>50F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 4 High</name>
      <value>63F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 4 Hour 7 Temperature</name>
      <value>44F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 4 Hour 7 Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\partly_cloudy\partly_cloudy00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Partly sunny A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 4 Hour 12 Temperature</name>
      <value>59F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 4 Hour 12 Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\mostly_sunny\mostly_sunny00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Mostly sunny A</value_name>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 4 Day Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\mostly_cloudy\mostly_cloudy00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Mostly cloudy A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 4 Day Wind Speed</name>
      <value>4.6 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 4 Day Wind Direction</name>
      <value>ESE</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 4 Night Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\broken_clouds_night\broken_clouds_night00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Night Intermittent clouds A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 4 Night Wind Speed</name>
      <value>4.6 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 4 Night Wind Direction</name>
      <value>ESE</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 5 Low</name>
      <value>52F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 5 High</name>
      <value>68F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 5 Day Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\partly_cloudy\partly_cloudy00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Partly sunny A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 5 Day Wind Speed</name>
      <value>8.1 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 5 Day Wind Direction</name>
      <value>SE</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 5 Night Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\mostly_cloudy_night\mostly_cloudy_night00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Night Mostly cloudy A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 5 Night Wind Speed</name>
      <value>8.1 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 5 Night Wind Direction</name>
      <value>SSE</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 6 Low</name>
      <value>50F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 6 High</name>
      <value>69F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 6 Day Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\rain\rain00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Rain A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 6 Day Wind Speed</name>
      <value>9.2 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 6 Day Wind Direction</name>
      <value>WSW</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 6 Night Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\mostly_cloudy_night\mostly_cloudy_night00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Night Mostly cloudy A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 6 Night Wind Speed</name>
      <value>4.6 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 6 Night Wind Direction</name>
      <value>NNW</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 7 Low</name>
      <value>52F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 7 High</name>
      <value>67F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 7 Day Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\overcast\overcast00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Dreary A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 7 Day Wind Speed</name>
      <value>4.6 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 7 Day Wind Direction</name>
      <value>SW</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 7 Night Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\rain_night\rain_night00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Night Rain A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 7 Night Wind Speed</name>
      <value>2.3 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 7 Night Wind Direction</name>
      <value>S</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 8 Low</name>
      <value>51F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 8 High</name>
      <value>65F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 8 Day Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\overcast\overcast00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Cloudy A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 8 Day Wind Speed</name>
      <value>5.8 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 8 Day Wind Direction</name>
      <value>S</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 8 Night Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\overcast_night\overcast_night00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Night Dreary A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 8 Night Wind Speed</name>
      <value>4.6 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 8 Night Wind Direction</name>
      <value>S</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 9 Low</name>
      <value>42F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 9 High</name>
      <value>64F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 9 Day Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\overcast\overcast00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Dreary A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 9 Day Wind Speed</name>
      <value>8.1 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 9 Day Wind Direction</name>
      <value>SW</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 9 Night Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\overcast_night\overcast_night00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Night Cloudy A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 9 Night Wind Speed</name>
      <value>9.2 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 9 Night Wind Direction</name>
      <value>SW</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 10 Low</name>
      <value>35F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 10 High</name>
      <value>56F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 10 Day Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\broken_clouds\broken_clouds00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Intermittent clouds A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 10 Day Wind Speed</name>
      <value>11.5 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 10 Day Wind Direction</name>
      <value>NW</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 10 Night Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\clear_night_sky\clear_night_sky00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Night Clear A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 10 Night Wind Speed</name>
      <value>6.9 mi/h</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 10 Night Wind Direction</name>
      <value>NW</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Local Forecast Summary 1</name>
      <value>Expect showers Wednesday night</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 1 Hour 12 Temperature</name>
      <value>49F</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>graphic</category>
      <name>Baltimore Day 1 Hour 12 Gr</name>
      <value>C:\Omni\Graphics\Weather Icons\Master Icons Broadcast\mostly_sunny\mostly_sunny00000.DDS</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
      <value_name>Day Mostly sunny A</value_name>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 1 Day 1</name>
      <value>Partly sunny;</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 1 Day 2</name>
      <value>windy, cooler</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 1 Day Long 1</name>
      <value>Partly sunny, windy and</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 1 Day Long 2</name>
      <value>cooler</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 1 Night 1</name>
      <value>Clear</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 1 Night Long 1</name>
      <value>Clear</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 2 Day 1</name>
      <value>Mostly sunny</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 2 Day 2</name>
      <value>and milder</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 2 Day Long 1</name>
      <value>Mostly sunny and milder</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 2 Night 1</name>
      <value>Clear</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 2 Night Long 1</name>
      <value>Clear</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 3 Day 1</name>
      <value>Sunny and</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 3 Day 2</name>
      <value>pleasant</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 3 Day Long 1</name>
      <value>Pleasant with plenty of</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 3 Day Long 2</name>
      <value>sunshine</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 3 Night 1</name>
      <value>Partly cloudy</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 3 Night Long 1</name>
      <value>Partly cloudy</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 4 Day 1</name>
      <value>Clouds and</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 4 Day 2</name>
      <value>limited sun</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 4 Day Long 1</name>
      <value>Clouds and limited sun</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 4 Night 1</name>
      <value>Partly cloudy</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 4 Night Long 1</name>
      <value>Partly cloudy</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 5 Day 1</name>
      <value>Partly sunny</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 5 Day 2</name>
      <value>and mild</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 5 Day Long 1</name>
      <value>Partly sunny and mild</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 5 Night 1</name>
      <value>Mostly cloudy</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 5 Night 2</name>
      <value>and mild</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 5 Night Long 1</name>
      <value>Mostly cloudy and mild</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 6 Day 1</name>
      <value>Overcast,</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 6 Day 2</name>
      <value>rain</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 6 Day 3</name>
      <value>possible;</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 6 Day Long 1</name>
      <value>Overcast and mild with</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 6 Day Long 2</name>
      <value>rain possible</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 6 Night 1</name>
      <value>Mostly cloudy</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 6 Night 2</name>
      <value>and mild</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 6 Night Long 1</name>
      <value>Mostly cloudy and mild</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 7 Day 1</name>
      <value>Low clouds</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 7 Day Long 1</name>
      <value>Low clouds</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 7 Night 1</name>
      <value>Rain</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 7 Night Long 1</name>
      <value>Rain</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 8 Day 1</name>
      <value>Cloudy</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 8 Day Long 1</name>
      <value>Cloudy</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 8 Night 1</name>
      <value>Low clouds</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 8 Night Long 1</name>
      <value>Low clouds</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 9 Day 1</name>
      <value>Low clouds</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 9 Day Long 1</name>
      <value>Low clouds</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 9 Night 1</name>
      <value>Considerable</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 9 Night 2</name>
      <value>cloudiness</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 9 Night Long 1</name>
      <value>Considerable cloudiness</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 10 Day 1</name>
      <value>Chance of a</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 10 Day 2</name>
      <value>little a.m.</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 10 Day 3</name>
      <value>rain</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 10 Day Long 1</name>
      <value>Chance for a bit of rain</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 10 Day Long 2</name>
      <value>or drizzle in the morning;</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 10 Day Long 3</name>
      <value>otherwise, decreasing</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 10 Day Long 4</name>
      <value>clouds and cooler</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 10 Night 1</name>
      <value>Clear</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
    <variable>
      <category>text</category>
      <name>Baltimore Day 10 Night Long 1</name>
      <value>Clear</value>
      <tags>
        <tag>Baltimore</tag>
      </tags>
    </variable>
  </variables>
</uservar>


text:
<!doctype html>

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Musikata::The Sound of One Hand Clapping</title>
<link rel="stylesheet" href="../../bower_components/musikata.theme/css/app.css" />

                Loading...

The Sound of One Hand Clapping

The goal of this kata is to help you feel the beat.

Ready? Let's go!

redpajama_set_name: RedPajamaGithub


text:
package org.kaazing.gateway.transport.pipe;

import java.io.IOException;

import org.apache.mina.core.service.IoHandlerAdapter;
import org.junit.Test;
import org.kaazing.gateway.transport.NamedPipeAddress;

public class NamedPipeAcceptorImplTest {

	@Test(expected = IOException.class)
    public void duplicatedBindShouldThrowException() throws Exception {
        NamedPipeAcceptorImpl acceptor = new NamedPipeAcceptorImpl();
        acceptor.setHandler(new IoHandlerAdapter());
        NamedPipeAddress localAddress = new NamedPipeAddress("duplicated");
        acceptor.bind(localAddress);
        acceptor.bind(localAddress);
    }

	@Test
    public void unrecognizedUnbindShouldNotThrowException() throws Exception {
        NamedPipeAcceptorImpl acceptor = new NamedPipeAcceptorImpl();
        acceptor.setHandler(new IoHandlerAdapter());
        NamedPipeAddress localAddress = new NamedPipeAddress("unrecognized");
        acceptor.unbind(localAddress);
    }

}


text:
package modules

import auth.HandlerCacheImpl
import be.objectify.deadbolt.scala.cache.HandlerCache
import com.google.inject.AbstractModule

class DeadboltModule extends AbstractModule {
  override def configure(): Unit = {
    bind(classOf[HandlerCache]).to(classOf[HandlerCacheImpl])
  }
}


text:
package th.co.egat.day3.models;

import java.util.Date;

import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;

public class SoilSample
        extends RealmObject {

    //region Fields
    @PrimaryKey
    private String id = null;

    private double xCoord = 0.0;
    private double yCoord = 0.0;
    private Date date = null;
    private float ph = 7.0f;
    private int cd = -1;
    //endregion

    //region Getters & Setters
    public String getId() {
        return id;
    }

    public void setId(final String id) {
        this.id = id;
    }

    public double getxCoord() {
        return xCoord;
    }

    public void setxCoord(final double xCoord) {
        this.xCoord = xCoord;
    }

    public double getyCoord() {
        return yCoord;
    }

    public void setyCoord(final double yCoord) {
        this.yCoord = yCoord;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(final Date date) {
        this.date = date;
    }

    public float getPh() {
        return ph;
    }

    public void setPh(final float ph) {
        this.ph = ph;
    }

    public int getCd() {
        return cd;
    }

    public void setCd(final int cd) {
        this.cd = cd;
    }
    //endregion

}


text:
import os
import json
import environ
env = environ.Env()
environ.Env.read_env()

SECRETS = json.loads(env.get_value('SECRETS', default='{}'))
FUCK_OAUTH = json.loads(env.get_value('FUCK_OAUTH', default='{}'))


text:
/**
 * This is the front-end of the visualize-convnet example.
 *
 * It loads display the image files and associated metainformation generated
 * by main.js in Node.js.
 */

const vizSection = document.getElementById('viz-section');
const vizTypeSelect = document.getElementById('viz-type');
const imageResultSection = document.getElementById('image-result');

function normalizePath(path) {
  return path.startsWith('dist/') ? path.slice(5) : path;
}

async function run() {
  //  Empty the image-and-result section.
  while (imageResultSection.firstChild) {
    imageResultSection.removeChild(imageResultSection.firstChild);
  }
  // Empty the viz section.
  while (vizSection.firstChild) {
    vizSection.removeChild(vizSection.firstChild);
  }

  const activationManifest =
      await (await fetch('activation/activation-manifest.json')).json();
  const filterManifest =
      await (await fetch('filters/filters-manifest.json')).json();

  // Render the input image in the image-result section.
  const inputImage = document.createElement('img');
  inputImage.classList.add('input-image');
  inputImage.src = normalizePath(activationManifest.origImagePath);
  imageResultSection.appendChild(inputImage);

  // Render the top-3 classification results.
  for (let i = 0; i < 3; ++i) {
    const outputClassDiv = document.createElement('div');
    outputClassDiv.textContent = `${activationManifest.classNames[i]} ` +
        `(p=${activationManifest.probScores[i].toFixed(4)})`;
    imageResultSection.appendChild(outputClassDiv);
  }

  const vizType = vizTypeSelect.value;

  if (vizType === 'activation') {
    const layerNames = Object.keys(activationManifest.layerName2FilePaths);
    layerNames.sort();
    for (let i = 0; i < layerNames.length; ++i) {
      const layerName = layerNames[i];
      const filePaths = activationManifest.layerName2FilePaths[layerName];

      const layerDiv = document.createElement('div');
      layerDiv.classList.add('layer-div');
      const layerNameSpan = document.createElement('div');
      const height = activationManifest.layerName2ImageDims[layerName][0];
      const width = activationManifest.layerName2ImageDims[layerName][1];
      layerNameSpan.textContent = `Layer "${layerName}" (${height}x${width})`;
      layerDiv.appendChild(layerNameSpan);

      const layerFiltersDiv = document.createElement('div');
      layerFiltersDiv.classList.add('layer-filters');
      for (let j = 0; j < filePaths.length; ++j) {
        const filterDiv = document.createElement('div');
        filterDiv.classList.add('filter-div');
        const activationImg = document.createElement('img');
        activationImg.classList.add('activation-image');
        activationImg.src = normalizePath(filePaths[j]);
        filterDiv.appendChild(activationImg);
        layerFiltersDiv.appendChild(filterDiv);
      }
      layerDiv.appendChild(layerFiltersDiv);
      vizSection.appendChild(layerDiv);
    }
  } else if (vizType === 'filters') {
    for (let i = 0; i < filterManifest.layers.length; ++i) {
      const layerName = filterManifest.layers[i].layerName;
      const filePaths = filterManifest.layers[i].filePaths;

      const layerDiv = document.createElement('div');
      layerDiv.classList.add('layer-div');
      const layerNameSpan = document.createElement('div');
      layerNameSpan.textContent = `Layer "${layerName}"`;
      layerDiv.appendChild(layerNameSpan);

      const layerFiltersDiv = document.createElement('div');
      layerFiltersDiv.classList.add('layer-filters');
      for (let j = 0; j < filePaths.length; ++j) {
        const filterDiv = document.createElement('div');
        filterDiv.classList.add('filter-div');
        if (vizType === 'filters') {
          const filterImg = document.createElement('img');
          filterImg.classList.add('filter-image');
          filterImg.src = normalizePath(filePaths[j]);
          filterDiv.appendChild(filterImg);
        }
        layerFiltersDiv.appendChild(filterDiv);
      }
      layerDiv.appendChild(layerFiltersDiv);
      vizSection.appendChild(layerDiv);
    }
  } else if (vizType === 'cam') {
    const imgDiv = document.createElement('div');
    imgDiv.classList.add('cam-image');
    const img = document.createElement('img');
    img.src = normalizePath(activationManifest.camImagePath);
    imgDiv.appendChild(img);

    vizSection.appendChild(imgDiv);
  }
};

vizTypeSelect.addEventListener('change', run);

run();


text:
Buck
====

Buck is a build tool. To see what Buck can do for you,
check out the documentation at <http://buckbuild.com/>.

[![Build Status](https://travis-ci.org/facebook/buck.svg)](https://travis-ci.org/facebook/buck) [![Build status](https://ci.appveyor.com/api/projects/status/v64qh0cd2cp9uto8/branch/master?svg=true)](https://ci.appveyor.com/project/Facebook/buck/branch/master)

Installation
------------

To build Buck, run the following:

    git clone https://github.com/facebook/buck.git
    cd buck
    ant
    ./bin/buck --help

License
-------
Apache License 2.0


text:
from typing import Dict

import pytest
from users.forms import ProfileConnectForm, ProfileDisconnectForm, SignUpForm
from users.models import User

@pytest.mark.django_db
def test_sign_up_form_valid() -> None:
    data = {
        "username": "xyz",
        "email": "foo@example.com",
        "password1": "Django 3",
        "password2": "Django 3",
    }
    form = SignUpForm(data=data)
    assert form.is_valid() is True

@pytest.mark.django_db
def test_sign_up_saves_inactive_user() -> None:
    data = {
        "username": "xyz",
        "email": "foo@example.com",
        "password1": "Django 3",
        "password2": "Django 3",
    }
    form = SignUpForm(data=data)
    form.save()
    assert User.objects.get(username="xyz").is_active is False

def test_profile_connect_form_valid() -> None:
    data: Dict = {}
    form = ProfileConnectForm(data=data)
    assert form.is_valid() is True

def test_profile_disconnect_form_valid() -> None:
    data: Dict = {}
    form = ProfileDisconnectForm(data=data)
    assert form.is_valid() is True


text:
<?php

namespace Codingbeard\Devtools\Message;

class GenerateIntervalMessage
{
  /**
   * @devtoolsOverwritable
   *
   * @var string
   */
  protected $groupName;

  /**
   * @devtoolsOverwritable
   *
   * @var string
   */
  protected $namespace;

  /**
   * @devtoolsOverwritable
   *
   * @var string
   */
  protected $taskName;

  /**
   * @devtoolsOverwritable
   *
   * @var int
   */
  protected $interval;

  /**
   * @devtoolsOverwritable
   *
   * @return string
   */
  public function getGroupName()
  {
    return $this->groupName;
  }

  /**
   * @devtoolsOverwritable
   *
   * @param string $groupName
   *
   * @return GenerateIntervalMessage
   */
  public function setGroupName($groupName)
  {
    $this->groupName = $groupName;

    return $this;
  }

  /**
   * @devtoolsOverwritable
   *
   * @return string
   */
  public function getNamespace()
  {
    return $this->namespace;
  }

  /**
   * @devtoolsOverwritable
   *
   * @param string $namespace
   *
   * @return GenerateIntervalMessage
   */
  public function setNamespace($namespace)
  {
    $this->namespace = $namespace;

    return $this;
  }

  /**
   * @devtoolsOverwritable
   *
   * @return string
   */
  public function getTaskName()
  {
    return $this->taskName;
  }

  /**
   * @devtoolsOverwritable
   *
   * @param string $taskName
   *
   * @return GenerateIntervalMessage
   */
  public function setTaskName($taskName)
  {
    $this->taskName = $taskName;

    return $this;
  }

  /**
   * @devtoolsOverwritable
   *
   * @return int
   */
  public function getInterval()
  {
    return $this->interval;
  }

  /**
   * @devtoolsOverwritable
   *
   * @param int $interval
   *
   * @return GenerateIntervalMessage
   */
  public function setInterval($interval)
  {
    $this->interval = $interval;

    return $this;
  }

  /**
   * @devtoolsOverwritable
   */
  public function preSerialize()
  {
  }

  /**
   * @devtoolsOverwritable
   */
  public function postUnserialize()
  {
  }
}


text:
# -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.

"""
This is only an example DAG to highlight usage of QuboleOperator in various scenarios,
some of these tasks may or may not work based on your Qubole account setup.

Run a shell command from Qubole Analyze against your Airflow cluster with following to
trigger it manually `airflow trigger_dag example_qubole_operator`.

*Note: Make sure that connection `qubole_default` is properly set before running this
example. Also be aware that it might spin up clusters to run these examples.*
"""

import airflow
from airflow import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.python_operator import PythonOperator, BranchPythonOperator
from airflow.contrib.operators.qubole_operator import QuboleOperator
import filecmp
import random

default_args = {
    'owner': 'airflow',
    'depends_on_past': False,
    'start_date': airflow.utils.dates.days_ago(2),
    'email': ['airflow@example.com'],
    'email_on_failure': False,
    'email_on_retry': False
}

dag = DAG('example_qubole_operator', default_args=default_args, schedule_interval=None)

dag.doc_md = __doc__

def compare_result(ds, **kwargs):
    ti = kwargs['ti']
    r1 = t1.get_results(ti)
    r2 = t2.get_results(ti)
    return filecmp.cmp(r1, r2)

t1 = QuboleOperator(
    task_id='hive_show_table',
    command_type='hivecmd',
    query='show tables',
    cluster_label='{{ params.cluster_label }}',
    fetch_logs=True,
    # If `fetch_logs`=true, will fetch qubole command logs and concatenate
    # them into corresponding airflow task logs
    tags='aiflow_example_run',
    # To attach tags to qubole command, auto attach 3 tags - dag_id, task_id, run_id
    qubole_conn_id='qubole_default',
    # Connection id to submit commands inside QDS, if not set "qubole_default" is used
    dag=dag,
    params={
        'cluster_label': 'default',
    }
)

t2 = QuboleOperator(
    task_id='hive_s3_location',
    command_type="hivecmd",
    script_location="s3n://public-qubole/qbol-library/scripts/show_table.hql",
    notfiy=True,
    tags=['tag1', 'tag2'],
    # If the script at s3 location has any qubole specific macros to be replaced
    # macros='[{"date": "{{ ds }}"}, {"name" : "abc"}]',
    trigger_rule="all_done",
    dag=dag)

t3 = PythonOperator(
    task_id='compare_result',
    provide_context=True,
    python_callable=compare_result,
    trigger_rule="all_done",
    dag=dag)

t3.set_upstream(t1)
t3.set_upstream(t2)

options = ['hadoop_jar_cmd', 'presto_cmd', 'db_query', 'spark_cmd']

branching = BranchPythonOperator(
    task_id='branching',
    python_callable=lambda: random.choice(options),
    dag=dag)
branching.set_upstream(t3)

join = DummyOperator(
    task_id='join',
    trigger_rule='one_success',
    dag=dag
)

t4 = QuboleOperator(
    task_id='hadoop_jar_cmd',
    command_type='hadoopcmd',
    sub_command='jar s3://paid-qubole/HadoopAPIExamples/'
                'jars/hadoop-0.20.1-dev-streaming.jar '
                '-mapper wc '
                '-numReduceTasks 0 -input s3://paid-qubole/HadoopAPITests/'
                'data/3.tsv -output '
                's3://paid-qubole/HadoopAPITests/data/3_wc',
    cluster_label='{{ params.cluster_label }}',
    fetch_logs=True,
    dag=dag,
    params={
        'cluster_label': 'default',
    }
)

t5 = QuboleOperator(
    task_id='pig_cmd',
    command_type="pigcmd",
    script_location="s3://public-qubole/qbol-library/scripts/script1-hadoop-s3-small.pig",
    parameters="key1=value1 key2=value2",
    trigger_rule="all_done",
    dag=dag)

t4.set_upstream(branching)
t5.set_upstream(t4)
t5.set_downstream(join)

t6 = QuboleOperator(
    task_id='presto_cmd',
    command_type='prestocmd',
    query='show tables',
    dag=dag)

t7 = QuboleOperator(
    task_id='shell_cmd',
    command_type="shellcmd",
    script_location="s3://public-qubole/qbol-library/scripts/shellx.sh",
    parameters="param1 param2",
    trigger_rule="all_done",
    dag=dag)

t6.set_upstream(branching)
t7.set_upstream(t6)
t7.set_downstream(join)

t8 = QuboleOperator(
    task_id='db_query',
    command_type='dbtapquerycmd',
    query='show tables',
    db_tap_id=2064,
    dag=dag)

t9 = QuboleOperator(
    task_id='db_export',
    command_type='dbexportcmd',
    mode=1,
    hive_table='default_qubole_airline_origin_destination',
    db_table='exported_airline_origin_destination',
    partition_spec='dt=20110104-02',
    dbtap_id=2064,
    trigger_rule="all_done",
    dag=dag)

t8.set_upstream(branching)
t9.set_upstream(t8)
t9.set_downstream(join)

t10 = QuboleOperator(
    task_id='db_import',
    command_type='dbimportcmd',
    mode=1,
    hive_table='default_qubole_airline_origin_destination',
    db_table='exported_airline_origin_destination',
    where_clause='id < 10',
    db_parallelism=2,
    dbtap_id=2064,
    trigger_rule="all_done",
    dag=dag)

prog = '''
import scala.math.random

import org.apache.spark._

/** Computes an approximation to pi */
object SparkPi {
  def main(args: Array[String]) {
    val conf = new SparkConf().setAppName("Spark Pi")
    val spark = new SparkContext(conf)
    val slices = if (args.length > 0) args(0).toInt else 2
    val n = math.min(100000L * slices, Int.MaxValue).toInt // avoid overflow
    val count = spark.parallelize(1 until n, slices).map { i =>
      val x = random * 2 - 1
      val y = random * 2 - 1
      if (x*x + y*y < 1) 1 else 0
    }.reduce(_ + _)
    println("Pi is roughly " + 4.0 * count / n)
    spark.stop()
  }
}
'''

t11 = QuboleOperator(
    task_id='spark_cmd',
    command_type="sparkcmd",
    program=prog,
    language='scala',
    arguments='--class SparkPi',
    tags='aiflow_example_run',
    dag=dag)

t11.set_upstream(branching)
t11.set_downstream(t10)
t10.set_downstream(join)


text:
namespace extensions {

namespace {

template <class FeatureClass>
SimpleFeature* CreateFeature() {
  return new FeatureClass;
}

// TODO(jamescook): Refactor ChromePermissionsMessageProvider so we can share
// code. For now, this implementation does nothing.
class ShellPermissionMessageProvider : public PermissionMessageProvider {
 public:
  ShellPermissionMessageProvider() {}
  ~ShellPermissionMessageProvider() override {}

  // PermissionMessageProvider implementation.
  PermissionMessages GetPermissionMessages(
      const PermissionIDSet& permissions) const override {
    return PermissionMessages();
  }

  bool IsPrivilegeIncrease(const PermissionSet& old_permissions,
                           const PermissionSet& new_permissions,
                           Manifest::Type extension_type) const override {
    // Ensure we implement this before shipping.
    CHECK(false);
    return false;
  }

  PermissionIDSet GetAllPermissionIDs(
      const PermissionSet& permissions,
      Manifest::Type extension_type) const override {
    return PermissionIDSet();
  }

 private:
  DISALLOW_COPY_AND_ASSIGN(ShellPermissionMessageProvider);
};

base::LazyInstance<ShellPermissionMessageProvider>
    g_permission_message_provider = LAZY_INSTANCE_INITIALIZER;

}  // namespace

ShellExtensionsClient::ShellExtensionsClient()
    : extensions_api_permissions_(ExtensionsAPIPermissions()) {
}

ShellExtensionsClient::~ShellExtensionsClient() {
}

void ShellExtensionsClient::Initialize() {
  RegisterCommonManifestHandlers();
  ManifestHandler::FinalizeRegistration();
  // TODO(jamescook): Do we need to whitelist any extensions?

  PermissionsInfo::GetInstance()->AddProvider(extensions_api_permissions_);
}

const PermissionMessageProvider&
ShellExtensionsClient::GetPermissionMessageProvider() const {
  NOTIMPLEMENTED();
  return g_permission_message_provider.Get();
}

const std::string ShellExtensionsClient::GetProductName() {
  return "app_shell";
}

std::unique_ptr<FeatureProvider> ShellExtensionsClient::CreateFeatureProvider(
    const std::string& name) const {
  std::unique_ptr<FeatureProvider> provider;
  if (name == "api") {
    provider.reset(new ShellAPIFeatureProvider());
  } else if (name == "manifest") {
    provider.reset(new ShellManifestFeatureProvider());
  } else if (name == "permission") {
    provider.reset(new ShellPermissionFeatureProvider());
  } else if (name == "behavior") {
    provider.reset(new ShellBehaviorFeatureProvider());
  } else {
    NOTREACHED();
  }
  return provider;
}

std::unique_ptr<JSONFeatureProviderSource>
ShellExtensionsClient::CreateAPIFeatureSource() const {
  std::unique_ptr<JSONFeatureProviderSource> source(
      new JSONFeatureProviderSource("api"));
  source->LoadJSON(IDR_EXTENSION_API_FEATURES);
  source->LoadJSON(IDR_SHELL_EXTENSION_API_FEATURES);
  return source;
}

void ShellExtensionsClient::FilterHostPermissions(
    const URLPatternSet& hosts,
    URLPatternSet* new_hosts,
    PermissionIDSet* permissions) const {
  NOTIMPLEMENTED();
}

void ShellExtensionsClient::SetScriptingWhitelist(
    const ScriptingWhitelist& whitelist) {
  scripting_whitelist_ = whitelist;
}

const ExtensionsClient::ScriptingWhitelist&
ShellExtensionsClient::GetScriptingWhitelist() const {
  // TODO(jamescook): Real whitelist.
  return scripting_whitelist_;
}

URLPatternSet ShellExtensionsClient::GetPermittedChromeSchemeHosts(
    const Extension* extension,
    const APIPermissionSet& api_permissions) const {
  NOTIMPLEMENTED();
  return URLPatternSet();
}

bool ShellExtensionsClient::IsScriptableURL(const GURL& url,
                                            std::string* error) const {
  NOTIMPLEMENTED();
  return true;
}

bool ShellExtensionsClient::IsAPISchemaGenerated(
    const std::string& name) const {
  return api::GeneratedSchemas::IsGenerated(name) ||
         shell::api::ShellGeneratedSchemas::IsGenerated(name);
}

base::StringPiece ShellExtensionsClient::GetAPISchema(
    const std::string& name) const {
  // Schema for app_shell-only APIs.
  if (shell::api::ShellGeneratedSchemas::IsGenerated(name))
    return shell::api::ShellGeneratedSchemas::Get(name);

  // Core extensions APIs.
  return api::GeneratedSchemas::Get(name);
}

void ShellExtensionsClient::RegisterAPISchemaResources(
    ExtensionAPI* api) const {
}

bool ShellExtensionsClient::ShouldSuppressFatalErrors() const {
  return true;
}

void ShellExtensionsClient::RecordDidSuppressFatalError() {
}

std::string ShellExtensionsClient::GetWebstoreBaseURL() const {
  return extension_urls::kChromeWebstoreBaseURL;
}

std::string ShellExtensionsClient::GetWebstoreUpdateURL() const {
  return extension_urls::kChromeWebstoreUpdateURL;
}

bool ShellExtensionsClient::IsBlacklistUpdateURL(const GURL& url) const {
  // TODO(rockot): Maybe we want to do something else here. For now we accept
  // any URL as a blacklist URL because we don't really care.
  return true;
}

}  // namespace extensions


text:
set -o xtrace
set -o errexit

git clone https://github.com/mongodb-labs/driver-performance-test-data.git
cd driver-performance-test-data
tar xf extended_bson.tgz
tar xf parallel.tgz
tar xf single_and_multi_document.tgz
cd ..

export TEST_PATH="${PROJECT_DIRECTORY}/driver-performance-test-data"
export OUTPUT_FILE="${PROJECT_DIRECTORY}/results.json"

MTCBIN=/opt/mongodbtoolchain/v3/bin
VIRTUALENV="$MTCBIN/virtualenv -p $MTCBIN/python3"

$VIRTUALENV pyperftest
. pyperftest/bin/activate
python -m pip install simplejson

python setup.py build_ext -i
start_time=$(date +%s)
python test/performance/perf_test.py --locals
end_time=$(date +%s)
elapsed_secs=$((end_time-start_time))

cat results.json

echo "{\"failures\": 0, \"results\": [{\"status\": \"pass\", \"exit_code\": 0, \"test_file\": \"BenchMarkTests\", \"start\": $start_time, \"end\": $end_time, \"elapsed\": $elapsed_secs}]}" > report.json

cat report.json


text:
const shelljs = require('shelljs');
const chalk = require('chalk');
const dockerUtils = require('./docker-utils');
const { getBase64Secret, getAllJhipsterConfig } = require('./utils');

module.exports = {
    checkDocker: dockerUtils.checkDocker,
    checkImages,
    generateJwtSecret,
    configureImageNames,
    setAppsFolderPaths,
    loadConfigs,
    loadFromYoRc,
    setClusteredApps
};

/**
 * Check Images
 */
function checkImages() {
    this.log('\nChecking Docker images in applications directories...');

    let imagePath = '';
    let runCommand = '';
    this.warning = false;
    this.warningMessage = 'To generate the missing Docker image(s), please run:\n';
    this.appsFolders.forEach((appsFolder, index) => {
        const appConfig = this.appConfigs[index];
        if (appConfig.buildTool === 'maven') {
            imagePath = this.destinationPath(`${this.directoryPath + appsFolder}/target/jib-cache`);
            runCommand = './mvnw -ntp -Pprod verify jib:dockerBuild';
        } else {
            imagePath = this.destinationPath(`${this.directoryPath + appsFolder}/build/jib-cache`);
            runCommand = './gradlew bootJar -Pprod jibDockerBuild';
        }
        if (shelljs.ls(imagePath).length === 0) {
            this.warning = true;
            this.warningMessage += `  ${chalk.cyan(runCommand)} in ${this.destinationPath(this.directoryPath + appsFolder)}\n`;
        }
    });
}

/**
 * Generate Jwt Secret
 */
function generateJwtSecret() {
    if (this.jwtSecretKey === undefined) {
        this.jwtSecretKey = getBase64Secret();
    }
}

/**
 * Configure Image Names
 */
function configureImageNames() {
    for (let i = 0; i < this.appsFolders.length; i++) {
        const originalImageName = this.appConfigs[i].baseName.toLowerCase();
        const targetImageName = this.dockerRepositoryName ? `${this.dockerRepositoryName}/${originalImageName}` : originalImageName;
        this.appConfigs[i].targetImageName = targetImageName;
    }
}

/**
 * Set Apps Folder Paths
 */
function setAppsFolderPaths() {
    if (this.applicationType) return;
    this.appsFolderPaths = [];
    for (let i = 0; i < this.appsFolders.length; i++) {
        const path = this.destinationPath(this.directoryPath + this.appsFolders[i]);
        this.appsFolderPaths.push(path);
    }
}

/**
 * Load config from this.appFolders
 */
function loadConfigs() {
    this.appConfigs = [];
    this.gatewayNb = 0;
    this.monolithicNb = 0;
    this.microserviceNb = 0;
    this.uaaNb = 0;

    // Loading configs
    this.debug(`Apps folders: ${this.appsFolders}`);
    this.appsFolders.forEach(appFolder => {
        const path = this.destinationPath(`${this.directoryPath + appFolder}`);
        if (this.fs.exists(`${path}/.yo-rc.json`)) {
            const config = getAllJhipsterConfig(this, false, path);

            if (config.applicationType === 'monolith') {
                this.monolithicNb++;
            } else if (config.applicationType === 'gateway') {
                this.gatewayNb++;
            } else if (config.applicationType === 'microservice') {
                this.microserviceNb++;
            } else if (config.applicationType === 'uaa') {
                this.uaaNb++;
            }

            this.portsToBind = this.monolithicNb + this.gatewayNb;
            config.appFolder = appFolder;
            this.appConfigs.push(config);
        } else {
            this.error(`Application '${appFolder}' is not found in the path '${this.directoryPath}'`);
        }
    });
}

function setClusteredApps() {
    for (let i = 0; i < this.appsFolders.length; i++) {
        for (let j = 0; j < this.clusteredDbApps.length; j++) {
            this.appConfigs[i].clusteredDb = this.appsFolders[i] === this.clusteredDbApps[j];
        }
    }
}

function loadFromYoRc() {
    this.authenticationType = this.config.get('authenticationType');
    this.defaultAppsFolders = this.config.get('appsFolders');
    this.directoryPath = this.config.get('directoryPath');
    this.gatewayType = this.config.get('gatewayType');
    this.clusteredDbApps = this.config.get('clusteredDbApps');
    this.monitoring = this.config.get('monitoring');
    this.consoleOptions = this.config.get('consoleOptions');
    this.useKafka = false;
    this.useMemcached = false;
    this.useRedis = false;
    this.dockerRepositoryName = this.config.get('dockerRepositoryName');
    this.dockerPushCommand = this.config.get('dockerPushCommand');
    this.serviceDiscoveryType = this.config.get('serviceDiscoveryType');
    this.reactive = this.config.get('reactive');
    if (this.serviceDiscoveryType === undefined) {
        this.serviceDiscoveryType = 'eureka';
    }
    this.adminPassword = this.config.get('adminPassword');
    this.jwtSecretKey = this.config.get('jwtSecretKey');

    if (this.defaultAppsFolders !== undefined) {
        this.log('\nFound .yo-rc.json config file...');
    }

    if (this.regenerate) {
        this.appsFolders = this.defaultAppsFolders;
        loadConfigs.call(this);
        if (this.microserviceNb > 0 || this.gatewayNb > 0 || this.uaaNb > 0) {
            this.deploymentApplicationType = 'microservice';
        } else {
            this.deploymentApplicationType = 'monolith';
        }
        setClusteredApps.call(this);
        if (!this.adminPassword) {
            this.adminPassword = 'admin'; // TODO find a better way to do this
            this.adminPasswordBase64 = getBase64Secret(this.adminPassword);
        }
    }
}


text:
<?php

	/**
	 * Include file
	 *
	 * @param string $file File to include
	 * @param array $options options about the file to include. Options like, critical
	 * @return boolean
	 */
	function include_file($file, $options = array()) {
		//Check if file is already loaded, if it is, return TRUE and do no more
		if (check_file_loaded($file, TRUE)) {
			return TRUE;
		} //End of if

		$return = FALSE;
		//If not, check the file exists
		if (file_exists($file)) {
			//If file exists, attempt inclusion and log if its a success
			if ((include $file) == 1) {
				//$files[] = $file;
				$return = TRUE;
			} //End of if
		} //End of if

		if (!$return) {
			if (isset($options['level'])) {
				switch ($options['level']) {
					default:
					case 'critical':
						trigger_error('"'.$file.'" failed to load because the file could not be found.', E_USER_ERROR);
						exit(1);
					break;
				}
			} else {
				return FALSE;
			} //End of if
		} else {
			//Log the file loading
			check_file_loaded($file, FALSE);
			return TRUE;
		} //End of if
	} //End of function

	/**
	 * Keeps track of included classes for debug and validation of inclusion
	 *
	 * @staticvar array $included_files List of included files
	 * @param string $file File to check
	 * @return mixed
	 */
	function check_file_loaded($file, $verify = TRUE) {
		static $included_files = array();
		//If the file is a dir, then return FALSE
		if (($file == '') || ($file == '.') || ($file == '..')) { return FALSE; }

/*echo '"'.$file.'" : ';
var_dump(in_array($file, $included_files));
echo ' = ';
var_dump($verify);
echo '

';*/

		if (($file == '%') || ($file == '*')) { //If these characters are mentioned, return the list of included files
			return $included_files;
		} else if (in_array($file, $included_files)) {//Check for the file, see if its already been included. If it has, return TRUE.
			return TRUE;
		} else if ($verify == FALSE) {//If is neither, add the file to the list.
			$included_files[] = $file;
			return TRUE;
		}
		return FALSE;
	} //End of function

?>


text:
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
	xmlns:rim="http://www.blackberry.com/ns/widgets"
	version="0.0.1.0" id="BBLJ">

	<name>BBLJ</name>
	<author>LeoZ</author>
	<description>BlackBerry LiveJournal Client</description>
	<icon src="images/icon.png"/>
	<content src="index.html"/>

	<rim:permissions>
		<rim:permit>use_camera</rim:permit>
		<rim:permit>access_shared</rim:permit>
	</rim:permissions>

	<feature id="blackberry.invoke"/>
	<feature id="blackberry.app"/>
	<feature id="blackberry.system"/>

	<access uri="http://www.livejournal.com/" subdomains="true" />
	<access subdomains="true" uri="*" />

</widget>


text:
from copy import deepcopy
from functools import wraps

from colander import Boolean, drop, Mapping, null, Number, Sequence, Tuple
from pyramid.settings import asbool
from zope.interface import implementer

from ines.convert import camelcase
from ines.exceptions import Error
from ines.interfaces import IOutputSchemaView
from ines.utils import different_values

@implementer(IOutputSchemaView)
class OutputSchemaView(object):
    schema_type = 'response'

    def __init__(self, route_name, request_method, renderer, schema):
        self.route_name = route_name
        self.request_method = request_method
        self.renderer = renderer
        self.schema = schema
        self.allowed_fields = self.find_allowed_fields(self.schema)
        if not self.allowed_fields:
            raise Error('output', 'Define output fields for %s' % self.schema)

        self.required_fields = self.find_required_fields(self.schema)

    def __call__(self, wrapped):
        @wraps(wrapped)
        def wrapper(context, request):
            context.output_schema = self.schema

            # Define allowed fields
            context.allowed_fields = self.allowed_fields

            # Look and validate requested fields
            include_fields = getattr(context, 'include_fields', None)
            if include_fields:
                context.output_fields = construct_allowed_fields(
                    self.allowed_fields,
                    include_fields)
            else:
                context.output_fields = deepcopy(self.allowed_fields)

            # Exclude fields
            exclude_fields = getattr(context, 'exclude_fields', None)
            if exclude_fields:
                for field in exclude_fields:
                    if '.' not in field:
                        context.output_fields.pop(field, None)
                    else:
                        field_blocks = field.split('.')
                        previous = context.output_fields
                        for field_block in field_blocks[:-1]:
                            previous = previous.get(field_block)
                            if not previous:
                                break
                        if previous:
                            previous.pop(field_blocks[-1])

            if not context.output_fields:
                keys = '+'.join(self.allowed_fields_to_set(self.allowed_fields))
                raise Error(keys, 'Please define some fields to export')

            context.fields = deepcopy(context.output_fields)
            self.add_required_fields(context.fields, self.required_fields)

            result = wrapped(context, request)
            if getattr(self.schema, 'ignore_construct', False):
                return result
            else:
                return self.construct_structure(
                    self.schema,
                    result,
                    context.output_fields)

        return wrapper

    def add_required_fields(self, fields, required_fields):
        if required_fields and fields:
            for key, required_key in required_fields.items():
                if not isinstance(required_key, dict):
                    if key in fields and required_key not in fields:
                        fields[required_key] = {}
                elif key in fields:
                    self.add_required_fields(fields[key], required_key)

    def find_required_fields(self, schema, previous=None):
        required_fields = {}
        if isinstance(schema.typ, (Sequence, Tuple)):
            for child in schema.children:
                self.find_required_fields(child, required_fields)

        elif isinstance(schema.typ, Mapping):
            for child in schema.children:
                response = self.find_required_fields(child, required_fields)
                if response:
                    required_fields[child.name] = response

        if hasattr(schema, 'use_when'):
            for key in schema.use_when.keys():
                if previous is not None:
                    if key not in previous:
                        previous[schema.name] = key
                else:
                    if key not in required_fields:
                        required_fields[schema.name] = key

        return required_fields

    def find_allowed_fields(self, schema):
        allowed_fields = {}
        if isinstance(schema.typ, (Sequence, Tuple)):
            for child in schema.children:
                allowed_fields.update(self.find_allowed_fields(child))

        elif isinstance(schema.typ, Mapping):
            for child in schema.children:
                allowed_fields[child.name] = self.find_allowed_fields(child)

        return allowed_fields

    def encode_key(self, key):
        return camelcase(key)

    def construct_structure(self, schema, values, fields, first_value=False):
        if isinstance(schema.typ, Sequence):
            result = []
            if values is None:
                return result
            elif values is null:
                return []

            child = schema.children[0]
            for value in values:
                child_value = self.construct_structure(child, value, fields)
                if child_value is not None:
                    result.append(child_value)

            return result

        elif isinstance(schema.typ, Tuple):
            raise NotImplementedError('Tuple type need to be implemented')

        elif isinstance(schema.typ, Mapping):
            result = {}
            if values is None or (values is null and not first_value):
                return result

            if isinstance(values, dict):
                get_value = values.get
            else:
                get_value = lambda k, d=None: getattr(values, k, d)

            for child in schema.children:
                if child.name not in fields:
                    continue

                child_values = get_value(child.name, child.default)
                value = self.construct_structure(
                    child,
                    child_values,
                    fields[child.name])

                add_value = bool(value is not None or child.missing is not drop)
                if not add_value and hasattr(child, 'use_when'):
                    for key, compare_value in child.use_when.items():
                        if different_values(get_value(key), compare_value):
                            add_value = False
                            break
                        else:
                            add_value = True

                if add_value:
                    result[self.encode_key(child.name)] = value

            return result

        else:
            if values is not None:
                values = schema.serialize(values)

            if values is null:
                return None
            elif values is not None:
                if isinstance(schema.typ, Number):
                    return schema.typ.num(values)
                elif isinstance(schema.typ, Boolean):
                    return asbool(values)
                else:
                    return values
            else:
                return values

    def allowed_fields_to_set(self, fields, padding=None):
        result = set()
        for key, children in fields.items():
            if padding:
                key = '%s.%s' % (padding, key)
            result.add(key)
            if children:
                result.update(self.allowed_fields_to_set(children, key))
        return result

def construct_allowed_fields(fields_dict, requested_fields, padding=None, add_all=False):
    """
    Allowed structure:
    {
        a,
        b,
        c {
            d,
            e,
            f {
                g,
                h {
                    i
                }
            }
        }
    }

    Requested: b
    If we request B, we ignore brothers of B.
    {
        b
    }

    Requested: c
    If we request C, we ignore brothers of C.
    {
        c {
            d,
            e,
            f {
                g,
                h {
                    i
                }
            }
        }
    }

    Requested: c.f.h
    If we request C.F.H, we ignore brothers of C.F.H.
    But A, B, C.D and C.E are "fathers" of C.F.H so we add it
    {
        a,
        b,
        c {
            d,
            e,
            f {
                h {
                    i
                }
            }
        }
    }

    Requested: c.f + c.f.h + a
    If we request C.F, we ignore brothers of C.F and add C.F children
    If we request C.F.H, we ignore brothers of C.F.H, even if it has been added on C.F
    If we request A, we ignore brothers of A
    {
        a,
        c {
            f {
                h {
                    i
                }
            }
        }
    }
    """

    result = {}
    level_field_added = False
    post_level_field_add = []

    for original_name, children in fields_dict.items():
        if padding:
            name = '%s.%s' % (padding, original_name)
        else:
            name = original_name

        is_required = bool(name in requested_fields)
        if is_required:
            # If not requested, no others fields will be added in this level
            level_field_added = True
        else:
            name_with_dot = name + '.'
            for field in requested_fields:
                if field.startswith(name_with_dot):
                    is_required = True
                    break

        if is_required:
            if children:
                # All children fields will be added!
                result[original_name] = construct_allowed_fields(
                    children,
                    requested_fields,
                    name,
                    add_all=True)
            else:
                result[original_name] = {}

        elif not level_field_added:
            # Add this fields, if no other field added in this level
            post_level_field_add.append((original_name, name, children, add_all))

    if not level_field_added and post_level_field_add:
        for original_name, name, children, field_add_all in post_level_field_add:
            if children:
                result[original_name] = construct_allowed_fields(
                    children,
                    requested_fields,
                    name,
                    field_add_all)
            else:
                result[original_name] = {}

    return result


text:
package ru.spbau.tinydb.utils;

import ru.spbau.tinydb.btree.BxTreeEntry;
import ru.spbau.tinydb.queries.Attribute;
import ru.spbau.tinydb.queries.SecondLevelId;
import ru.spbau.tinydb.table.Record;
import ru.spbau.tinydb.table.Table;

import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * tiny_database
 * Created by Sergey on 08.11.2014.
 */
public class Utils {
    public static byte[] intToBytes(int i) {
        return ByteBuffer.allocate(4).putInt(i).array();
    }

    public static int bytesToInt(byte[] intBytes) {
        return ByteBuffer.wrap(intBytes, 0, 4).getInt();
    }

    public static byte[] stringToBytes(String value, int size) throws UnsupportedEncodingException {
        byte[] res = new byte[size];
        byte[] stringBytes = value.getBytes("US-ASCII");
        if(stringBytes.length > size) {
            throw new IllegalArgumentException("String len is more than size");
        }
        System.arraycopy(stringBytes, 0, res, 0, stringBytes.length);
        Arrays.fill(res, stringBytes.length, res.length, (byte) 0);
        return res;
    }

    public static String bytesToString(byte[] bytes) {
        try {
            int i = 0;
            for(; i < bytes.length; i++) {
                if(bytes[i] == 0) {
                    break;
                }
            }
            return new String(bytes, 0, i, "US-ASCII");
        } catch (UnsupportedEncodingException e) {
            // Should not be
            throw new RuntimeException();
        }
    }

    public static byte[] doubleToBytes(double d) {
    	byte[] bytes = new byte[8];
    	ByteBuffer.wrap(bytes).putDouble(d);
    	return bytes;
    }

    public static Double bytesToDouble(byte[] bytes) {
    	return ByteBuffer.wrap(bytes).getDouble();
    }

    public static void printSchema(Collection<Attribute> schema) {
    	for(Attribute attr: schema) {
    		System.out.print("| " + attr.getAttributeName() + " ");
    	}
		System.out.println("|");
	}

    public static void printAll(Iterator<Object[]> cursor) {
        while (cursor.hasNext()){
            System.out.println(Arrays.toString(cursor.next()));
        }
    }
    public static Iterator<Record> indexIterToRecordIter(final Table table,
			final Iterator<BxTreeEntry> indexIter) {
		return new Iterator<Record>() {
			private Record rec = getNext();
			@Override
			public Record next() {
				if(!hasNext()) {
					throw new IllegalStateException();
				}
				Record oldRec = rec;
				rec = getNext();
				return oldRec;
			}

			private Record getNext() {
				try {
					while(indexIter.hasNext()) {
						BxTreeEntry entry = indexIter.next();
						int recordId = entry.value;
						Map<SecondLevelId, Object> atrs = table.getRecord(recordId);
						if(atrs != null) {
							return new Record(atrs, recordId);
						}
					}
					return null;
				} catch (ExecutionException e) {
					throw new RuntimeException(e);
				}
			}

			@Override
			public boolean hasNext() {
				return rec != null;
			}

			@Override
			public void remove() {
				throw new IllegalStateException();
			}
		};
	}

    public static <T> Iterator<T> emptyIterator() {
		return new Iterator<T>() {

			@Override
			public boolean hasNext() {
				return false;
			}

			@Override
			public T next() {
				throw new IllegalStateException();
			}

			@Override
			public void remove() {
				throw new RuntimeException();
			}
		};
    }

	public static Map<SecondLevelId, Object> join(
			Map<SecondLevelId, Object> firstVal,
			Map<SecondLevelId, Object> secondVal) {
		Map<SecondLevelId, Object> result = new HashMap<>();
		result.putAll(firstVal);
		result.putAll(secondVal);
		return result;
	}
}


text:
<?php

namespace Sylius\Bundle\ResourceBundle\DependencyInjection;

use Sylius\Bundle\ResourceBundle\DependencyInjection\Factory\DatabaseDriverFactoryInterface;
use Sylius\Bundle\ResourceBundle\DependencyInjection\Factory\ResourceServicesFactory;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\Config\Definition\Processor;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

/**
 * Resource system extension.
 *
 * @author Paweł Jędrzejewski <pjedrzejewski@sylius.pl>
 */
class SyliusResourceExtension extends Extension
{
    private $factories = array();

    /**
     * {@inheritdoc}
     */
    public function load(array $config, ContainerBuilder $container)
    {
        $processor = new Processor();
        $config    = $processor->processConfiguration(new Configuration(), $config);

        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/container'));
        $loader->load('services.xml');

        if (isset($config['resources'])) {
            $this->createResourceServices($config['resources']);
        }
    }

    /**
     * Adds a factory that is able to handle a specific database driver type
     *
     * @param $factory
     */
    public function addDatabaseDriverFactory(DatabaseDriverFactoryInterface $factory)
    {
        $this->factories[$factory->getSupportedDriver()] = $factory;
    }

    /**
     * @param array $configs
     *
     * @throws \InvalidArgumentException
     */
    private function createResourceServices(array $configs)
    {
        foreach ($configs as $name => $config) {
            list($prefix, $resourceName) = explode('.', $name);

            $factory = $this->getFactoryForDriver($config['driver']);
            if (!$factory) {
                throw new \InvalidArgumentException(sprintf('Driver "%s" is unsupported, no factory exists for creating services', $config['driver']));
            }

            $factory->create($prefix, $resourceName, $config['classes'], array_key_exists('templates', $config) ? $config['templates'] : null);
        }
    }

    /**
     * @param $driver
     *
     * @return DatabaseDriverFactoryInterface
     */
    private function getFactoryForDriver($driver)
    {
        if (isset($this->factories[$driver])) {
            return $this->factories[$driver];
        }
    }
}


text:
/**
 *
 */
package io.github.pbremer.icecreammanager.repository;

import java.io.Serializable;
import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.NoRepositoryBean;

/**
 * @author Patrick Bremer
 */
@NoRepositoryBean
public interface IsActiveSerchable<T, ID>
        extends JpaRepository<T, Serializable> {

    public List<T> findByActiveEquals(boolean isActive);
}


text:
if [ "x${OSTYPE}" = "xcygwin" ]; then
  cd "$(cygpath "${PWD}")"
fi
if [[ ${PWD} != */native_client ]]; then
  echo "ERROR: must be run in native_client!"
  exit 1
fi

if [ $# -ne 1 ]; then
  echo "USAGE: $0 win/mac/linux"
  exit 2
fi

readonly SCRIPT_DIR="$(dirname "$0")"
readonly SCRIPT_DIR_ABS="$(cd "${SCRIPT_DIR}" ; pwd)"

export TOOLCHAINLOC=sdk
export TOOLCHAINNAME=nacl-sdk

set -x
set -e
set -u

PLATFORM=$1

cd tools
export INSIDE_TOOLCHAIN=1

echo @@@BUILD_STEP clobber_toolchain@@@
rm -rf ../scons-out sdk-out sdk ../toolchain/*_newlib SRC/* BUILD/*

if [[ "${BUILDBOT_SLAVE_TYPE:-Trybot}" == "Trybot" ]]; then
echo @@@BUILD_STEP setup source@@@
./buildbot_patch-toolchain-tries.sh
fi

echo @@@BUILD_STEP compile_toolchain@@@
mkdir -p ../toolchain/${PLATFORM}_x86
make -j8 clean buildbot-build-with-newlib
if [[ ${PLATFORM} == win ]]; then
../mingw/msys/bin/sh.exe -c "export PATH=/mingw/bin:/bin:\$PATH &&
  export TOOLCHAINLOC &&
  export TOOLCHAINNAME &&
  make -j8 gdb 2>&1"
fi

echo @@@BUILD_STEP canonicalize timestamps@@@
./canonicalize_timestamps.sh sdk

echo @@@BUILD_STEP tar_toolchain@@@
# We don't just use tar's z flag because we want to pass the -n option
# to gzip so that it won't embed a timestamp in the compressed file.
tar cvf - sdk | gzip -n -9 > naclsdk.tgz
chmod a+r naclsdk.tgz
if [ "$PLATFORM" = "mac" ] ; then
  echo "$(SHA1=$(openssl sha1 naclsdk.tgz) ; echo ${SHA1/* /})"
else
  echo "$(SHA1=$(sha1sum -b naclsdk.tgz) ; echo ${SHA1:0:40})"
fi > naclsdk.tgz.sha1hash

if [[ "${BUILDBOT_SLAVE_TYPE:-Trybot}" != "Trybot" ]]; then
  # Upload the toolchain before running the tests, in case the tests
  # fail.  We do not want a flaky test or a non-toolchain-related bug to
  # cause us to lose the toolchain snapshot, especially since this takes
  # so long to build on Windows.  We can always re-test a toolchain
  # snapshot on the trybots.
  echo @@@BUILD_STEP archive_build@@@
  (
    gsutil=../buildbot/gsutil.sh
    GS_BASE=gs://nativeclient-archive2/toolchain
    for destrevision in ${BUILDBOT_GOT_REVISION} latest ; do
      for suffix in tgz tgz.sha1hash ; do
        ${gsutil} cp -a public-read \
          naclsdk.${suffix} \
          ${GS_BASE}/${destrevision}/naclsdk_${PLATFORM}_x86.${suffix}
      done
    done
  )
  echo @@@STEP_LINK@download@http://gsdview.appspot.com/nativeclient-archive2/toolchain/${BUILDBOT_GOT_REVISION}/@@@
fi

echo @@@BUILD_STEP untar_toolchain@@@
mkdir -p ../toolchain/${PLATFORM}_x86_newlib/.tmp
cd ../toolchain/${PLATFORM}_x86_newlib/.tmp
tar xfz ../../../tools/naclsdk.tgz
mv sdk/nacl-sdk/* ../

cd ../../..

if [[ ${PLATFORM} == win ]]; then
  # Explicitly call the depot tools version of Python to avoid cygwin issues.
  python.bat buildbot/buildbot_standard.py opt 64 newlib
elif [[ ${PLATFORM} == mac ]]; then
  python buildbot/buildbot_standard.py opt 32 newlib
elif [[ ${PLATFORM} == linux ]]; then
  python buildbot/buildbot_standard.py opt 32 newlib
else
  echo "ERROR, bad platform."
  exit 1
fi

if [[ "${DONT_BUILD_COMPATIBLE_TOOLCHAINS:-no}" != "yes" ]]; then
  echo @@@BUILD_STEP sync backports@@@
  tools/BACKPORTS/build_backports.sh VERSIONS ${PLATFORM} newlib
fi


text:
import * as React from "react";
import { Trans } from "@lingui/macro";
import { NumberCell, Tooltip } from "@dcos/ui-kit";

import Pod from "../structs/Pod";
import Service from "../structs/Service";
import ServiceTree from "../structs/ServiceTree";
import Units from "#SRC/js/utils/Units";
import { getResourceLimits } from "./resourceLimits";

export const ServiceMem = React.memo(
  ({
    resource,
    limit,
  }: {
    resource: string;
    limit?: number | string;
    id: string;
  }) => {
    if (limit != null && limit !== 0 && limit !== resource) {
      return (
        <NumberCell>
          <Tooltip
            id={`mem{id}`}
            trigger={Units.formatResources("mem", resource, limit)}
            maxWidth={150}
          >
            <Trans
              id="{resource} are being guaranteed with a limit of {limit}"
              render="span"
              values={{
                resource: Units.formatResource("mem", resource),
                limit: Units.formatResource("mem", limit),
              }}
            />
          </Tooltip>
        </NumberCell>
      );
    }
    return (
      <NumberCell>
        <span>{Units.formatResource("mem", resource)}</span>
      </NumberCell>
    );
  }
);

type TreeItem = Service | Pod | ServiceTree;
export const memRenderer = (service: TreeItem): React.ReactNode => (
  <ServiceMem
    id={service.getId()}
    resource={service.getResources().mem}
    limit={getResourceLimits(service, true).mem}
  />
);


text:
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/* lib/krb5/os/accessor.c */
/*
 * Copyright 1990, 2008 by the Massachusetts Institute of Technology.
 * All Rights Reserved.
 *
 * Export of this software from the United States of America may
 *   require a specific license from the United States Government.
 *   It is the responsibility of any person or organization contemplating
 *   export to obtain such a license before exporting.
 *
 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
 * distribute this software and its documentation for any purpose and
 * without fee is hereby granted, provided that the above copyright
 * notice appear in all copies and that both that copyright notice and
 * this permission notice appear in supporting documentation, and that
 * the name of M.I.T. not be used in advertising or publicity pertaining
 * to distribution of the software without specific, written prior
 * permission.  Furthermore if you modify this software you must label
 * your software as modified software and not distribute it in such a
 * fashion that it might be confused with the original M.I.T. software.
 * M.I.T. makes no representations about the suitability of
 * this software for any purpose.  It is provided "as is" without express
 * or implied warranty.
 */

#include "k5-int.h"
#include "os-proto.h"
#include "../krb/int-proto.h"

/* If this trick gets used elsewhere, move it to k5-platform.h.  */
#ifndef DESIGNATED_INITIALIZERS
/* ANSI/ISO C 1999 supports this...  */
#if __STDC_VERSION__ >= 199901L                       \
    /* ...as does GCC, since version 2.something.  */ \
    || (!defined __cplusplus && __GNUC__ >= 3)
#define DESIGNATED_INITIALIZERS 1
#else
#define DESIGNATED_INITIALIZERS 0
#endif
#endif

krb5_error_code KRB5_CALLCONV
krb5int_accessor(krb5int_access *internals, krb5_int32 version)
{
    if (version == KRB5INT_ACCESS_VERSION) {
#if DESIGNATED_INITIALIZERS
#define S(FIELD, VAL)   .FIELD = VAL
#if defined __GNUC__ && __STDC_VERSION__ < 199901L
        __extension__
#endif
            static const krb5int_access internals_temp = {
#else
#define S(FIELD, VAL)   internals_temp.FIELD = VAL
            krb5int_access internals_temp;
#endif
            S (auth_con_get_subkey_enctype, krb5_auth_con_get_subkey_enctype),

            S (clean_hostname, k5_clean_hostname),

#ifndef LEAN_CLIENT
#define SC(FIELD, VAL)  S(FIELD, VAL)
#else /* disable */
#define SC(FIELD, VAL)  S(FIELD, 0)
#endif
            SC (ser_pack_int64, krb5_ser_pack_int64),
            SC (ser_unpack_int64, krb5_ser_unpack_int64),
#undef SC

#ifdef ENABLE_LDAP
#define SC(FIELD, VAL)  S(FIELD, VAL)
#else
#define SC(FIELD, VAL)  S(FIELD, 0)
#endif
            SC (asn1_ldap_encode_sequence_of_keys, krb5int_ldap_encode_sequence_of_keys),
            SC (asn1_ldap_decode_sequence_of_keys, krb5int_ldap_decode_sequence_of_keys),
#undef SC

#ifndef DISABLE_PKINIT
#define SC(FIELD, VAL)  S(FIELD, VAL)
#else /* disable */
#define SC(FIELD, VAL)  S(FIELD, 0)
#endif
            SC (encode_krb5_pa_pk_as_req, encode_krb5_pa_pk_as_req),
            SC (encode_krb5_pa_pk_as_req_draft9, encode_krb5_pa_pk_as_req_draft9),
            SC (encode_krb5_pa_pk_as_rep, encode_krb5_pa_pk_as_rep),
            SC (encode_krb5_pa_pk_as_rep_draft9, encode_krb5_pa_pk_as_rep_draft9),
            SC (encode_krb5_auth_pack, encode_krb5_auth_pack),
            SC (encode_krb5_auth_pack_draft9, encode_krb5_auth_pack_draft9),
            SC (encode_krb5_kdc_dh_key_info, encode_krb5_kdc_dh_key_info),
            SC (encode_krb5_reply_key_pack, encode_krb5_reply_key_pack),
            SC (encode_krb5_reply_key_pack_draft9, encode_krb5_reply_key_pack_draft9),
            SC (encode_krb5_td_trusted_certifiers, encode_krb5_td_trusted_certifiers),
            SC (encode_krb5_td_dh_parameters, encode_krb5_td_dh_parameters),
            SC (decode_krb5_pa_pk_as_req, decode_krb5_pa_pk_as_req),
            SC (decode_krb5_pa_pk_as_req_draft9, decode_krb5_pa_pk_as_req_draft9),
            SC (decode_krb5_pa_pk_as_rep, decode_krb5_pa_pk_as_rep),
            SC (decode_krb5_auth_pack, decode_krb5_auth_pack),
            SC (decode_krb5_auth_pack_draft9, decode_krb5_auth_pack_draft9),
            SC (decode_krb5_kdc_dh_key_info, decode_krb5_kdc_dh_key_info),
            SC (decode_krb5_principal_name, decode_krb5_principal_name),
            SC (decode_krb5_reply_key_pack, decode_krb5_reply_key_pack),
            SC (decode_krb5_reply_key_pack_draft9, decode_krb5_reply_key_pack_draft9),
            SC (decode_krb5_td_trusted_certifiers, decode_krb5_td_trusted_certifiers),
            SC (decode_krb5_td_dh_parameters, decode_krb5_td_dh_parameters),
            SC (encode_krb5_kdc_req_body, encode_krb5_kdc_req_body),
            SC (free_kdc_req, krb5_free_kdc_req),
            SC (set_prompt_types, k5_set_prompt_types),
#undef SC

#if DESIGNATED_INITIALIZERS
        };
#else
        0;
#endif
        *internals = internals_temp;
        return 0;
    }
    return KRB5_OBSOLETE_FN;
}


text:
import os, sys, argparse, logging, json, base64
import requests, redis
from functools import lru_cache
from bottle import route, request, response, redirect, default_app, view, template, static_file
from cymruwhois import Client
from classes.address import Address

def enable_cors(fn):
	def _enable_cors(*args, **kwargs):
		response.headers['Access-Control-Allow-Origin'] = '*'
		response.headers['Access-Control-Allow-Methods'] = 'GET, POST, PUT, OPTIONS'
		response.headers['Access-Control-Allow-Headers'] = 'Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token'

		if request.method != 'OPTIONS':
			return fn(*args, **kwargs)
	return _enable_cors

def return_error(status=404, message=''):
	log.error(message)
	output = {
		'success': False,
		'message': message
	}
	response.status = status
	return json.dumps(output)

@route('/static/<filepath:path>')
def static(filepath):
	return static_file(filepath, root='views/static')

@route('/<ip>', method=('OPTIONS', 'GET'))
@route('/<ip>/<contentType>', method=('OPTIONS', 'GET'))
@enable_cors
def process(ip, contentType='html'):

	if ip in ["favicon.ico", "robots.txt"]:
		return ""

	output = {
		"success": True,
		"results": [],
		"results_info": {
			"count": 0,
			"cached": 0
		}
	}

	uri = ip
	lookups = []
	for ip in ip.split(','):
		try:
			Address(ip)
			if r.get(ip):
				output['results'].append(json.loads(r.get(ip)))
				output['results_info']['cached'] = output['results_info']['cached'] + 1
			else:
				lookups.append(ip)
		except AttributeError:
			return return_error(400, "{} is not a valid IP address".format(ip))

		for address in Client().lookupmany(lookups):
			data = {
				"ip": address.ip,
				"asn": address.asn,
				"prefix": address.prefix,
				"owner": address.owner,
				"cc": address.cc
			}

			# Now we push it to redis
			r.set(address.ip, json.dumps(data), ex=84600)
			output['results'].append(json.loads(r.get(address.ip)))

	output['results_info']['count'] = len(output['results'])
	if contentType in ['json']:
		response.headers['Content-Type'] = 'application/json'
		return json.dumps(output)
	else:
		response.headers['Content-Type'] = 'text/html'
		return template("rec", uri=uri, data=output['results'])

@route('/cache')
def cache():
	try:
		output = {}
		for key in r.scan_iter('*'):
			output[key.decode("utf-8")] = json.loads(r.get(key))
		response.headers['Content-Type'] = 'application/json'
		return json.dumps(output)
	except:
		return return_error(403, "Unable to load keys from redis for display. Please try again later.")

@route('/ping')
def ping():
	response.content_type = "text/plain"
	return "pong"

@route('/', ('GET', 'POST'))
def index():
	if request.method == "POST":
		if request.forms.get('address', '') != '':
			return redirect("/{}".format(request.forms.get('address')))
	return template("home")

if __name__ == '__main__':

	parser = argparse.ArgumentParser()

	# Server settings
	parser.add_argument("-i", "--host", default=os.getenv('HOST', '127.0.0.1'), help="server ip")
	parser.add_argument("-p", "--port", default=os.getenv('PORT', 5000), help="server port")

	# Redis settings
	parser.add_argument("--redis", default=os.getenv('REDIS', 'redis://localhost:6379/0'), help="redis connection string")

	# Verbose mode
	parser.add_argument("--verbose", "-v", help="increase output verbosity", action="store_true")
	args = parser.parse_args()

	if args.verbose:
		logging.basicConfig(level=logging.DEBUG)
	else:
		logging.basicConfig(level=logging.INFO)
	log = logging.getLogger(__name__)

	try:
		if args.redis:
			r = redis.from_url(args.redis)
	except:
		log.fatal("Unable to connect to redis: {}".format(args.redis))

	try:
		app = default_app()
		app.run(host=args.host, port=args.port, server='tornado')
	except:
		log.error("Unable to start server on {}:{}".format(args.host, args.port))