Python 随机打乱list

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import random
keywords = ['ajenti', 'django-suit', 'django-xadmin', 'flask-admin', 'flower', 'grappelli', 'wooey', 'algorithms',
'pypattyrn', 'python-patterns', 'sortedcontainers', 'django-simple-captcha',
'django-simple-spam-blocker', 'django-compressor', 'django-pipeline', 'django-storages', 'fanstatic',
'fileconveyor', 'flask-assets', 'jinja-assets-compressor', 'webassets', 'audiolazy', 'audioread',
'beets', 'dejavu', 'django-elastic-transcoder', 'eyed3', 'id3reader', 'm3u8', 'mingus', 'mutagen',
'pyaudioanalysis', 'pydub', 'pyechonest', 'talkbox', 'timeside', 'tinytag', 'authomatic',
'django-allauth', 'django-oauth-toolkit', 'flask-oauthlib', 'oauthlib', 'python-oauth2',
'python-social-auth', 'rauth', 'sanction', 'jose', 'pyjwt', 'python-jws', 'python-jwt', 'bitbake',
'buildout', 'platformio', 'pybuilder', 'scons', 'django-cms', 'djedi-cms', 'feincms', 'kotti',
'mezzanine', 'opps', 'plone', 'quokka', 'wagtail', 'widgy', 'beaker', 'diskcache',
'django-cache-machine', 'django-cacheops', 'django-viewlet', 'dogpile.cache', 'hermescache',
'johnny-cache', 'pylibmc', 'errbot', 'coala', 'code2flow', 'pycallgraph', 'flake8', 'pylama', 'pylint',
'mypy', 'asciimatics', 'cement', 'click', 'cliff', 'clint', 'colorama', 'docopt', 'gooey',
'python-fire', 'python-prompt-toolkit', 'aws-cli', 'bashplotlib', 'caniusepython3', 'cookiecutter',
'doitlive', 'howdoi', 'httpie', 'mycli', 'pathpicker', 'percol', 'pgcli', 'saws', 'thefuck', 'try',
'python-future', 'python-modernize', 'six', 'opencv', 'pyocr', 'pytesseract', 'simplecv', 'eventlet',
'gevent', 'multiprocessing', 'threading', 'tomorrow', 'uvloop', 'config', 'configobj', 'configparser',
'profig', 'python-decouple', 'cryptography', 'hashids', 'paramiko', 'passlib', 'pynacl', 'blaze',
'open mining', 'orange', 'pandas', 'cerberus', 'colander', 'jsonschema', 'schema', 'schematics',
'valideer', 'voluptuous', 'altair', 'bokeh', 'ggplot', 'matplotlib', 'pygal', 'pygraphviz', 'pyqtgraph',
'seaborn', 'vispy', 'pickledb', 'pipelinedb', 'tinydb', 'zodb', 'mysql-python', 'mysqlclient', 'oursql',
'pymysql', 'psycopg2', 'queries', 'txpostgres', 'apsw', 'dataset', 'pymssql', 'cassandra-python-driver',
'happybase', 'plyvel', 'py2neo', 'pycassa', 'pymongo', 'redis-py', 'telephus', 'txredis', 'arrow',
'chronyk', 'dateutil', 'delorean', 'moment', 'pendulum', 'pytime', 'pytz', 'when.py', 'ipdb', 'pdb++',
'pudb', 'remote-pdb', 'wdb', 'line_profiler', 'memory_profiler', 'profiling', 'vprof',
'django-debug-toolbar', 'django-devserver', 'flask-debugtoolbar', 'hunter', 'lptrace', 'manhole',
'pyelftools', 'pyringe', 'caffe', 'keras', 'mxnet', 'neupy', 'pytorch', 'tensorflow', 'theano',
'ansible', 'cloud-init', 'cuisine', 'docker compose', 'fabric', 'fabtools', 'honcho', 'openstack',
'pexpect', 'psutil', 'saltstack', 'supervisor', 'dh-virtualenv', 'nuitka', 'py2app', 'py2exe',
'pyinstaller', 'pynsist', 'sphinx', 'awesome-sphinxdoc', 'mkdocs', 'pdoc', 'pycco', 's3cmd', 's4cmd',
'you-get', 'youtube-dl', 'alipay', 'cartridge', 'django-oscar', 'django-shop', 'merchant', 'money',
'python-currencies', 'forex-python', 'shoop', 'elpy', 'anaconda', 'sublimejedi', 'jedi-vim',
'python-mode', 'youcompleteme', 'ptvs', 'python', 'magic python', 'liclipse', 'pycharm', 'spyder',
'envelopes', 'flanker', 'imbox', 'inbox.py', 'lamson', 'marrow mailer', 'modoboa', 'nylas sync engine',
'yagmail', 'pipenv', 'p', 'pyenv', 'venv', 'virtualenv', 'virtualenvwrapper', 'imghdr', 'mimetypes',
'path.py', 'pathlib', 'python-magic', 'unipath', 'watchdog', 'cffi', 'ctypes', 'pycuda', 'swig',
'deform', 'django-bootstrap3', 'django-crispy-forms', 'django-remote-forms', 'wtforms', 'cytoolz',
'fn.py', 'funcy', 'toolz', 'curses', 'enaml', 'flexx', 'kivy', 'pyglet', 'pygobject', 'pyqt', 'pyside',
'pywebview', 'tkinter', 'toga', 'urwid', 'wxpython', 'cocos2d', 'panda3d', 'pygame', 'pyogre',
'pyopengl', 'pysdl2', 'renpy', 'django-countries', 'geodjango', 'geoip', 'geojson', 'geopy', 'pygeoip',
'beautifulsoup', 'bleach', 'cssutils', 'html5lib', 'lxml', 'markupsafe', 'pyquery', 'untangle',
'weasyprint', 'xmldataset', 'xmltodict', 'grequests', 'httplib2', 'requests', 'treq', 'urllib3', 'ino',
'keyboard', 'mouse', 'pingo', 'pyro', 'pyuserinput', 'scapy', 'wifi', 'hmap', 'imgseek', 'nude.py',
'pagan', 'pillow', 'pybarcode', 'pygram', 'python-qrcode', 'quads', 'scikit-image', 'thumbor', 'wand',
'clpython', 'cpython', 'cython', 'grumpy', 'ironpython', 'jython', 'micropython', 'numba', 'peachpy',
'pyjion', 'pypy', 'pysec', 'pyston', 'stackless python', 'bpython', 'jupyter notebook (ipython)',
'ptpython', 'babel', 'pyicu', 'apscheduler', 'django-schedule', 'doit', 'gunnery', 'joblib', 'plan',
'schedule', 'spiff', 'taskflow', 'eliot', 'logbook', 'logging', 'sentry', 'metrics', 'nupic',
'scikit-learn', 'spark ml', 'vowpal_porpoise', 'xgboost', 'pyspark', 'luigi', 'mrjob', 'streamparse',
'dask', 'python(x,y)', 'pythonlibs', 'pythonnet', 'pywin32', 'winpython', 'attrs', 'blinker',
'itsdangerous', 'pluginbase', 'pychievements', 'tryton', 'gensim', 'jieba', 'langid.py', 'nltk',
'pattern', 'polyglot', 'snownlp', 'spacy', 'textblob', 'mininet', 'pox', 'pyretic', 'sdx platform',
'asyncio', 'diesel', 'pulsar', 'pyzmq', 'twisted', 'txzmq', 'napalm', 'django-activity-stream',
'stream-framework', 'django models', 'sqlalchemy', 'awesome-sqlalchemy', 'orator', 'peewee', 'ponyorm',
'pydal', 'python-sql', 'django-mongodb-engine', 'flywheel', 'hot-redis', 'mongoengine', 'pynamodb',
'redisco', 'butterdb', 'dataset', 'pip', 'python package index', 'conda', 'curdling', 'pip-tools',
'wheel', 'warehouse', 'warehouse', 'bandersnatch', 'devpi', 'localshop', 'carteblanche',
'django-guardian', 'django-rules', 'delegator.py', 'sarge', 'sh', 'celery', 'huey', 'mrq', 'rq',
'simpleq', 'annoy', 'fastfm', 'implicit', 'libffm', 'lightfm', 'surprise', 'tensorrec',
'django-rest-framework', 'django-tastypie', 'eve', 'flask-api-utils', 'flask-api', 'flask-restful',
'flask-restless', 'cornice', 'falcon', 'hug', 'restless', 'ripozo', 'sandman', 'apistar',
'simplejsonrpcserver', 'simplexmlrpcserver', 'zerorpc', 'astropy', 'bcbio-nextgen', 'bccb', 'biopython',
'cclib', 'networkx', 'nipy', 'numpy', 'open babel', 'obspy', 'pydy', 'pymc', 'rdkit', 'scipy',
'statsmodels', 'sympy', 'zipline', 'simpy', 'django-haystack', 'elasticsearch-dsl-py',
'elasticsearch-py', 'esengine', 'pysolr', 'solrpy', 'whoosh', 'marshmallow', 'apex', 'python-lambda',
'zappa', 'tablib', 'marmir', 'openpyxl', 'pyexcel', 'python-docx', 'relatorio', 'unoconv', 'xlsxwriter',
'xlwings', 'xlwt', 'pdfminer', 'pypdf2', 'reportlab', 'mistune', 'python-markdown', 'pyyaml', 'csvkit',
'unp', 'cactus', 'hyde', 'lektor', 'nikola', 'pelican', 'tinkerer', 'django-taggit', 'genshi', 'jinja2',
'mako', 'hypothesis', 'mamba', 'nose', 'nose2', 'pytest', 'robot framework', 'unittest', 'green', 'tox',
'locust', 'pyautogui', 'selenium', 'sixpack', 'splinter', 'doublex', 'freezegun', 'httmock',
'httpretty', 'mock', 'responses', 'vcr.py', 'factory_boy', 'mixer', 'model_mommy', 'coverage',
'mimesis', 'fake2db', 'faker', 'radar', 'fuckit.py', 'chardet', 'difflib', 'ftfy', 'fuzzywuzzy',
'levenshtein', 'pangu.py', 'pyfiglet', 'pypinyin', 'shortuuid', 'unidecode', 'uniout', 'xpinyin',
'awesome-slugify', 'python-slugify', 'unicode-slugify', 'phonenumbers', 'ply', 'pygments', 'pyparsing',
'python-nameparser', 'python-user-agents', 'sqlparse', 'apache-libcloud', 'boto3', 'django-wordpress',
'facebook-sdk', 'facepy', 'gmail', 'google-api-python-client', 'gspread', 'twython', 'furl', 'purl',
'pyshorteners', 'short_url', 'webargs', 'moviepy', 'scikit-video', 'bjoern', 'fapws3', 'gunicorn',
'meinheld', 'netius', 'paste', 'rocket', 'uwsgi', 'waitress', 'werkzeug', 'haul', 'html2text', 'lassie',
'micawber', 'newspaper', 'opengraph', 'python-goose', 'python-readability', 'sanitize', 'sumy',
'textract', 'cola', 'demiurge', 'feedparser', 'grab', 'mechanicalsoup', 'portia', 'pyspider',
'robobrowser', 'scrapy', 'bottle', 'cherrypy', 'django', 'awesome-django', 'flask', 'awesome-flask',
'pyramid', 'awesome-pyramid', 'sanic', 'tornado', 'turbogears', 'web2py', 'github web2py',
'autobahnpython', 'crossbar', 'django-channels', 'django-socketio', 'websocket-for-python', 'circleci',
'travis ci', 'vexor ci', 'wercker', 'codacy', 'codecov', 'landscape', 'quantifiedcode', 'sqlite3',
'bsddb3', 'pil', 'urlparse']
random.shuffle(keywords)

主要就是使用shuffle函数了。

ps:写这么low的blog,仅是测试下新的host主机提供商:Coding.net

https://coding.net

pps: 代码里面的keywords,是统计的比较流行python库。可以作为常用爬虫的索引词来使用。