Make a real place and its spot from a dummy spot.

        Create a new :class:`board.Spot` instance, along with the
        underlying :class:`LiSE.Place` instance, and give it the name,
        position, and imagery of the provided dummy.
421883
def spot_from_dummy(self, dummy):
        
        (x, y) = self.to_local(*dummy.pos_up)
        x /= self.board.width
        y /= self.board.height
        self.board.spotlayout.add_widget(
            self.board.make_spot(
                self.board.character.new_place(
                    dummy.name,
                    _x=x,
                    _y=y,
                    _image_paths=list(dummy.paths)
                )
            )
        )
        dummy.num += 1
578928
def new(self, size, fill):
        """"""
        return Image(PIL.Image.new("RGB", size, fill))
1031777
def create_scene():
    
    scene = trimesh.Scene()

    # plane
    geom = trimesh.creation.box((0.5, 0.5, 0.01))
    geom.apply_translation((0, 0, -0.005))
    geom.visual.face_colors = (.6, .6, .6)
    scene.add_geometry(geom)

    # axis
    geom = trimesh.creation.axis(0.02)
    scene.add_geometry(geom)

    box_size = 0.1

    # box1
    geom = trimesh.creation.box((box_size,) * 3)
    geom.visual.face_colors = np.random.uniform(
        0, 1, (len(geom.faces), 3))
    transform = tf.translation_matrix([0.1, 0.1, box_size / 2])
    scene.add_geometry(geom, transform=transform)

    # box2
    geom = trimesh.creation.box((box_size,) * 3)
    geom.visual.face_colors = np.random.uniform(
        0, 1, (len(geom.faces), 3))
    transform = tf.translation_matrix([-0.1, 0.1, box_size / 2])
    scene.add_geometry(geom, transform=transform)

    # fuze
    geom = trimesh.load(str(here / '../models/fuze.obj'))
    transform = tf.translation_matrix([-0.1, -0.1, 0])
    scene.add_geometry(geom, transform=transform)

    # sphere
    geom = trimesh.creation.icosphere(radius=0.05)
    geom.visual.face_colors = np.random.uniform(
        0, 1, (len(geom.faces), 3))
    transform = tf.translation_matrix([0.1, -0.1, box_size / 2])
    scene.add_geometry(geom, transform=transform)

    return scene
1129012
def push_pos(self, *args):
        
        self.proxy['_x'] = self.x / self.board.width
        self.proxy['_y'] = self.y / self.board.height
1228690
def location_on_land(self, coords_only=False):
        
        place = self.random_element(self.land_coords)
        return (place[0], place[1]) if coords_only else place
264813
def p_examples_create(self, p):
        """"""
        p[0] = OrderedDict()
        if p[1] is not None:
            p[0][p[1].label] = p[1]
734313
def create(cls, d):
        
        move = cls(d['framerate'])
        move._timed_positions.update(d['positions'])
        return move
1194875
function getBoardWhereCanIGo(board, from) {
    var positions = getPositionsWhereCanIGo(board, from);
    return mapBoard(board, function (position) {
        return Position.setICanGoHere(positions, position);
    });
}
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
1057632
def add_thing(self, name, location, **kwargs):
        
        if name in self.thing:
            raise WorldIntegrityError(
                "Already have a Thing named {}".format(name)
            )
        self.add_node(name, **kwargs)
        if isinstance(location, Node):
            location = location.name
        self.place2thing(name, location,)
604025
public PlaceController createController ()
    {
        Class<?> cclass = getControllerClass();
        if (cclass == null) {
            throw new RuntimeException(
                "PlaceConfig.createController() must be overridden.");
        }

        log.warning("Providing backwards compatibility. PlaceConfig." +
                    "createController() should be overridden directly.");
        try {
            return (PlaceController)cclass.newInstance();
        } catch (Exception e) {
            log.warning("Failed to instantiate controller class '" + cclass + "'.", e);
            return null;
        }
    }
399095
function(current, position) {

      var x, newNode, node, firstChild;

      // create a new node
      newNode = current.cloneNode(true);

      // create new node in mirror
      if (position == 'before') {

        // insert element
        current.parentNode.insertBefore(newNode, current);

      }

      // re-init sortable
      hashedit.setupSortable();

      return newNode;

    }
272905
def create(*units):
    """"""
    ret = []
    for unit in units: # implemented using sc2simulator.ScenarioUnit
        x, y = unit.position[:2]
        pt = Point2D(x=x, y=y)
        unit.tag = 0 # forget any tag because a new unit will be created
        new = DebugCommand(create_unit=DebugCreateUnit(
            unit_type   = unit.code,
            owner       = unit.owner,
            pos         = pt,
            quantity    = 1,
        ))
        ret.append(new)
    return ret
655136
def new_instance(self, name):
        
        ist = lib.EnvCreateRawInstance(self._env, self._cls, name.encode())
        if ist == ffi.NULL:
            raise CLIPSError(self._env)

        return Instance(self._env, ist)
246403
def create(self, active=False):
        
        self.library.Par_Create.restype = snap7.snap7types.S7Object
        self.pointer = snap7.snap7types.S7Object(self.library.Par_Create(int(active)))
955111
def create_elb(self):
        """"""
        utils.banner("Creating ELB")
        elbobj = elb.SpinnakerELB(app=self.app, env=self.env, region=self.region, prop_path=self.json_path)
        elbobj.create_elb()
1202066
def place(self, value):
        
        if (value is not None) and (not value in DG_C_PLACE):
            raise ValueError("Unrecognized value for place: '%s'" % value)
        self.__place = value