Calcule l'inflateur de vieillissement à partir des masses de comptabilité nationale.
351335
def get_inflators_cn_to_cn(target_year):
    '''
        
    '''
    data_year = find_nearest_inferior(data_years, target_year)
    data_year_cn_aggregates = get_cn_aggregates(data_year)['consoCN_COICOP_{}'.format(data_year)].to_dict()
    target_year_cn_aggregates = get_cn_aggregates(target_year)['consoCN_COICOP_{}'.format(target_year)].to_dict()

    return dict(
        (key, target_year_cn_aggregates[key] / data_year_cn_aggregates[key])
        for key in data_year_cn_aggregates.keys()
        )
656918
def mass_tot(self, rho0, Rs):
        
        m_tot = 2*np.pi*rho0*Rs**3
        return m_tot
1328780
function compit(ca,cb,aa,ab) {
            return (ca*aa + cb*ab * (1-aa)) / (aa+ab*(1-aa));
        }
82162
def von_mises_strain(self):
        
        eps = self - 1/3 * np.trace(self) * np.identity(3)

        return np.sqrt(np.sum(eps * eps) * 2/3)
128702
def fRD( a, M):
    """"""
    f = (lal.C_SI**3.0 / (2.0*lal.PI*lal.G_SI*M*lal.MSUN_SI)) * (1.5251 - 1.1568*(1.0-a)**0.1292)
    return f
665359
def inflate_to_one_hot(tensor, classes):
    
    one_hot = tf.one_hot(tensor, classes)
    shape = one_hot.get_shape().as_list()
    return tf.reshape(one_hot, shape=[-1, shape[1], shape[2], shape[4]])
637971
def filter_by_maf(min_maf=0.01):
    

    def f(G, bim):
        maf = 0.5 * G.mean(0)
        maf[maf > 0.5] = 1.0 - maf[maf > 0.5]
        Isnp = maf > min_maf
        G_out = G[:, Isnp]
        bim_out = bim[Isnp]
        return G_out, bim_out

    return f
521687
def inflate_long(s, always_positive=False):
    ""
    out = 0L
    negative = 0
    if not always_positive and (len(s) > 0) and (ord(s[0]) >= 0x80):
        negative = 1
    if len(s) % 4:
        filler = '\x00'
        if negative:
            filler = '\xff'
        s = filler * (4 - len(s) % 4) + s
    for i in range(0, len(s), 4):
        out = (out << 32) + struct.unpack('>I', s[i:i+4])[0]
    if negative:
        out -= (1L << (8 * len(s)))
    return out
862760
def inflate(self, newData={}):
        """"""
        from sc2maptool.functions import selectMap
        from sc2maptool.mapRecord import MapRecord
        self.__dict__.update(newData)
        #if not isinstance(self.state, types.GameStates):      self.state     = types.GameStates(self.state)
        if self.expo    and not isinstance(self.expo, types.ExpansionNames):    self.expo       = types.ExpansionNames(self.expo)
        if self.version and not isinstance(self.version, versions.Version):     self.version    = versions.Version(self.version)
        if self.ladder  and not isinstance(self.ladder, Ladder):                self.ladder     = Ladder(self.ladder)
        for i,player in enumerate(self.players): # iterate over all players
            if       isinstance(player, str):                                   self.players[i] = getPlayer(player)
            elif not isinstance(player, PlayerRecord):                          self.players[i] = buildPlayer(*player)
        if self.mode    and not isinstance(self.mode, types.GameModes):         self.mode       = types.GameModes(self.mode)
        if self.themap  and not isinstance(self.themap, MapRecord):             self.themap     = selectMap(name=self.themap)
1052392
def calcul_ratios_calage(year_data, year_calage, data_bdf, data_cn):
    '''
    
    '''
    masses = data_cn.merge(
        data_bdf, left_index = True, right_index = True
        )
    masses.rename(columns = {0: 'conso_bdf{}'.format(year_data)}, inplace = True)
    if year_calage != year_data:
        masses['ratio_cn{}_cn{}'.format(year_data, year_calage)] = (
            masses['consoCN_COICOP_{}'.format(year_calage)] / masses['consoCN_COICOP_{}'.format(year_data)]
            )
    if year_calage == year_data:
        masses['ratio_cn{}_cn{}'.format(year_data, year_calage)] = 1

    masses['ratio_bdf{}_cn{}'.format(year_data, year_data)] = (
        1e6 * masses['consoCN_COICOP_{}'.format(year_data)] / masses['conso_bdf{}'.format(year_data)]
        )
    return masses
1357727
def bhp2pascal(bhp, cfm, fan_tot_eff):
    """"""
    inh2o = bhp * 6356.0 * fan_tot_eff / cfm
    pascal = inh2o2pascal(inh2o)        
    m3s = cfm2m3s(cfm)
    return pascal, m3s
56082
def vap(x, a, b, c):
    
    return np.exp(a+b/x+c*np.log(x))
493433
async function pakoUnzip(inputData) {
  let strm
  let pos = 0
  let i = 0
  const chunks = []
  let inflator
  do {
    const remainingInput = inputData.slice(pos)
    inflator = new Inflate()
    strm = inflator.strm
    inflator.push(remainingInput, Z_SYNC_FLUSH)
    if (inflator.err) throw new Error(inflator.msg)

    pos += strm.next_in
    chunks[i] = Buffer.from(inflator.result)
    i += 1
  } while (strm.avail_in)

  const result = Buffer.concat(chunks)
  return result
}
63876
def get_inflators(target_year):
    '''
    
    '''
    data_year = find_nearest_inferior(data_years, target_year)
    inflators_bdf_to_cn = get_inflators_bdf_to_cn(data_year)
    inflators_cn_to_cn = get_inflators_cn_to_cn(target_year)

    ratio_by_variable = dict()
    for key in inflators_cn_to_cn.keys():
        ratio_by_variable[key] = inflators_bdf_to_cn[key] * inflators_cn_to_cn[key]

    return ratio_by_variable
212847
def mass2_from_mchirp_eta(mchirp, eta):
    
    mtotal = mtotal_from_mchirp_eta(mchirp, eta)
    return mass2_from_mtotal_eta(mtotal, eta)
1129845
def inflate!(by_w, by_h = nil)
      return inflate_by_size(by_w) if by_w.respond_to? :width

      validate(by_w, by_h)

      @width  += by_w
      @height += by_h

      self
    end
1374683
def _call(self, x):
        """"""

        sum_constr = abs(x.ufuncs.sum() / self.diameter - 1) <= self.sum_rtol

        nonneq_constr = x.ufuncs.greater_equal(0).asarray().all()

        if sum_constr and nonneq_constr:
            return 0
        else:
            return np.inf