Adds a collection of analyses to the Worksheet at once
325953
def addAnalyses(self, analyses):
        
        actions_pool = ActionHandlerPool.get_instance()
        actions_pool.queue_pool()
        for analysis in analyses:
            self.addAnalysis(api.get_object(analysis))
        actions_pool.resume()
550894
def tabulate(collection, headers, datetime_fmt='%Y-%m-%d %H:%M:%S', **kwargs):
    """"""
    if isinstance(headers, dict):
        attrs = headers.keys()
        # if mapping is not specified keep original
        names = [
            key if value is None else value for key, value in headers.items()
        ]
    else:
        attrs = names = headers
    table = [(
        format_cell(cell, datetime_fmt=datetime_fmt)
        for cell in attrgetter(*attrs)(c)
    ) for c in collection]
    return tblte(table, headers=[h.upper() for h in names], **kwargs)
1001868
private void addRecords(HBaseDataWrapper columnWrapper, List<HBaseDataWrapper> embeddableData,
            List<HBaseDataWrapper> dataSet)
    {
        dataSet.add(columnWrapper);

        if (!embeddableData.isEmpty())
        {
            dataSet.addAll(embeddableData);
        }
    }
529354
function worksheetData(worksheet) {
    return {
        worksheetId: getItemIdFromUrl(g(worksheet.id)),
        title: g(worksheet.title),
        updated: g(worksheet.updated),
        colCount: g(worksheet['gs$colCount']),
        rowCount: g(worksheet['gs$rowCount'])
    };
}
749053
def analyses():
    """"""
    per_page = int(request.args.get('per_page', 50))
    page = int(request.args.get('page', 1))
    query = store.analyses(status=request.args.get('status'),
                           query=request.args.get('query'),
                           is_visible=request.args.get('is_visible') == 'true' or None)

    query_page = query.paginate(page, per_page=per_page)
    data = []
    for analysis_obj in query_page.items:
        analysis_data = analysis_obj.to_dict()
        analysis_data['user'] = analysis_obj.user.to_dict() if analysis_obj.user else None
        analysis_data['failed_jobs'] = [job_obj.to_dict() for job_obj in analysis_obj.failed_jobs]
        data.append(analysis_data)

    return jsonify(analyses=data)
369553
public function addNewSheet()
    {
        $newSheetIndex = count($this->worksheets);
        $sheet = new Sheet($newSheetIndex, $this->internalId);

        $worksheetFilesFolder = $this->fileSystemHelper->getXlWorksheetsFolder();
        $worksheet = new Worksheet($sheet, $worksheetFilesFolder, $this->sharedStringsHelper, $this->styleHelper, $this->shouldUseInlineStrings);
        $this->worksheets[] = $worksheet;

        return $worksheet;
    }
1104454
def detect_worksheets(archive):
    """"""
    # content types has a list of paths but no titles
    # workbook has a list of titles and relIds but no paths
    # workbook_rels has a list of relIds and paths but no titles
    # rels = {'id':{'title':'', 'path':''} }
    content_types = read_content_types(archive)
    valid_sheets = dict((path, ct) for ct, path in content_types if ct == WORKSHEET_TYPE)
    rels = dict(read_rels(archive))
    for sheet in read_sheets(archive):
        rel = rels[sheet['id']]
        rel['title'] = sheet['name']
        rel['sheet_id'] = sheet['sheetId']
        rel['state'] = sheet.get('state', 'visible')
        if ("/" + rel['path'] in valid_sheets
            or "worksheets" in rel['path']): # fallback in case content type is missing
            yield rel
31129
def write_xls(data, file_name, worksheet_names=None):
    '''
    
    '''
    workbook = xlwt.Workbook()
    for sheet_index, sheet_data in enumerate(data):
        if worksheet_names and sheet_index < len(worksheet_names) and worksheet_names[sheet_index]:
            name = worksheet_names[sheet_index]
        else:
            name = 'Worksheet {}'.format(sheet_index)
        sheet = workbook.add_sheet(name)
        for row_index, row in enumerate(sheet_data):
            for col_index, value in enumerate(row):
                sheet.write(row_index, col_index, value)
    workbook.save(file_name)
1237557
def addrecords(self, new):
        
        data = spreadsheet.addrecords(self,new)
        data = data.view(tabarray)
        data.coloring = self.coloring
        return data
843766
function all(sheet, nodes) {
  var result = []
  var length = nodes.length
  var index = -1

  while (++index < length) {
    result.push(visit(sheet, nodes[index]))
  }

  return result.join('')
}
1048264
def analyze(self, scratch, **kwargs):
        """"""
        for sprite in self.iter_sprites(scratch):
            for default in self.default_names:
                if default in sprite.name:
                    self.total_default += 1
                    self.list_default.append(sprite.name)
170626
function () {
		var chart = this,
			options = this.options,
			xAxisOptions = options.xAxis = splat(options.xAxis || {}),
			yAxisOptions = options.yAxis = splat(options.yAxis || {}),
			optionsArray,
			axis;

		// make sure the options are arrays and add some members
		each(xAxisOptions, function (axis, i) {
			axis.index = i;
			axis.isX = true;
		});

		each(yAxisOptions, function (axis, i) {
			axis.index = i;
		});

		// concatenate all axis options into one array
		optionsArray = xAxisOptions.concat(yAxisOptions);

		each(optionsArray, function (axisOptions) {
			axis = new Axis(chart, axisOptions);
		});

		chart.adjustTickAmounts();
	}
503686
def collect_analysis(self):
        '''
        
        '''
        analysis = {}
        for field in self.fields.values():
            for analyzer_name in ('analyzer', 'index_analyzer', 'search_analyzer'):
                if not hasattr(field, analyzer_name):
                    continue

                analyzer = getattr(field, analyzer_name)

                if not isinstance(analyzer, Analyzer):
                    continue

                definition = analyzer.get_analysis_definition()
                if definition is None:
                    continue

                for key in definition:
                    analysis.setdefault(key, {}).update(definition[key])

        return analysis
653404
def to_code_array(self):
        """"""

        self._xls2shape()

        worksheets = self.workbook.sheet_names()

        for tab, worksheet_name in enumerate(worksheets):
            worksheet = self.workbook.sheet_by_name(worksheet_name)
            self._xls2code(worksheet, tab)
            self._xls2attributes(worksheet, tab)
            self._xls2row_heights(worksheet, tab)
            self._xls2col_widths(worksheet, tab)
573574
def [](ind)
      case ind
      when Integer then worksheets[ind]
      when String  then worksheets.find { |ws| ws.sheet_name == ind }
      end
    end
947970
public void add(Project project2) {
        analysisTargets = appendWithoutDuplicates(analysisTargets, project2.analysisTargets);
        srcDirList = appendWithoutDuplicates(srcDirList, project2.srcDirList);
        auxClasspathEntryList = appendWithoutDuplicates(auxClasspathEntryList, project2.auxClasspathEntryList);
    }
795579
def before_reject(analysis):
    
    worksheet = analysis.getWorksheet()
    if not worksheet:
        return

    # Rejection of a routine analysis causes the removal of their duplicates
    for dup in worksheet.get_duplicates_for(analysis):
        doActionFor(dup, "unassign")