def sampleInteractions(user_id,items_with_rating,n):
    if len(items_with_rating) > n:
        return user_id, random.sample(items_with_rating,n)
    else:
        return user_id, items_with_rating
Creates a new file-like object.
dataset/ETHPy150Open evancasey/spark-knn-recommender/algorithms/itemBasedRecommender.py/sampleInteractions--crossover with--dataset/ETHPy150Open log2timeline/dfvfs/dfvfs/resolver/encrypted_stream_resolver_helper.py/EncryptedStreamResolverHelper.NewFileObject