Skip to content

Instantly share code, notes, and snippets.

@agdemore
agdemore / evolution.sql
Last active June 20, 2025 10:12
Recommend system evolution
-- 1: Select Top-3 tags by user
SELECT
pt.tag_id,
count(pt.tag_id) as c
FROM users_views uv
LEFT JOIN publications_tags pt ON pt.publication_id = uv.publication_id
WHERE uv.user_id = 1
GROUP BY pt.tag_id
ORDER BY c DESC
LIMIT 3
@agdemore
agdemore / syncm.sh
Created May 8, 2019 10:02 — forked from cwsaylor/syncm.sh
Merge master into current branch
#!/bin/sh -x
CURRENT=`git branch | grep "*" | awk '{print $2}'`
git checkout master
git fetch
git merge origin/master
git checkout ${CURRENT}
git merge master ${CURRENT}

Keybase proof

I hereby claim:

  • I am agdemore on github.
  • I am agdemore (https://keybase.io/agdemore) on keybase.
  • I have a public key whose fingerprint is 9440 B8E7 6050 DD77 A4BB 318B 8D4C 7895 0C81 765C

To claim this, I am signing this object: