Loads a data file and sets it to self.data.

            Arguments:
            data_file -- The filename to load.
168330
def load(self, data_file = None):
        

        if not data_file:
            data_file = ''
        elif data_file[-1] != '/':
            data_file += '/'

        if data_file[-6:] != self.lazy_folder:
            data_file += self.lazy_folder
        
        data_file += self.data_filename

        self.data = self._load(data_file)
        return self
1144903
def load_file(self, input_file):
        
        pyimg = imp.load_source('image2py_taf', input_file)
        self.files = pyimg.data
        self.set_template(templates.templateByName(pyimg.template))
182829
def update_resources_from_datafile(self, srcpath, type_, names=None, 
                                       languages=None):
        
        UpdateResourcesFromDataFile(self.filename, srcpath, type_, names, 
                                    languages)
859944
def load(self, filename):
        """"""
        f = io.open(filename,'r',encoding='utf-8')
        for line in f:
            data = line.strip().split("\t")
            type, count = data[:2]
            self.count(type,count)
        f.close()
1103016
def set_from_file(file_name):
    
    if type(file_name) != str:
        raise TypeError('file_name must be str')
    global _config_file_name
    _config_file_name = file_name
    # Try to open the file and get the json data into a dictionary
    with open(file_name, "r") as file:
        data = yaml.load(file)
    # each value found will overwrite the same value in the config
    _list_merge(data, _config)
358971
def _load(self, data_path, ignore_missing=False):
        '''
        '''
        if data_path.endswith(".npz"):
            data_dict = np.load(data_path)
            keys = sorted(data_dict.keys())
            for i, k in enumerate(keys):
                data = data_dict[k]
                op_name = "_".join(k.split("_")[:-1])
                param_name = "weights" if k.split("_")[-1] == "W" else "biases"
                if self.verbose:
                    print("Loaded: {} {}".format(op_name, param_name))
                if op_name not in self.weights:
                    self.weights[op_name] = {}
                self.weights[op_name][param_name] = data
        elif data_path.endswith(".npy"):
            data_dict = np.load(data_path).item()
            for op_name in data_dict:
                with tf.variable_scope(op_name, reuse=True):
                    for param_name, data in data_dict[op_name].iteritems():
                        if self.verbose:
                            print("Loaded: {} {}".format(op_name, param_name))
                        if op_name not in self.weights:
                            self.weights[op_name] = {}
                        self.weights[op_name][param_name] = data
        else:
            raise RuntimeError("Invalid file type.")
528482
def load_data_file_to_net(self, filename):
    '''
    
    '''
    inst_dat = self.load_json_to_dict(filename)
    load_data.load_data_to_net(self, inst_dat)
174361
def file(ctx, data_dir, data_file):
    """"""
    if not ctx.file:
        ctx.data_file = data_file

    if not ctx.data_dir:
        ctx.data_dir = data_dir

    ctx.type = 'file'
185345
def load_and_set_file_content(self, file_system_path):
        
        semantic_data = load_data_file(os.path.join(file_system_path, storage.SEMANTIC_DATA_FILE))
        self.model.state.semantic_data = semantic_data
430080
def load_data(self, filename, *args, **kwargs):
        
        # header keys
        header_param = self.parameters.get('header')  # default is None
        # data keys
        data_param = self.parameters['data']  # raises KeyError if no 'data'
        dtype = data_param['dtype']  # raises KeyError if no 'dtype'
        # convert to tuple and normal ASCII
        _utf8_list_to_ascii_tuple(dtype) if dtype else None  # -> tuple of str
        delimiter = data_param.get('delimiter')  # default is None
        skiprows = data_param.get('skiprows')  # default is None
        data_units = data_param.get('units', {})  # default is an empty dict
        data = {}  # a dictionary for data
        # open file for reading
        with open(filename, 'r') as fid:
            # read header
            if header_param:
                data.update(_read_header(fid, header_param))
                fid.seek(0)  # move cursor back to beginning
            # read data
            data_data = np.loadtxt(fid, dtype, delimiter=delimiter,
                                   skiprows=skiprows)
        # apply units
        data.update(_apply_units(data_data, data_units, fid.name))
        return data
492578
def file=(file)
      self.data = file
      dis_set :content_type, file.content_type
      dis_set :filename, file.original_filename
    end
999191
def data_file(self):
        
        return os.path.join(self.upload_directory, self.properties[datastore.PROPERTY_FILENAME])
657929
def load_data_and_build(self, filename, delimiter=","):
        
        data = np.genfromtxt(
            filename, dtype=float, delimiter=delimiter, names=True
        )
        data = data.view(np.float64).reshape(data.shape + (-1,))

        X = data[:, 0:-1]
        Y = data[:, -1]

        self.build(X=X, Y=Y)
519877
def load(self, filename='classifier.dump'):
        
        ifile = open(filename, 'r+')
        self.classifier = pickle.load(ifile)
        ifile.close()
884362
def load(data_path):
        
        with open(data_path, "r") as data_file:
            raw_data = data_file.read()

        data_file.close()
        return raw_data
260406
def save_data_file
      File.open(file_path(Phonelib::Core::FILE_MAIN_DATA), 'wb+') do |f|
        Marshal.dump(@data, f)
      end
    end
793840
def load_data(filename):
    
    data = pandas.read_csv(filename, header=None, delimiter='\t', skiprows=9)
    return data.as_matrix()