- Mountain View, CA
- http://nnjoshi.co
- @theofficialnnj
Block or Report
Block or report narendranathjoshi
Report abuse
Contact GitHub support about this user’s behavior. Learn more about reporting abuse.
Report abusePinned Loading
-
Print every nth element when iterati...
Print every nth element when iterating over large lists - Python 3 1def iterctr(items, n):
2ctr = 0
3for item in items:
4ctr += 1
5if ctr % n == 0:
-
Weighted Choice in Python
Weighted Choice in Python 1def weighted_choice(choices):
2total = sum(w for c, w in choices)
3r = random.uniform(0, total)
4upto = 0
5for c, w in choices:
-
Count Rows in All Tables in PostgreSQL
Count Rows in All Tables in PostgreSQL 1SELECT schemaname,relname,n_live_tup
2FROM pg_stat_user_tables
3ORDER BY n_live_tup DESC;
-
news-article-classifier
news-article-classifier PublicClassfies articles as original (written by an actual human) or fake (trigram language model generated)
Python
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.