lru_cache3 1107. I love you, a little , a lot, passionately ... not at all Who remembers back to their time in the schoolyard, when girls would take a flower and tear its petals, saying each of the following phrases each time a petal was torn: "I love you" "a little" "a lot" "passionately" "madly" "not at all" If there are more than 6 petals, you start over with "I love you" for 7 petals, "a little" for 8 petals and so on. When the last petal was torn there were cries .. 2022. 11. 7. FastAPI _ BaseSettings 을 lru_cache 할 때, unhashable type 에러 해결방법 BaseSettings을 사용한 객체를 lru_cache 할 때, TypeError: unhashable type: 에러가 발생할 때가 있다. 정리하면 다음과 같은 상황이다. given FastAPI 에서 lru_cache로 반환하는 BaseSettings 객체를, when 다시 lru_cache를 사용하는 함수가 인수로 받을 때, then TypeError: unhashable type: 에러가 발생함. e.g class Config(BaseSettings): URL: str = Field(..., env="URL") class Config: env_file = "secrets/.env" env_file_encoding = "utf-8" @lru_cache def get_config() -> Confi.. 2022. 10. 26. 1004. Keep up the hoop Alex just got a new hula hoop, he loves it but feels discouraged because his little brother is better than him Write a program where Alex can input (n) how many times the hoop goes round and it will return him an encouraging message :) If Alex gets 10 or more hoops, return the string "Great, now move on to tricks". If he doesn't get 10 hoops, return the string "Keep at it until you get it". Solu.. 2022. 10. 4. 이전 1 다음