- 博客(136)
- 收藏
- 关注
原创 tensorflow版本差异总结
cuda11+、python3.8+、keras2、支持WSL2,不支持原生windows。cuda12+、python3.9+、keras3、删除tf.estimator。cuda11+、python3.8+、keras2、支持原生windows。
2024-07-10 15:21:55 310
原创 win10安装Tensorflow(2.10-)使用最新cuda(12+),cudnn(8.9+)
【代码】win10安装Tensorflow(2.10-)使用最新cuda(12+),cudnn(8.9+)
2023-10-28 11:01:10 998
原创 Could not load dynamic library ‘libnvinfer.so.7’
tensorflow Could not load dynamic library ‘libnvinfer.so.7’
2023-04-15 00:12:39 937
原创 Github的2FA验证(Two-factor authentication)(不要慌,非常简单)
Github的2FA验证(Two-factor authentication)(不要慌,非常简单)
2023-03-21 13:25:27 9697 19
原创 windows全局激活conda(包括cmd,powershell,pycharm)
## 首先基本conda和python路径配置好,环境变量: ## 截图1## pycharm:## 截图2## cmd:# 替换初始启动命令行即可,截图3cmd.exe /k "call C:\InstallPackages\anaconda3\Scripts\activate.bat C:\InstallPackages\anaconda3 " ## anaconda路径## powershell: conda init powershell ## 创建运行powershell
2022-01-12 01:28:16 1347
原创 Linux(Centos7)无法读取ntfs的U盘及ntfs-3g安装
# 首先扩充自己的yum源,包括官方及非官方# yum官方:一般你的机器里yum库可能只是国内镜像sudo yum install yum-priorities# 非yum官方:rpmforge 选择合适最新的版本下载安装wget https://www.rpmfind.net/linux/dag/redhat/el7/en/x86_64/dag/RPMS/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpmrpm -ivh rpmforge-release-0.
2022-01-04 01:45:21 2217
原创 关于sqlalchemy读写mysql密码含有【@】、中文读写、迭代器读写、数据精度
class Database: def __init__(self): self.save_schema = 'dwd' self.save_table = 'dwd_xxx' self.mysql_dwd_config = { 'drivername': 'mysql+pymysql', 'username': 'nx_user_a', 'password': 'xxx@#$xx
2021-12-23 14:58:17 987
原创 win10升级nvidia、cuda、cudnn,非常简单
#和Linux不同,windows关心的细节真的太少了。#更新nvidia驱动,有4种方式:"1、nvidia experience程序界面注册账号,首页即可更新最新驱动。2、计算机管理、设备管理器、显示适配器、Nvidia...GPU,右击【更新驱动程序】3、官网下载驱动,不建议4、cuda升级时把驱动也同时更新"# 更新cuda:"1、确认【nvidia设置,系统信息,组件,3D设置,NVCUDA64.DLL】中本机的适配cuda版本2、官网下载合适的【cuda_11.5.1_4
2021-12-07 23:59:34 2582
原创 Linux(centos7)升级Nvidia至cuda11.5,cudann8.3,适配tensorflow2.7,torch1.10非常简单
# 切换root账号操作# 进行一些依赖库的升级也很必要# 卸载驱动和cudanvidia-uninstallcuda-uninstaller# 关闭 nouveaulsmod | grep nouveauvim /lib/modprobe.d/dist-blacklist.conf# 去掉 nvidiafb 注释# 添加:blacklist nouveauoptions nouveau modeset=0# 重建initramfs image:mv /boot/initra
2021-12-07 13:23:16 2736
原创 Linux(centos)读取U盘数据
## 切换到root用户## 插拔U盘,观察2次变化ls /dev/sd*fdisk -l## 确认为sdd1之后,在mnt挂载,最好新建目录:mkdir -p /mnt/udisk## 挂载mount /dev/sdd1 /mnt/udisk## 读取数据:cd /mnt/udisk## 解除挂载:umount /dev/sdd1...
2021-12-06 13:10:58 4641
原创 两数交换(不引入第三变量,不数字越界)
## 原来写法(java)int temp = arr[i];arr[i] = arr[j];arr[j] = temp;数学方法,先加后减arr[j + 1] = arr[j + 1] + arr[j];arr[j] = arr[j + 1] - arr[j];arr[j + 1] = arr[j + 1] - arr[j];数学方法,先减后加arr[j + 1] = arr[j] - arr[j + 1];arr[j] = arr[j] - arr[j + 1];arr[j +
2021-08-12 17:23:28 125
原创 docker和redis
# 配置目录redis_dir=~/Install/redis-6.2.3# 配置文件vim $redis_dir/redis.conf# 启动服务nohup $redis_dir/src/redis-server $redis_dir/redis.conf &# 启动客户端$redis_dir/src/redis-cli -a password
2021-06-01 15:07:23 169
原创 CNN之image2column
import numpy as npimport numba@numba.jit(nopython=False, parallel=True)def im2col(input_data, filter_h, filter_w, stride=1, pad=0): N, C, H, W = input_data.shape out_h = (H + 2*pad - filter_h)//stride + 1 out_w = (W + 2*pad - filter_w)//s.
2021-02-26 18:12:24 475
原创 elasticsearch简单操作
es操作查看索引:curl -X GET 'localhost:9200/_cat/indices?v&pretty'查看节点:curl -X GET 'localhost:9200/_cat/nodes?v&pretty'创建索引:curl -X PUT 'localhost:9200/customer?pretty&pretty'删除索引curl -X DELETE 'localhost:9200/customer?pretty&pretty'.
2021-02-03 11:05:55 182
原创 lightgbm(gpu)在linux(centos7)安装
#保证gpu是正常可用的:nvidia-sminvcc -V#进入root权限,且python环境为你正常使用环境,比如anaconda3,而不是python2.7#首先进行必要的升级:#cmake>=3.2(eg: v3.16.8)#https://cmake.org/download/./configuremakemake install#boost>=1.56(eg: v1.61)#https://dl.bintray.com/boostorg/release/
2020-07-03 11:19:07 1074 2
原创 tensorflow2.x使用cuda10.2(非常简单)
# 目前tensorflow2.2官方标配cuda10.1,也是官方在github给出方案,修改cuda软链接即可,非常简单。# 前提是你已经正确安装cuda10.2,检查:nvidia-sminvcc -V# 干正事(重点就这一步):cd /usr/local/cuda-10.2/targets/x86_64-linux/lib/ln -s libcudart.so.10.2.89 libcudart.so.10.1# 检查是否可用:source /etc/profile>
2020-06-17 15:05:20 21918 23
原创 linux设置静态ip
#检查现有的网络连接配置nmcli connection showip aifconfigroute -n# 修改配置文件路径 root权限/etc/sysconfig/network-scripts/ifcfg-*(device)# 修改完service network restartrebootping baidu.com# vim ifcfg-*(device)TYPE=EthernetPROXY_METHOD=noneBROWSER_ONLY=noBOOTPRO
2020-06-17 14:47:25 260
原创 linux: export path
PATH=$PATH:$HOME/.local/bin:$HOME/binexport PATHexport SPARK_HOME=/Users/xyl/Install/spark_install/spark-2.4.5-bin-hadoop2.7export PATH="SPARK_HOME/bin:$PATH"## pip install packages:export PATH=...
2020-04-24 16:32:01 390
原创 linux(centos_redhat)裸机配置
sudo yum upgrade#sudo yum updatesudo yum -y install# anaconda:libXcomposite libXcursor libXi libXtst libXrandr alsa-lib mesa-libEGL libXdamage mesa-libGL libXScrnSaver# vim:gcc gcc-c++ ncurses-...
2020-04-24 16:08:23 279
原创 terminal及vim高亮
在~/.bash_profile中修改: 1 ## terminal hignlight: 2 export CLICOLOR=1 3 export LSCOLORS=gxfxaxdxcxegedabagacad 4 #export LSCOLORS=exfxcxdxcxegedabagacad 5 #https://www.cnblogs.com/Oven5217/p/111...
2020-04-04 01:32:14 970
原创 用pyspark的方式写count(case when)
import pyspark.sql.functions as fnff = lambda cond: fn.countDistinct(fn.when(cond,df['s_id']).otherwise(None)cond = (df['class_status']=='FINISHED') & (df['finish_type']=='AS_SCHEDULED')df.gro...
2019-09-04 15:59:24 3791
原创 sql自然周统计
-- 最近2个自然周统计:SELECT count(CASE WHEN (int(datediff(scheduled_date,'2001-01-01')/7) IN (int(datediff(CURRENT_DATE,'2001-01-01')/7)-2,int(datediff(CURRENT_DATE,'2001-01-01')/7)-1) AND class_status...
2019-06-24 20:02:06 4872
原创 pysaprk求max
#column:A,B# Method 1: Use describe()float(df.describe("A").filter("summary = 'max'").select("A").collect()[0].asDict()['A'])# Method 2: Use SQLdf.registerTempTable("df_table")spark.sql("SELECT...
2019-06-05 16:17:13 204
原创 pyspark中"and"条件使用注意
def getLevel(ltv): return fn.when((lv >= 6.81) & (lv <= 10.00),'S')\ .otherwise( fn.when((lv >= 6.08) & (lv < 6.81),'A')\ .otherwise( fn.when((l...
2019-04-29 16:50:26 1647
原创 kafka-python_&&_pysparkStreamingContext
# coding=utf-8from pyspark import SparkContextfrom pyspark.streaming import StreamingContextsc = SparkContext("yarn","stream_test")ssc = StreamingContext(sc,1)# monitor: nc -lk 9999lines = ...
2019-03-26 18:21:50 428
原创 pyspark&pandas之字符串筛选dataframe
#pandas:import numpy as npimport pandas as pddf = pd.DataFrame(np.array([['banana',1],['apple',2],['pear',3]]).reshape(3,2))df.columns = ['a','b']df2 = df[df['a'].str.contains('l')]print(df2)...
2019-02-23 06:15:45 3147
原创 matplotlib_linux作图_时间序列
df21 = data[(data['review_type']=='video') &amp;amp;amp; (data['high_review']==1)]df22 = data[(data['review_type']=='video') &amp;amp;amp; (data['high_review']==0)]fig2 = plt.figure()ax2 = fig2.add_subplot(1,1,1)...
2019-01-14 17:19:04 345
原创 pyspark,pandas,sql之分组排序
import pyspark.sql.functions as fnfrom pyspark.sql import Windowdf.withColumn("row_number", fn.row_number().over(Window.partitionBy("id").orderBy(df["pt"].desc()))).show()
2018-12-19 15:57:01 3477
原创 pyspark_dataframe
from __future__ import division,print_functionimport timeimport datetimeimport numpy as npimport pandas as pdfrom pyspark import SparkContext,SparkConffrom pyspark.sql import SparkSession,Column...
2018-09-17 20:24:50 425
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人