Closed songjhaha closed 2 years ago
Implement https://github.com/johnnychen94/PkgServerClient.jl in python Works like:
In [1]: import jnumpy as np In [2]: %time np.utils.registry_response_time() CPU times: user 93.9 ms, sys: 20.9 ms, total: 115 ms Wall time: 1.06 s Out[2]: {'mirrors.bfsu.edu.cn': 0.385467529296875, 'mirror.iscas.ac.cn': 0.7986209392547607, 'mirrors.nju.edu.cn': 0.6467490196228027, 'opentuna.cn': 0.4409325122833252, 'mirrors.sjtug.sjtu.edu.cn': 0.3874180316925049, 'mirrors.sustech.edu.cn': 0.6435022354125977, 'mirrors.tuna.tsinghua.edu.cn': inf, 'mirrors.ustc.edu.cn': 0.3986549377441406} In [3]: %time np.utils.get_fast_mirror() CPU times: user 86.6 ms, sys: 16.7 ms, total: 103 ms Wall time: 1.07 s Out[3]: 'https://mirrors.ustc.edu.cn/julia'
And set_julia_mirror(server) can set custom server url manually, or leave it empty to auto search fast server with get_fast_mirror()
set_julia_mirror(server)
get_fast_mirror()
Implement https://github.com/johnnychen94/PkgServerClient.jl in python Works like:
And
set_julia_mirror(server)
can set custom server url manually, or leave it empty to auto search fast server withget_fast_mirror()