<commit_before>#!/usr/bin/perl -w

use strict;
use CoGeX;
use CGI;
use CGI::Carp 'fatalsToBrowser';
use CoGe::Accessory::Web;
no warnings 'redefine';


my $P = CoGe::Accessory::Web::get_defaults($ENV{HOME}.'coge.conf');
$ENV{PATH} = $P->{COGEDIR};

$DBNAME = $P->{DBNAME};
$DBHOST = $P->{DBHOST};
$DBPORT = $P->{DBPORT};
$DBUSER = $P->{DBUSER};
$DBPASS = $P->{DBPASS};
$connstr = "dbi:mysql:dbname=".$DBNAME.";host=".$DBHOST.";port=".$DBPORT;
my $coge = CoGeX->connect($connstr, $DBUSER, $DBPASS );
my $FORM = new CGI;
my $dsgid = $FORM->param('dsgid');
my $oid = $FORM->param('oid');
my $name = $FORM->param('name');
my $desc = $FORM->param('desc');

my @orgs;

if ($name || $desc)
  {
    my $search = {};
    $search->{description}={like=>"%".$desc."%"} if $desc;
    $search->{name}={like=>"%".$name."%"} if $name;
    @orgs = $coge->resultset("Organism")->search($search)
  }
elsif ($oid)
  {
    my @orgs = $coge->resultset("Organism")->find($oid);
  }
elsif ($dsgid)
  {
    my $dsg = $coge->resultset("DatasetGroup")->find($dsgid);<commit_msg>fixed declaring variable error<commit_after>#!/usr/bin/perl -w

use strict;
use CoGeX;
use CGI;
use CGI::Carp 'fatalsToBrowser';
use CoGe::Accessory::Web;
no warnings 'redefine';


my $P = CoGe::Accessory::Web::get_defaults($ENV{HOME}.'coge.conf');
$ENV{PATH} = $P->{COGEDIR};

my $DBNAME = $P->{DBNAME};
my $DBHOST = $P->{DBHOST};
my $DBPORT = $P->{DBPORT};
my $DBUSER = $P->{DBUSER};
my $DBPASS = $P->{DBPASS};
my $connstr = "dbi:mysql:dbname=".$DBNAME.";host=".$DBHOST.";port=".$DBPORT;
my $coge = CoGeX->connect($connstr, $DBUSER, $DBPASS );
my $FORM = new CGI;
my $dsgid = $FORM->param('dsgid');
my $oid = $FORM->param('oid');
my $name = $FORM->param('name');
my $desc = $FORM->param('desc');

my @orgs;

if ($name || $desc)
  {
    my $search = {};
    $search->{description}={like=>"%".$desc."%"} if $desc;
    $search->{name}={like=>"%".$name."%"} if $name;
    @orgs = $coge->resultset("Organism")->search($search)
  }
elsif ($oid)
  {
    my @orgs = $coge->resultset("Organism")->find($oid);
  }
elsif ($dsgid)
  {
    my $dsg = $coge->resultset("DatasetGroup")->find($dsgid);
{'fraction_non_alphanumeric': 0.26392138511932617, 'fraction_numerical': 0.0, 'mean_word_length': 4.841530054644808, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 45, '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': '6232322', 'n_tokens_mistral': 909, 'n_tokens_neox': 907, 'n_words': 166}