diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..ed0d33f5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,71 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.cache +nosetests.xml +coverage.xml + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + + +# Local settings +local_settings.py + +# vim +*.swp + +# pycharm +.idea/ + +# mac +.DS_Store + +# hellogithub +*.db +content2db.py diff --git a/01/HelloGitHub01.md b/01/HelloGitHub01.md new file mode 100644 index 00000000..ce9eacd3 --- /dev/null +++ b/01/HelloGitHub01.md @@ -0,0 +1,82 @@ +# 《HelloGitHub》第 01 期 +>兴趣是最好的老师,[HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 就是帮你找到兴趣! + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) + +## 简介 +最开始我只是想把自己在浏览 [GitHub](https://github.com/) 过程中,发现的有意思、高质量、容易上手的项目收集起来,这样便于以后查找和学习。后来一想,如果给这些 GitHub 项目都加上简单的效果图和一些通俗易懂的中文介绍。应该能够帮助到我这样的新手激发兴趣去参与、学习这些优秀、好玩的开源项目。 + +所以,我就做了一个面向**编程新手**、**热爱编程**、**对开源社区感兴趣** 的人群的月刊,月刊的内容包括:**各种编程语言的项目**、**各种让生活变得更美好的工具**、**书籍、学习笔记、教程等**。这些项目都是非常容易上手,而且非常 Cool,主要是希望大家能动手用起来,加入到**开源社区**中。会编程的可以贡献代码,不会编程的可以反馈使用这些工具中的 Bug、帮着宣传你觉得优秀的项目、Star 项目⭐️。同时你将学习到更多编程知识、提高自己的编程技巧、发现自己的**兴趣**。 + +🎉 最后 [HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 这个项目就诞生了 🎉 + +--- +|**以下为本期内容**|每个月 28 号发布最新一期,首发在我的 [GitHub](https://github.com/521xueweihan) 上|[点击查看往期内容](https://github.com/521xueweihan/HelloGitHub#往期回顾)| + +#### Python 项目 +1、[awesome-python-webapp](https://github.com/michaelliao/awesome-python-webapp):廖老师的 Python 入门教程中的实践项目的代码,[教程在线阅读](http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000/001397616003925a3d157284cd24bc0952d6c4a7c9d8c55000) + +2、[Minos](https://github.com/phith0n/Minos):一个基于 Tornado/MongoDB/Redis 的社区系统,[预览](http://minos.leavesongs.com/) + +3、[tushare](https://github.com/waditu/tushare):TuShare 是一个免费、开源的 Python 财经数据接口包,[TuShare 文档](http://tushare.org/index.html) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/TuShare-min.png) + +4、[beijing_bus](https://github.com/wong2/beijing_bus):北京实时公交,可以显示查询的公交到达某站还需多久 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/%E5%8C%97%E4%BA%AC%E5%AE%9E%E6%97%B6%E5%85%AC%E4%BA%A4.gif) + +#### JavaScript 项目 +5、[ant-design](https://github.com/ant-design/ant-design):阿里开源的一套企业级的 UI 设计语言和 React 实现。[中文文档](https://ant.design/docs/react/introduce-cn),样式偏向于后端,展示效果十分漂亮 + +6、[VeryNginx](https://github.com/alexazhou/VeryNginx):一个功能强大而对人类友好的 Nginx 扩展程序。[VeryNginx 文档](https://github.com/alexazhou/VeryNginx/blob/master/readme_zh.md) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/VeryNginx-min.jpeg) + +7、[activate-power-mode](https://github.com/disjukr/activate-power-mode):爆炸输入效果,[在线演示](http://0xabcdef.com/activate-power-mode/) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/activate-power-mode.gif) + +#### CSS 项目 +8、[typo.css](https://github.com/sofish/typo.css):中文网页重设与排版,为了一致化浏览器排版效果,构建最适合中文阅读的网页排版。包括桌面和移动平台,[预览](http://typo.sofi.sh/) + +#### 开源书籍 +9、[interpy-zh](https://github.com/eastlakeside/interpy-zh):《Python 进阶中文版》,[在线阅读](https://eastlakeside.gitbooks.io/interpy-zh/content/) + +10、[python3-cookbook](https://github.com/yidao620c/python3-cookbook):《Python Cookbook 3rd 中文版》,[在线阅读](http://python3-cookbook.readthedocs.org/zh_CN/latest/) + +11、[Python-Guide-CN](https://github.com/Prodesire/Python-Guide-CN):《Python 最佳实践指南中文版》,[在线阅读](http://pythonguidecn.readthedocs.io/zh/latest/) + +12、[design_patterns](https://github.com/me115/design_patterns):《图说设计模式》,[在线阅读](http://design-patterns.readthedocs.io/zh_CN/latest/index.html#) + +13、[linuxtools_rst](https://github.com/me115/linuxtools_rst):《Linux 工具快速教程》,[在线阅读](http://linuxtools-rst.readthedocs.io/zh_CN/latest/) + +14、[the_new_world_linux](https://github.com/yangyangwithgnu/the_new_world_linux):《Linux 下的惬意生活》,[在线阅读](https://github.com/yangyangwithgnu/the_new_world_linux#目录) + +#### 其它 +15、[archey-osx](https://github.com/obihann/archey-osx):命令行中显示 Mac OS X 计算机的基本信息 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/Archey%20for%20OS%20X-min.png) + +16、[Learning-SICP](https://github.com/DeathKing/Learning-SICP):《计算机程序的构造和解释》公开课 + +17、[awesome-python-cn](https://github.com/jobbole/awesome-python-cn):awesome-python 中文版 + + +--- + +## 声明 +如果你发现了好玩、有意义的开源项目,[点击这里](https://github.com/521xueweihan/HelloGitHub/issues/new) 分享你觉得有意思的项目。 + +- 分享项目格式:`项目名称——项目地址:项目描述(中文),追求完美👉项目上手 demo、截图` + +或许你分享的项目会让别人由衷的感慨:“原来还有这么有意思的项目!编程可以这么酷!” + +**欢迎转载,请注明出处和作者,同时保留声明和联系方式。** + +## 联系方式 +- [削微寒](https://github.com/521xueweihan) + +- [博客园](http://www.cnblogs.com/xueweihan/) + +- [知乎专栏](https://zhuanlan.zhihu.com/hellogithub) diff --git a/01/HelloGithub01.md b/01/HelloGithub01.md deleted file mode 100644 index a00dfeb8..00000000 --- a/01/HelloGithub01.md +++ /dev/null @@ -1,54 +0,0 @@ -# 《HelloGithub》第一期 - -### 中文项目 -- [廖老师的python 入门实践](https://github.com/michaelliao/awesome-python-webapp):[教程](http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000/001397616003925a3d157284cd24bc0952d6c4a7c9d8c55000) - -- [ant-design 酷!](https://github.com/ant-design/ant-design):[文档](http://ant.design/docs/react/introduce) - -- [Minos](https://github.com/phith0n/Minos):一个基于Tornado/mongodb/redis的社区系统。[预览](http://minos.leavesongs.com/) - -- [TuShare](https://github.com/waditu/tushare):TuShare是一个免费、开源的python财经数据接口包。[TuShare文档](http://tushare.org/index.html) - -![](https://github.com/521xueweihan/HelloGithub/blob/master/01/img/TuShare2.png) - -- [VeryNginx](https://github.com/alexazhou/VeryNginx):一个功能强大而对人类友好的 Nginx 扩展程序。 -[VeryNginx文档](https://github.com/alexazhou/VeryNginx/blob/master/readme_zh.md) - -![](https://github.com/521xueweihan/HelloGithub/blob/master/01/img/VeryNginx.jpeg) - -- [中文网页重设与排版](https://github.com/sofish/typo.css):目标:一致化浏览器排版效果,构建最适合中文阅读的网页排版。包括桌面和移动平台。[预览](http://typo.sofi.sh/) - -- [北京实时公交 for python](https://github.com/wong2/beijing_bus):可以显示查询的公交到达某站还需时间。 - -![](https://github.com/521xueweihan/HelloGithub/blob/master/01/img/%E5%8C%97%E4%BA%AC%E5%AE%9E%E6%97%B6%E5%85%AC%E4%BA%A4.gif) - -### 英文项目 -- [activate-power-mode 输入效果](https://github.com/disjukr/activate-power-mode):[在线演示](http://0xabcdef.com/activate-power-mode/) - -![](https://github.com/521xueweihan/HelloGithub/blob/master/01/img/activate-power-mode.gif) - -- [Archey for OS X 命令行中显示计算机的基本信息](https://github.com/obihann/archey-osx) - -![](https://github.com/521xueweihan/HelloGithub/blob/master/01/img/Archey%20for%20OS%20X.png) - - -### 书籍、教程、资料: -- [Python进阶 中文版](https://github.com/eastlakeside/interpy-zh):[在线阅读](https://eastlakeside.gitbooks.io/interpy-zh/content/) - -- [Python Cookbook 3rd 中文版](https://github.com/yidao620c/python3-cookbook):[在线阅读](http://python3-cookbook.readthedocs.org/zh_CN/latest/) - -- [Python最佳实践指南中文版](https://github.com/Prodesire/Python-Guide-CN):[在线阅读](http://pythonguidecn.readthedocs.io/zh/latest/) - -- [awesome-python 中文版](https://github.com/jobbole/awesome-python-cn) - -- [图说设计模式](https://github.com/me115/design_patterns):[在线阅读](http://design-patterns.readthedocs.io/zh_CN/latest/index.html#) - -- [面向程序员的数据挖掘指南](https://github.com/egrcc/guidetodatamining):[在线阅读](http://guidetodatamining.com/) - -- [Linux工具快速教程](https://github.com/me115/linuxtools_rst):[在线阅读](http://linuxtools-rst.readthedocs.io/zh_CN/latest/) - -- [linux 下的惬意生活](https://github.com/yangyangwithgnu/the_new_world_linux):[在线阅读](https://github.com/yangyangwithgnu/the_new_world_linux#目录) - -- [《计算机程序的构造和解释》公开课](https://github.com/DeathKing/Learning-SICP) - -- [iterm2 快捷键](https://github.com/sumiaowen/iterm2-shortcuts) diff --git a/01/content01.md b/01/content01.md new file mode 100644 index 00000000..d88d0d95 --- /dev/null +++ b/01/content01.md @@ -0,0 +1,48 @@ +#### Python 项目 +1、[awesome-python-webapp](https://github.com/michaelliao/awesome-python-webapp):廖老师的 Python 入门教程中的实践项目的代码,[教程在线阅读](http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000/001397616003925a3d157284cd24bc0952d6c4a7c9d8c55000) + +2、[Minos](https://github.com/phith0n/Minos):一个基于 Tornado/MongoDB/Redis 的社区系统,[预览](http://minos.leavesongs.com/) + +3、[tushare](https://github.com/waditu/tushare):TuShare 是一个免费、开源的 Python 财经数据接口包,[TuShare 文档](http://tushare.org/index.html) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/TuShare-min.png) + +4、[beijing_bus](https://github.com/wong2/beijing_bus):北京实时公交,可以显示查询的公交到达某站还需多久 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/%E5%8C%97%E4%BA%AC%E5%AE%9E%E6%97%B6%E5%85%AC%E4%BA%A4.gif) + +#### JavaScript 项目 +5、[ant-design](https://github.com/ant-design/ant-design):阿里开源的一套企业级的 UI 设计语言和 React 实现。[中文文档](https://ant.design/docs/react/introduce-cn),样式偏向于后端,展示效果十分漂亮 + +6、[VeryNginx](https://github.com/alexazhou/VeryNginx):一个功能强大而对人类友好的 Nginx 扩展程序。[VeryNginx 文档](https://github.com/alexazhou/VeryNginx/blob/master/readme_zh.md) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/VeryNginx-min.jpeg) + +7、[activate-power-mode](https://github.com/disjukr/activate-power-mode):爆炸输入效果,[在线演示](http://0xabcdef.com/activate-power-mode/) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/activate-power-mode.gif) + +#### CSS 项目 +8、[typo.css](https://github.com/sofish/typo.css):中文网页重设与排版,为了一致化浏览器排版效果,构建最适合中文阅读的网页排版。包括桌面和移动平台,[预览](http://typo.sofi.sh/) + +#### 开源书籍 +9、[interpy-zh](https://github.com/eastlakeside/interpy-zh):《Python 进阶中文版》,[在线阅读](https://eastlakeside.gitbooks.io/interpy-zh/content/) + +10、[python3-cookbook](https://github.com/yidao620c/python3-cookbook):《Python Cookbook 3rd 中文版》,[在线阅读](http://python3-cookbook.readthedocs.org/zh_CN/latest/) + +11、[Python-Guide-CN](https://github.com/Prodesire/Python-Guide-CN):《Python 最佳实践指南中文版》,[在线阅读](http://pythonguidecn.readthedocs.io/zh/latest/) + +12、[design_patterns](https://github.com/me115/design_patterns):《图说设计模式》,[在线阅读](http://design-patterns.readthedocs.io/zh_CN/latest/index.html#) + +13、[linuxtools_rst](https://github.com/me115/linuxtools_rst):《Linux 工具快速教程》,[在线阅读](http://linuxtools-rst.readthedocs.io/zh_CN/latest/) + +14、[the_new_world_linux](https://github.com/yangyangwithgnu/the_new_world_linux):《Linux 下的惬意生活》,[在线阅读](https://github.com/yangyangwithgnu/the_new_world_linux#目录) + +#### 其它 +15、[archey-osx](https://github.com/obihann/archey-osx):命令行中显示 Mac OS X 计算机的基本信息 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/Archey%20for%20OS%20X-min.png) + +16、[Learning-SICP](https://github.com/DeathKing/Learning-SICP):《计算机程序的构造和解释》公开课 + +17、[awesome-python-cn](https://github.com/jobbole/awesome-python-cn):awesome-python 中文版 diff --git a/01/img/Archey for OS X-min.png b/01/img/Archey for OS X-min.png new file mode 100644 index 00000000..b74645e4 Binary files /dev/null and b/01/img/Archey for OS X-min.png differ diff --git a/01/img/Archey for OS X.png b/01/img/Archey for OS X.png deleted file mode 100644 index 812b84bb..00000000 Binary files a/01/img/Archey for OS X.png and /dev/null differ diff --git a/01/img/TuShare-min.png b/01/img/TuShare-min.png new file mode 100644 index 00000000..0404c4b1 Binary files /dev/null and b/01/img/TuShare-min.png differ diff --git a/01/img/TuShare.png b/01/img/TuShare.png deleted file mode 100644 index 7592762c..00000000 Binary files a/01/img/TuShare.png and /dev/null differ diff --git a/01/img/TuShare2.png b/01/img/TuShare2.png deleted file mode 100644 index afbcbc1e..00000000 Binary files a/01/img/TuShare2.png and /dev/null differ diff --git a/01/img/VeryNginx-min.jpeg b/01/img/VeryNginx-min.jpeg new file mode 100644 index 00000000..0df63580 Binary files /dev/null and b/01/img/VeryNginx-min.jpeg differ diff --git a/01/img/VeryNginx.jpeg b/01/img/VeryNginx.jpeg deleted file mode 100644 index 7e920003..00000000 Binary files a/01/img/VeryNginx.jpeg and /dev/null differ diff --git a/01/img/activate-power-mode.gif b/01/img/activate-power-mode.gif index e293493b..7013e8df 100644 Binary files a/01/img/activate-power-mode.gif and b/01/img/activate-power-mode.gif differ diff --git a/01/img/hello-github.jpg b/01/img/hello-github.jpg new file mode 100644 index 00000000..82eaa60f Binary files /dev/null and b/01/img/hello-github.jpg differ diff --git "a/01/img/\345\214\227\344\272\254\345\256\236\346\227\266\345\205\254\344\272\244.gif" "b/01/img/\345\214\227\344\272\254\345\256\236\346\227\266\345\205\254\344\272\244.gif" index b515782a..d83a9cd8 100644 Binary files "a/01/img/\345\214\227\344\272\254\345\256\236\346\227\266\345\205\254\344\272\244.gif" and "b/01/img/\345\214\227\344\272\254\345\256\236\346\227\266\345\205\254\344\272\244.gif" differ diff --git a/02/HelloGitHub02.md b/02/HelloGitHub02.md new file mode 100644 index 00000000..21020e45 --- /dev/null +++ b/02/HelloGitHub02.md @@ -0,0 +1,136 @@ +# 《HelloGitHub》第 02 期 +>兴趣是最好的老师,[HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 就是帮你找到兴趣! + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) + +## 简介 +最开始我只是想把自己在浏览 [GitHub](https://github.com/) 过程中,发现的有意思、高质量、容易上手的项目收集起来,这样便于以后查找和学习。后来一想,如果给这些 GitHub 项目都加上简单的效果图和一些通俗易懂的中文介绍。应该能够帮助到我这样的新手激发兴趣去参与、学习这些优秀、好玩的开源项目。 + +所以,我就做了一个面向**编程新手**、**热爱编程**、**对开源社区感兴趣** 的人群的月刊,月刊的内容包括:**各种编程语言的项目**、**各种让生活变得更美好的工具**、**书籍、学习笔记、教程等**。这些项目都是非常容易上手,而且非常 Cool,主要是希望大家能动手用起来,加入到**开源社区**中。会编程的可以贡献代码,不会编程的可以反馈使用这些工具中的 Bug、帮着宣传你觉得优秀的项目、Star 项目⭐️。同时你将学习到更多编程知识、提高自己的编程技巧、发现自己的**兴趣**。 + +🎉 最后 [HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 这个项目就诞生了 🎉 + +--- +|**以下为本期内容**|每个月 28 号发布最新一期,首发在我的 [GitHub](https://github.com/521xueweihan) 上|[点击查看往期内容](https://github.com/521xueweihan/HelloGitHub#往期回顾)| + +#### Python 项目 +1、[luokr.com](https://github.com/alvan/luokr.com):Python Tornado 写的开源网站——螺壳网,[访问](http://luokr.com/),如图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/02/img/%E8%9E%BA%E5%A3%B3%E7%BD%91-min.png) + +2、[ssbc](https://github.com/78/ssbc):Python Django 写的种子搜索网站——手撕包菜,[访问](http://www.cilibaba.com/),如图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/02/img/%E6%89%8B%E6%92%95%E5%8C%85%E8%8F%9C%E7%BD%91-min.png) + +3、[listen1](https://github.com/listen1):Listen 1 让你用一个网页就能听到多个网站的在线音乐,支持各种平台。如图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/02/img/listen1-min.png) + +4、[python-gems](https://github.com/RealHacker/python-gems):有趣的 Pyhton 代码片段集合 + +5、[algorithm](https://github.com/qiwsir/algorithm):老齐的 Python 算法教程 + +6、[python-goose](https://github.com/grangier/python-goose):Goose 用于文章提取器,提取中文内容的示例代码: +```python +>>> from goose import Goose +>>> from goose.text import StopWordsChinese +>>> url = 'http://www.bbc.co.uk/zhongwen/simp/chinese_news/2012/12/121210_hongkong_politics.shtml' +>>> g = Goose({'stopwords_class': StopWordsChinese}) +>>> article = g.extract(url=url) +>>> print article.cleaned_text[:150] +香港行政长官梁振英在各方压力下就其大宅的违章建筑(僭建)问题到立法会接受质询,并向香港民众道歉。 + +梁振英在星期二(12月10日)的答问大会开始之际在其演说中道歉,但强调他在违章建筑问题上没有隐瞒的意图和动机。 + +一些亲北京阵营议员欢迎梁振英道歉,且认为应能获得香港民众接受,但这些议员也质问梁振英有 +``` + +7、[mincss](https://github.com/peterbe/mincss):Python 写的用来找到 CSS 中没有用到的代码片段,并删除。适用于:想要做一个页面,但是不会写 CSS 人。示例代码如下: +```python +#coding:utf-8 +#!/usr/bin/env python +from __future__ import print_function +import sys, os +sys.path.insert(0, os.path.abspath('.')) +from mincss.processor import Processor + +# 这里改成想要参考的页面 +URL = 'http://localhost:9000/page.html' + +def run(): + p = Processor() + p.process(URL) + + # 输出INlink的css的简化前和简化后的css代码 + print("INLINES ".ljust(79, '-')) + for each in p.inlines: + print("On line %s" % each.line) + print('- ' * 40) + print("BEFORE") + print(each.before) + print('- ' * 40) + print("AFTER:") + print(each.after) + print("\n") + + # 输出link引用的css的简化前和简化后的css代码 + print("LINKS ".ljust(79, '-')) + for each in p.links: + print("On href %s" % each.href) + print('- ' * 40) + print("BEFORE") + print(each.before) + print('- ' * 40) + print("AFTER:") + print(each.after) + print("\n") + + +if __name__ == '__main__': + run() +``` + +8、[jquery-weui](https://github.com/lihongxun945/jquery-weui):可能是最好用 WeUI 版本,展示效果如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/02/img/jquery-weui-min.png) + +9、[github-markdown-css](https://github.com/sindresorhus/github-markdown-css):仿 GitHub 的 Markdown 的样式,就是使用了这个 CSS 后,Markdown 展示效果和 GitHub 的大致一样。[示例](https://sindresorhus.com/github-markdown-css/) + +#### JavaScript 项目 +10、[ant-motion](https://github.com/ant-motion/ant-motion):阿里开源的项目,可以方便快捷的制作一个公司的介绍页,[在线演示](https://motion.ant.design/) + +11、[wechat-h5-boilerplate](https://github.com/panteng/wechat-h5-boilerplate):为腾讯微信优化的 HTML5 动效模板,帮助你快速构建全屏滚动型 HTML5 页面,[示例](http://panteng.me/demos/whb/) + +12、[waitForImages](https://github.com/alexanderdickson/waitForImages):背景加载完事件,示例代码: +```html + + +``` + +#### 其它 +13、[leetcode-solutions](https://github.com/RealHacker/leetcode-solutions):Leetcode OJ 的 Python 算法实现 + + +--- + +## 声明 +如果你发现了好玩、有意义的开源项目,[点击这里](https://github.com/521xueweihan/HelloGitHub/issues/new) 分享你觉得有意思的项目。 + +- 分享项目格式:`项目名称——项目地址:项目描述(中文),追求完美👉项目上手 demo、截图` + +或许你分享的项目会让别人由衷的感慨:“原来还有这么有意思的项目!编程可以这么酷!” + +**欢迎转载,请注明出处和作者,同时保留声明和联系方式。** + +## 联系方式 +- [削微寒](https://github.com/521xueweihan) + +- [博客园](http://www.cnblogs.com/xueweihan/) + +- [知乎专栏](https://zhuanlan.zhihu.com/hellogithub) diff --git a/02/content02.md b/02/content02.md new file mode 100644 index 00000000..6029de7d --- /dev/null +++ b/02/content02.md @@ -0,0 +1,102 @@ +#### Python 项目 +1、[luokr.com](https://github.com/alvan/luokr.com):Python Tornado 写的开源网站——螺壳网,[访问](http://luokr.com/),如图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/02/img/%E8%9E%BA%E5%A3%B3%E7%BD%91-min.png) + +2、[ssbc](https://github.com/78/ssbc):Python Django 写的种子搜索网站——手撕包菜,[访问](http://www.cilibaba.com/),如图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/02/img/%E6%89%8B%E6%92%95%E5%8C%85%E8%8F%9C%E7%BD%91-min.png) + +3、[listen1](https://github.com/listen1):Listen 1 让你用一个网页就能听到多个网站的在线音乐,支持各种平台。如图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/02/img/listen1-min.png) + +4、[python-gems](https://github.com/RealHacker/python-gems):有趣的 Pyhton 代码片段集合 + +5、[algorithm](https://github.com/qiwsir/algorithm):老齐的 Python 算法教程 + +6、[python-goose](https://github.com/grangier/python-goose):Goose 用于文章提取器,提取中文内容的示例代码: +```python +>>> from goose import Goose +>>> from goose.text import StopWordsChinese +>>> url = 'http://www.bbc.co.uk/zhongwen/simp/chinese_news/2012/12/121210_hongkong_politics.shtml' +>>> g = Goose({'stopwords_class': StopWordsChinese}) +>>> article = g.extract(url=url) +>>> print article.cleaned_text[:150] +香港行政长官梁振英在各方压力下就其大宅的违章建筑(僭建)问题到立法会接受质询,并向香港民众道歉。 + +梁振英在星期二(12月10日)的答问大会开始之际在其演说中道歉,但强调他在违章建筑问题上没有隐瞒的意图和动机。 + +一些亲北京阵营议员欢迎梁振英道歉,且认为应能获得香港民众接受,但这些议员也质问梁振英有 +``` + +7、[mincss](https://github.com/peterbe/mincss):Python 写的用来找到 CSS 中没有用到的代码片段,并删除。适用于:想要做一个页面,但是不会写 CSS 人。示例代码如下: +```python +#coding:utf-8 +#!/usr/bin/env python +from __future__ import print_function +import sys, os +sys.path.insert(0, os.path.abspath('.')) +from mincss.processor import Processor + +# 这里改成想要参考的页面 +URL = 'http://localhost:9000/page.html' + +def run(): + p = Processor() + p.process(URL) + + # 输出INlink的css的简化前和简化后的css代码 + print("INLINES ".ljust(79, '-')) + for each in p.inlines: + print("On line %s" % each.line) + print('- ' * 40) + print("BEFORE") + print(each.before) + print('- ' * 40) + print("AFTER:") + print(each.after) + print("\n") + + # 输出link引用的css的简化前和简化后的css代码 + print("LINKS ".ljust(79, '-')) + for each in p.links: + print("On href %s" % each.href) + print('- ' * 40) + print("BEFORE") + print(each.before) + print('- ' * 40) + print("AFTER:") + print(each.after) + print("\n") + + +if __name__ == '__main__': + run() +``` + +8、[jquery-weui](https://github.com/lihongxun945/jquery-weui):可能是最好用 WeUI 版本,展示效果如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/02/img/jquery-weui-min.png) + +9、[github-markdown-css](https://github.com/sindresorhus/github-markdown-css):仿 GitHub 的 Markdown 的样式,就是使用了这个 CSS 后,Markdown 展示效果和 GitHub 的大致一样。[示例](https://sindresorhus.com/github-markdown-css/) + +#### JavaScript 项目 +10、[ant-motion](https://github.com/ant-motion/ant-motion):阿里开源的项目,可以方便快捷的制作一个公司的介绍页,[在线演示](https://motion.ant.design/) + +11、[wechat-h5-boilerplate](https://github.com/panteng/wechat-h5-boilerplate):为腾讯微信优化的 HTML5 动效模板,帮助你快速构建全屏滚动型 HTML5 页面,[示例](http://panteng.me/demos/whb/) + +12、[waitForImages](https://github.com/alexanderdickson/waitForImages):背景加载完事件,示例代码: +```html + + +``` + +#### 其它 +13、[leetcode-solutions](https://github.com/RealHacker/leetcode-solutions):Leetcode OJ 的 Python 算法实现 diff --git a/02/img/jquery-weui-min.png b/02/img/jquery-weui-min.png new file mode 100644 index 00000000..09cce9a4 Binary files /dev/null and b/02/img/jquery-weui-min.png differ diff --git a/02/img/listen1-min.png b/02/img/listen1-min.png new file mode 100644 index 00000000..afe11a24 Binary files /dev/null and b/02/img/listen1-min.png differ diff --git "a/02/img/\346\211\213\346\222\225\345\214\205\350\217\234\347\275\221-min.png" "b/02/img/\346\211\213\346\222\225\345\214\205\350\217\234\347\275\221-min.png" new file mode 100644 index 00000000..51c506fd Binary files /dev/null and "b/02/img/\346\211\213\346\222\225\345\214\205\350\217\234\347\275\221-min.png" differ diff --git "a/02/img/\350\236\272\345\243\263\347\275\221-min.png" "b/02/img/\350\236\272\345\243\263\347\275\221-min.png" new file mode 100644 index 00000000..8fcd7a32 Binary files /dev/null and "b/02/img/\350\236\272\345\243\263\347\275\221-min.png" differ diff --git a/03/HelloGitHub03.md b/03/HelloGitHub03.md new file mode 100644 index 00000000..08c62029 --- /dev/null +++ b/03/HelloGitHub03.md @@ -0,0 +1,68 @@ +# 《HelloGitHub》第 03 期 +>兴趣是最好的老师,[HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 就是帮你找到兴趣! + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) + +## 简介 +最开始我只是想把自己在浏览 [GitHub](https://github.com/) 过程中,发现的有意思、高质量、容易上手的项目收集起来,这样便于以后查找和学习。后来一想,如果给这些 GitHub 项目都加上简单的效果图和一些通俗易懂的中文介绍。应该能够帮助到我这样的新手激发兴趣去参与、学习这些优秀、好玩的开源项目。 + +所以,我就做了一个面向**编程新手**、**热爱编程**、**对开源社区感兴趣** 的人群的月刊,月刊的内容包括:**各种编程语言的项目**、**各种让生活变得更美好的工具**、**书籍、学习笔记、教程等**。这些项目都是非常容易上手,而且非常 Cool,主要是希望大家能动手用起来,加入到**开源社区**中。会编程的可以贡献代码,不会编程的可以反馈使用这些工具中的 Bug、帮着宣传你觉得优秀的项目、Star 项目⭐️。同时你将学习到更多编程知识、提高自己的编程技巧、发现自己的**兴趣**。 + +🎉 最后 [HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 这个项目就诞生了 🎉 + +--- +|**以下为本期内容**|每个月 28 号发布最新一期,首发在我的 [GitHub](https://github.com/521xueweihan) 上|[点击查看往期内容](https://github.com/521xueweihan/HelloGitHub#往期回顾)| + +#### Python 项目 +1、[XX-Net](https://github.com/XX-net/XX-Net):Python 写的基于免费 GAE,科学上网工具。[中文文档](https://github.com/XX-net/XX-Net/wiki/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3) + +2、[KindleEar](https://github.com/cdhigh/KindleEar):这是一个运行在 Google App Engine(GAE) 上的 Kindle 个人推送服务应用,生成排版精美的杂志模式 `mobi/epub` 格式自动每天推送至您的 Kindle 或其他邮箱。 + +#### PHP 项目 +3、[walle-web](https://github.com/meolu/walle-web):Walle(瓦力) 一个 Web 部署系统工具,可能也是个持续发布工具,配置简单、功能完善、界面流畅、开箱即用!支持 git、svn 版本管理,支持各种 Web 代码发布,静态的 HTML,动态 PHP,需要编译的 Java 等。[中文介绍](https://github.com/meolu/walle-web/blob/master/docs/README-zh.md),使用展示如图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/03/img/wali-show.gif) + +#### Go 项目 +4、[pholcus](https://github.com/henrylee2cn/pholcus):Pholcus 是 Go 写的重量级爬虫,纯 Go 语言编写的高并发、分布式、重量级爬虫软件,支持单机、服务端、客户端三种运行模式,拥有 Web、GUI、命令行三种操作界面,功能齐全、强大。[使用手册](https://pholcus.gitbooks.io/docs/content/),使用展示如图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/03/img/Pholcus-min.jpg) + +#### Java 项目 +5、[greys-anatomy](https://github.com/oldmanpushcart/greys-anatomy):Greys 是 Java 在线问题诊断工具。 + +#### JavaScript 项目 +6、[OS.js](https://github.com/os-js/OS.js):JavaScript 写的基于浏览器上的桌面操作系统。[在线演示](https://osjsv2.0o.no/),使用展示如图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/03/img/os-js-min.png) + +7、[editor.md](https://github.com/pandao/editor.md):是一款开源的、可嵌入的 Markdown 在线编辑器(组件),基于 CodeMirror、jQuery 和 Marked 构建。[在线尝试](http://lab.lepture.com/editor/),使用展示如图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/03/img/editor.md-min.png) + +#### CSS 项目 +8、[animate.css](https://github.com/daneden/animate.css):提供炫酷动画效果,同时方便、易用、跨浏览器的 CSS 库。[在线演示](http://daneden.github.io/animate.css/) + +9、[mui](https://github.com/dcloudio/mui):最接近原生 APP 体验的高性能框架。性能和体验的差距,一直是 mobile App 开发者放弃 HTML5 的首要原因。mui 框架有效的解决了这些问题,这是一个可以方便开发出高性能 App 的框架,也是目前最接近原生 App 效果的框架。[mui 官网](http://dev.dcloud.net.cn/mui/) + +#### 其它 +10、[css-creating](https://github.com/cssdream/css-creating):CSS 创作指南 + + +--- + +## 声明 +如果你发现了好玩、有意义的开源项目,[点击这里](https://github.com/521xueweihan/HelloGitHub/issues/new) 分享你觉得有意思的项目。 + +- 分享项目格式:`项目名称——项目地址:项目描述(中文),追求完美👉项目上手 demo、截图` + +或许你分享的项目会让别人由衷的感慨:“原来还有这么有意思的项目!编程可以这么酷!” + +**欢迎转载,请注明出处和作者,同时保留声明和联系方式。** + +## 联系方式 +- [削微寒](https://github.com/521xueweihan) + +- [博客园](http://www.cnblogs.com/xueweihan/) + +- [知乎专栏](https://zhuanlan.zhihu.com/hellogithub) diff --git a/03/content03.md b/03/content03.md new file mode 100644 index 00000000..750080be --- /dev/null +++ b/03/content03.md @@ -0,0 +1,34 @@ +#### Python 项目 +1、[XX-Net](https://github.com/XX-net/XX-Net):Python 写的基于免费 GAE,科学上网工具。[中文文档](https://github.com/XX-net/XX-Net/wiki/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3) + +2、[KindleEar](https://github.com/cdhigh/KindleEar):这是一个运行在 Google App Engine(GAE) 上的 Kindle 个人推送服务应用,生成排版精美的杂志模式 `mobi/epub` 格式自动每天推送至您的 Kindle 或其他邮箱。 + +#### PHP 项目 +3、[walle-web](https://github.com/meolu/walle-web):Walle(瓦力) 一个 Web 部署系统工具,可能也是个持续发布工具,配置简单、功能完善、界面流畅、开箱即用!支持 git、svn 版本管理,支持各种 Web 代码发布,静态的 HTML,动态 PHP,需要编译的 Java 等。[中文介绍](https://github.com/meolu/walle-web/blob/master/docs/README-zh.md),使用展示如图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/03/img/wali-show.gif) + +#### Go 项目 +4、[pholcus](https://github.com/henrylee2cn/pholcus):Pholcus 是 Go 写的重量级爬虫,纯 Go 语言编写的高并发、分布式、重量级爬虫软件,支持单机、服务端、客户端三种运行模式,拥有 Web、GUI、命令行三种操作界面,功能齐全、强大。[使用手册](https://pholcus.gitbooks.io/docs/content/),使用展示如图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/03/img/Pholcus-min.jpg) + +#### Java 项目 +5、[greys-anatomy](https://github.com/oldmanpushcart/greys-anatomy):Greys 是 Java 在线问题诊断工具。 + +#### JavaScript 项目 +6、[OS.js](https://github.com/os-js/OS.js):JavaScript 写的基于浏览器上的桌面操作系统。[在线演示](https://osjsv2.0o.no/),使用展示如图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/03/img/os-js-min.png) + +7、[editor.md](https://github.com/pandao/editor.md):是一款开源的、可嵌入的 Markdown 在线编辑器(组件),基于 CodeMirror、jQuery 和 Marked 构建。[在线尝试](http://lab.lepture.com/editor/),使用展示如图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/03/img/editor.md-min.png) + +#### CSS 项目 +8、[animate.css](https://github.com/daneden/animate.css):提供炫酷动画效果,同时方便、易用、跨浏览器的 CSS 库。[在线演示](http://daneden.github.io/animate.css/) + +9、[mui](https://github.com/dcloudio/mui):最接近原生 APP 体验的高性能框架。性能和体验的差距,一直是 mobile App 开发者放弃 HTML5 的首要原因。mui 框架有效的解决了这些问题,这是一个可以方便开发出高性能 App 的框架,也是目前最接近原生 App 效果的框架。[mui 官网](http://dev.dcloud.net.cn/mui/) + +#### 其它 +10、[css-creating](https://github.com/cssdream/css-creating):CSS 创作指南 diff --git a/03/img/Pholcus-min.jpg b/03/img/Pholcus-min.jpg new file mode 100644 index 00000000..1e02a2a0 Binary files /dev/null and b/03/img/Pholcus-min.jpg differ diff --git a/03/img/editor.md-min.png b/03/img/editor.md-min.png new file mode 100644 index 00000000..ac18e15a Binary files /dev/null and b/03/img/editor.md-min.png differ diff --git a/03/img/os-js-min.png b/03/img/os-js-min.png new file mode 100644 index 00000000..65b513b9 Binary files /dev/null and b/03/img/os-js-min.png differ diff --git a/03/img/wali-show.gif b/03/img/wali-show.gif new file mode 100644 index 00000000..1226242b Binary files /dev/null and b/03/img/wali-show.gif differ diff --git a/04/HelloGitHub04.md b/04/HelloGitHub04.md new file mode 100644 index 00000000..e2daf8be --- /dev/null +++ b/04/HelloGitHub04.md @@ -0,0 +1,73 @@ +# 《HelloGitHub》第 04 期 +>兴趣是最好的老师,[HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 就是帮你找到兴趣! + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) + +## 简介 +最开始我只是想把自己在浏览 [GitHub](https://github.com/) 过程中,发现的有意思、高质量、容易上手的项目收集起来,这样便于以后查找和学习。后来一想,如果给这些 GitHub 项目都加上简单的效果图和一些通俗易懂的中文介绍。应该能够帮助到我这样的新手激发兴趣去参与、学习这些优秀、好玩的开源项目。 + +所以,我就做了一个面向**编程新手**、**热爱编程**、**对开源社区感兴趣** 的人群的月刊,月刊的内容包括:**各种编程语言的项目**、**各种让生活变得更美好的工具**、**书籍、学习笔记、教程等**。这些项目都是非常容易上手,而且非常 Cool,主要是希望大家能动手用起来,加入到**开源社区**中。会编程的可以贡献代码,不会编程的可以反馈使用这些工具中的 Bug、帮着宣传你觉得优秀的项目、Star 项目⭐️。同时你将学习到更多编程知识、提高自己的编程技巧、发现自己的**兴趣**。 + +🎉 最后 [HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 这个项目就诞生了 🎉 + +--- +|**以下为本期内容**|每个月 28 号发布最新一期,首发在我的 [GitHub](https://github.com/521xueweihan) 上|[点击查看往期内容](https://github.com/521xueweihan/HelloGitHub#往期回顾)| + +#### Python 项目 +1、[python-guide](https://github.com/kennethreitz/python-guide):[Requests 库](https://github.com/kennethreitz/requests)的作者——kennethreitz,写的 Python 教程,是个指导性教程,不单单是语法层面的,涵盖项目结构、代码风格,进阶、工具等方方面面。虽然是**英文版**([中文翻译版](http://pythonguidecn.readthedocs.io/zh/latest/)),但我这个英语渣都能看懂,你肯定也可以,快去看看吧,开卷有益。[在线阅读](http://docs.python-guide.org/en/latest/) + +2、[flask-admin](https://github.com/flask-admin/flask-admin):我工作中需要写一个微型的管理系统,用的就是这个框架。简直快餐型,页面都写好了,只要设置好相关配置就可以跑起来了。唯一缺点就是文档中的例子少,开发一些特定的需求需要自己看源码,才能知道如何改。[文档](https://flask-admin.readthedocs.io/en/latest/),下面是我跑起来之后的样子: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/04/img/flask-admin-show.gif) + +3、[python-sdk](https://github.com/qiniu/python-sdk):七牛云存储 SDK。我自己在用他家的服务,上手简单、有免费额度,可以用来做‘图床’,同时,有了这个 SDK 可以写一些好用的小工具。**注意**:图床不能随便用,我曾经就用超了,账户的钱能扣成**负数**! + +#### JavaScript 项目 +4、[zingtouch](https://github.com/zingchart/zingtouch):JavaScirpt 写的,支持移动端各种触摸动作包含:转动、挥动、滑动等动作的库,[官方网站](https://zingchart.github.io/zingtouch/),展示图如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/04/img/zingtouch-show.gif) + +5、[zhihudaily-vue](https://github.com/yatessss/zhihudaily-vue):用 Vue.js 写的知乎日报手机 Web 版,[展示](http://zhihudaily-vue.yatessss.com/),需打开 chrome 浏览器的手机模拟功能,来获得比较好的浏览效果。访问展示图如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/04/img/zhihu-vue-min.png) + +#### Java 项目 +6、[cachecloud](https://github.com/sohutv/cachecloud):搜狐视频开源的 CacheCloud 项目,提供了一个 Redis 云管理平台,功能强大,教程详细(有视频教程),文档齐全,**企业级开源项目** + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/04/img/cachecloud-min.png) + +#### 其它 +7、[interview_python](https://github.com/taizilongxu/interview_python):关于 Python 的面试题 + +8、[PyZh](https://github.com/MrKiven/PyZh):Python 经典的技术文章的翻译和收集,[在线阅读](http://pyzh.readthedocs.io/en/latest/) + +9、[interview](https://github.com/HIT-Alibaba/interview):笔试面试知识整理(涵盖:IOS、Android、计算机基础),[在线阅读](https://hit-alibaba.github.io/interview/index.html) + +10、[Front-end-Web-Development-Interview-Question](https://github.com/paddingme/Front-end-Web-Development-Interview-Question):前端开发面试题大收集 + +11、[AndroidInterview-Q-A](https://github.com/JackyAndroid/AndroidInterview-Q-A/blob/master/README-CN.md):这个项目主要是国内一线互联网公司的 Java 和 Android 方面的内部面试题。 + +12、[How-to-Be-A-Programmer-CN](https://github.com/ahangchen/How-to-Be-A-Programmer-CN):如何做好一枚程序员(中文翻译版) + +13、[neural-networks-and-deep-learning](https://github.com/mnielsen/neural-networks-and-deep-learning):《神经网络与深度学习》相关代码 Python 实现,[神经网络与深度学习-中文在线阅读](https://tigerneil.gitbooks.io/neural-networks-and-deep-learning-zh/content/chapter1.html),该书中的相关理论的 Python 代码实现 + +14、[awesome-mac](https://github.com/jaywcjlove/awesome-mac):排版相当好的一个 awesome 系列文章,文中介绍了很多 Mac 上好用的工具。 + + +--- + +## 声明 +如果你发现了好玩、有意义的开源项目,[点击这里](https://github.com/521xueweihan/HelloGitHub/issues/new) 分享你觉得有意思的项目。 + +- 分享项目格式:`项目名称——项目地址:项目描述(中文),追求完美👉项目上手 demo、截图` + +或许你分享的项目会让别人由衷的感慨:“原来还有这么有意思的项目!编程可以这么酷!” + +**欢迎转载,请注明出处和作者,同时保留声明和联系方式。** + +## 联系方式 +- [削微寒](https://github.com/521xueweihan) + +- [博客园](http://www.cnblogs.com/xueweihan/) + +- [知乎专栏](https://zhuanlan.zhihu.com/hellogithub) diff --git a/04/content04.md b/04/content04.md new file mode 100644 index 00000000..4cc2395c --- /dev/null +++ b/04/content04.md @@ -0,0 +1,39 @@ +#### Python 项目 +1、[python-guide](https://github.com/kennethreitz/python-guide):[Requests 库](https://github.com/kennethreitz/requests)的作者——kennethreitz,写的 Python 教程,是个指导性教程,不单单是语法层面的,涵盖项目结构、代码风格,进阶、工具等方方面面。虽然是**英文版**([中文翻译版](http://pythonguidecn.readthedocs.io/zh/latest/)),但我这个英语渣都能看懂,你肯定也可以,快去看看吧,开卷有益。[在线阅读](http://docs.python-guide.org/en/latest/) + +2、[flask-admin](https://github.com/flask-admin/flask-admin):我工作中需要写一个微型的管理系统,用的就是这个框架。简直快餐型,页面都写好了,只要设置好相关配置就可以跑起来了。唯一缺点就是文档中的例子少,开发一些特定的需求需要自己看源码,才能知道如何改。[文档](https://flask-admin.readthedocs.io/en/latest/),下面是我跑起来之后的样子: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/04/img/flask-admin-show.gif) + +3、[python-sdk](https://github.com/qiniu/python-sdk):七牛云存储 SDK。我自己在用他家的服务,上手简单、有免费额度,可以用来做‘图床’,同时,有了这个 SDK 可以写一些好用的小工具。**注意**:图床不能随便用,我曾经就用超了,账户的钱能扣成**负数**! + +#### JavaScript 项目 +4、[zingtouch](https://github.com/zingchart/zingtouch):JavaScirpt 写的,支持移动端各种触摸动作包含:转动、挥动、滑动等动作的库,[官方网站](https://zingchart.github.io/zingtouch/),展示图如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/04/img/zingtouch-show.gif) + +5、[zhihudaily-vue](https://github.com/yatessss/zhihudaily-vue):用 Vue.js 写的知乎日报手机 Web 版,[展示](http://zhihudaily-vue.yatessss.com/),需打开 chrome 浏览器的手机模拟功能,来获得比较好的浏览效果。访问展示图如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/04/img/zhihu-vue-min.png) + +#### Java 项目 +6、[cachecloud](https://github.com/sohutv/cachecloud):搜狐视频开源的 CacheCloud 项目,提供了一个 Redis 云管理平台,功能强大,教程详细(有视频教程),文档齐全,**企业级开源项目** + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/04/img/cachecloud-min.png) + +#### 其它 +7、[interview_python](https://github.com/taizilongxu/interview_python):关于 Python 的面试题 + +8、[PyZh](https://github.com/MrKiven/PyZh):Python 经典的技术文章的翻译和收集,[在线阅读](http://pyzh.readthedocs.io/en/latest/) + +9、[interview](https://github.com/HIT-Alibaba/interview):笔试面试知识整理(涵盖:IOS、Android、计算机基础),[在线阅读](https://hit-alibaba.github.io/interview/index.html) + +10、[Front-end-Web-Development-Interview-Question](https://github.com/paddingme/Front-end-Web-Development-Interview-Question):前端开发面试题大收集 + +11、[AndroidInterview-Q-A](https://github.com/JackyAndroid/AndroidInterview-Q-A/blob/master/README-CN.md):这个项目主要是国内一线互联网公司的 Java 和 Android 方面的内部面试题。 + +12、[How-to-Be-A-Programmer-CN](https://github.com/ahangchen/How-to-Be-A-Programmer-CN):如何做好一枚程序员(中文翻译版) + +13、[neural-networks-and-deep-learning](https://github.com/mnielsen/neural-networks-and-deep-learning):《神经网络与深度学习》相关代码 Python 实现,[神经网络与深度学习-中文在线阅读](https://tigerneil.gitbooks.io/neural-networks-and-deep-learning-zh/content/chapter1.html),该书中的相关理论的 Python 代码实现 + +14、[awesome-mac](https://github.com/jaywcjlove/awesome-mac):排版相当好的一个 awesome 系列文章,文中介绍了很多 Mac 上好用的工具。 diff --git a/04/img/cachecloud-min.png b/04/img/cachecloud-min.png new file mode 100644 index 00000000..3256fe53 Binary files /dev/null and b/04/img/cachecloud-min.png differ diff --git a/04/img/flask-admin-show.gif b/04/img/flask-admin-show.gif new file mode 100644 index 00000000..6fad1a67 Binary files /dev/null and b/04/img/flask-admin-show.gif differ diff --git a/04/img/zhihu-vue-min.png b/04/img/zhihu-vue-min.png new file mode 100644 index 00000000..738fd691 Binary files /dev/null and b/04/img/zhihu-vue-min.png differ diff --git a/04/img/zingtouch-show.gif b/04/img/zingtouch-show.gif new file mode 100644 index 00000000..b2eab98a Binary files /dev/null and b/04/img/zingtouch-show.gif differ diff --git a/05/HelloGitHub05.md b/05/HelloGitHub05.md new file mode 100644 index 00000000..ddd6583f --- /dev/null +++ b/05/HelloGitHub05.md @@ -0,0 +1,89 @@ +# 《HelloGitHub》第 05 期 +>兴趣是最好的老师,[HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 就是帮你找到兴趣! + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) + +## 简介 +最开始我只是想把自己在浏览 [GitHub](https://github.com/) 过程中,发现的有意思、高质量、容易上手的项目收集起来,这样便于以后查找和学习。后来一想,如果给这些 GitHub 项目都加上简单的效果图和一些通俗易懂的中文介绍。应该能够帮助到我这样的新手激发兴趣去参与、学习这些优秀、好玩的开源项目。 + +所以,我就做了一个面向**编程新手**、**热爱编程**、**对开源社区感兴趣** 的人群的月刊,月刊的内容包括:**各种编程语言的项目**、**各种让生活变得更美好的工具**、**书籍、学习笔记、教程等**。这些项目都是非常容易上手,而且非常 Cool,主要是希望大家能动手用起来,加入到**开源社区**中。会编程的可以贡献代码,不会编程的可以反馈使用这些工具中的 Bug、帮着宣传你觉得优秀的项目、Star 项目⭐️。同时你将学习到更多编程知识、提高自己的编程技巧、发现自己的**兴趣**。 + +🎉 最后 [HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 这个项目就诞生了 🎉 + +--- +|**以下为本期内容**|每个月 28 号发布最新一期,首发在我的 [GitHub](https://github.com/521xueweihan) 上|[点击查看往期内容](https://github.com/521xueweihan/HelloGitHub#往期回顾)| + +#### Python 项目 +1、[superset](https://github.com/airbnb/superset):**企业级项目**,airbnb 做的数据探索、展示平台。功能很强大,可以用来做数据分析、展示。如下图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/05/img/superset-min.gif) + +2、[flaskbb](https://github.com/sh4nks/flaskbb):基于 Flask 框架做的论坛,功能有限,轻量级的论坛应用[在线文档](http://flaskbb.readthedocs.io/en/latest/index.html),可以在这个项目上进行二次开发,实现更加复杂的功能。[在线预览](https://forums.flaskbb.org) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/05/img/flask-bb-show-min.png) + +3、[fuck-login](https://github.com/xchaoinfo/fuck-login):模拟登录一些知名的网站,为了方便爬取需要登录的网站。**注意**:控制爬虫的爬取频率! + +#### Go 项目 +4、[gogs](https://github.com/gogits/gogs):用 Go 写的一款极易搭建的自助 Git 服务,支持所有平台。就像 GitLab 一样的服务,但是 GitLab 是基于 ruby 语言的。另外:完善的中文文档、支持 Go 语言支持的所有平台,包括 Linux、Mac OS X、Windows 以及 ARM 平台。[中文介绍](https://github.com/gogits/gogs/blob/master/README_ZH.md) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/05/img/gogs-show-min.png) + +5、[gh-ost](https://github.com/github/gh-ost):gh-ost 是 GitHub 最近几个月开发出来的,目的是解决一个经常碰到的问题:不断变化的产品需求会不断要求更改 MySQL 表结构。gh-ost 通过一种影响小、可控制、可审计、操作简单而且安全的方式来改变线上表结构。[中文简介](http://www.infoq.com/cn/news/2016/08/GitHub-MySQL-gh-ost?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/05/img/gh-ost-general-flow-min.png) + +#### C# 项目 +6、[WeiXinMPSDK](https://github.com/JeffreySu/WeiXinMPSDK):微信公众平台 SDK,支持 .NET Framework 及 .NET Core。已支持微信公众号、企业号、开放平台、微信支付、JSSDK。此项目开源、免费、持续维护。 + +#### JavaScript 项目 +7、[share.js](https://github.com/overtrue/share.js):一键分享到微博、QQ 空间、QQ 好友、微信、腾讯微博、豆瓣等社交网站的 JavaScript 项目。[在线演示](http://overtrue.me/share.js/) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/05/img/share-js-show-min.png) + +#### PHP 项目 +8、[pinyin](https://github.com/overtrue/pinyin):PHP 写的基于 [CC-CEDICT](https://cc-cedict.org/wiki/) 词典的中文转拼音工具,更准确的支持多音字的汉字转拼音解决方案,示例代码: +```php +use Overtrue\Pinyin\Pinyin; + +$pinyin = new Pinyin(); + +$pinyin->convert('带着希望去旅行,比到达终点更美好'); +// ["dai", "zhe", "xi", "wang", "qu", "lv", "xing", "bi", "dao", "da", "zhong", "dian", "geng", "mei", "hao"] + +$pinyin->convert('带着希望去旅行,比到达终点更美好', PINYIN_UNICODE); +// ["dài","zhe","xī","wàng","qù","lǚ","xíng","bǐ","dào","dá","zhōng","diǎn","gèng","měi","hǎo"] + +$pinyin->convert('带着希望去旅行,比到达终点更美好', PINYIN_ASCII); +//["dai4","zhe","xi1","wang4","qu4","lv3","xing2","bi3","dao4","da2","zhong1","dian3","geng4","mei3","hao3"] +``` + +#### 其它 +9、[bytesize-icons](https://github.com/danklammer/bytesize-icons):极小、极简的 SVG 图标集合,[在线演示](http://danklammer.com/articles/svg-stroke-ftw/#give-it-a-spin)。 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/05/img/bytesize-icons-show-min.png) + +10、[gitignore](https://github.com/github/gitignore):各种 `gitignore` 模版,特别全,应该能找到你需要的。[什么是 gitignore 文件](http://gitbook.liuhui998.com/4_1.html)。 + +11、[Solve-App-Store-Review-Problem](https://github.com/wg689/Solve-App-Store-Review-Problem):App Store 审核未通过的解决方案。 + +12、[security-guide-for-developers](https://github.com/FallibleInc/security-guide-for-developers):这是一个 checklist,作为一个 real word web developer 你应该在实际工作中不断地谨慎使用这套列表,减少安全隐患。[中文翻译版](https://github.com/FallibleInc/security-guide-for-developers/blob/master/README-zh.md) + + +--- + +## 声明 +如果你发现了好玩、有意义的开源项目,[点击这里](https://github.com/521xueweihan/HelloGitHub/issues/new) 分享你觉得有意思的项目。 + +- 分享项目格式:`项目名称——项目地址:项目描述(中文),追求完美👉项目上手 demo、截图` + +或许你分享的项目会让别人由衷的感慨:“原来还有这么有意思的项目!编程可以这么酷!” + +**欢迎转载,请注明出处和作者,同时保留声明和联系方式。** + +## 联系方式 +- [削微寒](https://github.com/521xueweihan) + +- [博客园](http://www.cnblogs.com/xueweihan/) + +- [知乎专栏](https://zhuanlan.zhihu.com/hellogithub) diff --git a/05/content05.md b/05/content05.md new file mode 100644 index 00000000..ae54d374 --- /dev/null +++ b/05/content05.md @@ -0,0 +1,55 @@ +#### Python 项目 +1、[superset](https://github.com/airbnb/superset):**企业级项目**,airbnb 做的数据探索、展示平台。功能很强大,可以用来做数据分析、展示。如下图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/05/img/superset-min.gif) + +2、[flaskbb](https://github.com/sh4nks/flaskbb):基于 Flask 框架做的论坛,功能有限,轻量级的论坛应用[在线文档](http://flaskbb.readthedocs.io/en/latest/index.html),可以在这个项目上进行二次开发,实现更加复杂的功能。[在线预览](https://forums.flaskbb.org) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/05/img/flask-bb-show-min.png) + +3、[fuck-login](https://github.com/xchaoinfo/fuck-login):模拟登录一些知名的网站,为了方便爬取需要登录的网站。**注意**:控制爬虫的爬取频率! + +#### Go 项目 +4、[gogs](https://github.com/gogits/gogs):用 Go 写的一款极易搭建的自助 Git 服务,支持所有平台。就像 GitLab 一样的服务,但是 GitLab 是基于 ruby 语言的。另外:完善的中文文档、支持 Go 语言支持的所有平台,包括 Linux、Mac OS X、Windows 以及 ARM 平台。[中文介绍](https://github.com/gogits/gogs/blob/master/README_ZH.md) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/05/img/gogs-show-min.png) + +5、[gh-ost](https://github.com/github/gh-ost):gh-ost 是 GitHub 最近几个月开发出来的,目的是解决一个经常碰到的问题:不断变化的产品需求会不断要求更改 MySQL 表结构。gh-ost 通过一种影响小、可控制、可审计、操作简单而且安全的方式来改变线上表结构。[中文简介](http://www.infoq.com/cn/news/2016/08/GitHub-MySQL-gh-ost?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/05/img/gh-ost-general-flow-min.png) + +#### C# 项目 +6、[WeiXinMPSDK](https://github.com/JeffreySu/WeiXinMPSDK):微信公众平台 SDK,支持 .NET Framework 及 .NET Core。已支持微信公众号、企业号、开放平台、微信支付、JSSDK。此项目开源、免费、持续维护。 + +#### JavaScript 项目 +7、[share.js](https://github.com/overtrue/share.js):一键分享到微博、QQ 空间、QQ 好友、微信、腾讯微博、豆瓣等社交网站的 JavaScript 项目。[在线演示](http://overtrue.me/share.js/) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/05/img/share-js-show-min.png) + +#### PHP 项目 +8、[pinyin](https://github.com/overtrue/pinyin):PHP 写的基于 [CC-CEDICT](https://cc-cedict.org/wiki/) 词典的中文转拼音工具,更准确的支持多音字的汉字转拼音解决方案,示例代码: +```php +use Overtrue\Pinyin\Pinyin; + +$pinyin = new Pinyin(); + +$pinyin->convert('带着希望去旅行,比到达终点更美好'); +// ["dai", "zhe", "xi", "wang", "qu", "lv", "xing", "bi", "dao", "da", "zhong", "dian", "geng", "mei", "hao"] + +$pinyin->convert('带着希望去旅行,比到达终点更美好', PINYIN_UNICODE); +// ["dài","zhe","xī","wàng","qù","lǚ","xíng","bǐ","dào","dá","zhōng","diǎn","gèng","měi","hǎo"] + +$pinyin->convert('带着希望去旅行,比到达终点更美好', PINYIN_ASCII); +//["dai4","zhe","xi1","wang4","qu4","lv3","xing2","bi3","dao4","da2","zhong1","dian3","geng4","mei3","hao3"] +``` + +#### 其它 +9、[bytesize-icons](https://github.com/danklammer/bytesize-icons):极小、极简的 SVG 图标集合,[在线演示](http://danklammer.com/articles/svg-stroke-ftw/#give-it-a-spin)。 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/05/img/bytesize-icons-show-min.png) + +10、[gitignore](https://github.com/github/gitignore):各种 `gitignore` 模版,特别全,应该能找到你需要的。[什么是 gitignore 文件](http://gitbook.liuhui998.com/4_1.html)。 + +11、[Solve-App-Store-Review-Problem](https://github.com/wg689/Solve-App-Store-Review-Problem):App Store 审核未通过的解决方案。 + +12、[security-guide-for-developers](https://github.com/FallibleInc/security-guide-for-developers):这是一个 checklist,作为一个 real word web developer 你应该在实际工作中不断地谨慎使用这套列表,减少安全隐患。[中文翻译版](https://github.com/FallibleInc/security-guide-for-developers/blob/master/README-zh.md) diff --git a/05/img/bytesize-icons-show-min.png b/05/img/bytesize-icons-show-min.png new file mode 100644 index 00000000..49832919 Binary files /dev/null and b/05/img/bytesize-icons-show-min.png differ diff --git a/05/img/flask-bb-show-min.png b/05/img/flask-bb-show-min.png new file mode 100644 index 00000000..03404729 Binary files /dev/null and b/05/img/flask-bb-show-min.png differ diff --git a/05/img/gh-ost-general-flow-min.png b/05/img/gh-ost-general-flow-min.png new file mode 100644 index 00000000..71693a8d Binary files /dev/null and b/05/img/gh-ost-general-flow-min.png differ diff --git a/05/img/gogs-show-min.png b/05/img/gogs-show-min.png new file mode 100644 index 00000000..1a4a88ca Binary files /dev/null and b/05/img/gogs-show-min.png differ diff --git a/05/img/share-js-show-min.png b/05/img/share-js-show-min.png new file mode 100644 index 00000000..7bb47ef8 Binary files /dev/null and b/05/img/share-js-show-min.png differ diff --git a/05/img/superset-min.gif b/05/img/superset-min.gif new file mode 100644 index 00000000..63d75ff5 Binary files /dev/null and b/05/img/superset-min.gif differ diff --git a/06/HelloGitHub06.md b/06/HelloGitHub06.md new file mode 100644 index 00000000..b64a8b09 --- /dev/null +++ b/06/HelloGitHub06.md @@ -0,0 +1,130 @@ +# 《HelloGitHub》第 06 期 +>兴趣是最好的老师,[HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 就是帮你找到兴趣! + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) + +## 简介 +最开始我只是想把自己在浏览 [GitHub](https://github.com/) 过程中,发现的有意思、高质量、容易上手的项目收集起来,这样便于以后查找和学习。后来一想,如果给这些 GitHub 项目都加上简单的效果图和一些通俗易懂的中文介绍。应该能够帮助到我这样的新手激发兴趣去参与、学习这些优秀、好玩的开源项目。 + +所以,我就做了一个面向**编程新手**、**热爱编程**、**对开源社区感兴趣** 的人群的月刊,月刊的内容包括:**各种编程语言的项目**、**各种让生活变得更美好的工具**、**书籍、学习笔记、教程等**。这些项目都是非常容易上手,而且非常 Cool,主要是希望大家能动手用起来,加入到**开源社区**中。会编程的可以贡献代码,不会编程的可以反馈使用这些工具中的 Bug、帮着宣传你觉得优秀的项目、Star 项目⭐️。同时你将学习到更多编程知识、提高自己的编程技巧、发现自己的**兴趣**。 + +🎉 最后 [HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 这个项目就诞生了 🎉 + +--- +|**以下为本期内容**|每个月 28 号发布最新一期,首发在我的 [GitHub](https://github.com/521xueweihan) 上|[点击查看往期内容](https://github.com/521xueweihan/HelloGitHub#往期回顾)| + +#### Python 项目 +1、[Young](https://github.com/shiyanhui/Young):基于 Tornado 框架、MongoDB 数据库,写的功能丰富的社区项目。详细的[安装步骤](https://github.com/shiyanhui/Young/blob/master/README_CN.md),适合学习如何创建社区类 Web App。[在线预览](http://beyoung.io/),项目运行效果图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/06/img/young-show-min.png) + +2、[textfilter](https://github.com/observerss/textfilter):基于某 1w 词敏感词库,用 Python 实现几种不同的过滤方式。**用于过滤敏感词的实用模块**,示例代码: +```python +from filter import DFAFilter + +gfw = DFAFilter() +gfw.parse("keywords") +print "待过滤:售假人民币 我操操操" +print "过滤后:", gfw.filter("售假人民币 我操操操", "*") + +test_first_character() + +# 运行结果 +# 待过滤:售假人民币 我操操操 +# 过滤后: 售假**币 **** +``` + +3、[qrcode](https://github.com/sylnsfar/qrcode):Python 写的生成动态、彩色、各式各样的二维码,详细的[中文文档](https://github.com/sylnsfar/qrcode/blob/master/README-cn.md),通过 `qrcode` 生成的二维码样式如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/06/img/qrcode-show-min.png) + +#### Go 项目 +4、[wukong](https://github.com/huichen/wukong):悟空引擎,是一个高度可定制的全文搜索引擎,[为什么要有悟空引擎](https://github.com/huichen/wukong/blob/master/docs/why_wukong.md),[入门教程](https://github.com/huichen/wukong/blob/master/docs/codelab.md),这个项目的搜索引擎原理如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/06/img/wukong-show-min.png) + +#### Java 项目 +5、[moco](https://github.com/dreamhead/moco):开发过程中需要依赖一些接口,这些接口要么是搭建环境困难,要么是还没有实现,要么是交互比较复杂。这种情况下,使用 mock server 来 mock(模拟)这些接口,以便开发和测试能够正常进行,*感谢推荐人:[QA_imp](https://home.cnblogs.com/u/bu1tcat/)*。快速上手步骤: +``` +1. 下载 Moco:https://repo1.maven.org/maven2/com/github/dreamhead/moco-runner/0.11.0/moco-runner-0.11.0-standalone.jar + +2. 写需要返回的reponse数据格式如下: +[ + { + "response" : + { + "text" : "Hello, Moco" + } + } +] +(文件名:foo.json) + +3.运行 +java -jar moco-runner--standalone.jar http -p 12306 -c foo.json + +4. 访问 http://localhost:12306,你将会看到 “Hello, Moco” +``` + +6、[disconf](https://github.com/knightliao/disconf):**企业级开源项目 Disconf** 是一个分布式配置管理平台,专注于各种 *分布式系统配置管理* 的通用组件/通用平台,提供统一的配置管理服务。核心目标:一个 jar 包,到处运行。[在线文档](http://disconf.readthedocs.io/zh_CN/latest/index.html) + +#### C# 项目 +7、[Cowboy](https://github.com/gaochundong/Cowboy):Cowboy.WebSockets 是一个基于 .NET/C# 实现的开源 WebSocket 网络库,[详细介绍](http://www.cnblogs.com/gaochundong/p/cowboy_websockets.html) + +#### JavaScript 项目 +8、[vue-sui-demo](https://github.com/eteplus/vue-sui-demo):这是一个用 Vue 和 SUI-Mobile 写的移动端 Demo,可以用来学习 Vue.js。[项目线上预览](http://blog.coderfun.com/vue-sui-demo/),效果图如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/06/img/vue-sui-demo-show-min.png) + +9、[nodePPT](https://github.com/ksky521/nodePPT):这可能是迄今为止最好的网页版演示库,[在线演示](http://qdemo.sinaapp.com/) + +#### Swift 项目 +10、[12306ForMac](https://github.com/fancymax/12306ForMac):非官方的 12306 购票,Mac OS 客户端 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/06/img/12306ForMac-show-min.png) + +#### 其它 +11、[Apollo-11](https://github.com/chrislgarry/Apollo-11):阿波罗 11 号代码,[中文介绍](https://github.com/chrislgarry/Apollo-11/blob/master/README.zh_cn.md) + +12、[weapp-ide-crack](https://github.com/gavinkwoe/weapp-ide-crack):【应用号】IDE + 破解 + Demo + +13、[gvm](https://github.com/moovweb/gvm):Go 版本管理工具,可以通过命令,无痛切换不同的 Go 版本,示例指令: +``` +1. 安装gvm:bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) + +2. 根据提示,在shell配置中加入:source /PATH/.gvm/scripts/gvm + +3. 以下为常用命令: +gvm install go1.4 # 安装制定版本的GO +gvm use go1.4 # 使用制定版本的GO + +4. Mac下安装Go时如果出现错误,就安装依赖的库: +xcode-select --install +brew update +brew install mercurial + +5. 我在使用中发现的问题: +安装Go时没有进度条 +``` + +14、[hosts](https://github.com/racaljk/hosts):最新可用的 Google hosts 文件。 + +15、[LearningNotes](https://github.com/GeniusVJR/LearningNotes):很全面的学习笔记,偏向 Android 和 Java + + +--- + +## 声明 +如果你发现了好玩、有意义的开源项目,[点击这里](https://github.com/521xueweihan/HelloGitHub/issues/new) 分享你觉得有意思的项目。 + +- 分享项目格式:`项目名称——项目地址:项目描述(中文),追求完美👉项目上手 demo、截图` + +或许你分享的项目会让别人由衷的感慨:“原来还有这么有意思的项目!编程可以这么酷!” + +**欢迎转载,请注明出处和作者,同时保留声明和联系方式。** + +## 联系方式 +- [削微寒](https://github.com/521xueweihan) + +- [博客园](http://www.cnblogs.com/xueweihan/) + +- [知乎专栏](https://zhuanlan.zhihu.com/hellogithub) diff --git a/06/content06.md b/06/content06.md new file mode 100644 index 00000000..e4ef4424 --- /dev/null +++ b/06/content06.md @@ -0,0 +1,96 @@ +#### Python 项目 +1、[Young](https://github.com/shiyanhui/Young):基于 Tornado 框架、MongoDB 数据库,写的功能丰富的社区项目。详细的[安装步骤](https://github.com/shiyanhui/Young/blob/master/README_CN.md),适合学习如何创建社区类 Web App。[在线预览](http://beyoung.io/),项目运行效果图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/06/img/young-show-min.png) + +2、[textfilter](https://github.com/observerss/textfilter):基于某 1w 词敏感词库,用 Python 实现几种不同的过滤方式。**用于过滤敏感词的实用模块**,示例代码: +```python +from filter import DFAFilter + +gfw = DFAFilter() +gfw.parse("keywords") +print "待过滤:售假人民币 我操操操" +print "过滤后:", gfw.filter("售假人民币 我操操操", "*") + +test_first_character() + +# 运行结果 +# 待过滤:售假人民币 我操操操 +# 过滤后: 售假**币 **** +``` + +3、[qrcode](https://github.com/sylnsfar/qrcode):Python 写的生成动态、彩色、各式各样的二维码,详细的[中文文档](https://github.com/sylnsfar/qrcode/blob/master/README-cn.md),通过 `qrcode` 生成的二维码样式如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/06/img/qrcode-show-min.png) + +#### Go 项目 +4、[wukong](https://github.com/huichen/wukong):悟空引擎,是一个高度可定制的全文搜索引擎,[为什么要有悟空引擎](https://github.com/huichen/wukong/blob/master/docs/why_wukong.md),[入门教程](https://github.com/huichen/wukong/blob/master/docs/codelab.md),这个项目的搜索引擎原理如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/06/img/wukong-show-min.png) + +#### Java 项目 +5、[moco](https://github.com/dreamhead/moco):开发过程中需要依赖一些接口,这些接口要么是搭建环境困难,要么是还没有实现,要么是交互比较复杂。这种情况下,使用 mock server 来 mock(模拟)这些接口,以便开发和测试能够正常进行,*感谢推荐人:[QA_imp](https://home.cnblogs.com/u/bu1tcat/)*。快速上手步骤: +``` +1. 下载 Moco:https://repo1.maven.org/maven2/com/github/dreamhead/moco-runner/0.11.0/moco-runner-0.11.0-standalone.jar + +2. 写需要返回的reponse数据格式如下: +[ + { + "response" : + { + "text" : "Hello, Moco" + } + } +] +(文件名:foo.json) + +3.运行 +java -jar moco-runner--standalone.jar http -p 12306 -c foo.json + +4. 访问 http://localhost:12306,你将会看到 “Hello, Moco” +``` + +6、[disconf](https://github.com/knightliao/disconf):**企业级开源项目 Disconf** 是一个分布式配置管理平台,专注于各种 *分布式系统配置管理* 的通用组件/通用平台,提供统一的配置管理服务。核心目标:一个 jar 包,到处运行。[在线文档](http://disconf.readthedocs.io/zh_CN/latest/index.html) + +#### C# 项目 +7、[Cowboy](https://github.com/gaochundong/Cowboy):Cowboy.WebSockets 是一个基于 .NET/C# 实现的开源 WebSocket 网络库,[详细介绍](http://www.cnblogs.com/gaochundong/p/cowboy_websockets.html) + +#### JavaScript 项目 +8、[vue-sui-demo](https://github.com/eteplus/vue-sui-demo):这是一个用 Vue 和 SUI-Mobile 写的移动端 Demo,可以用来学习 Vue.js。[项目线上预览](http://blog.coderfun.com/vue-sui-demo/),效果图如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/06/img/vue-sui-demo-show-min.png) + +9、[nodePPT](https://github.com/ksky521/nodePPT):这可能是迄今为止最好的网页版演示库,[在线演示](http://qdemo.sinaapp.com/) + +#### Swift 项目 +10、[12306ForMac](https://github.com/fancymax/12306ForMac):非官方的 12306 购票,Mac OS 客户端 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/06/img/12306ForMac-show-min.png) + +#### 其它 +11、[Apollo-11](https://github.com/chrislgarry/Apollo-11):阿波罗 11 号代码,[中文介绍](https://github.com/chrislgarry/Apollo-11/blob/master/README.zh_cn.md) + +12、[weapp-ide-crack](https://github.com/gavinkwoe/weapp-ide-crack):【应用号】IDE + 破解 + Demo + +13、[gvm](https://github.com/moovweb/gvm):Go 版本管理工具,可以通过命令,无痛切换不同的 Go 版本,示例指令: +``` +1. 安装gvm:bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) + +2. 根据提示,在shell配置中加入:source /PATH/.gvm/scripts/gvm + +3. 以下为常用命令: +gvm install go1.4 # 安装制定版本的GO +gvm use go1.4 # 使用制定版本的GO + +4. Mac下安装Go时如果出现错误,就安装依赖的库: +xcode-select --install +brew update +brew install mercurial + +5. 我在使用中发现的问题: +安装Go时没有进度条 +``` + +14、[hosts](https://github.com/racaljk/hosts):最新可用的 Google hosts 文件。 + +15、[LearningNotes](https://github.com/GeniusVJR/LearningNotes):很全面的学习笔记,偏向 Android 和 Java diff --git a/06/img/12306ForMac-show-min.png b/06/img/12306ForMac-show-min.png new file mode 100644 index 00000000..6c6e9456 Binary files /dev/null and b/06/img/12306ForMac-show-min.png differ diff --git a/06/img/qrcode-show-min.png b/06/img/qrcode-show-min.png new file mode 100644 index 00000000..b5123619 Binary files /dev/null and b/06/img/qrcode-show-min.png differ diff --git a/06/img/vue-sui-demo-show-min.png b/06/img/vue-sui-demo-show-min.png new file mode 100644 index 00000000..e4a74bf4 Binary files /dev/null and b/06/img/vue-sui-demo-show-min.png differ diff --git a/06/img/wukong-show-min.png b/06/img/wukong-show-min.png new file mode 100644 index 00000000..16277091 Binary files /dev/null and b/06/img/wukong-show-min.png differ diff --git a/06/img/young-show-min.png b/06/img/young-show-min.png new file mode 100644 index 00000000..92e77bb9 Binary files /dev/null and b/06/img/young-show-min.png differ diff --git a/07/HelloGitHub07.md b/07/HelloGitHub07.md new file mode 100644 index 00000000..ea6425e9 --- /dev/null +++ b/07/HelloGitHub07.md @@ -0,0 +1,136 @@ +# 《HelloGitHub》第 07 期 +>兴趣是最好的老师,[HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 就是帮你找到兴趣! + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) + +## 简介 +最开始我只是想把自己在浏览 [GitHub](https://github.com/) 过程中,发现的有意思、高质量、容易上手的项目收集起来,这样便于以后查找和学习。后来一想,如果给这些 GitHub 项目都加上简单的效果图和一些通俗易懂的中文介绍。应该能够帮助到我这样的新手激发兴趣去参与、学习这些优秀、好玩的开源项目。 + +所以,我就做了一个面向**编程新手**、**热爱编程**、**对开源社区感兴趣** 的人群的月刊,月刊的内容包括:**各种编程语言的项目**、**各种让生活变得更美好的工具**、**书籍、学习笔记、教程等**。这些项目都是非常容易上手,而且非常 Cool,主要是希望大家能动手用起来,加入到**开源社区**中。会编程的可以贡献代码,不会编程的可以反馈使用这些工具中的 Bug、帮着宣传你觉得优秀的项目、Star 项目⭐️。同时你将学习到更多编程知识、提高自己的编程技巧、发现自己的**兴趣**。 + +🎉 最后 [HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 这个项目就诞生了 🎉 + +--- +|**以下为本期内容**|每个月 28 号发布最新一期,首发在我的 [GitHub](https://github.com/521xueweihan) 上|[点击查看往期内容](https://github.com/521xueweihan/HelloGitHub#往期回顾)| + +#### Python 项目 +1、[httpie](https://github.com/jkbrzt/httpie):非常好用的命令行 HTTP 客户端,cURL 的替代者,返回的结果支持**高亮**,提高了可读性。用于调试接口、查看服务器返回的 HTTP 协议的信息。[在线文档](https://httpie.org/docs#examples),下面的是 cURL 和 httpie 的返回结果对比图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/07/img/httpie-show-min.png) + +2、[langid](https://github.com/saffsd/langid.py):用于识别输入文本数据所属的语种,目前支持 97 种语言识别。*感谢推荐人:[zhbzz2007](https://github.com/zhbzz2007)*。示例代码: +```python +import langid +text1 = "I am a coder and love data mining" +text2 = "请注明作者和出处并保留声明和联系方式" + +print langid.classify(text1) +print langid.classify(text2) + +# ('en', 0.9999957874458753) +# ('zh', 1.0) +``` + +3、[fake-useragent](https://github.com/hellysmile/fake-useragent):伪装浏览器身份,常用于爬虫。这个项目的代码很少,可以阅读一下,看看 `ua.random` 是如何返回随机的浏览器身份的😁,示例代码: +```python +from fake_useragent import UserAgent +ua = UserAgent() + +ua.ie +# Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US); +ua.msie +# Mozilla/5.0 (compatible; MSIE 10.0; Macintosh; Intel Mac OS X 10_7_3; Trident/6.0)' +ua['Internet Explorer'] +# Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.4; InfoPath.2; SV1; .NET CLR 3.3.69573; WOW64; en-US) +ua.opera +# Opera/9.80 (X11; Linux i686; U; ru) Presto/2.8.131 Version/11.11 +ua.chrome +# Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1216.0 Safari/537.2' +ua.google +# Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1290.1 Safari/537.13 +ua['google chrome'] +# Mozilla/5.0 (X11; CrOS i686 2268.111.0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 +ua.firefox +# Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:16.0.1) Gecko/20121011 Firefox/16.0.1 +ua.ff +# Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0.1 +ua.safari +# Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25 + +# and the best one, random via real world browser usage statistic +ua.random +``` + +#### Go 项目 +4、[beego](https://github.com/astaxie/beego):一个使用 Go 的思维来帮助您构建并开发 Go 应用程序的开源框架,齐全的文档(中文),丰富的使用案例。[官网地址](https://beego.me) + +#### JavaScript 项目 +5、[nodeclub](https://github.com/cnodejs/nodeclub):Nodeclub 是使用 Node.js 和 MongoDB 开发的社区系统,[社区地址](http://cnodejs.org): + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/07/img/nodeclub-show-min.png) + +6、[clipboard](https://github.com/zenorocha/clipboard.js):实现了点击文本内容的 JavaScript 插件,优点:最新、极小、无任依赖、使用简单方便。[在线文档](https://clipboardjs.com) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/07/img/clipboard-show-min.png) + +#### C 项目 +7、[BaiduPCS](https://github.com/GangZhuo/BaiduPCS):C 写的百度网盘命令行工具,[在线文档](https://github.com/GangZhuo/BaiduPCS/wiki/BaiduPCS-基本使用) + +#### C++ 项目 +8、[cpr](https://github.com/whoshuu/cpr):C++ 版 `Request for human`,[在线文档](https://whoshuu.github.io/cpr/),示例代码: +```C++ +#include + +int main(int argc, char** argv) { + auto r = cpr::Get(cpr::Url{"https://api.github.com/repos/whoshuu/cpr/contributors"}, + cpr::Authentication{"user", "pass"}, + cpr::Parameters{{"anon", "true"}, {"key", "value"}}); + r.status_code; // 200 + r.header["content-type"]; // application/json; charset=utf-8 + r.text; // JSON text string +} +``` + +#### C# 项目 +9、[MongoCola](https://github.com/magicdict/MongoCola):MongoCola 是一个开源的 MongoDB 管理工具。持续开发、维护已经有**五年**了,[开发历程](http://www.cnblogs.com/TextEditor/p/5473190.html),效果图如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/07/img/mongocola-show-min.png) + +#### Objective-C 项目 +10、[PYPhotoBrowser](https://github.com/iphone5solo/PYPhotoBrowser):高仿 QQ、微信效果的图片浏览器(支持原图和缩略图、多种手势、CocoaPods),*感谢推荐人:[CoderKo1o](https://github.com/iphone5solo)* + +#### CSS 项目 +11、[cssicon](https://github.com/wentin/cssicon):纯 CSS 实现的 icon + +#### 开源书籍 +12、[build-web-application-with-golang](https://github.com/astaxie/build-web-application-with-golang/blob/master/zh/preface.md):《Go Web 编程》中文 + +#### 其它 +13、[google-interview-university](https://github.com/jwasham/google-interview-university):一套完整的学习手册帮助自己准备 Google 的面试,[中文翻译版](https://github.com/jwasham/coding-interview-university/blob/master/translations/README-cn.md) + +14、[learning-react](https://github.com/yiminghe/learning-react):[yiminghe](https://github.com/yiminghe) 的 react 中文教程,包含[入门](http://yiminghe.me/learning-react/tutorial/zh-cn/intro.html#/)和[进阶](http://yiminghe.me/learning-react/tutorial/zh-cn/advanced.html#/) + +15、[static](https://github.com/staticfile/static):这个项目是一个仓库,它尽可能全面收录优秀的开源库,并免费为之提供 CDN 加速服务,使之有更好的访问速度和稳定的环境。同时,它也提供开源库源接入的入口,让所有人都可以提交开源库,包括 JavaScript、CSS、image 和 swf 等静态文件。[访问 Staticfile CDN](http://staticfile.org) + +16、[WebFundamentals](https://github.com/google/WebFundamentals):(英文)Google 的 Web 开发者最佳练习教程 + +17、[How-to-Make-a-Computer-Operating-System](https://github.com/SamyPesse/How-to-Make-a-Computer-Operating-System):(英文)如何做一个操作系统[在线阅读](https://www.gitbook.com/book/samypesse/how-to-create-an-operating-system/details) + + +--- + +## 声明 +如果你发现了好玩、有意义的开源项目,[点击这里](https://github.com/521xueweihan/HelloGitHub/issues/new) 分享你觉得有意思的项目。 + +- 分享项目格式:`项目名称——项目地址:项目描述(中文),追求完美👉项目上手 demo、截图` + +或许你分享的项目会让别人由衷的感慨:“原来还有这么有意思的项目!编程可以这么酷!” + +**欢迎转载,请注明出处和作者,同时保留声明和联系方式。** + +## 联系方式 +- [削微寒](https://github.com/521xueweihan) + +- [博客园](http://www.cnblogs.com/xueweihan/) + +- [知乎专栏](https://zhuanlan.zhihu.com/hellogithub) diff --git a/07/content07.md b/07/content07.md new file mode 100644 index 00000000..32e988cd --- /dev/null +++ b/07/content07.md @@ -0,0 +1,102 @@ +#### Python 项目 +1、[httpie](https://github.com/jkbrzt/httpie):非常好用的命令行 HTTP 客户端,cURL 的替代者,返回的结果支持**高亮**,提高了可读性。用于调试接口、查看服务器返回的 HTTP 协议的信息。[在线文档](https://httpie.org/docs#examples),下面的是 cURL 和 httpie 的返回结果对比图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/07/img/httpie-show-min.png) + +2、[langid](https://github.com/saffsd/langid.py):用于识别输入文本数据所属的语种,目前支持 97 种语言识别。*感谢推荐人:[zhbzz2007](https://github.com/zhbzz2007)*。示例代码: +```python +import langid +text1 = "I am a coder and love data mining" +text2 = "请注明作者和出处并保留声明和联系方式" + +print langid.classify(text1) +print langid.classify(text2) + +# ('en', 0.9999957874458753) +# ('zh', 1.0) +``` + +3、[fake-useragent](https://github.com/hellysmile/fake-useragent):伪装浏览器身份,常用于爬虫。这个项目的代码很少,可以阅读一下,看看 `ua.random` 是如何返回随机的浏览器身份的😁,示例代码: +```python +from fake_useragent import UserAgent +ua = UserAgent() + +ua.ie +# Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US); +ua.msie +# Mozilla/5.0 (compatible; MSIE 10.0; Macintosh; Intel Mac OS X 10_7_3; Trident/6.0)' +ua['Internet Explorer'] +# Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.4; InfoPath.2; SV1; .NET CLR 3.3.69573; WOW64; en-US) +ua.opera +# Opera/9.80 (X11; Linux i686; U; ru) Presto/2.8.131 Version/11.11 +ua.chrome +# Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1216.0 Safari/537.2' +ua.google +# Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.13 (KHTML, like Gecko) Chrome/24.0.1290.1 Safari/537.13 +ua['google chrome'] +# Mozilla/5.0 (X11; CrOS i686 2268.111.0) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11 +ua.firefox +# Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:16.0.1) Gecko/20121011 Firefox/16.0.1 +ua.ff +# Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0.1 +ua.safari +# Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25 + +# and the best one, random via real world browser usage statistic +ua.random +``` + +#### Go 项目 +4、[beego](https://github.com/astaxie/beego):一个使用 Go 的思维来帮助您构建并开发 Go 应用程序的开源框架,齐全的文档(中文),丰富的使用案例。[官网地址](https://beego.me) + +#### JavaScript 项目 +5、[nodeclub](https://github.com/cnodejs/nodeclub):Nodeclub 是使用 Node.js 和 MongoDB 开发的社区系统,[社区地址](http://cnodejs.org): + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/07/img/nodeclub-show-min.png) + +6、[clipboard](https://github.com/zenorocha/clipboard.js):实现了点击文本内容的 JavaScript 插件,优点:最新、极小、无任依赖、使用简单方便。[在线文档](https://clipboardjs.com) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/07/img/clipboard-show-min.png) + +#### C 项目 +7、[BaiduPCS](https://github.com/GangZhuo/BaiduPCS):C 写的百度网盘命令行工具,[在线文档](https://github.com/GangZhuo/BaiduPCS/wiki/BaiduPCS-基本使用) + +#### C++ 项目 +8、[cpr](https://github.com/whoshuu/cpr):C++ 版 `Request for human`,[在线文档](https://whoshuu.github.io/cpr/),示例代码: +```C++ +#include + +int main(int argc, char** argv) { + auto r = cpr::Get(cpr::Url{"https://api.github.com/repos/whoshuu/cpr/contributors"}, + cpr::Authentication{"user", "pass"}, + cpr::Parameters{{"anon", "true"}, {"key", "value"}}); + r.status_code; // 200 + r.header["content-type"]; // application/json; charset=utf-8 + r.text; // JSON text string +} +``` + +#### C# 项目 +9、[MongoCola](https://github.com/magicdict/MongoCola):MongoCola 是一个开源的 MongoDB 管理工具。持续开发、维护已经有**五年**了,[开发历程](http://www.cnblogs.com/TextEditor/p/5473190.html),效果图如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/07/img/mongocola-show-min.png) + +#### Objective-C 项目 +10、[PYPhotoBrowser](https://github.com/iphone5solo/PYPhotoBrowser):高仿 QQ、微信效果的图片浏览器(支持原图和缩略图、多种手势、CocoaPods),*感谢推荐人:[CoderKo1o](https://github.com/iphone5solo)* + +#### CSS 项目 +11、[cssicon](https://github.com/wentin/cssicon):纯 CSS 实现的 icon + +#### 开源书籍 +12、[build-web-application-with-golang](https://github.com/astaxie/build-web-application-with-golang/blob/master/zh/preface.md):《Go Web 编程》中文 + +#### 其它 +13、[google-interview-university](https://github.com/jwasham/google-interview-university):一套完整的学习手册帮助自己准备 Google 的面试,[中文翻译版](https://github.com/jwasham/coding-interview-university/blob/master/translations/README-cn.md) + +14、[learning-react](https://github.com/yiminghe/learning-react):[yiminghe](https://github.com/yiminghe) 的 react 中文教程,包含[入门](http://yiminghe.me/learning-react/tutorial/zh-cn/intro.html#/)和[进阶](http://yiminghe.me/learning-react/tutorial/zh-cn/advanced.html#/) + +15、[static](https://github.com/staticfile/static):这个项目是一个仓库,它尽可能全面收录优秀的开源库,并免费为之提供 CDN 加速服务,使之有更好的访问速度和稳定的环境。同时,它也提供开源库源接入的入口,让所有人都可以提交开源库,包括 JavaScript、CSS、image 和 swf 等静态文件。[访问 Staticfile CDN](http://staticfile.org) + +16、[WebFundamentals](https://github.com/google/WebFundamentals):(英文)Google 的 Web 开发者最佳练习教程 + +17、[How-to-Make-a-Computer-Operating-System](https://github.com/SamyPesse/How-to-Make-a-Computer-Operating-System):(英文)如何做一个操作系统[在线阅读](https://www.gitbook.com/book/samypesse/how-to-create-an-operating-system/details) diff --git a/07/img/clipboard-show-min.png b/07/img/clipboard-show-min.png new file mode 100644 index 00000000..329d826e Binary files /dev/null and b/07/img/clipboard-show-min.png differ diff --git a/07/img/httpie-show-min.png b/07/img/httpie-show-min.png new file mode 100644 index 00000000..4befb771 Binary files /dev/null and b/07/img/httpie-show-min.png differ diff --git a/07/img/mongocola-show-min.png b/07/img/mongocola-show-min.png new file mode 100644 index 00000000..f4864cf2 Binary files /dev/null and b/07/img/mongocola-show-min.png differ diff --git a/07/img/nodeclub-show-min.png b/07/img/nodeclub-show-min.png new file mode 100644 index 00000000..df5f92e8 Binary files /dev/null and b/07/img/nodeclub-show-min.png differ diff --git a/08/HelloGitHub08.md b/08/HelloGitHub08.md new file mode 100644 index 00000000..c63d140d --- /dev/null +++ b/08/HelloGitHub08.md @@ -0,0 +1,195 @@ +# 《HelloGitHub》第 08 期 +>兴趣是最好的老师,[HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 就是帮你找到兴趣! + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) + +## 简介 +最开始我只是想把自己在浏览 [GitHub](https://github.com/) 过程中,发现的有意思、高质量、容易上手的项目收集起来,这样便于以后查找和学习。后来一想,如果给这些 GitHub 项目都加上简单的效果图和一些通俗易懂的中文介绍。应该能够帮助到我这样的新手激发兴趣去参与、学习这些优秀、好玩的开源项目。 + +所以,我就做了一个面向**编程新手**、**热爱编程**、**对开源社区感兴趣** 的人群的月刊,月刊的内容包括:**各种编程语言的项目**、**各种让生活变得更美好的工具**、**书籍、学习笔记、教程等**。这些项目都是非常容易上手,而且非常 Cool,主要是希望大家能动手用起来,加入到**开源社区**中。会编程的可以贡献代码,不会编程的可以反馈使用这些工具中的 Bug、帮着宣传你觉得优秀的项目、Star 项目⭐️。同时你将学习到更多编程知识、提高自己的编程技巧、发现自己的**兴趣**。 + +🎉 最后 [HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 这个项目就诞生了 🎉 + +--- +|**以下为本期内容**|每个月 28 号发布最新一期,首发在我的 [GitHub](https://github.com/521xueweihan) 上|[点击查看往期内容](https://github.com/521xueweihan/HelloGitHub#往期回顾)| + +#### Python 项目 +1、[reddit](https://github.com/reddit/reddit):[reddit.com](https://www.reddit.com/) 网站的源码,通过这个项目,可以学习 Python 在构建大型项目中的使用、项目结构、代码风格、Python 技巧的使用方法等。[安装教程](https://github.com/reddit/reddit/wiki/Install-guide) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/08/img/reddit-show-min.jpg) + +2、[httpstat](https://github.com/reorx/httpstat):httpstat 美化了 `curl` 的结果,使得结果更加可读。同时它无依赖、兼容 Python3、一共才 300 多行。还可以显示 HTTP 请求的每个过程中消耗的时间,如下图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/08/img/httpstat-show-min.png) + +3、[PyMySQL](https://github.com/PyMySQL/PyMySQL):纯 Pyton 写的 MySQL 库,纯 Python 的好处就是可以运行在任何装有 Python 解释器(CPython、PyPy、IronPython)的平台上。相对于 [MySQLdb](https://github.com/farcepest/MySQLdb1) 性能几乎一样,使用方法也一样,但是 **PyMySQL 安装方法极其简单**——`pip install PyMySQL`,PyMySQL 使用示例代码: +``` +# 下面为例子需要的数据库的建表语句 +CREATE TABLE `users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `email` varchar(255) COLLATE utf8_bin NOT NULL, + `password` varchar(255) COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin +AUTO_INCREMENT=1 ; +``` + +```python +# -*- coding: utf-8 -*- +import pymysql.cursors + +# 连接数据库 +connection = pymysql.connect(host='localhost', + user='user', + password='passwd', + db='db', + charset='utf8mb4', + cursorclass=pymysql.cursors.DictCursor) + +try: + with connection.cursor() as cursor: + # 创建一个新的纪录(record) + sql = "INSERT INTO `users` (`email`, `password`) VALUES (%s, %s)" + cursor.execute(sql, ('webmaster@python.org', 'very-secret')) + + # 连接不会自动提交,所以你想下面要调用 commit 方法,存储对数据库的改动 + connection.commit() + + with connection.cursor() as cursor: + sql = "SELECT `id`, `password` FROM `users` WHERE `email`=%s" + cursor.execute(sql, ('webmaster@python.org',)) + + # 获取一条的纪录(record) + result = cursor.fetchone() + print(result) # 结果输出:{'password': 'very-secret', 'id': 1} +finally: + connection.close() # 操作完数据库一要记得调用 close 方法,关闭连接 +``` + +#### Go 项目 +4、[kcptun](https://github.com/xtaci/kcptun):也许是世界上最快的 UDP 传输工具,支持 macOS/Linux/Windows/FreeBSD/ARM/Raspberry Pi/OpenWrt。 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/08/img/kcptun-show-min.png) + +#### Ruby 项目 +5、[discourse](https://github.com/discourse/discourse):Ruby 语言写的论坛,百分之百开源、免费。 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/08/img/discourse-show-min.png) + +#### JavaScript 项目 +6、[WeFlow](https://github.com/weixin/WeFlow):微信出品的一个高效、强大、跨平台的 Web 前端开发工作流工具,[官网](https://weflow.io/): + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/08/img/weflow-show-min.jpeg) + +7、[atrament.js](https://github.com/jakubfiala/atrament.js):极小的 JavaScript 画板,[在线演示](http://fiala.uk/atrament.js/demo/) + +#### C++ 项目 +8、[libco](https://github.com/Tencent/libco):腾讯的开源项目——libco 是微信后台大规模使用的 C/C++ 协程库,2013 年至今稳定运行在微信后台的数万台机器上。 +- 无需侵入业务逻辑,把多进程、多线程服务改造成协程服务,并发能力得到百倍提升 +- 支持 CGI 框架,轻松构建 Web 服务 +- 支持 gethostbyname、mysqlclient、ssl 等常用第三方库 +- 可选的共享栈模式,单机轻松接入千万连接 +- 完善简洁的协程编程接口 + - 类 pthread 接口设计,通过 co_create、co_resume 等简单清晰接口即可完成协程的创建与恢复 + - \_\_thread 的协程私有变量、协程间通信的协程信号量 co_signal + - 语言级别的 lambda 实现,结合协程原地编写并执行后台异步任务 + - 基于 epoll/kqueue 实现的小而轻的网络框架,基于时间轮盘实现的高性能定时器 + +#### C# 项目 +9、[Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json):Newtonsoft.Json 是一款 .NET 平台中开源的 JSON 序列化和反序列化类库,示例代码: +```C# +public class Account +{ + public string Email { get; set; } + public bool Active { get; set; } + public DateTime CreatedDate { get; set; } + public IList Roles { get; set; } +} + +Account account = new Account +{ + Email = "james@example.com", + Active = true, + CreatedDate = new DateTime(2013, 1, 20, 0, 0, 0, ateTimeKind.Utc), + Roles = new List + { + "User", + "Admin" + } +}; + +string json = JsonConvert.SerializeObject(account, Formatting.Indented); +// { +// "Email": "james@example.com", +// "Active": true, +// "CreatedDate": "2013-01-20T00:00:00Z", +// "Roles": [ +// "User", +// "Admin" +// ] +// } + +Console.WriteLine(json); +``` + +#### Objective-C 项目 +10、[aria2gui](https://github.com/yangshun1029/aria2gui):Aria2 的 Mac 客户端(下载工具),[介绍、使用方法](http://www.jianshu.com/p/1290f8e7b326),特点: +- 集成了 aria2,运行后即完成配置工作 +- 多线程下载 +- 未完成任务退出可以自动保存 +- 支持迅雷离线,百度、115、360 等网盘的 aria2 导出(需要浏览器插件支持) +- 支持 PT/BT,BT 速度跟种子热度有关,如果没有速度网盘离线后再下载 +- 在 Badge 显示整体下载速度 +- 任务完成通知 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/08/img/aria2gui-show-min.png) + +#### Java 项目 +11、[AndroidUtilCode](https://github.com/Blankj/AndroidUtilCode):Android 开发人员不得不收集的代码,[中文介绍](https://github.com/Blankj/AndroidUtilCode/blob/master/README-CN.md) + +12、[DanmakuFlameMaster](https://github.com/Bilibili/DanmakuFlameMaster):Bilibili 开源的,Android 开源弹幕引擎·烈焰弹幕使,特性: +- 使用多种方式(View/SurfaceView/TextureView)实现高效绘制 +- 该站 XML 弹幕格式解析 +- 基础弹幕精确还原绘制 +- 支持 mode7 特殊弹幕 +- 多核机型优化,高效的预缓存机制 +- 支持多种显示效果选项实时切换 +- 实时弹幕显示支持 +- 换行弹幕支持/运动弹幕支持 +- 支持自定义字体 +- 支持多种弹幕参数设置 +- 支持多种方式的弹幕屏蔽 + +#### 其它 +13、[How-To-Ask-Questions-The-Smart-Way](https://github.com/FredWe/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md):提问的智慧,提出一个好的问题是解决问题的关键 + +14、[jstraining](https://github.com/ruanyf/jstraining):阮一峰写的全栈工程师培训材料 + +15、[PTVS](https://github.com/Microsoft/PTVS):Visual Studio 下的 Python 开发插件 + +16、[the-swift-programming-language-in-chinese](https://github.com/numbbbbb/the-swift-programming-language-in-chinese):中文版 Apple 官方 Swift 教程《The Swift Programming Language》 + +17、[styleguide](https://github.com/fex-team/styleguide):百度前端研发团队的文档与源码编写风格 + +18、[weex](https://github.com/alibaba/weex):移动端,跨平台前端框架,[详细的中文档](https://github.com/weexteam/article/wiki/Weex中文文档) + +19、[macOS-Security-and-Privacy-Guide](https://github.com/drduh/macOS-Security-and-Privacy-Guide):MacOS 的安全和隐私指南,[中文翻译版](https://github.com/xitu/macOS-Security-and-Privacy-Guide/blob/master/README-cn.md) + + +--- + +## 声明 +如果你发现了好玩、有意义的开源项目,[点击这里](https://github.com/521xueweihan/HelloGitHub/issues/new) 分享你觉得有意思的项目。 + +- 分享项目格式:`项目名称——项目地址:项目描述(中文),追求完美👉项目上手 demo、截图` + +或许你分享的项目会让别人由衷的感慨:“原来还有这么有意思的项目!编程可以这么酷!” + +**欢迎转载,请注明出处和作者,同时保留声明和联系方式。** + +## 联系方式 +- [削微寒](https://github.com/521xueweihan) + +- [博客园](http://www.cnblogs.com/xueweihan/) + +- [知乎专栏](https://zhuanlan.zhihu.com/hellogithub) diff --git a/08/content08.md b/08/content08.md new file mode 100644 index 00000000..77849c09 --- /dev/null +++ b/08/content08.md @@ -0,0 +1,161 @@ +#### Python 项目 +1、[reddit](https://github.com/reddit/reddit):[reddit.com](https://www.reddit.com/) 网站的源码,通过这个项目,可以学习 Python 在构建大型项目中的使用、项目结构、代码风格、Python 技巧的使用方法等。[安装教程](https://github.com/reddit/reddit/wiki/Install-guide) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/08/img/reddit-show-min.jpg) + +2、[httpstat](https://github.com/reorx/httpstat):httpstat 美化了 `curl` 的结果,使得结果更加可读。同时它无依赖、兼容 Python3、一共才 300 多行。还可以显示 HTTP 请求的每个过程中消耗的时间,如下图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/08/img/httpstat-show-min.png) + +3、[PyMySQL](https://github.com/PyMySQL/PyMySQL):纯 Pyton 写的 MySQL 库,纯 Python 的好处就是可以运行在任何装有 Python 解释器(CPython、PyPy、IronPython)的平台上。相对于 [MySQLdb](https://github.com/farcepest/MySQLdb1) 性能几乎一样,使用方法也一样,但是 **PyMySQL 安装方法极其简单**——`pip install PyMySQL`,PyMySQL 使用示例代码: +``` +# 下面为例子需要的数据库的建表语句 +CREATE TABLE `users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `email` varchar(255) COLLATE utf8_bin NOT NULL, + `password` varchar(255) COLLATE utf8_bin NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin +AUTO_INCREMENT=1 ; +``` + +```python +# -*- coding: utf-8 -*- +import pymysql.cursors + +# 连接数据库 +connection = pymysql.connect(host='localhost', + user='user', + password='passwd', + db='db', + charset='utf8mb4', + cursorclass=pymysql.cursors.DictCursor) + +try: + with connection.cursor() as cursor: + # 创建一个新的纪录(record) + sql = "INSERT INTO `users` (`email`, `password`) VALUES (%s, %s)" + cursor.execute(sql, ('webmaster@python.org', 'very-secret')) + + # 连接不会自动提交,所以你想下面要调用 commit 方法,存储对数据库的改动 + connection.commit() + + with connection.cursor() as cursor: + sql = "SELECT `id`, `password` FROM `users` WHERE `email`=%s" + cursor.execute(sql, ('webmaster@python.org',)) + + # 获取一条的纪录(record) + result = cursor.fetchone() + print(result) # 结果输出:{'password': 'very-secret', 'id': 1} +finally: + connection.close() # 操作完数据库一要记得调用 close 方法,关闭连接 +``` + +#### Go 项目 +4、[kcptun](https://github.com/xtaci/kcptun):也许是世界上最快的 UDP 传输工具,支持 macOS/Linux/Windows/FreeBSD/ARM/Raspberry Pi/OpenWrt。 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/08/img/kcptun-show-min.png) + +#### Ruby 项目 +5、[discourse](https://github.com/discourse/discourse):Ruby 语言写的论坛,百分之百开源、免费。 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/08/img/discourse-show-min.png) + +#### JavaScript 项目 +6、[WeFlow](https://github.com/weixin/WeFlow):微信出品的一个高效、强大、跨平台的 Web 前端开发工作流工具,[官网](https://weflow.io/): + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/08/img/weflow-show-min.jpeg) + +7、[atrament.js](https://github.com/jakubfiala/atrament.js):极小的 JavaScript 画板,[在线演示](http://fiala.uk/atrament.js/demo/) + +#### C++ 项目 +8、[libco](https://github.com/Tencent/libco):腾讯的开源项目——libco 是微信后台大规模使用的 C/C++ 协程库,2013 年至今稳定运行在微信后台的数万台机器上。 +- 无需侵入业务逻辑,把多进程、多线程服务改造成协程服务,并发能力得到百倍提升 +- 支持 CGI 框架,轻松构建 Web 服务 +- 支持 gethostbyname、mysqlclient、ssl 等常用第三方库 +- 可选的共享栈模式,单机轻松接入千万连接 +- 完善简洁的协程编程接口 + - 类 pthread 接口设计,通过 co_create、co_resume 等简单清晰接口即可完成协程的创建与恢复 + - \_\_thread 的协程私有变量、协程间通信的协程信号量 co_signal + - 语言级别的 lambda 实现,结合协程原地编写并执行后台异步任务 + - 基于 epoll/kqueue 实现的小而轻的网络框架,基于时间轮盘实现的高性能定时器 + +#### C# 项目 +9、[Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json):Newtonsoft.Json 是一款 .NET 平台中开源的 JSON 序列化和反序列化类库,示例代码: +```C# +public class Account +{ + public string Email { get; set; } + public bool Active { get; set; } + public DateTime CreatedDate { get; set; } + public IList Roles { get; set; } +} + +Account account = new Account +{ + Email = "james@example.com", + Active = true, + CreatedDate = new DateTime(2013, 1, 20, 0, 0, 0, ateTimeKind.Utc), + Roles = new List + { + "User", + "Admin" + } +}; + +string json = JsonConvert.SerializeObject(account, Formatting.Indented); +// { +// "Email": "james@example.com", +// "Active": true, +// "CreatedDate": "2013-01-20T00:00:00Z", +// "Roles": [ +// "User", +// "Admin" +// ] +// } + +Console.WriteLine(json); +``` + +#### Objective-C 项目 +10、[aria2gui](https://github.com/yangshun1029/aria2gui):Aria2 的 Mac 客户端(下载工具),[介绍、使用方法](http://www.jianshu.com/p/1290f8e7b326),特点: +- 集成了 aria2,运行后即完成配置工作 +- 多线程下载 +- 未完成任务退出可以自动保存 +- 支持迅雷离线,百度、115、360 等网盘的 aria2 导出(需要浏览器插件支持) +- 支持 PT/BT,BT 速度跟种子热度有关,如果没有速度网盘离线后再下载 +- 在 Badge 显示整体下载速度 +- 任务完成通知 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/08/img/aria2gui-show-min.png) + +#### Java 项目 +11、[AndroidUtilCode](https://github.com/Blankj/AndroidUtilCode):Android 开发人员不得不收集的代码,[中文介绍](https://github.com/Blankj/AndroidUtilCode/blob/master/README-CN.md) + +12、[DanmakuFlameMaster](https://github.com/Bilibili/DanmakuFlameMaster):Bilibili 开源的,Android 开源弹幕引擎·烈焰弹幕使,特性: +- 使用多种方式(View/SurfaceView/TextureView)实现高效绘制 +- 该站 XML 弹幕格式解析 +- 基础弹幕精确还原绘制 +- 支持 mode7 特殊弹幕 +- 多核机型优化,高效的预缓存机制 +- 支持多种显示效果选项实时切换 +- 实时弹幕显示支持 +- 换行弹幕支持/运动弹幕支持 +- 支持自定义字体 +- 支持多种弹幕参数设置 +- 支持多种方式的弹幕屏蔽 + +#### 其它 +13、[How-To-Ask-Questions-The-Smart-Way](https://github.com/FredWe/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md):提问的智慧,提出一个好的问题是解决问题的关键 + +14、[jstraining](https://github.com/ruanyf/jstraining):阮一峰写的全栈工程师培训材料 + +15、[PTVS](https://github.com/Microsoft/PTVS):Visual Studio 下的 Python 开发插件 + +16、[the-swift-programming-language-in-chinese](https://github.com/numbbbbb/the-swift-programming-language-in-chinese):中文版 Apple 官方 Swift 教程《The Swift Programming Language》 + +17、[styleguide](https://github.com/fex-team/styleguide):百度前端研发团队的文档与源码编写风格 + +18、[weex](https://github.com/alibaba/weex):移动端,跨平台前端框架,[详细的中文档](https://github.com/weexteam/article/wiki/Weex中文文档) + +19、[macOS-Security-and-Privacy-Guide](https://github.com/drduh/macOS-Security-and-Privacy-Guide):MacOS 的安全和隐私指南,[中文翻译版](https://github.com/xitu/macOS-Security-and-Privacy-Guide/blob/master/README-cn.md) diff --git a/08/img/aria2gui-show-min.png b/08/img/aria2gui-show-min.png new file mode 100644 index 00000000..96f3c703 Binary files /dev/null and b/08/img/aria2gui-show-min.png differ diff --git a/08/img/discourse-show-min.png b/08/img/discourse-show-min.png new file mode 100644 index 00000000..74ab26f1 Binary files /dev/null and b/08/img/discourse-show-min.png differ diff --git a/08/img/httpstat-show-min.png b/08/img/httpstat-show-min.png new file mode 100644 index 00000000..3a93fc32 Binary files /dev/null and b/08/img/httpstat-show-min.png differ diff --git a/08/img/kcptun-show-min.png b/08/img/kcptun-show-min.png new file mode 100644 index 00000000..d724d744 Binary files /dev/null and b/08/img/kcptun-show-min.png differ diff --git a/08/img/reddit-show-min.jpg b/08/img/reddit-show-min.jpg new file mode 100644 index 00000000..42a287f0 Binary files /dev/null and b/08/img/reddit-show-min.jpg differ diff --git a/08/img/weflow-show-min.jpeg b/08/img/weflow-show-min.jpeg new file mode 100644 index 00000000..7b18241b Binary files /dev/null and b/08/img/weflow-show-min.jpeg differ diff --git a/09/HelloGitHub09.md b/09/HelloGitHub09.md new file mode 100644 index 00000000..bb286825 --- /dev/null +++ b/09/HelloGitHub09.md @@ -0,0 +1,130 @@ +# 《HelloGitHub》第 09 期 +>兴趣是最好的老师,[HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 就是帮你找到兴趣! + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) + +## 简介 +最开始我只是想把自己在浏览 [GitHub](https://github.com/) 过程中,发现的有意思、高质量、容易上手的项目收集起来,这样便于以后查找和学习。后来一想,如果给这些 GitHub 项目都加上简单的效果图和一些通俗易懂的中文介绍。应该能够帮助到我这样的新手激发兴趣去参与、学习这些优秀、好玩的开源项目。 + +所以,我就做了一个面向**编程新手**、**热爱编程**、**对开源社区感兴趣** 的人群的月刊,月刊的内容包括:**各种编程语言的项目**、**各种让生活变得更美好的工具**、**书籍、学习笔记、教程等**。这些项目都是非常容易上手,而且非常 Cool,主要是希望大家能动手用起来,加入到**开源社区**中。会编程的可以贡献代码,不会编程的可以反馈使用这些工具中的 Bug、帮着宣传你觉得优秀的项目、Star 项目⭐️。同时你将学习到更多编程知识、提高自己的编程技巧、发现自己的**兴趣**。 + +🎉 最后 [HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 这个项目就诞生了 🎉 + +--- +|**以下为本期内容**|每个月 28 号发布最新一期,首发在我的 [GitHub](https://github.com/521xueweihan) 上|[点击查看往期内容](https://github.com/521xueweihan/HelloGitHub#往期回顾)| + +#### Python 项目 +1、[flask-limiter](https://github.com/alisaifee/flask-limiter):Flask-Limiter 是一个 Flask 的扩展库,它可以根据访问者的 IP 限制其访问频率、次数等,示例代码如下: +```python +from flask import Flask +from flask_limiter import Limiter +from flask_limiter.util import get_remote_address + +app = Flask(__name__) +limiter = Limiter( + app, + key_func=get_remote_address, + global_limits=["2 per minute", "1 per second"], +) + +@app.route("/slow") +@limiter.limit("1 per day") +def slow(): + return "24" + +@app.route("/fast") +def fast(): + return "42" + +@app.route("/ping") +@limiter.exempt +def ping(): + return 'PONG' + +app.run() +``` + +2、[ngrok](https://github.com/inconshreveable/ngrok):ngrok 是一个十分方便、好用的工具,它可以把本地某个端口的服务,通过一个安全隧道,映射到公网的一个地址。同时它提供了一个 Web 页面,展示了每个请求、响应的所有信息,便于调试本地的程序。基本的使用方法如下: +``` +ngrok 协议 本地服务监听的端口 +ngrok http 8000 + +创建成功会返回公网地址,然后通过该地址就可以访问到本地的服务。 +本地访问 http://localhost:4040,就可以查看关于每个请求、响应的相关数据 +``` + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/09/img/ngrok-show-min.png) + +3、[glances](https://github.com/nicolargo/glances):Glances 是一个可以让你**一目了然**你的系统情况(类 top、htop)的工具,它界面友好,安装方便:`pip install glances` + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/09/img/glances-show-min.png) + +#### Go 项目 +4、[lantern](https://github.com/getlantern/lantern):Lantern ——> 蓝灯 + +#### PHP 项目 +5、[VulApps](https://github.com/Medicean/VulApps):VulApps 是用于快速搭建各种漏洞环境,可用来学习、理解常见的漏洞,增强自己在开发过程的安全意识 + +#### JavaScript 项目 +6、[vue-hackernews-2.0](https://github.com/vuejs/vue-hackernews-2.0):这是一个 Vue2.0 示例,克隆 [Hacker News]((https://news.ycombinator.com/)) 网站(我感觉比原站好看多了😅) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/09/img/vue-hackernews-show-min.png) + +7、[N-blog](https://github.com/nswbmw/N-blog):N-blog 项目是面向新手的 Node.js 教程,该教程讲述了 Node.js 基本知识点,同时结合搭建一个多人博客的实战,从零基础到实际开发,由浅到深帮助新手入门 Node.js 这门语言 + +8、[pomelo](https://github.com/NetEase/pomelo):Pomelo 网易开源的一个 Node.js 游戏服务器框架,[Demo](http://pomelo.netease.com/demo.html) + +#### C++ 项目 +9、[json](https://github.com/nlohmann/json):C++ 的 JSON 库 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/09/img/json-show.gif) + +#### 机器学习 +10、[machine-learning-for-software-engineers](https://github.com/ZuzooVn/machine-learning-for-software-engineers):自上而下的学习路线,软件工程师的机器学习,[中文版](https://github.com/ZuzooVn/machine-learning-for-software-engineers/blob/master/README-zh-CN.md) + +#### Swift 项目 +11、[Kingfisher](https://github.com/onevcat/Kingfisher):Kingfisher 是一个异步下载和缓存图片的库,你可以把它看做 SDWebImage 的纯 Swift 实现和替代。它可以帮助简单地实现像是用户头像或者 table view 里面的图片的下载和缓存这样的工作,以提高 app 速度和帮助开发者节省时间,[作者的中文博客](http://project.onevcat.com/) + +#### Java 项目 +12、[MSEC](https://github.com/Tencent/MSEC):MSEC 是腾讯开源的,毫秒服务引擎(Mass Service Engine in Cluster) +它是一个开源框架,适用于在廉价机器组成的集群上开发和运营分布式后台服务。毫秒服务引擎集 RPC、名字发现服务、负载均衡、业务监控、灰度发布、容量管理、日志管理、key-value 存储于一体,[官网介绍](http://haomiao.qq.com/index.html#documents) + +#### Android 项目 +13、[android](https://github.com/SmartisanTech/android):锤子开源的 One Step 项目,一步(one step)是通过拖拽完成将信息发送至应用或联系人的动作,节省了在不同应用之间切换的诸多步骤,第一次打通了手持设备中应用间的边界,[One Step](http://www.smartisan.com/m1/#/os?section=onestep) + +14、[android-open-project](https://github.com/Trinea/android-open-project):Android 开源项目分类汇总 + +#### 开源书籍 +15、[the-way-to-go_ZH_CN](https://github.com/Unknwon/the-way-to-go_ZH_CN):《The Way to Go》中文译本,中文正式名《Go 入门指南》 + +#### 其它 +16、[freecodecamp.cn](https://github.com/FreeCodeCampChina/freecodecamp.cn):freecodecamp 是一个自由的开源编程社区,[freecodecamp 中文社区](https://freecodecamp.cn) + +17、[Web-Frontend-Introduction-And-Best-Practicesa](https://github.com/wxyyxc1992/Web-Frontend-Introduction-And-Engineering-Practices):Web 前端开发入门与实践练习 + +18、[best-chinese-front-end-blogs](https://github.com/FrankFang/best-chinese-front-end-blogs):该项目是收集优质的中文前端博客 + +19、[golang-open-source-projects](https://github.com/hackstoic/golang-open-source-projects):中文版 awesome-go + +20、[Learn-Algorithms](https://github.com/nonstriater/Learn-Algorithms):算法数据结构学习,C 语言实现 + +21、[FromXToGo](https://github.com/golang/go/wiki/FromXToGo):(英文)如果你正从某个语言(PHP, Python, Ruby 等)想要换到 Golang 却又害怕吗? + + +--- + +## 声明 +如果你发现了好玩、有意义的开源项目,[点击这里](https://github.com/521xueweihan/HelloGitHub/issues/new) 分享你觉得有意思的项目。 + +- 分享项目格式:`项目名称——项目地址:项目描述(中文),追求完美👉项目上手 demo、截图` + +或许你分享的项目会让别人由衷的感慨:“原来还有这么有意思的项目!编程可以这么酷!” + +**欢迎转载,请注明出处和作者,同时保留声明和联系方式。** + +## 联系方式 +- [削微寒](https://github.com/521xueweihan) + +- [博客园](http://www.cnblogs.com/xueweihan/) + +- [知乎专栏](https://zhuanlan.zhihu.com/hellogithub) diff --git a/09/content09.md b/09/content09.md new file mode 100644 index 00000000..a9221ad4 --- /dev/null +++ b/09/content09.md @@ -0,0 +1,96 @@ +#### Python 项目 +1、[flask-limiter](https://github.com/alisaifee/flask-limiter):Flask-Limiter 是一个 Flask 的扩展库,它可以根据访问者的 IP 限制其访问频率、次数等,示例代码如下: +```python +from flask import Flask +from flask_limiter import Limiter +from flask_limiter.util import get_remote_address + +app = Flask(__name__) +limiter = Limiter( + app, + key_func=get_remote_address, + global_limits=["2 per minute", "1 per second"], +) + +@app.route("/slow") +@limiter.limit("1 per day") +def slow(): + return "24" + +@app.route("/fast") +def fast(): + return "42" + +@app.route("/ping") +@limiter.exempt +def ping(): + return 'PONG' + +app.run() +``` + +2、[ngrok](https://github.com/inconshreveable/ngrok):ngrok 是一个十分方便、好用的工具,它可以把本地某个端口的服务,通过一个安全隧道,映射到公网的一个地址。同时它提供了一个 Web 页面,展示了每个请求、响应的所有信息,便于调试本地的程序。基本的使用方法如下: +``` +ngrok 协议 本地服务监听的端口 +ngrok http 8000 + +创建成功会返回公网地址,然后通过该地址就可以访问到本地的服务。 +本地访问 http://localhost:4040,就可以查看关于每个请求、响应的相关数据 +``` + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/09/img/ngrok-show-min.png) + +3、[glances](https://github.com/nicolargo/glances):Glances 是一个可以让你**一目了然**你的系统情况(类 top、htop)的工具,它界面友好,安装方便:`pip install glances` + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/09/img/glances-show-min.png) + +#### Go 项目 +4、[lantern](https://github.com/getlantern/lantern):Lantern ——> 蓝灯 + +#### PHP 项目 +5、[VulApps](https://github.com/Medicean/VulApps):VulApps 是用于快速搭建各种漏洞环境,可用来学习、理解常见的漏洞,增强自己在开发过程的安全意识 + +#### JavaScript 项目 +6、[vue-hackernews-2.0](https://github.com/vuejs/vue-hackernews-2.0):这是一个 Vue2.0 示例,克隆 [Hacker News]((https://news.ycombinator.com/)) 网站(我感觉比原站好看多了😅) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/09/img/vue-hackernews-show-min.png) + +7、[N-blog](https://github.com/nswbmw/N-blog):N-blog 项目是面向新手的 Node.js 教程,该教程讲述了 Node.js 基本知识点,同时结合搭建一个多人博客的实战,从零基础到实际开发,由浅到深帮助新手入门 Node.js 这门语言 + +8、[pomelo](https://github.com/NetEase/pomelo):Pomelo 网易开源的一个 Node.js 游戏服务器框架,[Demo](http://pomelo.netease.com/demo.html) + +#### C++ 项目 +9、[json](https://github.com/nlohmann/json):C++ 的 JSON 库 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/09/img/json-show.gif) + +#### 机器学习 +10、[machine-learning-for-software-engineers](https://github.com/ZuzooVn/machine-learning-for-software-engineers):自上而下的学习路线,软件工程师的机器学习,[中文版](https://github.com/ZuzooVn/machine-learning-for-software-engineers/blob/master/README-zh-CN.md) + +#### Swift 项目 +11、[Kingfisher](https://github.com/onevcat/Kingfisher):Kingfisher 是一个异步下载和缓存图片的库,你可以把它看做 SDWebImage 的纯 Swift 实现和替代。它可以帮助简单地实现像是用户头像或者 table view 里面的图片的下载和缓存这样的工作,以提高 app 速度和帮助开发者节省时间,[作者的中文博客](http://project.onevcat.com/) + +#### Java 项目 +12、[MSEC](https://github.com/Tencent/MSEC):MSEC 是腾讯开源的,毫秒服务引擎(Mass Service Engine in Cluster) +它是一个开源框架,适用于在廉价机器组成的集群上开发和运营分布式后台服务。毫秒服务引擎集 RPC、名字发现服务、负载均衡、业务监控、灰度发布、容量管理、日志管理、key-value 存储于一体,[官网介绍](http://haomiao.qq.com/index.html#documents) + +#### Android 项目 +13、[android](https://github.com/SmartisanTech/android):锤子开源的 One Step 项目,一步(one step)是通过拖拽完成将信息发送至应用或联系人的动作,节省了在不同应用之间切换的诸多步骤,第一次打通了手持设备中应用间的边界,[One Step](http://www.smartisan.com/m1/#/os?section=onestep) + +14、[android-open-project](https://github.com/Trinea/android-open-project):Android 开源项目分类汇总 + +#### 开源书籍 +15、[the-way-to-go_ZH_CN](https://github.com/Unknwon/the-way-to-go_ZH_CN):《The Way to Go》中文译本,中文正式名《Go 入门指南》 + +#### 其它 +16、[freecodecamp.cn](https://github.com/FreeCodeCampChina/freecodecamp.cn):freecodecamp 是一个自由的开源编程社区,[freecodecamp 中文社区](https://freecodecamp.cn) + +17、[Web-Frontend-Introduction-And-Best-Practicesa](https://github.com/wxyyxc1992/Web-Frontend-Introduction-And-Engineering-Practices):Web 前端开发入门与实践练习 + +18、[best-chinese-front-end-blogs](https://github.com/FrankFang/best-chinese-front-end-blogs):该项目是收集优质的中文前端博客 + +19、[golang-open-source-projects](https://github.com/hackstoic/golang-open-source-projects):中文版 awesome-go + +20、[Learn-Algorithms](https://github.com/nonstriater/Learn-Algorithms):算法数据结构学习,C 语言实现 + +21、[FromXToGo](https://github.com/golang/go/wiki/FromXToGo):(英文)如果你正从某个语言(PHP, Python, Ruby 等)想要换到 Golang 却又害怕吗? diff --git a/09/img/glances-show-min.png b/09/img/glances-show-min.png new file mode 100644 index 00000000..8a7156c8 Binary files /dev/null and b/09/img/glances-show-min.png differ diff --git a/09/img/json-show.gif b/09/img/json-show.gif new file mode 100644 index 00000000..c0ccb84d Binary files /dev/null and b/09/img/json-show.gif differ diff --git a/09/img/ngrok-show-min.png b/09/img/ngrok-show-min.png new file mode 100644 index 00000000..cbe8898e Binary files /dev/null and b/09/img/ngrok-show-min.png differ diff --git a/09/img/vue-hackernews-show-min.png b/09/img/vue-hackernews-show-min.png new file mode 100644 index 00000000..cd96060f Binary files /dev/null and b/09/img/vue-hackernews-show-min.png differ diff --git a/10/HelloGitHub10.md b/10/HelloGitHub10.md new file mode 100644 index 00000000..ebe0f931 --- /dev/null +++ b/10/HelloGitHub10.md @@ -0,0 +1,129 @@ +# 《HelloGitHub》第 10 期 +>兴趣是最好的老师,[HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 就是帮你找到兴趣! + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) + +## 简介 +最开始我只是想把自己在浏览 [GitHub](https://github.com/) 过程中,发现的有意思、高质量、容易上手的项目收集起来,这样便于以后查找和学习。后来一想,如果给这些 GitHub 项目都加上简单的效果图和一些通俗易懂的中文介绍。应该能够帮助到我这样的新手激发兴趣去参与、学习这些优秀、好玩的开源项目。 + +所以,我就做了一个面向**编程新手**、**热爱编程**、**对开源社区感兴趣** 的人群的月刊,月刊的内容包括:**各种编程语言的项目**、**各种让生活变得更美好的工具**、**书籍、学习笔记、教程等**。这些项目都是非常容易上手,而且非常 Cool,主要是希望大家能动手用起来,加入到**开源社区**中。会编程的可以贡献代码,不会编程的可以反馈使用这些工具中的 Bug、帮着宣传你觉得优秀的项目、Star 项目⭐️。同时你将学习到更多编程知识、提高自己的编程技巧、发现自己的**兴趣**。 + +🎉 最后 [HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 这个项目就诞生了 🎉 + +--- +|**以下为本期内容**|每个月 28 号发布最新一期,首发在我的 [GitHub](https://github.com/521xueweihan) 上|[点击查看往期内容](https://github.com/521xueweihan/HelloGitHub#往期回顾)| + +#### Python 项目 +1、[saythanks.io](https://github.com/kennethreitz/saythanks.io):Kennethreitz 写的一个简单的网站(基于 Flask),用于向开源项目作者发送感谢邮件的 Web App。该项目结构简单,可以用来学习大神是如何快速开发 Web 项目、方法、代码风格、开发常用库。而且该项目的意义也特别好:**感谢开源项目的作者**,愿开源社区越来越好,[网站地址](https://saythanks.io) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/10/img/thanks-show-min.png) + +2、[locust](https://github.com/locustio/locust):模拟用户行为的[负载测试](http://blog.csdn.net/kerryzhu/article/details/3515714)工具,包含友好的 Web 页面,如下图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/10/img/locust-show-min.png) + +3、[jumpserver](https://github.com/jumpserver/jumpserver):Jumpserver 是一款由 Python 编写开源的跳板机(是一类可作为跳板批量操作远程设备的网络设备)系统,实现了跳板机应有的功能。基于 SSH 协议来管理,客户端无需安装 agent。支持常见 Linux 系统,效果如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/10/img/jumpserver-min.gif) + +#### Go 项目 +4、[kingshard](https://github.com/flike/kingshard):kingshard 是一个由 Go 开发高性能 MySQL Proxy 项目,kingshard 在满足基本的读写分离的功能上,致力于简化 MySQL 分库分表操作;能够让 DBA 通过 kingshard 轻松平滑地实现 MySQL 数据库扩容。 + +5、[v2ray-core](https://github.com/v2ray/v2ray-core):提供常用的代理软件模块,简化网络代理软件的开发。[什么是 V2Ray?](https://toutyrater.github.io/v2ray-guide-pages/) + +#### PHP 项目 +6、[typecho](https://github.com/typecho/typecho):PHP 的一款博客程序,[官网](http://typecho.org/),[文档](http://docs.typecho.org/doku.php) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/10/img/typecho-show-min.png) + +#### JavaScript 项目 +7、[iview](https://github.com/iview/iview):iView 是一套基于 Vue.js 的开源 UI 组件库,主要服务于 PC 界面的中后台产品。特性: +- 高质量、功能丰富 +- 友好的 API,自由灵活地使用空间 +- 事无巨细的文档 +- 细致、漂亮的 UI +- 使用单文件的 Vue 组件化开发模式 +- 基于 npm + webpack + babel 开发,支持 ES2015 + +8、[flv.js](https://github.com/Bilibili/flv.js):使用纯 JavaScript 写的 HTML5 Flash 视频(flv)播放器,示例代码如下: +```javascript + + + +``` + +9、[RAP](https://github.com/thx/RAP):阿里妈妈 MUX 团队出品,企业级 Web 接口管理工具。RAP 通过 GUI 工具帮助 Web 工程师更高效的管理接口文档,同时通过分析接口结构自动生成 Mock 数据、校验真实接口的正确性,使得接口开发更加规范、自动化。 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/10/img/rap-show-min.jpeg) + +#### C# 项目 +10、[Wox](https://github.com/Wox-launcher/Wox):Windows 上的 Alfred、Launchy,使用演示: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/10/img/wox-min.gif) + +#### 机器学习 +11、[MLAlgorithms](https://github.com/rushter/MLAlgorithms):常见的机器学习算法,Python 实现: +- [Deep learning (MLP, CNN, RNN, LSTM)](https://github.com/rushter/MLAlgorithms/tree/master/mla/neuralnet) +- [Linear regression, logistic regression](https://github.com/rushter/MLAlgorithms/blob/master/mla/linear_models.py) +- [Random Forests](https://github.com/rushter/MLAlgorithms/blob/master/mla/ensemble/random_forest.py) +- [Support vector machine (SVM) with kernels (Linear, Poly, RBF)](https://github.com/rushter/MLAlgorithms/tree/master/mla/svm) +- [K-Means](https://github.com/rushter/MLAlgorithms/blob/master/mla/kmeans.py) +- 等等 + +#### Java 项目 +12、[incubator-rocketmq](https://github.com/apache/incubator-rocketmq):RocketMQ 是阿里巴巴在 2012 年开源的第三代分布式消息中间件。 +历年双 11,RocketMQ 都承担了阿里巴巴生产系统百分之百的消息流转,在核心交易链路有着稳定和出色的表现,今年双十一,更是创造了万亿级消息精准低延迟投递。 + +#### C++ 项目 +13、[simhash](https://github.com/yanyiwu/simhash):此项目用来对中文文档计算出对应的 simhash 值。simhash 是谷歌用来进行文本去重的算法([详见 simhash 算法原理及实现](http://yanyiwu.com/work/2014/01/30/simhash-shi-xian-xiang-jie.html)),现在广泛应用在文本处理中。特征: +- 使用 CppJieba 作为分词器和关键词抽取器 +- 使用 jenkins 作为 hash 函数 +- hpp 风格,所有源码都是 .hpp 文件里面,方便使用。没有链接,就没有伤害。 +- 本项目的副产品项目:simhash_server 提供了简单的 simhash HTTP 服务。 + +#### Objective-C 项目 +14、[sequelpro](https://github.com/sequelpro/sequelpro):这是我到目前为止在 Mac 上发现最好用的 MySQL 管理工具。本人一直在使用,并且推荐给了我的小伙伴们,用过都说好😈~ + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/10/img/sequelpro-show-min.png) + +#### 开源书籍 +15、[redisbook](https://github.com/huangz1990/redisbook):Redis 设计与实现(网络版) + +#### 其它 +16、[IntelliJ-IDEA-Tutorial](https://github.com/judasn/IntelliJ-IDEA-Tutorial):IntelliJ IDEA 简体中文专题教程 + +17、[Awesome_API](https://github.com/marktony/Awesome_API):第三方 API 集合 + +18、[Lee-VR-Source](https://github.com/GeekLiB/Lee-VR-Source):VR 开发者必备资源汇总 + +19、[500lines](https://github.com/aosabook/500lines):(英文)用少于 500 行的 Python 代码,你可以写出什么东西?相信你看完这个项目,会学到很多(每个项目的作者都是业内大神写的)。[中文翻译版(未翻译完)](https://github.com/HT524/500LineorLess_CN) + + +--- + +## 声明 +如果你发现了好玩、有意义的开源项目,[点击这里](https://github.com/521xueweihan/HelloGitHub/issues/new) 分享你觉得有意思的项目。 + +- 分享项目格式:`项目名称——项目地址:项目描述(中文),追求完美👉项目上手 demo、截图` + +或许你分享的项目会让别人由衷的感慨:“原来还有这么有意思的项目!编程可以这么酷!” + +**欢迎转载,请注明出处和作者,同时保留声明和联系方式。** + +## 联系方式 +- [削微寒](https://github.com/521xueweihan) + +- [博客园](http://www.cnblogs.com/xueweihan/) + +- [知乎专栏](https://zhuanlan.zhihu.com/hellogithub) diff --git a/10/content10.md b/10/content10.md new file mode 100644 index 00000000..d0131f5a --- /dev/null +++ b/10/content10.md @@ -0,0 +1,95 @@ +#### Python 项目 +1、[saythanks.io](https://github.com/kennethreitz/saythanks.io):Kennethreitz 写的一个简单的网站(基于 Flask),用于向开源项目作者发送感谢邮件的 Web App。该项目结构简单,可以用来学习大神是如何快速开发 Web 项目、方法、代码风格、开发常用库。而且该项目的意义也特别好:**感谢开源项目的作者**,愿开源社区越来越好,[网站地址](https://saythanks.io) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/10/img/thanks-show-min.png) + +2、[locust](https://github.com/locustio/locust):模拟用户行为的[负载测试](http://blog.csdn.net/kerryzhu/article/details/3515714)工具,包含友好的 Web 页面,如下图: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/10/img/locust-show-min.png) + +3、[jumpserver](https://github.com/jumpserver/jumpserver):Jumpserver 是一款由 Python 编写开源的跳板机(是一类可作为跳板批量操作远程设备的网络设备)系统,实现了跳板机应有的功能。基于 SSH 协议来管理,客户端无需安装 agent。支持常见 Linux 系统,效果如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/10/img/jumpserver-min.gif) + +#### Go 项目 +4、[kingshard](https://github.com/flike/kingshard):kingshard 是一个由 Go 开发高性能 MySQL Proxy 项目,kingshard 在满足基本的读写分离的功能上,致力于简化 MySQL 分库分表操作;能够让 DBA 通过 kingshard 轻松平滑地实现 MySQL 数据库扩容。 + +5、[v2ray-core](https://github.com/v2ray/v2ray-core):提供常用的代理软件模块,简化网络代理软件的开发。[什么是 V2Ray?](https://toutyrater.github.io/v2ray-guide-pages/) + +#### PHP 项目 +6、[typecho](https://github.com/typecho/typecho):PHP 的一款博客程序,[官网](http://typecho.org/),[文档](http://docs.typecho.org/doku.php) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/10/img/typecho-show-min.png) + +#### JavaScript 项目 +7、[iview](https://github.com/iview/iview):iView 是一套基于 Vue.js 的开源 UI 组件库,主要服务于 PC 界面的中后台产品。特性: +- 高质量、功能丰富 +- 友好的 API,自由灵活地使用空间 +- 事无巨细的文档 +- 细致、漂亮的 UI +- 使用单文件的 Vue 组件化开发模式 +- 基于 npm + webpack + babel 开发,支持 ES2015 + +8、[flv.js](https://github.com/Bilibili/flv.js):使用纯 JavaScript 写的 HTML5 Flash 视频(flv)播放器,示例代码如下: +```javascript + + + +``` + +9、[RAP](https://github.com/thx/RAP):阿里妈妈 MUX 团队出品,企业级 Web 接口管理工具。RAP 通过 GUI 工具帮助 Web 工程师更高效的管理接口文档,同时通过分析接口结构自动生成 Mock 数据、校验真实接口的正确性,使得接口开发更加规范、自动化。 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/10/img/rap-show-min.jpeg) + +#### C# 项目 +10、[Wox](https://github.com/Wox-launcher/Wox):Windows 上的 Alfred、Launchy,使用演示: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/10/img/wox-min.gif) + +#### 机器学习 +11、[MLAlgorithms](https://github.com/rushter/MLAlgorithms):常见的机器学习算法,Python 实现: +- [Deep learning (MLP, CNN, RNN, LSTM)](https://github.com/rushter/MLAlgorithms/tree/master/mla/neuralnet) +- [Linear regression, logistic regression](https://github.com/rushter/MLAlgorithms/blob/master/mla/linear_models.py) +- [Random Forests](https://github.com/rushter/MLAlgorithms/blob/master/mla/ensemble/random_forest.py) +- [Support vector machine (SVM) with kernels (Linear, Poly, RBF)](https://github.com/rushter/MLAlgorithms/tree/master/mla/svm) +- [K-Means](https://github.com/rushter/MLAlgorithms/blob/master/mla/kmeans.py) +- 等等 + +#### Java 项目 +12、[incubator-rocketmq](https://github.com/apache/incubator-rocketmq):RocketMQ 是阿里巴巴在 2012 年开源的第三代分布式消息中间件。 +历年双 11,RocketMQ 都承担了阿里巴巴生产系统百分之百的消息流转,在核心交易链路有着稳定和出色的表现,今年双十一,更是创造了万亿级消息精准低延迟投递。 + +#### C++ 项目 +13、[simhash](https://github.com/yanyiwu/simhash):此项目用来对中文文档计算出对应的 simhash 值。simhash 是谷歌用来进行文本去重的算法([详见 simhash 算法原理及实现](http://yanyiwu.com/work/2014/01/30/simhash-shi-xian-xiang-jie.html)),现在广泛应用在文本处理中。特征: +- 使用 CppJieba 作为分词器和关键词抽取器 +- 使用 jenkins 作为 hash 函数 +- hpp 风格,所有源码都是 .hpp 文件里面,方便使用。没有链接,就没有伤害。 +- 本项目的副产品项目:simhash_server 提供了简单的 simhash HTTP 服务。 + +#### Objective-C 项目 +14、[sequelpro](https://github.com/sequelpro/sequelpro):这是我到目前为止在 Mac 上发现最好用的 MySQL 管理工具。本人一直在使用,并且推荐给了我的小伙伴们,用过都说好😈~ + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/10/img/sequelpro-show-min.png) + +#### 开源书籍 +15、[redisbook](https://github.com/huangz1990/redisbook):Redis 设计与实现(网络版) + +#### 其它 +16、[IntelliJ-IDEA-Tutorial](https://github.com/judasn/IntelliJ-IDEA-Tutorial):IntelliJ IDEA 简体中文专题教程 + +17、[Awesome_API](https://github.com/marktony/Awesome_API):第三方 API 集合 + +18、[Lee-VR-Source](https://github.com/GeekLiB/Lee-VR-Source):VR 开发者必备资源汇总 + +19、[500lines](https://github.com/aosabook/500lines):(英文)用少于 500 行的 Python 代码,你可以写出什么东西?相信你看完这个项目,会学到很多(每个项目的作者都是业内大神写的)。[中文翻译版(未翻译完)](https://github.com/HT524/500LineorLess_CN) diff --git a/10/img/jumpserver-min.gif b/10/img/jumpserver-min.gif new file mode 100644 index 00000000..14d153c3 Binary files /dev/null and b/10/img/jumpserver-min.gif differ diff --git a/10/img/locust-show-min.png b/10/img/locust-show-min.png new file mode 100644 index 00000000..4d23080d Binary files /dev/null and b/10/img/locust-show-min.png differ diff --git a/10/img/rap-show-min.jpeg b/10/img/rap-show-min.jpeg new file mode 100644 index 00000000..2c13e6a2 Binary files /dev/null and b/10/img/rap-show-min.jpeg differ diff --git a/10/img/sequelpro-show-min.png b/10/img/sequelpro-show-min.png new file mode 100644 index 00000000..3e0f8859 Binary files /dev/null and b/10/img/sequelpro-show-min.png differ diff --git a/10/img/thanks-show-min.png b/10/img/thanks-show-min.png new file mode 100644 index 00000000..284001a6 Binary files /dev/null and b/10/img/thanks-show-min.png differ diff --git a/10/img/typecho-show-min.png b/10/img/typecho-show-min.png new file mode 100644 index 00000000..53c8d73a Binary files /dev/null and b/10/img/typecho-show-min.png differ diff --git a/10/img/wox-min.gif b/10/img/wox-min.gif new file mode 100644 index 00000000..011ef2ea Binary files /dev/null and b/10/img/wox-min.gif differ diff --git a/11/HelloGitHub11.md b/11/HelloGitHub11.md new file mode 100644 index 00000000..30511218 --- /dev/null +++ b/11/HelloGitHub11.md @@ -0,0 +1,127 @@ +# 《HelloGitHub》第 11 期 +>兴趣是最好的老师,[HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 就是帮你找到兴趣! + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) + +## 简介 +最开始我只是想把自己在浏览 [GitHub](https://github.com/) 过程中,发现的有意思、高质量、容易上手的项目收集起来,这样便于以后查找和学习。后来一想,如果给这些 GitHub 项目都加上简单的效果图和一些通俗易懂的中文介绍。应该能够帮助到我这样的新手激发兴趣去参与、学习这些优秀、好玩的开源项目。 + +所以,我就做了一个面向**编程新手**、**热爱编程**、**对开源社区感兴趣** 的人群的月刊,月刊的内容包括:**各种编程语言的项目**、**各种让生活变得更美好的工具**、**书籍、学习笔记、教程等**。这些项目都是非常容易上手,而且非常 Cool,主要是希望大家能动手用起来,加入到**开源社区**中。会编程的可以贡献代码,不会编程的可以反馈使用这些工具中的 Bug、帮着宣传你觉得优秀的项目、Star 项目⭐️。同时你将学习到更多编程知识、提高自己的编程技巧、发现自己的**兴趣**。 + +🎉 最后 [HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 这个项目就诞生了 🎉 + +--- +|**以下为本期内容**|每个月 28 号发布最新一期,首发在我的 [GitHub](https://github.com/521xueweihan) 上|[点击查看往期内容](https://github.com/521xueweihan/HelloGitHub#往期回顾)| + +#### Python 项目 +1、[sh](https://github.com/amoffat/sh):sh 是一个成熟,用于替代 subprocess,它允许你调用任何程序,就像它是一个函数,支持 Python2.6 - 3.5 + +```python +from sh import ifconfig +print ifconfig("eth0") +``` + +2、[fastText.py](https://github.com/salestock/fastText.py):fastText 简而言之,就是把文档中所有词通过 lookup table 变成向量,取平均后直接用线性分类器得到分类结果。[fastText 的实现](https://www.zybuluo.com/Wayne-Z/note/460881) + +3、[mongoaudit](https://github.com/stampery/mongoaudit):强大的 MongoDB 渗透测试工具,用于发掘 MongoDB 漏洞、并提出改善方法。 +- 安装:`pip install mongoaudit` +- 运行:`python mongoaudit` + +#### Go 项目 +4、[negroni](https://github.com/urfave/negroni):Negroni 是一个很地道的 Web 中间件,它不是一个框架,是为了方便使用 net/http 而设计的一个库而已。[中文介绍](https://github.com/urfave/negroni/blob/master/translations/README_zh_cn.md) + +#### Javascript 项目 +5、[react-tetris](https://github.com/chvin/react-tetris):逼真的俄罗斯方块(非常逼真、强大!),详细的技术介绍,[在线试玩](https://chvin.github.io/react-tetris/?lan=zh) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/11/img/tetris.gif) + +#### Android 项目 +6、[WechatLuckyMoney](https://github.com/veryyoung/WechatLuckyMoney):微信抢红包插件,基于 Xposed 框架,速度快得冷人发指。为避免过度拉仇恨,请谨慎使用(哈哈哈😄)。 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/11/img/wechatluckymoney.gif) + +7、[GitClub](https://github.com/TellH/GitClub):GitClub 不仅仅是一个 GitHub 客户端,还是一个发现优秀 GitHub 开源项目的 App + +#### Java 项目 +8、[tale](https://github.com/otale/tale):简洁、漂亮、轻量级、Java 博客,[在线预览](https://tale.biezhi.me/)。特性: +- 设计简洁,界面美观 +- Markdown 文章发布 +- 自定义文章链接 +- 支持多主题 +- 支持 Emoji 表情 +- 支持网易云音乐播放 +- 支持附件和数据库备份 +- 部署简单,不依赖 Tomcat + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/11/img/tale-show-min.png) + +9、[jvm-mon](https://github.com/ajermakovics/jvm-mon):命令行模式的 JVM 监控 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/11/img/jvm-show-min.png) + +#### C 项目 +10、[wrk](https://github.com/wg/wrk):现代 HTTP 基准测试(实现对一类测试对象的某项性能指标进行定量的和可对比的测试)工具,使用示例: +```sh +# 输入命令 +wrk -t12 -c400 -d30s http://127.0.0.1:8080/index.html + +# 输出 +Running 30s test @ http://127.0.0.1:8080/index.html + 12 threads and 400 connections + Thread Stats Avg Stdev Max +/- Stdev + Latency 635.91us 0.89ms 12.92ms 93.69% + Req/Sec 56.20k 8.07k 62.00k 86.54% + 22464657 requests in 30.00s, 17.76GB read +Requests/sec: 748868.53 +Transfer/sec: 606.33MB +``` + +#### Swift 项目 +11、[Swift30Projects](https://github.com/soapyigu/Swift30Projects):30 个小型 Swift Apps,可以用来上手学习、练习移动开发。 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/11/img/swift30projects-show-min.jpg) + +#### 开源书籍 +12、[book](https://github.com/qyuhen/book):雨痕大神写的学习笔记 + +13、[nginx-book](https://github.com/taobao/nginx-book):Nginx 开发从入门到精通——本书的作者为淘宝核心系统服务器平台组的成员 + +14、[real-world-haskell-cn](https://github.com/huangz1990/real-world-haskell-cn):《Real World Haskell》中文翻译项目 + +15、[open-shell-book](https://github.com/tinyclub/open-shell-book):《Shell 编程范例》,面向操作对象学 Shell! + +16、[python-data-structure-cn](https://github.com/facert/python-data-structure-cn):《Problem Solving with Algorithms and Data Structures using Python》中文版 + +17、[docker_practice](https://github.com/yeasy/docker_practice):Dokcer 从入门到实践 + +18、[explore-flask](https://github.com/rpicard/explore-flask):[《explore flask》中文翻译](https://spacewander.github.io/explore-flask-zh/index.html) + +19、[react-cookbook](https://github.com/shimohq/react-cookbook):编写简洁漂亮,可维护的 React 应用 + +20、[rust-book-chinese](https://github.com/KaiserY/rust-book-chinese):Rust 程序设计语言 中文版 + +#### 其它 +21、[linux-command](https://github.com/jaywcjlove/linux-command):Linux 命令大全搜索工具,内容包含 Linux 命令手册、详解、学习、搜集 + +22、[chinese-programmer-wrong-pronunciation](https://github.com/shimohq/chinese-programmer-wrong-pronunciation):中国程序员容易发音错误的单词 + +23、[go-lang-cheat-sheet](https://github.com/a8m/go-lang-cheat-sheet):(英文)Go 语法特性集合 + + +--- + +## 声明 +如果你发现了好玩、有意义的开源项目,[点击这里](https://github.com/521xueweihan/HelloGitHub/issues/new) 分享你觉得有意思的项目。 + +- 分享项目格式:`项目名称——项目地址:项目描述(中文),追求完美👉项目上手 demo、截图` + +或许你分享的项目会让别人由衷的感慨:“原来还有这么有意思的项目!编程可以这么酷!” + +**欢迎转载,请注明出处和作者,同时保留声明和联系方式。** + +## 联系方式 +- [削微寒](https://github.com/521xueweihan) + +- [博客园](http://www.cnblogs.com/xueweihan/) + +- [知乎专栏](https://zhuanlan.zhihu.com/hellogithub) diff --git a/11/content11.md b/11/content11.md new file mode 100644 index 00000000..e181692c --- /dev/null +++ b/11/content11.md @@ -0,0 +1,93 @@ +#### Python 项目 +1、[sh](https://github.com/amoffat/sh):sh 是一个成熟,用于替代 subprocess,它允许你调用任何程序,就像它是一个函数,支持 Python2.6 - 3.5 + +```python +from sh import ifconfig +print ifconfig("eth0") +``` + +2、[fastText.py](https://github.com/salestock/fastText.py):fastText 简而言之,就是把文档中所有词通过 lookup table 变成向量,取平均后直接用线性分类器得到分类结果。[fastText 的实现](https://www.zybuluo.com/Wayne-Z/note/460881) + +3、[mongoaudit](https://github.com/stampery/mongoaudit):强大的 MongoDB 渗透测试工具,用于发掘 MongoDB 漏洞、并提出改善方法。 +- 安装:`pip install mongoaudit` +- 运行:`python mongoaudit` + +#### Go 项目 +4、[negroni](https://github.com/urfave/negroni):Negroni 是一个很地道的 Web 中间件,它不是一个框架,是为了方便使用 net/http 而设计的一个库而已。[中文介绍](https://github.com/urfave/negroni/blob/master/translations/README_zh_cn.md) + +#### Javascript 项目 +5、[react-tetris](https://github.com/chvin/react-tetris):逼真的俄罗斯方块(非常逼真、强大!),详细的技术介绍,[在线试玩](https://chvin.github.io/react-tetris/?lan=zh) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/11/img/tetris.gif) + +#### Android 项目 +6、[WechatLuckyMoney](https://github.com/veryyoung/WechatLuckyMoney):微信抢红包插件,基于 Xposed 框架,速度快得冷人发指。为避免过度拉仇恨,请谨慎使用(哈哈哈😄)。 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/11/img/wechatluckymoney.gif) + +7、[GitClub](https://github.com/TellH/GitClub):GitClub 不仅仅是一个 GitHub 客户端,还是一个发现优秀 GitHub 开源项目的 App + +#### Java 项目 +8、[tale](https://github.com/otale/tale):简洁、漂亮、轻量级、Java 博客,[在线预览](https://tale.biezhi.me/)。特性: +- 设计简洁,界面美观 +- Markdown 文章发布 +- 自定义文章链接 +- 支持多主题 +- 支持 Emoji 表情 +- 支持网易云音乐播放 +- 支持附件和数据库备份 +- 部署简单,不依赖 Tomcat + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/11/img/tale-show-min.png) + +9、[jvm-mon](https://github.com/ajermakovics/jvm-mon):命令行模式的 JVM 监控 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/11/img/jvm-show-min.png) + +#### C 项目 +10、[wrk](https://github.com/wg/wrk):现代 HTTP 基准测试(实现对一类测试对象的某项性能指标进行定量的和可对比的测试)工具,使用示例: +```sh +# 输入命令 +wrk -t12 -c400 -d30s http://127.0.0.1:8080/index.html + +# 输出 +Running 30s test @ http://127.0.0.1:8080/index.html + 12 threads and 400 connections + Thread Stats Avg Stdev Max +/- Stdev + Latency 635.91us 0.89ms 12.92ms 93.69% + Req/Sec 56.20k 8.07k 62.00k 86.54% + 22464657 requests in 30.00s, 17.76GB read +Requests/sec: 748868.53 +Transfer/sec: 606.33MB +``` + +#### Swift 项目 +11、[Swift30Projects](https://github.com/soapyigu/Swift30Projects):30 个小型 Swift Apps,可以用来上手学习、练习移动开发。 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/11/img/swift30projects-show-min.jpg) + +#### 开源书籍 +12、[book](https://github.com/qyuhen/book):雨痕大神写的学习笔记 + +13、[nginx-book](https://github.com/taobao/nginx-book):Nginx 开发从入门到精通——本书的作者为淘宝核心系统服务器平台组的成员 + +14、[real-world-haskell-cn](https://github.com/huangz1990/real-world-haskell-cn):《Real World Haskell》中文翻译项目 + +15、[open-shell-book](https://github.com/tinyclub/open-shell-book):《Shell 编程范例》,面向操作对象学 Shell! + +16、[python-data-structure-cn](https://github.com/facert/python-data-structure-cn):《Problem Solving with Algorithms and Data Structures using Python》中文版 + +17、[docker_practice](https://github.com/yeasy/docker_practice):Dokcer 从入门到实践 + +18、[explore-flask](https://github.com/rpicard/explore-flask):[《explore flask》中文翻译](https://spacewander.github.io/explore-flask-zh/index.html) + +19、[react-cookbook](https://github.com/shimohq/react-cookbook):编写简洁漂亮,可维护的 React 应用 + +20、[rust-book-chinese](https://github.com/KaiserY/rust-book-chinese):Rust 程序设计语言 中文版 + +#### 其它 +21、[linux-command](https://github.com/jaywcjlove/linux-command):Linux 命令大全搜索工具,内容包含 Linux 命令手册、详解、学习、搜集 + +22、[chinese-programmer-wrong-pronunciation](https://github.com/shimohq/chinese-programmer-wrong-pronunciation):中国程序员容易发音错误的单词 + +23、[go-lang-cheat-sheet](https://github.com/a8m/go-lang-cheat-sheet):(英文)Go 语法特性集合 diff --git a/11/img/jvm-show-min.png b/11/img/jvm-show-min.png new file mode 100644 index 00000000..69b0b152 Binary files /dev/null and b/11/img/jvm-show-min.png differ diff --git a/11/img/swift30projects-show-min.jpg b/11/img/swift30projects-show-min.jpg new file mode 100644 index 00000000..1da7019e Binary files /dev/null and b/11/img/swift30projects-show-min.jpg differ diff --git a/11/img/tale-show-min.png b/11/img/tale-show-min.png new file mode 100644 index 00000000..51a27c13 Binary files /dev/null and b/11/img/tale-show-min.png differ diff --git a/11/img/tetris.gif b/11/img/tetris.gif new file mode 100644 index 00000000..528395d7 Binary files /dev/null and b/11/img/tetris.gif differ diff --git a/11/img/wechatluckymoney.gif b/11/img/wechatluckymoney.gif new file mode 100644 index 00000000..cbdb1d76 Binary files /dev/null and b/11/img/wechatluckymoney.gif differ diff --git a/12/HelloGitHub12.md b/12/HelloGitHub12.md new file mode 100644 index 00000000..09f0959f --- /dev/null +++ b/12/HelloGitHub12.md @@ -0,0 +1,146 @@ +# 《HelloGitHub》第 12 期 +>兴趣是最好的老师,[HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 就是帮你找到兴趣! + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) + +## 简介 +最开始我只是想把自己在浏览 [GitHub](https://github.com/) 过程中,发现的有意思、高质量、容易上手的项目收集起来,这样便于以后查找和学习。后来一想,如果给这些 GitHub 项目都加上简单的效果图和一些通俗易懂的中文介绍。应该能够帮助到我这样的新手激发兴趣去参与、学习这些优秀、好玩的开源项目。 + +所以,我就做了一个面向**编程新手**、**热爱编程**、**对开源社区感兴趣** 的人群的月刊,月刊的内容包括:**各种编程语言的项目**、**各种让生活变得更美好的工具**、**书籍、学习笔记、教程等**。这些项目都是非常容易上手,而且非常 Cool,主要是希望大家能动手用起来,加入到**开源社区**中。会编程的可以贡献代码,不会编程的可以反馈使用这些工具中的 Bug、帮着宣传你觉得优秀的项目、Star 项目⭐️。同时你将学习到更多编程知识、提高自己的编程技巧、发现自己的**兴趣**。 + +🎉 最后 [HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 这个项目就诞生了 🎉 + +--- +|**以下为本期内容**|每个月 28 号发布最新一期,首发在我的 [GitHub](https://github.com/521xueweihan) 上|[点击查看往期内容](https://github.com/521xueweihan/HelloGitHub#往期回顾)| + +#### Python 项目 +1、[mycli](https://github.com/dbcli/mycli):mycli 是一个带语法高亮、自动补全的 MySQL 命令行客户端工具。例如,连接数据库方法:`mycli -h localhost -u 用户名 数据库` + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/12/img/mycli.gif) + +2、[python-fire](https://github.com/google/python-fire):Fire 是 Google 开源的 Python 库,可自动将您的代码转变成 CLI,无需您做任何额外工作。您不必定义参数,设置帮助信息,或者编写定义代码运行方式的 main 函数。相反,您只需从 main 模块调用“Fire”函数,其余工作全部交由 Python Fire 来完成。示例代码如下: +```python +import fire +class Example(object): + def hello(self, name='world'): + """Says hello to the specified name.""" + return 'Hello {name}!'.format(name=name) + +def main(): + fire.Fire(Example) +if __name__ == '__main__': + main() + +# 在终端中调用效果如下: +$ ./example.py hello +Hello world! +$ ./example.py hello David +Hello David! +$ ./example.py hello --name=Google +Hello Google! +``` + +#### Go 项目 +3、[wuzz](https://github.com/asciimoo/wuzz):wuzz 是用于调试 HTTP 请求的交互式命令行工具,可以用来检查和修改请求。常用操作如下: + +| Keybinding | Description | +| :--------- | :------ | +| Ctrl+R | 发送请求 | +| Ctrl+C | 退出 | +| Ctrl+K,Shift+Tab | 前视图 | +| Ctlr+J,Tab | 下一个视图 | +| Ctrl+H,Alt+H | 打开/关闭历史 | +| Down | 向下移动一条视图线 | +| Up | 向上移动一条视图线 | +| Page down | 向下移动一个视图页 | +| Page up | 向下移动一个视图页 | +| F2 | 跳转到 URL | +| F3 | 跳转到查询参数 | +| F4 | 跳转到 HTTP 方法 | +| F5 | 跳转到请求体 | +| F6 | 跳转到 header | +| F7 | 跳转到搜索 | +| F8 | 跳转到响应 header | +| F9 | 跳转到响应体 | + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/12/img/wuzz.gif) + +4、[sshtron](https://github.com/zachlatta/sshtron):sshtron 是通过 SSH 运行的多人贪吃蛇游戏,命令行输入:`ssh sshtron.zachlatta.com`,无需安装等待几秒即可进行游戏(因为服务器在国外,很卡😅) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/12/img/sshtron.gif) + +#### JavaScript 项目 +5、[vue2-elm](https://github.com/bailicangdu/vue2-elm):基于 vue2 + vuex 构建一个大型单页面应用,此项目大大小小共 45 个页面,涉及注册、登录、商品展示、购物车、下单等等,是一个完整的流程, + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/12/img/vue2-elm-show-min.png) + +6、[standard](https://github.com/feross/standard):统一 JavaScript,只需一种样式,[中文](https://github.com/feross/standard/blob/master/docs/README-zhtw.md) + +7、[screenfull.js](https://github.com/sindresorhus/screenfull.js):极小、跨平台的 JavaScript 全屏插件,[在线 demo](https://sindresorhus.com/screenfull.js/) + +8、[octotree](https://github.com/buunguyen/octotree):为 GitHub 和 GitLab 网站,提供直观地显示项目目录结构的浏览器插件,效果如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/12/img/octotree-show-min.png) + +#### C# 项目 +9、[ScreenToGif](https://github.com/NickeManarin/ScreenToGif):此工具可以记录屏幕的选定区域、网络摄像头的实时图像和绘图板上的实时图像。可以编辑并将动画保存为 GIF 或视频 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/12/img/screen-to-gif-show-min.png) + +#### Android 项目 +10、[fresco](https://github.com/facebook/fresco):Facebook 开源的 Android 管理图片的库,[中文文档](https://www.fresco-cn.org/docs/index.html)。包含功能如下: +- 显示占位图直到加载完成 +- 下载图片 +- 缓存图片 +- 图片不再显示时,从内存中移除 +- 等等 + +#### C 项目 +11、[tbox](https://github.com/tboox/tbox):一个用 C 语言实现的跨平台开发库,用于解决不同操作系统的兼容问题,并且充分利用了各个平台独有的一些特性进行优化。[中文说明](https://github.com/tboox/tbox/blob/master/README_zh.md) + + +#### Objective-C 项目 +12、[bitbar](https://github.com/matryer/bitbar):Bitbar 是可以将任何(自己或别人写好的)脚本的**输出**到 Mac OS 的状态栏上。同时,支持自定义更新频率。例如:比特币的价格、HelloGitHub 项目的 star 数量(欢迎 star 本项目😄),使用步骤如下: + +1. 运行该程序,选择脚本所在目录 +2. 确保脚本的有执行权限,赋予执行权限的命令:`chmod +x script.sh` +3. 选择 `Refresh all`,刷新使之生效 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/12/img/bitbar-show-min.png) + +#### 开源书籍 +13、[explore-python](https://github.com/ethan-funny/explore-python):感谢 [ethan-funny](https://github.com/ethan-funny) **编写并推荐** 的《Python 之旅》,该书总结了 Python 相关的知识点,力求深入浅出、条理清晰。 + +14、[The-Art-Of-Programming-By-July](https://github.com/julycoding/The-Art-Of-Programming-By-July/blob/master/ebook/zh/Readme.md):《编程之法:面试和算法心得》 + +15、[react-naive-book](https://github.com/huzidaha/react-naive-book):开源、免费、专业、简单的 React.js 教程 + +#### 其它 +16、[performance-column](https://github.com/barretlee/performance-column):[阿里胡子哥](https://github.com/barretlee)写的《性能专栏》,旨在提升 PC/H5/Native 等多个端上对性能的认知,[阅读地址](https://github.com/barretlee/performance-column/issues) + +17、[node-interview](https://github.com/ElemeFE/node-interview):如何通过饿了么 Node.js 面试 + +18、[android-open-project](https://github.com/Trinea/android-open-project):Android 开源项目集合 + +19、[gophers](https://github.com/egonelbre/gophers):Go 吉祥物的各种图片素材 + +20、[algs4](https://github.com/kevin-wayne/algs4):(英文)算法第四版书中的示例代码(Java) + + +--- + +## 声明 +如果你发现了好玩、有意义的开源项目,[点击这里](https://github.com/521xueweihan/HelloGitHub/issues/new) 分享你觉得有意思的项目。 + +- 分享项目格式:`项目名称——项目地址:项目描述(中文),追求完美👉项目上手 demo、截图` + +或许你分享的项目会让别人由衷的感慨:“原来还有这么有意思的项目!编程可以这么酷!” + +**欢迎转载,请注明出处和作者,同时保留声明和联系方式。** + +## 联系方式 +- [削微寒](https://github.com/521xueweihan) + +- [博客园](http://www.cnblogs.com/xueweihan/) + +- [知乎专栏](https://zhuanlan.zhihu.com/hellogithub) diff --git a/12/content12.md b/12/content12.md new file mode 100644 index 00000000..3fce678f --- /dev/null +++ b/12/content12.md @@ -0,0 +1,112 @@ +#### Python 项目 +1、[mycli](https://github.com/dbcli/mycli):mycli 是一个带语法高亮、自动补全的 MySQL 命令行客户端工具。例如,连接数据库方法:`mycli -h localhost -u 用户名 数据库` + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/12/img/mycli.gif) + +2、[python-fire](https://github.com/google/python-fire):Fire 是 Google 开源的 Python 库,可自动将您的代码转变成 CLI,无需您做任何额外工作。您不必定义参数,设置帮助信息,或者编写定义代码运行方式的 main 函数。相反,您只需从 main 模块调用“Fire”函数,其余工作全部交由 Python Fire 来完成。示例代码如下: +```python +import fire +class Example(object): + def hello(self, name='world'): + """Says hello to the specified name.""" + return 'Hello {name}!'.format(name=name) + +def main(): + fire.Fire(Example) +if __name__ == '__main__': + main() + +# 在终端中调用效果如下: +$ ./example.py hello +Hello world! +$ ./example.py hello David +Hello David! +$ ./example.py hello --name=Google +Hello Google! +``` + +#### Go 项目 +3、[wuzz](https://github.com/asciimoo/wuzz):wuzz 是用于调试 HTTP 请求的交互式命令行工具,可以用来检查和修改请求。常用操作如下: + +| Keybinding | Description | +| :--------- | :------ | +| Ctrl+R | 发送请求 | +| Ctrl+C | 退出 | +| Ctrl+K,Shift+Tab | 前视图 | +| Ctlr+J,Tab | 下一个视图 | +| Ctrl+H,Alt+H | 打开/关闭历史 | +| Down | 向下移动一条视图线 | +| Up | 向上移动一条视图线 | +| Page down | 向下移动一个视图页 | +| Page up | 向下移动一个视图页 | +| F2 | 跳转到 URL | +| F3 | 跳转到查询参数 | +| F4 | 跳转到 HTTP 方法 | +| F5 | 跳转到请求体 | +| F6 | 跳转到 header | +| F7 | 跳转到搜索 | +| F8 | 跳转到响应 header | +| F9 | 跳转到响应体 | + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/12/img/wuzz.gif) + +4、[sshtron](https://github.com/zachlatta/sshtron):sshtron 是通过 SSH 运行的多人贪吃蛇游戏,命令行输入:`ssh sshtron.zachlatta.com`,无需安装等待几秒即可进行游戏(因为服务器在国外,很卡😅) + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/12/img/sshtron.gif) + +#### JavaScript 项目 +5、[vue2-elm](https://github.com/bailicangdu/vue2-elm):基于 vue2 + vuex 构建一个大型单页面应用,此项目大大小小共 45 个页面,涉及注册、登录、商品展示、购物车、下单等等,是一个完整的流程, + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/12/img/vue2-elm-show-min.png) + +6、[standard](https://github.com/feross/standard):统一 JavaScript,只需一种样式,[中文](https://github.com/feross/standard/blob/master/docs/README-zhtw.md) + +7、[screenfull.js](https://github.com/sindresorhus/screenfull.js):极小、跨平台的 JavaScript 全屏插件,[在线 demo](https://sindresorhus.com/screenfull.js/) + +8、[octotree](https://github.com/buunguyen/octotree):为 GitHub 和 GitLab 网站,提供直观地显示项目目录结构的浏览器插件,效果如下: + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/12/img/octotree-show-min.png) + +#### C# 项目 +9、[ScreenToGif](https://github.com/NickeManarin/ScreenToGif):此工具可以记录屏幕的选定区域、网络摄像头的实时图像和绘图板上的实时图像。可以编辑并将动画保存为 GIF 或视频 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/12/img/screen-to-gif-show-min.png) + +#### Android 项目 +10、[fresco](https://github.com/facebook/fresco):Facebook 开源的 Android 管理图片的库,[中文文档](https://www.fresco-cn.org/docs/index.html)。包含功能如下: +- 显示占位图直到加载完成 +- 下载图片 +- 缓存图片 +- 图片不再显示时,从内存中移除 +- 等等 + +#### C 项目 +11、[tbox](https://github.com/tboox/tbox):一个用 C 语言实现的跨平台开发库,用于解决不同操作系统的兼容问题,并且充分利用了各个平台独有的一些特性进行优化。[中文说明](https://github.com/tboox/tbox/blob/master/README_zh.md) + + +#### Objective-C 项目 +12、[bitbar](https://github.com/matryer/bitbar):Bitbar 是可以将任何(自己或别人写好的)脚本的**输出**到 Mac OS 的状态栏上。同时,支持自定义更新频率。例如:比特币的价格、HelloGitHub 项目的 star 数量(欢迎 star 本项目😄),使用步骤如下: + +1. 运行该程序,选择脚本所在目录 +2. 确保脚本的有执行权限,赋予执行权限的命令:`chmod +x script.sh` +3. 选择 `Refresh all`,刷新使之生效 + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/12/img/bitbar-show-min.png) + +#### 开源书籍 +13、[explore-python](https://github.com/ethan-funny/explore-python):感谢 [ethan-funny](https://github.com/ethan-funny) **编写并推荐** 的《Python 之旅》,该书总结了 Python 相关的知识点,力求深入浅出、条理清晰。 + +14、[The-Art-Of-Programming-By-July](https://github.com/julycoding/The-Art-Of-Programming-By-July/blob/master/ebook/zh/Readme.md):《编程之法:面试和算法心得》 + +15、[react-naive-book](https://github.com/huzidaha/react-naive-book):开源、免费、专业、简单的 React.js 教程 + +#### 其它 +16、[performance-column](https://github.com/barretlee/performance-column):[阿里胡子哥](https://github.com/barretlee)写的《性能专栏》,旨在提升 PC/H5/Native 等多个端上对性能的认知,[阅读地址](https://github.com/barretlee/performance-column/issues) + +17、[node-interview](https://github.com/ElemeFE/node-interview):如何通过饿了么 Node.js 面试 + +18、[android-open-project](https://github.com/Trinea/android-open-project):Android 开源项目集合 + +19、[gophers](https://github.com/egonelbre/gophers):Go 吉祥物的各种图片素材 + +20、[algs4](https://github.com/kevin-wayne/algs4):(英文)算法第四版书中的示例代码(Java) diff --git a/12/img/bitbar-show-min.png b/12/img/bitbar-show-min.png new file mode 100644 index 00000000..bc3bb5f9 Binary files /dev/null and b/12/img/bitbar-show-min.png differ diff --git a/12/img/mycli.gif b/12/img/mycli.gif new file mode 100644 index 00000000..1966e673 Binary files /dev/null and b/12/img/mycli.gif differ diff --git a/12/img/octotree-show-min.png b/12/img/octotree-show-min.png new file mode 100644 index 00000000..e3e1579f Binary files /dev/null and b/12/img/octotree-show-min.png differ diff --git a/12/img/screen-to-gif-show-min.png b/12/img/screen-to-gif-show-min.png new file mode 100644 index 00000000..ffb62294 Binary files /dev/null and b/12/img/screen-to-gif-show-min.png differ diff --git a/12/img/sshtron.gif b/12/img/sshtron.gif new file mode 100644 index 00000000..ac9972cc Binary files /dev/null and b/12/img/sshtron.gif differ diff --git a/12/img/vue2-elm-show-min.png b/12/img/vue2-elm-show-min.png new file mode 100644 index 00000000..50ff97d7 Binary files /dev/null and b/12/img/vue2-elm-show-min.png differ diff --git a/12/img/wuzz.gif b/12/img/wuzz.gif new file mode 100644 index 00000000..1f7268cd Binary files /dev/null and b/12/img/wuzz.gif differ diff --git a/README.md b/README.md index fc9f53a2..4e26d920 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,44 @@ -# 《HelloGithub月刊》 -因为现在这个项目只有我自己做,只敢叫“月刊”,希望有志同道合者,快点加入到这个项目中来!同时,如果您有更好的建议或者意见,欢迎联系我。联系方式在最下方~ +# HelloGitHub +>兴趣是最好的老师,[HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 就是帮你找到兴趣! -## 最新一期 -- [第一期](https://github.com/521xueweihan/HelloGithub/blob/master/01/HelloGithub01.md) +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) -### 介绍 -最开始只是我自己浏览github过程中收集的一些有中文介绍,通俗易懂,简单容易上手的项目。后来一想,如果每个github都有个简单的效果图的话,应该更容易让我这样的新手接受。 +## 简介 +最开始我只是想把自己在浏览 [GitHub](https://github.com/) 过程中,发现的有意思、高质量、容易上手的项目收集起来,这样便于以后查找和学习。后来一想,如果给这些 GitHub 项目都加上简单的效果图和一些通俗易懂的中文介绍。应该能够帮助到我这样的新手激发兴趣去参与、学习这些优秀、好玩的开源项目。 -所以,我就想做一个月刊的形式,面向新手的github月刊,月刊的内容主要包括:中文项目、少许英文项目、翻译的书籍以及教程。如果是项目的话,会带一个效果图。项目越容易上手越好,看起来越cool越好! +所以,我就做了一个面向**编程新手**、**热爱编程**、**对开源社区感兴趣** 的人群的月刊,月刊的内容包括:**各种编程语言的项目**、**各种让生活变得更美好的工具**、**书籍、学习笔记、教程等**。这些项目都是非常容易上手,而且非常 Cool,主要是希望大家能动手用起来,加入到**开源社区**中。会编程的可以贡献代码,不会编程的可以反馈使用这些工具中的 Bug、帮着宣传你觉得优秀的项目、Star 项目⭐️。同时你将学习到更多编程知识、提高自己的编程技巧、发现自己的**兴趣**。 ->兴趣是最好的老师,而**《HelloGithub》** 就是帮你找到兴趣! +🎉 最后 [HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 这个项目就诞生了 🎉 +--- +### 往期回顾 +- [第 12 期](https://github.com/521xueweihan/HelloGitHub/blob/master/12/HelloGitHub12.md) +- [第 11 期](https://github.com/521xueweihan/HelloGitHub/blob/master/11/HelloGitHub11.md) +- [第 10 期](https://github.com/521xueweihan/HelloGitHub/blob/master/10/HelloGitHub10.md) +- [第 09 期](https://github.com/521xueweihan/HelloGitHub/blob/master/09/HelloGitHub09.md) +- [第 08 期](https://github.com/521xueweihan/HelloGitHub/blob/master/08/HelloGitHub08.md) +- [第 07 期](https://github.com/521xueweihan/HelloGitHub/blob/master/07/HelloGitHub07.md) +- [第 06 期](https://github.com/521xueweihan/HelloGitHub/blob/master/06/HelloGitHub06.md) +- [第 05 期](https://github.com/521xueweihan/HelloGitHub/blob/master/05/HelloGitHub05.md) +- [第 04 期](https://github.com/521xueweihan/HelloGitHub/blob/master/04/HelloGitHub04.md) +- [第 03 期](https://github.com/521xueweihan/HelloGitHub/blob/master/03/HelloGitHub03.md) +- [第 02 期](https://github.com/521xueweihan/HelloGitHub/blob/master/02/HelloGitHub02.md) +- [第 01 期](https://github.com/521xueweihan/HelloGitHub/blob/master/01/HelloGitHub01.md) -### 声明 -不管你事大神,还是小菜鸟,只要你有你发现好的开源项目,都可以联系我,让更多人知道:“还有这么有意思的项目!编程可以这么酷!” +--- -### 联系方式 -- 邮箱:595666367@qq.com +## 声明 +如果你发现了好玩、有意义的开源项目,[点击这里](https://github.com/521xueweihan/HelloGitHub/issues/new) 分享你觉得有意思的项目。 -- 博客园:[削微寒](http://www.cnblogs.com/xueweihan/) +- 分享项目格式:`项目名称——项目地址:项目描述(中文),追求完美👉项目上手 demo、截图` -- 或者直接提Pr,Issues +或许你分享的项目会让别人由衷的感慨:“原来还有这么有意思的项目!编程可以这么酷!” + +**欢迎转载,请注明出处和作者,同时保留声明和联系方式。** + +## 联系方式 +- [削微寒](https://github.com/521xueweihan) + +- [博客园](http://www.cnblogs.com/xueweihan/) + +- [知乎专栏](https://zhuanlan.zhihu.com/hellogithub) diff --git a/make_content.py b/make_content.py new file mode 100644 index 00000000..2018a389 --- /dev/null +++ b/make_content.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python +# -*- coding:utf-8 -*- +# +# Author : XueWeiHan +# Date : 16/10/21 下午1:41 +# Desc : HelloGitHub项目——生成月刊脚本 +""" +该脚本主要用于:生成月刊 + +《HelloGitHub》月刊每期内容都遵循统一格式,如果需要对通用部分的内容进行修改,需要手动修改每一 +期的内容,这是不优雅的。 + +所以,我打算写个脚本,用于生成月刊,这样如果修改了通用内容部分,就只需要重新生成月刊,而不需要 +手动修改已发布的所有期的内容。 +""" +import sys +import os + +CONTENT_FLAG = '{{ hello_github_content }}' +NUM_FLAG = '{{ hello_github_num }}' + + +class InputError(Exception): + def __init__(self, message): + self.message = message + + def __str__(self): + return repr(self.message) + + +def check_path(path): + """ + 检查路径是否存在 + """ + if not os.path.exists(path): + print 'not exist: {path}'.format(path=path) + return False + else: + return True + + +def read_file(input_path): + with open(input_path, 'r') as fb: + return fb.read() + + +def write_file(output_path, output_data): + with open(output_path, 'w') as fb: + fb.write(output_data) + + +def make_content(num): + template_path = os.path.join(os.path.abspath(os.curdir), 'template.md') + output_path = os.path.join(os.path.abspath(os.curdir), num) + content_path = os.path.join(output_path, 'content'+num+'.md') + if not (check_path(content_path) and check_path(template_path)): + # 如果 content 和 template 文件不存在 + return None + temple_data = read_file(template_path).replace(NUM_FLAG, num) + + content_data = read_file(content_path) + + output_data = temple_data.replace(CONTENT_FLAG, content_data) + + write_file(os.path.join(output_path, 'HelloGitHub{num}.md'.format(num=num)), output_data) + print 'Make 《GitHub月刊{num}》 successful!'.format(num=num) + + +def make_all_content(): + dir_list = os.listdir(os.path.abspath(os.curdir)) + for fi_dir in dir_list: + if os.path.isdir(fi_dir) and 'script' not in fi_dir: + make_content(fi_dir) + + +def main(): + """ + 入口方法 + """ + input_list = sys.argv # 获取输入的参数 + + if len(input_list) != 2: + raise InputError('Input error: Need a param') + else: + try: + input_arg = input_list[1] + except Exception: + raise InputError('Input error: Must be number') + if len(input_arg) == 1: + make_content('0' + input_arg) + elif input_arg == 'all': + make_all_content() + else: + make_content(input_arg) + +if __name__ == '__main__': + main() diff --git a/script/github_bot/README.md b/script/github_bot/README.md new file mode 100644 index 00000000..0d9a0e74 --- /dev/null +++ b/script/github_bot/README.md @@ -0,0 +1,55 @@ +# GitHub Bot +>兴趣是最好的老师,[HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 就是帮你找到兴趣! + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) + +## 运行步骤 +这个脚本主要使用收集 GitHub 上优秀的项目,用于编写[《HelloGitHub 月刊》](https://github.com/521xueweihan/HelloGitHub),后面还会持续开发~ + +1. 安装依赖:`pip install -r requirements.txt` +2. 配置脚本中相关参数: + ``` + # github帐号 + ACCOUNT = { + 'username': '', + 'password': '' + } + + # 发送邮件,邮箱的信息 + MAIL = { + 'mail': '', # 发送邮件的邮箱地址 + 'username': '', + 'password': '', + 'host': 'smtp.qq.com', + 'port': 465 + } + + # 接收邮件的邮箱地址 + RECEIVERS = [] + # qq邮件服务文档:http://service.mail.qq.com/cgi-bin/help?id=28 + ``` + +**最后**:`python github_bot.py` + +## 开发日志 +#### 2017-4-6 +1. GitHub Api 更新,event 最多获取 300 条 +2. 新注册帐号 521hellogithub 用于获取每天的数据 + +#### 2017-3-28 +增加收集项目 star 临界值 + +#### 2016-9-29 +- GitHub 今日热点项目不统计自己的项目 +- 错误日志放到脚本的同目录下 + +#### 2016-9-24 +实现根据 star 数量,从高到低展示。 + +#### 2016-9-5 +实现请求 GitHub Api 获取关注的用户 star 的项目、过滤内容、定时发邮件 + +## Todo +1. 获取 explore 页的数据 +2. 异步请求获取 star 数 +3. 自己项目的数据统计 diff --git a/script/github_bot/github_bot.py b/script/github_bot/github_bot.py new file mode 100644 index 00000000..0ea1673e --- /dev/null +++ b/script/github_bot/github_bot.py @@ -0,0 +1,213 @@ +#!/usr/bin/env python +# -*- coding:utf-8 -*- +# +# Author : XueWeiHan +# E-mail : 595666367@qq.com +# Date : 16/8/30 下午10:43 +# Desc : Github Bot +import os +import logging +import smtplib +import datetime +from operator import itemgetter +from email.mime.text import MIMEText +from email.header import Header + +import requests + +logging.basicConfig( + level=logging.WARNING, + filename=os.path.join(os.path.dirname(__file__), 'bot_log.txt'), + filemode='a', + format='%(name)s %(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s' +) +logger = logging.getLogger('Bot') # 设置log名称 +# github帐号 +ACCOUNT = { + 'username': '', + 'password': '' +} + +API = { + 'events': 'https://api.github.com/users/{username}/received_events'.format(username=ACCOUNT['username']) +} + +# 发送邮件,邮箱的信息 +MAIL = { + 'mail': '', # 发送邮件的邮箱地址 + 'username': '', + 'password': '', + 'host': 'smtp.qq.com', + 'port': 465 +} + +# 接收邮件的邮箱地址 +RECEIVERS = [] + +# 几天前 +DAY = 1 + +# 项目stars临界值 +STARS = 100 + +# qq邮件服务文档:http://service.mail.qq.com/cgi-bin/help?id=28 + + +CONTENT_FORMAT = """ + + + + + + + + + {project_info_string} +
头像用户名项目名starred 日期项目 star 数量
+""" + + +def get_data(page=1): + """ + 从目标源获取数据 + https://developer.github.com/v3/activity/events/ + GitHub 规定:默认每页 30 条,最多 300 条目 + """ + + args = '?page={page}'.format(page=page) + + response = requests.get(API['events']+args, + auth=(ACCOUNT['username'], ACCOUNT['password'])) + status_code = response.status_code + if status_code == 200: + resp_json = response.json() + return resp_json + else: + logging.error('请求 event api 失败:', status_code) + return [] + + +def get_all_data(): + """ + 获取全部 300 条的数据 + https://developer.github.com/v3/activity/events/ + GitHub 规定:默认每页 30 条,最多 300 条目 + """ + all_data_list = [] + for i in range(10): + response_json = get_data(i+1) + if response_json: + all_data_list.extend(response_json) + return all_data_list + + +def check_condition(data): + """ + 过滤条件 + """ + create_time = datetime.datetime.strptime( + data['created_at'], "%Y-%m-%dT%H:%M:%SZ") + datetime.timedelta(hours=8) + date_condition = create_time >= (datetime.datetime.now() + - datetime.timedelta(days=DAY)) + if (data['type'] == 'WatchEvent') and date_condition: + # 不统计自己项目的star事件 + if data['payload']['action'] == 'started' and \ + ACCOUNT['username'] not in data['repo']['name']: + data['date_time'] = create_time.strftime("%Y-%m-%d %H:%M:%S") + return True + else: + return False + + +def analyze(json_data): + """ + 分析获取的数据 + :return 符合过滤条件的数据 + """ + result_data = [] + for fi_data in json_data: + if check_condition(fi_data): + result_data.append(fi_data) + return result_data + + +def get_stars(data): + """ + 获取stars数量,同时过滤掉stars数量少的项目 + """ + project_info_list = [] + for fi_data in data: + project_info = dict() + project_info['user'] = fi_data['actor']['login'] + project_info['user_url'] = 'https://github.com/' + project_info['user'] + project_info['avatar_url'] = fi_data['actor']['avatar_url'] + project_info['repo_name'] = fi_data['repo']['name'] + project_info['repo_url'] = 'https://github.com/' + project_info['repo_name'] + project_info['date_time'] = fi_data['date_time'] + try: + repo_stars = requests.get(fi_data['repo']['url'], timeout=2).json() + if repo_stars: + project_info['repo_stars'] = int(repo_stars['stargazers_count']) + else: + project_info['repo_stars'] = -1 + except Exception as e: + project_info['repo_stars'] = -1 + logger.warning(u'获取:{} 项目星数失败——{}'.format( + project_info['repo_name'], e)) + finally: + if project_info['repo_stars'] >= STARS or project_info['repo_stars'] == -1: + # 过滤掉star数量低于临界值的项目 + project_info_list.append(project_info) + project_info_list = sorted(project_info_list, key=itemgetter('repo_stars'), reverse=True) + return project_info_list + + +def make_content(): + """ + 生成发布邮件的内容 + """ + json_data = get_all_data() + data = analyze(json_data) + content = [] + project_info_list = get_stars(data) + for project_info in project_info_list: + project_info_string = """ + + {user} + {repo_name} + {date_time} + {repo_stars} + + """.format(**project_info) + content.append(project_info_string) + return content + + +def send_email(receivers, email_content): + """ + 发送邮件 + """ + sender = MAIL['mail'] # 发送邮件的邮箱 + receivers = receivers # 接收邮件的邮箱,可设置多个 + + # 三个参数:第一个为文本内容,第二个 html 设置文本格式,第三个 utf-8 设置编码 + message = MIMEText( + CONTENT_FORMAT.format(project_info_string=''.join(email_content)), + 'html', 'utf-8' + ) + message['From'] = Header(u'GitHub 机器人', 'utf-8') + message['To'] = Header(u'削微寒', 'utf-8') + + subject = u'今日 GitHub 热点' # 设置邮件主题 + message['Subject'] = Header(subject, 'utf-8') + try: + smtp_obj = smtplib.SMTP_SSL() # qq邮箱要求是https连接,所以需要用SMTP_SSL + smtp_obj.connect(MAIL['host'], MAIL['port']) # 设置SMTP地址和端口号 + smtp_obj.login(MAIL['username'], MAIL['password']) + smtp_obj.sendmail(sender, receivers, message.as_string()) + except smtplib.SMTPException as e: + logger.error(u"无法发送邮件: {}".format(e)) + +if __name__ == '__main__': + content = make_content() + send_email(RECEIVERS, content) diff --git a/script/github_bot/requirements.txt b/script/github_bot/requirements.txt new file mode 100644 index 00000000..f2293605 --- /dev/null +++ b/script/github_bot/requirements.txt @@ -0,0 +1 @@ +requests diff --git a/script/make_content/README.md b/script/make_content/README.md new file mode 100644 index 00000000..614ace46 --- /dev/null +++ b/script/make_content/README.md @@ -0,0 +1,17 @@ +# GitHub MakeContent +>兴趣是最好的老师,[《HelloGitHub》](https://github.com/521xueweihan/HelloGitHub)就是帮你找到兴趣! + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) + + +## 运行步骤 +后面的月刊都通过这个脚本生成,这样如果通用内容部分需要修改,就只需要使用脚本重新生成月刊,而不需 +要手动修改已发布的所有期的内容。后面还会持续开发~ + +``` +python make_content.py 期数/all(重新生成所有期) +``` +注意:需要放在本项目的根目录下运行该脚本 + +## TODO +- 自动生成 README diff --git a/script/make_content/make_content.py b/script/make_content/make_content.py new file mode 100644 index 00000000..3bed6419 --- /dev/null +++ b/script/make_content/make_content.py @@ -0,0 +1,99 @@ +#!/usr/bin/env python +# -*- coding:utf-8 -*- +# +# Author : XueWeiHan +# E-mail : 595666367@qq.com +# Date : 16/10/21 下午1:41 +# Desc : HelloGitHub项目——生成月刊脚本 +""" +该脚本主要用于:生成月刊 + +《HelloGitHub》月刊每期内容都遵循统一格式,如果需要对通用部分的内容进行修改,需要手动修改每一 +期的内容,这是不优雅的。 + +所以,我打算写个脚本,用于生成月刊,这样如果修改了通用内容部分,就只需要重新生成月刊,而不需要 +手动修改已发布的所有期的内容。 +""" +import sys +import os + +CONTENT_FLAG = '{{ hello_github_content }}' +NUM_FLAG = '{{ hello_github_num }}' + + +class InputError(Exception): + def __init__(self, message): + self.message = message + + def __str__(self): + return repr(self.message) + + +def check_path(path): + """ + 检查路径是否存在 + """ + if not os.path.exists(path): + print 'not exist: {path}'.format(path=path) + return False + else: + return True + + +def read_file(input_path): + with open(input_path, 'r') as fb: + return fb.read() + + +def write_file(output_path, output_data): + with open(output_path, 'w') as fb: + fb.write(output_data) + + +def make_content(num): + template_path = os.path.join(os.path.abspath(os.curdir), 'template.md') + output_path = os.path.join(os.path.abspath(os.curdir), num) + content_path = os.path.join(output_path, 'content'+num+'.md') + if not (check_path(content_path) and check_path(template_path)): + # 如果 content 和 template 文件不存在 + return None + temple_data = read_file(template_path).replace(NUM_FLAG, num) + + content_data = read_file(content_path) + + output_data = temple_data.replace(CONTENT_FLAG, content_data) + + write_file(os.path.join(output_path, 'HelloGitHub{num}.md'.format(num=num)), output_data) + print 'Make 《GitHub月刊{num}》 successful!'.format(num=num) + + +def make_all_content(): + dir_list = os.listdir(os.path.abspath(os.curdir)) + for fi_dir in dir_list: + # 忽略‘script’的目录 + if os.path.isdir(fi_dir) and 'script' not in fi_dir: + make_content(fi_dir) + + +def main(): + """ + 入口方法 + """ + input_list = sys.argv # 获取输入的参数 + + if len(input_list) != 2: + raise InputError('Input error: Need a param') + else: + try: + input_arg = input_list[1] + except Exception: + raise InputError('Input error: Must be number') + if len(input_arg) == 1: + make_content('0' + input_arg) + elif input_arg == 'all': + make_all_content() + else: + make_content(input_arg) + +if __name__ == '__main__': + main() diff --git a/template.md b/template.md new file mode 100644 index 00000000..d937f4c7 --- /dev/null +++ b/template.md @@ -0,0 +1,34 @@ +# 《HelloGitHub》第 {{ hello_github_num }} 期 +>兴趣是最好的老师,[HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 就是帮你找到兴趣! + +![](https://github.com/521xueweihan/HelloGitHub/blob/master/01/img/hello-github.jpg) + +## 简介 +最开始我只是想把自己在浏览 [GitHub](https://github.com/) 过程中,发现的有意思、高质量、容易上手的项目收集起来,这样便于以后查找和学习。后来一想,如果给这些 GitHub 项目都加上简单的效果图和一些通俗易懂的中文介绍。应该能够帮助到我这样的新手激发兴趣去参与、学习这些优秀、好玩的开源项目。 + +所以,我就做了一个面向**编程新手**、**热爱编程**、**对开源社区感兴趣** 的人群的月刊,月刊的内容包括:**各种编程语言的项目**、**各种让生活变得更美好的工具**、**书籍、学习笔记、教程等**。这些项目都是非常容易上手,而且非常 Cool,主要是希望大家能动手用起来,加入到**开源社区**中。会编程的可以贡献代码,不会编程的可以反馈使用这些工具中的 Bug、帮着宣传你觉得优秀的项目、Star 项目⭐️。同时你将学习到更多编程知识、提高自己的编程技巧、发现自己的**兴趣**。 + +🎉 最后 [HelloGitHub](https://github.com/521xueweihan/HelloGitHub) 这个项目就诞生了 🎉 + +--- +|**以下为本期内容**|每个月 28 号发布最新一期,首发在我的 [GitHub](https://github.com/521xueweihan) 上|[点击查看往期内容](https://github.com/521xueweihan/HelloGitHub#往期回顾)| + +{{ hello_github_content }} + +--- + +## 声明 +如果你发现了好玩、有意义的开源项目,[点击这里](https://github.com/521xueweihan/HelloGitHub/issues/new) 分享你觉得有意思的项目。 + +- 分享项目格式:`项目名称——项目地址:项目描述(中文),追求完美👉项目上手 demo、截图` + +或许你分享的项目会让别人由衷的感慨:“原来还有这么有意思的项目!编程可以这么酷!” + +**欢迎转载,请注明出处和作者,同时保留声明和联系方式。** + +## 联系方式 +- [削微寒](https://github.com/521xueweihan) + +- [博客园](http://www.cnblogs.com/xueweihan/) + +- [知乎专栏](https://zhuanlan.zhihu.com/hellogithub)