- Hajime Nakagami <nakagami@gmail.com>
- Born in Japan on August 11, 1967
- Live in Funabashi city, Chiba prefecture, Japan
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 xml.etree.ElementTree as ET | |
xml_data = '''<?xml version="1.0" encoding="utf-8"?> | |
<root> | |
<person id="1"> | |
<name>John Doe</name> | |
<age>30</age> | |
<city>Tokyo</city> | |
</person> | |
<person id="2"> |
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 io | |
import zipfile | |
# Create and extract zip file example | |
# to file | |
with zipfile.ZipFile("test.zip", 'w') as z: | |
z.writestr('aaa/bbb/1.txt', b'aaa') | |
z.writestr('aaa/ccc/2.txt', b'ccc') | |
z.writestr('aaa/ccc/3.bin', b'\x00\x01\x02') |
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 hashlib | |
import hmac | |
import base64 | |
import binascii | |
password = 'foobar' | |
client_nonce = '9IZ2O01zb9IgiIZ1WJ/zgpJB' | |
server = { | |
'r': '9IZ2O01zb9IgiIZ1WJ/zgpJBjx/oIRLs02gGSHcw1KEty3eY', | |
's': 'fs3IXBy7U7+IvVjZ', |
Hajime Nakagami <nakagami@gmail.com> 2020-10-10 最終更新
awabi は、 MeCab の辞書データを使い形態素解析をする形態素解析器です。
- https://pycon.jp/2016/ja/schedule/presentation/13/
- https://www.youtube.com/watch?v=ax2WmQ_MSXs
- https://togetter.com/li/1028521
======================================== Preface
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
#!/usr/bin/env python | |
# Copyright (c) Twisted Matrix Laboratories. | |
# See LICENSE for details. | |
""" | |
An example of using Twisted with Tkinter. | |
Displays a frame with buttons that responds to mouse clicks. |
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 tkinter | |
root = tkinter.Tk() | |
root.geometry("600x400") | |
canvas = tkinter.Canvas(root, width=600, height=400, bg="white") | |
canvas.pack() | |
def event_handler(event): | |
print(event) | |
if event.type == tkinter.EventType.ButtonRelease: |
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 pathlib | |
from typing import List | |
from PIL import Image | |
import streamlit as st | |
from tensorflow import keras | |
@st.cache_data | |
def download() -> str: |
NewerOlder