This file contains hidden or 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
| function getDataAndWriteSheet() { | |
| // Get data from API | |
| var response = UrlFetchApp.fetch("https://mis.twse.com.tw/stock/api/getStockInfo.jsp?ex_ch=tse_2412.tw&json=1&delay=0"); | |
| // Load json | |
| var response_json = JSON.parse(response); | |
| // Open sheet | |
| var spreadsheet = SpreadsheetApp.openById('sheet_token'); | |
This file contains hidden or 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
| from __future__ import print_function | |
| import pickle | |
| import os.path | |
| from googleapiclient.discovery import build | |
| from google_auth_oauthlib.flow import InstalledAppFlow | |
| from google.auth.transport.requests import Request | |
| # If modifying these scopes, delete the file token.pickle. | |
| SCOPES = ['https://www.googleapis.com/auth/spreadsheets.readonly'] |
This file contains hidden or 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 requests | |
| from flask import Flask, request | |
| app = Flask(__name__) | |
| @app.route('/') | |
| def index(): | |
| return 'Home Page' | |
| @app.route('/mattermost', methods = ['GET', 'POST']) |
This file contains hidden or 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 slackweb | |
| mattermost = slackweb.Slack(url="https://mattermost.your.domain/hooks/xxxxtokenxxxx") | |
| mattermost.notify(text="Hello, test!!") |
This file contains hidden or 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 requests | |
| import json | |
| headers = { | |
| "Content-Type": "application/json" | |
| } | |
| data = { | |
| "text": "Hello, test!!" | |
| } |
This file contains hidden or 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
| https://stackoverflow.com/questions/42554337/cannot-launch-avd-in-emulatorqt-library-not-found |
This file contains hidden or 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
| env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" pip install mysql-python |
This file contains hidden or 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
| brew install mysql | |
| brew unlink mysql | |
| brew install mysql-connector-c | |
| brew link --overwrite mysql |
This file contains hidden or 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
| /etc/bashrc |
This file contains hidden or 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
| response_text = response_text.replace(u"\xef\xbb\xbf", u"") | |
| with open(file.csv, 'wb') as csv_file: | |
| csv_file.write(response_text) | |
| csv_file.close() |
NewerOlder