Return all devices.
488067
def devices(self):
        
        service_root = self.webservices['findme']['url']
        return FindMyiPhoneServiceManager(
            service_root,
            self.session,
            self.params
        )
359142
def get_devices(self) -> list:
        """"""

        if not self.enabled:
            return None

        self.in_process = True

        response, _ = helpers.call_api(
            '/cloud/v1/deviceManaged/devices',
            'post',
            headers=helpers.req_headers(self),
            json=helpers.req_body(self, 'devicelist')
        )

        if response and helpers.check_response(response, 'get_devices'):
            if 'result' in response and 'list' in response['result']:
                device_list = response['result']['list']
                outlets, switches, fans = self.process_devices(device_list)
            else:
                logger.error('Device list in response not found')
        else:
            logger.error('Error retrieving device list')

        self.in_process = False

        return (outlets, switches, fans)
1246719
function getDevices(adbPath: string): Array<string> {
  try {
    const devicesResult = execSync(`${adbPath} devices`);
    return parseDevicesResult(devicesResult.toString());
  } catch (e) {
    return [];
  }
}
402108
def devices(self):
		""""""

		response = self._call(
			mc_calls.DeviceManagementInfo
		)
		registered_devices = response.body.get('data', {}).get('items', [])

		return registered_devices
44020
def get_all_usb_devices(idVendor, idProduct):
        
        all_dev = list(usb.core.find(find_all = True, idVendor = idVendor, idProduct = idProduct))
        for dev in all_dev:
            try:
                dev.detach_kernel_driver(0)
            except usb.USBError:
                pass
        return all_dev
226826
def devices(self):
        """"""
        self.verify_integrity()

        if session.get('u2f_device_management_authorized', False):
            if request.method == 'GET':
                return jsonify(self.get_devices()), 200

            elif request.method == 'DELETE':
                response = self.remove_device(request.json)

                if response['status'] == 'ok':
                    return jsonify(response), 200
                else:
                    return jsonify(response), 404

        return jsonify({'status': 'failed', 'error': 'Unauthorized!'}), 401
214303
public function getDevices(): array
    {
        # If we've already retrieved the devices from cache then just return them
        if ($this->retrieved) {
            return $this->collection->getDevices();
        }

        # If we haven't cached the available addresses yet then do it now
        if (!$this->cache->has(self::CACHE_KEY)) {
            $addresses = [];
            foreach ($this->collection->getDevices() as $device) {
                $addresses[] = $device->getIp();
            }
            $this->cache->set(self::CACHE_KEY, $addresses);
        }

        $addresses = $this->cache->get(self::CACHE_KEY);
        foreach ($addresses as $address) {
            $this->collection->addIp($address);
        }
        $this->retrieved = true;

        return $this->collection->getDevices();
    }
249487
def devices(self):
        ''''''
        out = self.run_cmd('devices') #subprocess.check_output([self.adb_path(), 'devices']).decode("utf-8")
        if 'adb server is out of date' in out:
            out = self.run_cmd('devices')
        match = "List of devices attached"
        index = out.find(match)
        if index < 0:
            raise EnvironmentError("adb is not working.")
        return dict(re.findall(r'([^\s]+)\t(\w+)', out))
426807
def get_all_connected_interfaces():
        """"""
        # find all cmsis-dap devices
        try:
            all_devices = usb.core.find(find_all=True, custom_match=HasCmsisDapv2Interface())
        except usb.core.NoBackendError:
            common.show_no_libusb_warning()
            return []

        # iterate on all devices found
        boards = []
        for board in all_devices:
            new_board = PyUSBv2()
            new_board.vid = board.idVendor
            new_board.pid = board.idProduct
            new_board.product_name = board.product
            new_board.vendor_name = board.manufacturer
            new_board.serial_number = board.serial_number
            boards.append(new_board)

        return boards
882090
def returnPorts(self):
        """"""
        if self._gotPorts:
            #print("deleting ports >%s<"%(self.ports))
            map(portpicker.return_port, self.ports)
            self._gotPorts = False
        self.ports = []
989252
def get_device_by_ain(self, ain):
        """"""
        devices = self.get_devices()
        for device in devices:
            if device.ain == ain:
                return device
217590
def get_power_all(self):
        """"""
        power_dict = {}
        for device in self.get_device_names().keys():
            power_dict[device] = self.get_power_single(device)
        return power_dict
1129368
def devices(self):
        ''''''
        out = self.raw_cmd("devices").communicate()[0].decode("utf-8")
        match = "List of devices attached"
        index = out.find(match)
        if index < 0:
            raise EnvironmentError("adb is not working.")
        return dict([s.split("\t") for s in out[index + len(match):].strip().splitlines() if s.strip()])
460382
def get_devices(self):
        
        url = self.base_url + '/net/home_auto_query.lua'
        response = self.session.get(url, params={
            'sid': self.sid,
            'command': 'AllOutletStates',
            'xhr': 0,
        }, timeout=15)
        response.raise_for_status()
        data = response.json()
        count = int(data["Outlet_count"])
        devices = []
        for i in range(1, count + 1):
            device = Device(
                int(data["DeviceID_{0}".format(i)]),
                int(data["DeviceConnectState_{0}".format(i)]),
                int(data["DeviceSwitchState_{0}".format(i)])
            )
            devices.append(device)
        return devices
107744
function() {
        const prefix = keyEndToEndDevicesForUser('');
        const devices = {};
        for (let i = 0; i < this.store.length; ++i) {
            const key = this.store.key(i);
            const userId = key.substr(prefix.length);
            if (key.startsWith(prefix)) devices[userId] = getJsonItem(this.store, key);
        }
        return devices;
    }
1261581
def all(self, data={}, **kwargs):
        "
        return super(Refund, self).all(data, **kwargs)
867347
def _find_devices_mac(self):
        """"""
        self.keyboards.append(Keyboard(self))
        self.mice.append(MightyMouse(self))
        self.mice.append(Mouse(self))