七月 2024
1234567
891011121314
15161718192021
22232425262728
293031  

彙整

教研中心研習:校園無障礙網站管理(1080821)

日期:108年8月21日(三)

時間:9:00 – 16:00

地點:教研中心

主題:校園無障礙網站管理

講師:校園無障礙網站維運廠商、向雲暉

公文:

一、校園無障礙網站管理(基礎):黑快馬公司講師

二、校園無障礙網站管理(經驗分享):溪洲國小向雲暉老師

補充說明:

  • 若學校申請的 G Suite 帳戶無法加入Google Classroom 課程,請管理者依下圖所示設定。

網路資源:

教研中心研習:學校資訊設備採購原則、資訊組長業務經驗傳承(1080816)

日期:108年8月16日(五)

時間:9:00 – 16:00

地點:教研中心

主題:學校資訊設備採購原則、資訊組長業務經驗傳承

講師:呂曉昀、邱昭士

公文:

學校資訊設備採購原則:

資訊組長業務經驗傳承:

學習資源:

教研中心研習:校務行政系統注意事項及常用模組介紹(1080816)

日期:108年8月16日(五)

時間:13:00 – 16:00

地點:教研中心

主題:校務行政系統注意事項及常用模組介紹

講師:邱昭士

公文:

講義:

學習資源:

從範例學程式進階 – Python(1080808, 10)

日期:108年8月8, 10日(四、六)

時間:9:00 – 16:00

地點:樹林國小福祿樓2樓電腦教室

主題:從範例學程式進階 – Python

講師:邱昭士

公文:

Python 入門、開發環境與工具

參考用書:

PyGame

上課用線上資源及範例:

def oddfn(x):
    # return x if (x % 2 == 1) else None
    if x % 2 == 1:
        return x
    else:
        return None
mylist = [5, 10, 15, 20, 25, 30]
filter_object = filter(oddfn, mylist) # 傳回filter object
print("奇數串列: ", [item for item in filter_object])
itemlist = [item for item in mylist if oddfn(item)]
print("奇數串列: ", itemlist)
itemlist = []
for item in mylist:
    if oddfn(item):
        itemlist.append(item)
print("奇數串列: ", itemlist)

使用 Python 處理各式文件:

一、處理 Word 文件

  • 外掛模組:python-docx
  • 下載安裝:pip install python-docx
  • 程式導入:import docx
  • 線上說明:python-docx documentation

在 python-docx 模組內,將 Word 文件結構分成 3 層:

  • Document
  • Paragraph
  • Run
wdoc = docx.Document('檔案名稱')    # 建立 docx 物件 wdoc

wdoc.paragraphs

wdoc.paragraphs[n].runs

wdoc.paragraphs[n].text

wdoc.paragraphs[n].runs[m].text

二、處理 PDF 文件

  • 外掛模組:PyPDF2
  • 下載安裝:pip install PyPDF2
  • 程式導入:import PyPDF2
  • 線上說明:PyPDF2 Documentation
pdfObj = open('pdf_file', 'rb')          # 'rb' 表示以二進位方式開啟
pdfRd = PyPDF2.PdfFileReader(pdfObj)     # 讀取 PDF 內容

三、處理 Excel 文件

wb = openpyxl.load_workbook('excel_file')

allSheets = wb.get_sheet_names()

ws = wb.get_active_sheet()

ws = wb.get_sheet_by_name('2020Q3')

四、處理 CSV 文件

fn = 'csvReport.csv'
with open(fn) as csvFile:
    csvReader = csv.reader(csvFile)
    for row in csvReader:
        print("Row %s = " % csvReader.line_num, row)
fn = 'out20_7.csv'
with open(fn, 'w', newline = '') as csvFile: # 開啟csv檔案
    csvWriter = csv.writer(csvFile)          # 建立Writer物件 
    csvWriter.writerow(['Name', 'Age', 'City'])
    csvWriter.writerow(['Hung', '35', 'Taipei'])
    csvWriter.writerow(['James', '40', 'Chicago'])

網路爬蟲

PyGame 範例

PyGame 影音教學 MovingBall

學習資源:

Python Library 與第三方程式碼:

新北市虛擬機房操控原力進化(CentOS)(1080806-07)

日期:108年8月6、7日(二、三)

時間:9:00 – 16:00

地點:樹林國小福祿樓2樓電腦教室

主題:新北市虛擬機房操控原力進化 (CentOS)

講師:林璟豐

公文:

講義:

補充講義:

VMWare CentOS7 虛擬機安裝

  • 研習用講義及教材下載:https://ishm.idv.tw/downloads/slps
  • IPv6 相關設定指令:https://ishm.idv.tw/?p=297
    • 關閉 AutoConfig,其中「乙太網路」須改成使用中的真正網路介面卡名稱:
      C:\> netsh interface ipv6 set interface “乙太網路” routerdiscovery=disabled store=persistent
    • 關閉臨時 IPv6 位址:
      C:\> netsh interface ipv6 set privacy state=disabled store=persistent
    • 設定好,網卡須停用再重新啟用,才會生效。
  • 如何在 CentOS console 中正常顯示中、英文:
    • LANG=en_US.utf-8
  • 查詢 certbot 所在位置:
    whereis certbot
  • 利用 crond 自動更新 Let’s Encrypt 憑證:
    # crontab -e
    10 1 * * 6  /usr/bin/certbot renew  (每週六 1:10 更新一次)
  • cron table 文件出問題時的修復方法:
    # restorecon -r -v /etc/crontab

網路資源: