« first day (2476 days earlier)      last day (2471 days later) » 

10:00 PM
nah, it's upvote
> Upvotes on a comment help ensure the comment remains visible when there are many comments on a post, but do not give the author any reputation.
15 rep
 
@AndrasDeak So it is.
 
10:24 PM
@AndrasDeak what is interesting is that if you vote on possible dupe comment it counts to maximum upvote on comments (that is 40), hence if you close 40 possibile dupes (that already have a comment) you will not be able to upvote any other comment.
 
ah, right :)
I used to know that when I was frequenting socvr
 
The plot thickens on that day of year question: the dupe target for his deleted question and his current one is his own question from a year ago... wat?
 
wow.
@TemporalWolf wait, what? I don't see that
the dupe target of their deleted question is a post from '09 posted by someone else
 
So I want to find out why my program is not returning the shortest path when the way it works, it should look at each depth level in order.
 
The (almost) same question, from the same user, a year ago stackoverflow.com/questions/40073373/…
 
@TemporalWolf wow, the new answer is almost the exact same
damn it, my close vote is used and gone because the dupe target got deleted
 
Maybe is it worth posting it as a question on main site?
 
I don't think so; 300 lines of non-runnable code and "why isn't this working?" would make a low-quality question :/
 
@micsthepick You should try to create a MCVE that only has the code needed to do the shortest path stuff. Most people don't have the patience to study 300 odd lines of mostly uncommented code.
 
dyb
11:05 PM
hey folks, some more questions. i import a list from a file like so: from mylist import myfavlist and then i randomly pop() elements from this list in my script. after couple of runs the list is empty. why doesn't it "reload" at each run?
 
because things are only imported once
And what do you mean by "runs" exactly?
 
dyb
can i force it somehow? is there a better option?
by run i mean each time i hit "run"
 
ah, are you using an interactive thingy?
it probably runs your script and keeps the namespace
 
dyb
prooobably... it's drawbot (drawbot.com)
 
well the whole pattern of importing a list from another file sounds a bit weird...one obvious solution is to copy your list after import and pop from that
but something tells me that what you're doing could be done differently
 
dyb
11:08 PM
that's always the case isn't it ;]
 
so as a quick kludge you can try saying from mylist import myfavlist_orig; myfavlist = myfavlist_orig[:]
 
dyb
i have a lengthy list around 40k
 
in that case even if the script is run twice in an interactive environment, you're getting a fresh copy of the not-imported-again original list
 
dyb
copying the list is a good idea, i guess
 
Do you really want to remove elements? Or just pick random ones?
in the latter case you can generate random indices and just index into the list without changing it
that would probably be faster too
 
dyb
11:10 PM
pick random ones and never pick them again
 
that's been discussed here multiple times in the recent past, hold on
in other words, I'd generate unique random indices between 0 and len(myfavlist)-1, then just access those elements from your list
removing elements from the middle of a list is slow
 
Random SSH question: How do I get the fingerprint from the local copy of my private/public key pair?
 
that might work
 
google keywords were "get ssh fingerprint for key"
 
11:19 PM
yah...I kindda figured
I was just experimenting with command line. ssh-add also works
 
dyb
thanks @AndrasDeak! comparing to "used" index set seems nicer than removing items.
 
yup
once you generate a random index list, you can just loop over it
 
hmm...I am very confused. I verified that the key I am using is the one I already sent to GitHub. But my git push isn't working:
$ git push origin master
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
 
did it work before?
 
I've used it with other repos, yes.
 
11:23 PM
Jul 10 at 19:17, by DSM
As an aside, did you know that github automatically invalidates your secret key if you accidentally commit it? That was some good thinking on their part.
did that happen perhaps? ^
 
This repo was cloned via https and I just did git remote set-url to change it to the SSH addy
 
so probably no
 
I don't know how that could have happened.
My keys are in the typical .ssh directory
 
they'd probably inform you about that
 
so very far away from any repos
 
11:25 PM
does git know which key to use?
 
I copied the public key to GitHub.
And locally, I only have one key loaded in the ssh-agent.
 
yeah I meant the latter
I'm afraid my rubber duck abilities take us only this far, sorry
 
just to be sure, I tried to push to a different repo and it works just fine.
well that's all sorts of messed up...
I cloned the repo to a new dir and made a change and then committed and pushed successfully
 
weird
did you do it in a new terminal?
 
nope same term
 
11:33 PM
weird.
 
The original problem arises in a repo which I cloned via HTTPS. Then I did some git things...the ultimate result is one new commit on master. Then I git remote set-url origin to the SSH addy. Then git push origin master gives the error which I posted earlier.
well, I ended up nuking the original local repo
1) Cloned the GH repo again.
2) Added the old local repo as a remote.
3) Pulled `master` from the old local
4) Nuked the old local
5) Moved the new clone to the same folder as the old one
don't know why the I got the error, but it seems fixed now.
@AndrasDeak Thanks for being my rubber duck.
 
quack
 
11:53 PM
So my MCVE is 239 lines long: pastebin.com/LmQtg2pJ
 

« first day (2476 days earlier)      last day (2471 days later) »