<meta name="viewport" content="width=device-width, initial-scale=1">
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
// 引入所需的模組 | |
const https = require('https'); | |
const fs = require('fs'); | |
const winston = require('winston'); | |
// 創建 Winston 日誌紀錄器 | |
const logger = winston.createLogger({ | |
level: 'info', | |
format: winston.format.json(), | |
transports: [ |
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
// 引入所需要的套件 | |
const express = require('express'); | |
const winston = require('winston'); | |
const expressWinston = require('express-winston'); | |
// 創建一個新的 Express 應用 | |
const app = express(); | |
const port = 3000; | |
// 創建一個 Winston 日誌紀錄器,設置輸出檔案 |
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
import tweepy | |
import schedule | |
import time | |
# 填入你的 API Key 和 API Secret | |
api_key = 'YOUR_API_KEY_HERE' | |
api_secret = 'YOUR_API_SECRET_HERE' | |
# 填入你的 Access Token 和 Access Token Secret | |
access_token = 'YOUR_ACCESS_TOKEN_HERE' |
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
# reference: | |
# _get_response without headers doesn't work (at least with 'yahoo' source #867 https://github.com/pydata/pandas-datareader/issues/867 | |
from pandas_datareader import DataReader | |
import requests | |
USER_AGENT = { | |
'User-Agent': ('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)' | |
' Chrome/91.0.4472.124 Safari/537.36') | |
} |
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
--- | |
parserOptions: | |
ecmaVersion: 6 | |
env: | |
browser: true | |
es6: true | |
phantomjs: true | |
jquery: true | |
globals: | |
angular: true |
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
[alias] | |
co = checkout | |
br = branch | |
st = status | |
[color] | |
ui = true | |
status = auto | |
[core] | |
editor = vim | |
[filter "media"] |
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
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory |
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
Show hidden characters
{ | |
"parserOptions": { | |
"ecmaVersion": 6 | |
}, | |
"env": { | |
"browser": true, | |
"es6": true, | |
"amd": true, | |
"phantomjs": true, | |
"jquery": true |
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
--- | |
root: true | |
env: | |
browser: true | |
es6: true | |
amd: true | |
phantomjs: true | |
jquery: true | |
globals: |
NewerOlder