« first day (1620 days earlier)      last day (3553 days later) » 

18:00
@MartijnPieters Is this answer of mine incorrect? It got two downvotes with no explanation.
I'm also pretty sure it's right because the same thing was said in a comment, which the op said "yep, that's it" to.
I wish I could easily create a circle in paint, given its radius and center. You can only define ovals via their bounding box, though.
I wonder if it's hard to inject bitmap data into the Windows clipboard.
@davidism oh... I have a sqla question you might be able to help with!? :)
@Martijn nice update – deleted comment now :-)
Let me dig up a MVCE I came up with
@Jon sure
18:09
wrong copy... sighs one sec
class Item(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    # ... other columns ...
    main_image = db.relationship(db.Integer, db.ForeignKey('image.id', nulllable=True))

class Image(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    # ... other columns ...
    item_id = db.Column(db.Integer, db.ForeignKey(Item.id), nullable=True)
    item = db.relationship(Item, backref='images')
Guys, is this as nonsensical as I think?
Traceback (most recent call last):
  File "crawl.py", line 352, in <module>
    send_logs()
  File "crawl.py", line 336, in send_logs
    attachment = MIMEText(open("logfile").read())
FileNotFoundError: [Errno 2] No such file or directory: 'log/logs.log'
It's trying to open logfile, then telling me it can't find log/logs.log ??
@davidism the idea being that Image's can exist without an Item, but an Item can have multiple or no images, of which one of them is the main image...
@Kevin - It's fairly straightforward in Wx. E.g. wx.TheClipboard.SetData(bitmap). Don't think it's really possible in Tk, so you need a bit more than a default python install...
hello, I'm trying to plot a 3d plot, like this matplotlib.org/examples/mplot3d/contourf3d_demo2.html
I'd like to be able to transparently access Item.main_image and do something like for image in self.images on the Item class... at the moment it breaks because there's no mapping or something
18:12
the problem is that, for some reason, X, Y and Z are not simple lists of values, but 2D arrays
how can it be?
X is a 2D numpy array, and Y is too
@JonClements you want to treat main_image as part of the images collection?
@Martin Seems pretty odd, yeah. What if you open and read the file on one line, and create the MIMEText on another? Which line raises an exception?
I tried running it again and no error
Is there some sort of low level caching going on maybe?
In that case I blame gremlins
@Agostino If I were to guess, it's because X can have values as both Y and Z varies.
18:14
mhh
@davidism kind of... so main_image is just one item from images...
@Agostino - Yes, those functions all expect to have regularly-gridded data. Arbitrary points don't define a surface. You need a way of specifying how they're connected.
I was having similar problems earlier. I'd ask my sys admin but I don't think he's gonna help
Also weird, in Gmail I see the attachment icon, but there is no attachment
@JoeKington interesting how may I specify that, if I only have a set of 3d points?
@MartijnPieters thanks, I figured you'd be the one to know about encodings :)
18:15
You need to either interpolate them onto a regular grid or triangulate them.
@Ffisegydd oh - good job on getting a linode alert sent :p
should I post a proper question? this does not seem easy...
I'm -1 on this. In fact, I'd be +1 to removing default highlighting of questions tagged jQuery. Only language tags should have highlighting, period. In fact, since 95% of questions are about programming and should contain code, the system could warn the user if he's trying to post a question without a language tag, then he could add it or ignore the warning, but it would fix most of the missing tags. — Bakuriu 6 mins ago
@Agostino - It's hard to answer without knowing a bit more about what you want to do, but have a look at mlab.griddata or scipy.interpolate.Rbf
18:18
Is it just me - or is that guy just having a rant about something completely different
@JoeKington yup, I'll try to clarify my ideas and write a proper question then
@Jon I'm not clear, what was the issue you're having with those models? Maybe a gist would help explain it.
@Agostino - Be sure to search a bit, too. I think your question may be a duplicate of several others. There are a lot of "I have scattered points and need to interpolate them" questions, I'm just having trouble finding one to link to, at the moment...
@Martin did someone create a symbolic link on logfile?
No I literally just created it
Also, it worked the second time I ran the script like 2 seconds later
18:21
@JonClements I can see what he's getting at: he thinks every question should have a language tag, in addition to library tags, so making the library tags syntax aware wouldn't help if that were the case.
@JonClements - I still don't understand the objection to making python the default syntax for those tags... It's pretty common for things to be missing a "python" tag, and it's an easy fix. I just don't see a downside to it, I guess...
cbg
@JoranBeasley ssh isn’t a feature of bash though. There is a program in your path that is called ssh. This usually comes by default on systems that use bash. On Windows, with PowerShell, you need to install such a program somewhere and add it to the path (or set an alias). That’s not related to either PowerShell nor bash though.
DSM
DSM
18:38
I have a meeting in a couple of hours with a well-meaning but frustrating client regarding a potential new contract. As a professional I have to do my best to ensure they sign on, despite my desperate prayers that they turn us down.
@DSM I've heard consulting work is stressful but lucrative.
@poke I've never been able to get OpenSSH to work on Windows. Putty seems so...*third-party*.
Adding a warning message to questions that contain no code (maybe any question that contains no code tags) is interesting.
When I first started looking at Stackoverflow, I had a question about a generic algorithm (no true code) that I originally went to ask here - til a friend pointed me to the computer science group and pointed out that was a better spot.
@Adam There are many SSH clients for Windows though. And PuTTY is fine. plink is a fine ssh client. Does the same as OpenSSH, just with a few different arguments.
@FaheemMitha Been there - done that... let's get some T-shirts made :p
18:43
@AdamSmith I like putty but use posh-ssh if you only want to use .Net and powershell
@JonClements what would the tshirts say?
DSM
DSM
@Faheem: we have a decent rep in our niche, and so there's not much stress business-wise until a project is due.. these guys just cause a lot of headaches, and since I'm the guy the headaches have been falling on other people tend to discount it. Pull a few rabbits out of your hat, and people start to expect it..
@FaheemMitha "Puppies are awesome" ?
@poke Right, I use plink for lack of a better option. Putty is ubiquitous on Windows like OpenSSH is ubiquitous on *nix. I just wish the *nix functionality was built-in on Windows boxes. It's a pain.
@DSM what kind of consulting work is this?
@JonClements personally I prefer kittens.
18:44
Umm... could be a brand in that... "Puppies are awesome" is PAW which works... ummm
Posh-ssh uses built in SSH through .Net
Do a lot of people here do Python consulting?
I don’t even do Python professionally :P
Python - that's a snake, right?
yeah, sometimes they eat alligators
18:48
@davidism are you going to make a post about those deletions?
@JonClements No, it's a comedy show. Or was.
Well, they thought they were funny, at any rate.
my publications are getting ridiculously complex when adding more database relations :|
19:08
@AdamSmith You are actually not typing faster. But what happens is that you are typing stronger. And that is actually recommended for languages like Python which have a strong typing system.
6
19:18
@JonClements since it didn't continue after that day, I was just going to leave it be
DSM
DSM
@Faheem: the usual collection, economics, infrastructure, health, etc. My favourite projects are related to epidemiology and infectious disease.
@DSM I didn't know this was "the usual collection".
DSM
DSM
@Faheem: I guess what you're used to becomes the usual..
@DSM Hmm. What company do you work for, if that is not a secret?
DSM
DSM
@Faheem: secretish. ;-)
19:26
And infrastructure is a broad term. Does that include things like telephone companies and ISP?
@DSM Ok.
@DSM - I always hear through the grapevine about other earthquake seismologists that have been hired into the insurance/risk-management industry to more accurately assess earthquake risk... Do you ever run across of any of us "geos" in your line of work?
DSM
DSM
@Joe: oh, cabbage, didn't see you there! Don't know of any geos, offhand, but lots of other physicists. We have three (and a half) on staff.
"(and a half)" does that mean they're a dwarf or something? :p
DSM
DSM
(likely permanent) ABD.
Wow! (and cbg, as well, btw) Somehow I wouldn't have guessed that there would that many physicists in risk management.
19:33
@Joe personally I'd like to think there's a few of them... especially with the LHC project getting going again soon :p
Heh!
Yes, I'd like to insure planet Earth...
Though I guess that's something that any insurance company would take... Zero chance of having to pay it out...
Well, there is that
tell you what... call it £1bill/yr, and I'll do the insuring for ya
I think you have a new business plan... Just need some good marketers...
umm.... could kickstart a specialised insurance company... this could just work
@Jon got Apache Spark up and running.
19:42
@Ffisegydd cool!
It also shows how to install Cassandra, so I might do the same while I'm at it.
Well, while you're at it... why not? :p
DSM
DSM
Wow, long.
Set up a spark user and that.
DSM
DSM
You had me thinking I might want to play with it but that process seems intimidating.
19:49
It's not as difficult as it looks.
It's taken me maybe 10 minutes of typing at the console.
Just gonna take a look at the sopython logs with it, see what we can do.
Need to see if I can get the pyspark terminal working with IPython
Easiest 35 rep ever:
2
A: Is this python code dangerous?

Zero PiraeusWith the syntax error fixed: import itertools import pickle x = list(itertools.combinations('abcdefghijklmnopqrstuvwxyz1234567890',4)) y = [] for i in x: pickle.dump(y, open(str(i) + ".py","wb")) # quotes around wb ... it creates about sixty-thousand files with silly names in the current ...

DSM
DSM
I'm still working on the right way to phrase it, but I need a stock comment like "If it makes sense to take the eigenvalues of your table, use numpy. If not, use pandas."
@Zero: I wonder if you could exhaust the number of file handles in a non-CPython interpreter.
Hmm, dunno.
@ZeroPiraeus So let’s put a link in chat so it gets even more, huh? ;P
Well played :D
Honestly I was not expecting further upvotes. If anything, I almost didn't post an answer at all – it's kinda borderline whether a Q like that should get an answer, but since I did the research ...
I thought this room had more taste :-P
DSM
DSM
20:01
In times of yore, we might have closed that as "too localized".
Closing it as unclear.
Anyway, I got a grand total of 12 rep (2 upvotes and an accept) on what I thought was a genuinely interesting question earlier today, so I feel no shame :-)
2 upvotes and an accept is 35 rep :P
Q, not A
but yeah, it’s sad that those super cool question you are really interested in answering are usually too special to get any upvotes…
Oh, I see
And now I’m curious.
20:06
Well, if you insist ;-)
2
Q: Why can't I call hash() on an apparently hashable method of an unhashable instance?

Zero PiraeusLet's say I have a dictionary: >>> d = {} It has a method clear(): >>> d.clear <built-in method clear of dict object at 0x7f209051c988> ... which has a __hash__ attribute: >>> d.clear.__hash__ <method-wrapper '__hash__' of builtin_function_or_method object at 0x7f2090456288> ... which is...

Whew. Feeling pretty good about my ability to understand cryptic requirements today.
@Antti so you're gonna jump to #1 at the end of today then – sweet!
Just hope OP doesn't come back and say "nope that's not it"
Because I'm all out of plausible alternative interpretations.
@Kevin - Nice!
20:17
@Kevin Wow. Such diagrams. Very pretty.
Made with Python :-)
(numbers and letters added with Paint, though. I'm not good enough to make a labeling system that smartly avoids overlapping other image elements)
I probably would have drawn it with my hands… on paper…
@AnttiHaapala Ugh. I need to answer more…
I started on paper, but once things started depending on the intersection of a circle and a thing, It became too inaccurate to give useful information
Incidentally, big shout outs to calcul.com/circle-circle-intersection for calculating the horrible irrational candidate P coordinates that I didn't actually need
At the time I was thinking "I don't want an intersection formula, I just want the codes! Please give teh codes!"
Regards, calcul dot com, for giving teh codes.
This pyspark stuff looks far too JSy for me...
letter_count = words.flatMap(lambda s: s.lower().replace("'", "").strip()).map(lambda x: (x,1)).reduceByKey(lambda x,y:x+y).map(lambda x:(x[1],x[0])).sortByKey(False)
Nice supplemental, @Antti :-)
20:23
655 today :D
I am this week's official rep whore
Whaaat? I thought there was a 200 rep/day cap
DSM
DSM
Okay, that's not fair, that includes a 500 bounty..
Hey guys, how can I run a script in a virtualenv from cron
@DSM 600 rep in bounties today
DSM
DSM
@AnttiHaapala: yeah, but 50 bounties aren't that uncommon. 500 is pretty rare..
@Martin: same way you'd run anything else which required some setup, I guess. Call a wrapper script.
20:27
I've never done this before >_> <_<
But you do know how to do that stuff when you're in a console?
DSM
DSM
@Joe: nicely pedagogical, as always. :-)
Not set up the cron, but the rest yeah
good
Is there a command I can type in instead
That'd be great
20:29
Write that stuff. But instead of writing that inside a terminal, write it into a file.
so that each line contains a command
write #!/bin/bash in the first line (or whatever shell you're using)
and make it executable
then, edit your crontab to execute that file whenever you need it
Okay awesome that was exactly the explanation I needed
that is called a shell script
you'll find loads of stuff if you search for tutorials and explanations on that
I tried but none were as straightforward as what you just said
i should consider writing tutorials then
Maybe lol
You can do cd and stuff in this script?
DSM
DSM
20:32
Writing tutorials is hard because it's tough to know what level to pitch at. I always have to keep multiple ones open in the hopes someone explains the critical part that I'm misunderstanding.
@DSM Yeah. The worst topic I've encountered is monads. It's become a sport in the functional programming world to write a tutorial on monads in an attempt of trying to understand them. And it gets kinda weird.
@Martin virtualenv python in cron?
you can also just write the command as
DSM
DSM
[insert "category of endofunctors" joke here]
VIRTUAL_ENV=/path/to/virtual PATH=/path/to/virtualenv/bin:$PATH python whatevercommand
20:37
@Martin Of yourse you can cd. It's just as if your were wrinting it inside the shell, only it gets executed automatically.´It's the same as running the Python REPL and writing a Pyton script.
@DSM - Thanks!
heh...I've written a tutorial on monads for a college class
@Carsten I believe it goes somethign like: when you gain understanding of the monads you will lose the ability to explain them
DSM
DSM
The monad that can be understood is not the true monad.
Yeah, and everyone is like the characters of Matrix trying to explain the matrix. You cannot explain the monad, you have to experience it., being a monad is like being in love. you just know it.
20:40
@AnttiHaapala So if I want to run crawl.py, I would do VIRTUAL_ENV=/path/to/virtual PATH=/path/to/virtualenv/bin:$PATH python /path/to/crawl.py ?
something like that :P
you can test it in your shell without the venv being activated
Alriiiiiiiighty then
DSM
DSM
@Carsten: oh, man. Somebody in one of the links on that page already used the Tao joke ("The TAO (Monad) that can be told is not the eternal TAO (Monad).")
Ok so I can copy pasta that right into my shell?
Fantastic
"Do not try to bend the monad. There is no monad"
5
20:42
I think I set up my virtualenv really stupidly though....
Is it normal my virtual env is in ~/virtualenv/Crawler/3.4 and that's where I put my scripts?
@DSM Haha brilliant
@Martin no you wouldn't put your scripts there.
I'll have to clean this up tomorrow
I'll get the hang of this stuff eventually I promise
rbrb everyone!
DSM
DSM
Rhubarb, Martin.
"Let me help you improve your handwave and uncover the reason you are asking for the moon on a stick." Well put, sir.
@davidism did you ever finish your Stack Exchange API work that you were working on?
Just soon I may start having to poll the API and thought it'd be nice if we had a single package for doing it.
20:50
What? Moon on a stick?
DSM
DSM
@Carsten: you sent me in a Haskell-y direction.
@ZeroPiraeus: your hashable question made it to the hot network questions list. :-)
Oh Haskell is still too far for me. I'm currently warming up with F#.
Woohoo!
21:14
They don't expect anyone to send them anything :/
@vaultah I don’t get it. What is that?
I sent an email to [email protected], this is the server's response
On printed paper?
Maybe you need to apply a filter to your email first.
“Vintage mail” or something.
I saved the conversation to PDF and took a screenshot
Ah, I see :P
21:22
Hmm. This isn't a great question:
-3
Q: How can I write a recursive function to reverse a linked list?

Jim JohnI am looking to do it with Python. And I don't want to just print it in reverse, but actually reverse the given nodes. I have seen it done in other languages but had trouble finding an example in Python. I'm trying to do it in one function, but if a helper function was needed then so be it.

... but I don't think it really deserves three downvotes (which I imagine it got as a result of the off-base comment). What to do?
DSM
DSM
Upvote it to +8 to teach the downvoters a lesson.
Can it be edited into better shape?
DSM
DSM
Ehh, not sure. I don't know how to answer it except for writing a little Node class and showing how to do it.
This isn't "the infringement of my privacy", is it? :p
DSM
DSM
Do you mean grammatically? We'd probably say "an infringement".
21:25
Yeah, the grammar here is particularly terrible, but that's not what I meant
DSM
DSM
I can sympathize, though. I like to keep my circles separate too.
I didn't expect them to reply, so I added "I have reached out to my lawyer, in the meantime I'll greatly appreciate any information (I couldn't find anything relevant in your Help Center)" at the end of the message :D
Alas, they haven't even received it
DSM
DSM
To be honest, it'll probably have as much effect this way as it would if it got through. :-/
True, this is why I should sue them :D
DSM
DSM
Unfortunately you'd probably spend a lot more on the case than you'd get back, and probably there's something buried in the membership agreement that says "whatever bad happens, it's your own fault"..
21:38
685 rep :D
DSM
DSM
Why does no one ever give big bounties on questions I know how to answer? :-P
@DSM supply and demand. If you knew the answer to the question, you would have answered it before they placed a bounty on it.
I have missed 2 times 500 bounty
I'd say we should stop answering pandas to try and force bounties but then Jeff would just jump in :P
DSM
DSM
21:41
Hmmm, that might be true. Unfortunately the only things I'm good at are things lots of other people are good at too, and so patience wouldn't help me any. ;-;
Plus, now people are even digging up answers I've posted on mailing lists to steal my precious imaginary internet points!!
@DSM I've read their privacy policy, it doesn't state what exactlydo they do; this gives me some hope
Arrgh, I need to start learning the grammar :d
I answered at 22:32
and the other guy edited basically the same answers in 22:31 in his old answer and was awarded the bounty
DSM
DSM
Time to escape to Japanese practice. Rhubarb for all!
21:44
rbrb DSM
21:56
My next SE name should be "Feeds"
- Where's vaultah?
- Vaultah Feeds.
@Jon got Cassandra installed, but not running "properly" in that I'm running it from a terminal so it won't automatically restart on server restart etc
Nice :-)
I actually had to draw a linked list down on paper for this… and I feel really bad about that. I should go to bed… ^^
22:11
I’m off to bed, rhubarb!
rhubarb poke
rbrb :-)
... and rbrb from me. Roasted vegetable soup with Thai-style stir-fried shrimp and good company :-)
I'm off to bed, rbrb @Zero and others
23:10
SOPython people (@davidism I guess?) I'm confused by the way search works on the Common Questions page. It seems like it's a bit counterintuitive. There's some sort of logic creating search terms behind the scenes, but if I search for a word in the title of an entry there's no guarantee it will show up. E.g. was trying to find this by searching "if" which showed me zero results.
I suppose I could have searched for [if-statement] but since there's no great way to get a list of tags (or is there?) that doesn't seem better
On that note, http://stackoverflow.com/questions/29244224/overrided-if-statement dupe

« first day (1620 days earlier)      last day (3553 days later) »