If word ends in -que and if word is not in pass list, strip -que
320610
def _checkremove_que(self, word):
        """"""

        in_que_pass_list = False

        que_pass_list = ['atque',
                        'quoque',
                        'neque',
                        'itaque',
                        'absque',
                        'apsque',
                        'abusque',
                        'adaeque',
                        'adusque',
                        'denique',
                        'deque',
                        'susque',
                        'oblique',
                        'peraeque',
                        'plenisque',
                        'quandoque',
                        'quisque',
                        'quaeque',
                        'cuiusque',
                        'cuique',
                        'quemque',
                        'quamque',
                        'quaque',
                        'quique',
                        'quorumque',
                        'quarumque',
                        'quibusque',
                        'quosque',
                        'quasque',
                        'quotusquisque',
                        'quousque',
                        'ubique',
                        'undique',
                        'usque',
                        'uterque',
                        'utique',
                        'utroque',
                        'utribique',
                        'torque',
                        'coque',
                        'concoque',
                        'contorque',
                        'detorque',
                        'decoque',
                        'excoque',
                        'extorque',
                        'obtorque',
                        'optorque',
                        'retorque',
                        'recoque',
                        'attorque',
                        'incoque',
                        'intorque',
                        'praetorque']

        if word not in que_pass_list:
            word = re.sub(r'que$', '', word)
        else:
            in_que_pass_list = True

        return word, in_que_pass_list
364923
def check_query(query):
    
    q = query.lower()
    if "select " not in q:
        raise InvalidQuery("SELECT word not found in the query: {0}".format(query))
    if " from " not in q:
        raise InvalidQuery("FROM word not found in the query: {0}".format(query))
694254
def _stripStrList(self, raw_str, stop_strs):
        '''
        
        '''
        if type(stop_strs) == list:
            for word in stop_strs:
                raw_str = self._stripStr(raw_str, word)
            return raw_str
        else:
            raise Exception('stop_words must be list!')
75277
def filter_commands(commands, invalid_query_starts=('DROP', 'UNLOCK', 'LOCK')):
    
    commands_with_drops = len(commands)
    filtered_commands = [c for c in commands if not c.startswith(invalid_query_starts)]
    if commands_with_drops - len(filtered_commands) > 0:
        print("\t" + str(invalid_query_starts) + " commands removed", commands_with_drops - len(filtered_commands))
    return filtered_commands
2412
def _strip_value(value, lookup='exact'):
    
    if lookup == 'in':
        stripped_value = [_strip_object(el) for el in value]
    else:
        stripped_value = _strip_object(value)
    return stripped_value
1325896
def negated(input_words, include_nt=True):
    
    input_words = [str(w).lower() for w in input_words]
    neg_words = []
    neg_words.extend(NEGATE)
    for word in neg_words:
        if word in input_words:
            return True
    if include_nt:
        for word in input_words:
            if "n't" in word:
                return True
    if "least" in input_words:
        i = input_words.index("least")
        if i > 0 and input_words[i - 1] != "at":
            return True
    return False
302308
function endsWith(testStr, endsStr) {
        var index = testStr.lastIndexOf(endsStr);
        if (index < 0) {
            return false;
        }
        if (endsStr.length + index == testStr.length) {
            return true;
        }
        return false;
    }
368098
def opt_strip(prefix, opts):
    

    ret = {}
    for opt_name, opt_value in opts.items():
        # remove prefix
        if opt_name.startswith(prefix):
            opt_name = opt_name[len(prefix):]

        ret[opt_name] = opt_value

    return ret
325578
def query_names(self, pat):
        """"""

        for item in self.chnames.items():
            if fnmatch.fnmatchcase(item[1], pat):
                print item
724946
def strip_prompt(self, a_string):
        """"""
        expect_string = r"^(OK|ERROR|Command not recognized\.)$"
        response_list = a_string.split(self.RESPONSE_RETURN)
        last_line = response_list[-1]
        if re.search(expect_string, last_line):
            return self.RESPONSE_RETURN.join(response_list[:-1])
        else:
            return a_string
1000916
def candidates(word): 
    ""
    return (known([word]) or known(edits1(word)) or known(edits2(word)) or [word])
409706
function stripPredicate(sSegment) {
				var i = sSegment.indexOf("(");
				return i >= 0 ? sSegment.slice(0, i) : sSegment;
			}
1160966
function isMissingTerms(file) {
  var contents = file.contents.toString();
  return Object.keys(requiredTerms).map(function(term) {
    var filter = requiredTerms[term];
    if (!filter.test(file.path)) {
      return false;
    }

    var matches = contents.match(new RegExp(term));
    if (!matches) {
      util.log(util.colors.red('Did not find required: "' + term +
          '" in ' + file.relative));
      util.log(util.colors.blue('=========='));
      return true;
    }
    return false;
  }).some(function(hasMissingTerm) {
    return hasMissingTerm;
  });
}
1093633
def process_query(self):
		
		self.query = wt(self.query)
		self.processed_query = []
		for word in self.query:
			if word not in self.stop_words and word not in self.punctuation:
				self.processed_query.append(self.stemmer.stem(word))
1267190
def strip_required_suffix(string, suffix):
    
    if string.endswith(suffix):
        return string[:-len(suffix)]
    raise AssertionError('String ends with %r, not %r' % (string[-len(suffix):], suffix))
1203449
def delete(queue, items):
    '''
    
    '''
    con = _conn(queue)
    with con:
        cur = con.cursor()
        if isinstance(items, six.string_types):
            items = _quote_escape(items)
            cmd = """DELETE FROM {0} WHERE name = '{1}'""".format(queue, items)
            log.debug('SQL Query: %s', cmd)
            cur.execute(cmd)
            return True
        if isinstance(items, list):
            items = [_quote_escape(el) for el in items]
            cmd = 'DELETE FROM {0} WHERE name = ?'.format(queue)
            log.debug('SQL Query: %s', cmd)
            newitems = []
            for item in items:
                newitems.append((item,))
                # we need a list of one item tuples here
            cur.executemany(cmd, newitems)
        if isinstance(items, dict):
            items = salt.utils.json.dumps(items).replace('"', "'")
            items = _quote_escape(items)
            cmd = ("""DELETE FROM {0} WHERE name = '{1}'""").format(queue, items)  # future lint: disable=blacklisted-function
            log.debug('SQL Query: %s', cmd)
            cur.execute(cmd)
            return True
        return True
928625
def check(line, queries):
    
    line = line.strip()
    spLine = line.replace('.', ' ').split()
    matches = set(spLine).intersection(queries)
    if len(matches) > 0:
        return matches, line.split('\t')
    return matches, False