text:
// Predicates

/**
 * These are all of the possible kinds of types.
 */
'use strict';

var _createClass = require('babel-runtime/helpers/create-class')['default'];

var _classCallCheck = require('babel-runtime/helpers/class-call-check')['default'];

var _Object$keys = require('babel-runtime/core-js/object/keys')['default'];

var _Map = require('babel-runtime/core-js/map')['default'];

var _Object$create = require('babel-runtime/core-js/object/create')['default'];

var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default'];

Object.defineProperty(exports, '__esModule', {
  value: true
});
exports.isType = isType;

/**
 * These types may be used as input types for arguments and directives.
 */
exports.isInputType = isInputType;

/**
 * These types may be used as output types as the result of fields.
 */
exports.isOutputType = isOutputType;

/**
 * These types may describe types which may be leaf values.
 */
exports.isLeafType = isLeafType;

/**
 * These types may describe the parent context of a selection set.
 */
exports.isCompositeType = isCompositeType;

/**
 * These types may describe the parent context of a selection set.
 */
exports.isAbstractType = isAbstractType;

/**
 * These types can all accept null as a value.
 */
exports.getNullableType = getNullableType;

/**
 * These named types do not include modifiers like List or NonNull.
 */
exports.getNamedType = getNamedType;

var _jsutilsInvariant = require('../jsutils/invariant');

var _jsutilsInvariant2 = _interopRequireDefault(_jsutilsInvariant);

var _jsutilsIsNullish = require('../jsutils/isNullish');

var _jsutilsIsNullish2 = _interopRequireDefault(_jsutilsIsNullish);

var _jsutilsKeyMap = require('../jsutils/keyMap');

var _jsutilsKeyMap2 = _interopRequireDefault(_jsutilsKeyMap);

var _languageKinds = require('../language/kinds');

function isType(type) {
  return type instanceof GraphQLScalarType || type instanceof GraphQLObjectType || type instanceof GraphQLInterfaceType || type instanceof GraphQLUnionType || type instanceof GraphQLEnumType || type instanceof GraphQLInputObjectType || type instanceof GraphQLList || type instanceof GraphQLNonNull;
}

function isInputType(type) {
  var namedType = getNamedType(type);
  return namedType instanceof GraphQLScalarType || namedType instanceof GraphQLEnumType || namedType instanceof GraphQLInputObjectType;
}

function isOutputType(type) {
  var namedType = getNamedType(type);
  return namedType instanceof GraphQLScalarType || namedType instanceof GraphQLObjectType || namedType instanceof GraphQLInterfaceType || namedType instanceof GraphQLUnionType || namedType instanceof GraphQLEnumType;
}

function isLeafType(type) {
  var namedType = getNamedType(type);
  return namedType instanceof GraphQLScalarType || namedType instanceof GraphQLEnumType;
}

function isCompositeType(type) {
  return type instanceof GraphQLObjectType || type instanceof GraphQLInterfaceType || type instanceof GraphQLUnionType;
}

function isAbstractType(type) {
  return type instanceof GraphQLInterfaceType || type instanceof GraphQLUnionType;
}

function getNullableType(type) {
  return type instanceof GraphQLNonNull ? type.ofType : type;
}

function getNamedType(type) {
  var unmodifiedType = type;
  while (unmodifiedType instanceof GraphQLList || unmodifiedType instanceof GraphQLNonNull) {
    unmodifiedType = unmodifiedType.ofType;
  }
  return unmodifiedType;
}

/**
 * Scalar Type Definition
 *
 * The leaf values of any request and input values to arguments are
 * Scalars (or Enums) and are defined with a name and a series of functions
 * used to parse input from ast or variables and to ensure validity.
 *
 * Example:
 *
 *     var OddType = new GraphQLScalarType({
 *       name: 'Odd',
 *       serialize(value) {
 *         return value % 2 === 1 ? value : null;
 *       }
 *     });
 *
 */

var GraphQLScalarType /* <T> */ = (function () {
  /* <T> */
  function GraphQLScalarType(config /* <T> */) {
    _classCallCheck(this, GraphQLScalarType);

    (0, _jsutilsInvariant2['default'])(config.name, 'Type must be named.');
    this.name = config.name;
    this.description = config.description;
    (0, _jsutilsInvariant2['default'])(typeof config.serialize === 'function', this + ' must provide "serialize" function. If this custom Scalar is ' + 'also used as an input type, ensure "parseValue" and "parseLiteral" ' + 'functions are also provided.');
    if (config.parseValue || config.parseLiteral) {
      (0, _jsutilsInvariant2['default'])(typeof config.parseValue === 'function' && typeof config.parseLiteral === 'function', this + ' must provide both "parseValue" and "parseLiteral" functions.');
    }
    this._scalarConfig = config;
  }

  _createClass(GraphQLScalarType, [{
    key: 'serialize',
    value: function serialize(value) /* T */{
      var serializer = this._scalarConfig.serialize;
      return serializer(value);
    }
  }, {
    key: 'parseValue',
    value: function parseValue(value) /* T */{
      var parser = this._scalarConfig.parseValue;
      return parser ? parser(value) : null;
    }
  }, {
    key: 'parseLiteral',
    value: function parseLiteral(valueAST) /* T */{
      var parser = this._scalarConfig.parseLiteral;
      return parser ? parser(valueAST) : null;
    }
  }, {
    key: 'toString',
    value: function toString() {
      return this.name;
    }
  }]);

  return GraphQLScalarType;
})();

exports.GraphQLScalarType = GraphQLScalarType;
/* T */

/**
 * Object Type Definition
 *
 * Almost all of the GraphQL types you define will be object types. Object types
 * have a name, but most importantly describe their fields.
 *
 * Example:
 *
 *     var AddressType = new GraphQLObjectType({
 *       name: 'Address',
 *       fields: {
 *         street: { type: GraphQLString },
 *         number: { type: GraphQLInt },
 *         formatted: {
 *           type: GraphQLString,
 *           resolve(obj) {
 *             return obj.number + ' ' + obj.street
 *           }
 *         }
 *       }
 *     });
 *
 * When two types need to refer to each other, or a type needs to refer to
 * itself in a field, you can use a function expression (aka a closure or a
 * thunk) to supply the fields lazily.
 *
 * Example:
 *
 *     var PersonType = new GraphQLObjectType({
 *       name: 'Person',
 *       fields: () => ({
 *         name: { type: GraphQLString },
 *         bestFriend: { type: PersonType },
 *       })
 *     });
 *
 */

var GraphQLObjectType = (function () {
  function GraphQLObjectType(config) {
    _classCallCheck(this, GraphQLObjectType);

    (0, _jsutilsInvariant2['default'])(config.name, 'Type must be named.');
    this.name = config.name;
    this.description = config.description;
    if (config.isTypeOf) {
      (0, _jsutilsInvariant2['default'])(typeof config.isTypeOf === 'function', this + ' must provide "isTypeOf" as a function.');
    }
    this.isTypeOf = config.isTypeOf;
    this._typeConfig = config;
    addImplementationToInterfaces(this);
  }

  _createClass(GraphQLObjectType, [{
    key: 'getFields',
    value: function getFields() {
      return this._fields || (this._fields = defineFieldMap(this, this._typeConfig.fields));
    }
  }, {
    key: 'getInterfaces',
    value: function getInterfaces() {
      return this._interfaces || (this._interfaces = defineInterfaces(this, this._typeConfig.interfaces));
    }
  }, {
    key: 'toString',
    value: function toString() {
      return this.name;
    }
  }]);

  return GraphQLObjectType;
})();

exports.GraphQLObjectType = GraphQLObjectType;

function resolveMaybeThunk(thingOrThunk) {
  return typeof thingOrThunk === 'function' ? thingOrThunk() : thingOrThunk;
}

function defineInterfaces(type, interfacesOrThunk) {
  var interfaces = resolveMaybeThunk(interfacesOrThunk);
  if (!interfaces) {
    return [];
  }
  (0, _jsutilsInvariant2['default'])(Array.isArray(interfaces), type + ' interfaces must be an Array or a function which returns an Array.');
  interfaces.forEach(function (iface) {
    (0, _jsutilsInvariant2['default'])(iface instanceof GraphQLInterfaceType, type + ' may only implement Interface types, it cannot ' + ('implement: ' + iface + '.'));
    if (typeof iface.resolveType !== 'function') {
      (0, _jsutilsInvariant2['default'])(typeof type.isTypeOf === 'function', 'Interface Type ' + iface + ' does not provide a "resolveType" function ' + ('and implementing Type ' + type + ' does not provide a "isTypeOf" ') + 'function. There is no way to resolve this implementing type ' + 'during execution.');
    }
  });
  return interfaces;
}

function defineFieldMap(type, fields) {
  var fieldMap = resolveMaybeThunk(fields);
  (0, _jsutilsInvariant2['default'])(isPlainObj(fieldMap), type + ' fields must be an object with field names as keys or a ' + 'function which returns such an object.');
  var fieldNames = _Object$keys(fieldMap);
  (0, _jsutilsInvariant2['default'])(fieldNames.length > 0, type + ' fields must be an object with field names as keys or a ' + 'function which returns such an object.');
  fieldNames.forEach(function (fieldName) {
    var field = fieldMap[fieldName];
    field.name = fieldName;
    (0, _jsutilsInvariant2['default'])(isOutputType(field.type), type + '.' + fieldName + ' field type must be Output Type but ' + ('got: ' + field.type + '.'));
    if (!field.args) {
      field.args = [];
    } else {
      (0, _jsutilsInvariant2['default'])(isPlainObj(field.args), type + '.' + fieldName + ' args must be an object with argument names ' + 'as keys.');
      field.args = _Object$keys(field.args).map(function (argName) {
        var arg = field.args[argName];
        (0, _jsutilsInvariant2['default'])(isInputType(arg.type), type + '.' + fieldName + '(' + argName + ':) argument type must be ' + ('Input Type but got: ' + arg.type + '.'));
        return {
          name: argName,
          description: arg.description === undefined ? null : arg.description,
          type: arg.type,
          defaultValue: arg.defaultValue === undefined ? null : arg.defaultValue
        };
      });
    }
  });
  return fieldMap;
}

function isPlainObj(obj) {
  return obj && typeof obj === 'object' && !Array.isArray(obj);
}

/**
 * Update the interfaces to know about this implementation.
 * This is an rare and unfortunate use of mutation in the type definition
 * implementations, but avoids an expensive "getPossibleTypes"
 * implementation for Interface types.
 */
function addImplementationToInterfaces(impl) {
  impl.getInterfaces().forEach(function (type) {
    type._implementations.push(impl);
  });
}

/**
 * Interface Type Definition
 *
 * When a field can return one of a heterogeneous set of types, a Interface type
 * is used to describe what types are possible, what fields are in common across
 * all types, as well as a function to determine which type is actually used
 * when the field is resolved.
 *
 * Example:
 *
 *     var EntityType = new GraphQLInterfaceType({
 *       name: 'Entity',
 *       fields: {
 *         name: { type: GraphQLString }
 *       }
 *     });
 *
 */

var GraphQLInterfaceType = (function () {
  function GraphQLInterfaceType(config) {
    _classCallCheck(this, GraphQLInterfaceType);

    (0, _jsutilsInvariant2['default'])(config.name, 'Type must be named.');
    this.name = config.name;
    this.description = config.description;
    if (config.resolveType) {
      (0, _jsutilsInvariant2['default'])(typeof config.resolveType === 'function', this + ' must provide "resolveType" as a function.');
    }
    this.resolveType = config.resolveType;
    this._typeConfig = config;
    this._implementations = [];
  }

  _createClass(GraphQLInterfaceType, [{
    key: 'getFields',
    value: function getFields() {
      return this._fields || (this._fields = defineFieldMap(this, this._typeConfig.fields));
    }
  }, {
    key: 'getPossibleTypes',
    value: function getPossibleTypes() {
      return this._implementations;
    }
  }, {
    key: 'isPossibleType',
    value: function isPossibleType(type) {
      var possibleTypes = this._possibleTypes || (this._possibleTypes = (0, _jsutilsKeyMap2['default'])(this.getPossibleTypes(), function (possibleType) {
        return possibleType.name;
      }));
      return Boolean(possibleTypes[type.name]);
    }
  }, {
    key: 'getObjectType',
    value: function getObjectType(value, info) {
      var resolver = this.resolveType;
      return resolver ? resolver(value, info) : getTypeOf(value, info, this);
    }
  }, {
    key: 'toString',
    value: function toString() {
      return this.name;
    }
  }]);

  return GraphQLInterfaceType;
})();

exports.GraphQLInterfaceType = GraphQLInterfaceType;

function getTypeOf(value, info, abstractType) {
  var possibleTypes = abstractType.getPossibleTypes();
  for (var i = 0; i < possibleTypes.length; i++) {
    var type = possibleTypes[i];
    if (typeof type.isTypeOf === 'function' && type.isTypeOf(value, info)) {
      return type;
    }
  }
}

/**
 * Union Type Definition
 *
 * When a field can return one of a heterogeneous set of types, a Union type
 * is used to describe what types are possible as well as providing a function
 * to determine which type is actually used when the field is resolved.
 *
 * Example:
 *
 *     var PetType = new GraphQLUnionType({
 *       name: 'Pet',
 *       types: [ DogType, CatType ],
 *       resolveType(value) {
 *         if (value instanceof Dog) {
 *           return DogType;
 *         }
 *         if (value instanceof Cat) {
 *           return CatType;
 *         }
 *       }
 *     });
 *
 */

var GraphQLUnionType = (function () {
  function GraphQLUnionType(config) {
    var _this = this;

    _classCallCheck(this, GraphQLUnionType);

    (0, _jsutilsInvariant2['default'])(config.name, 'Type must be named.');
    this.name = config.name;
    this.description = config.description;
    if (config.resolveType) {
      (0, _jsutilsInvariant2['default'])(typeof config.resolveType === 'function', this + ' must provide "resolveType" as a function.');
    }
    this.resolveType = config.resolveType;
    (0, _jsutilsInvariant2['default'])(Array.isArray(config.types) && config.types.length > 0, 'Must provide Array of types for Union ' + config.name + '.');
    config.types.forEach(function (type) {
      (0, _jsutilsInvariant2['default'])(type instanceof GraphQLObjectType, _this + ' may only contain Object types, it cannot contain: ' + type + '.');
      if (typeof _this.resolveType !== 'function') {
        (0, _jsutilsInvariant2['default'])(typeof type.isTypeOf === 'function', 'Union Type ' + _this + ' does not provide a "resolveType" function ' + ('and possible Type ' + type + ' does not provide a "isTypeOf" ') + 'function. There is no way to resolve this possible type ' + 'during execution.');
      }
    });
    this._types = config.types;
    this._typeConfig = config;
  }

  _createClass(GraphQLUnionType, [{
    key: 'getPossibleTypes',
    value: function getPossibleTypes() {
      return this._types;
    }
  }, {
    key: 'isPossibleType',
    value: function isPossibleType(type) {
      var possibleTypeNames = this._possibleTypeNames;
      if (!possibleTypeNames) {
        this._possibleTypeNames = possibleTypeNames = this.getPossibleTypes().reduce(function (map, possibleType) {
          return (map[possibleType.name] = true, map);
        }, {});
      }
      return possibleTypeNames[type.name] === true;
    }
  }, {
    key: 'getObjectType',
    value: function getObjectType(value, info) {
      var resolver = this._typeConfig.resolveType;
      return resolver ? resolver(value, info) : getTypeOf(value, info, this);
    }
  }, {
    key: 'toString',
    value: function toString() {
      return this.name;
    }
  }]);

  return GraphQLUnionType;
})();

exports.GraphQLUnionType = GraphQLUnionType;

/**
 * Enum Type Definition
 *
 * Some leaf values of requests and input values are Enums. GraphQL serializes
 * Enum values as strings, however internally Enums can be represented by any
 * kind of type, often integers.
 *
 * Example:
 *
 *     var RGBType = new GraphQLEnumType({
 *       name: 'RGB',
 *       values: {
 *         RED: { value: 0 },
 *         GREEN: { value: 1 },
 *         BLUE: { value: 2 }
 *       }
 *     });
 *
 * Note: If a value is not provided in a definition, the name of the enum value
 * will be used as it's internal value.
 */

var GraphQLEnumType /* <T> */ = (function () {
  function GraphQLEnumType(config /* <T> */) {
    _classCallCheck(this, GraphQLEnumType);

    this.name = config.name;
    this.description = config.description;
    this._values = defineEnumValues(this, config.values);
    this._enumConfig = config;
  }

  _createClass(GraphQLEnumType, [{
    key: 'getValues',
    value: function getValues() /* <T> */{
      return this._values;
    }
  }, {
    key: 'serialize',
    value: function serialize(value /* T */) {
      var enumValue = this._getValueLookup().get(value);
      return enumValue ? enumValue.name : null;
    }
  }, {
    key: 'parseValue',
    value: function parseValue(value) /* T */{
      var enumValue = this._getNameLookup()[value];
      if (enumValue) {
        return enumValue.value;
      }
    }
  }, {
    key: 'parseLiteral',
    value: function parseLiteral(valueAST) /* T */{
      if (valueAST.kind === _languageKinds.ENUM) {
        var enumValue = this._getNameLookup()[valueAST.value];
        if (enumValue) {
          return enumValue.value;
        }
      }
    }
  }, {
    key: '_getValueLookup',
    value: function _getValueLookup() {
      if (!this._valueLookup) {
        var lookup = new _Map();
        this.getValues().forEach(function (value) {
          lookup.set(value.value, value);
        });
        this._valueLookup = lookup;
      }
      return this._valueLookup;
    }
  }, {
    key: '_getNameLookup',
    value: function _getNameLookup() {
      if (!this._nameLookup) {
        var lookup = _Object$create(null);
        this.getValues().forEach(function (value) {
          lookup[value.name] = value;
        });
        this._nameLookup = lookup;
      }
      return this._nameLookup;
    }
  }, {
    key: 'toString',
    value: function toString() {
      return this.name;
    }
  }]);

  return GraphQLEnumType;
})();

exports.GraphQLEnumType = GraphQLEnumType;

function defineEnumValues(type, valueMap /* <T> */
) /* <T> */{
  (0, _jsutilsInvariant2['default'])(isPlainObj(valueMap), type + ' values must be an object with value names as keys.');
  var valueNames = _Object$keys(valueMap);
  (0, _jsutilsInvariant2['default'])(valueNames.length > 0, type + ' values must be an object with value names as keys.');
  return valueNames.map(function (valueName) {
    var value = valueMap[valueName];
    (0, _jsutilsInvariant2['default'])(isPlainObj(value), type + '.' + valueName + ' must refer to an object with a "value" key ' + ('representing an internal value but got: ' + value + '.'));
    value.name = valueName;
    if ((0, _jsutilsIsNullish2['default'])(value.value)) {
      value.value = valueName;
    }
    return value;
  });
}

/* <T> */

/**
 * Input Object Type Definition
 *
 * An input object defines a structured collection of fields which may be
 * supplied to a field argument.
 *
 * Using `NonNull` will ensure that a value must be provided by the query
 *
 * Example:
 *
 *     var GeoPoint = new GraphQLInputObjectType({
 *       name: 'GeoPoint',
 *       fields: {
 *         lat: { type: new GraphQLNonNull(GraphQLFloat) },
 *         lon: { type: new GraphQLNonNull(GraphQLFloat) },
 *         alt: { type: GraphQLFloat, defaultValue: 0 },
 *       }
 *     });
 *
 */

var GraphQLInputObjectType = (function () {
  function GraphQLInputObjectType(config) {
    _classCallCheck(this, GraphQLInputObjectType);

    (0, _jsutilsInvariant2['default'])(config.name, 'Type must be named.');
    this.name = config.name;
    this.description = config.description;
    this._typeConfig = config;
  }

  _createClass(GraphQLInputObjectType, [{
    key: 'getFields',
    value: function getFields() {
      return this._fields || (this._fields = this._defineFieldMap());
    }
  }, {
    key: '_defineFieldMap',
    value: function _defineFieldMap() {
      var _this2 = this;

      var fieldMap = resolveMaybeThunk(this._typeConfig.fields);
      (0, _jsutilsInvariant2['default'])(isPlainObj(fieldMap), this + ' fields must be an object with field names as keys or a ' + 'function which returns such an object.');
      var fieldNames = _Object$keys(fieldMap);
      (0, _jsutilsInvariant2['default'])(fieldNames.length > 0, this + ' fields must be an object with field names as keys or a ' + 'function which returns such an object.');
      fieldNames.forEach(function (fieldName) {
        var field = fieldMap[fieldName];
        field.name = fieldName;
        (0, _jsutilsInvariant2['default'])(isInputType(field.type), _this2 + '.' + fieldName + ' field type must be Input Type but ' + ('got: ' + field.type + '.'));
      });
      return fieldMap;
    }
  }, {
    key: 'toString',
    value: function toString() {
      return this.name;
    }
  }]);

  return GraphQLInputObjectType;
})();

exports.GraphQLInputObjectType = GraphQLInputObjectType;

/**
 * List Modifier
 *
 * A list is a kind of type marker, a wrapping type which points to another
 * type. Lists are often created within the context of defining the fields of
 * an object type.
 *
 * Example:
 *
 *     var PersonType = new GraphQLObjectType({
 *       name: 'Person',
 *       fields: () => ({
 *         parents: { type: new GraphQLList(Person) },
 *         children: { type: new GraphQLList(Person) },
 *       })
 *     })
 *
 */

var GraphQLList = (function () {
  function GraphQLList(type) {
    _classCallCheck(this, GraphQLList);

    (0, _jsutilsInvariant2['default'])(isType(type), 'Can only create List of a GraphQLType but got: ' + type + '.');
    this.ofType = type;
  }

  /**
   * Non-Null Modifier
   *
   * A non-null is a kind of type marker, a wrapping type which points to another
   * type. Non-null types enforce that their values are never null and can ensure
   * an error is raised if this ever occurs during a request. It is useful for
   * fields which you can make a strong guarantee on non-nullability, for example
   * usually the id field of a database row will never be null.
   *
   * Example:
   *
   *     var RowType = new GraphQLObjectType({
   *       name: 'Row',
   *       fields: () => ({
   *         id: { type: new GraphQLNonNull(String) },
   *       })
   *     })
   *
   * Note: the enforcement of non-nullability occurs within the executor.
   */

  _createClass(GraphQLList, [{
    key: 'toString',
    value: function toString() {
      return '[' + String(this.ofType) + ']';
    }
  }]);

  return GraphQLList;
})();

exports.GraphQLList = GraphQLList;

var GraphQLNonNull = (function () {
  function GraphQLNonNull(type) {
    _classCallCheck(this, GraphQLNonNull);

    (0, _jsutilsInvariant2['default'])(isType(type) && !(type instanceof GraphQLNonNull), 'Can only create NonNull of a Nullable GraphQLType but got: ' + type + '.');
    this.ofType = type;
  }

  _createClass(GraphQLNonNull, [{
    key: 'toString',
    value: function toString() {
      return this.ofType.toString() + '!';
    }
  }]);

  return GraphQLNonNull;
})();

exports.GraphQLNonNull = GraphQLNonNull;
/* <T> */ /* T */ /* T */
/**
 * Optionally provide a custom type resolver function. If one is not provided,
 * the default implemenation will call `isTypeOf` on each implementing
 * Object type.
 */

/**
 * Optionally provide a custom type resolver function. If one is not provided,
 * the default implemenation will call `isTypeOf` on each implementing
 * Object type.
 */
/* <T> */ /* <T> */ /* T */ /* T */ /* <T> */ /* <T> */ /* <T> */ /* <T> */ /* T */ /* <T> */ /* T */


text:
Dockerfile files, tips and tricks about Docker for a containerized world.

## Images
Dockerfile and instructions about custom images.

## Tips & Tricks
Fast notes and links to flush my mind.

* * *
#### Author and License

* Tarso Queiroz ([mail](mailto:tarsoqueiroz@gmail.com) | [GitHub]())
* License: [MIT License (Expat)](https://tldrlegal.com/license/mit-license)

redpajama_set_name: RedPajamaGithub


text:
<form action="test.php" target="upload_iframe" method="post" enctype="multipart/form-data">
    <input type="hidden" name="fileframe" value="true">
	Select file
    <input type="file" name="file" id="file" onchange="jsUpload(this)">
</form>
	File name: <input type="text" name="filenamei" id="filenamei" value="none" disabled>
    Status : <input type="text" name="upload_status" id="upload_status" value="not uploaded" size="64" disabled>


text:
'use strict';
console.log("starting up");
var sergeantApp = angular.module('sergeantApp',['ui.bootstrap']);

//We already have a limitTo filter built-in to angular,
//let's make a startFrom filter
sergeantApp.filter('startFrom', function() {
    return function(input, start) {
        start = +start; //parse to int
        // console.log("Starting at " + start, input )
        return input.slice(start);
    }
});

sergeantApp.controller ('JobController', function($scope,$http,$timeout) {
  $scope.jobs = {}
  $scope.status = null;
  $scope.pageSize = 25;
  $scope.currentPage = 1;
  $scope.numberOfJobs = 0;
  $scope.numberOfPages = function() {
    return Math.ceil($scope.jobs.length/$scope.pageSize);
  }

  // Cleanup
  $scope.cleanup = function(job) {
    $http({method: "DELETE", url: "rest/job/" + job.uuid}).
    success(function(data,status,headers,config){
      for(var i = 0; i < $scope.jobs.length; i++) {
        if ( $scope.jobs[i].uuid == job.uuid ) {
          $scope.jobs.splice(i,1)
        }
      }
    }).
    error( function(data,status,headers,config) {
      bootbox.alert("Failed to delete " + job.endPoint + ": " + status);
    });
  };

  $scope.cleanupAll = function() {
    for(var i = 0; i < $scope.jobs.length; i++) {
      var job = $scope.jobs[i];
      if ( job.status == "done" || job.status == 'failed') {
        $scope.cleanup(job);
      }
    }
  };

  $scope.update = function() {
    $http({method: 'GET', url: 'rest/job'}).
    success(function(data,status,headers,config) {
      $scope.jobs = data;
      $scope.numberOfJobs = $scope.jobs.length;
      $timeout($scope.update, 5000);
      $scope.status = null;
    }).
    error(function(data,status,headers,config) {
      $scope.status = "failed to get services"
      $timeout($scope.update, 1000);
    });
  };
  // Kick it off
  $scope.update();

});

  sergeantApp.controller ('ServiceController', function($scope,$http,$timeout) {
    $scope.services = {}
    $scope.status = null;
    $scope.update = function() {
      $http({method: 'GET', url: 'rest/service'}).
      success(function(data,status,headers,config) {
        $scope.services = data;
        $timeout($scope.update, 5000);
        $scope.status = null;
      }).
      error(function(data,status,headers,config) {
        $scope.status = "failed to get services"
        $timeout($scope.update, 1000);
      });
    };
    // Kick it off
    $scope.update();
  });


text:
using System;

namespace OCC.Passports.Common.Contracts.Infrastructure
{
    public interface IHistory
    {
        DateTimeOffset Timestamp { get; }
    }
}


text:
#include "../Render/Uniform.h"
#include "../Render/Sampler.h"
#include "../Render/Tex2D.h"
#include "../Render/Tex2DArray.h"
#include "../Render/Material.h"
#include "../Render/Shader.h"

#include <glm/glm.hpp>
#include <glm/gtx/quaternion.hpp>

#include <unordered_map>
#include <memory>

namespace Scene
{
	class SceneNode;
	typedef std::shared_ptr<SceneNode> SceneNodePtr;

	class SceneNode
	{
	public:
		SceneNode();

		virtual void render(const Render::ShaderPtr &active_program) = 0;

		void setObjectToWorldUniform(const Render::UniformPtr &uni_object_to_world) { this->uni_object_to_world = uni_object_to_world; }
		void setWorldToViewUniform(const Render::UniformPtr &uni_world_to_view) { this->uni_world_to_view = uni_world_to_view; }
		void setViewToClipUniform(const Render::UniformPtr &uni_view_to_clip) { this->uni_view_to_clip = uni_view_to_clip; }
		void setNormalToViewUniform(const Render::UniformPtr &uni_normal_to_view) { this->uni_normal_to_view = uni_normal_to_view; }

		virtual void setObjectToWorldMatrix(const glm::mat4 &object_to_world) { this->object_to_world = object_to_world; }

		virtual void setPosition(const glm::vec3 &position) { this->position = position; }
		virtual void setOrientation(const glm::quat &orientation) { this->orientation = orientation; }
		virtual void setScale(const glm::vec3 &scale) { this->scale = scale; }

		virtual glm::vec3 getPosition() { return position; }
		virtual glm::quat getOrientation() { return orientation; }
		virtual glm::vec3 getScale() { return scale; }
		glm::mat4 getObjectToWorldMatrix() { return object_to_world; }

		void setTexture(int slot, const Render::Tex2DPtr &tex, const Render::UniformPtr &uniform, const Render::SamplerPtr &sampler);
		virtual void setTexture(int slot, const Render::Tex2DPtr &tex, const std::string &uni_name) {}
		void setTexture(int slot, const Render::Tex2DArrayPtr &tex_array, const Render::UniformPtr &uniform, const Render::SamplerPtr &sampler);
		virtual void setMaterial(const Render::MaterialPtr &material) { this->material = material; }

	protected:
		Render::UniformPtr uni_object_to_world;
		Render::UniformPtr uni_world_to_view;
		Render::UniformPtr uni_view_to_clip;
		Render::UniformPtr uni_normal_to_view;

		std::unordered_map<int, std::pair<Render::Tex2DPtr, Render::UniformPtr>> textures;
		Render::Tex2DArrayPtr tex_array;
		Render::UniformPtr tex_uniform;
		Render::SamplerPtr tex_sampler;

		Render::MaterialPtr material;

		glm::mat4 object_to_world;
		glm::vec3 position;
		glm::quat orientation;
		glm::vec3 scale;
	};
}


text:
// This file is automatically generated.

package adila.db;

/*
 * Micromax Canvas FIRE4G
 *
 * DEVICE: Q411
 * MODEL: Micromax Q411
 */
final class q411_micromax20q411 {
    public static final String DATA = "Micromax|Canvas FIRE4G|";
}


text:
package be.peopleware.bean_III;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

import be.peopleware.test_I.Test;
import be.peopleware.test_I.java.lang._Test_Object;
import be.peopleware.test_I.java.lang._Test_String;

/**
 * @author    Jan Dockx
 * @author    PeopleWare n.v.
 */
public class _Test_Delegate extends _Test_Object {

  /*
*/
  //------------------------------------------------------------------

  /** {@value} */
  public static final String CVS_REVISION = "$Revision$"; //$NON-NLS-1$
  /** {@value} */
  public static final String CVS_DATE = "$Date$"; //$NON-NLS-1$
  /** {@value} */
  public static final String CVS_STATE = "$State$"; //$NON-NLS-1$
  /** {@value} */
  public static final String CVS_TAG = "$Name$"; //$NON-NLS-1$

  /*
*/

  public static void main(final String[] args) {
    Test.main(new String[] {"be.peopleware.bean_II._Test_Delegate"}); //$NON-NLS-1$
  }

  protected void testClassMethods() {
    test_Delegate_Object_String_();
  }

  protected void testInstanceMethods() {
    test_hasSameValues_Object_();
  }

  /*
*/
  //-------------------------------------------------------------------

  protected Delegate create_Delegate(final Object delegatingBean,
                                     final String propertyName) {
    return new Delegate(delegatingBean, propertyName);
  }

  public Set getCases() {
    Set result = new HashSet();
    Delegate cs;
    Iterator iterString = new _Test_String().getCases().iterator();
    while (iterString.hasNext()) {
      String propertyName = (String)iterString.next();
      try {
        Object delegatingBean = new Object();
        if (pre_Delegate_Object_String_(delegatingBean, propertyName)) {
          cs = create_Delegate(delegatingBean, propertyName);
          result.add(cs);
        }
      }
      catch (Throwable t) {
        assert true : "If create throws an exception we are not intrested."; //$NON-NLS-1$
      }
    }
    return result;
  }

  /*
*/

  /*
*/
  //-------------------------------------------------------------------

  protected void validateTypeInvariants(final Delegate subject) {
    validate(subject.getDelegatingBean() != null);
    validate((subject.getPropertyName() != null)
             && subject.getPropertyName().length() > 0);
    validate(!Cloneable.class.isAssignableFrom(subject.getClass()));
    validate(!Serializable.class.isAssignableFrom(subject.getClass()));
    /* (forall Object o; ; equals(o) == (this == o));
            do not override the equals method */
  }

  /*
*/

  /*
*/
  //-------------------------------------------------------------------

  protected final void test_Delegate_Object_String_() {
    Iterator iterString = new _Test_String().getCases().iterator();
    while (iterString.hasNext()) {
      String propertyName = (String)iterString.next();
      Object delegatingBean = new Object();
      if (pre_Delegate_Object_String_(delegatingBean, propertyName)) {
        test_Delegate_Object_String_(delegatingBean, propertyName);
      }
    }
  }

  protected boolean pre_Delegate_Object_String_(final Object delegatingBean,
                                                final String propertyName) {
    return (delegatingBean != null)
           && (propertyName != null)
           && (propertyName.length() > 0);
  }

  protected final void test_Delegate_Object_String_(final Object delegatingBean,
                                                    final String propertyName) {
    try {
      Delegate subject = new Delegate(delegatingBean, propertyName);
      validate(subject.getDelegatingBean() == delegatingBean);
      validate(subject.getPropertyName().equals(propertyName));
      validateTypeInvariants(subject);
    }
    catch (Throwable t) {
      unexpectedThrowable(t);
    }
  }

  /*
*/

  /*
*/
  //-------------------------------------------------------------------

  protected final void test_hasSameValues_Object_() {
    Iterator iterDelegate1 = getCases().iterator();
    while (iterDelegate1.hasNext()) {
      Delegate subject = (Delegate)iterDelegate1.next();
      Iterator iterDelegate2 = getCasesWithNull().iterator();
      while (iterDelegate2.hasNext()) {
        Object other = iterDelegate2.next();
        test_hasSameValues_Object_(subject, other);
        test_hasSameValues_Object_(subject, new Object());
      }
    }
  }

  protected void test_hasSameValues_Object_(final Delegate subject,
                                            final Object other) {
    try {
      boolean result = subject.hasSameValues(other);
      post_hasSameValues_Object_(subject, other, result);
      validateTypeInvariants(subject);
    }
    catch (Throwable t) {
      unexpectedThrowable(t);
    }
  }

  protected void post_hasSameValues_Object_(final Delegate subject,
                                            final Object other,
                                            final boolean result) {
    validate(result ? ((other != null)
                          && (subject.getClass() == other.getClass()))
                    : true);
  }

  /*
*/

}


text:
#ifndef _ES31FSHADERHELPERINVOCATIONTESTS_HPP
#define _ES31FSHADERHELPERINVOCATIONTESTS_HPP
/*!
 * \file
 * \brief gl_HelperInvocation tests.
 *//*--------------------------------------------------------------------*/

#include "tes31TestCase.hpp"

namespace deqp
{
namespace gles31
{
namespace Functional
{

class ShaderHelperInvocationTests : public TestCaseGroup
{
public:
									ShaderHelperInvocationTests		(Context& context);
	virtual							~ShaderHelperInvocationTests	(void);

	virtual void					init							(void);

private:
									ShaderHelperInvocationTests		(const ShaderHelperInvocationTests&);
	ShaderHelperInvocationTests&	operator=						(const ShaderHelperInvocationTests&);
};

} // Functional
} // gles31
} // deqp

#endif // _ES31FSHADERHELPERINVOCATIONTESTS_HPP


text:
package com.github.phenomics.ontolib.graph.data;

import static org.junit.Assert.assertEquals;

import org.junit.Before;
import org.junit.Test;

import com.github.phenomics.ontolib.graph.data.ImmutableEdge;

public class ImmutableEdgeFactoryTest {

  private ImmutableEdge.Factory<Integer> factory;

  @Before
  public void setUp() {
    factory = new ImmutableEdge.Factory<Integer>();
  }

  @Test
  public void testConstructOne() {
    ImmutableEdge<Integer> e = factory.construct(1, 2);
    assertEquals("ImmutableEdge [source=1, dest=2, id=1]", e.toString());
    assertEquals(2, factory.getNextEdgeId());
  }

  @Test
  public void testConstructTwo() {
    ImmutableEdge<Integer> e1 = factory.construct(1, 2);
    assertEquals("ImmutableEdge [source=1, dest=2, id=1]", e1.toString());
    ImmutableEdge<Integer> e2 = factory.construct(2, 3);
    assertEquals("ImmutableEdge [source=2, dest=3, id=2]", e2.toString());
    assertEquals(3, factory.getNextEdgeId());
  }

}


text:
const React = require('react')
const e = React.createElement
const Component = React.Component
const connect = require('react-redux').connect
const bindActionCreators = require('redux').bindActionCreators
const n = require('../utils/nodegit')
const nodegit = n.nodegit
const getCommonTopCommit = n.getCommonTopCommit
const countCommitStats = n.countCommitStats
const ProjectsActions = require('../actions/projects')
const IntegratorActions = require('../actions/integrator')
const MenuActions = require('../actions/menu')
const LoadingActions = require('../actions/loading')
const remoteCallbacks = require('../utils/remoteCallbacks')
const notify = require('../utils/notify')
const redirectWithReload = require('../utils/redirectWithReload')
const exec = require('child-process-promise').exec
const log = require('../utils/log')
const t = require('../utils/text')

const CHECK_INTERVAL = 3000

class Watcher extends Component {

	constructor(props) {
		super(props)

		this.lastProblems = {
			usernamePassword: null,
		}

		this.notifyAboutCommitSuggestion = true
	}

	componentDidMount() {
		this.check()
	}

	// Zjistí, jestli je co commitnout
	refreshCanCommit(repo, localTopCommit) {
		if (!repo) {
			return
		}
		let index
		let treeB
		let available = false
		let notification = false
		return Promise.resolve()
			.then(() => repo.getStatus())
			.then((artifacts) => available = repo.isDefaultState() && artifacts.length !== 0)
			.then(() => {
				if (localTopCommit) {
					return Promise.resolve()
						.then(() => localTopCommit.getTree())
						.then((t) => treeB = t)
						.then((t) => repo.index())
						.then((i) => index = i)
						.then(() => index.addAll())
						.then(() => index.writeTree())
						.then((oid) => nodegit.Tree.lookup(repo, oid))
						.then((treeA) => countCommitStats(treeA, treeB))
						.then((stats) => {
							let statsBetterOrEqToMedian = 0
							const statKeys = ['additions', 'removals', 'files']
							statKeys.forEach((statKey) => {
								if (stats[statKey] >= this.props.projects.active.stats[statKey]) {
									statsBetterOrEqToMedian++
								}
							})
							notification = this.notifyAboutCommitSuggestion && available && !this.props.integrator.commitNotification && statsBetterOrEqToMedian > 1
							if (notification) {
								this.notifyAboutCommitSuggestion = false
							} else if (!available) {
								this.notifyAboutCommitSuggestion = true
							}

						})
				}
			})
			.catch((error) => log.error(error))
			.then(() => {
				this.props.actions.integrator.setCommitAvailable(
					available,
					notification,
					t(this.props.settings.language, 'notification_cancommit_title'),
					t(this.props.settings.language, 'notification_cancommit_message'),
					'/commit'
				)
			})
	}

	// Nahraje nové změny na vzdálený server
	push(repo, remoteName, localBranchReference) {
		const refName = localBranchReference.toString()
		return repo.getRemote(remoteName)
			.then((remote) => {
				return remote.push([
					`${refName}:${refName}`
				], remoteCallbacks)
			})
			.then(() => {
				notify('Vaše změny byly nasdíleny', 'zobrazit historii', () => {
					redirectWithReload('/history')
				})
			})
			.catch((error) => console.error(error))
	}

	// Spustí periodickou kontrolu repozitáře (fetch, push, upozornění na nové změny)
	check() {
		let repo
		let remoteName
		let localBranch
		let localTopCommit
		let remoteOldTopCommit
		let remoteNewTopCommit
		let commonTopCommit

		if (!this.props.projects.active || this.props.loading) {
			if (!this.props.projects.active) {
				this.props.actions.integrator.dismissNotification()
				this.props.actions.integrator.dismissCommitNotification()
			}
			setTimeout(() => {
				this.check()
			}, CHECK_INTERVAL)
			return
		}

		nodegit.Repository.open(this.props.projects.active.path)
			.then((r) => repo = r)
			.then(() => repo.getCurrentBranch())
			.then((reference) => {
				localBranch = reference
				return repo.getBranchCommit(localBranch)
					.then((commit) => localTopCommit = commit)
					.then(() => nodegit.Branch.upstream(localBranch))
			})
			.then((reference) => {
				remoteName = reference.toString().split('/')[2] // Returns for example "origin"
				return repo.getBranchCommit(reference)
					.then((commit) => remoteOldTopCommit = commit)
					.then(() => {
						return repo.fetch(remoteName, remoteCallbacks)
							.then(() => nodegit.Branch.upstream(localBranch))
					})
			})
			.then((reference) => {
				return repo.getBranchCommit(reference)
					.then((commit) => remoteNewTopCommit = commit)
			})
			.then(() => getCommonTopCommit(repo, localTopCommit, remoteNewTopCommit))
			.then((commit) => {
				commonTopCommit = commit
				this.props.actions.integrator.setIntegrationAvailable(
					remoteNewTopCommit && (!commonTopCommit || (remoteNewTopCommit.sha() !== commonTopCommit.sha())),
					remoteNewTopCommit && (!remoteOldTopCommit || (remoteNewTopCommit.sha() !== remoteOldTopCommit.sha())),
					t(this.props.settings.language, 'notification_updates_title'),
					t(this.props.settings.language, 'notification_updates_message'),
					'/integrateChanges'
				)

				const push = () => {
					if (this.props.settings.autoPush) {
						return this.push(repo, remoteName, localBranch)
					}
					return
				}
				if (localTopCommit) {
					if (!remoteNewTopCommit) { // Never pushed
						return push()
					}
					if (!commonTopCommit) { // No common parent
						return
					}
					if (commonTopCommit.sha() === localTopCommit.sha()) { // Nothing to push
						return
					}
					if (commonTopCommit.sha() === remoteNewTopCommit.sha()) { // Able to push
						return push()
					}
				}
			})
			.catch((error) => {
				// Try to fix repo
				this.props.actions.loading.IncrementLoadingJobs()
				return Promise.resolve()
					.then(() => {
						if (!localBranch || !localBranch.isBranch()) {
							log.info('Local branch unknown')
							return repo.fetch('origin', remoteCallbacks)
								.catch((error) => {
									log.info('Unable to fetch')
									return repo.getRemote('origin')
										.then((remote) => remote.url())
										.then((url) => {
											if (url.startsWith('http') && this.lastProblems.usernamePassword !== url) {
												this.lastProblems.usernamePassword = url
												notify('Nepodařilo se stáhnout projekt', 'zkuste zkontrolovat přístupové údaje', () => {
													redirectWithReload('/project')
												})
											}
										})
									throw error
								})
								.then(() => repo.getBranchCommit('origin/master'))
								.then((commit) => {
									if (commit) {
										return repo.createBranch('master', commit, true)
											.then(() => repo.checkoutBranch('master'))
											.then(() => nodegit.Reset(repo, commit, nodegit.Reset.TYPE.HARD))
									}
								})
						} else if (!remoteName) {
							log.info('Remote unknown')
							return exec(`cd ${this.props.projects.active.path} && git branch --set-upstream-to=origin/master`)
								.catch((out) => {
									log.info(out)

									log.info('Pushing maybe the first commit')
									return exec(`cd ${this.props.projects.active.path} && git push -u origin master`)
								})
						} else {
							throw error
						}
					})
					.catch((error) => {
						log.error(error)
					})
					.then(() => {
						this.props.actions.loading.DecrementLoadingJobs()
					})
			})
			.then(() => this.refreshCanCommit(repo, localTopCommit))
			.catch((error) => {
				log.error(error)
			})
			.then(() => {
				setTimeout(() => {
					this.check()
				}, CHECK_INTERVAL)
			})
	}

	render() {
		return null
	}
}

function mapStateToProps(state) {
	return {
		integrator: state.integrator,
		loading: state.loading,
		projects: state.projects,
		settings: state.settings,
	}
}

function mapDispatchToProps(dispatch) {
	return {
		actions: {
			integrator: bindActionCreators(IntegratorActions, dispatch),
			menu: bindActionCreators(MenuActions, dispatch),
			projects: bindActionCreators(ProjectsActions, dispatch),
			loading: bindActionCreators(LoadingActions, dispatch),
		}
	}
}

module.exports = connect(mapStateToProps, mapDispatchToProps)(Watcher)


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using SJP.Schematic.Core;
using SJP.Schematic.Core.Extensions;
using SJP.Schematic.Core.Utilities;

namespace SJP.Schematic.Lint.Rules;

/// <summary>
/// A linting rule which reports when a set of foreign key relationships forms a cycle.
/// </summary>
/// <seealso cref="Rule"/>
/// <seealso cref="ITableRule"/>
public class ForeignKeyRelationshipCycleRule : Rule, ITableRule
{
    /// <summary>
    /// Initializes a new instance of the <see cref="ForeignKeyRelationshipCycleRule"/> class.
    /// </summary>
    /// <param name="level">The reporting level.</param>
    public ForeignKeyRelationshipCycleRule(RuleLevel level)
        : base(RuleId, RuleTitle, level)
    {
    }

    /// <summary>
    /// Analyses database tables. Reports messages when a set of foreign key relationships forms a cycle.
    /// </summary>
    /// <param name="tables">A set of database tables.</param>
    /// <param name="cancellationToken">A cancellation token used to interrupt analysis.</param>
    /// <returns>A set of linting messages used for reporting. An empty set indicates no issues discovered.</returns>
    /// <exception cref="ArgumentNullException"><paramref name="tables"/> is <c>null</c>.</exception>
    public IAsyncEnumerable<IRuleMessage> AnalyseTables(IEnumerable<IRelationalDatabaseTable> tables, CancellationToken cancellationToken = default)
    {
        ArgumentNullException.ThrowIfNull(tables);

        var cycleDetector = new CycleDetector();
        var cycles = cycleDetector.GetCyclePaths(tables.ToList());

        return cycles.Select(BuildMessage).ToAsyncEnumerable();
    }

    /// <summary>
    /// Builds the message used for reporting.
    /// </summary>
    /// <param name="cyclePath">A collection of table names that form a cycle.</param>
    /// <returns>A formatted linting message.</returns>
    /// <exception cref="ArgumentNullException"><paramref name="cyclePath"/> is <c>null</c>.</exception>
    protected virtual IRuleMessage BuildMessage(IReadOnlyCollection<Identifier> cyclePath)
    {
        ArgumentNullException.ThrowIfNull(cyclePath);

        var tableNames = cyclePath
            .Select(name => Identifier.CreateQualifiedIdentifier(name.Schema, name.LocalName).ToString())
            .Join(" -> ");
        var message = "Cycle found for the following path: " + tableNames;

        return new RuleMessage(RuleId, RuleTitle, Level, message);
    }

    /// <summary>
    /// The rule identifier.
    /// </summary>
    /// <value>A rule identifier.</value>
    protected static string RuleId { get; } = "SCHEMATIC0009";

    /// <summary>
    /// Gets the rule title.
    /// </summary>
    /// <value>The rule title.</value>
    protected static string RuleTitle { get; } = "Foreign key relationships contain a cycle.";
}


text:
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <packaging>pom</packaging>

    <artifactId>distributed-topic</artifactId>
    <name>Distributed Topic</name>
    <groupId>com.hazelcast.samples.topic</groupId>
    <description>
        All the code samples for the distributed topic chapter
    </description>

    <parent>
        <groupId>com.hazelcast.samples</groupId>
        <artifactId>code-samples</artifactId>
        <version>0.1-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <modules>
        <module>basic-pub-sub</module>
        <module>scaling</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast-all</artifactId>
            <version>${hazelcast.version}</version>
        </dependency>
    </dependencies>
</project>


text:
<?php

use Eloquent\Phony\Test\Phony;

// setup
$stub = Phony::stub(
    function () {
        return 'aardvark';
    }
)->setLabel('label')->forwards();
$stub();
$stub();

// verification
$stub->lastCall()->never()->responded();


text:
<?xml version="1.0" encoding="utf-8" ?>

<collections>
  <collection>
    <name>Cure/inflict light wounds</name>
    <entry>1</entry>
  </collection>
  <collection>
    <name>Shatter</name>
    <entry>2</entry>
  </collection>
  <collection>
    <name>Contagion</name>
    <entry>3</entry>
  </collection>
  <collection>
    <name>Cure/inflict critical wounds</name>
    <entry>4</entry>
  </collection>
  <collection>
    <name>Mass cure/inflict light wounds</name>
    <entry>5</entry>
  </collection>
  <collection>
    <name>Heal/Harm</name>
    <entry>6</entry>
  </collection>
  <collection>
    <name>Disintegrate</name>
    <entry>7</entry>
  </collection>
  <collection>
    <name>Earthquake</name>
    <entry>8</entry>
  </collection>
  <collection>
    <name>Implosion</name>
    <entry>9</entry>
  </collection>
</collections>


text:
<?php

namespace Ben\AssociationBundle\Controller;

use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use JMS\SecurityExtraBundle\Annotation\Secure;

use Ben\AssociationBundle\Entity\config;
use Ben\AssociationBundle\Form\configType;

/**
 * config controller.
 *
 */
class configController extends Controller
{
    /**
     * Lists all config entities.
     * @Secure(roles="ROLE_MANAGER")
     *
     */
    public function indexAction()
    {
        $em = $this->getDoctrine()->getManager();

        $entities = $em->getRepository('BenAssociationBundle:config')->findAll();
        $config=[];

        foreach ($entities as $entity) {
           $config[$entity->getTheKey()] = $entity->getTheValue();
        }
        $img = new \Ben\AssociationBundle\Entity\image();
        $imgform   = $this->createForm(new \Ben\AssociationBundle\Form\imageType(), $img);

        return $this->render('BenAssociationBundle:config:index.html.twig', array(
            'config' => $config,
            'imgform' => $imgform->createView()
        ));
    }

    /**
     * update all config entities.
     * @Secure(roles="ROLE_MANAGER")
     *
     */
    public function updateAction(Request $request)
    {
        $em = $this->getDoctrine()->getManager();
        $config = $request->get('config');

        /* handle img */
        $img = new \Ben\AssociationBundle\Entity\image();
        $imgform   = $this->createForm(new \Ben\AssociationBundle\Form\imageType(), $img);
        $imgform->bind($request);
        if($img->upload())
            $config['org_logo'] = $img->getWebPath();

        $config['org_signup'] = isset($config['org_signup']);
        $config['print_permission'] = isset($config['print_permission']);
        $config['allowaccess'] = isset($config['allowaccess']);
        foreach ($config as $key => $value) {
            $em->getRepository('BenAssociationBundle:config')->updateBy($key, $value);
        }

        $this->get('session')->getFlashBag()->add('success', "ben.flash.success.updated");
        return $this->redirect($this->generateUrl('config'));
    }

    /**
     * update all config entities.
     * @Secure(roles="ROLE_MANAGER")
     *
     */
    public function updateLangAction(Request $request)
    {
        $em = $this->getDoctrine()->getManager();
        $locale = $request->get('_locale');
        $this->get('session')->set('_locale', $locale);

        $em->getRepository('BenAssociationBundle:config')->updateBy('org_lang', $locale);

        $this->get('session')->getFlashBag()->add('success', "ben.flash.success.updated");
        return $this->redirect($this->generateUrl('fos_user_profile_edit'));
    }
    /**
     * update all fields entities.
     * @Secure(roles="ROLE_MANAGER")
     *
     */
    public function updateFiledsAction(Request $request)
    {
        $em = $this->getDoctrine()->getManager();

        if($request->getMethod() === 'POST'){
            $config = $request->get('config');
            foreach ($config as $cfg) {
                $em->getRepository('BenAssociationBundle:Fields')->updateFields($cfg);
            }
        }

        return $this->render('BenAssociationBundle:config:fields.html.twig');
    }
}


text:
from setuptools import setup, find_packages

setup(name='tweet_parser',
      description="Tools for Tweet parsing",
      url='https://github.com/twitterdev/tweet_parser',
      author='Fiona Pigott, Jeff Kolb, Josh Montague, Aaron Gonzales',
      long_description=open('README.rst', 'r').read(),
      author_email='fpigott@twitter.com',
      license='MIT',
      version='1.13.2',
      packages=find_packages(),
      scripts=["tools/parse_tweets.py"],
      install_requires=[],
     )


text:
"""This module assists in running complex workflows on BEL graphs."""

from . import decorators, exc, pipeline
from .decorators import *
from .exc import *
from .pipeline import *

__all__ = [k for k in locals() if not k.startswith("_")]


text:
use strict;

system("/bin/bash");
exit 0;


text:
/**
 * @brief Workqueue Tests
 * @defgroup kernel_workqueue_tests Workqueue
 * @ingroup all_tests
 * @{
 * @}
 */

#include <ztest.h>
#include <irq_offload.h>

#define TIMEOUT 100
#define STACK_SIZE (512 + CONFIG_TEST_EXTRA_STACKSIZE)
#define NUM_OF_WORK 2

static K_THREAD_STACK_DEFINE(tstack, STACK_SIZE);
static K_THREAD_STACK_DEFINE(user_tstack, STACK_SIZE);
static struct k_work_q workq;
static struct k_work_q user_workq;
static ZTEST_BMEM struct k_work work[NUM_OF_WORK];
static struct k_delayed_work new_work;
static struct k_delayed_work delayed_work[NUM_OF_WORK], delayed_work_sleepy;
static struct k_sem sync_sema;
static struct k_sem dummy_sema;
static struct k_thread *main_thread;

static void work_sleepy(struct k_work *w)
{
	k_sleep(TIMEOUT);
	k_sem_give(&sync_sema);
}

static void work_handler(struct k_work *w)
{
	/* Just to show an API call on this will succeed */
	k_sem_init(&dummy_sema, 0, 1);

	k_sem_give(&sync_sema);
}

static void new_work_handler(struct k_work *w)
{
	k_sem_give(&sync_sema);
}

static void twork_submit(void *data)
{
	struct k_work_q *work_q = (struct k_work_q *)data;

	for (int i = 0; i < NUM_OF_WORK; i++) {
		/**TESTPOINT: init via k_work_init*/
		k_work_init(&work[i], work_handler);
		/**TESTPOINT: check pending after work init*/
		zassert_false(k_work_pending(&work[i]), NULL);
		if (work_q) {
			/**TESTPOINT: work submit to queue*/
			zassert_false(k_work_submit_to_user_queue(work_q, &work[i]),
				      "failed to submit to queue");
		} else {
			/**TESTPOINT: work submit to system queue*/
			k_work_submit(&work[i]);
		}
	}
}

static void twork_submit_multipleq(void *data)
{
	struct k_work_q *work_q = (struct k_work_q *)data;

	/**TESTPOINT: init via k_work_init*/
	k_delayed_work_init(&new_work, new_work_handler);

	k_delayed_work_submit_to_queue(work_q, &new_work, TIMEOUT);

	zassert_equal(k_delayed_work_submit(&new_work, TIMEOUT),
		      -EADDRINUSE, NULL);

	k_sem_give(&sync_sema);
}

static void twork_resubmit(void *data)
{
	struct k_work_q *work_q = (struct k_work_q *)data;

	/**TESTPOINT: init via k_work_init*/
	k_delayed_work_init(&new_work, new_work_handler);

	k_delayed_work_submit_to_queue(work_q, &new_work, 0);

	/* This is done to test a neagtive case when k_delayed_work_cancel()
	 * fails in k_delayed_work_submit_to_queue API. Removing work from it
	 * queue make sure that k_delayed_work_cancel() fails when the Work is
	 * resubmitted.
	 */
	k_queue_remove(&(new_work.work_q->queue), &(new_work.work));

	zassert_equal(k_delayed_work_submit_to_queue(work_q, &new_work, 0),
		      -EINVAL, NULL);

	k_sem_give(&sync_sema);
}

static void tdelayed_work_submit(void *data)
{
	struct k_work_q *work_q = (struct k_work_q *)data;

	for (int i = 0; i < NUM_OF_WORK; i++) {
		/**TESTPOINT: init via k_delayed_work_init*/
		k_delayed_work_init(&delayed_work[i], work_handler);
		/**TESTPOINT: check pending after delayed work init*/
		zassert_false(k_work_pending((struct k_work *)&delayed_work[i]),
			      NULL);
		/**TESTPOINT: check remaining timeout before submit*/
		zassert_equal(k_delayed_work_remaining_get(&delayed_work[i]), 0,
			      NULL);
		if (work_q) {
			/**TESTPOINT: delayed work submit to queue*/
			zassert_true(k_delayed_work_submit_to_queue(work_q,
								    &delayed_work[i], TIMEOUT) == 0, NULL);
		} else {
			/**TESTPOINT: delayed work submit to system queue*/
			zassert_true(k_delayed_work_submit(&delayed_work[i],
							   TIMEOUT) == 0, NULL);
		}
		/**TESTPOINT: check remaining timeout after submit*/
		zassert_true(k_delayed_work_remaining_get(&delayed_work[i]) >=
			     TIMEOUT, NULL);
		/**TESTPOINT: check pending after delayed work submit*/
		zassert_true(k_work_pending((struct k_work *)&delayed_work[i])
			     == 0, NULL);
	}
}

static void tdelayed_work_cancel(void *data)
{
	struct k_work_q *work_q = (struct k_work_q *)data;
	int ret;

	k_delayed_work_init(&delayed_work_sleepy, work_sleepy);
	k_delayed_work_init(&delayed_work[0], work_handler);
	k_delayed_work_init(&delayed_work[1], work_handler);

	if (work_q) {
		ret = k_delayed_work_submit_to_queue(work_q,
						     &delayed_work_sleepy, TIMEOUT);
		ret |= k_delayed_work_submit_to_queue(work_q, &delayed_work[0],
						      TIMEOUT);
		ret |= k_delayed_work_submit_to_queue(work_q, &delayed_work[1],
						      TIMEOUT);
	} else {
		ret = k_delayed_work_submit(&delayed_work_sleepy, TIMEOUT);
		ret |= k_delayed_work_submit(&delayed_work[0], TIMEOUT);
		ret |= k_delayed_work_submit(&delayed_work[1], TIMEOUT);
	}
	/*
	 * t0: delayed submit three work items, all with delay=TIMEOUT
	 * >t0: cancel delayed_work[0], expected cancellation success
	 * >t0+TIMEOUT: handling delayed_work_sleepy, which do k_sleep TIMEOUT
	 *              pending delayed_work[1], check pending flag, expected 1
	 *              cancel delayed_work[1], expected 0
	 * >t0+2*TIMEOUT: delayed_work_sleepy completed
	 *                delayed_work[1] completed
	 *                cancel delayed_work_sleepy, expected 0
	 */
	zassert_true(ret == 0, NULL);
	/**TESTPOINT: delayed work cancel when countdown*/
	ret = k_delayed_work_cancel(&delayed_work[0]);
	zassert_true(ret == 0, NULL);
	/**TESTPOINT: check pending after delayed work cancel*/
	zassert_false(k_work_pending((struct k_work *)&delayed_work[0]), NULL);
	if (!k_is_in_isr()) {
		/*wait for handling work_sleepy*/
		k_sleep(TIMEOUT);
		/**TESTPOINT: check pending when work pending*/
		zassert_true(k_work_pending((struct k_work *)&delayed_work[1]),
			     NULL);
		/**TESTPOINT: delayed work cancel when pending*/
		ret = k_delayed_work_cancel(&delayed_work[1]);
		zassert_equal(ret, 0, NULL);
		k_sem_give(&sync_sema);
		/*wait for completed work_sleepy and delayed_work[1]*/
		k_sleep(TIMEOUT);
		/**TESTPOINT: check pending when work completed*/
		zassert_false(k_work_pending(
				      (struct k_work *)&delayed_work_sleepy), NULL);
		/**TESTPOINT: delayed work cancel when completed*/
		ret = k_delayed_work_cancel(&delayed_work_sleepy);
		zassert_equal(ret, 0, NULL);
	}
	/*work items not cancelled: delayed_work[1], delayed_work_sleepy*/
}

/*test cases*/
/**
 * @brief Test work queue start before submit
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_work_q_start()
 */
void test_workq_start_before_submit(void)
{
	k_work_q_start(&workq, tstack, STACK_SIZE,
		       CONFIG_MAIN_THREAD_PRIORITY);
}

/**
 * @brief Test user mode work queue start before submit
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_work_q_user_start()
 */
void test_user_workq_start_before_submit(void)
{
	k_work_q_user_start(&user_workq, user_tstack, STACK_SIZE,
			    CONFIG_MAIN_THREAD_PRIORITY);
}

/**
 * @brief Setup object permissions before test_user_workq_granted_access()
 *
 * @ingroup kernel_workqueue_tests
 */
void test_user_workq_granted_access_setup(void)
{
	/* Subsequent test cases will have access to the dummy_sema,
	 * but not the user workqueue since it already started.
	 */
	k_object_access_grant(&dummy_sema, main_thread);
}

/**
 * @brief Test user mode grant workqueue permissions
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_work_q_object_access_grant()
 */
void test_user_workq_granted_access(void)
{
	k_object_access_grant(&dummy_sema, &user_workq.thread);
}

/**
 * @brief Test work submission to work queue
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_work_init(), k_work_pending(), k_work_submit_to_queue(),
 * k_work_submit()
 */
void test_work_submit_to_queue_thread(void)
{
	k_sem_reset(&sync_sema);
	twork_submit(&workq);
	for (int i = 0; i < NUM_OF_WORK; i++) {
		k_sem_take(&sync_sema, K_FOREVER);
	}
}

/**
 * @brief Test work submission to work queue (user mode)
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_work_init(), k_work_pending(), k_work_submit_to_queue(),
 * k_work_submit()
 */
void test_user_work_submit_to_queue_thread(void)
{
	k_sem_reset(&sync_sema);
	twork_submit(&user_workq);
	for (int i = 0; i < NUM_OF_WORK; i++) {
		k_sem_take(&sync_sema, K_FOREVER);
	}
}

/**
 * @brief Test submission of work to multiple queues
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_delayed_work_init(), k_delayed_work_submit_to_queue(),
 * k_delayed_work_submit()
 */
void test_work_submit_to_multipleq(void)
{
	k_sem_reset(&sync_sema);
	twork_submit_multipleq(&workq);
	for (int i = 0; i < NUM_OF_WORK; i++) {
		k_sem_take(&sync_sema, K_FOREVER);
	}
}

/**
 * @brief Test work queue resubmission
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_queue_remove(), k_delayed_work_init(),
 * k_delayed_work_submit_to_queue()
 */
void test_work_resubmit_to_queue(void)
{
	k_sem_reset(&sync_sema);
	twork_resubmit(&workq);
	k_sem_take(&sync_sema, K_FOREVER);
}

/**
 * @brief Test work submission to queue from ISR context
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_work_init(), k_work_pending(), k_work_submit_to_queue(), k_work_submit()
 */
void test_work_submit_to_queue_isr(void)
{
	k_sem_reset(&sync_sema);
	irq_offload(twork_submit, (void *)&workq);
	for (int i = 0; i < NUM_OF_WORK; i++) {
		k_sem_take(&sync_sema, K_FOREVER);
	}
}

/**
 * @brief Test work submission to queue
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_work_init(), k_work_pending(), k_work_submit_to_queue(), k_work_submit()
 */
void test_work_submit_thread(void)
{
	k_sem_reset(&sync_sema);
	twork_submit(NULL);
	for (int i = 0; i < NUM_OF_WORK; i++) {
		k_sem_take(&sync_sema, K_FOREVER);
	}
}

/**
 * @brief Test work submission from ISR context
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_work_init(), k_work_pending(), k_work_submit_to_queue(), k_work_submit()
 */
void test_work_submit_isr(void)
{
	k_sem_reset(&sync_sema);
	irq_offload(twork_submit, NULL);
	for (int i = 0; i < NUM_OF_WORK; i++) {
		k_sem_take(&sync_sema, K_FOREVER);
	}
}

/**
 * @brief Test delayed work submission to queue
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_delayed_work_init(), k_work_pending(),
 * k_delayed_work_remaining_get(), k_delayed_work_submit_to_queue(),
 * k_delayed_work_submit()
 */
void test_delayed_work_submit_to_queue_thread(void)
{
	k_sem_reset(&sync_sema);
	tdelayed_work_submit(&workq);
	for (int i = 0; i < NUM_OF_WORK; i++) {
		k_sem_take(&sync_sema, K_FOREVER);
	}
}

/**
 * @brief Test delayed work submission to queue in ISR context
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_delayed_work_init(), k_work_pending(),
 * k_delayed_work_remaining_get(), k_delayed_work_submit_to_queue(),
 * k_delayed_work_submit()
 */
void test_delayed_work_submit_to_queue_isr(void)
{
	k_sem_reset(&sync_sema);
	irq_offload(tdelayed_work_submit, (void *)&workq);
	for (int i = 0; i < NUM_OF_WORK; i++) {
		k_sem_take(&sync_sema, K_FOREVER);
	}
}

/**
 * @brief Test delayed work submission
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_delayed_work_init(), k_work_pending(),
 * k_delayed_work_remaining_get(), k_delayed_work_submit_to_queue(),
 * k_delayed_work_submit()
 */
void test_delayed_work_submit_thread(void)
{
	k_sem_reset(&sync_sema);
	tdelayed_work_submit(NULL);
	for (int i = 0; i < NUM_OF_WORK; i++) {
		k_sem_take(&sync_sema, K_FOREVER);
	}
}

/**
 * @brief Test delayed work submission from ISR context
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_delayed_work_init(), k_work_pending(),
 * k_delayed_work_remaining_get(), k_delayed_work_submit_to_queue(),
 * k_delayed_work_submit()
 */
void test_delayed_work_submit_isr(void)
{
	k_sem_reset(&sync_sema);
	irq_offload(tdelayed_work_submit, NULL);
	for (int i = 0; i < NUM_OF_WORK; i++) {
		k_sem_take(&sync_sema, K_FOREVER);
	}
}

/**
 * @brief Test delayed work cancel from work queue
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_delayed_work_cancel(), k_work_pending()
 */
void test_delayed_work_cancel_from_queue_thread(void)
{
	k_sem_reset(&sync_sema);
	tdelayed_work_cancel(&workq);
	/*wait for work items that could not be cancelled*/
	for (int i = 0; i < NUM_OF_WORK; i++) {
		k_sem_take(&sync_sema, K_FOREVER);
	}
}

/**
 * @brief Test delayed work cancel from work queue from ISR context
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_delayed_work_cancel(), k_work_pending()
 */
void test_delayed_work_cancel_from_queue_isr(void)
{
	k_sem_reset(&sync_sema);
	irq_offload(tdelayed_work_cancel, &workq);
	/*wait for work items that could not be cancelled*/
	for (int i = 0; i < NUM_OF_WORK; i++) {
		k_sem_take(&sync_sema, K_FOREVER);
	}
}

/**
 * @brief Test delayed work cancel
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_delayed_work_cancel(), k_work_pending()
 */
void test_delayed_work_cancel_thread(void)
{
	k_sem_reset(&sync_sema);
	tdelayed_work_cancel(NULL);
	/*wait for work items that could not be cancelled*/
	for (int i = 0; i < NUM_OF_WORK; i++) {
		k_sem_take(&sync_sema, K_FOREVER);
	}
}

/**
 * @brief Test delayed work cancel from ISR context
 *
 * @ingroup kernel_workqueue_tests
 *
 * @see k_delayed_work_cancel(), k_work_pending()
 */
void test_delayed_work_cancel_isr(void)
{
	k_sem_reset(&sync_sema);
	irq_offload(tdelayed_work_cancel, NULL);
	/*wait for work items that could not be cancelled*/
	for (int i = 0; i < NUM_OF_WORK; i++) {
		k_sem_take(&sync_sema, K_FOREVER);
	}
}

void test_main(void)
{
	main_thread = k_current_get();
	k_thread_access_grant(main_thread, &sync_sema, &user_workq.thread,
			      &user_workq.queue,
			      &user_tstack);
	k_sem_init(&sync_sema, 0, NUM_OF_WORK);
	k_thread_system_pool_assign(k_current_get());

	ztest_test_suite(workqueue_api,
			 /* Do not disturb the ordering of these test cases */
			 ztest_unit_test(test_workq_start_before_submit),
			 ztest_user_unit_test(test_user_workq_start_before_submit),
			 ztest_unit_test(test_user_workq_granted_access_setup),
			 ztest_user_unit_test(test_user_workq_granted_access),
			 /* End order-important tests */

			 ztest_unit_test(test_work_submit_to_multipleq),
			 ztest_unit_test(test_work_resubmit_to_queue),
			 ztest_unit_test(test_work_submit_to_queue_thread),
			 ztest_unit_test(test_work_submit_to_queue_isr),
			 ztest_unit_test(test_work_submit_thread),
			 ztest_unit_test(test_work_submit_isr),
			 ztest_user_unit_test(test_user_work_submit_to_queue_thread),
			 ztest_unit_test(test_delayed_work_submit_to_queue_thread),
			 ztest_unit_test(test_delayed_work_submit_to_queue_isr),
			 ztest_unit_test(test_delayed_work_submit_thread),
			 ztest_unit_test(test_delayed_work_submit_isr),
			 ztest_unit_test(test_delayed_work_cancel_from_queue_thread),
			 ztest_unit_test(test_delayed_work_cancel_from_queue_isr),
			 ztest_unit_test(test_delayed_work_cancel_thread),
			 ztest_unit_test(test_delayed_work_cancel_isr));
	ztest_run_test_suite(workqueue_api);
}


text:
package io.pivotal.arca.dispatcher;

import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;

import io.pivotal.arca.utils.ArrayUtils;
import io.pivotal.arca.utils.StringUtils;

public class Delete extends Request<Integer> {

	private String mWhereClause;
	private String[] mWhereArgs;

	public Delete(final Uri uri) {
		super(uri);
	}

	public Delete(final Parcel in) {
		super(in);
		mWhereClause = in.readString();
		mWhereArgs = in.createStringArray();
	}

	@Override
	public void writeToParcel(final Parcel dest, final int flags) {
		super.writeToParcel(dest, flags);
		dest.writeString(mWhereClause);
		dest.writeStringArray(mWhereArgs);
	}

	public void setWhere(final String whereClause, final String... whereArgs) {
		mWhereClause = whereClause;
		mWhereArgs = whereArgs;
	}

	public void addWhere(final String whereClause, final String... whereArgs) {
		mWhereClause = StringUtils.append(mWhereClause, whereClause, " AND ");
		mWhereArgs = ArrayUtils.append(mWhereArgs, whereArgs);
	}

	public String getWhereClause() {
		return mWhereClause;
	}

	public String[] getWhereArgs() {
		return mWhereArgs;
	}

	public static final Parcelable.Creator<Delete> CREATOR = new Parcelable.Creator<Delete>() {
		@Override
		public Delete createFromParcel(final Parcel in) {
			return new Delete(in);
		}

		@Override
		public Delete[] newArray(final int size) {
			return new Delete[size];
		}
	};

}


text:
"""Mimic pyquick exercise -- ejercicio extra opcional.
Google's Python Class

Leer el archivo especificado en la línea de comandos.
Haz un split() simple en los espacios en blanco para
obtener todas las palabras en el archivo.
En vez de leer el archivo línea por línea, es más fácil leerlo
en una cadena gigante y dividirlo 1 vez.

Construye un diccionario "mimic" que mapee cada palabra que
aparece en el archivo a una lista de todas las palabras que siguen
inmediatamente a esa palabra en el archivo.
La lista de palabras puede estar en cualquier orden y debería
incluir duplicados. Así por ejemplo la llave "and" puede tener
la lista ["then", "best", "then", "after", ...] listando todas
las palabras que vienen después de "and" en el texto.
diremos que la cadena vacía es lo que viene antes de
la primer palabra en el archivo.

Con el diccionario mimic, es muy fácil emitir texto aleatorio
que imita al original. Imprime una palabra, y luego mira qué
palabras pueden venir luego y elige una al azar como la
próxima palabra, y funcionará.
Utiliza una cadena vacía como la primer palabra para alivianar
las cosas. Si nos quedamos trabados con una palabra que no está
en el diccionario, volvemos a la cadena vacía para que las
cosas se muevan.

Nota: el módulo estandar de python 'random' incluye un método
random.choice(lista) que elige un elemento aleatorio de
una lista no-vacía.

Para divertirnos, alimenta tu programa a sí mismo como entrada.
Puede funcionar mejor poner saltos de línea cada 70 columnas,
así la salida se ve mejor.

"""

import random
import sys

def mimic_dict(filename):
    """Retorna un diccionario mimic mapeando cada palabra a la lista de palabras que le siguen."""
    # +++tu código aquí+++
    return

def print_mimic(mimic_dict, word):
    """ Diccionario mimic dado y una palabra inicial, imprimir 200 palabras aleatorias."""
    # +++tu código aquí+++
    return

# main() provisto, llama a mimic_dict() y mimic()
def main():
    if len(sys.argv) != 2:
        print 'uso: ./mimic.py archivo-a-leer'
        sys.exit(1)

    dict = mimic_dict(sys.argv[1])
    print_mimic(dict, '')

if __name__ == '__main__':
    main()


text:
require "helper"

describe Google::Cloud::Pubsub::Topic, :subscribe, :mock_pubsub do
  let(:topic_name) { "topic-name-goes-here" }
  let(:topic) { Google::Cloud::Pubsub::Topic.from_grpc Google::Pubsub::V1::Topic.decode_json(topic_json(topic_name)),
                                                pubsub.service }
  let(:new_sub_name) { "new-sub-#{Time.now.to_i}" }

  it "creates a subscription when calling subscribe" do
    create_res = Google::Pubsub::V1::Subscription.decode_json subscription_json(topic_name, new_sub_name)
    mock = Minitest::Mock.new
    mock.expect :create_subscription, create_res, [subscription_path(new_sub_name), topic_path(topic_name), push_config: nil, ack_deadline_seconds: nil, retain_acked_messages: false, message_retention_duration: nil, options: default_options]
    topic.service.mocked_subscriber = mock

    sub = topic.subscribe new_sub_name

    mock.verify

    sub.must_be_kind_of Google::Cloud::Pubsub::Subscription
    sub.name.must_equal "projects/#{project}/subscriptions/#{new_sub_name}"
  end

  describe "lazy topic that exists" do
    let(:topic) { Google::Cloud::Pubsub::Topic.new_lazy topic_name,
                                                 pubsub.service,
                                                 autocreate: false }

    it "creates a subscription when calling subscribe" do
      create_res = Google::Pubsub::V1::Subscription.decode_json subscription_json(topic_name, new_sub_name)
      mock = Minitest::Mock.new
      mock.expect :create_subscription, create_res, [subscription_path(new_sub_name), topic_path(topic_name), push_config: nil, ack_deadline_seconds: nil, retain_acked_messages: false, message_retention_duration: nil, options: default_options]
      topic.service.mocked_subscriber = mock

      sub = topic.subscribe new_sub_name

      mock.verify

      sub.must_be_kind_of Google::Cloud::Pubsub::Subscription
      sub.name.must_equal "projects/#{project}/subscriptions/#{new_sub_name}"
    end
  end

  describe "lazy topic that does not exist" do
    let(:topic) { Google::Cloud::Pubsub::Topic.new_lazy topic_name,
                                                 pubsub.service,
                                                 autocreate: false }

    it "raises NotFoundError when calling subscribe" do
      stub = Object.new
      def stub.create_subscription *args
        gax_error = Google::Gax::GaxError.new "not found"
        gax_error.instance_variable_set :@cause, GRPC::BadStatus.new(5, "not found")
        raise gax_error
      end
      topic.service.mocked_subscriber = stub

      expect do
        topic.subscribe new_sub_name
      end.must_raise Google::Cloud::NotFoundError
    end
  end
end


text:
import urllib
import urlparse

from config import constants

def absurl(relative_url):
    protocol = 'https' if constants.HTTPS else 'http'
    return '%s://%s%s' % (protocol, constants.HOST, relative_url)

def append_params(url, params):
    parsed = urlparse.urlparse(url)
    parsed_params = urlparse.parse_qs(parsed.query)
    for name, value in params.iteritems():
        param_list = parsed_params.get(name)
        if param_list is None:
            param_list = parsed_params[name] = []
        param_list.append(value)
    new_parsed = list(parsed)
    new_parsed[4] = urllib.urlencode(parsed_params, doseq=True)
    return urlparse.urlunparse(new_parsed)

def replace_params(url, params):
    parsed = urlparse.urlparse(url)
    parsed_params = urlparse.parse_qs(parsed.query)
    for name, value in params.iteritems():
        parsed_params[name] = [value]
    new_parsed = list(parsed)
    new_parsed[4] = urllib.urlencode(parsed_params, doseq=True)
    return urlparse.urlunparse(new_parsed)


text:
//========= Copyright 2016, HTC Corporation. All rights reserved. ===========

using HTC.UnityPlugin.PoseTracker;
using HTC.UnityPlugin.Utility;
using System;
using UnityEngine;
using UnityEngine.Events;

namespace HTC.UnityPlugin.Vive
{
    [RequireComponent(typeof(Rigidbody))]
    [AddComponentMenu("HTC/Vive/Vive Rigid Pose Tracker")]
    public class ViveRigidPoseTracker : VivePoseTracker
    {
        public const float MIN_FOLLOWING_DURATION = 0.02f;
        public const float DEFAULT_FOLLOWING_DURATION = 0.04f;
        public const float MAX_FOLLOWING_DURATION = 0.5f;

        private Rigidbody rigid;
        private Pose targetPose;

        [Range(MIN_FOLLOWING_DURATION, MAX_FOLLOWING_DURATION)]
        public float followingDuration = DEFAULT_FOLLOWING_DURATION;

        protected override void Start()
        {
            base.Start();
            rigid = GetComponent<Rigidbody>();
        }

        protected virtual void FixedUpdate()
        {
            if (isPoseValid)
            {
                // applying velocity
                var diffPos = targetPose.pos - rigid.position;
                if (Mathf.Approximately(diffPos.sqrMagnitude, 0f))
                {
                    rigid.velocity = Vector3.zero;
                }
                else
                {
                    rigid.velocity = diffPos / Mathf.Clamp(followingDuration, MIN_FOLLOWING_DURATION, MAX_FOLLOWING_DURATION);
                }

                // applying angular velocity
                float angle;
                Vector3 axis;
                (targetPose.rot * Quaternion.Inverse(rigid.rotation)).ToAngleAxis(out angle, out axis);
                while (angle > 360f) { angle -= 360f; }

                if (Mathf.Approximately(angle, 0f) || float.IsNaN(axis.x))
                {
                    rigid.angularVelocity = Vector3.zero;
                }
                else
                {
                    angle *= Mathf.Deg2Rad / Mathf.Clamp(followingDuration, MIN_FOLLOWING_DURATION, MAX_FOLLOWING_DURATION); // convert to radius speed
                    if (rigid.maxAngularVelocity < angle) { rigid.maxAngularVelocity = angle; }
                    rigid.angularVelocity = axis * angle;
                }
            }
        }

        public override void OnNewPoses()
        {
            targetPose = VivePose.GetPose(role) * new Pose(posOffset, Quaternion.Euler(rotOffset));
            ModifyPose(ref targetPose, origin);

            // transform to world space
            var o = origin != null ? origin : transform.parent;
            if (o != null)
            {
                targetPose = new Pose(o) * targetPose;
                targetPose.pos.Scale(o.localScale);
            }

            var poseValid = VivePose.IsValid(role);

            if (!isPoseValid && poseValid)
            {
                transform.position = targetPose.pos;
                transform.rotation = targetPose.rot;
            }

            SetIsValid(poseValid);
        }
    }
}


text:
import { SuiteModuleBuilder } from '../suite';
import { get, set } from 'ember-metal';

const suite = SuiteModuleBuilder.create();

suite.module('lastObject');

suite.test('returns last item in enumerable', function() {
  let obj = this.newObject();
  let ary = this.toArray(obj);

  equal(get(obj, 'lastObject'), ary[ary.length - 1]);
});

suite.test('returns undefined if enumerable is empty', function() {
  let obj = this.newObject([]);

  equal(get(obj, 'lastObject'), undefined);
});

suite.test('can not be set', function() {
  let obj = this.newObject();
  let ary = this.toArray(obj);

  equal(get(obj, 'lastObject'), ary[ary.length - 1]);

  throws(function() {
    set(obj, 'lastObject', 'foo!');
  }, /Cannot set read-only property "lastObject" on object/);
});

export default suite;


text:
package edu.towson.cis.cosc603.project2.monopoly;

// TODO: Auto-generated Javadoc
/**
 * The Class GameBoardJail.
 */
public class GameBoardJail extends GameBoard {

	/**
	 * Instantiates a new game board jail.
	 */
	public GameBoardJail() {
		super();
		PropertyCell blue1 = new PropertyCell();
		PropertyCell blue2 = new PropertyCell();
		PropertyCell blue3 = new PropertyCell();
		PropertyCell green1 = new PropertyCell();
		PropertyCell green2 = new PropertyCell();
		JailCell jail = new JailCell();
		GoToJailCell goToJail = new GoToJailCell();

		blue1.setName("Blue 1");
		blue2.setName("Blue 2");
		blue3.setName("Blue 3");
		green1.setName("Green 1");
		green2.setName("Green 2");

		blue1.setColorGroup("blue");
		blue2.setColorGroup("blue");
		blue3.setColorGroup("blue");
		green1.setColorGroup("green");
		green2.setColorGroup("green");

		blue1.setPrice(100);
		blue2.setPrice(100);
		blue3.setPrice(1450);
		green1.setPrice(200);
		green2.setPrice(240);

		blue1.setRent(10);
		blue2.setRent(10);
		blue3.setRent(10);
		green1.setRent(20);
		green2.setRent(20);

		blue1.setHousePrice(50);
		blue2.setHousePrice(50);
		blue3.setHousePrice(50);
		green1.setHousePrice(70);
		green2.setHousePrice(70);

		addCell(blue1);
		addCell(jail);
		addCell(blue2);
		addCell(blue3);
		addCell(green1);
		addCell(goToJail);
		addCell(green2);
	}
}


text:
public class DefaultsTest {
    private static int a;
    private static boolean b;
    private static Object c;

    private int x;
    private boolean y;
    private Object z;

    public static void main(String[] args) {
        new DefaultsTest();
        new DefaultsTest();
    }

    public DefaultsTest() {
        System.out.print("STATIC: ");
        System.out.print(a);
        System.out.print(", ");
        System.out.print(b);
        System.out.print(", ");
        System.out.println(c);

        System.out.print("INSTANCE: ");
        System.out.print(x);
        System.out.print(", ");
        System.out.print(y);
        System.out.print(", ");
        System.out.println(z);

        a = 1;
        b = true;
        c = new Object();

        x = 1;
        y = true;
        z = new Object();

        System.out.print("STATIC: ");
        System.out.print(a);
        System.out.print(", ");
        System.out.print(b);
        System.out.print(", ");
        System.out.println(c);

        System.out.print("INSTANCE: ");
        System.out.print(x);
        System.out.print(", ");
        System.out.print(y);
        System.out.print(", ");
        System.out.println(z);
    }
}


text:
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models

class Migration(SchemaMigration):

    def forwards(self, orm):
        # Adding model 'Nameserver'
        db.create_table('nameserver', (
            ('ttl', self.gf('django.db.models.fields.PositiveIntegerField')(default=3600, null=True, blank=True)),
            ('description', self.gf('django.db.models.fields.CharField')(max_length=1000, null=True, blank=True)),
            ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
            ('domain', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['domain.Domain'])),
            ('server', self.gf('django.db.models.fields.CharField')(max_length=255)),
            ('addr_glue', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='nameserver_set', null=True, to=orm['address_record.AddressRecord'])),
            ('intr_glue', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='intrnameserver_set', null=True, to=orm['static_intr.StaticInterface'])),
        ))
        db.send_create_signal('nameserver', ['Nameserver'])

        # Adding unique constraint on 'Nameserver', fields ['domain', 'server']
        db.create_unique('nameserver', ['domain_id', 'server'])

        # Adding M2M table for field views on 'Nameserver'
        db.create_table('nameserver_views', (
            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
            ('nameserver', models.ForeignKey(orm['nameserver.nameserver'], null=False)),
            ('view', models.ForeignKey(orm['view.view'], null=False))
        ))
        db.create_unique('nameserver_views', ['nameserver_id', 'view_id'])

    def backwards(self, orm):
        # Removing unique constraint on 'Nameserver', fields ['domain', 'server']
        db.delete_unique('nameserver', ['domain_id', 'server'])

        # Deleting model 'Nameserver'
        db.delete_table('nameserver')

        # Removing M2M table for field views on 'Nameserver'
        db.delete_table('nameserver_views')

    models = {
        'address_record.addressrecord': {
            'Meta': {'unique_together': "(('label', 'domain', 'fqdn', 'ip_upper', 'ip_lower', 'ip_type'),)", 'object_name': 'AddressRecord', 'db_table': "'address_record'"},
            'description': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}),
            'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['domain.Domain']"}),
            'fqdn': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'ip_lower': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'ip_str': ('django.db.models.fields.CharField', [], {'max_length': '39'}),
            'ip_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
            'ip_upper': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'label': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}),
            'ttl': ('django.db.models.fields.PositiveIntegerField', [], {'default': '3600', 'null': 'True', 'blank': 'True'}),
            'views': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['view.View']", 'symmetrical': 'False', 'blank': 'True'})
        },
        'domain.domain': {
            'Meta': {'object_name': 'Domain', 'db_table': "'domain'"},
            'delegated': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'dirty': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'is_reverse': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'master_domain': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['domain.Domain']", 'null': 'True', 'blank': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
            'purgeable': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'soa': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': "orm['soa.SOA']", 'null': 'True', 'blank': 'True'})
        },
        'nameserver.nameserver': {
            'Meta': {'unique_together': "(('domain', 'server'),)", 'object_name': 'Nameserver', 'db_table': "'nameserver'"},
            'addr_glue': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'nameserver_set'", 'null': 'True', 'to': "orm['address_record.AddressRecord']"}),
            'description': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}),
            'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['domain.Domain']"}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'intr_glue': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'intrnameserver_set'", 'null': 'True', 'to': "orm['static_intr.StaticInterface']"}),
            'server': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
            'ttl': ('django.db.models.fields.PositiveIntegerField', [], {'default': '3600', 'null': 'True', 'blank': 'True'}),
            'views': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['view.View']", 'symmetrical': 'False', 'blank': 'True'})
        },
        'soa.soa': {
            'Meta': {'unique_together': "(('primary', 'contact', 'description'),)", 'object_name': 'SOA', 'db_table': "'soa'"},
            'contact': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'description': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
            'dirty': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'expire': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1209600'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'minimum': ('django.db.models.fields.PositiveIntegerField', [], {'default': '180'}),
            'primary': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
            'refresh': ('django.db.models.fields.PositiveIntegerField', [], {'default': '180'}),
            'retry': ('django.db.models.fields.PositiveIntegerField', [], {'default': '86400'}),
            'serial': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1360538201'}),
            'ttl': ('django.db.models.fields.PositiveIntegerField', [], {'default': '3600', 'null': 'True', 'blank': 'True'})
        },
        'static_intr.staticinterface': {
            'Meta': {'unique_together': "(('ip_upper', 'ip_lower', 'label', 'domain', 'mac'),)", 'object_name': 'StaticInterface', 'db_table': "'static_interface'"},
            'description': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'null': 'True', 'blank': 'True'}),
            'dhcp_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            'dns_enabled': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
            'domain': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['domain.Domain']"}),
            'fqdn': ('django.db.models.fields.CharField', [], {'db_index': 'True', 'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'ip_lower': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'ip_str': ('django.db.models.fields.CharField', [], {'max_length': '39'}),
            'ip_type': ('django.db.models.fields.CharField', [], {'max_length': '1'}),
            'ip_upper': ('django.db.models.fields.BigIntegerField', [], {'null': 'True', 'blank': 'True'}),
            'label': ('django.db.models.fields.CharField', [], {'max_length': '63', 'null': 'True', 'blank': 'True'}),
            'mac': ('django.db.models.fields.CharField', [], {'max_length': '17'}),
            'reverse_domain': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'staticintrdomain_set'", 'null': 'True', 'to': "orm['domain.Domain']"}),
            'system': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['systems.System']", 'null': 'True', 'blank': 'True'}),
            'ttl': ('django.db.models.fields.PositiveIntegerField', [], {'default': '3600', 'null': 'True', 'blank': 'True'}),
            'views': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['view.View']", 'symmetrical': 'False', 'blank': 'True'})
        },
        'systems.allocation': {
            'Meta': {'ordering': "['name']", 'object_name': 'Allocation', 'db_table': "u'allocations'"},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
        },
        'systems.location': {
            'Meta': {'ordering': "['name']", 'object_name': 'Location', 'db_table': "u'locations'"},
            'address': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'blank': 'True'}),
            'note': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
        },
        'systems.operatingsystem': {
            'Meta': {'ordering': "['name', 'version']", 'object_name': 'OperatingSystem', 'db_table': "u'operating_systems'"},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'version': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
        },
        'systems.servermodel': {
            'Meta': {'ordering': "['vendor', 'model']", 'object_name': 'ServerModel', 'db_table': "u'server_models'"},
            'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'model': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'part_number': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'vendor': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
        },
        'systems.system': {
            'Meta': {'object_name': 'System', 'db_table': "u'systems'"},
            'allocation': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['systems.Allocation']", 'null': 'True', 'blank': 'True'}),
            'asset_tag': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'change_password': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
            'created_on': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
            'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'is_dhcp_server': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
            'is_dns_server': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
            'is_nagios_server': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
            'is_puppet_server': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
            'is_switch': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
            'licenses': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'notes': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
            'oob_ip': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
            'oob_switch_port': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'operating_system': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['systems.OperatingSystem']", 'null': 'True', 'blank': 'True'}),
            'patch_panel_port': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'purchase_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
            'purchase_price': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'rack_order': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2', 'blank': 'True'}),
            'ram': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'serial': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'server_model': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['systems.ServerModel']", 'null': 'True', 'blank': 'True'}),
            'switch_ports': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
            'system_rack': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['systems.SystemRack']", 'null': 'True', 'blank': 'True'}),
            'system_status': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['systems.SystemStatus']", 'null': 'True', 'blank': 'True'}),
            'updated_on': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})
        },
        'systems.systemrack': {
            'Meta': {'ordering': "['name']", 'object_name': 'SystemRack', 'db_table': "u'system_racks'"},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'location': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['systems.Location']"}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
        },
        'systems.systemstatus': {
            'Meta': {'ordering': "['status']", 'object_name': 'SystemStatus', 'db_table': "u'system_statuses'"},
            'color': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'color_code': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'status': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
        },
        'view.view': {
            'Meta': {'unique_together': "(('name',),)", 'object_name': 'View', 'db_table': "'view'"},
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'})
        }
    }

    complete_apps = ['nameserver']