├── .idea └── GestureVolumeControl.iml ├── HandTrackingMin.py ├── HandTrackingMoudle.py ├── MyNewGameHandTracking.py ├── README.md ├── VolumeHandControl.py ├── example.mp4 └── venv ├── Lib └── site-packages │ ├── _pytest │ ├── __init__.py │ ├── _argcomplete.py │ ├── _code │ │ ├── __init__.py │ │ ├── code.py │ │ └── source.py │ ├── _io │ │ ├── __init__.py │ │ ├── saferepr.py │ │ ├── terminalwriter.py │ │ └── wcwidth.py │ ├── _version.py │ ├── assertion │ │ ├── __init__.py │ │ ├── rewrite.py │ │ ├── truncate.py │ │ └── util.py │ ├── cacheprovider.py │ ├── capture.py │ ├── compat.py │ ├── config │ │ ├── __init__.py │ │ ├── argparsing.py │ │ ├── exceptions.py │ │ └── findpaths.py │ ├── debugging.py │ ├── deprecated.py │ ├── doctest.py │ ├── faulthandler.py │ ├── fixtures.py │ ├── freeze_support.py │ ├── helpconfig.py │ ├── hookspec.py │ ├── junitxml.py │ ├── logging.py │ ├── main.py │ ├── mark │ │ ├── __init__.py │ │ ├── expression.py │ │ └── structures.py │ ├── monkeypatch.py │ ├── nodes.py │ ├── nose.py │ ├── outcomes.py │ ├── pastebin.py │ ├── pathlib.py │ ├── py.typed │ ├── pytester.py │ ├── pytester_assertions.py │ ├── python.py │ ├── python_api.py │ ├── recwarn.py │ ├── reports.py │ ├── runner.py │ ├── setuponly.py │ ├── setupplan.py │ ├── skipping.py │ ├── stepwise.py │ ├── store.py │ ├── terminal.py │ ├── threadexception.py │ ├── timing.py │ ├── tmpdir.py │ ├── unittest.py │ ├── unraisableexception.py │ ├── warning_types.py │ └── warnings.py │ ├── atomicwrites-1.4.0.dist-info │ ├── INSTALLER │ ├── LICENSE │ ├── METADATA │ ├── RECORD │ ├── WHEEL │ └── top_level.txt │ ├── atomicwrites │ └── __init__.py │ ├── coverage-5.5.dist-info │ ├── INSTALLER │ ├── LICENSE.txt │ ├── METADATA │ ├── RECORD │ ├── WHEEL │ ├── entry_points.txt │ └── top_level.txt │ ├── coverage │ ├── __init__.py │ ├── __main__.py │ ├── annotate.py │ ├── backward.py │ ├── bytecode.py │ ├── cmdline.py │ ├── collector.py │ ├── config.py │ ├── context.py │ ├── control.py │ ├── data.py │ ├── debug.py │ ├── disposition.py │ ├── env.py │ ├── execfile.py │ ├── files.py │ ├── fullcoverage │ │ └── encodings.py │ ├── html.py │ ├── htmlfiles │ │ ├── coverage_html.js │ │ ├── favicon_32.png │ │ ├── index.html │ │ ├── jquery.ba-throttle-debounce.min.js │ │ ├── jquery.hotkeys.js │ │ ├── jquery.isonscreen.js │ │ ├── jquery.min.js │ │ ├── jquery.tablesorter.min.js │ │ ├── keybd_closed.png │ │ ├── keybd_open.png │ │ ├── pyfile.html │ │ ├── style.css │ │ └── style.scss │ ├── inorout.py │ ├── jsonreport.py │ ├── misc.py │ ├── multiproc.py │ ├── numbits.py │ ├── parser.py │ ├── phystokens.py │ ├── plugin.py │ ├── plugin_support.py │ ├── python.py │ ├── pytracer.py │ ├── report.py │ ├── results.py │ ├── sqldata.py │ ├── summary.py │ ├── templite.py │ ├── tomlconfig.py │ ├── tracer.cp37-win_amd64.pyd │ ├── version.py │ └── xmlreport.py │ ├── iniconfig-1.1.1.dist-info │ ├── INSTALLER │ ├── LICENSE │ ├── METADATA │ ├── RECORD │ ├── WHEEL │ └── top_level.txt │ ├── iniconfig │ ├── __init__.py │ ├── __init__.pyi │ └── py.typed │ ├── pluggy-0.13.1.dist-info │ ├── INSTALLER │ ├── LICENSE │ ├── METADATA │ ├── RECORD │ ├── WHEEL │ └── top_level.txt │ ├── pluggy │ ├── __init__.py │ ├── _tracing.py │ ├── _version.py │ ├── callers.py │ ├── hooks.py │ └── manager.py │ ├── py-1.10.0.dist-info │ ├── INSTALLER │ ├── LICENSE │ ├── METADATA │ ├── RECORD │ ├── WHEEL │ └── top_level.txt │ ├── py │ ├── __init__.py │ ├── __init__.pyi │ ├── __metainfo.py │ ├── _builtin.py │ ├── _code │ │ ├── __init__.py │ │ ├── _assertionnew.py │ │ ├── _assertionold.py │ │ ├── _py2traceback.py │ │ ├── assertion.py │ │ ├── code.py │ │ └── source.py │ ├── _error.py │ ├── _io │ │ ├── __init__.py │ │ ├── capture.py │ │ ├── saferepr.py │ │ └── terminalwriter.py │ ├── _log │ │ ├── __init__.py │ │ ├── log.py │ │ └── warning.py │ ├── _path │ │ ├── __init__.py │ │ ├── cacheutil.py │ │ ├── common.py │ │ ├── local.py │ │ ├── svnurl.py │ │ └── svnwc.py │ ├── _process │ │ ├── __init__.py │ │ ├── cmdexec.py │ │ ├── forkedfunc.py │ │ └── killproc.py │ ├── _std.py │ ├── _vendored_packages │ │ ├── __init__.py │ │ ├── apipkg-1.5.dist-info │ │ │ ├── INSTALLER │ │ │ ├── METADATA │ │ │ ├── RECORD │ │ │ ├── REQUESTED │ │ │ ├── WHEEL │ │ │ └── top_level.txt │ │ ├── apipkg │ │ │ ├── __init__.py │ │ │ └── version.py │ │ ├── iniconfig-1.1.1.dist-info │ │ │ ├── INSTALLER │ │ │ ├── LICENSE │ │ │ ├── METADATA │ │ │ ├── RECORD │ │ │ ├── REQUESTED │ │ │ ├── WHEEL │ │ │ └── top_level.txt │ │ └── iniconfig │ │ │ ├── __init__.py │ │ │ ├── __init__.pyi │ │ │ └── py.typed │ ├── _version.py │ ├── _xmlgen.py │ ├── error.pyi │ ├── iniconfig.pyi │ ├── io.pyi │ ├── path.pyi │ ├── py.typed │ ├── test.py │ └── xml.pyi │ ├── pycore-17.4.17.dist-info │ ├── INSTALLER │ ├── METADATA │ ├── RECORD │ ├── REQUESTED │ ├── WHEEL │ └── top_level.txt │ ├── pycore │ ├── __init__.py │ ├── api.py │ ├── cloud.py │ ├── extensions │ │ ├── __init__.py │ │ ├── coredhcp │ │ │ ├── __init__.py │ │ │ └── models │ │ │ │ ├── __init__.py │ │ │ │ └── network.py │ │ ├── coretalk │ │ │ ├── __init__.py │ │ │ ├── api.py │ │ │ └── models │ │ │ │ ├── __init__.py │ │ │ │ └── userdata.py │ │ ├── corevpn │ │ │ ├── __init__.py │ │ │ ├── api.py │ │ │ └── models │ │ │ │ ├── __init__.py │ │ │ │ └── vpn.py │ │ └── thunderscript │ │ │ ├── __init__.py │ │ │ └── api.py │ ├── models │ │ ├── __init__.py │ │ ├── base_model.py │ │ ├── image.py │ │ ├── lease.py │ │ ├── network.py │ │ ├── network_pool.py │ │ ├── permission.py │ │ ├── task.py │ │ ├── template.py │ │ ├── token.py │ │ └── vm.py │ └── utils.py │ ├── pytest-6.2.3.dist-info │ ├── INSTALLER │ ├── LICENSE │ ├── METADATA │ ├── RECORD │ ├── WHEEL │ ├── entry_points.txt │ └── top_level.txt │ ├── pytest-cov.pth │ ├── pytest │ ├── __init__.py │ ├── __main__.py │ ├── collect.py │ └── py.typed │ ├── pytest_cov-2.11.1.dist-info │ ├── AUTHORS.rst │ ├── INSTALLER │ ├── LICENSE │ ├── METADATA │ ├── RECORD │ ├── WHEEL │ ├── entry_points.txt │ └── top_level.txt │ ├── pytest_cov │ ├── __init__.py │ ├── compat.py │ ├── embed.py │ ├── engine.py │ └── plugin.py │ ├── tests │ ├── 0000_install_core.py │ ├── 0000_install_nfs_storage.py │ ├── 0000_install_node.py │ ├── 0000_load_initial_data.py │ ├── 0000_setup_coredhcp.py │ ├── 0000_setup_coretalk.py │ ├── 0000_setup_coreui.py │ ├── 0000_setup_corevpn.py │ ├── 0001_register.py │ ├── 0002_account_info.py │ ├── 0002_account_network_quota.py │ ├── 0002_api.py │ ├── 0002_check_resources.py │ ├── 0002_permissions.py │ ├── 0002_permissions_token.py │ ├── 0002_template_caps.py │ ├── 0002_validation.py │ ├── 0003_image_create_invalid_format.py │ ├── 0003_image_permanent.py │ ├── 0003_image_transient.py │ ├── 0003_image_upload.py │ ├── 0003_image_upload_data.py │ ├── 0003_image_upload_invalid_format.py │ ├── 0004_vm_create.py │ ├── 0004_vm_edit.py │ ├── 0004_vm_fill_cluster.py │ ├── 0004_vm_reload.py │ ├── 0004_vm_resize.py │ ├── 0004_vm_start_poweroff.py │ ├── 0005_network_allocation.py │ ├── 0005_network_isolated_allocate.py │ ├── 0005_network_isolated_create.py │ ├── 0005_network_pools.py │ ├── 0005_network_redirection_lease.py │ ├── 0005_network_routed_allocate.py │ ├── 0005_network_routed_create.py │ ├── 0006_vm_image_attach.py │ ├── 0006_vm_network_isolated.py │ ├── 0006_vm_network_routed.py │ ├── 0007_access_images.py │ ├── 0007_access_networks.py │ ├── 0007_list_images.py │ ├── 0008_vpn_create_delete.py │ ├── 0008_vpn_extension.py │ ├── 0008_vpn_get_client_cert.py │ ├── 0008_vpn_vm_connect.py │ ├── 0009_coretalk_enable_userdata.py │ ├── 0009_coretalk_extension.py │ ├── 0010_coredhcp_extension.py │ ├── 1000_common_models_describe.py │ ├── 1000_common_models_edit.py │ ├── 1000_common_models_set_prop.py │ ├── 1000_common_models_to_dict.py │ ├── 1001_queue_append_to_deleted.py │ ├── 1001_queue_append_to_done.py │ ├── 1001_queue_append_to_new.py │ ├── 1001_queue_get_obj.py │ ├── 1001_queue_task_save.py │ ├── 1001_queue_two_queues.py │ ├── __init__.py │ ├── settings.py │ ├── settings_m.py │ └── testutils.py │ ├── toml-0.10.2.dist-info │ ├── INSTALLER │ ├── LICENSE │ ├── METADATA │ ├── RECORD │ ├── WHEEL │ └── top_level.txt │ └── toml │ ├── __init__.py │ ├── decoder.py │ ├── encoder.py │ ├── ordered.py │ └── tz.py ├── Scripts ├── Activate.ps1 ├── activate ├── activate.bat ├── coverage-3.7.exe ├── coverage.exe ├── coverage3.exe ├── deactivate.bat ├── py.test.exe ├── pytest.exe └── python.exe └── pyvenv.cfg /.idea/GestureVolumeControl.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /HandTrackingMin.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- encoding: utf-8 -*- 3 | # Author:Dong Time:2021/4/12 4 | import cv2 5 | import mediapipe as mp 6 | import time 7 | 8 | # 获取视频对象,0为摄像头,也可以写入视频路径 9 | cap = cv2.VideoCapture("example.mp4") 10 | 11 | # 参考资料:https://google.github.io/mediapipe/solutions/hands.html 12 | mpHands = mp.solutions.hands 13 | # Hands是一个类,有四个初始化参数,static_image_mode,max_num_hands,min_detection_confidence,min_tracking_confidence 14 | hands = mpHands.Hands() 15 | mpDraw = mp.solutions.drawing_utils # 画 16 | 17 | pTime = 0 # 开始时间初始化 18 | cTime = 0 # 目前时间初始化 19 | 20 | while True: 21 | # sucess是布尔型,读取帧正确返回True;img是每一帧的图像(BGR存储格式) 22 | success, img = cap.read() 23 | # 将一幅图像从一个色彩空间转换为另一个,返回转换后的色彩空间图像 24 | imgRGB = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) 25 | # 处理RGB图像并返回手的标志点和检测到的每个手对象 26 | results = hands.process(imgRGB) 27 | # results.multi_hand_landmarks返回None或手的标志点坐标 28 | if results.multi_hand_landmarks: 29 | for handLms in results.multi_hand_landmarks: 30 | # landmark有21个(具体查阅上面的参考网址),id是索引,lm是x,y坐标 31 | for id, lm in enumerate(handLms.landmark): 32 | # print(id, lm) # lm的坐标是点在图像中的比例坐标 33 | # h-height,w-weight图像的宽度和高度 34 | h, w, c = img.shape 35 | # 将landmark的比例坐标转换为在图像像元上的坐标 36 | cx, cy = int(lm.x * w), int(lm.y * h) 37 | print(id, cx, cy) 38 | # 将手的标志点个性化显示 39 | cv2.circle(img, (cx, cy), int(w / 50), (255, 0, 255), cv2.FILLED) 40 | # 在图像上绘制手的标志点和他们的连接线 41 | mpDraw.draw_landmarks(img, handLms, mpHands.HAND_CONNECTIONS) 42 | 43 | cTime = time.time() 44 | fps = 1 / (cTime - pTime) 45 | pTime = cTime 46 | # 将帧率显示在图像上 47 | cv2.putText(img, str(int(fps)), (10, 70), cv2.FONT_HERSHEY_PLAIN, 3, 48 | (255, 0, 255), 1) 49 | # 在Image窗口上显示新绘制的图像img 50 | cv2.imshow("Image", img) 51 | # 这个函数是在一个给定的时间内(单位ms)等待用户按键触发;如果用户按下键,则继续执行后面的代码,如果用户没有按下键,则接续等待 52 | cv2.waitKey(1) 53 | -------------------------------------------------------------------------------- /HandTrackingMoudle.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- encoding: utf-8 -*- 3 | # Author:Dong Time:2021/4/12 4 | import cv2 5 | import mediapipe as mp 6 | import time 7 | 8 | 9 | class handDetector(): 10 | def __init__(self, mode=False, maxhands=2, detectionCon=0.5, trackCon=0.5): 11 | """ 12 | 初始化参数 13 | :param mode: 是否输入静态图像 14 | :param maxhands: 检测到手的最大数量 15 | :param detectionCon: 检测手的置信度 16 | :param trackCon: 追踪手的置信度 17 | """ 18 | self.mode = mode 19 | self.maxhands = maxhands 20 | self.detectionCon = detectionCon 21 | self.trackCon = trackCon 22 | 23 | self.mpHands = mp.solutions.hands 24 | self.hands = self.mpHands.Hands(self.mode, self.maxhands, 25 | self.detectionCon, self.trackCon) 26 | self.mpDraw = mp.solutions.drawing_utils 27 | 28 | def findHands(self, img, draw=True): 29 | """ 30 | 检测手掌 31 | :param img:要识别的一帧图像 32 | :param draw:是否对手的标志点进行绘图 33 | :return:绘画完成的一帧图像 34 | """ 35 | imgRGB = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) 36 | self.results = self.hands.process(imgRGB) 37 | if self.results.multi_hand_landmarks: 38 | for handLms in self.results.multi_hand_landmarks: 39 | if draw: 40 | self.mpDraw.draw_landmarks(img, handLms, self.mpHands.HAND_CONNECTIONS) 41 | return img 42 | 43 | def findPosition(self, img, handNo=0, personDraw=True): 44 | """ 45 | 检测手的标志点 46 | :param img: 要识别的一帧图像 47 | :param handNo: 手的编号 48 | :param personDraw: 是否对手的标志点进行个性化绘图 49 | :return: 手的21个标志点位置 50 | """ 51 | lmList = [] 52 | if self.results.multi_hand_landmarks: 53 | myhand = self.results.multi_hand_landmarks[handNo] 54 | for id, lm in enumerate(myhand.landmark): 55 | h, w, c = img.shape 56 | cx, cy = int(lm.x * w), int(lm.y * h) 57 | lmList.append([id, cx, cy]) 58 | if personDraw: 59 | cv2.circle(img, (cx, cy), int(w / 50), (255, 0, 255), cv2.FILLED) 60 | return lmList 61 | 62 | 63 | if __name__ == "__main__": 64 | 65 | pTime = 0 # 开始时间初始化 66 | 67 | cap = cv2.VideoCapture("example.mp4") 68 | detector = handDetector() 69 | 70 | while True: 71 | success, img = cap.read() 72 | img = detector.findHands(img, draw=True) 73 | lmList = detector.findPosition(img, personDraw=False) 74 | if len(lmList) != 0: 75 | print(lmList[4]) # 食指最上部点的坐标 76 | 77 | cTime = time.time() 78 | fps = 1 / (cTime - pTime) 79 | pTime = cTime 80 | 81 | cv2.putText(img, str(int(fps)), (10, 70), cv2.FONT_HERSHEY_PLAIN, 3, 82 | (255, 0, 255), 1) 83 | cv2.imshow("Image", img) 84 | cv2.waitKey(1) 85 | -------------------------------------------------------------------------------- /MyNewGameHandTracking.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- encoding: utf-8 -*- 3 | # Author:Dong Time:2021/4/12 4 | import cv2 5 | import time 6 | import HandTrackingMoudle as htm 7 | 8 | pTime = 0 9 | cTime = 0 10 | cap = cv2.VideoCapture('example.mp4') 11 | detector = htm.handDetector() 12 | while True: 13 | success, img = cap.read() 14 | img = detector.findHands(img, draw=True) 15 | lmList = detector.findPosition(img, draw=False) 16 | if len(lmList) != 0: 17 | print(lmList[4]) 18 | 19 | cTime = time.time() 20 | fps = 1 / (cTime - pTime) 21 | pTime = cTime 22 | 23 | cv2.imshow("Image", img) 24 | cv2.waitKey(1) 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GestureVolumeControl 2 | ## 实现手势控制音量 3 | 主程序是VolumeHandControl.py,用到了模块HandTrackingMoudle.py,example.mp4是示例视频 4 | -------------------------------------------------------------------------------- /example.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/example.mp4 -------------------------------------------------------------------------------- /venv/Lib/site-packages/_pytest/__init__.py: -------------------------------------------------------------------------------- 1 | __all__ = ["__version__"] 2 | 3 | try: 4 | from ._version import version as __version__ 5 | except ImportError: 6 | # broken installation, we don't even try 7 | # unknown only works because we do poor mans version compare 8 | __version__ = "unknown" 9 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/_pytest/_code/__init__.py: -------------------------------------------------------------------------------- 1 | """Python inspection/code generation API.""" 2 | from .code import Code 3 | from .code import ExceptionInfo 4 | from .code import filter_traceback 5 | from .code import Frame 6 | from .code import getfslineno 7 | from .code import Traceback 8 | from .code import TracebackEntry 9 | from .source import getrawcode 10 | from .source import Source 11 | 12 | __all__ = [ 13 | "Code", 14 | "ExceptionInfo", 15 | "filter_traceback", 16 | "Frame", 17 | "getfslineno", 18 | "getrawcode", 19 | "Traceback", 20 | "TracebackEntry", 21 | "Source", 22 | ] 23 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/_pytest/_io/__init__.py: -------------------------------------------------------------------------------- 1 | from .terminalwriter import get_terminal_width 2 | from .terminalwriter import TerminalWriter 3 | 4 | 5 | __all__ = [ 6 | "TerminalWriter", 7 | "get_terminal_width", 8 | ] 9 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/_pytest/_io/wcwidth.py: -------------------------------------------------------------------------------- 1 | import unicodedata 2 | from functools import lru_cache 3 | 4 | 5 | @lru_cache(100) 6 | def wcwidth(c: str) -> int: 7 | """Determine how many columns are needed to display a character in a terminal. 8 | 9 | Returns -1 if the character is not printable. 10 | Returns 0, 1 or 2 for other characters. 11 | """ 12 | o = ord(c) 13 | 14 | # ASCII fast path. 15 | if 0x20 <= o < 0x07F: 16 | return 1 17 | 18 | # Some Cf/Zp/Zl characters which should be zero-width. 19 | if ( 20 | o == 0x0000 21 | or 0x200B <= o <= 0x200F 22 | or 0x2028 <= o <= 0x202E 23 | or 0x2060 <= o <= 0x2063 24 | ): 25 | return 0 26 | 27 | category = unicodedata.category(c) 28 | 29 | # Control characters. 30 | if category == "Cc": 31 | return -1 32 | 33 | # Combining characters with zero width. 34 | if category in ("Me", "Mn"): 35 | return 0 36 | 37 | # Full/Wide east asian characters. 38 | if unicodedata.east_asian_width(c) in ("F", "W"): 39 | return 2 40 | 41 | return 1 42 | 43 | 44 | def wcswidth(s: str) -> int: 45 | """Determine how many columns are needed to display a string in a terminal. 46 | 47 | Returns -1 if the string contains non-printable characters. 48 | """ 49 | width = 0 50 | for c in unicodedata.normalize("NFC", s): 51 | wc = wcwidth(c) 52 | if wc < 0: 53 | return -1 54 | width += wc 55 | return width 56 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/_pytest/_version.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | # file generated by setuptools_scm 3 | # don't change, don't track in version control 4 | version = '6.2.3' 5 | version_tuple = (6, 2, 3) 6 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/_pytest/config/exceptions.py: -------------------------------------------------------------------------------- 1 | from _pytest.compat import final 2 | 3 | 4 | @final 5 | class UsageError(Exception): 6 | """Error in pytest usage or invocation.""" 7 | 8 | 9 | class PrintHelp(Exception): 10 | """Raised when pytest should print its help to skip the rest of the 11 | argument parsing and validation.""" 12 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/_pytest/deprecated.py: -------------------------------------------------------------------------------- 1 | """Deprecation messages and bits of code used elsewhere in the codebase that 2 | is planned to be removed in the next pytest release. 3 | 4 | Keeping it in a central location makes it easy to track what is deprecated and should 5 | be removed when the time comes. 6 | 7 | All constants defined in this module should be either instances of 8 | :class:`PytestWarning`, or :class:`UnformattedWarning` 9 | in case of warnings which need to format their messages. 10 | """ 11 | from warnings import warn 12 | 13 | from _pytest.warning_types import PytestDeprecationWarning 14 | from _pytest.warning_types import UnformattedWarning 15 | 16 | # set of plugins which have been integrated into the core; we use this list to ignore 17 | # them during registration to avoid conflicts 18 | DEPRECATED_EXTERNAL_PLUGINS = { 19 | "pytest_catchlog", 20 | "pytest_capturelog", 21 | "pytest_faulthandler", 22 | } 23 | 24 | 25 | FILLFUNCARGS = UnformattedWarning( 26 | PytestDeprecationWarning, 27 | "{name} is deprecated, use " 28 | "function._request._fillfixtures() instead if you cannot avoid reaching into internals.", 29 | ) 30 | 31 | PYTEST_COLLECT_MODULE = UnformattedWarning( 32 | PytestDeprecationWarning, 33 | "pytest.collect.{name} was moved to pytest.{name}\n" 34 | "Please update to the new name.", 35 | ) 36 | 37 | YIELD_FIXTURE = PytestDeprecationWarning( 38 | "@pytest.yield_fixture is deprecated.\n" 39 | "Use @pytest.fixture instead; they are the same." 40 | ) 41 | 42 | MINUS_K_DASH = PytestDeprecationWarning( 43 | "The `-k '-expr'` syntax to -k is deprecated.\nUse `-k 'not expr'` instead." 44 | ) 45 | 46 | MINUS_K_COLON = PytestDeprecationWarning( 47 | "The `-k 'expr:'` syntax to -k is deprecated.\n" 48 | "Please open an issue if you use this and want a replacement." 49 | ) 50 | 51 | WARNING_CAPTURED_HOOK = PytestDeprecationWarning( 52 | "The pytest_warning_captured is deprecated and will be removed in a future release.\n" 53 | "Please use pytest_warning_recorded instead." 54 | ) 55 | 56 | FSCOLLECTOR_GETHOOKPROXY_ISINITPATH = PytestDeprecationWarning( 57 | "The gethookproxy() and isinitpath() methods of FSCollector and Package are deprecated; " 58 | "use self.session.gethookproxy() and self.session.isinitpath() instead. " 59 | ) 60 | 61 | STRICT_OPTION = PytestDeprecationWarning( 62 | "The --strict option is deprecated, use --strict-markers instead." 63 | ) 64 | 65 | PRIVATE = PytestDeprecationWarning("A private pytest class or function was used.") 66 | 67 | 68 | # You want to make some `__init__` or function "private". 69 | # 70 | # def my_private_function(some, args): 71 | # ... 72 | # 73 | # Do this: 74 | # 75 | # def my_private_function(some, args, *, _ispytest: bool = False): 76 | # check_ispytest(_ispytest) 77 | # ... 78 | # 79 | # Change all internal/allowed calls to 80 | # 81 | # my_private_function(some, args, _ispytest=True) 82 | # 83 | # All other calls will get the default _ispytest=False and trigger 84 | # the warning (possibly error in the future). 85 | def check_ispytest(ispytest: bool) -> None: 86 | if not ispytest: 87 | warn(PRIVATE, stacklevel=3) 88 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/_pytest/freeze_support.py: -------------------------------------------------------------------------------- 1 | """Provides a function to report all internal modules for using freezing 2 | tools.""" 3 | import types 4 | from typing import Iterator 5 | from typing import List 6 | from typing import Union 7 | 8 | 9 | def freeze_includes() -> List[str]: 10 | """Return a list of module names used by pytest that should be 11 | included by cx_freeze.""" 12 | import py 13 | import _pytest 14 | 15 | result = list(_iter_all_modules(py)) 16 | result += list(_iter_all_modules(_pytest)) 17 | return result 18 | 19 | 20 | def _iter_all_modules( 21 | package: Union[str, types.ModuleType], prefix: str = "", 22 | ) -> Iterator[str]: 23 | """Iterate over the names of all modules that can be found in the given 24 | package, recursively. 25 | 26 | >>> import _pytest 27 | >>> list(_iter_all_modules(_pytest)) 28 | ['_pytest._argcomplete', '_pytest._code.code', ...] 29 | """ 30 | import os 31 | import pkgutil 32 | 33 | if isinstance(package, str): 34 | path = package 35 | else: 36 | # Type ignored because typeshed doesn't define ModuleType.__path__ 37 | # (only defined on packages). 38 | package_path = package.__path__ # type: ignore[attr-defined] 39 | path, prefix = package_path[0], package.__name__ + "." 40 | for _, name, is_package in pkgutil.iter_modules([path]): 41 | if is_package: 42 | for m in _iter_all_modules(os.path.join(path, name), prefix=name + "."): 43 | yield prefix + m 44 | else: 45 | yield prefix + name 46 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/_pytest/nose.py: -------------------------------------------------------------------------------- 1 | """Run testsuites written for nose.""" 2 | from _pytest import python 3 | from _pytest import unittest 4 | from _pytest.config import hookimpl 5 | from _pytest.nodes import Item 6 | 7 | 8 | @hookimpl(trylast=True) 9 | def pytest_runtest_setup(item): 10 | if is_potential_nosetest(item): 11 | if not call_optional(item.obj, "setup"): 12 | # Call module level setup if there is no object level one. 13 | call_optional(item.parent.obj, "setup") 14 | # XXX This implies we only call teardown when setup worked. 15 | item.session._setupstate.addfinalizer((lambda: teardown_nose(item)), item) 16 | 17 | 18 | def teardown_nose(item): 19 | if is_potential_nosetest(item): 20 | if not call_optional(item.obj, "teardown"): 21 | call_optional(item.parent.obj, "teardown") 22 | 23 | 24 | def is_potential_nosetest(item: Item) -> bool: 25 | # Extra check needed since we do not do nose style setup/teardown 26 | # on direct unittest style classes. 27 | return isinstance(item, python.Function) and not isinstance( 28 | item, unittest.TestCaseFunction 29 | ) 30 | 31 | 32 | def call_optional(obj, name): 33 | method = getattr(obj, name, None) 34 | isfixture = hasattr(method, "_pytestfixturefunction") 35 | if method is not None and not isfixture and callable(method): 36 | # If there's any problems allow the exception to raise rather than 37 | # silently ignoring them. 38 | method() 39 | return True 40 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/_pytest/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/_pytest/py.typed -------------------------------------------------------------------------------- /venv/Lib/site-packages/_pytest/pytester_assertions.py: -------------------------------------------------------------------------------- 1 | """Helper plugin for pytester; should not be loaded on its own.""" 2 | # This plugin contains assertions used by pytester. pytester cannot 3 | # contain them itself, since it is imported by the `pytest` module, 4 | # hence cannot be subject to assertion rewriting, which requires a 5 | # module to not be already imported. 6 | from typing import Dict 7 | from typing import Sequence 8 | from typing import Tuple 9 | from typing import Union 10 | 11 | from _pytest.reports import CollectReport 12 | from _pytest.reports import TestReport 13 | 14 | 15 | def assertoutcome( 16 | outcomes: Tuple[ 17 | Sequence[TestReport], 18 | Sequence[Union[CollectReport, TestReport]], 19 | Sequence[Union[CollectReport, TestReport]], 20 | ], 21 | passed: int = 0, 22 | skipped: int = 0, 23 | failed: int = 0, 24 | ) -> None: 25 | __tracebackhide__ = True 26 | 27 | realpassed, realskipped, realfailed = outcomes 28 | obtained = { 29 | "passed": len(realpassed), 30 | "skipped": len(realskipped), 31 | "failed": len(realfailed), 32 | } 33 | expected = {"passed": passed, "skipped": skipped, "failed": failed} 34 | assert obtained == expected, outcomes 35 | 36 | 37 | def assert_outcomes( 38 | outcomes: Dict[str, int], 39 | passed: int = 0, 40 | skipped: int = 0, 41 | failed: int = 0, 42 | errors: int = 0, 43 | xpassed: int = 0, 44 | xfailed: int = 0, 45 | ) -> None: 46 | """Assert that the specified outcomes appear with the respective 47 | numbers (0 means it didn't occur) in the text output from a test run.""" 48 | __tracebackhide__ = True 49 | 50 | obtained = { 51 | "passed": outcomes.get("passed", 0), 52 | "skipped": outcomes.get("skipped", 0), 53 | "failed": outcomes.get("failed", 0), 54 | "errors": outcomes.get("errors", 0), 55 | "xpassed": outcomes.get("xpassed", 0), 56 | "xfailed": outcomes.get("xfailed", 0), 57 | } 58 | expected = { 59 | "passed": passed, 60 | "skipped": skipped, 61 | "failed": failed, 62 | "errors": errors, 63 | "xpassed": xpassed, 64 | "xfailed": xfailed, 65 | } 66 | assert obtained == expected 67 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/_pytest/setupplan.py: -------------------------------------------------------------------------------- 1 | from typing import Optional 2 | from typing import Union 3 | 4 | import pytest 5 | from _pytest.config import Config 6 | from _pytest.config import ExitCode 7 | from _pytest.config.argparsing import Parser 8 | from _pytest.fixtures import FixtureDef 9 | from _pytest.fixtures import SubRequest 10 | 11 | 12 | def pytest_addoption(parser: Parser) -> None: 13 | group = parser.getgroup("debugconfig") 14 | group.addoption( 15 | "--setupplan", 16 | "--setup-plan", 17 | action="store_true", 18 | help="show what fixtures and tests would be executed but " 19 | "don't execute anything.", 20 | ) 21 | 22 | 23 | @pytest.hookimpl(tryfirst=True) 24 | def pytest_fixture_setup( 25 | fixturedef: FixtureDef[object], request: SubRequest 26 | ) -> Optional[object]: 27 | # Will return a dummy fixture if the setuponly option is provided. 28 | if request.config.option.setupplan: 29 | my_cache_key = fixturedef.cache_key(request) 30 | fixturedef.cached_result = (None, my_cache_key, None) 31 | return fixturedef.cached_result 32 | return None 33 | 34 | 35 | @pytest.hookimpl(tryfirst=True) 36 | def pytest_cmdline_main(config: Config) -> Optional[Union[int, ExitCode]]: 37 | if config.option.setupplan: 38 | config.option.setuponly = True 39 | config.option.setupshow = True 40 | return None 41 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/_pytest/timing.py: -------------------------------------------------------------------------------- 1 | """Indirection for time functions. 2 | 3 | We intentionally grab some "time" functions internally to avoid tests mocking "time" to affect 4 | pytest runtime information (issue #185). 5 | 6 | Fixture "mock_timing" also interacts with this module for pytest's own tests. 7 | """ 8 | from time import perf_counter 9 | from time import sleep 10 | from time import time 11 | 12 | __all__ = ["perf_counter", "sleep", "time"] 13 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/atomicwrites-1.4.0.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/atomicwrites-1.4.0.dist-info/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015-2016 Markus Unterwaditzer 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/atomicwrites-1.4.0.dist-info/RECORD: -------------------------------------------------------------------------------- 1 | atomicwrites-1.4.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 2 | atomicwrites-1.4.0.dist-info/LICENSE,sha256=h4Mp8L2HitAVEpzovagvSB6G7C6Agx6QnA1nFx2SLnM,1069 3 | atomicwrites-1.4.0.dist-info/METADATA,sha256=C0889LUauSNbRgzOwLjcI-RFU-Q7ICAvPPxSk_pFN4Q,5585 4 | atomicwrites-1.4.0.dist-info/RECORD,, 5 | atomicwrites-1.4.0.dist-info/WHEEL,sha256=kGT74LWyRUZrL4VgLh6_g12IeVl_9u9ZVhadrgXZUEY,110 6 | atomicwrites-1.4.0.dist-info/top_level.txt,sha256=ks64zKVUkrl2ZrrP046CsytXlSGf8gLG-IcoXpNyeoc,13 7 | atomicwrites/__init__.py,sha256=N_LFjMO0nQ9NXMyGQTod3my4OodSCX-FUshHUThV2_4,6794 8 | atomicwrites/__pycache__/__init__.cpython-37.pyc,, 9 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/atomicwrites-1.4.0.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.34.2) 3 | Root-Is-Purelib: true 4 | Tag: py2-none-any 5 | Tag: py3-none-any 6 | 7 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/atomicwrites-1.4.0.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | atomicwrites 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage-5.5.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage-5.5.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.35.1) 3 | Root-Is-Purelib: false 4 | Tag: cp37-cp37m-win_amd64 5 | 6 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage-5.5.dist-info/entry_points.txt: -------------------------------------------------------------------------------- 1 | [console_scripts] 2 | coverage = coverage.cmdline:main 3 | coverage-3.7 = coverage.cmdline:main 4 | coverage3 = coverage.cmdline:main 5 | 6 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage-5.5.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | coverage 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage/__init__.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 2 | # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt 3 | 4 | """Code coverage measurement for Python. 5 | 6 | Ned Batchelder 7 | https://nedbatchelder.com/code/coverage 8 | 9 | """ 10 | 11 | import sys 12 | 13 | from coverage.version import __version__, __url__, version_info 14 | 15 | from coverage.control import Coverage, process_startup 16 | from coverage.data import CoverageData 17 | from coverage.misc import CoverageException 18 | from coverage.plugin import CoveragePlugin, FileTracer, FileReporter 19 | from coverage.pytracer import PyTracer 20 | 21 | # Backward compatibility. 22 | coverage = Coverage 23 | 24 | # On Windows, we encode and decode deep enough that something goes wrong and 25 | # the encodings.utf_8 module is loaded and then unloaded, I don't know why. 26 | # Adding a reference here prevents it from being unloaded. Yuk. 27 | import encodings.utf_8 # pylint: disable=wrong-import-position, wrong-import-order 28 | 29 | # Because of the "from coverage.control import fooey" lines at the top of the 30 | # file, there's an entry for coverage.coverage in sys.modules, mapped to None. 31 | # This makes some inspection tools (like pydoc) unable to find the class 32 | # coverage.coverage. So remove that entry. 33 | try: 34 | del sys.modules['coverage.coverage'] 35 | except KeyError: 36 | pass 37 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage/__main__.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 2 | # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt 3 | 4 | """Coverage.py's main entry point.""" 5 | 6 | import sys 7 | from coverage.cmdline import main 8 | sys.exit(main()) 9 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage/bytecode.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 2 | # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt 3 | 4 | """Bytecode manipulation for coverage.py""" 5 | 6 | import types 7 | 8 | 9 | def code_objects(code): 10 | """Iterate over all the code objects in `code`.""" 11 | stack = [code] 12 | while stack: 13 | # We're going to return the code object on the stack, but first 14 | # push its children for later returning. 15 | code = stack.pop() 16 | for c in code.co_consts: 17 | if isinstance(c, types.CodeType): 18 | stack.append(c) 19 | yield code 20 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage/disposition.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 2 | # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt 3 | 4 | """Simple value objects for tracking what to do with files.""" 5 | 6 | 7 | class FileDisposition(object): 8 | """A simple value type for recording what to do with a file.""" 9 | pass 10 | 11 | 12 | # FileDisposition "methods": FileDisposition is a pure value object, so it can 13 | # be implemented in either C or Python. Acting on them is done with these 14 | # functions. 15 | 16 | def disposition_init(cls, original_filename): 17 | """Construct and initialize a new FileDisposition object.""" 18 | disp = cls() 19 | disp.original_filename = original_filename 20 | disp.canonical_filename = original_filename 21 | disp.source_filename = None 22 | disp.trace = False 23 | disp.reason = "" 24 | disp.file_tracer = None 25 | disp.has_dynamic_filename = False 26 | return disp 27 | 28 | 29 | def disposition_debug_msg(disp): 30 | """Make a nice debug message of what the FileDisposition is doing.""" 31 | if disp.trace: 32 | msg = "Tracing %r" % (disp.original_filename,) 33 | if disp.file_tracer: 34 | msg += ": will be traced by %r" % disp.file_tracer 35 | else: 36 | msg = "Not tracing %r: %s" % (disp.original_filename, disp.reason) 37 | return msg 38 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage/fullcoverage/encodings.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 2 | # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt 3 | 4 | """Imposter encodings module that installs a coverage-style tracer. 5 | 6 | This is NOT the encodings module; it is an imposter that sets up tracing 7 | instrumentation and then replaces itself with the real encodings module. 8 | 9 | If the directory that holds this file is placed first in the PYTHONPATH when 10 | using "coverage" to run Python's tests, then this file will become the very 11 | first module imported by the internals of Python 3. It installs a 12 | coverage.py-compatible trace function that can watch Standard Library modules 13 | execute from the very earliest stages of Python's own boot process. This fixes 14 | a problem with coverage.py - that it starts too late to trace the coverage of 15 | many of the most fundamental modules in the Standard Library. 16 | 17 | """ 18 | 19 | import sys 20 | 21 | class FullCoverageTracer(object): 22 | def __init__(self): 23 | # `traces` is a list of trace events. Frames are tricky: the same 24 | # frame object is used for a whole scope, with new line numbers 25 | # written into it. So in one scope, all the frame objects are the 26 | # same object, and will eventually all will point to the last line 27 | # executed. So we keep the line numbers alongside the frames. 28 | # The list looks like: 29 | # 30 | # traces = [ 31 | # ((frame, event, arg), lineno), ... 32 | # ] 33 | # 34 | self.traces = [] 35 | 36 | def fullcoverage_trace(self, *args): 37 | frame, event, arg = args 38 | self.traces.append((args, frame.f_lineno)) 39 | return self.fullcoverage_trace 40 | 41 | sys.settrace(FullCoverageTracer().fullcoverage_trace) 42 | 43 | # In coverage/files.py is actual_filename(), which uses glob.glob. I don't 44 | # understand why, but that use of glob borks everything if fullcoverage is in 45 | # effect. So here we make an ugly hail-mary pass to switch off glob.glob over 46 | # there. This means when using fullcoverage, Windows path names will not be 47 | # their actual case. 48 | 49 | #sys.fullcoverage = True 50 | 51 | # Finally, remove our own directory from sys.path; remove ourselves from 52 | # sys.modules; and re-import "encodings", which will be the real package 53 | # this time. Note that the delete from sys.modules dictionary has to 54 | # happen last, since all of the symbols in this module will become None 55 | # at that exact moment, including "sys". 56 | 57 | parentdir = max(filter(__file__.startswith, sys.path), key=len) 58 | sys.path.remove(parentdir) 59 | del sys.modules['encodings'] 60 | import encodings 61 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage/htmlfiles/favicon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/coverage/htmlfiles/favicon_32.png -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage/htmlfiles/jquery.ba-throttle-debounce.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery throttle / debounce - v1.1 - 3/7/2010 3 | * http://benalman.com/projects/jquery-throttle-debounce-plugin/ 4 | * 5 | * Copyright (c) 2010 "Cowboy" Ben Alman 6 | * Dual licensed under the MIT and GPL licenses. 7 | * http://benalman.com/about/license/ 8 | */ 9 | (function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this); 10 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage/htmlfiles/jquery.isonscreen.js: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2010 2 | * @author Laurence Wheway 3 | * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 4 | * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 5 | * 6 | * @version 1.2.0 7 | */ 8 | (function($) { 9 | jQuery.extend({ 10 | isOnScreen: function(box, container) { 11 | //ensure numbers come in as intgers (not strings) and remove 'px' is it's there 12 | for(var i in box){box[i] = parseFloat(box[i])}; 13 | for(var i in container){container[i] = parseFloat(container[i])}; 14 | 15 | if(!container){ 16 | container = { 17 | left: $(window).scrollLeft(), 18 | top: $(window).scrollTop(), 19 | width: $(window).width(), 20 | height: $(window).height() 21 | } 22 | } 23 | 24 | if( box.left+box.width-container.left > 0 && 25 | box.left < container.width+container.left && 26 | box.top+box.height-container.top > 0 && 27 | box.top < container.height+container.top 28 | ) return true; 29 | return false; 30 | } 31 | }) 32 | 33 | 34 | jQuery.fn.isOnScreen = function (container) { 35 | for(var i in container){container[i] = parseFloat(container[i])}; 36 | 37 | if(!container){ 38 | container = { 39 | left: $(window).scrollLeft(), 40 | top: $(window).scrollTop(), 41 | width: $(window).width(), 42 | height: $(window).height() 43 | } 44 | } 45 | 46 | if( $(this).offset().left+$(this).width()-container.left > 0 && 47 | $(this).offset().left < container.width+container.left && 48 | $(this).offset().top+$(this).height()-container.top > 0 && 49 | $(this).offset().top < container.height+container.top 50 | ) return true; 51 | return false; 52 | } 53 | })(jQuery); 54 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage/htmlfiles/keybd_closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/coverage/htmlfiles/keybd_closed.png -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage/htmlfiles/keybd_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/coverage/htmlfiles/keybd_open.png -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage/tracer.cp37-win_amd64.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/coverage/tracer.cp37-win_amd64.pyd -------------------------------------------------------------------------------- /venv/Lib/site-packages/coverage/version.py: -------------------------------------------------------------------------------- 1 | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 2 | # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt 3 | 4 | """The version and URL for coverage.py""" 5 | # This file is exec'ed in setup.py, don't import anything! 6 | 7 | # Same semantics as sys.version_info. 8 | version_info = (5, 5, 0, "final", 0) 9 | 10 | 11 | def _make_version(major, minor, micro, releaselevel, serial): 12 | """Create a readable version string from version_info tuple components.""" 13 | assert releaselevel in ['alpha', 'beta', 'candidate', 'final'] 14 | version = "%d.%d" % (major, minor) 15 | if micro: 16 | version += ".%d" % (micro,) 17 | if releaselevel != 'final': 18 | short = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc'}[releaselevel] 19 | version += "%s%d" % (short, serial) 20 | return version 21 | 22 | 23 | def _make_url(major, minor, micro, releaselevel, serial): 24 | """Make the URL people should start at for this version of coverage.py.""" 25 | url = "https://coverage.readthedocs.io" 26 | if releaselevel != 'final': 27 | # For pre-releases, use a version-specific URL. 28 | url += "/en/coverage-" + _make_version(major, minor, micro, releaselevel, serial) 29 | return url 30 | 31 | 32 | __version__ = _make_version(*version_info) 33 | __url__ = _make_url(*version_info) 34 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/iniconfig-1.1.1.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/iniconfig-1.1.1.dist-info/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Permission is hereby granted, free of charge, to any person obtaining a copy 3 | of this software and associated documentation files (the "Software"), to deal 4 | in the Software without restriction, including without limitation the rights 5 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 6 | copies of the Software, and to permit persons to whom the Software is 7 | furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all 10 | copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 18 | SOFTWARE. 19 | 20 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/iniconfig-1.1.1.dist-info/METADATA: -------------------------------------------------------------------------------- 1 | Metadata-Version: 2.1 2 | Name: iniconfig 3 | Version: 1.1.1 4 | Summary: iniconfig: brain-dead simple config-ini parsing 5 | Home-page: http://github.com/RonnyPfannschmidt/iniconfig 6 | Author: Ronny Pfannschmidt, Holger Krekel 7 | Author-email: opensource@ronnypfannschmidt.de, holger.krekel@gmail.com 8 | License: MIT License 9 | Platform: unix 10 | Platform: linux 11 | Platform: osx 12 | Platform: cygwin 13 | Platform: win32 14 | Classifier: Development Status :: 4 - Beta 15 | Classifier: Intended Audience :: Developers 16 | Classifier: License :: OSI Approved :: MIT License 17 | Classifier: Operating System :: POSIX 18 | Classifier: Operating System :: Microsoft :: Windows 19 | Classifier: Operating System :: MacOS :: MacOS X 20 | Classifier: Topic :: Software Development :: Libraries 21 | Classifier: Topic :: Utilities 22 | Classifier: Programming Language :: Python 23 | Classifier: Programming Language :: Python :: 2 24 | Classifier: Programming Language :: Python :: 3 25 | 26 | iniconfig: brain-dead simple parsing of ini files 27 | ======================================================= 28 | 29 | iniconfig is a small and simple INI-file parser module 30 | having a unique set of features: 31 | 32 | * tested against Python2.4 across to Python3.2, Jython, PyPy 33 | * maintains order of sections and entries 34 | * supports multi-line values with or without line-continuations 35 | * supports "#" comments everywhere 36 | * raises errors with proper line-numbers 37 | * no bells and whistles like automatic substitutions 38 | * iniconfig raises an Error if two sections have the same name. 39 | 40 | If you encounter issues or have feature wishes please report them to: 41 | 42 | http://github.com/RonnyPfannschmidt/iniconfig/issues 43 | 44 | Basic Example 45 | =================================== 46 | 47 | If you have an ini file like this:: 48 | 49 | # content of example.ini 50 | [section1] # comment 51 | name1=value1 # comment 52 | name1b=value1,value2 # comment 53 | 54 | [section2] 55 | name2= 56 | line1 57 | line2 58 | 59 | then you can do:: 60 | 61 | >>> import iniconfig 62 | >>> ini = iniconfig.IniConfig("example.ini") 63 | >>> ini['section1']['name1'] # raises KeyError if not exists 64 | 'value1' 65 | >>> ini.get('section1', 'name1b', [], lambda x: x.split(",")) 66 | ['value1', 'value2'] 67 | >>> ini.get('section1', 'notexist', [], lambda x: x.split(",")) 68 | [] 69 | >>> [x.name for x in list(ini)] 70 | ['section1', 'section2'] 71 | >>> list(list(ini)[0].items()) 72 | [('name1', 'value1'), ('name1b', 'value1,value2')] 73 | >>> 'section1' in ini 74 | True 75 | >>> 'inexistendsection' in ini 76 | False 77 | 78 | 79 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/iniconfig-1.1.1.dist-info/RECORD: -------------------------------------------------------------------------------- 1 | iniconfig-1.1.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 2 | iniconfig-1.1.1.dist-info/LICENSE,sha256=KvaAw570k_uCgwNW0dPfGstaBgM8ui3sehniHKp3qGY,1061 3 | iniconfig-1.1.1.dist-info/METADATA,sha256=_4-oFKpRXuZv5rzepScpXRwhq6DzqsgbnA5ZpgMUMcs,2405 4 | iniconfig-1.1.1.dist-info/RECORD,, 5 | iniconfig-1.1.1.dist-info/WHEEL,sha256=ADKeyaGyKF5DwBNE0sRE5pvW-bSkFMJfBuhzZ3rceP4,110 6 | iniconfig-1.1.1.dist-info/top_level.txt,sha256=7KfM0fugdlToj9UW7enKXk2HYALQD8qHiyKtjhSzgN8,10 7 | iniconfig/__init__.py,sha256=-pBe5AF_6aAwo1CxJQ8i_zJq6ejc6IxHta7qk2tNJhY,5208 8 | iniconfig/__init__.pyi,sha256=-4KOctzq28ohRmTZsqlH6aylyFqsNKxYqtk1dteypi4,1205 9 | iniconfig/__pycache__/__init__.cpython-37.pyc,, 10 | iniconfig/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 11 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/iniconfig-1.1.1.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.35.1) 3 | Root-Is-Purelib: true 4 | Tag: py2-none-any 5 | Tag: py3-none-any 6 | 7 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/iniconfig-1.1.1.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | iniconfig 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/iniconfig/__init__.pyi: -------------------------------------------------------------------------------- 1 | from typing import Callable, Iterator, Mapping, Optional, Tuple, TypeVar, Union 2 | from typing_extensions import Final 3 | 4 | _D = TypeVar('_D') 5 | _T = TypeVar('_T') 6 | 7 | class ParseError(Exception): 8 | # Private __init__. 9 | path: Final[str] 10 | lineno: Final[int] 11 | msg: Final[str] 12 | 13 | class SectionWrapper: 14 | # Private __init__. 15 | config: Final[IniConfig] 16 | name: Final[str] 17 | def __getitem__(self, key: str) -> str: ... 18 | def __iter__(self) -> Iterator[str]: ... 19 | def get(self, key: str, default: _D = ..., convert: Callable[[str], _T] = ...) -> Union[_T, _D]: ... 20 | def items(self) -> Iterator[Tuple[str, str]]: ... 21 | def lineof(self, name: str) -> Optional[int]: ... 22 | 23 | class IniConfig: 24 | path: Final[str] 25 | sections: Final[Mapping[str, Mapping[str, str]]] 26 | def __init__(self, path: str, data: Optional[str] = None): ... 27 | def __contains__(self, arg: str) -> bool: ... 28 | def __getitem__(self, name: str) -> SectionWrapper: ... 29 | def __iter__(self) -> Iterator[SectionWrapper]: ... 30 | def get(self, section: str, name: str, default: _D = ..., convert: Callable[[str], _T] = ...) -> Union[_T, _D]: ... 31 | def lineof(self, section: str, name: Optional[str] = ...) -> Optional[int]: ... 32 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/iniconfig/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/iniconfig/py.typed -------------------------------------------------------------------------------- /venv/Lib/site-packages/pluggy-0.13.1.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pluggy-0.13.1.dist-info/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 holger krekel (rather uses bitbucket/hpk42) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pluggy-0.13.1.dist-info/RECORD: -------------------------------------------------------------------------------- 1 | pluggy-0.13.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 2 | pluggy-0.13.1.dist-info/LICENSE,sha256=1rZebCE6XQtXeRHTTW5ZSbn1nXbCOMUHGi8_wWz7JgY,1110 3 | pluggy-0.13.1.dist-info/METADATA,sha256=6xIuxFdAfUN0R1pfQKrnSjocoIoKoPBFZpmaC0wBus0,15789 4 | pluggy-0.13.1.dist-info/RECORD,, 5 | pluggy-0.13.1.dist-info/WHEEL,sha256=8zNYZbwQSXoB9IfXOjPfeNwvAsALAjffgk27FqvCWbo,110 6 | pluggy-0.13.1.dist-info/top_level.txt,sha256=xKSCRhai-v9MckvMuWqNz16c1tbsmOggoMSwTgcpYHE,7 7 | pluggy/__init__.py,sha256=FlQ2T7ewtZu6euZ0pG_1YANZ_lXzV9LDdLSgKutQmEg,486 8 | pluggy/__pycache__/__init__.cpython-37.pyc,, 9 | pluggy/__pycache__/_tracing.cpython-37.pyc,, 10 | pluggy/__pycache__/_version.cpython-37.pyc,, 11 | pluggy/__pycache__/callers.cpython-37.pyc,, 12 | pluggy/__pycache__/hooks.cpython-37.pyc,, 13 | pluggy/__pycache__/manager.cpython-37.pyc,, 14 | pluggy/_tracing.py,sha256=alc0j9EAgwavq43Tu0D4vuXmwn6ypzyXx9v6ouCwVaQ,1561 15 | pluggy/_version.py,sha256=qgt73isSUreytNwWnjCB0NjJve7NfJIyilQugyH2dY8,117 16 | pluggy/callers.py,sha256=ftcvH6AX7p9cK58916KxxLtsFEhOr2OR69LMAVqxrFk,6820 17 | pluggy/hooks.py,sha256=kyzHy7LNqCyZ70hpE3EOxxZ1jgI5Z3eS4yf9EDQH4bw,12289 18 | pluggy/manager.py,sha256=hL3cHd9-cXgM9PN5tKjTwFkYNWHLbFGBUju94NkM1sk,15513 19 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pluggy-0.13.1.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.33.6) 3 | Root-Is-Purelib: true 4 | Tag: py2-none-any 5 | Tag: py3-none-any 6 | 7 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pluggy-0.13.1.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | pluggy 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pluggy/__init__.py: -------------------------------------------------------------------------------- 1 | try: 2 | from ._version import version as __version__ 3 | except ImportError: 4 | # broken installation, we don't even try 5 | # unknown only works because we do poor mans version compare 6 | __version__ = "unknown" 7 | 8 | __all__ = [ 9 | "PluginManager", 10 | "PluginValidationError", 11 | "HookCallError", 12 | "HookspecMarker", 13 | "HookimplMarker", 14 | ] 15 | 16 | from .manager import PluginManager, PluginValidationError 17 | from .callers import HookCallError 18 | from .hooks import HookspecMarker, HookimplMarker 19 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pluggy/_tracing.py: -------------------------------------------------------------------------------- 1 | """ 2 | Tracing utils 3 | """ 4 | 5 | 6 | class TagTracer(object): 7 | def __init__(self): 8 | self._tags2proc = {} 9 | self._writer = None 10 | self.indent = 0 11 | 12 | def get(self, name): 13 | return TagTracerSub(self, (name,)) 14 | 15 | def _format_message(self, tags, args): 16 | if isinstance(args[-1], dict): 17 | extra = args[-1] 18 | args = args[:-1] 19 | else: 20 | extra = {} 21 | 22 | content = " ".join(map(str, args)) 23 | indent = " " * self.indent 24 | 25 | lines = ["%s%s [%s]\n" % (indent, content, ":".join(tags))] 26 | 27 | for name, value in extra.items(): 28 | lines.append("%s %s: %s\n" % (indent, name, value)) 29 | 30 | return "".join(lines) 31 | 32 | def _processmessage(self, tags, args): 33 | if self._writer is not None and args: 34 | self._writer(self._format_message(tags, args)) 35 | try: 36 | processor = self._tags2proc[tags] 37 | except KeyError: 38 | pass 39 | else: 40 | processor(tags, args) 41 | 42 | def setwriter(self, writer): 43 | self._writer = writer 44 | 45 | def setprocessor(self, tags, processor): 46 | if isinstance(tags, str): 47 | tags = tuple(tags.split(":")) 48 | else: 49 | assert isinstance(tags, tuple) 50 | self._tags2proc[tags] = processor 51 | 52 | 53 | class TagTracerSub(object): 54 | def __init__(self, root, tags): 55 | self.root = root 56 | self.tags = tags 57 | 58 | def __call__(self, *args): 59 | self.root._processmessage(self.tags, args) 60 | 61 | def get(self, name): 62 | return self.__class__(self.root, self.tags + (name,)) 63 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pluggy/_version.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | # file generated by setuptools_scm 3 | # don't change, don't track in version control 4 | version = '0.13.1' 5 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py-1.10.0.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py-1.10.0.dist-info/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Permission is hereby granted, free of charge, to any person obtaining a copy 3 | of this software and associated documentation files (the "Software"), to deal 4 | in the Software without restriction, including without limitation the rights 5 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 6 | copies of the Software, and to permit persons to whom the Software is 7 | furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all 10 | copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 18 | SOFTWARE. 19 | 20 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py-1.10.0.dist-info/METADATA: -------------------------------------------------------------------------------- 1 | Metadata-Version: 2.1 2 | Name: py 3 | Version: 1.10.0 4 | Summary: library with cross-python path, ini-parsing, io, code, log facilities 5 | Home-page: https://py.readthedocs.io/ 6 | Author: holger krekel, Ronny Pfannschmidt, Benjamin Peterson and others 7 | Author-email: pytest-dev@python.org 8 | License: MIT license 9 | Platform: unix 10 | Platform: linux 11 | Platform: osx 12 | Platform: cygwin 13 | Platform: win32 14 | Classifier: Development Status :: 6 - Mature 15 | Classifier: Intended Audience :: Developers 16 | Classifier: License :: OSI Approved :: MIT License 17 | Classifier: Operating System :: POSIX 18 | Classifier: Operating System :: Microsoft :: Windows 19 | Classifier: Operating System :: MacOS :: MacOS X 20 | Classifier: Topic :: Software Development :: Testing 21 | Classifier: Topic :: Software Development :: Libraries 22 | Classifier: Topic :: Utilities 23 | Classifier: Programming Language :: Python 24 | Classifier: Programming Language :: Python :: 2 25 | Classifier: Programming Language :: Python :: 2.7 26 | Classifier: Programming Language :: Python :: 3 27 | Classifier: Programming Language :: Python :: 3.5 28 | Classifier: Programming Language :: Python :: 3.6 29 | Classifier: Programming Language :: Python :: 3.7 30 | Classifier: Programming Language :: Python :: Implementation :: CPython 31 | Classifier: Programming Language :: Python :: Implementation :: PyPy 32 | Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* 33 | 34 | .. image:: https://img.shields.io/pypi/v/py.svg 35 | :target: https://pypi.org/project/py 36 | 37 | .. image:: https://img.shields.io/conda/vn/conda-forge/py.svg 38 | :target: https://anaconda.org/conda-forge/py 39 | 40 | .. image:: https://img.shields.io/pypi/pyversions/py.svg 41 | :target: https://pypi.org/project/py 42 | 43 | .. image:: https://github.com/pytest-dev/py/workflows/build/badge.svg 44 | :target: https://github.com/pytest-dev/py/actions 45 | 46 | 47 | **NOTE**: this library is in **maintenance mode** and should not be used in new code. 48 | 49 | The py lib is a Python development support library featuring 50 | the following tools and modules: 51 | 52 | * ``py.path``: uniform local and svn path objects -> please use pathlib/pathlib2 instead 53 | * ``py.apipkg``: explicit API control and lazy-importing -> please use the standalone package instead 54 | * ``py.iniconfig``: easy parsing of .ini files -> please use the standalone package instead 55 | * ``py.code``: dynamic code generation and introspection (deprecated, moved to ``pytest`` as a implementation detail). 56 | 57 | **NOTE**: prior to the 1.4 release this distribution used to 58 | contain py.test which is now its own package, see https://docs.pytest.org 59 | 60 | For questions and more information please visit https://py.readthedocs.io 61 | 62 | Bugs and issues: https://github.com/pytest-dev/py 63 | 64 | Authors: Holger Krekel and others, 2004-2017 65 | 66 | 67 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py-1.10.0.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.36.1) 3 | Root-Is-Purelib: true 4 | Tag: py2-none-any 5 | Tag: py3-none-any 6 | 7 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py-1.10.0.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | py 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/__init__.pyi: -------------------------------------------------------------------------------- 1 | from typing import Any 2 | 3 | # py allows to use e.g. py.path.local even without importing py.path. 4 | # So import implicitly. 5 | from . import error 6 | from . import iniconfig 7 | from . import path 8 | from . import io 9 | from . import xml 10 | 11 | __version__: str 12 | 13 | # Untyped modules below here. 14 | std: Any 15 | test: Any 16 | process: Any 17 | apipkg: Any 18 | code: Any 19 | builtin: Any 20 | log: Any 21 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/__metainfo.py: -------------------------------------------------------------------------------- 1 | import py 2 | pydir = py.path.local(py.__file__).dirpath() 3 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_code/__init__.py: -------------------------------------------------------------------------------- 1 | """ python inspection/code generation API """ 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_code/_py2traceback.py: -------------------------------------------------------------------------------- 1 | # copied from python-2.7.3's traceback.py 2 | # CHANGES: 3 | # - some_str is replaced, trying to create unicode strings 4 | # 5 | import types 6 | 7 | def format_exception_only(etype, value): 8 | """Format the exception part of a traceback. 9 | 10 | The arguments are the exception type and value such as given by 11 | sys.last_type and sys.last_value. The return value is a list of 12 | strings, each ending in a newline. 13 | 14 | Normally, the list contains a single string; however, for 15 | SyntaxError exceptions, it contains several lines that (when 16 | printed) display detailed information about where the syntax 17 | error occurred. 18 | 19 | The message indicating which exception occurred is always the last 20 | string in the list. 21 | 22 | """ 23 | 24 | # An instance should not have a meaningful value parameter, but 25 | # sometimes does, particularly for string exceptions, such as 26 | # >>> raise string1, string2 # deprecated 27 | # 28 | # Clear these out first because issubtype(string1, SyntaxError) 29 | # would throw another exception and mask the original problem. 30 | if (isinstance(etype, BaseException) or 31 | isinstance(etype, types.InstanceType) or 32 | etype is None or type(etype) is str): 33 | return [_format_final_exc_line(etype, value)] 34 | 35 | stype = etype.__name__ 36 | 37 | if not issubclass(etype, SyntaxError): 38 | return [_format_final_exc_line(stype, value)] 39 | 40 | # It was a syntax error; show exactly where the problem was found. 41 | lines = [] 42 | try: 43 | msg, (filename, lineno, offset, badline) = value.args 44 | except Exception: 45 | pass 46 | else: 47 | filename = filename or "" 48 | lines.append(' File "%s", line %d\n' % (filename, lineno)) 49 | if badline is not None: 50 | lines.append(' %s\n' % badline.strip()) 51 | if offset is not None: 52 | caretspace = badline.rstrip('\n')[:offset].lstrip() 53 | # non-space whitespace (likes tabs) must be kept for alignment 54 | caretspace = ((c.isspace() and c or ' ') for c in caretspace) 55 | # only three spaces to account for offset1 == pos 0 56 | lines.append(' %s^\n' % ''.join(caretspace)) 57 | value = msg 58 | 59 | lines.append(_format_final_exc_line(stype, value)) 60 | return lines 61 | 62 | def _format_final_exc_line(etype, value): 63 | """Return a list of a single line -- normal case for format_exception_only""" 64 | valuestr = _some_str(value) 65 | if value is None or not valuestr: 66 | line = "%s\n" % etype 67 | else: 68 | line = "%s: %s\n" % (etype, valuestr) 69 | return line 70 | 71 | def _some_str(value): 72 | try: 73 | return unicode(value) 74 | except Exception: 75 | try: 76 | return str(value) 77 | except Exception: 78 | pass 79 | return '' % type(value).__name__ 80 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_error.py: -------------------------------------------------------------------------------- 1 | """ 2 | create errno-specific classes for IO or os calls. 3 | 4 | """ 5 | from types import ModuleType 6 | import sys, os, errno 7 | 8 | class Error(EnvironmentError): 9 | def __repr__(self): 10 | return "%s.%s %r: %s " %(self.__class__.__module__, 11 | self.__class__.__name__, 12 | self.__class__.__doc__, 13 | " ".join(map(str, self.args)), 14 | #repr(self.args) 15 | ) 16 | 17 | def __str__(self): 18 | s = "[%s]: %s" %(self.__class__.__doc__, 19 | " ".join(map(str, self.args)), 20 | ) 21 | return s 22 | 23 | _winerrnomap = { 24 | 2: errno.ENOENT, 25 | 3: errno.ENOENT, 26 | 17: errno.EEXIST, 27 | 18: errno.EXDEV, 28 | 13: errno.EBUSY, # empty cd drive, but ENOMEDIUM seems unavailiable 29 | 22: errno.ENOTDIR, 30 | 20: errno.ENOTDIR, 31 | 267: errno.ENOTDIR, 32 | 5: errno.EACCES, # anything better? 33 | } 34 | 35 | class ErrorMaker(ModuleType): 36 | """ lazily provides Exception classes for each possible POSIX errno 37 | (as defined per the 'errno' module). All such instances 38 | subclass EnvironmentError. 39 | """ 40 | Error = Error 41 | _errno2class = {} 42 | 43 | def __getattr__(self, name): 44 | if name[0] == "_": 45 | raise AttributeError(name) 46 | eno = getattr(errno, name) 47 | cls = self._geterrnoclass(eno) 48 | setattr(self, name, cls) 49 | return cls 50 | 51 | def _geterrnoclass(self, eno): 52 | try: 53 | return self._errno2class[eno] 54 | except KeyError: 55 | clsname = errno.errorcode.get(eno, "UnknownErrno%d" %(eno,)) 56 | errorcls = type(Error)(clsname, (Error,), 57 | {'__module__':'py.error', 58 | '__doc__': os.strerror(eno)}) 59 | self._errno2class[eno] = errorcls 60 | return errorcls 61 | 62 | def checked_call(self, func, *args, **kwargs): 63 | """ call a function and raise an errno-exception if applicable. """ 64 | __tracebackhide__ = True 65 | try: 66 | return func(*args, **kwargs) 67 | except self.Error: 68 | raise 69 | except (OSError, EnvironmentError): 70 | cls, value, tb = sys.exc_info() 71 | if not hasattr(value, 'errno'): 72 | raise 73 | __tracebackhide__ = False 74 | errno = value.errno 75 | try: 76 | if not isinstance(value, WindowsError): 77 | raise NameError 78 | except NameError: 79 | # we are not on Windows, or we got a proper OSError 80 | cls = self._geterrnoclass(errno) 81 | else: 82 | try: 83 | cls = self._geterrnoclass(_winerrnomap[errno]) 84 | except KeyError: 85 | raise value 86 | raise cls("%s%r" % (func.__name__, args)) 87 | __tracebackhide__ = True 88 | 89 | 90 | error = ErrorMaker('py.error') 91 | sys.modules[error.__name__] = error -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_io/__init__.py: -------------------------------------------------------------------------------- 1 | """ input/output helping """ 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_io/saferepr.py: -------------------------------------------------------------------------------- 1 | import py 2 | import sys 3 | 4 | builtin_repr = repr 5 | 6 | reprlib = py.builtin._tryimport('repr', 'reprlib') 7 | 8 | class SafeRepr(reprlib.Repr): 9 | """ subclass of repr.Repr that limits the resulting size of repr() 10 | and includes information on exceptions raised during the call. 11 | """ 12 | def repr(self, x): 13 | return self._callhelper(reprlib.Repr.repr, self, x) 14 | 15 | def repr_unicode(self, x, level): 16 | # Strictly speaking wrong on narrow builds 17 | def repr(u): 18 | if "'" not in u: 19 | return py.builtin._totext("'%s'") % u 20 | elif '"' not in u: 21 | return py.builtin._totext('"%s"') % u 22 | else: 23 | return py.builtin._totext("'%s'") % u.replace("'", r"\'") 24 | s = repr(x[:self.maxstring]) 25 | if len(s) > self.maxstring: 26 | i = max(0, (self.maxstring-3)//2) 27 | j = max(0, self.maxstring-3-i) 28 | s = repr(x[:i] + x[len(x)-j:]) 29 | s = s[:i] + '...' + s[len(s)-j:] 30 | return s 31 | 32 | def repr_instance(self, x, level): 33 | return self._callhelper(builtin_repr, x) 34 | 35 | def _callhelper(self, call, x, *args): 36 | try: 37 | # Try the vanilla repr and make sure that the result is a string 38 | s = call(x, *args) 39 | except py.builtin._sysex: 40 | raise 41 | except: 42 | cls, e, tb = sys.exc_info() 43 | exc_name = getattr(cls, '__name__', 'unknown') 44 | try: 45 | exc_info = str(e) 46 | except py.builtin._sysex: 47 | raise 48 | except: 49 | exc_info = 'unknown' 50 | return '<[%s("%s") raised in repr()] %s object at 0x%x>' % ( 51 | exc_name, exc_info, x.__class__.__name__, id(x)) 52 | else: 53 | if len(s) > self.maxsize: 54 | i = max(0, (self.maxsize-3)//2) 55 | j = max(0, self.maxsize-3-i) 56 | s = s[:i] + '...' + s[len(s)-j:] 57 | return s 58 | 59 | def saferepr(obj, maxsize=240): 60 | """ return a size-limited safe repr-string for the given object. 61 | Failing __repr__ functions of user instances will be represented 62 | with a short exception info and 'saferepr' generally takes 63 | care to never raise exceptions itself. This function is a wrapper 64 | around the Repr/reprlib functionality of the standard 2.6 lib. 65 | """ 66 | # review exception handling 67 | srepr = SafeRepr() 68 | srepr.maxstring = maxsize 69 | srepr.maxsize = maxsize 70 | srepr.maxother = 160 71 | return srepr.repr(obj) 72 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_log/__init__.py: -------------------------------------------------------------------------------- 1 | """ logging API ('producers' and 'consumers' connected via keywords) """ 2 | 3 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_log/warning.py: -------------------------------------------------------------------------------- 1 | import py, sys 2 | 3 | class DeprecationWarning(DeprecationWarning): 4 | def __init__(self, msg, path, lineno): 5 | self.msg = msg 6 | self.path = path 7 | self.lineno = lineno 8 | def __repr__(self): 9 | return "%s:%d: %s" %(self.path, self.lineno+1, self.msg) 10 | def __str__(self): 11 | return self.msg 12 | 13 | def _apiwarn(startversion, msg, stacklevel=2, function=None): 14 | # below is mostly COPIED from python2.4/warnings.py's def warn() 15 | # Get context information 16 | if isinstance(stacklevel, str): 17 | frame = sys._getframe(1) 18 | level = 1 19 | found = frame.f_code.co_filename.find(stacklevel) != -1 20 | while frame: 21 | co = frame.f_code 22 | if co.co_filename.find(stacklevel) == -1: 23 | if found: 24 | stacklevel = level 25 | break 26 | else: 27 | found = True 28 | level += 1 29 | frame = frame.f_back 30 | else: 31 | stacklevel = 1 32 | msg = "%s (since version %s)" %(msg, startversion) 33 | warn(msg, stacklevel=stacklevel+1, function=function) 34 | 35 | 36 | def warn(msg, stacklevel=1, function=None): 37 | if function is not None: 38 | import inspect 39 | filename = inspect.getfile(function) 40 | lineno = py.code.getrawcode(function).co_firstlineno 41 | else: 42 | try: 43 | caller = sys._getframe(stacklevel) 44 | except ValueError: 45 | globals = sys.__dict__ 46 | lineno = 1 47 | else: 48 | globals = caller.f_globals 49 | lineno = caller.f_lineno 50 | if '__name__' in globals: 51 | module = globals['__name__'] 52 | else: 53 | module = "" 54 | filename = globals.get('__file__') 55 | if filename: 56 | fnl = filename.lower() 57 | if fnl.endswith(".pyc") or fnl.endswith(".pyo"): 58 | filename = filename[:-1] 59 | elif fnl.endswith("$py.class"): 60 | filename = filename.replace('$py.class', '.py') 61 | else: 62 | if module == "__main__": 63 | try: 64 | filename = sys.argv[0] 65 | except AttributeError: 66 | # embedded interpreters don't have sys.argv, see bug #839151 67 | filename = '__main__' 68 | if not filename: 69 | filename = module 70 | path = py.path.local(filename) 71 | warning = DeprecationWarning(msg, path, lineno) 72 | import warnings 73 | warnings.warn_explicit(warning, category=Warning, 74 | filename=str(warning.path), 75 | lineno=warning.lineno, 76 | registry=warnings.__dict__.setdefault( 77 | "__warningsregistry__", {}) 78 | ) 79 | 80 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_path/__init__.py: -------------------------------------------------------------------------------- 1 | """ unified file system api """ 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_process/__init__.py: -------------------------------------------------------------------------------- 1 | """ high-level sub-process handling """ 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_process/cmdexec.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import subprocess 3 | import py 4 | from subprocess import Popen, PIPE 5 | 6 | def cmdexec(cmd): 7 | """ return unicode output of executing 'cmd' in a separate process. 8 | 9 | raise cmdexec.Error exeception if the command failed. 10 | the exception will provide an 'err' attribute containing 11 | the error-output from the command. 12 | if the subprocess module does not provide a proper encoding/unicode strings 13 | sys.getdefaultencoding() will be used, if that does not exist, 'UTF-8'. 14 | """ 15 | process = subprocess.Popen(cmd, shell=True, 16 | universal_newlines=True, 17 | stdout=subprocess.PIPE, stderr=subprocess.PIPE) 18 | out, err = process.communicate() 19 | if sys.version_info[0] < 3: # on py3 we get unicode strings, on py2 not 20 | try: 21 | default_encoding = sys.getdefaultencoding() # jython may not have it 22 | except AttributeError: 23 | default_encoding = sys.stdout.encoding or 'UTF-8' 24 | out = unicode(out, process.stdout.encoding or default_encoding) 25 | err = unicode(err, process.stderr.encoding or default_encoding) 26 | status = process.poll() 27 | if status: 28 | raise ExecutionFailed(status, status, cmd, out, err) 29 | return out 30 | 31 | class ExecutionFailed(py.error.Error): 32 | def __init__(self, status, systemstatus, cmd, out, err): 33 | Exception.__init__(self) 34 | self.status = status 35 | self.systemstatus = systemstatus 36 | self.cmd = cmd 37 | self.err = err 38 | self.out = out 39 | 40 | def __str__(self): 41 | return "ExecutionFailed: %d %s\n%s" %(self.status, self.cmd, self.err) 42 | 43 | # export the exception under the name 'py.process.cmdexec.Error' 44 | cmdexec.Error = ExecutionFailed 45 | try: 46 | ExecutionFailed.__module__ = 'py.process.cmdexec' 47 | ExecutionFailed.__name__ = 'Error' 48 | except (AttributeError, TypeError): 49 | pass 50 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_process/killproc.py: -------------------------------------------------------------------------------- 1 | import py 2 | import os, sys 3 | 4 | if sys.platform == "win32" or getattr(os, '_name', '') == 'nt': 5 | try: 6 | import ctypes 7 | except ImportError: 8 | def dokill(pid): 9 | py.process.cmdexec("taskkill /F /PID %d" %(pid,)) 10 | else: 11 | def dokill(pid): 12 | PROCESS_TERMINATE = 1 13 | handle = ctypes.windll.kernel32.OpenProcess( 14 | PROCESS_TERMINATE, False, pid) 15 | ctypes.windll.kernel32.TerminateProcess(handle, -1) 16 | ctypes.windll.kernel32.CloseHandle(handle) 17 | else: 18 | def dokill(pid): 19 | os.kill(pid, 15) 20 | 21 | def kill(pid): 22 | """ kill process by id. """ 23 | dokill(pid) 24 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_std.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import warnings 3 | 4 | 5 | class PyStdIsDeprecatedWarning(DeprecationWarning): 6 | pass 7 | 8 | 9 | class Std(object): 10 | """ makes top-level python modules available as an attribute, 11 | importing them on first access. 12 | """ 13 | 14 | def __init__(self): 15 | self.__dict__ = sys.modules 16 | 17 | def __getattr__(self, name): 18 | warnings.warn("py.std is deprecated, please import %s directly" % name, 19 | category=PyStdIsDeprecatedWarning, 20 | stacklevel=2) 21 | try: 22 | m = __import__(name) 23 | except ImportError: 24 | raise AttributeError("py.std: could not import %s" % name) 25 | return m 26 | 27 | std = Std() 28 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/py/_vendored_packages/__init__.py -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/apipkg-1.5.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/apipkg-1.5.dist-info/RECORD: -------------------------------------------------------------------------------- 1 | ../../../../home/ran/.cache/pycache/tmp/pip-target-oxds71ih/lib/python/apipkg/__init__.cpython-39.pyc,, 2 | ../../../../home/ran/.cache/pycache/tmp/pip-target-oxds71ih/lib/python/apipkg/version.cpython-39.pyc,, 3 | apipkg-1.5.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 4 | apipkg-1.5.dist-info/METADATA,sha256=tIG1DSBzSeqmSRpOKHSEBmT1eOPdK8xK01xAIADuks4,3800 5 | apipkg-1.5.dist-info/RECORD,, 6 | apipkg-1.5.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 7 | apipkg-1.5.dist-info/WHEEL,sha256=gduuPyBvFJQSQ0zdyxF7k0zynDXbIbvg5ZBHoXum5uk,110 8 | apipkg-1.5.dist-info/top_level.txt,sha256=3TGS6nmN7kjxhUK4LpPCB3QkQI34QYGrT0ZQGWajoZ8,7 9 | apipkg/__init__.py,sha256=VogR4mDwYmeOdJnjGi-RoMB1qJnD6_puDYj_nRolzhM,6707 10 | apipkg/version.py,sha256=YN6DnKyEPqjDAauJuwJRG9vlKbWVLd9gAbH7mkQXXNo,114 11 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/apipkg-1.5.dist-info/REQUESTED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/py/_vendored_packages/apipkg-1.5.dist-info/REQUESTED -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/apipkg-1.5.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.31.1) 3 | Root-Is-Purelib: true 4 | Tag: py2-none-any 5 | Tag: py3-none-any 6 | 7 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/apipkg-1.5.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | apipkg 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/apipkg/version.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | # file generated by setuptools_scm 3 | # don't change, don't track in version control 4 | version = '1.5' 5 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/iniconfig-1.1.1.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/iniconfig-1.1.1.dist-info/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Permission is hereby granted, free of charge, to any person obtaining a copy 3 | of this software and associated documentation files (the "Software"), to deal 4 | in the Software without restriction, including without limitation the rights 5 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 6 | copies of the Software, and to permit persons to whom the Software is 7 | furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all 10 | copies or substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 18 | SOFTWARE. 19 | 20 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/iniconfig-1.1.1.dist-info/METADATA: -------------------------------------------------------------------------------- 1 | Metadata-Version: 2.1 2 | Name: iniconfig 3 | Version: 1.1.1 4 | Summary: iniconfig: brain-dead simple config-ini parsing 5 | Home-page: http://github.com/RonnyPfannschmidt/iniconfig 6 | Author: Ronny Pfannschmidt, Holger Krekel 7 | Author-email: opensource@ronnypfannschmidt.de, holger.krekel@gmail.com 8 | License: MIT License 9 | Platform: unix 10 | Platform: linux 11 | Platform: osx 12 | Platform: cygwin 13 | Platform: win32 14 | Classifier: Development Status :: 4 - Beta 15 | Classifier: Intended Audience :: Developers 16 | Classifier: License :: OSI Approved :: MIT License 17 | Classifier: Operating System :: POSIX 18 | Classifier: Operating System :: Microsoft :: Windows 19 | Classifier: Operating System :: MacOS :: MacOS X 20 | Classifier: Topic :: Software Development :: Libraries 21 | Classifier: Topic :: Utilities 22 | Classifier: Programming Language :: Python 23 | Classifier: Programming Language :: Python :: 2 24 | Classifier: Programming Language :: Python :: 3 25 | 26 | iniconfig: brain-dead simple parsing of ini files 27 | ======================================================= 28 | 29 | iniconfig is a small and simple INI-file parser module 30 | having a unique set of features: 31 | 32 | * tested against Python2.4 across to Python3.2, Jython, PyPy 33 | * maintains order of sections and entries 34 | * supports multi-line values with or without line-continuations 35 | * supports "#" comments everywhere 36 | * raises errors with proper line-numbers 37 | * no bells and whistles like automatic substitutions 38 | * iniconfig raises an Error if two sections have the same name. 39 | 40 | If you encounter issues or have feature wishes please report them to: 41 | 42 | http://github.com/RonnyPfannschmidt/iniconfig/issues 43 | 44 | Basic Example 45 | =================================== 46 | 47 | If you have an ini file like this:: 48 | 49 | # content of example.ini 50 | [section1] # comment 51 | name1=value1 # comment 52 | name1b=value1,value2 # comment 53 | 54 | [section2] 55 | name2= 56 | line1 57 | line2 58 | 59 | then you can do:: 60 | 61 | >>> import iniconfig 62 | >>> ini = iniconfig.IniConfig("example.ini") 63 | >>> ini['section1']['name1'] # raises KeyError if not exists 64 | 'value1' 65 | >>> ini.get('section1', 'name1b', [], lambda x: x.split(",")) 66 | ['value1', 'value2'] 67 | >>> ini.get('section1', 'notexist', [], lambda x: x.split(",")) 68 | [] 69 | >>> [x.name for x in list(ini)] 70 | ['section1', 'section2'] 71 | >>> list(list(ini)[0].items()) 72 | [('name1', 'value1'), ('name1b', 'value1,value2')] 73 | >>> 'section1' in ini 74 | True 75 | >>> 'inexistendsection' in ini 76 | False 77 | 78 | 79 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/iniconfig-1.1.1.dist-info/RECORD: -------------------------------------------------------------------------------- 1 | ../../../../home/ran/.cache/pycache/tmp/pip-target-oxds71ih/lib/python/iniconfig/__init__.cpython-39.pyc,, 2 | iniconfig-1.1.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 3 | iniconfig-1.1.1.dist-info/LICENSE,sha256=KvaAw570k_uCgwNW0dPfGstaBgM8ui3sehniHKp3qGY,1061 4 | iniconfig-1.1.1.dist-info/METADATA,sha256=_4-oFKpRXuZv5rzepScpXRwhq6DzqsgbnA5ZpgMUMcs,2405 5 | iniconfig-1.1.1.dist-info/RECORD,, 6 | iniconfig-1.1.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 7 | iniconfig-1.1.1.dist-info/WHEEL,sha256=ADKeyaGyKF5DwBNE0sRE5pvW-bSkFMJfBuhzZ3rceP4,110 8 | iniconfig-1.1.1.dist-info/top_level.txt,sha256=7KfM0fugdlToj9UW7enKXk2HYALQD8qHiyKtjhSzgN8,10 9 | iniconfig/__init__.py,sha256=-pBe5AF_6aAwo1CxJQ8i_zJq6ejc6IxHta7qk2tNJhY,5208 10 | iniconfig/__init__.pyi,sha256=-4KOctzq28ohRmTZsqlH6aylyFqsNKxYqtk1dteypi4,1205 11 | iniconfig/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 12 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/iniconfig-1.1.1.dist-info/REQUESTED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/py/_vendored_packages/iniconfig-1.1.1.dist-info/REQUESTED -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/iniconfig-1.1.1.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.35.1) 3 | Root-Is-Purelib: true 4 | Tag: py2-none-any 5 | Tag: py3-none-any 6 | 7 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/iniconfig-1.1.1.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | iniconfig 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/iniconfig/__init__.pyi: -------------------------------------------------------------------------------- 1 | from typing import Callable, Iterator, Mapping, Optional, Tuple, TypeVar, Union 2 | from typing_extensions import Final 3 | 4 | _D = TypeVar('_D') 5 | _T = TypeVar('_T') 6 | 7 | class ParseError(Exception): 8 | # Private __init__. 9 | path: Final[str] 10 | lineno: Final[int] 11 | msg: Final[str] 12 | 13 | class SectionWrapper: 14 | # Private __init__. 15 | config: Final[IniConfig] 16 | name: Final[str] 17 | def __getitem__(self, key: str) -> str: ... 18 | def __iter__(self) -> Iterator[str]: ... 19 | def get(self, key: str, default: _D = ..., convert: Callable[[str], _T] = ...) -> Union[_T, _D]: ... 20 | def items(self) -> Iterator[Tuple[str, str]]: ... 21 | def lineof(self, name: str) -> Optional[int]: ... 22 | 23 | class IniConfig: 24 | path: Final[str] 25 | sections: Final[Mapping[str, Mapping[str, str]]] 26 | def __init__(self, path: str, data: Optional[str] = None): ... 27 | def __contains__(self, arg: str) -> bool: ... 28 | def __getitem__(self, name: str) -> SectionWrapper: ... 29 | def __iter__(self) -> Iterator[SectionWrapper]: ... 30 | def get(self, section: str, name: str, default: _D = ..., convert: Callable[[str], _T] = ...) -> Union[_T, _D]: ... 31 | def lineof(self, section: str, name: Optional[str] = ...) -> Optional[int]: ... 32 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_vendored_packages/iniconfig/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/py/_vendored_packages/iniconfig/py.typed -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/_version.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | # file generated by setuptools_scm 3 | # don't change, don't track in version control 4 | version = '1.10.0' 5 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/iniconfig.pyi: -------------------------------------------------------------------------------- 1 | from typing import Callable, Iterator, Mapping, Optional, Tuple, TypeVar, Union 2 | from typing_extensions import Final 3 | 4 | _D = TypeVar('_D') 5 | _T = TypeVar('_T') 6 | 7 | class ParseError(Exception): 8 | # Private __init__. 9 | path: Final[str] 10 | lineno: Final[int] 11 | msg: Final[str] 12 | 13 | class SectionWrapper: 14 | # Private __init__. 15 | config: Final[IniConfig] 16 | name: Final[str] 17 | def __getitem__(self, key: str) -> str: ... 18 | def __iter__(self) -> Iterator[str]: ... 19 | def get(self, key: str, default: _D = ..., convert: Callable[[str], _T] = ...) -> Union[_T, _D]: ... 20 | def items(self) -> Iterator[Tuple[str, str]]: ... 21 | def lineof(self, name: str) -> Optional[int]: ... 22 | 23 | class IniConfig: 24 | path: Final[str] 25 | sections: Final[Mapping[str, Mapping[str, str]]] 26 | def __init__(self, path: str, data: Optional[str] = None): ... 27 | def __contains__(self, arg: str) -> bool: ... 28 | def __getitem__(self, name: str) -> SectionWrapper: ... 29 | def __iter__(self) -> Iterator[SectionWrapper]: ... 30 | def get(self, section: str, name: str, default: _D = ..., convert: Callable[[str], _T] = ...) -> Union[_T, _D]: ... 31 | def lineof(self, section: str, name: Optional[str] = ...) -> Optional[int]: ... 32 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/py/py.typed -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/test.py: -------------------------------------------------------------------------------- 1 | import sys 2 | if __name__ == '__main__': 3 | import pytest 4 | sys.exit(pytest.main()) 5 | else: 6 | import sys, pytest 7 | sys.modules['py.test'] = pytest 8 | 9 | # for more API entry points see the 'tests' definition 10 | # in __init__.py 11 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/py/xml.pyi: -------------------------------------------------------------------------------- 1 | from typing import ClassVar, Generic, Iterable, Text, Type, Union 2 | from typing_extensions import Final 3 | 4 | class raw: 5 | uniobj: Final[Text] 6 | def __init__(self, uniobj: Text) -> None: ... 7 | 8 | class _NamespaceMetaclass(type): 9 | def __getattr__(self, name: str) -> Type[Tag]: ... 10 | 11 | class Namespace(metaclass=_NamespaceMetaclass): ... 12 | 13 | class Tag(list): 14 | class Attr: 15 | def __getattr__(self, attr: str) -> Text: ... 16 | attr: Final[Attr] 17 | def __init__(self, *args: Union[Text, raw, Tag, Iterable[Tag]], **kwargs: Union[Text, raw]) -> None: ... 18 | def unicode(self, indent: int = ...) -> Text: ... 19 | 20 | class html(Namespace): 21 | class Style: 22 | def __init__(self, **kw: Union[str, Text]) -> None: ... 23 | style: ClassVar[Style] 24 | 25 | def escape(ustring: Union[str, Text]) -> Text: ... 26 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore-17.4.17.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore-17.4.17.dist-info/METADATA: -------------------------------------------------------------------------------- 1 | Metadata-Version: 2.1 2 | Name: pycore 3 | Version: 17.4.17 4 | Summary: CoreCluster API Library 5 | Home-page: http://cloudover.org/pycore/ 6 | Author: Maciej & Marta Nabozny 7 | Author-email: mn@mnabozny.pl 8 | License: UNKNOWN 9 | Download-URL: https://github.com/cloudOver/PyCloud/archive/master.zip 10 | Keywords: corecluster,overcluster,cloudover,cloud 11 | Platform: UNKNOWN 12 | Requires-Dist: requests 13 | Requires-Dist: pytest 14 | Requires-Dist: pytest-cov 15 | 16 | UNKNOWN 17 | 18 | 19 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore-17.4.17.dist-info/REQUESTED: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/pycore-17.4.17.dist-info/REQUESTED -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore-17.4.17.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.35.1) 3 | Root-Is-Purelib: true 4 | Tag: py3-none-any 5 | 6 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore-17.4.17.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | pycore 2 | tests 3 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright 2014-2017 cloudover.io ltd. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 7 | persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 10 | Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 15 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | """ 17 | 18 | 19 | from pycore.cloud import Cloud 20 | from pycore.api import Api 21 | import pycore.models 22 | import pycore.extensions 23 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/extensions/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/pycore/extensions/__init__.py -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/extensions/coredhcp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/pycore/extensions/coredhcp/__init__.py -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/extensions/coredhcp/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/pycore/extensions/coredhcp/models/__init__.py -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/extensions/coredhcp/models/network.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright 2014-2017 cloudover.io ltd. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 7 | persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 10 | Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 15 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | """ 17 | 18 | from pycore.utils import request, check_version 19 | 20 | 21 | class Network(object): 22 | parent_model = None 23 | 24 | def start(self, gateway_ip): 25 | check_version(self.parent_model.oc_address, self.parent_model.token, '16.01') 26 | request(self.parent_model.oc_address, 27 | '/api/dhcp/start/', 28 | {'token': self.parent_model.token, 29 | 'network_id': self.parent_model.id, 30 | 'gateway_ip': gateway_ip}, 31 | self.parent_model.debug) 32 | 33 | def stop(self): 34 | check_version(self.parent_model.oc_address, self.parent_model.token, '16.01') 35 | request(self.parent_model.oc_address, 36 | '/api/dhcp/stop/', 37 | {'token': self.parent_model.token, 38 | 'network_id': self.parent_model.id}, 39 | self.parent_model.debug) 40 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/extensions/coretalk/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/pycore/extensions/coretalk/__init__.py -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/extensions/coretalk/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/pycore/extensions/coretalk/models/__init__.py -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/extensions/corevpn/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/pycore/extensions/corevpn/__init__.py -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/extensions/corevpn/api.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright 2014-2017 cloudover.io ltd. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 7 | persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 10 | Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 15 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | """ 17 | 18 | import pycore.extensions.vpn.models.vpn 19 | from pycore.utils import request, calc_hash 20 | 21 | 22 | class Api: 23 | def __init__(self, parent_model): 24 | self.parent_model = parent_model 25 | 26 | def network_by_id(self, id): 27 | vm = request(self.oc_address, 28 | '/api/vpn/get_by_id/', 29 | {'token': self.token, 30 | 'network_id': id}, 31 | self.debug) 32 | return pycore.extensions.vpn.models.vpn.VPN(self.oc_address, self.token, vm, self.debug) 33 | 34 | def get_list(self): 35 | resp = request(self.parent_model.oc_address, '/api/vpn/get_list/', {'token': self.parent_model.token}) 36 | return [pycore.extensions.vpn.models.vpn.VPN(self.parent_model.oc_address, self.parent_model.token, vpn) 37 | for vpn in resp] 38 | 39 | def create(self, name): 40 | resp = request(self.parent_model.oc_address, '/api/vpn/create/', {'token': self.parent_model.token, 41 | 'name': name}) 42 | return pycore.extensions.vpn.models.vpn.VPN(self.parent_model.oc_address, self.parent_model.token, resp) -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/extensions/corevpn/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/pycore/extensions/corevpn/models/__init__.py -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/extensions/corevpn/models/vpn.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright 2014-2017 cloudover.io ltd. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 7 | persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 10 | Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 15 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | """ 17 | 18 | from pycore.utils import request 19 | from pycore.models.base_model import BaseModel 20 | from pycore.extensions.vpn.models.connection import Connection 21 | 22 | 23 | class VPN(BaseModel): 24 | def delete(self): 25 | request(self.oc_address, '/api/vpn/delete/', {'token': self.token, 26 | 'vpn_id': self.id}) 27 | 28 | def attach(self, vm): 29 | connection_dict = request(self.oc_address, '/api/vpn/attach/', {'token': self.token, 30 | 'vpn_id': self.id, 31 | 'vm_id': vm.id}) 32 | return Connection(self.oc_address, self.token, connection_dict) 33 | 34 | def client_cert(self): 35 | return request(self.oc_address, '/api/vpn/client_cert/', {'token': self.token, 36 | 'vpn_id': self.id}) 37 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/extensions/thunderscript/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/pycore/extensions/thunderscript/__init__.py -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/extensions/thunderscript/api.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright 2014-2017 cloudover.io ltd. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 7 | persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 10 | Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 15 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | """ 17 | 18 | import pycore.extensions.vpn.models.vpn 19 | from pycore.utils import request, calc_hash 20 | 21 | class Api(): 22 | def __init__(self, parent_model): 23 | self.parent_model = parent_model 24 | 25 | def call(self, script, variables): 26 | ret = request(self.oc_address, '/api/thunder/call/', {'token': self.token, 27 | 'script': script, 28 | 'variables': variables}, self.debug) 29 | return ret 30 | 31 | def variables(self, script): 32 | ret = request(self.oc_address, '/api/thunder/call/', {'token': self.token, 33 | 'script': script}, self.debug) 34 | return ret 35 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/models/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright 2014-2017 cloudover.io ltd. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 7 | persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 10 | Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 15 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | """ 17 | 18 | from pycore.models.image import Image 19 | from pycore.models.lease import Lease 20 | from pycore.models.network import Network 21 | from pycore.models.network_pool import NetworkPool 22 | from pycore.models.task import Task 23 | from pycore.models.template import Template 24 | from pycore.models.token import Token 25 | from pycore.models.permission import Permission 26 | from pycore.models.vm import VM 27 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/models/base_model.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright 2014-2017 cloudover.io ltd. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 7 | persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 10 | Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 15 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | """ 17 | 18 | from pycore.utils import request, calc_hash 19 | import importlib 20 | 21 | 22 | class BaseModel(object): 23 | api_modules = None 24 | 25 | def __init__(self, address, token, object_dict, debug=False): 26 | self.token = token 27 | self.oc_address = address 28 | self.debug = debug 29 | 30 | for key in object_dict.keys(): 31 | setattr(self, key, object_dict[key]) 32 | 33 | class_id = '%s_id' % self.__class__.__name__.lower() 34 | 35 | if not hasattr(self.__class__, 'api_modules'): 36 | self.__class__.api_modules = request(self.oc_address, 37 | '/api/api/list_api_modules/', 38 | {'token': self.token}, 39 | self.debug) 40 | 41 | if self.__class__.api_modules is None: 42 | self.__class__.api_modules = request(self.oc_address, 43 | '/api/api/list_api_modules/', 44 | {'token': self.token}, 45 | self.debug) 46 | 47 | self.__class__.api_modules = [m.split('.')[0] for m in self.__class__.api_modules] 48 | 49 | available_extensions = importlib.import_module('pycore.extensions') 50 | 51 | for extension in self.__class__.api_modules: 52 | try: 53 | ext_model = importlib.import_module('pycore.extensions.%s.models.%s' 54 | % (extension, self.__class__.__name__.lower())) 55 | 56 | ext = getattr(ext_model, self.__class__.__name__)() 57 | setattr(self, extension, ext) 58 | setattr(ext, 'parent_model', self) 59 | except Exception as e: 60 | pass 61 | 62 | def __eq__(self, other): 63 | if other == None: 64 | return False 65 | if not isinstance(other, self.__class__): 66 | return False 67 | 68 | return self.id == other.id and self.oc_address == other.oc_address -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/models/network_pool.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright 2014-2017 cloudover.io ltd. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 7 | persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 10 | Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 15 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | """ 17 | 18 | from pycore.utils import request, check_version, VersionException 19 | from pycore.models.base_model import BaseModel 20 | 21 | 22 | class NetworkPool(BaseModel): 23 | def __str__(self): 24 | return self.id 25 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/models/permission.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright 2014-2017 cloudover.io ltd. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 7 | persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 10 | Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 15 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | """ 17 | 18 | from pycore.utils import request, calc_hash 19 | from pycore.models.base_model import BaseModel 20 | 21 | 22 | class Permission(BaseModel): 23 | def __init__(self, address, login, password, seed, permission_dict, debug=False): 24 | self.login = login 25 | self.password = password 26 | self.oc_address = address 27 | self.seed = seed 28 | self.debug = debug 29 | 30 | self.token = None 31 | tokens = request(self.oc_address, '/user/token/get_list/', {'login': self.login, 32 | 'pw_hash': calc_hash(self.password, self.seed), 33 | 'name': 'pycloud'}, self.debug) 34 | if len(tokens) == 0: 35 | self.token = request(self.oc_address, 36 | '/user/token/create/', 37 | {'login': self.login, 38 | 'pw_hash': calc_hash(self.password, self.seed), 39 | 'name': 'pycloud'}, 40 | self.debug)['token'] 41 | else: 42 | self.token = tokens[0]['token'] 43 | 44 | BaseModel.__init__(self, self.oc_address, self.token, permission_dict) 45 | 46 | def __str__(self): 47 | return self.function 48 | 49 | def attach(self, token): 50 | request(self.oc_address, 51 | '/user/permission/attach/', 52 | {'login': self.login, 53 | 'pw_hash': calc_hash(self.password, self.seed), 54 | 'function': self.function, 55 | 'token_id': token.id}) 56 | 57 | def detach(self, token): 58 | request(self.oc_address, 59 | '/user/permission/detach/', 60 | {'login': self.login, 61 | 'pw_hash': calc_hash(self.password, self.seed), 62 | 'function': self.function, 63 | 'token_id': token.id}) 64 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/models/task.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright 2014-2017 cloudover.io ltd. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 7 | persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 10 | Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 15 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | """ 17 | 18 | from pycore.models.base_model import BaseModel 19 | from pycore.utils import request 20 | 21 | 22 | class Task(BaseModel): 23 | def __str__(self): 24 | return self.id 25 | 26 | def cancel(self): 27 | request(self.oc_address, '/api/task/cancel/', {'token': self.token, 28 | 'task_id': self.id}, self.debug) 29 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pycore/models/template.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright 2014-2017 cloudover.io ltd. 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 6 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 7 | persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the 10 | Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 15 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | """ 17 | 18 | from pycore.models.base_model import BaseModel 19 | 20 | 21 | class Template(BaseModel): 22 | def __str__(self): 23 | return self.name 24 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest-6.2.3.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest-6.2.3.dist-info/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2004-2020 Holger Krekel and others 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 9 | of the Software, and to permit persons to whom the Software is furnished to do 10 | so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest-6.2.3.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.36.2) 3 | Root-Is-Purelib: true 4 | Tag: py3-none-any 5 | 6 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest-6.2.3.dist-info/entry_points.txt: -------------------------------------------------------------------------------- 1 | [console_scripts] 2 | py.test = pytest:console_main 3 | pytest = pytest:console_main 4 | 5 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest-6.2.3.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | _pytest 2 | pytest 3 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest-cov.pth: -------------------------------------------------------------------------------- 1 | import os, sys;exec('if \'COV_CORE_SOURCE\' in os.environ:\n try:\n from pytest_cov.embed import init\n init()\n except Exception as exc:\n sys.stderr.write(\n "pytest-cov: Failed to setup subprocess coverage. "\n "Environ: {0!r} "\n "Exception: {1!r}\\n".format(\n dict((k, v) for k, v in os.environ.items() if k.startswith(\'COV_CORE\')),\n exc\n )\n )\n') -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest/__main__.py: -------------------------------------------------------------------------------- 1 | """The pytest entry point.""" 2 | import pytest 3 | 4 | if __name__ == "__main__": 5 | raise SystemExit(pytest.console_main()) 6 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest/collect.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import warnings 3 | from types import ModuleType 4 | from typing import Any 5 | from typing import List 6 | 7 | import pytest 8 | from _pytest.deprecated import PYTEST_COLLECT_MODULE 9 | 10 | COLLECT_FAKEMODULE_ATTRIBUTES = [ 11 | "Collector", 12 | "Module", 13 | "Function", 14 | "Instance", 15 | "Session", 16 | "Item", 17 | "Class", 18 | "File", 19 | "_fillfuncargs", 20 | ] 21 | 22 | 23 | class FakeCollectModule(ModuleType): 24 | def __init__(self) -> None: 25 | super().__init__("pytest.collect") 26 | self.__all__ = list(COLLECT_FAKEMODULE_ATTRIBUTES) 27 | self.__pytest = pytest 28 | 29 | def __dir__(self) -> List[str]: 30 | return dir(super()) + self.__all__ 31 | 32 | def __getattr__(self, name: str) -> Any: 33 | if name not in self.__all__: 34 | raise AttributeError(name) 35 | warnings.warn(PYTEST_COLLECT_MODULE.format(name=name), stacklevel=2) 36 | return getattr(pytest, name) 37 | 38 | 39 | sys.modules["pytest.collect"] = FakeCollectModule() 40 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/pytest/py.typed -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest_cov-2.11.1.dist-info/AUTHORS.rst: -------------------------------------------------------------------------------- 1 | Authors 2 | ======= 3 | 4 | * Marc Schlaich - http://www.schlamar.org 5 | * Rick van Hattem - http://wol.ph 6 | * Buck Evan - https://github.com/bukzor 7 | * Eric Larson - http://larsoner.com 8 | * Marc Abramowitz - http://marc-abramowitz.com 9 | * Thomas Kluyver - https://github.com/takluyver 10 | * Guillaume Ayoub - http://www.yabz.fr 11 | * Federico Ceratto - http://firelet.net 12 | * Josh Kalderimis - http://blog.cookiestack.com 13 | * Ionel Cristian Mărieș - https://blog.ionelmc.ro 14 | * Christian Ledermann - https://github.com/cleder 15 | * Alec Nikolas Reiter - https://github.com/justanr 16 | * Patrick Lannigan - https://github.com/plannigan 17 | * David Szotten - https://github.com/davidszotten 18 | * Michael Elovskikh - https://github.com/wronglink 19 | * Saurabh Kumar - https://github.com/theskumar 20 | * Michael Elovskikh - https://github.com/wronglink 21 | * Daniel Hahler - https://daniel.hahler.de 22 | * Florian Bruhin - http://www.the-compiler.org 23 | * Zoltan Kozma - https://github.com/kozmaz87 24 | * Francis Niu - https://flniu.github.io 25 | * Jannis Leidel - https://github.com/jezdez 26 | * Ryan Hiebert - http://ryanhiebert.com/ 27 | * Terence Honles - https://github.com/terencehonles 28 | * Jeremy Bowman - https://github.com/jmbowman 29 | * Samuel Giffard - https://github.com/Mulugruntz 30 | * Семён Марьясин - https://github.com/MarSoft 31 | * Alexander Shadchin - https://github.com/shadchin 32 | * Thomas Grainger - https://graingert.co.uk 33 | * Juanjo Bazán - https://github.com/xuanxu 34 | * Andrew Murray - https://github.com/radarhere 35 | * Ned Batchelder - https://nedbatchelder.com/ 36 | * Albert Tugushev - https://github.com/atugushev 37 | * Martín Gaitán - https://github.com/mgaitan 38 | * Hugo van Kemenade - https://github.com/hugovk 39 | * Michael Manganiello - https://github.com/adamantike 40 | * Anders Hovmöller - https://github.com/boxed 41 | * Zac Hatfield-Dodds - https://zhd.dev 42 | * Mateus Berardo de Souza Terra - https://github.com/MatTerra 43 | * Ganden Schaffner - https://github.com/gschaffner 44 | * Michał Górny - https://github.com/mgorny 45 | * Bernát Gábor - https://github.com/gaborbernat 46 | * Pamela McA'Nulty - https://github.com/PamelaM 47 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest_cov-2.11.1.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest_cov-2.11.1.dist-info/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2010 Meme Dough 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest_cov-2.11.1.dist-info/RECORD: -------------------------------------------------------------------------------- 1 | pytest-cov.pth,sha256=uOG4KAkL_sSyVlbQTNCUjT5wIh6oKBrA4SVp7vSK4qY,376 2 | pytest_cov-2.11.1.dist-info/AUTHORS.rst,sha256=G9ZjA7uB5jfnws31P0i6New78m1N8QtWFbLXPVkXEGk,2031 3 | pytest_cov-2.11.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 4 | pytest_cov-2.11.1.dist-info/LICENSE,sha256=g1WGrhVnZqJOPBA_vFXZr2saFt9XypMsl0gqJzf9g9U,1071 5 | pytest_cov-2.11.1.dist-info/METADATA,sha256=p535HUQOk32GM-Fjf0RwKvsYj2qSahaaBK8eZneCXQY,21683 6 | pytest_cov-2.11.1.dist-info/RECORD,, 7 | pytest_cov-2.11.1.dist-info/WHEEL,sha256=8zNYZbwQSXoB9IfXOjPfeNwvAsALAjffgk27FqvCWbo,110 8 | pytest_cov-2.11.1.dist-info/entry_points.txt,sha256=DoKvgP5Onz1w_poMszck_wUxA4kw3T7fUXqqerHy8bk,43 9 | pytest_cov-2.11.1.dist-info/top_level.txt,sha256=HvYHsAFV4MeTUNUwhawY_DKvrpE2lYratTHX_U45oBU,11 10 | pytest_cov/__init__.py,sha256=1ggFxoylaFalPca1deMgUs1OeTidSaWlxV3uQ_rbBoA,110 11 | pytest_cov/__pycache__/__init__.cpython-37.pyc,, 12 | pytest_cov/__pycache__/compat.cpython-37.pyc,, 13 | pytest_cov/__pycache__/embed.cpython-37.pyc,, 14 | pytest_cov/__pycache__/engine.cpython-37.pyc,, 15 | pytest_cov/__pycache__/plugin.cpython-37.pyc,, 16 | pytest_cov/compat.py,sha256=Z3yoXALRcdq_2am3W3Us_HeKUf3IKufyRxNf3tkrCE8,716 17 | pytest_cov/embed.py,sha256=55PFkt8oCkRYsjCqSrA03cvBvbvvuYWZKAKMbccUkGE,3983 18 | pytest_cov/engine.py,sha256=xMP0O2KyDRuK37Bs98TLSyVclVRDHZbdg6O3nz_UMC8,14781 19 | pytest_cov/plugin.py,sha256=bqR4xRl-n4-PEWo3aRdGl-Nruid71BFkiKl2oSVdm0c,13993 20 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest_cov-2.11.1.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.33.6) 3 | Root-Is-Purelib: true 4 | Tag: py2-none-any 5 | Tag: py3-none-any 6 | 7 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest_cov-2.11.1.dist-info/entry_points.txt: -------------------------------------------------------------------------------- 1 | [pytest11] 2 | pytest_cov = pytest_cov.plugin 3 | 4 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest_cov-2.11.1.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | pytest_cov 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest_cov/__init__.py: -------------------------------------------------------------------------------- 1 | """pytest-cov: avoid already-imported warning: PYTEST_DONT_REWRITE.""" 2 | __version__ = "__version__ = '2.11.1'" 3 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/pytest_cov/compat.py: -------------------------------------------------------------------------------- 1 | try: 2 | from StringIO import StringIO 3 | except ImportError: 4 | from io import StringIO 5 | 6 | import pytest 7 | 8 | StringIO # pyflakes, this is for re-export 9 | 10 | 11 | if hasattr(pytest, 'hookimpl'): 12 | hookwrapper = pytest.hookimpl(hookwrapper=True) 13 | else: 14 | hookwrapper = pytest.mark.hookwrapper 15 | 16 | 17 | class SessionWrapper(object): 18 | def __init__(self, session): 19 | self._session = session 20 | if hasattr(session, 'testsfailed'): 21 | self._attr = 'testsfailed' 22 | else: 23 | self._attr = '_testsfailed' 24 | 25 | @property 26 | def testsfailed(self): 27 | return getattr(self._session, self._attr) 28 | 29 | @testsfailed.setter 30 | def testsfailed(self, value): 31 | setattr(self._session, self._attr, value) 32 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0000_install_core.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 2016 Marta Nabozny 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | """ 21 | This test installs CoreCluster at local machine 22 | """ 23 | 24 | import subprocess 25 | 26 | def setup_module(module): 27 | pass 28 | 29 | def teardown_module(module): 30 | pass 31 | 32 | 33 | def setup_function(function): 34 | pass 35 | 36 | 37 | def teardown_function(function): 38 | pass 39 | 40 | 41 | def test_add_apt_repo(): 42 | f = open('/etc/apt/sources.list.d/cloudover', 'w') 43 | f.write('deb http://packages.cloudover.org/nightly/ nightly main\n') 44 | f.close() 45 | 46 | 47 | def test_update(): 48 | subprocess.call(['apt-get', 'update']) 49 | 50 | 51 | def test_upgrade(): 52 | subprocess.call(['apt-get', 'upgrade', '--yes', '--force-yes']) 53 | 54 | 55 | def test_install_packages(): 56 | subprocess.call(['apt-get', 'install', '--yes', '--force-yes', 57 | 'corecluster', 58 | 'ipython', 59 | 'tcpdump']) -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0000_install_nfs_storage.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 2016 Marta Nabozny 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | """ 21 | This test creates new NFS share from local disk 22 | """ 23 | 24 | import os 25 | import subprocess 26 | 27 | def setup_module(module): 28 | pass 29 | 30 | def teardown_module(module): 31 | pass 32 | 33 | 34 | def setup_function(function): 35 | pass 36 | 37 | 38 | def teardown_function(function): 39 | pass 40 | 41 | 42 | def test_install_packages(): 43 | subprocess.call(['apt-get', 'install', '--yes', '--force-yes', 44 | 'nfs-kernel-server']) 45 | 46 | 47 | def test_add_export(): 48 | if not os.path.exists('/storage'): 49 | os.mkdir('/storage') 50 | 51 | if '/storage' not in open('/etc/exports').readall(): 52 | f = open('/etc/exports', 'a') 53 | f.write('/storage *(rw,no_root_squash,no_subtree_check') 54 | f.close() 55 | 56 | subprocess.call(['chmod', '777', '/storage']) 57 | 58 | 59 | def test_restart_services(): 60 | subprocess.call(['service', 'nfs-kernel-server', 'restart']) -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0000_install_node.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 2016 Marta Nabozny 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | """ 21 | This test installs CoreNode at local machine 22 | """ 23 | 24 | import subprocess 25 | 26 | def setup_module(module): 27 | pass 28 | 29 | def teardown_module(module): 30 | pass 31 | 32 | 33 | def setup_function(function): 34 | pass 35 | 36 | 37 | def teardown_function(function): 38 | pass 39 | 40 | 41 | def test_add_apt_repo(): 42 | f = open('/etc/apt/sources.list.d/cloudover', 'w') 43 | f.write('deb http://packages.cloudover.org/nightly/ nightly main\n') 44 | f.close() 45 | 46 | 47 | def test_update(): 48 | subprocess.call(['apt-get', 'update']) 49 | 50 | 51 | def test_upgrade(): 52 | subprocess.call(['apt-get', 'upgrade', '--yes', '--force-yes']) 53 | 54 | 55 | def test_install_packages(): 56 | subprocess.call(['apt-get', 'install', '--yes', '--force-yes', 57 | 'corenode', 58 | 'ipython', 59 | 'tcpdump']) -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0000_setup_coredhcp.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 2016 Marta Nabozny 4 | 5 | This file is part of CloudOver project. 6 | 7 | CloudOver is free software: you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation, either version 3 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see . 19 | """ 20 | 21 | import subprocess 22 | 23 | 24 | def setup_module(module): 25 | pass 26 | 27 | 28 | def teardown_module(module): 29 | pass 30 | 31 | 32 | def setup_function(function): 33 | pass 34 | 35 | 36 | def teardown_function(function): 37 | pass 38 | 39 | 40 | def test_install_coretalk(): 41 | subprocess.call(['apt-get', 'install', '--yes', '--force-yes', 42 | 'coredhcp']) 43 | 44 | 45 | def test_enable_agent(): 46 | if subprocess.call(['grep', 'corevpn.agents.vpn', '/etc/corecluster/agent.py']) != 0: 47 | subprocess.call(['sed', '-i', 48 | 's/AGENTS = \[/AGENTS = [\n \{"type": "dhcp", "module": "coredhcp.agents.dhcp", "count": 1\},/g', 49 | '/etc/corecluster/agent.py']) 50 | 51 | 52 | def test_enable_extension(): 53 | if subprocess.call(['grep', 'coredhcp.views.api', '/etc/corecluster/config.py']) != 0: 54 | subprocess.call(['sed', '-i', 55 | 's/LOAD_API = \[/LOAD_API = \["coredhcp.views.api", /g', 56 | '/etc/corecluster/config.py']) 57 | 58 | 59 | def test_restart_services(): 60 | subprocess.call(['service', 'corecluster', 'restart']) 61 | subprocess.call(['service', 'uwsgi', 'restart']) 62 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0000_setup_coretalk.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 2016 Marta Nabozny 4 | 5 | This file is part of CloudOver project. 6 | 7 | CloudOver is free software: you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation, either version 3 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see . 19 | """ 20 | 21 | import subprocess 22 | 23 | 24 | def setup_module(module): 25 | pass 26 | 27 | 28 | def teardown_module(module): 29 | pass 30 | 31 | 32 | def setup_function(function): 33 | pass 34 | 35 | 36 | def teardown_function(function): 37 | pass 38 | 39 | 40 | def test_install_coretalk(): 41 | subprocess.call(['apt-get', 'install', '--yes', '--force-yes', 42 | 'coretalk']) 43 | 44 | 45 | def test_enable_extension(): 46 | if subprocess.call(['grep', 'coretalk.views.api', '/etc/corecluster/config.py']) != 0: 47 | subprocess.call(['sed', '-i', 48 | 's/LOAD_API = \[/LOAD_API = \["coretalk.views.api", \n/g', 49 | '/etc/corecluster/config.py']) 50 | 51 | if subprocess.call(['grep', 'coretalk.models.coretalk', '/etc/corecluster/config.py']) != 0: 52 | subprocess.call(['sed', '-i.bak', 53 | 's/LOAD_MODELS = \[/LOAD_MODELS = \["coretalk.models.coretalk", \n/g', 54 | '/etc/corecluster/config.py']) 55 | 56 | def test_migate_db(): 57 | subprocess.call(['cc-admin', 'makemigrations']) 58 | subprocess.call(['cc-admin', 'migrate']) 59 | 60 | 61 | def test_restart_services(): 62 | subprocess.call(['service', 'corecluster', 'restart']) 63 | subprocess.call(['service', 'uwsgi', 'restart']) 64 | subprocess.call(['service', 'nginx', 'restart']) 65 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0000_setup_coreui.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2016 Marta Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | import subprocess 21 | 22 | 23 | def setup_module(module): 24 | pass 25 | 26 | 27 | def teardown_module(module): 28 | pass 29 | 30 | 31 | def setup_function(function): 32 | pass 33 | 34 | 35 | def teardown_function(function): 36 | pass 37 | 38 | 39 | def test_git_clone(): 40 | subprocess.call(['apt-get', 'install', '--yes', '--force-yes', 41 | 'git']) 42 | subprocess.call(['git', 'clone', 'https://github.com/cloudOver/coreui.git', '/var/www/html/']) 43 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0000_setup_corevpn.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 2016 Marta Nabozny 4 | 5 | This file is part of CloudOver project. 6 | 7 | CloudOver is free software: you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation, either version 3 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see . 19 | """ 20 | 21 | import subprocess 22 | 23 | 24 | def setup_module(module): 25 | pass 26 | 27 | 28 | def teardown_module(module): 29 | pass 30 | 31 | 32 | def setup_function(function): 33 | pass 34 | 35 | 36 | def teardown_function(function): 37 | pass 38 | 39 | 40 | def test_install_coretalk(): 41 | subprocess.call(['apt-get', 'install', '--yes', '--force-yes', 42 | 'corevpn']) 43 | 44 | 45 | def test_enable_agent(): 46 | if subprocess.call(['grep', 'corevpn.agents.vpn', '/etc/corecluster/agent.py']) != 0: 47 | subprocess.call(['sed', '-i', 48 | 's/AGENTS = \[/AGENTS = [\n \{"type": "vpn", "module": "corevpn.agents.vpn", "count": 4\},/g', 49 | '/etc/corecluster/agent.py']) 50 | 51 | 52 | def test_enable_extension(): 53 | if subprocess.call(['grep', 'corevpn.views.api', '/etc/corecluster/config.py']) != 0: 54 | subprocess.call(['sed', '-i', 55 | 's/LOAD_API = \[/LOAD_API = \["corevpn.views.api", /g', 56 | '/etc/corecluster/config.py']) 57 | 58 | if subprocess.call(['grep', 'corevpn.models.corevpn', '/etc/corecluster/config.py']) != 0: 59 | subprocess.call(['sed', '-i.bak', 60 | 's/LOAD_MODELS = \[/LOAD_MODELS = \["corevpn.models.corevpn", /g', 61 | '/etc/corecluster/config.py']) 62 | 63 | def test_migate_db(): 64 | subprocess.call(['cc-admin', 'makemigrations']) 65 | subprocess.call(['cc-admin', 'migrate']) 66 | 67 | 68 | def test_restart_services(): 69 | subprocess.call(['service', 'corecluster', 'restart']) 70 | subprocess.call(['service', 'uwsgi', 'restart']) 71 | subprocess.call(['service', 'nginx', 'restart']) 72 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0001_register.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | 24 | def setup_module(module): 25 | pass 26 | def teardown_module(module): 27 | pass 28 | 29 | def setup_function(function): 30 | pass 31 | 32 | def teardown_function(function): 33 | pass 34 | 35 | 36 | def test_register_user(): 37 | cloud = Cloud.register(settings.address, settings.additional_login, settings.additional_password, settings.additional_name, settings.additional_surname, settings.additional_email, debug=True) 38 | 39 | 40 | def test_register_additional(): 41 | cloud = Cloud.register(settings.address, settings.login, settings.password, settings.name, settings.surname, settings.email, debug=True) 42 | 43 | 44 | def test_api(): 45 | cloud = Cloud(settings.address, settings.login, settings.password, debug=True) 46 | api = cloud.get_api() 47 | 48 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0002_account_info.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | from pycore.utils import CloudException 24 | 25 | api = None 26 | cloud = None 27 | 28 | def setup_module(module): 29 | global cloud 30 | global api 31 | cloud = Cloud(settings.address, settings.login, settings.password, debug=True) 32 | api = cloud.get_api() 33 | 34 | def teardown_module(module): 35 | pass 36 | 37 | def setup_function(function): 38 | pass 39 | 40 | def teardown_function(function): 41 | pass 42 | 43 | def test_account_quota(): 44 | global cloud 45 | cloud.account_quota() -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0002_api.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | 24 | api = None 25 | cloud = None 26 | 27 | def setup_module(module): 28 | global cloud 29 | global api 30 | cloud = Cloud(settings.address, settings.login, settings.password) 31 | api = cloud.get_api() 32 | 33 | def teardown_module(module): 34 | pass 35 | 36 | def setup_function(function): 37 | pass 38 | 39 | def teardown_function(function): 40 | pass 41 | 42 | def test_account(): 43 | global cloud 44 | cloud.token_list() 45 | 46 | 47 | def test_capabilities(): 48 | global api 49 | api.supported_disk_controllers() 50 | api.supported_network_devices() 51 | api.supported_video_devices() 52 | api.supported_image_types() 53 | 54 | def test_listings(): 55 | global api 56 | api.template_list() 57 | api.image_list() 58 | api.vm_list() 59 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0002_check_resources.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | from pycore.utils import CloudException 24 | 25 | api = None 26 | cloud = None 27 | 28 | def setup_module(module): 29 | global cloud 30 | global api 31 | cloud = Cloud(settings.address, settings.login, settings.password, debug=True) 32 | api = cloud.get_api() 33 | 34 | def teardown_module(module): 35 | pass 36 | 37 | def setup_function(function): 38 | pass 39 | 40 | def teardown_function(function): 41 | pass 42 | 43 | def test_check_compute_caps(): 44 | global api 45 | available = False 46 | caps = api.template_capabilities() 47 | 48 | if len(caps.keys()) == 0: 49 | raise Exception('no defined hardware templates') 50 | 51 | for t in caps.keys(): 52 | if caps[t] > 0: 53 | available = True 54 | 55 | if not available: 56 | raise Exception('no computing resources available') 57 | 58 | 59 | def test_check_network_caps(): 60 | global api 61 | isolated_available = False 62 | routed_available = False 63 | public_available = False 64 | 65 | for n in api.network_pool_list(): 66 | if n.mode == 'isolated' and n.state == 'ok': 67 | isolated_available = True 68 | if n.mode == 'routed' and n.state == 'ok': 69 | routed_available = True 70 | if n.mode == 'public' and n.state == 'ok': 71 | public_available = True 72 | 73 | if not isolated_available: 74 | raise Exception('no isolated network pool available') 75 | if not routed_available: 76 | raise Exception('no routed network pool available') 77 | if not public_available: 78 | raise Exception('no public network pool available') 79 | 80 | 81 | def test_check_storage_caps(): 82 | global api 83 | available = False 84 | caps = api.storage_capabilities() 85 | if caps == 0: 86 | raise Exception('no storages defined or available') 87 | 88 | if caps < 10000: 89 | raise Exception('not enough storage space available') 90 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0002_permissions.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | from pycore.utils import CloudException 24 | 25 | api = None 26 | cloud = None 27 | 28 | def setup_module(module): 29 | global cloud 30 | global api 31 | cloud = Cloud(settings.address, settings.login, settings.password, debug=True) 32 | api = cloud.get_api() 33 | 34 | def teardown_module(module): 35 | pass 36 | 37 | def setup_function(function): 38 | pass 39 | 40 | def teardown_function(function): 41 | pass 42 | 43 | def test_list_permissions(): 44 | global cloud 45 | cloud.permission_list() -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0002_permissions_token.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud, Api 23 | from pycore.utils import CloudException 24 | 25 | api = None 26 | cloud = None 27 | token = None 28 | 29 | 30 | def setup_module(module): 31 | global cloud 32 | global api 33 | cloud = Cloud(settings.address, settings.login, settings.password, debug=True) 34 | api = cloud.get_api() 35 | 36 | 37 | def teardown_module(module): 38 | pass 39 | 40 | 41 | def setup_function(function): 42 | pass 43 | 44 | 45 | def teardown_function(function): 46 | pass 47 | 48 | 49 | def test_create_token(): 50 | global token 51 | global cloud 52 | token = cloud.token_create() 53 | 54 | 55 | def test_list_permissions(): 56 | global cloud 57 | plist = cloud.permission_list() 58 | for p in plist: 59 | if p.function.startswith('api/image') or p.function.startswith('api/api'): 60 | p.attach(token) 61 | 62 | 63 | def test_call_permited_function(): 64 | global cloud 65 | global api 66 | global token 67 | api_tok = Api(cloud.oc_address, token.token) 68 | api_tok.image_list() 69 | 70 | 71 | def test_call_restricted_function(): 72 | global cloud 73 | global api 74 | global token 75 | api_tok = Api(cloud.oc_address, token.token) 76 | try: 77 | api_tok.vm_list() 78 | raise Exception('function_permited') 79 | except CloudException, e: 80 | if e.status != 'token_permission': 81 | raise Exception('function_failed') 82 | 83 | 84 | def test_remove_token(): 85 | global token 86 | token.delete() -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0002_template_caps.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | from pycore.utils import CloudException 24 | 25 | api = None 26 | cloud = None 27 | 28 | def setup_module(module): 29 | global cloud 30 | global api 31 | cloud = Cloud(settings.address, settings.login, settings.password, debug=True) 32 | api = cloud.get_api() 33 | 34 | def teardown_module(module): 35 | pass 36 | 37 | def setup_function(function): 38 | pass 39 | 40 | def teardown_function(function): 41 | pass 42 | 43 | def test_template_capabilities(): 44 | global api 45 | api.template_capabilities() -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0002_validation.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | from pycore.utils import CloudException 24 | 25 | api = None 26 | cloud = None 27 | 28 | def setup_module(module): 29 | global cloud 30 | global api 31 | cloud = Cloud(settings.address, settings.login, settings.password, debug=True) 32 | api = cloud.get_api() 33 | 34 | def teardown_module(module): 35 | pass 36 | 37 | def setup_function(function): 38 | pass 39 | 40 | def teardown_function(function): 41 | pass 42 | 43 | def test_int_as_string(): 44 | global cloud 45 | try: 46 | cloud.token_create(name=1234) 47 | raise Exception('not_validated') 48 | except CloudException, e: 49 | if e.status == 'param_error': 50 | pass 51 | else: 52 | raise e 53 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0003_image_create_invalid_format.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | import time 24 | 25 | api = None 26 | cloud = None 27 | image = None 28 | 29 | 30 | def setup_module(module): 31 | global cloud 32 | global api 33 | cloud = Cloud(settings.address, settings.login, settings.password) 34 | api = cloud.get_api() 35 | 36 | 37 | def teardown_module(module): 38 | pass 39 | 40 | 41 | def setup_function(function): 42 | pass 43 | 44 | 45 | def teardown_function(function): 46 | pass 47 | 48 | 49 | def test_create(): 50 | global api 51 | global image 52 | image_types = api.supported_image_types() 53 | disk_controllers = api.supported_disk_controllers() 54 | print image_types 55 | print disk_controllers 56 | try: 57 | image = api.image_create("invalid format test image", "image description", 1024*1024*10, 'permanent', disk_controllers[0], 'private', format='abc') 58 | except: 59 | return 60 | raise Exception('image created with unknown format') 61 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0003_image_upload.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | import time 24 | 25 | api = None 26 | cloud = None 27 | image = None 28 | 29 | def setup_module(module): 30 | global cloud 31 | global api 32 | cloud = Cloud(settings.address, settings.login, settings.password) 33 | api = cloud.get_api() 34 | 35 | 36 | def teardown_module(module): 37 | pass 38 | 39 | 40 | def setup_function(function): 41 | pass 42 | 43 | 44 | def teardown_function(function): 45 | pass 46 | 47 | 48 | def test_upload(): 49 | global api 50 | global image 51 | image_types = api.supported_image_types() 52 | disk_controllers = api.supported_disk_controllers() 53 | image = api.image_create("upload image", "image description", 10, 'transient', disk_controllers[0], 'private', format='qcow2') 54 | image.upload_url('http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img') 55 | 56 | 57 | def test_wait_created(): 58 | global api 59 | global image 60 | 61 | for i in xrange(240): 62 | img = api.image_by_id(image.id) 63 | if 'progress' in img.data and img.data['progress'] == 1.0: 64 | return 65 | 66 | if img.state == 'failed': 67 | raise Exception('image failed') 68 | else: 69 | time.sleep(1) 70 | raise Exception('image not created') 71 | 72 | 73 | def test_image_ok(): 74 | global api 75 | global image 76 | 77 | for i in xrange(120): 78 | img = api.image_by_id(image.id) 79 | if img.state == 'ok': 80 | return 81 | time.sleep(1) 82 | raise Exception('image not ok') 83 | 84 | 85 | def test_delete(): 86 | global api 87 | global image 88 | 89 | image.delete() 90 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0003_image_upload_data.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | import time 24 | 25 | api = None 26 | cloud = None 27 | image = None 28 | 29 | def setup_module(module): 30 | global cloud 31 | global api 32 | cloud = Cloud(settings.address, settings.login, settings.password) 33 | api = cloud.get_api() 34 | 35 | 36 | def teardown_module(module): 37 | pass 38 | 39 | 40 | def setup_function(function): 41 | pass 42 | 43 | 44 | def teardown_function(function): 45 | pass 46 | 47 | 48 | def test_upload_data(): 49 | global api 50 | global image 51 | image_types = api.supported_image_types() 52 | disk_controllers = api.supported_disk_controllers() 53 | image = api.image_create("data upload image", "image description", 3000, 'transient', disk_controllers[0], 'private', format='qcow2') 54 | image.upload_data(0, 'abc' * 1000) 55 | 56 | 57 | def test_image_ok(): 58 | global api 59 | global image 60 | 61 | for i in xrange(120): 62 | img = api.image_by_id(image.id) 63 | if img.state == 'ok': 64 | return 65 | time.sleep(1) 66 | raise Exception('image not ok') 67 | 68 | 69 | def test_delete(): 70 | global api 71 | global image 72 | 73 | image.delete() 74 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0003_image_upload_invalid_format.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | import time 24 | 25 | api = None 26 | cloud = None 27 | image = None 28 | 29 | def setup_module(module): 30 | global cloud 31 | global api 32 | cloud = Cloud(settings.address, settings.login, settings.password) 33 | api = cloud.get_api() 34 | 35 | 36 | def teardown_module(module): 37 | pass 38 | 39 | 40 | def setup_function(function): 41 | pass 42 | 43 | 44 | def teardown_function(function): 45 | pass 46 | 47 | 48 | def test_upload(): 49 | global api 50 | global image 51 | image_types = api.supported_image_types() 52 | disk_controllers = api.supported_disk_controllers() 53 | image = api.image_create("upload image", "image description", 10, 'transient', disk_controllers[0], 'private', format='vdi') 54 | image.upload_url('http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img') 55 | 56 | 57 | def test_wait_created(): 58 | global api 59 | global image 60 | 61 | for i in xrange(240): 62 | img = api.image_by_id(image.id) 63 | if img.state == 'failed': 64 | return 65 | else: 66 | time.sleep(1) 67 | # raise Exception('image created with wrong format') 68 | 69 | 70 | def test_delete(): 71 | global api 72 | global image 73 | 74 | image.delete() 75 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0004_vm_create.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | import time 24 | 25 | api = None 26 | cloud = None 27 | image = None 28 | template = None 29 | vm = None 30 | 31 | def setup_module(module): 32 | global cloud 33 | global api 34 | global template 35 | global image 36 | 37 | cloud = Cloud(settings.address, settings.login, settings.password) 38 | api = cloud.get_api() 39 | 40 | templates = api.template_list() 41 | template = templates[0] 42 | 43 | images = api.image_list() 44 | for img in images: 45 | if img.name == 'default image' and img.state == 'ok': 46 | image = img 47 | return 48 | raise Exception('image not found') 49 | 50 | def teardown_module(module): 51 | pass 52 | 53 | def setup_function(function): 54 | pass 55 | 56 | def teardown_function(function): 57 | pass 58 | 59 | 60 | def test_vm_create(): 61 | global api 62 | global image 63 | global template 64 | global vm 65 | vm = api.vm_create('test vm', 'vm description', template, image) 66 | 67 | 68 | def test_wait_vm_stopped(): 69 | global api 70 | global vm 71 | 72 | for i in xrange(60): 73 | v = api.vm_by_id(vm.id) 74 | if v.state == 'stopped': 75 | break 76 | elif v.state == 'failed': 77 | raise Exception('vm failed') 78 | else: 79 | time.sleep(1) 80 | 81 | 82 | def test_vm_cleanup(): 83 | global vm 84 | vm.cleanup() 85 | 86 | 87 | def test_vm_list(): 88 | global vm 89 | global api 90 | 91 | vms = api.vm_by_name(vm.name) 92 | assert isinstance(vms, list) 93 | assert len(vms) > 0 94 | assert api.vm_by_id(vm.id) != None 95 | api.vm_list() 96 | 97 | 98 | def test_wait_closed(): 99 | global api 100 | global vm 101 | 102 | for i in xrange(60): 103 | v = api.vm_by_id(vm.id) 104 | if v.state == 'closed': 105 | return 106 | elif v.state == 'failed': 107 | raise Exception('vm failed') 108 | else: 109 | time.sleep(1) 110 | 111 | raise Exception('vm close timeout') 112 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0004_vm_edit.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | import time 24 | 25 | api = None 26 | cloud = None 27 | image = None 28 | template = None 29 | vm = None 30 | 31 | def setup_module(module): 32 | global cloud 33 | global api 34 | global template 35 | global image 36 | 37 | cloud = Cloud(settings.address, settings.login, settings.password) 38 | api = cloud.get_api() 39 | 40 | templates = api.template_list() 41 | template = templates[0] 42 | 43 | images = api.image_list() 44 | for img in images: 45 | if img.name == 'default image' and img.state == 'ok': 46 | image = img 47 | return 48 | raise Exception('image not found') 49 | 50 | def teardown_module(module): 51 | pass 52 | 53 | def setup_function(function): 54 | pass 55 | 56 | def teardown_function(function): 57 | pass 58 | 59 | 60 | def test_vm_create(): 61 | global api 62 | global image 63 | global template 64 | global vm 65 | vm = api.vm_create('test vm', 'vm description', template, image) 66 | 67 | 68 | def test_wait_vm(): 69 | global api 70 | global vm 71 | 72 | for i in xrange(60): 73 | v = api.vm_by_id(vm.id) 74 | if v.state == 'stopped': 75 | break 76 | elif v.state == 'failed': 77 | raise Exception('vm failed') 78 | else: 79 | time.sleep(1) 80 | 81 | 82 | def test_vm_cleanup(): 83 | global vm 84 | vm.cleanup() 85 | 86 | 87 | def test_wait_closed(): 88 | global api 89 | global vm 90 | 91 | for i in xrange(60): 92 | v = api.vm_by_id(vm.id) 93 | if v.state == 'closed': 94 | return 95 | elif v.state == 'failed': 96 | raise Exception('vm failed') 97 | else: 98 | time.sleep(1) 99 | 100 | raise Exception('vm close timeout') 101 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0005_network_isolated_allocate.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | import settings 21 | from pycore import Cloud 22 | from netaddr import IPAddress, IPNetwork 23 | 24 | api = None 25 | cloud = None 26 | network_private = None 27 | network_public = None 28 | leases = None 29 | 30 | def setup_module(module): 31 | global cloud 32 | global api 33 | 34 | cloud = Cloud(settings.address, settings.login, settings.password) 35 | api = cloud.get_api() 36 | 37 | 38 | def teardown_module(module): 39 | pass 40 | 41 | def setup_function(function): 42 | pass 43 | 44 | def teardown_function(function): 45 | pass 46 | 47 | 48 | def test_network_create(): 49 | global api 50 | global network 51 | network = api.network_create(24, "Isolated Network", mode="isolated", address='10.0.0.0') 52 | 53 | 54 | def test_lease_allocate(): 55 | global api 56 | global network 57 | try: 58 | network.allocate() 59 | except: 60 | return 61 | raise Exception('isolated network could be allocated') 62 | 63 | 64 | def test_list_leases(): 65 | global network 66 | network.lease_list() 67 | 68 | 69 | def test_network_release(): 70 | global api 71 | global network 72 | 73 | network.release() 74 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0005_network_isolated_create.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | import settings 21 | from pycore import Cloud 22 | from netaddr import IPAddress, IPNetwork 23 | 24 | api = None 25 | cloud = None 26 | network_private = None 27 | network_public = None 28 | leases = None 29 | 30 | def setup_module(module): 31 | global cloud 32 | global api 33 | 34 | cloud = Cloud(settings.address, settings.login, settings.password) 35 | api = cloud.get_api() 36 | 37 | 38 | def teardown_module(module): 39 | pass 40 | 41 | def setup_function(function): 42 | pass 43 | 44 | def teardown_function(function): 45 | pass 46 | 47 | 48 | def test_network_create(): 49 | global api 50 | global network 51 | network = api.network_create(24, "Normal Network", False, mode="isolated", address='10.0.0.0') 52 | 53 | 54 | def test_lease_create(): 55 | global api 56 | global network 57 | 58 | net_addr = IPNetwork(network.address + '/' + str(network.mask)) 59 | for host in net_addr.iter_hosts(): 60 | network.lease_create(host) 61 | 62 | def test_list_leases(): 63 | global network 64 | network.lease_list() 65 | 66 | 67 | def test_network_release(): 68 | global api 69 | global network 70 | 71 | network.release() 72 | 73 | 74 | def test_create_test_network(): 75 | global api 76 | networks = api.network_list() 77 | names = [network.name for network in networks] 78 | 79 | if not "Test isolated network" in names: 80 | api.network_create(24, "Test isolated network", False, address="10.0.0.0", mode="isolated") -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0005_network_pools.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | import settings 21 | from pycore import Cloud 22 | from pycore.utils import CloudException 23 | 24 | api = None 25 | cloud = None 26 | network_pool = None 27 | 28 | def setup_module(module): 29 | global cloud 30 | global api 31 | 32 | cloud = Cloud(settings.address, settings.login, settings.password) 33 | api = cloud.get_api() 34 | 35 | 36 | def teardown_module(module): 37 | pass 38 | 39 | def setup_function(function): 40 | pass 41 | 42 | def teardown_function(function): 43 | pass 44 | 45 | 46 | def test_network_pool_list(): 47 | global api 48 | global network_pool 49 | network_pool = api.network_pool_list() 50 | assert(len(network_pool) > 0) 51 | 52 | 53 | def test_network_create_out_of_pool(): 54 | global api 55 | global network_pool 56 | #try: 57 | # api.network_create(address='254.254.254.0', mask=24, name="test", mode='routed') 58 | # raise Exception("network created out of pool") 59 | #except CloudException, e: 60 | # pass 61 | 62 | 63 | def test_network_create_in_pool(): 64 | global api 65 | global network_pool 66 | network = api.network_create(address=network_pool[0].address, mask=25, name="test", mode='routed') 67 | network.delete() 68 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0005_network_routed_allocate.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | import settings 21 | from pycore import Cloud 22 | from netaddr import IPAddress, IPNetwork 23 | 24 | api = None 25 | cloud = None 26 | network_private = None 27 | network_public = None 28 | leases = None 29 | 30 | def setup_module(module): 31 | global cloud 32 | global api 33 | 34 | cloud = Cloud(settings.address, settings.login, settings.password) 35 | api = cloud.get_api() 36 | 37 | 38 | def teardown_module(module): 39 | pass 40 | 41 | def setup_function(function): 42 | pass 43 | 44 | def teardown_function(function): 45 | pass 46 | 47 | 48 | def test_network_create(): 49 | global api 50 | global network 51 | network = api.network_create(24, "Isolated Network", True) 52 | 53 | 54 | def test_lease_allocate(): 55 | global api 56 | global network 57 | network.allocate() 58 | 59 | 60 | def test_list_leases(): 61 | global network 62 | network.lease_list() 63 | 64 | 65 | def test_network_release(): 66 | global api 67 | global network 68 | 69 | network.release() 70 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0005_network_routed_create.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | import settings 21 | from pycore import Cloud 22 | from netaddr import IPAddress, IPNetwork 23 | 24 | api = None 25 | cloud = None 26 | network_private = None 27 | network_public = None 28 | leases = None 29 | 30 | def setup_module(module): 31 | global cloud 32 | global api 33 | 34 | cloud = Cloud(settings.address, settings.login, settings.password) 35 | api = cloud.get_api() 36 | 37 | 38 | def teardown_module(module): 39 | pass 40 | 41 | def setup_function(function): 42 | pass 43 | 44 | def teardown_function(function): 45 | pass 46 | 47 | 48 | def test_network_create(): 49 | global api 50 | global network_private 51 | global network_public 52 | network_public = api.network_create(24, "Normal Network", False, mode="routed") 53 | network_private = api.network_create(24, "Isolated Network", True, mode="routed") 54 | 55 | 56 | def test_lease_create(): 57 | global api 58 | global network_private 59 | global network_public 60 | 61 | net_addr = IPNetwork(network_public.address) 62 | for host in net_addr.iter_hosts(): 63 | if IPNetwork('%s/30' % str(host+2)) == host: 64 | network_public.lease_create(host) 65 | 66 | net_addr = IPNetwork(network_private.address) 67 | for host in net_addr.iter_hosts(): 68 | if IPNetwork('%s/30' % str(host+2)) == host: 69 | network_private.lease_create(host) 70 | 71 | 72 | def test_list_leases(): 73 | global network_private 74 | network_private.lease_list() 75 | 76 | 77 | def test_network_release(): 78 | global api 79 | global network_public 80 | global network_private 81 | 82 | network_private.release() 83 | network_public.release() 84 | 85 | 86 | def test_create_test_network(): 87 | global api 88 | networks = api.network_list() 89 | names = [network.name for network in networks] 90 | 91 | if not "Test routed network" in names: 92 | api.network_create(24, "Test routed network", False, mode='isolated') -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0007_access_images.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | import time 24 | 25 | qapi = None 26 | mapi = None 27 | qcloud = None 28 | mcloud = None 29 | 30 | def setup_module(module): 31 | global mcloud 32 | global qcloud 33 | global mapi 34 | global qapi 35 | mcloud = Cloud(settings.address, settings.login, settings.password) 36 | qcloud = Cloud(settings.address, settings.additional_login, settings.additional_password) 37 | mapi = mcloud.get_api() 38 | qapi = qcloud.get_api() 39 | 40 | def teardown_module(module): 41 | pass 42 | 43 | def setup_function(function): 44 | pass 45 | 46 | def teardown_function(function): 47 | pass 48 | 49 | def test_access(): 50 | global qapi 51 | images = qapi.image_list() 52 | for image in images: 53 | if image.name == 'default image': 54 | raise Exception('transient image visible in permanent list') 55 | elif image.name == 'permanent image': 56 | raise Exception('permanent image visible in transient images') 57 | 58 | def test_delete(): 59 | global qapi 60 | global mapi 61 | images = mapi.image_list() 62 | try: 63 | img = qapi.image_by_id(images[0].id) 64 | img.delete() 65 | except: 66 | return 67 | 68 | raise Exception('user is permitted to delete foreign images') -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0007_access_networks.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | import time 24 | 25 | qapi = None 26 | mapi = None 27 | qcloud = None 28 | mcloud = None 29 | network = None 30 | 31 | def setup_module(module): 32 | global mcloud 33 | global qcloud 34 | global mapi 35 | global qapi 36 | global network 37 | mcloud = Cloud(settings.address, settings.login, settings.password) 38 | qcloud = Cloud(settings.address, settings.additional_login, settings.additional_password) 39 | mapi = mcloud.get_api() 40 | qapi = qcloud.get_api() 41 | network = qapi.network_create(26, 'Q', False) 42 | 43 | def teardown_module(module): 44 | global network 45 | network.delete() 46 | 47 | def setup_function(function): 48 | pass 49 | 50 | def teardown_function(function): 51 | pass 52 | 53 | def test_get(): 54 | global network 55 | global mapi 56 | try: 57 | mapi.network_by_id(network.id) 58 | except: 59 | return 60 | 61 | raise Exception('Network is accessible for other accounts') 62 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0007_list_images.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | import time 24 | 25 | api = None 26 | cloud = None 27 | image = None 28 | 29 | def setup_module(module): 30 | global cloud 31 | global api 32 | cloud = Cloud(settings.address, settings.login, settings.password) 33 | api = cloud.get_api() 34 | 35 | def teardown_module(module): 36 | pass 37 | 38 | def setup_function(function): 39 | pass 40 | 41 | def teardown_function(function): 42 | pass 43 | 44 | def test_type_filtering(): 45 | global api 46 | images = api.image_list('permanent') 47 | for image in images: 48 | if image.name == 'default image': 49 | raise Exception('transient image visible in permanent list') 50 | 51 | images = api.image_list('transient') 52 | for image in images: 53 | if image.name == 'permanent image': 54 | raise Exception('permanent image visible in transient images') 55 | 56 | 57 | def test_type_filtering(): 58 | global api 59 | images = api.image_list('permanent', 'public') 60 | for image in images: 61 | if image.name == 'default image': 62 | raise Exception('private image is visible in public image list') 63 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0008_vpn_create_delete.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | import time 24 | 25 | api = None 26 | cloud = None 27 | vpn = None 28 | 29 | 30 | def setup_module(module): 31 | global cloud 32 | global api 33 | cloud = Cloud(settings.address, settings.login, settings.password) 34 | api = cloud.get_api() 35 | 36 | 37 | def teardown_module(module): 38 | pass 39 | 40 | 41 | def setup_function(function): 42 | pass 43 | 44 | 45 | def teardown_function(function): 46 | pass 47 | 48 | 49 | def test_vpn_create(): 50 | global api 51 | global vpn 52 | vpn = api.vpn.create('test') 53 | 54 | def test_vpn_wait(): 55 | global api 56 | global vpn 57 | 58 | n = 0 59 | while n < 60: 60 | vpns = api.vpn.get_list() 61 | for v in vpns: 62 | if v.id == vpn.id: 63 | if v.state == 'running': 64 | return 65 | elif v.state == 'failed': 66 | raise Exception('vpn failed') 67 | else: 68 | time.sleep(1) 69 | n = n+1 70 | 71 | 72 | def test_vpn_delete(): 73 | global api 74 | global vpn 75 | 76 | vpn.delete() -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0008_vpn_extension.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | import time 24 | 25 | api = None 26 | cloud = None 27 | vpn = None 28 | 29 | def setup_module(module): 30 | global cloud 31 | global api 32 | cloud = Cloud(settings.address, settings.login, settings.password) 33 | api = cloud.get_api() 34 | 35 | def teardown_module(module): 36 | pass 37 | 38 | def setup_function(function): 39 | pass 40 | 41 | def teardown_function(function): 42 | pass 43 | 44 | def test_vpn_exists(): 45 | global api 46 | assert hasattr(api, 'vpn') 47 | 48 | 49 | def test_vpn_list(): 50 | global api 51 | api.vpn.get_list() 52 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0008_vpn_get_client_cert.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | import time 24 | 25 | api = None 26 | cloud = None 27 | vpn = None 28 | 29 | 30 | def setup_module(module): 31 | global cloud 32 | global api 33 | cloud = Cloud(settings.address, settings.login, settings.password) 34 | api = cloud.get_api() 35 | 36 | 37 | def teardown_module(module): 38 | pass 39 | 40 | 41 | def setup_function(function): 42 | pass 43 | 44 | 45 | def teardown_function(function): 46 | pass 47 | 48 | 49 | def test_vpn_create(): 50 | global api 51 | global vpn 52 | vpn = api.vpn.create('test') 53 | 54 | def test_vpn_wait(): 55 | global api 56 | global vpn 57 | 58 | n = 0 59 | while n < 60: 60 | vpns = api.vpn.get_list() 61 | for v in vpns: 62 | if v.id == vpn.id: 63 | if v.state == 'running': 64 | return 65 | elif v.state == 'failed': 66 | raise Exception('vpn failed') 67 | else: 68 | time.sleep(1) 69 | n = n+1 70 | 71 | def test_vpn_client_cert(): 72 | global api 73 | global vpn 74 | certs = vpn.client_cert() 75 | assert 'key' in certs 76 | assert 'cert' in certs 77 | assert 'ca_cert' in certs 78 | 79 | def test_vpn_delete(): 80 | global api 81 | global vpn 82 | 83 | vpn.delete() -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0009_coretalk_enable_userdata.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | import time 24 | 25 | api = None 26 | cloud = None 27 | userdata = None 28 | 29 | 30 | def setup_module(module): 31 | global cloud 32 | global api 33 | 34 | cloud = Cloud(settings.address, settings.login, settings.password, debug=True) 35 | api = cloud.get_api() 36 | 37 | 38 | def teardown_module(module): 39 | pass 40 | 41 | 42 | def setup_function(function): 43 | pass 44 | 45 | 46 | def teardown_function(function): 47 | pass 48 | 49 | 50 | def test_userdata_create(): 51 | global api 52 | global userdata 53 | userdata = api.coretalk.userdata_create('test_user_data', 'some data') 54 | 55 | 56 | def test_userdata_list(): 57 | global api 58 | global userdata 59 | 60 | ud_list = api.coretalk.userdata_list() 61 | 62 | assert len(ud_list) >= 1 63 | assert ud_list[0].name == userdata.name 64 | assert ud_list[0].data == userdata.data 65 | 66 | 67 | def test_userdata_edit(): 68 | global api 69 | global userdata 70 | 71 | userdata.edit(name='another_name') 72 | ud_new = api.coretalk.userdata_by_id() 73 | assert ud_new.name == userdata.name 74 | 75 | def test_userdata_delete(): 76 | global userdata 77 | userdata.delete() 78 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0009_coretalk_extension.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | import time 24 | 25 | api = None 26 | cloud = None 27 | vpn = None 28 | 29 | def setup_module(module): 30 | global cloud 31 | global api 32 | cloud = Cloud(settings.address, settings.login, settings.password) 33 | api = cloud.get_api() 34 | 35 | def teardown_module(module): 36 | pass 37 | 38 | def setup_function(function): 39 | pass 40 | 41 | def teardown_function(function): 42 | pass 43 | 44 | def test_coreTalk_exists(): 45 | global api 46 | assert hasattr(api, 'coretalk') 47 | 48 | 49 | def test_coreTalk_list(): 50 | global api 51 | api.coreTalk.get_list() 52 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/0010_coredhcp_extension.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2015 Marta Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | 21 | import settings 22 | from pycore import Cloud 23 | import time 24 | 25 | api = None 26 | cloud = None 27 | vpn = None 28 | 29 | def setup_module(module): 30 | global cloud 31 | global api 32 | cloud = Cloud(settings.address, settings.login, settings.password) 33 | api = cloud.get_api() 34 | 35 | def teardown_module(module): 36 | pass 37 | 38 | def setup_function(function): 39 | pass 40 | 41 | def teardown_function(function): 42 | pass 43 | 44 | def test_coreTalk_exists(): 45 | global api 46 | assert hasattr(api, 'coredhcp') 47 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/1000_common_models_describe.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2015 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | import os 21 | import django 22 | 23 | def setup_module(module): 24 | os.environ['DJANGO_SETTINGS_MODULE'] = 'corecluster.settings' 25 | django.setup() 26 | 27 | def teardown_module(module): 28 | pass 29 | 30 | def setup_function(function): 31 | pass 32 | 33 | def teardown_function(function): 34 | pass 35 | 36 | def test_to_dict(): 37 | from corecluster.models.core.image import Image 38 | assert 'editable' in Image.describe_model() 39 | assert 'serializable' in Image.describe_model() -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/1000_common_models_edit.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2015 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | import os 21 | import django 22 | 23 | def setup_module(module): 24 | os.environ['DJANGO_SETTINGS_MODULE'] = 'corecluster.settings' 25 | django.setup() 26 | 27 | def teardown_module(module): 28 | pass 29 | 30 | def setup_function(function): 31 | pass 32 | 33 | def teardown_function(function): 34 | pass 35 | 36 | 37 | def test_edit_editable(): 38 | from corecluster.models.core.image import Image 39 | t = Image() 40 | t.edit(name='test') 41 | 42 | 43 | def test_edit_non_editable(): 44 | from corecluster.models.core.image import Image 45 | t = Image() 46 | t.id = 'a' 47 | 48 | try: 49 | t.edit(id='test') 50 | except: 51 | pass 52 | 53 | if t.id != 'a': 54 | raise Exception('Model allows to edit non editable field') 55 | 56 | 57 | def test_edit_incorrect_value(): 58 | from corecluster.models.core.image import Image 59 | t = Image() 60 | edited = False 61 | try: 62 | t.edit(name=None) 63 | edited = True 64 | except: 65 | pass 66 | 67 | if edited: 68 | raise Exception('Model allows to edit with incorrect value') 69 | 70 | 71 | def test_edit_non_existing(): 72 | from corecluster.models.core.image import Image 73 | t = Image() 74 | 75 | try: 76 | t.edit(xyz=None) 77 | except: 78 | pass 79 | 80 | if hasattr(t, 'xyz'): 81 | raise Exception('Model allows to edit non existing field') -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/1000_common_models_set_prop.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2015 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | import os 21 | import django 22 | 23 | def setup_module(module): 24 | os.environ['DJANGO_SETTINGS_MODULE'] = 'corecluster.settings' 25 | django.setup() 26 | 27 | def teardown_module(module): 28 | pass 29 | 30 | def setup_function(function): 31 | pass 32 | 33 | def teardown_function(function): 34 | pass 35 | 36 | def test_set_prop_cache(): 37 | from corecluster.cache.task import Task 38 | t = Task() 39 | t.set_prop('x', 1) 40 | t.set_prop('y', 2) 41 | assert t.get_prop('x') == 1 42 | assert t.get_prop('y') == 2 43 | 44 | t.set_all_props({'a': 1, 'b': 2}) 45 | props = t.get_all_props() 46 | assert 'a' in props 47 | assert 'b' in props 48 | assert 'x' not in props 49 | assert 'y' not in props 50 | 51 | 52 | def test_set_prop_model(): 53 | from corecluster.models.core.image import Image 54 | t = Image() 55 | t.set_prop('x', 1) 56 | t.set_prop('y', 2) 57 | assert t.get_prop('x') == 1 58 | assert t.get_prop('y') == 2 59 | 60 | t.set_all_props({'a': 1, 'b': 2}) 61 | props = t.get_all_props() 62 | assert 'a' in props 63 | assert 'b' in props 64 | assert 'x' not in props 65 | assert 'y' not in props 66 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/1000_common_models_to_dict.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2015 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | import os 21 | import django 22 | 23 | def setup_module(module): 24 | os.environ['DJANGO_SETTINGS_MODULE'] = 'corecluster.settings' 25 | django.setup() 26 | 27 | 28 | def teardown_module(module): 29 | pass 30 | 31 | def setup_function(function): 32 | pass 33 | 34 | def teardown_function(function): 35 | pass 36 | 37 | def test_to_dict_cache(): 38 | from corecluster.cache.task import Task 39 | t = Task() 40 | t.set_prop('x', 1) 41 | t.set_prop('y', 2) 42 | d = t.to_dict 43 | assert 'data' in d 44 | assert 'type' in d 45 | assert 'action' in d 46 | 47 | 48 | def test_to_dict_model(): 49 | from corecluster.models.core import Image 50 | t = Image() 51 | t.set_prop('x', 1) 52 | t.set_prop('y', 2) 53 | d = t.to_dict 54 | assert 'data' in d 55 | assert 'type' in d 56 | assert 'access' in d -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Lib/site-packages/tests/__init__.py -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/settings.py: -------------------------------------------------------------------------------- 1 | import os 2 | login = os.environ['OC_LOGIN'] 3 | password = os.environ['OC_PASSWD'] 4 | email = os.environ['OC_EMAIL'] 5 | name = os.environ['OC_NAME'] 6 | surname = os.environ['OC_SURNAME'] 7 | 8 | address = os.environ['OC_ADDRESS'] 9 | 10 | additional_login = os.environ['OC_ADDITIONAL_LOGIN'] 11 | additional_password = os.environ['OC_ADDITIONAL_PASSWD'] 12 | additional_email = os.environ['OC_ADDITIONAL_EMAIL'] 13 | additional_name = os.environ['OC_ADDITIONAL_NAME'] 14 | additional_surname = os.environ['OC_ADDITIONAL_SURNAME'] 15 | 16 | admin_name = os.environ['OC_ADMIN_NAME'] 17 | admin_passwd = os.environ['OC_ADMIN_PASSWD'] 18 | 19 | # Space separated node addresses 20 | nodes = os.environ['OC_NODES'].split(' ') 21 | 22 | # Space separated storage addresses (with /storage export over nfs) 23 | storages = os.environ['OC_STORAGES'].split(' ') -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/settings_m.py: -------------------------------------------------------------------------------- 1 | login = 'm' 2 | password = 'm' 3 | email = 'm@m.pl' 4 | name = 'm' 5 | surname = 'm' 6 | 7 | address = 'http://192.245.169.152:8000/' 8 | 9 | 10 | additional_login = 'q' 11 | additional_password = 'q' 12 | additional_email = 'q@q.pl' 13 | additional_name = 'q' 14 | additional_surname = 'q' 15 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/tests/testutils.py: -------------------------------------------------------------------------------- 1 | """ 2 | Copyright (c) 2014-2015 Maciej Nabozny 3 | 4 | This file is part of CloudOver project. 5 | 6 | CloudOver is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation, either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | """ 19 | 20 | import subprocess 21 | 22 | def ssh_call(hostname, username, command, expect_code=None): 23 | p = subprocess.Popen(['ssh', '%s@%s' % (username, hostname), command], stdout=subprocess.PIPE, stderr=subprocess.PIPE) 24 | p.wait() 25 | stdout = p.stdout.read() 26 | stderr = p.stderr.read() 27 | print '%s@%s' % (username, hostname) + ": " + command + ": " + stdout 28 | 29 | if expect_code != None and p.returncode != expect_code: 30 | print "STDOUT: " + stdout 31 | print "##################" 32 | print "STDERR: " + stderr 33 | print "##################" 34 | raise Exception('command %s failed' % command) 35 | 36 | return (p.returncode, stdout, stderr) 37 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/toml-0.10.2.dist-info/INSTALLER: -------------------------------------------------------------------------------- 1 | pip 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/toml-0.10.2.dist-info/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright 2013-2019 William Pearson 4 | Copyright 2015-2016 Julien Enselme 5 | Copyright 2016 Google Inc. 6 | Copyright 2017 Samuel Vasko 7 | Copyright 2017 Nate Prewitt 8 | Copyright 2017 Jack Evans 9 | Copyright 2019 Filippo Broggini 10 | 11 | Permission is hereby granted, free of charge, to any person obtaining a copy 12 | of this software and associated documentation files (the "Software"), to deal 13 | in the Software without restriction, including without limitation the rights 14 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 15 | copies of the Software, and to permit persons to whom the Software is 16 | furnished to do so, subject to the following conditions: 17 | 18 | The above copyright notice and this permission notice shall be included in 19 | all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 22 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 24 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 | THE SOFTWARE. -------------------------------------------------------------------------------- /venv/Lib/site-packages/toml-0.10.2.dist-info/RECORD: -------------------------------------------------------------------------------- 1 | toml-0.10.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 2 | toml-0.10.2.dist-info/LICENSE,sha256=LZKUgj32yJNXyL5JJ_znk2HWVh5e51MtWSbmOTmqpTY,1252 3 | toml-0.10.2.dist-info/METADATA,sha256=n_YkspvEihd_QXLIZZ50WVSFz3rZ_k7jQP-OU1WUpWY,7142 4 | toml-0.10.2.dist-info/RECORD,, 5 | toml-0.10.2.dist-info/WHEEL,sha256=ADKeyaGyKF5DwBNE0sRE5pvW-bSkFMJfBuhzZ3rceP4,110 6 | toml-0.10.2.dist-info/top_level.txt,sha256=2BO8ZRNnvJWgXyiQv66LBb_v87qBzcoUtEBefA75Ouk,5 7 | toml/__init__.py,sha256=Au3kqCwKD0cjbf4yJGOpUFwpsY0WHsC1ZRGvWgIKmpc,723 8 | toml/__pycache__/__init__.cpython-37.pyc,, 9 | toml/__pycache__/decoder.cpython-37.pyc,, 10 | toml/__pycache__/encoder.cpython-37.pyc,, 11 | toml/__pycache__/ordered.cpython-37.pyc,, 12 | toml/__pycache__/tz.cpython-37.pyc,, 13 | toml/decoder.py,sha256=hSGTLf-2WBDZ_ddoCHWFy6N647XyMSh1o3rN2o4dEFg,38942 14 | toml/encoder.py,sha256=XjBc8ayvvlsLyd_qDA4tMWDNmMFRS4DpwtuDSWBq7zo,9940 15 | toml/ordered.py,sha256=mz03lZmV0bmc9lsYRIUOuj7Dsu5Ptwq-UtGVq5FdVZ4,354 16 | toml/tz.py,sha256=-5vg8wkg_atnVi2TnEveexIVE7T_FxBVr_-2WVfO1oA,701 17 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/toml-0.10.2.dist-info/WHEEL: -------------------------------------------------------------------------------- 1 | Wheel-Version: 1.0 2 | Generator: bdist_wheel (0.35.1) 3 | Root-Is-Purelib: true 4 | Tag: py2-none-any 5 | Tag: py3-none-any 6 | 7 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/toml-0.10.2.dist-info/top_level.txt: -------------------------------------------------------------------------------- 1 | toml 2 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/toml/__init__.py: -------------------------------------------------------------------------------- 1 | """Python module which parses and emits TOML. 2 | 3 | Released under the MIT license. 4 | """ 5 | 6 | from toml import encoder 7 | from toml import decoder 8 | 9 | __version__ = "0.10.2" 10 | _spec_ = "0.5.0" 11 | 12 | load = decoder.load 13 | loads = decoder.loads 14 | TomlDecoder = decoder.TomlDecoder 15 | TomlDecodeError = decoder.TomlDecodeError 16 | TomlPreserveCommentDecoder = decoder.TomlPreserveCommentDecoder 17 | 18 | dump = encoder.dump 19 | dumps = encoder.dumps 20 | TomlEncoder = encoder.TomlEncoder 21 | TomlArraySeparatorEncoder = encoder.TomlArraySeparatorEncoder 22 | TomlPreserveInlineDictEncoder = encoder.TomlPreserveInlineDictEncoder 23 | TomlNumpyEncoder = encoder.TomlNumpyEncoder 24 | TomlPreserveCommentEncoder = encoder.TomlPreserveCommentEncoder 25 | TomlPathlibEncoder = encoder.TomlPathlibEncoder 26 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/toml/ordered.py: -------------------------------------------------------------------------------- 1 | from collections import OrderedDict 2 | from toml import TomlEncoder 3 | from toml import TomlDecoder 4 | 5 | 6 | class TomlOrderedDecoder(TomlDecoder): 7 | 8 | def __init__(self): 9 | super(self.__class__, self).__init__(_dict=OrderedDict) 10 | 11 | 12 | class TomlOrderedEncoder(TomlEncoder): 13 | 14 | def __init__(self): 15 | super(self.__class__, self).__init__(_dict=OrderedDict) 16 | -------------------------------------------------------------------------------- /venv/Lib/site-packages/toml/tz.py: -------------------------------------------------------------------------------- 1 | from datetime import tzinfo, timedelta 2 | 3 | 4 | class TomlTz(tzinfo): 5 | def __init__(self, toml_offset): 6 | if toml_offset == "Z": 7 | self._raw_offset = "+00:00" 8 | else: 9 | self._raw_offset = toml_offset 10 | self._sign = -1 if self._raw_offset[0] == '-' else 1 11 | self._hours = int(self._raw_offset[1:3]) 12 | self._minutes = int(self._raw_offset[4:6]) 13 | 14 | def __deepcopy__(self, memo): 15 | return self.__class__(self._raw_offset) 16 | 17 | def tzname(self, dt): 18 | return "UTC" + self._raw_offset 19 | 20 | def utcoffset(self, dt): 21 | return self._sign * timedelta(hours=self._hours, minutes=self._minutes) 22 | 23 | def dst(self, dt): 24 | return timedelta(0) 25 | -------------------------------------------------------------------------------- /venv/Scripts/Activate.ps1: -------------------------------------------------------------------------------- 1 | function global:deactivate ([switch]$NonDestructive) { 2 | # Revert to original values 3 | if (Test-Path function:_OLD_VIRTUAL_PROMPT) { 4 | copy-item function:_OLD_VIRTUAL_PROMPT function:prompt 5 | remove-item function:_OLD_VIRTUAL_PROMPT 6 | } 7 | 8 | if (Test-Path env:_OLD_VIRTUAL_PYTHONHOME) { 9 | copy-item env:_OLD_VIRTUAL_PYTHONHOME env:PYTHONHOME 10 | remove-item env:_OLD_VIRTUAL_PYTHONHOME 11 | } 12 | 13 | if (Test-Path env:_OLD_VIRTUAL_PATH) { 14 | copy-item env:_OLD_VIRTUAL_PATH env:PATH 15 | remove-item env:_OLD_VIRTUAL_PATH 16 | } 17 | 18 | if (Test-Path env:VIRTUAL_ENV) { 19 | remove-item env:VIRTUAL_ENV 20 | } 21 | 22 | if (!$NonDestructive) { 23 | # Self destruct! 24 | remove-item function:deactivate 25 | } 26 | } 27 | 28 | deactivate -nondestructive 29 | 30 | $env:VIRTUAL_ENV="E:\04_科研\01_python\GestureVolumeControl\venv" 31 | 32 | if (! $env:VIRTUAL_ENV_DISABLE_PROMPT) { 33 | # Set the prompt to include the env name 34 | # Make sure _OLD_VIRTUAL_PROMPT is global 35 | function global:_OLD_VIRTUAL_PROMPT {""} 36 | copy-item function:prompt function:_OLD_VIRTUAL_PROMPT 37 | function global:prompt { 38 | Write-Host -NoNewline -ForegroundColor Green '(venv) ' 39 | _OLD_VIRTUAL_PROMPT 40 | } 41 | } 42 | 43 | # Clear PYTHONHOME 44 | if (Test-Path env:PYTHONHOME) { 45 | copy-item env:PYTHONHOME env:_OLD_VIRTUAL_PYTHONHOME 46 | remove-item env:PYTHONHOME 47 | } 48 | 49 | # Add the venv to the PATH 50 | copy-item env:PATH env:_OLD_VIRTUAL_PATH 51 | $env:PATH = "$env:VIRTUAL_ENV\Scripts;$env:PATH" 52 | -------------------------------------------------------------------------------- /venv/Scripts/activate: -------------------------------------------------------------------------------- 1 | # This file must be used with "source bin/activate" *from bash* 2 | # you cannot run it directly 3 | 4 | deactivate () { 5 | # reset old environment variables 6 | if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then 7 | PATH="${_OLD_VIRTUAL_PATH:-}" 8 | export PATH 9 | unset _OLD_VIRTUAL_PATH 10 | fi 11 | if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then 12 | PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" 13 | export PYTHONHOME 14 | unset _OLD_VIRTUAL_PYTHONHOME 15 | fi 16 | 17 | # This should detect bash and zsh, which have a hash command that must 18 | # be called to get it to forget past commands. Without forgetting 19 | # past commands the $PATH changes we made may not be respected 20 | if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then 21 | hash -r 22 | fi 23 | 24 | if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then 25 | PS1="${_OLD_VIRTUAL_PS1:-}" 26 | export PS1 27 | unset _OLD_VIRTUAL_PS1 28 | fi 29 | 30 | unset VIRTUAL_ENV 31 | if [ ! "${1:-}" = "nondestructive" ] ; then 32 | # Self destruct! 33 | unset -f deactivate 34 | fi 35 | } 36 | 37 | # unset irrelevant variables 38 | deactivate nondestructive 39 | 40 | VIRTUAL_ENV="E:\04_科研\01_python\GestureVolumeControl\venv" 41 | export VIRTUAL_ENV 42 | 43 | _OLD_VIRTUAL_PATH="$PATH" 44 | PATH="$VIRTUAL_ENV/Scripts:$PATH" 45 | export PATH 46 | 47 | # unset PYTHONHOME if set 48 | # this will fail if PYTHONHOME is set to the empty string (which is bad anyway) 49 | # could use `if (set -u; : $PYTHONHOME) ;` in bash 50 | if [ -n "${PYTHONHOME:-}" ] ; then 51 | _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" 52 | unset PYTHONHOME 53 | fi 54 | 55 | if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then 56 | _OLD_VIRTUAL_PS1="${PS1:-}" 57 | if [ "x(venv) " != x ] ; then 58 | PS1="(venv) ${PS1:-}" 59 | else 60 | if [ "`basename \"$VIRTUAL_ENV\"`" = "__" ] ; then 61 | # special case for Aspen magic directories 62 | # see http://www.zetadev.com/software/aspen/ 63 | PS1="[`basename \`dirname \"$VIRTUAL_ENV\"\``] $PS1" 64 | else 65 | PS1="(`basename \"$VIRTUAL_ENV\"`)$PS1" 66 | fi 67 | fi 68 | export PS1 69 | fi 70 | 71 | # This should detect bash and zsh, which have a hash command that must 72 | # be called to get it to forget past commands. Without forgetting 73 | # past commands the $PATH changes we made may not be respected 74 | if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then 75 | hash -r 76 | fi 77 | -------------------------------------------------------------------------------- /venv/Scripts/activate.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem This file is UTF-8 encoded, so we need to update the current code page while executing it 4 | for /f "tokens=2 delims=:." %%a in ('"%SystemRoot%\System32\chcp.com"') do ( 5 | set _OLD_CODEPAGE=%%a 6 | ) 7 | if defined _OLD_CODEPAGE ( 8 | "%SystemRoot%\System32\chcp.com" 65001 > nul 9 | ) 10 | 11 | set VIRTUAL_ENV=E:\04_科研\01_python\GestureVolumeControl\venv 12 | 13 | if not defined PROMPT set PROMPT=$P$G 14 | 15 | if defined _OLD_VIRTUAL_PROMPT set PROMPT=%_OLD_VIRTUAL_PROMPT% 16 | if defined _OLD_VIRTUAL_PYTHONHOME set PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME% 17 | 18 | set _OLD_VIRTUAL_PROMPT=%PROMPT% 19 | set PROMPT=(venv) %PROMPT% 20 | 21 | if defined PYTHONHOME set _OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME% 22 | set PYTHONHOME= 23 | 24 | if defined _OLD_VIRTUAL_PATH set PATH=%_OLD_VIRTUAL_PATH% 25 | if not defined _OLD_VIRTUAL_PATH set _OLD_VIRTUAL_PATH=%PATH% 26 | 27 | set PATH=%VIRTUAL_ENV%\Scripts;%PATH% 28 | 29 | :END 30 | if defined _OLD_CODEPAGE ( 31 | "%SystemRoot%\System32\chcp.com" %_OLD_CODEPAGE% > nul 32 | set _OLD_CODEPAGE= 33 | ) 34 | -------------------------------------------------------------------------------- /venv/Scripts/coverage-3.7.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Scripts/coverage-3.7.exe -------------------------------------------------------------------------------- /venv/Scripts/coverage.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Scripts/coverage.exe -------------------------------------------------------------------------------- /venv/Scripts/coverage3.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Scripts/coverage3.exe -------------------------------------------------------------------------------- /venv/Scripts/deactivate.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | if defined _OLD_VIRTUAL_PROMPT ( 4 | set "PROMPT=%_OLD_VIRTUAL_PROMPT%" 5 | ) 6 | set _OLD_VIRTUAL_PROMPT= 7 | 8 | if defined _OLD_VIRTUAL_PYTHONHOME ( 9 | set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%" 10 | set _OLD_VIRTUAL_PYTHONHOME= 11 | ) 12 | 13 | if defined _OLD_VIRTUAL_PATH ( 14 | set "PATH=%_OLD_VIRTUAL_PATH%" 15 | ) 16 | 17 | set _OLD_VIRTUAL_PATH= 18 | 19 | set VIRTUAL_ENV= 20 | 21 | :END 22 | -------------------------------------------------------------------------------- /venv/Scripts/py.test.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Scripts/py.test.exe -------------------------------------------------------------------------------- /venv/Scripts/pytest.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Scripts/pytest.exe -------------------------------------------------------------------------------- /venv/Scripts/python.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dongdada896/GestureVolumeControl/d7f734eaacc8ccbde72c7b3735f997c50898b277/venv/Scripts/python.exe -------------------------------------------------------------------------------- /venv/pyvenv.cfg: -------------------------------------------------------------------------------- 1 | home = D:\ProgramData\Anaconda3\envs\py37 2 | include-system-site-packages = true 3 | version = 3.7.8 4 | --------------------------------------------------------------------------------