<commit_before>#!/usr/bin/env python

import sys
sys.path.append('../../monitor')
import datetime, glob, job_stats, os, subprocess, time
import math
import matplotlib
if not 'matplotlib.pyplot' in sys.modules:
  matplotlib.use('pdf')
import matplotlib.pyplot as plt
import numpy
import scipy, scipy.stats
import argparse
import multiprocessing, functools
import tspl, tspl_utils, lariat_utils, my_utils

# Reduce data from ts object
# add and subtract arrays from data based on sign of index variable in
# accumulator, v
def assemble(data,index,key,jndex):
  v=numpy.zeros_like(data[0][key][jndex])
  for i in index:
    i2=abs(i)
    v+=math.copysign(1,i)*data[i2][key][jndex]
  return v

def setlabels(ax,ts,index,xlabel,ylabel,yscale):
  if xlabel != '':
    ax.set_xlabel(xlabel)
  if ylabel != '':
    ax.set_ylabel(ylabel)
  else:
    ax.set_ylabel('Total ' + ts.label(ts.k1[index[0]],
                                      ts.k2[index[0]],yscale) + '/s' )
<commit_msg>moved config file stuff into masterplot<commit_after>#!/usr/bin/env python

execfile('./analyze.conf') # configuration parameters are stored here

import sys
sys.path.append('../../monitor')
import datetime, glob, job_stats, os, subprocess, time
import math
import matplotlib
# Set the matplotlib output mode from config if it exists
if not 'matplotlib.pyplot' in sys.modules:
  try:
    matplotlib.use(matplotlib_output_mode)
  except NameError:
    matplotlib.use('pdf')
    
import matplotlib.pyplot as plt
import numpy
import scipy, scipy.stats
import argparse
import multiprocessing, functools
import tspl, tspl_utils, lariat_utils, my_utils

# Reduce data from ts object
# add and subtract arrays from data based on sign of index variable in
# accumulator, v
def assemble(data,index,key,jndex):
  v=numpy.zeros_like(data[0][key][jndex])
  for i in index:
    i2=abs(i)
    v+=math.copysign(1,i)*data[i2][key][jndex]
  return v

def setlabels(ax,ts,index,xlabel,ylabel,yscale):
  if xlabel != '':
    ax.set_xlabel(xlabel)
  if ylabel != '':
    ax.set_ylabel(ylabel)
  else:
    ax.set_ylabel('Total ' + ts.label(ts.k1[index[0]],
                                      ts.k2[index[0]],yscale) + '/s' )

{'fraction_non_alphanumeric': 0.12465627864344637, 'fraction_numerical': 0.007332722273143905, 'mean_word_length': 3.9613636363636364, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1770366', 'n_tokens_mistral': 792, 'n_tokens_neox': 777, 'n_words': 195}