Tips
chineseqsc
这个作者很懒,什么都没留下…
展开
-
位操作总结
WikiBit manipulation is the act of algorithmically manipulating bits or other pieces of data shorter than a word. Computer programming tasks that require bit manipulation include low-level device co...原创 2018-03-15 11:04:38 · 197 阅读 · 0 评论 -
Windows下通过ssh远程访问jupyter
1.本地安装Xshell,建立连接,登录服务器2. 在远程服务器上,启动jupyter notebook服务:jupyter notebook --no-browser --port=88893.本地安装ssh,参考"Windows安装OpenSSH支持SSH",打开cmd,输入以下命令:ssh -N -f -L localhost:8888:localhost:8889 -p 22 r...原创 2019-01-10 16:58:14 · 3464 阅读 · 2 评论 -
C、C++数据类型所占字节数
C标准中并没有具体给出规定那个基本类型应该是多少字节数,具体与机器、OS、编译器有关,比如同样是在32bits的操作系统系,VC++的编译器下int类型为占4个字节;而tuborC下则是2个字节。所以int,long int,short int的宽度都可能随编译器而异。但有几条铁定的原则(ANSI/ISO制订的):sizeof(short int)<=sizeof(int)si...原创 2018-09-03 20:39:12 · 201 阅读 · 0 评论 -
struct和typedef struct
1 首先://注意在C和C++里不同 在C中定义一个结构体类型要用typedef: typedef struct Student { int a; }Stu;于是在声明变量的时候就可:Stu stu1;(如果没有typedef就必须用struct Student stu1;来声明)这里的Stu实际上就是struct Student的别名。Stu==s...原创 2018-09-03 10:53:04 · 129 阅读 · 0 评论 -
字符串指针操作
char s[]="abc"; char *ptr="abc"; cout&lt;&lt;s&lt;&lt;endl; // abc cout&lt;&lt;*s&lt;&lt;endl; // a cout&lt;&原创 2018-07-27 16:15:44 · 2066 阅读 · 0 评论 -
解决conda install,pip install 下载龟速问题
conda install清华提供的anaconda镜像,使用以后真的很快!相见恨晚!!! https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/TUNA 还提供了 Anaconda 仓库的镜像,运行以下命令:conda config --add channels https://mirrors.tuna.tsinghua.edu.cn...原创 2018-06-06 23:14:32 · 2105 阅读 · 2 评论 -
如何保存及加载Keras模型
我们不推荐使用pickle或cPickle来保存Keras模型你可以使用model.save(filepath)将Keras模型和权重保存在一个HDF5文件中,该文件将包含:. 模型的结构,以便重构该模型 . 模型的权重 . 训练配置(损失函数,优化器等) .优化器的状态,以便于从上次训练中断的地方开始 使用keras.models.load_model(filepath)来重新...转载 2018-05-27 09:10:44 · 4399 阅读 · 1 评论 -
python中的os.path模块用法 os模块,shutil模块
python中的os.path是比较常用的模块,把其中的几个函数介绍如下: 1.dirname() 用于去掉文件名,返回目录所在的路径import osos.path.dirname('d:\\library\\book.txt')&gt;&gt;&gt;'d:\\library'2.basename() 用于去掉目录的路径,只返回文件名import osos.pat...转载 2018-05-14 21:09:25 · 241 阅读 · 0 评论 -
C++中的字符串查找:string.find()函数与string::npos
查找字符串a是否包含子串b, 不是用strA.find(strB) > 0而是strA.find(strB) != string:npos string::size_type pos = strA.find(strB); if(pos != string::npos){}int idx = str.find(“abc”); if (idx == string::npos)...原创 2018-05-07 11:25:50 · 1722 阅读 · 0 评论 -
异或的应用
转自https://www.lijinma.com/blog/2014/05/29/amazing-xor/MAY 29TH, 2014什么是异或?Wikipedia的解释:在逻辑学中,逻辑算符异或(exclusive or)是对两个运算元的一种逻辑析取类型,符号为 XOR 或 EOR 或 ⊕(编程语言中常用^)。但与一般的逻辑或不同,异或算符的值为真仅当两个运算元中恰有一个的值为真,而另外一个的...转载 2018-03-09 17:25:43 · 224 阅读 · 0 评论 -
conda安装dlib
conda install -c menpo dlib=18.18原创 2019-01-09 16:52:39 · 3892 阅读 · 0 评论