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
try: | |
from streamlit.ScriptRequestQueue import RerunData | |
from streamlit.ScriptRunner import RerunException | |
from streamlit.server.Server import Server | |
import streamlit.ReportThread as ReportThread | |
except: | |
from streamlit.script_request_queue import RerunData | |
from streamlit.script_runner import RerunException | |
from streamlit.server.server import Server | |
import streamlit.report_thread as ReportThread |
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
# macOS | |
### https://raw.github.com/github/gitignore/07c730e1fccfe0f92b29e039ba149d20bfb332e7/Global/macOS.gitignore | |
.DS_Store | |
.AppleDouble | |
.LSOverride | |
Icon | |
._* | |
.DocumentRevisions-V100 | |
.fseventsd | |
.Spotlight-V100 |
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 cv2 | |
from PIL import Image | |
def conver_cv2pilimage(cvImage): | |
"""cv2(np.arry)の画像をpillowに変換する | |
Args: | |
cvImage(numpy.ndarray): OpenCVで読み込んだ画像 |
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
""" | |
空のリストを作るとき | |
方法によっては、いとあやふしらしい | |
https://qiita.com/shinhiro/items/ff3545d733c43ef462e0 | |
""" | |
N = 114514 | |
list = [[] for _ in range(N)] |
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 streamlit as st | |
st.header("Streamlit Layout Demo") | |
st.subheader("beta_columns, beta_container") | |
# https://blog.streamlit.io/introducing-new-layout-options-for-streamlit/ | |
st.markdown("---") | |
# レイアウトの宣言 | |
# カラム(横方向に分割) | |
column_left, column_right = st.beta_columns([2, 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
import json | |
import os | |
import re | |
from chardet.universaldetector import UniversalDetector | |
def get_text_encoding(file): | |
""" | |
ファイルの中身の文字コードを調べる |