-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
|
||
|
||
Things that have lots of downloads, but not much pagerank | ||
-------------- | ||
select id, pagerank/0.0203305158035518609, (num_downloads/14940006.0), num_downloads, | ||
((pagerank/0.0203305158035518609)/(0.00000000001 + (num_downloads/14940006.0))) as r, | ||
import_name, summary | ||
from package | ||
where host='pypi' | ||
and pagerank > 0 | ||
--and num_downloads_percentile > 0.1 | ||
order by r asc | ||
limit 100 | ||
|
||
|
||
|
||
PageRank benefits 1: | ||
if people import ONLY you, you get more love than if they import loads of things | ||
------------------- | ||
select id, | ||
summary, | ||
(pagerank_percentile/(0.00000000001 + num_downloads_percentile)) as r, | ||
pagerank * 1000000 as pagerank, | ||
pagerank_percentile, | ||
num_downloads_percentile, | ||
num_downloads, | ||
neighborhood_size, | ||
indegree | ||
|
||
from package | ||
where host='cran' | ||
and pagerank > 0 | ||
and num_downloads_percentile > 0.5 | ||
and pagerank_percentile > .6 | ||
and pagerank_percentile < .99999999 | ||
order by pagerank | ||
limit 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
update package set unique_import_name=false where | ||
import_name in | ||
(select import_name from | ||
(select import_name, count(id) as c | ||
from package | ||
where host='pypi' | ||
group by import_name) with_count | ||
where c > 1 | ||
) |