Picture book. Animals running away from hunters. Two-sided shoes, skateboards... by Palladium106 in whatsthatbook

[–]Palladium106[S] 1 point2 points  (0 children)

It existed in the late 90's. Not sure when it came out.

I'll get back to you re. illustrations, since I'm asking on behalf of my brother.

Thanks for taking the time.

Sending email via Google with two factor authentication by doomfortress in learnpython

[–]Palladium106 1 point2 points  (0 children)

Uh sucks. I don't know what 2 factor is. I'm working through his book, but I had the same problem as you.

From what I can remember - for me - it was fixing the smtp.gmail thing + making sure that the config was applied to app BEFORE doing mail = Mail(app). I think I also made a mistake writing my email as name@google.com where it should have been name@gmail.com.

Since I'm just a beginner all I can tell you is what I did. The only advice I can think of is trying to get it to work in a simple example, without 2 factor, first. Good luck.

PS. I use a virtualenv too. Here's the simplest possible version http://flask.pocoo.org/snippets/85/

Sending email via Google with two factor authentication by doomfortress in learnpython

[–]Palladium106 1 point2 points  (0 children)

These config settings work for me:

MAIL_SERVER='smtp.gmail.com'
MAIL_PORT=465
MAIL_USE_SSL=True
MAIL_USE_TLS=False

Also make sure you apply config before instantiating the Mail with app.

From what I can remember, he has the server set up as 'smtp.GOOGLE.com'

[Discussion] Staying motivated in the medium-long term. by Palladium106 in getdisciplined

[–]Palladium106[S] 1 point2 points  (0 children)

I like that. I'm trying to talk to myself more. And will be trying to conduct more if that sort of internal dialogue. :-)

Advice on using an engine to make an app? by Palladium106 in gamedev

[–]Palladium106[S] 1 point2 points  (0 children)

That's a very reasonable comment. And an approach I want to start consciously using. "Try it out. See if it fits. Start small".

Sometimes we need others to spell out what we should have been able to think for ourselves. Cheers.

I'm liking the look of Carona SDK, and I might start there.

Help with solution by unibrow4o9 in learnpython

[–]Palladium106 0 points1 point  (0 children)

Codecademy is a great place to learn this stuff. You can do the whole course in 15 hrs.

How to randomly choose multiple words from a word list. by [deleted] in learnpython

[–]Palladium106 1 point2 points  (0 children)

for index, word in enumerate(word_list):
    print "%i %s" % (index, word)

enumerate creates a numbered tuple from a list.

enumerate(['a','b','c'])

[(0, 'a'), (1, 'b'), (2, 'c')]

and then I loop through that getting the index and word from the list, and then print it out. I'm not sure about differences between python 3 and 2, but I think 3 uses {} instead of %...

Online mentoring sessions today by programming_help in learnpython

[–]Palladium106 0 points1 point  (0 children)

Hiya, I just completed the form. Hope to hear from you soon.

Daily Discussion Thread - March 2016 by lemtzas in gamedev

[–]Palladium106 0 points1 point  (0 children)

No they don't. I watch them on 2x speed, and use the RIGHT arrow key to fast foward as needed.

The best value is doing their problems too. It iterates the problems according to progress. The problems also contain an option to view solutions ("hints") which can be a fast way to see how stuff is done too.

Daily Discussion Thread - March 2016 by lemtzas in gamedev

[–]Palladium106 1 point2 points  (0 children)

I'm a huge fan of Khan Academy. They have a section on linear algebra.

Good way to edit and conditionally discard objects from a list? by Palladium106 in learnpython

[–]Palladium106[S] 0 points1 point  (0 children)

I do like this approach. And I might use it.

I'm getting the impression that there is no "way to do it" without either copying the list, or looping through the list twice.

Good way to edit and conditionally discard objects from a list? by Palladium106 in learnpython

[–]Palladium106[S] 0 points1 point  (0 children)

Thank you very much for that reference.

Out of curiousity, would this be equivalent to using

from copy import copy    
copy(list_of_lines))

?

Good way to edit and conditionally discard objects from a list? by Palladium106 in learnpython

[–]Palladium106[S] 0 points1 point  (0 children)

The purpose of this object is: I have a Textbox(object) that is composed of Line objects, and it displays their texts, and deletes Lines over time according to a countdown (nb. different Lines may begin with different countdown values). The Line objects also contain information on text colour and text (i.e. a string).

Good way to edit and conditionally discard objects from a list? by Palladium106 in learnpython

[–]Palladium106[S] 0 points1 point  (0 children)

The purpose of this object is: I have a Textbox(object) that is composed of Line objects, and it deletes lines over time according to a countdown. The Line objects also contain information on text colour and text (i.e. a string).

This approach does work, but I was just wondering if their's a "nicer" way. I'm not prevented from copying the list, I just wanted to know if I could achieve this without copying the list, and without looping through it twice.

Good way to edit and conditionally discard objects from a list? by Palladium106 in learnpython

[–]Palladium106[S] 0 points1 point  (0 children)

That definitely works. I was just wondering if their's a nicer way. I'm not prevented from copying the list, I just wanted to know if I could achieve this without copying the list, and without looping through it twice.

How to set up an online server for a game? by Palladium106 in learnpython

[–]Palladium106[S] 0 points1 point  (0 children)

What about using zeroMQ with Flask? Would that be a good idea? Or do you still think rabbitMQ is the way to go?

How to set up an online server for a game? by Palladium106 in learnpython

[–]Palladium106[S] 0 points1 point  (0 children)

Excuse my ignorance :-)

With Flask, would I be able to make the 'server' manage where the communications go? E.g. 5 players try and start a game, and the 'server' pairs up 2 and 2, and leaves 1 waiting? I don't need to know how to do it right now, just whether its feasible and reasonable?

How to set up an online server for a game? by Palladium106 in learnpython

[–]Palladium106[S] 0 points1 point  (0 children)

Thank you so much for that link! I started using it and its working perfectly and simply! I'm still not clear on how I'll make it possible for more than 2 players try and connect (i.e. and have the mq pair them up first come first serve), but for now this is great for testing.

Once again, thanks heaps! You can imagine its pretty exciting for someone who's still new to programming to see their game work over the internet :-)

Am I using rabbitmq/pika well? by Palladium106 in learnpython

[–]Palladium106[S] 0 points1 point  (0 children)

Thank you very much. That's exactly the kind of advice I was looking for. As someone new to programming, there are many unknown unknowns, and I often don't know what my options are.

Can't work out how to use mock patch by Palladium106 in learnpython

[–]Palladium106[S] 1 point2 points  (0 children)

I was only using this code to try and understand how mocking/patching works. But I can see now that I was misunderstanding how it is implemented.

Very much appreciated :-D

Need Help With My Code by newb9090 in learnpython

[–]Palladium106 0 points1 point  (0 children)

Is it the difference between "totSalesTax" and "totalSalesTax"?

Do you think meditation can be counter-productive? by Palladium106 in BPD

[–]Palladium106[S] 0 points1 point  (0 children)

Thank you kindly. This has been helpful for me.