Registers with a Hue hub
183852
public function register()
    {
        $pest   = new Pest( "http://" . $this->bridge . "/api" );
        $data   = json_encode( array( 'devicetype' => 'phpHue' ) );
        $result = $pest->post( '', $data );

        return $result;
    }
715531
def register():
    """"""
    signals.initialized.connect(initialized)
    try:
        signals.content_object_init.connect(detect_content)
        signals.all_generators_finalized.connect(detect_images_and_galleries)
        signals.article_writer_finalized.connect(resize_photos)
    except Exception as e:
        logger.exception('Plugin failed to execute: {}'.format(pprint.pformat(e)))
702698
def register_callback(self, sensorid, callback, user_data=None):
        """"""
        if sensorid not in self._registry:
            self._registry[sensorid] = list()
        self._registry[sensorid].append((callback, user_data))
561622
def cli(env, identifier, enable):
    """"""

    mgr = SoftLayer.HardwareManager(env.client)
    hw_id = helpers.resolve_id(mgr.resolve_ids, identifier, 'hardware')
    result = env.client['Hardware_Server'].toggleManagementInterface(enable, id=hw_id)
    env.fout(result)
1362180
def register(self, switch, signal=signals.switch_registered):
        '''
        
        '''
        if not switch.name:
            raise ValueError('Switch name cannot be blank')

        switch.manager = self
        self.__persist(switch)

        signal.call(switch)
1325888
def register(self):
        """"""
        log.info('Installing ssh key, %s' % self.name)
        self.consul.create_ssh_pub_key(self.name, self.key)
1020918
def register_widget(widget):
    
    if widget in registry:
        raise WidgetAlreadyRegistered(
            _('The widget %s has already been registered.') % widget.__name__)
    registry.append(widget)
521262
def register_plugin(self):
        """"""
        self.focus_changed.connect(self.main.plugin_focus_changed)
        self.main.add_dockwidget(self)
        self.ipyconsole = self.main.ipyconsole
        self.create_new_client(give_focus=False)
        icon_path = os.path.join(PACKAGE_PATH, 'images', 'icon.svg')
        self.main.add_to_fileswitcher(self, self.tabwidget, self.clients,
                                      QIcon(icon_path))
        self.recent_notebook_menu.aboutToShow.connect(self.setup_menu_actions)
593774
def register(host=DFLT_ADDRESS[0], port=DFLT_ADDRESS[1],
             signum=signal.SIGUSR1):
    
    _pdbhandler._register(host, port, signum)
1364878
function register(Shader) {
    // Some build in shaders
    Shader['import'](coloradjustEssl);
    Shader['import'](blurEssl);
    Shader['import'](lumEssl);
    Shader['import'](lutEssl);
    Shader['import'](vigentteEssl);
    Shader['import'](outputEssl);
    Shader['import'](brightEssl);
    Shader['import'](downsampleEssl);
    Shader['import'](upsampleEssl);
    Shader['import'](hdrEssl);
    Shader['import'](lensflareEssl);
    Shader['import'](blendEssl);

    Shader['import'](fxaaEssl);

}
658786
def register_led_updates(self, callback, button):
        """"""
        button_callbacks = self._button_observer_callbacks.get(button)
        if not button_callbacks:
            self._button_observer_callbacks[button] = []
        _LOGGER.debug('New callback for button %d', button)
        self._button_observer_callbacks[button].append(callback)
845399
@SuppressWarnings("unused")
    private synchronized static void registerLanczosOperator() {
        LanczosDescriptor lanczosDescriptor = new LanczosDescriptor();
        RenderedImageFactory rif = new LanczosCRIF();
        
        registerRIFOperator(lanczosDescriptor, rif, "Lanczos", "com.alibaba.platform", "rendered");
    }
1271259
def register(lib_name: str, cbl: Callable[[_AsyncLib], None]):
    '''
    
    '''
    return manager.register(lib_name, cbl)
294005
def register(self, addr, ttl):
        """"""
        # a little error checking
        if ttl <= 0:
            raise ValueError("time-to-live must be greater than zero")

        # save the BBMD address and time-to-live
        if isinstance(addr, Address):
            self.bbmdAddress = addr
        else:
            self.bbmdAddress = Address(addr)
        self.bbmdTimeToLive = ttl

        # install this task to run when it gets a chance
        self.install_task(when=0)
396591
def register():
    """"""
    if not plim:
        logger.warning('`slim` failed to load dependency `plim`. '
                       '`slim` plugin not loaded.')
        return
    if not mako:
        logger.warning('`slim` failed to load dependency `mako`. '
                       '`slim` plugin not loaded.')
        return
    if not bs:
        logger.warning('`slim` failed to load dependency `BeautifulSoup4`. '
                       '`slim` plugin not loaded.')
        return
    if not minify:
        logger.warning('`slim` failed to load dependency `htmlmin`. '
                       '`slim` plugin not loaded.')
        return

    signals.get_writer.connect(get_writer)
1286174
def set_hue(self, hue, duration=0, rapid=False):
        
        color = self.get_color()
        color2 = (hue, color[1], color[2], color[3])
        try:
            if rapid:
                self.fire_and_forget(LightSetColor, {"color": color2, "duration": duration}, num_repeats=1)
            else:
                self.req_with_ack(LightSetColor, {"color": color2, "duration": duration})
        except WorkflowException as e:
            raise
753449
def _post_init(self):
        """"""
        if WIN:
            self._find_devices_win()
        elif MAC:
            self._find_devices_mac()
        else:
            self._find_devices()
        self._update_all_devices()
        if NIX:
            self._find_leds()