« first day (1626 days earlier)      last day (3336 days later) » 

user4433485
11:02 AM
Back!
 
cbg!
 
user4433485
Hey @poke ! I might go to Germany next weekend
 
Cool, where to?
 
user4433485
Don't know, someone is selling a car, I want it
 
user4433485
Didn't check where in Germany tho
 
11:03 AM
haha, you do realize that Germany isn’t that small, right? :P
 
user4433485
I do, but I've got all day :p
 
Uhm, crossing all of Germany in a single day twice isn’t really doable :P
(practically)
 
user4433485
Really?
 
user4433485
I thought you can drive as fast as you want in germany
 
Not everywhere though.
 
11:05 AM
@Ffisegydd okay... you'll have to pick it up from my homedir on sopython
 
user4433485
Anyway, Its quite impossible to find a good Honda Crx del sol in the Netherlands
 
Told someone on Skype what a codereview costs. I can hear the gulp reverb around the internet.
3
 
counting down to the backing out response. This is the moment I find out if they are serious about this.
 
:D
 
11:07 AM
@Jon okay let me get my Mac and have a look
 
@poke you on GH/Skype?
 
You can get me on the former.
 
cabbage
 
Cabbage!
 
user4433485
Cabbage!
 
11:10 AM
Cabbage!
 
Cabbage...?
 
Charles Babbage!
 
I'm still getting over the shock of this OP stackoverflow.com/questions/29343808/… expecting their dict to retain state between runs of the program. :)
 
Okay Jon I've got this DF. How do you want me to load it?
 
@GamesBrainiac Dang... It would have been cool, if his name was "Bharles Cabbage" :D
 
11:12 AM
@Ffisegydd errr, from_pickle?
 
Ah okay. I didn't know it was a pickle :P
 
:thinks: Barles Cabbage could be a good user name... :)
 
I assume you've created this yourself and as such it's safe to unpickle?
 
user4433485
11:13 AM
congratulations @poke
 
Finally italicized again…
 
@thefourtheye Sounds Indian. :)
 
Thanks ;)
 
Python 2 or 3?
 
11:14 AM
@PM2Ring lol... Yeah, the firstname sounds a little Indian...
 
Cool. Seems to have loaded.
 
@Ffisegydd right - it's a transaction list for Feb
 
For those who didn't see this when I linked to it yesterday, pastebin.com/u28fjpQE is a little script that shows who's currently logged in here. Sorry about the Python2isms.
 
That’s a lot of code.
 
11:17 AM
@Ffisegydd so you should have 5989242 rows
 
user4433485
do I need to do something with the code?
 
But it doesn't show a lot of names which I can see in the right side
 
And the backing out has started.
Their budget stretches to < 1/3rd of what I charge, but lets discuss this when calling on wednesday!
That's going to be a short call..
 
@Jon no I have 285202
 
@MartijnPieters just tell them what the cost of the call is and it will be :)
 
11:18 AM
Oh no - that's right - sorry - was looking at something else :(
 
And some of the rows have missing data.
 
@Ffisegydd yup... and there's more missing data to find which I'm struggling with
I'm trying to identify hours which have no data
 
@RobertGrant the call is a sales call, which my hourly fee has to account for, of course.
 
I know :)
I need to become an expert and have people only budgeting for a third of my price
 
@thefourtheye By default, it only shows people who's last post was made within the last hour; pass a command-line arg of the number of hours (as a float) to show more... but I shouldn't need to explain this to people who can read Python. :)
 
11:21 AM
They get near to 20 years of experience, and the top-rated Python answerer on Stack Overflow. They already know this, so why they thought they'd get me for the budget he revealed I don't know.
 
@PM2Ring Yup, just saw the comment in the code :-)
 
@MartijnPieters get them to give you a smaller project you can review, so they at least spend the money with you :)
 
@Ffisegydd I've got as far as df.pivot_table(index=pd.DatetimeIndex(df.acondate).to_period('H'), values='adur', aggfunc=len)
 
@MartijnPieters reading that, I'm presuming you don't know your business, which is unlikely. Sorry!
 
@RobertGrant I certainly plan on trying that tack.
 
11:22 AM
@Ffisegydd okay - let's change that to: df.pivot_table(index=pd.DatetimeIndex(df.acondate).to_period('H'), values='adur', aggfunc=pd.np.sum)
 
But when there is that big a gap in the budget vs. my expectations it is rare for this to go any further.
 
but I need to isolate hours that have 0
 
@JonClements: this isn't even the price we discussed for your client.
 
@Martijn umm... well it didn't seem overly unreasonable for me tbh
less would have been better to not put 'em off... but - it's done now (for a bit until they start screaming)
 
@Jon sorry just on the phone
 
11:24 AM
@MartijnPieters you should start a consultancy, and farm out the work to people in here under your brand :) Or as I'd be calling it after I did some work for it, your ex-brand.
 
@RobertGrant yeah, there's the rub, innit. :-P
 
@MartijnPieters do you do the reviews "live", or do you take the work away and come back with comments, suggested/made changes, etc?
 
@RobertGrant If it were live I'd charge more. :-)
I read through the code several times, collecting notes on specific style issues, and overall architecture notes and test coverage.
I do ask that a decent Python style guide is followed and that there are tests.
 
@Jon pinged you on Google
 
11:43 AM
@PM2Ring There:
from urllib.request import urlopen
from bs4 import BeautifulSoup

with urlopen('http://chat.stackoverflow.com/rooms/info/6/python?id=6&tab=general&users=current') as req:
    soup = BeautifulSoup(req)

print([usercard.find(class_='username').string for usercard in soup.find(id='room-usercards-container').find_all(class_='usercard')])
(my bs4 skills are really bad…)
 
That's a bit more compact. Pity I don't have BeautifulSoup. :)
 
pip install beautifulsoup4 :P
 
I guess I could do that... :) But thanks for that parametrized URL.
 
I am new in python side.really interest to learn python?really confused where i start? how learn python step by step please any body help me out?
 
@Thennarasu Start here
 
11:47 AM
thank you@poke
 
Who would win in a fight between @MartijnPieters and GvR?
 
GvR
His wife is a Aikido instructor, it's been ages since I went to the Dojo, presumably he has absorbed more.
And he is taller.
 
It's not a fair contest: if it looked like Martijn was winning, Guido could just redefine Python to favour himself. :)
 
user4433485
who on earth is GvR?
 
Guido van Rossum, author of Python
 
user4433485
11:55 AM
Owh:) sounds dutch tho
 
And saviour of the modern world.
Probably because he's Dutch.
 
user4433485
Oh lol
 
Hm, yeah makes sense
 
user4433485
Yep
 
I think this page to "whet your appetite" for Python needs work - more powerful than Perl and Awk? Wow! So many people understand those comparisons these days!
 
11:58 AM
@Katherina He is a Dutchie living in the US.
Python is a Dutch invention. :-)
 
FWIW, I still use awk, although mostly for one-liners in the command line; Python's not really suited to that. And awk is fast.
 
user4433485
@MartijnPieters Ah I see:)
 
user4433485
Again US
 
@RobertGrant Python's extensibility with C is now a problem for new JIT engines like PyPy
 
@GamesBrainiac yeah, I totally agree. It should be extended with Python :)
And well done for saying extensibility and not extendability :)
@PM2Ring yeah, it's very suited to that, I just mean if someone's thinking, "Hmm, should I go to Ruby or Python from PHP?" then that comparison is totally useless at best
 
12:06 PM
@RobertGrant Understood. OTOH, do we really want ex-PHP programmers going straight into Python? Shouldn't they go through some sort of detox clinic first? :)
8
 
Well, I can't argue with that :)
 
oh great... connection yo-yoing
 
I can't English today, ignore me :/
 
@RobertGrant As long as you go away from PHP, you’re fine :P
 
12:23 PM
cbg
hmmh
I've gotta write something about how the Python 2.8 guys are killing Python
 
Yeah I agree
For that old guard, it's just not the cool language that they were desperate to learn and improve; now it's the thing they want stability in because they've written systems in it and Python 3 probably has financial implications for them
Is that wall of superpowers representative of the packages most people want? E.g. sqlalchemy-migrate is on there, and I thought that wasn't recommended these days, Alembic was?
Also MySQL-Python vs PyMySQL
 
Nice
 
12:50 PM
cbg
 
1:01 PM
morning everyone
 
@corvid cbg
 
I got a new bow!
 
user4433485
what kind of bow?
 
recurve, but of course, the best kind. Is purty
 
1:09 PM
cbg, Antti
 
user4433485
Archery @corvid ? cool:) I've got a friend who used to shoot with compound bow
 
user4433485
quite cool sport, however.. the only thing I hit was a poor tree;)
 
compounds are cool, but they're so light to pull back and seem way too powerful
 
user4433485
I'll brb Coffee:)
 
argh
how to prevent formatting of in stackoverflow?
Without having to show a codebox?
 
1:14 PM
@paul23 For small samples, use backticks.
 
Still shows the code, I'm trying to quote output
@PM2Ring shows the code box
 
@BhargavRao cbg, thanks for bronze :D
 
:D
I see 9 I upvote
 
@paul23 No, but it shows the text on a dark background.
 
@PM2Ring Well that's just an inline codebox - it's not code that needs to get formatting removed
 
1:18 PM
I know the feel of having 9 votes.
 
Obvious what's happening from OP's comment, but sheesh.
 
closeclose
and downvote
 
_o/
 
@paul23 What are you actually trying to do? On SO it's common to put output into a code block to preserve white space & inhibit the effects of - and * etc; it also clearly separates the output from the surrounding text. You may also wish to use <!-- language: lang-none --> before the code block . Or just use a <pre> ... </pre> block.
 
hmm I wish to print a debug output indeed
but then the output looks just like code?
 
1:27 PM
buh, is there anything wrong with storing geometry of levels in a database and fetching it? It seems to be complaining
 
@paul23 that's how you commonly do it (I do like that anw.)
 
@corvid complaining how?
 
@paul23 So, put **debug output** or something, before the code block.
 
Guess that's true..
 
Here's a recent example of how I do output blocks: stackoverflow.com/a/29339856/4014959
 
1:30 PM
@paul23 Or do you want the block quotes ('>')?
 
@BhargavRao I did end up using both (code inside block quotes)
 
@RobertGrant I basically do var Cube = new THREE.CubeGeometry(1,1,1); Stage.insert(Cube), then it says that Object is not valid when I fetch it
 
block quotes don't preserve white space, so they may not be appropriate
 
I'm still wondering if myMeasurmentData[10.5, 10.2] is "good syntax" - where I overload a numpy array to provide interpolation between cells
 
Put myMeasurmentData[10.5, 10.2] in backticks as in myMeasurmentData[10.5, 10.2]
Aw, you asked about syntax! Sry
 
1:33 PM
Or if I should go for a special function, and make all functions for doing things such as squaring the measurements etc.
 
hi guys, i'v got a tiny question for you ;D
 
Yeah @PYPL?
 
@PYPL the answer may not be in here: sopython.com/chatroom, but if you haven't read it, please do :)
 
is it even possible to splice a range of list and return remained data?
 
Care to give example @PYPL?
 
user4433485
1:36 PM
@corvid I can't even take a single shot with a recurve bow I think, need strenght right?
 
hmm, i have a list that contains 100 items, i need to keep 0-40 and 60-100 items and get rid of 41-59, i could use .pop in for loop but i would like to do it in another way
is is possible or not?
perl has some good function called splice and it does the job ;D
 
new_list = old_list[:40] + old_list[60:]
 
list = list[0:40] + list[60:100]
 
ahh thats how it is
 
Ah, his is better
 
1:39 PM
well i thought it's more complicated, thank you
 
Yeah I've one question as well
 
to me?
 
658
Q: Explain Python's slice notation

SimonDo you have a good explanation (with references) on Python's slice notation? To me, this notation needs a bit of picking up. It looks extremely powerful, but I haven't quite got my head around it and am looking for a good guide.

 
I'm doing like this:
a = [1,2,3]
b = a
b[0] = 3
print(a) #prints out [3,2,3]
I don't want list a to save changes done to list b
 
user4433485
I've a question aswell, but it's that simple that I am to ashamed to post it
 
1:40 PM
@Katherina it's only around 70 pounds to pull the string back all the way... I'd prefer a little over 100 pounds
 
@Mehul CTRL+K will format your code for you :-)
 
@MehulMohan, you can make a copy of your list in that case
import copy
b = copy.deepcopy(a)
 
user4433485
@corvid 70 pounds? that's more as I weigh lol
 
I know there are some other ways to do it, but that's one way to solve your problem
 
@Katherina LBS?
Which makes no sense in caps
lbs?
As in 30kg?
 
1:42 PM
@paul23 I don't do numpy, but I guess that's tolerable. Although, it's a bit smelly because I suspect that the interpolation only works for reading from the array. It'd probably be better to do the interpolation in a separate function; I guess that'd also make it a little easier in the future if you want to support different kinds of interpolation.
 
user4433485
110 lbs?
 
user4433485
like 50 kg
 
Cool. Thanks @Paco
 
@Mehul apart from copy.copy() you can also get a copy of a list with b = a[:] (which is the "everything" slice).
 
Oh, okay I'm not worried now :) that's just thin, not 12 years old
 
1:43 PM
Yeah that's cleaner @ZeroPiraeus
 
user4433485
lol
 
Thanks
 
@Katherina 70 pounds are ~32 kg o.O
 
@PM2Ring I plan the interpolator to be part of the class
 
user4433485
I'm not used to pounds ^^
 
1:44 PM
back in the day, I think pull weight on bows was over 150 pounds
 
@paul23 That sounds fine.
 
user4433485
I 'm not strong enough for archery ;p
 
@PM2Ring But I'd really like to do things such as: line = measurements[10.2, :] - which would then give an interpolated line over the axis (x=10.2). This line I could then further use for my purposes...
 
I personally prefer to use copy since it's generic, and it is more explicit (it doesn't look like a hack).
 
And this especially becomes more powerful if you have more than 2 dimensions (as then the syntax of numpy starts to shine)
 
1:47 PM
@Katherina I managed to glance a bow off someone's shoulder on a "team bonding day"
 
user4433485
=DD
 
Btw is there another language that makes so much use of "generators" as python does? I really started to understand python after I understood what generators were and how they work.
 
Attaching people together with a bow & arrow is really more "stapling" than "bonding".
 
@paul23 Sure. I originally said it was ok. Stylistically, it's not so good if your object supports float indices when reading but doesn't support them when writing. But I guess that's tolerable if you document it clearly, since it doesn't make a lot of sense to try to write to an non-integer cell in an array. :)
 
@Zero nah - it just took a bit of skin off
 
1:49 PM
@paul23 You might be interested in Haskell. But it can get pretty scary. :)
 
@PM2Ring Writing is hidden within several layers anyways (it's reading measurement data from either a live port where I was just given the python script by the manufacturer or a file)
*hidden behind
 
@AnttiHaapala: you may want to check that record you are playing, it is getting a little stuck. :-P
 
@Zero beat a TA with a shotgun... had never fired one before... but got 23/24 "straight shots"
 
@paul23 javascript libraries like lodash have nice lazy operations
 
Sure, in ideal situations Python 3 should be preferred.
But in practice that is not always an option.
 
1:50 PM
@MartijnPieters looks at python XY
 
@JonClements Again, beating someone with a shotgun should really only be considered when you've run out of ammo ;-)
 
From wiki.haskell.org/Lazy_evaluation "Lazy evaluation is a method to evaluate a Haskell program. It means that expressions are not evaluated when they are bound to variables, but their evaluation is deferred until their results are needed by other computations. In consequence, arguments are not evaluated before they are passed to a function, but only when their values are actually used."
 
I really wish that thing would update already - it is so nice for people who are just introduced into python (no need to learn the background of libraries, updating and dependencies with PATH variable)
 
@Zero haha, he'd been in the TA for about 15 years, and army before that, I'd never held/fired a weapon before, but managed better in a shooting range... not sure if that's saying I'm great, or he's crap :)
 
Well, your aim ought to be pretty good, considering the size of your eyes ...
 
user4433485
1:53 PM
@poke you were right about Germany, the car is for sale in Berlin... damn far
 
"Oh flip Jon didn't do very well, how are we going to tell hi-OH LOOK AT THOSE EYES! You did GREAT!"
 
@Katherina Of course I was right about Germany, lol.
 
Plane crash there :(
 
;)
 
user4433485
Actually the crash was in France @paul23
 
user4433485
1:54 PM
Damn you @poke :p
 
Last 2 years are getting close to the worst year for aerospace
 
@paul23 by what measure?
 
Actually many
 
user4433485
true, 2 planes disappeared, 1 crash in france and well. 1 got shot by ukraine
 
Just give me the top 10
 
1:56 PM
Yet, there are still a lot more accidents on the ground.
 
user4433485
Well that is obv @poke
 
Don't scare me bro, I am taking my first trip to the Americas this summer
 
And they're from high profile companies too.. Which adds even more pressure for us Aerospace engineerings
 
Not sure if that’s so obvious. The media seems to forget it all the time.
 
user4433485
still 1 airplane is like 150 deaths
 
1:58 PM
@paul23 Deadliest year for aviation was 1972, with 3342 deaths. Don't know how you think 2014 (1320 deaths) is getting close to that :)
 
Last question opened a big problem nowadays though..
The pilot cabin is nowadays so blast proof and can't be opened from the outside - it protects well from terrorists..
however it means that passengers are just at the mercy of the pilots, and if one goes rogue there's nothing that can be done anymore.
 
user4433485
Well the solution is quite simple, 3 pilots instead 2 should be fine.
 
By design it can with a code the pilots know; the question is how did the copilot keep the pilot out (which is not by design)
 

« first day (1626 days earlier)      last day (3336 days later) »