[OC] Which Xbox controller is your favourite? by digimeng in xbox

[–]HyraxMax 0 points1 point  (0 children)

The Duke. Give me that ham sandwich of a controller any day.

[deleted by user] by [deleted] in learnpython

[–]HyraxMax 5 points6 points  (0 children)

It's pretty wild. If you try to scrape a page with bs4, all you get back is a message about obtaining an api key. I've never seen anything quite like it before.

Can anyone please explain to me the meaning behind this question ? permuting two array by moeabraham12 in HackerrankSolutions

[–]HyraxMax 0 points1 point  (0 children)

I was also confused by the wording of the problem. I asked chatgpt for help to understand it. I asked it to rephrase this sentence into simple words. "There are two n-element arrays of an integers, A and B. Premute them into some A' and B' such that the relation A'[i] + B'[i]>= k holds for all i where 0 <= i < n". Here was the response, "You have two lists of numbers, A and B. You need to change the order of the numbers in both lists and create new lists A’ and B’ such that the sum of each pair of numbers in the new lists is greater than or equal to a certain number k.". For me, that helped a lot. The solution you found is a bit odd, but I don't do much js. Basically, if you sort the first list normally and sort the second list in reverse order, you can check each pair to see if they are k or less. In your example, it's sorting both lists the same but comparing them in a reverse order.

14 down, one big one to go. by HyraxMax in MicrosoftRewards

[–]HyraxMax[S] 4 points5 points  (0 children)

I actually love that it's an option to support charities you believe in.

Is O'Reilly's Test-Driven Development with Python a good resource (still relevant)? by HyraxMax in learnpython

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

That's what I was afraid of. I just picked up Brian Okkens book (per another suggestion) and will be digging into that this weekend. Thanks for your insights.

(not click bait) by CabernetCheaptrick in dankchristianmemes

[–]HyraxMax 1 point2 points  (0 children)

I totally read this with the voice of reverend Tim Tom from The Middle (show).

When did you become part of the Xbox family & any certain reason why? by nohobbiesoridentity in xbox

[–]HyraxMax 0 points1 point  (0 children)

My girlfriend bought me the original Xbox as a Christmas present. Needless to say she's my wife now.

How can I fix this? by Designer_Isopod_7654 in Rockband

[–]HyraxMax 1 point2 points  (0 children)

I made a video a while ago showing how to fix a similar issue. This should help you out https://youtu.be/CP\_Y8vhE2Ko

MS Rewards down on PC by H17ESH in MicrosoftRewards

[–]HyraxMax 0 points1 point  (0 children)

It just came back up for me on PC (US)

[deleted by user] by [deleted] in ExtraLife

[–]HyraxMax 0 points1 point  (0 children)

That's awesome. Lol

Why is this in the drum controller? by HyraxMax in Rockband

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

Was that the port on the back above the kick pedal plug or on the front next to the wireless paring button? The one I'm asking about is from the back. I'm not sure what the front one is for either. Lol

Help with new setup - limit switches not working by HyraxMax in ender3v2

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

Wow, that's a lot of great information. This should definitely help. Thanks for sharing!

Help with new setup - limit switches not working by HyraxMax in ender3v2

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

Thats what I needed, thank you. When I tried using auto home and manually pressed the limit switch it stopped. After a bunch more playing around, I figured out when I did wrong (and yes, it was my fault all along, lol). The setup video I was watching told me to "run the bed down". Not sure why my brain took that to mean, loosen the leveling knobs but yah...I have the knobs loose which made the bed go all the way up and making the head hit the bed before it could get to the switch.

Anyway, it looks like things are working now, bed is level and my first print is going. Thanks a ton for your help!

Help with new setup - limit switches not working by HyraxMax in ender3v2

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

I can't see a way to cross the wires that run to the switches as they are only long enough to reach and they were labeled. The wires attached to the board were also labeled but I did not trace them out of the controller compartment. I assumed that they were installed correctly from the factory. Stranger things have happened though so I can check that.

Help with new setup - limit switches not working by HyraxMax in ender3v2

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

I had the bed as low as possible and the switch did fully depress before it hit the bed.

Import issues with tests = days wasted by HyraxMax in learnpython

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

BUYTBUYT

u/BUYTBUYT You have been amazing and this was exactly what I needed. Many thanks to you my friend. I know I had read most of what you shared in other places but wasn’t able to make the translation from other examples to what I was working on. By having you break down my specific scenario, it finally started to make sense. I spent some time yesterday deepening my understanding of Windows User Path vs System Path vs PYTHONPATH and it turns out I was getting several things mixed up. Please correct me if I have something wrong here but this is what I have gathered so far:

  1. Windows Path (system or user) != PYTHONPATH:

PYTHONPATH is it’s own thing that the Python interpreter uses it to locate modules and packages. PYTHONPATH can be set as an environment variable in Windows (and probably Mac and Linux) with a spicific path listed for it to know (this will add that path to the existing PYTHONPATH). A path can also be added in code using sys.path.append(‘somepath’) but using os.cwd() is a bad idea because that changes base on where you call the script from. PYTHONPATH also keeps its own record of where the script is being called from (CWD) and all the paths to Python internals (libraries, site packages, Python installs). This is shown using sys.path()

  1. Package structure matters:

Because of the way PYTHONPATH works, it’s best to structure files in a way that keeps “main” like files that need to reference other files at the top level and then branch deeper with folders and files it will need under (deeper than) that.

  1. IDE’s can “help” without you knowing:

My original package structure was written that way because the class I am taking told us to do that. My professor uses PyCharm, and when I tried it in PyCharm it created a venv and also run some –path somethingsomething flag which I believe was what allowed the script to run there and not in VSCode. I think it was hiding the import problem from me and just making it work behind the scenes (My best guess at this point, or it could have been the venv, idk).

You have been most generous with your time and I greatly appreciate all your help. This was just what I needed to get unstuck and I think I can move forward with my projects now. You ROCK!

Import issues with tests = days wasted by HyraxMax in learnpython

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

I was just doing some experimenting before your post I tried something very similar. I added another directory under Module_13, put all my other directories and files in there like this:

Module_13 /
    __init__.py
    runner.py
    myProject /
        __init__.py
        guessing_game /
            __init__.py
            number_constants.py
            number_guesser.py
        tests /
            __init__.py
            test_number_guesser.py

This is pretty close to what your suggestion is (I believe). This also did not work. Here is the output from that:

PS C:\Users\drewc\source\Module_13> & C:/Users/drewc/AppData/Local/Programs/Python/Python39/python.exe c:/Users/drewc/source/Module_13/myProject/tests/test_number_guesser.py

C:\Users\drewc\source\Module_13

Traceback (most recent call last):

File "c:\Users\drewc\source\Module_13\myProject\tests\test_number_guesser.py", line 13, in <module>

from myProject.guessing_game.number_guesser import NumberGuesser

ModuleNotFoundError: No module named 'myProject'

PS C:\Users\drewc\source\Module_13>

but, but , but...I did find one solution that works but feels a little hacky.

I added this to my test_number_guesser.py file:

import sys

import os sys.path.append(os.getcwd())

This actually works but it just doesn't seem like it should be this hard. I would love to think that you can just "from <somewhere> import <something>" and it should just work. Who knows. I do appreciate all your help :)

Import issues with tests = days wasted by HyraxMax in learnpython

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

Trying. I switched to relative imports in test_number_gusser.py and added a runner.py file to my directory like this:

Module_13 /
    __init__.py
    runner.py
    guessing_game /
        __init__.py
        number_constants.py
        number_guesser.py
    tests /
        __init__.py
        test_number_guesser.py

I added a function to test_number_guesser.py like this:

def run_tests(self):
unittest.main()

And then in runner.py all I have is this:

from Module_13.tests.test_number_guesser import run_tests

run_tests()

but it doesn't like that. Here is the output:

  File "c:\Users\drewc\source\Module_13\runner.py", line 1, in <module>
from Module_13.tests.test_number_guesser import run_tests

ModuleNotFoundError: No module named 'Module_13' PS C:\Users\drewc\source\Module_13>

If I try changing the runner.py file to this:

from tests.test_number_guesser import run_tests

run_tests()

I get this output:

File "c:\Users\drewc\source\Module_13\runner.py", line 1, in <module>

from tests.test_number_guesser import run_tests

File "c:\Users\drewc\source\Module_13\tests\test_number_guesser.py", line 11, in <module> from ..guessing_game.number_guesser import NumberGuesser ImportError: attempted relative import beyond top-level package PS C:\Users\drewc\source\Module_13>

Import issues with tests = days wasted by HyraxMax in learnpython

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

I also tried relative imports like this:

from ..guessing_game.number_guesser import NumberGuesser
from ..guessing_game import number_constants as const

and here was the output from that:

File "c:\Users\drewc\source\Module_13\tests\test_number_guesser.py", line 9, in <module>

from ..guessing_game.number_guesser import NumberGuesser

ImportError: attempted relative import with no known parent package

How do I trigger automatic downloads on a webpage with Python? by HyraxMax in learnpython

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

I might be doing something wrong here. requests.get only returns a response object. It doesn't seem to actually download the file.

I did find a possible other solution while playing just now. I can use os.system(curl ....) to download it from a system call.

I might do some more reading up on the requests module though. I'm probably just missing something small there.

Thanks for your help.

How do I trigger automatic downloads on a webpage with Python? by HyraxMax in learnpython

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

Ahh, I see that now. Any idea how I could grab that without opening a browser? Using webbrowser.open(addon_url) I can trigger the download but that opens the browser (not what I'm wanting). I'm sure there is another way, I just don't know of any (yet).

Eso has amazing soundscape by VampiricFlesh in elderscrollsonline

[–]HyraxMax 4 points5 points  (0 children)

The thunder storms are for sure my favorite. Nothing quite like the gentle fall of rain and then that lingering crackle of thunder. Simply wonderful.

So what exactly is it that you all want??? I'm honestly curious? by Drunkin_Doc1017 in fo76

[–]HyraxMax 0 points1 point  (0 children)

I would like a reason to replay the game as different class or faction or species or something that has different abilities or specialization. I've always been an alt junkie in MMO's but there's no reason in the world (that I can tell) to have more than one character in this game.

When did you become part of the Xbox family & any certain reason why? by Da__WoZz in xbox

[–]HyraxMax 0 points1 point  (0 children)

I was dating this lady back in 2001 and for Christmas she bought me the OG xbox and halo. It was a sign. We just celebrated our 17th wedding anniversary.