<commit_before>#!/usr/local/bin/perl
# $Id$
# by <NAME>, 22.6. 2000
#
# This script creates source directory structured
# according subcategories with links to the flat
# source structure.
  
# main categories (packages)
@DIRLIST = "TGeant4";
@DIRLIST = (@DIRLIST,"AliGeant4");

# subcategories
@CATLIST = "global";
@CATLIST = (@CATLIST,"geometry");
@CATLIST = (@CATLIST,"physics");
@CATLIST = (@CATLIST,"event");
@CATLIST = (@CATLIST,"run");
@CATLIST = (@CATLIST,"visualization");

# create source dir structure
for( $i = 0 ; $i < $#DIRLIST+1 ; $i++ ) {
  $DIR = @DIRLIST[$i];
  $NAME = @NAMELIST[$i];
  $DIRPATH = $ENV{'AG4_INSTALL'} . "/../" . $DIR;
  chdir $DIRPATH;
  if (! grep(/source/, `ls`)) {
    `mkdir source ` ;
    foreach $CAT (@CATLIST) {
       $CATDIRPATH = "source" . "/" . $CAT;
       $INCLUDEPATH = $CATDIRPATH . "/" . "include";
       $SRCPATH = $CATDIRPATH . "/" . "src";
       `mkdir $CATDIRPATH` ;
       `mkdir $INCLUDEPATH` ;
       `mkdir $SRCPATH` ;
    }    
    print $DIR . "/source directory has been created." . "\n";
  }
}  

# link source files
for( $i = 0 ; $i < $#DIRLIST+1 ; $i++ ) {
  $DIR = @DIRLIST[$i];
  $NAME = @NAMELIST[$i];
  $DIRPATH = $ENV{'AG4_INSTALL'} . "/../" . $DIR;
  $RELDIRPATH = "../../..";

  foreach $CAT (@CATLIST) {
    chdir $DIRPATH;

    $CATSTRING = "\"Category: " . $CAT . "\"";
    @FILELIST_H   = `find . -maxdepth 1 -name \"*.h\" -exec grep -l  $CATSTRING  {} \\;`;
    @FILELIST_ICC = `find . -maxdepth 1 -name \"*.icc\" -exec grep -l  $CATSTRING  {} \\;`;
    @FILELIST_CXX = `find . -maxdepth 1 -name \"*.cxx\" -exec grep -l  $CATSTRING  {} \\;`;

    print "Processing category: " . $CAT . "\n"; 
    $CATDIRPATH = "source" . "/" . $CAT;
    $INCLUDEPATH = $CATDIRPATH . "/" . "include";
    $SRCPATH = $CATDIRPATH . "/" . "src";
    $CVSBASE  = $DIRPATH . "/CVS";
 
    chdir $DIRPATH . "/" . $INCLUDEPATH;
    `ln -s $CVSBASE "CVS" `;
    foreach $FILEPATH (@FILELIST_H) { 
      @TEMP = split('/',$FILEPATH);
      $FILE = @TEMP[@TEMP - 1];
      chop $FILE;
      print "   Linking file " . $FILE . "\n";
      $FILEBASE = $RELDIRPATH . "/" . $FILE;
      `ln -s $FILEBASE $FILE`;
    }

    foreach $FILEPATH (@FILELIST_ICC) { 
      @TEMP = split('/',$FILEPATH);
      $FILE = @TEMP[@TEMP - 1];
      chop $FILE;
      print "   Linking file " . $FILE . "\n";
      $FILEBASE = $RELDIRPATH . "/" . $FILE;
      `ln -s $FILEBASE $FILE`;
    }

    chdir $DIRPATH . "/" . $SRCPATH;
    `ln -s $CVSBASE "CVS" `;
    foreach $FILEPATH (@FILELIST_CXX) { 
      @TEMP = split('/',$FILEPATH);
      $FILE = @TEMP[@TEMP - 1];
      chop $FILE;
      print "   Linking file " . $FILE . " in " . $SRCPATH . "\n";
      $FILEBASE = $RELDIRPATH . "/" . $FILE;
      `ln -s $FILEBASE $FILE`;
    }
  }
}  <commit_msg>corrections for HP-UX (find usage)<commit_after>#!/usr/local/bin/perl
# $Id$
# by <NAME>, 22.6. 2000
#
# This script creates source directory structured
# according subcategories with links to the flat
# source structure.
  
# main categories (packages)
@DIRLIST = "TGeant4";
@DIRLIST = (@DIRLIST,"AliGeant4");

# subcategories
@CATLIST = "global";
@CATLIST = (@CATLIST,"geometry");
@CATLIST = (@CATLIST,"physics");
@CATLIST = (@CATLIST,"event");
@CATLIST = (@CATLIST,"run");
@CATLIST = (@CATLIST,"visualization");

# create source dir structure
for( $i = 0 ; $i < $#DIRLIST+1 ; $i++ ) {
  $DIR = @DIRLIST[$i];
  $NAME = @NAMELIST[$i];
  $DIRPATH = $ENV{'AG4_INSTALL'} . "/../" . $DIR;
  chdir $DIRPATH;
  if (! grep(/source/, `ls`)) {
    `mkdir source ` ;
    foreach $CAT (@CATLIST) {
       $CATDIRPATH = "source" . "/" . $CAT;
       $INCLUDEPATH = $CATDIRPATH . "/" . "include";
       $SRCPATH = $CATDIRPATH . "/" . "src";
       `mkdir $CATDIRPATH` ;
       `mkdir $INCLUDEPATH` ;
       `mkdir $SRCPATH` ;
    }    
    print $DIR . "/source directory has been created." . "\n";
  }
}  

# link source files
for( $i = 0 ; $i < $#DIRLIST+1 ; $i++ ) {
  $DIR = @DIRLIST[$i];
  $NAME = @NAMELIST[$i];
  $DIRPATH = $ENV{'AG4_INSTALL'} . "/../" . $DIR;
  $RELDIRPATH = "../../..";

  foreach $CAT (@CATLIST) {
    chdir $DIRPATH;

    $CATSTRING = "\"Category: " . $CAT . "\"";
    @FILELIST_H   = `find . -name \"*.h\" -exec grep -l  $CATSTRING  {} \\;`;
    @FILELIST_ICC = `find . -name \"*.icc\" -exec grep -l  $CATSTRING  {} \\;`;
    @FILELIST_CXX = `find . -name \"*.cxx\" -exec grep -l  $CATSTRING  {} \\;`;

    print "Processing category: " . $CAT . "\n"; 
    $CATDIRPATH = "source" . "/" . $CAT;
    $INCLUDEPATH = $CATDIRPATH . "/" . "include";
    $SRCPATH = $CATDIRPATH . "/" . "src";
    $CVSBASE  = $DIRPATH . "/CVS";
 
    chdir $DIRPATH . "/" . $INCLUDEPATH;
    `ln -s $CVSBASE "CVS" `;
    foreach $FILEPATH (@FILELIST_H) { 
      @TEMP = split('/',$FILEPATH);
      $FILE = @TEMP[@TEMP - 1];
      chop $FILE;
      print "   Linking file " . $FILE . "\n";
      $FILEBASE = $RELDIRPATH . "/" . $FILE;
      `ln -s $FILEBASE $FILE`;
    }

    foreach $FILEPATH (@FILELIST_ICC) { 
      @TEMP = split('/',$FILEPATH);
      $FILE = @TEMP[@TEMP - 1];
      chop $FILE;
      print "   Linking file " . $FILE . "\n";
      $FILEBASE = $RELDIRPATH . "/" . $FILE;
      `ln -s $FILEBASE $FILE`;
    }

    chdir $DIRPATH . "/" . $SRCPATH;
    `ln -s $CVSBASE "CVS" `;
    foreach $FILEPATH (@FILELIST_CXX) { 
      @TEMP = split('/',$FILEPATH);
      $FILE = @TEMP[@TEMP - 1];
      chop $FILE;
      print "   Linking file " . $FILE . "\n";
      $FILEBASE = $RELDIRPATH . "/" . $FILE;
      `ln -s $FILEBASE $FILE`;
    }
  }
}  
{'fraction_non_alphanumeric': 0.21827044592886802, 'fraction_numerical': 0.007040982126737678, 'mean_word_length': 2.3233353329334134, 'pattern_counts': {'":': 0, '<': 9, '<?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': '6589068', 'n_tokens_mistral': 2243, 'n_tokens_neox': 2123, 'n_words': 486}