News for hackers. Stuff that matters.

eljost

Re:The “Zoo” Constant in Python's Sympy Library on Friday June 02, 2023 @06:21AM (#36163331)
Given the fact that infinity is expressed as sympy.oo in sympy makes the use of sympy.zoo somewhat consistent/unsuprising.

Maybe the OP of the tweet was/is not aware of this use. I wonder if his next tweet will be about sympy using oo for infinity.

The audio also reminded me of the Fallout games.
Works fine w/ steam and "Proton Experimental" under "Linux 5.10.154-1-MANJARO #1 SMP PREEMPT Thu Nov 10 20:51:28 UTC 2022 x86_64 GNU/Linux". I had to install the package "sdl_ttf" though; without it, the game just hung at the inital screen that says "Loading".
Re:Pattern matching accepted for Python on Tuesday February 09, 2021 @04:53PM (#26082851)
You can use variables in the formats.

  >>> flt = 1.2345
  >>> two = 2
  >>> f"{flt:.{two}f}"
  '1.23'
Re:A CIA officer turned police officer: thoughts on policing on Wednesday June 03, 2020 @03:05AM (#23400745)
As someone from Germany it seems very strange how casually he talks about being shot at, as if this is a normal thing.
Re:Ask HN: How to release research paper code? on Wednesday November 13, 2019 @03:38AM (#21522101)
Check out Zenodo [1]. It lets you generate DOIs for Github releases.

[1] https://zenodo.org/

Re:A Molecular Near Miss on Thursday August 29, 2019 @02:18PM (#20832178)
Actual atoms in molecules also vibrate all the time, so the provided bond length he talked about should be seen as an equilibrium bond length.
Re:Ask HN: Teaching programming in computational biology? on Wednesday June 27, 2018 @09:03AM (#17407794)
I'm a computational/theoretical chemist and use python extensivly.

To me te question seems a bit poorly phrased. What is the goal of the course? Are they supposed to learn how to program? Then it's of course fundamentals first, especially the stuff you cited (variables, functions, scoping). You can't solve any problem without knowing this stuff.

If they are supposed to learn a specific library/tool then, in my opinion, it depends on the libs/tools you want to teach them. Maybe this libary is not that relevant for comp. biologists, but take scikit-learn. You still have to know how to program when you wan't to use this library properly. On the other hand if they shall learn some GUI-tools then I guess they don't have to know how to program. You can ask yourself: Can you anticipate what tools/libraries your students will be using in a few years? If you can answer yes to this, then teach them a bit about these tools. If your field is constantly evolving/changing then it would be better to invest in the basics, so your students can adapt easier.

Considering the fact that you are (hopefully) and have to be constantly learning as a practicing scientist it is of great importance to get the basics right.

Re:Pythran: Crossing the Python Frontier [pdf] on Tuesday April 24, 2018 @04:58AM (#16911017)
Interesting article but just skimming through it some things stand out immediately: 1.) The first snippet isn't even valid python code as floats don't have a shape attribute.

  s = 0. 
  n = s.shape
2.) The inline latex math isn't rendered properly.