2,116 karma · joined August 10, 2007
mb:~ doug$ ./listtuple
The tuple's size is 40028 and the list's size is 40036
Iterating through a 10,000 element list took 0.00113916397095 seconds.
Iterating through a 10,000 element tuple took 0.00111603736877 seconds.
mb:~ doug$ ./listtuple
The tuple's size is 40028 and the list's size is 40036
Iterating through a 10,000 element list took 0.00126791000366 seconds.
Iterating through a 10,000 element tuple took 0.00133585929871 seconds.
mb:~ doug$ ./listtuple
The tuple's size is 40028 and the list's size is 40036
Iterating through a 10,000 element list took 0.00114607810974 seconds.
Iterating through a 10,000 element tuple took 0.00117492675781 seconds. #!/usr/bin/python
from sys import getsizeof
from random import sample
from time import time
l = sample(xrange(10000), 10000)
t = tuple(l)
print "The tuple's size is " + str(getsizeof(t)) + " and the list's size is " + str(getsizeof(l))
s = time()
z = 0
for x in l:
z += x
print "Iterating through a 10,000 element list took " + str(time() - s) + " seconds."
s = time()
z = 0
for x in t:
z += x
print "Iterating through a 10,000 element tuple took " + str(time() - s) + " seconds."
doug@supermicro:~$ ./x
The tuple's size is 80056 and the list's size is 80072
Iterating through a 10,000 element list took 0.00589299201965 seconds.
Iterating through a 10,000 element tuple took 0.00538778305054 seconds.
doug@supermicro:~$ ./x
The tuple's size is 80056 and the list's size is 80072
Iterating through a 10,000 element list took 0.00553607940674 seconds.
Iterating through a 10,000 element tuple took 0.00536203384399 seconds. >>> tuple = (94,)
>>> getsizeof(tuple)
64The following trivial example shows that, at least for very small lists and tuples, except for the fixed overhead of 16 bytes for a tuple vs. 72 bytes for a list they're the same [edit: no it doesn't. I wasn't looking at the diff between a 1-element and 2-element tuple]:
Perhaps there's more to it?
>>> from sys import getsizeof
>>> list = [94]
>>> getsizeof(list)
80
>>> list = [94, 37]
>>> getsizeof(list)
88
>>> list = [94, 37, 21]
>>> getsizeof(list)
96
>>> list = [94, 37, 21, 19]
>>> getsizeof(list)
104
>>> tuple = (94)
>>> getsizeof(tuple)
24
>>> tuple = (94, 37)
>>> getsizeof(tuple)
72
>>> tuple = (94, 37, 21)
>>> getsizeof(tuple)
80
>>> tuple = (94, 37, 21, 19)
>>> getsizeof(tuple)
88I've heard Amex blamed for losing the Costco deal, but given Amex's superlative customer service and Citi's less-than-optimal reputation, maybe Costco will turn out to be the bigger loser.
I suspect you are a careful, conscientious, and responsible gun owner and would have no problem demonstrating this, but there are a lot of people who have guns who are neither careful, conscientious, nor responsible. I hope you won't mind having to demonstrate your competence so that society can stop the other people, the irresponsible ones.
And of course, you might say that even if we had such requirement to demonstrate responsibility, the irresponsible people would circumvent the system and have guns anyway. I'm sure that's true for a few, but it would remove many guns from irresponsible hands and it would give law enforcement a reason to arrest the others and get them off the streets.
The machine I'm using has an Nvidia GTX 970, but I failed to enable CUDA in the TensorFlow installation so it's not using it. When I noticed that I decided just to let it run and then, when it finishes, train it again with the GPU and compare.
In the short term, though, existing reserves are mostly in Argentina, Chile, and Bolivia. I wonder how difficult it would be for a cartel to manipulate pricing?
Congratulations to David, the team, and the NYPL!
The course was video-recorded and I downloaded and saved most of the lectures (and I gave Keith a DVD with a copy of them.) I still have them, but I don't know if it's okay to put them on YouTube or not.
I'm a private pilot with rotorcraft rating as well as frequently a passenger and there's nothing I'd rather not have happen than a DJI Phantom through the windshield, and I don't think the FAA's actions are helping. By attempting to ban actions that are clearly not unsafe they're promoting disrespect for the law and crippling development of the drone industry in the U.S.
What they need to say: no UAVs above 400' AGL or within a mile of airports, or whenever aircraft are operating in the vicinity (without mitigating controls). The commercial/non-commercial distinction is irrelevant.