摘要:
```
class Inventory: def __init__(self): self.slots = [] def add_item(self, item): self.slots.append(item) class SortedInventory(Inventory): def add_item(self, item): ... 阅读全文
posted @ 2017-06-22 22:12
2021年的顺遂平安君
阅读(205)
评论(0)
推荐(0)
摘要:
class Inventory: def __init__(self): self.slots = [] def add_item(self, item): self.slots.append(item)class ... 阅读全文
posted @ 2017-06-22 22:12
2021年的顺遂平安君
阅读(68)
评论(0)
推荐(0)
摘要:
This is the counterpart of getattr(). The arguments are an object, a string and an arbitrary value. The string may name an exist... 阅读全文
posted @ 2017-06-22 20:10
2021年的顺遂平安君
阅读(51)
评论(0)
推荐(0)
摘要:
This is the counterpart of getattr(). The arguments are an object, a string and an arbitrary value. The string may name an existing attribute or a new 阅读全文
posted @ 2017-06-22 20:10
2021年的顺遂平安君
阅读(234)
评论(0)
推荐(0)
摘要:
```
def test_var_args(f_arg, *argv): print("first normal arg:", f_arg) for arg in argv: print("another arg through *argv:", arg) test_var_args('yasoob', 'python', 'eggs', 'test')
```
... 阅读全文
posted @ 2017-06-22 20:08
2021年的顺遂平安君
阅读(140)
评论(0)
推荐(0)
摘要:
def test_var_args(f_arg, *argv): print("first normal arg:", f_arg) for arg in argv: print("another arg through *arg... 阅读全文
posted @ 2017-06-22 20:08
2021年的顺遂平安君
阅读(54)
评论(0)
推荐(0)
摘要:
if end1 <= val <= end2 or end2 <= val <= end1: return Trueelse: return False 等于 return end1 <= val <= end2 or end2 <= va... 阅读全文
posted @ 2017-06-22 20:01
2021年的顺遂平安君
阅读(107)
评论(0)
推荐(0)
摘要:
``` if end1 阅读全文
posted @ 2017-06-22 20:01
2021年的顺遂平安君
阅读(3970)
评论(0)
推荐(0)
摘要:
```
apt-get install r-base r-base-dev
``` 阅读全文
posted @ 2017-06-22 13:46
2021年的顺遂平安君
阅读(248)
评论(0)
推荐(0)
摘要:
apt-get install r-base r-base-dev 阅读全文
posted @ 2017-06-22 13:46
2021年的顺遂平安君
阅读(47)
评论(0)
推荐(0)
摘要:
Find the unique elements of an array. Returns the sorted unique elements of an array. There are three optional outputs in add... 阅读全文
posted @ 2017-06-22 11:27
2021年的顺遂平安君
阅读(76)
评论(0)
推荐(0)
摘要:
Find the unique elements of an array. Returns the sorted unique elements of an array. There are three optional outputs in addition to the unique eleme 阅读全文
posted @ 2017-06-22 11:27
2021年的顺遂平安君
阅读(470)
评论(0)
推荐(0)
摘要:
One shape dimension can be 1. In this case, the value is inferred from the length of the array and remaining dimensions. 阅读全文
posted @ 2017-06-22 11:22
2021年的顺遂平安君
阅读(517)
评论(0)
推荐(0)
摘要:
>>> a = np.arange(6).reshape((3, 2))>>> aarray([[0, 1], [2, 3], [4, 5]]) >>> np.reshape(a, (2, 3)) # C-like index o... 阅读全文
posted @ 2017-06-22 11:22
2021年的顺遂平安君
阅读(72)
评论(0)
推荐(0)
摘要:
conda install anaconda-cleananaconda-clean --yes Anaconda 安装的时候在 .bash_profile中添加了变量: export PATH="/Users/jsmith/anaconda3/bin... 阅读全文
posted @ 2017-06-22 11:14
2021年的顺遂平安君
阅读(61)
评论(0)
推荐(0)
摘要:
` Anaconda 安装的时候在 中添加了变量: 阅读全文
posted @ 2017-06-22 11:14
2021年的顺遂平安君
阅读(2050)
评论(0)
推荐(0)
摘要:
创建环境 列出所有环境 或 克隆环境 删除环境 阅读全文
posted @ 2017-06-22 11:12
2021年的顺遂平安君
阅读(202)
评论(0)
推荐(0)
摘要:
创建环境 conda create --name bunnies python=3 astroid babel 列出所有环境 conda info --envs 或 conda env list 克隆环境 conda create --nam... 阅读全文
posted @ 2017-06-22 11:12
2021年的顺遂平安君
阅读(48)
评论(0)
推荐(0)
摘要:
import matplotlib.pyplot as pltplt.imshow(digits.images[-1], cmap = plt.cm.gray_r) .imshow() Plotting numpy arrays as image... 阅读全文
posted @ 2017-06-22 11:09
2021年的顺遂平安君
阅读(82)
评论(0)
推荐(1)
摘要:
Plotting numpy arrays as images Colormap 加上 相当于颜色 _reverse_ 。 阅读全文
posted @ 2017-06-22 11:09
2021年的顺遂平安君
阅读(2700)
评论(1)
推荐(0)
摘要:
绘制好图像之后,需要使用 才会显示出图片。 阅读全文
posted @ 2017-06-22 10:58
2021年的顺遂平安君
阅读(549)
评论(0)
推荐(0)
摘要:
import matplotlib.pyplot as plt 绘制好图像之后,需要使用plt.show()才会显示出图片。 阅读全文
posted @ 2017-06-22 10:58
2021年的顺遂平安君
阅读(67)
评论(0)
推荐(0)
摘要:
!!!_Anaconda_ 和 _Jupyter Notebook_ 在 _zsh_ 环境下不能正常使用! 启动建立的 Anaconda 环境 安装 :`conda install nb_conda` 在该环境下的 _Terminal_ 中启动 _Jupyter Notebook_ : _ Jupy 阅读全文
posted @ 2017-06-22 10:53
2021年的顺遂平安君
阅读(1630)
评论(0)
推荐(0)
摘要:
!!!Anaconda 和 Jupyter Notebook 在 zsh 环境下不能正常使用! 启动建立的 Anaconda 环境安装 nb_conda:conda install nb_conda在该环境下的 Terminal 中启动 Jupyter ... 阅读全文
posted @ 2017-06-22 10:53
2021年的顺遂平安君
阅读(65)
评论(0)
推荐(0)
浙公网安备 33010602011771号