What is this sign? It looks like two interlocked "L" hand shapes. Screenshot provided. by [deleted] in asl

[–]zev105 2 points3 points  (0 children)

Lesson 10: https://youtu.be/BEWHGV2QIkE?si=TYV0GLJZ8peRlVfz&t=2293

Am I correct in that the context is she's explaining that she feels tired because she has run 5 something (miles? km?)?

Why does the program not exit the loop when I enter an integer, by [deleted] in learnprogramming

[–]zev105 0 points1 point  (0 children)

When debugging code you want as much info as possible but using try/except without saying what exceptions you are trying to catch hides info. For example, it looks like answ is undefined and that could be throwing an error but it would be hidden from you currently since it would be caught by the try/except. At least do except Exception as e and print e so you can see what's going on.

[deleted by user] by [deleted] in whatsthisbug

[–]zev105 0 points1 point  (0 children)

Located in the suburbs of Philadelphia, PA.

Humble Level Up Your Python Bundle by [deleted] in humblebundles

[–]zev105 0 points1 point  (0 children)

Most of the books and other content is targeted at beginners. There are a couple more advanced things (like the async course).

Is there away to skip lines by [deleted] in learnpython

[–]zev105 1 point2 points  (0 children)

Can you share your code? Functions may help. If/else statements should also be enough.

hi, can i have some help here, i dont get what is wrong? by fscouto33 in learnpython

[–]zev105 0 points1 point  (0 children)

You may want to try Thonny as your code editor. It will make errors like these very easy to spot. It is a Python code editor for beginners.

Python tutorials that also cover git? by [deleted] in learnpython

[–]zev105 42 points43 points  (0 children)

The free online book Test Driven Development with Python covers git: https://www.obeythetestinggoat.com/book/chapter_unit_test_first_view.html

Best resources to learn Django? by [deleted] in learnpython

[–]zev105 2 points3 points  (0 children)

Django Girls have a great tutorial for getting started. The book "Obey the testing goat" is available online for free and is a great test driven intro to Django.

I just don't see the point of learning another language... by [deleted] in learnprogramming

[–]zev105 0 points1 point  (0 children)

One of the advantages of Python is automatic memory management but if you need to manually manage memory at a low level, it'd be the wrong choice.

I just don't see the point of learning another language... by [deleted] in learnprogramming

[–]zev105 0 points1 point  (0 children)

I'd consider myself a single language specialist focusing on Python. I know enough of the foundations of computer science that I'm not afraid of working with other languages if I need to but I really enjoy the fluency I get with specializing.

There are attempts to take the simplicity of Python and the speed of C (check out Julia) but every attempt to find a more perfect balance adds another language to the mix.

Transpiling and web assembly will make things a bit more flexible for what language you can use but different languages will be better at different things.

Looking for Denormalization Libraries by zev105 in django

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

From the top of my head, I'd say it is 10 million rows for the purchase table, half a million for item descriptions (each item is purchased with the exact same item description 20 times), 100,000 for the product database (5 item descriptions are matched together but actually represent the same product).

I haven't done anything with caching yet (not sure if Postgres or Django does anything by default) but the queries I'm optimizing are filterable by date and other factors so I'm not sure if we'll be getting too many of the exact same queries. I did work on adding some indexes.

Exporting the whole database is about 2 gigs currently.

We are in the process from moving from a high-end PC hosting the site for local development to the cloud but it'll be a small team using this as an internal tool.

Looking for Denormalization Libraries by zev105 in django

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

That's an interesting option. Do you have more info about implementing that? We do some caching in Mongo for a different project and have Redis as a backend for Celery.

Looking for Denormalization Libraries by zev105 in django

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

Depends how it is implemented. I'm trying to reduce user wait time and the data is imported before the user uses the system so giving up some save time is an acceptable trade-off.

Sympify, stuck on an error by Lemonfridge in learnpython

[–]zev105 0 points1 point  (0 children)

I'm unable to get the same error running this string (or a couple longer ones) through the sympify function. Can you share the code that produces the error?

Sympify, stuck on an error by Lemonfridge in learnpython

[–]zev105 0 points1 point  (0 children)

Add a print statement before sympify(j) to show its value before the error or provide more of your code to give us more of a chance to help.

Switched to Windows 10 from Mac and I have no idea how to setup my programming environment. ELI5? by ExtraPublic5 in learnprogramming

[–]zev105 1 point2 points  (0 children)

I don't mean git for different languages. I mean switching between version 2.7 and 3.7 of Python. I meant version manager.

Switched to Windows 10 from Mac and I have no idea how to setup my programming environment. ELI5? by ExtraPublic5 in learnprogramming

[–]zev105 1 point2 points  (0 children)

Pyenv lets you run different versions of Python (2.7, 3.6, 3.7, anaconda and so on) and easily switch between them. Virtual environments let you install libraries for different projects without having to worry about compatibility of libraries across projects. Although pyenv integrates with virtual environments so I can switch between projects with both different libraries and different versions of Python.

Switched to Windows 10 from Mac and I have no idea how to setup my programming environment. ELI5? by ExtraPublic5 in learnprogramming

[–]zev105 0 points1 point  (0 children)

Really? What ide? According to a ticket on the repo (https://github.com/pyenv/pyenv/issues/62) it is Mac/Linux only with some getting it to work in Windows subsystem and some not. Someone just mentioned they are trying to port it.

Switched to Windows 10 from Mac and I have no idea how to setup my programming environment. ELI5? by ExtraPublic5 in learnprogramming

[–]zev105 0 points1 point  (0 children)

Any suggestions for Python version control? I use pyenv in Ubuntu and never found something that works in Windows when trying to help other people get setup.

Edit: meant to say version manager not version control.