Python
jerry173985
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
fit a complex function using 101 RBF basis functions with Linear Regression
import numpy as np import matplotlib.pyplot as plt def rbf_tut1_q3(xx, kk, hh): """Evaluate RBF kk with bandwidth hh on points xx (shape N,)""" center = ((kk - 51) * hh) / np.sqrt(2) phi = np.exp((-(xx - center) ** 2) / hh ** 2) return ph原创 2021-10-02 21:53:11 · 225 阅读 · 0 评论 -
backup all conda envs all at once and uninstall conda
bash script to backup all conda environment lists #!bin/bash NOW=$(date "+%Y-%m-%d") CONDA_BASE=$(conda info --base) CONDA_FUNCTION="etc/profile.d/conda.sh" CONDA="$CONDA_BASE/$CONDA_FUNCTION" source $CONDA mkdir ./condaenvs-$NOW ENVS=$(conda env list |原创 2020-12-31 19:53:29 · 175 阅读 · 0 评论 -
Set Python3 as default python
First, execute python to check the default python on your raspberry Pi. Press Ctrl-Z to exit. If it is python3, you can skip this section. If it is python2, you need execute the following commands to set default python to python3. Enter directory /usr/bin原创 2020-12-27 20:22:24 · 413 阅读 · 0 评论 -
Python Statement
d = {'k1':1,'k2':2,'k3':3} for item in d: print(item) >> k1 >> k2 >> k3 # Create a dictionary view object d.items() # Dictionary unpacking for k,v in d.items(): v = v+1 print(k) print(v) >> k1 >> 2 >> k.原创 2020-12-15 23:51:59 · 534 阅读 · 0 评论 -
Python3 basics
a = 10 type(a) a = 'I said :"stupid! ' type(a) >> str print('Use \n to print a new line') s = 'Hello World' # Grab everything but the last letter s[:-1] # Concatenate strings! s + ' concatenate me!' #We can use the multiplication symbol to create r原创 2020-12-15 02:37:17 · 310 阅读 · 0 评论
分享