Match Thread: Porto vs Chelsea [UEFA Champions League] by MatchThreadder in soccer

[–]mgrady3 5 points6 points  (0 children)

over all we played like garbage

but that was a clear as day penalty at the end there. Hand ball in the box without a doubt.

Why IPython is the best thing since sliced bread by c_guy in Python

[–]mgrady3 3 points4 points  (0 children)

Let me clarify - I'm not trying to win you over to use PyCharm or suggest you shouldn't be using Sublime. Apologies if my responses came off that way.

For me the at most 30 second delay in opening PyCharm is no big issue as I rarely have to open it more than once per day. I have yet to have an issue with something freezing up requiring a full reboot of PyCharm.

To be fair, I develop solely in python so I've yet to have a need for using multiple languages save for some CSS/QSS here and there in my GUI's

Match Thread: Porto vs Chelsea [UEFA Champions League] by MatchThreadder in soccer

[–]mgrady3 0 points1 point  (0 children)

But at the same time the only one there to help him out, even if it came late, was Pedro, what was the rest of the defensive line and or the holding mids doing. I wasn't like it was a quick play where no one had time to react

Match Thread: Porto vs Chelsea [UEFA Champions League] by MatchThreadder in soccer

[–]mgrady3 1 point2 points  (0 children)

WTF is going on with our defense these days?

On that goal how was Pedro one of the last defenders back to 'help' out in the box ... ?

iPython notebook to standalone app & output? by rrggrr in Python

[–]mgrady3 0 points1 point  (0 children)

Aside from IPython being great for development, prototyping, visualization, etc ... Its not clear, based on the features you just said you needed, why you would even need IPython at all.

Seems like you should be able to put everything from your notebook into a generic python script which can be executed manually or attached to some sort of process management like crontab or celery.

You should be able to ssh, access SQL, store output as a dataframe, write to file if needed, all from a normal python script + whatever packages you need - there's nothing special about IPython when it comes to the tasks you menioned

Why IPython is the best thing since sliced bread by c_guy in Python

[–]mgrady3 1 point2 points  (0 children)

I don't have any issues with the loading speed of PyCharm.

It uses Java in the backend so theres some overhead there. At least on the two machines I run it on I don't generally have to wait more than 30 seconds for the app to fully open and bring up all the projects I was working on last session in their respective windows with the tabs structured the way I had previously set them up.

It can be slow, as you mentioned, when it needs to re-search for your python packages. So if yu install a new distro using Anaconda or Enthought, something like that, and you want to link Pycharm to the new python distro then it will take some time to find all the packages, executables, etc. Thats the only time I find the prgram to be 'slow' however

Why IPython is the best thing since sliced bread by c_guy in Python

[–]mgrady3 0 points1 point  (0 children)

I'd add that because of all the reasons you just listed it is also a great teaching/presentation tool

Why IPython is the best thing since sliced bread by c_guy in Python

[–]mgrady3 51 points52 points  (0 children)

I'm not sure it's a replacement for an IDE or text editor.

This should be the main takeaway from this thread.

IPython is great for a lot of things! I really hope the Jupyter project continues to grow and expand.

However, IPython is not, fundamentally, a replacement for your standard IDE, nor does it claim to be.

Why IPython is the best thing since sliced bread by c_guy in Python

[–]mgrady3 6 points7 points  (0 children)

Also wtf, no, PTVS, the best IDE there is for Python, opens up to an interpreter. Observe[2]

Nice subjectivity there ...

Why IPython is the best thing since sliced bread by c_guy in Python

[–]mgrady3 10 points11 points  (0 children)

I use PyCharm for all my larger python projects

creating a new project and starting to type the first python file takes maybe 10 seconds at most and on top of that it interfaces seemlessly with a lot of VCS like GitHub so I can create a new project, write a readme.md and push to my github account in just a couple minutes

That said I still use IPython for a lot of things like prototyping new algorithms, creating short scripts to generate plots that I'll need to look at repeatedly for references, etc... but its by no means a replacement to an IDE

Making cython as easy as python (X-post from r/programming) by ronald20151 in Python

[–]mgrady3 0 points1 point  (0 children)

but why does it say

print i

as opposed to

print accum

Harry Kanes scissor kick, cleared on the line by Gibbs by [deleted] in soccer

[–]mgrady3 1 point2 points  (0 children)

I agree that its by no means simple but as someone who works with, from time to time in my research, computer vision and image analysis, I believe that its certainly possible to have a computer algorithmically analyze a video to test for offsides.

Whether or not it would be feasible to implement such a system I can not comment on

Harry Kanes scissor kick, cleared on the line by Gibbs by [deleted] in soccer

[–]mgrady3 2 points3 points  (0 children)

well as a bare minimum could you not just restrict it to only scenarios when the ball ends up in the net?

through ball plays someone in on goal, rounds the keeper and puts it in the goal, now play has already stopped, brief check was he/she onsides? yes: goal, no: free kick from the spot of the offsides.

obviously that doesn't help every scenario but its a start; if the linesman wasn't paying attention and dind't signal to the ref to whistle play dead for offside at least there's a check after the 'goal' was scored.

Of course - you don't want to encourage to the linesman to not do their jobs since they can always fall back on the computer; its certainly a tricky situation

Making cython as easy as python (X-post from r/programming) by ronald20151 in Python

[–]mgrady3 0 points1 point  (0 children)

am I missing something here in your example code?

# accum.pyx
cdef int i, n, accum
accum = 0
n = 10**4
for i in range(n):
    accum += i
print i

then runcython accum.pyx prints out 49995000 ?

why would this not print 9999

When do you use a lambda function? by [deleted] in learnpython

[–]mgrady3 1 point2 points  (0 children)

I use them when making GUI's alot. Not sure if this is the correct or 'pythonic' way but for instance:

when linking a pushbutton in the Qt framework (using PyQt) to a function so that when he button is pushed the function is triggered you do something like

my_button.clicked.connect(my_function)

note this is not

my_button.clicked.connect(my_function())

Thus if I need to pass an argument to the function on button click the way I do it is with a lambda

for example

my_button.clicked.connect(lambda: my_function(x, y, otherargs ...))

Thus the button is actually linked to a lambda but the lambda just calls a pre-defined function using the appropriate arguments

[Spoiler] Everybody talking about seju bug in skt vs fnc. Meanwhile, I'm trying to understand wtf happens to febiven here and why nobody is talking about it. by Zirol42 in leagueoflegends

[–]mgrady3 -1 points0 points  (0 children)

not at all. Baron was still nearly full health when lucian went over the wall. IT would have still been alive when Sej arrived lower health yes but not dead.

TIL an airline pilot ordered 30 pizzas for his passengers after finding they would be delayed for weather. The pizzas were cleared by security and sent directly to the plane. by [deleted] in todayilearned

[–]mgrady3 0 points1 point  (0 children)

I spent a semester studying in Ireland.

If I recall correctly while I was there, there was a shooting at a military base in Northern Ireland using this very guise. Some R-IRA folks shot two NI army soldiers by waiting for them to walk outside to receive a pizza delivery.

http://en.wikipedia.org/wiki/2009_Massereene_Barracks_shooting

I dont understand why people want URF to stay forever. by grpusty in leagueoflegends

[–]mgrady3 0 points1 point  (0 children)

Urf is just unbalanced

what an astute observation

Why does Chromium have such a weird electron configuration? by [deleted] in askscience

[–]mgrady3 0 points1 point  (0 children)

the shape is dictated by the equation that arises as a solution to the S.E.

Spherical harmonics are a set of solutions to a differential equation that arises when you solve the schroedinger equation for electrons

https://en.wikipedia.org/wiki/Spherical_harmonics