News for hackers. Stuff that matters.

hgoury

Re:p5.js on Monday August 05, 2024 @05:18AM (#41159429)
I've done some things with Svelte motion, such as tweened / spring [0].

This gradient descent visualizer is made with it for example [1] to interpolate the points when the prediction line moves.

[0] https://svelte.dev/docs/svelte-motion

[1] https://gradfront.pages.dev/

Indeed. There is much controversy about this way of thinking, and about the methodology. See for instance [0]

[0] https://www.jasonhickel.org/blog/2019/3/17/two-hump-world

Ah indeed, I mixed up his name with the Shalev part of the name of the other author.
I really enjoyed Ben-David (and Shalev-Schwartz)'s book "Understanding machine learning". It's essentially about theory though, not "learn all about machine learning in torchsorflow in 10 days".
> No, certainly not just excel.

Indeed, let's not forget LibreOffice

Re:Foundations of Probabilistic Programming on Tuesday December 01, 2020 @12:47PM (#25267602)
I am currently going through Statistical Rethinking [0], by R. McElreath. So far it's been great, all the code example and practice problems help comprehension.

I've also heard good things about Probabilistic Programming and Bayesian methods [1] by Cam Davidson Pilon.

[0] https://xcelab.net/rm/

[1] https://camdavidsonpilon.github.io/Probabilistic-Programming...

Re:Biden wins White House, vowing new direction for divided U.S. on Saturday November 07, 2020 @03:29PM (#25018931)
You could also point out that he has abandoned the kurds in Syria (Rojava), where they are losing ground against the turkish army and their jihadist mercenaries. They are about to ethnically cleanse the region, with dramatic consequences for the autonomous zone that has developed a seemingly fair democracy.

The military branch of the PYD party was crucial during the fight against ISIS. Leaving them to die in Erdogan's hands is tragic.

Re:Another Now by Yanis Varoufakis on Thursday November 05, 2020 @04:21PM (#25002105)
I would not consider your view of the problem as "leftist". I'm not challenging your self-designation, but the way you present the situation.

In my opinion, there are a few points that are dubious in this analysis:

- A country is not like a person. It doesn't make any sense to compare the situation of a state to that of an individual.

- Different countries are engaged in trade together. If one, say Germany, has commercial surplus, it is because others buy its production. Hence, all countries can't produce like Germany : who is going to buy everything?

- According to mainstream economic doctrine (Keynes), cutting government spendings does not lead to growth especially amidst a crisis, whereas you have an alternative that does create growth and does not condemn people to starvation. This is done instead by increasing the spendings in the right way.

- Various officials have falsified economic documents in order for Greece to enter the Eurozone (and was helped by Goldman Sachs [0], for example). Why should people suffer from acts of this nature ?

[0] https://www.independent.co.uk/news/world/europe/greek-debt-c...

Re:The Era of Visual Studio Code on Wednesday September 23, 2020 @07:09AM (#24565512)
I've never had any trouble with PYTHONPATH, I guess this is solved by pyenv with virtualenv. You just need to select the project interpreter the first time you open the project and it should just work.

I haven't used rope extensively, it's too bad that it doesn't work well. It's open source so I guess it needs more contributions.

Re:The Era of Visual Studio Code on Wednesday September 23, 2020 @02:27AM (#24563642)
In my company we use pyenv with virtualenv and everything works seamlessly. VSCode automatically runs the activate script from pyenv in a new terminal (in my case it is even the fish shell), debugging works fine, and I can go to definitions.

Note that a new extension, that works alongside the original python extension, has been developed by Microsoft: Pylance. It speeds things up based on pyright, a python type-checker.

For refactoring you can use rope [0] as a VSCode extension.

[0] https://github.com/python-rope/rope

This is neat. However I've rather use einsum and einops [0] to reshape stuff in practice.

[0] https://github.com/arogozhnikov/einops

It makes me think of Voyager [1][2], based on Vega and Vega-lite, that leverage a grammar of graphics. A neat trick you can do in Julia is use it interactively to generate plot specs [3].

Sadly, looking at the github repo it seems to be unmaintened, so I am glad to see Muze in that space.

[1] https://github.com/vega/voyager

[2] https://idl.cs.washington.edu/papers/voyager2/

[3] https://youtu.be/IJqnx9ShRlM

Re:Bayes Theorem: A Framework for Critical Thinking on Wednesday August 05, 2020 @10:19AM (#24061041)
Bayesian approaches are gaining momentum in cognitive sciences. See for instance "The Bayesian brain" article by Knoll and Pouget.

There is also Cox's theorem, that essentially states that probability theory is the only sound system that extends logic in the presence of uncertainty, to continuous values (between 0 and 1) instead of the two values 0 and 1.

Re:How to become a Bayesian (2016) on Thursday July 09, 2020 @03:44AM (#23777886)
By definition: p(A|B) = p(A,B) / p(B) (1)

With the same definition, switching A and B roles, we have p(A, B) = p(B|A) p(A) (2)

Plug (2) into (1) and you have Bayes rule.

Re:Bored? How about trying a Linux speed run? on Sunday April 12, 2020 @04:19PM (#22850754)
Such an amazing talk ! Someone linked to this on HN a while back, this allowed me to discover David Beazley. I then got the Python Cookbook, and watched a bunch of other very cool talks. He's an excellent speaker and python wizard!
Re:Ask HN: Recommend me a course on Coursera on Friday April 10, 2020 @05:00PM (#22837321)
I took watched some of the lectures and did a few exercises when I had a similar course at University, it was great indeed.
> They're entirely ill-suited for mobility though.

I am a happy owner of a Microsoft Sculpt keyboard and mouse, and it is quite mobile. It has a built-in wrist rest as well.

Re:What's so hard about PDF text extraction? on Tuesday March 03, 2020 @12:59PM (#22476976)
There is a fairly interesting library developed by the Stanford Team behind https://www.snorkel.org/ that takes structured documents, including PDF formatted as tables, and builds a knowledge base: https://github.com/HazyResearch/fonduer

It looks promising for these kinds of daunting tasks

Re:Swift: Announcing ArgumentParser on Monday March 02, 2020 @05:45AM (#22463284)
You should check out click : https://click.palletsprojects.com/en/7.x/

It is very powerful, uses special files stdin/stdout when file argument is "-", supports groups, subcommands...

Re:Turning a Job Opening into a Dream Job for Top Talent on Saturday February 03, 2018 @09:21AM (#16297714)
In my previous company, they has a name to distinguish these two kinds of metrics.

- Inputs are the things employees can act on easily, like the number of LoC written or the number of features developped.

- Outputs are related to business success, for example the number of customers, or the revenue.

The key here is to consider the external business environment as a complex machine, in which you put some effort, measured by inputs, and you observe the outputs as a result (reward). Because you don't know how the environment is going to respond, running the activity consists in adjusting the measures of inputs according to previous results, and trying to maximize those.

This is sane for business because executives can focus on maximizing the input metrics, without caring too much about the outputs, and evaluate separately the assumptions they made about the business (e.g. that x number of features requested by customers developped within 1 month increase the userbase).

It kind of looks like a reinforcement learning process actually.

Re:Stop Using Excel, Finance Chiefs Tell Staffs on Wednesday November 22, 2017 @07:42PM (#15761955)
This actually exists inside excel since 2010, it is called get & transform (known before as power query) and lives in the data tab. It allows the user to mash data from different sources (databases, csv, excel files, current workbook) and perform sql-like opérations : filter, join, etc. In a wisiwyg-record-macro fashion. I find it very intuitive and the steps are easily reproducible as each transformation step is translated into a language derived from F#. It is a game-changer for business users that dare using it, as it is rigorous and precise like a classical SQL flavor, but also usable with zero training.

Since it was a very powerful tool but struggled getting traction, they are using it as the core query tool for power BI (alongside DAX for great dashboarding).

Well done Microsoft.