Skip to content

Instantly share code, notes, and snippets.

View lyyiangang's full-sized avatar

biangbiangmian lyyiangang

  • ShangHai.China
View GitHub Profile
@lyyiangang
lyyiangang / CMakeLists.txt
Created January 8, 2022 12:55 — forked from baiwfg2/CMakeLists.txt
How to use add_custom_target and add_custom_command correctly in cmake
# References:
# https://cmake.org/cmake/help/latest/command/add_custom_target.html
# https://samthursfield.wordpress.com/2015/11/21/cmake-dependencies-between-targets-and-files-and-custom-commands/
# https://gist.github.com/socantre/7ee63133a0a3a08f3990
# https://stackoverflow.com/questions/24163778/how-to-add-custom-target-that-depends-on-make-install
# https://stackoverflow.com/questions/30719275/add-custom-command-is-not-generating-a-target
# https://stackoverflow.com/questions/26024235/how-to-call-a-cmake-function-from-add-custom-target-command
# https://blog.csdn.net/gubenpeiyuan/article/details/51096777
cmake_minimum_required(VERSION 3.10)
@lyyiangang
lyyiangang / onnx_cut.py
Created August 4, 2021 11:05 — forked from ikuokuo/onnx_cut.py
Cut sub-model from an ONNX model, and update its input/output names or shapes
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable=missing-docstring
import argparse
import os
import sys
import timeit
import typing
import onnx
@lyyiangang
lyyiangang / SimpleHTTPServerWithUpload.py
Created November 21, 2019 01:34 — forked from touilleMan/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload - Python3 version
#!/usr/bin/env python3
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
see: https://gist.github.com/UniIsland/3346170
"""