[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][ftp-team/dak][master] Dont use numpy, use random.sample



Title: GitLab

Joerg Jaspert pushed to branch master at Debian FTP Team / dak

Commits:

  • fe414563
    by Joerg Jaspert at 2024-10-31T00:07:48+01:00
    Dont use numpy, use random.sample
    

1 changed file:

Changes:

  • dak/process_upload.py
    ... ... @@ -579,8 +579,8 @@ def main():
    579 579
             # FIXME: quick hack to NOT have p-u run for ages, if some binnmu fun uploads thousands of changes
    
    580 580
             # might want to make the number configurable at some point
    
    581 581
             if len(changes_files) > 200:
    
    582
    -            import numpy
    
    583
    -            changes_files = numpy.random.choice(changes_files, 200, False)
    
    582
    +            import random
    
    583
    +            changes_files = random.sample(changes_files, k=200)
    
    584 584
             Logger.log(["Using changes files from directory", cnf["Dinstall::Options::Directory"], len(changes_files)])
    
    585 585
         elif not len(changes_files) > 0:
    
    586 586
             utils.fubar("No changes files given and no directory specified")
    


  • Reply to: