コード例 #1
0
ファイル: feedback.py プロジェクト: rguter/glue
def _send_feedback(report):
    """
    Send a report to bugs.glueviz.org

    :param report: Report message to send
    :type report: str
    """

    # website expects a post request with a report and specific key
    url = 'http://bugs.glueviz.org'
    values = dict(report=report, key='72z29Q9BzM8sgATeQdu4')

    data = urlencode(values)
    req = Request(url, data)
    urlopen(req)
コード例 #2
0
ファイル: feedback.py プロジェクト: rguter/glue
def _send_feedback(report):
    """
    Send a report to bugs.glueviz.org

    :param report: Report message to send
    :type report: str
    """

    # website expects a post request with a report and specific key
    url = "http://bugs.glueviz.org"
    values = dict(report=report, key="72z29Q9BzM8sgATeQdu4")

    data = urlencode(values)
    req = Request(url, data)
    urlopen(req)
コード例 #3
0
ファイル: feedback.py プロジェクト: glue-viz/glue
    def accept(self):
        """
        Send a report to bugs.glueviz.org
        """

        # website expects a post request with a report and specific key
        url = 'http://bugs.glueviz.org'

        values = dict(report=self.content, key='72z29Q9BzM8sgATeQdu4')

        data = urlencode(values)

        req = Request(url, data.encode('utf-8'))
        urlopen(req)

        self.close()
コード例 #4
0
ファイル: feedback.py プロジェクト: sunn-e/glue
    def accept(self):
        """
        Send a report to bugs.glueviz.org
        """

        # website expects a post request with a report and specific key
        url = 'http://bugs.glueviz.org'

        values = dict(report=self.content, key='72z29Q9BzM8sgATeQdu4')

        data = urlencode(values)

        req = Request(url, data.encode('utf-8'))
        urlopen(req)

        self.close()
コード例 #5
0
ファイル: options_widget.py プロジェクト: astrofrog/glue-wwt
    def _setup_combos(self):
        layers = [
            'Digitized Sky Survey (Color)',
            'VLSS: VLA Low-frequency Sky Survey (Radio)',
            'WMAP ILC 5-Year Cosmic Microwave Background',
            'SFD Dust Map (Infrared)', 'WISE All Sky (Infrared)',
            'GLIMPSE/MIPSGAL', 'Hydrogen Alpha Full Sky Map'
        ]
        labels = ['DSS', 'VLSS', 'WMAP', 'SFD', 'WISE', 'GLIMPSE', 'H Alpha']
        thumbnails = [
            'DSS', 'VLA', 'wmap5yr_ilc_200uk', 'dust', 'glimpsemipsgaltn',
            'halpha'
        ]
        base = ('http://www.worldwidetelescope.org/wwtweb/'
                'thumbnail.aspx?name=%s')

        for i, row in enumerate(zip(layers, labels, thumbnails)):
            layer, text, thumb = row
            url = base % thumb
            data = urlopen(url).read()
            pm = QtGui.QPixmap()
            pm.loadFromData(data)
            icon = QtGui.QIcon(pm)

            self.ui.combo_foreground.addItem(icon, text, layer)
            self.ui.combo_foreground.setItemData(i, layer, role=Qt.ToolTipRole)
            self.ui.combo_background.addItem(icon, text, layer)
            self.ui.combo_background.setItemData(i, layer, role=Qt.ToolTipRole)

        self.ui.combo_foreground.setIconSize(QtCore.QSize(60, 60))
        self.ui.combo_background.setIconSize(QtCore.QSize(60, 60))

        self.ra_att_helper = ComponentIDComboHelper(self.ui.combo_ra_att,
                                                    self.viewer._data,
                                                    categorical=False,
                                                    numeric=True)

        self.dec_att_helper = ComponentIDComboHelper(self.ui.combo_dec_att,
                                                     self.viewer._data,
                                                     categorical=False,
                                                     numeric=True)