- Taiwan Tourism Dataset
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 subprocess import Popen, PIPE | |
def image_markdown_conversion(): | |
try: | |
while True: | |
text = input("Input:").strip() | |
brackets, split_point = 1, 0 | |
description = "" | |
assert len(text) > 5, "wrong format!" |
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 re | |
def cjk_detect(texts): | |
# korean | |
if re.search("[\uac00-\ud7a3]", texts): | |
return "ko" | |
# japanese | |
if re.search("[\u3040-\u30ff]", texts): | |
return "ja" |
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 zipfile import ZipFile | |
import zipfile | |
from pathlib import Path | |
import base64 | |
import sys | |
import io | |
def write_folder(zfile: ZipFile, dir_path: Path, prefix: str = ""): | |
assert dir_path.is_dir() |
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
# WARNING: this script is out-dated since the last update of the Tourism Bureau website. | |
from pathlib import Path | |
import pandas as pd | |
SCHEMAS = [ | |
(201201, "schema/residence-2012-01.csv"), | |
(201101, "schema/residence-2011-01.csv") | |
] | |
DATA_FILE_PATTERN = "raw_data/{year}-{month}.xls" |
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
library(ggplot2) | |
library(ggthemes) | |
dat <- data.frame( | |
name = c("CPU", "GPU", "TPU"), | |
time = c(3 * 3600 + 6 * 60 + 4, 3 * 60 + 16, 1 * 60 + 42) | |
) | |
dat$log_time = log(dat$time) | |
ggplot(data=dat, aes(x=name, y=log_time)) + |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.