Skip to content

WangXin93/my-python-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My_python_demo

Run on Repl.it Gitpod Ready-to-Code

Here will store my python scripts written while daily work.

basic Python语言与程序结构基础。

copy_file.py is a demo to copy files between directories.

multiplot.py is a demo to use threads to close figure window automatically.

slider.py is a demo use slider to control parameter in plt.

douban.ipynb is a demo show how to crawl comments of movies online and generate a wordcloud.

crop_and_save.py use os.walk recursively find images in a directory and crop two piece of 180x180 from them.

college_ranking.ipynb展示了一个网页定向爬虫爬取“中国最好大学”排名

geojson.py是一个利用google map的api获取位置的完整地理信息,并用json进行提取的示例

credit_card.py is a demo to show vertification algorithm of American Express credit card number.

Luhn.py is recursion version demo to verify MasterCard credit card number.

zero_init.py用一个两层神经网络说明了,多层神经网络初始化权重全部为零会使得隐藏层每个神经元的计算结果相同,导致隐藏层多个神经元的作用和一个神经元一样。可以发现w1的每一行为相同数字。

chart.py can draw a simple bar plot using "ascii art", Very funny:)

wiki_link.py是一递归访问维基百科链接的demo。

wiki_start.py是一个从维基百科首页递归访问全部链接的demo。

graph_and_BFS.py是一个图模型和广度优先搜索的实现。

tree.py是一个自己写的利用树模型列出所有走完树中节点的路径的方法。

crawl_external_links.py是一个从一个站点开始递归获取所有外部链接的demo。

merge_sort.py is a demo of merge sort.

Dijkstra.py 是一个狄克斯特拉算法的demo。

skeleton 是一个自动创建python skeleton的工具,使用方法为./mkskl.py dir1/proj1

sqlite_student是一个使用sqlite3对数据库进行操作的demo。

flask_lucky_number是使用flask在浏览器上向用户随机显示一个lucky number。

flask_blog是一个基于flask的个人博客服务器demo,参考《Learn More Python the Hard Way》。

sixteen is a puzzle game called sixteen.

scrape_allitebooks 使用Scrapy爬去网站www.allitebooks.com的所有书籍的url。

mypytorch 使用PyTorch展示了Numpy风格反向传播和Pytorch风格反向传播的区别,展示了自动计算梯度降的用处。

BFS 是一个使用广度优先搜索自动求解迷宫的方法,同时展示了pytest单元测试的基本用法。

genwave.py 用python来制作电子音乐,这里将mario音乐写入一个wav文件。

PSO.py是一个粒子群优化算法(Particle Swarm Optimization)的示例文件。

downloader.py是一个通过URLs的多进程下载程序。

ten_steps_to_keras.py是一个Keras的MNIST训练示例,同时展示了用TSNE显示中间层特征的分布。

tkBasic.py是一个tkinter的gui基础页面,包含canvas,entry,label,button这几个基本widget。

youdao.py是一个利用爬虫原理,使用requests,lxml,xpath写的字典翻译命令行工具。

flask_RESTful_APIs/是一个使用flask写的RESTful api,使用了docker和docker-compose来自动部署。

python_expert记录PyData 2017的讲座关于Python中Data model,decorator,metaclass,generator的使用的笔记。

CGAN-fashion-mnist.py是一个CGAN的demo根据fashoin种类条件生成服饰图像。

My Generating Names with a Character-Level RNN.ipynb是一个使用rnn生成名字的demo,可以以名字的国家作为条件生成名字。

adversarial_autoencoder是一个用pytorch写的autoencoder, adversarial autoencoder, conditional adversarial autoencoder的demo,参考了博客https://towardsdatascience.com/a-wizards-guide-to-adversarial-autoencoders-part-1-autoencoder-d9a5f8795af4

naive_bayes是一个naive bayes模型的demo,包括Gaussian NB,和Beta NB两个demo。

grad_cam是一个使用grad_cam(Gradient Class Activation Map)进行CNN可视化的demo。

BPR是一个贝叶斯个性化排序(Bayesian Personalized Ranking)的demo。

tsne_visu.py是一个使用TSNE可视化高维特征分布的demo。

snake.py是一个使用python curses 编程写的贪吃蛇游戏。

SSIM是一个介绍用结构相似度(structure similarity)计算图像质量的demo。

watershed是一个介绍用分水岭算法分割肺部图像的demo。

my_qr使用QR分解计算矩阵的逆矩阵。

pagerank_gif.py is a demo illustrates personalized pagerank algorithm while generate a gif animation.

socket is a demo illustrates socket programming.

Data Structure: tree, heap

huffman encoding is a demo illustrates huffman encoding for data compression, it also show how to write binary file.

Resources

  • 趣学Python,假定读者是个孩子一样从头学习Python,跟随本书可以写出一个火柴人游戏以及掌握Python语法和基本编程思想
  • Learn Python the Hard Way, 非常好同时学习计算机思维和Python语法的书,跟随本书可以从学习命令行操作到学习web下显示一个显示一个hello,world
  • Mastering Python, 适合想学习中高级Python的读者,在Python3.5环境下深入教学了每个Python指令的用法甚至给出了基本的实现,跟随本书可以全面了解Python中的常见包,并规范开发流程
  • Python最佳实践指南!: Requests作者讲述Python的优秀时间和介绍Python资源
  • Python网络数据采集:讲述爬虫技术,第一章爬虫基础的教学非常优秀,理论结合实践学习爬虫,第二章高级技术需跟随目前技术发展自行拓展学习
  • Flask Web 开发:基于Python的Web应用开发实战
  • Python 3 Module of the Week用一些列文章展示了如何使用Python3标准库的各个模块
  • 图解算法, 用最直观的方式讲述基本算法和数据结构比如数组,链表,散列表,图结构,树结构,贪婪算法等,书中的实现方法均基于Python。
  • Python3 Standard Library by Example是展示Python3各个标准库用法的系列博客。
  • Udacity Git tutorial
  • Udemy Machine Learning

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •