Publish to only myself
972923
def publishToMyself(self, roomId, name, data):
        
        self.publishToRoom(roomId, name, data, [self])
338786
protected function offerPublishing()
    {
        if ($this->app->runningInConsole()) {
            $this->publishes([
                __DIR__.'/../stubs/HorizonServiceProvider.stub' => app_path('Providers/HorizonServiceProvider.php'),
            ], 'horizon-provider');

            $this->publishes([
                __DIR__.'/../config/horizon.php' => config_path('horizon.php'),
            ], 'horizon-config');
        }
    }
1145974
public void publish() {

        CmsDirectPublishDialogAction action = new CmsDirectPublishDialogAction();
        List<CmsResource> resources = getBundleResources();
        I_CmsDialogContext context = new A_CmsDialogContext("", ContextType.appToolbar, resources) {

            public void focus(CmsUUID structureId) {

                //Nothing to do.
            }

            public List<CmsUUID> getAllStructureIdsInView() {

                return null;
            }

            public void updateUserInfo() {

                //Nothing to do.
            }
        };
        action.executeAction(context);
        updateLockInformation();

    }
622034
def publish(self):
        '''
        
        '''

        self.cleanup

        remote = self.remote
        branch = self.branch
        return self.m(
            'pushing changes to %s/%s' % (remote, branch),
            cmdd=dict(
                cmd='git push -u %s %s' % (remote, branch),
                cwd=self.local
            ),
            more=dict(remote=remote, branch=branch)
        )
5313
def publish(ctx, test=False):
    """"""
    clean(ctx)
    if test:
        run('python setup.py register -r test sdist bdist_wheel', echo=True)
        run('twine upload dist/* -r test', echo=True)
    else:
        run('python setup.py register sdist bdist_wheel', echo=True)
        run('twine upload dist/*', echo=True)
1101879
protected void doPublish(String tenantId, List<T> items, String subscriber,
            int retryCount, long delay) throws Exception {
        String data = mapper.writeValueAsString(items);

        TextMessage tm = session.createTextMessage(data);

        if (tenantId != null) {
            tm.setStringProperty("tenant", tenantId);
        }

        if (subscriber != null) {
            tm.setStringProperty("subscriber", subscriber);
        }

        tm.setIntProperty("retryCount", retryCount);

        if (delay > 0) {
            tm.setLongProperty("_AMQ_SCHED_DELIVERY", System.currentTimeMillis() + delay);
        }

        if (log.isLoggable(Level.FINEST)) {
            log.finest("Publish: " + tm);
        }

        producer.send(tm);
    }
784983
def only_published(cls, at=None):
		
		
		if isinstance(at, timedelta):
			at = utcnow() + at
		else:
			at = at or utcnow()
		
		pub, ret = cls.published, cls.retracted
		
		publication = (-pub) | (pub == None) | (pub <= at)
		retraction = (-ret) | (ret == None) | (ret > at)
		
		return publication & retraction
18164
def publish(self, message, exchange, routing_key, mandatory=None,
            immediate=None, headers=None):
        """"""
        body, properties = message

        if headers:
            properties.headers = headers

        ret = self.channel.basic_publish(body=body,
                                         properties=properties,
                                         exchange=exchange,
                                         routing_key=routing_key,
                                         mandatory=mandatory,
                                         immediate=immediate)
        if mandatory or immediate:
            self.close()
164077
private void publishEvent(WSJobExecution objectToPublish, String eventToPublishTo, String correlationId) {
        if (eventsPublisher != null) {
            eventsPublisher.publishJobExecutionEvent(objectToPublish, eventToPublishTo, correlationId);
        }
    }
73857
def unpublish_object(content_type_pk, obj_pk):
    
    ct = ContentType.objects.get_for_id(content_type_pk)
    obj = ct.get_object_for_this_type(pk=obj_pk)
    try:
        # Unbuild the object
        logger.info("unpublish_object task has received %s" % obj)
        obj.unbuild()
        # Run the `publish` management command unless the
        # ALLOW_BAKERY_AUTO_PUBLISHING variable is explictly set to False.
        if not getattr(settings, 'ALLOW_BAKERY_AUTO_PUBLISHING', True):
            logger.info("Not running publish command because \
ALLOW_BAKERY_AUTO_PUBLISHING is False")
        else:
            management.call_command("publish")
    except Exception:
        # Log the error if this crashes
        logger.error("Task Error: unpublish_object", exc_info=True)
1125184
def publish(self, topic, payload, qos, retain):
        """"""
        self._mqttc.publish(topic, payload, qos, retain)
1166403
private void publishEvent(WSJobExecution objectToPublish, String eventToPublishTo) {
        if (getBatchEventsPublisher() != null) {
            getBatchEventsPublisher().publishJobExecutionEvent(objectToPublish, eventToPublishTo, correlationId);
        }
    }
258101
def publish(self, **kwargs):
        ""
        log.debug('Publish to {0}'.format(self))
        self.signal.send(sender=self.name, **kwargs)
1077525
def publish(self, message_type, client_id, client_storage, *args, **kwargs):
        
        p = self.pack(message_type, client_id, client_storage, args, kwargs)
        self.client.publish(self.channel, p)
1019818
def __on_publish(self, client, userdata, mid):
        # pylint: disable=W0613
        
        try:
            self.__in_flight[mid].set()
        except KeyError:
            pass
120055
def publish():
    """"""
    long_description = make_long_description()

    if long_description != read(RST_DESCRIPTION_PATH):
        print("""\
Description file not up-to-date: %s
Run the following command and commit the changes--

    python setup.py %s
""" % (RST_DESCRIPTION_PATH, PREP_COMMAND))
        sys.exit()

    print("Description up-to-date: %s" % RST_DESCRIPTION_PATH)

    answer = raw_input("Are you sure you want to publish to PyPI (yes/no)?")

    if answer != "yes":
        exit("Aborted: nothing published")

    os.system('python setup.py sdist upload')
139237
public function doUnpublish()
    {
        if (!$this->canEdit()) {
            throw new ValidationException(_t('News.PublishPermissionFailure', 'No permission to publish or unpublish news item'));
        }
        $this->Live = false;
        $this->write();
    }