Mekire's Profile User Rating: -----

Reputation: 53 Whiz
Group:
Active Members
Active Posts:
119 (0.91 per day)
Joined:
11-January 13
Profile Views:
1,110
Last Active:
User is offline Today, 12:05 AM
Currently:
Offline

Previous Fields

Country:
Who Cares
OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0
Icon   Mekire has not set their status

Posts I've Made

  1. In Topic: Py2app using a .pyc

    Posted 20 May 2013

    If it is indeed a basic game, why bother? Even pyc can be decompiled by anyone determined enough. Unless you are doing something ground-breaking your gameplay will probably be easily approximated even without your code. I just don't see the point, and honestly nothing annoys me more than people that feel the need to hide their code for trivial projects, because they have commercial aspirations.

    Anyway, just ignore me,
    -Mek
  2. In Topic: Python to C++ ?

    Posted 18 May 2013

    Using yeild as opposed to return makes a function a generator. This means that you can get 1 value from it and then the next time you use it it will start back in the same place. This contrasts to standard returning functions in that they don't maintain any memory of their previous call.

    This is a method of making a function more performance and memory efficient. In python 2.x xrange is a generator; standard range returns a list. If you want to iterate over a huge sequence xrange performs far better as it only generates the one value you need at a time.

    What is it about yield that you need to know?

    -Mek
  3. In Topic: Python to C++ ?

    Posted 18 May 2013

    This looks a bit familiar:
    Generating Integer Partitions

    Simply pasting in someone else's code and asking for a translation generally won't get you very far. And anyway, if you really are that lazy, you know the name of the algorithm (ascending composition integer partitioning). Why not search for something on it in the language you want?

    -Mek
  4. In Topic: edit a .cmd file using a list menu and if statements.

    Posted 15 May 2013

    Well your program doesn't work because raw_input returns a string and you never converted it to a number.

    Edit: Actually you never even stored the raw_input in a variable...

    But why do you want "w+" mode. I do believe you want plain "w" mode.

    Spoiler

    -Mek

    Edit2: Slight change.
  5. In Topic: Translate List i.e.[AUG,UUG,UCC] into this [S,F,W]

    Posted 8 May 2013

    What you have done is not Pythonic.
    I think you would be better off with something like this:
    newlist = [] #All caps is for constants of which this is not.
    
    CONVERT_DICT = {"AUG":"Start","UUU":"F","UUC":"F"}
    
    for rock in chunks: #Capitalized names are for classes (CamelCase)
        if rock in CONVERT_DICT:
            newlist.append(CONVERT_DICT[rock])
    

    -Mek

    Edit: Looking back at previous posts, this is exactly what people were trying to tell you to do earlier.

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:
Location:
Amakusa, Japan

Contact Information

E-mail:
Private

Comments

Mekire has no profile comments yet. Why not say hello?