devlights / try-python Goto Github PK
View Code? Open in Web Editor NEWThis is my TUTORIAL project for Python.
Home Page: https://devlights.hatenablog.com/
License: MIT License
This is my TUTORIAL project for Python.
Home Page: https://devlights.hatenablog.com/
License: MIT License
まずは最も基本的なサンプルを作る
CodeFactor found an issue: Probable insecure usage of temp file/directory.
It's currently on:
trypython\advanced\fileio\rmdir01.py:27
ref: python-links
str01.py
CodeFactor found an issue: Probable insecure usage of temp file/directory.
It's currently on:
trypython\advanced\fileio\rmdir01.py:34
import tkinter as tk
root = tk.Tk()
root.mainloop()
CodeFactor found an issue: Probable insecure usage of temp file/directory.
It's currently on:
trypython\advanced\others\loop_optimization01.py:25
def btn_action():
print('button pressed')
bt = tk.Button(text='push me', command=btn_action)
bt.pack()
root.mainloop()
root = tk.Tk()
root.geometry('450x350+350+250')
CodeFactor found an issue: Probable insecure usage of temp file/directory.
It's currently on:
trypython\advanced\fileio\rmdir01.py:35
CodeFactor found an issue: Probable insecure usage of temp file/directory.
It's currently on:
trypython\advanced\fileio\rmdir01.py:37
CodeFactor found an issue: Probable insecure usage of temp file/directory.
It's currently on:
trypython\advanced\iter_\iter01.py:22
Commit 9d1b0f9
lb = tk.Label(text='label')
bt = tk.Button(text='button')
lb.pack()
bt.pack()
root.mainloop()
列挙型を定義するためのライブラリ。
CodeFactor found an issue: Probable insecure usage of temp file/directory.
It's currently on:
trypython\stdlib\pathlib_\pathlib02.py:41
CodeFactor found an issue: Probable insecure usage of temp file/directory.
It's currently on:
trypython\advanced\fileio\rmdir01.py:42
CodeFactor found an issue: Probable insecure usage of temp file/directory.
It's currently on:
trypython\advanced\fileio\rmdir01.py:24
CodeFactor found an issue: Probable insecure usage of temp file/directory.
It's currently on:
trypython\advanced\fileio\rmdir01.py:19
CodeFactor found an issue: Probable insecure usage of temp file/directory.
It's currently on:
trypython\advanced\iter_\iter01.py:20
import tkinter as tk
class Application(tk.Frame):
def __init__(self, master: tk.Tk = None):
super().__init__(master)
master.title('title')
self.pack()
self.create_widgets()
def create_widgets(self):
"""ここでウィジェットを作成して配置"""
root = tk.Tk()
app = Application(root)
app.mainloop()
CodeFactor found an issue: Probable insecure usage of temp file/directory.
It's currently on:
trypython\advanced\fileio\rmdir01.py:15
int01.py
CodeFactor found an issue: Probable insecure usage of temp file/directory.
It's currently on:
trypython\stdlib\pathlib_\pathlib02.py:42
CodeFactor found an issue: Probable insecure usage of temp file/directory.
It's currently on:
trypython\advanced\fileio\rmdir01.py:31
l1 = [(chr(x), chr(x+1)) for x in range(65, 70)]
l2 = list(itertools.chain.from_iterable(l1))
print(l1, l2)
parserを作る際に add_helpをTrueにすると -h
,--help
が有効になる。
引数名は、arg_1
のようにする。これによりarg_1
は必須引数になる。
オプション引数は --option_1
のようにハイフンを2つつける。
これにより、--option_1
はオプション引数となる。略称をつけたい場合は
parser.add_argument('-o', '--option_1', help='option_1のヘルプ')
とする。
以下の指定で、引数の条件を絞り込みできる。
parser.add_argument('--option_1', type=float, choices=[0.5,1.0,1.5], required=True)
tk.TkVersion
root = tk.Tk()
root.title('title')
difflib.Differ は差分オブジェクトを生成する。
compare メソッドで比較する。
-
はシーケンス1のみに存在+
はシーケンス2のみに存在?
は入力シーケンスのどちらにも存在しない数が多いので、10個くらいで 1ファイル としてつくっていく
CodeFactor found an issue: Use of insecure and deprecated function (mktemp).
It's currently on:
trypython\basic\print_\print01.py:34
オブジェクトを保存し永続化するためのライブラリ。
永続的な辞書みたいな感じ。使い方も辞書をほぼ同じ。
writebackオプションをTrueで指定するとメモリ上キャッシュと辞書の書き戻しが自然に行われる。更新の整合性を高めたい場合はTrueにする。ただし、その分メモリとパフォーマンスヒットがある。
CodeFactor found an issue: Use of unsafe yaml load. Allows instantiation of arbitrary objects. Consider yaml.safe_load().
It's currently on:
trypython\extlib\yaml\yaml01.py:36
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.