This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Mar 13 17:13:17 2017 | |
@author: goingcosme20 | |
""" | |
import sys | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Sep 25 21:57:40 2017 | |
@author: linzino | |
""" | |
#python Decorator Pattern | |
def print_my_name(name): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue Dec 26 16:18:35 2017 | |
@author: zino | |
""" | |
from datetime import datetime | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue Dec 26 16:18:35 2017 | |
@author: zino | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue Dec 26 16:18:35 2017 | |
@author: zino | |
""" | |
from datetime import datetime | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri Jan 19 17:34:34 2018 | |
當遇到字串一樣時python 判別 | |
@author: zino | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Command: | |
def redo(self, **kwargs): | |
abstract | |
def undo(self, **kwargs); | |
abstract | |
class UploadImgurCommand extend Command: | |
def redo(self, **kwargs): | |
image = kwargs['image']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sales | CompPrice | Income | Advertising | Population | Price | ShelveLoc | Age | Education | Urban | US | ||
---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 9.5 | 138 | 73 | 11 | 276 | 120 | Bad | 42 | 17 | Yes | Yes | |
2 | 11.22 | 111 | 48 | 16 | 260 | 83 | Good | 65 | 10 | Yes | Yes | |
3 | 10.06 | 113 | 35 | 10 | 269 | 80 | Medium | 59 | 12 | Yes | Yes | |
4 | 7.4 | 117 | 100 | 4 | 466 | 97 | Medium | 55 | 14 | Yes | Yes | |
5 | 4.15 | 141 | 64 | 3 | 340 | 128 | Bad | 38 | 13 | Yes | No |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 將不同資料長度畫在不同的為度上 | |
# ref https://matplotlib.org/examples/axes_grid/demo_parasite_axes2.html | |
import matplotlib.pyplot as plt | |
x_values1=[1,2,3,4,5] | |
y_values1=[1,2,2,4,1] | |
x_values2=[-1000,-800,-600,-400,-200,-100,0] | |
y_values2=[10,20,39,40,50,60,10] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import random, string | |
def get_one_pagedata(i): | |
''' | |
假設這個function爬取某一網頁資料。 | |
先用亂數給予一個英文大小寫文字替代。 | |
''' | |
content = random.choice(string.ascii_letters) |
OlderNewer