I need help in python code analysis [closed] - python

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 6 months ago.
Improve this question
I have to implement a bioinformatics algorithm on Java over cloud. I have been given Python code for the same. I know Java and Hadoop quite well;
However, I have no knowledge in Python. I am looking for a tool so I can analyze the Python code, understand the algorithm and prepare a pseudo code for implementing it in Java. I already looked for some dependency analyzer; however, it didn't help much.
Is my approach wrong? Do I have to learn Python to do this task?
I am willing to work hard on this project, I need the direction. How should I approach this problem?

If you want to understand a program written in python, you should learn python. This will probably be the easiest way, if there is no other description of the algorithm.

Python is a very easy language to learn, plus you barely will have to learn much to just read an algorithm. Python reads like pseudocode.
The trick is, which version of Python to learn? There are two major versions: Python 2 and Python 3. Code written for Python 2 will probably not run in Python 3 and vice versa. So figure out which one you're dealing with first. Probably the best way to find out is ask the person you got the Python code from.
The official Python tutorials are pretty easy to follow, and I'd recommend you start with those.
Python 2: http://docs.python.org/tutorial/
Python 3: http://docs.python.org/py3k/tutorial/
Don't worry about learning a new language. Python is very easy to learn, and you only need to learn a small part of it. I learned almost all the syntax in an evening.

Related

Student Seeking Programming Advice [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 2 years ago.
Improve this question
I am a high school student, and I have just finished 4 free youtube courses on python, along with a "beginners guide to python" book, and I am a little lost. I understood the language quite well and enjoyed learning it. My question is: what do I have to learn in order for me to start designing and building things with python. Just to be clear, I am not talking about complicated things such as websites or machine learning applications. I am talking about simple games and apps so that I can form a better understanding of software development through practical experience. I honestly thought this is where the course and book would get me by now. I feel like my understanding of python is great (for a beginner). I understand all of the fundamental terms and definitions of the language, and I can answer questions other students may have about directories, methods, strings and so on without trouble. I just have no idea where to begin designing and building real things that can test my knowledge as a programmer.
I understand that I have a lot to learn. I just have no discernible vision as to how I can become better without practicing what I learn.
I am grateful for any advice you can provide on how I can resolve this issue, as well as any book recommendations or helpful links for learning resources.
Thank you for your time.
There are lots of fun ways! Try some of Swagart's books (Automate the Boring Stuff with Python, etc). By all means try making a basic web application with Flask. Try making a game with Pygame (Al Swagart's pygame book is good for that). Try interfacing a database directly with sqlite3. The possibilities are endless. Don't stick to just raw python, the best way to get experience is to use external modules and apply your knowledge to them. If you need to write Python for a job they will want you to be using something or other to do something or other and the only way to be able to say "Oh yes I can learn this module you're using for webdev/game/anything" is to have experience learning new modules and use cases.

How do I learn Python as someone who knows MATLAB and C? [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 6 years ago.
Improve this question
I am a graduate student starting to do research in Mathematical Optimization. I have a code for my algorithm in MATLAB (using object-oriented programming) that I want to translate into Python because I feel it'll be a much better language to work with for large-scale data. I am fairly comfortable with MATLAB and C.
My questions are:
1) what would be a good resource to start learning? I want to be able to translate my current code into Python, and the only 'specialized' function I'm using is norm().
2) Is there a recommended editor? I am on Linux Mint.
Thank you.
I would not use Eclipse if you are coming from a scientific background using Matlab, consider using Anaconda, you will need to decide between 2.7 & 3.5 versions.
Both are very, very good. And as far as a great source for learning about programming in Python. Try the Coursera courses online through University of Michigan taught by Charles Severence.
It walks you through a myriad of techniques to manipulate data and build thoughtful python code. the best part is the audit (which is free) allows you to fully participate in the course, including coding samples.
Honestly, I learned simply taking the Code Academy Python Course and by printing out a few cheat sheets then just doing it.

Simulink for Python [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 1 year ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I have been searching and found many libraries (scipy, numpy, matplotlib) for Python that lets a user easily shift from MATLAB to Python. However, I am unable to find any library that is related to the Simulink in MATLAB. I would like to know if such a library exists or something else that resembles Simulink in it's GUI and computation features.
SimuPy is a farily recent framework has similar features as simulink. There is a SciPy 2018 presenation on it.
Until now there is no library like Simulink in Python. The closest match is the Modelica language with OpenModelica and a python implementation JModelica.
Recently I did a quick test with Xcos/Scilab following a tutorial from YT. I was very positively impressed with how good it looks and how easy and intuitive it was for me to use it, since it has been more than 20 years since I last used Simulink in University. (Note that I have never been an advanced user).
Even though the syntax of Scilab is similar to MATLAB (and like Python, quite readable and easy to understand) it even includes a translation tool to convert code from MatLab. (But I haven't tested it)
So, in summary, if all you need is a tool to simulate some engineering problem, I think you should give Scilab/Xcos a try.
Python is a great tool, but it is not the only one!
(You should always pick the "best tool for the problem", not the other way around.
And apparently, "Scilab is able to interact with any code written in Python thanks to its PIMS module." | From: https://wiki.scilab.org/Interoperability )

Starting with Python [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 7 years ago.
Improve this question
Just wondering what the best way to get started learning Python to do backend engineering is and what the best framework to learn for it is (Pyramid, DJango etc...). I have done algorithms in school, build iOS apps and know Java, Scala, OCaml (lol), Racket (lol) and Objective C. I currently have to use Parse for my apps but want to build backend engineering skills. I'm thinking I might as well do the code academy course but the ones I've done from them don't seem in depth enough. Maybe an Udemy course? I want to get good enough to get an internship in backend engineering next summer. Need to find the best resources to do that before then. Thanks!!
While that question is quite open-ended, I personally think using Pyramid right out of the gates was super helpful. One of the pillars of this project is documentation, and their ideology is that you pay for what you use, giving developers the ability to customize their web applications to a good extent. Check out the docs here http://docs.pylonsproject.org/en/latest/docs/pyramid.html!
They also have excellent tutorials that guide you through the traditional "Hello, world!" application, and also more advanced stuff, like how to work with sqlalchemy to utilize databases in your web applications. This is how I learned essentially all of what I know about the framework! I would definitely recommend this, especially if you are just looking to start out and get your feet wet. But, as I said, this is my own opinion, and am sure that there are others with differing opinions on the matter. Best of luck!

Is there any online python exercise? [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 7 years ago.
Improve this question
I am teaching a colleague Python and I think he should do some exercises.
Is there any online available other than python challenge? I feel that python challenge is puzzles, not exercises.
There is now also Google's Python Class, which includes lots of exercise.
Project Euler is a good start.
Probably not what you are looking for, but I recommend the O'Reilly School of Technology Beginning Python course. This appears to be the first of four such courses, and though it is commercial, it's been good for me -- I've been using Python in anger for about two years, but have very little formal background programming. This has been an excellent program that forces me to explore and become familiar with lots of parts of Python I was unaware of, and improving my coding ability and knowledge as well.
there is www.codecademy.com
it has some good exercise for beginners
I use this: http://homepage.mac.com/s_lott/books/python.html
I just finished working through Hacking Secret Ciphers with Python, available as a free PDF. The author supplies some foundation libraries, and then, through a series of chapters exploring some basic ciphers, introduces features of Python. He says he is using Python 3, but most of the features are common in 2.X as well.
If you want exercises, consider breaking out the expository material and assigning the cipher implementations as exercises.
The computer science 101 course at http://udacity.com is a complete curriculum with lectures, problems, and quizzes, but you can jump right into the problem sets without needing to watch the lectures.
Try this and this.
Those are courses taught at my University that use Python. I've used those assignments to demo/teach python to colleagues before
How about Dive Into Python?
(And for 3.x: Dive into Python 3)

Categories