• 大小: 419KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-14
  • 语言: Python
  • 标签:

资源简介

python识别字符验证码

资源截图

代码片段和文件信息

#!/usr/bin/env python
# -*- coding: utf-8 -*-
“““
#=============================================================================
#  ProjectName: identify-captcha
#     FileName: build
#         Desc: 编译项目依赖env环境
#       Author: hjd
#     HomePage: seekplun.github.io
#   LastChange: 2018-03-24 02:28
#=============================================================================
“““
import os
import shutil
import subprocess

from pybuilder.core import use_plugin init task depends Author

version = “1.0.0“
authors = [Author(“hjd“ “1131909224m@sin.cn“)]
description = “Machine learning identification verification code.“
name = “identify-captcha“

# 任务列表
default_task = [“init_environment“ “install_lib_svm“]

use_plugin(“python.install_dependencies“)


@init
def initialize(project):
    project.set_property(“install_dependencies_index_url“ “https://mirrors.ustc.edu.cn/pypi/web/simple“)
    project.build_depends_on(“pipenv“ version=“==11.9.0“)


@task
@depends(“install_build_dependencies“)
def init_environment(logger):
    logger.info(“Init environment“)
    logger.debug(“Running cmd: pipenv install --skip-lock“)
    subprocess.check_call([“PIPENV_VENV_IN_PROJECT=1 pipenv install --skip-lock“] shell=True)


@task
@depends(“init_environment“)
def install_lib_svm(logger):
    curr_path = os.path.dirname(os.path.abspath(__file__))
    logger.info(“Install: libsvm“)
    lib_path = os.path.join(curr_path “.venv“ “lib“)
    py_path = os.path.join(curr_path “.venv“ “lib“ “python2.7“)
    packages_path = os.path.join(curr_path “packages“ “libsvm“)

    logger.info(“Copy file...“)
    shutil.copy(os.path.join(packages_path “svm.py“) py_path)
    shutil.copy(os.path.join(packages_path “svmutil.py“) py_path)
    shutil.copy(os.path.join(packages_path “libsvm.so.2“) lib_path)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-10-09 12:23  identify-captcha-master\
     文件        1301  2018-10-09 12:23  identify-captcha-master\.gitignore
     文件       11258  2018-10-09 12:23  identify-captcha-master\.pylintrc
     文件       35147  2018-10-09 12:23  identify-captcha-master\LICENSE
     文件         497  2018-10-09 12:23  identify-captcha-master\Pipfile
     文件       30778  2018-10-09 12:23  identify-captcha-master\Pipfile.lock
     文件        2551  2018-10-09 12:23  identify-captcha-master\README.md
     文件        1832  2018-10-09 12:23  identify-captcha-master\build.py
     目录           0  2018-10-09 12:23  identify-captcha-master\docs\
     文件        7458  2018-10-09 12:23  identify-captcha-master\docs\Makefile
     文件        7010  2018-10-09 12:23  identify-captcha-master\docs\make.bat
     目录           0  2018-10-09 12:23  identify-captcha-master\docs\source\
     目录           0  2018-10-09 12:23  identify-captcha-master\docs\source\_static\
     目录           0  2018-10-09 12:23  identify-captcha-master\docs\source\_static\images\
     文件       20401  2018-10-09 12:23  identify-captcha-master\docs\source\_static\images\accuracy.png
     文件      105557  2018-10-09 12:23  identify-captcha-master\docs\source\_static\images\build-env.png
     文件       12876  2018-10-09 12:23  identify-captcha-master\docs\source\_static\images\cut-test.png
     文件       19102  2018-10-09 12:23  identify-captcha-master\docs\source\_static\images\loss.png
     文件      126097  2018-10-09 12:23  identify-captcha-master\docs\source\_static\images\test-main.png
     文件         210  2018-10-09 12:23  identify-captcha-master\docs\source\aboutme.rst
     目录           0  2018-10-09 12:23  identify-captcha-master\docs\source\chapters\
     文件        1700  2018-10-09 12:23  identify-captcha-master\docs\source\chapters\1_environment.rst
     文件        1462  2018-10-09 12:23  identify-captcha-master\docs\source\chapters\2_introduction.rst
     文件         803  2018-10-09 12:23  identify-captcha-master\docs\source\chapters\3_svm_steps.rst
     文件        1948  2018-10-09 12:23  identify-captcha-master\docs\source\chapters\4_cnn_steps.rst
     文件         676  2018-10-09 12:23  identify-captcha-master\docs\source\chapters\5_identify.rst
     文件         167  2018-10-09 12:23  identify-captcha-master\docs\source\chapters\6_todo_solve.rst
     文件         309  2018-10-09 12:23  identify-captcha-master\docs\source\chapters\7_insufficient.rst
     文件        9444  2018-10-09 12:23  identify-captcha-master\docs\source\conf.py
     文件         179  2018-10-09 12:23  identify-captcha-master\docs\source\copyright.rst
     文件         429  2018-10-09 12:23  identify-captcha-master\docs\source\index.rst
............此处省略32个文件信息

评论

共有 条评论