Skip to content

Commit

Permalink
spotlight
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhumber committed Mar 13, 2020
1 parent 59fa2bb commit 0d76068
Show file tree
Hide file tree
Showing 26 changed files with 67,267 additions and 24,615 deletions.
Binary file added 0-recommender-slides.pdf
Binary file not shown.
2,945 changes: 2,771 additions & 174 deletions 02-lightfm.ipynb

Large diffs are not rendered by default.

1,078 changes: 1,078 additions & 0 deletions 03-spotlight.ipynb

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions data/alcohol.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
,Old Fashion,Manhattan,Negroni,Margarita,Martini,Whiskey Sour,Beer,Water,Soda Water,Screw Driver
Finn,2,5,,1,5,4,5,5,2,
Marina,2,2,,2,4,,4,5,,1
Aman,5,2,3,3,5,4,3,5,3,
Anita,5,3,3,1,5,3,1,5,,5
Jordan,4,3,,4,4,4,4,4,1,
Ashley,2,2,1,3,2,5,5,5,,2
Michael,2,2,3,3,2,1,5,5,5,
Rittik,5,5,4,3,4,2,4,5,4,
Brandon,5,5,5,5,5,5,1,,,4
Max,4,3,1,4,2,4,4,1,5,
87,806 changes: 63,376 additions & 24,430 deletions data/stars.csv

Large diffs are not rendered by default.

20 changes: 9 additions & 11 deletions data/stars.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_repo_stargazers(owner, repo):
data = response.json()
sg = [s["login"] for s in data]
stargazers.extend(sg)
time.sleep(0.75)
time.sleep(0.1)
return stargazers


Expand Down Expand Up @@ -61,22 +61,20 @@ def get_user_stars(user):
data = response.json()
s = [parse_repo(r, user) for r in data]
stars.extend(s)
time.sleep(0.75)
time.sleep(0.1)
return stars


if __name__ == "__main__":

# uncomment for full script
owner = "maxhumber"
repo = "gazpacho"
stargazers = get_repo_stargazers(owner, repo)
gazpacho_stargazers = get_repo_stargazers("maxhumber", "gazpacho")
gif_stargazers = get_repo_stargazers("maxhumber", "gif")
stargazers = list(set(gazpacho_stargazers).union(gif_stargazers))

all_stars = []
# for user in tqdm(stargazers):
for user in tqdm(stargazers[:3]):
for user in tqdm(stargazers):
all_stars.extend(get_user_stars(user))
time.sleep(0.75)

# df = pd.DataFrame(all_stars)
# df.to_csv("data/stars.csv", encoding="utf-8", index=False)
import pandas as pd
df = pd.DataFrame(all_stars)
df.to_csv("data/stars.csv", encoding="utf-8", index=False)
Binary file removed images/about_max.png
Binary file not shown.
Binary file removed images/cat_and_mouse.jpg
Binary file not shown.
Binary file added images/cb-filtering-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cb-filtering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cf-filtering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/de4ds.png
Binary file not shown.
Binary file removed images/gazpacho.png
Binary file not shown.
Binary file removed images/halloween.png
Binary file not shown.
Binary file removed images/influenster_index.png
Binary file not shown.
Binary file removed images/influenster_skittles.png
Binary file not shown.
Binary file added images/knn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/matrix-factorization.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/movie-features-matrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/mvml.png
Binary file not shown.
Binary file removed images/open_source.png
Binary file not shown.
Binary file added images/user-movie-matrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/utility-matrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added model.spot
Binary file not shown.
Binary file added presentation.key
Binary file not shown.
22 changes: 22 additions & 0 deletions spotlight_environment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
####Spotlight

Install conda kernels (in your main environment)

```
conda install nb_conda_kernels
```

Create a 3.6 environment with Anaconda:

```
conda create -n spot python=3.6
conda activate spot
conda install -c anaconda jupyter ipykernel pandas nb_conda_kernels
conda install -c maciejkula -c pytorch spotlight
```

To get out:

```
conda deactivate
```

0 comments on commit 0d76068

Please sign in to comment.