state
StateType = TypeVar('StateType')
module-attribute
all_states = [field.name for field in dataclasses.fields(StateList)]
module-attribute
states = StateList()
module-attribute
AvailableMemoryState
Bases: State[int]
Source code in roc/jupyter/state.py
67 68 69 70 71 72 73 74 75 76 77 78 |
|
val = self.get()
instance-attribute
__init__()
Source code in roc/jupyter/state.py
68 69 70 |
|
__str__()
Source code in roc/jupyter/state.py
72 73 74 |
|
get()
Source code in roc/jupyter/state.py
76 77 78 |
|
ComponentsState
Bases: State[list[str]]
Source code in roc/jupyter/state.py
233 234 235 236 237 238 239 240 241 242 243 244 |
|
val = []
instance-attribute
__init__()
Source code in roc/jupyter/state.py
234 235 236 |
|
__str__()
Source code in roc/jupyter/state.py
242 243 244 |
|
get()
Source code in roc/jupyter/state.py
238 239 240 |
|
CpuLoadState
Bases: State[list[float]]
Source code in roc/jupyter/state.py
81 82 83 84 85 86 87 88 89 90 91 |
|
val = self.get()
instance-attribute
__init__()
Source code in roc/jupyter/state.py
82 83 84 |
|
__str__()
Source code in roc/jupyter/state.py
86 87 88 |
|
get()
Source code in roc/jupyter/state.py
90 91 |
|
CurrentAttentionState
Bases: State[VisionAttentionData]
Source code in roc/jupyter/state.py
204 205 206 207 208 209 210 211 212 213 214 215 216 |
|
__init__()
Source code in roc/jupyter/state.py
205 206 |
|
__str__()
Source code in roc/jupyter/state.py
211 212 213 214 215 216 |
|
set(att)
Source code in roc/jupyter/state.py
208 209 |
|
CurrentObjectState
Bases: State[Object]
Source code in roc/jupyter/state.py
219 220 221 222 223 224 225 226 227 228 229 230 |
|
__init__()
Source code in roc/jupyter/state.py
220 221 |
|
__str__()
Source code in roc/jupyter/state.py
226 227 228 229 230 |
|
set(obj)
Source code in roc/jupyter/state.py
223 224 |
|
CurrentSaliencyMapState
Bases: State[SaliencyMap]
Source code in roc/jupyter/state.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
|
__init__()
Source code in roc/jupyter/state.py
186 187 |
|
__str__()
Source code in roc/jupyter/state.py
192 193 194 195 196 197 198 199 200 201 |
|
set(sal)
Source code in roc/jupyter/state.py
189 190 |
|
CurrentScreenState
Bases: State[str]
Source code in roc/jupyter/state.py
171 172 173 174 175 176 177 178 179 180 181 182 |
|
__init__()
Source code in roc/jupyter/state.py
172 173 |
|
__str__()
Source code in roc/jupyter/state.py
178 179 180 181 182 |
|
set(screen)
Source code in roc/jupyter/state.py
175 176 |
|
DiskIoState
Bases: State[dict[str, float]]
Source code in roc/jupyter/state.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
|
last_read_bytes = ioc.read_bytes
instance-attribute
last_read_io = ioc.read_count
instance-attribute
last_time = time.time_ns()
instance-attribute
last_write_bytes = ioc.write_bytes
instance-attribute
last_write_io = ioc.write_count
instance-attribute
__init__()
Source code in roc/jupyter/state.py
95 96 97 98 99 100 101 102 |
|
__str__()
Source code in roc/jupyter/state.py
104 105 106 107 108 109 110 |
|
get()
Source code in roc/jupyter/state.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
|
EdgeCacheState
Bases: State[float]
Source code in roc/jupyter/state.py
157 158 159 160 161 162 163 164 165 166 167 168 |
|
val = 0
instance-attribute
__init__()
Source code in roc/jupyter/state.py
158 159 160 |
|
__str__()
Source code in roc/jupyter/state.py
166 167 168 |
|
get()
Source code in roc/jupyter/state.py
162 163 164 |
|
LoopState
Bases: State[int]
Source code in roc/jupyter/state.py
134 135 136 137 138 139 140 |
|
val = 0
instance-attribute
__init__()
Source code in roc/jupyter/state.py
135 136 137 |
|
incr()
Source code in roc/jupyter/state.py
139 140 |
|
NodeCacheState
Bases: State[float]
Source code in roc/jupyter/state.py
143 144 145 146 147 148 149 150 151 152 153 154 |
|
val = 0
instance-attribute
__init__()
Source code in roc/jupyter/state.py
144 145 146 |
|
__str__()
Source code in roc/jupyter/state.py
152 153 154 |
|
get()
Source code in roc/jupyter/state.py
148 149 150 |
|
ProcessMemoryState
Bases: State[int]
Source code in roc/jupyter/state.py
52 53 54 55 56 57 58 59 60 61 62 63 64 |
|
val = self.get()
instance-attribute
__init__()
Source code in roc/jupyter/state.py
53 54 55 |
|
__str__()
Source code in roc/jupyter/state.py
57 58 59 |
|
get()
Source code in roc/jupyter/state.py
61 62 63 64 |
|
State
Bases: ABC
, Generic[StateType]
Source code in roc/jupyter/state.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
display_name = display_name or name
instance-attribute
name = name
instance-attribute
val = None
instance-attribute
__init__(name, display_name=None)
Source code in roc/jupyter/state.py
24 25 26 27 |
|
__str__()
Source code in roc/jupyter/state.py
29 30 |
|
get()
Source code in roc/jupyter/state.py
32 33 34 35 36 |
|
set(v)
Source code in roc/jupyter/state.py
38 39 |
|
StateComponent
StateList
dataclass
Source code in roc/jupyter/state.py
247 248 249 250 251 252 253 254 255 256 257 258 259 260 |
|
attention = CurrentAttentionState()
class-attribute
instance-attribute
components = ComponentsState()
class-attribute
instance-attribute
cpuload = CpuLoadState()
class-attribute
instance-attribute
diskio = DiskIoState()
class-attribute
instance-attribute
edge_cache = EdgeCacheState()
class-attribute
instance-attribute
loop = LoopState()
class-attribute
instance-attribute
memory = ProcessMemoryState()
class-attribute
instance-attribute
node_cache = NodeCacheState()
class-attribute
instance-attribute
object = CurrentObjectState()
class-attribute
instance-attribute
salency = CurrentSaliencyMapState()
class-attribute
instance-attribute
screen = CurrentScreenState()
class-attribute
instance-attribute
sysmem = AvailableMemoryState()
class-attribute
instance-attribute
__init__(memory=ProcessMemoryState(), sysmem=AvailableMemoryState(), loop=LoopState(), cpuload=CpuLoadState(), diskio=DiskIoState(), node_cache=NodeCacheState(), edge_cache=EdgeCacheState(), screen=CurrentScreenState(), salency=CurrentSaliencyMapState(), attention=CurrentAttentionState(), object=CurrentObjectState(), components=ComponentsState())
SystemCpuState
Bases: State[int]
Source code in roc/jupyter/state.py
42 43 44 45 46 47 48 49 |
|
val = self.get()
instance-attribute
__init__()
Source code in roc/jupyter/state.py
43 44 45 |
|
get()
Source code in roc/jupyter/state.py
47 48 49 |
|
init_state()
Source code in roc/jupyter/state.py
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
|
print_state()
Source code in roc/jupyter/state.py
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
|
state_cli(var)
Source code in roc/jupyter/state.py
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 |
|