int main() {
printf("Hi, i'm syntax highlighted c");
return 0;
}
```
{% endmarkdown %}
{% markdown %}# Python database{% endmarkdown %}
{% py3 %}
counter = dreamii.db["counter"].find_one(counter_name="main_counter")
if not counter:
counter = {"count":0,"counter_name":"main_counter"}
counter["count"] += 1
dreamii.db["counter"].upsert(counter,["counter_name"])
print(f"This page had been visited {counter['count']} times.
")
{% endpy3 %}
{% markdown %}## Python sub process execution{% endmarkdown %}
{% py3 %}
print("List first file of directory using `ls`
")
print("First file: ",system("ls",output=False).split("\n")[0],"
")
print("Memory information
")
print("",system("free -h",output=False),"
")
print("Disk information
")
print("",system("df -h",output=False),"
")
print("Process information
")
print("",system("ps aux",output=False,stderr=True),"
")
{% endpy3 %}
{% endblock content %}