<commit_before>import os
import fnmatch
import multiprocessing as mp
import re
from glob import glob

import pandas as pd
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt

import Events
import Pulses
import LSPplot
import Candidates



def main(args, vers=None):
  
  # Load Events from HDF5 database of .singlepulse file
  try:
    events = pd.read_hdf(args.filename, 'events')
    with pd.HDFStore(args.filename) as store:
      db_keys = store.keys()
    file_type = 'hdf5'
  except (IOError, HDF5ExtError) as e:
    events = Events.Loader(args)
    file_type = 'sp'
 
  # Select events within the defined ranges
  if args.SNR_min is not None: events = events[events.Sigma >= args.SNR_min]
    
  if events.empty: <commit_msg>Bug on missing HDF5 fixed<commit_after>import os
import fnmatch
import multiprocessing as mp
import re
from glob import glob

import pandas as pd
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from tables.exceptions import HDF5ExtError

import Events
import Pulses
import LSPplot
import Candidates



def main(args, vers=None):
  
  # Load Events from HDF5 database of .singlepulse file
  try:
    events = pd.read_hdf(args.filename, 'events')
    with pd.HDFStore(args.filename) as store:
      db_keys = store.keys()
    file_type = 'hdf5'
  except (IOError, HDF5ExtError) as e:
    events = Events.Loader(args)
    file_type = 'sp'
 
  # Select events within the defined ranges
  if args.SNR_min is not None: events = events[events.Sigma >= args.SNR_min]
    
  if events.empty: 
{'fraction_non_alphanumeric': 0.07083599234205488, 'fraction_numerical': 0.005105296745373325, 'mean_word_length': 3.7515151515151515, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6674498', 'n_tokens_mistral': 523, 'n_tokens_neox': 509, 'n_words': 180}