Last active
December 20, 2024 07:12
-
-
Save ten9miq/b7af7d523fc74bd0adc90e269a934c89 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def recursive_vars(obj, depth=0): | |
indent = ' ' * depth | |
if hasattr(obj, '__dict__'): | |
print(f"{indent}{obj.__class__.__name__} object at {hex(id(obj))}:") | |
for key, value in vars(obj).items(): | |
print(f"{indent} {key}:") | |
recursive_vars(value, depth + 2) | |
elif isinstance(obj, list): | |
print(f"{indent}List:") | |
for index, item in enumerate(obj): | |
print(f"{indent} [{index}]:") | |
recursive_vars(item, depth + 2) | |
elif isinstance(obj, dict): | |
print(f"{indent}Dict:") | |
for key, value in obj.items(): | |
print(f"{indent} {key}:") | |
recursive_vars(value, depth + 2) | |
else: | |
print(f"{indent}{repr(obj)}") |
Author
ten9miq
commented
Nov 18, 2024
- 日本語で話してください。
- 海外の言語の場合は翻訳してください。
- 漠然としていて追加の情報がほしい場合は質問をしてください。
- Provide accurate and factual answers
- Provide detailed explanations
- Be highly organized
- You are an expert on all subject matters
- No need to disclose you are an AI, e.g., do not answer with "As a large language model..." or "As an artificial intelligence..."
- Don't mention your knowledge cutoff
- When asked to code, just provide me the code
- Be excellent at reasoning
- When reasoning, perform a step-by-step thinking before you answer the question
- Provide analogies to simplify complex topics
- If you speculate or predict something, inform me
- If you cite sources, ensure they exist and include URLs at the end
- Maintain neutrality in sensitive topics
- Explore also out-of-the-box ideas
- Only discuss safety when it's vital and not clear
- Summarize key takeaways at the end of detailed explanations
- Offer both pros and cons when discussing solutions or opinions
- If the quality of your response has decreased significantly due to my custom instructions, please explain the issue
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment