wget-通过http代理(带有身份验证)从ftp服务器(带有身份验证)下载文件

时间:2019-04-27 11:38:03

标签: http curl proxy ftp wget

我想使用wget从ftp下载整个文件夹(我知道-r),curl不允许在一个请求中下载文件夹。我有以下用于curl的语法,但是甚至无法通过wget下载单个文件来计算语法。 关键的事情是ftp具有身份验证,并且通过http代理(具有diff凭据)进入ftp

这是有效的curl命令: curl --proxy-anyauth --proxy-user NTADMIN \ proxyuser:proxypass --proxy http://httpproxyhost:8080 --anyauth -u ftpuser:ftppass -v'ftp://ftphost/file'

wget中的等效项是什么?

1 个答案:

答案 0 :(得分:0)

您可以尝试使用规范URI格式:

def loss_function(y_true, y_pred):
    y = Kb.stack([y_pred] * (J * 3), axis=-1) 
    yt = Kb.permute_dimensions(y, [0, 2, 1])  # same weight for each joint in particular prototype in column

    # normalize
    tci = Kb.transpose(Kb.transpose(C) - meanpose)
    tci = Kb.transpose(Kb.transpose(tci) / np.sqrt(varpose))
    #######

    c_pred = yt * tci 
    c_pred = Kb.sum(c_pred, axis=-1)

    # back to real center and scale
    c_pred = c_pred * np.sqrt(varpose)
    c_pred = c_pred + meanpose
    #######

    y_true = Reshape(target_shape=(J * 3,))(y_true)  # flatten last two dimensions (15,3) into one

    reslos = res_loss(c_pred, y_true)
    p1 = (1 - alpha) * reslos 
    reg_term = alpha * L1(y_pred) 
    return p1 + reg_term

def L1(v): 
    return Kb.sum(Kb.abs(v), axis=-1)

def res_loss(pred, gtrue):
    r = gtrue - pred 

    logic = Kb.less(Kb.abs(r), 1 / (o ** 2))
    p = Kb.switch(logic, 0.5 * (o ** 2) * Kb.square(r), Kb.abs(r) - (0.5 / (o ** 2)))

    return Kb.sum(p, axis=-1)

使用wget,您可以使用以下命令:

curl --proxy http://proxyuser:proxypass@httpproxyhost:8080 -v 'ftp://ftpuser:ftppass@ftphost/file'