Go to Zero position
339281
def GoZero(self, speed):
        '  '
        self.ReleaseSW()

        spi.SPI_write_byte(self.CS, 0x82 | (self.Dir & 1))       # Go to Zero
        spi.SPI_write_byte(self.CS, 0x00)
        spi.SPI_write_byte(self.CS, speed)  
        while self.IsBusy():
            pass
        time.sleep(0.3)
        self.ReleaseSW()
329609
def no_moves(position):
    
    return position.no_moves(color.white) \
        or position.no_moves(color.black)
101953
def noop(*layers):
    """"""

    def begin_update(X, drop=0.0):
        return X, lambda D, *a, **k: D

    return begin_update
640885
def set_position(x, y, stream=STD_OUTPUT_HANDLE):
    '''  '''
    stream = kernel32.GetStdHandle(stream)
    value = x + (y << 16)
    kernel32.SetConsoleCursorPosition(stream, c_long(value))
199674
def drag(start_x, start_y, end_x, end_y, absolute=True, duration=0):
    
    if is_pressed():
        release()
    move(start_x, start_y, absolute, 0)
    press()
    move(end_x, end_y, absolute, duration)
    release()
1369739
def seek_to_position(position):
    """"""
    message = command(protobuf.CommandInfo_pb2.SeekToPlaybackPosition)
    send_command = message.inner()
    send_command.options.playbackPosition = position
    return message
907017
def _unset(self, pos):
        """"""
        assert 0 <= pos < self.len
        self._datastore.unsetbit(pos)
752435
def OnMove(self, event):
        """"""

        # Store window position in config
        position = self.main_window.GetScreenPositionTuple()

        config["window_position"] = repr(position)
1203798
def _move_to_top(self, pos):
        """"""
        if pos > 0:
            self.queue.rotate(-pos)
            item = self.queue.popleft()
            self.queue.rotate(pos)
            self.queue.appendleft(item)
454130
def down(self, point):
        
        self._pdown = np.array(point, dtype=np.float32)
        self._pose = self._n_pose
        self._target = self._n_target
736908
def zero_handling(x):
    
    return np.where(x == 0, np.finfo(float).eps, x)
136163
function startIdle() {
        var idleCount = 0;

        function idle() {

            coordinates.push({
                t: 1,
                x: lastX,
                y: lastY
            });
            idleCount++;
            if (idleCount > 10) {
                clearInterval(idleInterval);
            }
        }
        idle();
        idleInterval = setInterval(idle, 1000);
    }
1037490
def set_position(self, x, y, speed=None):
        ''' '''
        if speed:
            self._intf.write('MoveChuckSubsite %1.1f %1.1f R Y %d' % (x, y, speed))
        else:
            self._intf.write('MoveChuckSubsite %1.1f %1.1f R Y' % (x, y))
915576
def location(self, x=None, y=None):
        ''' 
        '''
        stream = self._stream
        stream.write(self.save_pos)  # cursor position

        if x is not None and y is not None:
            stream.write(self.mv(y, x))
        elif x is not None:
            stream.write(self.mv_x(x))
        elif y is not None:
            stream.write(self.mv_y(y))

        stream.flush()
        try:
            yield self
        finally:
            stream.write(self.rest_pos)
            stream.flush()
844552
def _zero_mantissa(dval):
    """"""
    bb = _double_as_bytes(dval)
    return ((bb[1] & 0x0f) | reduce(operator.or_, bb[2:])) == 0
433991
def get_zero_position(self):
        

        LSB = self.bus.read_byte_data(self.address, self.zero_position_MSB)
        MSB = self.bus.read_byte_data(self.address, self.zero_position_LSB)
        DATA = (MSB << 6) + LSB
        return DATA
28819
def rewind(self, position=0):
        """"""
        if position < 0 or position > len(self._data):
            raise Exception("Invalid position to rewind cursor to: %s." % position)
        self._position = position