Loads self.prj by epsg_code.
        If prjtext not found returns False.
359774
def from_epsg(self, epsg_code):
        
        self.epsg_code = epsg_code
        assert isinstance(self.epsg_code, int)
        cur = self.conn.cursor()
        cur.execute("SELECT prjtext FROM prj_epsg WHERE epsg_code = ?", (self.epsg_code,))
        result = cur.fetchone()
        if result is not None:
            self.prj = result[0]
            return True

        return False
1078748
def load(self, *args, **kwargs):
        
        response = self.http.send(self.url)
        if response.status_code == 200:
            _txt = response.content
            return self.parse_and_check_signature(_txt)
        else:
            logger.info("Response status: %s", response.status_code)
            raise SourceNotFound(self.url)
1146434
def loads(s, **kwargs):
    """"""

    try:
        return _engine[0](s)

    except _engine[2]:
        # except_clause: 'except' [test ['as' NAME]]  # grammar for py3x
        # except_clause: 'except' [test [('as' | ',') test]] # grammar for py2x
        why = sys.exc_info()[1]
        raise JSONError(why)
196882
@Override
    public synchronized boolean load() {
        Either<Void, T> oldData = data;
        long oldModified = modified;
        String oldKey = versionedKey;
        try {
            if (isOutOfDate() || needsData()) {
                String newVersionedKey = reader.getAsString(key)
                                               .orElse(null);
                val loaded = nonAtomicload(newVersionedKey);
                data = Either.right((T) loaded._2());
                modified = loaded._1();
                versionedKey = newVersionedKey;
            } else {
                return false;
            }
        } catch (Throwable e) {
            data = oldData;
            versionedKey = oldKey;
            modified = oldModified;
            logger.info(e.getMessage(), e);
            throw ExceptionSoftener.throwSoftenedException(e);
        }
        return true;
    }
1041851
private static boolean hasInsertionCode(String pdbserial) {
		try {
			Integer.parseInt(pdbserial) ;
		} catch (NumberFormatException e) {
			return true ;
		}
		return false ;
	}
22081
def load(self, name, code):
        
        # We need to make a dynamic Python method.
        source = "def RSOBJ(rs, args):\n"
        for line in code:
            source = source + "\t" + line + "\n"

        source += "self._objects[name] = RSOBJ\n"

        try:
            exec(source)
            # self._objects[name] = RSOBJ
        except Exception as e:
            print("Failed to load code from object", name)
            print("The error given was: ", e)
573789
def as_html(self):
        
        url = '{prefix}{code}.html?download'.format(prefix=EPSG_IO_URL,
                                                    code=self.id)
        return requests.get(url).text
1343067
def load(self, elem):
        
        self.testTag(elem, 'str')
        return elem.text if elem.text is not None else ''
1014922
def load(self):
        
        # load the custom format
        if self._customFormat and os.path.exists(self.fileName()):
            self._customFormat.load(self.fileName())
565208
def loads(s, **kwargs):
    
    if not isinstance(s, string_type):
        raise TypeError("Expected s to be a str, got %s" % type(s))

    try:
        fp = unicodeIO(s)
    except TypeError:
        fp = strIO(s)

    return parse(fp, **kwargs)
843697
def load_ext(self):
        """"""
        try:
            sequencemanager = hydpy.pub.sequencemanager
        except AttributeError:
            raise RuntimeError(
                'The time series of sequence %s cannot be loaded.  Firstly, '
                'you have to prepare `pub.sequencemanager` correctly.'
                % objecttools.devicephrase(self))
        sequencemanager.load_file(self)
1086370
private static String readPRJFile(File prjFile) throws FileNotFoundException, IOException {
        try (FileInputStream fis = new FileInputStream(prjFile)) {
            BufferedReader r = new BufferedReader(new InputStreamReader(fis, Charset.defaultCharset()));
            StringBuilder b = new StringBuilder();
            while (r.ready()) {
                b.append(r.readLine());
            }
            return b.toString();
        }
    }
1170048
def load(self, name, code):
        """"""

        source = "\n".join(code)
        self._objects[name] = source
726047
def load_from_arpa_str(self, arpa_str):
        
        data_found = False
        end_found = False
        in_ngram_block = 0
        for i, line in enumerate(arpa_str.split("\n")):
            if not end_found:
                if not data_found:
                    if "\\data\\" in line:
                        data_found = True
                else:
                    if in_ngram_block == 0:
                        if line.startswith("ngram"):
                            ngram_type, count = line.split("=")
                            _, n = ngram_type.split(" ")
                            n = int(n)
                            self.ngrams[n] = {'data': {},
                                              'count': count}
                        elif line.startswith("\\"):
                            n = int(line.split("-")[0][1:])
                            in_ngram_block = n
                        else:
                            continue  # Empty line
                    elif in_ngram_block > 0:
                        if "\\end\\" in line:
                            end_found = True
                        elif line.startswith("\\"):
                            n = int(line.split("-")[0][1:])
                            in_ngram_block = n
                        elif len(line) <= 1:
                            continue
                        else:
                            data = line.split("\t")
                            probability = Decimal(data[0])
                            ngram = data[1:]
                            if len(ngram) != n:
                                raise Exception(("ARPA language file is "
                                                 "inconsistant. Line %i has "
                                                 "only %i items, but should "
                                                 "have %i items.") %
                                                (i, len(ngram), n))
                            rest = ngram
                            append_to = self.ngrams[n]['data']
                            while len(rest) > 1:
                                first, rest = rest[0], rest[1:]
                                if first not in append_to:
                                    append_to[first] = {}
                                append_to = append_to[first]
                            if rest[0] in append_to:
                                raise Exception(("Duplicate entry for "
                                                 "ngram %s") % ngram)
                            append_to[rest[0]] = probability
            else:
                if line.startswith("info: "):
                    logging.info(line[6:])
1041584
def load_ply(fileobj):
    """"""
    def nextline():
        """Read next line, skip comments"""
        while True:
            line = fileobj.readline()
            assert line != ''  # eof
            if not line.startswith('comment'):
                return line.strip()

    assert nextline() == 'ply'
    assert nextline() == 'format ascii 1.0'
    line = nextline()
    assert line.startswith('element vertex')
    nverts = int(line.split()[2])
    # print 'nverts : ', nverts
    assert nextline() == 'property float x'
    assert nextline() == 'property float y'
    assert nextline() == 'property float z'
    line = nextline()

    assert line.startswith('element face')
    nfaces = int(line.split()[2])
    # print 'nfaces : ', nfaces
    assert nextline() == 'property list uchar int vertex_indices'
    line = nextline()
    has_texcoords = line == 'property list uchar float texcoord'
    if has_texcoords:
        assert nextline() == 'end_header'
    else:
        assert line == 'end_header'

    # Verts
    verts = np.zeros((nverts, 3))
    for i in range(nverts):
        vals = nextline().split()
        verts[i, :] = [float(v) for v in vals[:3]]
    # Faces
    faces = []
    faces_uv = []
    for i in range(nfaces):
        vals = nextline().split()
        assert int(vals[0]) == 3
        faces.append([int(v) for v in vals[1:4]])
        if has_texcoords:
            assert len(vals) == 11
            assert int(vals[4]) == 6
            faces_uv.append([(float(vals[5]), float(vals[6])),
                             (float(vals[7]), float(vals[8])),
                             (float(vals[9]), float(vals[10]))])
            # faces_uv.append([float(v) for v in vals[5:]])
        else:
            assert len(vals) == 4
    return verts, faces, faces_uv
1258467
def loads(self, string):
        ""
        script_class = self.get_script_class()
        script = self._load(BytesIO(string), self._protocol, self._version)
        return script_class(script)
226158
def eps(self):
	""""""

        import tkFileDialog,tkMessageBox
        filename=tkFileDialog.asksaveasfilename(message="save postscript to file",filetypes=['eps','ps'])
	if filename is None:
	    return 

	self.postscript(file=filename)