- 博客(59)
- 资源 (1)
- 收藏
- 关注
原创 PyCharm社区版Cython支持
自己在文件类型中加一个,名称叫【python+C】也可以按照自己喜欢的样式配置,关键字大概就这些。这里1、2、3、4配置如下。
2024-07-01 10:06:46
324
1
原创 ImportError: DLL load failed while importing win32service: 找不到指定的模块。
ImportError win32service win32
2022-05-16 21:38:26
544
原创 pgsql 创建日志表(创建规则)
create table mytab(id int primary key, note text);create table mytab_log(seq bigserial primary key,oprtype char(1),oprtime TIMESTAMP,old_id int,new_id int,old_note text,new_note text);create rule rule_mytab_insert as on insert to mytabdo also .
2022-04-18 17:31:16
307
原创 Odoo使用笔记
# 打开pgsqlE:\postgresql_dir\pgsql\bin.\pg_ctl.exe -D E:\postgresql_dir\data\ -l E:\postgresql_dir\pgsql\logfile start# 新建应用python E:\PycharmProjects\BMS_bat\odoo-bin scaffold my_modulesNew# 更新应用python E:\PycharmProjects\BMS_bat\odoo-bin -u my_modu.
2022-03-11 15:42:45
301
原创 安卓配置.gradle 阿里云 fastutil-8.4.0.jar kotlin-compiler-embeddable-1.6.10 下载慢解决方法
download fastutil-8.4.0.jar
2022-01-13 00:50:26
7456
6
原创 Windows常用命令
# 重启命令shutdown -r -t 0# 关机命令shutdown -p# 创建文件echo >tsg.txt# 创建文件夹md nsogsg# 删除文件夹rd nsogsg# 终止进程taskkill -f -pid 5672# ps -ef | grep app 的Windows端替代tasklist|findstr svchost# historyhistory...
2021-06-16 15:36:20
118
原创 Ubuntu服务器创建sudo用户
sudo useradd -s /bin/bash -m xxx# 设置密码passwd moxiao# 添加到sudosudo adduser moxiao sudo
2021-05-20 10:32:05
136
原创 记一次Pyinstaller打包缺失.dll解决方式,ImportError: DLL load failed while importing blspy: 动态链接库(DLL)初始化例程失败。
首先我们需要修改.spec文件中的debug=True,console=True # 开启debug 控制台输出打开模式# -*- mode: python ; coding: utf-8 -*-import syssys.setrecursionlimit(5000)from pkg_resources import get_distributionfrom PyInstaller.utils.hooks import collect_submodulesblock_ciphe
2021-05-17 14:56:37
11663
3
原创 限制mongodb的内存占用
vim /etc/mongod.conf# mongod.conf# for documentation of all options, see:# http://docs.mongodb.org/manual/reference/configuration-options/# Where and how to store data.storage: dbPath: /var/lib/mongodb journal: enabled: true# engine:.
2021-04-29 16:06:33
207
1
原创 django使用笔记
Django 命令django-admin startproject drfjwtdemocd .\drfjwtdemo\django-admin startapp firstApprunserver 0.0.0.0:8000pip install djangorestframeworkpip install markdown # Markdown support for the browsable API.pip install django-filter # Fi...
2021-04-19 17:07:52
92
原创 DRF 上传文件
from rest_framework.response import Responsefrom rest_framework import genericsfrom rest_framework_simplejwt.authentication import JWTAuthenticationfrom rest_framework.permissions import IsAuthenticatedfrom pool.response import FitJSONRendererfrom re.
2021-04-19 17:01:24
753
原创 虚拟机Ubuntu20安装tensorflow-rocm
AMD 的显卡才需要安装TensorFlow-rocm 英伟达的不需要看本篇博客咯。首先我们先安装OpenBLAS# 下载sudo apt install gitgit clone https://github.com/xianyi/OpenBLAS.git# 安装cd OpenBLAS/sudo make TARGET=NEHALEMsudo make PREFIX=/opt/OpenBLAS install# 测试vim main.c内容如下#include &
2021-03-16 15:40:45
1637
1
原创 Ubuntu启动elasticsearch笔记
首先下载安装没有问题。。。curl -L -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.11.1-amd64.debsudo dpkg -i elasticsearch-7.11.1-amd64.deb但是启动将要遇到问题。vim /etc/elasticsearch/elasticsearch.yml修改如下:network.host: 0.0.0.0http.port: 9.
2021-03-09 14:11:04
239
原创 systemctl mongod
vim /etc/systemd/system/mongod.service写入配置如下:[Unit] Description=mongodAfter=network.target remote-fs.target nss-lookup.target [Service] Type=forking # ./bin/mongod --config ./etc/mongodb.confExecStart=/home/mongodb/mongodb_4.2.3/bin/mongo..
2021-02-03 10:56:25
228
原创 Temporary failure resolving ‘cn.archive.ubuntu.com‘
当我们执行sudo apt update 时 有时会出现以下错误:Err:1 http://cn.archive.ubuntu.com/ubuntu focal InRelease Temporary failure resolving 'cn.archive.ubuntu.com'Err:2 http://security.ubuntu.com/ubuntu focal-security InRelease Temporary failure resolving 'security.ubu..
2020-12-25 15:43:07
3644
2
原创 WSL2的正确打开方式
首先我废话一下WSL2的优点:1. 传统的 VM 体验启动起来可能比较慢,隔离,消耗大量资源,并且需要您花费时间来管理它。Wsl2没有这些属性。2.Wsl2中的 Linux 内核是由微软从最新的 stable 分支构建的,该分支基于 kernel.org 上提供的源代码。这个内核专门针对 wsl2进行了调优,对大小和性能进行了优化,以便在 Windows 上提供令人惊叹的 Linux 体验。内核将通过 Windows 更新提供服务,这意味着您将获得最新的安全修复和内核改进,而无需自己管理它。3.
2020-12-25 15:26:55
6322
原创 conda 快速临时安装其他源的包
windows以下为清华大学源的mklconda install --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/ mkl=2020.2
2020-11-05 00:02:05
5351
原创 Python 获取小数位数
strr = '134.02'print(strr[strr.find('.') + 1:])decimal_digits = len(strr[strr.find('.') + 1:])print(decimal_digits)def decimal_digits(val: float): val_str = str(val) digits_location = val_str.find('.') if digits_location: return.
2020-08-28 15:24:40
5568
原创 jenkins配置vue项目部署
当然 我们要先在linux安装node环境 然后尝试npm命令是否有效然后我们可以尝试以下命令 是否可以执行成功# xxxx-vue 是该vue项目的根目录cd /var/lib/jenkins/workspace/xxxx-vuenpm installnpm run build# 如果没有报错 那么就说明项目 以及node环境正常 反之则都需要检查测试完成后我们开始在jen...
2020-03-19 23:36:57
549
原创 jenkins配置pid形式管理进程
首先touch一个空的后缀为.pid的空文件例如:touch /myServices/pids/access_to_lending_rates.pid然后我们可以在使用如下shell来结束该进程(空文件不会结束任何进程)# 然后我们可以在使用如下shell来结束该进程(空文件不会结束任何进程)kill `cat /myServices/pids/access_to_lendi...
2020-03-19 23:26:27
389
原创 jenkins配置shell脚本
执行shell#!/bin/bashcd /var/lib/jenkins/workspace/flaskServemysql_name=transaction_dbmysql_user=zt_rwsdmysql_pwd="bfdnodfgnofbdsgj****"mysql_host="127.0.0.1"mysql_port=3306redis_host=127.0....
2020-03-19 23:18:26
344
原创 CentOS7安装rabbitmq笔记
首先呢,rabbitMQ是使用Erlang语言开发的 所以先要安装Erlanghttps://www.erlang.org/downloads选择我们需要的Linux版本然后在liunx系统输入命令tar -zxf otp_src_22.1.tar.gzcd otp_src_22.1/./configure --prefix=/usr/local/erlangmake...
2019-11-07 11:35:46
164
原创 Windows安装bee工具
这里我借鉴了http://www.678fly.cn/d/3-go-mod-bee首先安装 golang的安装包 都没有问题然后安装beego 也没问题go get github.com/astaxie/beego但是当我安装bee工具的时候就开始报错了1 说明 (我此时可以访问YouTube,但是依旧不能安装bee工具 报错如下:)这个问题卡了我至少一周了 想解决 ...
2019-10-31 11:53:52
2258
原创 matlab linux中文乱码
网上一大堆的修改设置。但是我linux的matlab图形化界面都打不开就报错了。没有办法 最后找到了解决方法 。原来我linux的编码是正确的utf-8最后在百度知道里找到了解决方法https://zhidao.baidu.com/question/1541479192104644307.html原来是我上传的.m的文件就不是utf-8 所以运行起来就乱码了这里我使用no...
2019-08-07 11:22:19
684
转载 CentOS安装Nginx并添加为systemd托管程序
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-stream --with-stream_ssl_module# 安装到/usr/local...
2019-08-05 15:56:36
966
原创 Ubuntu python3 安装pandas ModuleNotFoundError: No module named bz2 No module named _lzma
升级了新版本的pandas后就报错了。ModuleNotFoundError: No module named bz2ModuleNotFoundError: No module named '_lzma'下面直接说解决方法了这里参考了https://blog.youkuaiyun.com/u013817676/article/details/97366270sudo apt-get i...
2019-07-26 18:09:05
4006
转载 git配置全局用户名和邮箱
全局配置用户名git config --global user.name "nameVal"git config --global user.name "nameVal"全局配置邮箱git config --global user.email "eamil@qq.com"git config --global user.email "eamil@qq.com"欧了照...
2019-07-23 22:15:59
434
原创 VScode配置Vue环境
1 中文配置点击这个插件商店 搜索 Chinese点击install 重启之后就是我们可以操作的中文界面了2 安装Vetur同上3 ESLint4 Auto Close Tag 以及 Auto Rename Tag5 Path Intellisense 在你输入目录路径时自动补全6 HTML CSS Support 属性class id等补全7...
2019-07-23 22:01:22
622
原创 pandas\core\indexing.py:189: SettingWithCopyWarning: A value is trying to be set on a copy of a sli
完整的警告为:C:\Users\moxia\Anaconda3\lib\site-packages\pandas\core\indexing.py:189: SettingWithCopyWarning:A value is trying to be set on a copy of a slice from a DataFrameSee the caveats in the docu...
2019-06-15 17:48:44
688
原创 CentOS安装redis
下载最新的安装包后编译makemake PREFIX=/usr/local/redis install编译成功后 cp redis.conf 到/usr/local/redis/设置systemctl的启动方式vim /etc/systemd/system/redis.service[Unit]Description=RedisAfter=network.ta...
2019-06-05 14:17:02
126
原创 Python 更新所有包
from subprocess import callfrom pip._internal.utils.misc import get_installed_distributions # pip 10 以后没有pip.get...for dist in get_installed_distributions(): call("pip37 install --upgrade " +...
2019-06-04 10:17:49
1930
转载 Ubuntu 防火墙
ufw allow 22/tcp 允许所有的外部IP访问本机的22/tcp (ssh)端口ufw statusufw status verbose允许 80 端口ufw allow 80/tcp禁用 80 端口ufw delete allow 80/tcp修改用户目录所有者chown -R liuning:liuning /home/liuning/nginx启...
2019-05-24 16:01:47
138
原创 tornado websocket示例
实现了前端html的主动刷新和后台推送,页面被动刷新源代码:https://gitee.com/1428743731/webSocketTest
2019-05-15 18:04:20
508
翻译 最新 PyCharm 快捷键
在 IDE 中找到任何操作 Ctrl + Shift + a编辑Ctrl + Space基本代码完成(任何类,方法或变量的名称 )Ctrl + Alt + Space类名称完成(独立于当前 导入的任何项目类的名称 )Ctrl + Shift + Enter Complete语句Ctrl + P参数信息(在方法调用参数内)Ctrl + Q快速文档查找Shift + F1外部文档...
2019-04-25 11:41:11
186
jave-1.0.2-src.jar
2016-09-07
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人