combocosmo
Re:Batteries Not Included, or Required, for These Smart Home Sensors
on Wednesday May 06, 2026 @05:12AM (#48034046)
It's a unique idea that I could see being useful in select situations. The reliance on wearable microphones sounds like a downside.
Also I guess this might be annoying for pets that can hear well beyond 20 kHz.
Re:Show HN: European alternatives to Google, Apple, Dropbox and 120 US...
on Friday April 03, 2026 @07:46AM (#47625583)
Can you make some of my repeating settings savable? If I have to send invoices to 5 clients I'd prefer to not have to fill in the same stuff over and over again!
Re:Show HN: An iOS budget app I've been maintaining since 2011
on Tuesday January 13, 2026 @07:54AM (#46600326)
Nice project! I built a CLI budgeting project a long time ago, and what made me stop using my own project was the lack of automated integration with my bank accounts. At that point I had many credit cards, multiple bank accounts, in different currencies, and integrating all expenses was just too much manual work.
I wish financial institutions were better at automated exports of your financial data, given the right permissions of course.
Re:AI Code Is Going to Kill Your Startup (and You're Going to Let It)
on Saturday November 15, 2025 @03:16PM (#45940272)
Of course a bit anecdotal, but not once has either Gemini or ChatGPT suggested me anything with eval or shell=True in it for Python. Admittedly I only ask it for specific problems, "this is your input, write code that outputs that" kind of stuff.
I find it hard to believe that nearly 50% of AI generated python code contains such obvious vulnerabilities. Also, the training data should be full of warnings against eval/shell=True... Author should have added more citations.
Re:Non-elementary group-by aggregations in Polars vs pandas
on Saturday November 16, 2024 @03:29AM (#42155262)
I've always liked scatter solutions for these kind of problems:
import numpy as np
def scatter_mean(index, value):
sums = np.zeros(max(index)+1)
counts = np.zeros(max(index)+1)
for i in range(len(index)):
j = index[i]
sums[j] += value[i]
counts[j] += 1
return sums / counts
def scatter_max(index, value):
maxs = -np.inf * np.ones(max(index)+1)
for i in range(len(index)):
j = index[i]
maxs[j] = max(maxs[j], value[i])
return maxs
def scatter_count(index):
counts = np.zeros(max(index)+1, dtype=np.int32)
for i in range(len(index)):
counts[index[i]] += 1
return counts
id = np.array([1, 1, 1, 2, 2, 2]) - 1
sales = np.array([4, 1, 2, 7, 6, 7])
views = np.array([3, 1, 2, 8, 6, 7])
means = scatter_mean(id, sales).repeat(scatter_count(id))
print(views[sales > means].max())
Obviously you'd need good implementations of the scatter operations, not these naive python for-loops. But once you have them the solution is a pretty readable two-liner.