jeffluo 发表于 2016-8-22 09:23:00

讚美 Windows 10 Anniversary 的 Ubuntu - bash

終於可以讓【Windows 10】 協助使用【bash】 開始【Deep Learning】 搭配【Python】整合【SQL Server】 數據,進行數據分析。感謝這樣的開放的時代,節省安裝數十種軟體,就這樣All in 1.經過數小時的努力,首先將
1. Windows 10 升級到 Windows 10 Anniversary 1607 版本
可以將ISO檔案MOUNT之後,直接升級,一次到位
2. 啟動Turn Windows features on or off的bash功能
Windows Subsystem for Linux(Beta)
3. 啟動 bash 功能 就可以在Windows 10 裡面看到常用bash
該部分已經內建Python
*****************************************************************
4. 接下來屬於個人範疇,研究Deep Learning
該部分可以安裝 apt-get install python-dev pip install matplotlib
就這樣一路裝到完成,很順利
5. 最後來個驗證,執行一下Deep Learning的Iris 分析演算法
[(0.472, 'petal width (cm)'), (0.3105, 'petal length (cm)'), (0.0, 'sepal width (cm)'), (0.0, 'sepal length (cm)')]
$ python feature_selection_Lasso.py******************************************************************
6.當然來個跟SQL Server 整合驗證,從Windows 10內建Ubuntu的bash透過pymssql.connect執行python程式,就看到 SQL Server 的資料庫內容import pymssql
‪#‎連線字串帳號密碼‬
conn = pymssql.connect("192.168.56.20", "super", "pass@word1", "TSQL")
cursor = conn.cursor()‪#‎查詢陳述式‬
strSQL = ''' SELECT * FROM candidates ORDER BY 1 desc '''
print strSQL# 開始執行
cursor.execute(strSQL)
row = cursor.fetchone()‪#‎顯示結果‬
while row:
print str("Name : "+ row) + " ID: " + str(row) + " Skill: " + str(row)
row = cursor.fetchone()conn.close()

文章来源:https://www.facebook.com/groups/222546864546011/

页: [1]
查看完整版本: 讚美 Windows 10 Anniversary 的 Ubuntu - bash