Install mingw tools on linux:
sudo apt-get install mingw-w64
clone openssl repo:
git clone https://github.com/openssl/openssl.git
Configure openssl for cross compile:
if not set -q $SSH_TTY | |
test -e {$HOME}/.iterm2_shell_integration.fish ; and source {$HOME}/.iterm2_shell_integration.fish | |
end |
function torch_activate | |
set -gx LUA_PATH '/Users/nan/.luarocks/share/lua/5.1/?.lua;/Users/nan/.luarocks/share/lua/5.1/?/init.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/Users/nan/p/torch/install/share/lua/5.1/?.lua;/Users/nan/p/torch/install/share/lua/5.1/?/init.lua;./?.lua;/Users/nan/p/torch/install/share/luajit-2.1.0-beta1/?.lua' | |
set -gx LUA_CPATH '/Users/nan/.luarocks/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/?.so;./?.so;/Users/nan/p/torch/install/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so' | |
set -gx PATH /Users/nan/p/torch/install/bin $PATH | |
set -gx LD_LIBRARY_PATH /Users/nan/p/torch/install/lib $LD_LIBRARY_PATH | |
set -gx DYLD_LIBRARY_PATH /Users/nan/p/torch/install/lib $DYLD_LIBRARY_PATH | |
set -gx LUA_CPATH '/Users/nan/p/torch/install/lib/?.dylib;'$LUA_CPATH | |
end |
Install mingw tools on linux:
sudo apt-get install mingw-w64
clone openssl repo:
git clone https://github.com/openssl/openssl.git
Configure openssl for cross compile:
import ftplib | |
import plac | |
def main(server, user, password, filepath, port=21): | |
ftp = ftplib.FTP() | |
ftp.connect(server, int(port)) | |
ftp.login(user, password) | |
print(ftp.getwelcome()) | |
file = open(filepath, 'rb') # file to send |