看了《學徒模式》一書後,凍仁試著用 Gist 管理自己的待讀書單,並不時修改其閱讀順序。您可以在 revisions 找到編修記錄。
目錄:
## Basic Options ## | |
# 下載目錄 | |
dir=/mnt/usb | |
# 進度紀錄 | |
input-file=/mnt/usb/.aria2/aria2.session | |
# 同時進行任務數 | |
max-concurrent-downloads=10 | |
# 斷線續傳 | |
continue=true |
#!/usr/bin/env python | |
""" | |
Zeroconf Discovery for Rigol DS1000Z-series scopes | |
-------------------------------------------------- | |
Documentation worth looking at: | |
* http://lxistandard.org/Documents/Specifications/LXI%20Device%20Specification%202011%20rev%201.4.pdf | |
* http://lxistandard.org/GuidesForUsingLXI/Introducing%20LXI%20To%20Your%20Network%20Administrator%20May%2024_2013.pdf | |
* http://lxistandard.org/GuidesForUsingLXI/LXI_Getting_Started_Guide_May_1_2013.pdf |
December 13, 2016 - This gist has been moved to a dedicated github repo, https://github.com/vrillusions/ubuntu-kickstart, no more updates will be posted to this gist.
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
sepal.length | sepal.width | petal.length | petal.width | variety | |
---|---|---|---|---|---|
5.1 | 3.5 | 1.4 | .2 | Setosa | |
4.9 | 3 | 1.4 | .2 | Setosa | |
4.7 | 3.2 | 1.3 | .2 | Setosa | |
4.6 | 3.1 | 1.5 | .2 | Setosa | |
5 | 3.6 | 1.4 | .2 | Setosa | |
5.4 | 3.9 | 1.7 | .4 | Setosa | |
4.6 | 3.4 | 1.4 | .3 | Setosa | |
5 | 3.4 | 1.5 | .2 | Setosa | |
4.4 | 2.9 | 1.4 | .2 | Setosa |
-- Firstly, remove PRIMARY KEY attribute of former PRIMARY KEY
ALTER TABLE <table_name> DROP CONSTRAINT <table_name>_pkey;
-- Then change column name of your PRIMARY KEY and PRIMARY KEY candidates properly.
ALTER TABLE <table_name> RENAME COLUMN <primary_key_candidate> TO id;
/** | |
* Uses: | |
* HTMLTableBuilder htmlBuilder = new HTMLTableBuilder(null, true, 2, 3); | |
* htmlBuilder.addTableHeader("1H", "2H", "3H"); | |
* htmlBuilder.addRowValues("1", "2", "3"); | |
* htmlBuilder.addRowValues("4", "5", "6"); | |
* htmlBuilder.addRowValues("9", "8", "7"); | |
* String table = htmlBuilder.build(); | |
* System.out.println(table.toString()); | |
*/ |
"""\ | |
See `StreamLogger`. | |
""" | |
import sys | |
import logging | |
import cStringIO | |
class StreamLogger(object): |