上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 31 下一页
摘要: nginx +redis + lua local function close_redis(red) if not red then return end local pool_max_idle_time = 10000 local pool_size = 100 local ok, err = r 阅读全文
posted @ 2022-02-22 20:38 锐洋智能 阅读(316) 评论(0) 推荐(0) 编辑
摘要: nginx配置 nginx.conf: http{ [......] lua_shared_dict limit 10m; lua_shared_dict jsjump 10m; server { #lua_code_cache off; listen 80; server_name www.cen 阅读全文
posted @ 2022-02-21 21:09 锐洋智能 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 按 c 风格写多条件判断,会出异常, 如 if ( cond1& cond2 ){ do something; }; lua写成 if cond1 and cond2 then do something end 这样会出异常, 当 cond1 为false时直接返回 cond2 的值, cond2 阅读全文
posted @ 2022-02-21 20:33 锐洋智能 阅读(39) 评论(0) 推荐(0) 编辑
摘要: int2 是2字节 有符号整型, 符号占1位,余下15位2进制位表示数值 。最大数正数是 0x7fffint4 是4字节 有符号整型 符号占1位,余下31位2进制位表示数值 。最大数正数是 0x7fffffffint8 是8字节 有符号整型 符号占1位,余下63位2进制位表示数值 。最大数正数是 0 阅读全文
posted @ 2022-02-21 20:20 锐洋智能 阅读(1150) 评论(0) 推荐(0) 编辑
摘要: 1.4.198 (2019-02-22) 版本开始,H2不再自动创建数据库,很难在网上找到有解决方案,故down了源码 Connection to jdbc:h2:tcp://0.0.0.0:6666/./aika failed. [90149][90149] Database "/home/Hex 阅读全文
posted @ 2022-02-21 13:32 锐洋智能 阅读(703) 评论(0) 推荐(0) 编辑
摘要: 使用 dialog 选卡页事, 三选卡标签切换时需要 重新加载更新 刷新。老版本 dwz 切换标签时,会自动刷新。新版本不会自动刷新。无奈,所需功能 为切换时重新加载刷新。功能控制文件位置Public\dwz\js\dwz.min.js新版本不刷新源码为 var jGroup = jGroups.e 阅读全文
posted @ 2022-02-20 07:43 锐洋智能 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-02-19 19:50 锐洋智能 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 在job接口实现类上添加@DisallowConcurrentExecution注解 @DisallowConcurrentExecution public class reyoJob implements Job { /** logger */ note: 该时间段应该执行几个任务还是会执行几个任 阅读全文
posted @ 2022-02-19 12:18 锐洋智能 阅读(423) 评论(0) 推荐(0) 编辑
摘要: falsk 采用nginx 分发请求时,url 太长,nginx 报错了,导致requests.get 返回不了数据。错误描述:[2019-08-12 09:56:38] <html><head><title>414 Request-URI Too Large</title></head><body 阅读全文
posted @ 2022-02-19 10:50 锐洋智能 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 我将行附加到for循环中的pandas DataFrame,但最后数据帧始终为空.我不想将行添加到数组然后调用DataFrame构造函数,因为我的实际for循环处理大量数据.我也试过pd.concat没有成功.任何人都可以强调我缺少什么使附加语句有效吗?这是一个虚拟的例子: import panda 阅读全文
posted @ 2022-02-19 08:38 锐洋智能 阅读(689) 评论(0) 推荐(0) 编辑
摘要: 摘要:本文讲的是利用Python实现网页数据抓取的三种方法;分别为正则表达式(re)、BeautifulSoup模块和lxml模块。本文所有代码均是在python3.5中运行的。 本文抓取的是[中央气象台](http://www.nmc.cn/)首页头条信息: 其HTML层次结构为: 抓取其中hre 阅读全文
posted @ 2022-02-19 07:36 锐洋智能 阅读(1764) 评论(0) 推荐(0) 编辑
摘要: apply_async()本身就可以返回被进程调用的函数的返回值。上一个创建多个子进程的代码中,如果在函数func中返回一个值,那么pool.apply_async(func, (msg, ))的结果就是返回pool中所有进程的值的对象(注意是对象,不是值本身)。 import multiproce 阅读全文
posted @ 2022-02-18 17:46 锐洋智能 阅读(4085) 评论(1) 推荐(1) 编辑
摘要: import random import time import multiprocessing def worker(name, q): t = 0 for i in range(10): print(name + " " + str(i)) x = random.randint(1, 3) t 阅读全文
posted @ 2022-02-18 17:33 锐洋智能 阅读(2502) 评论(0) 推荐(0) 编辑
摘要: import multiprocessing def run(ID, q): print("Starting thread %s " % (ID)) q.put(ID) return None if __name__ == '__main__': p_list=[] q = multiprocess 阅读全文
posted @ 2022-02-18 17:15 锐洋智能 阅读(683) 评论(0) 推荐(0) 编辑
摘要: 个人一直觉得对学习任何知识而言,概念是相当重要的。掌握了概念和原理,细节可以留给实践去推敲。掌握的关键在于理解,通过具体的实例和实际操作来感性的体会概念和原理可以起到很好的效果。本文通过一些具体的例子简单介绍一下python的多线程和多进程,后续会写一些进程通信和线程通信的一些文章。 python多 阅读全文
posted @ 2022-02-18 16:36 锐洋智能 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 直接就一句话,采用绝对路径的情况下:os.system('C:/Users/你的路径/reyo.bat')需要注意,你如果直接赋值windows下的路径是这样的:C:\Windows\reyo\AppPatch64 阅读全文
posted @ 2022-02-18 06:27 锐洋智能 阅读(256) 评论(0) 推荐(0) 编辑
摘要: # _*_coding:utf-8_*_ import time import threading import configparser import os from datetime import datetime class MyThread(threading.Thread): def __ 阅读全文
posted @ 2022-02-16 12:10 锐洋智能 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 开机自启python打包exe开机自动启动的实例(windows)https://www.jb51.net/article/164217.htmPython读取ini配置文件的方式https://www.cnblogs.com/skaarl/p/10274116.htmlimport win32ap 阅读全文
posted @ 2022-02-16 10:05 锐洋智能 阅读(56) 评论(0) 推荐(0) 编辑
摘要: 打开电脑的控制面板,之后点击日期和时间。 进入日期和时间,点击更改日期和时间。 之后点击更改日期设置。 进入日期页面,在短日期处,加上4个d,也就是dddd。 阅读全文
posted @ 2022-02-12 06:03 锐洋智能 阅读(1103) 评论(0) 推荐(0) 编辑
摘要: 在进行了一些转换之后,我获得了以下数据帧,如何通过本例short_name中的列并使用其他作为指示符频率来获取前n个记录.我读了这个post,但两个解决方案的问题是他们摆脱了列product_name,他们只保留了分组列,我需要保留它们. short_name product_id frequenc 阅读全文
posted @ 2022-02-11 19:23 锐洋智能 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 阅读目录 1.1 有两种丢失数据: 1.2 np.nan(NaN) 1.3 pandas中的None与NaN 2.1 空值检测 2.2 空值过滤 2.3 空值填充¶ 1.空值 1.1 有两种丢失数据: None: Python自带的数据类型 不能参与到任何计算中 np.nan: float类型 能参 阅读全文
posted @ 2022-02-11 09:08 锐洋智能 阅读(2197) 评论(0) 推荐(0) 编辑
摘要: 解决办法1)添加新列,设置列的结构属性。alter table information add column 'yyy' varchar(255) not null first; -新添加列yyy至第一列.2)将出错的列内容复制到新列中并删除出错列update information set yyy 阅读全文
posted @ 2022-02-10 10:13 锐洋智能 阅读(277) 评论(0) 推荐(0) 编辑
摘要: nginx的headers_more模块用于 添加、修改或清除 请求/响应头,该模块不是nginx自带的,默认不包含该模块,需要另外安装。幸运的是openresty默认包含了该模块,可以直接使用。 该模块主要有4个指令 more_set_headers 用于 添加、修改、清除 响应头more_cle 阅读全文
posted @ 2022-02-07 10:36 锐洋智能 阅读(1246) 评论(0) 推荐(0) 编辑
摘要: 修改src/http/ngx_http_header_filter_module.c 找到下面两行: static char ngx_http_server_string[] = "Server: nginx" CRLF; static char ngx_http_server_full_strin 阅读全文
posted @ 2022-02-07 10:32 锐洋智能 阅读(2226) 评论(0) 推荐(0) 编辑
摘要: 上下文使用Lua时序方法init_by_lua*, set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*, body_filter_by_lua*, log_by_lua*, ngx. 阅读全文
posted @ 2022-02-07 10:30 锐洋智能 阅读(639) 评论(0) 推荐(0) 编辑
摘要: 如果有等于的返回目标值本身和第一个数 数据 1、2、4、5、7、8、10 例1:条件值:2 结果值:2、4 例2:条件值:3 结果值:2、4 例3:条件值:6 结果值:5、6 select founder_id from audit_info WHERE id in( (select id from 阅读全文
posted @ 2022-02-07 07:06 锐洋智能 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 1、round(x,d) :用于数据的四舍五入,round(x) ,其实就是round(x,0),也就是默认d为0; 这里有个值得注意的地方是,d可以是负数,这时是指定小数点左边的d位整数位为0,同时小数位均为0; SELECT ROUND(100.3465,2),ROUND(100,2),ROUN 阅读全文
posted @ 2022-02-05 10:58 锐洋智能 阅读(3947) 评论(0) 推荐(0) 编辑
摘要: 在量化交易中,我们一般会用到一些常用的指标,比如移动平均线(ma), MACD,KDJ,EMA,EXPMA等等。一般计算kdj等指标会用到talib金融库。但是如果用pandas的dataframe来存放数据的话,实际上只用Pandas的内置方法也是可以很容易的计算一些常用指标的。本文就介绍只用10 阅读全文
posted @ 2022-02-03 21:10 锐洋智能 阅读(525) 评论(0) 推荐(0) 编辑
摘要: def calKdj(df): low_list = df['low'].rolling(9, min_periods=9).min() low_list.fillna(value=df['low'].expanding().min(), inplace=True) high_list = df[' 阅读全文
posted @ 2022-02-03 20:58 锐洋智能 阅读(458) 评论(0) 推荐(0) 编辑
摘要: ngx_lua模块的原理: 1、每个worker(工作进程)创建一个Lua VM,worker内所有协程共享VM;2、将Nginx I/O原语封装后注入 Lua VM,允许Lua代码直接访问;3、每个外部请求都由一个Lua协程处理,协程之间数据隔离;4、Lua代码调用I/O操作等异步接口时,会挂起当 阅读全文
posted @ 2022-01-30 17:06 锐洋智能 阅读(323) 评论(0) 推荐(0) 编辑
摘要: Nginx环境 a. 查看当前系统cat /etc/redhat-release [root@nginx /]# cat /etc/redhat-release CentOS release 6.7 (Final) [root@nginx /]# b. 查看系统内核uname –r [root@ng 阅读全文
posted @ 2022-01-29 21:47 锐洋智能 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 修改了下nginx的配置 server { listen 80; server_name localhost; client_max_body_size 10M; location /web/service/upload { proxy_pass http://192.168.1.188/uploa 阅读全文
posted @ 2022-01-28 20:33 锐洋智能 阅读(124) 评论(0) 推荐(0) 编辑
摘要: OpenResty 官方提供了封装好的 lua函数,方便我们开箱即用。支持一下几个场景: 根据ip限制并发连接数 限制时间窗口的请求数,如:限制 ip 每分钟只能调用 100 次 /order 接口,(允许在时间段开始的时候一次性放过100个请求) 平滑限制接口请求数,如:限制 ip 每分钟只能调用 阅读全文
posted @ 2022-01-28 16:44 锐洋智能 阅读(650) 评论(0) 推荐(0) 编辑
摘要: 说明:openresty可以理解为一个服务器它将nginx的核心包含了过来,并结合lua脚本语言实现一些对性能要求高的功能,该篇文章介绍了使用openresty 1.purview.lua --调用json公共组件 cjson = require("cjson") fun = require("tt 阅读全文
posted @ 2022-01-28 12:01 锐洋智能 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 在Nginx服务器上进行一些常规设置,限制某一段时间内同一ip访问数实例. nginx限制ip访问频率数,也是说限制同一个ip在一段时间里连接服务器的次数. 通过这种设置,可以一定程度上防止类似CC这种快速频率请求的攻击 1,HttpLimitReqModul 限制某一段时间内同一ip访问数实例 这 阅读全文
posted @ 2022-01-26 21:54 锐洋智能 阅读(1692) 评论(0) 推荐(0) 编辑
摘要: 用文本编辑器打开chromedriver.exe,搜索$cdc_asdjflasutopfhvcZLmcfl_这个字符串,随便改几个字母,保持相同长度就行 /** * Returns the global object cache for the page. * @param {Document=} 阅读全文
posted @ 2022-01-26 21:07 锐洋智能 阅读(484) 评论(0) 推荐(0) 编辑
摘要: \ 本章主要对Nginx服务器的常用配置文件,包括虚拟主机配置,location配置级语法等。 1. 虚拟主机配置 在前面启动Nignx后,Nginx目录下会多出几个文件夹 1 2 3 4 5 6 7 8 9 10 11 /usr/local/nginx --conf 配置文件 --html 网页文 阅读全文
posted @ 2022-01-26 16:44 锐洋智能 阅读(316) 评论(0) 推荐(0) 编辑
摘要: nginx -t报警告如下:[emerg]: could not build theproxy_headers_hash, you should increase either proxy_headers_hash_max_size: 512or proxy_headers_hash_bucket_ 阅读全文
posted @ 2022-01-24 21:31 锐洋智能 阅读(760) 评论(0) 推荐(0) 编辑
摘要: 去除数组重复值方法: 1,利用indexOf()方法去除 思路:创建一个新数组,然后循环要去重的数组,然后用新数组去找要去重数组的值,如果找不到则使用.push添加到新数组,最后把新数组返回回去就行了 看不懂没关系,上代码就比较容易懂了 function fun(arr){ let newsArr 阅读全文
posted @ 2022-01-22 11:52 锐洋智能 阅读(2611) 评论(0) 推荐(0) 编辑
摘要: 一月 21, 2022 7:23:27 上午 org.quartz.impl.jdbcjobstore.JobStoreSupport recoverMisfiredJobs信息: Handling 5 trigger(s) that missed their scheduled fire-time 阅读全文
posted @ 2022-01-21 07:25 锐洋智能 阅读(806) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 31 下一页