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
let key=''; | |
let detext=''; | |
let entext=''; | |
let result = ''; | |
let deresult=''; | |
let unic = ''; | |
let list_text =''; | |
document.setPointerCapture("GOen").addEventListener("click", encode()); | |
document.setPointerCapture("GOde").addEventListener("click", decode()); |
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 os,math,tkinter as tk,subprocess | |
from PIL import Image, ImageTk | |
#フォルダー指定ウィンドウ | |
win = tk.Tk() | |
win.geometry("400x150") | |
win.title("View image") |
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 os,math,tkinter as tk,subprocess | |
from tkinter.constants import Y | |
from tkinter import font | |
from tkinter import messagebox | |
from PIL import Image, ImageTk | |
win = tk.Tk() | |
win.geometry("1900x1200") | |
win.title("View image") |
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 os,requests,math,tkinter as tk,subprocess | |
from tkinter import font | |
from tkinter import messagebox | |
from PIL import Image, ImageTk | |
"""#Help | |
Name : Simple image viewer | |
2021-August-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
# coding: UTF-8 | |
import requests,os | |
from tkinter import ttk | |
from bs4 import BeautifulSoup | |
import tkinter as tk,requests,os | |
from tkinter import font | |
from bs4 import BeautifulSoup | |
from tkinter import filedialog | |
win = tk.Tk() |
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
#ファイルを追加日時順にリネームします。追加日時でソートして使ってたものを別の端末で使いたいときとかに。 | |
#多分もっときれいに書けるんだろうけど、時間もないしめんどくさいのでやめとく | |
#MACで使用する場合は、17行目を無効(削除or#)にして18行目を有効にしてください。 | |
import os, pathlib, datetime, time,re | |
from datetime import date | |
print('作成日時を用いて一括リネームできます。') | |
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 requests,re,winsound | |
from bs4 import BeautifulSoup | |
url = 'https://kakuyomu.jp/works/1177354054892010417' | |
res = requests.get(url) | |
soup = BeautifulSoup(res.content, "lxml") | |
page_url = soup.find_all('a', class_='widget-toc-episode-episodeTitle') | |
title = soup.find('title').text | |
all_page_url = [] |
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 random, string | |
def naming(n): | |
randlst = [random.choice(string.ascii_letters + string.digits) for i in range(n)] | |
return ''.join(randlst) |
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
#Mecabの辞書と、フォントを独自に用意する必要があります。Mecabの辞書の用意は正直かなりめんどうなのです・・・ | |
#このサイトがPythonでのWordcloudの使い方を簡単に紹介しています。https://bit.ly/3GxUFZq | |
from wordcloud import WordCloud | |
import MeCab,AutoNaming | |
from matplotlib import pyplot as plt | |
from wordcloud import WordCloud | |
folder_pass = 'C:/any/Python-P/Worldcloud Project/' #このファイルのパス | |
with open('C:/XXX.txt', mode='rt', encoding='utf-8') as fi: | |
source_text = fi.read() |
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 base64 | |
def encodeBase64(): | |
with open('XXX.jpg', "rb") as f:#文字にしたい画像の相対パス | |
base64_img = base64.b64encode(f.read()) | |
print(str(base64_img)) | |
with open('XXX.txt', 'w') as txt:#保存する.txtの相対パス | |
txt.write(base64_img.decode()) | |
encodeBase64() |
OlderNewer