• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(1955)  |  Call(1794)  |  Derive(0)  |  Import(161)
load(file) -- Load a pickle from the given file

src/g/o/google-app-engine-HEAD/lib/webob/docs/comment-example-code/example.py   google-app-engine(Download)
import os
import urllib
import time
import re
from cPickle import load, dump
from webob import Request, Response, html_escape
from webob import exc
            return []
        else:
            f = open(filename, 'rb')
            data = load(f)
            f.close()
            return data
 

src/g/o/google_appengine-HEAD/lib/webob/docs/comment-example-code/example.py   google_appengine(Download)
import os
import urllib
import time
import re
from cPickle import load, dump
from webob import Request, Response, html_escape
from webob import exc
            return []
        else:
            f = open(filename, 'rb')
            data = load(f)
            f.close()
            return data
 

src/g/a/gaesdk-python-HEAD/lib/webob/docs/comment-example-code/example.py   gaesdk-python(Download)
import os
import urllib
import time
import re
from cPickle import load, dump
from webob import Request, Response, html_escape
from webob import exc
            return []
        else:
            f = open(filename, 'rb')
            data = load(f)
            f.close()
            return data
 

src/p/y/PyBrain-0.3/pybrain/tools/example_tools.py   PyBrain(Download)
# Author: Frank Sehnke, sehnke@in.tum.de
#########################################################################
 
from cPickle import load, dump
from scipy import array, sqrt
from pylab import *
class ExTools():
    def loadWeights(self, filename):
        filepointer = file(filename)
        self.agent.learner.current = load(filepointer)
        filepointer.close()        
        self.agent.learner.gd.init(agent.learner.current)
        self.agent.learner.epsilon = 0.2
        self.agent.learner.initSigmas()

src/w/e/webnest-HEAD/env/lib/python2.6/site-packages/werkzeug/contrib/cache.py   webnest(Download)
    from md5 import new as md5
from itertools import izip
from time import time
from cPickle import loads, dumps, load, dump, HIGHEST_PROTOCOL
 
 
class BaseCache(object):
            for idx, key in enumerate(entries):
                try:
                    f = file(self._get_filename(key))
                    if load(f) > now and idx % 3 != 0:
                        f.close()
                        continue
                except:
    def get(self, key):
        filename = self._get_filename(key)
        try:
            f = file(filename, 'rb')
            try:
                if load(f) >= time():
                    return load(f)

src/z/a/zamboni-lib-HEAD/lib/python/werkzeug/contrib/cache.py   zamboni-lib(Download)
    from md5 import new as md5
from itertools import izip
from time import time
from cPickle import loads, dumps, load, dump, HIGHEST_PROTOCOL
 
 
class BaseCache(object):
            for idx, key in enumerate(entries):
                try:
                    f = file(self._get_filename(key))
                    if load(f) > now and idx % 3 != 0:
                        f.close()
                        continue
                except:
    def get(self, key):
        filename = self._get_filename(key)
        try:
            f = file(filename, 'rb')
            try:
                if load(f) >= time():
                    return load(f)

src/u/l/uliweb-HEAD/uliweb/lib/werkzeug/contrib/sessions.py   uliweb(Download)
    from hashlib import sha1
except ImportError:
    from sha import new as sha1
from cPickle import dump, load, HIGHEST_PROTOCOL
from werkzeug.utils import ClosingIterator, dump_cookie, parse_cookie
 
 
        else:
            f = file(fn, 'rb')
            try:
                data = load(f)
            finally:
                f.close()
        return self.session_class(data, sid, False)

src/p/y/pythonedinburgh-HEAD/werkzeug/contrib/cache.py   pythonedinburgh(Download)
    from md5 import new as md5
from itertools import izip
from time import time
from cPickle import loads, dumps, load, dump, HIGHEST_PROTOCOL
 
 
class BaseCache(object):
            for idx, key in enumerate(entries):
                try:
                    f = file(self._get_filename(key))
                    if load(f) > now and idx % 3 != 0:
                        f.close()
                        continue
                except:
    def get(self, key):
        filename = self._get_filename(key)
        try:
            f = file(filename, 'rb')
            try:
                if load(f) >= time():
                    return load(f)

src/b/e/Bento-HEAD/bento/private/_yaku/yaku/context.py   Bento(Download)
import os
import sys
 
from cPickle \
    import \
        load, dump
 
def get_cfg():
    ctx = ConfigureContext()
    if os.path.exists(CONFIG_CACHE):
        fid = open(CONFIG_CACHE, "rb")
        try:
            ctx.cache = load(fid)
            ctx.stdout_cache = load(fid)

src/u/l/uliweb-HEAD/uliweb/lib/werkzeug/contrib/cache.py   uliweb(Download)
    from md5 import new as md5
from itertools import izip
from time import time
from cPickle import loads, dumps, load, dump, HIGHEST_PROTOCOL
 
have_memcache = True
try:
    def get(self, key):
        filename = self._get_filename(key)
        try:
            f = file(filename, 'rb')
            try:
                if load(f) >= time():
                    return load(f)

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