publish a changed scene color
508605
def publish_scene_color(self, scene_id, color):
        """"""
        self.sequence_number += 1
        self.publisher.send_multipart(msgs.MessageBuilder.scene_color(self.sequence_number, scene_id, color))
        return self.sequence_number
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')
1329281
def update_colors(self, colors):
        ''''''
        self.colors = np.array(colors, dtype='uint8')
        prim_colors = self._gen_colors(self.colors)
        
        self._color_vbo.set_data(prim_colors)
        self.widget.update()
1295874
function (data) {
    this.rendererSystem = this.el.sceneEl.systems.renderer;
    this.materialData = {color: new THREE.Color(), emissive: new THREE.Color()};
    getMaterialData(data, this.materialData);
    this.rendererSystem.applyColorCorrection(this.materialData.color);
    this.rendererSystem.applyColorCorrection(this.materialData.emissive);
    this.material = new THREE.MeshStandardMaterial(this.materialData);

    utils.material.updateMap(this, data);
    if (data.normalMap) { utils.material.updateDistortionMap('normal', this, data); }
    if (data.displacementMap) { utils.material.updateDistortionMap('displacement', this, data); }
    if (data.ambientOcclusionMap) { utils.material.updateDistortionMap('ambientOcclusion', this, data); }
    if (data.metalnessMap) { utils.material.updateDistortionMap('metalness', this, data); }
    if (data.roughnessMap) { utils.material.updateDistortionMap('roughness', this, data); }
    this.updateEnvMap(data);
  }
1346184
def setPenColor(self, color):
        
        color = QColor(color)
        if self._palette is None:
            self._palette = XNodePalette(self._scenePalette)
        
        self._palette.setColor(self._palette.NodeForeground, color)
        self.setDirty()
365617
def _color(self, msg, color):
        """"""
        kwargs = {'fg': color}
        return click.style(msg, **kwargs) if self.colorize else msg
784627
def publish(self, **kwargs):
        '''
        

        '''

        try:

            # HACK: Force these params for publication
            self.cbv_win = 999
            self.cbv_order = 3
            self.cbv_num = 1

            # Get the CBVs
            self._mission.GetTargetCBVs(self)

            # Plot the final corrected light curve
            cbv = CBV()
            self.plot_info(cbv)
            self.plot_cbv(cbv.body(), self.fcor, 'Corrected')
            self.plot_cbv(cbv.body(), self.flux, 'De-trended', show_cbv=True)
            self.plot_cbv(cbv.body(), self.fraw, 'Raw')

            # Save the CBV pdf
            pdf = PdfPages(os.path.join(self.dir, 'cbv.pdf'))
            pdf.savefig(cbv.fig)
            pl.close(cbv.fig)
            d = pdf.infodict()
            d['Title'] = 'EVEREST: %s de-trending of %s %d' % (
                self.name, self._mission.IDSTRING, self.ID)
            d['Author'] = 'Rodrigo Luger'
            pdf.close()

            # Now merge the two PDFs
            assert os.path.exists(os.path.join(
                self.dir, self.name + '.pdf')), \
                "Unable to locate %s.pdf." % self.name
            output = PdfFileWriter()
            pdfOne = PdfFileReader(os.path.join(self.dir, 'cbv.pdf'))
            pdfTwo = PdfFileReader(os.path.join(self.dir, self.name + '.pdf'))
            # Add the CBV page
            output.addPage(pdfOne.getPage(0))
            # Add the original DVS page
            output.addPage(pdfTwo.getPage(pdfTwo.numPages - 1))
            # Write the final PDF
            outputStream = open(os.path.join(self.dir, self._mission.DVSFile(
                self.ID, self.season, self.cadence)), "wb")
            output.write(outputStream)
            outputStream.close()
            os.remove(os.path.join(self.dir, 'cbv.pdf'))

            # Make the FITS file
            MakeFITS(self)

        except:

            self.exception_handler(self.debug)
596875
def onThemeColor(self, color, item):
        """"""
        bconf = self.panel_bot.conf
        if item == 'grid':
            bconf.set_gridcolor(color)
        elif item == 'bg':
            bconf.set_bgcolor(color)
        elif item == 'frame':
            bconf.set_framecolor(color)
        elif item == 'text':
            bconf.set_textcolor(color)
        bconf.canvas.draw()
1143504
def plain_output(message, color)
      if @options['without-color']
        puts message
      else
        puts Colorize.send(color, message)
      end
    end
683768
def colour_rgb(self):
        """"""
        hexvalue = self.status()[self.DPS][self.DPS_INDEX_COLOUR]
        return BulbDevice._hexvalue_to_rgb(hexvalue)
541098
def update(self):
        '''
        
        '''
        self.image = self.blank.copy()
        vcenter_blit(self.image, 
                self.font.render(self.get(), True, self.color), 
                self.margin)
398425
def setHighlightColor(self, color):
        
        color = QColor(color)
        if self._palette is None:
            self._palette = XNodePalette(self._scenePalette)
        
        self._palette.setColor(self._palette.NodeHighlight, color)
        self.setDirty()
241616
def render(self, display):
        """"""

        # to handle changing objects / callable
        if self.shawn_text != self._last_text:
            self._render()

        if self.text:
            papy = self._surface.get_width()
            if papy <= self.width:
                display.blit(self._surface, (self.topleft, self.size))
            else:
                display.blit(self._surface, (self.topleft, self.size), ((papy - self.w, 0), self.size))
        else:
            display.blit(self.default_text, (self.topleft, self.size))

        if self._focus:
            groom = self.cursor_pos()
            line(display, (groom, self.top), (groom, self.bottom), CONCRETE)
706385
def _change_sel_color(self, event):
        """"""
        (r, g, b), (h, s, v), color = self.square.get()
        self.red.set(r)
        self.green.set(g)
        self.blue.set(b)
        self.saturation.set(s)
        self.value.set(v)
        self.hexa.delete(0, "end")
        self.hexa.insert(0, color.upper())
        if self.alpha_channel:
            self.alphabar.set_color((r, g, b))
            self.hexa.insert('end',
                             ("%2.2x" % self.alpha.get()).upper())
        self._update_preview()
1052353
function Light(name, scene) {
            var _this = _super.call(this, name, scene) || this;
            _this.diffuse = new BABYLON.Color3(1.0, 1.0, 1.0);
            _this.specular = new BABYLON.Color3(1.0, 1.0, 1.0);
            _this.intensity = 1.0;
            _this.range = Number.MAX_VALUE;
            /**
             * Cached photometric scale default to 1.0 as the automatic intensity mode defaults to 1.0 for every type
             * of light.
             */
            _this._photometricScale = 1.0;
            _this._intensityMode = Light.INTENSITYMODE_AUTOMATIC;
            _this._radius = 0.00001;
            _this.renderPriority = 0;
            /**
             * Defines wether or not the shadows are enabled for this light. This can help turning off/on shadow without detaching
             * the current shadow generator.
             */
            _this.shadowEnabled = true;
            _this._excludeWithLayerMask = 0;
            _this._includeOnlyWithLayerMask = 0;
            _this._lightmapMode = 0;
            _this._excludedMeshesIds = new Array();
            _this._includedOnlyMeshesIds = new Array();
            _this.getScene().addLight(_this);
            _this._uniformBuffer = new BABYLON.UniformBuffer(_this.getScene().getEngine());
            _this._buildUniformLayout();
            _this.includedOnlyMeshes = new Array();
            _this.excludedMeshes = new Array();
            _this._resyncMeshes();
            return _this;
        }
835199
def _update_color_hsv(self, event=None):
        """"""
        if event is None or event.widget.old_value != event.widget.get():
            h = self.hue.get()
            s = self.saturation.get()
            v = self.value.get()
            sel_color = hsv_to_rgb(h, s, v)
            self.red.set(sel_color[0])
            self.green.set(sel_color[1])
            self.blue.set(sel_color[2])
            if self.alpha_channel:
                sel_color += (self.alpha.get(),)
                self.alphabar.set_color(sel_color)
            hexa = rgb_to_hexa(*sel_color)
            self.hexa.delete(0, "end")
            self.hexa.insert(0, hexa)
            self.square.set_hsv((h, s, v))
            self.bar.set(h)
            self._update_preview()
138302
function () {
    var projectPath = path.resolve(cwd, './__publish__');
    projectPublishRoot = projectPath;
    if (!fs.existsSync(path.resolve(cwd, './__publish__'))) {
        fs.mkdirSync(path.resolve(cwd, './__publish__'));
    }
    fs.mkdirSync(projectPath + '/styles');
    fs.mkdirSync(projectPath + '/scripts');
    fs.mkdirSync(projectPath + '/statics');

    pageToPublish.forEach(function (subPage) {
        var dirPath = getPageDir(subPage);
        if (!fs.existsSync(dirPath)) {
            shell.mkdir('-p', dirPath);
        }
    });
}