Franc Gossin Blog: April 2025

Franc Gossin Blog by Franc Gossin is licensed under CC BY-NC-ND 4.0

2025-04-02

Removing Vivo System App Causes Problems

These apps can be successfully removed with

pm uninstall -k user 0

e in Python function

Here is a function written in Python. It is used to randomly choose at least one from a list.

import random
import math
def choose_at_least_one(list_items):
    chosen_items = [i for i in list_items if random.random() <= (1/len(list_items))]
    if len(chosen_items) == 0:
        return choose_at_least_one(list_items)
    else:
        return chosen_items