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
rm(list=ls()) | |
library(vvtableau) | |
tableau <- authenticate_server( | |
base_url = "https://tableau.server.com/", | |
username = "ABC", | |
password = "OOXX" | |
) |
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
rm(list=ls()) | |
library(httr) | |
library(data.table) | |
library(dplyr) | |
library(plotly) | |
url = 'https://api.finmindtrade.com/api/v4/data' | |
config_proxy <- httr::config( |
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 win32com.client | |
import os | |
import pythoncom | |
import json | |
import pyodbc | |
from datetime import datetime | |
from datetime import timedelta | |
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
rm(list=ls()) | |
library(readODS) | |
library(lubridate) | |
library(tidyr) | |
library(RODBC) | |
setFiles <- paste0( | |
unique(gsub("-","",substr(ymd(seq.Date(as.Date('2015-01-01'),as.Date('2019-03-01'),by = "month")),1,7))), | |
"_cht.ods" |
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
rm(list=ls()) | |
options(digits = 9) | |
library(httr) | |
library(xml2) | |
library(dplyr) | |
library(magrittr) | |
TGOS_ADDR <- function(setADDR) { |
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 geocoder | |
import pyodbc | |
updateNum = 10 | |
# sql setting | |
local_server = '' | |
local_database = '' |
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 | |
# How this works: | |
# | |
# 1. Assume the input is present in a local file (if the web service accepts input) | |
# 2. Upload the file to an Azure blob - you"d need an Azure storage account | |
# 3. Call BES to process the data in the blob. | |
# 4. The results get written to another Azure blob. | |
# 5. Download the output blob to a local file | |
# | |
# Note: You may need to download/install the Azure SDK for Python. |
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
rm(list=ls()) | |
setwd("image/") | |
library(plot3D) | |
trunk <- list( | |
x0=0, y0=0, z0=0, | |
x1=0, y1=0, z1=6, | |
extension=NULL, | |
branch1=NULL, branch2=NULL, |
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
rm(list=ls()) | |
library(darksky) | |
library(data.table) | |
library(dplyr) | |
darksky_api_key() | |
setStart <- "2016-11-27" | |
setEnd <- "2016-11-30" |
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
rm(list=ls()) | |
library(curl) | |
library(rvest) | |
setUrl <- "http://tisvcloud.freeway.gov.tw/" | |
####################################################### | |
gethtmlTableUrl <- function(seturl) { |
NewerOlder