使用 Deploy Key自动部署hugo博客到github
1:生成 SSH 密钥 在本地终端生成一个新的 SSH 密钥对: ssh-keygen -t rsa -b 4096 -C "[email protected]" 执行后,它会要求你指定文件名,按回车即可使用默认路径(~/.ssh/id_rsa),然后你会得到两个文件: ...
1:生成 SSH 密钥 在本地终端生成一个新的 SSH 密钥对: ssh-keygen -t rsa -b 4096 -C "[email protected]" 执行后,它会要求你指定文件名,按回车即可使用默认路径(~/.ssh/id_rsa),然后你会得到两个文件: ...
Foreword by Phil Town Warren Buffett says investing is buying an asset that produces cash flow for substantially less than it’s worth, like buying a $ 10 bill for $ 5. She finally did the math and discovered that unless she was willing to be a wage slave for her whole life, accumulating enough money to have choices was nearly impossible without investing. Introduction, or How to Use This Book a market crash is a natural part of the economic cycle that is going to happen whether I want it to or not. Chapter 1: January—Becoming Brave Rule #1 is Don’t Lose Money. Rule #2? Don’t Forget Rule #1. ...
Beginnings “If you reach for a star, you might not get one. But you won’t come up with a hand full of mud either.” Spend less than you earn—invest the surplus—avoid debt. Carrying debt is as appealing as being covered with leeches and has much the same effect. ...
使用 ncnn 布署 pytorch 模型到 Android 手机 编译 NCNN 时要打开显卡支持 vulkan 是针对 gpu 的 -DNCNN_VULKAN=ON MobileNetV3 編譯成 MT 時要打開 CMAKE 0091 特性 cmake_minimum_required(VERSION 3.20.0) cmake_policy(SET CMP0091 NEW) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") project("client-project") 训练 YOLO \Envs\torch\Scripts\activate.ps1 python train.py --batch 6 --workers 2 --imgsz 960 --epochs 300 --data "\Core\yaml\data.yaml" --cfg "\Core\yaml\cfg.yaml" --weights \Core\weights\best.pt --device 0 转换模型 from torch import nn import torch.utils.model_zoo as model_zoo import torch.onnx from libs import define from libs.net import Net from libs.dataset import ImageDataset import os test_data = ImageDataset(define.testPath,False) test_loader = torch.utils.data.DataLoader( test_data, batch_size=1, shuffle=True) device = torch.device("cuda" if torch.cuda.is_available() else "cpu") model = Net(out_dim=19).to(device) model.load_state_dict(torch.load( "./widget/last.pt" )) model.eval() def saveOnnx(): for data, target in test_loader: data, target = data.to(device), target.to(device) label = target.long() y = model(data) # Export the model torch.onnx.export(model, # model being run data, # model input (or a tuple for multiple inputs) "./widget/best.onnx", # where to save the model (can be a file or file-like object) export_params=True, # store the trained parameter weights inside the model file opset_version=10, # the ONNX version to export the model to do_constant_folding=True, # whether to execute constant folding for optimization input_names = ['input'], # the model's input names output_names = ['output'], # the model's output names dynamic_axes={'input' : {0 : 'batch_size'}, # variable lenght axes 'output' : {0 : 'batch_size'}}) traced_script_module = torch.jit.trace(model, data) return saveOnnx() # 转换 os.system("python -m onnxsim ./widget/best.onnx ./widgetbest-sim.onnx") os.system("./bin/onnx2ncnn.exe ./widget/best-sim.onnx ./widget/best.param ./widget/best.bin") os.system("./bin/ncnnoptimize.exe ./widget/best.param ./widget/best.bin ./widget/best-opt.param ./widget/best-opt.bin 65536") python .\export.py --weights weights/best.pt --img 960 --batch 1 --train python -m onnxsim best.onnx best-sim.onnx .\onnx2ncnn.exe best-sim.onnx best.param best.bin ncnnoptimize best.param best.bin best-opt.param best-opt.bin 65536 Git clone ncnn repo with submodule $ git clone https://github.com/Tencent/ncnn.git $ cd ncnn $ git submodule update --init Build for Linux / NVIDIA Jetson / Raspberry Pi Build for Windows x64 using VS2017 Build for macOS Build for ARM Cortex-A family with cross-compiling Build for Hisilicon platform with cross-compiling Build for Android Build for iOS on macOS with xcode Build for WebAssembly Build for AllWinner D1 Build for Loongson 2K1000 Build for Termux on Android Build for Linux Install required build dependencies: ...
手机端 PUSH 调试服务器到手机 adb push lldb-server /data/local/tmp chmod 755 /data/local/tmp/lldb-server 启动调试器服务 /data/local/tmp/lldb-server platform --listen "*:8888" --server 电脑端 端口转发 adb forward tcp:8888 tcp:8888 启动 LLDB .\lldb.exe 查看支持平台 platform list 选 ANDROID 平台 platform select remote-android 连接到手机 手机序列号: 9643e0ec0604 要换成当前调试的手机,使用 adb devices 查看序列号 platform connect connect://9643e0ec0604:8888 查看当前正在运行的进程 platform process list 附加上去 attach 9053 下断点 b send 跑起来 c 查看线程列表 thread list 查看调用栈 bt
你敬畏天理,他崇拜权威, 这是世界观不同; 你站在良知一边,他站在强者一边, 这是价值观不同; 你努力是为理想的生活, 他努力是做人上人, 这是人生观不同。 ...
1. 不要使用清华的源,要用阿里的,因为清华的源不全 2. 要使用 python launch.py 来安装一些 git 库 3. 要安装 requirements_versions.txt 带版本的 pip 库 4. 可以使用 python webui.py –port=7860 –server=0.0.0.0 –medvram 节省显存
一个人的行为习惯往往是长期养成的,并反映了其内在的价值观和信念。 如果一个人对待周围其他人都是友善、尊重和善良的,那么他/她也更有可能对你友好。反之,如果一个人对待周围其他人都是冷漠、自私和无礼的,那么他/她也更有可能对你冷漠、自私和无礼。 ...
别动上层人的利益,也别动下层人的观念。动上层人的利益犹如要他的性命,动下层人的观念犹如刨他的祖坟,而下层的观念正是上层利益的来源。
Habits are the compound interest of self-improvement. The same way that money multiplies through compound interest, the effects of your habits multiply as you repeat them. They seem to make little difference on any given day and yet the impact they deliver over the months and years can be enormous. 1: The Surprising Power of Atomic Habits 人们做了一些小的改变,没有看到切实的结果,并决定停止。你会想,“我已经连续一个月每天都跑步了,为什么我的身体没有任何变化?一旦这种想法占据了上风,就很容易让好习惯被抛在一边。但为了产生有意义的改变,习惯需要持续足够长的时间才能突破这个高原——我称之为潜在潜力高原。 qPeople make a few small changes, fail to see a tangible result, and decide to stop. You think, “I’ve been running every day for a month, so why can’t I see any change in my body?” Once this kind of thinking takes over, it’s easy to let good habits fall by the wayside. But in order to make a meaningful difference, habits need to persist long enough to break through this plateau—what I call the Plateau of Latent Potential. ...
成功的真正敌人 成功的敌人不是失败,而是无趣与无聊。因此,我们必须让它变得有趣。 产品开发的关键 做产品也是一样,必须从一开始就有人使用、有互动、有反馈。否则,你很难坚持下去。一定要从一开始就有种子用户,在开发过程中就有一群人在期待。 ...
If you can’t say nice things, say nothing. Don’t put people down.
You don’t need to follow the daily news. True breaking news will find you, and the rest isn’t urgent or just doesn’t matter.
Habit of Financial Discipline: Become someone who practices disciplined financial management. This could involve habits such as creating a budget, tracking expenses, and avoiding unnecessary spending. Habit of Continuous Learning: Embrace the identity of a lifelong learner in the realm of personal finance. Make it a habit to read books, articles, and attend seminars on financial literacy and investment strategies. Habit of Savvy Investing: Cultivate the identity of an informed and strategic investor. Regularly set aside time to research investment opportunities and make informed decisions about where to invest your money. Habit of Goal Setting: Adopt the identity of a goal-oriented individual. Set clear financial goals and break them down into actionable steps. Regularly review and adjust your goals as needed. Habit of Networking and Relationship Building: Become someone who actively seeks out connections in the financial world. Network with professionals, mentors, and like-minded individuals who can provide guidance and opportunities. Habit of Entrepreneurial Thinking: Develop an identity that embraces entrepreneurial thinking. This might involve exploring side businesses, investments in startups, or other ventures that can diversify your income streams. Habit of Long-Term Planning: Embody the identity of a strategic planner. Develop a habit of thinking about your financial future in the long term, which includes retirement planning, estate planning, and more. Habit of Resilience: Cultivate the identity of a resilient individual who learns from setbacks. Financial success often involves facing challenges; adopting the habit of bouncing back and learning from failures is crucial. Habit of Generosity: Adopt the identity of someone who values giving back. Allocate a portion of your financial success to charitable causes, reinforcing the idea that financial success enables positive impact. Habit of Risk Management: Become someone who is conscious of financial risks. Develop habits of managing and mitigating risks through insurance, emergency funds, and thoughtful decision-making. Habit of Negotiation and Assertiveness: Embrace an identity of someone who advocates for their financial interests. Develop the habit of negotiating for better deals, raises, and terms. Remember, the key is to start small and build gradually. Choose one or a few of these habits that resonate with you and incorporate them into your daily routine. As you consistently practice these habits, they will become ingrained in your identity, leading to more sustainable and impactful changes in your financial life. Over time, these small identity-based habits can accumulate and lead to significant financial success. ...
当你在结果层面解决问题时,你只会暂时解决它们。为了取得良好的进步,你需要在系统层面解决问题。修复输入,输出将自行修复。
1 - Understanding human nature People are, above all, interested in themselves. Yup. Sorry. No matter who you are people will always be a thousand times more interested in themselves than in you. No judgment here. People’s actions are governed by self-interest. In every human relationship, your counterpart will always think or ask themselves “what’s in it for me?” Remember this question “What’s in it for me?” By the way, you’re asking this question in all your interactions too, consciously or subconsciously. ...
In life, there are always some seemingly ordinary things that contain profound philosophical meanings. Take bees and sweetness as an example; we may rarely think about the story behind it. Bees are hardworking creatures in nature, diligently collecting nectar to transform it into sweet delicacies. These sweets then become delightful treats for people, allowing them to savor happiness. However, if we delve deeper, we might discover that there seems to be something hidden between the bees’ hard work and the sweetness enjoyed by humans. Perhaps there is a subtle yet profound implication behind this. We can recall scenes that seem familiar. ...
权力法则 1 永远不要盖过上司的光芒 在取悦他们或给他们留下深刻印象的同时,不要过分显露你的才华,否则会适得其反——引发他的恐惧和不安。 权力法则 2 永远不要太信任朋友,学会如何利用敌人 ...
Use ncnn to deploy pytorch model to Android phone Open graphics card support when compiling NCNN. Vulkan is for gpu -DNCNN_VULKAN=ON MobileNetV3 Open CMAKE 0091 feature when compiling into MT cmake_minimum_required(VERSION 3.20.0) cmake_policy(SET CMP0091 NEW) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") project("client-project") Train YOLO \Envs\torch\Scripts\activate.ps1 python train.py --batch 6 --workers 2 --imgsz 960 --epochs 300 --data "\Core\yaml\data.yaml" --cfg "\Core\yaml\cfg.yaml" --weights \ Core\weights\best.pt --device 0 Conversion model from torch import nn import torch.utils.model_zoo as model_zoo import torch.onnx from libs import define from libs.net import Net from libs.dataset import ImageDataset import os test_data = ImageDataset(define.testPath,False) test_loader = torch.utils.data.DataLoader( test_data, batch_size=1, shuffle=True) device = torch.device("cuda" if torch.cuda.is_available() else "cpu") model = Net(out_dim=19).to(device) model.load_state_dict(torch.load( "./widget/last.pt" )) model.eval() def saveOnnx(): for data, target in test_loader: data, target = data.to(device), target.to(device) label = target.long() y = model(data) # Export the model torch.onnx.export(model, # model being run data, # model input (or a tuple for multiple inputs) "./widget/best.onnx", # where to save the model (can be a file or file-like object) export_params=True, # store the trained parameter weights inside the model file opset_version=10, # the ONNX version to export the model to do_constant_folding=True, # whether to execute constant folding for optimization input_names = ['input'], # the model's input names output_names = ['output'], # the model's output names dynamic_axes={'input': {0:'batch_size'}, # variable lenght axes 'output': {0:'batch_size'}}) traced_script_module = torch.jit.trace(model, data) return saveOnnx() # Conversion os.system("python -m onnxsim ./widget/best.onnx ./widgetbest-sim.onnx") os.system("./bin/onnx2ncnn.exe ./widget/best-sim.onnx ./widget/best.param ./widget/best.bin") os.system("./bin/ncnnoptimize.exe ./widget/best.param ./widget/best.bin ./widget/best-opt.param ./widget/best-opt.bin 65536") python .\export.py --weights weights/best.pt --img 960 --batch 1 --train python -m onnxsim best.onnx best-sim.onnx .\onnx2ncnn.exe best-sim.onnx best.param best.bin ncnnoptimize best.param best.bin best-opt.param best-opt.bin 65536 Git clone ncnn repo with submodule $ git clone https://github.com/Tencent/ncnn.git $ cd ncnn $ git submodule update --init Build for Linux / NVIDIA Jetson / Raspberry Pi Build for Windows x64 using VS2017 Build for macOS Build for ARM Cortex-A family with cross-compiling Build for Hisilicon platform with cross-compiling Build for Android Build for iOS on macOS with xcode Build for WebAssembly Build for AllWinner D1 Build for Loongson 2K1000 Build for Termux on Android Build for Linux Install required build dependencies: ...
Mobile PUSH debug server to mobile adb push lldb-server /data/local/tmp chmod 755 /data/local/tmp/lldb-server Start the debugger service /data/local/tmp/lldb-server platform --listen "*:8888" --server +++ Computer side Port forwarding adb forward tcp:8888 tcp:8888 Start LLDB . \lldb.exe View supported platforms platform list Select ANDROID platform platform select remote-android Connect to the phone Phone serial number: 9643e0ec0604 To change to the current debugging phone, use adb devices to check the serial number platform connect connect://9643e0ec0604:8888 View the currently running process platform process list Attach to attach 9053 Breakpoint b send Run up c View the list of threads thread list View the call stack bt