code stringlengths 3 6.57k |
|---|
force_pair_xpub(self, plugin, handler, info, xpub, derivation, devices) |
bip32.xpub_type(xpub) |
self.client_lookup(info.device.id_) |
client.is_pairable() |
client.get_xpub(derivation, xtype) |
except (UserCancelled, RuntimeError) |
self.pair_xpub(xpub, info.device.id_) |
seed (and passphrase, if any) |
format(plugin.device) |
plugin.get_library_not_available_message() |
HardwarePluginLibraryUnavailable(message) |
self.scan_devices() |
self.xpub_by_id(dev.id_) |
self.create_client(device, handler, plugin) |
self.logger.error(f'failed to create client for {plugin.name} at {device.path}: {repr(e) |
infos.append(DeviceInfo(device=device, exception=e) |
client.label() |
client.is_initialized() |
select_device(self, plugin, handler, keystore, devices=None) |
self.unpaired_device_infos(handler, plugin, devices) |
_('Please insert your {}') |
format(plugin.device) |
format(keystore.label) |
_('Try to connect again?') |
handler.yes_no_question(msg) |
UserCancelled() |
len(infos) |
_("Please select which {} device to use:") |
format(plugin.device) |
str(info.label) |
_("initialized") |
_("wiped") |
handler.query_choice(msg, descriptions) |
UserCancelled() |
keystore.set_label(info.label) |
handler.win.wallet.save_keystore() |
_scan_devices_with_hid(self) |
hid.enumerate(0, 0) |
d.get('interface_number', -1) |
len(id_) |
str(d['path']) |
str(interface_number) |
str(usage_page) |
scan_devices(self) |
self.logger.info("scanning devices...") |
self._scan_devices_with_hid() |
f() |
format(str(f) |
repr(e) |
devices.extend(new_devices) |
self.clients.items() |
client.has_usable_connection_with_device() |
disconnected_ids.append(pair[1]) |
self.unpair_id(id_) |
Group(BaseGroup) |
__init__(self, shared: ClientSharedObject, data: dict) |
super() |
__init__(shared, data["id"]) |
PartialUser(shared=shared, data=data["owner"]) |
data.get("isLocked") |
__repr__(self) |
update_shout(self, message: str, update_self: bool = True) |
self._shared.url_generator.get_url("groups", f"v1/groups/{self.id}/status") |
shout_response.json() |
extension(self) |
serialize(self, value: Any, writer: BinaryIO) |
NotImplementedError() |
deserialize(self, reader: BinaryIO) |
NotImplementedError() |
__repr__(self) |
_convertToDPI(density, unit) |
int(density * 0.0000254 + 0.5) |
int(density * 0.000254 + 0.5) |
int(density * 0.00254 + 0.5) |
int(density * 0.0254 + 0.5) |
int(density * 0.254 + 0.5) |
int(density * 2.54 + 0.5) |
int(density * 25.4 + 0.5) |
_convertToPx(value) |
re.match(r"(\d+(?:\.\d+) |
ValueError("unknown length value: %s" % value) |
matched.groups() |
float(length) |
float(length) |
float(length) |
float(length) |
float(length) |
float(length) |
float(length) |
ValueError("unknown unit type: %s" % unit) |
get(filepath) |
Return (width, height) |
isinstance(filepath, io.BytesIO) |
open(filepath, 'rb') |
fhandle.read(24) |
len(head) |
in (b'GIF87a', b'GIF89a') |
struct.unpack("<hh", head[6:10]) |
ValueError("Invalid GIF file") |
head.startswith(b'\211PNG\r\n\032\n') |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.