原创 《5分鐘學非凸優化系列》視頻

Bilibili https://www.bilibili.com/medialist/detail/ml947528665 YouTube https://www.youtube.com/playlist?list=PLdQpB

原创 Connection reset by peer using sshfs

一直連不上,並且報錯 Connection reset by peer using sshfs   After a lot more of trying it turns out my client user wasn't in the 

原创 記升級Ubuntu服務器14.04 --- 16.04

Before upgrading 當流水賬寫了。 感覺自己膽子挺大,拿着professor剛給的服務器root權限就莽的升級了,連tmux都沒用 本來自己要搞得項目依賴16.04,而且現在14.04已經很老了,各種庫(比如Impo

原创 wh常用命令之二

0x00 查找大文件 find . -type f -size +100M %查找100M以上的文件 對查找結果按照文件大小做一個排序 find . -type f -size +100M -print0 | xargs -

原创 自己做的《5分鐘學非凸優化系列》視頻

自己做的《5分鐘學非凸優化系列》視頻,感興趣的請看 Bilibili https://www.bilibili.com/medialist/detail/ml947528665 YouTube https://www.youtub

原创 strace 'open' calls in a library of an executable

I have a program with no source code. When I run it, I have a "Can't open file..." error in the logs. I called strace t

原创 sshfs rm: cannot rm ‘mybucket’: Transport endpoint is not connected

The fold is busy(now mounted as a FUSE), you can not rm or stat it, just umount it, and this will recover the fold from

原创 python字典快速保存於讀取

在使用python編程過程中,我們往往需要藉助字典來提高編程效率。同時爲了調試方便,我們希望將某些變量保存爲中間文件。 例如,在協同過濾算法中,相似性的訓練結果可以保存爲中間文件,方便調試。python對字典的保存與讀取可以藉助於json

原创 linux screen 命令詳解

類似於tmux,基本用到的命令有 ctrl-A + ctrl-D,detach進程 screen -ls來看窗口 screen -r [id] attach進程   一、背景 系統管理員經常需要SSH 或者telent 遠程登錄到Linu

原创 Python 生成一個不重複隨機list(無放回)

在一個範圍內,生成一個元素數量固定的隨機不重複list. 錯誤方法 使用for循環逐一對生成每個值進行判斷,在有重複值的時候,不會被被添加.在需要生成多個隨機值的時候,容易出現輸出的結果比較少的情況.比如下面需要生成20個隨機值,可是一般

原创 Python 生成一組隨機數列表(有放回)

一. 最直接的方式:用numpy.random模塊來生成隨機數組 1、np.random.rand 用於生成[0.0, 1.0)之間的隨機浮點數, 當沒有參數時,返回一個隨機浮點數,當有一個參數時,返回該參數長度大小的一維隨機浮點數數組,

原创 [work] python 文件夾遍歷

Last Updated: Wednesday 14th August 2013 When you use a scripting language like Python, one thing you will find yoursel

原创 E: Unmet dependencies. Try using -f.

Problem solved, thank to this question and its answer (didn't find it at first as the title isn't very explicit, thus I

原创 python 使用txt保存和讀取列表變量

問題: 在python實際運用中,我們經常需要將變量保存在txt文件中,並且希望未來能讀取他們。這裏我們將自定義兩個函數,來簡化這個操作。 解決:   1.保存入txt文件 輸入:content(列表變量),filename

原创 sshfs fuse: bad mount point `/mnt': Transport endpoint is not connected

1. Kill all sshfs processes: Find all running sshfs processes: ps -ef | grep sshfs | grep -v grep Say you've got two