コード例 #1
0
def export_to_scala(absolute_notebook_path):
    '''convert the notebook source to scala'''
    with warnings.catch_warnings():
        warnings.filterwarnings('ignore', category=DeprecationWarning)
        exporter = TemplateExporter(extra_loaders=[FileSystemLoader(INSTALLDIR)],
                                    preprocessors=[ScalaAppPreprocessor])
        exporter.template_file = 'scala_sparkapp'
        return exporter.from_file(absolute_notebook_path)
コード例 #2
0
def export_to_scala(absolute_notebook_path):
    '''convert the notebook source to scala'''

    exporter = TemplateExporter(extra_loaders=[FileSystemLoader(INSTALLDIR)],
                                preprocessors=[ScalaAppPreprocessor])
    exporter.template_file = 'scala_sparkapp'
    (body, resources) = exporter.from_file(absolute_notebook_path)
    return body
コード例 #3
0
def export_to_scala(absolute_notebook_path):
    '''convert the notebook source to scala'''
    with warnings.catch_warnings():
        warnings.filterwarnings('ignore', category=DeprecationWarning)
        exporter = TemplateExporter(extra_loaders=[FileSystemLoader(INSTALLDIR)],
                                    preprocessors=[ScalaAppPreprocessor])
        exporter.template_file = 'scala_sparkapp'
        (body, resources) = exporter.from_file(absolute_notebook_path)
        return body