import random
def generate_random_massive(col1, col2, size):
results = set()
while len(results) < size:
cs = random.randint(int(col1),int(col2))
symbols = 'abcdefghijklnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_'
rand = (''.join(random.choice(symbols) for i in range(cs)))
results.update({rand})
return results
if __name__ == '__main__':
col1 = 16
col2 = 16
size = 1000
rands = generate_random_massive(col1, col2, size)
print(rands)
Fiona requires Python versions 3.6+ and GDAL version 1.11-3.0. To build from a source distribution you will need a C compiler and GDAL and Python development headers and libraries (libgdal1-dev for Debian/Ubuntu, gdal-dev for CentOS/Fedora).
To build from a repository copy, you will also need Cython to build C sources from the project's .pyx files. See the project's requirements-dev.txt file for guidance.
The Kyngchaos GDAL frameworks will satisfy the GDAL/OGR dependency for OS X, as will Homebrew's GDAL Formula (brew install gdal).
self.dispatch = {pygl.QUIT: self.exit_game(), # whatever else
...}
self.dispatch = {pygl.QUIT: self.exit_game, # whatever else
...}
for i, value in enumerate(my_list)
Вы можете изменить конфигурацию из командной строки conda:
запустите командную строку anaconda.
выполните в ней jupyter notebook --generate-config.
Каталог .jupyter/ должен создаться после этого в вашем домашнем каталоге, файл jupyter_notebook_config.py должен оказаться внутре. В нём раскомментируйте и отредактируйте поле c.NotebookApp.notebook_dir.
def check_two(m):
m = m.content
return m.isdigit() and (1 <= int(m) <= 139)
def check_two(m):
m = m.content
return m.isdigit() and (1 <= int(m) <= 139)
DataBook_Page = await client.wait_for('message', check=check_two)
ну и так далее tops = [(1,), (2,), (3,), (4,), (None,), (7,)]
tops.sort()
tops = [(1,), (2,), (3,), (4,), (None,), (7,)]
tops = [(0, ) if item[0] == None else item for item in tops]
allt = [item[0] for item in sorted(tops, reverse=True)][:5]
print(allt)
import sqlite3
con = sqlite3.connect(':memory:')
data = [
["item90", 12],
["item3", 0],
["item60", 35],
["item21", 15]
]
con.execute('''create table if not exists inv
(items text, number integer)'''
)
def print_db(con):
for row in con.execute('select * from inv'):
print(row)
def add_data(con, query, data):
con.executemany(query, data)
con.commit()
query = 'INSERT into inv values (?, ?)'
add_data(con, query, data)
print_db(con)
print('\nadd newstroke\n')
data = [['newstroke', 0]]
add_data(con, query, data)
print_db(con)
con.close()