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 sympy import * | |
| import time | |
| ProcessTime = 1000 | |
| def Differential(x): | |
| return 3*(x**2) | |
| def Self_f(x): | |
| return x**3 |
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
| def df(x): | |
| return 3*(x**2) | |
| for x in range(1,6): | |
| print(df(x)) |
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
| def f(x): | |
| return x**3 | |
| h = 1e-5 | |
| for x in range(1,6): | |
| df = (f(x+h) - f(x) ) / h | |
| print(df) |
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 sympy import * | |
| x = Symbol('x') | |
| f = x**3 | |
| df = diff(f) | |
| print(df) | |
| for i in range(1, 6): | |
| print(df.subs(x, i)) |
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 numpy as np | |
| # 入力する文字列 | |
| Inputs_Text = "This is a pen" | |
| # ====================================== | |
| # Embedding Layer | |
| # ====================================== | |
| class Embedding: | |
| def __init__(self, d_model=4,max_len=100,seed=0): |
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 tkinter as tk | |
| from tkinter import ttk | |
| from ttkthemes import ThemedTk | |
| def App(): | |
| root = ThemedTk(theme="arc") | |
| root.title("ttkthemes") | |
| root.geometry("300x200") | |
| label = ttk.Label(root, text="ttkthemes テーマ: arc").pack(pady=10) |
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 tkinter as tk | |
| from tkinter import ttk | |
| def App(): | |
| root = tk.Tk() | |
| root.title("見比べテスト") | |
| root.geometry("300x400") | |
| style = ttk.Style() | |
| style.theme_use('clam') |
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
| def display_text(text:str) -> str: | |
| return "**" + str(text) + "**" | |
| def main() -> None: | |
| print(display_text("テスト")) | |
| #チェック:エラー無し | |
| #print(display_text(1)) | |
| #チェック:エラー有り | |
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
| def calc_val(*values): | |
| total = 0 | |
| for value in values: | |
| total += value | |
| return total | |
| def display_dict(name,age): | |
| print(f"{name}は{age}才です") | |
| def main(): |
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 tkinter as tk | |
| from tkinter import messagebox | |
| import datetime | |
| class TimeAdderApp: | |
| def __init__(self, root): | |
| self.root = root | |
| self.root.title("時間足し算") | |
| self.import_time = [] # 変換された時間を保持するリスト |
NewerOlder