« first day (1733 days earlier)      last day (3440 days later) » 

00:00
if your new to development start by making some simple interface (command line even) based analysis tools using that data - look at the data analysis tools available to python (scikit learn was where I started but their are other starting points); the web part is a wholly different issue and will compound the complexity and that's not even considering if a database or MOLAP will be needed for data storage (which could or could not be an issue)
I recommend this for starting data analysis: kaggle.com/wiki/GettingStartedWithPythonForDataScience
Bob
Bob
@JGreenwell Thank you for suggestion and the link..i am going through it.... I was saying about real time data analysis(but mistakenly said online data analysis).
00:23
Is there any significant difference between my_dict.get('A').get('B') and my_dict['A'].get('B') other than the built in key error exception handling?
If get('A') returns None, you'll get a weird NoneType has no __getitem__ error.
get is also very slightly slower than index notation, but that shouldn't factor in unless you're doing tens of thousands of gets
OK, so if I know that ['A'] will always be there I should just do my_dict['A'].get('B')
Cool. Thanks.
 
2 hours later…
02:32
Hello
02:54
Allô.
03:15
Olá
 
1 hour later…
04:39
Cbg
How are you today
Okay I guess - how's yourself?
Today it is plesant here not raining but about to rain :)
04:55
@VigneshKalai That is what I am wondering. If it had rained already, people would be late to office and I would enjoy empty cubicles :D
@thefourtheye I would have taken leave and would have had a hot cup of coffee :(
ha ha ha
Now have to drink the bad coffee in the office
05:48
cbg pups
06:12
Cabbage nuppy :-)
06:26
laurel :)
bon chou!
06:48
Cabbage @AnttiHaapala and @vaultah :-)
Cbg :)
went to see some bastille day fireworks at eiffel tower yesterday :P
damn they'd loaded the whole tower with enough gunpowder to send it to the orbit
Wow. Did you take pics?
Cbg
@AnttiHaapala nice
07:05
@thefourtheye yes but shitty camera so I guess just google for them and you'll find better ones. Also didn't want to get crushed and arrived a bit late thus the view wasn't very optimal
arrived a bit late because was stupid enough to try to get into the Paris metro instead of walking, so we were there just in time to see everything but not to find a better place :d
07:26
@AnttiHaapala Well - it's kinda shaped like a rocket :)
07:47
wb @JRichard
Hello @jon. Lurking mostly today :)
Fair 'nuff ;)
08:05
Cbg :)
Let's see how this works out - maybe something to fill time with in between contracts...
Code review your Python code for £60 via @PeoplePerHour http://www.peopleperhour.com/hourlie/code-review-your-python-code/223005?ref=twitter
cbg @Ian
(take advantage guys - very, very cheap rate... :p)
@jon \o/
@JonClements hm, haven't heard of that site before
It's like fiverr, but way more expensive :)
If not - quite happy spending all day on SO though - although if I can do the same thing and have it pay for some takeaways - I'm fine with that :p
I'd get you to review my code but I'm way too embarrassed by it
You're going to say, "why is all your view code in one enormous file?" and "where are your test cases?" and I'll be ashamed and my self-confidence will be ruined and I'll have to become a writer of polemics against tech culture
08:12
You never know till you try :)
Right... better through up a web scraping one...
Hello guys, I have an import problem.
It's about this GitHub repository: github.com/ByteCommander/ChatExchange3
If you look e.g. at this file in the subdirectory test/: github.com/ByteCommander/ChatExchange3/blob/master/test/…
I have an import statement there that looks like:
from . import live_testing
Where live_testing.py is a file inside the same test/ subdirectory.
However, when I want to run those tests with Travis-CI, it does not find the import.
Can anyone tell me how I have to reword it, please?
In my IDE, something like from ChatExchange.test import live_testing worked, but travis did not accept that either....
Or is it correct and I need to reconfigure Travis.CI?
cabbage
08:27
I suppose this is a reasonable question: Why do GeneratorExit and StopIteration have different base classes?, but since it's about Python's design & not about coding is it on-topic?
I'd add the
I believe it's on-topic
@RobertGrant Just seen that - lmao
@vaultah are you about for a second?
08:45
Sure
@vaultah / @RobertGrant do either of you have a chat.stackexchange account already?
Don't think so
Actually I think I've been in the meta room, so I probably do
08:52
Umm... neither of you are showing up
Anything happened?
I don't know what I'm meant to be doing :)
Any notifications or anything?
Nope
Umm... well that works well - must be doing it wrong...
08:56
hello
hi @Jacoby
Now I have an account :)
@Robert did you get a notification of any sort?
No, didn't see one
Just clicked on vaultah's link and it autocreated an account; haven't seen any custom stuff happen
(Are notifications even turned on? No.)
Lol sorry
Although actually, I'm in Vivaldi, which seems to not have notifications yet. I will now back away and be one with my shame.
Nothing in your global inbox?
09:07
What's that? The thing at the top of stackoverflow.com that shows notifications? If so, no.
Umm... can you just open it and double check please?
Yeah I saw something now
Jon's test room
Oh weird, it's from 16 minutes ago, but I don't remember it being there before
It definitely wasn't in fact; some car thing from yesterday was at the top. But anyway, yes. Got it :)
09:32
ahhh
morning
Cbg all - lurking from the office while writing code
lurking is better than nothing - we'll take it! :p
@MartijnPieters Ssssh. It occurred to me when I was driving back from work
cabbage
09:45
cbg @IntrepidBrit
Cheers vaultah
10:21
heya @rowan
Hey :) @JonClements
wassup?
Hey up
came across this. interesting stuff
10:30
Hi Guys I am reading CSV file have some strings have <br/> and <sup> sometimes at the end of the string tag like <b repeated I want to remove those tags. in the other column remove /en/ in front docs and images but when I run python literature_import.py doesn't remove all tags as well /en/ still in the db. any tips or help? Thanks
A different perspective to calculating square of a number
:)
here is the link: pastebin.com/9mMqVcsH
some example of the csv file: /en/docs/TechNotes/Human Macrophage.pdf
/en/images/Antibiotics-Brochure-Final.gif
Biomedical<br>Techno
from line 65 - 103
@Ffisegydd hey up :) How's day 4?
@DilMac I think you will get a better result if you post the question in main SO site and provide only the code where you think the change needs to be made with some sapmle input and expected output
Can't you use beautiful soup to strip html tags from a document?
10:43
Arrrrrgh says Fizzy, as the dictionary attack reaches onomatopoeia, still without success
Fizzy, years later, befriending his neighbour determines that their wifi password was onomatopoeia1. Sends him into a fit of rage
I think 'laurel' is one of the most popular salad words (after cbg/cabbage and rbrb/rhubarb), should we restore it?
@VigneshKalai Thanks for your tips actually been locked at the moment to ask question because deleted some questions in the past
literature.name = h.unescape(row['LTATI'])

new_name = str(literature.name)

if new_name == '':
continue
else:
new_name = re.split('<\S+>', new_name)

new_name = ' '.join(new_name)
print 'The update name: ', new_name
that is the code need to change to read the string without html tags
11:15
Sigh, Kasra is clutching at straws.
Is it bad that I feel bad that he has twice my rep?
The proof that rep doesn't mean much
True :P Rep only matters when you're beating @davidism to 10k with it.
I like "flecks of dust in your eye" as a comment @MartijnPieters
@Ffisegydd vks and Kasra both hang a lot in and answer a lot of 'givemecodez' questions. I try to avoid them both when I can
11:26
Oh and avinash
@vaultah I've run across Kasra in . I think he's improved lately but when he first started it was a case of "Throw a load of sh*t at the wall and wait for something to stick." He had a lot of deleted content IIRC.
Misping there, meant @Jerry
I was going to ping vaultah about laurel but got distracted :P
lol, it's fine :)
and yea, Avinash too.
also I might be at fault for pinging you :P
@Ffisegydd I still want to hear your opinion about laurel :p
Go for it, re-add it. Stick it to the man!
You're an Editor so you should be able to do it?
Yeah
I tried your suggestion above and it works! Excellent-You're a star *** — Alan Paupiah 1 min ago
Too broad/gimmecodez/just easy question
:[
11:30
I wonder what expletive he typed and had to star out? Maybe he called you an ass?
:D
Oh wait
I have enough permissions to edit wiki/canon but not Salad
Just a second then.
Done.
Amazon is 20 years old O_o wat!?
user559633
11:50
@Ffisegydd I'm not familiar with the expression "a star ass" (oh sorry, page just refreshed)
Well it could have been kinda sarcastic like "You're a star, ass" or it could have been that vaultah is an ass but he's the best ass, he's a star ass.
Or he's a 3-star rated star?
Or the OP was trying to use markdown but failed badly.
Good morning!
12:03
cabbage
@AaronHall Has anyone pointed out to you that your name sounds lie Harrenhal? :)
greetings new wanderers :)
In high school I had lots of students ask me if my name was really Aaron Hall like the R&B singer...
hmm a bit annoyed at some codegolf-thing, otherwise banana
12:05
I aspire to be the best Aaron Hall there ever was, though.
Music is lost on me.
12:23
Well, I'm having another great day!
I have to edit my profile again...
necromancers += 1
Cabbage!
Cbg @poke
@AaronHall Define "best"?
Really sweet singing voice?
12:35
That'll do
Why does SO’s markdown interpret escape characters within quotes? >_>
That's what I love about Markdown. There's no one right answer.
People really don't understand performance benchmarking: stackoverflow.com/questions/31430549/…
@Martijn know anyone that wants really cheap code reviews? :p
heya @Neal
@JonClements hi hi
12:45
@MartijnPieters I love how you’re talking to yourself like an angry old man.
@poke mutter mutter grump grump
:D
I'm just curious, has anyone ever run into a programmer or technologist that isn't aware of StackOverflow?
Like, in the past few years?
@AaronHall Pretty common in the scientific community. But designation 'programmer' may be a bit of a stretch for some users.
Yeah, I was thinking "technologist" would be overly broad too.
12:57
cbg!
Why wouldn't scientists google for stuff if they're trying to program something?
They call non-architect people who used autocad etc to design buildings "technologists"
Yeah, too broad.
@Aaron I wouldn't be surprised that a lot of people don't know what Stack Overflow is, but use it regularly.
As in, they google something and get an answer, not realising that all their answers are from the same site.
I don't see how you can use it regularly without the label starting to penetrate.
13:02
So if you asked them "What's Stack Overflow?" they'd answer "Some kind of error you get in programming." :P
I think you'd be surprised.
I didn't know what Stack Overflow was properly until maybe 4 months before I started contributing, before then it was just "I googled and got a website with an answer on."
I'm glad I'm not aware of those people, I'd think they're quite dense.
Yeah I guess all these Q&A sites start to look similar
Lol yeah Fizzy is pretty dumb.
Hence the physics PhD
Haha
Damn straight, if only I were smarted and did an MBA instead of my PhD.
8
"Back in the day", there were still about a trillion sub-standard sites for Q&A - and many of them still exist. Especially in other languages
Hell, apparently some people even use Quora for programming questions and answers.
13:04
I've known of SO for a very long time.
Good for you?
I used to contribute as an Expert on AllExperts.
Tax and Retirement Accounts
It's an About.com site
Yeah there was a time, when the site was popular, when saying "in experts exchange" struck fear into people's hearts for two reasons.
I had over 150 Answers, many of which I spent hours reading IRS pubs for.
I was very highly rated.
Now you can't find the material
it's mostly very outdated.
morning everyone
13:08
I'm thinking that Python on StackOverflow will have better staying power.
@Ffisegydd in all seriousness, a friend is doing an Executive (read: more expensive) MBA at Oxford right now and he can't believe how unintelligent a lot of the people are there, all C-level employees. I think it's genuinely not what you know, because from the sounds of it those people barely know anything.
Sounds about right.
I didn't even really know what an MBA was until Aaron mentioned his, repeatedly.
I knew that Bath did one, that was about it.
Fizzy, I think you took for an insult something that was never intended to be.
I didn't take it as an insult, don't worry, it just gives me an excuse to throw a few digs :3
13:11
ok, then.
dig away! :D
It's so hot outside :| think I am gonna move to the frozen tundras of the north
I will: your mother was a hamster and your father smelled of elderberries.
I'm in NYC, and I'm dreaming of Maine, or further North in Canada...
It's not too bad here, but as I'm cleaning an empty flat before moving out permanently it's still too warm D:
Python on StackOverflow will also have better staying power because I'll be able to keep my answers current.
13:15
Thank you for making Python on SO have a better staying power!
Yeah that sounds weird to me
(… whatever that is supposed to mean)
AllExperts didn't allow that. The questioner would choose you (usually multiple answerers, quite frustrating...), and once your answer was posted, that was it.
Usually the question was too specific to make sense to update anyways...
I guess this is why we have the recommendation close vote - libraries, like tax regulations, may well have changed after a few years
So to clarify, by "staying power" I mean that my answers will still be relevant five years or more from now.
13:23
What about Python 4?
That's why I'll keep them updated.
@Ffisegydd it's always fun to sing mmmba to the tune of mmmbop when someone talks about an MBA
You and me have very different definitions of fun.
13:26
But, kids, what's not fun is using an object where a subject is required! grammarslap
(mmba, ba ba mmba oooooh mmba)
dumb angular is being dumb again
my momma always said, dumb is as dumb does... :p
@corvid I wonder if it’s really Angular’s fault…
@JonClements My mama always said life was like a box of chocolates …
Nah, it's totally my fault, but I just enjoy complaining. Angular is good
Get ready for Angular 2!
13:35
@poke but is it better to be the chocolate that no one likes, or be one that gets eaten -- that's the question!
No, wait! It's time to switch to Polymer!
user559633
@AaronHall Oh cool, I live in Maine (if I can be considered to live predominantly anywhere really).
@RobertGrant but then I will have to figure out TypeScript :|
Is Angular 2 TypeScript?
@corvid If you’re writing JavaScript, then you’re already using TypeScript…
13:36
in the docs it advices to use typescript
That sounds unlikely
Oh yeah, that makes sense, because it's apparently way better
user559633
I like Maine, but Portland is much different than it was from my childhood -- much worse as it's gotten more touristy and people from Boston and New York start buying condos there. Too bad really.
But probably more from a correctness/intellisense point of view than because you have to
Oh.
Every line of JavaScript is valid TypeScript.
Oh really? I should use TypeScript. I'm on the fence with the current project if I should just use Angular 2.0 to be ahead of the curve though
13:42
Ahead of the Angular curve, eh?
a=[True,False]
not a
False
v2.x for any programming language is rubbish, you should be using Angular 3.
a=[False]

not a
False
Clever, Robert
Y so
a=[True]
not a
False
13:43
Because it's in a list
@VigneshKalai what did you expect
?
@VigneshKalai any non-empty list is True
not all(a) is probably what you're after?
>>> bool([])
False
>>> bool(['anything'])
True
List just evaluates to True; stop posting stuff to push all the chat off the screen
13:44
Totally forgot that behavior
Thanks all
SO it checks if list is empty since it isn't returns True so it is converted
Thanks a lot
Actually that Q isn't the best example D:
My boss really likes javascript. Should I try to convince him we should use python for a build process?
Is there a big python build ecosystem?
Depends. If you think python will do a better job then yes, if you just want to use python regardless then maybe/maybe not.
user559633
@AaronHall I think the difference between programming answers vs real estate answers is that technology can be relatively versioned (e.g. Python 2.x with X data) as opposed to laws and policy trends, which are less scientific and timeless because they're just the result of peoples' opinions
13:49
@corvid Probably not.
@VigneshKalai The conversion takes place when the not operator is evaluated. Before that, almost all values are treated, in a Boolean context, as True - excepting [], numeric zeroes, (), None and False (partial list)
user559633
@corvid Opposed to what? Some pre-built software or some custom nodeJS thing?
So no conversion is needed
Custom node.js shenanigans
The best type of shenanigans.
13:52
Yeah but if you're using grunt/gulp whatever it is then at least it's a build system that you're using, rather than a totally custom thing
user559633
@corvid Unless you plan on sticking around this job for a long time, bickering over languages with your boss isn't worthwhile.
@Ffisegydd My favorite is shenanagrams.
it's for turning a Node.js application into a desktop application currently
@holdenweb thanks mate
Obviously, not (anything Truthy) has to return False and similarly not (anything Falsey) has to return True
14:05
I figured out how to solve it, posted as answer. Thanks for your help, appreciate it. — cbll 8 mins ago
FML. That’s what I wrote in my answe too >_<
Sauerkraut and sausage, y'all. It's a wonderful Python day.
I have three file names: 'test_file', 'file_test' and 'test_file_test'. I want a regular expression to match only first 2 and not third.
user559633
@user1065000 It's important to want things. What have you tried and where are you stuck?
a = "test_file"
b = "file_test"
c = "test_file_test"
matchObj = re.match(r'![_test]|![test_]', a, re.I|re.M)
if matchObj:
print ("Three", a, "matches")
@user1065000 Search for "negative lookahead". That'll show you how to not match the third.
14:23
matchObj = re.match(r'test_(?!_test)', c, re.I|re.M)
if matchObj:
print ("Three", c, "matches")
Tried this, it's not working.
user559633
Stars are not for personal bookmarks.
Haha, the chat.stackoverflow UX rears its ugly head.
@user1065000 Do you want a regex that only matches 'test_file' & 'file_test' but nothing else?
@PM2Ring Right, I want to match 'test_' or '_test' but not both in a string. They can be anywhere.
r'(test_file) | (file_test)' =)
Mind if I ask what it's for? This is a weird request.
14:30
@QuestionC This is not what I am looking for. the keywork file can be anything.
Was a bad joke.
@QuestionC I have a set of files, i want to sort with some keywords and those 'all' keywords need not to be in one signel file name.
I'm asking because there's edge cases like test_test or _testhahatest_ that make the problem hard.
Right I also don't want them to include. I want test_ OR _test to be fetched. If they are both there, I don't want to fetch.
@QuestionC I hope I made it clear. Right??
Interesting, Python has no case statement. I'm still in the fun part of learning a language where it can surprise me.
14:38
@WayneConrad Yeah, that's my one complaint with Python.
I much prefer CASE to a series of IF ELIF.
@WayneConrad There is way more to come. You will be in love with Python once you learn it.
IF ELIF isn't the analogue to CASE.
Dictionaries of functional objects are.
Which is I suppose bad in its own way...
I love storing functions in a dict. Neat little use case.
@Ffisegydd Yeah, it is pretty nice.
user559633
@Ffisegydd Yeah, i really like it for a function lookup table -- cleaner than case IMHO
14:43
Why Doesn't Python Have Switch/Case?:"T‌​o me, that Python forced me to accumalate lots of practical experience with mappings is a blessing in disguise. The constraint of not having switch/case statements allowed me to create approaches and ideas I may not have developed with it."
I just love hash maps in general.
I'm so cool.
In a geeky way... ?
5 years BP (before Python): IntrepidBrit hated HashMaps
1 day AE (after englightenment): IntrepidBrit loves Hashmaps
@QuestionC Were you able to find a solution for this?
Mainly because other languages made such a bloody hassle of them, back in the day.
14:45
I'm at the office, and the sky is rumbling... What a day.
From a list ['file_test', 'test_file', 'test_file_test'] I want to match only 1st and 2nd. Don't want to match 3rd. Can some one help me with a regular expression for that? The keyword file can be anything as well.
@user1065000 Honestly man, I wouldn't try to get it all in one regex. I'm sure it's possible but it's the kind of regex you spend 10 minutes figuring out and once you're done noone can understand it.
So, a regex?
@QuestionC Oh, now you've done it. Now I want to work out the regex to try to prove that it isn't that bad. :)
@QuestionC Yes, that's true. But I want to give it a shot !!
14:49
Oh, that's totally different. Let's summon some elder gods with regex then.
@tristan They were more tax and retirement account answers, which have details that vary yearly. "I make X, how much can I put in my IRA, and what are the alternatives?" Answer, "Y for 200Z, you can do A for B account in 200Z too, IRS pub blah blah blah..." and since everyone's done their taxes for 200Z & finalized their (con|dis)tributions for that period, those answers have zero relevancy today... Too bad.
:24468154 That fails to exclude test_file_test
4427
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

no, it excluded that, but it allowed test_test and also didn't generalize file
what if the file is called "file_test"?
Honestly, regex is not the right tool for this job
Too much of the requirement has scrolled away, and my poor memory doesn't do well with that :( Here's where I need a real question with examples of input and output.
14:55
oh, I only saw the last message with the example
@davidism Right, I want the file parameter to be generalized as well. file can be anything.
As QuestionC said, stuff like 'test_test' makes it tricky to do with one regex. I'd recommend keeping it simple & doing it with 2 regexes.
@user1065000 what if the file has the word "test" in it?
Right, I also think this is the way to do.
Or don't use regex.
14:56
@user1065000 don't use regex. It looks like all you really want to do is if name.startswith('test_') or name.endswith('_test'):, or some variation to check if it doesn't do both at the same time
Bearing in mind you're saying "but I want to do it this way" and then having other people do it for you :P
@Ffisegydd Let's make it simple. I want to match either 'test_' or '_test'. If both are there or none of them is there I don't want it to match.
Ok, this is just for the first case.
@Ffisegydd Brilliant!
test_\(.\(\(_test\)\|\(test_\)\)\@!\)*$
That's also vim notation, but the only tricky part is that \@! marks the preceding token as a 0-width negative lookahead. I hope python has that?
14:59
@QuestionC I think it's better to make it simple. Use two regx and I should bt good to go. Thanks for the help.
OH NO, WERE RIDING THIS CLOWNCAR INTO HELL
4
My code has to be simple because I am simple.
I just need to look up python regex notation.

« first day (1733 days earlier)      last day (3440 days later) »