How to quit Jupyter and become a better programmer? [closed] - python

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am a self-taught programmer coming from a scientific (non-programming) background. I discovered Jupyter early after I started using Python. And although I greatly enjoy using it (Jupyter), I feel that it somewhat hindered my ability to think ahead and write code that will be easy to maintain and interact with in the future.
I inevitably end up with these endless notebooks that are impossible to navigate and mostly consist of redundant code. I then tuck away some of the functions into text files. Make a copy of the notebook, delete a bunch of cells, and start over. Until the notebook becomes unmanageable again, then semi-refactor, make a copy, prune cells, and so on.
I feel that at this point I should learn some basic software design principles and practices (like version control and code organization). Is there a course or a lecture series you can recommend that might help me with that? I feel that any advice from you will be helpful. Thanks!

This will help in learning version control from official Git Documentation
This will also help in Software development philosophies from wikipedia

Try sublime text editor. It is not an IDE but it is really good for coding and has a bunch of useful coding plugins. It is not free but has an unlimited free trial, in which you get all the features, and an occasional popup asking you to buy it. If you download it, you should also use some plugins to help you code python
I personally use these plugins:
Origami, Terminus, Kite & Anaconda
I f you don't like sublime or using a plain text editor, check out visual studio code, idle or thonny.
They are full IDEs (not code editors), and will thus have more features.
IDLE & thonny are beginner's IDEs and Visual Studio Code is a lot more powerful & complex
Now you have your Jupyter notebook replacement on to the version control
Instead of using git, use github. It is built on top of git, and is a lot easier.
If you don't already have a github account then create one. Now you have a version control system going. I am not going to go any deeper because i am not very good at github version control so check out this site

Related

Understanding python development environments ide's, text editors etc [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
So today I spent hours trying to understand why the package I installed using pip install in terminal was giving me an "module not found" error. Which I know is a file path problem. After a lot of tinkering around I eventually pip installed the library on powershell. Like magic it works. To avoid these headaches in the future and to gain a deeper understanding of all things programming does anyone have a book or class they could recommend to understand the circus of ide's, text editors, file paths, kernals, interpreters, compilers etc. I have no idea where to begin and it's really hard trying to troubleshoot these issues when I've never been given any formal instruction on how all these things work together. Is this something learning a language like C would help me understand? FYI Or does this just take pain and years of experience to navigate. FYI I've only taken a few basic college level python courses.
No, this has little to do with the programming language. It’s about knowing your way around your operating system. As such it’s not a good SO question; perhaps you should try superuser or one of the OS-specific StackExchange sites.
But what helps is understanding the command line. When you run “pip”, you need to make sure that the program pip - which is just a Python script - is being run by the same Python interpreter that you’ll be using later when you try to import the module.
Basic advice: find all the “python” and “python3” executables on your system. Pick the one you want, or install a new one. Either way, make sure that the directory containing it comes before any of the others in your command search path, and both names (with and without the 3) are there and point to the same binary file. That way you always know what you’re getting when you run “python” at the shell prompt. Make sure you configure your IDE to use the same one, too. And instead of typing “pip”, type “python -mpip” so that you know it’s at least installing into the same environment you get when you type “python”.

A Real Talk About Python Software Distribution [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I know this is a hot topic and many people ask this question but I have the feeling I am missing something. What is the proper way to make a python application for end-users? Like, old-school offline .exe and so on. Many users won't touch the terminal/shell and to be honest most software these days is incredibly easy to install. What I know so far:
There are packages out there that can make your software ready for redistribution like
pyinstaller, cx_freeze, py2exe
I wrote my fairly complex software in like 2 weeks and going crazy for days over making pyinstaller work with my external packages. Is this pain normal? Have I made a mistake by relying on an interpreted language? Because compiling this stuff is mean business. In many other languages you just build the stuff within the IDE and there you go, built.
I am not concerned that my code might be decompiled, so what I have tried is to just create a .bat file with commands to execute my script with my virtual environment(!) python. Can I just manage to have the Python venv in place with my scripts without the user having to install it himself?
Or what is the "usual" way to do this? Use Cython? Or pyinstaller? Praying to the lord of code?
FYI: I am using Python 3.6.8, Windows 8 (don't you dare making fun of me :D) and Pycharm 2019.2
However thank you in advance for your time, regards,
Arjaan
There is no correct or established way of how to create an executable file for your Python project. It's opinion-based.
And how you want to distribute your software is entirely up to you. It can be source code, compiled, as a docker image, through Heroku One-Click deployment, debian package, all of the above, ???.
Having choices is nice. Some people need a really simple solution then Heroku or an exe file is nice. Some people are Docker power users, then a multi-arch docker image is nice. Some people want to modify the source code than having the source code is nice. Some people like debian packages and want your project with a systemd service file automatically enabled and started.
You might also not put into the work of getting docker/debian/heroku to work and just tell them a step by step guide on how to get it to run.
Debian and Heroku route might require some periodic maintenance due to the Linux distros updating to newer versions.
There is so much to it and it is an endless discussion where noone is right or wrong.

Python for Android [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I had a look at Kivy,but the problem is it needs a virtual machine to run apps. Isn't there a way where python codes are directly converted to java bytecode which can be run by android without any virtual machine? What are the merits/demerits in terms of performance?
May be something in jython which would help?
Try SL4A for running Python code directly on your device. It requires no compiling, conversion to bytecode or virtual machines.
More information Here
Also, you can download an IDE (I've used Eclipse, like in the tutorial you will find on the site), installed a plug-in, created my source files there and then uploaded them to my phone, if you're uncomfortable with writing code on your device.
This page has full instructions on how to package a Kivy app into an APK: http://kivy.org/docs/guide/packaging-android.html
I think some one mislead you a lot or you are confused about how things work with kivy.
I'll take this opportunity to try and make things a bit more clear.
Kivy can be used to build stand alone apk, only if you had searched kivy in google play. This link shows a list of apps that mention kivy, there are a lot more apps there that use kivy and just don't mention that. There is also a partial user maintained list you can look at. You can install the apps from google play and you'd see that they are self contained and don't require you to download anything extra.
There are very easy instructions available on how to build a apk in the link mentioned by #Marcins.
Every python code passes through the python interpreter usually pre-compiled to pyc, that's how python works even Java uses a virtual machine JVM, Android's implementation uses Dalvik VM. You can learn more about the VirtualMachines used in the languages like java/python here. The python interpreter/vm consumes the code and executes it natively, it doesn't convert it to java byte code.
if you need to make something that needs more performance then you can even use cython with kivy to get more speed.

Making GUI applications on Linux/Windows. What languages/tools to use? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
My student group and I are trying to continue working on a project we worked on this semester over the summer to become a professional, deployable app. We originally did it in Adobe AIR but it seems now that the computers this program will be running on will be very slow, maybe 600mhz and 128-256mb ram so flash just isn't going to cut it. It is basically a health diagnosis application that we will be shipping out to impoverished countries.
Now comes the real question. We are wondering what language to rebuild our application in. It has to have a good gui builder associated with it, like adobe flex/air gui builder or visual studio's gui builder but the application should run on linux primarily, and if it can run on windows thats just a plus. We are all students too without really any outside help so whatever we decide to do this in there must be ample documentation available when we hit problems.
Some things we have considered so far are using python and glade or c# and monodevelop, but again we really are not experts on any of this which is why I am asking for help as I would rather spend the time now choosing the right tools instead of wasting time down the line when we hit a roadblock.
Thanks in advance!
I see answers pushing wx and gtk, so I can't avoid pushing Qt, my favorite!-) With a major corporation standing behind it (Nokia), two excellent sets of Python bindings (PyQt and PySide), support for Python 3, the superb Qt Designer, great Mac and mobile support too... it's seriously hard to beat...!-)
The closest thing is probably going to be gtk# with monodevelop. It has a slick, Visual Studio-like ide, and the resulting programs will run on Linux and Windows. The language would be C#. I think this would be the best balance of performance and ease of use.
Alternatively, PyGtk is nice, and you can use Glade for the GUI designer, but it isn't quite as integrated as Monodevelop.
For such low-end hardware I suggest wxWidgets or wxPython, using wxFormBuilder to create dialogs. You can use MS Visual Studio, Eclipse or CodeBlocks as development IDE. The latter two work on Linux well. Alternatively, you can use some simpler programmer's editor like Geany or Kate.
To access really low end computers, and if you have no real graphics requirements, you could consider a text mode interface - curses/ncurses for one.

Looking for a Python IDE with good support for libraries (Twisted) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm looking for a Python IDE that can help me easily locate and manage and use the libraries on my system (Ubuntu). Specifically Twisted.
Code completion is important including the symbols I import.
(I've so far had a look at PyDev as well as OpenKomodo, but while both offer code completion for default Python concepts, I wasn't able to get either to import Twisted into my project and was thus getting reference errors.)
Usual disclaimer: I don't like EMACS or vi, please, nothing regarding those.
Using Wing IDE with Twisted discusses how to debug twisted using their IDE - although unfortunately WingWare is not free.
Are you sure you have given PyDev a fair look? It seems to be the most popular Python IDE, and I have always had good experiences with it in the past.
I've just downloaded the preview of netbeans and it seems to have done quite well so far.
It has detected inherited methods & properties. I haven't had to add a single library reference in my project, so this seems to be the most fluid so far.
eclipse + pydev seems to work well for me.
Just remember to right-click on the project and select Properties and make sure that your libraries are on the path. Sometimes this doesn't happen for easy_installed libraries.
Check out JetBrains PyCharm. It features:
Code completion of any imported library
Good support for unit testing
Refactoring
Debugging
Version control integration
It's built on the same platform as IntelliJ IDEA which is a generally considered one of the best Java IDEs. There's a community edition which is free and open-source.
Like Eclipse is primarily a Java IDE written in Java, you could try Eric which is a Python IDE written in Python. I have had some issues with it in the past but I really enjoy the ability to stop your code at a breakpoint and have access to the python console to manipulate your data or even to inject new functions. PyDev could really use a console like that.
for a small proyects Scribes. Otherwise Eclipse+pydev.

Categories

Resources