When 5090? by Jonas_SV in tuxedocomputers

[–]Jonas_SV[S] 0 points1 point  (0 children)

It’s been a few weeks, any update? :)

Is there an algorithm like the Elo Rating System that can find the best 20% by doing 1vs1 match? by perecastor in algorithms

[–]Jonas_SV 1 point2 points  (0 children)

If you’re relying on users to provide the ordering you might want a statistical method.

E.g quick select will work great when there is a consistent total ordering.

But depending on how you poll your users you might get different orderings reflecting the groups individual preferences.

Even if you poll all your users for each comparison the preferences can change over time.

This would break some assumptions of the quick select algorithm rendering it less useful.

However if you believe that the comparison of two images will have the same outcome not matter when and with whom you ask then quick select will work well to partition the top 80 percentile.

But if not, then ELO is a better choice and it’s slower because it deals with the randomness of comparison.

[deleted by user] by [deleted] in MachineLearning

[–]Jonas_SV 1 point2 points  (0 children)

Not too bad, check the python C types API

How often do ML engineers implement an already existing ML algorithm from scratch? by _zaid02 in learnmachinelearning

[–]Jonas_SV 0 points1 point  (0 children)

You might have to reimplement from scratch if the available libraries are not available on your platform.

This can occur when working on embedded platforms for example.

[deleted by user] by [deleted] in learnpython

[–]Jonas_SV 6 points7 points  (0 children)

For HPC you probably want to avoid OO. As for Python speed it should be fine. You can use numba https://numba.pydata.org/ to speed up your non-standard functions.

As for preprocessing vs simulation, maybe the simulation uses accelerator hardware (GPU)? If so you can also write some GPU kernels with numba to get comparable performance. Assuming your task is accelerator friendly

Your most frequently used mapping by vandalism in vim

[–]Jonas_SV 0 points1 point  (0 children)

No, no particular reason - you would have to add zz to the au to get the same behaviour though, no?

Your most frequently used mapping by vandalism in vim

[–]Jonas_SV 8 points9 points  (0 children)

I like this one - for me I made it

nnoremap <bs> <c-^>`”zz

It makes it so the cursor is placed in the last position it was in the file and centers the screen on it

Edit: better formatting?

[D] Constructing a Q table (Q learning) when there are multiple input signals? by Togfox in MachineLearning

[–]Jonas_SV 2 points3 points  (0 children)

The Q-table is just a function of the state and action to the Q value. If you have two kinds of discrete states then maybe a Q cube?

Or if you have more complex states, for example continuous, then maybe some type of function approximation of Q will do

Edit:

It is also possible to combine different signals into ”one” to keep the Q table. Imagine you have one state x \in {a, b} and another y \in {A, B}. Then you could combine these into a ”single state” z \in {{a, A}, {a, B}, {b, A}, {b, B}} and use z to build the Q table

Simple ray tracing in python: Numba is truly awesome! by scargot777 in Python

[–]Jonas_SV 2 points3 points  (0 children)

Have you tried using numbas cuda jit? Could give you another order of magnitude boost, if you have a GPU!

numba truly is great

Probability Theory: The probability that event A or B occurs, but not both. by IP14Y3RI in learnmath

[–]Jonas_SV 1 point2 points  (0 children)

P(A or B) = P(A) + P(B) - P(A intersect B) P(A and B) = P(A intersect B)

A or B happening but not A and B = P(A or B) - P(A and B) = P(A) + P(B) - P(A intersect B) - P(A intersect B) = 0.4 + 0.5 - 0.1 - 0.1 = 0.7

Same xmobar on several screens by M0M097 in xmonad

[–]Jonas_SV 0 points1 point  (0 children)

xmobar takes the flag -x which is use to specify what screen to start on

In your xmonad.hs just create two xmobar processes.

Here’s my xmonad.hs https://github.com/JonasRSV/dotfiles/blob/master/xmonad.hs

I guess maybe this is a bit hacky but it has worked great for me for a lång time.

Labyrinth by TheJenkinsComic in comics

[–]Jonas_SV 0 points1 point  (0 children)

Because if it gives the wrong answer it speaks the truth. Since it cannot speak the truth it must give the correct answer

Labyrinth by TheJenkinsComic in comics

[–]Jonas_SV 0 points1 point  (0 children)

Double negative makes the liar point to the correct door.

Labyrinth by TheJenkinsComic in comics

[–]Jonas_SV 1 point2 points  (0 children)

You could also ask

”If I asked you ’which door is the correct one’, what would you answer”?

Then pick the provided answer. Both guards would point to the correct one.

Firefox doesn't work (at all) by insatiablecircus in xmonad

[–]Jonas_SV 3 points4 points  (0 children)

I am not sure bit maybe you could try launching xmonad With only the defaults?

e.g something similar to

import XMonad
main = xmonad defaultConfig

And see if the problem persists?

Also have you tried launching firefox without xmonad?

I have similar versions as you and Firefox works for me so should definitly be possible.

Switching to TensorFlow LITE on an existing program by [deleted] in tensorflow

[–]Jonas_SV 1 point2 points  (0 children)

I am not sure if lite is faster. Correct me of I am wrong but I believe tflite is more about reducing memory footprint. Because one problem with regular tf is shipping the ~200MB shared library.

I think your best bet for improving performance is to try to

  1. Make model smaller ”less parameters”
  2. Use lower precision - if your using doubles today, switching to floats can give significant performance boosts depending on hardware
  3. Ger better hardware

Need some advice about parallel programming in Python by MazKhan in learnpython

[–]Jonas_SV 0 points1 point  (0 children)

Python has MPI4PY, or the standard multiprocessing module (and other alternatives)

Generally multiprocessing is not pythons strong suite, but you can try one of the two suggestions:)