« first day (1398 days earlier)      last day (1835 days later) » 

eli
5:40 AM
Hi, I have a question. Does anyone know about the difference between "Anisotropic diffusion" and "Geometric heat flow"?
 
 
2 hours later…
Sam
7:16 AM
morning all
 
yo
 
Hej!
 
Sam
How are we all :D
 
Very tired. Also really good, watched Endgame yesterday \o/
 
Sam
Oh cool, is it good?
 
7:20 AM
it's no Thor 3 but I liked it a lot
 
Sam
I'm super excited to watch the new Game of Thrones today!
Oh @AndrasDeak I have a python question :p
Well more asking for your opinion..... if I have a python project A, and then make a completely separate python project B, is it considered bad practise to edit my python path variable to include A if. I want access to it in project B?
 
yes
make A installable and install it locally
it takes an __init__.py or two and a simple setup.py which you can run as python setup.py develop to have an installed version that updates whenever the source updates (unless there are compiled modules in it)
and maybe a new top-level directory for the package
 
Sam
And do I install it using pip install -e .
 
that's probably the same thing as python setup.py develop
I have this structure for my work python things:
./
├── module1
│   ├── __init__.py
│   ├── module1.py
│   └── misc
├── LICENSE
├── module2
│   ├── __init__.py
│   ├── module2.py
│   └── sample
│       └── input.inp
├── module3
│   ├── __init__.py
│   └── module3.py
├── README.md
└── setup.py
some of the 3 modules import one another, and simply using from module1 import ... which assumes that the others are installed
import setuptools

setuptools.setup(
    name="big_package_name",
    version="0.0.1",
    author="author",
    description="foo",
    packages=['module1', 'module2', 'module3'],
    install_requires=['numpy', 'scipy', 'matplotlib'],
    classifiers=(
        "Programming Language :: Python :: 3",
        "Operating System :: OS Independent",
    ),
)
and this is my setup.py which installs all 3 ^
 
Sam
Ah thanks. So you could make a whole new separate project, and get access to the above modules simply by using python other/package/location/setup.py develop
 
7:34 AM
uuuuh no, I think you have to run setup.py locally
the point is that once you do that the module will be installed in that python environment just like numpy
I think with the above strategy you may have to uninstall them with the name big_package_name, which might or might not be what you want
you can have 3 setup.pys for each project and install them separately by their own names
 
Sam
@AndrasDeak I think this should be ok for me
 
if you install them once then when you make a whole new separate project you don't have to do anything, just import them when needed
if this doesn't fit your use case then you might try making your packages subpackages of a big package (well, not quite unlike the above) and using relative imports inside the packages, but I never got the hang of that...
 
Sam
Is that assuming I'm installing them into a python environment which is being used across multiple projects?
 
Well, for whatever python env you're using, yes. But presumably if you need a new env you're going to install things anyway, and you can just install your own package as well
 
Sam
Cool I'm gunna give this a go then. Seems better than editing python path
 
7:37 AM
never edit the python path
 
Sam
What are the problems with doing so? Just so I know
 
the same as eval (except security issues) or a dozen globals in a script, it's just very bad form and can break things
I don't know specific examples but there's no doubt about it being a very bad code smell
 
Sam
I agree with the code smell
 
Sam
@AndrasDeak Inside your setup.py file.. can install_requires point to requirements.txt
 
7:44 AM
then again we also have laurent22.github.io/so-injections
@Sam uuuh no idea, I know next to nothing about packaging :P I seem to recall mentions that requirements.txt isn't actually for dependencies. But whether you can hook requirements.txt in there I don't know
 
Sam
Maybe a question better suited in the actual Python room :p
 
yup
 
Sam
I also know next to nothing about packaging ;)
 
 
1 hour later…
9:02 AM
@AndrasDeak wait wait
that is the amount of SQL code that can be injected?
50%! the fuck
 
9:28 AM
What is the easiest way to determine how many leading zeros a number has after the decimal separator? Use case: I have a frequency spectrum, with sampling frequency between 3 to 24 hours (different spectra), so the x-axis is rather difficult to read (10^-4 to 10^-5 interval in Hz), so I want to change the x-labels to hours/days.
 
why dont you just give it in hours?
 
I can do this by hand (0.00004 Hz is about 40 mins)
@AnderBiguri because then my plot changes, since I then plot 1/Hz, as opposed to Hz
 
so....?
looks ugly if you do?
 
Yes
And not what the standard in our field is
 
double lables?
give the axis in Hz, but add a trasnlation to hours
 
9:31 AM
Basically you plot a power spectrum like you always do (amplitude squared vs frequency), but then label with hours and days instead of herz
 
------------------
-
1e-4
5h
 
@AnderBiguri yes, that's what I am looking for indeed, without plotting th Hz labels at all
 
OK, so bak to my question, but without the change of unit
just add it in hours maybe?
 
It's a lot easier then I thought initially facepalms. You can just query the x-ticks, and change the label, leaving the location intact
 
What a convoluted algorithm.... Yikes! stackoverflow.com/questions/55900206
 
9:52 AM
@HansHirse when you edit questions, it's considered good practice to remove the tag from the title (i.e. "How to foo the bar in MATLAB" and tagged with can almost always be turned into "How to foo the bar" w/o losing any information)
 
@Dev-iL Usually, I try to keep an eye on that (too). Must've missed it this time - you refer to stackoverflow.com/questions/55896075, right?
Ah, you already edited it!
 
10:07 AM
@Adriaan log10?
 
Since I recently got access to the "Suggested Edits" pipeline, I have a general question: I quite often see editors manipulating code provided by the questioner or answerer. The best-case is, they also add a comment explaining their edit, but mostly there isn't even a proper edit comment. So, I personally would be very reserved to edit someone else's code, but for the reviewing: How do you handle such edits?
 
I'm usually very conservative. These almost always deviate from the answerer's intent. And if it's a question, juts don't edit it because you might introduce or remove syntax errors.
 
@HansHirse basically the only "code" edit I approve is one that fixes markdown, i.e. block formatting, and in-line variable formatting. Anything else goes in the "Attempt to reply" or "Conflicts with authors intent" bin
 
and you have to be really careful with block formatting of python code, because doing that nontrivially will mess with syntax
 
10:25 AM
@Adriaan That's exactly my thought. Right now, I mostly just skip those edits.
But I guess, I'll be more courageous rejecting those edits in the future.
 
10:47 AM
@CrisLuengo I really liked your overbar answer 😀 It's just the sort of answers I like seeing
 
11:03 AM
@Dev-iL Meh, sometimes it's just too easy. By the way, should've (also) been a comment to my answer!?
Nevermind, deleted my answer.
 
@HansHirse why?? That wasn't my intention... :(
@HansHirse I considered doing that, but just pinged you here instead
 
11:19 AM
@Dev-iL I just wrote a "whole" answer, to raise awareness to possibly(!) use squeeze. I guess, a comment would've been enough in the first place. Everything's fine, no harm done. :)
 
11:50 AM
Is this too broad? Basically they say "My algorithm gives poor results when extrapolating, how to fix?"
 
@Adriaan Actually, the main problem is "cleverly" hidden at the end of the code snippet - "% When I am trying to forecast say next 10000 values then it gives me constant values."
 
@Adriaan From my point of view, it's rather unclear than too broad. The provided code just seems to create the attached image. The actual forecasting isn't shown.
The current and expected outputs are not shown/described.
 
Sam
12:38 PM
just finished the latest game of thrones episode. Holy hell
 
This is a public chat, I suggest you do not spoil it for others, considering how mad people get with that
 
Sam
I'm not going to mention anything other than that
 
yeah, I smite people who post spoilers
 
@Dev-iL Thanks!
@HansHirse That wasn’t necessary, it was a good answer!
 
@CrisLuengo All you mods, who can see deleted stuff! ;)
 
12:52 PM
not mods :P
 
Just goldies
not even, its the 10K thing
 
mods have diamonds and are very powerful and elected by the community, employees also have diamonds but are not elected by the community, 10k-rep users see deleted stuff and can delete-vote certain things, room owners in chat can kick users and move messages
none of these are the same thing ;)
 
All you 10-k-things, who can see deleted stuff - then! ;D
 
and goldies can use mjolnir, the mighty dupehammer
 
 
2 hours later…
2:44 PM
@AnderBiguri I hope they are not colourblind
 
D:
maybe they redlight then
dang
I think it will be this week, hopefully, I really want to move on from it
 
3:07 PM
I've never seen a question like this before: stackoverflow.com/q/55905912/7328782 -- Is it on topic? It seems a reasonable question, but also seems impossible to answer.
 
@CrisLuengo the SOCVR seems to agree that it is primarily opinion based or too broad, due to the factors involved; which do you take into account, which don't you, etc
 
@Adriaan Thanks! SOCVR is a good resource, I keep forgetting to use it... :)
 
3:46 PM
@CrisLuengo I feel like I'm starting to sound like a broken record... But vectorizing is more fun! :-)
 
@LuisMendo Indeed, it is!
I've been training myself to shed old habits though. I'm more concerned nowadays with saving memory. I work with very large data, and have learned the effect of cache misses and so forth. Looping through data in the right order makes a huge difference. It's a different game now. :)
 
 
1 hour later…
5:11 PM
posted on April 29, 2019 by Cleve Moler

This post is by my colleague Cosmin Ionita.... read more >>

 
@Feeds oh, that looks neat
apparently the original Akima is also there in scipy docs.scipy.org/doc/scipy/reference/generated/…
 
5:53 PM
WTF? 500 upvotes in one day? stackoverflow.com/questions/55884514/…
 
HNQ..
what I don't get is the reopen votes
 
Me neither. It's being discussed on Meta.
 
sure, let's not delete it because that answer, while the epitome of an opinionated answer, is good
 
It was an opinionated question anyways
so an opinionated answer makes sense
 
yes, and that's why it should stay closed
fortunately I haven't voted to close it yet, I think
 
5:59 PM
Cody Gray thinks it is not opinion-based.
@CodyGray: It is opinion-based. The question is asking for the opinion of a software developer, and the answer is the opinion of a software developer. There is nothing in that question that is not about opinions. Any question asking for the motivation of a person is opinion-based. — Cris Luengo 1 min ago
 
omg
that guys name keeps fucking me up
I keep reading it as Cody Gary, or Code Gray
 
LOL
 
neither of which are right
 
Gray Code.
The reflected binary code (RBC), also known just as reflected binary (RB) or Gray code after Frank Gray, is an ordering of the binary numeral system such that two successive values differ in only one bit (binary digit). The reflected binary code was originally designed to prevent spurious output from electromechanical switches. Today, Gray codes are widely used to facilitate error correction in digital communications such as digital terrestrial television and some cable TV systems. == Name == Bell Labs researcher Frank Gray introduced the term reflected binary code in his 1947 patent application...
The question now has a historical lock on it.
 
heh
Yeah I just saw that
I'm trying to think of a comment I can leave so I can purposefully mess his name up
 
6:12 PM
You should do that. He messed up my name!
 
There we go
done and done
 
I think my colleagues are wondering why I'm laughing out loud...
 
If he responds I'll call him CodeGray next time
hahaha
lmfao
@ballBreaker btw you misspelled Cody Gray's name, so he may not see that @ reply — TylerH 51 secs ago
 
So helpful!
 
 
4 hours later…
10:45 PM
"I have reviewed all the examples shared on this topic before, but I have not found the answer." stackoverflow.com/questions/55911679/… Sigh!
 
10:56 PM
By the way, curl question has been deleted now. Daniel Stenberg earned 7 badges with his answer there, I guess he gets to keep those. So he can't be all that hurt. It looks like he posted a link to the question somewhere, that must have driven a lot of the traffic.
 
11:20 PM
Did not know the Makima's formula. Seems to be a better solution for one of the questions I answered recently.
 

« first day (1398 days earlier)      last day (1835 days later) »