506 karma · joined May 14, 2016 (10y ago) · 213 submissions
comment 9y ago · link · parent
comment 9y ago · link · parent
comment 9y ago · link · parent
That was possibly the best unix/linux learning experience of my life. Rebuilding /etc sufficient to rescue my files I cared about before a reinstall. Rescue CDs weren't really a thing, USB was a new thing at the time, and I was on dial-up.
comment 9y ago · link · parent
Without Mac OS there'd be no iOS apps (or at least, many fewer). And without Windows there'd be many fewer Xbox and likely Android apps too.
Non-mobile computing is needed until (at the very least) the bulk of development for mobile is done _on_ mobile (hint: I doubt that will happen any time soon).
comment 9y ago · link · parent
If I need a new part for something that's no longer supported, no problem. If I want to test an idea, fine. etc.
comment 9y ago · link · parent
def gen_stats_tech2(dataset_python):
start = time.time()
totals = defaultdict(lambda: (0, 0, 0.0))
for product_id, order_id, quantity, price in dataset_python:
o_count, o_quant, o_price = totals[product_id]
totals[product_id] = (o_count + 1, o_quant + quantity, o_price + price)
product_stats = [
[product_id, num_orders, total_quantity,
round(total_price / num_orders, 2)]
for product_id, (num_orders, total_quantity, total_price)
in totals.items()
]
end = time.time()
working_time = end - start
return product_stats, working_time
950x improvement. I think the former reads more pleasantly and you're likely to do better with something like pypy though rather than dragging the code through the muck.Most improvements are from use of some of the builtins like dictionary's .items method rather than making a getitem call per loop, removal of references to globals (int) since the values stored already have an integer value, removing N calls to append and letting the list-comp manage, and removing a store-then-unpack.
Sadly I don't think the top loop can be reduced in a similar manner because it's self-referential. Still, that made for a fun hour or so, I was really hoping to hit 1,000x improvement :/
comment 9y ago · link · parent
def gen_stats_tech2(dataset_python):
start = time.time()
product_stats = []
# totals = (num_orders, quantity, price)
totals = defaultdict(lambda: (0, 0, 0.0))
for product_id, order_id, quantity, price in dataset_python:
o_count, o_quant, o_price = totals[product_id]
totals[product_id] = (o_count + 1, o_quant + quantity, o_price + price)
for product_id, product_info in totals.items():
num_orders, total_quantity, total_price = product_info
avg_price = total_price / num_orders
product_stats.append(
[product_id, num_orders, int(total_quantity),
round(avg_price, 2)]
)
end = time.time()
working_time = end - start
return product_stats, working_timecomment 9y ago · link · parent
It's like Ford in the 70's with the Pinto, trading off the cost of law suits vs. the cost of a recall.
So, yes. I agree with you in spirit, but not all users are as skilled, or upset, by this as others. And some may actually be lured back in.
comment 9y ago · link · parent
comment 9y ago · link · parent
Shortcuts and money worries may lead to creative solutions, but they just as readily lead to heartbreak and failure.
comment 9y ago · link · parent
Beyond the features they're also very nicely built.
Really not cheap though (for the high end ones I'm talking about). For a _lot_ less money if you weren't bothered about perfection then one of the Dell Ultrasharp displays would likely get you 95+% of the way there.
comment 9y ago · link · parent
Honda Civic SiR II (EG chassis) - Not hugely powerful, but great fun to drive, everything in the right place, fold-flat seats in the rear, plastic clamshell backs on the front seats, small pull-out tray in the rear, 6 speaker stereo, good suspension design, great little engine, rear gate design allows you to fit quite large items in there. An awesome little car from the early 90's.
The MX518 mouse, as mentioned elsewhere.
zip ties. I always have some on me. They've saved me countless times, from securing things in place to replacing a broken jubilee clip on one of my current car's hoses so I didn't have to limp home.
comment 9y ago · link · parent
These days you should get hold of an A600 and Vampire II - http://www.kipper2k.com/accel600.html
comment 9y ago · link · parent
It's sad overall really. The Amiga was a great machine with a fun and easy-to-use/manipulate operating system. Memory protection (beyond weirdnesses like Mungwall etc.) would have been nice.
For such a small team though they did very well. Commodore were desperate for a slice of that DOS/Windows PC pie though and that further drained the coffers :(