« first day (1399 days earlier)      last day (3774 days later) » 

20:00
long post, but I think it's the old if a or b == c problem
@Kevin you sure?
Like 90%. Cyber posted an answer that agrees with me
@Kevin I like the fact that wall of text has "Text cut for clarity" occuring several times in it :)
Bless his heart, he respects the reader's time :'-)
@Kevin umm... it's not quite the same a or b == c... more a misunderstanding of the explicit boolean on the while...
Although cyber has linked to Martijn's post
20:03
I think I'll hold off until the OP replies to Cyber's answer
It's not inconceivable for if a or b == c to be intentional... Maybe he wants to keep looping as long as the e parameter is truthy.
The int call would be a little inexplicable then, but meh
Exactly... although probably not likely... but a possibility none the less :)
Don't wanna be the one to hammer something incorrectly :(
I know that feeling. Or, I predict I would know that feeling if I had the Hammer.
@Kevin just another 418 upvotes in Python required... you can do that by end of the month :)
@Kevin 101 sure
"when the port switches from closed (9) to open (8)"
so the values are 9 and 8 for the port read
20:39
Hi guys
cbg
potato?
arrr. Flask. Why doth thou torment me so
@corvid doth it mock ye?
Can anyone see any issues with installing git on a server since I generally develop my one site by editing files on a dev server? And doing commits from the server?
20:42
it doth. I should really finish that SOPython pr though
@Johnston that sounds like you should definitely use git on the server for that
@Johnston have a bare repo on the server as a remote, then push to that from local?
(well, it doesn't need to be a bare repo I guess...)
@JonClements is that what heroku does?
@corvid yup - that's how we had the older sopython set up
on a push, it automatically use to checkout the latest master and restart the uwsgi processes to pick up code changes
0
A: JS : regex pattern "? OR end of string"

Antti HaapalaMatch digits followed by ? or $, whichever comes first, as group 1. /.*?(\d+)(?:\?|$)/

lol the other answer, wrong answer and 4 upvotes in an instant
@JonClements @corvid I made this site about 4 years ago. And for some reason at the time I started just by developing on a dev server and pushing it directly to the live server.. Just using vim.. Now I realize the thing should be tracked on git.. I could just install git on the server and push from there since I normally do my dev work there. any issues with that that you can see?
20:47
Nope
"pushing"... ftp'in...
I just prefer having the live server to have a bare repo, then push over SSH from other machines to the live one
Cool
Makes sense
21:04
oops, closed the wrong tab
cabbage all
Johnston you ever use heroku?
21:36
Hi, anyone could help me with a django db query?
@chaim please check the room's etiquette sopython.com/pages/chatroom - you don't need to ask if it's okay to ask... just ask, and if anyone can help/available - they'll do so :)
thanks @Jon, I've asked because this chat is for python and not django specific
I'll ask :)
I have that model with:
Not sure our Django experts are about, but I know a tiny bit :)
fetch_date = models.DateTimeField(default=now)
followers_count = models.PositiveIntegerField()...
and I would like to fetch followers_count and fetch_date GROUP BY fetch_date (days)
I'll do what I can
21:41
I've seen a lot of questions and answers in SO but I couldn't make it work anyone
What are you trying and what errors are you getting?
For example this is not grouping by date:
ta.stats.extra(select={'day': 'date( fetch_date )'}).values('day') \
.annotate(available=Avg('followers_count'))
for the aggrupate group I don't care if its, Max, Avg, Min...
is there an easy way to print out a dictionary in an easy-to-read yaml like format for debugging?
@Humdinger either pprint it, or json.dumps it with an indent of 4
I just hit the nerve on my knee so hard I went blind and deaf for 20 seconds
21:48
@JonClements thanks
what I want is to remove (or group) duplicate dates...
I think I got it
ta.stats.extra({"day": "date_trunc('day', fetch_date)"}).values("day").order_by().annotate(followers_count=Avg("followers_‌​count"))
postgresql only
Glad my silence was useful? :)
kind of that :)

« first day (1399 days earlier)      last day (3774 days later) »