f3f4bf67ad87c4d30e3694e251d274c3b85c81da,GPy/__init__.py,,load,#,37

Before Change


    try:
        try:
            import cPickle as pickle
            if isinstance(file_or_path, basestring):
                with open(file_or_path, "rb") as f:
                    u = pickle._Unpickler(f)
                    u.encoding = "latin1"
                    m = u.load()
            else:
                 m = pickle.load(file_or_path)
        except:
            import pickle
            if isinstance(file_or_path, str):
                with open(file_or_path, "rb") as f:

After Change


    for name, module in inspect.getmembers(kern.src):
        if not name.startswith("_"):
            sys.modules["GPy.kern._src.{}".format(name)] = module
    try:
        import pickle
        strcl = basestring
    except ImportError: //python3
        import pickle
        strcl = str

    if isinstance(file_or_path, strcl):
        with open(file_or_path, "rb") as f:
            m = pickle.load(f)
    else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: SheffieldML/GPy
Commit Name: f3f4bf67ad87c4d30e3694e251d274c3b85c81da
Time: 2015-11-09
Author: ibinbei@gmail.com
File Name: GPy/__init__.py
Class Name:
Method Name: load


Project Name: jazzband/django-debug-toolbar
Commit Name: 8d0245d51bf3dda12a89dd1b5b5e5bad69959519
Time: 2013-02-20
Author: dcramer@gmail.com
File Name: debug_toolbar/utils/tracking/db.py
Class Name: NormalCursorWrapper
Method Name: _decode


Project Name: DagnyT/hardnet
Commit Name: bbcd9df7e7b55415cee666d891cd7c0d291e433f
Time: 2017-08-06
Author: ducha.aiki@gmail.com
File Name: HardNet.py
Class Name:
Method Name: weights_init