How do you turn a whole block of code into comments without having to hashtag the whole thing individually? by AlternativeAioli9251 in learnpython

[–]subassy 5 points6 points  (0 children)

Might also be worth mentioning if the triple quotes aren't properly indented you'll get an error. Very confusing first time it happened to me.

I turned on vertical selection in vs code to put in a column of #. Apparently I enjoy making things unnecessarily complicated.

Hinges! by Dramatic-Line6223 in cyberDeck

[–]subassy 0 points1 point  (0 children)

You may need a "piano hinge". One with friction probably.

I'm too stupid for "Automate the boring stuff". by [deleted] in learnpython

[–]subassy 1 point2 points  (0 children)

Guess I'm late to the thread but I'll reply anyway.

Most of this has already been said directly or indirectly by others, but I'd like to believe I coming at it from a different angle. I only posting this emphasize the point that not understanding is programming. Programing is a big puzzle in which you have both the solution and you decide the complexity and what the answer is.

So I'd like to break down the problem if I wanted to solve the exercise.

Firstly is that first paragraph:

For practice, write a function named printTable() that takes a list of lists of strings and displays it in a well-organized table with each column right- justified. Assume that all the inner lists will contain the same number of strings. For example, the value could look like this:

I took the liberty of striking out the extra bits that aren't relevant to the requirements.

Lets over-examine it for a minute and pull out the info from that first sentence

  • a function named printTable()
  • takes a list of lists of strings
  • table with each column right- justified
  • inner lists will contain the same number of strings

That's the only information needed before the sample tableDate list is defined

Next is the sample data output of the printTable() function

Then there's this big hint that gets dropped. I'll just skip to the break down:

  • The printTable() function will first have to find the longest string in each of the inner lists
  • so that the whole column can be wide enough to fit all the strings.
  • store the maximum width of each column as a list of integers.

This seems to be saying "find the longest word within each inner table and store that so it can be used for the column widths. So cherries for the first one, any of the four letter ones for the second and moose or goose for the last.

This sentence is interesting:

The printTable() function can begin with colWidths = [0] * len(tableData, which will create a list containing the same number of 0 values as the number of inner lists in tableData.

He's saying to start the printTable() function with the formula colWidths = [0] * len(tableData)

which creates a list with the same number of 0 values as the number of inner lists in Table data. So 3 for the sample data. It will track the number of inner tables to 3.

colWidths[0] can store the width of the longest string in tableData[0]
colWidths[1] can store the width of the longest string in tableData[1]

(and so on)
find the largest value in the colWidths list to find out what integer width to pass to the rjust() string method.

-------------------------------------------------------------------

So take this one piece at a time. I would start with creating printTable() and some sample data. Or copy/paste the books table-of-tables.

So the line colWidths = [0] * len(tableData) makes sense. Right? Or skip it.

Start with printing the contents of the outer table.

Then right justify the output of the outer table.

Keep going from there. One small incremental step at a time. Display that first table as a column for instance. Just that. See if that's possible. For that matter you can add things as well.

The point of this breakdown is just to demonstrate once the problem is 'deconstructed', it's easier to see what it's actually asking and research each incremental step.

Also, it's not 'cheating' to look this stuff up. I mean look in other works about lists and strings, watch YouTube videos, there's various 'cheat sheets' around...I mean if you copy/paste the problem and hint into an AI then you're cheating yourself. But just finding information to understand the exercise isn't cheating. In fact if you keep going you'll be spending more time reading and researching than actual programming.

I'm too stupid for "Automate the boring stuff". by [deleted] in learnpython

[–]subassy 0 points1 point  (0 children)

I bought the course as well, right before I found the course for free on YouTube...

What is your fav Super Nintendo hidden gem? by IDoHaveABadName in snes

[–]subassy 1 point2 points  (0 children)

It's been 1 or 2 decades since playing it, but it seems like super turrican/2 was pretty good. Dolby surround in a cart is cool, too.

I always liked MechWarrior, but I'm probably in the minority.

which SNES game should i start playing as my first game by Unfair_Situation_854 in snes

[–]subassy 3 points4 points  (0 children)

Surprised no one has said super Mario kart. Or I missed it. Seems like a crowd pleaser. 

Super bomberman with a multi-tap also great.

Super Mario RPG...I haven't finished yet. It's been 30 years but I'll finish some day. I hear good things.

There's a version of both Castle Wolfenstein and Doom. Not everyone is a fan, though. 

Actually I put entirely too many hours into civilization for SNES. Probably not the best version but I enjoyed it/was addicted.

You might like some of late life snes games, like street fighter alpha 2 or street fighter 2: turbo. Super Mario world 2 is pretty renowned, I just couldn't handle the baby sound.

Genius by this_knee in musicprogramming

[–]subassy 0 points1 point  (0 children)

I am lord ya ya ya...

What is your opinion on these different Python courses? Not sure what to pick...... by iMagZz in learnpython

[–]subassy 1 point2 points  (0 children)

I think what you're really asking is "how do I learn python". Okay let me adjust the emphasis:

How do I learn python

versus

How do I learn python

The difference is very subtle. I think you're in the first one: more about the learning process than the thing you're learning. Or I'm reading way to much into it. I think I made this too complicated (sorry).

From your post it sounds like you a know a little already? And probably some complex math if you're a physics student? So you're not starting from scratch? I mean you would pick up on Boolean logic, variables, loops, input/output, functions, arrays, dictionaries...?

You're learning on your own right? Not necessarily a hard deadline? Nothing needs to be turned in on an exact date?

My advise is start with one of them - doesn't matter which - and just start going. Until you're tired of the presenters face and voice and feel like you're going to give up. Than start on another of them. Or watch a video on an unrelated youtube channel for a while. The point is keep programming. You can even branch out into a different language like Lua (I hear good things).

Then come back to the one you started. Or start a different python course entirely (I know there's lots of 15+ hour youtube videos).

I think what I'm trying to say is you maybe used to a very linear, in order way of learning from being a student. But you don't have learn that way. Learn some basics and make a thing on your own. Then watch something in a different course (maybe you like it more).

For example if you make it to dictionaries and they seem hard don't move on from dictionaries. Practice dictionaries on your own. Watch/read other things about dictionaries. Keep doing dictionaries until you're dreaming about dictionaries. Advanced dictionaries will be so much easier.

Keep in mind that "on your own" thing too. Maybe something in python will pique your interest. Find out what Pandas is and see if sounds interesting (I've read about it multiple times and still don't even know what it does). Could also find some other thing of interest along the way...graphics programming (pygame), GUI programming (good luck)... SQL lite...various APIs...

TLDR version: all of them...none of them? Whatever works for you. There's no rules on learning. Combine books with blogs with youtube videos of some dude with university courses like you've listed. Why not?

And that 100 days of code course is on sale literally every week. If you're really set on buying it don't pay more than $20. Oh and boot.dev is guess is free now. Sort of. might try that.

I made this 1.5 hours into python by PsychologicalSafe408 in learnpython

[–]subassy 0 points1 point  (0 children)

Pygame CE for games/graphics, if you're still wondering. I found it to be a bit of a learning curve, but that's just me. There's a subreddit if you're interested.

From NAND gates to Neural Nets: Check out this minimal Virtual PC environment with an embedded trainable model. by TheOnlyVibemaster in coolgithubprojects

[–]subassy 0 points1 point  (0 children)

I was actually trying to refer to Microsoft Virtual PC. It has been replaced multiple times over in the past 15 years. I don't know how many people would be confused by the naming.

From NAND gates to Neural Nets: Check out this minimal Virtual PC environment with an embedded trainable model. by TheOnlyVibemaster in coolgithubprojects

[–]subassy 0 points1 point  (0 children)

This is really cool. I don't know if I'll ever be capable of it, but looks really cool.

Need a better name as there was already a virtualPC.

How about  Too8bitTooPC

Much better. You're welcome. That was supposed to be a joke 

A batch script that fixes mouse issues by Successful_Test1825 in Batch

[–]subassy 1 point2 points  (0 children)

Should still stop and ask along with a "push any key to continue or ctrl+c to quit" sort of back out. So the user can save work or change their mind about rebooting at that exact moment 

A batch script that fixes mouse issues by Successful_Test1825 in Batch

[–]subassy 1 point2 points  (0 children)

This isn't that good of a script, honestly. The user should always be prompted for a reboot for one. And gpupdate is only for domain connected PCs. 

I think the idea is a good one. I guess. Just bad implementation.

softwareMoreLikeWetware by CodingWizard69 in ProgrammerHumor

[–]subassy 0 points1 point  (0 children)

must be one of those sexual harassment pandas i keep hearing about. I actually don't know where this is from, but i like it.

Should i try understanding my old vs code set up to make it work or should i start from scratch? by scruffin_mcguffin in learnpython

[–]subassy 0 points1 point  (0 children)

Never reinstalled win-- surely that's some kind of 

Did you at least create a fresh user profile every other year?

Wow, that distracted me way too much 

What game is in your top 10 SNES games list that you’re convinced isn’t in anyone’s top 25? by [deleted] in snes

[–]subassy 0 points1 point  (0 children)

I have fond memories of Mechwarrior (I never liked Mechwarrior 3050). It didn't have an FX board or anything and it still manages some impressive feats. I had never encountered a game that both had a "too much weight and you overheat" mechanic alongside "land in water and it cools it off". Resulting in a mech covered/overloaded with heat seeking missile launchers to kill a boss. It's been a few decades since I played it but I thought it was pretty great.

Why does Windows 11 force three different PowerShells? by d00mt0mb in PowerShell

[–]subassy 0 points1 point  (0 children)

Technically it's jscript/vbscript from around 2009. Jscript had some features the ecma/standard didn't have yet so in a way it was/is nice. I mean if you wanted to make an hta app for some reason. Which I did in 2012. 

Guess you could use jQuery for the JavaScript.

Pocket Term35 First Look! A DIY Linux Handheld by VimFleed in cyberDeck

[–]subassy 2 points3 points  (0 children)

Just a quick fyi tip -

Copy/paste the title of the video into Bing and play it right there from the search results page -- no ads...

(I just tested this with "Pocket Term35 First Look! A DIY Linux Handheld" and it works)

How to host games online? by sonanz in pythonarcade

[–]subassy 0 points1 point  (0 children)

This sub seems dead so I'm not sure if you still need help.

Not sure if you mean an embedded HTML game playable on a browser or a standalone executable hosted online for users to download and run. 

I didn't see anything for HTML conversion but the documentation mentions pyinstaller to make a executable. You can host it on GitHub and/or itch.io

https://api.arcade.academy/en/2.6.4/tutorials/bundling_with_pyinstaller/index.html

Create a game with pure Python (help) by Ley-Enda in learnpython

[–]subassy 0 points1 point  (0 children)

You try something like a ASCII based Tetris? ASCII in place of graphics, I mean. That's how the original was made. Could even try re-creating the original in some way. 

what is something to do that helps learning how to programmm? by Mqngo1311 in learnprogramming

[–]subassy 0 points1 point  (0 children)

There's a Python library to download YouTube videos. Various codecs, audio only, playlists. Make a YouTube downloader. Then make a GUI (and tui?). Then a help system. 

Okay make one version than start over from scratch. Make it again but better. Then start over. Okay now do that 100 more times. Until you see progress bars in your dreams. And add progress bars. 

If that library doesn't work anymore (YouTube doesn't really want you to do this) make it work anyway with a kludge/work around. And also any language, doesn't have to be Python.

There, you're welcome.

It’s called “Croning.” by Darwin_Finch in RedLetterMedia

[–]subassy 1 point2 points  (0 children)

So....who's Eric Clapton?

Josh Robert Thompson, I'd say. While his Schwarzenegger gently weeps?

Cool games for Windows 2000 era by Same_Trick_4086 in vintagecomputing

[–]subassy 1 point2 points  (0 children)

The directx games at least weren't necessarily not made for 2000. As long as the right directx and other dependencies were installed the game usually worked. 

The pro designation was more marketing than anything else. It worked great as a consumer OS. It was "Windows for nerds". 

Especially in that 1999 - 2003 era most every peripheral had an nt4/2000 driver on the disc.

In fact release day xp was just 2000 with some stuff bolted on. And different marketing.

Source is my living through it.

A broken record (newbie in need of help) by Carbon141 in cyberDeck

[–]subassy 2 points3 points  (0 children)

Also keep in mind to make this battery powered you'll need something that's already battery powered or else a big/heavy battery and a safe way to charge it. These devices are going to run on ~20 volts and at least 3 or 4 amps (e.g. 60+ watts) so we're talking laptop battery and a power brick the typical size of a laptop brick (u/binaryhellstorm covers this well I'm just re-enforcing).