![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
后端
凌霄羽
专注于SpringCloud、Docker、云计算、SaaS Performance、持续交付等相关领域,积累了丰富的互联网架构设计经验。
展开
-
Python Rule Engine
Those rule engines in python are:pyDatalog Pyke PyCLIPS durable_rules Intellect business-rules PyKnowRelative question link in stackoverflow:Python Rule Based Engine Open Source based Rules Engines in Java or Python Implementing a "rules engin原创 2021-07-28 09:49:06 · 1519 阅读 · 0 评论 -
Postgresql
PostgreSQL vs MySQLhttps://www.cnblogs.com/geekmao/p/8541817.html数据迁移 —— 从 PostgreSQL 到 MySQLhttps://www.cnblogs.com/xjnotxj/p/12776575.htmlPG2MySQLhttps://github.com/pivotal-cf/pg2mysqlIn PostgreSQL it is common to use thetextdatatype for ch..原创 2021-07-26 14:41:09 · 177 阅读 · 0 评论 -
python percent_to_float
参考代码def percent_to_float(data): """Convert percentage string to float. e.g. 99% -> 0.99 """ if data is None: return 0.0 if isinstance(data, (int, float)): return float(data) return float(data.strip('%')) / 1.原创 2021-05-27 15:07:49 · 175 阅读 · 0 评论 -
pytest capture ouptut
During test execution any output sent tostdoutandstderris captured. If a test or a setup method fails its according captured output will usually be shown along with the failure traceback. (this behavior can be configured by the--show-capturecommand-l...原创 2021-05-26 16:34:01 · 325 阅读 · 0 评论 -
Python Articles
flask 2.0 releasehttps://palletsprojects.com/blog/flask-2-0-released/原创 2021-05-22 16:01:54 · 105 阅读 · 0 评论 -
python pip 依赖冲突定位
今天pip安装一直遇到Jinja2冲突可以使用pipdeptree定位冲突原因说明文档https://pypi.org/project/pipdeptree/pipdeptree -r -p Jinja2Warning!!! Possibly conflicting dependencies found:* Flask==2.0.0 - Jinja2 [required: >=3.0, installed: 2.11.3]* networkx==2.5.1 - deco.原创 2021-05-21 17:27:30 · 3573 阅读 · 2 评论 -
阿里云日志服务数据加工
日志服务可以使用DSL进行加工处理阿里云帮助文档数据加工语法简介https://www.alibabacloud.com/help/zh/doc-detail/125439.htm?spm=a2c63.p38356.b99.358.1d114889OpfTP1函数总览https://help.aliyun.com/document_detail/159702.html?spm=a2c4g.11186623.6.1004.3a9628c75XwwfpSamplee_if( ..原创 2021-05-18 15:58:09 · 470 阅读 · 0 评论 -
Python *args and **kwargs
总结*argsand**kwargsare special keyword which allows function to take variable length argument. *argspasses variable number of non-keyworded arguments list and on which operation of the list can be performed. **kwargspasses variable number of keywor...原创 2021-05-11 17:54:31 · 45 阅读 · 0 评论 -
poetry
poetry commandpoetry installpoetry buildpoetry install -E serverpoetry run pytest -v --cov=lxapi --cov-config .coveragercpoetry buildpoetry update xxxpyproject.tomlhttps://python-poetry.org/docs/pyproject/lock versionhttps://github.com/p原创 2021-05-11 17:35:16 · 70 阅读 · 0 评论 -
Python Logging
Python loggine default level is warningThe default logging level is warning. Since you haven't changed the level, the root logger's level is still warning. That means that it will ignore any logging with a level that is lower than warning, including debu原创 2021-04-23 09:58:25 · 142 阅读 · 1 评论 -
python json schema validation
schema自动生成-gensonhttps://pypi.org/project/genson/builder = SchemaBuilder()builder.add_object(data)fp = open("test.txt", "w")print(builder.to_json(indent=4, ensure_ascii=False), file=fp)fp.close()schema校验-gsonschemahttps://pypi.org/project/j.原创 2021-04-16 16:39:56 · 336 阅读 · 0 评论 -
限流ratelimit示例参考
python ratelimit decoratorhttps://github.com/tomasbasham/ratelimittwitter rate limithttps://python-twitter.readthedocs.io/en/latest/_modules/twitter/ratelimit.htmlguava rate limithttps://www.baeldung.com/guava-rate-limiter原创 2021-03-09 18:10:02 · 254 阅读 · 0 评论 -
Python开发工具
IDEpycharm community对比专业版少了web开发,django等https://www.jetbrains.com/pycharm/features/editions_comparison_matrix.htmlPycharm pluginsEnvFilehttps://plugins.jetbrains.com/plugin/7861-envfile原创 2021-02-20 10:14:12 · 45 阅读 · 0 评论 -
bump version
可以通过工具自动bumphttps://github.com/peritus/bumpversion原创 2021-01-19 17:24:00 · 450 阅读 · 1 评论 -
JAVA8 CompletableFuture
JAVA 8 CompletableFuture特点JAVA8直接支持使用简单异步基于ForkJoinPool限制all不返回结果combine可以两两合并返回合并结果原创 2021-01-15 09:21:12 · 99 阅读 · 0 评论 -
Python Log Config
参考https://github.com/madzak/python-json-loggerhttps://github.com/hynek/structlog示例propogate设置为False,否则root logger也会输出trigger_logger = logging.getLogger("trigger")logHandler = logging.StreamHandler()formatter = jsonlogger.JsonFormatter(json_en原创 2021-01-14 17:03:13 · 344 阅读 · 0 评论 -
python virtualenv
开始: virtualenv venv进入: source venv/bin/activate退出: deactivate原创 2021-01-13 21:51:48 · 53 阅读 · 0 评论 -
JAVA Stream处理
代码用例filter & sorted & forEach List<Processor> processors = processorRegistry.getProcessors(); processors.stream().filter(it -> { return StringUtil.equals(POST, it.type())原创 2021-01-13 21:37:32 · 73 阅读 · 0 评论 -
网关实现
参考Zuul实现前置后置过滤器过滤器注册器githubhttps://github.com/Netflix/zuul/blob/be48a05641c2d5a5aa507539150f42d46c7120cc/zuul-core/src/main/java/com/netflix/zuul/filters/MutableFilterRegistry.java不用翻墙的国内代码https://gitee.com/netflix/zuulZuul 1.x的处理器逻辑https://g原创 2021-01-13 21:23:30 · 185 阅读 · 0 评论 -
JAVA正则处理
正则工具https://regex101.com/java8正则笔记https://zq99299.github.io/java-tutorial/essential/regex/介绍正则表达式(regex)即一种搜索字符串中模式(pattern)。模式可以是任意的字符串,或者是一个复杂的表达式。正则主要应用在字符串的搜索,编辑等操作上。语法1 如下egrep使用的是正则的语法,虽然是命令行,但内涵一样。.代表任意的字符串,所以egrep搜索字符的时候所以的字符都是红色的,...原创 2021-01-13 21:15:34 · 203 阅读 · 0 评论 -
mac下安装mysql
一直用的docker的mysql,今天尝试在mac下安装mysql,还是踩了一些坑。安装brew install mysql@5.7重置密码brew services stop mysql@5.7 cd /usr/local/opt/mysql@5.7/bin /mysqld_safe --skip-grant-tables Command+N新开窗口 mysql -u r...原创 2020-01-29 12:11:41 · 221 阅读 · 0 评论 -
分层设计
Repository的使用https://segmentfault.com/a/1190000012346333Repository蕴含着真正的OO概念,即一个数据仓库角色,负责所有对象的持久化管理。DAO则没有摆脱数据的影子,仍然停留在数据操作的层面上。Repository是相对对象而言,DAO则是相对数据库而言,虽然可能是同一个东西 ,但侧重点完全不同。Repository居于业务...原创 2020-01-20 14:10:29 · 213 阅读 · 0 评论 -
Mybatis出坑记
Springboot mybatis集成 Invalid bound statement (not found)https://blog.csdn.net/qq_35981283/article/details/78590090后来实在没办法了,跟以前的项目逐一比对,发现application.properties中忘记了mybatise的两行配置:mybatis.typeAliase...原创 2019-12-26 22:22:20 · 174 阅读 · 0 评论 -
切面捕获异常
@Aspectpublic class RiskExceptionAspect { private static final Logger logger = LoggerFactory.getLogger(LoggerNamesConstants.RISK); @Pointcut(value = "execution(* com.xxx.risk..*.*(..))") ...原创 2019-08-22 19:37:57 · 2043 阅读 · 0 评论