<commit_before>from __future__ import absolute_import, division, print_function
import numpy as np
from itertools import cycle

from glue.qt.widgets.data_viewer import DataViewer
from glue.external.qt import QtGui, QtCore
from vispy import scene
from vispy.color import get_colormaps, BaseColormap

__all__ = ['QtVispyWidget']


# create colormaps that work well for translucent and additive volume rendering
class TransFire(BaseColormap):
    glsl_map = """
    vec4 translucent_fire(float t) {
        return vec4(pow(t, 0.5), t, t*t, max(0, t*1.05 - 0.05));
    }
    """


class TransGrays(BaseColormap):
    glsl_map = """
    vec4 translucent_grays(float t) {
        return vec4(t, t, t, t*0.05);
    }
    """
<commit_msg>Import colormaps from colormaps module<commit_after>from __future__ import absolute_import, division, print_function
import numpy as np
from itertools import cycle

from glue.qt.widgets.data_viewer import DataViewer
from glue.external.qt import QtGui, QtCore
from vispy import scene
from vispy.color import get_colormaps, BaseColormap

from .colormaps import TransFire, TransGrays

__all__ = ['QtVispyWidget']

{'fraction_non_alphanumeric': 0.08157894736842106, 'fraction_numerical': 0.014035087719298246, 'mean_word_length': 4.620689655172414, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4865529', 'n_tokens_mistral': 384, 'n_tokens_neox': 368, 'n_words': 113}