« first day (1281 days earlier)      last day (3672 days later) » 
00:00 - 14:0014:00 - 00:00

user559633
12:25 AM
has anyone played with the diablo api?
 
user559633
or battle.net stuff
 
I played on battle.net years ago - does that help? :p
Anyway... gotta run... rbrb
 
1:31 AM
If anyone replied I didn't see it, so posting again:
hey everyone, i need to do research for a speech I will be giving... http://strawpoll.me/1517151
Mostly I need reasons either way that I can attribute as research. (they don't come from my brain.)
Clarification on the poll: I mean simple programming, nothing complicated or advanced, or theoretical.
Hope it isn't to annoying.
 
I'm running a web app on Flask. I want to queue commands to be executed every ten minutes. Basically, I have a SQL database that has statistics for tournaments. When the stats are updated, I want a 'recalculate stats for this tournament' command to enter a queue. Every ten minutes, the commands in the queue are run. Whats the best way to do this?
Alternatively, the tournament director can also force statistics updates.
@theHeretic I voted
 
alright, thanks abacus. I don't even know what Flask is, so can't help you, sorry about that.
 
It's a python framework like Django. But possibly the solution doesn't have to do with Flask at all. I don't know how to go about this at all.
 
I don't know anything networking wise yet, but I can try to talk theory, though if you don't know what I type I will be surprised:
have an array in your database that is changed when the stats are updated, and use that for however the 10 minute clock works off of.
 
That was my initial thought, but I wasn't sure if there was a more formal way to do it. I guess I'll just do that. Thanks
 
1:42 AM
I generally do whatever works until I hear about a better way to do it, and I only switch when I am told reasons why it is better.
 
 
5 hours later…
6:55 AM
cabbage!
 
cbg!
 
potato?
 
bananas melon - potato?
 
bananas melon :)
I thought about developing a Monty Python and The Holy Grail game. I still consider whether it should be a quest or a really messed up turn based RPG, or perhaps a first person RPG.
Of course, it will be written in Python :P
 
It must involve swallows as well :p
 
7:06 AM
Actually something like Final Fantasy style turn based RPG, with Sir Robin having only one action: "flee" xD
 
and don't forget CABBAGE!
We are no longer the Knights who say Nee! We are the Knights who say CABBAGE! :p
 
Noooo you must not disturb the nee!
But the knights could ask you to bring them cabbage instead of shrubbery
 
I like that :)
 
We could develop a mini game where you play a catholic christian woman and you have to give birth to infinite number of children and the ending scene will be the song of "Every sperm is sacred"
 
I'm slightly worried - yet extremely pleased you're thinking this through thoroughly :P
 
7:12 AM
haha xD
Don't blame me, I didn't write The Meaning of Life
 
But you always look on the bright side of it? :p
 
yup!
 
Up to much today?
 
7:37 AM
actually working on my odata plugin. Haven't had much time, and will to do it, as it is a holiday in here right now.
I decided to scrap all my work and start over again, implement this using tokenization, I think it is a better approach
 
Ahh okies
Trying to figure out someone's database that hasn't used any foreign keys
 
7:52 AM
Reminds me of a good day at work. Rewriting an old system. The DB burned my eyes. About 400 stored procedures, that each stored procedures simply calls another one, so you have like 30 stored procedures for every operation, while only the last stored procedure to be called actually does any work.
Also, about 200 tables, that in the new system we used only like 30.
Funny thing is that a third party company wrote this system. Job security ftw.
 
LOL
Well - this isn't quite that bad... but it's still confusing
ORM'd it up and put a few foreign keys in... it's queryable at least :)
Find what I'm missing as I go along I guess
But I've removed the need for 150 php files already :p
 
sounds fun
 
Yep... ah not to mention that the old system used ADO.NET and a third party DLL that extends ADO.NET and you have no freaking idea what goes inside it. After using a reflector to get the code, I found out that the guy who wrote this has really bad habits, it seems like he is also the DB designer, as also in here you had like 10 functions that call each other with the last function calling a stored procedure.
 
Happy happy happy. Joy Joy Joy! ?
@Terfin did the guy inadvertently think he was getting paid to do a code obfuscation contest? :)
 
s/content/contest/
 
7:59 AM
Well I don't know, but I can tell you that the client company has a bunch of retards for project managers. They have used that third party company for about 10 years. 10 freaking years. Not once has anyone done any code review to those projects or set any minimal standards
 
@Code-Guru don't possibly know what you mean cough :p
 
I see the edit =p
 
whistles innocently
 
so how's things going in the python world?
 
It is very uhhhh Pythonic?
 
8:02 AM
cbg all
 
@Ffisegydd STEWIE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
cbg @Ffisegydd
 
@Jon BRIIIIIIIIIIAN!!!
How are we all?
 
tired
 
I don't know... I can only speak for me... but I'm bananas... how's my 2nd favourite Family Guy character doing this morning?
 
8:04 AM
Hungry. I want beef and beer, or lager. (In here we call both beer! Blasphemy!)
 
I'm not bad. At home visiting the parents and I'm already ready to leave :P
 
I'm at a coffee shop oggling a hot barista every time she walks by
trying to pretend to work on an app...
 
@Ffisegydd sounds ominous :)
 
No one has been looking at me like that when I was a barista :(
On the other hand, I am a guy and I definitely don't want guys to look at me like that.
btw, if you piss off the barista too much, you may just as well find bleach in your coffee, just saying :P
 
nah, all the baristas here love me
 
8:08 AM
Ah, you are one of the daily clients?
 
sometimes I hang out here all day and try to code
I ordered a medium smoothie earlier and she gave me a large.
 
I personally gave up on that. I find coffee shops too noisy.
 
sometimes this one is
sometimes I'm the only customer in the whole place...just depends on the time of day.
 
You should code in a bar. Every Exception you get a bug.
 
You should code in a rave party!
or in a grave party hmmmz
 
8:18 AM
well, I'm not getting any more coding done tonight, me thinks.
not that I did much today anyway...
 
8:38 AM
2 messages moved to recycle bin
@AnishMenon Could you please read our room guidelines? sopython.com/chatroom ? Thank you
 
Asking a help related
to python is a big PROBLEM??
 
Questions and answers get answered on the main site... there's no need for you to dump a question in the chat room and ask for help :)
You'll draw attention from 2/3 people this time of day... if it's not answered in a day or so... etc... then maybe come here and raise it... but 10 minutes after you've asked it - no thanks :)
 
Ok .. my urgency was the problem . Sorry ..
 
@Anish no worries :)
@Anish very weird date string format :)
The code looks correct.... I'm assuming you're using dateutil because you've got relativedelta in there...
A normal timedelta would be fine though for fixed periods - datetime.timedelta(minutes=10)
 
9:23 AM
cbg
 
timedela and relativedelta works. but the queryset result is throwing the whole days result
 
@JonClements ^
 
@AnishMenon So you're getting stuff outside of the last 10 minutes? Can't see how
 
yes .
 
@Peter haha... fantastic
 
9:25 AM
its not returning the last 10 mins result
RuntimeWarning: DateTimeField received a naive datetime (2014-04-19 15:02:50) while time zone support is active.
 
You'd need to provide examples of what data is in the set that gets returned that shouldn't be and viceversa
Keep repeating that it doesn't work doesn't make the problem any clearer or any more solveable
 
9:51 AM
@JonClements grrrrrrrrggrrrr
 
LOL
Although... having said that ^^^^^ - I'm the same :(
 
nfw ;)
 
My 3rd tab is my email :)
 
that really is a brilliant song
 
Priorities hey :)
 
9:57 AM
well, I have 7 windows and 8-10 tabs on each
but I keep them grouped
so my IM/Mail/Social is in another window
 
Well, I only focus on a couple of bits, the rest is all terminals on other desktops
 
I have at least one terminal on each of my desktops (I have 10)
 
10:13 AM
Another quiet day... must be the weekend and Easter or something :)
 
@JonClements have you tried Elementary OS ?
 
I haven't
 
it looks pretty nice (not as nice as OS X as it wannabe)
but way nicer than Mint or Ubuntu by far
however, it is a very very very thin layer over Ubuntu/Mint idk
 
Ahhh okies
 
and very limited atm -- best OS for moms and dads
:)
 
10:17 AM
LOL... looks very "macminty" :)
 
10:37 AM
been planning to try it
I wonder if I can install it on top of Ubuntu
hmm. old version. will wait for the one based on 14.04
 
11:13 AM
Watching Great British Bake Off. I want meringues now :(
 
They're making jam doughnuts now :(
 
Cabbage all.
I'm commenting up some code, ready to do a report. :P
Fun.
Well, it kinda is.
 
11:52 AM
from this perspective, it kinda looks like an intro of a retro horror game..
:P
 
Err... yeah... juts make it red :)
And slowly "drip" down the screen :)
 
yeah, well, I'm super happy now, this is Modern OpenGL (vertex and fragment shaders) and what you see here is a loaded image and used as a texture :)
but later on, I will change the color to red, just to make you happy
 
@Peter you on Skype ?
(would like to if possible pick your brains on a quick bit of design I've done)
 
I will be in 30-40 minutes, is that OK?
 
That's fine :)
 
11:58 AM
I have to run to the family easter lunch
bbl
~
 
I just realised I need to install Skype anyway... rbrb :)
 
Sab
Hi all
Can anyone help me with Turtle graphics
?
I'm trying to make the L-System fractal but for some reason(which I don't know why) it's not working properly
 
I'm pretty familiar with turtle.
 
Sab
An L-system or Lindenmayer system is a parallel rewriting system and a type of formal grammar. An L-system consists of an alphabet of symbols that can be used to make strings, a collection of production rules that expand each symbol into some larger string of symbols, an initial "axiom" string from which to begin construction, and a mechanism for translating the generated strings into geometric structures. L-systems were introduced and developed in 1968 by Aristid Lindenmayer, a Hungarian theoretical biologist and botanist at the University of Utrecht. Lindenmayer used L-systems to desc...
check that
 
In fact, I'm doing a report on some code I did in it now, although I've never worked with fractals.
 
Sab
12:06 PM
Check example 4
it's extremely simp
simple*
But I can;t get it to work in turtle
 
Do you mind paste-binning me the code?
Also, what do you mean by 'won't work'?
The logic or an error?
 
Sab
Lemme paste the code
 
Kay.
 
Sab
Logic error
 
Ah.
 
Sab
12:07 PM
It's making a square and not the pattern
Second
There you go. I commented the codes roughly so you know what's happening
 
Can you explain what it should be doing and what it is doing?
Just briefly, I'm essay-ing at the moment ;-;
 
Sab
CHeck the wikipedia link
It's on example 4
you willl see the pattern
and it's not doing the pattern, instead it's just making a square and looping through the square.
 
Hm.
 
Sab
It sort of made a square track and going round it lol
It should work according to my logic, but it's not
 
You're only making the gene once, should it not be made over and over through the loop?
So:
Loop:
-- Make the gene using the lSystem
 
Sab
12:13 PM
I'm making it only once
 
-- Do stuff here.
 
Sab
for the nth iteration it's this
f+f+f-f+f-f+f+f etc
for that iteration it does that pattern
 
Sorry, not sure I can help here :l
 
Sab
no prob :/
 
Anyone here is hiring (in general) for Django positions? I have some questions I want to ask about interviewing people for those.
 
12:24 PM
@Benjamin cbg... how ya been ?
 
I'm thinking about buying a small, portable laptop. Don't suppose anyone has bought one lately/could recommend any they like the look of? I'm currently looking through the reviews online and this looks ok
 
Sab
I Just bought a Leneovo G500s
 
Wow... Django interview questions and Laptop recommendations... no one feel like talking about Cabbage or world domination today? I'm relatively familiar with that at least....
 
Sab
It's affrdable core i5
The one you are thinking is a lenovo as well :P
 
@JonClements cbg!
 
12:30 PM
The G500s is 15.6in, quite big
 
@Ffisegydd touch screens usually make a laptop's screen much worse in terms of brightness.
 
Sab
And dirty
 
And dirty.
 
I'm sure you want a 19" 16gb ram, 6gb graphics, 1tb drive, 256gb ssd laptop really...
 
Sab
^
I wanted that, but I was thinking about my money :3
 
12:32 PM
Well I've already got my tower which can do anything, it's just a bit inconvenient to travel with :x
 
(... and a fairly robust lap)
 
Big laptops suck
 
Sab
^
Better get a pc when you think about it
 
In that it needs its own suitcase to travel with...as opposed to a satchel :P
 
Sab
Big laptops defy the purpose of laptops
 
12:33 PM
I'm still with an Asus Zenbook Prime and it's ok, though I want to replace it since the SSD is too small, it has 4 gigs of ram and the sound stopped working.
Other than that it's pretty awesome, great build quality, withstood a lot of falls, battery still very good, and the screen is amazing.
 
Sab
My lenovo G500s is new but it's getting unscrewed by itself
screws fall down for no reason.
 
@JonClements my wife's sister is looking for a job programming Django/Python (in Israel, for a short term), I have no idea how good she is and I want to tell her "in order to get a junior position doing that, you need to know XYZ"
 
Or I just throw caution to the wind and buy a macbook :P
 
The thing is, at TipRanks we only hire people who are very very very good, I don't know if she's good or bad because honestly I've never seen her work, but really, the chances we'd hire someone who doesn't know things that people who do web with Django are perfectly OK not knowing are slim.
 
If she's competent at Python and can do the Django tutorial without hassle... that's probably as beginner as it gets
 
@JonClements she can do the tutorial without a hassle, I think.
@Sab ew
 
@Benjamin demonstrating use of the ORM, understanding of views (traditional and class-based), templating and such...
 
Sab
@BenjaminGruenbaum Ewwut, he's looking for small and cheap
 
@Sab I thought he was looking for a laptop that doesn't break :P
 
There's so friggin' much in Django, it's more if they're competent at Python - can read manuals, and at least know how to get something basic going - I'd say that's the best you can tell without prior experience/seeing previous work
 
Sab
12:36 PM
I'm freaking out about my laptop
the screws get out by themselves
 
@JonClements there is? I used it several times and to be fair I didn't notice any particular complexity or hard concepts (coming from similar frameworks in other languages) although I admit I used Bottle more more recently.
 
Sab
Anyone got some exercises which I can do involving strings(Stripping, str.replace, capetialize, lower etc), nested loops
?
I need to practice a bit about these stuff
 
@Benjamin think of it as you want a good Python programmer, as long as they've got enough of the basics, (some itertools, csv, defaultdict etc...) and know how to read a manual, you don't need someone that can remember the entire stdlib off their head (cos there's loads of it)
Then replace Python with Django, insert the ORM, templates and views instead of stdlib modules, adn the same kind of applies
 
@Sab take a file with text, scamble all the words in the text by replacing in each word all the letters except the first and the last. That's the first exercise in the Python course here. Do it once with regex and once without regex.
 
Sab
I don't know regex. I'm new to python/programming
 
12:39 PM
Ok, so do it without regex :)
 
Sab
That sounds like an awesome exercise.
 
Good luck.
 
Sab
Thanks. I'll work on this.
 
Also, a good chance to learn regex, it's really not very hard - just looks scary for the first time.
 
@Benjamin ooo... can I have a go? :p
 
12:41 PM
@JonClements fair enough. I think I knew that was the answer.
@JonClements sure
 
Sab
It's scary.
 
Now... how obscure can I make this... :p
 
Sab
But can I learn regex without knowing all the basics?
 
Learn the basics, but do it without regex first.
 
Sab
Okay.
Oh, do you have experience with turtle graphics?
 
12:42 PM
I learned Logo at one point, then again that was almost 20 years ago.
 
Sab
I tried to make the L-system in python
and it works.
However, when I want to use turtle graphics to make the shape, it doesn't work
 
from random import random
from itertools import chain
print ''.join(chain(word[:1], sorted(word[1:-1], key=lambda L: random()), word[-1:]))
@Benjamin how's that? cough
 
It has to take an input file name, and an output file name.
Also, lol.
 
What... you want it to work on more than one word?
 
Sab
I wonder how you guys can write a whole code in 1 line
 
12:45 PM
omg - that's a complete re-structure - that's at least another day's work!
 
@JonClements yes, I want it to work on a file :P
 
Sab
It's gonna take me roughly 20 lines to write it :/
or more
 
It takes an input file, and an output file, reads from the input file and writes to the output file shuffled.
I have a 2 year old (I think?) solution somewhere. It's around 25 lines and it's Python 2.
 
Sab
I'm learning python 3
 
Doesn't matter really.
 
Sab
12:46 PM
I'll try to make it in python 3
 
from random import shuffle
from re import sub


def shuffle_contents(match, group=1):
    word = list(match.group(group))
    shuffle(word)
    return "".join(word)

def process_line(line):
    inside_word = "(?<=[a-zA-Z])([a-zA-Z]+)(?=[a-zA-Z])"
    return sub(inside_word, shuffle_contents, line)

input_file_name = raw_input("Please enter a file name: ")
output_file_name = raw_input("Please enter the output file name: ")

try:
    with open(input_file_name) as in_handle, open(output_file_name, "w") as out_handle:
 
@JonClements I'm back, gimme a mo' I'll open skype..
 
Found it, it can be made a lot shorter, but I guess that wasn't the point.
 
Sab
I'll save it for reference. I'll try to build it first and see if I can
Thanks.
 
Another take for a laugh:
import sys
from random import shuffle

script_name, infile, outfile = sys.argv
with open(infile) as fin, open(outfile, 'w') as fout:
    for line in fin:
        try:
            head, *mid, tail = line.rstrip()
        except ValueError:
            print(line, file=fout, end='')
            continue
        shuffle(mid)
        print(head, ''.join(mid), tail, file=fout)
 
12:52 PM
idk what the guys are using, but this will only work on Python 3.2+ (I guess -- or 3.3+?)
although this a very clean and beautiful implementation
 
@JonClements Would that work with punctuation? For example Apple,Orange,Pie ?
 
Nope
More than one word a line is even more work - I'm up to 3 days chargeable now :p
 
Yeah, needs to support more than one word in one line, needs to support a sentence.
 
Define word and sentence...
 
Aoccdrnig to rscheearch at an Elingsh uinervtisy, it deosn’t mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist and lsat ltteer is at the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit a porbelm.
Tihs is bcuseae we do not raed ervey lteter by itslef but the wrod as a wlohe.
This is the example input, it needs to re-scramble that.
 
12:56 PM
@Benjamin I saw that, and I'm signed up to various agencies, and one of 'em sent that at a beginning of an email... I wasn't that impressed coming from an agency
 
@JonClements agencies?
 
Gives me a hint at who's approachable :)
 
Still, agencies?
 
(and like to know if who I'm doing work for is also looking elsewhere for any reason)
 
Ah :P
This is the "introductory" exercise we give people who take the Python workshop course. Well, not anymore, since we stopped teaching intro to CS with Java and started teaching it with Python.
 
Sab
12:59 PM
Benjamin are you a professor?
 
No, I just TA, this year I don't even TA because I don't have time.
 
Sab
Waht tpis wulod you gvie to a frist yaer seduntt?
 
Not to replace any first/last letters when they do that exercise :)
 
Sab
lol
Seriously, though. I'm finding myself struggling with first year.
 
Work hard, code a lot.
 
Sab
1:03 PM
Did you do maths as well?
Maths is so hardcore. O.O
 
Yeah, that advice applies even more there.
 
Sab
When you say work hard, how many hours a day?
 
Math requires doing a lot of exercises and reading a lot, otherwise no matter how smart you are you won't do well.
 
Sab
I don't want to just pass. I need to get As if I want to get into a top grad program. And for my first class tests I got 50-60% average and this sucks
 
Study harder, learn how to study.
 
Sab
1:07 PM
My lectures are 8-12 everyday + tutorials 2-5 everyday
So I have like 6 hours for me after 6pm
 
Wow... I read that as "My lettuces are..." - I need a life...
 
Sab
is that even enough O.O
 
@JonClements No, you need more cabbage!
 
Sab
Jon are you vegetarian?
 
BRING ME MORE CABBAGE!!!
 
1:09 PM
I don't even
 
Sab
Cabbage level: Asian :|
 
@Sab do you know any vegetarian dogs?
 
Sab
My dog is.
 
Jon is cabbage claus
 
Sab
I ironically named my dog Hot Dog.
 
1:13 PM
@JonClements actually, there are.
 
Sab
1 min ago, by Sab
My dog is.
 
Sab
Photoshopped ^
Well. Cya guys I'm off
 
Yeah... I thought the clouds looked fake :)
 
Sab
It's too dry at the back. Wayyy too dry
Here's a pic of my dog
and me :)
 
1:17 PM
@JonClements What is the PythonSO arch-nemesis?
 
Sab
Damn wrong pic
 
@Sab Well played... well played.
 
Sab
Thanks :
:D
Troll time is over. Bye.
 
cya
 
why hello friends
 
1:20 PM
@Crow cbg
 
so, probably a dumb question, but how exactly does one do something within a separate directory? Eg, in shell it would be like cd directory/; tar -xcf some_stuff; scp some_stuff some_place.
I want to zip all files within a directory, and save it to a different directory, from a script outside of that directory
 
You add the path to the files?
 
1:38 PM
okay. In flask, what is the significance of open_resource as opposed to just python's plain open?
 
Gonna go get some fresh air... rbrb
 
@Jon Rhubarb.
 
ffs
 
I should do some more HTML.
 
All I see is 'removed'
 
1:47 PM
Let's see if it works...
    def open_resource(self, resource, mode='rb'):
        """Opens a resource from the application's resource folder.  To see
        how this works, consider the following folder structure::

            /myapplication.py
            /schema.sql
            /static
                /style.css
            /templates
                /layout.html
                /index.html

        If you want to open the `schema.sql` file you would do the
        following::

            with app.open_resource('schema.sql') as f:
This is what it simply does. it actually returns a regular file object, it is not that much of significance except it looks locally in the root_path (prolly app's directory)
 
so, it's basically just with open(os.path.join(app.root_path + my_path), 'rb') as file:
 
Not so sure. it is under the following class in Flask's codebase: _PackageBoundObject
 
flask is a little odd at times, it seems. I am trying to make my app as simple as humanly possible right now
got it down to around 100 lines of code (no HTML counted)
 
Ah
Flask object inherits from _PackageBoundObject
 
Hello Guys
 
1:55 PM
So does Blueprint which I have no idea what it is. Tbh, I have never used Flask, I am more a fan of bottle when it comes to microframeworks :)
 
Rhubarb all, gonna work on TigaMail for a bit.
 
@Gopi cbg
@ipo
ffs
 
I have a question is any one can help me ?
 
@Crow At any rate, I think what you suggested, may work, if Flask works like bottle, where app is an instance of Flask, as default_app, or app is instance of Bottle in bottle.
 
@Gopi Depends what it is; ask it any see if anyone can.
 
1:58 PM
Just want to know how this site scorespro.com works
i mean sites like these
how they will collect and feed the data in realtime
 
00:00 - 14:0014:00 - 00:00

« first day (1281 days earlier)      last day (3672 days later) »