flutter clean
flutter pub get
# remove `*.g.dart`, only for macOS
find . -type f -name "*.g.dart" -print0 | xargs -0 rm
dart run build_runner build -d
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
| ; ============================================= | |
| ; ----- Move ----- | |
| Space & h:: { | |
| Send "{Blind}{Left}" | |
| } | |
| Space & j:: { | |
| Send "{Blind}{Down}" | |
| } | |
| Space & k:: { | |
| Send "{Blind}{Up}" |
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
| """ | |
| UPDATE: Please see https://github.com/Hu-Wentao/st_tools?tab=readme-ov-file#pathfilefolderselector-st_path_selector | |
| """ | |
| import os | |
| from typing import Callable, Any | |
| import streamlit as st |
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
| from streamlit_js_eval import streamlit_js_eval | |
| def get_timezone(component_key='TZ') -> str: | |
| """get Timezone | |
| :returns 'Aisa/Shanghai' """ | |
| return streamlit_js_eval( | |
| js_expressions=f'Intl.DateTimeFormat().resolvedOptions().timeZone', key=component_key) |
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 set_logger(log_level: str): | |
| import sys | |
| from loguru import logger | |
| logger.remove() | |
| logger.level(log_level) | |
| logger.add( | |
| sys.stdout, | |
| format='<green>{time:YY-MM-DD HH:mm:ss}</green>| ' | |
| '<level>{level}</level>| ' | |
| '<cyan>{module}:{function}:{line} ({process}) </cyan>' |
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
| from typing import Callable, Any | |
| def tool_s_state(update, k: str, init: Callable[[], Any] | Any = None, force_update=False): | |
| """ | |
| :param force_update: force update value, ignore `update` is or not None | |
| :param update: update state value | |
| :param k: st.state_session state key | |
| :param init: init state value or init function | |
| :return: state |
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
| import json | |
| import logging | |
| import sys | |
| from huey.bin.huey_consumer import load_huey | |
| from huey.consumer_options import ConsumerConfig | |
| def run_huey(instance_path: str, config: str): | |
| huey_instance = load_huey(instance_path) |
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
| from bs4 import BeautifulSoup | |
| import pathlib | |
| import shutil | |
| import streamlit as st | |
| CLARITY_SCRIPT = """ | |
| <script type="text/javascript"> | |
| (function(c,l,a,r,i,t,y){ | |
| c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; | |
| t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; |
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
| void main() { | |
| for (int i = 0; i < 5; i++) { | |
| print('hello ${i + 1}'); | |
| } | |
| print("this is end"); | |
| } |
Github Repo: MindBase https://github.com/Hu-Wentao/MindBase
- Author(s): @Hu-Wentao, @wulvqiaochu, @kaiv587
- Last updated: 2022-10-15