Retrieve the last data update for the specified digital pin.
        It is intended for a polling application.

        :param pin: Digital pin number

        :returns: Last value reported for the digital pin
962356
def digital_read(self, pin):
        
        task = asyncio.ensure_future(self.core.digital_read(pin))
        value = self.loop.run_until_complete(task)
        return value
453818
async def disable_digital_reporting(self, pin):
        
        port = pin // 8
        command = [PrivateConstants.REPORT_DIGITAL + port,
                   PrivateConstants.REPORTING_DISABLE]
        await self._send_command(command)
809536
def get_pin_codes(self, refresh=False):
        
        if refresh:
            self.refresh()
        val = self.get_value("pincodes")

        # val syntax string: <VERSION=3>next_available_user_code_id\tuser_code_id,active,date_added,date_used,PIN_code,name;\t...
        # See (outdated) http://wiki.micasaverde.com/index.php/Luup_UPnP_Variables_and_Actions#DoorLock1

        # Remove the trailing tab
        # ignore the version and next available at the start
        # and split out each set of code attributes
        raw_code_list = []
        try:
            raw_code_list = val.rstrip().split('\t')[1:]
        except Exception as ex:
            logger.error('Got unsupported string {}: {}'.format(val, ex))

        # Loop to create a list of codes
        codes = []
        for code in raw_code_list:

            try:
                # Strip off trailing semicolon
                # Create a list from csv
                code_addrs = code.split(';')[0].split(',')

                # Get the code ID (slot) and see if it should have values
                slot, active = code_addrs[:2]
                if active != '0':
                    # Since it has additional attributes, get the remaining ones
                    _, _, pin, name = code_addrs[2:]
                    # And add them as a tuple to the list
                    codes.append((slot, name, pin))
            except Exception as ex:
                logger.error('Problem parsing pin code string {}: {}'.format(code, ex))
        
        return codes
941571
AtomicLong getCurrent(int pollerIndex) {
    rollCount(pollerIndex, clock.now());
    return data[2 * pollerIndex + CURRENT];
  }
622460
def no_update_last_login():
    
    kw = {'receiver': update_last_login}
    kw_id = {'receiver': update_last_login, 'dispatch_uid': 'update_last_login'}

    was_connected = user_logged_in.disconnect(**kw)
    was_connected_id = not was_connected and user_logged_in.disconnect(**kw_id)
    yield
    # Restore signal if needed
    if was_connected:
        user_logged_in.connect(**kw)
    elif was_connected_id:
        user_logged_in.connect(**kw_id)
896094
def get_updates(self, offset=None, limit=None, timeout=None):
        
        payload = dict(offset=offset, limit=limit, timeout=timeout)
        return self._get('getUpdates', payload)
984612
def last_month(self):
        
        if self._last_month is None:
            self._last_month = LastMonthList(self._version, account_sid=self._solution['account_sid'], )
        return self._last_month
932944
def digital_write(pin, value)
      port = (pin / 8).floor
      port_value = 0

      @pins[pin].value = value

      8.times do |i|
        port_value |= (1 << i) unless @pins[8 * port + i].value.zero?
      end

      write(DIGITAL_MESSAGE | port, port_value & 0x7F, (port_value >> 7) & 0x7F)
    end
462072
def filtered_data(self, pin):
        
        assert pin >= 0 and pin < 12, 'pin must be between 0-11 (inclusive)'
        return self._i2c_retry(self._device.readU16LE, MPR121_FILTDATA_0L + pin*2)
362938
def read(self):
        
        if self.mode == UNAVAILABLE:
            raise IOError("Cannot read pin {0}".format(self.__str__()))
        return self.value
184057
def get_last_modified_date(*args, **kwargs):
    
    try:
        latest_note = Note.objects.latest()
        latest_release = Release.objects.latest()
    except ObjectDoesNotExist:
        return None

    return max(latest_note.modified, latest_release.modified)
1255027
def updated_by(self):
        
        if self.api and self.updated_by_id:
            return self.api._get_user(self.updated_by_id)
643540
def _last_values(self):
        
        if not self.session.get('last_request_uri'):
            self.session.last_request_uri = None
        self.session.last_request_at = self.session.get('last_request_at', 0)
1344906
def is_touched(self, pin):
        
        assert pin >= 0 and pin < 12, 'pin must be between 0-11 (inclusive)'
        t = self.touched()
        return (t & (1 << pin)) > 0
1013386
def value(self):
        """"""
        return self._ads.read(self._pin_setting, is_differential=self.is_differential)
373959
async def disable_digital_reporting(self, command):
        
        pin = int(command[0])
        await self.core.disable_digital_reporting(pin)
157710
async def enable_digital_reporting(self, pin):
        
        port = pin // 8
        command = [PrivateConstants.REPORT_DIGITAL + port,
                   PrivateConstants.REPORTING_ENABLE]
        await self._send_command(command)