├── venv
├── Lib
│ └── site-packages
│ │ ├── pip-9.0.1-py3.6.egg
│ │ ├── EGG-INFO
│ │ │ ├── not-zip-safe
│ │ │ ├── top_level.txt
│ │ │ ├── dependency_links.txt
│ │ │ ├── entry_points.txt
│ │ │ ├── requires.txt
│ │ │ └── PKG-INFO
│ │ └── pip
│ │ │ ├── operations
│ │ │ ├── __init__.py
│ │ │ └── check.py
│ │ │ ├── _vendor
│ │ │ ├── html5lib
│ │ │ │ ├── filters
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── base.py
│ │ │ │ │ ├── alphabeticalattributes.py
│ │ │ │ │ ├── whitespace.py
│ │ │ │ │ └── inject_meta_charset.py
│ │ │ │ ├── treeadapters
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── genshi.py
│ │ │ │ │ └── sax.py
│ │ │ │ ├── _trie
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── _base.py
│ │ │ │ │ ├── datrie.py
│ │ │ │ │ └── py.py
│ │ │ │ ├── __init__.py
│ │ │ │ └── treewalkers
│ │ │ │ │ ├── dom.py
│ │ │ │ │ └── genshi.py
│ │ │ ├── requests
│ │ │ │ ├── packages
│ │ │ │ │ ├── urllib3
│ │ │ │ │ │ ├── contrib
│ │ │ │ │ │ │ └── __init__.py
│ │ │ │ │ │ ├── packages
│ │ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ │ └── ssl_match_hostname
│ │ │ │ │ │ │ │ └── __init__.py
│ │ │ │ │ │ ├── util
│ │ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ │ ├── request.py
│ │ │ │ │ │ │ └── response.py
│ │ │ │ │ │ └── filepost.py
│ │ │ │ │ ├── chardet
│ │ │ │ │ │ ├── compat.py
│ │ │ │ │ │ ├── __init__.py
│ │ │ │ │ │ ├── constants.py
│ │ │ │ │ │ ├── euctwprober.py
│ │ │ │ │ │ ├── euckrprober.py
│ │ │ │ │ │ ├── gb2312prober.py
│ │ │ │ │ │ ├── big5prober.py
│ │ │ │ │ │ ├── cp949prober.py
│ │ │ │ │ │ ├── charsetprober.py
│ │ │ │ │ │ ├── mbcsgroupprober.py
│ │ │ │ │ │ ├── codingstatemachine.py
│ │ │ │ │ │ ├── chardetect.py
│ │ │ │ │ │ └── utf8prober.py
│ │ │ │ │ └── __init__.py
│ │ │ │ ├── certs.py
│ │ │ │ ├── hooks.py
│ │ │ │ ├── compat.py
│ │ │ │ └── __init__.py
│ │ │ ├── distlib
│ │ │ │ ├── t32.exe
│ │ │ │ ├── t64.exe
│ │ │ │ ├── w32.exe
│ │ │ │ ├── w64.exe
│ │ │ │ ├── _backport
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── misc.py
│ │ │ │ │ └── sysconfig.cfg
│ │ │ │ └── __init__.py
│ │ │ ├── colorama
│ │ │ │ ├── __init__.py
│ │ │ │ ├── initialise.py
│ │ │ │ └── ansi.py
│ │ │ ├── cachecontrol
│ │ │ │ ├── __init__.py
│ │ │ │ ├── caches
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ └── redis_cache.py
│ │ │ │ ├── compat.py
│ │ │ │ ├── wrapper.py
│ │ │ │ ├── cache.py
│ │ │ │ ├── _cmd.py
│ │ │ │ └── filewrapper.py
│ │ │ ├── packaging
│ │ │ │ ├── utils.py
│ │ │ │ ├── __init__.py
│ │ │ │ ├── __about__.py
│ │ │ │ ├── _compat.py
│ │ │ │ └── _structures.py
│ │ │ ├── re-vendor.py
│ │ │ ├── progress
│ │ │ │ ├── spinner.py
│ │ │ │ ├── counter.py
│ │ │ │ └── bar.py
│ │ │ ├── webencodings
│ │ │ │ └── mklabels.py
│ │ │ └── lockfile
│ │ │ │ ├── symlinklockfile.py
│ │ │ │ └── linklockfile.py
│ │ │ ├── models
│ │ │ ├── __init__.py
│ │ │ └── index.py
│ │ │ ├── status_codes.py
│ │ │ ├── utils
│ │ │ ├── setuptools_build.py
│ │ │ ├── filesystem.py
│ │ │ ├── encoding.py
│ │ │ ├── build.py
│ │ │ ├── packaging.py
│ │ │ └── deprecation.py
│ │ │ ├── req
│ │ │ └── __init__.py
│ │ │ ├── __main__.py
│ │ │ └── commands
│ │ │ ├── help.py
│ │ │ ├── check.py
│ │ │ ├── hash.py
│ │ │ ├── __init__.py
│ │ │ ├── completion.py
│ │ │ ├── uninstall.py
│ │ │ └── freeze.py
│ │ ├── setuptools.pth
│ │ ├── easy-install.pth
│ │ └── setuptools-28.8.0-py3.6.egg
├── Scripts
│ ├── pip.exe
│ ├── _bz2.pyd
│ ├── _lzma.pyd
│ ├── _msi.pyd
│ ├── _ssl.pyd
│ ├── pip3.exe
│ ├── tk86t.dll
│ ├── _asyncio.pyd
│ ├── _ctypes.pyd
│ ├── _decimal.pyd
│ ├── _hashlib.pyd
│ ├── _socket.pyd
│ ├── _sqlite3.pyd
│ ├── _tkinter.pyd
│ ├── pip3.6.exe
│ ├── pyexpat.pyd
│ ├── python.exe
│ ├── python3.dll
│ ├── python36.dll
│ ├── pythonw.exe
│ ├── select.pyd
│ ├── sqlite3.dll
│ ├── tcl86t.dll
│ ├── winsound.pyd
│ ├── _testcapi.pyd
│ ├── _ctypes_test.pyd
│ ├── _elementtree.pyd
│ ├── _overlapped.pyd
│ ├── _testbuffer.pyd
│ ├── _testconsole.pyd
│ ├── easy_install.exe
│ ├── unicodedata.pyd
│ ├── vcruntime140.dll
│ ├── _testmultiphase.pyd
│ ├── _distutils_findvs.pyd
│ ├── _multiprocessing.pyd
│ ├── easy_install-3.6.exe
│ ├── _testimportmultiple.pyd
│ ├── deactivate.bat
│ ├── pip-script.py
│ ├── pip3-script.py
│ ├── pip3.6-script.py
│ ├── easy_install-script.py
│ ├── easy_install-3.6-script.py
│ ├── pip.exe.manifest
│ ├── pip3.exe.manifest
│ ├── pip3.6.exe.manifest
│ ├── easy_install.exe.manifest
│ ├── easy_install-3.6.exe.manifest
│ ├── activate.bat
│ ├── Activate.ps1
│ └── activate
└── pyvenv.cfg
├── __pycache__
├── check.cpython-35.pyc
├── check.cpython-36.pyc
├── cover.cpython-35.pyc
├── cover.cpython-36.pyc
├── float.cpython-35.pyc
├── float.cpython-36.pyc
├── main.cpython-35.pyc
├── CONFIG.cpython-35.pyc
├── CONFIG.cpython-36.pyc
├── classKQ.cpython-36.pyc
├── faceid.cpython-35.pyc
├── faceid2.cpython-35.pyc
├── faceid2.cpython-36.pyc
├── repair.cpython-35.pyc
├── repair.cpython-36.pyc
├── facecheck.cpython-35.pyc
├── facecheck.cpython-36.pyc
├── lost_write.cpython-35.pyc
├── lost_write.cpython-36.pyc
├── classCheck2.cpython-35.pyc
├── classCheck2.cpython-36.pyc
├── classKQSINGLE.cpython-35.pyc
├── classKQSINGLE.cpython-36.pyc
├── classKQsearch.cpython-35.pyc
├── classKQsearch.cpython-36.pyc
├── face_captest.cpython-35.pyc
├── face_captest.cpython-36.pyc
├── face_search.cpython-35.pyc
├── face_search.cpython-36.pyc
├── grade_login.cpython-35.pyc
├── grade_login.cpython-36.pyc
├── lessoncheck.cpython-35.pyc
├── lessoncheck.cpython-36.pyc
├── lost_detail.cpython-35.pyc
├── lost_detail.cpython-36.pyc
├── lost_object.cpython-35.pyc
├── lost_object.cpython-36.pyc
├── lost_search.cpython-35.pyc
├── lost_search.cpython-36.pyc
├── mainwindow2.cpython-35.pyc
└── mainwindow2.cpython-36.pyc
├── .idea
├── misc.xml
├── modules.xml
└── tiaozhanbei.iml
├── ostest.py
├── CONFIG.py
├── captest.py
├── timetest.py
├── test2.py
├── classKQsearch.py
├── facecheck.py
├── faceid.py
├── faceid2.py
├── qttest.py
├── grade_check.ui
├── cover.ui
├── face_search.py
├── classKQ.py
├── float.ui
├── lost_object.ui
├── facev3api_example.py
├── classKQSINGLE.py
├── classCheck.py
├── classCheck2.py
├── float.py
├── 123123.py
├── grade_login.ui
└── face_captest.py
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/EGG-INFO/not-zip-safe:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/EGG-INFO/top_level.txt:
--------------------------------------------------------------------------------
1 | pip
2 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/operations/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/setuptools.pth:
--------------------------------------------------------------------------------
1 | ./setuptools-28.8.0-py3.6.egg
2 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/EGG-INFO/dependency_links.txt:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/html5lib/filters/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/venv/Scripts/pip.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/pip.exe
--------------------------------------------------------------------------------
/venv/pyvenv.cfg:
--------------------------------------------------------------------------------
1 | home = G:\python
2 | include-system-site-packages = false
3 | version = 3.6.5
4 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/easy-install.pth:
--------------------------------------------------------------------------------
1 | ./setuptools-28.8.0-py3.6.egg
2 | ./pip-9.0.1-py3.6.egg
3 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/urllib3/contrib/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/venv/Scripts/_bz2.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_bz2.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_lzma.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_lzma.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_msi.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_msi.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_ssl.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_ssl.pyd
--------------------------------------------------------------------------------
/venv/Scripts/pip3.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/pip3.exe
--------------------------------------------------------------------------------
/venv/Scripts/tk86t.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/tk86t.dll
--------------------------------------------------------------------------------
/venv/Scripts/_asyncio.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_asyncio.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_ctypes.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_ctypes.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_decimal.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_decimal.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_hashlib.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_hashlib.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_socket.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_socket.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_sqlite3.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_sqlite3.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_tkinter.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_tkinter.pyd
--------------------------------------------------------------------------------
/venv/Scripts/pip3.6.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/pip3.6.exe
--------------------------------------------------------------------------------
/venv/Scripts/pyexpat.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/pyexpat.pyd
--------------------------------------------------------------------------------
/venv/Scripts/python.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/python.exe
--------------------------------------------------------------------------------
/venv/Scripts/python3.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/python3.dll
--------------------------------------------------------------------------------
/venv/Scripts/python36.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/python36.dll
--------------------------------------------------------------------------------
/venv/Scripts/pythonw.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/pythonw.exe
--------------------------------------------------------------------------------
/venv/Scripts/select.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/select.pyd
--------------------------------------------------------------------------------
/venv/Scripts/sqlite3.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/sqlite3.dll
--------------------------------------------------------------------------------
/venv/Scripts/tcl86t.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/tcl86t.dll
--------------------------------------------------------------------------------
/venv/Scripts/winsound.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/winsound.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_testcapi.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_testcapi.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_ctypes_test.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_ctypes_test.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_elementtree.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_elementtree.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_overlapped.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_overlapped.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_testbuffer.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_testbuffer.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_testconsole.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_testconsole.pyd
--------------------------------------------------------------------------------
/venv/Scripts/easy_install.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/easy_install.exe
--------------------------------------------------------------------------------
/venv/Scripts/unicodedata.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/unicodedata.pyd
--------------------------------------------------------------------------------
/venv/Scripts/vcruntime140.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/vcruntime140.dll
--------------------------------------------------------------------------------
/__pycache__/check.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/check.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/check.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/check.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/cover.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/cover.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/cover.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/cover.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/float.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/float.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/float.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/float.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/main.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/main.cpython-35.pyc
--------------------------------------------------------------------------------
/venv/Scripts/_testmultiphase.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_testmultiphase.pyd
--------------------------------------------------------------------------------
/__pycache__/CONFIG.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/CONFIG.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/CONFIG.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/CONFIG.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/classKQ.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/classKQ.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/faceid.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/faceid.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/faceid2.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/faceid2.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/faceid2.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/faceid2.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/repair.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/repair.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/repair.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/repair.cpython-36.pyc
--------------------------------------------------------------------------------
/venv/Scripts/_distutils_findvs.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_distutils_findvs.pyd
--------------------------------------------------------------------------------
/venv/Scripts/_multiprocessing.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_multiprocessing.pyd
--------------------------------------------------------------------------------
/venv/Scripts/easy_install-3.6.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/easy_install-3.6.exe
--------------------------------------------------------------------------------
/__pycache__/facecheck.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/facecheck.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/facecheck.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/facecheck.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/lost_write.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/lost_write.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/lost_write.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/lost_write.cpython-36.pyc
--------------------------------------------------------------------------------
/venv/Scripts/_testimportmultiple.pyd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Scripts/_testimportmultiple.pyd
--------------------------------------------------------------------------------
/__pycache__/classCheck2.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/classCheck2.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/classCheck2.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/classCheck2.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/classKQSINGLE.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/classKQSINGLE.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/classKQSINGLE.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/classKQSINGLE.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/classKQsearch.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/classKQsearch.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/classKQsearch.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/classKQsearch.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/face_captest.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/face_captest.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/face_captest.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/face_captest.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/face_search.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/face_search.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/face_search.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/face_search.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/grade_login.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/grade_login.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/grade_login.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/grade_login.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/lessoncheck.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/lessoncheck.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/lessoncheck.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/lessoncheck.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/lost_detail.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/lost_detail.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/lost_detail.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/lost_detail.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/lost_object.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/lost_object.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/lost_object.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/lost_object.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/lost_search.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/lost_search.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/lost_search.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/lost_search.cpython-36.pyc
--------------------------------------------------------------------------------
/__pycache__/mainwindow2.cpython-35.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/mainwindow2.cpython-35.pyc
--------------------------------------------------------------------------------
/__pycache__/mainwindow2.cpython-36.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/__pycache__/mainwindow2.cpython-36.pyc
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/models/__init__.py:
--------------------------------------------------------------------------------
1 | from pip.models.index import Index, PyPI
2 |
3 |
4 | __all__ = ["Index", "PyPI"]
5 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/EGG-INFO/entry_points.txt:
--------------------------------------------------------------------------------
1 | [console_scripts]
2 | pip = pip:main
3 | pip3 = pip:main
4 | pip3.6 = pip:main
5 |
6 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/EGG-INFO/requires.txt:
--------------------------------------------------------------------------------
1 |
2 | [testing]
3 | pytest
4 | virtualenv>=1.10
5 | scripttest>=1.3
6 | mock
7 | pretend
8 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/setuptools-28.8.0-py3.6.egg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Lib/site-packages/setuptools-28.8.0-py3.6.egg
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/distlib/t32.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/distlib/t32.exe
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/distlib/t64.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/distlib/t64.exe
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/distlib/w32.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/distlib/w32.exe
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/distlib/w64.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Busa-yifan/smart-class/HEAD/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/distlib/w64.exe
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/urllib3/packages/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | from . import ssl_match_hostname
4 |
5 | __all__ = ('ssl_match_hostname', )
6 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/status_codes.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | SUCCESS = 0
4 | ERROR = 1
5 | UNKNOWN_ERROR = 2
6 | VIRTUALENV_NOT_FOUND = 3
7 | PREVIOUS_BUILD_DIR_ERROR = 4
8 | NO_MATCHES_FOUND = 23
9 |
--------------------------------------------------------------------------------
/ostest.py:
--------------------------------------------------------------------------------
1 | import os
2 | path = "G:/test/tiaozhanbeitest"
3 | files = os.listdir(path)
4 | files_count = 0
5 | for i in files:
6 | if os.path.isfile(os.path.join(path, i)):
7 | files_count += 1
8 | imgurl = str(files_count+1)+".jpg"
9 | print(imgurl)
10 |
11 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CONFIG.py:
--------------------------------------------------------------------------------
1 | #本地服务器
2 | #host = "127.0.0.1"
3 | #hostps = "feng"
4 |
5 |
6 |
7 | #云服务器
8 | host = "119.29.173.243"
9 | hostps = "fengyuancheng"
10 | classroomNO = "钟海楼03021"
11 |
12 | #摄像头参数
13 | capnum = 0
14 |
15 |
16 | access_token = "24.9d413f75255e6d26ce547e32b8feeef5.2592000.1562116170.282335-14263486"
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/colorama/__init__.py:
--------------------------------------------------------------------------------
1 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
2 | from .initialise import init, deinit, reinit, colorama_text
3 | from .ansi import Fore, Back, Style, Cursor
4 | from .ansitowin32 import AnsiToWin32
5 |
6 | __version__ = '0.3.7'
7 |
8 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/html5lib/treeadapters/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from . import sax
4 |
5 | __all__ = ["sax"]
6 |
7 | try:
8 | from . import genshi # noqa
9 | except ImportError:
10 | pass
11 | else:
12 | __all__.append("genshi")
13 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/distlib/_backport/__init__.py:
--------------------------------------------------------------------------------
1 | """Modules copied from Python 3 standard libraries, for internal use only.
2 |
3 | Individual classes and functions are found in d2._backport.misc. Intended
4 | usage is to always import things missing from 3.1 from that module: the
5 | built-in/stdlib objects will be used if found.
6 | """
7 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/utils/setuptools_build.py:
--------------------------------------------------------------------------------
1 | # Shim to wrap setup.py invocation with setuptools
2 | SETUPTOOLS_SHIM = (
3 | "import setuptools, tokenize;__file__=%r;"
4 | "f=getattr(tokenize, 'open', open)(__file__);"
5 | "code=f.read().replace('\\r\\n', '\\n');"
6 | "f.close();"
7 | "exec(compile(code, __file__, 'exec'))"
8 | )
9 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/req/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | from .req_install import InstallRequirement
4 | from .req_set import RequirementSet, Requirements
5 | from .req_file import parse_requirements
6 |
7 | __all__ = [
8 | "RequirementSet", "Requirements", "InstallRequirement",
9 | "parse_requirements",
10 | ]
11 |
--------------------------------------------------------------------------------
/.idea/tiaozhanbei.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/html5lib/filters/base.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 |
4 | class Filter(object):
5 | def __init__(self, source):
6 | self.source = source
7 |
8 | def __iter__(self):
9 | return iter(self.source)
10 |
11 | def __getattr__(self, name):
12 | return getattr(self.source, name)
13 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/cachecontrol/__init__.py:
--------------------------------------------------------------------------------
1 | """CacheControl import Interface.
2 |
3 | Make it easy to import from cachecontrol without long namespaces.
4 | """
5 | __author__ = 'Eric Larson'
6 | __email__ = 'eric@ionrock.org'
7 | __version__ = '0.11.7'
8 |
9 | from .wrapper import CacheControl
10 | from .adapter import CacheControlAdapter
11 | from .controller import CacheController
12 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/html5lib/_trie/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from .py import Trie as PyTrie
4 |
5 | Trie = PyTrie
6 |
7 | # pylint:disable=wrong-import-position
8 | try:
9 | from .datrie import Trie as DATrie
10 | except ImportError:
11 | pass
12 | else:
13 | Trie = DATrie
14 | # pylint:enable=wrong-import-position
15 |
--------------------------------------------------------------------------------
/captest.py:
--------------------------------------------------------------------------------
1 | import cv2
2 | import face_captest
3 |
4 | cap = cv2.VideoCapture(0)
5 |
6 | while(True):
7 | # 获取一帧
8 | ret, frame = cap.read()
9 | cv2.imshow('frame', frame)
10 | cv2.cvtColor(frame, cv2.COLOR_BGR2RGB, frame)
11 | facenum = face_captest.fa_check(frame)
12 | print(facenum)
13 | if cv2.waitKey(1) == ord('q'):
14 | break
15 |
16 | facenum = face_captest.fa_check(frame)
17 | print(facenum)
18 |
--------------------------------------------------------------------------------
/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/pip-script.py:
--------------------------------------------------------------------------------
1 | #!G:\PycharmProjects\tiaozhanbei\venv\Scripts\python.exe
2 | # EASY-INSTALL-ENTRY-SCRIPT: 'pip==9.0.1','console_scripts','pip'
3 | __requires__ = 'pip==9.0.1'
4 | import re
5 | import sys
6 | from pkg_resources import load_entry_point
7 |
8 | if __name__ == '__main__':
9 | sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
10 | sys.exit(
11 | load_entry_point('pip==9.0.1', 'console_scripts', 'pip')()
12 | )
13 |
--------------------------------------------------------------------------------
/venv/Scripts/pip3-script.py:
--------------------------------------------------------------------------------
1 | #!G:\PycharmProjects\tiaozhanbei\venv\Scripts\python.exe
2 | # EASY-INSTALL-ENTRY-SCRIPT: 'pip==9.0.1','console_scripts','pip3'
3 | __requires__ = 'pip==9.0.1'
4 | import re
5 | import sys
6 | from pkg_resources import load_entry_point
7 |
8 | if __name__ == '__main__':
9 | sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
10 | sys.exit(
11 | load_entry_point('pip==9.0.1', 'console_scripts', 'pip3')()
12 | )
13 |
--------------------------------------------------------------------------------
/venv/Scripts/pip3.6-script.py:
--------------------------------------------------------------------------------
1 | #!G:\PycharmProjects\tiaozhanbei\venv\Scripts\python.exe
2 | # EASY-INSTALL-ENTRY-SCRIPT: 'pip==9.0.1','console_scripts','pip3.6'
3 | __requires__ = 'pip==9.0.1'
4 | import re
5 | import sys
6 | from pkg_resources import load_entry_point
7 |
8 | if __name__ == '__main__':
9 | sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
10 | sys.exit(
11 | load_entry_point('pip==9.0.1', 'console_scripts', 'pip3.6')()
12 | )
13 |
--------------------------------------------------------------------------------
/timetest.py:
--------------------------------------------------------------------------------
1 | import cv2
2 | import threading
3 | import time
4 |
5 |
6 | def music():
7 | print("我在听音乐")
8 | time.sleep(5)
9 | print("我看完了")
10 |
11 | def movie():
12 | print("我在看电影")
13 |
14 |
15 | threads = []
16 | t1 = threading.Thread(target=music)
17 | threads.append(t1)
18 | t2 = threading.Thread(target=movie)
19 | threads.append(t2)
20 |
21 |
22 | if __name__ == '__main__':
23 | for t in threads:
24 | t.setDaemon(False)
25 | t.start()
26 |
27 |
28 | print("结束")
--------------------------------------------------------------------------------
/venv/Scripts/easy_install-script.py:
--------------------------------------------------------------------------------
1 | #!G:\PycharmProjects\tiaozhanbei\venv\Scripts\python.exe
2 | # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==28.8.0','console_scripts','easy_install'
3 | __requires__ = 'setuptools==28.8.0'
4 | import re
5 | import sys
6 | from pkg_resources import load_entry_point
7 |
8 | if __name__ == '__main__':
9 | sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
10 | sys.exit(
11 | load_entry_point('setuptools==28.8.0', 'console_scripts', 'easy_install')()
12 | )
13 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/cachecontrol/caches/__init__.py:
--------------------------------------------------------------------------------
1 | from textwrap import dedent
2 |
3 | try:
4 | from .file_cache import FileCache
5 | except ImportError:
6 | notice = dedent('''
7 | NOTE: In order to use the FileCache you must have
8 | lockfile installed. You can install it via pip:
9 | pip install lockfile
10 | ''')
11 | print(notice)
12 |
13 |
14 | try:
15 | import redis
16 | from .redis_cache import RedisCache
17 | except ImportError:
18 | pass
19 |
--------------------------------------------------------------------------------
/venv/Scripts/easy_install-3.6-script.py:
--------------------------------------------------------------------------------
1 | #!G:\PycharmProjects\tiaozhanbei\venv\Scripts\python.exe
2 | # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==28.8.0','console_scripts','easy_install-3.6'
3 | __requires__ = 'setuptools==28.8.0'
4 | import re
5 | import sys
6 | from pkg_resources import load_entry_point
7 |
8 | if __name__ == '__main__':
9 | sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
10 | sys.exit(
11 | load_entry_point('setuptools==28.8.0', 'console_scripts', 'easy_install-3.6')()
12 | )
13 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/packaging/utils.py:
--------------------------------------------------------------------------------
1 | # This file is dual licensed under the terms of the Apache License, Version
2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 | # for complete details.
4 | from __future__ import absolute_import, division, print_function
5 |
6 | import re
7 |
8 |
9 | _canonicalize_regex = re.compile(r"[-_.]+")
10 |
11 |
12 | def canonicalize_name(name):
13 | # This is taken from PEP 503.
14 | return _canonicalize_regex.sub("-", name).lower()
15 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/cachecontrol/compat.py:
--------------------------------------------------------------------------------
1 | try:
2 | from urllib.parse import urljoin
3 | except ImportError:
4 | from urlparse import urljoin
5 |
6 |
7 | try:
8 | import cPickle as pickle
9 | except ImportError:
10 | import pickle
11 |
12 |
13 | from pip._vendor.requests.packages.urllib3.response import HTTPResponse
14 | from pip._vendor.requests.packages.urllib3.util import is_fp_closed
15 |
16 | # Replicate some six behaviour
17 | try:
18 | text_type = (unicode,)
19 | except NameError:
20 | text_type = (str,)
21 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/models/index.py:
--------------------------------------------------------------------------------
1 | from pip._vendor.six.moves.urllib import parse as urllib_parse
2 |
3 |
4 | class Index(object):
5 | def __init__(self, url):
6 | self.url = url
7 | self.netloc = urllib_parse.urlsplit(url).netloc
8 | self.simple_url = self.url_to_path('simple')
9 | self.pypi_url = self.url_to_path('pypi')
10 | self.pip_json_url = self.url_to_path('pypi/pip/json')
11 |
12 | def url_to_path(self, path):
13 | return urllib_parse.urljoin(self.url, path)
14 |
15 |
16 | PyPI = Index('https://pypi.python.org/')
17 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py:
--------------------------------------------------------------------------------
1 | try:
2 | # Python 3.2+
3 | from ssl import CertificateError, match_hostname
4 | except ImportError:
5 | try:
6 | # Backport of the function from a pypi module
7 | from backports.ssl_match_hostname import CertificateError, match_hostname
8 | except ImportError:
9 | # Our vendored copy
10 | from ._implementation import CertificateError, match_hostname
11 |
12 | # Not needed, but documenting what we provide.
13 | __all__ = ('CertificateError', 'match_hostname')
14 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/packaging/__init__.py:
--------------------------------------------------------------------------------
1 | # This file is dual licensed under the terms of the Apache License, Version
2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 | # for complete details.
4 | from __future__ import absolute_import, division, print_function
5 |
6 | from .__about__ import (
7 | __author__, __copyright__, __email__, __license__, __summary__, __title__,
8 | __uri__, __version__
9 | )
10 |
11 | __all__ = [
12 | "__title__", "__summary__", "__uri__", "__version__", "__author__",
13 | "__email__", "__license__", "__copyright__",
14 | ]
15 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/cachecontrol/wrapper.py:
--------------------------------------------------------------------------------
1 | from .adapter import CacheControlAdapter
2 | from .cache import DictCache
3 |
4 |
5 | def CacheControl(sess,
6 | cache=None,
7 | cache_etags=True,
8 | serializer=None,
9 | heuristic=None):
10 |
11 | cache = cache or DictCache()
12 | adapter = CacheControlAdapter(
13 | cache,
14 | cache_etags=cache_etags,
15 | serializer=serializer,
16 | heuristic=heuristic,
17 | )
18 | sess.mount('http://', adapter)
19 | sess.mount('https://', adapter)
20 |
21 | return sess
22 |
--------------------------------------------------------------------------------
/venv/Scripts/pip.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/venv/Scripts/pip3.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/__main__.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | import os
4 | import sys
5 |
6 | # If we are running from a wheel, add the wheel to sys.path
7 | # This allows the usage python pip-*.whl/pip install pip-*.whl
8 | if __package__ == '':
9 | # __file__ is pip-*.whl/pip/__main__.py
10 | # first dirname call strips of '/__main__.py', second strips off '/pip'
11 | # Resulting path is the name of the wheel itself
12 | # Add that to sys.path so we can import pip
13 | path = os.path.dirname(os.path.dirname(__file__))
14 | sys.path.insert(0, path)
15 |
16 | import pip # noqa
17 |
18 | if __name__ == '__main__':
19 | sys.exit(pip.main())
20 |
--------------------------------------------------------------------------------
/venv/Scripts/pip3.6.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/test2.py:
--------------------------------------------------------------------------------
1 | import cv2
2 |
3 | cap = cv2.VideoCapture(0) # 使用第5个摄像头(我的电脑插了5个摄像头)
4 | face_cascade = cv2.CascadeClassifier('G:/test/opencvface/haarcascade_frontalface_alt2.xml') # 加载人脸特征库
5 |
6 | while(True):
7 | ret, frame = cap.read() # 读取一帧的图像
8 | gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) # 转灰
9 |
10 | faces = face_cascade.detectMultiScale(gray, scaleFactor = 1.15, minNeighbors = 5, minSize = (5, 5)) # 检测人脸
11 | for(x, y, w, h) in faces:
12 | cv2.rectangle(gray, (x, y), (x + w, y + h), (0, 255, 0), 2) # 用矩形圈出人脸
13 |
14 | cv2.imshow('Face Recognition',gray)
15 | if cv2.waitKey(1) & 0xFF == ord('q'):
16 | break
17 |
18 | cap.release() # 释放摄像头
19 | cv2.destroyAllWindows()
20 |
--------------------------------------------------------------------------------
/venv/Scripts/easy_install.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/venv/Scripts/easy_install-3.6.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/distlib/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | #
3 | # Copyright (C) 2012-2016 Vinay Sajip.
4 | # Licensed to the Python Software Foundation under a contributor agreement.
5 | # See LICENSE.txt and CONTRIBUTORS.txt.
6 | #
7 | import logging
8 |
9 | __version__ = '0.2.4'
10 |
11 | class DistlibException(Exception):
12 | pass
13 |
14 | try:
15 | from logging import NullHandler
16 | except ImportError: # pragma: no cover
17 | class NullHandler(logging.Handler):
18 | def handle(self, record): pass
19 | def emit(self, record): pass
20 | def createLock(self): self.lock = None
21 |
22 | logger = logging.getLogger(__name__)
23 | logger.addHandler(NullHandler())
24 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/html5lib/filters/alphabeticalattributes.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from . import base
4 |
5 | try:
6 | from collections import OrderedDict
7 | except ImportError:
8 | from ordereddict import OrderedDict
9 |
10 |
11 | class Filter(base.Filter):
12 | def __iter__(self):
13 | for token in base.Filter.__iter__(self):
14 | if token["type"] in ("StartTag", "EmptyTag"):
15 | attrs = OrderedDict()
16 | for name, value in sorted(token["data"].items(),
17 | key=lambda x: x[0]):
18 | attrs[name] = value
19 | token["data"] = attrs
20 | yield token
21 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/certs.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | """
5 | requests.certs
6 | ~~~~~~~~~~~~~~
7 |
8 | This module returns the preferred default CA certificate bundle.
9 |
10 | If you are packaging Requests, e.g., for a Linux distribution or a managed
11 | environment, you can change the definition of where() to return a separately
12 | packaged CA bundle.
13 | """
14 | import os.path
15 |
16 | try:
17 | from certifi import where
18 | except ImportError:
19 | def where():
20 | """Return the preferred certificate bundle."""
21 | # vendored bundle inside Requests
22 | return os.path.join(os.path.dirname(__file__), 'cacert.pem')
23 |
24 | if __name__ == '__main__':
25 | print(where())
26 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/packaging/__about__.py:
--------------------------------------------------------------------------------
1 | # This file is dual licensed under the terms of the Apache License, Version
2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 | # for complete details.
4 | from __future__ import absolute_import, division, print_function
5 |
6 | __all__ = [
7 | "__title__", "__summary__", "__uri__", "__version__", "__author__",
8 | "__email__", "__license__", "__copyright__",
9 | ]
10 |
11 | __title__ = "packaging"
12 | __summary__ = "Core utilities for Python packages"
13 | __uri__ = "https://github.com/pypa/packaging"
14 |
15 | __version__ = "16.8"
16 |
17 | __author__ = "Donald Stufft and individual contributors"
18 | __email__ = "donald@stufft.io"
19 |
20 | __license__ = "BSD or Apache License, Version 2.0"
21 | __copyright__ = "Copyright 2014-2016 %s" % __author__
22 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/html5lib/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | HTML parsing library based on the WHATWG "HTML5"
3 | specification. The parser is designed to be compatible with existing
4 | HTML found in the wild and implements well-defined error recovery that
5 | is largely compatible with modern desktop web browsers.
6 |
7 | Example usage:
8 |
9 | import html5lib
10 | f = open("my_document.html")
11 | tree = html5lib.parse(f)
12 | """
13 |
14 | from __future__ import absolute_import, division, unicode_literals
15 |
16 | from .html5parser import HTMLParser, parse, parseFragment
17 | from .treebuilders import getTreeBuilder
18 | from .treewalkers import getTreeWalker
19 | from .serializer import serialize
20 |
21 | __all__ = ["HTMLParser", "parse", "parseFragment", "getTreeBuilder",
22 | "getTreeWalker", "serialize"]
23 |
24 | # this has to be at the top level, see how setup.py parses this
25 | __version__ = "1.0b10"
26 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/re-vendor.py:
--------------------------------------------------------------------------------
1 | import os
2 | import sys
3 | import pip
4 | import glob
5 | import shutil
6 |
7 | here = os.path.abspath(os.path.dirname(__file__))
8 |
9 | def usage():
10 | print("Usage: re-vendor.py [clean|vendor]")
11 | sys.exit(1)
12 |
13 | def clean():
14 | for fn in os.listdir(here):
15 | dirname = os.path.join(here, fn)
16 | if os.path.isdir(dirname):
17 | shutil.rmtree(dirname)
18 | # six is a single file, not a package
19 | os.unlink(os.path.join(here, 'six.py'))
20 |
21 | def vendor():
22 | pip.main(['install', '-t', here, '-r', 'vendor.txt'])
23 | for dirname in glob.glob('*.egg-info'):
24 | shutil.rmtree(dirname)
25 |
26 | if __name__ == '__main__':
27 | if len(sys.argv) != 2:
28 | usage()
29 | if sys.argv[1] == 'clean':
30 | clean()
31 | elif sys.argv[1] == 'vendor':
32 | vendor()
33 | else:
34 | usage()
35 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/hooks.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | requests.hooks
5 | ~~~~~~~~~~~~~~
6 |
7 | This module provides the capabilities for the Requests hooks system.
8 |
9 | Available hooks:
10 |
11 | ``response``:
12 | The response generated from a Request.
13 | """
14 | HOOKS = ['response']
15 |
16 |
17 | def default_hooks():
18 | return dict((event, []) for event in HOOKS)
19 |
20 | # TODO: response is the only one
21 |
22 |
23 | def dispatch_hook(key, hooks, hook_data, **kwargs):
24 | """Dispatches a hook dictionary on a given piece of data."""
25 | hooks = hooks or dict()
26 | hooks = hooks.get(key)
27 | if hooks:
28 | if hasattr(hooks, '__call__'):
29 | hooks = [hooks]
30 | for hook in hooks:
31 | _hook_data = hook(hook_data, **kwargs)
32 | if _hook_data is not None:
33 | hook_data = _hook_data
34 | return hook_data
35 |
--------------------------------------------------------------------------------
/classKQsearch.py:
--------------------------------------------------------------------------------
1 | import face_search
2 | import cv2
3 | import os
4 | import time
5 | from PyQt5.QtGui import *
6 | from PyQt5.QtWidgets import *
7 | import sys
8 | from PyQt5.QtCore import *
9 | def Classqiandao(pic1,ui,conn):
10 |
11 | classnum,score = face_search.getresult(pic1)
12 | score = float(score)
13 | if((classnum!=0) and (score>=80)):
14 | cursor = conn.cursor()
15 | sql = ("select * from student WHERE classnumber = '"+str(classnum)+"'")#这里完善后应该再加上判断班级的where
16 | cursor.execute(str(sql))
17 | data = cursor.fetchall()
18 | ui.label_6.setText(data[0][1])
19 | ui.label_7.setText(data[0][2])
20 | ui.label_8.setText(data[0][5])
21 | ui.label_9.setText(data[0][4])
22 | ui.label_11.setText("已成功签到")
23 | else:
24 | ui.label_6.setText("")
25 | ui.label_7.setText("")
26 | ui.label_8.setText("")
27 | ui.label_9.setText("")
28 | ui.label_11.setText("不是本班学生")
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/cachecontrol/cache.py:
--------------------------------------------------------------------------------
1 | """
2 | The cache object API for implementing caches. The default is a thread
3 | safe in-memory dictionary.
4 | """
5 | from threading import Lock
6 |
7 |
8 | class BaseCache(object):
9 |
10 | def get(self, key):
11 | raise NotImplemented()
12 |
13 | def set(self, key, value):
14 | raise NotImplemented()
15 |
16 | def delete(self, key):
17 | raise NotImplemented()
18 |
19 | def close(self):
20 | pass
21 |
22 |
23 | class DictCache(BaseCache):
24 |
25 | def __init__(self, init_dict=None):
26 | self.lock = Lock()
27 | self.data = init_dict or {}
28 |
29 | def get(self, key):
30 | return self.data.get(key, None)
31 |
32 | def set(self, key, value):
33 | with self.lock:
34 | self.data.update({key: value})
35 |
36 | def delete(self, key):
37 | with self.lock:
38 | if key in self.data:
39 | self.data.pop(key)
40 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/packaging/_compat.py:
--------------------------------------------------------------------------------
1 | # This file is dual licensed under the terms of the Apache License, Version
2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 | # for complete details.
4 | from __future__ import absolute_import, division, print_function
5 |
6 | import sys
7 |
8 |
9 | PY2 = sys.version_info[0] == 2
10 | PY3 = sys.version_info[0] == 3
11 |
12 | # flake8: noqa
13 |
14 | if PY3:
15 | string_types = str,
16 | else:
17 | string_types = basestring,
18 |
19 |
20 | def with_metaclass(meta, *bases):
21 | """
22 | Create a base class with a metaclass.
23 | """
24 | # This requires a bit of explanation: the basic idea is to make a dummy
25 | # metaclass for one level of class instantiation that replaces itself with
26 | # the actual metaclass.
27 | class metaclass(meta):
28 | def __new__(cls, name, this_bases, d):
29 | return meta(name, bases, d)
30 | return type.__new__(metaclass, 'temporary_class', (), {})
31 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/utils/filesystem.py:
--------------------------------------------------------------------------------
1 | import os
2 | import os.path
3 |
4 | from pip.compat import get_path_uid
5 |
6 |
7 | def check_path_owner(path):
8 | # If we don't have a way to check the effective uid of this process, then
9 | # we'll just assume that we own the directory.
10 | if not hasattr(os, "geteuid"):
11 | return True
12 |
13 | previous = None
14 | while path != previous:
15 | if os.path.lexists(path):
16 | # Check if path is writable by current user.
17 | if os.geteuid() == 0:
18 | # Special handling for root user in order to handle properly
19 | # cases where users use sudo without -H flag.
20 | try:
21 | path_uid = get_path_uid(path)
22 | except OSError:
23 | return False
24 | return path_uid == 0
25 | else:
26 | return os.access(path, os.W_OK)
27 | else:
28 | previous, path = path, os.path.dirname(path)
29 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/utils/encoding.py:
--------------------------------------------------------------------------------
1 | import codecs
2 | import locale
3 | import re
4 |
5 |
6 | BOMS = [
7 | (codecs.BOM_UTF8, 'utf8'),
8 | (codecs.BOM_UTF16, 'utf16'),
9 | (codecs.BOM_UTF16_BE, 'utf16-be'),
10 | (codecs.BOM_UTF16_LE, 'utf16-le'),
11 | (codecs.BOM_UTF32, 'utf32'),
12 | (codecs.BOM_UTF32_BE, 'utf32-be'),
13 | (codecs.BOM_UTF32_LE, 'utf32-le'),
14 | ]
15 |
16 | ENCODING_RE = re.compile(b'coding[:=]\s*([-\w.]+)')
17 |
18 |
19 | def auto_decode(data):
20 | """Check a bytes string for a BOM to correctly detect the encoding
21 |
22 | Fallback to locale.getpreferredencoding(False) like open() on Python3"""
23 | for bom, encoding in BOMS:
24 | if data.startswith(bom):
25 | return data[len(bom):].decode(encoding)
26 | # Lets check the first two lines as in PEP263
27 | for line in data.split(b'\n')[:2]:
28 | if line[0:1] == b'#' and ENCODING_RE.search(line):
29 | encoding = ENCODING_RE.search(line).groups()[0].decode('ascii')
30 | return data.decode(encoding)
31 | return data.decode(locale.getpreferredencoding(False))
32 |
--------------------------------------------------------------------------------
/facecheck.py:
--------------------------------------------------------------------------------
1 | import urllib3
2 | import base64
3 | from urllib.parse import urlencode
4 | import cv2
5 | import CONFIG
6 |
7 |
8 |
9 |
10 |
11 | def fa_check(picpath):
12 | access_token = CONFIG.access_token;
13 |
14 |
15 | http=urllib3.PoolManager()
16 | url='https://aip.baidubce.com/rest/2.0/face/v3/detect?access_token='+access_token
17 |
18 | f = open(picpath,'rb')
19 |
20 |
21 |
22 | img = base64.b64encode(f.read())
23 | params={'image':''+str(img,'utf-8')+'','image_type':'BASE64','face_field':'age,beauty,faceshape,gender,glasses'}
24 |
25 |
26 | params=urlencode(params)
27 | request=http.request('POST',
28 | url,
29 | body=params,
30 | headers={'Content-Type':'application/json'})
31 |
32 | result = str(request.data,'utf-8')
33 | result_sp = result.split('"')
34 | if(result_sp[5]=="SUCCESS"):
35 | isface = True
36 | face_num_sp = result_sp[16]
37 | face_num = face_num_sp[1:-1]
38 | return float(face_num)
39 | else:
40 | isface = False
41 | print("没有检测到人")
42 | return(0)
43 |
44 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/urllib3/util/__init__.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 | # For backwards compatibility, provide imports that used to be here.
3 | from .connection import is_connection_dropped
4 | from .request import make_headers
5 | from .response import is_fp_closed
6 | from .ssl_ import (
7 | SSLContext,
8 | HAS_SNI,
9 | IS_PYOPENSSL,
10 | assert_fingerprint,
11 | resolve_cert_reqs,
12 | resolve_ssl_version,
13 | ssl_wrap_socket,
14 | )
15 | from .timeout import (
16 | current_time,
17 | Timeout,
18 | )
19 |
20 | from .retry import Retry
21 | from .url import (
22 | get_host,
23 | parse_url,
24 | split_first,
25 | Url,
26 | )
27 |
28 | __all__ = (
29 | 'HAS_SNI',
30 | 'IS_PYOPENSSL',
31 | 'SSLContext',
32 | 'Retry',
33 | 'Timeout',
34 | 'Url',
35 | 'assert_fingerprint',
36 | 'current_time',
37 | 'is_connection_dropped',
38 | 'is_fp_closed',
39 | 'get_host',
40 | 'parse_url',
41 | 'make_headers',
42 | 'resolve_cert_reqs',
43 | 'resolve_ssl_version',
44 | 'split_first',
45 | 'ssl_wrap_socket',
46 | )
47 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/commands/help.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | from pip.basecommand import Command, SUCCESS
4 | from pip.exceptions import CommandError
5 |
6 |
7 | class HelpCommand(Command):
8 | """Show help for commands"""
9 | name = 'help'
10 | usage = """
11 | %prog """
12 | summary = 'Show help for commands.'
13 |
14 | def run(self, options, args):
15 | from pip.commands import commands_dict, get_similar_commands
16 |
17 | try:
18 | # 'pip help' with no args is handled by pip.__init__.parseopt()
19 | cmd_name = args[0] # the command we need help for
20 | except IndexError:
21 | return SUCCESS
22 |
23 | if cmd_name not in commands_dict:
24 | guess = get_similar_commands(cmd_name)
25 |
26 | msg = ['unknown command "%s"' % cmd_name]
27 | if guess:
28 | msg.append('maybe you meant "%s"' % guess)
29 |
30 | raise CommandError(' - '.join(msg))
31 |
32 | command = commands_dict[cmd_name]()
33 | command.parser.print_help()
34 |
35 | return SUCCESS
36 |
--------------------------------------------------------------------------------
/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=G:\PycharmProjects\tiaozhanbei\venv"
12 |
13 | if not defined PROMPT (
14 | set "PROMPT=$P$G"
15 | )
16 |
17 | if defined _OLD_VIRTUAL_PROMPT (
18 | set "PROMPT=%_OLD_VIRTUAL_PROMPT%"
19 | )
20 |
21 | if defined _OLD_VIRTUAL_PYTHONHOME (
22 | set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%"
23 | )
24 |
25 | set "_OLD_VIRTUAL_PROMPT=%PROMPT%"
26 | set "PROMPT=(venv) %PROMPT%"
27 |
28 | if defined PYTHONHOME (
29 | set "_OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%"
30 | set PYTHONHOME=
31 | )
32 |
33 | if defined _OLD_VIRTUAL_PATH (
34 | set "PATH=%_OLD_VIRTUAL_PATH%"
35 | ) else (
36 | set "_OLD_VIRTUAL_PATH=%PATH%"
37 | )
38 |
39 | set "PATH=%VIRTUAL_ENV%\Scripts;%PATH%"
40 |
41 | :END
42 | if defined _OLD_CODEPAGE (
43 | "%SystemRoot%\System32\chcp.com" %_OLD_CODEPAGE% > nul
44 | set "_OLD_CODEPAGE="
45 | )
46 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/html5lib/_trie/_base.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from collections import Mapping
4 |
5 |
6 | class Trie(Mapping):
7 | """Abstract base class for tries"""
8 |
9 | def keys(self, prefix=None):
10 | # pylint:disable=arguments-differ
11 | keys = super(Trie, self).keys()
12 |
13 | if prefix is None:
14 | return set(keys)
15 |
16 | # Python 2.6: no set comprehensions
17 | return set([x for x in keys if x.startswith(prefix)])
18 |
19 | def has_keys_with_prefix(self, prefix):
20 | for key in self.keys():
21 | if key.startswith(prefix):
22 | return True
23 |
24 | return False
25 |
26 | def longest_prefix(self, prefix):
27 | if prefix in self:
28 | return prefix
29 |
30 | for i in range(1, len(prefix) + 1):
31 | if prefix[:-i] in self:
32 | return prefix[:-i]
33 |
34 | raise KeyError(prefix)
35 |
36 | def longest_prefix_item(self, prefix):
37 | lprefix = self.longest_prefix(prefix)
38 | return (lprefix, self[lprefix])
39 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/distlib/_backport/misc.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | #
3 | # Copyright (C) 2012 The Python Software Foundation.
4 | # See LICENSE.txt and CONTRIBUTORS.txt.
5 | #
6 | """Backports for individual classes and functions."""
7 |
8 | import os
9 | import sys
10 |
11 | __all__ = ['cache_from_source', 'callable', 'fsencode']
12 |
13 |
14 | try:
15 | from imp import cache_from_source
16 | except ImportError:
17 | def cache_from_source(py_file, debug=__debug__):
18 | ext = debug and 'c' or 'o'
19 | return py_file + ext
20 |
21 |
22 | try:
23 | callable = callable
24 | except NameError:
25 | from collections import Callable
26 |
27 | def callable(obj):
28 | return isinstance(obj, Callable)
29 |
30 |
31 | try:
32 | fsencode = os.fsencode
33 | except AttributeError:
34 | def fsencode(filename):
35 | if isinstance(filename, bytes):
36 | return filename
37 | elif isinstance(filename, str):
38 | return filename.encode(sys.getfilesystemencoding())
39 | else:
40 | raise TypeError("expect bytes or str, not %s" %
41 | type(filename).__name__)
42 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/cachecontrol/caches/redis_cache.py:
--------------------------------------------------------------------------------
1 | from __future__ import division
2 |
3 | from datetime import datetime
4 |
5 |
6 | def total_seconds(td):
7 | """Python 2.6 compatability"""
8 | if hasattr(td, 'total_seconds'):
9 | return td.total_seconds()
10 |
11 | ms = td.microseconds
12 | secs = (td.seconds + td.days * 24 * 3600)
13 | return (ms + secs * 10**6) / 10**6
14 |
15 |
16 | class RedisCache(object):
17 |
18 | def __init__(self, conn):
19 | self.conn = conn
20 |
21 | def get(self, key):
22 | return self.conn.get(key)
23 |
24 | def set(self, key, value, expires=None):
25 | if not expires:
26 | self.conn.set(key, value)
27 | else:
28 | expires = expires - datetime.now()
29 | self.conn.setex(key, total_seconds(expires), value)
30 |
31 | def delete(self, key):
32 | self.conn.delete(key)
33 |
34 | def clear(self):
35 | """Helper for clearing all the keys in a database. Use with
36 | caution!"""
37 | for key in self.conn.keys():
38 | self.conn.delete(key)
39 |
40 | def close(self):
41 | self.conn.disconnect()
42 |
--------------------------------------------------------------------------------
/faceid.py:
--------------------------------------------------------------------------------
1 | # encoding:utf-8
2 | import urllib.request
3 | import json
4 | import base64
5 | import ssl
6 | import CONFIG
7 |
8 | def getresult(pic1path,pic2path):
9 | f1 = open(pic1path, 'rb')
10 | f2 = open(pic2path, 'rb')
11 | pic1 = f1.read()
12 | pic2 = f2.read()
13 |
14 | img1 = base64.b64encode(pic1)
15 | img2 = base64.b64encode(pic2)
16 | request_url = "https://aip.baidubce.com/rest/2.0/face/v3/match"
17 | context = ssl._create_unverified_context()
18 |
19 | params = json.dumps(
20 | [{"image": str(img1, 'utf-8'), "image_type": "BASE64", "face_type": "LIVE", "quality_control": "LOW"},
21 | {"image": str(img2, 'utf-8'), "image_type": "BASE64", "face_type": "LIVE", "quality_control": "LOW"}])
22 |
23 | access_token = CONFIG.access_token
24 | request_url = request_url + "?access_token=" + access_token
25 | #转码
26 | params_2 = params.encode(encoding='UTF8')
27 |
28 | request = urllib.request.Request(url=request_url, data=params_2)
29 | request.add_header('Content-Type', 'application/json')
30 | response = urllib.request.urlopen(request,context=context)
31 | content = response.read()
32 | content = eval(content)
33 | score = content['result']['score']
34 | return(score)
35 |
36 |
--------------------------------------------------------------------------------
/faceid2.py:
--------------------------------------------------------------------------------
1 | import urllib3
2 | import base64
3 | import json
4 | import CONFIG
5 |
6 | def getresult(pic1path,pic2path):
7 |
8 | f1 = open(pic1path, 'rb')
9 | f2 = open(pic2path, 'rb')
10 | pic1 = f1.read()
11 | pic2 = f2.read()
12 |
13 | access_token = CONFIG.access_token
14 | http=urllib3.PoolManager()
15 | IMAGE_TYPE='BASE64'
16 |
17 | url='https://aip.baidubce.com/rest/2.0/face/v3/match?access_token='+access_token
18 |
19 |
20 | #参数image:图像base64编码 分别base64编码后的2张图片数据
21 |
22 | img1 = base64.b64encode(pic1)
23 | img2 = base64.b64encode(pic2)
24 |
25 | #params = {"images":str(img1,'utf-8') + ',' + str(img2,'utf-8')}
26 |
27 | params = [{"image":str(img1,'utf-8'),"image_type":IMAGE_TYPE},{"image":str(img2,'utf-8'),"image_type":IMAGE_TYPE}]
28 | #参数转JSON格式
29 |
30 | encoded_data = json.dumps(params).encode('utf-8')
31 | request=http.request('POST',
32 | url,
33 | body=encoded_data,
34 | headers={'Content-Type':'application/json'})
35 | #对返回的byte字节进行处理。Python3输出位串,而不是可读的字符串,需要进行转换
36 | result = str(request.data)
37 | result_sp = result.split('"')[16]
38 | face_score = result_sp[1:-1]
39 | return(float(face_score))
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/html5lib/filters/whitespace.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | import re
4 |
5 | from . import base
6 | from ..constants import rcdataElements, spaceCharacters
7 | spaceCharacters = "".join(spaceCharacters)
8 |
9 | SPACES_REGEX = re.compile("[%s]+" % spaceCharacters)
10 |
11 |
12 | class Filter(base.Filter):
13 |
14 | spacePreserveElements = frozenset(["pre", "textarea"] + list(rcdataElements))
15 |
16 | def __iter__(self):
17 | preserve = 0
18 | for token in base.Filter.__iter__(self):
19 | type = token["type"]
20 | if type == "StartTag" \
21 | and (preserve or token["name"] in self.spacePreserveElements):
22 | preserve += 1
23 |
24 | elif type == "EndTag" and preserve:
25 | preserve -= 1
26 |
27 | elif not preserve and type == "SpaceCharacters" and token["data"]:
28 | # Test on token["data"] above to not introduce spaces where there were not
29 | token["data"] = " "
30 |
31 | elif not preserve and type == "Characters":
32 | token["data"] = collapse_spaces(token["data"])
33 |
34 | yield token
35 |
36 |
37 | def collapse_spaces(text):
38 | return SPACES_REGEX.sub(' ', text)
39 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/chardet/compat.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # Contributor(s):
3 | # Ian Cordasco - port to Python
4 | #
5 | # This library is free software; you can redistribute it and/or
6 | # modify it under the terms of the GNU Lesser General Public
7 | # License as published by the Free Software Foundation; either
8 | # version 2.1 of the License, or (at your option) any later version.
9 | #
10 | # This library is distributed in the hope that it will be useful,
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 | # Lesser General Public License for more details.
14 | #
15 | # You should have received a copy of the GNU Lesser General Public
16 | # License along with this library; if not, write to the Free Software
17 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18 | # 02110-1301 USA
19 | ######################### END LICENSE BLOCK #########################
20 |
21 | import sys
22 |
23 |
24 | if sys.version_info < (3, 0):
25 | base_str = (str, unicode)
26 | else:
27 | base_str = (bytes, str)
28 |
29 |
30 | def wrap_ord(a):
31 | if sys.version_info < (3, 0) and isinstance(a, base_str):
32 | return ord(a)
33 | else:
34 | return a
35 |
--------------------------------------------------------------------------------
/qttest.py:
--------------------------------------------------------------------------------
1 |
2 |
3 | import urllib.request
4 | import json
5 | import base64
6 | import ssl
7 |
8 | import CONFIG
9 |
10 | picf = "G:/tiaozhanbei/facetest/test0.jpg"
11 | f1 = open(picf, 'rb')
12 |
13 | pic1 = f1.read()
14 |
15 | img1 = base64.b64encode(pic1)
16 |
17 | request_url = "https://aip.baidubce.com/rest/2.0/face/v3/detect"
18 | context = ssl._create_unverified_context()
19 |
20 | params = json.dumps({"image": str(img1, 'utf-8'), "image_type": "BASE64", "face_type": "LIVE"})
21 |
22 | access_token = CONFIG.access_token
23 |
24 | request_url = request_url + "?access_token=" + access_token
25 |
26 | # 转码
27 | params_2 = params.encode(encoding='UTF8')
28 |
29 | request = urllib.request.Request(url=request_url, data=params_2)
30 | request.add_header('Content-Type', 'application/json')
31 | response = urllib.request.urlopen(request, context=context)
32 | content = response.read()
33 | null=""
34 | content = eval(content)
35 | print("cotent:", content)
36 | '''
37 | result = content['result']
38 | # print("result:",result)
39 | face_list = result['face_list']
40 | face_num = result['face_num']
41 | # print("face_list:",face_list)
42 | if (face_num != 0):
43 | location = face_list[0]
44 | location = location['location']
45 | height = location['height'];
46 | left = location['left'];
47 | top = location['top'];
48 | width = location['width'];
49 |
50 | '''
51 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/html5lib/_trie/datrie.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from datrie import Trie as DATrie
4 | from pip._vendor.six import text_type
5 |
6 | from ._base import Trie as ABCTrie
7 |
8 |
9 | class Trie(ABCTrie):
10 | def __init__(self, data):
11 | chars = set()
12 | for key in data.keys():
13 | if not isinstance(key, text_type):
14 | raise TypeError("All keys must be strings")
15 | for char in key:
16 | chars.add(char)
17 |
18 | self._data = DATrie("".join(chars))
19 | for key, value in data.items():
20 | self._data[key] = value
21 |
22 | def __contains__(self, key):
23 | return key in self._data
24 |
25 | def __len__(self):
26 | return len(self._data)
27 |
28 | def __iter__(self):
29 | raise NotImplementedError()
30 |
31 | def __getitem__(self, key):
32 | return self._data[key]
33 |
34 | def keys(self, prefix=None):
35 | return self._data.keys(prefix)
36 |
37 | def has_keys_with_prefix(self, prefix):
38 | return self._data.has_keys_with_prefix(prefix)
39 |
40 | def longest_prefix(self, prefix):
41 | return self._data.longest_prefix(prefix)
42 |
43 | def longest_prefix_item(self, prefix):
44 | return self._data.longest_prefix_item(prefix)
45 |
--------------------------------------------------------------------------------
/grade_check.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | Dialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 1133
10 | 824
11 |
12 |
13 |
14 | Dialog
15 |
16 |
17 |
18 |
19 | 40
20 | 40
21 | 1061
22 | 751
23 |
24 |
25 |
26 | TextLabel
27 |
28 |
29 |
30 |
31 | true
32 |
33 |
34 |
35 | 90
36 | 60
37 | 971
38 | 681
39 |
40 |
41 |
42 |
43 |
44 |
45 | 520
46 | 760
47 | 111
48 | 31
49 |
50 |
51 |
52 | 返回
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/chardet/__init__.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # This library is free software; you can redistribute it and/or
3 | # modify it under the terms of the GNU Lesser General Public
4 | # License as published by the Free Software Foundation; either
5 | # version 2.1 of the License, or (at your option) any later version.
6 | #
7 | # This library is distributed in the hope that it will be useful,
8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 | # Lesser General Public License for more details.
11 | #
12 | # You should have received a copy of the GNU Lesser General Public
13 | # License along with this library; if not, write to the Free Software
14 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
15 | # 02110-1301 USA
16 | ######################### END LICENSE BLOCK #########################
17 |
18 | __version__ = "2.3.0"
19 | from sys import version_info
20 |
21 |
22 | def detect(aBuf):
23 | if ((version_info < (3, 0) and isinstance(aBuf, unicode)) or
24 | (version_info >= (3, 0) and not isinstance(aBuf, bytes))):
25 | raise ValueError('Expected a bytes object, not a unicode object')
26 |
27 | from . import universaldetector
28 | u = universaldetector.UniversalDetector()
29 | u.reset()
30 | u.feed(aBuf)
31 | u.close()
32 | return u.result
33 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/progress/spinner.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Copyright (c) 2012 Giorgos Verigakis
4 | #
5 | # Permission to use, copy, modify, and distribute this software for any
6 | # purpose with or without fee is hereby granted, provided that the above
7 | # copyright notice and this permission notice appear in all copies.
8 | #
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
17 | from . import Infinite
18 | from .helpers import WriteMixin
19 |
20 |
21 | class Spinner(WriteMixin, Infinite):
22 | message = ''
23 | phases = ('-', '\\', '|', '/')
24 | hide_cursor = True
25 |
26 | def update(self):
27 | i = self.index % len(self.phases)
28 | self.write(self.phases[i])
29 |
30 |
31 | class PieSpinner(Spinner):
32 | phases = [u'◷', u'◶', u'◵', u'◴']
33 |
34 |
35 | class MoonSpinner(Spinner):
36 | phases = [u'◑', u'◒', u'◐', u'◓']
37 |
38 |
39 | class LineSpinner(Spinner):
40 | phases = [u'⎺', u'⎻', u'⎼', u'⎽', u'⎼', u'⎻']
41 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/utils/build.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | import os.path
4 | import tempfile
5 |
6 | from pip.utils import rmtree
7 |
8 |
9 | class BuildDirectory(object):
10 |
11 | def __init__(self, name=None, delete=None):
12 | # If we were not given an explicit directory, and we were not given an
13 | # explicit delete option, then we'll default to deleting.
14 | if name is None and delete is None:
15 | delete = True
16 |
17 | if name is None:
18 | # We realpath here because some systems have their default tmpdir
19 | # symlinked to another directory. This tends to confuse build
20 | # scripts, so we canonicalize the path by traversing potential
21 | # symlinks here.
22 | name = os.path.realpath(tempfile.mkdtemp(prefix="pip-build-"))
23 | # If we were not given an explicit directory, and we were not given
24 | # an explicit delete option, then we'll default to deleting.
25 | if delete is None:
26 | delete = True
27 |
28 | self.name = name
29 | self.delete = delete
30 |
31 | def __repr__(self):
32 | return "<{} {!r}>".format(self.__class__.__name__, self.name)
33 |
34 | def __enter__(self):
35 | return self.name
36 |
37 | def __exit__(self, exc, value, tb):
38 | self.cleanup()
39 |
40 | def cleanup(self):
41 | if self.delete:
42 | rmtree(self.name)
43 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/chardet/constants.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is Mozilla Universal charset detector code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 2001
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | # Shy Shalom - original C code
12 | #
13 | # This library is free software; you can redistribute it and/or
14 | # modify it under the terms of the GNU Lesser General Public
15 | # License as published by the Free Software Foundation; either
16 | # version 2.1 of the License, or (at your option) any later version.
17 | #
18 | # This library is distributed in the hope that it will be useful,
19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 | # Lesser General Public License for more details.
22 | #
23 | # You should have received a copy of the GNU Lesser General Public
24 | # License along with this library; if not, write to the Free Software
25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
26 | # 02110-1301 USA
27 | ######################### END LICENSE BLOCK #########################
28 |
29 | _debug = 0
30 |
31 | eDetecting = 0
32 | eFoundIt = 1
33 | eNotMe = 2
34 |
35 | eStart = 0
36 | eError = 1
37 | eItsMe = 2
38 |
39 | SHORTCUT_THRESHOLD = 0.95
40 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/commands/check.py:
--------------------------------------------------------------------------------
1 | import logging
2 |
3 | from pip.basecommand import Command
4 | from pip.operations.check import check_requirements
5 | from pip.utils import get_installed_distributions
6 |
7 |
8 | logger = logging.getLogger(__name__)
9 |
10 |
11 | class CheckCommand(Command):
12 | """Verify installed packages have compatible dependencies."""
13 | name = 'check'
14 | usage = """
15 | %prog [options]"""
16 | summary = 'Verify installed packages have compatible dependencies.'
17 |
18 | def run(self, options, args):
19 | dists = get_installed_distributions(local_only=False, skip=())
20 | missing_reqs_dict, incompatible_reqs_dict = check_requirements(dists)
21 |
22 | for dist in dists:
23 | key = '%s==%s' % (dist.project_name, dist.version)
24 |
25 | for requirement in missing_reqs_dict.get(key, []):
26 | logger.info(
27 | "%s %s requires %s, which is not installed.",
28 | dist.project_name, dist.version, requirement.project_name)
29 |
30 | for requirement, actual in incompatible_reqs_dict.get(key, []):
31 | logger.info(
32 | "%s %s has requirement %s, but you have %s %s.",
33 | dist.project_name, dist.version, requirement,
34 | actual.project_name, actual.version)
35 |
36 | if missing_reqs_dict or incompatible_reqs_dict:
37 | return 1
38 | else:
39 | logger.info("No broken requirements found.")
40 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/__init__.py:
--------------------------------------------------------------------------------
1 | '''
2 | Debian and other distributions "unbundle" requests' vendored dependencies, and
3 | rewrite all imports to use the global versions of ``urllib3`` and ``chardet``.
4 | The problem with this is that not only requests itself imports those
5 | dependencies, but third-party code outside of the distros' control too.
6 |
7 | In reaction to these problems, the distro maintainers replaced
8 | ``requests.packages`` with a magical "stub module" that imports the correct
9 | modules. The implementations were varying in quality and all had severe
10 | problems. For example, a symlink (or hardlink) that links the correct modules
11 | into place introduces problems regarding object identity, since you now have
12 | two modules in `sys.modules` with the same API, but different identities::
13 |
14 | requests.packages.urllib3 is not urllib3
15 |
16 | With version ``2.5.2``, requests started to maintain its own stub, so that
17 | distro-specific breakage would be reduced to a minimum, even though the whole
18 | issue is not requests' fault in the first place. See
19 | https://github.com/kennethreitz/requests/pull/2375 for the corresponding pull
20 | request.
21 | '''
22 |
23 | from __future__ import absolute_import
24 | import sys
25 |
26 | try:
27 | from . import urllib3
28 | except ImportError:
29 | import urllib3
30 | sys.modules['%s.urllib3' % __name__] = urllib3
31 |
32 | try:
33 | from . import chardet
34 | except ImportError:
35 | import chardet
36 | sys.modules['%s.chardet' % __name__] = chardet
37 |
--------------------------------------------------------------------------------
/cover.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | Dialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 1133
10 | 824
11 |
12 |
13 |
14 | Dialog
15 |
16 |
17 |
18 |
19 | 470
20 | 240
21 | 261
22 | 111
23 |
24 |
25 |
26 | <html><head/><body><p><span style=" font-size:18pt; font-weight:600;">课堂考勤系统</span></p></body></html>
27 |
28 |
29 |
30 |
31 |
32 | 200
33 | 550
34 | 201
35 | 71
36 |
37 |
38 |
39 | 开始考勤
40 |
41 |
42 |
43 |
44 |
45 | 660
46 | 540
47 | 201
48 | 71
49 |
50 |
51 |
52 | 查看课室时间安排表
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/webencodings/mklabels.py:
--------------------------------------------------------------------------------
1 | """
2 |
3 | webencodings.mklabels
4 | ~~~~~~~~~~~~~~~~~~~~~
5 |
6 | Regenarate the webencodings.labels module.
7 |
8 | :copyright: Copyright 2012 by Simon Sapin
9 | :license: BSD, see LICENSE for details.
10 |
11 | """
12 |
13 | import json
14 | try:
15 | from urllib import urlopen
16 | except ImportError:
17 | from urllib.request import urlopen
18 |
19 |
20 | def assert_lower(string):
21 | assert string == string.lower()
22 | return string
23 |
24 |
25 | def generate(url):
26 | parts = ['''\
27 | """
28 |
29 | webencodings.labels
30 | ~~~~~~~~~~~~~~~~~~~
31 |
32 | Map encoding labels to their name.
33 |
34 | :copyright: Copyright 2012 by Simon Sapin
35 | :license: BSD, see LICENSE for details.
36 |
37 | """
38 |
39 | # XXX Do not edit!
40 | # This file is automatically generated by mklabels.py
41 |
42 | LABELS = {
43 | ''']
44 | labels = [
45 | (repr(assert_lower(label)).lstrip('u'),
46 | repr(encoding['name']).lstrip('u'))
47 | for category in json.loads(urlopen(url).read().decode('ascii'))
48 | for encoding in category['encodings']
49 | for label in encoding['labels']]
50 | max_len = max(len(label) for label, name in labels)
51 | parts.extend(
52 | ' %s:%s %s,\n' % (label, ' ' * (max_len - len(label)), name)
53 | for label, name in labels)
54 | parts.append('}')
55 | return ''.join(parts)
56 |
57 |
58 | if __name__ == '__main__':
59 | print(generate('http://encoding.spec.whatwg.org/encodings.json'))
60 |
--------------------------------------------------------------------------------
/face_search.py:
--------------------------------------------------------------------------------
1 | # encoding:utf-8
2 | import urllib.request
3 | import json
4 | import base64
5 | import ssl
6 | import CONFIG
7 |
8 | '''
9 | 人脸搜索
10 | '''
11 | def getresult(pic1path):
12 |
13 | #pic1path = 'G:/tiaozhanbei/baiduapi/checktest/test0.jpg'
14 | #pic1path = 'G:/tiaozhanbei/baiduapi/test4.jpg'
15 | f1 = open(pic1path, 'rb')
16 |
17 | pic1 = f1.read()
18 |
19 |
20 | img1 = base64.b64encode(pic1)
21 |
22 |
23 | request_url = "https://aip.baidubce.com/rest/2.0/face/v3/search"
24 | context = ssl._create_unverified_context()
25 |
26 | params = json.dumps({"image":str(img1, 'utf-8'),"image_type":"BASE64","group_id_list":"facetest","quality_control":"LOW","liveness_control":"NORMAL"})
27 |
28 | access_token = CONFIG.access_token
29 |
30 | request_url = request_url + "?access_token=" + access_token
31 | params_2 = params.encode(encoding='UTF8')
32 |
33 | request = urllib.request.Request(url=request_url, data=params_2)
34 |
35 | request.add_header('Content-Type', 'application/json')
36 |
37 | response = urllib.request.urlopen(request,context=context)
38 | null = ''
39 | content = response.read()
40 | content = eval(content)
41 | result = content['result']
42 | if(result!=''):
43 | user_list = result['user_list']
44 | user_id = user_list[0]['user_id']
45 | score = user_list[0]['score']
46 |
47 | return user_id,score
48 | else:
49 | return 0,0
50 |
51 |
52 | if __name__ == '__main__':
53 | pic1path = 'G:/tiaozhanbei/baiduapi/test4.jpg'
54 | result,score = getresult(pic1path)
55 | print(result,score)
56 |
57 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/cachecontrol/_cmd.py:
--------------------------------------------------------------------------------
1 | import logging
2 |
3 | from pip._vendor import requests
4 |
5 | from pip._vendor.cachecontrol.adapter import CacheControlAdapter
6 | from pip._vendor.cachecontrol.cache import DictCache
7 | from pip._vendor.cachecontrol.controller import logger
8 |
9 | from argparse import ArgumentParser
10 |
11 |
12 | def setup_logging():
13 | logger.setLevel(logging.DEBUG)
14 | handler = logging.StreamHandler()
15 | logger.addHandler(handler)
16 |
17 |
18 | def get_session():
19 | adapter = CacheControlAdapter(
20 | DictCache(),
21 | cache_etags=True,
22 | serializer=None,
23 | heuristic=None,
24 | )
25 | sess = requests.Session()
26 | sess.mount('http://', adapter)
27 | sess.mount('https://', adapter)
28 |
29 | sess.cache_controller = adapter.controller
30 | return sess
31 |
32 |
33 | def get_args():
34 | parser = ArgumentParser()
35 | parser.add_argument('url', help='The URL to try and cache')
36 | return parser.parse_args()
37 |
38 |
39 | def main(args=None):
40 | args = get_args()
41 | sess = get_session()
42 |
43 | # Make a request to get a response
44 | resp = sess.get(args.url)
45 |
46 | # Turn on logging
47 | setup_logging()
48 |
49 | # try setting the cache
50 | sess.cache_controller.cache_response(resp.request, resp.raw)
51 |
52 | # Now try to get it
53 | if sess.cache_controller.cached_request(resp.request):
54 | print('Cached!')
55 | else:
56 | print('Not cached :(')
57 |
58 |
59 | if __name__ == '__main__':
60 | main()
61 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/html5lib/treewalkers/dom.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from xml.dom import Node
4 |
5 | from . import base
6 |
7 |
8 | class TreeWalker(base.NonRecursiveTreeWalker):
9 | def getNodeDetails(self, node):
10 | if node.nodeType == Node.DOCUMENT_TYPE_NODE:
11 | return base.DOCTYPE, node.name, node.publicId, node.systemId
12 |
13 | elif node.nodeType in (Node.TEXT_NODE, Node.CDATA_SECTION_NODE):
14 | return base.TEXT, node.nodeValue
15 |
16 | elif node.nodeType == Node.ELEMENT_NODE:
17 | attrs = {}
18 | for attr in list(node.attributes.keys()):
19 | attr = node.getAttributeNode(attr)
20 | if attr.namespaceURI:
21 | attrs[(attr.namespaceURI, attr.localName)] = attr.value
22 | else:
23 | attrs[(None, attr.name)] = attr.value
24 | return (base.ELEMENT, node.namespaceURI, node.nodeName,
25 | attrs, node.hasChildNodes())
26 |
27 | elif node.nodeType == Node.COMMENT_NODE:
28 | return base.COMMENT, node.nodeValue
29 |
30 | elif node.nodeType in (Node.DOCUMENT_NODE, Node.DOCUMENT_FRAGMENT_NODE):
31 | return (base.DOCUMENT,)
32 |
33 | else:
34 | return base.UNKNOWN, node.nodeType
35 |
36 | def getFirstChild(self, node):
37 | return node.firstChild
38 |
39 | def getNextSibling(self, node):
40 | return node.nextSibling
41 |
42 | def getParentNode(self, node):
43 | return node.parentNode
44 |
--------------------------------------------------------------------------------
/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="G:\PycharmProjects\tiaozhanbei\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/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/progress/counter.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Copyright (c) 2012 Giorgos Verigakis
4 | #
5 | # Permission to use, copy, modify, and distribute this software for any
6 | # purpose with or without fee is hereby granted, provided that the above
7 | # copyright notice and this permission notice appear in all copies.
8 | #
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
17 | from . import Infinite, Progress
18 | from .helpers import WriteMixin
19 |
20 |
21 | class Counter(WriteMixin, Infinite):
22 | message = ''
23 | hide_cursor = True
24 |
25 | def update(self):
26 | self.write(str(self.index))
27 |
28 |
29 | class Countdown(WriteMixin, Progress):
30 | hide_cursor = True
31 |
32 | def update(self):
33 | self.write(str(self.remaining))
34 |
35 |
36 | class Stack(WriteMixin, Progress):
37 | phases = (u' ', u'▁', u'▂', u'▃', u'▄', u'▅', u'▆', u'▇', u'█')
38 | hide_cursor = True
39 |
40 | def update(self):
41 | nphases = len(self.phases)
42 | i = min(nphases - 1, int(self.progress * nphases))
43 | self.write(self.phases[i])
44 |
45 |
46 | class Pie(Stack):
47 | phases = (u'○', u'◔', u'◑', u'◕', u'●')
48 |
--------------------------------------------------------------------------------
/classKQ.py:
--------------------------------------------------------------------------------
1 | import faceid2
2 | import cv2
3 | import os
4 | import time
5 |
6 |
7 | def judge(pic1path,pic2path):
8 |
9 | score = faceid2.getresult(pic1path,pic2path)
10 | if (score>80):
11 | #print('是同一个人,score:=',score)
12 | return 1
13 | else:
14 | #print('不是同一个人!,score:=',score)
15 | return 0
16 |
17 |
18 |
19 |
20 | def Classqiandao():
21 | path = "G:/tiaozhanbei/baiduapi/checktest/"
22 | files = os.listdir(path)
23 | files_count = 0
24 |
25 | filename = "G:/tiaozhanbei/签到表.txt"
26 | fe = open(filename, 'w')
27 | fe.truncate()
28 | filetxt = open( filename,'a')
29 | filetxt.write("考勤签到表"+ '\n')
30 |
31 |
32 |
33 | for num in files:
34 | if os.path.isfile(os.path.join(path, num)):
35 | files_count += 1
36 | global i
37 | i = 0
38 | for j in range(0,files_count):
39 | while (1):
40 | pic2 = "G:/tiaozhanbei/baiduapi/test"+str(i)+".jpg"
41 | print(pic2)
42 | if(judge(path+files[j],pic2)==0):
43 | i+=1
44 | if(i==6):#总共判断的数量,全班人数
45 | print("你不是本班的人!")
46 | break
47 | else:
48 | time.sleep(0.1)
49 | continue
50 | else:
51 | if(i==0):name='琦琦'
52 | if(i==1):name="奕帆"
53 | if(i==2):name="云鹏"
54 | if(i==3):name="志立"
55 | if(i==4):name="卓铭"
56 | if(i==5):name="锦嘉"
57 | writetxt = name+"已签到。"
58 | print(writetxt)
59 | filetxt.write(writetxt + '\n')
60 |
61 | time.sleep(0.1)
62 | break
63 | i=0 # 重置
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/packaging/_structures.py:
--------------------------------------------------------------------------------
1 | # This file is dual licensed under the terms of the Apache License, Version
2 | # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3 | # for complete details.
4 | from __future__ import absolute_import, division, print_function
5 |
6 |
7 | class Infinity(object):
8 |
9 | def __repr__(self):
10 | return "Infinity"
11 |
12 | def __hash__(self):
13 | return hash(repr(self))
14 |
15 | def __lt__(self, other):
16 | return False
17 |
18 | def __le__(self, other):
19 | return False
20 |
21 | def __eq__(self, other):
22 | return isinstance(other, self.__class__)
23 |
24 | def __ne__(self, other):
25 | return not isinstance(other, self.__class__)
26 |
27 | def __gt__(self, other):
28 | return True
29 |
30 | def __ge__(self, other):
31 | return True
32 |
33 | def __neg__(self):
34 | return NegativeInfinity
35 |
36 | Infinity = Infinity()
37 |
38 |
39 | class NegativeInfinity(object):
40 |
41 | def __repr__(self):
42 | return "-Infinity"
43 |
44 | def __hash__(self):
45 | return hash(repr(self))
46 |
47 | def __lt__(self, other):
48 | return True
49 |
50 | def __le__(self, other):
51 | return True
52 |
53 | def __eq__(self, other):
54 | return isinstance(other, self.__class__)
55 |
56 | def __ne__(self, other):
57 | return not isinstance(other, self.__class__)
58 |
59 | def __gt__(self, other):
60 | return False
61 |
62 | def __ge__(self, other):
63 | return False
64 |
65 | def __neg__(self):
66 | return Infinity
67 |
68 | NegativeInfinity = NegativeInfinity()
69 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/html5lib/treeadapters/genshi.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from genshi.core import QName, Attrs
4 | from genshi.core import START, END, TEXT, COMMENT, DOCTYPE
5 |
6 |
7 | def to_genshi(walker):
8 | text = []
9 | for token in walker:
10 | type = token["type"]
11 | if type in ("Characters", "SpaceCharacters"):
12 | text.append(token["data"])
13 | elif text:
14 | yield TEXT, "".join(text), (None, -1, -1)
15 | text = []
16 |
17 | if type in ("StartTag", "EmptyTag"):
18 | if token["namespace"]:
19 | name = "{%s}%s" % (token["namespace"], token["name"])
20 | else:
21 | name = token["name"]
22 | attrs = Attrs([(QName("{%s}%s" % attr if attr[0] is not None else attr[1]), value)
23 | for attr, value in token["data"].items()])
24 | yield (START, (QName(name), attrs), (None, -1, -1))
25 | if type == "EmptyTag":
26 | type = "EndTag"
27 |
28 | if type == "EndTag":
29 | if token["namespace"]:
30 | name = "{%s}%s" % (token["namespace"], token["name"])
31 | else:
32 | name = token["name"]
33 |
34 | yield END, QName(name), (None, -1, -1)
35 |
36 | elif type == "Comment":
37 | yield COMMENT, token["data"], (None, -1, -1)
38 |
39 | elif type == "Doctype":
40 | yield DOCTYPE, (token["name"], token["publicId"],
41 | token["systemId"]), (None, -1, -1)
42 |
43 | else:
44 | pass # FIXME: What to do?
45 |
46 | if text:
47 | yield TEXT, "".join(text), (None, -1, -1)
48 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/operations/check.py:
--------------------------------------------------------------------------------
1 |
2 |
3 | def check_requirements(installed_dists):
4 | missing_reqs_dict = {}
5 | incompatible_reqs_dict = {}
6 |
7 | for dist in installed_dists:
8 | key = '%s==%s' % (dist.project_name, dist.version)
9 |
10 | missing_reqs = list(get_missing_reqs(dist, installed_dists))
11 | if missing_reqs:
12 | missing_reqs_dict[key] = missing_reqs
13 |
14 | incompatible_reqs = list(get_incompatible_reqs(
15 | dist, installed_dists))
16 | if incompatible_reqs:
17 | incompatible_reqs_dict[key] = incompatible_reqs
18 |
19 | return (missing_reqs_dict, incompatible_reqs_dict)
20 |
21 |
22 | def get_missing_reqs(dist, installed_dists):
23 | """Return all of the requirements of `dist` that aren't present in
24 | `installed_dists`.
25 |
26 | """
27 | installed_names = set(d.project_name.lower() for d in installed_dists)
28 | missing_requirements = set()
29 |
30 | for requirement in dist.requires():
31 | if requirement.project_name.lower() not in installed_names:
32 | missing_requirements.add(requirement)
33 | yield requirement
34 |
35 |
36 | def get_incompatible_reqs(dist, installed_dists):
37 | """Return all of the requirements of `dist` that are present in
38 | `installed_dists`, but have incompatible versions.
39 |
40 | """
41 | installed_dists_by_name = {}
42 | for installed_dist in installed_dists:
43 | installed_dists_by_name[installed_dist.project_name] = installed_dist
44 |
45 | for requirement in dist.requires():
46 | present_dist = installed_dists_by_name.get(requirement.project_name)
47 |
48 | if present_dist and present_dist not in requirement:
49 | yield (requirement, present_dist)
50 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/commands/hash.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | import hashlib
4 | import logging
5 | import sys
6 |
7 | from pip.basecommand import Command
8 | from pip.status_codes import ERROR
9 | from pip.utils import read_chunks
10 | from pip.utils.hashes import FAVORITE_HASH, STRONG_HASHES
11 |
12 |
13 | logger = logging.getLogger(__name__)
14 |
15 |
16 | class HashCommand(Command):
17 | """
18 | Compute a hash of a local package archive.
19 |
20 | These can be used with --hash in a requirements file to do repeatable
21 | installs.
22 |
23 | """
24 | name = 'hash'
25 | usage = '%prog [options] ...'
26 | summary = 'Compute hashes of package archives.'
27 |
28 | def __init__(self, *args, **kw):
29 | super(HashCommand, self).__init__(*args, **kw)
30 | self.cmd_opts.add_option(
31 | '-a', '--algorithm',
32 | dest='algorithm',
33 | choices=STRONG_HASHES,
34 | action='store',
35 | default=FAVORITE_HASH,
36 | help='The hash algorithm to use: one of %s' %
37 | ', '.join(STRONG_HASHES))
38 | self.parser.insert_option_group(0, self.cmd_opts)
39 |
40 | def run(self, options, args):
41 | if not args:
42 | self.parser.print_usage(sys.stderr)
43 | return ERROR
44 |
45 | algorithm = options.algorithm
46 | for path in args:
47 | logger.info('%s:\n--hash=%s:%s',
48 | path, algorithm, _hash_of_file(path, algorithm))
49 |
50 |
51 | def _hash_of_file(path, algorithm):
52 | """Return the hash digest of a file."""
53 | with open(path, 'rb') as archive:
54 | hash = hashlib.new(algorithm)
55 | for chunk in read_chunks(archive):
56 | hash.update(chunk)
57 | return hash.hexdigest()
58 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/html5lib/treeadapters/sax.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from xml.sax.xmlreader import AttributesNSImpl
4 |
5 | from ..constants import adjustForeignAttributes, unadjustForeignAttributes
6 |
7 | prefix_mapping = {}
8 | for prefix, localName, namespace in adjustForeignAttributes.values():
9 | if prefix is not None:
10 | prefix_mapping[prefix] = namespace
11 |
12 |
13 | def to_sax(walker, handler):
14 | """Call SAX-like content handler based on treewalker walker"""
15 | handler.startDocument()
16 | for prefix, namespace in prefix_mapping.items():
17 | handler.startPrefixMapping(prefix, namespace)
18 |
19 | for token in walker:
20 | type = token["type"]
21 | if type == "Doctype":
22 | continue
23 | elif type in ("StartTag", "EmptyTag"):
24 | attrs = AttributesNSImpl(token["data"],
25 | unadjustForeignAttributes)
26 | handler.startElementNS((token["namespace"], token["name"]),
27 | token["name"],
28 | attrs)
29 | if type == "EmptyTag":
30 | handler.endElementNS((token["namespace"], token["name"]),
31 | token["name"])
32 | elif type == "EndTag":
33 | handler.endElementNS((token["namespace"], token["name"]),
34 | token["name"])
35 | elif type in ("Characters", "SpaceCharacters"):
36 | handler.characters(token["data"])
37 | elif type == "Comment":
38 | pass
39 | else:
40 | assert False, "Unknown token type"
41 |
42 | for prefix, namespace in prefix_mapping.items():
43 | handler.endPrefixMapping(prefix)
44 | handler.endDocument()
45 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/chardet/euctwprober.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is mozilla.org code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 1998
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | #
12 | # This library is free software; you can redistribute it and/or
13 | # modify it under the terms of the GNU Lesser General Public
14 | # License as published by the Free Software Foundation; either
15 | # version 2.1 of the License, or (at your option) any later version.
16 | #
17 | # This library is distributed in the hope that it will be useful,
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 | # Lesser General Public License for more details.
21 | #
22 | # You should have received a copy of the GNU Lesser General Public
23 | # License along with this library; if not, write to the Free Software
24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 | # 02110-1301 USA
26 | ######################### END LICENSE BLOCK #########################
27 |
28 | from .mbcharsetprober import MultiByteCharSetProber
29 | from .codingstatemachine import CodingStateMachine
30 | from .chardistribution import EUCTWDistributionAnalysis
31 | from .mbcssm import EUCTWSMModel
32 |
33 | class EUCTWProber(MultiByteCharSetProber):
34 | def __init__(self):
35 | MultiByteCharSetProber.__init__(self)
36 | self._mCodingSM = CodingStateMachine(EUCTWSMModel)
37 | self._mDistributionAnalyzer = EUCTWDistributionAnalysis()
38 | self.reset()
39 |
40 | def get_charset_name(self):
41 | return "EUC-TW"
42 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/chardet/euckrprober.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is mozilla.org code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 1998
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | #
12 | # This library is free software; you can redistribute it and/or
13 | # modify it under the terms of the GNU Lesser General Public
14 | # License as published by the Free Software Foundation; either
15 | # version 2.1 of the License, or (at your option) any later version.
16 | #
17 | # This library is distributed in the hope that it will be useful,
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 | # Lesser General Public License for more details.
21 | #
22 | # You should have received a copy of the GNU Lesser General Public
23 | # License along with this library; if not, write to the Free Software
24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 | # 02110-1301 USA
26 | ######################### END LICENSE BLOCK #########################
27 |
28 | from .mbcharsetprober import MultiByteCharSetProber
29 | from .codingstatemachine import CodingStateMachine
30 | from .chardistribution import EUCKRDistributionAnalysis
31 | from .mbcssm import EUCKRSMModel
32 |
33 |
34 | class EUCKRProber(MultiByteCharSetProber):
35 | def __init__(self):
36 | MultiByteCharSetProber.__init__(self)
37 | self._mCodingSM = CodingStateMachine(EUCKRSMModel)
38 | self._mDistributionAnalyzer = EUCKRDistributionAnalysis()
39 | self.reset()
40 |
41 | def get_charset_name(self):
42 | return "EUC-KR"
43 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/chardet/gb2312prober.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is mozilla.org code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 1998
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | #
12 | # This library is free software; you can redistribute it and/or
13 | # modify it under the terms of the GNU Lesser General Public
14 | # License as published by the Free Software Foundation; either
15 | # version 2.1 of the License, or (at your option) any later version.
16 | #
17 | # This library is distributed in the hope that it will be useful,
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 | # Lesser General Public License for more details.
21 | #
22 | # You should have received a copy of the GNU Lesser General Public
23 | # License along with this library; if not, write to the Free Software
24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 | # 02110-1301 USA
26 | ######################### END LICENSE BLOCK #########################
27 |
28 | from .mbcharsetprober import MultiByteCharSetProber
29 | from .codingstatemachine import CodingStateMachine
30 | from .chardistribution import GB2312DistributionAnalysis
31 | from .mbcssm import GB2312SMModel
32 |
33 | class GB2312Prober(MultiByteCharSetProber):
34 | def __init__(self):
35 | MultiByteCharSetProber.__init__(self)
36 | self._mCodingSM = CodingStateMachine(GB2312SMModel)
37 | self._mDistributionAnalyzer = GB2312DistributionAnalysis()
38 | self.reset()
39 |
40 | def get_charset_name(self):
41 | return "GB2312"
42 |
--------------------------------------------------------------------------------
/float.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | Dialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 1133
10 | 824
11 |
12 |
13 |
14 | Dialog
15 |
16 |
17 |
18 |
19 | 60
20 | 100
21 | 511
22 | 191
23 |
24 |
25 |
26 | <html><head/><body><p><span style=" font-size:36pt; font-weight:600;">现在正在进行的是:</span></p></body></html>
27 |
28 |
29 |
30 |
31 |
32 | 150
33 | 290
34 | 871
35 | 161
36 |
37 |
38 |
39 | <html><head/><body><p><span style=" font-size:24pt; font-weight:600;">毛泽东思想和中国特色社会主义理论体系概论</span></p></body></html>
40 |
41 |
42 |
43 |
44 |
45 | 420
46 | 460
47 | 381
48 | 101
49 |
50 |
51 |
52 | <html><head/><body><p><span style=" font-size:24pt; font-weight:600;">软件工程1164</span></p></body></html>
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/chardet/big5prober.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is Mozilla Communicator client code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 1998
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | #
12 | # This library is free software; you can redistribute it and/or
13 | # modify it under the terms of the GNU Lesser General Public
14 | # License as published by the Free Software Foundation; either
15 | # version 2.1 of the License, or (at your option) any later version.
16 | #
17 | # This library is distributed in the hope that it will be useful,
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 | # Lesser General Public License for more details.
21 | #
22 | # You should have received a copy of the GNU Lesser General Public
23 | # License along with this library; if not, write to the Free Software
24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 | # 02110-1301 USA
26 | ######################### END LICENSE BLOCK #########################
27 |
28 | from .mbcharsetprober import MultiByteCharSetProber
29 | from .codingstatemachine import CodingStateMachine
30 | from .chardistribution import Big5DistributionAnalysis
31 | from .mbcssm import Big5SMModel
32 |
33 |
34 | class Big5Prober(MultiByteCharSetProber):
35 | def __init__(self):
36 | MultiByteCharSetProber.__init__(self)
37 | self._mCodingSM = CodingStateMachine(Big5SMModel)
38 | self._mDistributionAnalyzer = Big5DistributionAnalysis()
39 | self.reset()
40 |
41 | def get_charset_name(self):
42 | return "Big5"
43 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/chardet/cp949prober.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is mozilla.org code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 1998
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | #
12 | # This library is free software; you can redistribute it and/or
13 | # modify it under the terms of the GNU Lesser General Public
14 | # License as published by the Free Software Foundation; either
15 | # version 2.1 of the License, or (at your option) any later version.
16 | #
17 | # This library is distributed in the hope that it will be useful,
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 | # Lesser General Public License for more details.
21 | #
22 | # You should have received a copy of the GNU Lesser General Public
23 | # License along with this library; if not, write to the Free Software
24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 | # 02110-1301 USA
26 | ######################### END LICENSE BLOCK #########################
27 |
28 | from .mbcharsetprober import MultiByteCharSetProber
29 | from .codingstatemachine import CodingStateMachine
30 | from .chardistribution import EUCKRDistributionAnalysis
31 | from .mbcssm import CP949SMModel
32 |
33 |
34 | class CP949Prober(MultiByteCharSetProber):
35 | def __init__(self):
36 | MultiByteCharSetProber.__init__(self)
37 | self._mCodingSM = CodingStateMachine(CP949SMModel)
38 | # NOTE: CP949 is a superset of EUC-KR, so the distribution should be
39 | # not different.
40 | self._mDistributionAnalyzer = EUCKRDistributionAnalysis()
41 | self.reset()
42 |
43 | def get_charset_name(self):
44 | return "CP949"
45 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/compat.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | """
4 | requests.compat
5 | ~~~~~~~~~~~~~~~
6 |
7 | This module handles import compatibility issues between Python 2 and
8 | Python 3.
9 | """
10 |
11 | from .packages import chardet
12 |
13 | import sys
14 |
15 | # -------
16 | # Pythons
17 | # -------
18 |
19 | # Syntax sugar.
20 | _ver = sys.version_info
21 |
22 | #: Python 2.x?
23 | is_py2 = (_ver[0] == 2)
24 |
25 | #: Python 3.x?
26 | is_py3 = (_ver[0] == 3)
27 |
28 | # Note: We've patched out simplejson support in pip because it prevents
29 | # upgrading simplejson on Windows.
30 | # try:
31 | # import simplejson as json
32 | # except (ImportError, SyntaxError):
33 | # # simplejson does not support Python 3.2, it throws a SyntaxError
34 | # # because of u'...' Unicode literals.
35 | import json
36 |
37 | # ---------
38 | # Specifics
39 | # ---------
40 |
41 | if is_py2:
42 | from urllib import quote, unquote, quote_plus, unquote_plus, urlencode, getproxies, proxy_bypass
43 | from urlparse import urlparse, urlunparse, urljoin, urlsplit, urldefrag
44 | from urllib2 import parse_http_list
45 | import cookielib
46 | from Cookie import Morsel
47 | from StringIO import StringIO
48 | from .packages.urllib3.packages.ordered_dict import OrderedDict
49 |
50 | builtin_str = str
51 | bytes = str
52 | str = unicode
53 | basestring = basestring
54 | numeric_types = (int, long, float)
55 |
56 | elif is_py3:
57 | from urllib.parse import urlparse, urlunparse, urljoin, urlsplit, urlencode, quote, unquote, quote_plus, unquote_plus, urldefrag
58 | from urllib.request import parse_http_list, getproxies, proxy_bypass
59 | from http import cookiejar as cookielib
60 | from http.cookies import Morsel
61 | from io import StringIO
62 | from collections import OrderedDict
63 |
64 | builtin_str = str
65 | str = str
66 | bytes = bytes
67 | basestring = (str, bytes)
68 | numeric_types = (int, float)
69 |
--------------------------------------------------------------------------------
/lost_object.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | Dialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 1133
10 | 824
11 |
12 |
13 |
14 | Dialog
15 |
16 |
17 |
18 |
19 | 100
20 | 250
21 | 941
22 | 301
23 |
24 |
25 |
26 | TextLabel
27 |
28 |
29 |
30 |
31 |
32 | 260
33 | 330
34 | 241
35 | 141
36 |
37 |
38 |
39 | QPushButton{
40 | font-size:35px;
41 | }
42 |
43 |
44 | 失物招领
45 |
46 |
47 |
48 |
49 |
50 | 650
51 | 330
52 | 241
53 | 141
54 |
55 |
56 |
57 | QPushButton{
58 | font-size:35px;
59 | }
60 |
61 |
62 | 失物登记
63 |
64 |
65 |
66 |
67 |
68 | 990
69 | 760
70 | 93
71 | 28
72 |
73 |
74 |
75 | 返回
76 |
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/facev3api_example.py:
--------------------------------------------------------------------------------
1 | import urllib
2 | import ssl
3 | from urllib import request, parse
4 | import json
5 | import CONFIG
6 | # client_id 为官网获取的AK, client_secret 为官网获取的SK
7 | # 转换图片# 读取文件内容,转换为base64编码# 二进制方式打开图文件
8 | def imgdata(file1path, file2path):
9 | import base64
10 | f = open(r'%s' % file1path, 'rb')
11 | pic1 = base64.b64encode(f.read())
12 | f.close()
13 | f = open(r'%s' % file2path, 'rb')
14 | pic2 = base64.b64encode(f.read())
15 | f.close()
16 | # 将图片信息格式化为可提交信息,这里需要注意str参数设置
17 | params = json.dumps([{"image": str(pic1, 'utf-8'), "image_type": "BASE64", "face_type": "LIVE", "quality_control": "LOW"},
18 | {"image": str(pic2, 'utf-8'), "image_type": "BASE64", "face_type": "IDCARD", "quality_control": "LOW"}] )
19 | return params.encode(encoding='UTF8')
20 |
21 |
22 | # 进行对比获得结果
23 | def img(file1path, file2path):
24 | token = CONFIG.access_token
25 | # 人脸识别API
26 | # url = 'https://aip.baidubce.com/rest/2.0/face/v3/detect?access_token='+token
27 | # 人脸对比API
28 | context = ssl._create_unverified_context()
29 | # url = 'https://aip.baidubce.com/rest/2.0/face/v3/match?access_token=' + token
30 | params = imgdata(file1path, file2path)
31 | request_url = "https://aip.baidubce.com/rest/2.0/face/v3/match"
32 | request_url = request_url + "?access_token="+ token
33 | request = urllib.request.Request(url=request_url,data=params)
34 | request.add_header('Content-Type', 'application/json')
35 | response = urllib.request.urlopen(request ,context=context)
36 | content = response.read()
37 | content = eval(content)
38 | print(content)
39 | # # 获得分数
40 | score = content['result']['score']
41 | if score > 80:
42 | return '照片相似度:' + str(score) + ',同一个人'
43 | else:
44 | return '照片相似度:' + str(score) + ',不是同一个人'
45 |
46 | if __name__ == '__main__':
47 | file1path = 'G:/tiaozhanbei/baiduapi/checktest/test1.jpg'
48 | file2path = 'G:/tiaozhanbei/baiduapi/test0.jpg'
49 | res = img(file1path, file2path)
50 | print(res)
51 |
52 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/html5lib/_trie/py.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 | from pip._vendor.six import text_type
3 |
4 | from bisect import bisect_left
5 |
6 | from ._base import Trie as ABCTrie
7 |
8 |
9 | class Trie(ABCTrie):
10 | def __init__(self, data):
11 | if not all(isinstance(x, text_type) for x in data.keys()):
12 | raise TypeError("All keys must be strings")
13 |
14 | self._data = data
15 | self._keys = sorted(data.keys())
16 | self._cachestr = ""
17 | self._cachepoints = (0, len(data))
18 |
19 | def __contains__(self, key):
20 | return key in self._data
21 |
22 | def __len__(self):
23 | return len(self._data)
24 |
25 | def __iter__(self):
26 | return iter(self._data)
27 |
28 | def __getitem__(self, key):
29 | return self._data[key]
30 |
31 | def keys(self, prefix=None):
32 | if prefix is None or prefix == "" or not self._keys:
33 | return set(self._keys)
34 |
35 | if prefix.startswith(self._cachestr):
36 | lo, hi = self._cachepoints
37 | start = i = bisect_left(self._keys, prefix, lo, hi)
38 | else:
39 | start = i = bisect_left(self._keys, prefix)
40 |
41 | keys = set()
42 | if start == len(self._keys):
43 | return keys
44 |
45 | while self._keys[i].startswith(prefix):
46 | keys.add(self._keys[i])
47 | i += 1
48 |
49 | self._cachestr = prefix
50 | self._cachepoints = (start, i)
51 |
52 | return keys
53 |
54 | def has_keys_with_prefix(self, prefix):
55 | if prefix in self._data:
56 | return True
57 |
58 | if prefix.startswith(self._cachestr):
59 | lo, hi = self._cachepoints
60 | i = bisect_left(self._keys, prefix, lo, hi)
61 | else:
62 | i = bisect_left(self._keys, prefix)
63 |
64 | if i == len(self._keys):
65 | return False
66 |
67 | return self._keys[i].startswith(prefix)
68 |
--------------------------------------------------------------------------------
/classKQSINGLE.py:
--------------------------------------------------------------------------------
1 | import faceid
2 | import cv2
3 | import os
4 | import time
5 | from PyQt5.QtGui import *
6 | from PyQt5.QtWidgets import *
7 | import sys
8 | from PyQt5.QtCore import *
9 |
10 |
11 |
12 | def judge(pic1path,pic2path):
13 |
14 | score = faceid.getresult(pic1path,pic2path)
15 | if (score>80):
16 | #print('是同一个人,score:=',score)
17 | return 1
18 | else:
19 | #print('不是同一个人!,score:=',score)
20 | return 0
21 |
22 |
23 |
24 |
25 | def Classqiandao(pic1,ui,conn):
26 | path = "G:/tiaozhanbei/baiduapi/checktest/"
27 | files = os.listdir(path)
28 | files_count = 0
29 |
30 |
31 |
32 |
33 |
34 | global i
35 | i = 0
36 | while (1):
37 | pic2 = "G:/tiaozhanbei/baiduapi/test"+str(i)+".jpg"
38 | print(pic2)
39 | if(judge(pic1,pic2)==0):
40 | i+=1
41 | if(i==7):#总共判断的数量,全班人数
42 | print("你不是本班人!")
43 | break
44 | else:
45 | time.sleep(0.1)
46 | continue
47 | else:
48 |
49 | if(i==0):name='奕帆'
50 | if(i==1):name="卓铭"
51 | if(i==2):name="云鹏"
52 | if(i==3):name="志立"
53 | if(i==4):name="锦嘉"
54 | if(i==5):name="琦琦"
55 | if(i==6):name="姚旭"
56 | classnum = i+1
57 |
58 |
59 | cursor = conn.cursor()
60 | sql = ("select * from student WHERE classnumber = '"+str(classnum)+"'")#这里完善后应该再加上判断班级的where
61 | '''
62 | if(classnum%7==0):
63 | classj = 6
64 | classi = int(classnum/7)
65 | else:
66 | classi = int(classnum / 7)
67 | classj = classnum - (classi*7) - 1
68 | '''
69 | cursor.execute(str(sql))
70 | data = cursor.fetchall()
71 | ui.label_6.setText(data[0][1])
72 | ui.label_7.setText(data[0][2])
73 | ui.label_8.setText(data[0][5])
74 | ui.label_9.setText(data[0][4])
75 | ui.label_11.setText("已成功签到")
76 |
77 |
78 | time.sleep(0.1)
79 | break
80 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/chardet/charsetprober.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is Mozilla Universal charset detector code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 2001
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | # Shy Shalom - original C code
12 | #
13 | # This library is free software; you can redistribute it and/or
14 | # modify it under the terms of the GNU Lesser General Public
15 | # License as published by the Free Software Foundation; either
16 | # version 2.1 of the License, or (at your option) any later version.
17 | #
18 | # This library is distributed in the hope that it will be useful,
19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 | # Lesser General Public License for more details.
22 | #
23 | # You should have received a copy of the GNU Lesser General Public
24 | # License along with this library; if not, write to the Free Software
25 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
26 | # 02110-1301 USA
27 | ######################### END LICENSE BLOCK #########################
28 |
29 | from . import constants
30 | import re
31 |
32 |
33 | class CharSetProber:
34 | def __init__(self):
35 | pass
36 |
37 | def reset(self):
38 | self._mState = constants.eDetecting
39 |
40 | def get_charset_name(self):
41 | return None
42 |
43 | def feed(self, aBuf):
44 | pass
45 |
46 | def get_state(self):
47 | return self._mState
48 |
49 | def get_confidence(self):
50 | return 0.0
51 |
52 | def filter_high_bit_only(self, aBuf):
53 | aBuf = re.sub(b'([\x00-\x7F])+', b' ', aBuf)
54 | return aBuf
55 |
56 | def filter_without_english_letters(self, aBuf):
57 | aBuf = re.sub(b'([A-Za-z])+', b' ', aBuf)
58 | return aBuf
59 |
60 | def filter_with_english_letters(self, aBuf):
61 | # TODO
62 | return aBuf
63 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/chardet/mbcsgroupprober.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is Mozilla Universal charset detector code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 2001
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | # Shy Shalom - original C code
12 | # Proofpoint, Inc.
13 | #
14 | # This library is free software; you can redistribute it and/or
15 | # modify it under the terms of the GNU Lesser General Public
16 | # License as published by the Free Software Foundation; either
17 | # version 2.1 of the License, or (at your option) any later version.
18 | #
19 | # This library is distributed in the hope that it will be useful,
20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 | # Lesser General Public License for more details.
23 | #
24 | # You should have received a copy of the GNU Lesser General Public
25 | # License along with this library; if not, write to the Free Software
26 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
27 | # 02110-1301 USA
28 | ######################### END LICENSE BLOCK #########################
29 |
30 | from .charsetgroupprober import CharSetGroupProber
31 | from .utf8prober import UTF8Prober
32 | from .sjisprober import SJISProber
33 | from .eucjpprober import EUCJPProber
34 | from .gb2312prober import GB2312Prober
35 | from .euckrprober import EUCKRProber
36 | from .cp949prober import CP949Prober
37 | from .big5prober import Big5Prober
38 | from .euctwprober import EUCTWProber
39 |
40 |
41 | class MBCSGroupProber(CharSetGroupProber):
42 | def __init__(self):
43 | CharSetGroupProber.__init__(self)
44 | self._mProbers = [
45 | UTF8Prober(),
46 | SJISProber(),
47 | EUCJPProber(),
48 | GB2312Prober(),
49 | EUCKRProber(),
50 | CP949Prober(),
51 | Big5Prober(),
52 | EUCTWProber()
53 | ]
54 | self.reset()
55 |
--------------------------------------------------------------------------------
/classCheck.py:
--------------------------------------------------------------------------------
1 | import cv2
2 | import facecheck
3 | import time
4 | import threading
5 | import classKQ
6 | import os
7 |
8 |
9 | def checkface():
10 |
11 | i = 0
12 | failcount = 0
13 | picpath="G:/tiaozhanbei/baiduapi/checktest/test"
14 |
15 |
16 |
17 | #cv2.imshow("capture", frame)
18 | time.sleep(5)
19 | while (1):
20 | print("开始检测!")
21 | #cv2.waitKey(0)
22 | time.sleep(5)
23 | ret, frame = cap.read()
24 | cv2.imwrite(picpath+str(i)+".jpg", frame)
25 | face_num = facecheck.fa_check((picpath+str(i)+".jpg"))
26 | if(face_num>0):
27 | print("检测成功!开始拍照")
28 | time.sleep(2)
29 | ret, frame = cap.read()
30 | cv2.imwrite(picpath + str(i) + ".jpg", frame)
31 | face_num = facecheck.fa_check((picpath + str(i) + ".jpg"))
32 | print("总共有",face_num,"张人脸")
33 | if(face_num>0):
34 | print("拍照成功!下一个同学!")
35 | time.sleep(5)
36 | i+=1
37 | continue
38 | else:
39 | print("拍照失败,重新检测")
40 | os.remove(picpath + str(i) + ".jpg")
41 | time.sleep(5)
42 | continue
43 | else:
44 | print("检测不到人脸,5秒后重新检测")
45 | os.remove(picpath + str(i) + ".jpg")
46 | time.sleep(5)
47 | failcount+=1 #failcount次检测不到人之后关闭程序
48 | if(failcount==2):
49 | print("谢谢使用!")
50 | print("开始考勤")
51 | classKQ.Classqiandao()
52 | break
53 | continue
54 |
55 | cap.release()
56 | cv2.destroyAllWindows()
57 |
58 |
59 |
60 |
61 | def view():
62 | while(1):
63 | ret, frame = cap.read()
64 | cv2.imshow("capture", frame)
65 | if cv2.waitKey(1) & 0xFF == ord('q'):
66 | break
67 |
68 | #cap.release()
69 | #cv2.destroyAllWindows()
70 |
71 | threads = []
72 | t1 = threading.Thread(target=view)
73 | threads.append(t1)
74 | t2 = threading.Thread(target=checkface)
75 | threads.append(t2)
76 |
77 |
78 |
79 | if __name__ == '__main__':
80 | cap = cv2.VideoCapture(1)
81 | for t in threads:
82 | t.setDaemon(False)
83 | t.start()
84 |
85 | # t.join()
86 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/colorama/initialise.py:
--------------------------------------------------------------------------------
1 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
2 | import atexit
3 | import contextlib
4 | import sys
5 |
6 | from .ansitowin32 import AnsiToWin32
7 |
8 |
9 | orig_stdout = None
10 | orig_stderr = None
11 |
12 | wrapped_stdout = None
13 | wrapped_stderr = None
14 |
15 | atexit_done = False
16 |
17 |
18 | def reset_all():
19 | if AnsiToWin32 is not None: # Issue #74: objects might become None at exit
20 | AnsiToWin32(orig_stdout).reset_all()
21 |
22 |
23 | def init(autoreset=False, convert=None, strip=None, wrap=True):
24 |
25 | if not wrap and any([autoreset, convert, strip]):
26 | raise ValueError('wrap=False conflicts with any other arg=True')
27 |
28 | global wrapped_stdout, wrapped_stderr
29 | global orig_stdout, orig_stderr
30 |
31 | orig_stdout = sys.stdout
32 | orig_stderr = sys.stderr
33 |
34 | if sys.stdout is None:
35 | wrapped_stdout = None
36 | else:
37 | sys.stdout = wrapped_stdout = \
38 | wrap_stream(orig_stdout, convert, strip, autoreset, wrap)
39 | if sys.stderr is None:
40 | wrapped_stderr = None
41 | else:
42 | sys.stderr = wrapped_stderr = \
43 | wrap_stream(orig_stderr, convert, strip, autoreset, wrap)
44 |
45 | global atexit_done
46 | if not atexit_done:
47 | atexit.register(reset_all)
48 | atexit_done = True
49 |
50 |
51 | def deinit():
52 | if orig_stdout is not None:
53 | sys.stdout = orig_stdout
54 | if orig_stderr is not None:
55 | sys.stderr = orig_stderr
56 |
57 |
58 | @contextlib.contextmanager
59 | def colorama_text(*args, **kwargs):
60 | init(*args, **kwargs)
61 | try:
62 | yield
63 | finally:
64 | deinit()
65 |
66 |
67 | def reinit():
68 | if wrapped_stdout is not None:
69 | sys.stdout = wrapped_stdout
70 | if wrapped_stderr is not None:
71 | sys.stderr = wrapped_stderr
72 |
73 |
74 | def wrap_stream(stream, convert, strip, autoreset, wrap):
75 | if wrap:
76 | wrapper = AnsiToWin32(stream,
77 | convert=convert, strip=strip, autoreset=autoreset)
78 | if wrapper.should_wrap():
79 | stream = wrapper.stream
80 | return stream
81 |
82 |
83 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/utils/packaging.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | from email.parser import FeedParser
4 |
5 | import logging
6 | import sys
7 |
8 | from pip._vendor.packaging import specifiers
9 | from pip._vendor.packaging import version
10 | from pip._vendor import pkg_resources
11 |
12 | from pip import exceptions
13 |
14 | logger = logging.getLogger(__name__)
15 |
16 |
17 | def check_requires_python(requires_python):
18 | """
19 | Check if the python version in use match the `requires_python` specifier.
20 |
21 | Returns `True` if the version of python in use matches the requirement.
22 | Returns `False` if the version of python in use does not matches the
23 | requirement.
24 |
25 | Raises an InvalidSpecifier if `requires_python` have an invalid format.
26 | """
27 | if requires_python is None:
28 | # The package provides no information
29 | return True
30 | requires_python_specifier = specifiers.SpecifierSet(requires_python)
31 |
32 | # We only use major.minor.micro
33 | python_version = version.parse('.'.join(map(str, sys.version_info[:3])))
34 | return python_version in requires_python_specifier
35 |
36 |
37 | def get_metadata(dist):
38 | if (isinstance(dist, pkg_resources.DistInfoDistribution) and
39 | dist.has_metadata('METADATA')):
40 | return dist.get_metadata('METADATA')
41 | elif dist.has_metadata('PKG-INFO'):
42 | return dist.get_metadata('PKG-INFO')
43 |
44 |
45 | def check_dist_requires_python(dist):
46 | metadata = get_metadata(dist)
47 | feed_parser = FeedParser()
48 | feed_parser.feed(metadata)
49 | pkg_info_dict = feed_parser.close()
50 | requires_python = pkg_info_dict.get('Requires-Python')
51 | try:
52 | if not check_requires_python(requires_python):
53 | raise exceptions.UnsupportedPythonVersion(
54 | "%s requires Python '%s' but the running Python is %s" % (
55 | dist.project_name,
56 | requires_python,
57 | '.'.join(map(str, sys.version_info[:3])),)
58 | )
59 | except specifiers.InvalidSpecifier as e:
60 | logger.warning(
61 | "Package %s has an invalid Requires-Python entry %s - %s" % (
62 | dist.project_name, requires_python, e))
63 | return
64 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/urllib3/util/request.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 | from base64 import b64encode
3 |
4 | from ..packages.six import b
5 |
6 | ACCEPT_ENCODING = 'gzip,deflate'
7 |
8 |
9 | def make_headers(keep_alive=None, accept_encoding=None, user_agent=None,
10 | basic_auth=None, proxy_basic_auth=None, disable_cache=None):
11 | """
12 | Shortcuts for generating request headers.
13 |
14 | :param keep_alive:
15 | If ``True``, adds 'connection: keep-alive' header.
16 |
17 | :param accept_encoding:
18 | Can be a boolean, list, or string.
19 | ``True`` translates to 'gzip,deflate'.
20 | List will get joined by comma.
21 | String will be used as provided.
22 |
23 | :param user_agent:
24 | String representing the user-agent you want, such as
25 | "python-urllib3/0.6"
26 |
27 | :param basic_auth:
28 | Colon-separated username:password string for 'authorization: basic ...'
29 | auth header.
30 |
31 | :param proxy_basic_auth:
32 | Colon-separated username:password string for 'proxy-authorization: basic ...'
33 | auth header.
34 |
35 | :param disable_cache:
36 | If ``True``, adds 'cache-control: no-cache' header.
37 |
38 | Example::
39 |
40 | >>> make_headers(keep_alive=True, user_agent="Batman/1.0")
41 | {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'}
42 | >>> make_headers(accept_encoding=True)
43 | {'accept-encoding': 'gzip,deflate'}
44 | """
45 | headers = {}
46 | if accept_encoding:
47 | if isinstance(accept_encoding, str):
48 | pass
49 | elif isinstance(accept_encoding, list):
50 | accept_encoding = ','.join(accept_encoding)
51 | else:
52 | accept_encoding = ACCEPT_ENCODING
53 | headers['accept-encoding'] = accept_encoding
54 |
55 | if user_agent:
56 | headers['user-agent'] = user_agent
57 |
58 | if keep_alive:
59 | headers['connection'] = 'keep-alive'
60 |
61 | if basic_auth:
62 | headers['authorization'] = 'Basic ' + \
63 | b64encode(b(basic_auth)).decode('utf-8')
64 |
65 | if proxy_basic_auth:
66 | headers['proxy-authorization'] = 'Basic ' + \
67 | b64encode(b(proxy_basic_auth)).decode('utf-8')
68 |
69 | if disable_cache:
70 | headers['cache-control'] = 'no-cache'
71 |
72 | return headers
73 |
--------------------------------------------------------------------------------
/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="G:\PycharmProjects\tiaozhanbei\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/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/urllib3/util/response.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 | from ..packages.six.moves import http_client as httplib
3 |
4 | from ..exceptions import HeaderParsingError
5 |
6 |
7 | def is_fp_closed(obj):
8 | """
9 | Checks whether a given file-like object is closed.
10 |
11 | :param obj:
12 | The file-like object to check.
13 | """
14 |
15 | try:
16 | # Check via the official file-like-object way.
17 | return obj.closed
18 | except AttributeError:
19 | pass
20 |
21 | try:
22 | # Check if the object is a container for another file-like object that
23 | # gets released on exhaustion (e.g. HTTPResponse).
24 | return obj.fp is None
25 | except AttributeError:
26 | pass
27 |
28 | raise ValueError("Unable to determine whether fp is closed.")
29 |
30 |
31 | def assert_header_parsing(headers):
32 | """
33 | Asserts whether all headers have been successfully parsed.
34 | Extracts encountered errors from the result of parsing headers.
35 |
36 | Only works on Python 3.
37 |
38 | :param headers: Headers to verify.
39 | :type headers: `httplib.HTTPMessage`.
40 |
41 | :raises urllib3.exceptions.HeaderParsingError:
42 | If parsing errors are found.
43 | """
44 |
45 | # This will fail silently if we pass in the wrong kind of parameter.
46 | # To make debugging easier add an explicit check.
47 | if not isinstance(headers, httplib.HTTPMessage):
48 | raise TypeError('expected httplib.Message, got {0}.'.format(
49 | type(headers)))
50 |
51 | defects = getattr(headers, 'defects', None)
52 | get_payload = getattr(headers, 'get_payload', None)
53 |
54 | unparsed_data = None
55 | if get_payload: # Platform-specific: Python 3.
56 | unparsed_data = get_payload()
57 |
58 | if defects or unparsed_data:
59 | raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data)
60 |
61 |
62 | def is_response_to_head(response):
63 | """
64 | Checks whether the request of a response has been a HEAD-request.
65 | Handles the quirks of AppEngine.
66 |
67 | :param conn:
68 | :type conn: :class:`httplib.HTTPResponse`
69 | """
70 | # FIXME: Can we do this somehow without accessing private httplib _method?
71 | method = response._method
72 | if isinstance(method, int): # Platform-specific: Appengine
73 | return method == 3
74 | return method.upper() == 'HEAD'
75 |
--------------------------------------------------------------------------------
/classCheck2.py:
--------------------------------------------------------------------------------
1 | import cv2
2 | import facecheck
3 | import time
4 | import threading
5 | #import classKQSINGLE
6 | import classKQsearch
7 | import os
8 | from PyQt5 import QtCore, QtGui, QtWidgets
9 | from PyQt5.QtGui import QIcon, QFont, QPixmap, QPainter, QImage
10 | from PyQt5 import QtCore, QtGui, QtWidgets
11 | from PyQt5.QtWidgets import *
12 | from PyQt5.QtGui import *
13 |
14 |
15 | def checkface(capc,ui,conn):
16 |
17 | #i = 0
18 | global failcount
19 | failcount = 0
20 | picpath="G:/tiaozhanbei/baiduapi/checktest/test0"
21 |
22 | #cv2.imshow("capture", frame)
23 | time.sleep(5)
24 | while (1):
25 |
26 | ui.label_11.setText("开始检测!")
27 | #cv2.waitKey(0)
28 | time.sleep(1)
29 | ret, frame = capc.read()
30 | cv2.imwrite(picpath+".jpg", frame)
31 |
32 | face_num = facecheck.fa_check((picpath+".jpg"))
33 |
34 |
35 | if(face_num>0):
36 | ui.label_11.setText("检测成功,开始拍照!")
37 | time.sleep(2)
38 | ret, frame = capc.read()
39 | cv2.imwrite(picpath + ".jpg", frame)
40 | face_num = facecheck.fa_check((picpath + ".jpg"))
41 | print("总共有",face_num,"张人脸")
42 | if(face_num>0):
43 | ui.label_11.setText("拍照成功,开始核实身份!")
44 | failcount = 0
45 | classKQsearch.Classqiandao(picpath + ".jpg",ui,conn)
46 | print("下一个同学!")
47 | time.sleep(5)
48 | continue
49 | else:
50 | print("拍照失败,重新检测")
51 | os.remove(picpath + ".jpg")
52 | time.sleep(5)
53 | continue
54 | else:
55 | print("检测不到人脸,5秒后重新检测")
56 | os.remove(picpath + ".jpg")
57 | time.sleep(5)
58 | continue
59 | #capc.release()
60 | #cv2.destroyAllWindows()
61 |
62 |
63 |
64 |
65 | '''
66 | def view(capv):
67 | while(1):
68 | ret, frame = capv.read()
69 | cv2.imshow("capture", frame)
70 | if cv2.waitKey(1) & 0xFF == ord('q'):
71 | break
72 |
73 | #cap.release()
74 | #cv2.destroyAllWindows()
75 |
76 | '''
77 | '''
78 | def classmain(cap):
79 |
80 | threads = []
81 | t1 = threading.Thread(target=view, args=cap)
82 | threads.append(t1)
83 | t2 = threading.Thread(target=checkface,args=cap)
84 | threads.append(t2)
85 |
86 |
87 | cap = cv2.VideoCapture(0)
88 |
89 | for t in threads:
90 | t.setDaemon(False)
91 | t.start()
92 |
93 | '''
94 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/utils/deprecation.py:
--------------------------------------------------------------------------------
1 | """
2 | A module that implements tooling to enable easy warnings about deprecations.
3 | """
4 | from __future__ import absolute_import
5 |
6 | import logging
7 | import warnings
8 |
9 |
10 | class PipDeprecationWarning(Warning):
11 | pass
12 |
13 |
14 | class Pending(object):
15 | pass
16 |
17 |
18 | class RemovedInPip10Warning(PipDeprecationWarning):
19 | pass
20 |
21 |
22 | class RemovedInPip11Warning(PipDeprecationWarning, Pending):
23 | pass
24 |
25 |
26 | class Python26DeprecationWarning(PipDeprecationWarning):
27 | pass
28 |
29 |
30 | # Warnings <-> Logging Integration
31 |
32 |
33 | _warnings_showwarning = None
34 |
35 |
36 | def _showwarning(message, category, filename, lineno, file=None, line=None):
37 | if file is not None:
38 | if _warnings_showwarning is not None:
39 | _warnings_showwarning(
40 | message, category, filename, lineno, file, line,
41 | )
42 | else:
43 | if issubclass(category, PipDeprecationWarning):
44 | # We use a specially named logger which will handle all of the
45 | # deprecation messages for pip.
46 | logger = logging.getLogger("pip.deprecations")
47 |
48 | # This is purposely using the % formatter here instead of letting
49 | # the logging module handle the interpolation. This is because we
50 | # want it to appear as if someone typed this entire message out.
51 | log_message = "DEPRECATION: %s" % message
52 |
53 | # PipDeprecationWarnings that are Pending still have at least 2
54 | # versions to go until they are removed so they can just be
55 | # warnings. Otherwise, they will be removed in the very next
56 | # version of pip. We want these to be more obvious so we use the
57 | # ERROR logging level.
58 | if issubclass(category, Pending):
59 | logger.warning(log_message)
60 | else:
61 | logger.error(log_message)
62 | else:
63 | _warnings_showwarning(
64 | message, category, filename, lineno, file, line,
65 | )
66 |
67 |
68 | def install_warning_logger():
69 | # Enable our Deprecation Warnings
70 | warnings.simplefilter("default", PipDeprecationWarning, append=True)
71 |
72 | global _warnings_showwarning
73 |
74 | if _warnings_showwarning is None:
75 | _warnings_showwarning = warnings.showwarning
76 | warnings.showwarning = _showwarning
77 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/chardet/codingstatemachine.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is mozilla.org code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 1998
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | #
12 | # This library is free software; you can redistribute it and/or
13 | # modify it under the terms of the GNU Lesser General Public
14 | # License as published by the Free Software Foundation; either
15 | # version 2.1 of the License, or (at your option) any later version.
16 | #
17 | # This library is distributed in the hope that it will be useful,
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 | # Lesser General Public License for more details.
21 | #
22 | # You should have received a copy of the GNU Lesser General Public
23 | # License along with this library; if not, write to the Free Software
24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 | # 02110-1301 USA
26 | ######################### END LICENSE BLOCK #########################
27 |
28 | from .constants import eStart
29 | from .compat import wrap_ord
30 |
31 |
32 | class CodingStateMachine:
33 | def __init__(self, sm):
34 | self._mModel = sm
35 | self._mCurrentBytePos = 0
36 | self._mCurrentCharLen = 0
37 | self.reset()
38 |
39 | def reset(self):
40 | self._mCurrentState = eStart
41 |
42 | def next_state(self, c):
43 | # for each byte we get its class
44 | # if it is first byte, we also get byte length
45 | # PY3K: aBuf is a byte stream, so c is an int, not a byte
46 | byteCls = self._mModel['classTable'][wrap_ord(c)]
47 | if self._mCurrentState == eStart:
48 | self._mCurrentBytePos = 0
49 | self._mCurrentCharLen = self._mModel['charLenTable'][byteCls]
50 | # from byte's class and stateTable, we get its next state
51 | curr_state = (self._mCurrentState * self._mModel['classFactor']
52 | + byteCls)
53 | self._mCurrentState = self._mModel['stateTable'][curr_state]
54 | self._mCurrentBytePos += 1
55 | return self._mCurrentState
56 |
57 | def get_current_charlen(self):
58 | return self._mCurrentCharLen
59 |
60 | def get_coding_state_machine(self):
61 | return self._mModel['name']
62 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/html5lib/treewalkers/genshi.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from genshi.core import QName
4 | from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT
5 | from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT
6 |
7 | from . import base
8 |
9 | from ..constants import voidElements, namespaces
10 |
11 |
12 | class TreeWalker(base.TreeWalker):
13 | def __iter__(self):
14 | # Buffer the events so we can pass in the following one
15 | previous = None
16 | for event in self.tree:
17 | if previous is not None:
18 | for token in self.tokens(previous, event):
19 | yield token
20 | previous = event
21 |
22 | # Don't forget the final event!
23 | if previous is not None:
24 | for token in self.tokens(previous, None):
25 | yield token
26 |
27 | def tokens(self, event, next):
28 | kind, data, _ = event
29 | if kind == START:
30 | tag, attribs = data
31 | name = tag.localname
32 | namespace = tag.namespace
33 | converted_attribs = {}
34 | for k, v in attribs:
35 | if isinstance(k, QName):
36 | converted_attribs[(k.namespace, k.localname)] = v
37 | else:
38 | converted_attribs[(None, k)] = v
39 |
40 | if namespace == namespaces["html"] and name in voidElements:
41 | for token in self.emptyTag(namespace, name, converted_attribs,
42 | not next or next[0] != END or
43 | next[1] != tag):
44 | yield token
45 | else:
46 | yield self.startTag(namespace, name, converted_attribs)
47 |
48 | elif kind == END:
49 | name = data.localname
50 | namespace = data.namespace
51 | if namespace != namespaces["html"] or name not in voidElements:
52 | yield self.endTag(namespace, name)
53 |
54 | elif kind == COMMENT:
55 | yield self.comment(data)
56 |
57 | elif kind == TEXT:
58 | for token in self.text(data):
59 | yield token
60 |
61 | elif kind == DOCTYPE:
62 | yield self.doctype(*data)
63 |
64 | elif kind in (XML_NAMESPACE, DOCTYPE, START_NS, END_NS,
65 | START_CDATA, END_CDATA, PI):
66 | pass
67 |
68 | else:
69 | yield self.unknown(kind)
70 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/commands/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | Package containing all pip commands
3 | """
4 | from __future__ import absolute_import
5 |
6 | from pip.commands.completion import CompletionCommand
7 | from pip.commands.download import DownloadCommand
8 | from pip.commands.freeze import FreezeCommand
9 | from pip.commands.hash import HashCommand
10 | from pip.commands.help import HelpCommand
11 | from pip.commands.list import ListCommand
12 | from pip.commands.check import CheckCommand
13 | from pip.commands.search import SearchCommand
14 | from pip.commands.show import ShowCommand
15 | from pip.commands.install import InstallCommand
16 | from pip.commands.uninstall import UninstallCommand
17 | from pip.commands.wheel import WheelCommand
18 |
19 |
20 | commands_dict = {
21 | CompletionCommand.name: CompletionCommand,
22 | FreezeCommand.name: FreezeCommand,
23 | HashCommand.name: HashCommand,
24 | HelpCommand.name: HelpCommand,
25 | SearchCommand.name: SearchCommand,
26 | ShowCommand.name: ShowCommand,
27 | InstallCommand.name: InstallCommand,
28 | UninstallCommand.name: UninstallCommand,
29 | DownloadCommand.name: DownloadCommand,
30 | ListCommand.name: ListCommand,
31 | CheckCommand.name: CheckCommand,
32 | WheelCommand.name: WheelCommand,
33 | }
34 |
35 |
36 | commands_order = [
37 | InstallCommand,
38 | DownloadCommand,
39 | UninstallCommand,
40 | FreezeCommand,
41 | ListCommand,
42 | ShowCommand,
43 | CheckCommand,
44 | SearchCommand,
45 | WheelCommand,
46 | HashCommand,
47 | CompletionCommand,
48 | HelpCommand,
49 | ]
50 |
51 |
52 | def get_summaries(ordered=True):
53 | """Yields sorted (command name, command summary) tuples."""
54 |
55 | if ordered:
56 | cmditems = _sort_commands(commands_dict, commands_order)
57 | else:
58 | cmditems = commands_dict.items()
59 |
60 | for name, command_class in cmditems:
61 | yield (name, command_class.summary)
62 |
63 |
64 | def get_similar_commands(name):
65 | """Command name auto-correct."""
66 | from difflib import get_close_matches
67 |
68 | name = name.lower()
69 |
70 | close_commands = get_close_matches(name, commands_dict.keys())
71 |
72 | if close_commands:
73 | return close_commands[0]
74 | else:
75 | return False
76 |
77 |
78 | def _sort_commands(cmddict, order):
79 | def keyfn(key):
80 | try:
81 | return order.index(key[1])
82 | except ValueError:
83 | # unordered items should come last
84 | return 0xff
85 |
86 | return sorted(cmddict.items(), key=keyfn)
87 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/__init__.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # __
4 | # /__) _ _ _ _ _/ _
5 | # / ( (- (/ (/ (- _) / _)
6 | # /
7 |
8 | """
9 | Requests HTTP library
10 | ~~~~~~~~~~~~~~~~~~~~~
11 |
12 | Requests is an HTTP library, written in Python, for human beings. Basic GET
13 | usage:
14 |
15 | >>> import requests
16 | >>> r = requests.get('https://www.python.org')
17 | >>> r.status_code
18 | 200
19 | >>> 'Python is a programming language' in r.content
20 | True
21 |
22 | ... or POST:
23 |
24 | >>> payload = dict(key1='value1', key2='value2')
25 | >>> r = requests.post('http://httpbin.org/post', data=payload)
26 | >>> print(r.text)
27 | {
28 | ...
29 | "form": {
30 | "key2": "value2",
31 | "key1": "value1"
32 | },
33 | ...
34 | }
35 |
36 | The other HTTP methods are supported - see `requests.api`. Full documentation
37 | is at .
38 |
39 | :copyright: (c) 2016 by Kenneth Reitz.
40 | :license: Apache 2.0, see LICENSE for more details.
41 | """
42 |
43 | __title__ = 'requests'
44 | __version__ = '2.11.1'
45 | __build__ = 0x021101
46 | __author__ = 'Kenneth Reitz'
47 | __license__ = 'Apache 2.0'
48 | __copyright__ = 'Copyright 2016 Kenneth Reitz'
49 |
50 | # Attempt to enable urllib3's SNI support, if possible
51 | # Note: Patched by pip to prevent using the PyOpenSSL module. On Windows this
52 | # prevents upgrading cryptography.
53 | # try:
54 | # from .packages.urllib3.contrib import pyopenssl
55 | # pyopenssl.inject_into_urllib3()
56 | # except ImportError:
57 | # pass
58 |
59 | import warnings
60 |
61 | # urllib3's DependencyWarnings should be silenced.
62 | from .packages.urllib3.exceptions import DependencyWarning
63 | warnings.simplefilter('ignore', DependencyWarning)
64 |
65 | from . import utils
66 | from .models import Request, Response, PreparedRequest
67 | from .api import request, get, head, post, patch, put, delete, options
68 | from .sessions import session, Session
69 | from .status_codes import codes
70 | from .exceptions import (
71 | RequestException, Timeout, URLRequired,
72 | TooManyRedirects, HTTPError, ConnectionError,
73 | FileModeWarning, ConnectTimeout, ReadTimeout
74 | )
75 |
76 | # Set default logging handler to avoid "No handler found" warnings.
77 | import logging
78 | try: # Python 2.7+
79 | from logging import NullHandler
80 | except ImportError:
81 | class NullHandler(logging.Handler):
82 | def emit(self, record):
83 | pass
84 |
85 | logging.getLogger(__name__).addHandler(NullHandler())
86 |
87 | # FileModeWarnings go off per the default.
88 | warnings.simplefilter('default', FileModeWarning, append=True)
89 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/urllib3/filepost.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 | import codecs
3 |
4 | from uuid import uuid4
5 | from io import BytesIO
6 |
7 | from .packages import six
8 | from .packages.six import b
9 | from .fields import RequestField
10 |
11 | writer = codecs.lookup('utf-8')[3]
12 |
13 |
14 | def choose_boundary():
15 | """
16 | Our embarassingly-simple replacement for mimetools.choose_boundary.
17 | """
18 | return uuid4().hex
19 |
20 |
21 | def iter_field_objects(fields):
22 | """
23 | Iterate over fields.
24 |
25 | Supports list of (k, v) tuples and dicts, and lists of
26 | :class:`~urllib3.fields.RequestField`.
27 |
28 | """
29 | if isinstance(fields, dict):
30 | i = six.iteritems(fields)
31 | else:
32 | i = iter(fields)
33 |
34 | for field in i:
35 | if isinstance(field, RequestField):
36 | yield field
37 | else:
38 | yield RequestField.from_tuples(*field)
39 |
40 |
41 | def iter_fields(fields):
42 | """
43 | .. deprecated:: 1.6
44 |
45 | Iterate over fields.
46 |
47 | The addition of :class:`~urllib3.fields.RequestField` makes this function
48 | obsolete. Instead, use :func:`iter_field_objects`, which returns
49 | :class:`~urllib3.fields.RequestField` objects.
50 |
51 | Supports list of (k, v) tuples and dicts.
52 | """
53 | if isinstance(fields, dict):
54 | return ((k, v) for k, v in six.iteritems(fields))
55 |
56 | return ((k, v) for k, v in fields)
57 |
58 |
59 | def encode_multipart_formdata(fields, boundary=None):
60 | """
61 | Encode a dictionary of ``fields`` using the multipart/form-data MIME format.
62 |
63 | :param fields:
64 | Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`).
65 |
66 | :param boundary:
67 | If not specified, then a random boundary will be generated using
68 | :func:`mimetools.choose_boundary`.
69 | """
70 | body = BytesIO()
71 | if boundary is None:
72 | boundary = choose_boundary()
73 |
74 | for field in iter_field_objects(fields):
75 | body.write(b('--%s\r\n' % (boundary)))
76 |
77 | writer(body).write(field.render_headers())
78 | data = field.data
79 |
80 | if isinstance(data, int):
81 | data = str(data) # Backwards compatibility
82 |
83 | if isinstance(data, six.text_type):
84 | writer(body).write(data)
85 | else:
86 | body.write(data)
87 |
88 | body.write(b'\r\n')
89 |
90 | body.write(b('--%s--\r\n' % (boundary)))
91 |
92 | content_type = str('multipart/form-data; boundary=%s' % boundary)
93 |
94 | return body.getvalue(), content_type
95 |
--------------------------------------------------------------------------------
/float.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Form implementation generated from reading ui file 'float.ui'
4 | #
5 | # Created by: PyQt5 UI code generator 5.6
6 | #
7 | # WARNING! All changes made in this file will be lost!
8 |
9 | from PyQt5 import QtCore, QtGui, QtWidgets
10 | from PyQt5.QtGui import *
11 |
12 | import sys
13 |
14 | class Ui_Dialogfloat(object):
15 | def setupUi(self, Dialog):
16 | Dialog.setObjectName("Dialog")
17 | Dialog.resize(1133, 824)
18 | self.label = QtWidgets.QLabel(Dialog)
19 | self.label.setGeometry(QtCore.QRect(60, 100, 511, 191))
20 | self.label.setObjectName("label")
21 | self.label_2 = QtWidgets.QLabel(Dialog)
22 | self.label_2.setGeometry(QtCore.QRect(150, 290, 871, 161))
23 | self.label_2.setObjectName("label_2")
24 | self.label_3 = QtWidgets.QLabel(Dialog)
25 | self.label_3.setGeometry(QtCore.QRect(420, 460, 381, 101))
26 | self.label_3.setObjectName("label_3")
27 |
28 | self.retranslateUi(Dialog)
29 | QtCore.QMetaObject.connectSlotsByName(Dialog)
30 |
31 | self.beijing = QtWidgets.QLabel(Dialog)
32 | self.beijing.setGeometry(QtCore.QRect(0, 0, 1197, 850))
33 | self.beijing.setText("")
34 | self.beijing.setObjectName("beijing")
35 | self.beijing.raise_()
36 | self.label.raise_()
37 | self.label_2.raise_()
38 | self.label_3.raise_()
39 |
40 | pix = QPixmap('G:/tiaozhanbei/beijing4.jpg')
41 | self.beijing.setPixmap(pix)
42 |
43 |
44 |
45 | def retranslateUi(self, Dialog):
46 | _translate = QtCore.QCoreApplication.translate
47 | Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
48 | self.label.setText(_translate("Dialog", "现在正在进行的是:
"))
49 | self.label_2.setText(_translate("Dialog", "毛泽东思想和中国特色社会主义理论体系概论
"))
50 | self.label_3.setText(_translate("Dialog", "软件工程1164
"))
51 | self.label.setFont(QFont("Microsoft YaHei"))
52 | self.label.setStyleSheet("color:white")
53 | self.label_2.setFont(QFont("Microsoft YaHei"))
54 | self.label_2.setStyleSheet("color:white")
55 | self.label_3.setFont(QFont("Microsoft YaHei"))
56 | self.label_3.setStyleSheet("color:white")
57 |
58 |
59 |
60 |
61 | if __name__ == '__main__':
62 |
63 | app = QtWidgets.QApplication(sys.argv)
64 | MainWindow = QtWidgets.QDialog()
65 | ui = Ui_Dialogfloat()
66 | ui.setupUi(MainWindow)
67 | MainWindow.show()
68 | sys.exit(app.exec_())
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/commands/completion.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | import sys
4 | from pip.basecommand import Command
5 |
6 | BASE_COMPLETION = """
7 | # pip %(shell)s completion start%(script)s# pip %(shell)s completion end
8 | """
9 |
10 | COMPLETION_SCRIPTS = {
11 | 'bash': """
12 | _pip_completion()
13 | {
14 | COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\
15 | COMP_CWORD=$COMP_CWORD \\
16 | PIP_AUTO_COMPLETE=1 $1 ) )
17 | }
18 | complete -o default -F _pip_completion pip
19 | """, 'zsh': """
20 | function _pip_completion {
21 | local words cword
22 | read -Ac words
23 | read -cn cword
24 | reply=( $( COMP_WORDS="$words[*]" \\
25 | COMP_CWORD=$(( cword-1 )) \\
26 | PIP_AUTO_COMPLETE=1 $words[1] ) )
27 | }
28 | compctl -K _pip_completion pip
29 | """, 'fish': """
30 | function __fish_complete_pip
31 | set -lx COMP_WORDS (commandline -o) ""
32 | set -lx COMP_CWORD (math (contains -i -- (commandline -t) $COMP_WORDS)-1)
33 | set -lx PIP_AUTO_COMPLETE 1
34 | string split \ -- (eval $COMP_WORDS[1])
35 | end
36 | complete -fa "(__fish_complete_pip)" -c pip
37 | """}
38 |
39 |
40 | class CompletionCommand(Command):
41 | """A helper command to be used for command completion."""
42 | name = 'completion'
43 | summary = 'A helper command used for command completion.'
44 |
45 | def __init__(self, *args, **kw):
46 | super(CompletionCommand, self).__init__(*args, **kw)
47 |
48 | cmd_opts = self.cmd_opts
49 |
50 | cmd_opts.add_option(
51 | '--bash', '-b',
52 | action='store_const',
53 | const='bash',
54 | dest='shell',
55 | help='Emit completion code for bash')
56 | cmd_opts.add_option(
57 | '--zsh', '-z',
58 | action='store_const',
59 | const='zsh',
60 | dest='shell',
61 | help='Emit completion code for zsh')
62 | cmd_opts.add_option(
63 | '--fish', '-f',
64 | action='store_const',
65 | const='fish',
66 | dest='shell',
67 | help='Emit completion code for fish')
68 |
69 | self.parser.insert_option_group(0, cmd_opts)
70 |
71 | def run(self, options, args):
72 | """Prints the completion code of the given shell"""
73 | shells = COMPLETION_SCRIPTS.keys()
74 | shell_options = ['--' + shell for shell in sorted(shells)]
75 | if options.shell in shells:
76 | script = COMPLETION_SCRIPTS.get(options.shell, '')
77 | print(BASE_COMPLETION % {'script': script, 'shell': options.shell})
78 | else:
79 | sys.stderr.write(
80 | 'ERROR: You must pass %s\n' % ' or '.join(shell_options)
81 | )
82 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/EGG-INFO/PKG-INFO:
--------------------------------------------------------------------------------
1 | Metadata-Version: 1.2
2 | Name: pip
3 | Version: 9.0.1
4 | Summary: The PyPA recommended tool for installing Python packages.
5 | Home-page: https://pip.pypa.io/
6 | Author: The pip developers
7 | Author-email: python-virtualenv@groups.google.com
8 | License: MIT
9 | Description: pip
10 | ===
11 |
12 | The `PyPA recommended
13 | `_
14 | tool for installing Python packages.
15 |
16 | * `Installation `_
17 | * `Documentation `_
18 | * `Changelog `_
19 | * `Github Page `_
20 | * `Issue Tracking `_
21 | * `User mailing list `_
22 | * `Dev mailing list `_
23 | * User IRC: #pypa on Freenode.
24 | * Dev IRC: #pypa-dev on Freenode.
25 |
26 |
27 | .. image:: https://img.shields.io/pypi/v/pip.svg
28 | :target: https://pypi.python.org/pypi/pip
29 |
30 | .. image:: https://img.shields.io/travis/pypa/pip/master.svg
31 | :target: http://travis-ci.org/pypa/pip
32 |
33 | .. image:: https://img.shields.io/appveyor/ci/pypa/pip.svg
34 | :target: https://ci.appveyor.com/project/pypa/pip/history
35 |
36 | .. image:: https://readthedocs.org/projects/pip/badge/?version=stable
37 | :target: https://pip.pypa.io/en/stable
38 |
39 | Code of Conduct
40 | ---------------
41 |
42 | Everyone interacting in the pip project's codebases, issue trackers, chat
43 | rooms, and mailing lists is expected to follow the `PyPA Code of Conduct`_.
44 |
45 | .. _PyPA Code of Conduct: https://www.pypa.io/en/latest/code-of-conduct/
46 |
47 | Keywords: easy_install distutils setuptools egg virtualenv
48 | Platform: UNKNOWN
49 | Classifier: Development Status :: 5 - Production/Stable
50 | Classifier: Intended Audience :: Developers
51 | Classifier: License :: OSI Approved :: MIT License
52 | Classifier: Topic :: Software Development :: Build Tools
53 | Classifier: Programming Language :: Python :: 2
54 | Classifier: Programming Language :: Python :: 2.6
55 | Classifier: Programming Language :: Python :: 2.7
56 | Classifier: Programming Language :: Python :: 3
57 | Classifier: Programming Language :: Python :: 3.3
58 | Classifier: Programming Language :: Python :: 3.4
59 | Classifier: Programming Language :: Python :: 3.5
60 | Classifier: Programming Language :: Python :: Implementation :: PyPy
61 | Requires-Python: >=2.6,!=3.0.*,!=3.1.*,!=3.2.*
62 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/chardet/chardetect.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """
3 | Script which takes one or more file paths and reports on their detected
4 | encodings
5 |
6 | Example::
7 |
8 | % chardetect somefile someotherfile
9 | somefile: windows-1252 with confidence 0.5
10 | someotherfile: ascii with confidence 1.0
11 |
12 | If no paths are provided, it takes its input from stdin.
13 |
14 | """
15 |
16 | from __future__ import absolute_import, print_function, unicode_literals
17 |
18 | import argparse
19 | import sys
20 | from io import open
21 |
22 | from chardet import __version__
23 | from chardet.universaldetector import UniversalDetector
24 |
25 |
26 | def description_of(lines, name='stdin'):
27 | """
28 | Return a string describing the probable encoding of a file or
29 | list of strings.
30 |
31 | :param lines: The lines to get the encoding of.
32 | :type lines: Iterable of bytes
33 | :param name: Name of file or collection of lines
34 | :type name: str
35 | """
36 | u = UniversalDetector()
37 | for line in lines:
38 | u.feed(line)
39 | u.close()
40 | result = u.result
41 | if result['encoding']:
42 | return '{0}: {1} with confidence {2}'.format(name, result['encoding'],
43 | result['confidence'])
44 | else:
45 | return '{0}: no result'.format(name)
46 |
47 |
48 | def main(argv=None):
49 | '''
50 | Handles command line arguments and gets things started.
51 |
52 | :param argv: List of arguments, as if specified on the command-line.
53 | If None, ``sys.argv[1:]`` is used instead.
54 | :type argv: list of str
55 | '''
56 | # Get command line arguments
57 | parser = argparse.ArgumentParser(
58 | description="Takes one or more file paths and reports their detected \
59 | encodings",
60 | formatter_class=argparse.ArgumentDefaultsHelpFormatter,
61 | conflict_handler='resolve')
62 | parser.add_argument('input',
63 | help='File whose encoding we would like to determine.',
64 | type=argparse.FileType('rb'), nargs='*',
65 | default=[sys.stdin])
66 | parser.add_argument('--version', action='version',
67 | version='%(prog)s {0}'.format(__version__))
68 | args = parser.parse_args(argv)
69 |
70 | for f in args.input:
71 | if f.isatty():
72 | print("You are running chardetect interactively. Press " +
73 | "CTRL-D twice at the start of a blank line to signal the " +
74 | "end of your input. If you want help, run chardetect " +
75 | "--help\n", file=sys.stderr)
76 | print(description_of(f, f.name))
77 |
78 |
79 | if __name__ == '__main__':
80 | main()
81 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/cachecontrol/filewrapper.py:
--------------------------------------------------------------------------------
1 | from io import BytesIO
2 |
3 |
4 | class CallbackFileWrapper(object):
5 | """
6 | Small wrapper around a fp object which will tee everything read into a
7 | buffer, and when that file is closed it will execute a callback with the
8 | contents of that buffer.
9 |
10 | All attributes are proxied to the underlying file object.
11 |
12 | This class uses members with a double underscore (__) leading prefix so as
13 | not to accidentally shadow an attribute.
14 | """
15 |
16 | def __init__(self, fp, callback):
17 | self.__buf = BytesIO()
18 | self.__fp = fp
19 | self.__callback = callback
20 |
21 | def __getattr__(self, name):
22 | # The vaguaries of garbage collection means that self.__fp is
23 | # not always set. By using __getattribute__ and the private
24 | # name[0] allows looking up the attribute value and raising an
25 | # AttributeError when it doesn't exist. This stop thigns from
26 | # infinitely recursing calls to getattr in the case where
27 | # self.__fp hasn't been set.
28 | #
29 | # [0] https://docs.python.org/2/reference/expressions.html#atom-identifiers
30 | fp = self.__getattribute__('_CallbackFileWrapper__fp')
31 | return getattr(fp, name)
32 |
33 | def __is_fp_closed(self):
34 | try:
35 | return self.__fp.fp is None
36 | except AttributeError:
37 | pass
38 |
39 | try:
40 | return self.__fp.closed
41 | except AttributeError:
42 | pass
43 |
44 | # We just don't cache it then.
45 | # TODO: Add some logging here...
46 | return False
47 |
48 | def _close(self):
49 | if self.__callback:
50 | self.__callback(self.__buf.getvalue())
51 |
52 | # We assign this to None here, because otherwise we can get into
53 | # really tricky problems where the CPython interpreter dead locks
54 | # because the callback is holding a reference to something which
55 | # has a __del__ method. Setting this to None breaks the cycle
56 | # and allows the garbage collector to do it's thing normally.
57 | self.__callback = None
58 |
59 | def read(self, amt=None):
60 | data = self.__fp.read(amt)
61 | self.__buf.write(data)
62 | if self.__is_fp_closed():
63 | self._close()
64 |
65 | return data
66 |
67 | def _safe_read(self, amt):
68 | data = self.__fp._safe_read(amt)
69 | if amt == 2 and data == b'\r\n':
70 | # urllib executes this read to toss the CRLF at the end
71 | # of the chunk.
72 | return data
73 |
74 | self.__buf.write(data)
75 | if self.__is_fp_closed():
76 | self._close()
77 |
78 | return data
79 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/lockfile/symlinklockfile.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | import os
4 | import time
5 |
6 | from . import (LockBase, NotLocked, NotMyLock, LockTimeout,
7 | AlreadyLocked)
8 |
9 |
10 | class SymlinkLockFile(LockBase):
11 | """Lock access to a file using symlink(2)."""
12 |
13 | def __init__(self, path, threaded=True, timeout=None):
14 | # super(SymlinkLockFile).__init(...)
15 | LockBase.__init__(self, path, threaded, timeout)
16 | # split it back!
17 | self.unique_name = os.path.split(self.unique_name)[1]
18 |
19 | def acquire(self, timeout=None):
20 | # Hopefully unnecessary for symlink.
21 | # try:
22 | # open(self.unique_name, "wb").close()
23 | # except IOError:
24 | # raise LockFailed("failed to create %s" % self.unique_name)
25 | timeout = timeout if timeout is not None else self.timeout
26 | end_time = time.time()
27 | if timeout is not None and timeout > 0:
28 | end_time += timeout
29 |
30 | while True:
31 | # Try and create a symbolic link to it.
32 | try:
33 | os.symlink(self.unique_name, self.lock_file)
34 | except OSError:
35 | # Link creation failed. Maybe we've double-locked?
36 | if self.i_am_locking():
37 | # Linked to out unique name. Proceed.
38 | return
39 | else:
40 | # Otherwise the lock creation failed.
41 | if timeout is not None and time.time() > end_time:
42 | if timeout > 0:
43 | raise LockTimeout("Timeout waiting to acquire"
44 | " lock for %s" %
45 | self.path)
46 | else:
47 | raise AlreadyLocked("%s is already locked" %
48 | self.path)
49 | time.sleep(timeout / 10 if timeout is not None else 0.1)
50 | else:
51 | # Link creation succeeded. We're good to go.
52 | return
53 |
54 | def release(self):
55 | if not self.is_locked():
56 | raise NotLocked("%s is not locked" % self.path)
57 | elif not self.i_am_locking():
58 | raise NotMyLock("%s is locked, but not by me" % self.path)
59 | os.unlink(self.lock_file)
60 |
61 | def is_locked(self):
62 | return os.path.islink(self.lock_file)
63 |
64 | def i_am_locking(self):
65 | return (os.path.islink(self.lock_file)
66 | and os.readlink(self.lock_file) == self.unique_name)
67 |
68 | def break_lock(self):
69 | if os.path.islink(self.lock_file): # exists && link
70 | os.unlink(self.lock_file)
71 |
--------------------------------------------------------------------------------
/123123.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 | # toolchains options
4 | ARCH='arm'
5 | CPU='cortex-m3'
6 | CROSS_TOOL='gcc'
7 |
8 | # bsp lib config
9 | BSP_LIBRARY_TYPE = None
10 |
11 | if os.getenv('RTT_CC'):
12 | CROSS_TOOL = os.getenv('RTT_CC')
13 | if os.getenv('RTT_ROOT'):
14 | RTT_ROOT = os.getenv('RTT_ROOT')
15 |
16 | # cross_tool provides the cross compiler
17 | # EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
18 | if CROSS_TOOL == 'gcc':
19 | PLATFORM = 'gcc'
20 | EXEC_PATH = r'C:\Users\XXYYZZ'
21 | elif CROSS_TOOL == 'keil':
22 | PLATFORM = 'armcc'
23 | EXEC_PATH = r'C:/Keil_v5'
24 | elif CROSS_TOOL == 'iar':
25 | PLATFORM = 'iar'
26 | EXEC_PATH = r'C:/Program Files (x86)/IAR Systems/Embedded Workbench 8.0'
27 |
28 | if os.getenv('RTT_EXEC_PATH'):
29 | EXEC_PATH = os.getenv('RTT_EXEC_PATH')
30 |
31 | BUILD = 'debug'
32 |
33 | if PLATFORM == 'gcc':
34 | # toolchains
35 | PREFIX = 'arm-none-eabi-'
36 | CC = PREFIX + 'gcc'
37 | AS = PREFIX + 'gcc'
38 | AR = PREFIX + 'ar'
39 | CXX = PREFIX + 'g++'
40 | LINK = PREFIX + 'gcc'
41 | TARGET_EXT = 'elf'
42 | SIZE = PREFIX + 'size'
43 | OBJDUMP = PREFIX + 'objdump'
44 | OBJCPY = PREFIX + 'objcopy'
45 |
46 | DEVICE = ' -mcpu=cortex-m3 -mthumb -ffunction-sections -fdata-sections'
47 | CFLAGS = DEVICE + ' -Dgcc'
48 | AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb '
49 | LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds'
50 |
51 | CPATH = ''
52 | LPATH = ''
53 |
54 | if BUILD == 'debug':
55 | CFLAGS += ' -O0 -gdwarf-2 -g'
56 | AFLAGS += ' -gdwarf-2'
57 | else:
58 | CFLAGS += ' -O2'
59 |
60 | CXXFLAGS = CFLAGS
61 |
62 | POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
63 |
64 | elif PLATFORM == 'armcc':
65 | # toolchains
66 | CC = 'armcc'
67 | CXX = 'armcc'
68 | AS = 'armasm'
69 | AR = 'armar'
70 | LINK = 'armlink'
71 | TARGET_EXT = 'axf'
72 |
73 | DEVICE = ' --cpu Cortex-M3 '
74 | CFLAGS = '-c ' + DEVICE + ' --apcs=interwork --c99'
75 | AFLAGS = DEVICE + ' --apcs=interwork '
76 | LFLAGS = DEVICE + ' --scatter "board\linker_scripts\link.sct" --info sizes --info totals --info unused --info veneers --list rt-thread.map --strict'
77 | CFLAGS += ' -I' + EXEC_PATH + '/ARM/ARMCC/include'
78 | LFLAGS += ' --libpath=' + EXEC_PATH + '/ARM/ARMCC/lib'
79 |
80 | CFLAGS += ' -D__MICROLIB '
81 | AFLAGS += ' --pd "__MICROLIB SETA 1" '
82 | LFLAGS += ' --library_type=microlib '
83 | EXEC_PATH += '/ARM/ARMCC/bin/'
84 |
85 | if BUILD == 'debug':
86 | CFLAGS += ' -g -O0'
87 | AFLAGS += ' -g'
88 | else:
89 | CFLAGS += ' -O2'
90 |
91 |
92 | CXXFLAGS = CFLAGS
93 | CFLAGS += ' -std=c99'
94 |
95 | POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/lockfile/linklockfile.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | import time
4 | import os
5 |
6 | from . import (LockBase, LockFailed, NotLocked, NotMyLock, LockTimeout,
7 | AlreadyLocked)
8 |
9 |
10 | class LinkLockFile(LockBase):
11 | """Lock access to a file using atomic property of link(2).
12 |
13 | >>> lock = LinkLockFile('somefile')
14 | >>> lock = LinkLockFile('somefile', threaded=False)
15 | """
16 |
17 | def acquire(self, timeout=None):
18 | try:
19 | open(self.unique_name, "wb").close()
20 | except IOError:
21 | raise LockFailed("failed to create %s" % self.unique_name)
22 |
23 | timeout = timeout if timeout is not None else self.timeout
24 | end_time = time.time()
25 | if timeout is not None and timeout > 0:
26 | end_time += timeout
27 |
28 | while True:
29 | # Try and create a hard link to it.
30 | try:
31 | os.link(self.unique_name, self.lock_file)
32 | except OSError:
33 | # Link creation failed. Maybe we've double-locked?
34 | nlinks = os.stat(self.unique_name).st_nlink
35 | if nlinks == 2:
36 | # The original link plus the one I created == 2. We're
37 | # good to go.
38 | return
39 | else:
40 | # Otherwise the lock creation failed.
41 | if timeout is not None and time.time() > end_time:
42 | os.unlink(self.unique_name)
43 | if timeout > 0:
44 | raise LockTimeout("Timeout waiting to acquire"
45 | " lock for %s" %
46 | self.path)
47 | else:
48 | raise AlreadyLocked("%s is already locked" %
49 | self.path)
50 | time.sleep(timeout is not None and timeout / 10 or 0.1)
51 | else:
52 | # Link creation succeeded. We're good to go.
53 | return
54 |
55 | def release(self):
56 | if not self.is_locked():
57 | raise NotLocked("%s is not locked" % self.path)
58 | elif not os.path.exists(self.unique_name):
59 | raise NotMyLock("%s is locked, but not by me" % self.path)
60 | os.unlink(self.unique_name)
61 | os.unlink(self.lock_file)
62 |
63 | def is_locked(self):
64 | return os.path.exists(self.lock_file)
65 |
66 | def i_am_locking(self):
67 | return (self.is_locked() and
68 | os.path.exists(self.unique_name) and
69 | os.stat(self.unique_name).st_nlink == 2)
70 |
71 | def break_lock(self):
72 | if os.path.exists(self.lock_file):
73 | os.unlink(self.lock_file)
74 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/distlib/_backport/sysconfig.cfg:
--------------------------------------------------------------------------------
1 | [posix_prefix]
2 | # Configuration directories. Some of these come straight out of the
3 | # configure script. They are for implementing the other variables, not to
4 | # be used directly in [resource_locations].
5 | confdir = /etc
6 | datadir = /usr/share
7 | libdir = /usr/lib
8 | statedir = /var
9 | # User resource directory
10 | local = ~/.local/{distribution.name}
11 |
12 | stdlib = {base}/lib/python{py_version_short}
13 | platstdlib = {platbase}/lib/python{py_version_short}
14 | purelib = {base}/lib/python{py_version_short}/site-packages
15 | platlib = {platbase}/lib/python{py_version_short}/site-packages
16 | include = {base}/include/python{py_version_short}{abiflags}
17 | platinclude = {platbase}/include/python{py_version_short}{abiflags}
18 | data = {base}
19 |
20 | [posix_home]
21 | stdlib = {base}/lib/python
22 | platstdlib = {base}/lib/python
23 | purelib = {base}/lib/python
24 | platlib = {base}/lib/python
25 | include = {base}/include/python
26 | platinclude = {base}/include/python
27 | scripts = {base}/bin
28 | data = {base}
29 |
30 | [nt]
31 | stdlib = {base}/Lib
32 | platstdlib = {base}/Lib
33 | purelib = {base}/Lib/site-packages
34 | platlib = {base}/Lib/site-packages
35 | include = {base}/Include
36 | platinclude = {base}/Include
37 | scripts = {base}/Scripts
38 | data = {base}
39 |
40 | [os2]
41 | stdlib = {base}/Lib
42 | platstdlib = {base}/Lib
43 | purelib = {base}/Lib/site-packages
44 | platlib = {base}/Lib/site-packages
45 | include = {base}/Include
46 | platinclude = {base}/Include
47 | scripts = {base}/Scripts
48 | data = {base}
49 |
50 | [os2_home]
51 | stdlib = {userbase}/lib/python{py_version_short}
52 | platstdlib = {userbase}/lib/python{py_version_short}
53 | purelib = {userbase}/lib/python{py_version_short}/site-packages
54 | platlib = {userbase}/lib/python{py_version_short}/site-packages
55 | include = {userbase}/include/python{py_version_short}
56 | scripts = {userbase}/bin
57 | data = {userbase}
58 |
59 | [nt_user]
60 | stdlib = {userbase}/Python{py_version_nodot}
61 | platstdlib = {userbase}/Python{py_version_nodot}
62 | purelib = {userbase}/Python{py_version_nodot}/site-packages
63 | platlib = {userbase}/Python{py_version_nodot}/site-packages
64 | include = {userbase}/Python{py_version_nodot}/Include
65 | scripts = {userbase}/Scripts
66 | data = {userbase}
67 |
68 | [posix_user]
69 | stdlib = {userbase}/lib/python{py_version_short}
70 | platstdlib = {userbase}/lib/python{py_version_short}
71 | purelib = {userbase}/lib/python{py_version_short}/site-packages
72 | platlib = {userbase}/lib/python{py_version_short}/site-packages
73 | include = {userbase}/include/python{py_version_short}
74 | scripts = {userbase}/bin
75 | data = {userbase}
76 |
77 | [osx_framework_user]
78 | stdlib = {userbase}/lib/python
79 | platstdlib = {userbase}/lib/python
80 | purelib = {userbase}/lib/python/site-packages
81 | platlib = {userbase}/lib/python/site-packages
82 | include = {userbase}/include
83 | scripts = {userbase}/bin
84 | data = {userbase}
85 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/requests/packages/chardet/utf8prober.py:
--------------------------------------------------------------------------------
1 | ######################## BEGIN LICENSE BLOCK ########################
2 | # The Original Code is mozilla.org code.
3 | #
4 | # The Initial Developer of the Original Code is
5 | # Netscape Communications Corporation.
6 | # Portions created by the Initial Developer are Copyright (C) 1998
7 | # the Initial Developer. All Rights Reserved.
8 | #
9 | # Contributor(s):
10 | # Mark Pilgrim - port to Python
11 | #
12 | # This library is free software; you can redistribute it and/or
13 | # modify it under the terms of the GNU Lesser General Public
14 | # License as published by the Free Software Foundation; either
15 | # version 2.1 of the License, or (at your option) any later version.
16 | #
17 | # This library is distributed in the hope that it will be useful,
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 | # Lesser General Public License for more details.
21 | #
22 | # You should have received a copy of the GNU Lesser General Public
23 | # License along with this library; if not, write to the Free Software
24 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 | # 02110-1301 USA
26 | ######################### END LICENSE BLOCK #########################
27 |
28 | from . import constants
29 | from .charsetprober import CharSetProber
30 | from .codingstatemachine import CodingStateMachine
31 | from .mbcssm import UTF8SMModel
32 |
33 | ONE_CHAR_PROB = 0.5
34 |
35 |
36 | class UTF8Prober(CharSetProber):
37 | def __init__(self):
38 | CharSetProber.__init__(self)
39 | self._mCodingSM = CodingStateMachine(UTF8SMModel)
40 | self.reset()
41 |
42 | def reset(self):
43 | CharSetProber.reset(self)
44 | self._mCodingSM.reset()
45 | self._mNumOfMBChar = 0
46 |
47 | def get_charset_name(self):
48 | return "utf-8"
49 |
50 | def feed(self, aBuf):
51 | for c in aBuf:
52 | codingState = self._mCodingSM.next_state(c)
53 | if codingState == constants.eError:
54 | self._mState = constants.eNotMe
55 | break
56 | elif codingState == constants.eItsMe:
57 | self._mState = constants.eFoundIt
58 | break
59 | elif codingState == constants.eStart:
60 | if self._mCodingSM.get_current_charlen() >= 2:
61 | self._mNumOfMBChar += 1
62 |
63 | if self.get_state() == constants.eDetecting:
64 | if self.get_confidence() > constants.SHORTCUT_THRESHOLD:
65 | self._mState = constants.eFoundIt
66 |
67 | return self.get_state()
68 |
69 | def get_confidence(self):
70 | unlike = 0.99
71 | if self._mNumOfMBChar < 6:
72 | for i in range(0, self._mNumOfMBChar):
73 | unlike = unlike * ONE_CHAR_PROB
74 | return 1.0 - unlike
75 | else:
76 | return unlike
77 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/progress/bar.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 |
3 | # Copyright (c) 2012 Giorgos Verigakis
4 | #
5 | # Permission to use, copy, modify, and distribute this software for any
6 | # purpose with or without fee is hereby granted, provided that the above
7 | # copyright notice and this permission notice appear in all copies.
8 | #
9 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 |
17 | from . import Progress
18 | from .helpers import WritelnMixin
19 |
20 |
21 | class Bar(WritelnMixin, Progress):
22 | width = 32
23 | message = ''
24 | suffix = '%(index)d/%(max)d'
25 | bar_prefix = ' |'
26 | bar_suffix = '| '
27 | empty_fill = ' '
28 | fill = '#'
29 | hide_cursor = True
30 |
31 | def update(self):
32 | filled_length = int(self.width * self.progress)
33 | empty_length = self.width - filled_length
34 |
35 | message = self.message % self
36 | bar = self.fill * filled_length
37 | empty = self.empty_fill * empty_length
38 | suffix = self.suffix % self
39 | line = ''.join([message, self.bar_prefix, bar, empty, self.bar_suffix,
40 | suffix])
41 | self.writeln(line)
42 |
43 |
44 | class ChargingBar(Bar):
45 | suffix = '%(percent)d%%'
46 | bar_prefix = ' '
47 | bar_suffix = ' '
48 | empty_fill = u'∙'
49 | fill = u'█'
50 |
51 |
52 | class FillingSquaresBar(ChargingBar):
53 | empty_fill = u'▢'
54 | fill = u'▣'
55 |
56 |
57 | class FillingCirclesBar(ChargingBar):
58 | empty_fill = u'◯'
59 | fill = u'◉'
60 |
61 |
62 | class IncrementalBar(Bar):
63 | phases = (u' ', u'▏', u'▎', u'▍', u'▌', u'▋', u'▊', u'▉', u'█')
64 |
65 | def update(self):
66 | nphases = len(self.phases)
67 | expanded_length = int(nphases * self.width * self.progress)
68 | filled_length = int(self.width * self.progress)
69 | empty_length = self.width - filled_length
70 | phase = expanded_length - (filled_length * nphases)
71 |
72 | message = self.message % self
73 | bar = self.phases[-1] * filled_length
74 | current = self.phases[phase] if phase > 0 else ''
75 | empty = self.empty_fill * max(0, empty_length - len(current))
76 | suffix = self.suffix % self
77 | line = ''.join([message, self.bar_prefix, bar, current, empty,
78 | self.bar_suffix, suffix])
79 | self.writeln(line)
80 |
81 |
82 | class ShadyBar(IncrementalBar):
83 | phases = (u' ', u'░', u'▒', u'▓', u'█')
84 |
--------------------------------------------------------------------------------
/grade_login.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | Dialog
4 |
5 |
6 |
7 | 0
8 | 0
9 | 1133
10 | 824
11 |
12 |
13 |
14 | Dialog
15 |
16 |
17 |
18 |
19 | 70
20 | 180
21 | 1021
22 | 451
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | 440
33 | 310
34 | 371
35 | 41
36 |
37 |
38 |
39 |
40 |
41 |
42 | 350
43 | 310
44 | 91
45 | 41
46 |
47 |
48 |
49 | <html><head/><body><p><span style=" font-size:16pt;">学号:</span></p></body></html>
50 |
51 |
52 |
53 |
54 |
55 | 350
56 | 400
57 | 91
58 | 41
59 |
60 |
61 |
62 | <html><head/><body><p><span style=" font-size:16pt;">密码:</span></p></body></html>
63 |
64 |
65 |
66 |
67 |
68 | 440
69 | 400
70 | 371
71 | 41
72 |
73 |
74 |
75 | QLineEdit::Password
76 |
77 |
78 |
79 |
80 |
81 | 500
82 | 500
83 | 151
84 | 51
85 |
86 |
87 |
88 | 登录
89 |
90 |
91 |
92 |
93 |
94 | 990
95 | 770
96 | 93
97 | 28
98 |
99 |
100 |
101 | 返回
102 |
103 |
104 |
105 |
106 |
107 |
108 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/html5lib/filters/inject_meta_charset.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import, division, unicode_literals
2 |
3 | from . import base
4 |
5 |
6 | class Filter(base.Filter):
7 | def __init__(self, source, encoding):
8 | base.Filter.__init__(self, source)
9 | self.encoding = encoding
10 |
11 | def __iter__(self):
12 | state = "pre_head"
13 | meta_found = (self.encoding is None)
14 | pending = []
15 |
16 | for token in base.Filter.__iter__(self):
17 | type = token["type"]
18 | if type == "StartTag":
19 | if token["name"].lower() == "head":
20 | state = "in_head"
21 |
22 | elif type == "EmptyTag":
23 | if token["name"].lower() == "meta":
24 | # replace charset with actual encoding
25 | has_http_equiv_content_type = False
26 | for (namespace, name), value in token["data"].items():
27 | if namespace is not None:
28 | continue
29 | elif name.lower() == 'charset':
30 | token["data"][(namespace, name)] = self.encoding
31 | meta_found = True
32 | break
33 | elif name == 'http-equiv' and value.lower() == 'content-type':
34 | has_http_equiv_content_type = True
35 | else:
36 | if has_http_equiv_content_type and (None, "content") in token["data"]:
37 | token["data"][(None, "content")] = 'text/html; charset=%s' % self.encoding
38 | meta_found = True
39 |
40 | elif token["name"].lower() == "head" and not meta_found:
41 | # insert meta into empty head
42 | yield {"type": "StartTag", "name": "head",
43 | "data": token["data"]}
44 | yield {"type": "EmptyTag", "name": "meta",
45 | "data": {(None, "charset"): self.encoding}}
46 | yield {"type": "EndTag", "name": "head"}
47 | meta_found = True
48 | continue
49 |
50 | elif type == "EndTag":
51 | if token["name"].lower() == "head" and pending:
52 | # insert meta into head (if necessary) and flush pending queue
53 | yield pending.pop(0)
54 | if not meta_found:
55 | yield {"type": "EmptyTag", "name": "meta",
56 | "data": {(None, "charset"): self.encoding}}
57 | while pending:
58 | yield pending.pop(0)
59 | meta_found = True
60 | state = "post_head"
61 |
62 | if state == "in_head":
63 | pending.append(token)
64 | else:
65 | yield token
66 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/_vendor/colorama/ansi.py:
--------------------------------------------------------------------------------
1 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
2 | '''
3 | This module generates ANSI character codes to printing colors to terminals.
4 | See: http://en.wikipedia.org/wiki/ANSI_escape_code
5 | '''
6 |
7 | CSI = '\033['
8 | OSC = '\033]'
9 | BEL = '\007'
10 |
11 |
12 | def code_to_chars(code):
13 | return CSI + str(code) + 'm'
14 |
15 | def set_title(title):
16 | return OSC + '2;' + title + BEL
17 |
18 | def clear_screen(mode=2):
19 | return CSI + str(mode) + 'J'
20 |
21 | def clear_line(mode=2):
22 | return CSI + str(mode) + 'K'
23 |
24 |
25 | class AnsiCodes(object):
26 | def __init__(self):
27 | # the subclasses declare class attributes which are numbers.
28 | # Upon instantiation we define instance attributes, which are the same
29 | # as the class attributes but wrapped with the ANSI escape sequence
30 | for name in dir(self):
31 | if not name.startswith('_'):
32 | value = getattr(self, name)
33 | setattr(self, name, code_to_chars(value))
34 |
35 |
36 | class AnsiCursor(object):
37 | def UP(self, n=1):
38 | return CSI + str(n) + 'A'
39 | def DOWN(self, n=1):
40 | return CSI + str(n) + 'B'
41 | def FORWARD(self, n=1):
42 | return CSI + str(n) + 'C'
43 | def BACK(self, n=1):
44 | return CSI + str(n) + 'D'
45 | def POS(self, x=1, y=1):
46 | return CSI + str(y) + ';' + str(x) + 'H'
47 |
48 |
49 | class AnsiFore(AnsiCodes):
50 | BLACK = 30
51 | RED = 31
52 | GREEN = 32
53 | YELLOW = 33
54 | BLUE = 34
55 | MAGENTA = 35
56 | CYAN = 36
57 | WHITE = 37
58 | RESET = 39
59 |
60 | # These are fairly well supported, but not part of the standard.
61 | LIGHTBLACK_EX = 90
62 | LIGHTRED_EX = 91
63 | LIGHTGREEN_EX = 92
64 | LIGHTYELLOW_EX = 93
65 | LIGHTBLUE_EX = 94
66 | LIGHTMAGENTA_EX = 95
67 | LIGHTCYAN_EX = 96
68 | LIGHTWHITE_EX = 97
69 |
70 |
71 | class AnsiBack(AnsiCodes):
72 | BLACK = 40
73 | RED = 41
74 | GREEN = 42
75 | YELLOW = 43
76 | BLUE = 44
77 | MAGENTA = 45
78 | CYAN = 46
79 | WHITE = 47
80 | RESET = 49
81 |
82 | # These are fairly well supported, but not part of the standard.
83 | LIGHTBLACK_EX = 100
84 | LIGHTRED_EX = 101
85 | LIGHTGREEN_EX = 102
86 | LIGHTYELLOW_EX = 103
87 | LIGHTBLUE_EX = 104
88 | LIGHTMAGENTA_EX = 105
89 | LIGHTCYAN_EX = 106
90 | LIGHTWHITE_EX = 107
91 |
92 |
93 | class AnsiStyle(AnsiCodes):
94 | BRIGHT = 1
95 | DIM = 2
96 | NORMAL = 22
97 | RESET_ALL = 0
98 |
99 | Fore = AnsiFore()
100 | Back = AnsiBack()
101 | Style = AnsiStyle()
102 | Cursor = AnsiCursor()
103 |
--------------------------------------------------------------------------------
/face_captest.py:
--------------------------------------------------------------------------------
1 | # encoding:utf-8
2 | import urllib.request
3 | import json
4 | import base64
5 | import ssl
6 | import cv2
7 | import CONFIG
8 | import time
9 | import threading
10 |
11 |
12 | def getresult(pic1path):
13 | null=""
14 |
15 | f1 = open(pic1path, 'rb')
16 |
17 | pic1 = f1.read()
18 |
19 |
20 | img1 = base64.b64encode(pic1)
21 |
22 | request_url = "https://aip.baidubce.com/rest/2.0/face/v3/detect"
23 | context = ssl._create_unverified_context()
24 |
25 |
26 | params = json.dumps({ "image" : str(img1, 'utf-8') , "image_type": "BASE64" , "face_type" : "LIVE" })
27 |
28 | access_token = CONFIG.access_token
29 |
30 | request_url = request_url + "?access_token=" + access_token
31 |
32 | #转码
33 | params_2 = params.encode(encoding='UTF8')
34 |
35 | request = urllib.request.Request(url=request_url, data=params_2)
36 | request.add_header('Content-Type', 'application/json')
37 | response = urllib.request.urlopen(request,context=context)
38 | content = response.read()
39 | content = eval(content)
40 | #print(content)
41 | result = content['result']
42 |
43 | if(result!=""):
44 | #print("result:",result)
45 | face_list = result['face_list']
46 | face_num = result['face_num']
47 | #print("face_list:",face_list)
48 |
49 | location = face_list[0]
50 | location = location['location']
51 | height = location['height'];
52 | left = location['left'];
53 | top = location['top'];
54 | width = location['width'];
55 |
56 | return(height,left,top,width)
57 | else:
58 | print("检测框没检测到人")
59 | return(0,0,0,0)
60 |
61 |
62 |
63 | def drawpic(imgpath):
64 |
65 | height, left, top, width = getresult(imgpath)
66 | pt1 = (round(left), round(top))
67 | pt2 = (round(left + width), round(top + height))
68 | return(pt1,pt2)
69 |
70 |
71 |
72 | def cvwrite():
73 | picf = "G:/tiaozhanbei/facetest/test0.jpg"
74 | time_start=time.time()
75 | global pt1
76 | global pt2
77 | while(1):
78 | time_end = time.time()
79 | if (time_end - time_start > 0.3):
80 | pt1,pt2=drawpic(picf)
81 | time_start = time.time()
82 |
83 |
84 |
85 | '''
86 | if __name__ == '__main__':
87 | cap = cv2.VideoCapture(0)
88 | picf = "G:/tiaozhanbei/facetest/test0.jpg"
89 | #img = cv2.imread('G:/tiaozhanbei/baiduapi/test0.jpg', 1)
90 | time_start = time.time()
91 | red = (0, 0, 255)
92 | pt1=(0,0)
93 | pt2=(0,0)
94 | t1 = threading.Thread(target=cvwrite)
95 | t1.start()
96 | while (1):
97 | ret, frame = cap.read()
98 | cv2.rectangle(frame, pt1, pt2, red, 2)
99 | cv2.imshow("capture", frame)
100 | time_end = time.time()
101 | if(time_end-time_start>0.2):
102 | cv2.imwrite("G:/tiaozhanbei/facetest/test0.jpg", frame)
103 | #pt1,pt2=drawpic(picf)
104 | #time_start=time.time()
105 | if cv2.waitKey(1) == ord('q'):
106 | break
107 | cap.release()
108 | cv2.destroyAllWindows()
109 | '''
110 |
111 |
112 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/commands/uninstall.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | import pip
4 | from pip.wheel import WheelCache
5 | from pip.req import InstallRequirement, RequirementSet, parse_requirements
6 | from pip.basecommand import Command
7 | from pip.exceptions import InstallationError
8 |
9 |
10 | class UninstallCommand(Command):
11 | """
12 | Uninstall packages.
13 |
14 | pip is able to uninstall most installed packages. Known exceptions are:
15 |
16 | - Pure distutils packages installed with ``python setup.py install``, which
17 | leave behind no metadata to determine what files were installed.
18 | - Script wrappers installed by ``python setup.py develop``.
19 | """
20 | name = 'uninstall'
21 | usage = """
22 | %prog [options] ...
23 | %prog [options] -r ..."""
24 | summary = 'Uninstall packages.'
25 |
26 | def __init__(self, *args, **kw):
27 | super(UninstallCommand, self).__init__(*args, **kw)
28 | self.cmd_opts.add_option(
29 | '-r', '--requirement',
30 | dest='requirements',
31 | action='append',
32 | default=[],
33 | metavar='file',
34 | help='Uninstall all the packages listed in the given requirements '
35 | 'file. This option can be used multiple times.',
36 | )
37 | self.cmd_opts.add_option(
38 | '-y', '--yes',
39 | dest='yes',
40 | action='store_true',
41 | help="Don't ask for confirmation of uninstall deletions.")
42 |
43 | self.parser.insert_option_group(0, self.cmd_opts)
44 |
45 | def run(self, options, args):
46 | with self._build_session(options) as session:
47 | format_control = pip.index.FormatControl(set(), set())
48 | wheel_cache = WheelCache(options.cache_dir, format_control)
49 | requirement_set = RequirementSet(
50 | build_dir=None,
51 | src_dir=None,
52 | download_dir=None,
53 | isolated=options.isolated_mode,
54 | session=session,
55 | wheel_cache=wheel_cache,
56 | )
57 | for name in args:
58 | requirement_set.add_requirement(
59 | InstallRequirement.from_line(
60 | name, isolated=options.isolated_mode,
61 | wheel_cache=wheel_cache
62 | )
63 | )
64 | for filename in options.requirements:
65 | for req in parse_requirements(
66 | filename,
67 | options=options,
68 | session=session,
69 | wheel_cache=wheel_cache):
70 | requirement_set.add_requirement(req)
71 | if not requirement_set.has_requirements:
72 | raise InstallationError(
73 | 'You must give at least one requirement to %(name)s (see '
74 | '"pip help %(name)s")' % dict(name=self.name)
75 | )
76 | requirement_set.uninstall(auto_confirm=options.yes)
77 |
--------------------------------------------------------------------------------
/venv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/commands/freeze.py:
--------------------------------------------------------------------------------
1 | from __future__ import absolute_import
2 |
3 | import sys
4 |
5 | import pip
6 | from pip.compat import stdlib_pkgs
7 | from pip.basecommand import Command
8 | from pip.operations.freeze import freeze
9 | from pip.wheel import WheelCache
10 |
11 |
12 | DEV_PKGS = ('pip', 'setuptools', 'distribute', 'wheel')
13 |
14 |
15 | class FreezeCommand(Command):
16 | """
17 | Output installed packages in requirements format.
18 |
19 | packages are listed in a case-insensitive sorted order.
20 | """
21 | name = 'freeze'
22 | usage = """
23 | %prog [options]"""
24 | summary = 'Output installed packages in requirements format.'
25 | log_streams = ("ext://sys.stderr", "ext://sys.stderr")
26 |
27 | def __init__(self, *args, **kw):
28 | super(FreezeCommand, self).__init__(*args, **kw)
29 |
30 | self.cmd_opts.add_option(
31 | '-r', '--requirement',
32 | dest='requirements',
33 | action='append',
34 | default=[],
35 | metavar='file',
36 | help="Use the order in the given requirements file and its "
37 | "comments when generating output. This option can be "
38 | "used multiple times.")
39 | self.cmd_opts.add_option(
40 | '-f', '--find-links',
41 | dest='find_links',
42 | action='append',
43 | default=[],
44 | metavar='URL',
45 | help='URL for finding packages, which will be added to the '
46 | 'output.')
47 | self.cmd_opts.add_option(
48 | '-l', '--local',
49 | dest='local',
50 | action='store_true',
51 | default=False,
52 | help='If in a virtualenv that has global access, do not output '
53 | 'globally-installed packages.')
54 | self.cmd_opts.add_option(
55 | '--user',
56 | dest='user',
57 | action='store_true',
58 | default=False,
59 | help='Only output packages installed in user-site.')
60 | self.cmd_opts.add_option(
61 | '--all',
62 | dest='freeze_all',
63 | action='store_true',
64 | help='Do not skip these packages in the output:'
65 | ' %s' % ', '.join(DEV_PKGS))
66 |
67 | self.parser.insert_option_group(0, self.cmd_opts)
68 |
69 | def run(self, options, args):
70 | format_control = pip.index.FormatControl(set(), set())
71 | wheel_cache = WheelCache(options.cache_dir, format_control)
72 | skip = set(stdlib_pkgs)
73 | if not options.freeze_all:
74 | skip.update(DEV_PKGS)
75 |
76 | freeze_kwargs = dict(
77 | requirement=options.requirements,
78 | find_links=options.find_links,
79 | local_only=options.local,
80 | user_only=options.user,
81 | skip_regex=options.skip_requirements_regex,
82 | isolated=options.isolated_mode,
83 | wheel_cache=wheel_cache,
84 | skip=skip)
85 |
86 | for line in freeze(**freeze_kwargs):
87 | sys.stdout.write(line + '\n')
88 |
--------------------------------------------------------------------------------