- 博客(10)
- 收藏
- 关注
转载 心理学实验学习pygame编程-贪吃蛇(2)
这节是让snake相应键盘并且能移动。 (1)首先给每一个方向指定一个移动的标记,并且给头部图片加上一个旋转角度。(snake.py) class Snake(): """ class of a snake: snake_head: use to local ...
2019-06-05 22:09:00
215
转载 心理学实验学习pygame编程-贪吃蛇(1)
神经科学/心理学实验经常用到一些电脑的模拟,例如检查注意力的持续注意测试(Continuous Perfomance Task,CPT),python + pygame是实现这些实验比较好的选择,下面几章将用pygame实现简单的游戏贪吃蛇来了解pygame的使用。之后还...
2019-06-03 20:20:00
322
转载 Python的哈希性(hashable)
An object is hashable if it has a hash value which never changes during its lifetime (it needs a __hash__() method), and can be compared to other o...
2019-01-22 22:00:00
207
转载 Bonferroni correction
在同一个样本空间内进行要总的一类错误(FWER, family-wise error rate)不超过阈值α的一种方法。 假设在同一样本空间内进行了m次比较,真阳性为n,所以n <= m 假设每一次实验需要控制的阈值为k FWER = P[∪(i = 0 -> n)(Pi &...
2017-11-08 19:44:00
1679
转载 R-studio figure margins too large
R-studio画图错误,figure margins too large,可以新建画图窗口解决 win.graph(width=4.875, height=2.5,pointsize=8) ...
2017-06-04 12:08:00
1250
转载 python3.6 pandas无法初始化和读取数据
在python3.6上装pandas出现,Initializing from file failed python3.6文档里面提到,在windows上把filesystem的默认编码改成了utf8。 在读写之前输入多一行 sys._enablelegacywindowsencoding(...
2017-03-03 10:40:00
382
转载 leetcode: 441. Arranging Coins
You have a total ofncoins that you want to form in a staircase shape, where everyk-th row must have exactlykcoins. Givenn, find the total nu...
2017-02-13 22:36:00
112
转载 大O符号、小o符号和逐点有界、一致有界(Introduction to Algorithms)
逐点有界函数{fn(x)}是定义在集合E上的函数序列。 如果对于每一个x属于E,序列{fn(x)}是有界的,即存在定义在E上的有限值函数g(x),使得: |fn(x)| < g(x) (x 属于 E,n = 1,2,3......). 一致有界。如果存在一个数M,使得: |fn(...
2017-01-31 15:36:00
1857
转载 leetcode:111. Minimum Depth of Binary Tree
Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the neare...
2017-01-28 17:42:00
67
转载 ruby访问方法
class Cat def initialize(aName) @name = aName end def set_name(aName) @name = aName end def get_name return @name endend ruby类似ja...
2017-01-12 11:57:00
95
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人