<commit_before># This file is part of viscm
# Copyright (C) 2015 <NAME> <<EMAIL>>
# Copyright (C) 2015 <NAME> <<EMAIL>>
# See file LICENSE.txt for license information.

# Simple script using CIECAM02 and CAM02-UCS to visualize properties of a
# matplotlib colormap
from __future__ import division, print_function, absolute_import
import sys
import os.path
import json

import numpy as np

#matplotlib.rcParams['backend'] = "QT4AGG"
# Do this first before any other matplotlib imports, to force matplotlib to
# use a Qt backend
from matplotlib.backends.qt_compat import QtWidgets, QtCore, QtGui, _getSaveFileName
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas4
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas5

def FigureCanvas(fig):
    try:
        return FigureCanvas5(fig)
    except Exception:
        return FigureCanvas4(fig)

import matplotlib
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d
from matplotlib.gridspec import GridSpec
import matplotlib.colors
from matplotlib.colors import ListedColormap

from scipy.interpolate import UnivariateSpline

from colorspacious import (cspace_converter, cspace_convert,<commit_msg>Fix import of qt backend for matplotlib without qt4 support<commit_after># This file is part of viscm
# Copyright (C) 2015 <NAME> <<EMAIL>>
# Copyright (C) 2015 <NAME> <<EMAIL>>
# See file LICENSE.txt for license information.

# Simple script using CIECAM02 and CAM02-UCS to visualize properties of a
# matplotlib colormap
from __future__ import division, print_function, absolute_import
import sys
import os.path
import json

import numpy as np

#matplotlib.rcParams['backend'] = "QT4AGG"
# Do this first before any other matplotlib imports, to force matplotlib to
# use a Qt backend
from matplotlib.backends.qt_compat import QtWidgets, QtCore, QtGui, _getSaveFileName

try:
    from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
except Exception:
    from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas

import matplotlib
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d
from matplotlib.gridspec import GridSpec
import matplotlib.colors
from matplotlib.colors import ListedColormap

from scipy.interpolate import UnivariateSpline

from colorspacious import (cspace_converter, cspace_convert,
{'fraction_non_alphanumeric': 0.05604719764011799, 'fraction_numerical': 0.015592077538980193, 'mean_word_length': 5.82183908045977, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '5723805', 'n_tokens_mistral': 750, 'n_tokens_neox': 719, 'n_words': 252}