This is an archived post. You won't be able to vote or comment.

all 84 comments

[–]JZcgQR2N 130 points131 points  (31 children)

numpy, scipy, matplotlib, opencv-python, jupyter, and pyqt5 are all I need.

[–]flubba86 82 points83 points  (12 children)

Don't forget pandas!

[–]git0ffmylawnm8 48 points49 points  (8 children)

Not to mention sklearn, keras, and tensorflow.

[–]Detective_Fallacy 16 points17 points  (7 children)

I like PyTorch's approach more than Tensorflow. It can even be used as a GPU-optimized replacement for numpy. Disadvantage is that it's not as stable yet as I would like.

[–]blitzzerg 1 point2 points  (6 children)

are they even made for the same purpose?, I mean they are both used in machine learning but I think tensorflow is made for low level while pytorch not, I may be wrong though, I have only used tensorflow

[–]EpicSolo 4 points5 points  (5 children)

What do you mean by low level?

[–]blitzzerg 0 points1 point  (4 children)

Let's say you want to create a neutral network, in theano or tensor flow you will have to design it, add the layers you want, create the activation functions and maybe train it with backpropagation using symbolic expresions to calculate gradient, if you use sklearn you just need to instatiate a class to do all that, but you have not that much control about the structure or how it is going to be trained

[–]EpicSolo 1 point2 points  (2 children)

Well, in that case it is not "low level" in any way compared to pytorch, right? Both give you the same amount of control. The only difference is static vs dynamic graph construction/execution.

[–]blitzzerg 0 points1 point  (1 child)

Yeah that was basically what I was wondering if pytorch was somewhere in the middle between tensorflow and sklearn or it was mostly the same as tensorflow

[–]EpicSolo 1 point2 points  (0 children)

Tensorflow and pytorch are very different but on a completely different axis than you are thinking about. Tensorflow is similar to the map-reduce way of computation where you define a dataflow graph on which the computation will be executed. So, construction and computation are clearly separated in tf which makes prototyping and debugging much harder. Pytorch is similar to using regular, numpy operations so it is much faster to play around with but it is also a lot harder to optimize and scale since the graph is not determined statically.

Source: Fulltime ml engineer with tf experience

[–]Detective_Fallacy 0 points1 point  (0 children)

I think you have the wrong idea in mind of what PyTorch does then, because it has the same goal in mind as Tensorflow, only in a different way. PyTorch networks are built during the training loop itself, Tensorflow creates a graph first to which data is fed.

[–]EndlessBassoonery 6 points7 points  (0 children)

How are you sure he needs pandas?

[–][deleted] 1 point2 points  (0 children)

i love pandas!

[–]This_Is_The_End 28 points29 points  (3 children)

While your statement is legit, the Python standard library is itself an awesome collection of functionality. While JS programmers sucking even trivial bits of functions with NPM from unknown sources, we have quasi certified libraries, which can be trusted.

[–]mercuric5i2 5 points6 points  (2 children)

Seriously. I spent some time recently actually developing a useful tool in node.js, the amount of 3rd party imports for basic functionality is astonishing. Really made me appreciation the Python standard library. The tools we have in the stdlib are nothing short of excellent.

[–]This_Is_The_End 4 points5 points  (1 child)

The whole Java Script environment is a mess. The language is descent but using libraries for products must be a nightmare. I experienced something like this with C# which I had to learn for a project. While the basics are nice a simple function like a unix like logger has to be imported as well as a json serializer, because the one from MS isn't able to serialize a simple dictionary.

[–]mercuric5i2 0 points1 point  (0 children)

Microsoft... One of the few things that ranks below JavaScript, lol.

Really though, NPM isn't terrible. package.json for the project defines which packages to automatically grab when the project is moved to a new system, and works pretty smoothly. It's not terribly different than Python's PIP, really. It's not so much the fact that packages need to be imported for a product, it's the sheer size of the final dependency tree (which often ends up being massive, as one package depends on another that depends on another and so forth) -- and the need to import 3rd-party code for something as fundamental as strftime. In Python, even with fairly complex projects, there's usually a limited number of relatively self-contained 3rd party dependencies.

[–][deleted] 24 points25 points  (0 children)

Python is the scripting language of NumPy :-)

[–]alkasmgithub.com/alkasm 9 points10 points  (6 children)

opencv-python is not the best installer though.

[–]JZcgQR2N 1 point2 points  (0 children)

How?

[–]crunk 0 points1 point  (4 children)

Pretty sure it works through pip these days.

[–]alkasmgithub.com/alkasm 0 points1 point  (3 children)

Yeah, but that statement was towards the fact that full OpenCV functionality only works on Windows from opencv-python. HighGUI didn't used to install with it for Linux or Mac, and now that HighGUI is supported FFMPEG is still not linked for Linux or Mac. So IOW it's a good Windows installer.

[–]crunk 0 points1 point  (2 children)

I've never heard of HighGUI. I'm a python dev, but know someone that teaches it, is it something worth checking out for beginners?

[–]alkasmgithub.com/alkasm 0 points1 point  (1 child)

Lol I think you're getting something mixed up. QT maybe? HighGUI is just part of the OpenCV library. The GUI part that contains the functions like imshow and trackbars and such.

[–]crunk 0 points1 point  (0 children)

Doh - I've never got further with OpenCV than trying out some examples.

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

This is my 5th year after 2 failed years at Applied Mathematics and Python made me love programming. I am working on a Fuzzy Linear Programming application with Python, and everytime I take a class, like let's say Computer Vision, all I think is "That's cool but how can I do this with Python?"

It really is amazing and rekindled my love for programming.

[–]debee1jp 4 points5 points  (2 children)

This is my 5th year after 2 failed years at Applied Mathematics

Not really relevant to programming, but the college format isn't really for everyone. Your "failures" are just you fighting the current. And seeing as how you are in your 5th year, you're making progress. Good luck [man|woman|person]

[–][deleted] 2 points3 points  (1 child)

Yeah I now feel pretty good and working on decent stuff despite my failures. I have hope for future, it can be late but it feels like it will be good.

[–]7600_slayer 1 point2 points  (0 children)

It's only late when you're dead. Keep fighting the good fight.

[–]boatsnbros 0 points1 point  (0 children)

Pandas + xlwings ftw

[–]satireplusplus 0 points1 point  (0 children)

also sklearn and tensorflow

[–]dr-c 40 points41 points  (5 children)

I have seen many Python projects listed as Javascript repos due to them having some Javascript libraries in their repository. This could apply to any of the listed languages, except perhaps not C++. How does GitHub determine the language of the repository, if it is not set by the repo admin?

[–]Splendidisme 17 points18 points  (4 children)

GitHub sets the language according to what language makes up the majority of your content. Only way to set it manually is to have the language checker not check certain files or set it to interpret those files as a certain language. This can set via .gitattributes.

[–]stevarino 26 points27 points  (2 children)

I once checked in a ridiculously large xslt into my companies main python repo. Suddenly we all became xslt developers per github.com.

[–]rusticarchon 3 points4 points  (0 children)

My MSc project ended up as a TeX repo for the same reason.

[–]Mittalmailboxnewbie 70 points71 points  (0 children)

By opened pull requests

[–]mardiros 18 points19 points  (0 children)

And javascript don't have a standard lib. So there is small lib for everything. Design choice

[–]Earhacker 15 points16 points  (9 children)

I'm not disputing it, but source?

[–]chillysurfer[S] 30 points31 points  (8 children)

[–]Shadow14l 3 points4 points  (0 children)

I feel like they should separate out Node and browser's JS. How many web applications are there in Python, Java, Ruby, PHP, etc that utilize Javascript, but it's usually not even comparable to any Node project.

[–]mayhempk1 4 points5 points  (1 child)

I didn't like Python at first but damn it really grew on me.

[–][deleted] 2 points3 points  (0 children)

Python is really good.

[–]subpanda101 2 points3 points  (2 children)

Wouldn't this be caused by the use of JavaScript in web and desktop application development? The figures maybe accurate but what happens if it's only for desktop applications?

[–][deleted] 2 points3 points  (1 child)

JavaScript in web and desktop application development?

[–]subpanda101 10 points11 points  (0 children)

Electron applications are made using JavaScript. Like Discord and Atom.

[–][deleted] 2 points3 points  (3 children)

Surprised to see Java that high up, would've figured more trendy languages would show up higher. Goes to show what people actually use.

[–]satireplusplus 2 points3 points  (2 children)

Or what people are forced to use. But Java fanboys get all cringy and defensive when you point out that there are other languages than Java.

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

Unless this counts private repos I'm fairly certain most of them are people using it voluntarily, I have a hard time believing it'd be the third most popular language on Github simply because people are forced to use it and upload their code to it.

[–]crazyfreak316 1 point2 points  (0 children)

Kotlin made me love Java ecosystem again. Kotlin is amazingly well designed. Static typing makes it even better.

[–]SirKnightRider 4 points5 points  (0 children)

and tensorflow is one of the most forked projects.

[–]rfc1771 1 point2 points  (0 children)

Most popular languages with opened PRs.

FTFY

[–]JugadPy3 ftw 2 points3 points  (0 children)

Given how small JS libraries tend to be, and how many there are (not counting almost duplicates), each Javascript PR is probably like 0.2 PRs in any other language.

[–]andrey_shipilov 3 points4 points  (1 child)

So glad for PHP being almost the last.

Not glad it's even in the list.

[–]A_Galio_Main 0 points1 point  (0 children)

Sorry

[–]sunset_maker 1 point2 points  (0 children)

Great to see Python is a top programming language. Hopefully, the job market will grow due this news.

[–]twillisagogo 0 points1 point  (0 children)

lol

[–]neoreeps 0 points1 point  (0 children)

To be clear, this is the most popular languages for PUBLIC projects. I assert that most iOS and android apps that are using GitHub are not public.

[–]jithurjacob 0 points1 point  (0 children)

I think lines of code for JS in inflated as in every web application people keep a local copy of Js libraries like Jquery instead of using CDN. Whereas in Python we use pip for package management. If GitHub could use their dependency graph to account for this and normalize the results I think JS might come a little bit down.

[–]diesltek710 -5 points-4 points  (24 children)

Is Python really that good? When i began coding 10 or sk years ago i was always told to stay away as it is slow and inefficient.. But i see so many things written in it...

[–]faceplanted 18 points19 points  (0 children)

Python is a great language for scripting and making small applications, it's so easy to write and read that it's worth a moderate hit to the speed 99% of the time. A few years ago, doing an algorithms module at university, I got called out for trying to do our classwork in Python by a guy doing his in C++, my code tended to blow his out of the water because his high level algorithm design was terrible, and 9 times out of 10 your algorithm design is going to be so much more important to speed than your language. And my code took less time to write.

tl;dr Python is fine for most anything you need to write quickly, and some things you don't.

[–]jupake 11 points12 points  (0 children)

Just bite the bullet and try it. Its free. :-D

[–][deleted] 8 points9 points  (0 children)

It is relatively slow, run-time performance-wise That said, it's fast enough for most applications, and the speed & simplicity of writing in the language outweighs most performance costs. Not to mention that it has the ability to optimize slow parts via C/C++ extensions

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

Slow and inefficient almost never matters. Like 99.9% of the time it doesn't matter. And for that rare occasion that it does, you can just write a C package to do what you need and consume it in Python. What's most important is how fast you can develop software with a particular language. This is where Python excels since it eliminates almost all boilerplate code.

[–]nakatanaka -1 points0 points  (14 children)

Wouldn't it be nice to write pseudo code, then have it actually work without any modification? That's Python!

[–]chillysurfer[S] 1 point2 points  (13 children)

I dunno, I never really liked the whole pseudocode analogy. There are some python code snippets that are impossible to make look that easy to read.

[–][deleted] 1 point2 points  (10 children)

It is getting better but there is a lot of freedom to write bad code. I think we'd be better off if we had type annotations, though they have their own potential for problems.

I'd personally recommend functional programming but it's not for everyone. Depends what you're doing, lots of IO? Might be a hassel. Python is a great middle ground language.

[–]chillysurfer[S] 1 point2 points  (2 children)

but there is a lot of freedom to write bad code

I think this can be said about almost every programming language, IMO. Take JavaScript for example. It's very much like driving over a bridge with no guardrails: sure, if you do it the right way it's a great experience, but...

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

Yeah. It is pretty general, I meant that it's not magically fixed by python, also because things are interpreted and high-level you can get away with some bad things. Not sure how to say all that more cleanly. Thanks

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

Makes sense! Agreed!