« first day (1361 days earlier)      last day (3812 days later) » 

00:02
err...
why?
anyway - bed time... rbrb
00:59
Hello guys
Anybody know a algorithm to transform a list into a multidimensional dictionary?
Example
['[document]', 'html', 'body', 'footer', 'div', 'section', 'a'] into { '[document]': {'html': {'body': ...}}}
will each dictionary only have one key?
No
For example
```
['[document]', 'html', 'body', 'main', 'nav', 'a']
['[document]', 'html', 'body', 'main', 'nav']
['[document]', 'html', 'body', 'main']
['[document]', 'html', 'body']
```
Will be inserted into the same dictionary
I've tried somethings
I will send in Gist
I'm trying to transform BeautifulSoup HTML content into a JSON structure or Graph
I don't know BSoup, but shouldn't it have a function that does it for you?
I've tried Python zip, and list functions, but don't work
hmm
@BrunoAlano what I would do it get a list of a tag's children, and then make keys for each of them. Then iterate through the children, making current the respective dictionary for each tag, and repeat the process
01:17
But I don't have idea how to do that
I don't know, maybe I need sleep a little bit
hang on a bit
"Python is now the most popular introductory teaching language at top U.S. universities" http://cacm.acm.org/blogs/blog-cacm/176450-python-is-now-the-most-popular-introductory-teaching-language-at-top-us-universities/fulltext
def foo(tag):
    current = {}
    for child in tag.children:
        if child not in current:
            current[child] = foo(child)
        else:
            current[child].update(foo(child))
        return current
what also might be useful is collections.defaultdict
so you can do:
@Volatility thanks dude, what tag is?
from collections import defaultdict

def foo(tag):
    current = defaultdict(dict)
    for child in tag.children:
        current[child].update(foo(child))
    return dict(current)
@BrunoAlano foo is recursive, so tag would be the top level tag (ie html)
I don't know how you would get the tag in BSoup though
01:28
Ok, I will try here and say to you later... Thanks (:
01:50
Ah, I'm having problems to implement using BS4
02:21
school is weird. Had to apply for financial aid to get a job at school, seems kinda like a weird system
 
1 hour later…
03:22
Morning!
scrappy vs nutch. If I want to scrap structured content from lots of websites. Say 100. Is nutch better or scrapy. I am experienced with scrapy. I am just curious with nutch.
03:41
I'm not familiar with the web scraping libraries to say which is better, but why change if Scrapy works for you?
cbg
04:15
Newbie question: What exactly does it mean to dump output to /dev/null , like in this question: stackoverflow.com/questions/3857052/…
It just means you don't care about the output, so instead of writing it to the terminal, write it into the void
Figured it meant something like that. Thanks for the clarification
Writing to the terminal is very slow compared to writing to a file, or to null.
I've noticed
@davidism I found scrapy dont work well if you have lots of sites.
04:28
Have you tried the suggestions in the docs: doc.scrapy.org/en/latest/topics/broad-crawls.html? Are you sure it's your program that's slow and not the network requests?
 
1 hour later…
05:50
Cbg all
06:04
@Ffisegydd STEWIE!!!!!!!!!!!!!!!!!!!
@Ffisegydd I made an update to the meta post in line with what I think you're thinking...
Yeah I saw. I wasn't originally thinking of flagging for one "suspend" but maybe it's best. That way the mods are still involved "all of the time" which probably makes it more likely to succeed as a
Also @Jon BRIIIIIIIIIIIIIIIAN!
I was thinking it keeps them in the loop - as it's a pretty desperate measure and should probably be brought to their attention regardless...
So all we're doing is swapping the flag and suspension order around a bit
wb again @holdenweb
And 4 hours is a perfectly reasonable amount of time. It also means it won't be used as a "time-out" for people along the lines of the JS-style "remove write-access with Caprica Six"
06:15
I think it's enough time for a channel to stop abuse while giving enough time for a mod to intervene
To be honest I'm still not sure when to flag people in chat. It's not as well defined I don't think? Because should you flag someone if they're being disruptive to the chat? What if they're not being offensive/rude/whatever? Is it still flaggable? Being disruptive on the main site it's easy to just ignore them (close the post) but on chat it's more difficult.
chat tends to have a lot of interleaving context
People can be disruptive without intending to be for instance
Heh the other week we had someone come in and shout at me, Kevin and davidism for talking about off-topic things and not Python :P
Someone completely random.
that's nice? :p
They told us to "take the offtopic chat to Facebook"
06:19
So in the event of someone that needs to learn the ropes, we talk to them and explain why their behaviour doesn't fit and how to correct it
Flag if you know someone's intent is to be disruptive...
@Ffisegydd were they hoping to get people on there so they could actually try to add at least one friend? :)
@Jon yeah I see your point. I think in the past I'd be hesitant to flag even if someone was intentionally being a bit of a troll.
"Dear Diary - I know I'm a sad troll, but this new year... I will try and get at least one friend on Facebook"
And possibly? The amusing thing was that people managed to get him into an off topic conversation about something then everyone told him to take it to Facebook...he didn't get it...
@Ffisegydd damn it... why am I always afk when these funny moments occur :(
While you dog's away, the cat's can play.
06:24
Awwww, but the cute yellow puppy likes fun too... sniff sniff
The post is onto the hot meta posts bulletin which is good
Should get more views. I'm surprised at the lack of comments.
A lot of people aren't interested in the chat system/even know it exists
But you'd imagine that the people on meta are more interested in it than most as they tend to talk a lot :P
I'm fairly sure it's been asked in some guise before regarding access control and such
Or there's just some lethargy about "the chat system never has anything done to it" so why bother....
I mean they allow JS to do what they do, so they've got no ethical ground to oppose it as such. But they might just say "not a priority..."
06:32
Shouldn't you be getting ready for work?
Definitely maybe.
Okay... don't go getting all Oasis on me
Good band. Much prefered Morning Glory to Definitely Maybe though
Do you know what’a hilarious? Not setting an alarm to have a lie-in. Waking up and thinking “I should get a shower”. Coming back from the shower and realising it’s 6.30…
06:47
I'm missing the hilarity... thought that was just what workaholics did :)
(Oh and I usually don't have to get a shower until 0730 at the very earliest)
It's what crazy people/canines do.
Bet you haven't driven 50 miles on the M25 to work before realising you didn't put trousers on before leaving the house...
4
Dogs aren't meant to wear trousers...
I had a very important meeting with the board... had to try and dress human
07:35
Cbg!
@JonClements I tend to put trousers on during the process of getting up
I was in a rush :)
Was too busy checking the tie and suit looked okay
And you want to know what the clincher is?
The meeting was on a Tuesday, and I did this on a bank holiday Monday
I also once got "slightly lost" going to a company weekend out
What should have been a 20 minute and 8/9 mile journey ended up at about 6.5 hours
07:55
@JonClements - since when did the concept of "suit" stop including trousers?
@holdenweb of all the times you choose to talk, you pick me up on that?
I put the shirt/tie/jacket on first, then the trousers
I just kind of got distracted
and forgot the last part
08:16
Hey, I just couldn't help laughing. Fortunately your choice of day meant there was no unmanageable fallout at work!
Though I must say the prospect of coping with 50 miles of M25 each way would have me looking for another job immediately.
Speaking of which, what's the contract situation like in and around London nowadays?
umm, difficult
very competitive
Knowing people and knowing a few markets really helps though
If you've got the contacts, then you can pretty much get a role... if you don't... then, well... it's pretty much a no-go I think
if you're looking for something, I could probably put in a word?
09:02
@Crow Crow!
@JonClements thanks. Not looking right now, but thinking about next year so time to make contacts (I've been in the States for about 20 years now). I do already know a few people in the Python world
I suspect you do given your reputation in the "Python world" :)... I'll leave the offer open for industry contacts though :)
Awesome track...
cbg all
@holdenweb: hi there!
Welcome to the Python room. :-)
There are quite a few aggressive recruiters active in the London area. Not ideal, most of them are weasels.
09:45
Seriously, The National are cool
@MartijnPieters cbg :)
still on Skype?
grumble bloody parcelforce grumble bloody customs tax grumble
@JonClements am now.
£15 customs tax (which I'm happy (well not happy but you get what I mean) to pay) but then Parcelforce charge £14 for the privilege of them charging me the customs tax! When I've already paid delivery for it! grumble
10:07
cbg
I have: /home/www/project and /home/www/project/test_git. How can I move all content of test_git catalog into /home/www/project ?
...cp?
Or mv
(if you're looking for Python approach)
Oh. Yeah. Python...
10:17
@MartijnPieters Hi there! Yes, sadly in my experience most recruiters are weasels.
There are a few that are 'smarter' and actually understand tech, but they are few and far between.
@mamas you want to move a bunch of files and still retain their git histories in the repository?
@MartijnPieters I'd rather not use a recruiter if I didn't have to (haven't used one for forty years ...) and am really looking for contract rather than full-time.
So far they've come up with just one interview, and I wasn't exactly thrilled with the place (startup in London), it gave me more conviction to not accept any positions in central London that require a daily commute.
@MartijnPieters Are you London-based now?
@holdenweb They do plenty of contract stuff.
I am north of London, Cambridgeshire.
Cambridge has a lot of contract work too, mind you.
10:20
I'll be South of the Smoke, in Chislehurst, so a daily commute into London would be possible for the right opportunity
I don't have that many contacts yet myself either, having only been in the UK for just over a year now.
Hi guys. What should I do with the flag?
Now that I am able to talk, may I know the reason? I even contacted the SE team from the footer link but they didn't reply -_- if there's a mod or something I want to talk with you now
I am not partial to all the details, but you were asked to stop pushing about the DDOS, and a room owner asked a moderator to further investigate. The moderator decided to suspend you for 24 hours, you'll have to ask the community team about that. You'll have to be patient about getting a reply there, it's not as if weeks have passed.
It's ok, I stopped talking about the "DDoS" long before I got suspended. What you read in that comment was nothing more than an angry rage because of the suspension.
10:32
Your username and your general behaviour are seen as disruptive as well. Please do respect the room culture and stop when asked to stop.
10:44
Thanks!
Cbg all :)
11:05
@stupidtroll I might add, as a relatively new denizen of this forum, that your username doesn't inspire confidence ;-)
@holdenweb: He has been suspended for 30 minutes because a message was flagged. It's an automatic process, like closing a spam post, no moderators involved.
He has admitted to regretting the name change. Normally you are stuck with your display name for 30 days.
When they come back, I can help with a work-around for that.
Okey dokey
11:22
cbg4all
@PeterVaro: cbg, Peter!
@holdenweb: I see some recruiter is urgently (ahem) looking for a Django dev in London. But the contract is rated at 350-400 per day, 6 months.
My assessment: they are looking for a junior more than anything.
I'll keep an eye out for more interesting posts.
Especially at London Prices
Potato is also always looking for Django devs, but when I last talked to them they were offering way too little compensation to be interesting.
That was a while ago, they may be more flexible now that they've been posting for positions for a longer time maybe.
The list I can see is all recruiters, however. Sometimes a position is posted from the actual HR department, I'll keep you in mind when I see one.
11:42
is uploading images to chat has rep limitation? (other than the 20 to get write access to chat?)
11:53
I don't think so.
@MartijnPieters melon for the information, good to see 400 is a low rate (I am shocked at British prices nowadays!) By all means keep your eyes peeled, but remember this isn't an urgent (or imminent) requirement for me.
Cabbage!
Anyone has experience doing two-way communication with a process using Popen? In Windows.
12:08
In the past I've advised people to use pexpect for such communication instead.
@MartijnPieters Thanks, I will check that out.
Not sure how well Windows is supported, of course.
Any idea why even this would block?
ftp = Popen(["ftpshell.exe", "host.net"])
Hmmm, Windows not supported, except "it may work" using Cygwin.
12:41
which one is correct: "in file: ... at line: x" or "in file: ... in line: x" ?
@MartijnPieters okay.. thanks..
I'd prefer "at" there
@PeterVaro I think that both could conceivably be correct but I prefer "at" though it depends on the sentence.
"in" would work, I think, provided the subject is contained entirely on that one line.
I prefer "at" too :D:D
@Ffisegydd I'm generating error messages..
Actually I'm gonna retract my vote and go for "in" :P
12:45
Or drop the "in" and "at" entirely and do what Python does: 'File "X", line Y, in <Z>'
just not to conform?
@Kevin I thought about that
"In file example.txt, line 23" is understandable
this is what I have:
CUTT: Some tests (1 / 2) failed:
CUTT: in file: 'main.c' at line: 7: '1 == -1'
13:21
Can I make standalone executables in python?
Of python scripts
For windows.
cbg BTW
stackoverflow.com/questions/5458048/… @Ufoguy I typed your answer into Google, word for word, please consider doing some research before asking.
I think I might start adopting @Kevin's 15 minutes idea...
@Ffisegydd what is Kevin's 15 minutes idea?
Also, cbg :-)
By the way, I did search the transcript ;-)
That when someone comes in and asks something so simple that it's obvious they haven't bothered to Google anything and instead they're just being lazy... you wait 15 minutes before replying :P
Yeah me too (searched the transcript)
The transcript?
Wha?
13:33
Ah. Yes, good policy.
@Ffisegydd Didn't you know? SO is recording everything you say (italics = ominous voice)
Oh I get the joke now. I'm too tired.
I've ordered some CDs by the Earthbound Papas from Japan and they'e coming tomorrow and I'm super-duper-psyched.
Hi!
I am a newbie to python sleekxmpp
i want to get presence of user by his jabber id..
how should I achieve it?
@jayshahagile welcome to the chatroom. Have you considered writing a question on the main site? While it's possible (albeit unlikely) that someone here knows how your library works, you'll find a much bigger audience if you put together a full question.
yes i did
but got -2
votes
So you deleted it?
13:44
sadly yes! : (
Did you make an attempt to improve it?
(Rather than deleting it)
no! sorry!
The fact that it was downvoted would suggest that it was a poor question to begin with. You could undelete it and then attempt to improve it, hopefully it'll get some attention though.
Be careful though, if you ask a question which is literally "tell me how to do this" or "write this code for me" then no matter how much you "improve" it, it'll still be downvoted.
SO is not a code-writing service, we expect you to come to us with your coding problems, not come to us to write code for you.
13:46
yes sir!
any one knows about sleekxmpp?
ever used it?
@jayshahagile you've asked your question in here and no one has replied, please don't ask continually/spam the room.
It's also worth knowing that if you make a habit of asking bad questions then deleting them, you might get banned from asking more - better to try to improve them, if that's possible.
i was confirming!
good bye!
13:48
Well it very much sounded like you were spamming the room.
beg pardon!
have a nice day ahead! :)
thank you for your support!
@jayshahagile this is also worth reading :-)
@Zero maybe we should put together a wiki post full of useful links as well as useful comments.
@Ffisegydd I forgot to use google again
lol!
oh well
It's not really a laughing matter.
13:50
I've never heard of sleekxmpp but it took me less than 30 seconds to find github.com/fritzy/SleekXMPP/wiki/…
It's you taking advantage of the room, and eventually people will just stop responding.
i tried mechanize questions and they really didn't work
arr me mateys, how does one set the system default of which python to use? I just installed ubuntu and it came with version 2.7.6 and 3.4 and I wanna use 3.4
you don't, the system default is that way because the system depends on it
So my subconscious thought this might not work too
13:50
Crow: you don't, unless you want to break your system. Just type "python3" to run python 3.
Actually, just skim-reread the etiquette page ... we could probably do with a bit in there along the lines of "if nobody answers your question, it means they don't know / are too busy to answer. Please don't keep repeating the question; you'll just annoy people".
(or use Arch linux; they're happy to break your system for you!)
can I export python to be python3 in my bash_profile, or will that break things as well? I imagine my user does not effect the system
@Zero I'll add something now, do you have any particular idea for the wording?
@Wooble huh, my system's still working after 5 years...
13:55
@Ffisegydd Hmm, let me think for a couple of minutes ...
Every body here seems to like flask
Any django users/
?
I guess that nobody does!
I used django once or twice, didn't really care for it too much
anybody here up for library discusions
Everybody suggest some libs that you use and are not very popular
Sure; pymarc is great for dealing with library catalog data.
(wrong "library"?) :)

« first day (1361 days earlier)      last day (3812 days later) »