body_hash stringlengths 64 64 | body stringlengths 23 109k | docstring stringlengths 1 57k | path stringlengths 4 198 | name stringlengths 1 115 | repository_name stringlengths 7 111 | repository_stars float64 0 191k | lang stringclasses 1
value | body_without_docstring stringlengths 14 108k | unified stringlengths 45 133k |
|---|---|---|---|---|---|---|---|---|---|
b2a71ea80fb5dcb3a9d4be4dfff42c19c21ad98acdfcfa84f1c3aa137000c99a | @userlogset.command(name='leave')
async def user_leave_log(self, ctx: commands.Context, on_off: typing.Optional[bool]):
'Toggle logging when users leave the current server.\n\n If `on_off` is not provided, the state will be flipped.'
target_state = (on_off or (not (await self.config.guild(ctx.guild).leav... | Toggle logging when users leave the current server.
If `on_off` is not provided, the state will be flipped. | userlog/userlog.py | user_leave_log | salazar-brodart/enclave-cog | 0 | python | @userlogset.command(name='leave')
async def user_leave_log(self, ctx: commands.Context, on_off: typing.Optional[bool]):
'Toggle logging when users leave the current server.\n\n If `on_off` is not provided, the state will be flipped.'
target_state = (on_off or (not (await self.config.guild(ctx.guild).leav... | @userlogset.command(name='leave')
async def user_leave_log(self, ctx: commands.Context, on_off: typing.Optional[bool]):
'Toggle logging when users leave the current server.\n\n If `on_off` is not provided, the state will be flipped.'
target_state = (on_off or (not (await self.config.guild(ctx.guild).leav... |
03d5f295144ac5445d09674efdc5d1f82430d2b766f7f752aae1459cd0d3eab2 | @userlogset.command(name='settings')
async def user_settings(self, ctx: commands.Context):
'See current settings.'
data = (await self.config.guild(ctx.guild).all())
channel = ctx.guild.get_channel((await self.config.guild(ctx.guild).channel()))
channel = ('None' if (not channel) else channel.mention)
... | See current settings. | userlog/userlog.py | user_settings | salazar-brodart/enclave-cog | 0 | python | @userlogset.command(name='settings')
async def user_settings(self, ctx: commands.Context):
data = (await self.config.guild(ctx.guild).all())
channel = ctx.guild.get_channel((await self.config.guild(ctx.guild).channel()))
channel = ('None' if (not channel) else channel.mention)
embed = discord.Embed... | @userlogset.command(name='settings')
async def user_settings(self, ctx: commands.Context):
data = (await self.config.guild(ctx.guild).all())
channel = ctx.guild.get_channel((await self.config.guild(ctx.guild).channel()))
channel = ('None' if (not channel) else channel.mention)
embed = discord.Embed... |
b46e04333c185697ae9c73fc730ea95897c4b129ac5616876fc2066a8beba52c | def __init__(self, name='User', *args, **kwargs):
'\n start the instance of dataView main window when it is called \n '
tk.Tk.__init__(self, *args, **kwargs)
self.user = name
self.resizable(0, 0)
self.title(setup.app_name)
self.iconbitmap(setup.icon)
self.check = False
self... | start the instance of dataView main window when it is called | view/dataView.py | __init__ | johndao1005/SDV602-Milestone3-QuangThanhDao | 1 | python | def __init__(self, name='User', *args, **kwargs):
'\n \n '
tk.Tk.__init__(self, *args, **kwargs)
self.user = name
self.resizable(0, 0)
self.title(setup.app_name)
self.iconbitmap(setup.icon)
self.check = False
self.protocol('WM_DELETE_WINDOW', self.quit)
self.container ... | def __init__(self, name='User', *args, **kwargs):
'\n \n '
tk.Tk.__init__(self, *args, **kwargs)
self.user = name
self.resizable(0, 0)
self.title(setup.app_name)
self.iconbitmap(setup.icon)
self.check = False
self.protocol('WM_DELETE_WINDOW', self.quit)
self.container ... |
694779e0e433f3d853c0e6d646a168e71218564273cc583cbcaf29b1b7597e5b | def loadDES(self):
'\n Load the data explorer screen with the given data source else load the default data source\n '
for DES in (genderDES, locationDES, featureDES):
frame = DES(self.container, self)
frame.thread.start()
self.frames[DES] = frame
frame.grid(row=0, c... | Load the data explorer screen with the given data source else load the default data source | view/dataView.py | loadDES | johndao1005/SDV602-Milestone3-QuangThanhDao | 1 | python | def loadDES(self):
'\n \n '
for DES in (genderDES, locationDES, featureDES):
frame = DES(self.container, self)
frame.thread.start()
self.frames[DES] = frame
frame.grid(row=0, column=0, sticky='nsew')
self.updateDES = False
self.show_frame(featureDES) | def loadDES(self):
'\n \n '
for DES in (genderDES, locationDES, featureDES):
frame = DES(self.container, self)
frame.thread.start()
self.frames[DES] = frame
frame.grid(row=0, column=0, sticky='nsew')
self.updateDES = False
self.show_frame(featureDES)<|docstr... |
5bb98767a96e45e60beee775235d2cd153f748657cc5ebba2da3ea7ac9e01108 | def refresh(self):
'redraw the graph to retrieve the latest data or render the upload data\n '
for DES in (genderDES, locationDES, featureDES):
frame = self.frames[DES]
frame.draw_graph(frame.DES) | redraw the graph to retrieve the latest data or render the upload data | view/dataView.py | refresh | johndao1005/SDV602-Milestone3-QuangThanhDao | 1 | python | def refresh(self):
'\n '
for DES in (genderDES, locationDES, featureDES):
frame = self.frames[DES]
frame.draw_graph(frame.DES) | def refresh(self):
'\n '
for DES in (genderDES, locationDES, featureDES):
frame = self.frames[DES]
frame.draw_graph(frame.DES)<|docstring|>redraw the graph to retrieve the latest data or render the upload data<|endoftext|> |
889bd72587d8bd0cd13ebf7418bd2ad38f63800f8ac664dcb59c4e99b0924d86 | def show_frame(self, newFrame):
'moving between data explorer screen \n Args:\n newFrame (object): the screen to be presented \n '
frame = self.frames[newFrame]
self.DES = frame.frametype
self.chatSession.switch_DES(self.DES)
frame.tkraise() | moving between data explorer screen
Args:
newFrame (object): the screen to be presented | view/dataView.py | show_frame | johndao1005/SDV602-Milestone3-QuangThanhDao | 1 | python | def show_frame(self, newFrame):
'moving between data explorer screen \n Args:\n newFrame (object): the screen to be presented \n '
frame = self.frames[newFrame]
self.DES = frame.frametype
self.chatSession.switch_DES(self.DES)
frame.tkraise() | def show_frame(self, newFrame):
'moving between data explorer screen \n Args:\n newFrame (object): the screen to be presented \n '
frame = self.frames[newFrame]
self.DES = frame.frametype
self.chatSession.switch_DES(self.DES)
frame.tkraise()<|docstring|>moving between data e... |
1d0b4cd88bbdab67ecd1869f81180414e002f13b69af6bb2a8a9fcd41a06a5d4 | def uploadWindow(self):
'\n start a Top level window (pop up window) which attached to the Tk(main window)\n '
self.check = True
self.upload = tk.Toplevel()
self.upload.title(setup.app_name)
self.upload.iconbitmap(setup.icon)
options = {'padx': 10, 'pady': 5}
label = ttk.Label(... | start a Top level window (pop up window) which attached to the Tk(main window) | view/dataView.py | uploadWindow | johndao1005/SDV602-Milestone3-QuangThanhDao | 1 | python | def uploadWindow(self):
'\n \n '
self.check = True
self.upload = tk.Toplevel()
self.upload.title(setup.app_name)
self.upload.iconbitmap(setup.icon)
options = {'padx': 10, 'pady': 5}
label = ttk.Label(self.upload, text='Upload').grid(column=0, row=0, **options, columnspan=5)
... | def uploadWindow(self):
'\n \n '
self.check = True
self.upload = tk.Toplevel()
self.upload.title(setup.app_name)
self.upload.iconbitmap(setup.icon)
options = {'padx': 10, 'pady': 5}
label = ttk.Label(self.upload, text='Upload').grid(column=0, row=0, **options, columnspan=5)
... |
239ccec46d206177fc1173589d28535cd06daa7ad2ccd28f1b11c2b2918f616c | def openUpload(self):
'check if an instance of upload event is exist, then open the upload window\n '
if (self.check == False):
self.uploadWindow() | check if an instance of upload event is exist, then open the upload window | view/dataView.py | openUpload | johndao1005/SDV602-Milestone3-QuangThanhDao | 1 | python | def openUpload(self):
'\n '
if (self.check == False):
self.uploadWindow() | def openUpload(self):
'\n '
if (self.check == False):
self.uploadWindow()<|docstring|>check if an instance of upload event is exist, then open the upload window<|endoftext|> |
722cd2405f33b0470d36557b505f6c9233604bbb662db741c47b9a0a6865db97 | def closeUpload(self):
'close the upload window and ensure the check if turn off to open new window\n '
self.check = False
self.upload.destroy() | close the upload window and ensure the check if turn off to open new window | view/dataView.py | closeUpload | johndao1005/SDV602-Milestone3-QuangThanhDao | 1 | python | def closeUpload(self):
'\n '
self.check = False
self.upload.destroy() | def closeUpload(self):
'\n '
self.check = False
self.upload.destroy()<|docstring|>close the upload window and ensure the check if turn off to open new window<|endoftext|> |
bb5b64e9565f743c41d827daa5797a6493e0d96276b6431806e7aad108d31ee5 | def setup_platform(hass, config, add_entities, discovery_info=None):
'Validate configuration, create devices and start monitoring thread.'
bt_device_id = config.get('bt_device_id')
beacons = config.get(CONF_BEACONS)
devices = []
for (dev_name, properties) in beacons.items():
namespace = get_... | Validate configuration, create devices and start monitoring thread. | homeassistant/components/eddystone_temperature/sensor.py | setup_platform | carlos-sarmiento/core | 7 | python | def setup_platform(hass, config, add_entities, discovery_info=None):
bt_device_id = config.get('bt_device_id')
beacons = config.get(CONF_BEACONS)
devices = []
for (dev_name, properties) in beacons.items():
namespace = get_from_conf(properties, CONF_NAMESPACE, 20)
instance = get_from... | def setup_platform(hass, config, add_entities, discovery_info=None):
bt_device_id = config.get('bt_device_id')
beacons = config.get(CONF_BEACONS)
devices = []
for (dev_name, properties) in beacons.items():
namespace = get_from_conf(properties, CONF_NAMESPACE, 20)
instance = get_from... |
7d5d9ad53365bcee0fde09b29860f5162b665701d791b026bf7e677adcff0156 | def get_from_conf(config, config_key, length):
'Retrieve value from config and validate length.'
string = config.get(config_key)
if (len(string) != length):
_LOGGER.error('Error in configuration parameter %s: Must be exactly %d bytes. Device will not be added', config_key, (length / 2))
retu... | Retrieve value from config and validate length. | homeassistant/components/eddystone_temperature/sensor.py | get_from_conf | carlos-sarmiento/core | 7 | python | def get_from_conf(config, config_key, length):
string = config.get(config_key)
if (len(string) != length):
_LOGGER.error('Error in configuration parameter %s: Must be exactly %d bytes. Device will not be added', config_key, (length / 2))
return None
return string | def get_from_conf(config, config_key, length):
string = config.get(config_key)
if (len(string) != length):
_LOGGER.error('Error in configuration parameter %s: Must be exactly %d bytes. Device will not be added', config_key, (length / 2))
return None
return string<|docstring|>Retrieve va... |
9d6151fd0d1c9625c867943c79f8e34cc5b4be85502a8ffd1ff2ace89dd04fe8 | def __init__(self, name, namespace, instance):
'Initialize a sensor.'
self._name = name
self.namespace = namespace
self.instance = instance
self.bt_addr = None
self.temperature = STATE_UNKNOWN | Initialize a sensor. | homeassistant/components/eddystone_temperature/sensor.py | __init__ | carlos-sarmiento/core | 7 | python | def __init__(self, name, namespace, instance):
self._name = name
self.namespace = namespace
self.instance = instance
self.bt_addr = None
self.temperature = STATE_UNKNOWN | def __init__(self, name, namespace, instance):
self._name = name
self.namespace = namespace
self.instance = instance
self.bt_addr = None
self.temperature = STATE_UNKNOWN<|docstring|>Initialize a sensor.<|endoftext|> |
c2acbec88b5ad13d0f458e2f3155e56fd2fabdb29665addbac450039553aa2e4 | @property
def name(self):
'Return the name of the sensor.'
return self._name | Return the name of the sensor. | homeassistant/components/eddystone_temperature/sensor.py | name | carlos-sarmiento/core | 7 | python | @property
def name(self):
return self._name | @property
def name(self):
return self._name<|docstring|>Return the name of the sensor.<|endoftext|> |
2332aa175059d2918f49427e214b876d8f44ca7e5ff2b4fd703bdce3ff585c16 | @property
def state(self):
'Return the state of the device.'
return self.temperature | Return the state of the device. | homeassistant/components/eddystone_temperature/sensor.py | state | carlos-sarmiento/core | 7 | python | @property
def state(self):
return self.temperature | @property
def state(self):
return self.temperature<|docstring|>Return the state of the device.<|endoftext|> |
6a1f8d39aa337235b71592b72b36a4861e76cf3dbec96ea5123b2885d4b9bcfb | @property
def unit_of_measurement(self):
'Return the unit the value is expressed in.'
return TEMP_CELSIUS | Return the unit the value is expressed in. | homeassistant/components/eddystone_temperature/sensor.py | unit_of_measurement | carlos-sarmiento/core | 7 | python | @property
def unit_of_measurement(self):
return TEMP_CELSIUS | @property
def unit_of_measurement(self):
return TEMP_CELSIUS<|docstring|>Return the unit the value is expressed in.<|endoftext|> |
e000b475afe38a8230ddadcf9d07474574da9ed13136a395c60ad5b7fc8a111d | @property
def should_poll(self):
'Return the polling state.'
return False | Return the polling state. | homeassistant/components/eddystone_temperature/sensor.py | should_poll | carlos-sarmiento/core | 7 | python | @property
def should_poll(self):
return False | @property
def should_poll(self):
return False<|docstring|>Return the polling state.<|endoftext|> |
58250094990d31f0d499d6a592a55ed336ba23d01d34f9264af778f2a4c6b619 | def __init__(self, hass, devices, bt_device_id):
'Construct interface object.'
self.hass = hass
self.devices = devices
self.bt_device_id = bt_device_id
def callback(bt_addr, _, packet, additional_info):
'Handle new packets.'
self.process_packet(additional_info['namespace'], addition... | Construct interface object. | homeassistant/components/eddystone_temperature/sensor.py | __init__ | carlos-sarmiento/core | 7 | python | def __init__(self, hass, devices, bt_device_id):
self.hass = hass
self.devices = devices
self.bt_device_id = bt_device_id
def callback(bt_addr, _, packet, additional_info):
'Handle new packets.'
self.process_packet(additional_info['namespace'], additional_info['instance'], packet.t... | def __init__(self, hass, devices, bt_device_id):
self.hass = hass
self.devices = devices
self.bt_device_id = bt_device_id
def callback(bt_addr, _, packet, additional_info):
'Handle new packets.'
self.process_packet(additional_info['namespace'], additional_info['instance'], packet.t... |
db290430865c48974604eeeabbd046850d758e354548814e688e07c2642fcbf0 | def start(self):
'Continuously scan for BLE advertisements.'
if (not self.scanning):
self.scanner.start()
self.scanning = True
else:
_LOGGER.debug('start() called, but scanner is already running') | Continuously scan for BLE advertisements. | homeassistant/components/eddystone_temperature/sensor.py | start | carlos-sarmiento/core | 7 | python | def start(self):
if (not self.scanning):
self.scanner.start()
self.scanning = True
else:
_LOGGER.debug('start() called, but scanner is already running') | def start(self):
if (not self.scanning):
self.scanner.start()
self.scanning = True
else:
_LOGGER.debug('start() called, but scanner is already running')<|docstring|>Continuously scan for BLE advertisements.<|endoftext|> |
d2c3e2d07bc3d65502ea285bdf07d3e8dde7072153d8b81fbcaa7b7cb481441f | def process_packet(self, namespace, instance, temperature):
'Assign temperature to device.'
_LOGGER.debug('Received temperature for <%s,%s>: %d', namespace, instance, temperature)
for dev in self.devices:
if ((dev.namespace == namespace) and (dev.instance == instance)):
if (dev.temperatu... | Assign temperature to device. | homeassistant/components/eddystone_temperature/sensor.py | process_packet | carlos-sarmiento/core | 7 | python | def process_packet(self, namespace, instance, temperature):
_LOGGER.debug('Received temperature for <%s,%s>: %d', namespace, instance, temperature)
for dev in self.devices:
if ((dev.namespace == namespace) and (dev.instance == instance)):
if (dev.temperature != temperature):
... | def process_packet(self, namespace, instance, temperature):
_LOGGER.debug('Received temperature for <%s,%s>: %d', namespace, instance, temperature)
for dev in self.devices:
if ((dev.namespace == namespace) and (dev.instance == instance)):
if (dev.temperature != temperature):
... |
3bdecc18621538af1f8b5515e65e1993a432f3a7bd7a85d85738e9ea6d8bb0a5 | def stop(self):
'Signal runner to stop and join thread.'
if self.scanning:
_LOGGER.debug('Stopping...')
self.scanner.stop()
_LOGGER.debug('Stopped')
self.scanning = False
else:
_LOGGER.debug('stop() called but scanner was not running') | Signal runner to stop and join thread. | homeassistant/components/eddystone_temperature/sensor.py | stop | carlos-sarmiento/core | 7 | python | def stop(self):
if self.scanning:
_LOGGER.debug('Stopping...')
self.scanner.stop()
_LOGGER.debug('Stopped')
self.scanning = False
else:
_LOGGER.debug('stop() called but scanner was not running') | def stop(self):
if self.scanning:
_LOGGER.debug('Stopping...')
self.scanner.stop()
_LOGGER.debug('Stopped')
self.scanning = False
else:
_LOGGER.debug('stop() called but scanner was not running')<|docstring|>Signal runner to stop and join thread.<|endoftext|> |
c2a4bd0a60976825e993ec164f065c0ed128cfa7b5f3a9af6b510802d16ebb6d | def monitor_stop(_service_or_event):
'Stop the monitor thread.'
_LOGGER.info('Stopping scanner for Eddystone beacons')
mon.stop() | Stop the monitor thread. | homeassistant/components/eddystone_temperature/sensor.py | monitor_stop | carlos-sarmiento/core | 7 | python | def monitor_stop(_service_or_event):
_LOGGER.info('Stopping scanner for Eddystone beacons')
mon.stop() | def monitor_stop(_service_or_event):
_LOGGER.info('Stopping scanner for Eddystone beacons')
mon.stop()<|docstring|>Stop the monitor thread.<|endoftext|> |
e374e97e8437fbf3f763b1a6abb241d4d4309ed51c786ff417a65edc3ef6cdca | def monitor_start(_service_or_event):
'Start the monitor thread.'
_LOGGER.info('Starting scanner for Eddystone beacons')
mon.start() | Start the monitor thread. | homeassistant/components/eddystone_temperature/sensor.py | monitor_start | carlos-sarmiento/core | 7 | python | def monitor_start(_service_or_event):
_LOGGER.info('Starting scanner for Eddystone beacons')
mon.start() | def monitor_start(_service_or_event):
_LOGGER.info('Starting scanner for Eddystone beacons')
mon.start()<|docstring|>Start the monitor thread.<|endoftext|> |
d339d705e6ba46320b27ff39362fe4d8fcb85b43015358deb76d9e623c281bef | def callback(bt_addr, _, packet, additional_info):
'Handle new packets.'
self.process_packet(additional_info['namespace'], additional_info['instance'], packet.temperature) | Handle new packets. | homeassistant/components/eddystone_temperature/sensor.py | callback | carlos-sarmiento/core | 7 | python | def callback(bt_addr, _, packet, additional_info):
self.process_packet(additional_info['namespace'], additional_info['instance'], packet.temperature) | def callback(bt_addr, _, packet, additional_info):
self.process_packet(additional_info['namespace'], additional_info['instance'], packet.temperature)<|docstring|>Handle new packets.<|endoftext|> |
c6f8ab3e7b8afcead1f6569b6ad32dd8cc1ca0e40d8ffe4f43a17caa206ae13b | def apply_kNNO(Xs, Xt, ys=None, yt=None, scaling=True, k=10, contamination=0.1):
' Apply kNNO.\n k-distance is the distance of its k-th nearest neighbour in the dataset\n \n KNNO ranks all instances in a dataset by their k-distance, with higher distances signifying\n more anomalous instances\n Parame... | Apply kNNO.
k-distance is the distance of its k-th nearest neighbour in the dataset
KNNO ranks all instances in a dataset by their k-distance, with higher distances signifying
more anomalous instances
Parameters
----------
Xs : np.array of shape (n_samples, n_features), optional (default=None)
The source instances... | models/knno.py | apply_kNNO | weelingtan/LocIT | 0 | python | def apply_kNNO(Xs, Xt, ys=None, yt=None, scaling=True, k=10, contamination=0.1):
' Apply kNNO.\n k-distance is the distance of its k-th nearest neighbour in the dataset\n \n KNNO ranks all instances in a dataset by their k-distance, with higher distances signifying\n more anomalous instances\n Parame... | def apply_kNNO(Xs, Xt, ys=None, yt=None, scaling=True, k=10, contamination=0.1):
' Apply kNNO.\n k-distance is the distance of its k-th nearest neighbour in the dataset\n \n KNNO ranks all instances in a dataset by their k-distance, with higher distances signifying\n more anomalous instances\n Parame... |
61eebc5276bd4ad8983a63a3052e7c6af86e4eff078dd52fee7b422aea933ca7 | def _squashing_function(x, p):
' Compute the value of x under squashing function with parameter p. '
return (1.0 - np.exp((np.log(0.5) * np.power((x / p), 2)))) | Compute the value of x under squashing function with parameter p. | models/knno.py | _squashing_function | weelingtan/LocIT | 0 | python | def _squashing_function(x, p):
' '
return (1.0 - np.exp((np.log(0.5) * np.power((x / p), 2)))) | def _squashing_function(x, p):
' '
return (1.0 - np.exp((np.log(0.5) * np.power((x / p), 2))))<|docstring|>Compute the value of x under squashing function with parameter p.<|endoftext|> |
9ae3ff01aa7e5fea1e449f329211975dad8fa53c7b6099ecc357ee78e55a267c | def _pos_embeding(self, img, patched_img, pos_embed):
"Positiong embeding method.\n\n Resize the pos_embed, if the input image size doesn't match\n the training size.\n Args:\n img (torch.Tensor): The inference image tensor, the shape\n must be [B, C, H, W].\n ... | Positiong embeding method.
Resize the pos_embed, if the input image size doesn't match
the training size.
Args:
img (torch.Tensor): The inference image tensor, the shape
must be [B, C, H, W].
patched_img (torch.Tensor): The patched image, it should be
shape of [B, L1, C].
pos_embed (tor... | semantic_segmentation/mmseg/models/backbones/vit.py | _pos_embeding | YangYangGirl/UniFormer | 367 | python | def _pos_embeding(self, img, patched_img, pos_embed):
"Positiong embeding method.\n\n Resize the pos_embed, if the input image size doesn't match\n the training size.\n Args:\n img (torch.Tensor): The inference image tensor, the shape\n must be [B, C, H, W].\n ... | def _pos_embeding(self, img, patched_img, pos_embed):
"Positiong embeding method.\n\n Resize the pos_embed, if the input image size doesn't match\n the training size.\n Args:\n img (torch.Tensor): The inference image tensor, the shape\n must be [B, C, H, W].\n ... |
4e4d4b2b202d16ef3f28b09e62164773f354ae8d31257cb03c32552fe6826ca8 | @staticmethod
def resize_pos_embed(pos_embed, input_shpae, pos_shape, patch_size, mode):
'Resize pos_embed weights.\n\n Resize pos_embed using bicubic interpolate method.\n Args:\n pos_embed (torch.Tensor): pos_embed weights.\n input_shpae (tuple): Tuple for (input_h, intput_w).\... | Resize pos_embed weights.
Resize pos_embed using bicubic interpolate method.
Args:
pos_embed (torch.Tensor): pos_embed weights.
input_shpae (tuple): Tuple for (input_h, intput_w).
pos_shape (tuple): Tuple for (pos_h, pos_w).
patch_size (int): Patch size.
Return:
torch.Tensor: The resized pos_embed ... | semantic_segmentation/mmseg/models/backbones/vit.py | resize_pos_embed | YangYangGirl/UniFormer | 367 | python | @staticmethod
def resize_pos_embed(pos_embed, input_shpae, pos_shape, patch_size, mode):
'Resize pos_embed weights.\n\n Resize pos_embed using bicubic interpolate method.\n Args:\n pos_embed (torch.Tensor): pos_embed weights.\n input_shpae (tuple): Tuple for (input_h, intput_w).\... | @staticmethod
def resize_pos_embed(pos_embed, input_shpae, pos_shape, patch_size, mode):
'Resize pos_embed weights.\n\n Resize pos_embed using bicubic interpolate method.\n Args:\n pos_embed (torch.Tensor): pos_embed weights.\n input_shpae (tuple): Tuple for (input_h, intput_w).\... |
c8481a9d1cc3c42fb647ce776c240f12c826afe221abf723b4244cb5d29fa7f0 | def __init__(self, in_chans, out_chans, drop_prob):
'\n Args:\n in_chans (int): Number of channels in the input.\n out_chans (int): Number of channels in the output.\n drop_prob (float): Dropout probability.\n '
super().__init__()
self.in_chans = in_chans
s... | Args:
in_chans (int): Number of channels in the input.
out_chans (int): Number of channels in the output.
drop_prob (float): Dropout probability. | models/unet_v2v/unet_model.py | __init__ | seansegal/fastMRI | 2 | python | def __init__(self, in_chans, out_chans, drop_prob):
'\n Args:\n in_chans (int): Number of channels in the input.\n out_chans (int): Number of channels in the output.\n drop_prob (float): Dropout probability.\n '
super().__init__()
self.in_chans = in_chans
s... | def __init__(self, in_chans, out_chans, drop_prob):
'\n Args:\n in_chans (int): Number of channels in the input.\n out_chans (int): Number of channels in the output.\n drop_prob (float): Dropout probability.\n '
super().__init__()
self.in_chans = in_chans
s... |
846259ea34fe15411e507626e7399dad3868fdc9e12f3c5bb713e3002b687825 | def forward(self, input):
'\n Args:\n input (torch.Tensor): Input tensor of shape [batch_size, self.in_chans, height, width]\n\n Returns:\n (torch.Tensor): Output tensor of shape [batch_size, self.out_chans, height, width]\n '
return self.layers(input) | Args:
input (torch.Tensor): Input tensor of shape [batch_size, self.in_chans, height, width]
Returns:
(torch.Tensor): Output tensor of shape [batch_size, self.out_chans, height, width] | models/unet_v2v/unet_model.py | forward | seansegal/fastMRI | 2 | python | def forward(self, input):
'\n Args:\n input (torch.Tensor): Input tensor of shape [batch_size, self.in_chans, height, width]\n\n Returns:\n (torch.Tensor): Output tensor of shape [batch_size, self.out_chans, height, width]\n '
return self.layers(input) | def forward(self, input):
'\n Args:\n input (torch.Tensor): Input tensor of shape [batch_size, self.in_chans, height, width]\n\n Returns:\n (torch.Tensor): Output tensor of shape [batch_size, self.out_chans, height, width]\n '
return self.layers(input)<|docstring|>Args... |
b40dde620709494b04cdd13caa13b6b90fb1efd370728477ce6a4b6ed3333d83 | def __init__(self, in_chans, out_chans, kv, drop_prob):
'\n Args:\n in_chans (int): Number of channels in the input.\n out_chans (int): Number of channels in the output.\n drop_prob (float): Dropout probability.\n '
super().__init__()
self.in_chans = in_chans
... | Args:
in_chans (int): Number of channels in the input.
out_chans (int): Number of channels in the output.
drop_prob (float): Dropout probability. | models/unet_v2v/unet_model.py | __init__ | seansegal/fastMRI | 2 | python | def __init__(self, in_chans, out_chans, kv, drop_prob):
'\n Args:\n in_chans (int): Number of channels in the input.\n out_chans (int): Number of channels in the output.\n drop_prob (float): Dropout probability.\n '
super().__init__()
self.in_chans = in_chans
... | def __init__(self, in_chans, out_chans, kv, drop_prob):
'\n Args:\n in_chans (int): Number of channels in the input.\n out_chans (int): Number of channels in the output.\n drop_prob (float): Dropout probability.\n '
super().__init__()
self.in_chans = in_chans
... |
846259ea34fe15411e507626e7399dad3868fdc9e12f3c5bb713e3002b687825 | def forward(self, input):
'\n Args:\n input (torch.Tensor): Input tensor of shape [batch_size, self.in_chans, height, width]\n\n Returns:\n (torch.Tensor): Output tensor of shape [batch_size, self.out_chans, height, width]\n '
return self.layers(input) | Args:
input (torch.Tensor): Input tensor of shape [batch_size, self.in_chans, height, width]
Returns:
(torch.Tensor): Output tensor of shape [batch_size, self.out_chans, height, width] | models/unet_v2v/unet_model.py | forward | seansegal/fastMRI | 2 | python | def forward(self, input):
'\n Args:\n input (torch.Tensor): Input tensor of shape [batch_size, self.in_chans, height, width]\n\n Returns:\n (torch.Tensor): Output tensor of shape [batch_size, self.out_chans, height, width]\n '
return self.layers(input) | def forward(self, input):
'\n Args:\n input (torch.Tensor): Input tensor of shape [batch_size, self.in_chans, height, width]\n\n Returns:\n (torch.Tensor): Output tensor of shape [batch_size, self.out_chans, height, width]\n '
return self.layers(input)<|docstring|>Args... |
bc7c409c8ce4a584e071e10d9916742818710fdee70cf1f58d1489fa0c97417a | def __init__(self, in_chans, out_chans, chans, num_pool_layers, drop_prob):
'\n Args:\n in_chans (int): Number of channels in the input to the U-Net model.\n out_chans (int): Number of channels in the output to the U-Net model.\n chans (int): Number of output channels of the ... | Args:
in_chans (int): Number of channels in the input to the U-Net model.
out_chans (int): Number of channels in the output to the U-Net model.
chans (int): Number of output channels of the first convolution layer.
num_pool_layers (int): Number of down-sampling and up-sampling layers.
drop_prob (flo... | models/unet_v2v/unet_model.py | __init__ | seansegal/fastMRI | 2 | python | def __init__(self, in_chans, out_chans, chans, num_pool_layers, drop_prob):
'\n Args:\n in_chans (int): Number of channels in the input to the U-Net model.\n out_chans (int): Number of channels in the output to the U-Net model.\n chans (int): Number of output channels of the ... | def __init__(self, in_chans, out_chans, chans, num_pool_layers, drop_prob):
'\n Args:\n in_chans (int): Number of channels in the input to the U-Net model.\n out_chans (int): Number of channels in the output to the U-Net model.\n chans (int): Number of output channels of the ... |
46cb722c72ed444fda1773288020672de336a8f9ca1d8d45a259b38a7dd53202 | def forward(self, input):
'\n Args:\n input (torch.Tensor): Input tensor of shape [batch_size, self.in_chans, height, width]\n\n Returns:\n (torch.Tensor): Output tensor of shape [batch_size, self.out_chans, height, width]\n '
stack = []
output = input
for (i, ... | Args:
input (torch.Tensor): Input tensor of shape [batch_size, self.in_chans, height, width]
Returns:
(torch.Tensor): Output tensor of shape [batch_size, self.out_chans, height, width] | models/unet_v2v/unet_model.py | forward | seansegal/fastMRI | 2 | python | def forward(self, input):
'\n Args:\n input (torch.Tensor): Input tensor of shape [batch_size, self.in_chans, height, width]\n\n Returns:\n (torch.Tensor): Output tensor of shape [batch_size, self.out_chans, height, width]\n '
stack = []
output = input
for (i, ... | def forward(self, input):
'\n Args:\n input (torch.Tensor): Input tensor of shape [batch_size, self.in_chans, height, width]\n\n Returns:\n (torch.Tensor): Output tensor of shape [batch_size, self.out_chans, height, width]\n '
stack = []
output = input
for (i, ... |
7f72a153c37b7628ab511dca3782f757d2e41ee910e0419fa573d5c64f11cbec | def load_iris(iris_path, shuffle=True, tsize=0.8):
'\n 加载iris数据\n '
data = pd.read_csv(iris_path, header=0, delimiter=',')
if shuffle:
data = utils.shuffle(data)
species_dict = {'Iris-setosa': 0, 'Iris-versicolor': 1, 'Iris-virginica': 2}
data['Species'] = data['Species'].map(species_d... | 加载iris数据 | coding/classifier/decision_boundary.py | load_iris | deep-learning-algorithm/cs231n | 1 | python | def load_iris(iris_path, shuffle=True, tsize=0.8):
'\n \n '
data = pd.read_csv(iris_path, header=0, delimiter=',')
if shuffle:
data = utils.shuffle(data)
species_dict = {'Iris-setosa': 0, 'Iris-versicolor': 1, 'Iris-virginica': 2}
data['Species'] = data['Species'].map(species_dict)
... | def load_iris(iris_path, shuffle=True, tsize=0.8):
'\n \n '
data = pd.read_csv(iris_path, header=0, delimiter=',')
if shuffle:
data = utils.shuffle(data)
species_dict = {'Iris-setosa': 0, 'Iris-versicolor': 1, 'Iris-virginica': 2}
data['Species'] = data['Species'].map(species_dict)
... |
742f9b3c2bc22f7def11eb61507ac1802f484c8a797d8d376129c7c47c8bbf5c | def pca(X, ratio=0.99, **kwargs):
'\n pca降维\n :param X: 大小为NxM,其中M是个数,N是维度,每个字段已是零均值\n :param ratio: 表示投影均方误差和方差比值,默认为0.99,保持99%的方差\n :param kwargs: 字典参数,如果指定了k值,则直接计算\n :return: 降维后数据\n '
(N, M) = X.shape[:2]
C = (X.dot(X.T) / M)
(u, s, v) = np.linalg.svd(C)
k = 1
if ('k' in k... | pca降维
:param X: 大小为NxM,其中M是个数,N是维度,每个字段已是零均值
:param ratio: 表示投影均方误差和方差比值,默认为0.99,保持99%的方差
:param kwargs: 字典参数,如果指定了k值,则直接计算
:return: 降维后数据 | coding/classifier/decision_boundary.py | pca | deep-learning-algorithm/cs231n | 1 | python | def pca(X, ratio=0.99, **kwargs):
'\n pca降维\n :param X: 大小为NxM,其中M是个数,N是维度,每个字段已是零均值\n :param ratio: 表示投影均方误差和方差比值,默认为0.99,保持99%的方差\n :param kwargs: 字典参数,如果指定了k值,则直接计算\n :return: 降维后数据\n '
(N, M) = X.shape[:2]
C = (X.dot(X.T) / M)
(u, s, v) = np.linalg.svd(C)
k = 1
if ('k' in k... | def pca(X, ratio=0.99, **kwargs):
'\n pca降维\n :param X: 大小为NxM,其中M是个数,N是维度,每个字段已是零均值\n :param ratio: 表示投影均方误差和方差比值,默认为0.99,保持99%的方差\n :param kwargs: 字典参数,如果指定了k值,则直接计算\n :return: 降维后数据\n '
(N, M) = X.shape[:2]
C = (X.dot(X.T) / M)
(u, s, v) = np.linalg.svd(C)
k = 1
if ('k' in k... |
ca018593104d6b0dd61e4217621e13539160c2609a5e06c020c095c244014be4 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
295188694246f118f97e5b6b2195c517e2108aa00d9230f499edebf85ae46703 | def call(self, tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returne... | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returne... | def call(self, tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returne... |
9ea0157eb6440eac095230a57efab5746974fbf6138037de26bad21761597b37 | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact... | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact... | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact... |
6f2a541c7014fdc8f155b3763c2bdb103b684bbe9b83febdadafc5995b919d1d | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
11d4f9b449306eaf388ea7867de46d23b67cc54826ff61b156b8775f61102218 | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict()) | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext... |
d096226231897f3522f857a359839dfd4c5a68386432b970451a0ddc46142c92 | def validate_and_normalize_inputs(self, to: str, token_id: int):
'Validate the inputs to the approve method.'
self.validator.assert_valid(method_name='approve', parameter_name='to', argument_value=to)
to = self.validate_and_checksum_address(to)
self.validator.assert_valid(method_name='approve', paramete... | Validate the inputs to the approve method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, to: str, token_id: int):
self.validator.assert_valid(method_name='approve', parameter_name='to', argument_value=to)
to = self.validate_and_checksum_address(to)
self.validator.assert_valid(method_name='approve', parameter_name='tokenId', argument_value=token_id)
... | def validate_and_normalize_inputs(self, to: str, token_id: int):
self.validator.assert_valid(method_name='approve', parameter_name='to', argument_value=to)
to = self.validate_and_checksum_address(to)
self.validator.assert_valid(method_name='approve', parameter_name='tokenId', argument_value=token_id)
... |
36c8f3ba57fe3dc1b90d3d21591312c2622594992500be387484b8d764d9b109 | def call(self, to: str, token_id: int, tx_params: Optional[TxParams]=None) -> None:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(to, token_id) = self.validate_and_normalize_inputs(t... | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, to: str, token_id: int, tx_params: Optional[TxParams]=None) -> None:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(to, token_id) = self.validate_and_normalize_inputs(t... | def call(self, to: str, token_id: int, tx_params: Optional[TxParams]=None) -> None:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(to, token_id) = self.validate_and_normalize_inputs(t... |
9be56c4eb4109ae96c46899792792ce4246198dc3a699318c09deb0d458376a0 | def send_transaction(self, to: str, token_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(to, token_id) = self.validate_and_normalize_inputs(to, token_id)
tx... | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, to: str, token_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(to, token_id) = self.validate_and_normalize_inputs(to, token_id)
tx... | def send_transaction(self, to: str, token_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(to, token_id) = self.validate_and_normalize_inputs(to, token_id)
tx... |
08680449adc58a1ba97d56f1e874f032dbcce34d0cd33e1e91577932a2de3ab6 | def build_transaction(self, to: str, token_id: int, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
(to, token_id) = self.validate_and_normalize_inputs(to, token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(to,... | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, to: str, token_id: int, tx_params: Optional[TxParams]=None) -> dict:
(to, token_id) = self.validate_and_normalize_inputs(to, token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(to, token_id).buildTransaction(tx_params.as_dict()) | def build_transaction(self, to: str, token_id: int, tx_params: Optional[TxParams]=None) -> dict:
(to, token_id) = self.validate_and_normalize_inputs(to, token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(to, token_id).buildTransaction(tx_params.as_dict())<|docst... |
c7b48fe710d2a11cab114e08e02b77e3b9d477ca729656a5036caaa6d3151411 | def estimate_gas(self, to: str, token_id: int, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
(to, token_id) = self.validate_and_normalize_inputs(to, token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(to, token_id).estimate... | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, to: str, token_id: int, tx_params: Optional[TxParams]=None) -> int:
(to, token_id) = self.validate_and_normalize_inputs(to, token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(to, token_id).estimateGas(tx_params.as_dict()) | def estimate_gas(self, to: str, token_id: int, tx_params: Optional[TxParams]=None) -> int:
(to, token_id) = self.validate_and_normalize_inputs(to, token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(to, token_id).estimateGas(tx_params.as_dict())<|docstring|>Estim... |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext... |
58ced37a6e6c38ba0edf1b248f83c0d3d6bfda199c6181f7721dbeb9928fa395 | def validate_and_normalize_inputs(self, owner: str):
'Validate the inputs to the balanceOf method.'
self.validator.assert_valid(method_name='balanceOf', parameter_name='owner', argument_value=owner)
owner = self.validate_and_checksum_address(owner)
return owner | Validate the inputs to the balanceOf method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, owner: str):
self.validator.assert_valid(method_name='balanceOf', parameter_name='owner', argument_value=owner)
owner = self.validate_and_checksum_address(owner)
return owner | def validate_and_normalize_inputs(self, owner: str):
self.validator.assert_valid(method_name='balanceOf', parameter_name='owner', argument_value=owner)
owner = self.validate_and_checksum_address(owner)
return owner<|docstring|>Validate the inputs to the balanceOf method.<|endoftext|> |
62d1890204bd88d3124baa73394717841e7ae93d4c1bdd708deb52cc9c09ed09 | def call(self, owner: str, tx_params: Optional[TxParams]=None) -> int:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
owner = self.validate_and_normalize_inputs(owner)
tx_params = ... | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, owner: str, tx_params: Optional[TxParams]=None) -> int:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
owner = self.validate_and_normalize_inputs(owner)
tx_params = ... | def call(self, owner: str, tx_params: Optional[TxParams]=None) -> int:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
owner = self.validate_and_normalize_inputs(owner)
tx_params = ... |
35ee0d658b2cb40c70a30aa7cfe66f791ccdbb8352ca070b7d8458b6c0580ffe | def send_transaction(self, owner: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
owner = self.validate_and_normalize_inputs(owner)
tx_params = super().normalize_... | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, owner: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
owner = self.validate_and_normalize_inputs(owner)
tx_params = super().normalize_... | def send_transaction(self, owner: str, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
owner = self.validate_and_normalize_inputs(owner)
tx_params = super().normalize_... |
bb4de28c739cfa68029f5b225ed2570406e93e15090d27b844220ed39a3ed74c | def build_transaction(self, owner: str, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
owner = self.validate_and_normalize_inputs(owner)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(owner).buildTransaction(tx_para... | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, owner: str, tx_params: Optional[TxParams]=None) -> dict:
owner = self.validate_and_normalize_inputs(owner)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(owner).buildTransaction(tx_params.as_dict()) | def build_transaction(self, owner: str, tx_params: Optional[TxParams]=None) -> dict:
owner = self.validate_and_normalize_inputs(owner)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(owner).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used... |
e0475dae447f41abd0f357f8f398528e17692f0443a2fe534d022f53010c53b6 | def estimate_gas(self, owner: str, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
owner = self.validate_and_normalize_inputs(owner)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(owner).estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, owner: str, tx_params: Optional[TxParams]=None) -> int:
owner = self.validate_and_normalize_inputs(owner)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(owner).estimateGas(tx_params.as_dict()) | def estimate_gas(self, owner: str, tx_params: Optional[TxParams]=None) -> int:
owner = self.validate_and_normalize_inputs(owner)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(owner).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.... |
ca018593104d6b0dd61e4217621e13539160c2609a5e06c020c095c244014be4 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
295188694246f118f97e5b6b2195c517e2108aa00d9230f499edebf85ae46703 | def call(self, tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returne... | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returne... | def call(self, tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returne... |
9ea0157eb6440eac095230a57efab5746974fbf6138037de26bad21761597b37 | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact... | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact... | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact... |
6f2a541c7014fdc8f155b3763c2bdb103b684bbe9b83febdadafc5995b919d1d | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
11d4f9b449306eaf388ea7867de46d23b67cc54826ff61b156b8775f61102218 | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict()) | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
ca018593104d6b0dd61e4217621e13539160c2609a5e06c020c095c244014be4 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
ca32d6807ebd9ceb15a2b64a172e6e81cfc9485bd1945b8aaf7461f0c2f67e87 | def call(self, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned = self._underl... | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned = self._underl... | def call(self, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned = self._underl... |
9ea0157eb6440eac095230a57efab5746974fbf6138037de26bad21761597b37 | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact... | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact... | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact... |
6f2a541c7014fdc8f155b3763c2bdb103b684bbe9b83febdadafc5995b919d1d | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
11d4f9b449306eaf388ea7867de46d23b67cc54826ff61b156b8775f61102218 | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict()) | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
ca018593104d6b0dd61e4217621e13539160c2609a5e06c020c095c244014be4 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
0d1feb2b3a7b114d5d1bcc63471ea6bd5ae2bbae2a964758f4d2e917c7d5b29a | def call(self, tx_params: Optional[TxParams]=None) -> int:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned = self._underl... | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, tx_params: Optional[TxParams]=None) -> int:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned = self._underl... | def call(self, tx_params: Optional[TxParams]=None) -> int:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned = self._underl... |
9ea0157eb6440eac095230a57efab5746974fbf6138037de26bad21761597b37 | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact... | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact... | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact... |
6f2a541c7014fdc8f155b3763c2bdb103b684bbe9b83febdadafc5995b919d1d | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
11d4f9b449306eaf388ea7867de46d23b67cc54826ff61b156b8775f61102218 | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict()) | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext... |
b76b77deb7e8872b038fde53d1ad6ca36fcbd1a4f84057fa077f59488b979bc7 | def validate_and_normalize_inputs(self, token_id: int):
'Validate the inputs to the getApproved method.'
self.validator.assert_valid(method_name='getApproved', parameter_name='tokenId', argument_value=token_id)
token_id = int(token_id)
return token_id | Validate the inputs to the getApproved method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, token_id: int):
self.validator.assert_valid(method_name='getApproved', parameter_name='tokenId', argument_value=token_id)
token_id = int(token_id)
return token_id | def validate_and_normalize_inputs(self, token_id: int):
self.validator.assert_valid(method_name='getApproved', parameter_name='tokenId', argument_value=token_id)
token_id = int(token_id)
return token_id<|docstring|>Validate the inputs to the getApproved method.<|endoftext|> |
b4ffa91a77acf497f87845e803e7008e5aac6ef4505645f6d2a013bf16ca4e81 | def call(self, token_id: int, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
token_id = self.validate_and_normalize_inputs(token_id)
tx_... | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, token_id: int, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
token_id = self.validate_and_normalize_inputs(token_id)
tx_... | def call(self, token_id: int, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
token_id = self.validate_and_normalize_inputs(token_id)
tx_... |
e27f80815f34ab833e17016d58c78e88a1e64dce6c8824207fba04df6aa3d88e | def send_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().n... | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().n... | def send_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().n... |
687dfac0950732365c580176289be1f67bed0b6a35eea8671dbe2d8d8c5059ec | def build_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).buildTransac... | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> dict:
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).buildTransaction(tx_params.as_dict()) | def build_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> dict:
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldat... |
97cb33886d64af0a51559709537b845f521d6110be3b37d16b1d9830eccf83f5 | def estimate_gas(self, token_id: int, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).estimateGas(tx_params.as_dict()... | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, token_id: int, tx_params: Optional[TxParams]=None) -> int:
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).estimateGas(tx_params.as_dict()) | def estimate_gas(self, token_id: int, tx_params: Optional[TxParams]=None) -> int:
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(token_id).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of ... |
ca018593104d6b0dd61e4217621e13539160c2609a5e06c020c095c244014be4 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction):
super().__init__(web3_or_provider, contract_address)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext|> |
81d7fc00919098be3d7a12dc56a12ed81c98758fc8d7a6478e724579ba03a321 | def call(self, tx_params: Optional[TxParams]=None) -> Tuple[(str, int)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned ... | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, tx_params: Optional[TxParams]=None) -> Tuple[(str, int)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned ... | def call(self, tx_params: Optional[TxParams]=None) -> Tuple[(str, int)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
tx_params = super().normalize_tx_params(tx_params)
returned ... |
9ea0157eb6440eac095230a57efab5746974fbf6138037de26bad21761597b37 | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact... | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact... | def send_transaction(self, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().transact... |
6f2a541c7014fdc8f155b3763c2bdb103b684bbe9b83febdadafc5995b919d1d | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict()) | def build_transaction(self, tx_params: Optional[TxParams]=None) -> dict:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().buildTransaction(tx_params.as_dict())<|docstring|>Construct calldata to be used as input to the method.<|endoftext|> |
11d4f9b449306eaf388ea7867de46d23b67cc54826ff61b156b8775f61102218 | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict()) | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict()) | def estimate_gas(self, tx_params: Optional[TxParams]=None) -> int:
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method().estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of method call.<|endoftext|> |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext... |
d0a6aab9a762954195f1451db2de2f436f8fee91627198f7885f2c494e7a82ab | def validate_and_normalize_inputs(self, role: Union[(bytes, str)]):
'Validate the inputs to the getRoleAdmin method.'
self.validator.assert_valid(method_name='getRoleAdmin', parameter_name='role', argument_value=role)
return role | Validate the inputs to the getRoleAdmin method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, role: Union[(bytes, str)]):
self.validator.assert_valid(method_name='getRoleAdmin', parameter_name='role', argument_value=role)
return role | def validate_and_normalize_inputs(self, role: Union[(bytes, str)]):
self.validator.assert_valid(method_name='getRoleAdmin', parameter_name='role', argument_value=role)
return role<|docstring|>Validate the inputs to the getRoleAdmin method.<|endoftext|> |
ccfdc990ea95831deb6f60c2470cf669df55073a05ddce2700c51a57616c243d | def call(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
role = self.validate_and_normalize_... | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
role = self.validate_and_normalize_... | def call(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(bytes, str)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
role = self.validate_and_normalize_... |
ed5e7bb8efebffc5294bf0de4ed2024b31fea35791d6445d835f8dc6fad520a4 | def send_transaction(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
role = self.validate_and_normalize_inputs(role)
tx_params = super... | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
role = self.validate_and_normalize_inputs(role)
tx_params = super... | def send_transaction(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
role = self.validate_and_normalize_inputs(role)
tx_params = super... |
e561df63cd344b14609b0e8e8ad178be3f709174a1d45687017f6dfc69efb8aa | def build_transaction(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
role = self.validate_and_normalize_inputs(role)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role).buildTransac... | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> dict:
role = self.validate_and_normalize_inputs(role)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role).buildTransaction(tx_params.as_dict()) | def build_transaction(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> dict:
role = self.validate_and_normalize_inputs(role)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldat... |
01d5c30486f6f3e438e4b89cbce5830e7c0c7f2d9cd5f8cce6beff9e1da6608a | def estimate_gas(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
role = self.validate_and_normalize_inputs(role)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role).estimateGas(tx_params.as_dict()... | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
role = self.validate_and_normalize_inputs(role)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role).estimateGas(tx_params.as_dict()) | def estimate_gas(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
role = self.validate_and_normalize_inputs(role)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of ... |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext... |
15b140b7e9c481d65c5df1a4e949d004d121973ce236d036c00934994c2a9bc7 | def validate_and_normalize_inputs(self, role: Union[(bytes, str)], index: int):
'Validate the inputs to the getRoleMember method.'
self.validator.assert_valid(method_name='getRoleMember', parameter_name='role', argument_value=role)
self.validator.assert_valid(method_name='getRoleMember', parameter_name='ind... | Validate the inputs to the getRoleMember method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, role: Union[(bytes, str)], index: int):
self.validator.assert_valid(method_name='getRoleMember', parameter_name='role', argument_value=role)
self.validator.assert_valid(method_name='getRoleMember', parameter_name='index', argument_value=index)
index = int(index)
... | def validate_and_normalize_inputs(self, role: Union[(bytes, str)], index: int):
self.validator.assert_valid(method_name='getRoleMember', parameter_name='role', argument_value=role)
self.validator.assert_valid(method_name='getRoleMember', parameter_name='index', argument_value=index)
index = int(index)
... |
72853995c228f42af1f9c5e446ac9f1579e37e11c464429cf596dea520ec4a82 | def call(self, role: Union[(bytes, str)], index: int, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(role, index) = self.validate_and_norma... | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, role: Union[(bytes, str)], index: int, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(role, index) = self.validate_and_norma... | def call(self, role: Union[(bytes, str)], index: int, tx_params: Optional[TxParams]=None) -> str:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
(role, index) = self.validate_and_norma... |
3b704dafa01bd6d7c8da0469749dca0f128de5ac5db10f2439232fbdd75d9083 | def send_transaction(self, role: Union[(bytes, str)], index: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(role, index) = self.validate_and_normalize_inputs(role, ... | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, role: Union[(bytes, str)], index: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(role, index) = self.validate_and_normalize_inputs(role, ... | def send_transaction(self, role: Union[(bytes, str)], index: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
(role, index) = self.validate_and_normalize_inputs(role, ... |
8758304db4e5eeb44fc2717379bce41d25f2045e04e325e998d45961f9c885be | def build_transaction(self, role: Union[(bytes, str)], index: int, tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
(role, index) = self.validate_and_normalize_inputs(role, index)
tx_params = super().normalize_tx_params(tx_params)
return self._underlyi... | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, role: Union[(bytes, str)], index: int, tx_params: Optional[TxParams]=None) -> dict:
(role, index) = self.validate_and_normalize_inputs(role, index)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, index).buildTransaction(tx_params.as_di... | def build_transaction(self, role: Union[(bytes, str)], index: int, tx_params: Optional[TxParams]=None) -> dict:
(role, index) = self.validate_and_normalize_inputs(role, index)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, index).buildTransaction(tx_params.as_di... |
8e9746150ea08da633cfb40c4c4f13e2c4ea4dfdfe0b215ef09c787318956d22 | def estimate_gas(self, role: Union[(bytes, str)], index: int, tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
(role, index) = self.validate_and_normalize_inputs(role, index)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, ind... | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, role: Union[(bytes, str)], index: int, tx_params: Optional[TxParams]=None) -> int:
(role, index) = self.validate_and_normalize_inputs(role, index)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, index).estimateGas(tx_params.as_dict()) | def estimate_gas(self, role: Union[(bytes, str)], index: int, tx_params: Optional[TxParams]=None) -> int:
(role, index) = self.validate_and_normalize_inputs(role, index)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role, index).estimateGas(tx_params.as_dict())<|docs... |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext... |
7d9347292f0bd8cd5383905c728696c4c1551669b7059b3aadffc13714500266 | def validate_and_normalize_inputs(self, role: Union[(bytes, str)]):
'Validate the inputs to the getRoleMemberCount method.'
self.validator.assert_valid(method_name='getRoleMemberCount', parameter_name='role', argument_value=role)
return role | Validate the inputs to the getRoleMemberCount method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, role: Union[(bytes, str)]):
self.validator.assert_valid(method_name='getRoleMemberCount', parameter_name='role', argument_value=role)
return role | def validate_and_normalize_inputs(self, role: Union[(bytes, str)]):
self.validator.assert_valid(method_name='getRoleMemberCount', parameter_name='role', argument_value=role)
return role<|docstring|>Validate the inputs to the getRoleMemberCount method.<|endoftext|> |
3547b7860fddf17b978eaf703beb35cf850b9bbfedb1ef6bbfd641a272117308 | def call(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
role = self.validate_and_normalize_inputs(role)
... | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
role = self.validate_and_normalize_inputs(role)
... | def call(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
role = self.validate_and_normalize_inputs(role)
... |
ed5e7bb8efebffc5294bf0de4ed2024b31fea35791d6445d835f8dc6fad520a4 | def send_transaction(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
role = self.validate_and_normalize_inputs(role)
tx_params = super... | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
role = self.validate_and_normalize_inputs(role)
tx_params = super... | def send_transaction(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
role = self.validate_and_normalize_inputs(role)
tx_params = super... |
e561df63cd344b14609b0e8e8ad178be3f709174a1d45687017f6dfc69efb8aa | def build_transaction(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> dict:
'Construct calldata to be used as input to the method.'
role = self.validate_and_normalize_inputs(role)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role).buildTransac... | Construct calldata to be used as input to the method. | thirdweb/abi/multiwrap.py | build_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def build_transaction(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> dict:
role = self.validate_and_normalize_inputs(role)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role).buildTransaction(tx_params.as_dict()) | def build_transaction(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> dict:
role = self.validate_and_normalize_inputs(role)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role).buildTransaction(tx_params.as_dict())<|docstring|>Construct calldat... |
01d5c30486f6f3e438e4b89cbce5830e7c0c7f2d9cd5f8cce6beff9e1da6608a | def estimate_gas(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
'Estimate gas consumption of method call.'
role = self.validate_and_normalize_inputs(role)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role).estimateGas(tx_params.as_dict()... | Estimate gas consumption of method call. | thirdweb/abi/multiwrap.py | estimate_gas | nftlabs/nftlabs-sdk-python | 30 | python | def estimate_gas(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
role = self.validate_and_normalize_inputs(role)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role).estimateGas(tx_params.as_dict()) | def estimate_gas(self, role: Union[(bytes, str)], tx_params: Optional[TxParams]=None) -> int:
role = self.validate_and_normalize_inputs(role)
tx_params = super().normalize_tx_params(tx_params)
return self._underlying_method(role).estimateGas(tx_params.as_dict())<|docstring|>Estimate gas consumption of ... |
bd6ecbd21737798857673ddd577f664fcc7a46e09b0c38a5ecabaa08667bed75 | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
'Persist instance data.'
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | Persist instance data. | thirdweb/abi/multiwrap.py | __init__ | nftlabs/nftlabs-sdk-python | 30 | python | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function | def __init__(self, web3_or_provider: Union[(Web3, BaseProvider)], contract_address: str, contract_function: ContractFunction, validator: Validator=None):
super().__init__(web3_or_provider, contract_address, validator)
self._underlying_method = contract_function<|docstring|>Persist instance data.<|endoftext... |
8573862374b35b69c41524565a33ff357c192a42df89da0a366b862e2b20cb0e | def validate_and_normalize_inputs(self, token_id: int):
'Validate the inputs to the getRoyaltyInfoForToken method.'
self.validator.assert_valid(method_name='getRoyaltyInfoForToken', parameter_name='_tokenId', argument_value=token_id)
token_id = int(token_id)
return token_id | Validate the inputs to the getRoyaltyInfoForToken method. | thirdweb/abi/multiwrap.py | validate_and_normalize_inputs | nftlabs/nftlabs-sdk-python | 30 | python | def validate_and_normalize_inputs(self, token_id: int):
self.validator.assert_valid(method_name='getRoyaltyInfoForToken', parameter_name='_tokenId', argument_value=token_id)
token_id = int(token_id)
return token_id | def validate_and_normalize_inputs(self, token_id: int):
self.validator.assert_valid(method_name='getRoyaltyInfoForToken', parameter_name='_tokenId', argument_value=token_id)
token_id = int(token_id)
return token_id<|docstring|>Validate the inputs to the getRoyaltyInfoForToken method.<|endoftext|> |
996e491e56b4350c42aaab82112ca2bc09289b9d4d54c085a81590b6aa55bc08 | def call(self, token_id: int, tx_params: Optional[TxParams]=None) -> Tuple[(str, int)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
token_id = self.validate_and_normalize_inputs(tok... | Execute underlying contract method via eth_call.
:param tx_params: transaction parameters
:returns: the return value of the underlying method. | thirdweb/abi/multiwrap.py | call | nftlabs/nftlabs-sdk-python | 30 | python | def call(self, token_id: int, tx_params: Optional[TxParams]=None) -> Tuple[(str, int)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
token_id = self.validate_and_normalize_inputs(tok... | def call(self, token_id: int, tx_params: Optional[TxParams]=None) -> Tuple[(str, int)]:
'Execute underlying contract method via eth_call.\n\n :param tx_params: transaction parameters\n :returns: the return value of the underlying method.\n '
token_id = self.validate_and_normalize_inputs(tok... |
e27f80815f34ab833e17016d58c78e88a1e64dce6c8824207fba04df6aa3d88e | def send_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().n... | Execute underlying contract method via eth_sendTransaction.
:param tx_params: transaction parameters | thirdweb/abi/multiwrap.py | send_transaction | nftlabs/nftlabs-sdk-python | 30 | python | def send_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().n... | def send_transaction(self, token_id: int, tx_params: Optional[TxParams]=None) -> Union[(HexBytes, bytes)]:
'Execute underlying contract method via eth_sendTransaction.\n\n :param tx_params: transaction parameters\n '
token_id = self.validate_and_normalize_inputs(token_id)
tx_params = super().n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.