[HN Gopher] Show HN: Similarity = cosine(your_GitHub_stars, Karp...
       ___________________________________________________________________
        
       Show HN: Similarity = cosine(your_GitHub_stars, Karpathy) Client-
       side
        
       GitHub profile analysis - Build your embedding from your Stars -
       Compare and discover popular people with similar interests and
       share yours - Generate a Skill Radar - Recommend repositories you
       might like
        
       Author : puzer
       Score  : 104 points
       Date   : 2026-01-06 13:23 UTC (3 days ago)
        
 (HTM) web link (puzer.github.io)
 (TXT) w3m dump (puzer.github.io)
        
       | puzer wrote:
       | TL;DR
       | 
       | - The Idea: People use GitHub Stars as bookmarks. This is an
       | excellent signal for understanding which repositories are
       | semantically similar.
       | 
       | - The Data: Processed ~1TB of raw data from GitHub Archive
       | (BigQuery) to build an interest matrix of 4 million developers.
       | 
       | - The ML: Trained embeddings for 300k+ repositories using Metric
       | Learning (EmbeddingBag + MultiSimilarityLoss).
       | 
       | - The Frontend: Built a client-only demo that runs vector search
       | (KNN) directly in the browser via WASM, with no backend involved.
       | 
       | - The Result: The system finds non-obvious library alternatives
       | and allows for semantic comparison of developer profiles.
        
         | amelius wrote:
         | This reminds me of the Netflix prize.
         | 
         | https://en.wikipedia.org/wiki/Netflix_Prize
        
         | ashvardanian wrote:
         | Cool project! And thanks for mentioning "unum-cloud/USearch"
         | among repo examples :)
        
       | jrockway wrote:
       | That's actually really neat. It suggested regclient/regclient as
       | a repository I'd like. I looked and, yup, I had no idea that
       | existed and it is a sort of thing I like.
       | 
       | People complain about The Algorithm but it can be useful...
        
         | embedding-shape wrote:
         | When people talk about "The Algorithm", they're not talking
         | about just some function that sorts stuff by X or Y, but an
         | feed optimized for "evil X", usually trying to drive longer
         | attention, or push up engagement.
         | 
         | If GitHub started using the submissions GitStars to recommend
         | repos in people's GitHub feed, I don't think people would get
         | their pitchforks out about "The Algorithm" in that case. But if
         | GitHub started to make the feed so you spend as much time there
         | as possible, by whatever means and potentially irrelevant
         | stuff, then the GitHub feed would start being considered as one
         | of "The Algorithms" by many, would be my guess.
        
       | m00dy wrote:
       | lol
       | https://puzer.github.io/github_recommender/#p=eyJ0IjoicHJvZm...
        
       | mkehrt wrote:
       | Fun fact: cosine similarity's first use in recommendation systems
       | to recommend usenet groups.
       | 
       | (https://dl.acm.org/doi/epdf/10.1145/192844.192905 although they
       | don't call it cosine similarity; they do compute a "correlation
       | coefficient" between two people by adding together the products
       | of scores each gave to a post)
        
         | zahlman wrote:
         | > they do compute a "correlation coefficient" between two
         | people by adding together the products of scores each gave to a
         | post
         | 
         | I've heard the term "cosine similarity" before but not really
         | looked into it. What does this computation have to do with
         | trigonometry?
        
           | Edwinr95 wrote:
           | The dot product is computed between two vectors. For these
           | use cases that dot product is equal to the cosine of the
           | angle between these angles.
           | 
           | (Strictly speaking we have that the angle is actually defined
           | in terms of the dot/inner product in more abstract spaces
           | like function spaces or L^p/l^p)
        
           | armcat wrote:
           | It's grounded in basic trigonometry, i.e. it calculates the
           | angle `theta` between two entities/vectors, `a` and `b`. If
           | `theta` is close to 180 degrees, cos(theta) is -1, and cosine
           | similarity dictates these are opposite concepts, i.e.
           | unrelated.
        
         | yobbo wrote:
         | The Pearson correlation coefficient is covariance normalised to
         | the range [-1, 1] by dividing with the standard deviations (htt
         | ps://en.wikipedia.org/wiki/Pearson_correlation_coefficien...).
         | So not quite same as the normalised scalar product, even though
         | the formulas look related.
        
           | mkehrt wrote:
           | That makes sense; I don't actually know much about this.
           | 
           | That being said, weirdly, the normalization by standard
           | deviation happens _outside_ the call to `cov` in the paper
           | (page 181, column 1, equations (unnumbered) 1 and 2). And in
           | equation 2 they 've expanded `cov` to be the sum of pointwise
           | multiplication of the (scores - average score) people have
           | given to posts.
           | 
           | Again, not my area of expertise, just looking at the math
           | here.
        
             | yobbo wrote:
             | Yes, they are basically the same thing, but for correlation
             | the values are first zero-centred.
        
       | Retr0id wrote:
       | Very high quality "Recommended repos for you" results, the top
       | one was in fact a repo I was looking for a couple of days ago but
       | did not successfully find.
       | 
       | I just wish I could scroll further down the "Similar to you"
       | list.
        
         | ramoz wrote:
         | I would like for the weighting to be stronger (e.g. newness -
         | im still getting fairly stale recs), otherwise yes very cool.
        
         | keeganpoppen wrote:
         | i second the quality. really uncanny.
        
       | jbl0ndie wrote:
       | Excellent. Found me three other stars and one to that I knew from
       | before but hadn't started. Nice!
        
       | embedding-shape wrote:
       | It seems to generate pretty good "Recommended repos for you"
       | suggestions, all of them I've heard and seen before, but for one
       | or another reason didn't use for anything or found a need for.
       | Would be great if it could show more options than just 10,
       | because I'm sure further down the list it'd have interesting
       | suggestions I hadn't seen before.
        
         | lostmsu wrote:
         | Sounds like it actually generates poor suggestions for the
         | reason you are describing. For me, it exclusively suggested
         | repos I've already seen, but did not like.
        
           | travisjungroth wrote:
           | These seems like an inherent challenge to recommending based
           | on stars. Stars are very sparse, so there's little "didn't
           | star this" signal, and there's no "thumbs down".
           | 
           | So you're left with things you "should" star, but there very
           | well could be a reason you didn't.
        
       | armcat wrote:
       | This is so nice, it's essentially a collaborative filter (like
       | Spotify recommendations). It would be awesome to try and embed
       | your repos directly, using some LLM embedding like `text-
       | embedding-3-large` and use that either directly or as a re-
       | ranking/scaling mechanism in the recommendation. You might
       | unearth some other interesting repos or people that are doing
       | similar projects but not necessarily starring similar repos.
        
       | armcat wrote:
       | It would be a good idea to filter out those repos I actually
       | starred - because they are getting a 100% hit (of course they
       | are!).
        
       | ComputerGuru wrote:
       | 99% match to Graydon Hoare and 97% to burntsushi. Could do worse!
        
         | lostmsu wrote:
         | Yeah, but the matches are not reflexive. You are probably not
         | in the matches for them.
        
           | ComputerGuru wrote:
           | That explains it. I was curious because rust is probably
           | about half my list only.
        
       | keeganpoppen wrote:
       | this is amazing! i am a bit of a github star enjoyer, and have
       | always wanted something like this. thank you! it looks like for
       | now you take the most recent 500 stars? i have a bit over 1k (i
       | think?), so i would love the 2.1x on that constraint, but
       | completely understand any desire to _not_ do that. fun project!
       | :)
        
       | swyx wrote:
       | the frontend is beautiful. i find it inspiring that you have 10
       | years of data science and are no longer limited by your lack of
       | frontend or design knowledge. this is a better site than i
       | couldve done
        
       | dmezzetti wrote:
       | Nice application, great work!
        
       | 6r17 wrote:
       | Ok so i've not been using github for the past 2 years; it matched
       | me closed to Salvatore Sanfilippo with subtitle "creator of
       | redis" - and It just happens that I did write a key-val and more
       | generally working on a database in the meantime.
       | 
       | I don't know how to feel about this lmao
        
       | herdrick wrote:
       | Good stuff. Are star count and forks etc. the criteria for
       | inclusion of repos? Lots of repos result in "Repository not
       | found".
        
       | andriamanitra wrote:
       | That's really neat! I found a bunch of cool repositories I had
       | never heard of by looking up my username and a few of my favorite
       | projects.
        
       ___________________________________________________________________
       (page generated 2026-01-09 23:00 UTC)