« first day (1386 days earlier)      last day (3569 days later) » 
00:00 - 16:0016:00 - 00:00

user559633
12:00 AM
@WalleCyril I am not familiar with the galaxy editor.
 
My point being that offence should come from context, not the word.
 
user559633
Please link to it
 
@tristan It looks like a Starcraft 2 thing.
 
The galaxy editor, for those who don't know is the tool to creates games, mods and maps which can then be played for free with the sc2 engine.
 
@Ffisegydd I don't know what you're referring to.
 
user559633
12:03 AM
@WalleCyril does it use python or anything?
 
@Iplodman I'm reasonably certain that the number of contexts in which the word "finger" is offensive, is significantly fewer.
 
Well it uses galaxy scripting and xml
 
I'll not flag it, but probably a bad idea to use it again.
 
user559633
is 'galaxy' python?
 
@aliteralmind Of course, but the context should count more than the word it's self. And thanks :P
 
user559633
12:04 AM
hey @Iplodman, @aliteralmind are you both alright to agree that it was in poor taste and to move on?
 
@tristan Eh, to avoid further arguments or offence, sure.
 
Yes. Just needed to say that. Done.
 
user559633
Thanks. If you really are interested in learning why that word is offensive to all races, we can take it off #python and I can get a list of readings for you @Iplodman.
 
user559633
does anyone have an idiomatic one liner for 'get an attribute off a dictionary or return an alternative constant and update the dict?'
 
@tristan I get why it is, but I think that just the mention of a word shouldn't be offensive. The context that it comes with is far more important IMO.
 
user559633
12:07 AM
Yeah, I'll get some materials together for you @Iplodman. Let's move on.
 
@tristan Don't worry, I get why it is :P
So...
What's everyone up to?
 
user559633
reimplementing a dynamic defaultdict type
 
Better than what I had, which is 'What he said'.
This is good xD
(One last thing, if anyone was offended by that converstaion, I really am sorry)
 
user559633
moving on!
 
user559633
here's a cool song
 
user559633
12:15 AM
 
@tristan Ooh, a coding song?
 
user559633
ooh coding songs
 
Code Monkey is a good one.
 
user559633
here's a 10 hour playlist of songs I like to code to: spotify:user:0xtristan:playlist:0ZmDYJensPGfakmpgOL85H
 
user559633
12:18 AM
haha, nice! this is my favorite coulton youtube.com/watch?v=azNRyOpfNvY
 
Can you get an URL to that Spotify playlist?
 
Cheers :P
 
user559633
:)
 
user559633
it's mostly non-vocal tech-house or cerebral
 
12:20 AM
@Iplodman lol
 
@Ahmad :)
I like electro or techno or whatever it's called. I'm not a big music person.
 
user559633
oh jeez, i'm huge into music. if i could do it again, i'd be poor and play music
 
My brother's really good at music production :P
 
user559633
i love coding, but just doing the bare minimum and making music allows you to so easily just "get" other people
 
What do you mean?
Understand them?
 
user559633
12:24 AM
warning to others: if you're fighting with set theory in a lambda for more than 30 minutes, just make a simple function
 
What's a set? A list/dict/tuple of data?
A set of data, in other words?
 
user559633
back when i used to write my own electronic music and DJ, it was so easy to just make a setlist and share how you feel that night with others or just play some music and not talk so much
 
That's pretty cool.
 
user559633
coding thing: some_action or (some set that might have a long chain) -- if the part between the braces takes you a long time, just write a function that does the logic and returns a value
 
@davidism Cabbage :P
 
12:27 AM
cbg
 
I have two life dreams as of now. Become a freelance developer and be good at it, and live in a house that I've designed.
 
user559633
anyone have any favorite future/dystopian art?
 
user559633
haha, @Iplodman same!
 
@tristan I'll look for some now.
 
user559633
i'm halfway there!
 
user559633
12:28 AM
except s/designed/built
 
I'm sure you're good at it xD
Oh, really?
You built your own house?
 
user559633
I'm okay at dev. I'm pretty good at business and I can bounce around and "get things done," so it's made my career work.
 
user559633
No, that's the half I haven't done @Iplodman :P
 
Ah :P
I'm sure you're good. I mean, you landed a job, right?
Well, you get paid for it :P
 
user559633
I have my own business.
 
12:30 AM
Something else to put on my bucket list.
this is nice.
 
user559633
I have some loyal customers and I'm looking to tick another box on my bucket list this fall: expatriation
 
user559633
that's cool @Iplodman
 
user559633
I'm getting a tattoo sleeve and it's just so nebulous now
 
galaxy scripting is not python, and mysteriously enough no-one knows how to write galaxy scripting because the galaxy editor does it for you
 
I could never pull off a tattoo sleeve, nor would I want one. Not that they look bad, they look awesome, but I wouldn't suit one.
According to Google, you want to banish someone from their home country?
 
user559633
12:34 AM
Oh, expatriate is to move out of your home country
 
Oh right :P
Where do you want to move from or to?
Berlin is your current home, no?
 
user559633
I'm currently set up in Brooklyn, NY, USA
 
Ooh, nice.
 
user559633
It's okay! I've been here for 8 years
 
user559633
Great city to be single.
 
12:37 AM
Oh, goodie. You can't drag and drop an image to Drive to upload it like you can with Dropbox.
@tristan A lot of music on that playlist would suit FTL well.
 
user559633
FTL?
 
Faster Than Light. It's a real time strategy sci-fi game.
It's very good.
 
user559633
cool, will check it out. these aren't my favorite songs FWIW,these are just songs that i enjoy coding with
 
I like them a lot.
 
user559633
i like songs that are more like this when i'm not coding/in mind-over-everything mode: gorilla meat - jogger
 
12:45 AM
I like that even from the first few seconds.
One moment, restarting my laptop.
 
12:56 AM
Rhubarb all, I'm starting to get headaches from the screen :l
 
user559633
later buddy
 
Night! :D
Have fun drinking and writing your bot :P
Rhubarb all.
 
1:24 AM
How do i pass my variables to cmd? i know i have to use subprocess
 
1:45 AM
anyone has any idea of how to open up cmd using subprocess?
 
2:39 AM
Hello!
Owatch here for the graveyard shift.
 
2:51 AM
Exception in Tkinter callback
Traceback (most recent call last):
File "D:\Python27\lib\lib-tk\Tkinter.py", line 1486, in __call__
return self.func(*args)
File "C:\Users\Xavier_\Desktop\PROJECT\segmentation_GUI.py", line 123, in printing
results = pipe.communicate()
AttributeError: 'str' object has no attribute 'communicate'
pipe = "C:\Windows\System32\cmd"
subprocess.Popen([pipe,"a"],stdout=subprocess.PIPE)
results = pipe.communicate()
 
THere are no shifts
 
anyone knows the error?
 
@user3817491 realistically, I don't think you will get an answer here, especially at this time
 
Turns out Take Command, my shell replacement, is ignoring my Windows associations. It works in every other shell (cmd.exe, for example). Check out the answer: stackoverflow.com/questions/25071456/…
 
2:53 AM
it is 10.53am here
 
10.54 here
we must both live on the east coast
 
haha i live in singapore
 
oh, 10am,not pm
 
yes :)
 
we are on opposite sides of the world
 
2:59 AM
haha it's cool
 
on that note, Is should go to bed. rbrb
 
3:14 AM
goodnight
 
 
1 hour later…
4:41 AM
Hiya
 
 
1 hour later…
6:06 AM
@user3817491 hullo
@user3817491 the answer is easy
pipe = "C:\Windows\System32\cmd"
subprocess.Popen([pipe,"a"],stdout=subprocess.PIPE)
results = pipe.communicate()
loses the output of subprcess,
then tries to call .communicate on a string
what you meant is
cmd = "C:\Windows\System32\cmd"
pipe = subprocess.Popen([pipe,"a"],stdout=subprocess.PIPE)
results = pipe.communicate()
and possibly too stderr=subprocess.PIPE
 
if i want to open up cmd and to print this command "segmentation.py Hangover.mp3 4 00:00:02 00:00:04" how should i do it? i have to append the filename of the file i want to run and the variables i get from my GUI
*print and execute
using subprocess btw
 
6:35 AM
The new CoD trailer looks awesome
 
filename = 'Hangover.mp3'
Popen(['segmentation.py', filename, '4', '00:00:02', '00:00:04']...)
 
7:12 AM
@user3817491 Are you referring to Kick's song?
 
thanks :)
 
7:28 AM
Morning people
 
cbg
 
7:44 AM
cbg
c-c-c-c-cbg breaker :)
 
Gr.r.r.r
 
Right, off out for a bit, see you all later this morning
 
 
3 hours later…
10:51 AM
@WalleCyril Hi
 
 
2 hours later…
12:29 PM
@Jon I've added the basic commands for the server to the Trello page
 
12:40 PM
Cabbage all! :D
 
the CoD trailer looks awesome indeed!!!
cbg
 
Ew, CoD xD
@vaultah What's the actual question? I can't make it out ;-;
 
@vaultah The 'question' is so unclear that it's not even downvoted yet
 
cbg
@Ffisegydd thank you! :)
 
12:47 PM
cbg @Jon
 
@Raoul My god, it is an exact dupe of the other question :l
 
Given a positive integer, return all the ways that the integer can be represented by letters using the mapping 1 -> A, 2 -> B, …, 26 -> Z. For instance, the number 1234 can be represented by the words ABCD (1 2 3 4), AWD (1 23 4) and LCD (12 3 4).
 
@tilaprimera What?
 
best approach to this? i intend to use the ascii values of A, B and so on to use that to map integers.
 
Use a dictionary.
 
12:52 PM
most pythonic way to solve it : ) would be using dictionary..
no no dont want to see an answer just yet.
 
Yep.
 
: )
 
Oh right, just don't click that link then :P
 
couldn't help but click.
 
Ahaha xD
Get it?
 
12:53 PM
that is something that is in my mind...
how does one tell if it is pythonic or not?
 
> There should be one-- and preferably only one --obvious way to do it.
- Tim Peters, The Zen of Python
 
: )
: ) exactly!
 
In this case it's a dictionary :P
 
rbrb
 
straight out?: )
 
12:54 PM
@vaultah Rhubarb :P
 
what about map?
 
Yeah, although you could probably pack the dictionary a little better.
@tilaprimera Explain what that is, please?
 
from itertools import count, imap
from string import ascii_uppercase

lookup = dict(zip(ascii_uppercase, imap(str, count(1))))
print ' '.join(map(lookup.get, 'AWD'))
 
what does imap get me?
 
12:57 PM
the integer representation as a str
 
Do it @JonClements' way, he's much more clever than me ;)
 
i want to learn how to fish : ) not get a fish from him!: )
 
@tilaprimera Well, his way is more 'experty', but it's more efficient.
 
: )
 
My way is the way you'd usually learn to fish.
I guess.
 
12:58 PM
that comes with experience i guess.. : ) yea..
but python gives us some efficient tools and i wish to know about them : )
 
Do you want to know about modules or batteries included stuff?
 
both!
 
It's probably better to know the basics first.
 
yea that would probably get me somewhere.
 
And then the modules will make more sense.
Oh, and map() is pretty useless here. A dictionary is better for it.
 
1:01 PM
ok
Will look into it
thanks
 
No problem.
 
@JonClements thanks for the solution : ) both of you.
 
@tilaprimera no worries - it's given you something to read up on at least :)
 
yea : )
 
cpx
cbg!
 
1:05 PM
Cabbage! :D
 
cbg @cpx!
 
cbg @cpx
 
cpx
Does this phrase mean anything "A polymorphic object is one whose true type hides within a superclass."? As I understand, a polymorphic object is an object which can be manipulated by using virtual function. A true type is something which is determined at run-time. Super-class is the top-level base class. I don't get the "hides" thing.
 
I guess that it means that the main assets of a subclass should be in the superclass.
 
@cpx a polymorphic object is one that can behave like another object
So it can be treated like its parent, or its grand-parent etc...
 
1:45 PM
combinations gives me combinations of two items....but of all combinations, i just want first one.
like for example, combinations('ABCD', 2) gives AB,AC,AD, BC,BD and so one, but i just want AB , BC..
is there another way of getting that?
 
@tilaprimera IS combinations() a function you made?
 
no, it is under itertools.
 
Also, what's your code?
Ah, right.
 
@tilaprimera what are you trying to do? Why just AB BC ?
 
So is combinations() returning a list?
 
1:52 PM
@Iplodman combinations is a generator
 
@JonClements Oh, right.
 
Is the actual output require AB, BC, CD ?
 
I want to get combinations of integers i enter for example 1234, so i get results like, ABCD (1 2 3 4), AWD (1 23 4) and LCD (12 3 4).
i want to break the integers into two and perform operations on it
 
So possible combinations of integers that don't exceed 26 ?
 
yup
 
1:58 PM
hang on - let me have a quick play
okay - your first example is... treat them as a single
map(int, your_input)
That does your 1234 case
 
yup. and
 
oh hang on... might be able to work the whole thing into a single logic
 
no rush...
 
@tilaprimera Shush, you're getting free help ;)
 
i want algorithm to how @JonClements 's brain works more than the solution.. : )
 
2:12 PM
Who said my brain actually works? :p
 
i did i think : )
 
@tilaprimera stop spreading lies! :)
 
: ) if only i could spread, i would spread my brains out so i could grasp stuff well, than "lies" : )
 
@tilaprimera so, let's get it down to the basics
 
hehe
 
2:25 PM
11 could be AA, or K ?
 
need to list all the possibilities..
it can be both
: )
 
and 111 could be AAA, AK, KA ?
 
yup
are you trying to solve it?
leave it
 
Think I have :)
 
you must have better things to do
 
2:28 PM
First step is single digits
I won't spoil it for you
(so you special case that one)
lookup = dict(izip(ascii_uppercase, imap(str, count(1))))
reverse_lookup = dict(izip(lookup.itervalues(), lookup))
You add a reverse_lookup as ^^^
 
oh... hmm
i will see hai..thanks
let me ipython that!:D
 
Then you don't use combinations, but look at the itertools recipe for pairwise
 
ok..
 
You build a set from that and then difference from the previous sets to get the combinations
 
hmm trying it out
 
2:43 PM
Right - gotta run for a bit, good luck :)
 
thanks
: )
 
you guys ready for another exciting day of flask shenanigans?
 
Deafening roar from the crowd
 
user559633
robotchurch.com:8443/login_up.php3 there is no way that this is not exploitable
 
:L
What is it?
Or are you trying to hack me? (If so you're dead to me)
 
2:52 PM
-_-
 
@vaultah Hm?
 
Nothing :P
 
Okay xD
 
user559633
not trying to hack you @Iplodman. that's someone else's domain
 
@tristan I know, I just wanted to make that dead to me joke ;)
 
2:54 PM
You're dead to me for making dead to me joke :D
 
@vaultah You're dead to me for judging me for a dead to me (inside) joke :D
 
Yeah
I've seen something similar in the room before
 
;)
(@tristan's been dead to me six times so far)
 
cbg
 
@Vader Ello' :P
 
user559633
3:00 PM
i'm going to look at this picture whenever my software has bugs i.imgur.com/UdyF37y.jpg
 
I would like to ask a question on SO, I am trying to avoid it getting downvoted. I hope it's alright that I run it by you guys first.
 
user559633
"yeah, it's bad, but it's not capsizing cargo boat bad"
 
 
@tristan Ahaha xD
 
user559633
@Vader what have you tried
 
3:01 PM
adding in more characters
but that feels like a bad hack
"un-pythonic"
 
user559633
where is the code for what you have tried
 
grid[i] = choice('XXOO ')
here is all of it
 
Put it in the question too.
 
but most if it is irrelevent
 
Put that one line in, though.
 
user559633
3:03 PM
 
user559633
that's pretty much what you're shooting for in terms of doing your homework before you ask
 
@tristan I don't get it, what does that link demonstrate
 
user559633
you need to read
 
user559633
"here's what i understand the problem to be, here's my code, here's what i tried, here's what i want"
 
you linked me your github
 
user559633
3:05 PM
Again dude, read.
 
do you mean this?
 
He linked you to a repo.
 
user559633
I was going to give you the answer, but now I'm not going to because you're like "what the hell man, why are you trying to get me to learn things"
 
you should make it clearer that that github is for learning/demonstration.
this is just confusing to me
A playground repo for demonstrating imports between sibling modules in Python
 
user559633
I don't work for you.
 
3:07 PM
That repo is a good example of how to ask a question, @Vader.
 
@Iplodman yes I know that now, I though he had linked me somethign to help me with my problem
 
user559633
And I told you after I linked it why I was showing it to you.
 
yes, I was confused sorry
is this format standardized?
b/c I don't see too many questions following this format
 
That's because most questions are bad.
 
Ahah, I like that @Ffisegydd xD
 
user559633
3:09 PM
@Vader because most people just want an answer shoveled into their mouths. This is how you properly ask a question or show what you're thinking.
 
okay thanks
I will be back shortly
 
user559633
Cool. I'll write some pythonic solutions for you in the meantime.
 
@Vader incidentally what you want is weighted random choice
(As in, that's what it's called)
 
user559633
Yep :) and I'm writing a function that accepts a dictionary
 
It's an interesting little problem.
 
user559633
3:16 PM
cool, i have a recursive dictionary solution, but i want to try a recursive boolean approach
 
Here is my question in the proper asking format. Not sure about the PEPs
 
Yeah don't worry about PEPs
 
user559633
Yeah, no peps is fine
 
user559633
@Vader awesome -- that is so much better
 
That's just something specific to tristan's problem
 
user559633
3:19 PM
If you post that on SO (feel free to leave out the project and related peps sections), I will go vote it up.
 
I'd add a sentence to the top
As an introduction
 
user559633
Oh, yeah, definitely.
 
But the style of breaking everything down into what you're using, what you want, etc, is definitely better.
 
here it is
0
Q: Python - manipulate odds

VaderPython Version: 3.4 Scenario 1: Call random.choice("XO ") Scenario 2: A quick hack to manipulate the odds Call random.choice("XXOO ") What I want: A solution that increases the chances of an "O" or "X" being chosed, decrease the chance of an " " (whitespace) being chosen What I don't wan...

@Ffisegydd will do
 
@Vader that's awesome.
 
user559633
3:24 PM
That's a fantastic question now Vader.
 
@Ffisegydd STEWIE!!!!!!!!!!!!!!!!!!!!!
 
CHEWIE
 
And Martijn hammered it.
 
Yep...
 
user559633
Boo.
 
3:25 PM
@Jon BRIIIIIIIIAN!
Can always share any solutions here.
 
he must have been watching
 
Incidentally @Vader you may want to look at eli.thegreenplace.net/2010/01/22/…
 
Thanks guys
too bad it can't be answered
 
user559633
It can @Vader. I'm working on an answer for you right now anyway.
 
@Ffisegydd thanks for your stuff on the trello page - much obliged
 
3:32 PM
i got the pairwise
@JonClements "difference from previous set" which previous set are you talking about?
 
@tilaprimera store the previous results, then difference them
 
ok...
once i pair them up, why did you ask to build set?
 
You check if they're <= int(26)
but you don't want multiple results
 
What's this:
In [8]: iter([1, 2]).__length_hint__()
Out[8]: 2

In [9]: len(iter([1, 2]))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-9-e1ba1f3044f9> in <module>()
----> 1 len(iter([1, 2]))

TypeError: object of type 'list_iterator' has no len()
Oops, sorry
 
3:48 PM
@tristan thanks, seems complicate but I will figure it out
 
user559633
let's walk our way through it then
 
> CPython has been observed to run some code faster than PyPy, purely because of this optimization being present.
Wow
 
@tristan okay
I actually have to leave the house right now. I will see you later. ugggh
 
user559633
@Vader check that file later, i'm commenting it for you
 
00:00 - 16:0016:00 - 00:00

« first day (1386 days earlier)      last day (3569 days later) »