Skip to content

Instantly share code, notes, and snippets.

@cnrmck
cnrmck / how_to_lose_a_job_in_10_minutes.py
Created June 18, 2018 01:41
An unsolicited solution to How to Lose an IT Job in 10 Minutes
def distinct_value(word):
"""
add up the hash value of each letter of the given word to create a unique id
for that entry
"""
# make word lower-case
word = word.lower()
hash_val = 0
for letter in word:

The problem of sub 50 rep users being unable to comment is well documented

Many sub 50 rep users have complained about the problem of not being able to comment under the limit. I am one of them. A small sample of these complaints can be found here, here, and here.

The rationale for the 50 rep limit is good: reduce spam

As evidenced by many of the answers to those questions, the problem that this limit is trying to solve is that of spam.

The justification is simple: we don't want the site to be flooded by comments from passers-by. ЯegDwight

The canonical answer to this question is found [here](https://meta.stackexc

@cnrmck
cnrmck / todo.py
Last active March 17, 2022 12:57
To show the total number of todo items, just call `len(api.list_items(listname, user))`
from typing import Sequence, Callable, Iterable, Option
from uuid import uuid4 as uuid
import time
class State:
pass
class User:
def __init__(s, authentication):
try: s.authenticate(authentication):