自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(327)
  • 资源 (1)
  • 收藏
  • 关注

原创 malloc in signal handler causes deadloc

【代码】malloc in signal handler causes deadloc。

2024-02-12 11:41:27 374

原创 查看gpu使用情况

命令行方式 查询gpu设备使用情况。

2023-04-13 13:13:21 329

转载 Google On Latency Tolerant Systems: Making A Predictable Whole Out Of Unpredictable Parts

In Taming The Long Latency Tail we covered Luiz Barroso’s exploration of the long tail latency (some operations are really slow) problems generated by large fanout architectures (a request is composed of potentially thousands of other requests). You may ha

2022-06-12 20:46:28 333

原创 框架与引擎

A: What’s the difference between an “engine” and a “framework”Q: These terms, and others, do seem very similar. They’re named from a conceptual standpoint, and so could be defined as follows:A “framework” is a “foundation” or “support structure” aroun

2022-04-18 11:44:21 676

原创 测试速度与可靠性

摘 Azure DevOps Shift left to make testing fast and reliable用例分类Defining a test taxonomy is an important aspect to DevOps. Developers should understand the right types of tests to use in different scenarios, as well as what tests are required at differ.

2022-03-09 13:38:47 441

原创 linux bash 常用操作

找到失效的符号链接并删除find . -xtype l -exec rm {} \;find -xtype l:We’ll use the l flag with xtype, to tell it to search for links, return broken links:参考文章

2022-01-14 15:42:58 280

原创 thread local

REFC++11 thread_local 用法C++ Storage class specifiers

2021-12-31 13:51:01 377

转载 marshmallow vs. pydantic – Python’s 2 best libraries for data serialization and validation

from : https://www.augmentedmind.de/2020/10/25/marshmallow-vs-pydantic-python/Data (de-) serialization is about converting between raw data items and instances of your Python classes, in order to transmit or store data. A typical example is the conversion

2021-11-16 16:00:55 1025

原创 Pydantic&FastAPI

Pydanticwhat is:Define how data should be in pure, canonical python; validate it with pydantic官网: https://pydantic-docs.helpmanual.io/Sample:from datetime import datetimefrom typing import List, Optionalfrom pydantic import BaseModelclass User

2021-10-07 20:10:00 276

原创 覆盖率coverage

cpp 覆盖率optionscompile: -fprofile-arcs, -ftest-coveragelink: -lgcov或者:compile: --coveragelink: --coverage详情参见:https://gcc.gnu.org/onlinedocs/gcc-10.1.0/gcc/Instrumentation-Options.html编译完后会产生*.gcno, *.gcda 文件lcov用lcov 收集数据## *.gc?? 数据在gcda_

2021-10-07 11:19:40 248

原创 linux 证书有效期查看

查看本地证书有效日期openssl x509 -in ${cer-path} -noout -datesopenssl 参数x509 : Run certificate display and signing utility.-noout : Prevents output of the encoded version of the certificate.-dates : Prints out the start and expiry dates of a TLS or SSL cert

2021-10-05 17:05:01 6270

原创 第三方库管理

问题项目的3rd 问题源码直接放git 仓库, 越来越大,开发效率低下,CICD耗时长占用空间,其实很多时候,一个人一台开发机上只需要一个3rd 库, 而不是每个project path一个3rd库编译后的产出物放git仓库,缺乏对3rd的版本和构建管理工具c++ 里的第三方库管理工具: https://docs.conan.io/en/latest/introduction.html...

2021-09-13 16:16:44 169

原创 dict 和 object的转换

dict objectSEQS = tuple, list, set, frozenset class Jsonize(object): def __init__(self): super(Jsonize, self).__init__() def FromDict(d): this = Jsonize() # this = type(Jsonize.__name__, (Jsonize,), d) for k, v in d.items(

2021-05-29 21:17:45 301

原创 conda

安装获取安装包wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh 或者使用清华的源wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh 运行bash Miniconda3-latest-Linux-x86_64.sh 配置增加国内镜像源: conda

2021-05-17 15:42:51 113

转载 Dapr, the hard way

Dapr, the hard way#dapr#kubernetes#distributedsystemsJosé Miguel Parrella2020年2月13日・7 min readThis weekend I wanted to catch up withDapr, the Distributed Application Runtime. As a sysadmin by trade, I have little knowledge of application model th...

2021-05-15 17:33:42 231

原创 rpm 安装解压

下载rpm工具 yumdownloader安装:yum install yum-utils示例:yumdownloader --resolve --destdir /root/mypackages/ httpd查看、解压rpm里的文件查看rpm -qpl httpd.rpm 解压rpm2cpio httpd.rpm | cpio -div 指定安装目录使用prefixrpm -i –prefix=/home/admin httpd.rpm 注:不是所有的r

2021-05-06 09:57:39 880

转载 Multi-Runtime Microservices Architecture

Key TakeawaysCreating distributed systems is not an easy task. Best practices have emerged around “microservice” architecture and “12-factor app” design. These provide guidelines related to the delivery lifecycle, networking, state management, and bindin

2021-04-22 21:21:17 853

原创 时序数据库

时间序例:一个指标 + N 个标签KV组合(N >= 1),可以定义为一个时间序列。一个时间序列上产生的数据值的增加,不会导致时间序列的增加。指标 和 标签可以唯一确定一个时间序例。聚合: 对多个时间序例上的同一时间(窗口)的数值进行处理。downsample : 一个时间序例上的给定时间窗口内的数值进行处理。refTSDB写入与查询讲解,聚合(aggregator)与采样(downsample)讲解—以opentsdb为例...

2021-04-19 19:27:25 168

原创 rscocket

官网https://rsocket.io/exampleC++server: // RSocket server accepting on TCP auto rs = RSocket::createServer(TcpConnectionAcceptor::create(FLAGS_port)); // global request handler auto handler = std::make_shared<HelloStreamRequestHandler>

2021-03-19 14:38:18 137

原创 dapr

版本发布与简介:https://www.infoq.cn/article/m1hMST70ck2VB3GKNM39官网:https://docs.dapr.io/ github:https://github.com/dapr/dapr/releases/tag/v1.0.0

2021-02-22 15:19:49 317 1

原创 一些机器学习相关的框架

元天introduce: https://tech.ifeng.com/c/7v70nteB48lcode: https://github.com/MegEngine/MegEngine一些值得注意的地方:一键切换训练推理在机器学习中,训练与推理一直不是一体的,当我们设计算法时,首先需要训练框架的支持,然后再把训练好的模型转移到推理框架上,从而将后续的推理计算放到各种硬件上。这中间会存在训练与推理的转换,这个过程需要手动完成,甚至转换后也不能保证模型性能与进度。「训练推理一体化能把繁

2021-02-01 11:42:51 240

原创 c++重载 operator ->

重载 -> 运算符示例如下不能是静态函数返回 T的指针,再调用T-><type T>class Pointer{ Pointer(const T* t) : _target(t) T * operator ->() { return _target } T* _target;};This is the only really tricky one. It must be a nonstatic member function, an

2021-01-03 15:33:45 206

原创 c++ 调用java

[TODO]通过JNI 调用 java 的jar, 主要步骤获取 classjclass c = (*env)->FindClass(env,“com/camera/webcam/Test”);获取 methodjfieldID width_id = (*env)->GetFieldID(env, c, “width”, “I”);遍历hashmaprefhttps://blog.csdn.net/plx0303sunny/article/details/103457

2021-01-02 16:06:29 159

原创 TVM

TVM简介: https://blog.csdn.net/tlzhatao/article/details/93630910TVM: An Automated End-to-End Optimizing Compiler for Deep Learning

2020-12-14 13:40:51 146

原创 java 实现tips

读取resources放在与java 目录平级的resources 下的资源,可以通过以下方法获取String path = this.getClass().getClassLoader().getResource(name).getPath();BufferedReader in = new BufferedReader(new FileReader(path));String str;String content = "";while ((str = in.readLine()) != nu

2020-12-08 11:50:10 111

转载 jieba分词词性对照表

from:https://blog.csdn.net/princemrgao/article/details/107532469------jieba分词词性对照表标注 解释 标注 解释 标注 解释 a 形容词 mq 数量词 tg 时语素 ad 副形词 n 名词 u 助词 ag 形语素 ng 例:义 乳 亭 ud 例:得 an 名形词 nr ..

2020-11-23 14:19:27 5692 2

原创 spacy NLP

spacy官方文档:https://spacy.io中文模型:https://spacy.io/models/zhgit: https://github.com/explosion/spaCyrefhttps://blog.csdn.net/shebao3333/article/details/97407644

2020-11-20 10:13:27 109

原创 python 处理pdf

pdfminercode: https://github.com/pdfminer/pdfminer.sixdoc: https://pdfminersix.readthedocs.io

2020-11-17 15:30:55 101

原创 How To Package And Distribute Python Applications

IntroductionAll Python libraries (i.e. application packages) that you download using a package manager (e.g. pip) are distributed using a utility dedicated to do the job. These utilities create “Python distributions” which are basically versioned (and com

2020-10-03 16:54:10 267

原创 rust 收集

基础语法http://llever.com/rust-by-example-cn/index.html

2020-09-10 11:13:25 133

原创 linux源码安装git

linux 源码安装git, 各种坑,记录一下获取源码wget https://github.com/git/git/archive/v2.3.0.zipunzip v2.3.0.zipcd git-2.3.0编译安装设置注意看 Makefile ,下边几个宏需要注意CURLDIR找不到libcurl的*.h和lib,重新安装了libcurl, 需要指定libcurl的*.h, lib的位置NO_R_TO_GCC_LINKER编译过程中出现 error: unrecogni

2020-09-01 14:05:56 150

原创 python 多线程多进程

Event多线程多进程 间同步可以使用 Event代码中是多线程, 使用 multiprocessing 的 Event,在处理系统信号的函数中 event.set() 卡死,换成 threading 的 Event 才对# from multiprocessing import Event from threading import Event glogger = logging.getLogger('')class ZService(object): stop_event =

2020-08-19 17:58:34 161

原创 portable binary

原文地址要翻墙,就复制到下面Creating portable Linux binariesPosted by insane coder at Thursday, July 19, 2012For some, the idea of creating a portable Linux binary is somewhat elusive.In this article, we will be discussing how to create a Linux binary for a speci

2020-08-07 15:44:53 178

原创 性能调优

Linux perf: http://www.brendangregg.com/perf.html

2020-08-04 19:43:50 90

原创 Resource acquisition is initialization 初始时获取资源

RAII概念Resource acquisition is initialization: (通过对象) 初始化时就获取资源(,销毁时释放资源)是一种代码编写思想, 通用对象的生命周期来对资源进行管理。好处典型场景refhttps://en.wikipedia.org/wiki/Resource_acquisition_is_initialization...

2020-07-09 11:28:04 197

原创 c++/ python 混合编程多线程问题

c++调用pythonpython调用c++refpybind11.GIL

2020-07-09 11:16:02 589

原创 分布式锁

分布式锁资源互斥可用墙上时间有效租期session的有效时间,client 一定比server小, 由client 主动发起续租,避免机器之间时间漂移 而无法严格对对齐的问题切换时间client 与server 的HB 间隔比较长,带来的问题是 client 因故障没有主动释放锁,那其它的锁竞争者(client) 只能等到 session 超时才会重新抢锁。在一些应用场景下对服务可用性有不小的不利影响。反之,虽然锁切换时间变短,但对于server 会产生较大的压力,也可能因网络短

2020-06-18 14:24:45 202

原创 端上的模型部署

refTensorflow Lite介绍

2020-06-16 21:34:38 230

原创 c++与python的数据交互

c++和python 都可以用pickle对数据进行序列化、反序列化,进而通过tcp/dup,pipe, shared memory 等方法进行通信PicklingTools: Cross Language Tools for Communication

2020-06-15 15:09:20 923

原创 python 对象

元类深入理解python之对象系统深入理解python之类的创建过程

2020-06-03 16:40:27 121

saunders-jeffery.pdf

Today’s modern software projects are written in many different languages: Python, C++, Perl, Java, Javascript, Lua, Unicon, C, all co-exist within a complex environment implementing different components of a system

2020-06-15

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除