19247844_10154866418411871_8930519238636439651.jpg
因為我的Focus MK3 JW原廠的大燈是全鹵素燈,而近光燈是用H7規格。在某些無路燈的路段總是會覺得鹵素燈不夠亮,就算是換了同是Philips出的號稱增強130%照射距離的夜勁光也還覺得有點暗,
所以很早就想換相對改HID單純些的LED大燈,也研究了一下市面上有那些LED H7車燈可選。

cgm 發表在 痞客邦 留言(0) 人氣()

第十二首籤詩…
"日出東方風雲散 七彩毫光照大千 陰霾退去春光現 嶺上冰雪不復見"

cgm 發表在 痞客邦 留言(0) 人氣()

"不須作福不須求 用盡心機總未休 猶如行船陷險灘 亦似搭梯上雲端" 這詩或許就反映了現實吧 對現況的無能為力 也只能靜觀其變了…

cgm 發表在 痞客邦 留言(0) 人氣()

  • Mar 07 Tue 2017 23:39
  • 信仰

IMG_1317.JPG
每日醒來 總是要面對生活中的各種困難挑戰
需要一股支撐的力量來面對這一切 讓人生的路可以一直往前進

cgm 發表在 痞客邦 留言(0) 人氣()

剛好從網路上找到的一個範例,記下來當筆記
 
import pandas as pd
import numpy as np

cgm 發表在 痞客邦 留言(0) 人氣()

#!/usr/bin/python3
 
from http.server import HTTPServer, CGIHTTPRequestHandler
port = 8080

cgm 發表在 痞客邦 留言(0) 人氣()

[mapping expression for element in source if filtering-expression]
example:

cgm 發表在 痞客邦 留言(0) 人氣()

def get_coach_data(filename):
    try:
        with open(filename) as f:
            data = f.readline()
        return (data.strip().split(','))
    except IOError as ioerr:
        print('File error: ' + str(ioerr))
        return (None)
def sanitize(time_string):
      if '-' in time_string:
          splitter = '-'
      elif ':' in time_string:
          splitter = ':'
      else:
          return(time_string)
      (mins, secs) = time_string.split(splitter)
      return(mins + '.' + secs)
#with open('james.txt') as jaf: data = jaf.readline()
#james = data.strip().split(',')
james = get_coach_data('james.txt')
#clean_james = []
#for each_t in james:
#    clean_james.append(sanitize(each_t))
#list comprehensions
#clean_james = [sanitize(each_t) for each_t in james]
#print(sorted(clean_james))
#james = sorted([sanitize(each_t) for each_t in james])
#unique_james = []
#for each_t in james:
#    if each_t not in unique_james:
#        unique_james.append(each_t)
#print(unique_james[0:3])
print(sorted(set([sanitize(each_t) for each_t in james]))[0:3])

cgm 發表在 痞客邦 留言(0) 人氣()

醒來寫了一下作業…
 
計算指定資料表欄位的mean
pollutantmean <- function(directory, pollutant, id = 1:332) {
    ## 'directory' is a character vector of length 1 indicating
    ## the location of the CSV files
    ## 'pollutant' is a character vector of length 1 indicating
    ## the name of the pollutant for which we will calculate the
    ## mean; either "sulfate" or "nitrate".
    ## 'id' is an integer vector indicating the monitor ID numbers
    ## to be used
    ## Return the mean of the pollutant across all monitors list
    ## in the 'id' vector (ignoring NA values)
    dataSum <- numeric()
    for(i in id)
    {
        dataPath <- sprintf("%s\\%03d.csv", directory, i)
        data <- read.csv(dataPath)
        dataSum <- c(dataSum, data[[pollutant]])
    }
    mean(dataSum, na.rm = TRUE)
}

cgm 發表在 痞客邦 留言(0) 人氣()

>>> L = [1,2,3,4]
>>> while L:
    front, L = L[0], L[1:]
    print(front, L)
    
1 [2, 3, 4]
2 [3, 4]
3 [4]
4 []
>>>

cgm 發表在 痞客邦 留言(0) 人氣()

>>> import re
>>> match = re.match('Hello [ \t]*(.*)world', 'Hello Python world')
>>> match.group(1)
'Python '

cgm 發表在 痞客邦 留言(0) 人氣()

import sys
print(sys.platform)
print(2**100)
x = 'Spam!'

cgm 發表在 痞客邦 留言(0) 人氣()

1 2
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。