Make a real thing and its pawn from a dummy pawn.

        Create a new :class:`board.Pawn` instance, along with the
        underlying :class:`LiSE.Place` instance, and give it the name,
        location, and imagery of the provided dummy.
979541
def pawn_from_dummy(self, dummy):
        
        dummy.pos = self.to_local(*dummy.pos)
        for spot in self.board.spotlayout.children:
            if spot.collide_widget(dummy):
                whereat = spot
                break
        else:
            return
        whereat.add_widget(
            self.board.make_pawn(
                self.board.character.new_thing(
                    dummy.name,
                    whereat.place.name,
                    _image_paths=list(dummy.paths)
                )
            )
        )
        dummy.num += 1
264813
def p_examples_create(self, p):
        """"""
        p[0] = OrderedDict()
        if p[1] is not None:
            p[0][p[1].label] = p[1]
814463
def Dummy(self):
        ""
        results = self.client.dummy()['response']
        self.AppServerStatus = str(results['appserver'])
        self.DbServerStatus = str(results['dbserver'])
        self.AuthServerStatus = str(results['authserver'])
1339808
def _dummy_init(self, *args, **kwargs): #@UnusedVariable
    """"""
    cls = type(self)
    old_init = cls._intern__old_init
    if old_init is _NotDefined:
        del cls.__init__
    else:
        cls.__init__ = old_init
    del cls._intern__old_init
1208002
def create(self, _attributes=None, **attributes):
        
        if _attributes is not None:
            attributes.update(_attributes)

        instance = self._related.new_instance(attributes)

        instance.set_attribute(self.get_plain_foreign_key(), self.get_parent_key())

        instance.save()

        return instance
145126
function createIdentifierNode(name) {
  return (scope, opts) => {
    const property = get(opts.properties, name);

    return property ? property(scope) : get(scope, name);
  };
}
234421
def create(self, fields):
        
        try:
            # Cleaning the fields, and check if has `ForeignKey` type.
            cleaned_fields = {}
            for key, value in fields.items():
                if type(value) is dict:
                    try:
                        if value['type'] == 'fk':
                            fake_fk = self.fake_fk(value['field_name'])
                            cleaned_fields.update({key: fake_fk})
                    except:
                        pass
                else:
                    cleaned_fields.update({key: value})

            # Creating the object from dictionary fields.
            model_class = self.model_class()
            obj = model_class.objects.create(**cleaned_fields)

            # The `ManyToManyField` need specific object,
            # so i handle it after created the object.
            for key, value in fields.items():
                if type(value) is dict:
                    try:
                        if value['type'] == 'm2m':
                            self.fake_m2m(obj, value['field_name'])
                    except:
                        pass
            try:
                obj.save_m2m()
            except:
                obj.save()
            return obj
        except Exception as e:
            raise e
910274
function dummy(caller) {
    return function() {
      queue.call({caller: caller}, slice.call(arguments, 0));
      return self;
    }
  }
514318
function create_dummy_iclass(module) {
    var iclass = {},
        proto = module.$$prototype;

    if (proto.hasOwnProperty('$$dummy')) {
      proto = proto.$$define_methods_on;
    }

    var props = Object.getOwnPropertyNames(proto),
        length = props.length, i;

    for (i = 0; i < length; i++) {
      var prop = props[i];
      $defineProperty(iclass, prop, proto[prop]);
    }

    $defineProperty(iclass, '$$iclass', true);
    $defineProperty(iclass, '$$module', module);

    return iclass;
  }
946151
function(elem) {
		// is this already initialized?
		if ($(elem).data('spriteanim')) return $(elem).data('spriteanim');
		var spriteanim = new SpriteAnim(elem);
		$(elem).data('spriteanim', spriteanim);

		return spriteanim;
	}
544204
def create_turtle(self, id, shape, model_init, color_init):
        """"""
        assert id not in self.id_to_shape
        data = self._create_turtle(id, shape, model_init, color_init)
        self.id_to_shape[id] = shape
        return data
91672
def make_params(self):
    

    if self.needs_dummy_fprop:
      if hasattr(self, "_dummy_input"):
        return
      self._dummy_input = self.make_input_placeholder()
      self.fprop(self._dummy_input)
1356178
def create_dummy_class(klass, dependency):
    
    assert not building_rtfd()

    class _DummyMetaClass(type):
        # throw error on class attribute access
        def __getattr__(_, __):
            raise AttributeError("Cannot import '{}', therefore '{}' is not available".format(dependency, klass))

    @six.add_metaclass(_DummyMetaClass)
    class _Dummy(object):
        # throw error on constructor
        def __init__(self, *args, **kwargs):
            raise ImportError("Cannot import '{}', therefore '{}' is not available".format(dependency, klass))

    return _Dummy
1348661
def pawn_origins
      _, rank     = destination_coords
      double_rank = (rank == 3 && self.move.white?) || (rank == 4 && self.move.black?)

      pawn_moves = PAWN_MOVES[self.move.piece]

      moves = self.move.capture ? pawn_moves[:capture] : pawn_moves[:normal]
      moves += pawn_moves[:double] if double_rank

      move_origins(moves)
    end
1333104
function Load(pgn) {
  let chess = null;
  if (Chess.Chess) {
    chess = new Chess.Chess();
  } else {
    chess = new Chess();
  }
  chess.load_pgn(pgn);
  return chess;
}
534770
def add_castle(self, position):
        
        if self.has_moved or self.in_check(position):
            return

        if self.color == color.white:
            rook_rank = 0
        else:
            rook_rank = 7

        castle_type = {
            notation_const.KING_SIDE_CASTLE: {
                "rook_file": 7,
                "direction": lambda king_square, times: king_square.shift_right(times)
            },
            notation_const.QUEEN_SIDE_CASTLE: {
                "rook_file": 0,
                "direction": lambda king_square, times: king_square.shift_left(times)
            }
        }
        for castle_key in castle_type:
            castle_dict = castle_type[castle_key]
            castle_rook = position.piece_at_square(Location(rook_rank, castle_dict["rook_file"]))
            if self._rook_legal_for_castle(castle_rook) and \
                    self._empty_not_in_check(position, castle_dict["direction"]):
                yield self.create_move(castle_dict["direction"](self.location, 2), castle_key)
1125141
def _make_instance(self, **attributes):
        
        definition = self._definitions[self._klass][self._name](self._faker)
        definition.update(attributes)

        instance = self._klass()
        instance.force_fill(**definition)

        return instance