Did I find the right examples for you? yes no

All Samples(24)  |  Call(24)  |  Derive(0)  |  Import(0)

src/c/l/clusterPy-0.9.9/clusterpy/core/inputs.py   clusterPy(Download)
            if value.startswith(" "):
                value = value[1:]
            if value.endswith(" "):
                value = value[:-1]
            if field[0] in ["N", "F", "B", "I", "O"]:

src/h/t/HTPC-Manager-HEAD/libs/sqlobject/firebird/firebirdconnection.py   HTPC-Manager(Download)
            if defaultSource: # can look like: "DEFAULT 0", "DEFAULT 'default text'", None
                defaultSource = defaultSource.split(' ')[1]
                if defaultSource.startswith ("'") and defaultSource.endswith ("'"):
                    defaultSource = str(defaultSource[1:-1])
                elif fieldType in ("integer", "smallint", "bigint"):

src/s/q/SQLObject-1.6.0b1dev-r4713/sqlobject/firebird/firebirdconnection.py   SQLObject(Download)
            if defaultSource: # can look like: "DEFAULT 0", "DEFAULT 'default text'", None
                defaultSource = defaultSource.split(' ')[1]
                if defaultSource.startswith ("'") and defaultSource.endswith ("'"):
                    defaultSource = str(defaultSource[1:-1])
                elif fieldType in ("integer", "smallint", "bigint"):

src/p/l/plone.app.blob-1.5.10/src/plone/app/blob/browser/size.py   plone.app.blob(Download)
def bytesize(size):
    if size.endswith('kB'):
        size = float(size[:-2]) * 1024
    elif size.endswith('MB'):
        size = float(size[:-2]) * 1024**2
    elif size.endswith('GB'):

src/p/l/plone.app.blob-HEAD/src/plone/app/blob/browser/size.py   plone.app.blob(Download)
def bytesize(size):
    if size.endswith('kB'):
        size = float(size[:-2]) * 1024
    elif size.endswith('MB'):
        size = float(size[:-2]) * 1024**2
    elif size.endswith('GB'):

src/h/u/hue-HEAD/desktop/core/ext-py/guppy-0.1.10/guppy/gsl/Latex.py   hue(Download)
		self.error('Unrecognized colgroup option: %r'%c.tag, c)
	    cg = c.arg
	    if cg.endswith('%'):
		cg = cg[:-1]
		cg = float(cg)/100.0

src/p/y/pyggs-HEAD/libs/gcparser.py   pyggs(Download)
                    return None
                distance += char
            if distance.endswith("mi"):
                distance = float(distance[0:-2]) * 1.609344
            elif distance.endswith("ft"):

src/g/c/gcparser-HEAD/gcparser.py   gcparser(Download)
                    return None
                distance += char
            if distance.endswith("mi"):
                distance = float(distance[0:-2]) * 1.609344
            elif distance.endswith("ft"):

src/c/a/calibre-HEAD/src/calibre/db/fields.py   calibre(Download)
    def number_sort_key(self, val):
        try:
            p = 1
            if val and val.endswith('B'):
                p = 1 << (10 * self.SIZE_SUFFIX_MAP.get(val[-2:-1], 0))

src/a/s/astropy-0.3.1/astropy/units/format/generic.py   astropy(Download)
                t.type = 'UINT'
                t.value = int(t.value)
            elif t.value.endswith('.'):
                t.type = 'UINT'
                t.value = int(t.value[:-1])

  1 | 2  Next