- 博客(142)
- 资源 (39)
- 收藏
- 关注
原创 C/C++ 取整函数ceil(),floor()
使用floor函数。floor(x)返回的是小于或等于x的最大整数。如: floor(10.5) == 10 floor(-10.5) == -11使用ceil函数。ceil(x)返回的是大于x的最小整数。如: ceil(10.5) == 11 ceil(-10.5) ==-10floor()是向负无穷大舍入,floor(-10.5) == -11;ceil()是向正无穷大舍入,ceil(-10.5) == -10fix朝零方向取整,如fix(-1...
2021-07-08 10:38:50
1247
1
原创 WX小程序反编译问题 Unexpected end of input
vm.js:2_C^^SyntaxError: Unexpected end of input at new Script (vm.js:83:7) at VM.run (D:\Program Files\nodejs\node_global\node_modules\vm2\lib\main.js:834:13) at wu.get.code (L:\GitHub\wxappUnpacker2\wuWxss.js:179:16) at ioLimit.runWit.
2021-01-21 17:54:33
3508
54
原创 解决windows7上不能安装最新Node.js问题
Node.js is only supported on Windows 8.1, Windows Server 2012 R2, or higher. Setting the NODE_SKIP_PLATFORM_CHECK environment variable to 1 skips this check, but Node.js might not execute correctly. Any issues encountered on unsupported platforms will not.
2021-01-21 10:36:55
9063
2
原创 Python学习笔记之re使用问题bad escape \\U
在re进行字符串处理是,有时会出现如下问题bad escape \U 获取其它问题类似问题,如下所示;经过跟如re类发现,是由于\\U的转义造成的;1. 示例import redef demo_re(): xlsPath = r'C:\Users\Administrator' lines = r''' set patchRomPath="J:/Bluetooth/" set xlsPath="C:\Users\Administrator\Desktop"
2021-01-08 15:44:59
3254
原创 Python学习笔记之wkhtmltopdf使用
在使用wkhtmltopdf时出现如下问题: from main import WKhtmlToPdf, wkhtmltopdfModuleNotFoundError: No module named 'main'而直接看网上,存在好多类似的问题,我看了源码,发现其不仅存在一些问题,还仅支持到Python2.x;如果要支持Python 3.x还需要修改一些东西;1. init文件修改api临时永不到,先注释掉了。from .main import WKhtmlToPdf...
2020-12-31 15:37:57
2702
原创 Python学习笔记之函数print颜色显示
1. print颜色def demo_print(): print('\033[30m打印前景色0\033[0m') print('\033[31m打印前景色1\033[0m') print('\033[32m打印前景色2\033[0m') print('\033[33m打印前景色3\033[0m') print('\033[34m打印前景色4\033[0m') print('\033[35m打印前景色5\033[0m') print('\033
2020-10-27 18:15:27
809
原创 python学习笔记之graphviz画图(二)
1. python学习笔记之graphviz画图(一)2. python学习笔记之graphviz画图(二)9. 示例from graphviz import Digraphg = Digraph('G', filename='hello.gv')g.edge('Hello', 'World')g.view()10.示例from graphviz import Graphg = Graph('G', filename='process.gv', engine='.
2020-10-23 15:07:07
1076
原创 python学习笔记之graphviz画图(一)
Python下graphviz使用示例:# 库引入from graphviz import Digraph1. 示例g = Digraph('G', filename='angles.gv')g.attr(bgcolor='blue')with g.subgraph(name='cluster_1') as c: c.attr(fontcolor='white') c.attr('node', shape='circle', style='filled', fil..
2020-10-23 14:56:28
2493
原创 蓝牙BQB测试基础知识(一)
蓝牙BQB认证的射频测试原理总结如下:PRBS:Pseudo-Random Binary Sequence,中文翻译叫做伪随机二进制序列.PRBS 码的周期长度与其阶数有关,常用的阶数有 7 、 9 、 11 、 15 、 20 、 23 、 31 ,也就是我们常说的 PRBS7 、 PRBS9 、 PRBS11 、 PRBS15 、 PRBS20 、 PRBS23 、 PRBS31 。发射机测试原理1. TRM/CA/01/C (Output Power) 输出功率测试仪发射净荷.
2020-10-21 10:52:36
7245
1
原创 Python学习笔记之可变参数
1. 可变参数,星(*)def SUM(*args): s = 0 for i in args: s += i return sprint(SUM(1,2,3,4))################################################## # output102. 可变参数,星(**)def do_variable(name, age, gender='man', *args, **kwds): prin
2020-09-25 10:20:59
202
原创 Python学习笔记django_admin_bootstrapped问题
注意缺失说明呢?no module named 'django_admin_bootstrapped' ,那就pip install ‘django_admin_bootstrapped’另外在类似的安装过程中,出现这种问题的情况大致都是因为该模块未安装,使用 pip install xxx 进行安装,即可解决此类问题。出现ModuleNotFoundError: No module named 'rest_framework' 时,可以执行 pip install djangorestf...
2020-09-14 12:23:18
664
原创 python学习笔记之pandas读取Excel错误UnicodeDecodeError: ‘utf-16-le‘
使用下述接口读取xls文件都会出现utf-16-le错误; xlsData = pd.ExcelFile(sPath) print(xlsData) # xlrd.book.DEBUG = 1 xlsData = xlrd.open_workbook(sPath, encoding_override='utf-8') print(xlsData)使用xlrd或者pandas里的xlrd都会出现如下错误:发现handle_writeaccess这个接口
2020-08-11 18:39:45
2929
原创 量化分析之(四)股票暴涨行情不错过之买持股基金
股票暴涨行情不错过之买持股基金。有时在行情暴涨时,出现某些股票买进不了(天天一字板,看着非常的眼馋),怎么办呢?只能曲线买基金,那怎么买呢?#!/usr/bin/env python# -*- coding: utf-8 -*-# @license : (C) Copyright 2017-2020.# @Time : 2020/6/14 15:20# @File : etf.py# @Software: PyCharm# @desc :import reques
2020-07-25 09:38:15
535
原创 量化分析之(三)均线突破平台处理
突破60、120、250日均线平台,周期可选#!/usr/bin/env python# -*- coding: utf-8 -*-# @license : (C) Copyright 2017-2020# @Time : 2020/6/16 9:43# @File : lesson3.py# @Software: PyCharm# @desc :import sys, copyimport numpy as npfrom gpx.common.gpc impor
2020-06-16 10:13:45
901
原创 量化分析之(二)均线多头处理
对于码农来说,只能上code了,可以选择均线多点来判断当前均线是否处于多头状态。import copyfrom gpx.common.gpc import *import progressbar as pb# logger = logging.getLogger('seq.' + __name__)PROFIT_COLUMN = ['code', 'name', 'area', 'industry', 'roe', 'business_income', '
2020-06-16 09:57:33
1588
原创 backtrader学习笔记(三).MACD
#!/usr/bin/env python# -*- coding: utf-8 -*-# @license : (C) Copyright 2017-2020, ZGMicro.com.# @contact : 5509@163.com# @Time : 2020/5/23 22:38# @File : backtrader3.py# @Software: PyCharm# @desc :from __future__ import (absolute_import, .
2020-06-15 18:25:01
5341
1
原创 backtrader学习笔记(二).RSI
#!/usr/bin/env python# -*- coding: utf-8 -*-# @license : (C) Copyright 2017-2020.# @contact : 5509@163.com# @Time : 2020/5/23 13:32# @File : backtrade2.py# @Software: PyCharm# @desc :from __future__ import (absolute_import, division, pri.
2020-06-15 18:12:54
1927
原创 cython - callback函数调用
1. find_cheeses.h文件// find_cheeses.h 文件typedef void (*cheesefunc)(char *name, void *user_data);void find_cheeses(cheesefunc user_func, void *user_data);2. find_cheeses.c文件/* * An example of a C API that provides a callback mechanism. */#i.
2020-06-15 15:43:54
466
原创 量化分析之(一)倍量分析处理
#!/usr/bin/env python# -*- coding: utf-8 -*-# @license : (C) Copyright 2017-2020.# @contact : 5509@163.com# @Time : 2020/5/19 14:57# @File : lesson1.py# @Software: PyCharm# @desc :import osimport pandas as pdimport tushare as tsimport.
2020-06-15 10:30:31
647
原创 cython - 函数调用之返回Python list
1. primes.pyxdef primes(int nb_primes): cdef int n, i, len_p cdef int p[1000] if nb_primes > 1000: nb_primes = 1000 len_p = 0 # The current number of elements in p. n = 2 while len_p < nb_primes: # Is n pr
2020-06-12 18:46:29
731
原创 cython - 函数调用之fib
fib.pyx# fib.pyxfrom __future__ import print_functiondef fib(n): """Print the Fibonacci series up to n.""" a, b = 0, 1 while b < n: print(b, end=' ') a, b = b, a + b print()setup.py# setup.pyfrom setuptools i
2020-06-12 18:35:40
346
原创 Cython使用问题集合
1. Cython安装, 比较简单:pip install Cython2. 写第一个程序- helloworld.pyx1). 新建一个helloworld.pyx文件,如下所示:# cython: language_level=3print("Hello world!")# cython: language_level=3这个比较关键,不加会出现如下错误:2).新建setup.py文件,并添入下述code,并保存。from distutils.core i.
2020-06-11 10:35:14
2058
原创 pandas报错Try using .loc[row_indexer,col_indexer] = value instead
D:\Program Files (x86)\Python37-32\lib\site-packages\pandas\core\indexing.py:845: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame.Try using .loc[row_indexer,col_indexer] = value insteadSee the caveats in the d.
2020-06-10 09:47:25
5071
原创 tushare 之get_today_all修复接口完整code
#!/usr/bin/env python# -*- coding: utf-8 -*-# @license : (C) Copyright 2017-2020.# @contact : xsophiax# @Time : 2020/6/8 10:10# @File : get_today_all_xsophiax.py# @Software: PyCharm# @desc :import timeimport jsonimport lxml.htmlfrom l.
2020-06-08 10:20:43
3282
3
原创 python学习笔记之pyinstaller failed to execute script问题
File "<frozen importlib._bootstrap>", line 983, in _find_and_load使用pyinstaller -D demo.py打包完成后,在dist\Demo目录下,在cmd下执行demo.exe,就能发现问题track。发现是pyecharts问题,是pyinstaller对此库支持不好。...
2020-05-26 17:48:58
2209
原创 backtrader学习笔记(一).SMA
#!/usr/bin/env python# -*- coding: utf-8 -*-# @license : (C) Copyright 2017-2020.# @Time : 2020/5/23 13:01# @File : gpb_backtrade.py# @Software: PyCharm# @desc :from datetime import datetimeimport pandas as pdimport backtrader as btimp.
2020-05-23 17:16:06
1395
1
原创 Python - PyQt5 - ModuleNotFoundError No module named PyQt5.Qsci
ModuleNotFoundError: No module named 'PyQt5.Qsci',出现这个问题,即使重新安装 Qsci也是无用的; from PyQt5.Qsci import QsciScintillaModuleNotFoundError: No module named 'PyQt5.Qsci'这是你就要重新安装PyQt5,建议到pyqt5指定的网页上download wheel文件进行安装。...
2020-05-22 11:46:21
1997
原创 Python学习笔记之安装TA-Lib talib
Python学习笔记之安装TA-Lib talib,采用pip install TA-Lib可能要歇菜。1. 安装方式(windows):下载 ta-lib-0.4.0-msvc.zip,解压到 C:\ta-lib, 然后pip install ta-lib, 便会报编译错误问题,这样得安装一些VS环境,没耐心的人会直接逼疯。所以一般情况下,直接放弃;2. 安装whl文件 从https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib下载t..
2020-05-15 10:05:29
2889
2
原创 tushare 之 RuntimeError: implement_array_function method already has a docstring
在Python中有时会出现RuntimeError: implement_array_function method already has a docstring?那如何解决呢?此问题在matplotlib和pandas中容易出现。发现一个比较怪异的问题,Python库在安装顺序上也必须要注意的;出现此问题,请重新安装numpy,pandas,matplotlib库;本地安装版本,记录一下:Python 3.7.0 # Python 3.7.0 (v3.7.0:1bf9cc5093,
2020-05-14 17:43:11
323
原创 tushare 之get_today_all出现ValueError No found when decoding object value问题
在使用tushare.get_today_all出现ValueError: No ':' found when decoding object value问题改如何解决呢?这是你会发现,其实get_today_all从网页获取的数据时正常的,而进行json -> dataframe时出的错,经过拍错后,发现是因为网页上读取的json文件有问题的。要进行一些字符的替换的;所以要找到源码对里面一个函数进行Fixed就OK,修改后的code如下。def _parsing_dayprice_js
2020-05-14 14:57:35
4099
16
原创 tushare 之 Python ‘cannot import name 'StringIO' from 'pandas.compat’解决方法
在使用tushare源码进行获取数据时,会出现Python ‘cannot import name 'StringIO' from 'pandas.compat’问题,那如何解决呢?# 在pandas v0.25.0 版本前处理方式from pandas.compat import StringIO在pandas > v0.25.0 版本后需进行如下处理v = pd.__version__ if int(v.split('.')[1])>=25 or int(v.split(
2020-05-14 14:50:21
2876
原创 Python学习笔记之Bytes与Str转换
# bytes objectb = b"11223344"# str objects = "xsophiax"# str to bytesstb = bytes(s, encoding = "utf8")print(stb)# bytes to strbts = str(b, encoding = "utf8")print(bts)# an alternative m...
2020-04-24 14:30:30
247
原创 Python学习笔记之(三) matplotlib.pyplot
1. 正态分布import numpy as npimport matplotlib.pyplot as pltmu, sigma = 100, 15x = mu + sigma * np.random.randn(10000)# the histogram of the datan, bins, patches = plt.hist(x, 50, density=1, fac...
2020-04-14 15:36:30
343
原创 Python学习笔记之(二) matplotlib.pyplot
1. Plotting 使用关键字dataimport numpy as npimport matplotlib.pyplot as pltdata = {'a': np.arange(50), 'c': np.random.randint(0, 50, 50), 'd': np.random.randn(50)}data['b'] = data[...
2020-04-14 15:27:57
395
原创 Python学习笔记之(一) matplotlib.pyplot
1.快速生成曲线# Pyplotimport matplotlib.pyplot as pltplt.plot([1, 2, 3, 4])plt.ylabel('some numbers')plt.show()import matplotlib.pyplot as pltplt.plot([1, 2, 3, 4], [1, 4, 9, 16])plt.ylabel...
2020-04-14 14:55:38
290
原创 python学习笔记之两个list之间的差异(差集、交集、并集、查重)
案例1:list_a = ['1', '2', '3', '4']list_b = ['1', '2', '3', '5']# diff# list_a对应list_b的差集diff_a_b = set(list_a).difference(set(list_b))print('list_a对应list_b的差集:', diff_a_b)# list_b对应list_a的差集...
2020-04-14 11:07:19
3827
原创 Python/C++调用DLL中获取运行路径问题
一般在C++的DLL的库中,多使用GetModuleFileName接口来获取当前DLL的执行路径,是非常nice的处理,但是如过把用Python调用DLL,就会发现其在DLL中用GetModuleFileName获取的路径与C++获取的不一样; 调试发现Python调用DLL是把DLL加载Python的根目录下运行,这个时候使用DLL创建临时目录,或获取其运行路径就...
2020-03-30 10:41:11
1241
原创 Python学习笔记之argparse高级使用
在有些开发中,尤其是小工具中,有时会用到命令行输入,那怎么样把命令行输入做的美观,显得高大上呢。如下所示,请仔细看注释说明:# -*- coding: utf-8 -*-import argparse_args1 = "-f hello.txt -n 1 2 3 -x 100 -y b -z a -q hello".split()_args2 = "@args.t...
2020-03-30 10:24:46
434
1
原创 使用bash从Git中获取顺序版本号 一种方法
在使用git时,获取其顺序版本号成为了一种奢望,因为其采用的hash值来标记的,虽然可以使用8个字节的短hash值来标记或者只是版本,但还是没有顺序版本号来的直接,本文提供一个脚本的方式来获取顺序版本号; 简而言之,就是统计当前提交次数来计算version number;其利用bash来获取的,具体如下文所示:# 基准版本号默认是1,可以通过传递一个参数修改...
2020-02-14 16:15:55
634
wxappUnpacker 微信反解析工具包-反解析
2023-09-14
graphviz - v2.38
2020-10-23
vcredist_x86.zip
2019-09-16
ARM体系结构与编程(高清带书签) 杜春雷
2017-08-12
搬运【完美破解 BCGControlBar 22.1最新版】
2015-04-04
Visual C++内存检测工具(Visual Leak Detector) 2.2.3
2015-04-04
Visual C++界面编程技术
2011-11-12
VC++深入详解 Code
2011-11-12
BCGControlBarPro.v15.10
2011-11-10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人