temp function to list inapp products.
766966
def list_inappproducts(self):
        """"""

        result = self.service.inappproducts().list(
            packageName=self.package_name).execute()
        if result is not None:
            return result.get('inappproduct', list())
        return list()
875113
def list(self, full=False):
        """"""

        if self.is_api:
            return self._list_api(full=full)
        else:
            return self._list_fs(full=full)
985371
def get_applicable_values(self):
        """"""
        return [v for v in self._values if v.is_active and not v.is_all_results]
518416
def temp_environ():
    """"""
    environ = dict(os.environ)
    try:
        yield

    finally:
        os.environ.clear()
        os.environ.update(environ)
90298
def list_conditions(self, service_id, version_number):
		""""""
		content = self._fetch("/service/%s/version/%d/condition" % (service_id, version_number))
		return map(lambda x: FastlyCondition(self, x), content)
437452
def packageInfo(self):
        """"""
        url = "%s/item.pkinfo" % self.root
        params = {'f' : 'json'}
        result = self._get(url=url,
                           param_dict=params,
                           securityHandler=self._securityHandler,
                           proxy_url=self._proxy_url,
                           proxy_port=self._proxy_port,
                           out_folder=tempfile.gettempdir())
        return result
84762
def list_products(page_size=200, page_index=0, sort="", q=""):
    
    content = list_products_raw(page_size, page_index, sort, q)
    if content:
        return utils.format_json_list(content)
711613
def product(self, *products):
        
        """
        for product in products:
            self._product.append(product)
        return self
885577
def upload(client, source_dir):
    """"""
    print('')
    print('upload inappproducs')
    print('---------------------')

    products_folder = os.path.join(source_dir, 'products')
    product_files = filter(os.path.isfile, list_dir_abspath(products_folder))

    current_product_skus = map(lambda product: product['sku'], client.list_inappproducts())
    print(current_product_skus)
    for product_file in product_files:
        with open(product_file) as product_file:
            product = json.load(product_file)
        #check if the product is new
        sku = product['sku']
        product['packageName'] = client.package_name
        print(sku)
        if sku in current_product_skus:
            print("update product {0}".format(sku))
            client.update_inappproduct(product, sku)
        else:
            print("create product {0}".format(sku))
            client.insert_inappproduct(product)
9803
def listed(self):
        
        print("\nPackages in the queue:\n")
        for pkg in self.packages():
            if pkg:
                print("{0}{1}{2}".format(self.meta.color["GREEN"], pkg,
                                         self.meta.color["ENDC"]))
                self.quit = True
        if self.quit:
            print("")
627123
def _interp_function(self, y_ip1, y_i, t_ip1, t_i, imt_per):
        
        return y_i + (y_ip1 - y_i) / (t_ip1 - t_i) * (imt_per - t_i)
710072
def filter(self, table, idps, filter_string):
        """"""
        q = filter_string.lower()
        return [idp for idp in idps
                if q in idp.ud.lower()]
1157109
def items(self):
        """"""
        sql = """
            SELECT
                app_name,
                next_run,
                first_run,
                last_run,
                last_success,
                depends_on,
                error_count,
                last_error
            FROM crontabber"""
        columns = (
            'app_name',
            'next_run', 'first_run', 'last_run', 'last_success',
            'depends_on', 'error_count', 'last_error'
        )
        items = []
        for record in self.transaction_executor(execute_query_fetchall, sql):
            row = dict(zip(columns, record))
            items.append((row.pop('app_name'), row))
        return items
58733
def list():
        
        try:
            devs = hid.enumerate(VENDOR_ID,PRODUCT_ID)
            serials = list(map(lambda d:d.get('serial_number'), devs))
            return serials
        except IOError as e:
            return []
319313
def n_hot(ids, c):
    '''
    
    '''
    res = np.zeros((c,), dtype=np.float32)
    res[ids] = 1
    return res
229841
def list_versions_for_product(id=None, name=None, page_size=200, page_index=0, sort='', q=''):
    
    content = list_versions_for_product_raw(id, name, page_size, page_index, sort, q)
    if content:
        return utils.format_json_list(content)
1229131
def list_packages(self, installed=True, notinstalled=True):
        """"""

        self.profile = Profile()

        # Classify packages
        installed_packages = []
        notinstalled_packages = []

        for package in self.packages:
            data = {
                'name': package,
                'version': None,
                'description': self.packages.get(package).get('description')
            }
            if package in self.profile.packages:
                data['version'] = self.profile.get_package_version(
                    package, self.get_package_release_name(package))
                installed_packages += [data]
            else:
                notinstalled_packages += [data]

        # Print tables
        terminal_width, _ = click.get_terminal_size()

        if installed and installed_packages:

            # - Print installed packages table
            click.echo('\nInstalled packages:\n')

            PACKAGELIST_TPL = ('{name:20} {description:30} {version:<8}')

            click.echo('-' * terminal_width)
            click.echo(PACKAGELIST_TPL.format(
                name=click.style('Name', fg='cyan'), version='Version',
                description='Description'))
            click.echo('-' * terminal_width)

            for package in installed_packages:
                click.echo(PACKAGELIST_TPL.format(
                    name=click.style(package.get('name'), fg='cyan'),
                    version=package.get('version'),
                    description=package.get('description')))

        if notinstalled and notinstalled_packages:

            # - Print not installed packages table
            click.echo('\nNot installed packages:\n')

            PACKAGELIST_TPL = ('{name:20} {description:30}')

            click.echo('-' * terminal_width)
            click.echo(PACKAGELIST_TPL.format(
                name=click.style('Name', fg='yellow'),
                description='Description'))
            click.echo('-' * terminal_width)

            for package in notinstalled_packages:
                click.echo(PACKAGELIST_TPL.format(
                    name=click.style(package.get('name'), fg='yellow'),
                    description=package.get('description')))