« first day (1564 days earlier)      last day (3385 days later) » 

user559633
4:01 PM
cbg
 
Dunno let's ask him, @Mark why have you made a new account?
 
To be clear, I was just idly curious and don't want to engage in a witch hunt
 
Does anyone use LaTeX .... ? I'm gettin kicked in the wrong place while usin ...
 
0
A: I have 2 ethernet interfaces on the same PC, how to know which interface is connected in python?

teraryUnplug one and if it stops working - you found the right one. If it does not stop working it is the other one.

 
4:04 PM
@BhargavRao I do.
 
Must resist urge to upvote joke post.
 
I upvoted. It's a working solution and better than some answers I've seen :P
 
@Ffisegydd Hey, have you ever edited an ACM template ???
 
@Bhargav the fact that I had to google it suggests no.
I have modified my own templates though.
 
Damn, It always leaves a wide space below the abstract
And it looks sick...
 
user559633
4:06 PM
should be closed duped to stackoverflow.com/questions/8437726/… @davidism
 
Sick like "sick ride, bro!" or sick like "my cat is sick!"
 
I assume you mean "it looks sick" to mean "bad" as opposed to the more common "wicked awesome playa"
 
The left side column is 3/4th the size of the right side
I am not able to understand as to how to remove that
 
I applied for a job recently and I was like, "I'll use LaTeX to make my resume! Hahahahaha I'm a genius I'll do it!"
 
LaTeX is damn easy, but editing templates is screwin
 
4:08 PM
And I did, and it was great, because someone else made the template. Then I needed a cover letter and references sheet that matched, and I was really really sad.
 
@Cody moderncv provides a Cover Letter as well as CV. I think it can also handle references maybe?
 
user559633
ugh the joke answer being upvoted
 
@tristan don't be jelly just because you didn't get in first with the sass.
 
user559633
it's comment worthy, not answer worthy
 
user559633
4:10 PM
even though the question is really poorly explained
 
That guy should have been in Google server room ... Lemme unplug this first, then this, then this ...
 
@Ffisegydd thanks! I'll check that out next time I need to write a resume. I just went ahead and wrote some really bad LaTeX to make a cover letter and references page that looked pretty much like the template.
 
Ok, so I want to create map between some elements in a list inside a dictionary, to the dictionary... Is this the right way?

self.map_by_cid = {video_id: cluster_data for cluster_data in self.clusters for video_id in cluster_data['videos']}
('videos' holds the list of elements I wish to have as keys)
 
What is one word for freely available across multiple development platforms ....
 
user559633
FAAMDP
 
user559633
4:23 PM
you're going to have to lean on context for that unless you want that word to be in german
 
Naw ... Need it to compress my abstract into 150 words
 
@BhargavRao cross-platform? platform-agnostic?
 
user559633
you likely have lower hanging fruit than trying to explain what "development platform" means in a single word
 
Yeah, Platform-agnostic sounds better ... What about portable?
 
Today I thought I would port KevinScript to Python 3. Instead, I've spent an hour just trying to pull the most recent source from Github.
I can delete my local copy and do a brand new "clone from existing repository". That's dumb. I'm dumb.
 
user559633
4:27 PM
Your words
 
Indeed
 
user559633
Just kidding, those are pretty annoying mind traps
 
user559633
"i should be able to do this intelligently using this tool"
 
I just spent almost 20 minutes trying to figure out why I'm getting a tuple instead of a dict
 
@Kevin why couldn't you just do git pull?
 
4:28 PM
Anyone wants to guess the error?
 
On the other hand, Murphy of Murphy's Law says, "If it's stupid but it works, it isn't stupid."
@Ffisegydd Because I'm a big baby and use git gui and there's no "pull" button.
There's a "fetch from -> origin" menu item, but that does apparently nothing.
 
Ah I see.
 
user559633
lol git gui
 
Gotta have my buttons.
 
user559633
like a car in which most of the buttons needed to make it work aren't exposed
 
4:30 PM
Why you love Tkinter so much.
 
Just noticed this question in the sidebar:
0
Q: How to choose Wifi/Ethernet for a Socket

Arthur ReyI need to open a Socket in VB.net. I already know how to do it, and did couple times. But I only was wireless, and though in only one network. Now I got both wifi and ethernet, and I got 2 IP Addresses. When I try to connect my socket to my PLC, it tries from Ethernet interface, but my PLC is in...

 
I imprinted on Tkinter when I was but a neophyte, like a newly-hatched bird might.
 
user559633
oh tkinter, you make me feel so useless
 
21
A: how can I do a git pull in the gitg / gitx visual tool?

CharlesBYou cannot directly pull from git gui, but given than a pull is a fetch followed by a merge, you can fetch the remote (in the remote menu and fetch from), and then merge the remote branch into yours (Merge menu and Local merge, select tracking branch).

 
@tristan damnit, it is the paramiko that is stalling
 
4:33 PM
@Ffisegydd Thanks :-) I'll have to try that next time.
 
on the other end I am just doing stdout.read()
slurp
 
I already did delete + clone existing, so I can't test it out now -_-
 
tristan: the one is just doing "print(foo, file=stdout)"
 
I'm going to a data analytics meetup tonight. I'm scared, what if they don't like me? What if they pick on me? I should just go home and play video games instead.
 
I think I may be the most unqualified person in the world to give you advice on that matter.
 
4:35 PM
@vaultah And his comments
Well, no one knows the answer ? — Arthur Rey Jul 31 '13 at 9:28
 
It stands to reason that you should do the opposite of what I would do. I would stay home, so you shouldn't.
 
Excellent. I'll go then.
 
user559633
@Ffisegydd you're highly credentialed and intelligent. most meetups are people showing up for free food with a lacklustre resume. you'll be fine
 
...I hope there's free food.
 
I wonder how they prevent wandering vagrants from attending just so they can eat? Maybe the food has a special poison that all data anaytics people are immune to.
If you are not worthy, you will melt into a skeleton like the guy from Raiders of the Lost Ark
 
4:41 PM
"Bath: Hacked is a joint council/community initiative that explores using open data and clever tech to improve life in our community. We know it’s a big ask; Bath: Hacked is for people who aren’t afraid to try."
 
Aw, 2to3 didn't instantaneously make my project perfectly cross-version compatible :-(
unorderable types: NoneType() > int()? Damn you 2to3!!!!!!
 
#FirstWorldPython2ProgrammerWantingToSwitchToPython3Problems
 
I recognize that it's totally unreasonable of me to expect you to reverse-engineer the intent of my code and double check it for type inconsistency, but I'm going to remain angry anyway!
Grumble grumble, now I have to reverse engineer the intent myself. Ok, what was 2014 Kevin thinking when he wrote this...
 
"I'm hungry...I should get some cereal..."
 
This is possible.
All right, KevinScript is cross version compatible :-) I'm finally using an interpreter from this decade.
With that and pep8 compliance out of the way, now I have to... gulp... make actual productive changes
 
4:59 PM
@Kevin No! You want to be using an interpreter from the 29th century instead... get with it! :)
 
KevinScript is the interpreter of the 29th century. It's a chicken and egg problem, you see ;-)
 
cel
haha, interesting question: stackoverflow.com/questions/28176369/…
 
@Martijn sure that nth question shouldn't be a dupe of something?
slicing explained or something?
wb @Aaron
 
thx
 
Burrito for dinner tonight I think
 
dinner at @Ffisegydd's place everyone! :)
 
user559633
5:40 PM
omw
 
damnit I can swear paramiko completely hangs when writing too much to stdout
 
Tricky, because when the OP asked the question, he didn't know whether there was an easy way to do it, or if you'd have to code up your own version.
 
The question is genuine ... But his last para .... That's the clue whether to cv or not
 
It's not broad if you consider "yes, it's possible" as a complete and valid answer. It's broad if you expect an answer like "Yes, and here's the 500 line implementation"
 
5:54 PM
I've noticed that I've started down-voting more
 
I usually leave these kinds of questions alone.
 
I really like this logo tag ... The questions will be damn tricky to cv
 
The question should be of the form: "How do you X"? and if X is high level and user (as opposed to programmer) oriented, it's still probably a bad question.
 
My dream has come true .... An accepted answer even though Ninja has answered it
 
:-)
 
6:01 PM
Savour it. Drink in every emotion.
 
@JonClements prolly.
 
yeah, curses is really hard to program a single app
 
but I am in sniping mode, in between work tasks.
 
let alone do a terminal emu
 
6:04 PM
> setrecursionlimit(1000000000)
 
but the op does not need a terminal emulation, just a curses pad
 
What could possibly go wrong?
 
user559633
i kind of want to see his core dump
 
That question is secretly a Project Euler question. IIRC, you can solve it without recursion at all.
 
user559633
dinner at Ffisegydd's place. he will be serving ppffhhhlan and bbggbborczzsht
 
6:06 PM
I can't attend because I'm already hiding in his cellar and I can't get to the front door without breaking cover :-(
Posing as a creepy clown statue for weeks on end is demanding, yet rewarding.
 
@Kevin even the brute force iteration is easy and effortless...
 
I hesitate to ask, but: what are the rewards?
Or is it one of those "posing as a creepy clown statue for weeks on end is its own reward" deals?
 
You really have to have a love for the craft.
Hmm, my "clown statue mimicry and you" informational pamphlet seems to be in my other costume.
I assure you that its points are very convincing.
@AnttiHaapala even if you divide by ten as appropriate, it does start to slow down for large factorials. Let's say, when the resulting number has more than ten thousand digits
The intended solution is to just count up the multiples of 2 and 5 for all the factors of the factorial, without actually doing any multiplication.
 
Burrito was lovely people. Burrito was lovely.
 
That could have done with a comma ...
 
6:15 PM
Soylent burrito is made of lovely people!!!
 
Ooops…
 
New blog post?
Upvoted as I was too lazy to read
 
I just wanted to summarize my comments into the answer…
and then… this happened…
 
aw, just one more vote on my Bobince's-answer-is-art-not-an-error answer.
 
Maybe I should write a book on Git… >_<
 
cel
6:22 PM
if I embed a image from the web in a post, does it prevent link rot? Is the image cached by SO?
well, the source says, SO does cache them...
nvm
 
We may be facing another war here in the middle east
 
Do a Phd ... Dr @poke
 
The "upload image" feature uploads a copy to imgur, which should live independently of the original image.
 
If anyone here is from Syria or Lebanon, tell Nasralla to cool it please.
 
cbg
 
user559633
6:29 PM
@ReutSharabani i'm more concerned with greece thinking that resources are free
 
I bet you're not Israeli / Lebanese / Syrian
 
user559633
You're right. Your pet issue is different than mine.
 
I like Israel ...
 
user559633
I like turtles.
 
cel
me, too! mmmmh... grilled turtle :)
 
6:35 PM
I used to like turtle, when it was with logo ... Now I hate it
I frikin hate Turtle .... Ntriple is better 10-1
 
I have two lists of strings, I need to do something like diff, but rather do it in python than use a subprocess. I'm pretty usre I can use difflib but not so sure how, anyone has any ideas?
that Differ object looks promising
 
user559633
anyone using uwsgi in emperor mode?
 
user559633
wondering if i should virtualenv it or just say the hell with it and go system wide
 
you kinda do the same as with nginx sites-available/sites-enabled
not sure if @davidism set sopython up using emperor or using supervisor for the uwsgi's
 
@ReutSharabani just looking at the docs, how's difflib.context_diff?
 
user559633
6:45 PM
@JonClements ah. i'd like to see an already functioning set of config files as i want to set up uwsgi to start in emperor via init and then watch some dirs
 
In [9]: a
Out[9]: ['hello', 'universe']

In [10]: b
Out[10]: ['hello', 'world']

In [11]: list(difflib.context_diff(a,b))
Out[11]:
['*** \n',
 '--- \n',
 '***************\n',
 '*** 1,2 ****\n',
 '  hello',
 '! universe',
 '--- 1,2 ----\n',
 '  hello',
 '! world']
@ReutSharabani
 
user559633
and i'm torn on specifying a newer version of python for uwsgi or letting it go on system python 2.7.6
 
well... the uwsgi's can be linked to a virtualenv as they are on sopython
 
user559633
the vassal/child config'd processes?
 
but normally you'd have emperor as a system process
 
user559633
6:46 PM
yeah
 
one sec, let's have a look
 
user559633
so emperor/uwsgi running on system, then using the virtualenv of each project
 
user559633
that's what i'm thinking
 
uwsgi is running in userspace
ahh, sopython is using supervisor
 
user559633
ah, alright
 
user559633
6:49 PM
cheers @JonClements
 
then the uwsgi's run in context of a certain user
 
user559633
i'm skipping supervisor as i want to use the amqp plugin for uwsgi process management
 
and front-end is nginx blah blah blah
 
user559633
yeah
 
so no - not using an emperor/vassal/setup
 
user559633
6:50 PM
once i get the config details pinned down, i'll write it up
 
user559633
i have this fever dream of having my nodes just subscribe to a few queues and have all server management handled from that
 
user559633
when to git pull, when to reload, etc
 
the last setup we had, already upon a git push, restarted the uwsgi processes
 
user559633
using commit hooks or as part of a callback or?
 
think it was commit hooks
 
user559633
6:53 PM
cool
 
user559633
i have a lua hook in my nginx that listens for a post and restarts stuff behind the scenes
 
@AdamSmith does diff take context length to buffer as parameter?
@AdamSmith never mind, I think I've misread the docs
 
@Robert just heard from Giles :)
 
@Kevin *the burte force approach ofc is keeping %10
 
7:01 PM
Recursion is just a clever way of looping.
 
recording just the intermediary value mod 10 works well until you get up into the hundreds. At some point you multiply by 100 and increment your "remainder was zero" counter once when you should have incremented it twice
 
anyway, I've edited that to remove all fluff
 
0
Q: Recursion of arbitrary complexity replicated with iteration?

Aaron HallRecursion can be an elegant approach to problem solving. Some mathematical functions are defined recursively. However, Python's Benevolent Dictator For Life, Guido van Rossum, as a matter of strategy, has decided not to provide for tail recursion elimination. Tail recursion elimination would make...

 
arhghghg... not sure what the best dupe is, and it's gathering answers for some reasons
 
7:17 PM
If only there was too-many flag also
 
@BhargavRao It is called Too broad.
 
Yeah, instead of that ...
 
I had told you earlier ... it is like a man hanging on a cliff
 
wow, an upvote my MSE post
 
7:24 PM
Ending the day with 195 pts ... So near yet so far
 
I find myself not really voting that much - if it's terrible it gets a down vote regardless of answer or question, if it's really good, it gets an upvote... if it's just rote stuff that I can't find before locating a dupe it gets nothing
 
No details on what 'does not work' means.
 
so, we've got "prompt simple maths using */-", "tic-tac-toe" and errr "credit card calculations" again
must be September
I know there was one that was extremely good - forgot to bookmark it
they'd actually bothered reducing the code, pointing out inputs/outputs and attempt - and graciously received advice
 
just downvote them so that they cannot come to chat :D
 
7:35 PM
well thankfully, if someone's a nuisance, they can now be removed from chat on an escalating scale
 
just vote Puppy for mod cough cough :p
 
are we becoming too harsh on n00bs :d
maybe we should have another SE site for programming-offtopic
 
but like I've said, were I mod, I'd have to step back from
 
when do we have elections
 
7:38 PM
just vote Puppy with 3 legs for mod cough cough :p
 
@Antti they'll announce when they want more - there's no fixed time scale
 
You will get in as you are disabled with only 3 legs
 
still 1.00001 more than an average human
 
What do you do to people who start counting from 1 instead of 0 ???
 
@BhargavRao well, there's only so much patio space I can keep digging up without arising suspicion - guess I just have to let it slide right now :p
 
7:42 PM
tell them to use the "option base 1", if it says something about error, then I guess they need to go back to vb
 
Had commented this ...
(in this case '4') ........... 0 will hate you — Bhargav Rao 2 hours ago
 
Wow... not had this turn up on random for ages - trivia: can anyone remember which show this was the theme tune? youtube.com/watch?v=g2sL0CPWQc4
(don't cheat and look at comments and such)
 
>
Wunderschöner Song ... da ich es immer besser wissen will: im Songtext heißt es wohl "living free in harmony in majesty".
Hidden somewhere there
I can't read that
 
wb @joran - you trying to sneak in again? :p
 
naw ... just chillin
trying to sign drivers and build and installer ...
i hate pascal ...
><
 
7:51 PM
Assuming you mean the language and not a significant figure in the world of science :)
 
ok, why did I get three upvotes on a single answer in one day?
 
U are lucky that's why
 
Is it people in CS classes doing homework?
 
@JonClements naw the dude was pretty cool i guess ... :P
yeah at the start of every semester you see the same questions asked over and over ... often times with no work done by the OP
its awesome ... Ive stopped flagging them as dupes and just voting to close for being unclear
 
Also annoying, people with 6 year old accounts, 50 6 year old answers, and more rep than me.
 
7:56 PM
well they were probably pretty good answers that frequently turn up I suppose ;P
 
Nah, mine are better.
Pardon my hubris.
 
0
A: Python - Detecting unused values in a list

Antti HaapalaThe asymptotically good answer: heapq with enumerate from heapq import heapify, heappop # A = [1,2,3] also works A = [1,14,2,5,3,7,8,12] heap = list(A) heapify(heap) def iterheap(): while True: try: yield heappop(heap) except IndexError: return for ...

 
@AnttiHaapala Should I add my answer from the same ques away here?
 
Hey, why did I get a downvote on this stackoverflow.com/a/28178717/4099593 ?
 
8:02 PM
cause your wrong
 
@AnttiHaapala I tried to add at a red-black tree a new element. That's the initial tree:
 
jk
it wasnt me
I upvoted the question
 
Lol ... I know ..
 
@BhargavRao if True:... probably :)
 
you should have closed the question
 
8:03 PM
Every other answer gets a upv and mine gets a down ...
@JonClements Shall I remove that?
 
stackoverflow is not about noobs posting their most horrible code, but building a knowledge base of interesting questions
 
I meant @BhargavRao's comment on the question
 
"at least" should be two words and TRue is improperly cased. Not really worth a downvote if you ask me, but some people are sticklers
 
@BhargavRao err, well yeah, doing an if True:... is just doing it regardless...
 
you can a) CV the question, b) say the fix in comment
and after 7 days it is automatically garbage collected thanks to the downvotes and no answers
NOW... it will be there forever
 
8:05 PM
 
@AnttiHaapala Yeah ... But I thought it was a legit question
 
no it is not
 
@JonClements Check this edit (I've become evil too)
 
who the hell does google for "syntax error with if/else statement" and finds that question
:D
and is like "oh, now I know, an if clause needs a conditional"
 
8:06 PM
Fine ... Now let's bombard the question with close votes
 
Assuming the 'GPIO.read()` returns something that needs to be kept
 
I just downvoted it ...
 
then you should read it first, then check
 
Im pretty sure gpio just returns binary on/off
so if you are in the statement its on
 
It does return
 
8:07 PM
if not its off
it doesnt return analog values
 
stackoverflow.com/questions/28176866/… btw edited the title to something comprehensible
 
@AnttiHaapala I inserted 27 and I got the following:
Could you tell me if it is right?
 
I do not know RB trees by heart :d
but I guess it is not
 
Ok, thanks !!! @AnttiHaapala
 
as 27 will have the implicit black nils there, it does not have the same number of blacks
 
8:10 PM
did that op say if he wanted [2,3,4,6] to return 1 or 5?
 
Every red node must have two black child nodes.
Every path from a given node to any of its descendant leaves contains the same number of black nodes.
now 25 has NIL on the other side and black 27 on the other
 
Just realized, with no answers today, I got six upvotes. Cheers.
 
@AnttiHaapala I see..
 
congrats
 
thank you
 
8:13 PM
I have made 1 answer in puzzles
and so far it has gotten 33 upvotes... compared to the 22 of my greatest vote honeypot at stackoverflow of all my 485 :D
maybe I am just a bad programmer
 
I submit that programmers are less grateful than puzzle solvers.
 
DSM
Afternoon cabbage for all.
 
hey DSM
 
My wife makes a very good cabbage and bacon soup. I would use it to welcome someone.
But I would not welcome someone with a plain cabbage.
Personal tastes, perhaps.
 
re-cbg
about to take a Codementor call.
 
DSM
8:26 PM
How does that work? Do you know the topic beforehand or is it like hosting a math tutorial when people can throw any kind of question at you?
 
Hurrah for Martijn getting paying work. Now us mere mortals have a chance to answer questions. :)
5
 
how much do you actually end up making with that codementor thing?
 
It is not like the edit clarified what the OP wants.
 
nm you dont need to answer that
 
8:28 PM
@JoranBeasley Pocket money, because I only get about 4 a month.
 
ahh I see
 
Good to pay for small appliances that broke or Christmas and birthday presents.
 
DSM
I used to volunteer for various experiments in grad school for beer money.
 
I should send people to you, then.
I went where the money is so I can help people for free. :)
Which I do on weekend office hours for the NYCPython meetup group.
 
Im gonna go get some pho
later guys ... or rbrb ...
 
8:30 PM
pho you?
 
0
A: Find the smallest positive number not in list

Antti HaapalaThe asymptotically good answer: heapq with enumerate from heapq import heapify, heappop # A = [1,2,3] also works A = [1,14,2,5,3,7,8,12] heap = list(A) heapify(heap) def iterheap(): while True: try: yield heappop(heap) except IndexError: return for ...

itertools trickery
@MartijnPieters there was edit with code I guess
 
this is weird... it snowed so much that I can't find where I parked my car
 
0
A: Find the smallest positive number not in list

Antti HaapalaThis might be one of the best proposed here: from itertools import count, takewhile from collections import deque A = [1,14,2,5,3,7,8,12] print(deque(takewhile(set(A).__contains__, count(1)), 1)[0] + 1) This creates a deque whose size is limited to 1; it contains the largest element so far, a...

^^
no upvotes yet, c'mon guys :d
 
I don't know anything abour heapq so I can vote :)
 
Hey guys! I am a beginner to python and I have made a simple script which uses some modules which are precisely: import os
import twitter
import tablib
import urllib
import sys
now I wanted to ask that how do i distribute this
so that the user may run it simply from command line
 
8:43 PM
generally people use virtual environments for development purposes, but I assume you mean making a setup.py script
 
FyI i am from java background and in java, we send the jar files in a lib folder or we pack them into the application.
@corvid thanks for ur response. I am not sure what a setup.py script does. But my aim is simple. Just let the user run the script (say Main.py) from command prompt with 2 arguments. E.g. python Main.py arg1 arg2
so do i need to do anything extra so that on the user's system, he does not have to install the above modules used in this script
 
hmhmmhmhmhmhmh
omg
I just reached satori with that answer :d
 
i know that may sound funny
but of course people are funny when they try something they are not expert at :(
 
@rahulserver You need to write a setup.py script. Here's the docs: docs.python.org/3.4/distutils/setupscript.html
 
There's a page to download your personalized SO prediction data. I think it's new? Have people seen this before?
 
8:52 PM
@CodyPiersall i am using python 2.7.9. wil that doc for 3.4 be relevant to my case?
 
Ref. for above: I am reading Providence: Machine Learning at Stack Exchange, published today, and linked to from the current SO blog post
 
@AirThomas Sweet, this line is in my prediction data:
"python": 1337,
 
omg not good
I want an option to turn it off
 
@AnttiHaapala There's an option to turn it off.
 
nice
 
yep, they let you turn it off
 
thanks @CodyPiersall let me try it
 
I don't think I like the idea, it might turn my SO experience into an echo chamber.
 
Also @rahulserver there's a combobox in the top left of the docs page that lets you change the Python version you're looking at.
 
@Cody You win.
 
8:57 PM
@CodyPiersall cool. Its better than the javadocs!! :D
 
I don't find the "Interesting" page all that interesting
 
I feel as though the views of SO that I want are: 1. Questions I am interested in answering; 2. Questions I can't answer, but am interested in reading; 3. Questions I have interacted with previously.
I can sort-of get #3 from profile/activity.
The "interesting" tab seems to want to do the jobs of #1 and #2 simultaneously, but the criteria are distinct.
 
Re-cbg
 

« first day (1564 days earlier)      last day (3385 days later) »