User Controls

  1. 1
  2. 2

Posts by Parker Brother

  1. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    I've had a couple of Doom dreams in my life. One when I was a kid, after playing it for the first time, and the other just recently after playing Brutal Doom.

    Both were pretty terrifying. Doom is very stressful. You're just minding your own business, looking for a red keycard, then you enter a dark room and you hear a door open and you turn around and suddenly there are 400 robot spider demons chasing you.
  2. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    December. It will be my birthday in three more days.
  3. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    I actually drank a couple bottles of my homebrew oatmeal stout for the first time last night. It turned out pretty well. My brother seemed to like it, too. 31 more bottles to go.
  4. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    I've tried it a couple times in my life, but I wasn't able to eat it. I really don't like canned meats. I don't think they smell good.
  5. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    I went to a party dressed like Patrick Bateman from American Psycho. I wasn't very happy with the costume because the suit was way too big and I couldn't find a raincoat, so I had to use a poncho. I looked more like Patrick Bateman's son wearing his dad's clothes.
  6. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    When I was a young kid I knew the earth was round and I'd look to the west and see mountains, then I'd look to the east and see mountains and I assumed they were the same mountains. I thought that if you walked in a straight line west, you'd walk up the western mountains, then walk down the eastern mountains.
  7. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    Frog maybe? I went frog gigging one time with a friend. I shined a flashlight in the frog's eyes and he stabbed them with a spear. After we caught a few we cut their legs off then went back to his place and breaded and fried them.

    They weren't bad, but the next day I got a really bad stomach ache while getting my eye's examined at the Optometrist.

    The same friend once asked me to sample some taco meat. After I took a bite, he told me it was deer tongue.
  8. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    I think Vizier lived in Sonora. If that's the case, it looks like he'll be fine.
  9. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    Alright, so where you type object.doSomething() i should put the name of the method from the class i want to execute right? So if i have a method called send_packets i should type object.send_packets() or not?


    Yeah, that's right. And maybe your scan option doesn't work because you wrote "elif a in ..." instead of "elif o in ..." like all the other ones?
  10. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    You can't call modules, you'll need to call a function in that module. You could create a function in "scanner.py" called "scan" and do "import scanner; scanner.scan()" or you could just import the function from scanner and call it with "from scanner import scan; scan()".

    Importing a module executes any code in it that isn't in a function or class, so if "scanner.py" is like that and you just want to execute it, just importing it should do the trick. Just remove the "scanner()" line.

    Edit: Somehow I missed the part where you said you wanted to import a class. Importing a class is just like importing a function: "import module; object=module.Class(); object.doSomething()" or "from module import Class; object=Class(); object.doSomething()".
  11. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    I suppose you could generate images of the diagonal line and checker box patterns the same size as your source image, then analyze your source image and for each pixel that should be patterned, sample the corresponding pixel from the pattern image and copy the pixel to the source image.

    As for calculating the darkness/lightness of a pixel, here are some algorithms. Check out the first answer:

    https://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color

    OpenGL is well suited for this sort of stuff. It would be very fast, too, due to all the calculations being performed on the GPU.
  12. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    I took a cooking class in highschool and one of the dishes we made was "fruit pizza". We used sugar cookie dough as the crust, cream cheese frosting as the sauce, and covered it with various sliced fruits.

    We ate it and washed it down with Kool-Aid. It was actually really good, but I didn't feel so good afterwards.
  13. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    Word, thanks for the reply. But it needs to go in reverse. I want to call the second script from within the PyCat script and have it execute by means of a command line argument.

    Ahh, ok. Well, Python's subprocess module might be what you need, then: https://docs.python.org/2/library/subprocess.html
  14. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    Damn it, I spent like 20 minutes writing a post on my tablet, but then I touched the wrong thing and lost it all. I'm at my computer now and I'll recreate it:

    In Python it's real easy to import one file into another. Just put both of the files in the same directory and use the import statement. If your PyCat program is named "pycat.py", you can import it into the other program with "import pycat".

    To do it this way, you'll need to make a function in PyCat that the other program can call. It should be just like "main", but use function arguments instead of command line arguments (argv). Let's call this function "execute".

    Then you'll need to do something to prevent PyCat from calling "main" when it's imported. This can be done by replacing the last line of PyCat, "main()", with:

    if __name__ == '__main__':
    main()


    Now "main" will only be called if the program is run directly, not when it's imported from the other program.

    Now you can import PyCat into the other program and run it with the "execute" function:

    import pycat

    pycat.execute("192.168.0.1",5555,listen=True,command=True)
  15. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    Pretty much exclusively Battlefield 4. Both my brothers play too, so most of the time I play with them.
  16. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    The if/else statement you refer to is Python's version of the Ternary Operator. It is pretty much shorthand for

    if isinstance(src,unicode):
    digits=4
    else:
    digits=2


    In most other programming languages the Ternary Operator is written as

    [i]condition[/i]? [i]true_value[/i]:[i]false_value[/i]


    So that line would be written as

    digits=isinstance(src,unicode)? 4:2
  17. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
  18. Parker Brother Yung Blood [the valiantly arthrosporous wyatt]
    90 degrees F (32 C) here in Montana. Luckily it's only 73 F (22 C) in the basement.
  1. 1
  2. 2
Jump to Top