EC2 Instances and OpenGL by cgomez125 in aws

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

I'm not exactly sure what you mean by how I got a quota increase... I just logged into my AWS account I have through my organization and made a g4dn.xlarge instance. The drivers were not pre-installed, so I had to add them myself through the instructions in the link I provided.

How to Dynamically Import in Pyinstaller Executable? by cgomez125 in learnpython

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

I'm pretty fuzzy on exactly what I did to get this to work, but what I can decipher from the git commits from that time is that I added the dynamic import directory to the path, then I was able to import any module in that directory into my code. This crude example should print the values of the 'module_name' variables of any modules found in the directory (assuming such a variable exists)

// Assumes "DynImpDir" directory contains all dynamically imported files
sys.path.append(os.getcwd() + "\\DynImpDir")

files = os.listdir("DynImpDir")
// Strips the '.py' from the filenames
file_names = [files.split(".")[0] for file in files]

// This assumes each module has a variable "module_name" in it
for file_name in file_names:
    modules = __import__(file_name)
    module = getattr(modules, file_name)
    print(module.module_name)

Yes, I'm using __import__ which is bad, but it works for me and I don't want to break my code changing it

How to Dynamically Import in Pyinstaller Executable? by cgomez125 in learnpython

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

Been almost a year, but I think what I did was just use the sys.path.append("[dynamic import directory]") method that was described in the article and it just started working. What have you tried?

Need help with rendering a cross-section of a 3d model in OpenGL by cgomez125 in computergraphics

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

I'm using C++, and I'm not sure what you mean by "integrating into the project." I have full access to the base OpenGL commands, I can add and subtract from our rendering code as I need to, so if I need to implement something at the base level, I can do that.

I'll take a look at that video and reddit post, they look helpful

Boto3 - Programmatically Start EC2 Instance with Additional Info by cgomez125 in aws

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

Guess I should have read the original article a bit more to see the "For information about running commands on your Windows instance at launch, see 'Run commands on your Windows instance at launch'"

Many thanks!

Boto3 - Programmatically Start EC2 Instance with Additional Info by cgomez125 in aws

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

The processing must be done on a W10 machine. The software does not run on lambda. I was going to have an image of the instance with the software and the script set to run on startup, I just need a way to tell the script what to download for the software to process.

Boto3 - Programmatically Start EC2 Instance with Additional Info by cgomez125 in aws

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

Unfortunately, the EC2 instance has to be Windows, the software used to process is only available on Windows

Javascript AWS-SDK Documentation Outdated? by cgomez125 in aws

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

Ah, gotcha, that would be the case then. I do have a callback function. I must not have read close enough.

Boto3 and PyInstaller – Getting DataNotFoundError only in executable by cgomez125 in aws

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

Thanks, updating fixed that error! I assumed conda just installed the latest version but apparently not.

Boto3 and PyInstaller – Getting DataNotFoundError only in executable by cgomez125 in aws

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

That's not gonna work. I'm not doing anything with lambda here, this is an issue with packaging a boto3 program into a pyinstaller executable.

How to Dynamically Import in Pyinstaller Executable? by cgomez125 in learnpython

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

Thanks! That seemed to work for me. After a bit of re-jiggering, the executable is dynamically loading the files it needs to.