Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1679)  |  Call(1679)  |  Derive(0)  |  Import(0)
L.index(value, [start, [stop]]) -> integer -- return first index of value.
Raises ValueError if the value is not present.

src/q/s/QSTK-0.2.7/Examples/FeatureSearch/functions.py   QSTK(Download)
 
	maxlCorrCoef = max(lCorrCoef)
	maxlCorrCoefIndex = lCorrCoef.index(maxlCorrCoef)
	sys.stdout.write('best feature set is ' + str(lSelectedFeatures[0:maxlCorrCoefIndex+1]+[classLabelIndex]) + '\n')
	sys.stdout.write('corr coef = ' + str(maxlCorrCoef))
 
	maxlCorrCoef = max(lCorrCoef)
	maxlCorrCoefIndex = lCorrCoef.index(maxlCorrCoef)
	lBestSet = list(set(lFeatures) - set(lRemovedFeatures[0:maxlCorrCoefIndex+1]))
	sys.stdout.write('best feature set is ' + str(lBestSet+[classLabelIndex]) + '\n')
 
	maxlCorrCoef = max(lCorrCoef)
	maxlCorrCoefIndex = lCorrCoef.index(maxlCorrCoef)
	sys.stdout.write('best feature set is ' + str(list(lSeenStates[maxlCorrCoefIndex])+[classLabelIndex]) + '\n')
	sys.stdout.write('corr coef = ' + str(maxlCorrCoef))
 
	maxlCorrCoef = max(lCorrCoef)
	maxlCorrCoefIndex = lCorrCoef.index(maxlCorrCoef)
	sys.stdout.write('best feature set is ' + str(list(lSeenStates[maxlCorrCoefIndex])+[classLabelIndex]) + '\n')
	sys.stdout.write('corr coef = ' + str(maxlCorrCoef))
 
	maxlCorrCoef = max(lCorrCoef)
	maxlCorrCoefIndex = lCorrCoef.index(maxlCorrCoef)
	sys.stdout.write('best feature set is ' + str(list(lSeenStates[maxlCorrCoefIndex])+[classLabelIndex]) + '\n')
	sys.stdout.write('corr coef = ' + str(maxlCorrCoef))

src/g/a/gae-twitter-oauth-example-HEAD/werkzeug/datastructures.py   gae-twitter-oauth-example(Download)
                    return idx
            raise ValueError(key)
        return list.index(self, key)
 
    def find(self, key):

src/u/r/urwid-1.2.1/examples/calc.py   urwid(Download)
        if key.upper() in COLUMN_KEYS:
            # column switch
            i = COLUMN_KEYS.index(key.upper())
            if i >= len( self.col_list ): 
                raise CalcEvent, E_no_such_column % key.upper()
    def column_empty(self, letter):
        """Return True if the column passed is empty."""
 
        i = COLUMN_KEYS.index(letter)
        col = self.col_list[i]
    def delete_column(self, letter):
        """Delete the column with the given letter."""
 
        i = COLUMN_KEYS.index(letter)
        col = self.col_list[i]

src/u/r/urwid-HEAD/examples/calc.py   urwid(Download)
        if key.upper() in COLUMN_KEYS:
            # column switch
            i = COLUMN_KEYS.index(key.upper())
            if i >= len( self.col_list ): 
                raise CalcEvent, E_no_such_column % key.upper()
    def column_empty(self, letter):
        """Return True if the column passed is empty."""
 
        i = COLUMN_KEYS.index(letter)
        col = self.col_list[i]
    def delete_column(self, letter):
        """Delete the column with the given letter."""
 
        i = COLUMN_KEYS.index(letter)
        col = self.col_list[i]

src/h/u/hunch-sample-app-HEAD/django/db/models/sql/query.py   hunch-sample-app(Download)
            t = self.rev_join_map[old_alias]
            data = list(self.join_map[t])
            data[data.index(old_alias)] = new_alias
            self.join_map[t] = tuple(data)
            self.rev_join_map[new_alias] = t

src/c/o/control-0.6.1/examples/tfvis.py   control(Download)
                if (minz < minp):
                    # Moving zero(s)
                    self.index1 = tzeros.index(minz)
                    self.index2 = list(self.zeros).index(
                        conj(self.zeros[self.index1]))
                    self.move_zero = True
                else:
                    # Moving pole(s)
                    self.index1 = tpoles.index(minp)

src/w/e/webapp2_example-HEAD/lib/webob/response.py   webapp2_example(Download)
                    _request_uri(environ), value)
                headerlist = list(headerlist)
                idx = headerlist.index((name, value))
                headerlist[idx] = (name, new_location)
                break

src/h/u/hunch-sample-app-HEAD/djangotoolbox/utils.py   hunch-sample-app(Download)
    for item in left:
        if item in right:
            del right[right.index(item)]
        else:
            return False

src/l/i/libphilo-HEAD/python/examples/alpha_services/freq_json_service.py   libphilo(Download)
 
    field = environ["parsed_params"].get("field",[""])[0] or "author"
    field_depth = ["doc","div1","div2","div3","para"].index(db.locals["metadata_types"][field])
    #need a field param.  author default?
    status = "running query for %s @ %s: " % (qs,dbname)

src/p/g/pgi-0.0.7/examples/clutter/test-shader.py   pgi(Download)
def button_release_cb(actor, event, data):
    # If we've been run once, we'll figure out which one to use next.
    if hasattr(actor, "shader_name"):
        index = SHADER_KEYS.index(actor.shader_name)
 

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next