随笔分类 -  python

上一页 1 2 3

摘要:.打开电脑 在电脑桌面上 右击 我的电脑 选择属性 2.在我的电脑属性中 左侧 点击 高级系统设置 3.弹出 系统属性对话框 4. 点击 环境变量 在系统变量中找到 path 编辑 5.弹出编辑系统变量的对话框 将你的路径拷贝到里面即可(注意要加分号) C:\Users\dell3010\Anaco 阅读全文

posted @ 2018-12-29 11:39 happygril3 阅读(95) 评论(0) 推荐(0)

摘要:RPC_Server.py import zerorpcimport syssys.path.append('./pm_for_word')from pm_for_word.start import main as cluster class Classify(object): @staticmet 阅读全文

posted @ 2018-11-30 10:27 happygril3 阅读(73) 评论(0) 推荐(0)

摘要:import multiprocessingimport os, time, randomdef Lee(): print("\nRun task Lee-%s" %(os.getpid()) ) #os.getpid()获取当前的进程的ID start = time.time() time.sle 阅读全文

posted @ 2018-10-23 15:29 happygril3 阅读(87) 评论(0) 推荐(0)

摘要:from multiprocessing import Poolimport os,timeimport multiprocessingdef func(msg): print("msg:", msg) time.sleep(3) print("end") return "done" + msg#使 阅读全文

posted @ 2018-10-23 15:27 happygril3 阅读(178) 评论(0) 推荐(0)

摘要:import multiprocessingimport time#方式一def worker(interval): n = 5 while n > 0: print("The time is {0}".format(time.ctime())) time.sleep(interval) n -= 阅读全文

posted @ 2018-10-23 15:26 happygril3 阅读(115) 评论(0) 推荐(0)

摘要:multiprocess: multiprocess.cpu_count():统计cpu核数 multiprocess.active_chirdren():获取所有的子进程 multiprocess.current_process():获取当前的子进程 multiprocess.Prpcess(ta 阅读全文

posted @ 2018-10-23 15:24 happygril3 阅读(264) 评论(0) 推荐(0)

摘要:import pandas as pddf=pd.DataFrame({ "a":[1,2,3], "b":[4,5,6], "c":[7,8,9]}) a b c0 1 2 31 4 5 62 7 8 9df1=df['a'] #<class 'pandas.core.series.Series' 阅读全文

posted @ 2018-10-15 17:24 happygril3 阅读(207) 评论(0) 推荐(0)

摘要:http://intellij.mandroid.cn/ 阅读全文

posted @ 2018-10-15 10:08 happygril3 阅读(743) 评论(0) 推荐(0)

摘要:from sympy import integratefrom sympy.abc import ximport random#integrate(参数1=概率密度函数,参数2=积分起始点,参数3=积分结束点)概率密度函数: a<=x<=medic:2*(x-a)/((b-a)*(c-a)) med 阅读全文

posted @ 2018-09-28 13:45 happygril3 阅读(408) 评论(0) 推荐(0)

摘要:import numpy as npimport pandas as pd## x1=[1,2,3,4]# x2=[4,5,6,7]# x3=[7,8,9,10]# df=pd.DataFrame(# { 'x1':x1,# 'x2':x2,# 'x3':x3# }# )# print(df)# p 阅读全文

posted @ 2018-09-26 18:56 happygril3 阅读(206) 评论(0) 推荐(0)

摘要:import pandas as pdimport numpy as npfrom pandas import DataFrameimport datetime# 定义dataframex1=[10,20,30,40,50,60]x2=['male','male','male','female',' 阅读全文

posted @ 2018-09-10 15:08 happygril3 阅读(364) 评论(1) 推荐(0)

摘要:(1)whl文件安装 pip install https://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-win_amd64.whl (2)单文件安装 默认的在安装文件的Lib\site-packages\路径下面 cd切换路径:C:\Us 阅读全文

posted @ 2018-08-31 15:53 happygril3 阅读(214) 评论(0) 推荐(0)

摘要:import paramikoimport os#当前脚本路径CUR_PATH = os.path.dirname(__file__)#服务器ipHost=''Port=22#登录用户名Username=''#登录密码Password=''#登录服务器后执行的命令# Command = ['cd x 阅读全文

posted @ 2018-07-11 13:23 happygril3 阅读(787) 评论(0) 推荐(0)

上一页 1 2 3

导航