<commit_before>
from collections import OrderedDict
from IPython.display import Javascript
import json
from krisk.util import join_current_dir

ECHARTS_URL = 'https://cdnjs.cloudflare.com/ajax/libs/echarts/3.2.0/'
ECHARTS_FILE = 'echarts.min'
d_paths = OrderedDict({})
THEMES = ['dark','vintage','roma','shine','infographic','macarons']
THEMES_URL='//echarts.baidu.com/asset/theme/'
PATH_LOCAL = join_current_dir('static')
# PATH_LOCAL = 'pandas-echarts/krisk/static'
#TODO FIX LOCAL PATH! NEED TO DO nbextension install

# def init_notebook():
#     """Inject Javascript to notebook, default using local js.
    
#     """
#     return Javascript("""
#     require.config({
#                  baseUrl : '%s',
#                  paths: {
#                      echarts: 'echarts.min'
#                  }
#     });
#     """ % PATH_LOCAL)

def init_notebook():
    """Inject Javascript to notebook, default using local js.
    
    """
    return Javascript("""
    require.config({
                 baseUrl : "//rawgit.com/napjon/krisk/master/krisk/static",
                 paths: {
                     echarts: "//cdnjs.cloudflare.com/ajax/libs/echarts/3.2.1/echarts.min"
                 }
    });
    """)
    
def get_paths():
    return ['echarts'] + THEMES<commit_msg>Update connection to script to waitSeconds to load js<commit_after>
from collections import OrderedDict
from IPython.display import Javascript
import json
from krisk.util import join_current_dir

ECHARTS_URL = 'https://cdnjs.cloudflare.com/ajax/libs/echarts/3.2.0/'
ECHARTS_FILE = 'echarts.min'
d_paths = OrderedDict({})
THEMES = ['dark','vintage','roma','shine','infographic','macarons']
THEMES_URL='//echarts.baidu.com/asset/theme/'
PATH_LOCAL = join_current_dir('static')
# PATH_LOCAL = 'pandas-echarts/krisk/static'
#TODO FIX LOCAL PATH! NEED TO DO nbextension install

# def init_notebook():
#     """Inject Javascript to notebook, default using local js.
    
#     """
#     return Javascript("""
#     require.config({
#                  baseUrl : '%s',
#                  paths: {
#                      echarts: 'echarts.min'
#                  }
#     });
#     """ % PATH_LOCAL)

def init_notebook():
    """Inject Javascript to notebook, default using local js.
    
    """
    return Javascript("""
    require.config({
                 baseUrl : "//rawgit.com/napjon/krisk/master/krisk/static",
                 paths: {
                     echarts: "//cdnjs.cloudflare.com/ajax/libs/echarts/3.2.1/echarts.min"
                 },
                 waitSeconds: 15
    });
    """)
    
def get_paths():
    return ['echarts'] + THEMES
{'fraction_non_alphanumeric': 0.1415525114155251, 'fraction_numerical': 0.00532724505327245, 'mean_word_length': 2.396640826873385, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '5274490', 'n_tokens_mistral': 886, 'n_tokens_neox': 827, 'n_words': 167}