Hey @AndrasDeak I made a comment the other day on a Big Bang answer over on physics.SE. The OP raises an interesting point: how do we define a reference frame during those ultra-early epochs when the energy density is insanely high and the particles have so much KE. http://physics.stackexchange.com/questions/314885/what-does-one-second-after-big-bang-mean
Is the issue I mentioned valid, or am I just confused too? :)
I'd need to think about it in ways this wine is hard to square with. :-) Regardless of the particle KE, relativistic or not, you can always subtract off everything (velocity-wise, i mean), so I don't think it's the scale that matters so much. It is kind of a dodge (even though it's a standard one) to bring up the CMB though because that doesn't even show up until awfully late in the game..
@Brandin Good idea. Sorry it took so long. No I'm not familiar with Lambda they introduce it to you for a second then they go into detail in it 2 chapters later, that irks me D:
:) Yeah, it seems like cheating to use the CMB at that early epoch. I guess if we wait a few minutes there's the neutrino background. But I like to use logarithmic time when talking about the BB and on that scale the era of cosmological nucleosynthesis is in the distant future of T=1 microsecond. And I do like my physics to be based on stuff that's potentially observable, even when it's not exactly practical to make measurements. ;)
@Tokencodingnewbie lambda is pretty basic. It's just a light-weight function that can just return the value of an expression. It can't do assignments, but it can return a tuple, list, etc.
There are some minor differences, but you don't need to worry about them at this stage. We don't usually assign a lambda to a name like I did in that example. A lambda is supposed to be an anonymous function, and we mostly use it to pass a function as an argument to another function.
Seems like Kevin is trending > 6 I've broken free of the notebook paradigm entirely by just writing on whatever flat surface is closest to me. - 1d ago by Kevin > 5 I'd prefer a meeting where my entering the room causes the median autism level to drop or stay constant - 1d ago by Kevin > 4 "Hey Gandalf, I haven't seen you in a while. How did that legacy PHP project go?" "Darkness took me, and I strayed out of thought and time, and I w... - 1d ago by Kevin > 3 stackoverflow.com/questions/42587590/… - 1d ago by Kevin ▼
Here is my script http://pastebin.com/f9whcy66 which is using pafy library to download youtube videos but when i download video file there is no audio in it only silent video. can someone tell me why is this so ?
Hi! I'm just programming a selenium python webbot, I run a big loop through a website.. But after some time, the searched element is not getting found anymore and the program stops. How can I solve it and continue running the program?
@AndrasDeak True, but if I see a MCVE I'm much more likely to help the OP improve the question, and if it's a good MCVE it's often possible to make major edits to a poorly written question that won't conflict with the OP's intentions.
Every question can be down-voted. I can downvote something for an arbitrary reason just because I don't like it. The vote is just a summary of the community opinion.
But in the end you can downvote or upvote for any reason. For example if you look at the C questions the most upvoted questions and answers are not really useful, but simply obscure or interesting in some way. Another variation is age. Older => more upvotes. In the end the votes are not really meaningful, they are just part of the gamification.
Yeah, that might the problem, for example right now (I've testing it again), it seems to work pretty good. (I haven't changed anything). That's the problem of web bot coding.
I want to Load Zenmate Firefox Addons when selenium webdriver runs
it runs fine when i run without loading any addons ( extensions ) but having problem while adding any addons .
Here is my Code :
def __init__(self):
self.main_catag_driver = []
self.declare_xpaths()
se...
I don't know how to create the block-list in adblock (with selenium), seems to be very difficult, and it seems also impossible to load a preconfigured firefox session.
Well there are other ways to block ads, like modifying the /etc/hosts file.
Or you could simplify your approach. Write pseudocode for your solution (state your problem first) and in your solution do not refer to "selenium" or "webdriver" or anything like that. Just say what you want to do first.
Do you know if there's a possibility to block special elements, so that they don't get downloaded?
My solution would be a webserver which downloads the site, filters and presents me what I want to see (that is what I would think of) -> But that would be to much effort I think
cbg! I've a list like this: `my_values = [(1,2,3), (4,5,6), (3,2,1), (4,2,99), (45,67,123), (44,55,78), (2,4,466), (5,4,66)]` What is the pythonic way of deleting all the tuples whose 3rd value is less than 99?
The more I read and learn the more I feel like I'm digging into this hole, one that strayed far away from the original exercise. It's very challenging.
@davidism Honestly I don't either, I'm just messing with code snippets from the pyhton docs from their like 2 setence introduction to lambdas
Heres 2 sentences, heres 2 code examples, ok but to actually learn more wait two chapters! Why introduce it to me now! It's so hard to move on if I don't understand something
Instead of using the numeric value to sort it uses the alphabetical with the lambda, but why do you need a lambda for that? Or maybe I'm missing the point.
it's in our local news, but the linked website doesn't make it seem all that active:S
wait what?
> The black hole at the center of the Milky Way - Sgr A* - Located 25,000 light years from us in the center of our Galaxy, Sagittarius A* is our nearest massive black hole with four million times the mass of the Sun. Its proximity makes it the largest apparent black hole as viewed from the Earth.
I thought it hasn't been proven yet that galaxies actually have supermassive black holes in their center
"Ultimately, what is seen is not the black hole itself, but observations that are consistent only if there is a black hole present near Sgr A*. In the case of such a black hole, the observed radio and infrared energy emanates from gas and dust heated to millions of degrees while falling into the black hole ...
... Although other possibilities exist for how these gases emanate energy, such as radiation pressure and interaction with other gas streams, interaction with a massive source of gravity is the simplest explanation."
If I have list of lists, I do this: mylist = [l[:k] for l in mylist] to slice all inner lists. How do I do the same with a Dictionary of lists, initialized as defaultdict(list).
Yes, we understand you are asking something about Django. But your question makes no sense
You are asking to get all objects with name=request.username. sqllite query
what does that even mean?
Please think about how you want to ask your question before asking it. Understandably, english is not everyone's first language. But you should be able to formulate a minimal, complete, verifiable example by putting together a bit more detail to your question.
How can I add colored text to my python code, I have been checking some different methods but none have works so far. Like these: http://stackoverflow.com/questions/287871/print-in-terminal-with-colors-using-python
As the author of Colorama, thanks for the mention @nbv4. I'll try and clarify a bit: Colorama aims to let Python programs print colored terminal text on all platforms, using the same ANSI codes as described in many other answers on this page. On Windows, Colorama strips these ANSI characters from stdout and converts them into equivalent win32 calls for colored text. On other platforms, Colorama does nothing. Hence you can use ANSI codes, or modules like Termcolor, and with Colorama, they 'just work' on all platforms. Is that idea, anyhow. — Jonathan HartleySep 13 '10 at 13:22
you should be aware by now that "I tried stuff but they don't work" is never an adequate starting point for asking anywhere about anything
note that I've never used libraries like this, and I haven't used windows for at least a decade, but otherwise I'd find your inquiry ill-posed
@SebastianNielsen this is not the first time you've had difficulty expressing your issues to the room or interpreting the help you're getting. Before continuing, please read and understand Minimal, Complete, and Verifiable Example and http://www.skidmore.edu/~pdwyer/e/eoc/help_vampire.htm. This is your last warning.
@SohaibAsif Please put together a concise example of what it is you have tried already, and explain the difficulties you are having
What is going on in your attempt
what difficulties are you facing
We should not have to keep reminding you of this
FYI. I have a solution worked out for this. But I'm going to be stubborn about this, and expect you to get in to the habit of meeting the minimal expectation by you, the asker, to put together a coherent MCVE of your issue.
OK......explain what it is doing that it shouldn't do. Explain based on the code you are showing, what is d in this case. Because the data you showed is a snippet. So I don't know what you have already been working with...duuuuuude. You're killing me here.
@SohaibAsif unfortunately, you're not describing your problem well. This is not the first time you've had issues with this. Please review http://stackoverflow.com/help/how-to-ask, http://stackoverflow.com/help/mcve, and http://www.skidmore.edu/~pdwyer/e/eoc/help_vampire.htm before continuing.
>>> a = [1,2,3,4,5,6]
>>> c = 3
>>> for i in a:
... try:
... i/c
... c -= 1
... except ZeroDivisionError as e:
... print(e)
... continue
...
0.3333333333333333
1.0
3.0
division by zero
division by zero
division by zero
Here is something really simple, silly and gets the point across
I probably could have put more thought in to making something passable after the first exception, but you get the idea
Remember that the exceptions will derive from a base class
that will be the base class
for selenium exceptions
However, having such an open exception is also a bad practice. You should really know more about what it is your code is doing so you know what it is you should be catching in that code
if you don't know, then your code could be doing too much
and you might need to break it down and think over your approach