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 numpy as np | |
from jutility import plotting, util, cli, units | |
t_max = 300 | |
t_max = 100 | |
lr0 = 1e-3 | |
lr1 = 1e-5 | |
lr1 = 0 | |
t = np.arange(t_max) |
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 inspect | |
from jutility import plotting, util | |
x = [ | |
(name, value) | |
for name, value in inspect.getmembers(plotting) | |
if inspect.isfunction(value) | |
and name[0] != "_" | |
] | |
print(*x, sep="\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
""" See https://docs.python.org/3/howto/mro.html """ | |
class _Displayer: | |
def __init__(self): | |
self.set_indent("| ") | |
self.set_sep("+") | |
self.set_long_sep(" + ") | |
self._lin_stack: list[str] = [] | |
self._merge_stack: list[list[type]] = [] |
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 inspect | |
def f1(a1: int, k1: str="v1", k2: str="v2") -> None: | |
print("f1", a1, k1, k2) | |
def f2(a2: int) -> int: | |
print("f2", a2) | |
return a2 + 1 | |
def f3(a3: int, **kwargs: str) -> None: |
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 numpy as np | |
from jutility import plotting | |
scores_list = [ | |
[25.0, 25.0, 24.9, 24.7, 99.6, ], | |
[24.9, 24.9, 25.0, 9.7, 84.5, ], | |
[24.4, 24.9, 9.8, 24.6, 83.7, ], | |
[25.0, 24.9, 24.8, 4.9, 79.6, ], | |
[9.8, 25.0, 9.8, 24.6, 69.2, ], | |
[9.8, 10.0, 24.5, 24.5, 68.8, ], |
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
from jutility import util | |
def main(): | |
p = util.Printer("poly_table", file_ext="tex", print_to_console=False) | |
b_deg = 5 | |
a_deg = 7 | |
p("\\documentclass{article}") | |
p("\\usepackage{subcaption}") |
NewerOlder