- 博客(95)
- 资源 (2)
- 收藏
- 关注
原创 unity 2019发布手机cardboard流程
参考文档https://blog.youkuaiyun.com/spring_dede/article/details/107659747
2021-05-10 18:49:59
372
原创 unity 安卓sdk 配置
https://blog.youkuaiyun.com/j04110414/article/details/44149653
2021-05-10 18:32:47
723
原创 百度开源的超轻量级OCR工具库强大且实用
PaddleOCR旨在打造一套丰富、领先、且实用的OCR工具库,助力使用者训练出更好的模型,并应用落地。开源地址
2021-04-02 13:36:28
543
原创 tensorflow 基础(1)预测广告投出和利润
#!/usr/bin/env python# coding: utf-8# In[7]:import tensorflow as tfimport pandas as pdimport numpy as npimport matplotlib.pyplot as pltget_ipython().run_line_magic('matplotlib', 'inline')# In[8]:data=pd.read_csv('./Desktop/tfData/Advertisi.
2021-03-18 10:40:08
230
1
原创 Unity发布WEBGL优化
http://www.manew.com/thread-154149-1-1.html1.尽量使用AssetBundle来加载数据.2.尽量减少插件使用因为这些插件也会打包进去3.尽量不使用字体因为webgl显示中文需要中文字体所以字体也会打包如果只是按键需要中文可以用图片来替代.4.尽量删掉Packages里面不使用的package它会影响 Included DLLs的大小6.删除Resource和StreamingAssets他们都会打包进去7.删除物体身上不需要的组件比如Col...
2020-11-19 08:37:23
2073
原创 3 OpenGL 绘制四边形
#include<glad/glad.h>#include<GLFW/glfw3.h>#include<stdio.h>const unsigned int _width=800;const unsigned int _height=600;const char* vertexShaderSource = "#version 330 core\n""layout (location = 0) in vec3 aPos;\n""void main()\n".
2020-07-07 17:14:04
439
原创 2.OpenGL绘制窗口
#include<GLFW/glfw3.h>#include<glad/glad.h>#include<stdio.h>using namespace std;void framebuffer_size_callback(GLFWwindow* window, int width, int height);void processInput(GLFWwindow* window);int main(){ //-------------------初始化g.
2020-07-01 13:26:32
247
原创 c 语言读取本地文件
#include<stdio.h>int readFile(char *buff[]){ FILE *fp = NULL; fp = fopen("data/test.txt", "r"); if(fp==NULL) { printf("failed open file!"); return -1; } //fscanf 遇到第一个空格和换行符时候 会停止读取 fscanf(fp, "%s", buff); pri.
2020-06-30 20:48:01
992
原创 一步一步学OPENGL----vs2019下 OpenGL glew和glfw环境搭建
1.实验准备glew下载地址(选择 Binaries Windows 32-bit and 64-bit)glfw下载地址(选择 32-bit Windows binaries)vs2019社区版本(这个不懂自己百度下载吧,需要注意的是 需要勾选c++桌面开发环境下的windows 10 sdk)2.配置glew 和 glfw1.把这两个压缩包,解压后放入一个文件夹下面。如图:2.启动vs2019新建一个空项目,使用c++编辑语言,然后新建一个c++空文件(例如:main..
2020-06-08 19:10:52
1629
2
原创 Django框架
1.cmd 进去window控制命令行2.django-admin startproject mysite 创建mysete工程3.cd mysite 进入当前工程4.manager.py startapp helloapp 创建helloapp 应用5.再manager.py同一个目录下 运行 python manager.py runserver 启动调试用的web 服务器...
2020-05-26 14:06:15
134
原创 python制作文字音频
#谷歌文字转语音apifrom gtts import gTTSwith open("demo.txt",'r',encoding="utf8") as f: audio = gTTS(text=f.read(),lang="zh-cn") audio.save("demo.mp3")
2020-05-24 17:49:44
226
转载 SSpanel面板搬迁后遇到的HTTP500问题解决
https://blog.youkuaiyun.com/qq_36641456/article/details/89044100https://www.9malio.com/36/.html
2020-04-28 20:21:45
565
原创 os.path中的isfile正确用法
os.path.isfile()用于判断某一对象(需提供绝对路径)是否为文件import osdirct = '/home/workespace/notebook/'for i in os.listdir(dirct): fulldirct = os.path.join(dirct, i) if os.path.isfile(fulldirct): #入参需要是绝对路径...
2020-04-21 16:33:18
10317
1
原创 pycharm 中pip 升级报错的问题解决!
pycharm 中pip 升级报错的问题解决!python -m pip install -U --force-reinstall pip命令升级
2020-04-20 00:02:27
643
原创 实类2:将模拟数据制作成内存对象数据集
1.生成模拟数据import numpy as npimport matplotlib.pyplot as pltimport tensorflow as tf#from sklearn.utils import shuffledef GenerateData(batchsize=100): train_X=np.linspace(-1,1,batchsize) tr...
2020-04-18 01:05:49
193
原创 安装tensorflow==1.13.1错误 升级numpy
ERROR: Could not find a version that satisfies the requirement grpcio>=1.8.6 (from tensorflow==1.13.1) (from versions: none)ERROR: No matching distribution found for grpcio>=1.8.6 (from tensorf...
2020-04-17 12:21:40
2977
原创 linux 下ssh 搭建 启动 访问
1.安装:sudo apt-get install openssh-server2.启动service sshd start3.查看IP 地址ip addr4.查看用户名字whoami 或者lastlog用window flashFXP登录
2020-04-17 12:11:24
173
原创 anaconda 各个版本下载地址
清华大学镜像:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/?C=N&O=D
2020-04-16 16:13:38
750
原创 两个相乘矩阵类型不匹配
显示:TypeError: Input 'b' of 'MatMul' Op has type float32 that does not match type float64 of argument 'a这是由于两个相乘矩阵类型不匹配,调试一下发现x矩阵为tf.float64,W矩阵为tf.float32,改类型用tf.cast()函数,修改如下:y = tf.matmul(tf.ca...
2020-04-13 23:02:06
436
转载 使用jupyter notebook 保存python代码为.py格式
%%writefile train.py 表示将文件保存为trian.py的文件https://blog.youkuaiyun.com/lens___/article/details/84373341
2020-04-13 13:02:20
5240
原创 Tensorflow线性回归问题(y=2x+1)
1.准备数据import numpy as npimport matplotlib.pyplot as pt#np.linspace生成100个等差数列,取值0,1之间x_data=np.linspace(0,1,100)#np.random.randn(*x_data.shape)维度跟x_data一致y_data=2*x_data +1.0+np.random.randn(*x...
2020-04-13 12:29:00
797
转载 ubuntu 16.04 安装Tensorflow(CPU和GPU)
https://www.cnblogs.com/lijinze-tsinghua/p/8653811.html
2020-04-12 22:26:29
217
转载 在linux中安装Jupyter notebook
https://blog.youkuaiyun.com/chaolei3/article/details/79264630
2020-04-12 12:16:03
320
原创 统计文章内词频率
import collectionstarget_str="THE TRAGEDY OF ROMEO AND JULIET"with open('./罗密欧与朱丽叶(英文版)莎士比亚.txt', encoding='utf-8') as file: txts=file.read() #用 split 将单词利用空格切分开 将文本文件变成单词的列表 danci=txt...
2020-04-10 12:14:36
253
原创 吃苹果小游戏(Python)
1.公共类模块import pygamefrom pygame.rect import Rectdef print_text(font, x, y, text, color=(255, 255, 255)): imgText=font.render(text, True, color) screen=pygame.display.get_surface() s...
2020-03-20 20:20:51
4390
原创 微信打飞机游戏(python)
import pygameimport randomimport sys#初始化pygame.init()pygame.display.set_caption('飞机火拼')#设置窗口标题screen= pygame.display.set_mode((320, 570), 0, 32)pygame.mouse.set_visible(False)#隐藏光标#加载图片boo...
2020-03-19 21:35:17
478
1
原创 贪吃蛇小游戏(python)
import pygameimport sysimport randomSCREEN_X=600SCREEN_Y=600class Snake(object): def __init__(self): self.direction=pygame.K_RIGHT self.body = [] for i in range(5)...
2020-03-17 15:11:54
234
原创 python 内建函数 range map reduce sorted set
1.rangelist=[x**2 for x in range(0,11,2)]print(list)#[0, 4, 16, 36, 64, 100]#列表生成式l2=(x**2 for x in range(0,11,2))print(type(l2))#<class 'generator'>print(next(l2))#0print(next(l2))#4...
2020-03-06 12:23:35
135
原创 内建函数__getattribute__ 属性访问时候拦截器
class animal(object): def __init__(self,name): self.name=name self.num=100 #属性访问时候拦截器 def __getattribute__(self, item): if(item == 'num'): return '不允许访...
2020-03-04 14:49:52
133
原创 生成器
#列表生成器list=[x**2 for x in range(10)]print(list)#[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
2020-03-01 14:10:25
144
原创 动态给类添加字段属性和方法
class person(object): def __init__(self,name,age): self.name=name self.age=agelaozhao=person('laozhao',29)print(laozhao.name)print(laozhao.age)#给class 添加属性字段numperson.num=1...
2020-03-01 14:03:29
1803
原创 装饰器(@ 语法糖)
def w1(func): print(' -1 -'*3) def inner(): print('--2---') func() print(' -3 -'*3) return inner#只要python 解释器执行到这个代码,自动进行装饰 就会输出 ‘--1--’ ‘--3--’@w1def f1(): pr...
2020-03-01 13:09:10
394
原创 闭包
1.函数内部定义一个函数,内部函数用到外部函数变量,外部函数返回内部函数。def test(number): print('--1--') def test_in(): print('--2--') print(number**2) print('--3--') return test_intest(2)输出:--...
2020-02-28 12:04:49
105
原创 python 迭代器Iterable
1.判断是否是可迭代对象isinstance(object,Iterable)from collections.abc import Iterableprint(isinstance([],Iterable))#trueprint(isinstance({},Iterable))#trueprint(isinstance((),Iterable))#trueprint(isinst...
2020-02-28 11:54:56
200
原创 进制
1.单位1G=1024M1M=1024K1K=1024B1B=8bit2字节=2B=16bit2.与 或 运算二进制中与运算,只要有1 运算后都是1二进制中或运算,最有两个都是0 运算后才是0...
2020-02-26 21:10:18
116
原创 深拷贝和浅拷贝区别
1.没有在内存中开辟新空间就是浅拷贝(id值相等)print(id(a))#==>3147823141320print(id(b))#==>3147823141320import copyc=copy.deepcopy(a)print(id(a))#==>3147823141320print(id(c))#==>3110823466376 (新空间)...
2020-02-26 19:53:42
193
原创 == 和 is 区别
1.‘==’是两个值的判断 ‘is’是地址指向的判断a=[11,22,33]b=[11,22,33]print(a==b)#==> Trueprint(a is b)#==>Falsec=aprint(a is c) #==>True
2020-02-26 19:40:36
573
1
titanic3.xls
2020-04-21
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人