Спроектировать и реализовать структуру классов, базу данных и api для управления объектами Дата-центров.
- Узел (дата-центр)
import Vue from 'vue' | |
import VueIdb from 'vue-idb' | |
module.exports = (vue) => { | |
// Defining $db property as configurable | |
Object.defineProperty(Vue.prototype, '$db', { | |
get() { | |
// eslint no-underscore-dangle: ["error", { "allow": ["_db"] }] |
from feedgen.ext.base import BaseExtension | |
from feedgen.feed import FeedGenerator | |
fg = FeedGenerator() | |
class PpgExtension(BaseExtension): | |
__frequency = None | |
__daysLive = None | |
def extend_rss(self, rss_feed): |
[ | |
{ | |
"keys": ["alt+up"], | |
"command": "find_under_expand" | |
}, | |
{ | |
"keys": ["shift+alt+down"], | |
"command": "swap_line_down" | |
}, | |
{ |
import os | |
import sys | |
from subprocess import PIPE, STDOUT, Popen | |
bash_commands = sys.argv[1:] | |
procs = [] | |
for n, cmd in enumerate(bash_commands): |
docker run --detach \ | |
--name motion \ | |
--restart unless-stopped \ | |
--privileged \ | |
-v /dev:/dev \ | |
-v /etc/motion:/usr/local/etc/motion \ | |
-v /var/lib/motion/var/lib/motion \ | |
-p 8001:8001 \ | |
-p 8002:8002 \ | |
motionproject/motion:latest \ |
# on | |
curl -X PUT | |
--data '{"characteristics":[{"aid": 6, "iid":10, "value": 1}]}' \ | |
--header "authorization:031-45-154" \ | |
--header "Content-Type:Application/json" \ | |
http://localhost:53102/characteristics | |
# off | |
curl -X PUT | |
--data '{"characteristics":[{"aid": 6, "iid": 10, "value": 0}]}' \ |
from IPython.core.display import display, HTML | |
from random import randint | |
def sequence_diagram(diagram): | |
d = randint(0,1000) | |
display(HTML(f''' | |
<script src="https://bramp.github.io/js-sequence-diagrams/js/webfont.js"></script> | |
<script src="https://bramp.github.io/js-sequence-diagrams/js/snap.svg-min.js"></script> | |
<script src="https://bramp.github.io/js-sequence-diagrams/js/underscore-min.js"></script> | |
<script src="https://bramp.github.io/js-sequence-diagrams/js/sequence-diagram-min.js"></script> | |
<div id="diagram{d}"></div> |
open \ | |
--env ALL_PROXY="socks5://127.0.0.1:9150" \ | |
/Applications/Transmission.app | |