Установка:
apt install lxc1 lxc1-templates lxc2Темплейты расположены в /usr/share/lxc/templates/, представляют собой скрипты.
ls -l /usr/share/lxc/templates/| # import config. | |
| # You can change the default config with `make cnf="config_special.env" build` | |
| cnf ?= config.env | |
| include $(cnf) | |
| export $(shell sed 's/=.*//' $(cnf)) | |
| # import deploy config | |
| # You can change the default deploy config with `make cnf="deploy_special.env" release` | |
| dpl ?= deploy.env | |
| include $(dpl) |
Установка:
apt install lxc1 lxc1-templates lxc2Темплейты расположены в /usr/share/lxc/templates/, представляют собой скрипты.
ls -l /usr/share/lxc/templates/Запусть tmux-сессию с интеграцией с iterm2
tmux -CC
# Вроде так же работает с tmux -CC attach
# Сессии потом можно смотреть в Shell -> Tmux -> DashboardTo use your mouse in this mode (called copy mode) press ^b + : and enter following:
setw -g mouse on| def get_all_files_and_dirs_in_dir_and_sort(dir): | |
| files = glob.glob(dir) | |
| files.sort() | |
| return files | |
| def get_log_file_for_convert(log_dir, report_dir): | |
| if not os.path.isdir(log_dir): | |
| logging.info("Log dir '%s' not found" % log_dir) | |
| return |
| import sys | |
| import json | |
| import os | |
| import yaml | |
| def get_message(notification): | |
| if 'notification_type' not in notification or notification['notification_type'] != 'error': | |
| raise SystemExit() | |
| return notification['message'] |
| apt update | |
| apt -y install curl python-pip python-dev python3-dev git libxml2-dev libxslt1-dev python-openssl python3-openssl python-pyasn1 libffi-dev libssl-dev build-essential | |
| pip install -UI pip | |
| pip install -UI pbr setuptools pytz | |
| pip install -UI git+https://github.com/openstack/python-openstackclient |
| cd /tmp/ | |
| wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13/linux-headers-4.13.0-041300_4.13.0-041300.201709031731_all.deb | |
| wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13/linux-headers-4.13.0-041300-generic_4.13.0-041300.201709031731_amd64.deb | |
| wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13/linux-image-4.13.0-041300-generic_4.13.0-041300.201709031731_amd64.deb | |
| sudo dpkg -i *.deb |
| #!/bin/env python3 | |
| class Players: | |
| def __init__(self): | |
| self.players = {0: "X", 1: "O"} | |
| self.player = 0 | |
| def get_player(self): |
| Traceback (most recent call last): | |
| File \"/usr/local/lib/python3.6/site-packages/urllib3/connection.py\", line 141, in _new_conn | |
| (self.host, self.port), self.timeout, **extra_kw) | |
| File \"/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py\", line 60, in create_connection | |
| for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): | |
| File \"/usr/local/lib/python3.6/socket.py\", line 743, in getaddrinfo | |
| for res in _socket.getaddrinfo(host, port, family, type, proto, flags): | |
| socket.gaierror: [Errno -2] Name does not resolve | |
| During handling of the above exception, another exception occurred: |
| wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb | |
| sudo dpkg -i cuda-repo-ubuntu1604_9.1.85-1_amd64.deb | |
| sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub | |
| sudo apt-get update | |
| sudo apt-get install cuda |