Tuesday, October 1, 2024

Asking AI to help me decide how to vote for the SF mayor


Can AI help you make better decisions?

I asked Gemini to help me decide who to vote for in the upcoming SF mayoral election by reading through some relevant press coverage. I asked it to focus on four issues and make a recommendation on each issue: housing, homelessness, public safety, and downtown revival.

Here's what I have so far:

Housing

London Breed: Prioritizes "Housing for All," streamlining approvals, rezoning, and supporting housing bonds. (Source)

Mark Farrell: Limited information available. General focus on city revitalization and budget, which could impact housing. (Source)

Asha Safai: Limited policy details available. More research needed. (Source)

Dan Lurie: Focuses on building affordable housing, citing Tipping Point Community experience. (Source)

Aaron Peskin: Advocates for rent control expansion, shelter beds, and neighborhood development. (Source)

Recommendation: Breed/Lurie. Breed's experience and plans are strong. Lurie's affordable housing focus is promising but needs more detail.

Homelessness

London Breed: Increased shelter capacity, helped people exit homelessness, focused on encampments and conservatorship laws. (Source)

Mark Farrell: Wants to clear encampments, increase police hiring, address the opioid crisis. (Source)

Asha Safai: Limited detailed proposals available. (Source)

Dan Lurie: Plans to build more shelter beds, tiny homes, expand Homeward Bound, and designate RV parking areas. (Source)

Aaron Peskin: Supports more shelter and affordable housing, criticizes sweeps. (Source)

Recommendation: Lurie/Peskin. Lurie's plan is detailed. Peskin's focus on long-term solutions like affordable housing is commendable.

Public Safety

London Breed: Focused on reducing crime and drug overdoses. (Source)

Mark Farrell: Wants to fire police chief, hire more officers, deploy National Guard for drug dealing. (Source)

Asha Safai: Limited detailed proposals available. (Source)

Dan Lurie: Limited detailed proposals available. (Source)

Aaron Peskin: Limited detailed proposals, but focuses on supporting neighborhoods and community. (Source)

Recommendation: Farrell/Breed. Farrell's approach is aggressive but raises militarization concerns. Breed's experience may be preferred.

Downtown Revival

London Breed: "30 by 30" plan to attract residents and students, fill storefronts, support businesses. (Source)

Mark Farrell: Limited information, but stresses economic recovery. (Source)

Asha Safai: Limited detailed proposals available. (Source)

Dan Lurie: Limited detailed proposals available. (Source)

Aaron Peskin: Limited information, general focus on small businesses and neighborhoods. (Source)

Recommendation: Breed. "30 by 30" offers a concrete vision, though its feasibility needs review.

Endorsements

London Breed: SF Democratic Party, various officials, community leaders. (Source)

Mark Farrell: GrowSF, SF Firefighters, TogetherSF Action, Neighbors for a Better San Francisco. (Source)

Asha Safai: SEIU Local 87, UFCW Locals 5 and 648. (Source)

Dan Lurie: GrowSF, various officials, community leaders. (Source)

Aaron Peskin: SEIU 1021, various unions, progressive organizations. (Source)



If you're curious, the prompt is something along the lines of:

Please construct a table helping me compare the major candidates running for mayor of San Francisco on major issues. Consider the following candidates: London Breed, Mark Farell, Asha Safai, Dan Lurie, and Aaron Peskin. Focus on housing, homelessness, public safety, and downtown revival as the 4 major issues. Put each candidate in a separate column and each issue in a separate row of the table. For each issue, produce a final column titled “Recommendation” stating who might be the best candidate on that issue (and why). Finally, include a row called "Endorsements" and list any organizations or major public figures that have endorsed the candidate. Please cite your sources and list the URLs you are citing after the table.

Sunday, November 20, 2022

How to get paid less than minimum wage

Netflix has an ad-supported Basic tier for $6.99/mo. The version without ads costs $9.99/mo. The average US adult subscriber spends 30 minutes a day watching Netflix. That's about 15 hours. Netflix claims to show about 4 minutes of ads per hour of viewing. That's 4 * 15 = 60 minutes or 1 hour a month. So you can pay an average US adult $3.00/hr to watch ads for about an hour a month. 

The ad-supported version is a good deal only if you spend very little time on Netflix. In fact, if you value your ad-view time at:

  • the federal minimum wage ($7.25), you should watch fewer than 6.2 hours a month on Netflix Basic with Ads.
  • the California minimum wage ($15.00), you should watch fewer than 3 hours a month (6 minutes per day) on Netflix Basic with Ads.
OK, I'm now going back to watching TikTok videos for $0.00/hr.

Monday, January 3, 2022

Building a great home espresso setup for $600

If you're an espresso drinker, and have wondered if it is possible to make great espresso at home without spending too much money or counter-space, read on.

Why bother?

I live in San Francisco within a 20-minute walk of ~10 coffee shops that make great espresso. For years that was a good enough reason to just make pour-overs at home and not get a home espresso setup. I occasionally wondered how a coffee might taste as espresso instead of pour-over. If you’ve had the same thought, then it might be worth getting a home espresso setup so you have the freedom to make espresso with whatever coffee you buy. I tend to like lighter roasted natural processed coffee that isn’t a very popular choice for espresso at most cafes.

The general advice is to avoid making espresso at home. It can be a nightmare. However, if you don’t need to make milk drinks, are willing to put in a little elbow grease, and don’t want to commit a lot of counter space or money, here’s the setup I recommend. This has served me well through the pandemic, and has yielded many delicious espressos at home for a range of different beans.



Hand Grinder


1ZPresso JE Plus Manual Hand-Grinder. ($239) A hand-grinder is cheaper, and all the money is going into getting high quality burrs. It takes a little over a minute to grind 15g of beans .The JMax  is a little bit cheaper at $199 and is also excellent for espresso if you prefer a unimodal style vs. creamier shots. See reviews for similar options (1, 2, 3). There are several good options at the $250 price-point. 



Espresso Machine

Cafelat Robot ($310). With a manual machine, you’re not dealing with parts that break and/or need maintenance. It also does not need to be plugged into an outlet. The machine is beautiful, and made with fairly high-quality parts. The lever needs to be pushed with some force, but it is something most adults can manage fairly easily. See James Hoffman’s review here.


Scales

You need fairly accurate scales to measure your coffee and the yield (so you know when to stop extracting). These are $12 on Amazon and work just fine.

 

That adds up to about $560 + taxes. In the US, that’ll likely run you a bit more than $600. That’s it. You need a kettle that can boil water, and you should be able to make very good espresso at home. Enjoy!

Friday, June 29, 2018

KDD 2018: Anatomy of a Privacy-Safe Large-Scale Information Extraction System Over Email

I'm excited to share my team's work that will be presented at KDD 2018. Information extraction can be a hard problem, and doing that in a privacy-safe manner from email harder yet. Our paper lays out how to build such a system.




Abstract from the paper:

Extracting structured data from emails can enable several assistive experiences, such as reminding the user when a bill payment is due, answering queries about the departure time of a booked flight, or proactively surfacing an emailed discount coupon while the user is at that store. This paper presents Juicer, a system for extracting information from email that is serving over a billion Gmail users daily. We describe how the design of the system was informed by three key principles: scaling to a planet-wide email service, isolating the complexity to provide a simple experience for the developer, and safeguarding the privacy of users (our team and the developers we support are not allowed to view any single email). We describe the design tradeoffs made in building this system, the challenges faced and the approaches used to tackle them. We present case studies of three extraction tasks implemented on this platform—bill reminders, commercial offers, and hotel reservations—to illustrate the effectiveness of the platform despite challenges unique to each task. Finally, we outline several areas of ongoing research in large-scale machine-learned information extraction from email.

Saturday, February 3, 2018

ICDE 2018: Recommendations for All : Solving Thousands of Recommendation Problems Daily

I'm excited to share that our paper on scaling a recommendation servicewas accepted to ICDE 2018! An ML+Systems perspective.
Recommender systems are a key technology for many online services includinge-commerce, movies, music, and news. Online retailers use product recommender systemsto help users discover items that they may like. However, building a large-scaleproduct recommender system is a challenging task. The problems of sparsity andcold-start are much more pronounced in this domain. Large online retailers have usedgood recommendations to drive user engagement and improve revenue, but the complexityinvolved is a roadblock to widespread adoption by smaller retailers.
In this paper, we tackle the problem of generating product recommendations for
tens of thousands of online retailers. Sigmund is an industrial-scale system forproviding recommendations as a service. Sigmund was deployed to production in early2014 and has been serving retailers every day. We describe the design choices that wemade in order to train accurate matrix factorization models at minimal cost.We also share the lessons we learned from this experience -- both from a machinelearning perspective and a systems perspective. We hope that these lessons areuseful for building future machine-learning services.

Wednesday, January 17, 2018

WWW 2018 : Hidden in Plain Sight – Classifying Emails Using Embedded Image Contents

I'm excited to share that my team's paper on classifying emails using embedded image contents has been accepted to WWW 2018 (aka The Web Conference 2018).

In this paper, we tackle the problem of extracting information from commercial emails promoting an offer to the user.  The sheer number of these promotional emails makes it difficult for users to read all these emails and decide which ones are actually interesting and actionable.  Extracting information  enables an email platform to build several new experiences that can unlock the value in these emails without the user having to navigate and read all of them. For instance, we can highlight offers that are expiring soon, or display a notification when there’s an unexpired offer from a merchant if your phone recognizes that you are at that merchant’s store.

A key challenge in extracting information from such commercial emails is that they are often image-rich and contain very little text. Training a machine learning (ML) model on a rendered image-rich email and applying it to each incoming email can be prohibitively expensive. In this paper, we describe a cost-effective approach for extracting signals from both the text and image content of commercial emails in the context of a free email platform that serves over a billion users around the world. The key insight is to leverage the template structure of emails, and use off-the-shelf OCR techniques to obtain the text from images to augment the existing text features offline. Compared to a text-only approach, we show that we are able to identify 9.12% more email templates corresponding to ~5% more emails being identified as offers. Interestingly, our analysis shows that this 5% improvement in coverage is across the board, irrespective of whether the emails were sent by large merchants or small local merchants, allowing us to deliver an improved experience for everyone.


Thursday, July 6, 2017

KDD 2017 Teaser Video and Paper

Check out the teaser video for our paper at KDD 2017!  The PDF of the paper is available here at the Google Research web site.