text:
Value::Value() {}

Value::Value(const ParseNode* origin, Type t) : type_(t), origin_(origin) {
  switch (type_) {
    case NONE:
      break;
    case BOOLEAN:
      boolean_value_ = false;
      break;
    case INTEGER:
      int_value_ = 0;
      break;
    case STRING:
      new (&string_value_) std::string();
      break;
    case LIST:
      new (&list_value_) std::vector<Value>();
      break;
    case SCOPE:
      new (&scope_value_) std::unique_ptr<Scope>();
      break;
  }
}

Value::Value(const ParseNode* origin, bool bool_val)
    : type_(BOOLEAN), origin_(origin), boolean_value_(bool_val) {}

Value::Value(const ParseNode* origin, int64_t int_val)
    : type_(INTEGER), origin_(origin), int_value_(int_val) {}

Value::Value(const ParseNode* origin, std::string str_val)
    : type_(STRING), origin_(origin), string_value_(std::move(str_val)) {}

Value::Value(const ParseNode* origin, const char* str_val)
    : type_(STRING), origin_(origin), string_value_(str_val) {}

Value::Value(const ParseNode* origin, std::unique_ptr<Scope> scope)
    : type_(SCOPE), origin_(origin), scope_value_(std::move(scope)) {}

Value::Value(const Value& other) : type_(other.type_), origin_(other.origin_) {
  switch (type_) {
    case NONE:
      break;
    case BOOLEAN:
      boolean_value_ = other.boolean_value_;
      break;
    case INTEGER:
      int_value_ = other.int_value_;
      break;
    case STRING:
      new (&string_value_) std::string(other.string_value_);
      break;
    case LIST:
      new (&list_value_) std::vector<Value>(other.list_value_);
      break;
    case SCOPE:
      new (&scope_value_) std::unique_ptr<Scope>(
          other.scope_value_.get() ? other.scope_value_->MakeClosure()
                                   : nullptr);
      break;
  }
}

Value::Value(Value&& other) noexcept
    : type_(other.type_), origin_(other.origin_) {
  switch (type_) {
    case NONE:
      break;
    case BOOLEAN:
      boolean_value_ = other.boolean_value_;
      break;
    case INTEGER:
      int_value_ = other.int_value_;
      break;
    case STRING:
      new (&string_value_) std::string(std::move(other.string_value_));
      break;
    case LIST:
      new (&list_value_) std::vector<Value>(std::move(other.list_value_));
      break;
    case SCOPE:
      new (&scope_value_) std::unique_ptr<Scope>(std::move(other.scope_value_));
      break;
  }
}

Value& Value::operator=(const Value& other) {
  if (this != &other) {
    this->~Value();
    new (this) Value(other);
  }
  return *this;
}

Value& Value::operator=(Value&& other) noexcept {
  if (this != &other) {
    this->~Value();
    new (this) Value(std::move(other));
  }
  return *this;
}

Value::~Value() {
  using namespace std;
  switch (type_) {
    case STRING:
      string_value_.~string();
      break;
    case LIST:
      list_value_.~vector<Value>();
      break;
    case SCOPE:
      scope_value_.~unique_ptr<Scope>();
      break;
    default:;
  }
}

// static
const char* Value::DescribeType(Type t) {
  switch (t) {
    case NONE:
      return "none";
    case BOOLEAN:
      return "boolean";
    case INTEGER:
      return "integer";
    case STRING:
      return "string";
    case LIST:
      return "list";
    case SCOPE:
      return "scope";
    default:
      NOTREACHED();
      return "UNKNOWN";
  }
}

void Value::SetScopeValue(std::unique_ptr<Scope> scope) {
  DCHECK(type_ == SCOPE);
  scope_value_ = std::move(scope);
}

std::string Value::ToString(bool quote_string) const {
  switch (type_) {
    case NONE:
      return "<void>";
    case BOOLEAN:
      return boolean_value_ ? "true" : "false";
    case INTEGER:
      return base::Int64ToString(int_value_);
    case STRING:
      if (quote_string) {
        std::string result = "\"";
        bool hanging_backslash = false;
        for (char ch : string_value_) {
          // If the last character was a literal backslash and the next
          // character could form a valid escape sequence, we need to insert
          // an extra backslash to prevent that.
          if (hanging_backslash && (ch == '$' || ch == '"' || ch == '\\'))
            result += '\\';
          // If the next character is a dollar sign or double quote, it needs
          // to be escaped; otherwise it can be printed as is.
          if (ch == '$' || ch == '"')
            result += '\\';
          result += ch;
          hanging_backslash = (ch == '\\');
        }
        // Again, we need to prevent the closing double quotes from becoming
        // an escape sequence.
        if (hanging_backslash)
          result += '\\';
        result += '"';
        return result;
      }
      return string_value_;
    case LIST: {
      std::string result = "[";
      for (size_t i = 0; i < list_value_.size(); i++) {
        if (i > 0)
          result += ", ";
        result += list_value_[i].ToString(true);
      }
      result.push_back(']');
      return result;
    }
    case SCOPE: {
      Scope::KeyValueMap scope_values;
      scope_value_->GetCurrentScopeValues(&scope_values);
      if (scope_values.empty())
        return std::string("{ }");

      std::string result = "{\n";
      for (const auto& pair : scope_values) {
        result += "  " + std::string(pair.first) + " = " +
                  pair.second.ToString(true) + "\n";
      }
      result += "}";

      return result;
    }
  }
  return std::string();
}

bool Value::VerifyTypeIs(Type t, Err* err) const {
  if (type_ == t)
    return true;

  *err = Err(origin(), std::string("This is not a ") + DescribeType(t) + ".",
             std::string("Instead I see a ") + DescribeType(type_) + " = " +
                 ToString(true));
  return false;
}

bool Value::operator==(const Value& other) const {
  if (type_ != other.type_)
    return false;

  switch (type_) {
    case Value::BOOLEAN:
      return boolean_value() == other.boolean_value();
    case Value::INTEGER:
      return int_value() == other.int_value();
    case Value::STRING:
      return string_value() == other.string_value();
    case Value::LIST:
      if (list_value().size() != other.list_value().size())
        return false;
      for (size_t i = 0; i < list_value().size(); i++) {
        if (list_value()[i] != other.list_value()[i])
          return false;
      }
      return true;
    case Value::SCOPE:
      return scope_value()->CheckCurrentScopeValuesEqual(other.scope_value());
    case Value::NONE:
      return false;
    default:
      NOTREACHED();
      return false;
  }
}

bool Value::operator!=(const Value& other) const {
  return !operator==(other);
}


text:
package com.belatrixsf.connect.utils.di.modules.presenters;

import com.belatrixsf.connect.ui.account.badges.AccountBadgesView;

import dagger.Module;
import dagger.Provides;

/**
 * Created by dvelasquez on 17/2/17.
 */
@Module
public class AccountBadgesPresenterModule {

    private AccountBadgesView view;

    public AccountBadgesPresenterModule(AccountBadgesView view) {
        this.view = view;
    }

    @Provides
    public AccountBadgesView providesView() {
        return view;
    }

}

redpajama_set_name: RedPajamaGithub


text:
Example:

    {"camliVersion": 1,
     "camliType": "static-set",

     // Either one of members or mergeSets is required, and they are mutually exclusive.
     // If a directory has enough children that the resulting static-set blob
     // would be larger than the maximum schema blob size, then the children are
     // actually spread (recursively, if needed) onto several static-sets. When that is
     // the case, these subsets are stored in mergeSets instead of members. Members
     // stores the actual file or directory schemas (the actual members of the top
     // static-set entity).
     //
     // Members can be ordered or unordered, depending on context/needs. If unordered,
     // it's recommended but not required to sort the blobrefs.
     "members": [
        "digalg-blobref-item1",  // maybe a file?
        "digalg-blobref-item2",  // maybe a directory?
        "digalg-blobref-item3",  // maybe a symlink?
        "digalg-blobref-item4",  // maybe a permanode?
        "digalg-blobref-item5",  // ... don't know until you fetch it
        "digalg-blobref-item6",  // ... and what's valid depends on context
        "digalg-blobref-item7",  // ... a permanode in a directory would
        "digalg-blobref-item8"   // ... be invalid, for instance.
     ],
     "mergeSets": [
        "digalg-blobref-subset1",  // another static-set, with either members or subsets
        "digalg-blobref-subset2",  // ''
        "digalg-blobref-subset3",  // ''
        "digalg-blobref-subset4",  // ''
     ]
    }

Note: dynamic sets are structured differently, using a permanode and
      membership claim nodes.  The above is just for presenting a snapshot
      of members.


text:
package org.apache.james.jspf.parser;

import org.apache.james.jspf.core.SPF1Constants;
import org.apache.james.jspf.core.SPF1Record;
import org.apache.james.jspf.core.SPFRecordParser;
import org.apache.james.jspf.core.exceptions.NeutralException;
import org.apache.james.jspf.core.exceptions.NoneException;
import org.apache.james.jspf.core.exceptions.PermErrorException;
import org.apache.james.jspf.executor.FutureSPFResult;
import org.apache.james.jspf.terms.Configuration;
import org.apache.james.jspf.terms.Directive;
import org.apache.james.jspf.terms.Mechanism;
import org.apache.james.jspf.terms.Modifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * This class is used to parse SPF1-Records from their textual form to an
 * SPF1Record object that is composed by 2 collections: directives and
 * modifiers.
 *
 * The parsing is modular and get informations from Mechanism and Modifiers
 * classes declared in the org/apache/james/jspf/parser/jspf.default.terms file.
 *
 * Each term implementation provide its own REGEX in the REGEX static public
 * field. This parser simply join all the regexp in a single "alternative"
 * pattern and count the number of catch groups (brackets) assigned to each
 * regex fragment.
 *
 * SO it creates a big regex and an array where it store what term is associated
 * to each catch group of the big regex.
 *
 * If the regex matches the input vspf1 record then it start looking for the
 * matched group (not null) and lookup the term that created that part of the
 * regex.
 *
 * With this informations it creates a new instance of the term and, if the term
 * is ConfigurationEnabled it calls the config() method passing to it only the specific
 * subset of the MatchResult (using the MatchResultSubset).
 *
 * TODO doubts about the specification - redirect or exp with no domain-spec are
 * evaluated as an unknown-modifiers according to the current spec (it does not
 * make too much sense) - top-label is defined differently in various specs.
 * We'll have to review the code. -
 * http://data.iana.org/TLD/tlds-alpha-by-domain.txt (we should probably beeter
 * use and alpha sequence being at least 2 chars - Somewhere is defined as "."
 * TLD [ "." ] - Otherwise defined as ( *alphanum ALPHA *alphanum ) / (
 * 1*alphanum "-" *( * alphanum / "-" ) alphanum )
 *
 * @see org.apache.james.jspf.core.SPF1Record
 *
 */
public class RFC4408SPF1Parser implements SPFRecordParser {
    private static final Logger LOGGER = LoggerFactory.getLogger(RFC4408SPF1Parser.class);

    /**
     * Regex based on http://www.ietf.org/rfc/rfc4408.txt.
     * This will be the next official SPF-Spec
     */

    // Changed this because C, T and R MACRO_LETTERS are not available
    // in record parsing and must return a PermError.

    // private static final String MACRO_LETTER_PATTERN = "[lsodipvhcrtLSODIPVHCRT]";

    /**
     * ABNF: qualifier = "+" / "-" / "?" / "~"
     */
    private static final String QUALIFIER_PATTERN = "[" + "\\"
            + SPF1Constants.PASS + "\\" + SPF1Constants.FAIL + "\\"
            + SPF1Constants.NEUTRAL + "\\" + SPF1Constants.SOFTFAIL + "]";

    private Pattern termsSeparatorPattern = null;

    private Pattern termPattern = null;

    private int TERM_STEP_REGEX_QUALIFIER_POS;

    private int TERM_STEP_REGEX_MECHANISM_POS;

    private int TERM_STEP_REGEX_MODIFIER_POS;

    private List<TermDefinition> matchResultPositions;

    private TermsFactory termsFactory;

    /**
     * Constructor. Creates all the values needed to run the parsing
     *
     * @param termsFactory the TermsFactory implementation
     */
    public RFC4408SPF1Parser(TermsFactory termsFactory) {
        this.termsFactory = termsFactory;

        /**
         * ABNF: mechanism = ( all / include / A / MX / PTR / IP4 / IP6 / exists )
         */
        String MECHANISM_REGEX = createRegex(termsFactory.getMechanismsCollection());

        /**
         * ABNF: modifier = redirect / explanation / unknown-modifier
         */
        String MODIFIER_REGEX = "(" + createRegex(termsFactory.getModifiersCollection()) + ")";

        /**
         * ABNF: directive = [ qualifier ] mechanism
         */
        String DIRECTIVE_REGEX = "(" + QUALIFIER_PATTERN + "?)("
                + MECHANISM_REGEX + ")";

        /**
         * ABNF: ( directive / modifier )
         */
        String TERM_REGEX = "(?:" + MODIFIER_REGEX + "|" + DIRECTIVE_REGEX
                + ")";

        /**
         * ABNF: 1*SP
         */
        String TERMS_SEPARATOR_REGEX = "[ ]+";

        termsSeparatorPattern = Pattern.compile(TERMS_SEPARATOR_REGEX);
        termPattern = Pattern.compile(TERM_REGEX);

        initializePositions();
    }

    /**
     * Fill in the matchResultPositions ArrayList. This array simply map each
     * regex matchgroup to the Term class that originated that part of the
     * regex.
     */
    private void initializePositions() {
        ArrayList<TermDefinition> matchResultPositions = new ArrayList<TermDefinition>();

        // FULL MATCH
        int posIndex = 0;
        matchResultPositions.ensureCapacity(posIndex + 1);
        matchResultPositions.add(posIndex, null);

        Iterator<TermDefinition> i;

        TERM_STEP_REGEX_MODIFIER_POS = ++posIndex;
        matchResultPositions.ensureCapacity(posIndex + 1);
        matchResultPositions.add(TERM_STEP_REGEX_MODIFIER_POS, null);
        i = termsFactory.getModifiersCollection().iterator();
        while (i.hasNext()) {
            TermDefinition td = i.next();
            int size = td.getMatchSize() + 1;
            for (int k = 0; k < size; k++) {
                posIndex++;
                matchResultPositions.ensureCapacity(posIndex + 1);
                matchResultPositions.add(posIndex, td);
            }
        }

        TERM_STEP_REGEX_QUALIFIER_POS = ++posIndex;
        matchResultPositions.ensureCapacity(posIndex + 1);
        matchResultPositions.add(posIndex, null);

        TERM_STEP_REGEX_MECHANISM_POS = ++posIndex;
        matchResultPositions.ensureCapacity(posIndex + 1);
        matchResultPositions.add(TERM_STEP_REGEX_MECHANISM_POS, null);
        i = termsFactory.getMechanismsCollection().iterator();
        while (i.hasNext()) {
            TermDefinition td = i.next();
            int size = td.getMatchSize() + 1;
            for (int k = 0; k < size; k++) {
                posIndex++;
                matchResultPositions.ensureCapacity(posIndex + 1);
                matchResultPositions.add(posIndex, td);
            }
        }

        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Parsing catch group positions: Modifiers[{}] Qualifier[{}] Mechanism[{}]",
                TERM_STEP_REGEX_MODIFIER_POS, TERM_STEP_REGEX_QUALIFIER_POS, TERM_STEP_REGEX_MECHANISM_POS);
            for (int k = 0; k < matchResultPositions.size(); k++) {
                LOGGER
                        .debug("{}) {}", k,
                            (matchResultPositions.get(k) != null ? ((TermDefinition) matchResultPositions
                                        .get(k)).getPattern().pattern()
                                        : null));
            }
        }

        this.matchResultPositions = Collections.synchronizedList(matchResultPositions);
    }

    /**
     * Loop the classes searching for a String static field named
     * staticFieldName and create an OR regeex like this:
     * (?:FIELD1|FIELD2|FIELD3)
     *
     * @param classes
     *            classes to analyze
     * @param staticFieldName
     *            static field to concatenate
     * @return regex The regex
     */
    private String createRegex(Collection<TermDefinition> commandMap) {
        StringBuffer modifierRegex = new StringBuffer();
        Iterator<TermDefinition> i = commandMap.iterator();
        boolean first = true;
        while (i.hasNext()) {
            if (first) {
                modifierRegex.append("(?:(");
                first = false;
            } else {
                modifierRegex.append(")|(");
            }
            Pattern pattern = i.next().getPattern();
            modifierRegex.append(pattern.pattern());
        }
        modifierRegex.append("))");
        return modifierRegex.toString();
    }

    /**
     * @see org.apache.james.jspf.core.SPFRecordParser#parse(java.lang.String)
     */
    public SPF1Record parse(String spfRecord) throws PermErrorException,
            NoneException, NeutralException {

        LOGGER.debug("Start parsing SPF-Record: " + spfRecord);

        SPF1Record result = new SPF1Record();

        // check the version "header"
        if (spfRecord.toLowerCase().startsWith(SPF1Constants.SPF_VERSION1 + " ") || spfRecord.equalsIgnoreCase(SPF1Constants.SPF_VERSION1)) {
            if (!spfRecord.toLowerCase().startsWith(SPF1Constants.SPF_VERSION1 + " ")) throw new NeutralException("Empty SPF Record");
        } else {
            throw new NoneException("No valid SPF Record: " + spfRecord);
        }

        // extract terms
        String[] terms = termsSeparatorPattern.split(spfRecord.replaceFirst(
                SPF1Constants.SPF_VERSION1, ""));

        // cycle terms
        for (int i = 0; i < terms.length; i++) {
            if (terms[i].length() > 0) {
                Matcher termMatcher = termPattern.matcher(terms[i]);
                if (!termMatcher.matches()) {
                    throw new PermErrorException("Term [" + terms[i]
                            + "] is not syntactically valid: "
                            + termPattern.pattern());
                }

                // true if we matched a modifier, false if we matched a
                // directive
                String modifierString = termMatcher
                        .group(TERM_STEP_REGEX_MODIFIER_POS);

                if (modifierString != null) {
                    // MODIFIER
                    Modifier mod = (Modifier) lookupAndCreateTerm(termMatcher,
                            TERM_STEP_REGEX_MODIFIER_POS);

                    if (mod.enforceSingleInstance()) {
                        Iterator<Modifier> it = result.getModifiers().iterator();
                        while (it.hasNext()) {
                            if (it.next().getClass().equals(mod.getClass())) {
                                throw new PermErrorException("More than one "
                                        + modifierString
                                        + " found in SPF-Record");
                            }
                        }
                    }

                    result.getModifiers().add(mod);

                } else {
                    // DIRECTIVE
                    String qualifier = termMatcher
                            .group(TERM_STEP_REGEX_QUALIFIER_POS);

                    Object mech = lookupAndCreateTerm(termMatcher,
                            TERM_STEP_REGEX_MECHANISM_POS);

                    result.getDirectives().add(
                            new Directive(qualifier, (Mechanism) mech));

                }

            }
        }

        return result;
    }

    /**
     * @param res
     *            the MatchResult
     * @param start
     *            the position where the terms starts
     * @return
     * @throws PermErrorException
     */
    private Object lookupAndCreateTerm(Matcher res, int start)
            throws PermErrorException {
        for (int k = start + 1; k < res.groupCount(); k++) {
            if (res.group(k) != null && k != TERM_STEP_REGEX_QUALIFIER_POS) {
                TermDefinition c = (TermDefinition) matchResultPositions.get(k);
                Configuration subres = new MatcherBasedConfiguration(res, k, c
                        .getMatchSize());
                try {
                    return termsFactory.createTerm(c.getTermDef(), subres);
                } catch (InstantiationException e) {
                    e.printStackTrace();
                    // TODO is it ok to use a Runtime for this? Or should we use a PermError here?
                    throw new IllegalStateException("Unexpected error creating term: " + e.getMessage());
                }

            }
        }
        return null;
    }

}


text:
package com.github.hypfvieh.config.xml;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;

import org.junit.jupiter.api.Test;

import com.github.hypfvieh.AbstractBaseUtilTest;

public class XmlConfigurationTest extends AbstractBaseUtilTest {

    @Test
    public void testGetString() throws IOException {
        XmlConfiguration xmlConfiguration = new XmlConfigBuilder().setInputFile("src/test/resources/xmlConfigTest/xmlConfigTest.xml").build();

        String readValue = xmlConfiguration.getString("Config/Key2/SubKey1");
        assertEquals("SubValue1", readValue);
        readValue = xmlConfiguration.getString("Config/Key3/SubKeyList/SubListEntry");
        assertEquals("SubListEntry1", readValue);
        readValue = xmlConfiguration.getString("Not/existing");
        assertNull(readValue);
    }

    @Test
    public void testGetList() throws IOException {

        XmlConfiguration xmlConfiguration = new XmlConfigBuilder().setInputFile("src/test/resources/xmlConfigTest/xmlConfigTest.xml").build();

        List<String> readValue = xmlConfiguration.getStringList("Config/Key2/SubKey1");
        assertEquals(1, readValue.size());
        assertEquals("SubValue1", readValue.get(0));

        readValue = null;
        readValue = xmlConfiguration.getStringList("Config/Key3/SubKeyList/SubListEntry");
        assertEquals(4, readValue.size());
        assertEquals("SubListEntry2", readValue.get(1));
        assertEquals("SubListEntry3", readValue.get(3));

        readValue = null;
        readValue = xmlConfiguration.getStringList("Config/Key3/SubKeyList");
        assertEquals(4, readValue.size());
        assertEquals("SubListEntry2", readValue.get(1));
        assertEquals("SubListEntry3", readValue.get(3));

    }

    @Test
    public void testSetString() throws IOException {
        XmlConfiguration xmlConfiguration = new XmlConfigBuilder().setInputFile("src/test/resources/xmlConfigTest/xmlConfigTest.xml").build();

        String readValue = xmlConfiguration.getString("Config/Key2/SubKey1");
        assertEquals("SubValue1", readValue);

        xmlConfiguration.setString("Config/Key2/SubKey1", false, "NewValue1");

        readValue = xmlConfiguration.getString("Config/Key2/SubKey1");
        assertEquals("NewValue1", readValue);
    }

    @Test
    public void testSetValues() throws IOException {
        XmlConfiguration xmlConfiguration = new XmlConfigBuilder().setInputFile("src/test/resources/xmlConfigTest/xmlConfigTest.xml").build();

        String readValue = xmlConfiguration.getString("Config/Key2/SubKey1");
        assertEquals("SubValue1", readValue);
        readValue = xmlConfiguration.getString("Config/Key4/NotInt");
        assertEquals("A", readValue);
        readValue = xmlConfiguration.getString("Config/Key4/Int");
        assertEquals("100", readValue);

        Map<String, String> values = new HashMap<>();

        values.put("Config/Key2/SubKey1", "NewValue1");
        values.put("Config/Key4/NotInt", "B");
        values.put("Config/Key4/Int", "2000");

        xmlConfiguration.setValues(values, false);

        readValue = xmlConfiguration.getString("Config/Key2/SubKey1");
        assertEquals("NewValue1", readValue);
        readValue = xmlConfiguration.getString("Config/Key4/NotInt");
        assertEquals("B", readValue);
        readValue = xmlConfiguration.getString("Config/Key4/Int");
        assertEquals("2000", readValue);
    }

    @Test
    public void testSaveToFile() throws IOException {
        File tempFile = File.createTempFile(getClass().getSimpleName() + getMethodName(), ".xml");
        XmlConfiguration xmlConfiguration = new XmlConfigBuilder()
            .setInputFile("src/test/resources/xmlConfigTest/xmlConfigTest.xml")
            .setOutputFile(tempFile).build();

        String readValue = xmlConfiguration.getString("Config/Key2/SubKey1");
        assertEquals("SubValue1", readValue);

        xmlConfiguration.setString("Config/Key2/SubKey1", false, "NewValue1");

        readValue = xmlConfiguration.getString("Config/Key2/SubKey1");
        assertEquals("NewValue1", readValue);

        xmlConfiguration.save();
        xmlConfiguration = null;

        xmlConfiguration = new XmlConfigBuilder()
                .setInputFile(tempFile).build();

        readValue = xmlConfiguration.getString("Config/Key2/SubKey1");
        assertEquals("NewValue1", readValue);

        tempFile.delete();
    }

    @Test
    public void testGetStringProperty() {
        XmlConfiguration xmlConfiguration = new XmlConfigBuilder()
                .setInputFile("src/test/resources/xmlConfigTest/xmlConfigTest.xml")
                .setSkipRoot(true)
                .setKeyDelimiter(".")
                .setAllowKeyOverrideFromEnvironment(true)
                .build();

        // correct value found
        assertEquals("Value1", xmlConfiguration.getString("Key1", "Key2"));

        // key found, but wrong value
        assertNotEquals("fail", xmlConfiguration.getString("Key1", "fail"));

        // wrong key, wrong value
        assertNotEquals("fail", xmlConfiguration.getString("foo", "bar"));

        // wrong key, correct default
        assertEquals("fail", xmlConfiguration.getString("foo", "fail"));

        // correct key, overridden by environment
        System.getProperties().setProperty("Key2.SubKey1", "Jambalaja");
        assertEquals("Jambalaja", xmlConfiguration.getString("Key2.SubKey1", "default"));
    }

    @Test
    public void testGetStringListProperty() {
        XmlConfiguration xmlConfiguration = new XmlConfigBuilder()
                .setInputFile("src/test/resources/xmlConfigTest/xmlConfigTest.xml")
                .setSkipRoot(true)
                .setKeyDelimiter(".")
                .build();

        List<String> stringList = xmlConfiguration.getStringList("Key3.SubKeyList.SubListEntry");

        assertFalse(stringList.isEmpty());
        assertTrue(stringList.size() == 4);
        assertEquals("SubListEntry1", stringList.get(0));
    }

    @Test
    public void testGetStringSetProperty() {
        XmlConfiguration xmlConfiguration = new XmlConfigBuilder()
                .setInputFile("src/test/resources/xmlConfigTest/xmlConfigTest.xml")
                .setKeyDelimiter(".")
                .setSkipRoot(true)
                .build();

        Set<String> stringList = xmlConfiguration.getStringSet("Key3.SubKeyList.SubListEntry", TreeSet.class);

        assertFalse(stringList.isEmpty());
        assertTrue(stringList.size() == 3);
    }

    @Test
    public void testGetIntProperty() {
        XmlConfiguration xmlConfiguration = new XmlConfigBuilder()
                .setInputFile("src/test/resources/xmlConfigTest/xmlConfigTest.xml")
                .setSkipRoot(true)
                .setKeyDelimiter(".")
                .build();

        // key found, but not integer
        assertEquals(-1, xmlConfiguration.getInt("Key4.NotInt", -1));

        // key found and is integer
        assertEquals(100, xmlConfiguration.getInt("Key4.Int", -1));
    }

    @Test
    public void testGetBooleanProperty() {
        XmlConfiguration xmlConfiguration = new XmlConfigBuilder()
                .setInputFile("src/test/resources/xmlConfigTest/xmlConfigTest.xml")
                .setSkipRoot(true)
                .setKeyDelimiter(".")
                .build();

        // key found, but not bool, expect default
        assertEquals(false, xmlConfiguration.getBoolean("Key5.NotBool", false));

        // key found and is boolean
        assertEquals(true, xmlConfiguration.getBoolean("Key5.Bool", false));
    }
}


text:
/* this file has been autogenerated by vtkNodeJsWrap */
/* editing this might proof futile */

#ifndef NATIVE_EXTENSION_VTK_VTKINTERACTORSTYLESWITCHWRAP_H
#define NATIVE_EXTENSION_VTK_VTKINTERACTORSTYLESWITCHWRAP_H

#include <nan.h>

#include <vtkSmartPointer.h>
#include <vtkInteractorStyleSwitch.h>

#include "vtkInteractorStyleSwitchBaseWrap.h"
#include "../../plus/plus.h"

class VtkInteractorStyleSwitchWrap : public VtkInteractorStyleSwitchBaseWrap
{
	public:
		using Nan::ObjectWrap::Wrap;
		static void Init(v8::Local<v8::Object> exports);
		static void InitPtpl();
		static void ConstructorGetter(
			v8::Local<v8::String> property,
			const Nan::PropertyCallbackInfo<v8::Value>& info);

		VtkInteractorStyleSwitchWrap(vtkSmartPointer<vtkInteractorStyleSwitch>);
		VtkInteractorStyleSwitchWrap();
		~VtkInteractorStyleSwitchWrap( );
		static Nan::Persistent<v8::FunctionTemplate> ptpl;

	private:
		static void New(const Nan::FunctionCallbackInfo<v8::Value>& info);

		static void GetCurrentStyle(const Nan::FunctionCallbackInfo<v8::Value>& info);
		static void NewInstance(const Nan::FunctionCallbackInfo<v8::Value>& info);
		static void OnChar(const Nan::FunctionCallbackInfo<v8::Value>& info);
		static void SafeDownCast(const Nan::FunctionCallbackInfo<v8::Value>& info);
		static void SetAutoAdjustCameraClippingRange(const Nan::FunctionCallbackInfo<v8::Value>& info);
		static void SetCurrentRenderer(const Nan::FunctionCallbackInfo<v8::Value>& info);
		static void SetCurrentStyleToJoystickActor(const Nan::FunctionCallbackInfo<v8::Value>& info);
		static void SetCurrentStyleToJoystickCamera(const Nan::FunctionCallbackInfo<v8::Value>& info);
		static void SetCurrentStyleToMultiTouchCamera(const Nan::FunctionCallbackInfo<v8::Value>& info);
		static void SetCurrentStyleToTrackballActor(const Nan::FunctionCallbackInfo<v8::Value>& info);
		static void SetCurrentStyleToTrackballCamera(const Nan::FunctionCallbackInfo<v8::Value>& info);
		static void SetDefaultRenderer(const Nan::FunctionCallbackInfo<v8::Value>& info);
		static void SetInteractor(const Nan::FunctionCallbackInfo<v8::Value>& info);

#ifdef VTK_NODE_PLUS_VTKINTERACTORSTYLESWITCHWRAP_CLASSDEF
		VTK_NODE_PLUS_VTKINTERACTORSTYLESWITCHWRAP_CLASSDEF
#endif
};

#endif


text:
namespace Google.Cloud.SecurityCenter.V1.Snippets
{
    // [START securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_async_flattened2_resourceNames2]
    using Google.Api.Gax.ResourceNames;
    using Google.Cloud.SecurityCenter.V1;
    using System.Threading.Tasks;

    public sealed partial class GeneratedSecurityCenterClientSnippets
    {
        /// <summary>Snippet for CreateMuteConfigAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated for illustrative purposes only.
        /// It may require modifications to work in your environment.
        /// </remarks>
        public async Task CreateMuteConfig2ResourceNames2Async()
        {
            // Create client
            SecurityCenterClient securityCenterClient = await SecurityCenterClient.CreateAsync();
            // Initialize request argument(s)
            FolderName parent = FolderName.FromFolder("[FOLDER]");
            MuteConfig muteConfig = new MuteConfig();
            string muteConfigId = "";
            // Make the request
            MuteConfig response = await securityCenterClient.CreateMuteConfigAsync(parent, muteConfig, muteConfigId);
        }
    }
    // [END securitycenter_v1_generated_SecurityCenter_CreateMuteConfig_async_flattened2_resourceNames2]
}


text:
/* Licensed 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.
 */
package org.flowable.editor.language.xml;

import static org.assertj.core.api.Assertions.assertThat;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.flowable.bpmn.converter.BpmnXMLConverter;
import org.flowable.bpmn.model.Artifact;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.bpmn.model.FlowElement;
import org.flowable.bpmn.model.GraphicInfo;
import org.flowable.bpmn.model.Process;
import org.flowable.bpmn.model.StartEvent;
import org.flowable.bpmn.model.SubProcess;
import org.flowable.bpmn.model.TextAnnotation;
import org.flowable.bpmn.model.UserTask;
import org.flowable.bpmn.model.ValuedDataObject;
import org.junit.jupiter.api.Test;

public class SubProcessMultiDiagramConverterTest extends AbstractConverterTest {

    @Test
    public void convertXMLToModel() throws Exception {
        BpmnModel bpmnModel = readXMLFile();
        validateModel(bpmnModel);
        validateGraphicInfo(bpmnModel);
    }

    @Test
    public void convertModelToXML() throws Exception {
        BpmnModel bpmnModel = readXMLFile();
        validateModel(bpmnModel);
        BpmnModel parsedModel = exportAndReadXMLFile(bpmnModel);
        validateModel(parsedModel);
        validateGraphicInfo(parsedModel);
//        deployProcess(parsedModel);
    }

    @Override
    protected String getResource() {
        return "subprocessmultidiagrammodel.bpmn";
    }

    private void validateModel(BpmnModel model) {
        Process process = model.getMainProcess();
        Collection<Artifact> artifacts = process.getArtifacts();
        List<ValuedDataObject> dataObjects = process.getDataObjects();

        // verify main process
        assertThat(process.getFlowElements()).hasSize(13);
        assertThat(artifacts).hasSize(2);
        assertThat(dataObjects).hasSize(6);

        Artifact artifact = artifacts.iterator().next();
        assertThat(artifact)
                .isInstanceOfSatisfying(TextAnnotation.class, art -> {
                    assertThat(art.getId()).isEqualTo("textannotation1");
                    assertThat(art.getText()).isEqualTo("Test Annotation");
                });

        FlowElement flowElement = process.getFlowElement("start1");
        assertThat(flowElement)
                .isInstanceOfSatisfying(StartEvent.class, startEvent -> {
                    assertThat(startEvent.getId()).isEqualTo("start1");
                });

        flowElement = process.getFlowElement("userTask1");
        assertThat(flowElement)
                .isInstanceOfSatisfying(UserTask.class, userTask -> {
                    assertThat(userTask.getName()).isEqualTo("User task 1");
                    assertThat(userTask.getCandidateUsers()).hasSize(1);
                    assertThat(userTask.getCandidateGroups()).hasSize(1);
                });

        flowElement = process.getFlowElement("subprocess1");
        assertThat(flowElement)
                .isInstanceOfSatisfying(SubProcess.class, subProcess -> {
                    assertThat(subProcess.getId()).isEqualTo("subprocess1");
                    assertThat(subProcess.getFlowElements()).hasSize(11);

                    // verify subprocess
                    assertThat(subProcess.getArtifacts()).hasSize(2);
                    assertThat(subProcess.getDataObjects()).hasSize(6);

                    assertThat(subProcess.getArtifacts().iterator().next())
                            .isInstanceOfSatisfying(TextAnnotation.class, art -> {
                                assertThat(art.getId()).isEqualTo("textannotation2");
                                assertThat(art.getText()).isEqualTo("Sub Test Annotation");
                            });

                    assertThat(subProcess.getFlowElement("subStartEvent"))
                            .isInstanceOfSatisfying(StartEvent.class, startEvent -> {
                                assertThat(startEvent.getId()).isEqualTo("subStartEvent");
                            });

                    assertThat(subProcess.getFlowElement("subUserTask1"))
                            .isInstanceOfSatisfying(UserTask.class, userTask -> {
                                assertThat(userTask.getName()).isEqualTo("User task 2");
                                assertThat(userTask.getCandidateUsers()).isEmpty();
                                assertThat(userTask.getCandidateGroups()).isEmpty();
                            });
                });
    }

    @SuppressWarnings({ "rawtypes", "unchecked" })
	private void validateGraphicInfo(BpmnModel model) throws Exception {
        Process process = model.getMainProcess();
        List<SubProcess> subList = process.findFlowElementsOfType(SubProcess.class);
        Map<String, List<GraphicInfo>> flowLocationMap = model.getFlowLocationMap();
        Map<String, GraphicInfo> locationMap = model.getLocationMap();

        // BPMNDI data
        Map<String, Map> baseBpmnDI = parseBPMNDI(new BpmnXMLConverter().convertToXML(model));

        // verify sequence flows/edges
        assertThat(flowLocationMap).hasSize(7);

        // verify other elements/shapes
        assertThat(locationMap).hasSize(9);

        // verify BPMNDI data should have 2 diagrams
        assertThat(baseBpmnDI).hasSize(2);

        // subprocess diagram
        assertThat(subList).hasSize(1);
        Map<String, List<GraphicInfo>> multiMainEdgeMap = (Map<String, List<GraphicInfo>>) baseBpmnDI.get(process.getId()).get(ELEMENT_DI_EDGE);
        Map<String, GraphicInfo> multiMainShapeMap = (Map<String, GraphicInfo>) baseBpmnDI.get(process.getId()).get(ELEMENT_DI_SHAPE);
        Map<String, List<GraphicInfo>> multiSubEdgeMap = (Map<String, List<GraphicInfo>>) baseBpmnDI.get(subList.get(0).getId()).get(ELEMENT_DI_EDGE);
        Map<String, GraphicInfo> multiSubShapeMap = (Map<String, GraphicInfo>) baseBpmnDI.get(subList.get(0).getId()).get(ELEMENT_DI_SHAPE);

        assertThat(multiMainEdgeMap).hasSize(4);
        assertThat(multiMainShapeMap).hasSize(5);
        assertThat(multiSubEdgeMap).hasSize(3);
        assertThat(multiSubShapeMap).hasSize(4);

        // verify annotations are in correct diagram
        assertThat(multiMainShapeMap).containsKey("textannotation1");
        assertThat(multiSubShapeMap).containsKey("textannotation2");
        assertThat(multiMainEdgeMap).containsKey("association1");
        assertThat(multiSubEdgeMap).containsKey("association2");

        // verify sequence flows/edges
        List<GraphicInfo> info;
        List<GraphicInfo> diInfo;
        for (String id : flowLocationMap.keySet()) {
            info = new ArrayList<>(flowLocationMap.get(id));
            diInfo = multiMainEdgeMap.get(id);
            // if not found in main process, must be in subprocess
            if (diInfo == null) {
                diInfo = multiSubEdgeMap.get(id);
            }
            assertThat(diInfo).hasSameSizeAs(info);
            compareCollections(info, diInfo);
        }

    	// verify other elements/shapes
        GraphicInfo shapeInfo;
		for (String id : locationMap.keySet()) {
            // compare graphic info for each element
            shapeInfo = multiMainShapeMap.get(id);
            // if not found in main process, must be in subprocess
            if (shapeInfo == null) {
                shapeInfo = multiSubShapeMap.get(id);
            }
            assertThat(locationMap.get(id).equals(shapeInfo)).isTrue();
        }
    }
}


text:
import os
import tempfile

from absl import flags

import dual_net
import go
import preprocessing
import train
from tests import test_utils

class TestDualNet(test_utils.MinigoUnitTest):
    def test_train(self):
        with tempfile.TemporaryDirectory() as working_dir, \
                tempfile.NamedTemporaryFile() as tf_record:
            flags.FLAGS.work_dir = working_dir
            preprocessing.make_dataset_from_sgf(
                'tests/example_game.sgf', tf_record.name)
            train.train([tf_record.name])

    def test_inference(self):
        with tempfile.TemporaryDirectory() as working_dir, \
                tempfile.TemporaryDirectory() as export_dir:
            flags.FLAGS.work_dir = working_dir
            dual_net.bootstrap()
            exported_model = os.path.join(export_dir, 'bootstrap-model')
            dual_net.export_model(exported_model)

            n1 = dual_net.DualNetwork(exported_model)
            n1.run(go.Position())

            # In the past we've had issues initializing two separate NNs
            # in the same process... just double check that two DualNetwork
            # instances can live side by side.
            n2 = dual_net.DualNetwork(exported_model)
            n2.run(go.Position())


text:
using System;

using NCrawler.Interfaces;

namespace NCrawler.Services
{
	public class DummyRobot : IRobot
	{
		#region IRobot Members

		public bool IsAllowed(string userAgent, Uri uri)
		{
			return true;
		}

		#endregion
	}
}


text:
package de.vandermeer.skb.interfaces.document;

import de.vandermeer.skb.interfaces.render.IsRenderer;

/**
 * A paragraph renderer.
 *
 * @author     Sven van der Meer <vdmeer.sven@mykolab.com>
 * @version    v0.0.2 build 170502 (02-May-17) for Java 1.8
 * @since      v0.0.1
 */
public interface IsParagraphRenderer extends IsRenderer {

}


text:
namespace mscorlib
{
	namespace System
	{
		namespace Security
		{
			namespace Claims
			{

				//Public Methods
					//	Get/Set:Actor
				mscorlib::System::String ClaimTypes::get_Actor()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Actor"));
				}

				void ClaimTypes::set_Actor(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Anonymous
				mscorlib::System::String ClaimTypes::get_Anonymous()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Anonymous"));
				}

				void ClaimTypes::set_Anonymous(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Authentication
				mscorlib::System::String ClaimTypes::get_Authentication()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Authentication"));
				}

				void ClaimTypes::set_Authentication(mscorlib::System::String  value)
				{
				}

					//	Get/Set:AuthenticationInstant
				mscorlib::System::String ClaimTypes::get_AuthenticationInstant()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "AuthenticationInstant"));
				}

				void ClaimTypes::set_AuthenticationInstant(mscorlib::System::String  value)
				{
				}

					//	Get/Set:AuthenticationMethod
				mscorlib::System::String ClaimTypes::get_AuthenticationMethod()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "AuthenticationMethod"));
				}

				void ClaimTypes::set_AuthenticationMethod(mscorlib::System::String  value)
				{
				}

					//	Get/Set:AuthorizationDecision
				mscorlib::System::String ClaimTypes::get_AuthorizationDecision()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "AuthorizationDecision"));
				}

				void ClaimTypes::set_AuthorizationDecision(mscorlib::System::String  value)
				{
				}

					//	Get/Set:ClaimsType2005Namespace
				mscorlib::System::String ClaimTypes::get_ClaimsType2005Namespace()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "ClaimsType2005Namespace"));
				}

				void ClaimTypes::set_ClaimsType2005Namespace(mscorlib::System::String  value)
				{
				}

					//	Get/Set:ClaimsType2009Namespace
				mscorlib::System::String ClaimTypes::get_ClaimsType2009Namespace()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "ClaimsType2009Namespace"));
				}

				void ClaimTypes::set_ClaimsType2009Namespace(mscorlib::System::String  value)
				{
				}

					//	Get/Set:ClaimsTypeNamespace
				mscorlib::System::String ClaimTypes::get_ClaimsTypeNamespace()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "ClaimsTypeNamespace"));
				}

				void ClaimTypes::set_ClaimsTypeNamespace(mscorlib::System::String  value)
				{
				}

					//	Get/Set:CookiePath
				mscorlib::System::String ClaimTypes::get_CookiePath()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "CookiePath"));
				}

				void ClaimTypes::set_CookiePath(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Country
				mscorlib::System::String ClaimTypes::get_Country()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Country"));
				}

				void ClaimTypes::set_Country(mscorlib::System::String  value)
				{
				}

					//	Get/Set:DateOfBirth
				mscorlib::System::String ClaimTypes::get_DateOfBirth()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "DateOfBirth"));
				}

				void ClaimTypes::set_DateOfBirth(mscorlib::System::String  value)
				{
				}

					//	Get/Set:DenyOnlyPrimaryGroup
				mscorlib::System::String ClaimTypes::get_DenyOnlyPrimaryGroup()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "DenyOnlyPrimaryGroup"));
				}

				void ClaimTypes::set_DenyOnlyPrimaryGroup(mscorlib::System::String  value)
				{
				}

					//	Get/Set:DenyOnlyPrimarySid
				mscorlib::System::String ClaimTypes::get_DenyOnlyPrimarySid()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "DenyOnlyPrimarySid"));
				}

				void ClaimTypes::set_DenyOnlyPrimarySid(mscorlib::System::String  value)
				{
				}

					//	Get/Set:DenyOnlySid
				mscorlib::System::String ClaimTypes::get_DenyOnlySid()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "DenyOnlySid"));
				}

				void ClaimTypes::set_DenyOnlySid(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Dns
				mscorlib::System::String ClaimTypes::get_Dns()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Dns"));
				}

				void ClaimTypes::set_Dns(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Dsa
				mscorlib::System::String ClaimTypes::get_Dsa()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Dsa"));
				}

				void ClaimTypes::set_Dsa(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Email
				mscorlib::System::String ClaimTypes::get_Email()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Email"));
				}

				void ClaimTypes::set_Email(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Expiration
				mscorlib::System::String ClaimTypes::get_Expiration()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Expiration"));
				}

				void ClaimTypes::set_Expiration(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Expired
				mscorlib::System::String ClaimTypes::get_Expired()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Expired"));
				}

				void ClaimTypes::set_Expired(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Gender
				mscorlib::System::String ClaimTypes::get_Gender()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Gender"));
				}

				void ClaimTypes::set_Gender(mscorlib::System::String  value)
				{
				}

					//	Get/Set:GivenName
				mscorlib::System::String ClaimTypes::get_GivenName()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "GivenName"));
				}

				void ClaimTypes::set_GivenName(mscorlib::System::String  value)
				{
				}

					//	Get/Set:GroupSid
				mscorlib::System::String ClaimTypes::get_GroupSid()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "GroupSid"));
				}

				void ClaimTypes::set_GroupSid(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Hash
				mscorlib::System::String ClaimTypes::get_Hash()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Hash"));
				}

				void ClaimTypes::set_Hash(mscorlib::System::String  value)
				{
				}

					//	Get/Set:HomePhone
				mscorlib::System::String ClaimTypes::get_HomePhone()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "HomePhone"));
				}

				void ClaimTypes::set_HomePhone(mscorlib::System::String  value)
				{
				}

					//	Get/Set:IsPersistent
				mscorlib::System::String ClaimTypes::get_IsPersistent()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "IsPersistent"));
				}

				void ClaimTypes::set_IsPersistent(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Locality
				mscorlib::System::String ClaimTypes::get_Locality()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Locality"));
				}

				void ClaimTypes::set_Locality(mscorlib::System::String  value)
				{
				}

					//	Get/Set:MobilePhone
				mscorlib::System::String ClaimTypes::get_MobilePhone()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "MobilePhone"));
				}

				void ClaimTypes::set_MobilePhone(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Name
				mscorlib::System::String ClaimTypes::get_Name()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Name"));
				}

				void ClaimTypes::set_Name(mscorlib::System::String  value)
				{
				}

					//	Get/Set:NameIdentifier
				mscorlib::System::String ClaimTypes::get_NameIdentifier()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "NameIdentifier"));
				}

				void ClaimTypes::set_NameIdentifier(mscorlib::System::String  value)
				{
				}

					//	Get/Set:OtherPhone
				mscorlib::System::String ClaimTypes::get_OtherPhone()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "OtherPhone"));
				}

				void ClaimTypes::set_OtherPhone(mscorlib::System::String  value)
				{
				}

					//	Get/Set:PostalCode
				mscorlib::System::String ClaimTypes::get_PostalCode()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "PostalCode"));
				}

				void ClaimTypes::set_PostalCode(mscorlib::System::String  value)
				{
				}

					//	Get/Set:PPID
				mscorlib::System::String ClaimTypes::get_PPID()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "PPID"));
				}

				void ClaimTypes::set_PPID(mscorlib::System::String  value)
				{
				}

					//	Get/Set:PrimaryGroupSid
				mscorlib::System::String ClaimTypes::get_PrimaryGroupSid()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "PrimaryGroupSid"));
				}

				void ClaimTypes::set_PrimaryGroupSid(mscorlib::System::String  value)
				{
				}

					//	Get/Set:PrimarySid
				mscorlib::System::String ClaimTypes::get_PrimarySid()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "PrimarySid"));
				}

				void ClaimTypes::set_PrimarySid(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Role
				mscorlib::System::String ClaimTypes::get_Role()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Role"));
				}

				void ClaimTypes::set_Role(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Rsa
				mscorlib::System::String ClaimTypes::get_Rsa()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Rsa"));
				}

				void ClaimTypes::set_Rsa(mscorlib::System::String  value)
				{
				}

					//	Get/Set:SerialNumber
				mscorlib::System::String ClaimTypes::get_SerialNumber()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "SerialNumber"));
				}

				void ClaimTypes::set_SerialNumber(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Sid
				mscorlib::System::String ClaimTypes::get_Sid()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Sid"));
				}

				void ClaimTypes::set_Sid(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Spn
				mscorlib::System::String ClaimTypes::get_Spn()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Spn"));
				}

				void ClaimTypes::set_Spn(mscorlib::System::String  value)
				{
				}

					//	Get/Set:StateOrProvince
				mscorlib::System::String ClaimTypes::get_StateOrProvince()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "StateOrProvince"));
				}

				void ClaimTypes::set_StateOrProvince(mscorlib::System::String  value)
				{
				}

					//	Get/Set:StreetAddress
				mscorlib::System::String ClaimTypes::get_StreetAddress()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "StreetAddress"));
				}

				void ClaimTypes::set_StreetAddress(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Surname
				mscorlib::System::String ClaimTypes::get_Surname()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Surname"));
				}

				void ClaimTypes::set_Surname(mscorlib::System::String  value)
				{
				}

					//	Get/Set:System
				mscorlib::System::String ClaimTypes::get_System()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "System"));
				}

				void ClaimTypes::set_System(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Thumbprint
				mscorlib::System::String ClaimTypes::get_Thumbprint()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Thumbprint"));
				}

				void ClaimTypes::set_Thumbprint(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Upn
				mscorlib::System::String ClaimTypes::get_Upn()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Upn"));
				}

				void ClaimTypes::set_Upn(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Uri
				mscorlib::System::String ClaimTypes::get_Uri()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Uri"));
				}

				void ClaimTypes::set_Uri(mscorlib::System::String  value)
				{
				}

					//	Get/Set:UserData
				mscorlib::System::String ClaimTypes::get_UserData()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "UserData"));
				}

				void ClaimTypes::set_UserData(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Version
				mscorlib::System::String ClaimTypes::get_Version()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Version"));
				}

				void ClaimTypes::set_Version(mscorlib::System::String  value)
				{
				}

					//	Get/Set:Webpage
				mscorlib::System::String ClaimTypes::get_Webpage()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "Webpage"));
				}

				void ClaimTypes::set_Webpage(mscorlib::System::String  value)
				{
				}

					//	Get/Set:WindowsAccountName
				mscorlib::System::String ClaimTypes::get_WindowsAccountName()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "WindowsAccountName"));
				}

				void ClaimTypes::set_WindowsAccountName(mscorlib::System::String  value)
				{
				}

					//	Get/Set:X500DistinguishedName
				mscorlib::System::String ClaimTypes::get_X500DistinguishedName()
				{
					return mscorlib::System::String((MonoObject*)Global::GetFieldStringValue("mscorlib", "System.Security.Claims", "ClaimTypes", 0, NULL, "X500DistinguishedName"));
				}

				void ClaimTypes::set_X500DistinguishedName(mscorlib::System::String  value)
				{
				}

			}
		}
	}
}


text:
![enter image description here](https://github.com/jacobgil/keras-steering-angle-visualizations/blob/master/examples/20843_cam.jpg?raw=true)
![enter image description here](https://github.com/jacobgil/keras-steering-angle-visualizations/blob/master/examples/18123_cam.jpg?raw=true)

This contains the model and code for training the NVIDIA steering model on [the dataset given here](https://github.com/SullyChen/Nvidia-Autopilot-TensorFlow), and code for creating visualizations for understanding the steering angle.

[See this blog post.](http://jacobcv.blogspot.com/2016/10/visualizations-for-regressing-wheel.html)

----------

Usage:
Training: `python train.py`

Running: `python run.py --image_path <path_to_image> --type <visualization_type>`

visualization_type can be cam/hypercolumns/occlusion.


text:
<?xml version="1.0"?>
<ProcessHandle Version="1" Minor="0">
    <Process Command=".planAhead." Owner="sgherbst" Host="STEVENHERBSC43A" Pid="668">
    </Process>
</ProcessHandle>


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YAF.Lucene.Net.QueryParsers.Surround.Query
{

    /// <summary>
    /// Base class for composite queries (such as AND/OR/NOT)
    /// </summary>
    public abstract class ComposedQuery : SrndQuery
    {
        public ComposedQuery(IList<SrndQuery> qs, bool operatorInfix, string opName)
        {
            Recompose(qs);
            this.operatorInfix = operatorInfix;
            this.m_opName = opName;
        }

        protected virtual void Recompose(IList<SrndQuery> queries)
        {
            if (queries.Count < 2) throw new InvalidOperationException("Too few subqueries");
            this.m_queries = new List<SrndQuery>(queries);
        }

        protected string m_opName;
        public virtual string OperatorName { get { return m_opName; } }

        protected IList<SrndQuery> m_queries;

        public virtual IEnumerator<SrndQuery> GetSubQueriesEnumerator()
        {
            return m_queries.GetEnumerator();
        }

        public virtual int NrSubQueries { get { return m_queries.Count; } }

        public virtual SrndQuery GetSubQuery(int qn) { return m_queries[qn]; }

        private bool operatorInfix;
        public virtual bool IsOperatorInfix { get { return operatorInfix; } } /* else prefix operator */

        public virtual IList<Search.Query> MakeLuceneSubQueriesField(string fn, BasicQueryFactory qf)
        {
            List<Search.Query> luceneSubQueries = new List<Search.Query>();
            IEnumerator<SrndQuery> sqi = GetSubQueriesEnumerator();
            while (sqi.MoveNext())
            {
                luceneSubQueries.Add((sqi.Current).MakeLuceneQueryField(fn, qf));
            }
            return luceneSubQueries;
        }

        public override string ToString()
        {
            StringBuilder r = new StringBuilder();
            if (IsOperatorInfix)
            {
                InfixToString(r);
            }
            else
            {
                PrefixToString(r);
            }
            WeightToString(r);
            return r.ToString();
        }

        // Override for different spacing
        protected virtual string PrefixSeparator { get { return ", "; } }
        protected virtual string BracketOpen { get { return "("; } }
        protected virtual string BracketClose { get { return ")"; } }

        protected virtual void InfixToString(StringBuilder r)
        {
            /* Brackets are possibly redundant in the result. */
            IEnumerator<SrndQuery> sqi = GetSubQueriesEnumerator();
            r.Append(BracketOpen);
            if (sqi.MoveNext())
            {
                r.Append(sqi.Current.ToString());
                while (sqi.MoveNext())
                {
                    r.Append(" ");
                    r.Append(OperatorName); /* infix operator */
                    r.Append(" ");
                    r.Append(sqi.Current.ToString());
                }
            }
            r.Append(BracketClose);
        }

        protected virtual void PrefixToString(StringBuilder r)
        {
            IEnumerator<SrndQuery> sqi = GetSubQueriesEnumerator();
            r.Append(OperatorName); /* prefix operator */
            r.Append(BracketOpen);
            if (sqi.MoveNext())
            {
                r.Append(sqi.Current.ToString());
                while (sqi.MoveNext())
                {
                    r.Append(PrefixSeparator);
                    r.Append(sqi.Current.ToString());
                }
            }
            r.Append(BracketClose);
        }

        public override bool IsFieldsSubQueryAcceptable
        {
            get
            {
                /* at least one subquery should be acceptable */
                IEnumerator<SrndQuery> sqi = GetSubQueriesEnumerator();
                while (sqi.MoveNext())
                {
                    if ((sqi.Current).IsFieldsSubQueryAcceptable)
                    {
                        return true;
                    }
                }
                return false;
            }
        }
    }
}


text:
import tempfile
import re
import os

try:
    # Python 2
    str_cls = unicode
except (NameError):
    # Python 3
    str_cls = str

from ..console_write import console_write
from ..unicode import unicode_from_os
from ..open_compat import open_compat, read_compat
from .cli_downloader import CliDownloader
from .non_http_error import NonHttpError
from .non_clean_exit_error import NonCleanExitError
from .downloader_exception import DownloaderException
from ..ca_certs import get_ca_bundle_path
from .decoding_downloader import DecodingDownloader
from .limiting_downloader import LimitingDownloader
from .caching_downloader import CachingDownloader

class WgetDownloader(CliDownloader, DecodingDownloader, LimitingDownloader, CachingDownloader):

    """
    A downloader that uses the command line program wget

    :param settings:
        A dict of the various Package Control settings. The Sublime Text
        Settings API is not used because this code is run in a thread.

    :raises:
        BinaryNotFoundError: when wget can not be found
    """

    def __init__(self, settings):
        self.settings = settings
        self.debug = settings.get('debug')
        self.wget = self.find_binary('wget')

    def close(self):
        """
        No-op for compatibility with UrllibDownloader and WinINetDownloader
        """

        pass

    def download(self, url, error_message, timeout, tries, prefer_cached=False):
        """
        Downloads a URL and returns the contents

        :param url:
            The URL to download

        :param error_message:
            A string to include in the console error that is printed
            when an error occurs

        :param timeout:
            The int number of seconds to set the timeout to

        :param tries:
            The int number of times to try and download the URL in the case of
            a timeout or HTTP 503 error

        :param prefer_cached:
            If a cached version should be returned instead of trying a new request

        :raises:
            RateLimitException: when a rate limit is hit
            DownloaderException: when any other download error occurs

        :return:
            The string contents of the URL
        """

        if prefer_cached:
            cached = self.retrieve_cached(url)
            if cached:
                return cached

        self.tmp_file = tempfile.NamedTemporaryFile().name
        command = [self.wget, '--connect-timeout=' + str_cls(int(timeout)), '-o',
            self.tmp_file, '-O', '-', '--secure-protocol=TLSv1']

        user_agent = self.settings.get('user_agent')
        if user_agent:
            command.extend(['-U', user_agent])

        request_headers = {
            # Don't be alarmed if the response from the server does not select
            # one of these since the server runs a relatively new version of
            # OpenSSL which supports compression on the SSL layer, and Apache
            # will use that instead of HTTP-level encoding.
            'Accept-Encoding': self.supported_encodings()
        }
        request_headers = self.add_conditional_headers(url, request_headers)

        for name, value in request_headers.items():
            command.extend(['--header', "%s: %s" % (name, value)])

        secure_url_match = re.match('^https://([^/]+)', url)
        if secure_url_match is not None:
            bundle_path = get_ca_bundle_path(self.settings)
            command.append(u'--ca-certificate=' + bundle_path)

        if self.debug:
            command.append('-d')
        else:
            command.append('-S')

        http_proxy = self.settings.get('http_proxy')
        https_proxy = self.settings.get('https_proxy')
        proxy_username = self.settings.get('proxy_username')
        proxy_password = self.settings.get('proxy_password')

        if proxy_username:
            command.append(u"--proxy-user=%s" % proxy_username)
        if proxy_password:
            command.append(u"--proxy-password=%s" % proxy_password)

        if self.debug:
            console_write(
                u'''
                Wget Debug Proxy
                  http_proxy: %s
                  https_proxy: %s
                  proxy_username: %s
                  proxy_password: %s
                ''',
                (http_proxy, https_proxy, proxy_username, proxy_password)
            )

        command.append(url)

        if http_proxy:
            os.putenv('http_proxy', http_proxy)
        if https_proxy:
            os.putenv('https_proxy', https_proxy)

        error_string = None
        while tries > 0:
            tries -= 1
            try:
                result = self.execute(command)

                general, headers = self.parse_output(True)
                encoding = headers.get('content-encoding')
                result = self.decode_response(encoding, result)

                result = self.cache_result('get', url, general['status'],
                    headers, result)

                return result

            except (NonCleanExitError) as e:

                try:
                    general, headers = self.parse_output(False)
                    self.handle_rate_limit(headers, url)

                    if general['status'] == 304:
                        return self.cache_result('get', url, general['status'],
                            headers, None)

                    if general['status'] == 503 and tries != 0:
                        # GitHub and BitBucket seem to rate limit via 503
                        if tries and self.debug:
                            console_write(
                                u'''
                                Downloading %s was rate limited, trying again
                                ''',
                                url
                            )
                        continue

                    download_error = 'HTTP error %s' % general['status']

                except (NonHttpError) as e:

                    download_error = unicode_from_os(e)

                    # GitHub and BitBucket seem to time out a lot
                    if download_error.find('timed out') != -1:
                        if tries and self.debug:
                            console_write(
                                u'''
                                Downloading %s timed out, trying again
                                ''',
                                url
                            )
                        continue

                error_string = u'%s %s downloading %s.' % (error_message, download_error, url)

            break

        raise DownloaderException(error_string)

    def supports_ssl(self):
        """
        Indicates if the object can handle HTTPS requests

        :return:
            If the object supports HTTPS requests
        """

        return True

    def parse_output(self, clean_run):
        """
        Parses the wget output file, prints debug information and returns headers

        :param clean_run:
            If wget executed with a successful exit code

        :raises:
            NonHttpError - when clean_run is false and an error is detected

        :return:
            A tuple of (general, headers) where general is a dict with the keys:
              `version` - HTTP version number (string)
              `status` - HTTP status code (integer)
              `message` - HTTP status message (string)
            And headers is a dict with the keys being lower-case version of the
            HTTP header names.
        """

        with open_compat(self.tmp_file, 'r') as f:
            output = read_compat(f).splitlines()
        self.clean_tmp_file()

        error = None
        header_lines = []
        if self.debug:
            section = 'General'
            last_section = None
            for line in output:
                if section == 'General':
                    if self.skippable_line(line):
                        continue

                # Skip blank lines
                if line.strip() == '':
                    continue

                # Error lines
                if line[0:5] == 'wget:':
                    error = line[5:].strip()
                if line[0:7] == 'failed:':
                    error = line[7:].strip()

                if line == '---request begin---':
                    section = 'Write'
                    continue
                elif line == '---request end---':
                    section = 'General'
                    continue
                elif line == '---response begin---':
                    section = 'Read'
                    continue
                elif line == '---response end---':
                    section = 'General'
                    continue

                if section != last_section:
                    console_write(u'Wget HTTP Debug %s', section)

                if section == 'Read':
                    header_lines.append(line)

                console_write(u'  %s', line, prefix=False)
                last_section = section

        else:
            for line in output:
                if self.skippable_line(line):
                    continue

                # Check the resolving and connecting to lines for errors
                if re.match('(Resolving |Connecting to )', line):
                    failed_match = re.search(' failed: (.*)$', line)
                    if failed_match:
                        error = failed_match.group(1).strip()

                # Error lines
                if line[0:5] == 'wget:':
                    error = line[5:].strip()
                if line[0:7] == 'failed:':
                    error = line[7:].strip()

                if line[0:2] == '  ':
                    header_lines.append(line.lstrip())

        if not clean_run and error:
            raise NonHttpError(error)

        return self.parse_headers(header_lines)

    def skippable_line(self, line):
        """
        Determines if a debug line is skippable - usually because of extraneous
        or duplicate information.

        :param line:
            The debug line to check

        :return:
            True if the line is skippable, otherwise None
        """

        # Skip date lines
        if re.match('--\d{4}-\d{2}-\d{2}', line):
            return True
        if re.match('\d{4}-\d{2}-\d{2}', line):
            return True
        # Skip HTTP status code lines since we already have that info
        if re.match('\d{3} ', line):
            return True
        # Skip Saving to and progress lines
        if re.match('(Saving to:|\s*\d+K)', line):
            return True
        # Skip notice about ignoring body on HTTP error
        if re.match('Skipping \d+ byte', line):
            return True

    def parse_headers(self, output=None):
        """
        Parses HTTP headers into two dict objects

        :param output:
            An array of header lines, if None, loads from temp output file

        :return:
            A tuple of (general, headers) where general is a dict with the keys:
              `version` - HTTP version number (string)
              `status` - HTTP status code (integer)
              `message` - HTTP status message (string)
            And headers is a dict with the keys being lower-case version of the
            HTTP header names.
        """

        if not output:
            with open_compat(self.tmp_file, 'r') as f:
                output = read_compat(f).splitlines()
            self.clean_tmp_file()

        general = {
            'version': '0.9',
            'status':  200,
            'message': 'OK'
        }
        headers = {}
        for line in output:
            # When using the -S option, headers have two spaces before them,
            # additionally, valid headers won't have spaces, so this is always
            # a safe operation to perform
            line = line.lstrip()
            if line.find('HTTP/') == 0:
                match = re.match('HTTP/(\d\.\d)\s+(\d+)(?:\s+(.*))?$', line)
                general['version'] = match.group(1)
                general['status'] = int(match.group(2))
                general['message'] = match.group(3) or ''
            else:
                name, value = line.split(':', 1)
                headers[name.lower()] = value.strip()

        return (general, headers)


text: Specify one of the Docker Clouds defined under global configuration.


text:
require 'ruboto/base'
require 'ruboto/package'

#######################################################
#
# ruboto/service.rb
#
# Basic service set up.
#
#######################################################

java_import 'android.content.Context'
java_import 'org.ruboto.RubotoService'

module Ruboto
  module Context
    def start_ruboto_service(global_variable_name='$service', klass=RubotoService, options={}, &block)
      # FIXME(uwe): Translate old positional signature to new options-based signature.
      # FIXME(uwe): Remove when we stop supporting Ruboto 0.8.0 or older.
      if options.nil?
        if global_variable_name.is_a?(Hash)
          options = global_variable_name
        else
          options = {}
        end
      end

      class_name = options[:class_name] || "#{klass.name.split('::').last}_#{source_descriptor(block)[0].split('/').last.gsub(/[.-]+/, '_')}_#{source_descriptor(block)[1]}"
      if Object.const_defined?(class_name)
        Object.const_get(class_name).class_eval(&block) if block_given?
      else
        Object.const_set(class_name, Class.new(&block))
      end
      i = android.content.Intent.new
      i.setClass self, klass.java_class
      i.putExtra(Ruboto::CLASS_NAME_KEY, class_name)
      i.putExtra(Ruboto::SCRIPT_NAME_KEY, options[:script]) if options[:script]
      self.startService i
      self
    end
  end
end

Context.class_eval do
  include Ruboto::Context
end


text:
require 'rooted_tree'

# Maps the entries in the file system to `Node` objects via .map_to_path. The
# Node#inspect method is then exploited in #display to show the resulting tree
# structure. The name of each entry in the filesystem is stored in the value
# field of the Node.
class FileSystemItem < RootedTree::Node
  def display
    inspect(&:value)
  end

  def self.map_to_path(path = '.', root: new(path))
    # Iterate over all of the files in the directory
    Dir[path + '/*'].each do |entry|
      # Create a new FileSystemItem for the entry
      item = new File.basename(entry)
      root << item
      # Continue to map the files and directories under
      # entry, if it is a directory
      map_to_path entry, root: item unless File.file? entry
    end

    root
  end
end

puts FileSystemItem.map_to_path('.').display


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed><tipo>Rua</tipo><logradouro>Apolo</logradouro><bairro>Novo Tempo</bairro><cidade>Timóteo</cidade><uf>MG</uf><cep>35183138</cep></feed>


text:
module Helpers
  def setup_reporter_spec(reporter)
    before { ProgressHandler.configure {|config| config.reporters = {reporter => reporter_options} } }
    let(:reporter_options) { {} }
    let(:items) { 5.times.map &:to_s }
    let(:progress_handler) { ProgressHandler.new ph_options }
    let(:ph_options) { { name: 'Specs', report_gap: 2 } }
  end
end


text:
<%inherit file="base_ajax_template.htm" />

<%block name="content">

		<form method="POST" action="/account/login/">
			<Login>

			    ${ form }

			<input class="btn btn-success" type="submit" value="Login"/> &nbsp New User Signup

</%block>


text:
package com.google.errorprone.refaster;

import com.google.auto.value.AutoValue;
import com.sun.source.tree.ModifiersTree;
import com.sun.tools.javac.code.Symbol.VarSymbol;
import com.sun.tools.javac.util.Name;

/**
 * Binding for a local variable in a template.
 *
 * @author lowasser@google.com (Louis Wasserman)
 */
@AutoValue
public abstract class LocalVarBinding {
  public static LocalVarBinding create(VarSymbol symbol, ModifiersTree modifiers) {
    return new AutoValue_LocalVarBinding(symbol, modifiers);
  }

  public abstract VarSymbol getSymbol();

  public abstract ModifiersTree getModifiers();

  public Name getName() {
    return getSymbol().getSimpleName();
  }

  @Override
  public final String toString() {
    return getSymbol().getSimpleName().toString();
  }
}


text:
namespace StillDesign
{
	namespace PhysX
	{
		public value class SoftBodySplitPair
		{
			private:
				int _tetrahedronIndex0;
				int _tetrahedronIndex1;
				int _faceIndex0;
				int _faceIndex1;

			public:
				static explicit operator NxSoftBodySplitPair( SoftBodySplitPair pair );
				static explicit operator SoftBodySplitPair( NxSoftBodySplitPair pair );

				property int TetrahedronIndex0
				{
					int get();
					void set( int value );
				}
				property int TetrahedronIndex1
				{
					int get();
					void set( int value );
				}
				property int FaceIndex0
				{
					int get();
					void set( int value );
				}
				property int FaceIndex1
				{
					int get();
					void set( int value );
				}
		};
	};
};