zoukankan      html  css  js  c++  java
  • 基于OpenVINO的端到端DL网络-Linux命令行上传文件到百度网盘

    百度有2TB 存储空间,在有第三方服务器的情况下,很多东西不需要下载到本地,可以直接使用服务转存,这非常好。

    系统环境:

    Linux 系统 + Python 2.7

    安装软件工具:【可能会要重复装】

    pip install requests
    pip install setuptools
    pip install bypy
    source ~/.bashrc

    授权登陆:

    执行 bypy info,显示下边信息,根据提示,通过浏览器访问下边灰色的https链接,如果此时百度网盘账号正在登陆,会出现长串授权码,复制。

     
    [root@ineedle ~]# bypy info
    Please visit:  
    # 访问下边这个连接,复制授权码https://openapi.baidu.com/oauth/2.0/authorize?scope=basic+netdisk&redirect_uri=oob&response_type=code&client_id=q8WE4EpCsau1oS0MplgMKNBn
     
    And authorize this app
    Paste the Authorization Code here within 10 minutes.
    Press [Enter] when you are done   
    # 提示在下边粘贴授权码

    在下边图示红色位置粘贴授权码,耐心等待一会即可(1-2分钟)

    Press [Enter] when you are done
    a288f3d775fa905a6911692a0808f6a8
    Authorizing, please be patient, it may take upto None seconds...
    Authorizing/refreshing with the OpenShift server ...
    OpenShift server failed, authorizing/refreshing with the Heroku server ...
    Successfully authorized
    Quota: 2.015TB
    Used: 740.493GB

    授权成功。【如果有这步的话,就无法实现开放存储,但是它可用于在线的文件转存,这个是有价值的,甚至vultr可以让主机离线】

    测试上传和同步本地文件到云盘

    由于百度PCS API权限限制,程序只能存取百度云端/apps/bypy目录下面的文件和目录。我们可以通过:

    【目录操作,而后由GUI直接转,分享。这是比较好的套路】

    [root@ineedle ~]# bypy list
    /apps/bypy ($t $f $s $m $d):

    把本地当前目录下的文件同步到百度云盘:( 这个比较简单了,但是也是可以用的)

    # bypy upload

    把云盘上的内容同步到本地:

    # bypy downdir

    比较本地当前目录和云盘根目录,看是否一致,来判断是否同步成功:

    # bypy compare

    过程无回传,但是速度比较快。
     





  • 相关阅读:
    入门级: WinForm 下的 ComboBox,ListBox 的使用 (一)
    C#:谨慎 DateTime.Now 带来的危险
    HTML5 小游戏审核通过,请各位有兴趣的朋友帮忙投票!谢谢。
    基于fpga的单线激光雷达数据处理
    左右法则-复杂指针解析
    智能指针(auto_ptr和shared_ptr) 转
    iphone游戏引擎
    C++对象和内存
    让你的代码变的更加强大
    Class Loader
  • 原文地址:https://www.cnblogs.com/jsxyhelu/p/11186776.html
Copyright © 2011-2022 走看看