« first day (2196 days earlier)      last day (2768 days later) » 

12:01 AM
Anyway, In this case, I agree -- Definitely better not to use eval.
 
12:28 AM
is vanguard any good for investing?
 
since I had to look it up. I can't give an opinion :)
and I don't even know if I'm looking at the right thing
 
Can I interest you in the "Kevin's Mattress" investment plan?
 
12:45 AM
can someone help dupe hammer this with this
(if you agree)
 
1:02 AM
Why is this answerer doing this? stackoverflow.com/a/40143850/1832539
Flat out homework dump....Can this be flagged?
Because I just taught this kid more python than his teacher. Why does it bother you? — kpie 28 secs ago
....
 
1:18 AM
@idjaw they are on topic don't forget
 
@enderland what do you mean?
 
this convo has come up alot and homework questions are basically good for on topic
@corvid yes. they have the cheapest index funds out there, though fidelity is close
 
@enderland nono...It's not just homework. This is a copy-paste of an assignment
VERY different
very very different
 
1:49 AM
good it's gone
 
2:14 AM
howdy folks
 
hi
 
could anyone tell me why re.match(r"\\", r"\\") returns a match but re.match(r"\c", r"\c") does not?
(Python 3.5 btw)
 
no, @DirtyPenguin. Thats interseting
isn't \c not an escape character?
 
I'm not sure, but the behavior is reproducible with other letters too.
 
yes. The first param is a regex, the second is a string literal.
 
2:25 AM
raw strings use different rules for escape characters
 
i see.
 
hold on
 
for example re.match(r'\D', '\c') works.
retuns an object
 
so, the 1st param is "the \c regex character" whereas the 2nd param is a literal "backslash + c"
 
correct.
 
2:28 AM
(even if \c is not a valid regex char)
 
yes.
 
gotcha
thx :)
 
>>> re.match(r"\\c", r"\c")
<_sre.SRE_Match object; span=(0, 2), match='\\c'>
look carefully at how the match came out
\\c
 
yep, thx idjaw
 
np :)
 
2:29 AM
When using relationships in Django, which model should have toe relationship (ForeignKey)
 
not a django person sorry
 
@Corgs you should define the ForeignKey in the secondary model
 
What defines a secondary model?
 
```
class School(models.Model):
name_of_school = models.CharField()

class Student(model.Model):
name_of_student = models.ForeignKey(School)
```
hmm, the formatting didn't quite work, but I think you get the idea.
In this case, 1 school can have many Students.
 
So if I have a User model and Movies model, it should go in the movies model?
 
2:33 AM
if you want to keep track of which user created the Movies object, then yes.
 
but won't that have a cost when querying the db? If you have a hypothetical Netflix style app?
 
You're using the Django ORM, and you're worrying about performance?
 
Django won't query the DB multiple times: docs.djangoproject.com/en/1.10/topics/performance/…
 
Yes, of course adding more data will take longer. It will not take appreciably longer, unless you're actually Netflix-sized and didn't tell us.
 
I'm not. just hypotheically.
 
2:36 AM
Sep 8 at 14:37, by davidism
Aug 26 at 14:54, by davidism
> Will running more code be slower than less code?
All this has happened before...
 
@davidism no, if less code is calling a slow function :p
 
Alright. Thank @DirtyPenguin, @davidism I realize how silly I have been. I thought that relationships worked differently than the actually do, glad I go that fixed.
 
@Corgs np :)
 
 
2 hours later…
4:38 AM
What should I do? someone is downvoting me and telling me my code is wrong and he's obviously wrong stackoverflow.com/a/40145198/1192111
 
Looks like it solved itself, but you should really explain what an answer is doing and why it solves the problem, rather than just dumping a blob of code.
 
@FranciscoCouzo The commenter cannot remove their downvote because it is locked in
I was wrong. Apologies. I am trying to remove the downvote - but I cant't unless the answer is edited :( — volcano 2 mins ago
They want to remove it. Which means you have to edit your answer.
Once you do that, let them you know you edited and they can remove the downvote
 
5:33 AM
cbg
@FranciscoCouzo upvoted
@FranciscoCouzo they invited you into a chatroom
anyway, the proper solution is to ditch the xrange (which is python 2 anyway, bleh) and use itertools.islice
wat?!?
Trumpler ftw
 
6:35 AM
cbg
 
cbg
hows IljaCorp today
 
All's good
Possible 1st client interview etc. today
 
7:10 AM
cbg
have an online exam
 
7:28 AM
@R.A.B.B.I.T We're starting to make use of AWS VPCs and EMR clusters. We need short-term help to climb the learning curve and establish solid, sensible architectural plans
 
 
1 hour later…
8:44 AM
cabbage
 
8:55 AM
Cbg.
 
9:07 AM
Hello Everybody
Just barely unlocked chat , Decided to join the community yesterday lol
 
is it cheating to write a script for tedious calculations ?
 
That's pretty much the point of writing scripts, no?
 
@holdenweb this was an online exam
it was meant to be written by hand in the first place
but well
 
hi all,
How do I get process PID from multiprocessing Pool?
 
I'm new to python myself so i cant help much there...
I'm still stuck on Webscraping
 
9:22 AM
@Xploit It's ok, Python is just one of 1 million topics that we talk about here.
 
Ahh okay , So we can go off topic lol
 
@Xploit I won't take responsibility to answer that question
I will leave it to room owners
 
morning all.
So tired I think I may just die. :(
 
Haha okay & Goodmorning its actually 2:24 here
2:24 AM*
 
9:26 AM
#coding:utf8
 
cbg
 
Just read the whole page , Thanks
 
Morning
seriously, I need to stop investing so much time into my SO answers
I end up deleting them waaay too often
 
> True reputation comes from simple noob questions
-- Alber Einstein
 
9:47 AM
true
 
I've had about 100 rep in the last fortnight from an SQLite answer that amounts to 'turn it off and back on again'. :D
 
cbg \o
 
Morning
 
haha, my profile shows that the newest answer was given at Sep 1, however since then I've posted and subsequently deleted 6 answers
okay, I'll stop
 
9:55 AM
one of those bullshit but funny gifs
 
Oh, Kevin! Stop going on vacation.
 
If Kevin didn't go to vacation, it wouldn't reach the heroine stage
damn
 
Yeah that gif should stop long before it does
 
@vaultah: :-/
 
@RobertGrant lol I actually didn't watch it till the end before posting
 
9:59 AM
It started out as something I could send round to the team and delivery leads, and rapidly stopped being that :)
 
:D
 
Hi all. Could anyone give me some advice regarding this issue I've posted? http://stackoverflow.com/questions/40041697/pythons-sysloghandler-and-tcp. Is about SyslogHandler and RFC 6587.

Thanks!
Nice gif btw xD
 
@idjaw: sorry, but homework is not something that requires moderator intervention, so don't flag those posts.
Vote down, and if off-topic, close as such.
 
damn I need to change the flask-admin buttons so that the save buttons everywhere on user forms redirect to the userlist but would highlight the newly created user
 
10:15 AM
Flask? You should try pyramid.
 
@RobertGrant I am trying pyramid
 
Damn straight.
 
10:33 AM
@cabreracanal: I know that syslog is pretty much a wild west when it comes to standards.
and the RFC is from 2012 (relatively recent), while the Python logging module is a lot older.
 
(I once implemented syslog support for a security product)
 
I see. This is what I've done. I've subclassed the SyslogHandler to make it work with Fluentd. However, to me is strange that in the docs it's said:
"To open a TCP socket (for use with the newer syslog daemons such as rsyslog), specify a value of socket.SOCK_STREAM."
 
at any rate, the Syslog support in logging has been been unaltered since the first commit to the Python repo.
and that was in 2002.
 
And I've tried sending a simple message and rsyslog didn't print anything until I've put a \n or the octet counting
 
10:39 AM
and the package predates the inclusion in Python, the copyright headers suggest it was at least 1 year older.
 
Ok. Maybe it'll be possible to suggest an upgrade?
 
Python is open source, contributions welcome!
:-)
 
@MartijnPieters the suspension is on the way, I suppose? :p
 
Just keep it backwards compatible.
 
2002 Code! That's some legacy code there
 
10:40 AM
@vaultah yeah, totally, for not daring to compete with me! :-D
@BhargavRao Hey, I started with Python in 1998..
so I remember things like the logging package being added ;-)
 
Haha, In 1998 I was starting my first ABC lessons (I was in Kindergarten ;))
 
ha, the original docs for logging state that the syslog code is based on this: nightmare.com/squirl/python-ext/misc/syslog.py
Which dates from 1997..
 
Computers were never heard of, in my place in 1998 :D
 
Ok. Thanks for the info Martijn
 
sP_
Hello people, I'm looking for an internship. How should I go about it?
 
10:43 AM
Find a company, apply for internship, rinse and repeat?
 
@sP_ First, find a ship that sails internally. :P
3
 
@thefourtheye Lol, They came to B'lore in 1980 ;)
 
sP_
I'm looking for something with machine learning and python if possible. I don't even know what companies do that.
 
@sP_ where are you based?
 
@thefourtheye my GSOC student learned about computers mostly from books, until about 3 years ago. He's from Jammu and Kashmir.
 
sP_
10:44 AM
@BhargavRao I'm fine with B'lore ;)
@Withnail India
 
(Sounds like FizzyCorp's street. Where is Fizz anyway?)
Ah, I'm at the point of maybe needing someone, but it's in London and needs to be on site for reasons that are too tedious to describe.
 
sP_
@Withnail Oh, what are you working with?
 
@MartijnPieters Same here. In my 11th standard, we had a computer science lab, but we had no computers because of some funding problems. So, we used to write HTMLs in papers and get evaluated by our class teacher :D
 
Damn, I must be lucky then. I started using computers in 4th standard when I wrote my first Logo program.
90s is a good time to be born @thefourtheye ;)
 
I was born in the 80s :D
Late 80s, so I am still young, according to Indian standards ;-)
 
10:48 AM
Hmm, In our school, we had computer sciences with labs from 2001.
 
sP_
@BhargavRao We're of the same age and the difference I see is so huge!
 
@sP_ You were born in 94?
Hehe, In other news, The LQP Queue has soared to 750+ in last 3 days ;)
 
@cabreracanal Summarised and added some more details as an answer.
 
sP_
@BhargavRao 95
@BhargavRao I'm in final year engg, you too right?
 
Nope, I'm working. :)
Hmm, Why are you looking for an internship? You could've looked for a job.
Try SO Jobs.
 
11:04 AM
I used to go to the computer classes on 2, 3 rd std summer holidays .. Some of the courses I have learned on those days are MS Office, Lotus, etc..
 
sP_
@BhargavRao I'm in my 7th sem currently. So planning to spend my 8th sem doing internship somewhere, preferably Mumbai!
I spent most of my childhood debating DBZ on Orkut! And people from my class(most of them didn't have computers) used to think I was some kind of computer wizard :P
 
@MartijnPieters Thanks for your answer. I think the code to adapt the handler to RFC 6587 is simple. For now, I'll extend the class with the new functionality.
 
@AvinashRaj Lotus? You mean IBM Lotus?
 
@sP_ Send me a mail (my mail ID is there on my website) with your resume if possible. I don't wanna clutter the chat. :)
 
sP_
@BhargavRao Sure!
@BhargavRao I've sent it. Check whenever you're free.
 
11:13 AM
Microsoft are terrible
why can't they make skype work
 
sP_
What's wrong with skype?
 
Lotus 1-2-3 is a discontinued spreadsheet program from Lotus Software (later part of IBM). It was the IBM PC's first killer application, was hugely popular in the 1980s and contributed significantly to the success of the IBM PC. The first spreadsheet, VisiCalc, had helped launch the Apple II as one of the earliest personal computers in business use. With IBM's entry into the market, VisiCalc was slow to respond, and when they did, they launched what was essentially a straight port of their existing system in spite of the greatly expanded hardware capabilities. Lotus' solution was marketed as a...
 
@sP_ It's like a beta release of a recent college graduate
I am talking about the Linux and Web versions
 
@sP_ Sure, I'll send you a reply by night.
 
@sP_ what is right with skype?
that you can sometimes successfully do video calls between some parties somewhere, subject to limits, and sometimes can even send chat messages through...
 
sP_
11:22 AM
@AnttiHaapala Haha, I use it sometimes to talk with my family. Works fine!
 
yes...
 
it works fine if you are on windows
 
... and compared to the skype of 10 years ago it sucks donkey balls
 
WHEN I WERE A LAD
 
android version is bad too. Slow and bulky
 
sP_
11:23 AM
So which software/app do you use for video calling?
 
@khajvah tell me about it
 
@sP_ skype
I use Signal with close people(whoever I can convince to switch).
 
skype, facebook, acano, video calls by phone sometimes, google hangouts
skype is by far the worst
 
sP_
@AnttiHaapala Which one of those do you think is the best?
 
video calling is overrated
 
sP_
11:25 AM
And has anyone tried Duo?
I heard it's good. Haven't tried it personally yet.
 
@khajvah negative, the acano/SIP with big tv is rather nice for working with a remote partner
 
never tried it
@sP_ Google is better than microsoft
but who knows
 
sP_
Haha, yeah! It took me almost a month to teach my mom how to use Skype! So am not planning to start with Duo now..
 
It's a bit of a sad state of affairs that there are no open video call solutions that work on both OSX and Linux :-/ Only stuff like Skype.
 
Oh I dunno, I think chat roulette worked quite well across all OSes
 
11:37 AM
Google hangouts?
Not open, but widely available on browser platforms
 
@holdenweb Yeah, there are alternatives, but all closed AFAIK. In theory XMPP with video should work, but I couldn't get it to work due to codec mismatches and shitty clients
 
A chat solution ala file.pizza would be awesome
 
11:50 AM
It definitely exists, I just don't remember what it's called
 
Does python allow to define new "-like symbols? And how to do this if possible? For example, i want $somestring$ will be equal to 'somestring' and "somestring"
 
@Carpetsmoker what about simultaneous twitch stream broadcasts? Oh, still not open. Otherwise that'd have been perfect.
 
Isn't Twitch some gaming thing or something?
 
@Carpetsmoker tox
the biggest problem with tox is battery drainage on phones because of its p2p nature
 
@MaxLunar ...why?
 
12:00 PM
Tox looks interesting ... don't really need it now anymore though, but it would have been handy a few years ago when me and my girlfriend were living in different countries...
 
@Carpetsmoker it became usable only lately
it's still buggy thoug
 
What about matrix / riot?
 
I test it out from time to time but it's still not done
@KevinMGranger is it open?
 
@MaxLunar if you are asking whether Python code can modify the syntax of the language, the answer is "no." Though you can re-purpose operators by redefining various "magic" (dunder-named, e.g. __init__) methods in your classes. But the syntax is set otherwise, making it impossible to change the syntax of literals
 
12:09 PM
Matrix is the fully open protocol, riot is the most popular FOSS client implementation
 
@KevinMGranger ah found the right link
 
If you're asking because you need to nest a lot of quotation marks, then use triple-quotes: """This contains "quotes" just fine!"""
It's not quite as distributed as tox-- it's a little more towards the federated side of things. But it's also ready to run right now.
 
@KevinMGranger We are moving to slack
at work
 
:(
We set up a rocket.chat instance internally here. It's been working well for us. FOSS ftw!
 
12:19 PM
@KevinMGranger do I have to self host?
 
Nope, they'll host for you for a price. We're self-hosting for data privacy reasons and to tinker with it.
 
@MartijnPieters Yeah. It was Bad judgement. Sorry.
@AnttiHaapala Oh man. yes! 4 - 0 down...it was magic.
 
let's see if Toronto picked the right man boy ... :P
but wow, winters in Winnipeg, seem harsh even by Finnish standards
 
@AnttiHaapala It's overall funny because of the heat Toronto keeps taking. Like Matthews' first game, where he scored four goals and the team still lost :)
 
12:26 PM
and yeah....some areas of Canada get pretty impressive winter wonderlands
 
yea
all of Finland is still pretty close to open sea / subject to Föhn winds from Norway
 
Oh, did you by any chance ever see the pictures from the 1998 ice storm?
 
user559633
 
user559633
i have 41 megabytes left on my hard drive
 
so buying a new laptop right?
 
12:34 PM
how do people run out of harddrive space? I don't think I've ever used more than 50gb
 
@idjaw nope
 
user559633
@idjaw buyersguide.macrumors.com/#Retina_MacBook_Pro once this model updates, if i don't have a mortgage by then
 
@AnttiHaapala I can't find a single article that has a good collection, but just take a quick look here
 
@tristan yeah that's the one I have too. I really like it a lot.
 
12:36 PM
yeah nice
 
I hate snow
 
> The ice storm led to the largest deployment of Canadian military personnel since the Korean War, with over 16,000 Canadian Forces personnel deployed, 12,000 in Quebec and 4,000 in Ontario at the height of the crisis.[
 
I want a macbook pro too
 
user559633
@corvid xcode + jetbrains IDEs + OS X is in the area of 50gb
 
but I spend my money on useless university
 
12:38 PM
@idjaw montreal winter is comparable to winter in Oulu
summer is much warmer
 
IDEs, psh, vim. I don't think I ever install any external programs except spotify and slack
 
Oulu (Finnish pronunciation: [ˈoulu]; Swedish: Uleåborg [ˌʉːleɔˈbɔrj]) is a city and municipality of 198,804 inhabitants (31 March 2016) in the region of Northern Ostrobothnia, Finland. It is the most populous city in Northern Finland and the fifth most populous city in the country. There are no larger cities (outside of Russia) that are more northerly than Oulu which is also considered one of Europe's "living labs", where residents experiment with new technology (such as NFC tags and ubi-screens) at a community-wide scale. == Etymology == The city is named after the river Oulujoki, which...
 
user559633
IDEs are great
 
@tristan wow that hasn't updated since I bought it and I bought it right after that
 
Montreal (/ˌmʌntriːˈɒl/; French: Montréal, pronounced: [mɔ̃ʁeal]) is the most populous city in Quebec and the second most populous municipality in Canada. Originally called Ville-Marie, or "City of Mary," it is named after Mount Royal, the triple-peaked hill in the heart of the city. The city is on the Island of Montreal, which took its name from the same source as the city, and a few much smaller peripheral islands, the largest of which is Île Bizard. It has a distinct four-season continental climate with warm to hot summers and cold snowy winters. In 2011 the city had a population of 1,649,519...
 
12:39 PM
Too lazy to learn an IDE
 
@corvid I've tried to use vim, but... :\
 
@corvid Jetbrains ides are god-tier
 
@corvid pycharm could be nice
 
user559633
PyCharm is nice
 
they shouldn't be called IDEs
 
12:39 PM
@tristan it isn't
way too buggy
 
here we go
 
@idjaw I faintly remember it. I believe I was only 4 though :P
 
I installed IntelliJ with PyCharm plugin and the vim plugin... It's an interesting experience
 
I use intellij which has the same problems as pycharm
 
user559633
sorry had too much wine last night to pretend that pycharm isn't great
 
12:40 PM
@tristan it isn't great, it is "ok", increases productivity somewheat when it doesn't proactively decrease it.
 
what bugs are you talking about?
 
user559633
i don't even know all the shortcuts, but it prevents dumb syntax errors and it makes it easy to hop around in a code base
 
@tristan yes, it is true.
 
@AnttiHaapala what do you use for an editor?
 
@enderland pycharm
 
12:41 PM
Except for when the IDE tricks you saying something is wrong when it's right and something is right when it won't run
 
I use intellij because I have a lot of mixed languages and java in pycharm made me cry
 
however, since I've used Eclipse for Java, I know how much I miss the properly working other stuff from it.
@tristan most of the time it makes easy to hop around in a code base
but it isn't made with a python application developer in mind
I don't care about the file names for example, I care about the module names.
but pycharm doesn't know "myapp.subpackage"
no, I need to open "mypackage/subpackage/__init__.py"
and it refuses to find the __init__.py most of the time unless I type it explicitly.
 
user559633
i haven't had that problem
 
this is not how the IntelliJ works.
 
user559633
maybe you're doing it wrong
 
user559633
12:44 PM
have you considered not doing it wrong?
10
 
@tristan I have, but so far I haven't had time to ask you how to do it right
 
I will stop reading this chat before Antti makes me dislike my lovely IDE.
 
user559633
ah, well there's your problem
 
@AnttiHaapala you need to add the directory as a "sources" directory
 
I am attached to Pycharm romantically
 
12:45 PM
@enderland wow, they are.
 
... obviously not correctly if you are finding problems with the module names like that ;)
 
I am talking about "search everywhere"
I don't care about __init__.py or not
I care whether t is the module / package I am looking for
you cannot search by module/package in "search everywhere" (triple shift)
 
oh. gotcha
 
I cannot add type annotations easily to attributes...
say, I have class, with self.foo, I want to add an annotation:
 
user559633
gross
 
12:48 PM
I need to go to the class body, then enter docstring with ":type attribute: full.path.to.the.damn.type.even.if.it.was.imported.Here"
oh, autocompletion doesn't work
 
something something vim
 
@AnttiHaapala cool kidz don't document
 
@khajvah it is for autocompletion, so that I do not do stupid bugs
 
user559633
autocompletion works for me. not trying to be funny here, but maybe you do/expect more from your IDE than I do
 
eh. I think that his point is the IDE should naturally do the things he expects it to
 
user559633
12:51 PM
i use it for autocompletion, hopping around in a code base, sometimes searching, getting method signatures without grepping
 
I tend to think of greatness in relative terms. Is there a better IDE than pycharm for Python. No, than, it is great
 
Should I really try pycharm? Does it have a good vim mode?
 
@sP_ Nothing particularly interesting, really. Rebuilding an existing CRM/data munging tool. There'll be some interesting machine learning stuff to do in about 9 months, but I need hands to munge and clear through the legacy backlog in the meantime. :)
 
@KevinMGranger yes
 
user559633
don't use the vim mode in pycharm. you'll fight with how it's not vim for a month, losing the productivity of having a mouse
 
12:54 PM
:popcorn:
 
That's how most vim modes work: they don't
I use a mouse with vim
 
user559633
vim is great, pycharm is great. don't try to make pycharm into vim and don't install so many plugins that you forget how your vim works
 
Agreed on both counts
 
@tristan except that Vim and pycharm are different stuff
vim for text editing
pycharm for the rest
 
12:55 PM
pycharm's vim plugin works for me.
 
user559633
i use vim for quick & dirty, sublime text for notes, IDEs for coding
 
says: "pyramid" not in package requirements (it is)
then it says appenlight_client not resolved (installed in venv and also in package requirements)
 
when I learnt vim, I stopped being able to move around without it.
 
Someday I'll make the perfect editor... a marriage of acme and vim, of IDEs and text editors, of cbg-s and kings
 
I am too spoiled
 
12:56 PM
I think if I was only coding in 1 language I could learn vim
 
I'm slowly becoming accustomed to not using the mouse
 
I use it for multiple languages. If anything, a consistent experience regardless of the language is valuable
 
pycharm forces me to use mouse for scrolling :(((
 
The keyboard is great for composability, but don't fall for the "it's actually faster" lie. It's not.
 
Same. I like that it's a broadly familiar environment across Java, SQL and Python.
 
12:58 PM
@AnttiHaapala page down?
 
when you've got 400 pages in a source file
 
@KevinMGranger hence: intellij!
 
@AnttiHaapala why would you have 400 pages in one source file?
 
@khajvah ...works for me...
and how are you expecting to scroll??
 
@khajvah because I didn't write them
 
12:59 PM
I use page down/up
 
if it's that big aren't you just find/find in path-ing ?
 

« first day (2196 days earlier)      last day (2768 days later) »