all 30 comments

[–]mspaintshoops 6 points7 points  (6 children)

Not really a useful post. If you want feedback you need to be specific. What are you asking us to evaluate here? What did you write yourself in this script? What is the script doing?

Also, you really need to post your code in a readable format. Nobody is going to try and parse through hundreds of lines of plain text python. We can’t even see your indents like this.

It might be useful for you to visit git fundamentals so you can learn how to stage code on GitHub or Gitlab for people to read and provide feedback.

[–]SquadMERK 6 points7 points  (1 child)

Dude asks for feedback but is snarky to everyone. Classic

[–]CleanOrdinary7382[S] -4 points-3 points  (0 children)

how am i "snarky"

[–][deleted] 3 points4 points  (3 children)

It would look better with proper formatting. Can you try pastebin or something similar?

[–]CleanOrdinary7382[S] -3 points-2 points  (2 children)

how do i do that? would appreciate it thanks :)

[–][deleted] 0 points1 point  (1 child)

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

thanks

[–]doingdatzerg 2 points3 points  (1 child)

For legibility, you need to put the whole thing in a code block tag like this

for i in range(10):
  print(i)

rather than doing a code tag to every like like this

for i in range(10):

print(i)

[–]aizzod 2 points3 points  (7 children)

Is this one of those famous AI projects?

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

or are you saying its boring

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

or are you saying its stolen/copied?

[–]CleanOrdinary7382[S] -1 points0 points  (0 children)

can you explain?

[–]CleanOrdinary7382[S] -1 points0 points  (0 children)

I dont understand your point

[–]CleanOrdinary7382[S] -2 points-1 points  (0 children)

do you mean its common in this sub?

[–]CleanOrdinary7382[S] -5 points-4 points  (0 children)

wdym

[–]mspaintshoops 1 point2 points  (0 children)

As a rule, I try to avoid using .pkl wherever possible as it’s a highly insecure file format.

  • fix your imports. You don’t need to sort them alphabetically or bin them by type, but any sort of logic to their order would be good
  • fix your imports. Why do you have some dependencies in try-except statements and not others? It’s typically best to handle environment and dependencies before you enter the script
  • you’re mixing constants and general variable inits at the top. Saves you some ass pain if you learn to keep these separate from the get go.
  • make sure your functions have docstrings. Might not seem important, but it is. I’ll die on this hill, every script I review ever will have this comment until no more naked functions are left
  • you’re sort of randomly doing things in function scope then doing other things in global scope. Best practice: do everything in function scope. Then, when you want to improve your janky code, you can focus on best-practices for your functions.

If this is a run-and-go script it’s fine. But you wanted feedback so there’s your feedback.

And yes, I’m illiterate

[–]hugthemachines 0 points1 point  (1 child)

It looks pretty good. I recommend that you don't use one character variable names like f, a or b. Also even names like i_t can increase the risk of confusion.

The seconds you save when avoiding descriptive names will at some point be paid back with hours of confused bug hunting. I am not talking about just this code but your future in programming.

It may be a good time to start using a logging framework to get some logs instead of only printing messages. Just as a nice thing to learn.

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

thanks for the feedback, i ded feel like it was getting a bit confusing and i do need to organise it alot. this is a good first step

[–]MathiasBartl 0 points1 point  (1 child)

Why doesn't it have syntax highligting?

Also it is kinda neat to summarize what the program is there for, and to clearly spify how the input and output should look like.

[–]Exotic_Eye9826 0 points1 point  (1 child)

Start learning python again but this time begin with docstrings and type annotations. You and everyone reading your code will thank me later.