<commit_before>package DDG::Spice::SearchCode;
# ABSTRACT: Searches for programming code

use strict;
use DDG::Spice;

# known bad queries
my %skip_queries = map { $_ => undef } (
    'sql server with',
);

my @triggers = share('triggers.txt')->slurp;
triggers startend => @triggers;

spice to => 'http://searchco.de/api/jsonp_search_IV/?q=$1&callback={{callback}}';

# use list of trigger words to create regex
# and strip newline characters<commit_msg>Update spice to URL, remove redirect<commit_after>package DDG::Spice::SearchCode;
# ABSTRACT: Searches for programming code

use strict;
use DDG::Spice;

# known bad queries
my %skip_queries = map { $_ => undef } (
    'sql server with',
);

my @triggers = share('triggers.txt')->slurp;
triggers startend => @triggers;

spice to => 'https://searchcode.com/api/jsonp_search_IV/?q=$1&callback={{callback}}';

# use list of trigger words to create regex
# and strip newline characters
{'fraction_non_alphanumeric': 0.14010695187165775, 'fraction_numerical': 0.0021390374331550803, 'mean_word_length': 5.24, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 1, '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': '3367050', 'n_tokens_mistral': 318, 'n_tokens_neox': 308, 'n_words': 88}