Returns a list of z-scores, one for each score in the passed list.

Usage:   lzs(inlist)
335750
def lzs (inlist):
    
    zscores = []
    for item in inlist:
        zscores.append(z(inlist,item))
    return zscores
942511
def scoreatpercentile(inlist, percent):
    
    if percent > 1:
        print("\nDividing percent>1 by 100 in lscoreatpercentile().\n")
        percent = percent / 100.0
    targetcf = percent * len(inlist)
    h, lrl, binsize, extras = histogram(inlist)
    cumhist = cumsum(copy.deepcopy(h))
    for i in range(len(cumhist)):
        if cumhist[i] >= targetcf:
            break
    score = binsize * ((targetcf - cumhist[i - 1]) / float(h[i])) + (lrl + binsize * i)
    return score
428181
def zipLists(*lists):
    
    length = len(lists[0])
    for i, list_ in enumerate(lists[1:]):
        if len(list_) != length:
            msg = "List at index {} has length {} != {}".format(
                i + 1, len(list_), length)
            raise AssertionError(msg)
    return zip(*lists)
651891
def zset_score_pairs(response, **options):
    
    if not response or not options.get('withscores'):
        return response
    score_cast_func = options.get('score_cast_func', float)
    it = iter(response)
    return list(izip(it, imap(score_cast_func, it)))
320084
def getpexts(lsp):
    '''
    
    '''
    lines=lsp.split('\n');
    #unfortunately regex doesn't work here
    lns,planens = zip(
        *[ (i,int(re.search('^ *extract *([0-9]+)',line).group(1)))
           for i,line in enumerate(lines)
           if re.search('^ *extract *[0-9]+', line)]);
    if len(lns) == 0: return [];
    end = lns[-1];
    
    for i,line in enumerate(lines[end+1:]):
        if re.match(' *\[',line): break;
    end += i;
    lineranges = zip(lns,(lns+(end,))[1:]);
    planes=dict()
    for (i,end),plane in zip(lineranges,planens):
        d=dict();
        labels = [
            'species',
            'direction',
            'position',];
        datarx = [
            '^ *species *([0-9]+)',
            '^ *direction *([xXyYzZ])',
            '^ *at *(.*)',];
        convs  = [
            lambda s: int(s),
            lambda i: i,
            lambda s: np.array(
                map(float,s.split(' '))),
        ];
        for line in lines[i:end]:
            for label,rx,conv in zip(labels,datarx,convs):
                if re.match(rx,line):
                    d[label]=conv(re.match(rx,line).group(1));
                pass
            pass
        planes[plane] = d;
    return planes;
603027
def calculate_tetra_zscores(infilenames):
    
    org_tetraz = {}
    for filename in infilenames:
        org = os.path.splitext(os.path.split(filename)[-1])[0]
        org_tetraz[org] = calculate_tetra_zscore(filename)
    return org_tetraz
505059
def _compute_vline_scores(self):
        
        M, N, L = self.M, self.N, self.L
        vline_score = {}
        for x in range(M):
            laststart = [0 if (x, 0, 1, k) in self else None for k in range(L)]
            for y in range(N):
                block = [0] * (y + 1)
                for k in range(L):
                    if (x, y, 1, k) not in self:
                        laststart[k] = None
                    elif laststart[k] is None:
                        laststart[k] = y
                        block[y] += 1
                    elif y and (x, y, 1, k) not in self[x, y - 1, 1, k]:
                        laststart[k] = y
                    else:
                        for y1 in range(laststart[k], y + 1):
                            block[y1] += 1
                for y1 in range(y + 1):
                    vline_score[x, y1, y] = block[y1]
        self._vline_score = vline_score
321063
def filter_list_by_indices(lst, indices):
    
    return [x for i, x in enumerate(lst) if i in indices]
143756
def tip_zscores(a):
    
    weighted = a * a.mean(axis=0)
    scores = weighted.sum(axis=1)
    zscores = (scores - scores.mean()) / scores.std()
    return zscores
358616
def items(self):
        """"""
        return list(zip((self.scalars + self.sections), list(self.values())))
545865
def range(self, start, end, desc=False):
        
        if not self:
            return []

        if desc:
            return reversed(self._scores[len(self) - end - 1:len(self) - start])
        else:
            return self._scores[start:end + 1]
498208
def as_items(self, decode=False):
        
        items = self.database.zrange(self.key, 0, -1, withscores=True)
        if decode:
            items = [(_decode(k), score) for k, score in items]
        return items
312552
def _get_chunk_indices(za):
    # TODO: does zarr provide code for this?
    
    return [(i, j) for i in range(int(math.ceil(float(za.shape[0])/za.chunks[0])))
            for j in range(int(math.ceil(float(za.shape[1])/za.chunks[1])))]
151732
public float[] normalise(float[] z) {
    float[] result = new float[z.length];

    for (int i = 0; i < z.length; i++) {
      float bound = (float) 2.0 * (i + 1);
      result[i] = z[i] / bound;
      result[i] = correctTo01(result[i]);
    }

    return result;
  }
3026
def zinb_ll(data, P, R, Z):
    
    lls = nb_ll(data, P, R)
    clusters = P.shape[1]
    for c in range(clusters):
        pass
    return lls
1087654
def zrevrange_with_int_score(self, key, max_score, min_score):
        
        self._prune_penalty_box()

        if len(self.active_clients) == 0:
            raise ClusterEmptyError("All clients are down.")

        element__score = defaultdict(int)
        for client in self.active_clients:
            revrange = client.zrevrangebyscore(
                key, max_score, min_score, withscores=True, score_cast_func=int
            )

            for element, count in revrange:
                element__score[element] = max(element__score[element], int(count))

        return element__score
1311801
def _zs_decode(self, msg):
        """"""
        status = [_status_decode(int(x, 16)) for x in msg[4:4+Max.ZONES.value]]
        return {'zone_statuses': status}