spellcard199
Joined 7 years ago
Joined 7 years ago
As a frequent user of xkill I was surprised by that too, but I remember reading somewhere that making a terminal application kill another application's window is not allowed by design. Reusing a sibling commenter's analogy, it's kind of like some javascript functions in the browser can only be triggered by user actions for security reasons.
The compositor, however, is allowed to kill the windows it's showing. So if you want to kill a window, you can ask the compositor to do it for you. Gnome, KDE [0], sway [1], etc.. each expose this functionality in a way that differ between each other.
[0] https://www.reddit.com/r/kde/comments/1242w2e/wkillsh_an_xki...
[1] https://www.reddit.com/r/linuxquestions/comments/ufw7tj/is_t...
// 1. Open looking glass: Alt+F2 > lg
// 2. Use picker to pick window (button on the top left corner).
// 3. Now an object r(0) of type MetaSurfaceActor is available in the
// gjs console (or some other number if you've already used it).
// To get pid:
r(0).get_parent().get_parent().get_meta_window().get_pid()
// To kill window and process:
r(0).get_parent().get_parent().get_meta_window().kill()
Reference for what those .get_parent() refer to:
https://gitlab.gnome.org/GNOME/mutter/-/tree/fc1de744/src/co...In the demographic of woman of child-bearing age the coexistence of more than one autoimmune diseases is not uncommon. Occasionally, there are even combinations of several of them [1]. As you've written, the manifestations you have reported may or may not be caused by one or more autoimmune diseases, but the ones that tipically keep autoimmune/rheumatologic origin in consideration even when labs are negative are the partial spinal fusion and the arthritis [3][2].
> According to every test they run on her, there appears to be nothing wrong
Does it? We have:
- clinical picture strongly suggesting some rheumatologic disesease: inflammation and rapid onset arthritis are typical, but DVT, random bleeding may also be linked.
- radiographic evidence of spinal fusion.
And that's exactly how (eg) Ankylosing Spondylitis has been diagnosed classically (i.e. when MRI was not an option) [4]. More generally speaking, as the name suggests, the diagnosis of most Seronegative Spondyloarthropathies is based more on clinical than laboratory criteria [3]. For how I understand it, ideally AS would be diagnosed before spinal fusion happens, but when it's present and there isn't a more likely explanation AS would be at the top of the differential diagnosis.
Another thing that came to my mind when reading DVT, bleeding, vision loss was that these are more typically seen together in of some kind of vasculitides, hence why I mentioned above an the possibiity of multiple autoimmune diseases, but these could also be explained by anything altering Virchow's triad.
> There's no explanation for the temporary blindness, the rapid onset arthritis, the partial spinal fusion, the diverticulitis, the random bleeding,
That sounds somewhat strange. While for temporary blindness, diverticulitis and DVT the cause may already be gone by the time the patient arrives at observation, at least for rapid onset arthritis, spinal fusion and random bleeding I think a diagnosis of the cause should be made.
The reason why rheumatologic diseases should be diagnosed is that if left untreated there will be periods of remission, when nothing happens, and periods of activity, when irreversible damage accumulates. Another reason to diagnose rheumatologic diseases is that they may themselves be manifestations of some other condition (e.g. rheumatologic paraneoplastic syndromes). We don't know if your wife actually has a disease, it may be not, but that's not a risk a doctor would leave to chance. It's just standard practice.
As I've already written I'm not a doctor, but if I may give you my advice anyway I would say your wife should go and see a rheumatologist.
> There's no one who either wants to or is qualified to look.
If I were in you, at this point I would go to some known research center with maybe a university department or ward.
[1] [Coexistence of Axial Spondyloarthritis, Systemic Lupus Erythematosus, Sjögren’s Syndrome and Secondary Antiphospholipid Syndrome: Case Report](https://dergipark.org.tr/en/download/article-file/1615538)
[2] [Approaching the Patient with "Joint Pain" - CRASH! Medical Review Series ](https://www.youtube.com/watch?v=sfKWNeAywak&t=195s)
[3] [Seronegative Spondyloarthropathies - CRASH! Medical Review Series](https://youtu.be/hvQkROf5rsQ?t=377)
[4] [Progression of Spinal Fusion in Ankylosing Spondylitis](https://clinicaltrials.gov/ct2/show/NCT00085995)
Since it may be of interest I'll add some notes.
You can get a console also in the desktop app if you launch it from a terminal adding --remote-debugging-port=..., then opening http://127.0.0.1:<port> from a chromium-based web browser.
A couple of useful functions that allow to listen to events are graph.model.addListener and graph.selectionModel.addListener. They are documented in the mxGraph api page.
You can make your functions persistent between sessions by putting your code in a javascript file, clicking from the desktop app on Extras > Plugins > Add > Select File... Then restart the app. In the web app "Select File..." is replaced by "Custom..." and the file should be some reacheable url. The javascript file can contain arbitrary javascript code, doesn't need to have a specific format.
Finally, to customize the ui actions, keybindings and menus without touching the various event listeners, this answer on stackexchange [1] from user holroy is what initially guided me in the right direction.
var editorUi;
Draw.loadPlugin(app => editorUi = app)
var editor = editorUi.editor
var graph = editor.graph
... then you can automate changes to the diagram using mxGraph's api [1] on the `graph' variable from the console.Around this plugin mechanism I wrote some dirty hacks for personal use to make the editor behave more to my likings [2] (some features stopped working with recent versions of the desktop app), and an even dirtier Emacs mode for editing labels and having the js REPL available directly from Emacs when I need to run some code to fix my diagrams programmatically [3] (based on Indium [4] + the fact that electron apps can be launched with --remote-debugging-port=...). It's not pretty, but works enough for me, and it's only thanks to the customizability that diagrams.net allows.
[1] https://jgraph.github.io/mxgraph/docs/js-api/files/view/mxGr...
[2] https://gitlab.com/spellcard199/drawio-plugin-eight-droves-o...
The way I understand monads: some data structure plus 2 functions, "return" and "join":
- "return": wraps something with the data structure. (no relation with the return keyword you are used to in most languages)
- "join": joins 2 layers of the _same_ data structures into one.
And that's it. It's just that simple what a monad is: in java it would be an interface with just these two methods.
Examples:
- "return" for List: takes a value and returns a List containing just that value.
- "return" for Maybe: takes a value and returns Maybe value.
- "join" for List: takes a List of Lists and returns a flattened List (2 outer layers joined).
- "join" for Maybe: takes Maybe Maybe value and returns Maybe value.
I think what makes these functional programming concepts hard to grasp most of the times is that communicating the boundaries of abstract concepts is hard in general, even if the concept itself is really simple, like a monad can be for a programmer.
As for why monads are useful, the explanations you can find online give a lot of examples. Just think of all the times you may have used flatmap for arrays: that's just map followed by the "join" for arrays, which is sometimes called flatten. The other operators you see used in haskell, like "bind" (>>=), can be derived from "join" and vice versa and are just conveniences to write code with less noise, like flatmap is.
Recap: monad is the name of the concept for things that have a "join" and a "return" functions defined. Basically "join" is the distilled concept of what a monad is.
(edit: formatting)
[1] https://mybinder.org/v2/gl/spellcard199%2Fikawa-binder/06a90...
[1] https://clojure.org/community/license [2] https://groups.google.com/forum/#!topic/clojure/uWAWm0xqrTI
What I need is to make a diagram from a file produced by diagrams.net without me writing the parser (JGraphX can already parse diagrams.net's xml), show me a window where I can select and adjust elements by hand, transform the diagram programmatically in a language where I have both type-checking and good completion for (eg) the selected objects, export back to diagrams.net's format. Occasionally I want to extend the already interactive window myself. I also evaluated Typed Racket before picking Kawa and the JVM, but JGraphX was just a more appropriate tool for this specific workflow.
> There's also this (and others) for selenium
I remember finding that, and I counted it as a subset of Selenium's functionality rather than equivalent.
I agree on the sentiment on Racket though, as for the language itself Java was a second choice for me. What eventually convinced me to invest in it was that I could always call what I had already written from other languages on the JVM (mainly Scala and Kawa, which also happen to have decent repls) without writing any glue code.
(define (f1 x::String y::String) (x:concat y))
(define (f2) (f1 3 3))
;; /dev/tty:3:19: warning - type integer is incompatible with required type java.lang.String
;; /dev/tty:3:21: warning - type integer is incompatible with required type java.lang.String
;; /dev/tty:3:15: warning - cannot convert literal (of type gnu.math.IntNum) to Type java.lang.String
;; /dev/tty:3:15: warning - cannot convert literal (of type gnu.math.IntNum) to Type java.lang.String
Unfortunately it does not support fully static type checking nor generics, otherwise it would be my favorite scripting language hands down.As for type checking Elisp, Elsa[1] seems an interesting project and I hope it becomes a stable option. On the other hand I wonder if in future type checking could also come from gccemacs[2], since one of the "long-term improvements" may be "better compile time warning and errors relying on the propagation engine".
[1] https://github.com/emacs-elsa/Elsa [2] https://akrl.sdf.org/gccemacs.html
Edit: grammar.
The specificity of CT when interpreted by humans is reported to be <56% [1]. The specificity for this model seems to be around 80%, which looks too good to me (I did 79/(79+19)=0.8, taking the numbers from the table at the bottom in OP).
Is it that the non-Covid-19 scans in the training data were easier to recognize than the ones doctors see every day or is the model so much better than humans at recognizing non-Covid-19 cases? If it was the latter, the reduced sensitivity (human: 96% [1], model: 85%) would not look bad at all, right?
[1] https://pubs.rsna.org/doi/full/10.1148/radiol.2020201709
[1] https://github.com/nix-community/lanzaboote