├── fabfile.py ├── tests └── __init__.py ├── codingpy ├── templates │ ├── tag.html │ ├── includes │ │ ├── items.html │ │ ├── music_player.html │ │ ├── adsense.html │ │ ├── follow_us.html │ │ ├── tags.html │ │ ├── books-docs.html │ │ ├── sidebar.html │ │ ├── glide.html │ │ ├── reward.html │ │ ├── popular.html │ │ ├── navbar.html │ │ ├── item.html │ │ ├── footer.html │ │ └── comment.html │ ├── admin │ │ ├── a_edit.html │ │ ├── a_create.html │ │ └── index.html │ ├── errors │ │ ├── 403.html │ │ ├── 404.html │ │ ├── 500.html │ │ └── 502.html │ ├── wtf.html │ ├── sitemap.xml │ ├── rssfeed.xml │ ├── login.html │ ├── register.html │ ├── sitemap.xsl │ ├── index.html │ └── layout.html ├── utils │ ├── __init__.py │ ├── widgets.py │ ├── helpers.py │ ├── filters.py │ └── upload.py ├── controllers │ ├── __init__.py │ ├── wechat.py │ └── account.py ├── static │ ├── favicon.ico │ ├── gen │ │ ├── .DS_Store │ │ └── themes │ │ │ ├── basic │ │ │ └── assets │ │ │ │ └── fonts │ │ │ │ ├── icons.eot │ │ │ │ ├── icons.ttf │ │ │ │ └── icons.woff │ │ │ ├── default │ │ │ └── assets │ │ │ │ ├── fonts │ │ │ │ ├── icons.eot │ │ │ │ ├── icons.otf │ │ │ │ ├── icons.ttf │ │ │ │ ├── icons.woff │ │ │ │ └── icons.woff2 │ │ │ │ └── images │ │ │ │ └── flags.png │ │ │ └── github │ │ │ └── assets │ │ │ └── fonts │ │ │ ├── octicons.ttf │ │ │ ├── octicons.woff │ │ │ └── octicons-local.ttf │ ├── images │ │ ├── flask.png │ │ ├── logo.png │ │ ├── digitalocean.png │ │ ├── python-favico.ico │ │ └── rolling.svg │ ├── vendor │ │ ├── .DS_Store │ │ ├── semantic-ui │ │ │ ├── themes │ │ │ │ ├── basic │ │ │ │ │ └── assets │ │ │ │ │ │ └── fonts │ │ │ │ │ │ ├── icons.eot │ │ │ │ │ │ ├── icons.ttf │ │ │ │ │ │ └── icons.woff │ │ │ │ ├── default │ │ │ │ │ └── assets │ │ │ │ │ │ ├── fonts │ │ │ │ │ │ ├── icons.eot │ │ │ │ │ │ ├── icons.otf │ │ │ │ │ │ ├── icons.ttf │ │ │ │ │ │ ├── icons.woff │ │ │ │ │ │ └── icons.woff2 │ │ │ │ │ │ └── images │ │ │ │ │ │ └── flags.png │ │ │ │ └── github │ │ │ │ │ └── assets │ │ │ │ │ └── fonts │ │ │ │ │ ├── octicons.ttf │ │ │ │ │ ├── octicons.woff │ │ │ │ │ └── octicons-local.ttf │ │ │ └── components │ │ │ │ ├── sticky.min.css │ │ │ │ ├── tab.min.css │ │ │ │ ├── rail.min.css │ │ │ │ ├── breadcrumb.min.css │ │ │ │ ├── video.min.css │ │ │ │ ├── nag.min.css │ │ │ │ ├── sticky.css │ │ │ │ ├── site.min.css │ │ │ │ ├── embed.min.css │ │ │ │ ├── container.min.css │ │ │ │ ├── shape.min.css │ │ │ │ ├── ad.min.css │ │ │ │ ├── tab.css │ │ │ │ ├── reset.min.css │ │ │ │ ├── dimmer.min.css │ │ │ │ ├── comment.min.css │ │ │ │ ├── breadcrumb.css │ │ │ │ ├── rail.css │ │ │ │ ├── video.css │ │ │ │ ├── colorize.min.js │ │ │ │ ├── nag.css │ │ │ │ ├── loader.min.css │ │ │ │ ├── image.min.css │ │ │ │ ├── site.css │ │ │ │ ├── feed.min.css │ │ │ │ ├── container.css │ │ │ │ ├── shape.css │ │ │ │ ├── embed.css │ │ │ │ ├── popup.min.css │ │ │ │ ├── dimmer.css │ │ │ │ ├── rating.min.js │ │ │ │ └── search.min.css │ │ ├── glide │ │ │ └── css │ │ │ │ ├── glide.core.min.css │ │ │ │ ├── glide.theme.min.css │ │ │ │ ├── glide.core.css │ │ │ │ └── glide.theme.css │ │ └── normalize.min.css │ ├── thumbnails │ │ └── pycharm_logo.jpg │ ├── books │ │ └── thinkpython2 │ │ │ ├── objects.inv │ │ │ ├── _static │ │ │ ├── up.png │ │ │ ├── down.png │ │ │ ├── file.png │ │ │ ├── minus.png │ │ │ ├── plus.png │ │ │ ├── comment.png │ │ │ ├── favicon.ico │ │ │ ├── ajax-loader.gif │ │ │ ├── up-pressed.png │ │ │ ├── comment-close.png │ │ │ ├── down-pressed.png │ │ │ ├── comment-bright.png │ │ │ ├── fonts │ │ │ │ ├── Lato-Bold.ttf │ │ │ │ ├── Lato-Regular.ttf │ │ │ │ ├── RobotoSlab-Bold.ttf │ │ │ │ ├── Inconsolata-Bold.ttf │ │ │ │ ├── Inconsolata-Regular.ttf │ │ │ │ ├── RobotoSlab-Regular.ttf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ └── fontawesome-webfont.woff │ │ │ ├── css │ │ │ │ └── badge_only.css │ │ │ ├── pygments.css │ │ │ └── translations.js │ │ │ ├── _images │ │ │ ├── banana.png │ │ │ ├── card1.png │ │ │ ├── class1.png │ │ │ ├── dict1.png │ │ │ ├── dict2.png │ │ │ ├── koch.png │ │ │ ├── list1.png │ │ │ ├── list2.png │ │ │ ├── list3.png │ │ │ ├── pies.png │ │ │ ├── point.png │ │ │ ├── stack.png │ │ │ ├── stack2.png │ │ │ ├── stack3.png │ │ │ ├── stack5.png │ │ │ ├── state2.png │ │ │ ├── state4.png │ │ │ ├── time.png │ │ │ ├── towers.png │ │ │ ├── tuple1.png │ │ │ ├── assign2.png │ │ │ ├── flowers.png │ │ │ ├── fibonacci.png │ │ │ ├── liststate.png │ │ │ ├── rectangle.png │ │ │ └── rectangle2.png │ │ │ └── _sources │ │ │ ├── index.txt │ │ │ └── foreword.txt │ ├── robots.txt │ ├── js │ │ └── lazyloadxt.bg.js │ └── codehilite.css ├── forms │ ├── __init__.py │ └── account.py ├── __init__.py ├── decorators.py ├── config.py └── _base.py ├── README.md ├── .travis.yml ├── set_envs.sh ├── codingpy.ini ├── nginx.conf ├── wsgi.py ├── requirements.txt ├── .gitignore └── manage.py /fabfile.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingpy/templates/tag.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingpy/utils/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingpy/controllers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # codingpy.com 2 | A site about Python, built with Flask, PostgreSQL, and Semantic-UI. 3 | -------------------------------------------------------------------------------- /codingpy/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/favicon.ico -------------------------------------------------------------------------------- /codingpy/static/gen/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/gen/.DS_Store -------------------------------------------------------------------------------- /codingpy/static/images/flask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/images/flask.png -------------------------------------------------------------------------------- /codingpy/static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/images/logo.png -------------------------------------------------------------------------------- /codingpy/static/vendor/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/vendor/.DS_Store -------------------------------------------------------------------------------- /codingpy/templates/includes/items.html: -------------------------------------------------------------------------------- 1 | {% for article in all_articles %} 2 | {% include 'includes/item.html' %} 3 | {% endfor %} -------------------------------------------------------------------------------- /codingpy/forms/__init__.py: -------------------------------------------------------------------------------- 1 | #!usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from .account import LoginForm, RegistrationForm 5 | -------------------------------------------------------------------------------- /codingpy/static/images/digitalocean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/images/digitalocean.png -------------------------------------------------------------------------------- /codingpy/static/images/python-favico.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/images/python-favico.ico -------------------------------------------------------------------------------- /codingpy/static/thumbnails/pycharm_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/thumbnails/pycharm_logo.jpg -------------------------------------------------------------------------------- /codingpy/templates/admin/a_edit.html: -------------------------------------------------------------------------------- 1 | {% extends 'admin/model/edit.html' %} 2 | 3 | {% block body %} 4 | {{ super() }} 5 | 6 | 7 | {% endblock %} -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/objects.inv -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/up.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/banana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/banana.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/card1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/card1.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/class1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/class1.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/dict1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/dict1.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/dict2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/dict2.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/koch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/koch.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/list1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/list1.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/list2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/list2.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/list3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/list3.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/pies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/pies.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/point.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/stack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/stack.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/stack2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/stack2.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/stack3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/stack3.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/stack5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/stack5.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/state2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/state2.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/state4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/state4.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/time.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/towers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/towers.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/tuple1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/tuple1.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/down.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/file.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/minus.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/plus.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/assign2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/assign2.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/flowers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/flowers.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/comment.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/favicon.ico -------------------------------------------------------------------------------- /codingpy/static/gen/themes/basic/assets/fonts/icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/gen/themes/basic/assets/fonts/icons.eot -------------------------------------------------------------------------------- /codingpy/static/gen/themes/basic/assets/fonts/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/gen/themes/basic/assets/fonts/icons.ttf -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/fibonacci.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/fibonacci.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/liststate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/liststate.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/rectangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/rectangle.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_images/rectangle2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_images/rectangle2.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/ajax-loader.gif -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/up-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/up-pressed.png -------------------------------------------------------------------------------- /codingpy/static/gen/themes/basic/assets/fonts/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/gen/themes/basic/assets/fonts/icons.woff -------------------------------------------------------------------------------- /codingpy/static/gen/themes/default/assets/fonts/icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/gen/themes/default/assets/fonts/icons.eot -------------------------------------------------------------------------------- /codingpy/static/gen/themes/default/assets/fonts/icons.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/gen/themes/default/assets/fonts/icons.otf -------------------------------------------------------------------------------- /codingpy/static/gen/themes/default/assets/fonts/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/gen/themes/default/assets/fonts/icons.ttf -------------------------------------------------------------------------------- /codingpy/static/gen/themes/default/assets/fonts/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/gen/themes/default/assets/fonts/icons.woff -------------------------------------------------------------------------------- /codingpy/static/gen/themes/default/assets/images/flags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/gen/themes/default/assets/images/flags.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/comment-close.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/down-pressed.png -------------------------------------------------------------------------------- /codingpy/static/gen/themes/default/assets/fonts/icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/gen/themes/default/assets/fonts/icons.woff2 -------------------------------------------------------------------------------- /codingpy/static/gen/themes/github/assets/fonts/octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/gen/themes/github/assets/fonts/octicons.ttf -------------------------------------------------------------------------------- /codingpy/static/gen/themes/github/assets/fonts/octicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/gen/themes/github/assets/fonts/octicons.woff -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/comment-bright.png -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/fonts/Lato-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/fonts/Lato-Bold.ttf -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/fonts/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/fonts/Lato-Regular.ttf -------------------------------------------------------------------------------- /codingpy/static/gen/themes/github/assets/fonts/octicons-local.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/gen/themes/github/assets/fonts/octicons-local.ttf -------------------------------------------------------------------------------- /codingpy/templates/includes/music_player.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/fonts/RobotoSlab-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/fonts/RobotoSlab-Bold.ttf -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/fonts/Inconsolata-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/fonts/Inconsolata-Bold.ttf -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/themes/basic/assets/fonts/icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/vendor/semantic-ui/themes/basic/assets/fonts/icons.eot -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/themes/basic/assets/fonts/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/vendor/semantic-ui/themes/basic/assets/fonts/icons.ttf -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/fonts/Inconsolata-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/fonts/Inconsolata-Regular.ttf -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/fonts/RobotoSlab-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/fonts/RobotoSlab-Regular.ttf -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/books/thinkpython2/_static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/themes/basic/assets/fonts/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/vendor/semantic-ui/themes/basic/assets/fonts/icons.woff -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/themes/default/assets/fonts/icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/vendor/semantic-ui/themes/default/assets/fonts/icons.eot -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/themes/default/assets/fonts/icons.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/vendor/semantic-ui/themes/default/assets/fonts/icons.otf -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/themes/default/assets/fonts/icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/vendor/semantic-ui/themes/default/assets/fonts/icons.ttf -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/themes/default/assets/fonts/icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/vendor/semantic-ui/themes/default/assets/fonts/icons.woff -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/themes/default/assets/images/flags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/vendor/semantic-ui/themes/default/assets/images/flags.png -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/themes/default/assets/fonts/icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/vendor/semantic-ui/themes/default/assets/fonts/icons.woff2 -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/themes/github/assets/fonts/octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/vendor/semantic-ui/themes/github/assets/fonts/octicons.ttf -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/themes/github/assets/fonts/octicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/vendor/semantic-ui/themes/github/assets/fonts/octicons.woff -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "3.4" 4 | # command to install dependencies 5 | install: "pip install -r requirements.txt" 6 | # command to run tests 7 | script: 8 | - python manage.py test 9 | -------------------------------------------------------------------------------- /codingpy/static/robots.txt: -------------------------------------------------------------------------------- 1 | # 2 | # robots.txt for http://www.codingpy.com/ 3 | # Author: EarlGrey@codingpy.com 4 | # crawler not permitted to index /admin 5 | # 6 | 7 | User-agent: * 8 | Disallow: */page/2 9 | -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/themes/github/assets/fonts/octicons-local.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/earlgrey0103/codingpy/HEAD/codingpy/static/vendor/semantic-ui/themes/github/assets/fonts/octicons-local.ttf -------------------------------------------------------------------------------- /codingpy/templates/errors/403.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block main %} 4 | 5 |
6 | 7 |

对不起,页面出错了。

8 | 9 |
10 | 11 | {% endblock main %} -------------------------------------------------------------------------------- /codingpy/templates/errors/404.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block main %} 4 | 5 |
6 | 7 |

对不起,页面出错了。

8 | 9 |
10 | 11 | {% endblock main %} -------------------------------------------------------------------------------- /codingpy/templates/errors/500.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block main %} 4 | 5 |
6 | 7 |

对不起,页面出错了。

8 | 9 |
10 | 11 | {% endblock main %} -------------------------------------------------------------------------------- /codingpy/templates/errors/502.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block main %} 4 | 5 |
6 | 7 |

对不起,页面出错了。

8 | 9 |
10 | 11 | {% endblock main %} -------------------------------------------------------------------------------- /codingpy/templates/admin/a_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'admin/model/create.html' %} 2 | 3 | {% block body %} 4 | {{ super() }} 5 | {# 6 | #} 7 | 8 | {% endblock %} -------------------------------------------------------------------------------- /set_envs.sh: -------------------------------------------------------------------------------- 1 | export MAIL_USERNAME = '' 2 | export MAIL_PASSWORD = '' 3 | 4 | export APP_ADMIN = 'EarlGrey@codingpy' 5 | 6 | export COS_APPID = 10067526 7 | export COS_SECRET_ID = 'AKIDOflfT8R1DJF2thdwJWYRFxX6c5iHY1JW' 8 | export COS_SECRET_KEY = 'A9C5pOo5Sp8I9wnP7kBQUtEXiiZHqXEA' -------------------------------------------------------------------------------- /codingpy/templates/wtf.html: -------------------------------------------------------------------------------- 1 | {% macro render_field(field) %} 2 | {{ field(**kwargs)|safe }} 3 | 4 | {% if field.errors %} 5 | 10 | {% endif %} 11 | {% endmacro %} -------------------------------------------------------------------------------- /codingpy/__init__.py: -------------------------------------------------------------------------------- 1 | #!usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from ._base import * 5 | from .models import * 6 | from .ext import * 7 | 8 | __all__ = (_base.__all__ + models.__all__ + ext.__all__) 9 | 10 | 11 | @login_manager.user_loader 12 | def load_user(user_id): 13 | return User.query.get(int(user_id)) 14 | -------------------------------------------------------------------------------- /codingpy/templates/includes/adsense.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | -------------------------------------------------------------------------------- /codingpy/templates/includes/follow_us.html: -------------------------------------------------------------------------------- 1 |
2 | 5 | 扫码关注编程派的微信公众号 6 |
7 | -------------------------------------------------------------------------------- /codingpy/templates/includes/tags.html: -------------------------------------------------------------------------------- 1 |
2 | 5 | {# 按标签下文章数量排序 #} 6 |
7 | 8 | {% for tag in tags %} 9 | {{ tag.name }} 10 | {% endfor %} 11 | 12 |
13 |
-------------------------------------------------------------------------------- /codingpy.ini: -------------------------------------------------------------------------------- 1 | [uwsgi] 2 | 3 | app = application 4 | module = wsgi 5 | callable = application 6 | 7 | gevent = 100 8 | master = true 9 | processes = 5 10 | async = 100 11 | 12 | # destroy workers blocked for more than 30 seconds 13 | harakiri = 30 14 | 15 | memory-report = true 16 | 17 | socket = /tmp/codingpy.sock 18 | chmod-socket = 660 19 | vacuum = true 20 | 21 | logto = codingpy.log 22 | logformat = "%(proto) %(method) %(uri)" returning with status - %(status) - [%(msecs)] 23 | 24 | die-on-term = true 25 | 26 | # only for use in development 27 | #python-autoreload = 1 28 | -------------------------------------------------------------------------------- /codingpy/static/images/rolling.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingpy/static/js/lazyloadxt.bg.js: -------------------------------------------------------------------------------- 1 | /*! Lazy Load XT v1.0.6 2014-11-19 2 | * http://ressio.github.io/lazy-load-xt 3 | * (C) 2014 RESS.io 4 | * Licensed under MIT */ 5 | 6 | (function ($) { 7 | var options = $.lazyLoadXT, 8 | bgAttr = options.bgAttr || 'data-bg'; 9 | 10 | options.selector += ',[' + bgAttr + ']'; 11 | 12 | $(document).on('lazyshow', function (e) { 13 | var $this = $(e.target); 14 | $this 15 | .css('background-image', "url('" + $this.attr(bgAttr) + "')") 16 | .removeAttr(bgAttr); 17 | }); 18 | 19 | })(window.jQuery || window.Zepto || window.$); 20 | -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/sticky.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Sticky 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.sticky{position:static;-webkit-transition:none;transition:none;z-index:800}.ui.sticky.bound{position:absolute;left:auto;right:auto}.ui.sticky.fixed{position:fixed;left:auto;right:auto}.ui.sticky.bound.top,.ui.sticky.fixed.top{top:0;bottom:auto}.ui.sticky.bound.bottom,.ui.sticky.fixed.bottom{top:auto;bottom:0}.ui.native.sticky{position:-webkit-sticky;position:-moz-sticky;position:-ms-sticky;position:-o-sticky;position:sticky} -------------------------------------------------------------------------------- /codingpy/templates/includes/books-docs.html: -------------------------------------------------------------------------------- 1 |
2 | 5 |
6 |
7 |
8 | 9 | 12 |
13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /nginx.conf: -------------------------------------------------------------------------------- 1 | uwsgi_cache_path /var/tmp/cache levels=1:2 keys_zone=one:10m; 2 | 3 | server { 4 | listen 80; 5 | server_name 123.207.126.156; 6 | 7 | location / { 8 | uwsgi_cache one; 9 | uwsgi_cache_valid 200 1s; 10 | uwsgi_cache_key $request_uri; 11 | 12 | include uwsgi_params; 13 | uwsgi_pass unix:/tmp/codingpy.sock; 14 | } 15 | 16 | 17 | location /admin/ { 18 | include uwsgi_params; 19 | uwsgi_pass unix:/tmp/codingpy.sock; 20 | set $no_cache "1"; 21 | uwsgi_no_cache $no_cache; 22 | 23 | } 24 | 25 | location /books/thinkpython2/ { 26 | autoindex on; 27 | root /home/earlgrey/codingpy/codingpy/static; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /wsgi.py: -------------------------------------------------------------------------------- 1 | #!usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from gevent import monkey 5 | 6 | monkey.patch_all() 7 | 8 | from gevent.wsgi import WSGIServer 9 | import logging 10 | from logging.handlers import RotatingFileHandler 11 | 12 | from manage import app as application 13 | 14 | application.jinja_env.cache = {} 15 | 16 | if __name__ == '__main__': 17 | formatter = logging.Formatter( 18 | "[%(asctime)s] {%(pathname)s:%(lineno)d} %(levelname)s - %(message)s") 19 | handler = RotatingFileHandler( 20 | 'codingpy.log', maxBytes=10000, backupCount=1) 21 | handler.setLevel(logging.WARNING) 22 | handler.setFormatter(formatter) 23 | application.logger.addHandler(handler) 24 | 25 | http_server = WSGIServer(('', 8080), application) 26 | http_server.serve_forever() 27 | -------------------------------------------------------------------------------- /codingpy/utils/widgets.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from wtforms import fields, widgets 4 | 5 | 6 | # Define wtforms widget and field 7 | class MarkitupTextAreaWidget(widgets.TextArea): 8 | def __call__(self, field, **kwargs): 9 | kwargs.setdefault('class_', 'markitup') 10 | return super(MarkitupTextAreaWidget, self).__call__(field, **kwargs) 11 | 12 | 13 | class MarkitupTextAreaField(fields.TextAreaField): 14 | widget = MarkitupTextAreaWidget() 15 | 16 | 17 | # Define wtforms widget and field 18 | class CKTextAreaWidget(widgets.TextArea): 19 | def __call__(self, field, **kwargs): 20 | kwargs.setdefault('class_', 'ckeditor') 21 | return super(CKTextAreaWidget, self).__call__(field, **kwargs) 22 | 23 | 24 | class CKTextAreaField(fields.TextAreaField): 25 | widget = CKTextAreaWidget() 26 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | alembic==0.8.2 2 | blinker==1.4 3 | dominate==2.1.12 4 | Flask==0.10.1 5 | Flask-Admin==1.3.0 6 | Flask-Assets==0.11 7 | Flask-Bcrypt==0.6.2 8 | Flask-Cache==0.13.1 9 | Flask-DebugToolbar==0.10.0 10 | Flask-Login==0.3.0 11 | Flask-Mail==0.9.1 12 | Flask-Migrate==1.5.1 13 | Flask-Moment==0.5.1 14 | Flask-Script==2.0.5 15 | Flask-SQLAlchemy==2.0 16 | Flask-WTF==0.12 17 | gevent==1.1b5 18 | greenlet==0.4.9 19 | itsdangerous==0.24 20 | Jinja2==2.8 21 | Mako==1.0.2 22 | Markdown==2.6.2 23 | MarkupSafe==0.23 24 | Pillow==3.0.0 25 | psycopg2==2.6.1 26 | Pygments==2.0.2 27 | python-bcrypt==0.3.1 28 | python-editor==0.4 29 | pytz==2015.4 30 | redis==2.10.3 31 | requests==2.7.0 32 | six==1.9.0 33 | speaklater==1.3 34 | SQLAlchemy==1.0.8 35 | uWSGI==2.0.11.2 36 | webassets==0.11.1 37 | Werkzeug==0.10.4 38 | wheel==0.24.0 39 | WTForms==2.0.2 40 | -------------------------------------------------------------------------------- /codingpy/decorators.py: -------------------------------------------------------------------------------- 1 | #!usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | from threading import Thread 5 | from functools import wraps 6 | from flask import abort 7 | from flask.ext.login import current_user 8 | 9 | from .models import Permission 10 | 11 | 12 | def async(f): 13 | def wrapper(*args, **kwargs): 14 | thr = Thread(target=f, args=args, kwargs=kwargs) 15 | thr.start() 16 | return wrapper 17 | 18 | 19 | def permission_required(permission): 20 | def decorator(f): 21 | @wraps(f) 22 | def decorated_function(*args, **kwargs): 23 | if not current_user.can(permission): 24 | abort(403) 25 | return f(*args, **kwargs) 26 | return decorated_function 27 | return decorator 28 | 29 | 30 | def admin_required(f): 31 | return permission_required(Permission.ADMINISTER)(f) 32 | -------------------------------------------------------------------------------- /codingpy/templates/includes/sidebar.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /codingpy/templates/admin/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'admin/master.html' %} 2 | 3 | {% block body %} 4 |
5 | 6 |

最新文章

7 | 8 | 21 | 22 |
23 | 24 |
25 | 26 |

最新评论

27 | 28 |
29 | {% endblock %} -------------------------------------------------------------------------------- /codingpy/templates/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% for url in urlset -%} 5 | 6 | {{ url['loc']|safe }} 7 | 8 | {%- if 'lastmod' in url %} 9 | {{ url['lastmod'] }}{% endif %} 10 | {%- if 'changefreq' in url %} 11 | {{ url['changefreq'] }}{% endif %} 12 | {%- if 'priority' in url %} 13 | {{ url['priority'] }}{% endif %} 14 | {% endfor -%} 15 | 16 | -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/tab.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Tab 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.tab{display:none}.ui.tab.active,.ui.tab.open{display:block}.ui.tab.loading{position:relative;overflow:hidden;display:block;min-height:250px}.ui.tab.loading *{position:relative!important;left:-10000px!important}.ui.tab.loading.segment:before,.ui.tab.loading:before{position:absolute;content:'';top:100px;left:50%;margin:-1.25em 0 0 -1.25em;width:2.5em;height:2.5em;border-radius:500rem;border:.2em solid rgba(0,0,0,.1)}.ui.tab.loading.segment:after,.ui.tab.loading:after{position:absolute;content:'';top:100px;left:50%;margin:-1.25em 0 0 -1.25em;width:2.5em;height:2.5em;-webkit-animation:button-spin .6s linear;animation:button-spin .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 transparent transparent;border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent} -------------------------------------------------------------------------------- /codingpy/templates/rssfeed.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 编程派 | Coding Python 13 | 14 | http://www.codingpy.com 15 | 编程派 | Practice Coding Everyday 16 | {{ articles[0].last_modified }} 17 | zh-CN 18 | 19 | {% for article in articles %} 20 | 21 | {{article.title}} 22 | {{article.link}} 23 | {{article.created_at}} 24 | {{article.summary}} 25 | {{article.body_html}} 26 | 27 | {% endfor %} 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /codingpy/controllers/wechat.py: -------------------------------------------------------------------------------- 1 | #!usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Wechat Auto Replies. 6 | 7 | :copyright: (c) 2016 by EarlGrey. 8 | 9 | """ 10 | 11 | import os 12 | # import time 13 | import hashlib 14 | 15 | from flask import Blueprint, request, make_response 16 | 17 | 18 | # from ..ext import db 19 | # from ..models import User 20 | # from ..forms import LoginForm, RegistrationForm 21 | 22 | bp = Blueprint('wechat', __name__) 23 | 24 | 25 | @bp.route('/', methods=['GET', 'POST']) 26 | def wechat_auth(): 27 | """Authenticate reply is from wechat official server.""" 28 | if request.method == 'GET': 29 | token = os.getenv('wechat_token') # your token 30 | query = request.args # GET 方法附上的参数 31 | signature = query.get('signature', '') 32 | timestamp = query.get('timestamp', '') 33 | nonce = query.get('nonce', '') 34 | echostr = query.get('echostr', '') 35 | s = [timestamp, nonce, token] 36 | s.sort() 37 | s = ''.join(s) 38 | if (hashlib.sha1(s).hexdigest() == signature): 39 | return make_response(echostr) 40 | else: 41 | # process post messages from wechat 42 | pass 43 | -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/rail.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Rail 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.rail{position:absolute;top:0;width:300px;height:100%;font-size:1rem}.ui.left.rail{left:auto;right:100%;padding:0 2rem 0 0;margin:0 2rem 0 0}.ui.right.rail{left:100%;right:auto;padding:0 0 0 2rem;margin:0 0 0 2rem}.ui.left.internal.rail{left:0;right:auto;padding:0 0 0 2rem;margin:0 0 0 2rem}.ui.right.internal.rail{left:auto;right:0;padding:0 2rem 0 0;margin:0 2rem 0 0}.ui.dividing.rail{width:302.5px}.ui.left.dividing.rail{padding:0 2.5rem 0 0;margin:0 2.5rem 0 0;border-right:1px solid rgba(34,36,38,.15)}.ui.right.dividing.rail{border-left:1px solid rgba(34,36,38,.15);padding:0 0 0 2.5rem;margin:0 0 0 2.5rem}.ui.close.rail{width:301px}.ui.close.left.rail{padding:0 1em 0 0;margin:0 1em 0 0}.ui.close.right.rail{padding:0 0 0 1em;margin:0 0 0 1em}.ui.very.close.rail{width:300.5px}.ui.very.close.left.rail{padding:0 .5em 0 0;margin:0 .5em 0 0}.ui.very.close.right.rail{padding:0 0 0 .5em;margin:0 0 0 .5em}.ui.attached.left.rail,.ui.attached.right.rail{padding:0;margin:0} -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_sources/index.txt: -------------------------------------------------------------------------------- 1 | .. Think Python 2nd Edition Chinese Translation documentation master file, created by 2 | sphinx-quickstart on Sun Feb 21 14:36:11 2016. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | 《Think Python 2e》最新版中文翻译 7 | ======================================================================== 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 1 13 | 14 | foreword 15 | 00-preface 16 | 01-the-way-of-the-program 17 | 02-variables-expressions-and-statements 18 | 03-functions 19 | 04-case-study-interface-design 20 | 05-conditionals-and-recursion 21 | 06-fruitful-functions 22 | 07-iteration 23 | 08-strings 24 | 09-case-study-word-play 25 | 10-lists 26 | 11-dictionaries 27 | 12-tuples 28 | 13-case-study-data-structure-selection 29 | 14-files.rst 30 | 15-classes-and-objects 31 | 16-classes-and-functions 32 | 17-classes-and-methods 33 | 18-inheritance 34 | 19-the-goodies 35 | 20-debugging 36 | 21-analysis-of-algorithms 37 | 38 | 39 | 40 | Indices and tables 41 | ================== 42 | 43 | * :ref:`genindex` 44 | * :ref:`modindex` 45 | * :ref:`search` 46 | 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac 2 | .DS_Store 3 | 4 | # Byte-compiled / optimized / DLL files 5 | __pycache__/ 6 | *.py[cod] 7 | 8 | # C extensions 9 | *.so 10 | 11 | # socks 12 | *.sock 13 | 14 | # Distribution / packaging 15 | .Python 16 | migrations/ 17 | env/ 18 | build/ 19 | develop-eggs/ 20 | dist/ 21 | downloads/ 22 | eggs/ 23 | .eggs/ 24 | lib/ 25 | lib64/ 26 | parts/ 27 | sdist/ 28 | var/ 29 | *.egg-info/ 30 | .installed.cfg 31 | *.egg 32 | codingpy/static/.webassets-cache/ 33 | # static files 34 | codingpy/static/thumbnails 35 | # log files 36 | *.log 37 | *.log.* 38 | # swap files 39 | *.swp 40 | 41 | # PyInstaller 42 | # Usually these files are written by a python script from a template 43 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 44 | *.manifest 45 | *.spec 46 | 47 | # Installer logs 48 | pip-log.txt 49 | pip-delete-this-directory.txt 50 | 51 | # Unit test / coverage reports 52 | htmlcov/ 53 | .tox/ 54 | .coverage 55 | .coverage.* 56 | .cache 57 | nosetests.xml 58 | coverage.xml 59 | *,cover 60 | 61 | # Translations 62 | *.mo 63 | *.pot 64 | 65 | # Django stuff: 66 | *.log 67 | 68 | # Sphinx documentation 69 | docs/_build/ 70 | 71 | # PyBuilder 72 | target/ 73 | 74 | # redis dump 75 | dump.rdb 76 | 77 | # envs 78 | set_envs.sh -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/breadcrumb.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Breadcrumb 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.breadcrumb{line-height:1;display:inline-block;margin:0;vertical-align:middle}.ui.breadcrumb:first-child{margin-top:0}.ui.breadcrumb:last-child{margin-bottom:0}.ui.breadcrumb .divider{display:inline-block;opacity:.7;margin:0 .21428571rem;font-size:.92857143em;color:rgba(0,0,0,.4);vertical-align:baseline}.ui.breadcrumb a{color:#4183C4}.ui.breadcrumb a:hover{color:#1e70bf}.ui.breadcrumb .icon.divider{font-size:.85714286em;vertical-align:baseline}.ui.breadcrumb a.section{cursor:pointer}.ui.breadcrumb .section{display:inline-block;margin:0;padding:0}.ui.breadcrumb.segment{display:inline-block;padding:.71428571em 1em}.ui.breadcrumb .active.section{font-weight:700}.ui.mini.breadcrumb{font-size:.71428571rem}.ui.tiny.breadcrumb{font-size:.85714286rem}.ui.small.breadcrumb{font-size:.92857143rem}.ui.breadcrumb{font-size:1rem}.ui.large.breadcrumb{font-size:1.14285714rem}.ui.big.breadcrumb{font-size:1.28571429rem}.ui.huge.breadcrumb{font-size:1.42857143rem}.ui.massive.breadcrumb{font-size:1.71428571rem} -------------------------------------------------------------------------------- /codingpy/static/vendor/glide/css/glide.core.min.css: -------------------------------------------------------------------------------- 1 | .glide{position:relative;width:100%;height:100%}.glide__wrapper{overflow:hidden}.glide__track{position:relative;width:100%;height:100%;list-style:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-ms-touch-action:pan-Y;touch-action:pan-Y}.glide__track.dragging{cursor:-webkit-grabbing;cursor:grabbing;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.glide__slide{width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.glide__arrows{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.glide__arrow{cursor:pointer}.glide__bullets{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.glide--slider .glide__slide{float:left;clear:none}.glide--carousel .glide__slide{float:left;clear:none}.glide--slideshow .glide__wrapper{height:100%}.glide--slideshow .glide__slide{height:100%;position:absolute;top:0;left:0;z-index:-1;-webkit-transform-style:preserve-3d;-webkit-transform:translate3d(0, 0, 0)}.glide--slideshow .glide__slide.active{z-index:1} -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/video.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.0.0 - Video 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2014 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.video{background-color:#ddd;position:relative;max-width:100%;padding-bottom:56.25%;height:0;overflow:hidden}.ui.video .placeholder{background-color:#333}.ui.video .play{cursor:pointer;position:absolute;top:0;left:0;z-index:10;width:100%;height:100%;background:0 0;-webkit-transition:background .2s ease;transition:background .2s ease}.ui.video .play.icon:before{position:absolute;top:50%;left:50%;z-index:11;-webkit-transform:translateX(-50%)translateY(-50%);-ms-transform:translateX(-50%)translateY(-50%);transform:translateX(-50%)translateY(-50%);color:rgba(255,255,255,.7);font-size:7rem;text-shadow:2px 2px 0 rgba(0,0,0,.15);-webkit-transition:color .2s ease;transition:color .2s ease}.ui.video .placeholder{position:absolute;top:0;left:0;display:block;width:100%;height:100%}.ui.video .embed embed,.ui.video .embed iframe,.ui.video .embed object{position:absolute;border:none;width:100%;height:100%;top:0;left:0;margin:0;padding:0}.ui.video .play:hover{background:0 0}.ui.video .play:hover:before{color:#fff}.ui.active.video .placeholder,.ui.active.video .play{display:none}.ui.active.video .embed{display:inline} -------------------------------------------------------------------------------- /codingpy/templates/includes/glide.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | prev 5 | next 6 |
7 | 8 |
9 |
10 | {# lazyloadxt cannot load slides not visible on viewport #} 11 | {% for article in slides %} 12 |
13 | 14 |
15 | 16 |
17 |
18 | 21 |
22 |
23 | 24 |
25 |
26 | {% endfor %} 27 | 28 |
29 |
30 | 31 |
32 | 33 |
-------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/nag.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Nag 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.nag{display:none;opacity:.95;position:relative;top:0;left:0;z-index:999;min-height:0;width:100%;margin:0;padding:.75em 1em;background:#555;box-shadow:0 1px 2px 0 rgba(0,0,0,.2);font-size:1rem;text-align:center;color:rgba(0,0,0,.87);border-radius:0 0 .28571429rem .28571429rem;-webkit-transition:.2s background ease;transition:.2s background ease}a.ui.nag{cursor:pointer}.ui.nag>.title{display:inline-block;margin:0 .5em;color:#FFF}.ui.nag>.close.icon{cursor:pointer;opacity:.4;position:absolute;top:50%;right:1em;font-size:1em;margin:-.5em 0 0;color:#FFF;-webkit-transition:opacity .2s ease;transition:opacity .2s ease}.ui.nag:hover{background:#555;opacity:1}.ui.nag .close:hover{opacity:1}.ui.overlay.nag{position:absolute;display:block}.ui.fixed.nag{position:fixed}.ui.bottom.nag,.ui.bottom.nags{border-radius:.28571429rem .28571429rem 0 0;top:auto;bottom:0}.ui.inverted.nag,.ui.inverted.nags .nag{background-color:#F3F4F5;color:rgba(0,0,0,.85)}.ui.inverted.nag .close,.ui.inverted.nag .title,.ui.inverted.nags .nag .close,.ui.inverted.nags .nag .title{color:rgba(0,0,0,.4)}.ui.nags .nag{border-radius:0!important}.ui.nags .nag:last-child{border-radius:0 0 .28571429rem .28571429rem}.ui.bottom.nags .nag:last-child{border-radius:.28571429rem .28571429rem 0 0} -------------------------------------------------------------------------------- /codingpy/utils/helpers.py: -------------------------------------------------------------------------------- 1 | #!usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import xmlrpc.client 5 | from flask import current_app, url_for, flash 6 | import requests 7 | 8 | 9 | def notify_baidu(url): 10 | baidu_api = "http://data.zz.baidu.com/urls?" 11 | token = "site=www.codingpy.com&token=flJTo2ma4A4ijZkU" 12 | 13 | resp = requests.post(baidu_api + token, data=url) 14 | 15 | if resp.status_code == 200: 16 | return True 17 | else: 18 | flash('An error occured. ') 19 | return False 20 | 21 | 22 | def baidu_ping(url): 23 | """ 24 | :ref: http://zhanzhang.baidu.com/tools/ping 25 | 26 | 发送给百度Ping服务的XML-RPC客户请求需要包含如下元素: 27 | RPC端点: http://ping.baidu.com/ping/RPC2 28 | 调用方法名: weblogUpdates.extendedPing 29 | 参数: (应按照如下所列的相同顺序传送) 30 | 博客名称 31 | 博客首页地址 32 | 新发文章地址 33 | 博客rss地址 34 | """ 35 | 36 | result = 1 37 | rpc_server = xmlrpc.client.ServerProxy('http://ping.baidu.com/ping/RPC2') 38 | 39 | try: 40 | # 返回0表示提交成功 41 | current_app.logger.info('begin to ping baidu: <%s>' % url) 42 | result = rpc_server.weblogUpdates.extendedPing( 43 | current_app.config.get('SITE_NAME'), 44 | url_for('site.index', _external=True), 45 | url, 46 | url_for('site.feed', _external=True) 47 | ) 48 | except: 49 | pass 50 | 51 | if result != 0: 52 | current_app.logger.warning('<%s> ping to baidu failed' % url) 53 | 54 | return result == 0 55 | -------------------------------------------------------------------------------- /codingpy/utils/filters.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | import re 4 | import markdown 5 | import datetime 6 | 7 | from flask import Markup 8 | from ..ext import keywords_split 9 | 10 | __all__ = ['register_filters', 'markdown_filter'] 11 | 12 | 13 | def markdown_filter(text, codehilite=True): 14 | """ 15 | 代码高亮可选,有的场合不需要高亮,高亮会生成很多代码 16 | 但是fenced_code生成的代码是
~~~包围的
17 |     """
18 |     exts = [
19 |         'abbr', 'attr_list', 'def_list', 'sane_lists', 'fenced_code',
20 |         'tables', 'toc', 'wikilinks',
21 |     ]
22 | 
23 |     if codehilite:
24 |         exts.append('codehilite(guess_lang=True,linenums=False)')
25 | 
26 |     return Markup(markdown.markdown(
27 |         text,
28 |         extensions=exts,
29 |         safe_mode=False,
30 |     ))
31 | 
32 | 
33 | def date_filter(dt, fmt='%Y-%m-%d %H:%M'):
34 |     return dt.strftime(fmt)
35 | 
36 | 
37 | def timestamp_filter(stamp, fmt='%Y-%m-%d %H:%M'):
38 |     return datetime.datetime.fromtimestamp(int(stamp)).strftime(fmt)
39 | 
40 | 
41 | def emphasis(text, keyword=None):
42 |     if keyword is not None:
43 |         for _keyword in keywords_split(keyword):
44 |             _pattern = re.compile(r'(%s)' % _keyword, flags=re.I)
45 |             text = _pattern.sub(r'\1', text)
46 |     return text
47 | 
48 | 
49 | def register_filters(app):
50 |     app.jinja_env.filters['markdown'] = markdown_filter
51 |     app.jinja_env.filters['date'] = date_filter
52 |     app.jinja_env.filters['timestamp'] = timestamp_filter
53 |     app.jinja_env.filters['emphasis'] = emphasis
54 | 


--------------------------------------------------------------------------------
/codingpy/templates/includes/reward.html:
--------------------------------------------------------------------------------
 1 | {# 
 2 | 
 8 | 
 9 | 
10 | 
29 | 
30 | 
31 | 
43 |  #}


--------------------------------------------------------------------------------
/codingpy/static/vendor/semantic-ui/components/sticky.css:
--------------------------------------------------------------------------------
 1 | /*!
 2 |  * # Semantic UI 2.1.6 - Sticky
 3 |  * http://github.com/semantic-org/semantic-ui/
 4 |  *
 5 |  *
 6 |  * Copyright 2015 Contributors
 7 |  * Released under the MIT license
 8 |  * http://opensource.org/licenses/MIT
 9 |  *
10 |  */
11 | 
12 | 
13 | /*******************************
14 |             Sticky
15 | *******************************/
16 | 
17 | .ui.sticky {
18 |   position: static;
19 |   -webkit-transition: none;
20 |           transition: none;
21 |   z-index: 800;
22 | }
23 | 
24 | 
25 | /*******************************
26 |             States
27 | *******************************/
28 | 
29 | 
30 | /* Bound */
31 | .ui.sticky.bound {
32 |   position: absolute;
33 |   left: auto;
34 |   right: auto;
35 | }
36 | 
37 | /* Fixed */
38 | .ui.sticky.fixed {
39 |   position: fixed;
40 |   left: auto;
41 |   right: auto;
42 | }
43 | 
44 | /* Bound/Fixed Position */
45 | .ui.sticky.bound.top,
46 | .ui.sticky.fixed.top {
47 |   top: 0px;
48 |   bottom: auto;
49 | }
50 | .ui.sticky.bound.bottom,
51 | .ui.sticky.fixed.bottom {
52 |   top: auto;
53 |   bottom: 0px;
54 | }
55 | 
56 | 
57 | /*******************************
58 |             Types
59 | *******************************/
60 | 
61 | .ui.native.sticky {
62 |   position: -webkit-sticky;
63 |   position: -moz-sticky;
64 |   position: -ms-sticky;
65 |   position: -o-sticky;
66 |   position: sticky;
67 | }
68 | 
69 | 
70 | /*******************************
71 |          Theme Overrides
72 | *******************************/
73 | 
74 | 
75 | 
76 | /*******************************
77 |          Site Overrides
78 | *******************************/
79 | 
80 | 


--------------------------------------------------------------------------------
/codingpy/static/vendor/semantic-ui/components/site.min.css:
--------------------------------------------------------------------------------
 1 | /*!
 2 |  * # Semantic UI 2.1.6 - Site
 3 |  * http://github.com/semantic-org/semantic-ui/
 4 |  *
 5 |  *
 6 |  * Copyright 2015 Contributors
 7 |  * Released under the MIT license
 8 |  * http://opensource.org/licenses/MIT
 9 |  *
10 |  */@import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin);body,html{height:100%}html{font-size:14px}body{margin:0;padding:0;overflow-x:hidden;min-width:320px;background:#FFF;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:14px;line-height:1.4285em;color:rgba(0,0,0,.87);font-smoothing:antialiased}h1,h2,h3,h4,h5{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;line-height:1.2857em;margin:calc(2rem - .14285em) 0 1rem;font-weight:700;padding:0}h1{min-height:1rem;font-size:2rem}h2{font-size:1.714rem}h3{font-size:1.28rem}h4{font-size:1.071rem}h5{font-size:1rem}h1:first-child,h2:first-child,h3:first-child,h4:first-child,h5:first-child,p:first-child{margin-top:0}h1:last-child,h2:last-child,h3:last-child,h4:last-child,h5:last-child,p:last-child{margin-bottom:0}p{margin:0 0 1em;line-height:1.4285em}a{color:#4183C4;text-decoration:none}a:hover{color:#1e70bf;text-decoration:none}::-webkit-selection{background-color:#CCE2FF;color:rgba(0,0,0,.87)}::-moz-selection{background-color:#CCE2FF;color:rgba(0,0,0,.87)}::selection{background-color:#CCE2FF;color:rgba(0,0,0,.87)}input::-webkit-selection,textarea::-webkit-selection{background-color:rgba(100,100,100,.4);color:rgba(0,0,0,.87)}input::-moz-selection,textarea::-moz-selection{background-color:rgba(100,100,100,.4);color:rgba(0,0,0,.87)}input::selection,textarea::selection{background-color:rgba(100,100,100,.4);color:rgba(0,0,0,.87)}


--------------------------------------------------------------------------------
/codingpy/forms/account.py:
--------------------------------------------------------------------------------
 1 | #!usr/bin/env python
 2 | # -*- coding: utf-8 -*-
 3 | 
 4 | from flask.ext.wtf import Form
 5 | from wtforms import StringField, PasswordField, BooleanField, SubmitField
 6 | from wtforms.validators import Required, Email, Length, DataRequired, \
 7 |     Regexp, EqualTo
 8 | from wtforms import ValidationError
 9 | from ..models import User
10 | 
11 | __all__ = ['LoginForm', 'RegistrationForm']
12 | 
13 | 
14 | class LoginForm(Form):
15 |     email = StringField('Email', validators=[Required(), Length(1, 64),
16 |                                              Email()])
17 |     password = PasswordField('Password', validators=[Required()])
18 |     remember_me = BooleanField('Keep me logged in')
19 |     submit = SubmitField('Log In')
20 | 
21 | 
22 | class RegistrationForm(Form):
23 |     email = StringField('Email',
24 |                         validators=[DataRequired(), Length(1, 64), Email()])
25 | 
26 |     username = StringField('Username', validators=[
27 |         DataRequired(), Length(1, 64),
28 |         Regexp('^[A-Za-z][A-Za-z0-9_.]*$', 0,
29 |                'Usernames must have only letters,'
30 |                'numbers, dots or underscores')])
31 |     password = PasswordField('Password', validators=[
32 |         DataRequired(), EqualTo('password2', message='Passwords must match.')])
33 |     password2 = PasswordField('Confirm password', validators=[DataRequired()])
34 |     submit = SubmitField('Register')
35 | 
36 |     def validate_email(self, field):
37 |         if User.query.filter_by(email=field.data).first():
38 |             raise ValidationError('Email already registered.')
39 | 
40 |     def validate_username(self, field):
41 |         if User.query.filter_by(username=field.data).first():
42 |             raise ValidationError('Username already in use.')
43 | 


--------------------------------------------------------------------------------
/manage.py:
--------------------------------------------------------------------------------
 1 | #!usr/bin/env python
 2 | # -*- coding: utf-8 -*-
 3 | import os
 4 | # import sys
 5 | 
 6 | from flask.ext.script import Manager
 7 | from flask.ext.migrate import Migrate, MigrateCommand
 8 | from flask.ext.assets import Environment, Bundle
 9 | from codingpy import *
10 | 
11 | app = create_app(os.getenv('APP_CONFIG') or 'default')
12 | 
13 | manager = Manager(app)
14 | migrate = Migrate(app, db)
15 | 
16 | manager.add_command('db', MigrateCommand)
17 | 
18 | 
19 | bundles = {
20 | 
21 |     'home_js': Bundle(
22 |         'js/jquery-2.1.4.min.js',
23 |         'js/modernizr.js',
24 |         'vendor/semantic-ui/semantic.min.js',
25 |         'vendor/glide/glide.min.js',
26 |         'js/lazyloadxt.js',
27 |         'js/lazyloadxt.bg.js',
28 |         'js/jquery.infinitescroll.min.js',
29 |         output='gen/home.js'),
30 | 
31 |     'home_css': Bundle(
32 |         'vendor/normalize.min.css',
33 |         'vendor/semantic-ui/semantic.css',
34 |         'vendor/glide/css/glide.core.min.css',
35 |         'vendor/glide/css/glide.theme.min.css',
36 |         'style.css',
37 |         'codehilite.css',
38 |         depends='style.css',
39 |         output='gen/home.css'),
40 | 
41 | }
42 | 
43 | assets = Environment(app)
44 | 
45 | assets.register(bundles)
46 | 
47 | 
48 | @manager.shell
49 | def make_shell_context():
50 |     return dict(
51 |         app=app, db=db, User=User, Role=Role, Permission=Permission,
52 |         Category=Category, Tag=Tag, Article=Article, Topic=Topic,
53 |         Label=Label
54 |     )
55 | 
56 | 
57 | @manager.command
58 | def test(coverage=False):
59 |     """Run unit tests and/or covrage reports
60 |     """
61 |     import unittest
62 |     tests = unittest.TestLoader().discover('tests')
63 |     unittest.TextTestRunner(verbosity=2).run(tests)
64 | 
65 | if __name__ == '__main__':
66 |     manager.run()
67 | 


--------------------------------------------------------------------------------
/codingpy/static/vendor/normalize.min.css:
--------------------------------------------------------------------------------
1 | /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}


--------------------------------------------------------------------------------
/codingpy/static/vendor/semantic-ui/components/embed.min.css:
--------------------------------------------------------------------------------
 1 | /*!
 2 |  * # Semantic UI 2.1.6 - Video
 3 |  * http://github.com/semantic-org/semantic-ui/
 4 |  *
 5 |  *
 6 |  * Copyright 2015 Contributors
 7 |  * Released under the MIT license
 8 |  * http://opensource.org/licenses/MIT
 9 |  *
10 |  */.ui.embed{position:relative;max-width:100%;height:0;overflow:hidden;background:#DCDDDE;padding-bottom:56.25%}.ui.embed embed,.ui.embed iframe,.ui.embed object{position:absolute;border:none;width:100%;height:100%;top:0;left:0;margin:0;padding:0}.ui.embed>.embed{display:none}.ui.embed>.placeholder{position:absolute;cursor:pointer;top:0;left:0;display:block;width:100%;height:100%;background-color:radial-gradient(transparent 45%,rgba(0,0,0,.3))}.ui.embed>.icon{cursor:pointer;position:absolute;top:0;left:0;width:100%;height:100%;z-index:2}.ui.embed>.icon:after{position:absolute;top:0;left:0;width:100%;height:100%;z-index:3;content:'';background:-webkit-radial-gradient(transparent 45%,rgba(0,0,0,.3));background:radial-gradient(transparent 45%,rgba(0,0,0,.3));opacity:.5;-webkit-transition:opacity .5s ease;transition:opacity .5s ease}.ui.embed>.icon:before{position:absolute;top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);color:#FFF;font-size:6rem;text-shadow:0 2px 10px rgba(34,36,38,.2);-webkit-transition:opacity .5s ease,color .5s ease;transition:opacity .5s ease,color .5s ease;z-index:10}.ui.embed .icon:hover:after{background:-webkit-radial-gradient(transparent 45%,rgba(0,0,0,.3));background:radial-gradient(transparent 45%,rgba(0,0,0,.3));opacity:1}.ui.embed .icon:hover:before{color:#FFF}.ui.active.embed>.icon,.ui.active.embed>.placeholder{display:none}.ui.active.embed>.embed{display:block}.ui.square.embed{padding-bottom:100%}.ui[class*="4:3"].embed{padding-bottom:75%}.ui[class*="16:9"].embed{padding-bottom:56.25%}.ui[class*="21:9"].embed{padding-bottom:42.85714286%}


--------------------------------------------------------------------------------
/codingpy/static/vendor/semantic-ui/components/container.min.css:
--------------------------------------------------------------------------------
 1 | /*!
 2 |  * # Semantic UI 2.1.6 - Container
 3 |  * http://github.com/semantic-org/semantic-ui/
 4 |  *
 5 |  *
 6 |  * Copyright 2015 Contributors
 7 |  * Released under the MIT license
 8 |  * http://opensource.org/licenses/MIT
 9 |  *
10 |  */.ui.container{display:block;max-width:100%!important}@media only screen and (max-width:767px){.ui.container{width:auto!important;margin-left:1em!important;margin-right:1em!important}.ui.grid.container,.ui.relaxed.grid.container,.ui.very.relaxed.grid.container{width:auto!important}}@media only screen and (min-width:768px) and (max-width:991px){.ui.container{width:723px;margin-left:auto!important;margin-right:auto!important}.ui.grid.container{width:calc(723px + 2rem)!important}.ui.relaxed.grid.container{width:calc(723px + 3rem)!important}.ui.very.relaxed.grid.container{width:calc(723px + 5rem)!important}}@media only screen and (min-width:992px) and (max-width:1199px){.ui.container{width:933px;margin-left:auto!important;margin-right:auto!important}.ui.grid.container{width:calc(933px + 2rem)!important}.ui.relaxed.grid.container{width:calc(933px + 3rem)!important}.ui.very.relaxed.grid.container{width:calc(933px + 5rem)!important}}@media only screen and (min-width:1200px){.ui.container{width:1127px;margin-left:auto!important;margin-right:auto!important}.ui.grid.container{width:calc(1127px + 2rem)!important}.ui.relaxed.grid.container{width:calc(1127px + 3rem)!important}.ui.very.relaxed.grid.container{width:calc(1127px + 5rem)!important}}.ui.text.container{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;max-width:700px!important;line-height:1.5;font-size:1.14285714rem}.ui.fluid.container{width:100%}.ui[class*="left aligned"].container{text-align:left}.ui[class*="center aligned"].container{text-align:center}.ui[class*="right aligned"].container{text-align:right}.ui.justified.container{text-align:justify;-webkit-hyphens:auto;-moz-hyphens:auto;-ms-hyphens:auto;hyphens:auto}


--------------------------------------------------------------------------------
/codingpy/static/vendor/glide/css/glide.theme.min.css:
--------------------------------------------------------------------------------
1 | .glide__arrows{position:absolute}.glide--horizontal .glide__arrows{top:50%;width:92%;margin-left:4%}.glide--vertical .glide__arrows{left:50%;height:88%;margin-top:6%}.glide__arrow{position:absolute;z-index:2;color:white;text-transform:uppercase;font:11px Arial,sans-serif;padding:9px 12px;background-color:transparent;border:2px solid rgba(255,255,255,0.5);border-radius:4px;-webkit-transition:border 300ms ease-in-out;transition:border 300ms ease-in-out}.glide__arrow:focus{outline:none}.glide__arrow:hover{border-color:white}.glide--horizontal .glide__arrow{-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.glide--horizontal .glide__arrow.prev{left:0}.glide--horizontal .glide__arrow.next{right:0}.glide--vertical .glide__arrow{-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%)}.glide--vertical .glide__arrow.prev{top:0}.glide--vertical .glide__arrow.next{bottom:0}.glide__bullets{position:absolute;list-style:none}.glide--horizontal .glide__bullets{bottom:8%;left:0;width:100%;height:12px;text-align:center}.glide--vertical .glide__bullets{top:50%;right:8%;width:12px;height:auto;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.glide__bullets>*{display:inline-block;background-color:rgba(255,255,255,0.5);width:12px;height:12px;padding:0;cursor:pointer;border-radius:50%;border:2px solid transparent;-webkit-transition:all 300ms ease-in-out;transition:all 300ms ease-in-out}.glide--horizontal .glide__bullets>*{margin:0 5px}.glide--vertical .glide__bullets>*{vertical-align:middle}.glide__bullets>*.active{background-color:white}.glide__bullets>*:focus{outline:none}.glide__bullets>*:hover,.glide__bullets>*:focus{border:2px solid white;background-color:rgba(255,255,255,0.5)}.glide--slider .glide__arrow{opacity:1;-webkit-transition:opacity 150ms ease;transition:opacity 150ms ease}.glide--slider .glide__arrow.disabled{opacity:.33}


--------------------------------------------------------------------------------
/codingpy/controllers/account.py:
--------------------------------------------------------------------------------
 1 | #!usr/bin/env python
 2 | # -*- coding: utf-8 -*-
 3 | 
 4 | from flask import (Blueprint, render_template, redirect, url_for,
 5 |                    flash, request)
 6 | from flask.ext.login import login_user, logout_user, \
 7 |     login_required
 8 | 
 9 | from ..ext import db
10 | from ..models import User
11 | from ..forms import LoginForm, RegistrationForm
12 | 
13 | bp = Blueprint('account', __name__)
14 | 
15 | 
16 | @bp.route('/login/', methods=["GET", "POST"])
17 | def login():
18 |     form = LoginForm()
19 |     if form.validate_on_submit():
20 |         user = User.query.filter_by(email=form.email.data).first()
21 |         if user is not None and user.verify_password(form.password.data):
22 |             login_user(user, form.remember_me.data)
23 |             user.ping()
24 |             return redirect(request.args.get('next') or '/')
25 |         redirect('/')
26 |         flash('Invalid username or password.')
27 |     return render_template('login.html', form=form)
28 | 
29 | 
30 | @bp.route('/logout/')
31 | @login_required
32 | def logout():
33 |     logout_user()
34 |     flash('You have been logged out.')
35 |     return redirect('/')
36 | 
37 | 
38 | @bp.route('/register/', methods=['GET', 'POST'])
39 | @login_required
40 | def register():
41 |     form = RegistrationForm()
42 |     if form.validate_on_submit():
43 |         user = User(email=form.email.data,
44 |                     username=form.username.data,
45 |                     password=form.password.data)
46 |         db.session.add(user)
47 |         db.session.commit()
48 |         # token = user.generate_confirmation_token()
49 |         # send_email(user.email, 'Confirm Your Account',
50 |         #            'email/confirm', user=user, token=token)
51 |         # flash('A confirmation email has been sent to you by email.')
52 |         return redirect(url_for('account.login'))
53 |     return render_template('register.html', form=form)
54 | 


--------------------------------------------------------------------------------
/codingpy/static/vendor/glide/css/glide.core.css:
--------------------------------------------------------------------------------
 1 | .glide {
 2 |   position: relative;
 3 |   width: 100%;
 4 |   height: 100%;
 5 | }
 6 | .glide__wrapper {
 7 |   overflow: hidden;
 8 | }
 9 | .glide__track {
10 |   position: relative;
11 |   width: 100%;
12 |   height: 100%;
13 |   list-style: none;
14 |   -webkit-backface-visibility: hidden;
15 |           backface-visibility: hidden;
16 |   -webkit-transform-style: preserve-3d;
17 |           transform-style: preserve-3d;
18 |   -ms-touch-action: pan-Y;
19 |       touch-action: pan-Y;
20 | }
21 | .glide__track.dragging {
22 |   cursor: -webkit-grabbing;
23 |   cursor: grabbing;
24 |   -webkit-user-select: none;
25 |      -moz-user-select: none;
26 |       -ms-user-select: none;
27 |           user-select: none;
28 | }
29 | .glide__slide {
30 |   width: 100%;
31 |   -webkit-user-select: none;
32 |      -moz-user-select: none;
33 |       -ms-user-select: none;
34 |           user-select: none;
35 |   -webkit-touch-callout: none;
36 |   -webkit-tap-highlight-color: transparent;
37 | }
38 | .glide__arrows {
39 |   -webkit-touch-callout: none;
40 |   -webkit-user-select: none;
41 |      -moz-user-select: none;
42 |       -ms-user-select: none;
43 |           user-select: none;
44 | }
45 | .glide__arrow {
46 |   cursor: pointer;
47 | }
48 | .glide__bullets {
49 |   -webkit-touch-callout: none;
50 |   -webkit-user-select: none;
51 |      -moz-user-select: none;
52 |       -ms-user-select: none;
53 |           user-select: none;
54 | }
55 | .glide--slider .glide__slide {
56 |   float: left;
57 |   clear: none;
58 | }
59 | .glide--carousel .glide__slide {
60 |   float: left;
61 |   clear: none;
62 | }
63 | .glide--slideshow .glide__wrapper {
64 |   height: 100%;
65 | }
66 | .glide--slideshow .glide__slide {
67 |   height: 100%;
68 |   position: absolute;
69 |   top: 0;
70 |   left: 0;
71 |   z-index: -1;
72 |   -webkit-transform-style: preserve-3d;
73 |   -webkit-transform: translate3d(0px, 0px, 0px);
74 | }
75 | .glide--slideshow .glide__slide.active {
76 |   z-index: 1;
77 | }
78 | 


--------------------------------------------------------------------------------
/codingpy/static/vendor/semantic-ui/components/shape.min.css:
--------------------------------------------------------------------------------
 1 | /*!
 2 |  * # Semantic UI 2.1.6 - Shape
 3 |  * http://github.com/semantic-org/semantic-ui/
 4 |  *
 5 |  *
 6 |  * Copyright 2015 Contributors
 7 |  * Released under the MIT license
 8 |  * http://opensource.org/licenses/MIT
 9 |  *
10 |  */.ui.shape{position:relative;vertical-align:top;display:inline-block;-webkit-perspective:2000px;perspective:2000px;-webkit-transition:-webkit-transform .6s ease-in-out,left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out;transition:transform .6s ease-in-out,left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out}.ui.shape .sides{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.ui.shape .side{opacity:1;width:100%;margin:0!important;-webkit-backface-visibility:hidden;backface-visibility:hidden;display:none}.ui.shape .side *{-webkit-backface-visibility:visible!important;backface-visibility:visible!important}.ui.cube.shape .side{min-width:15em;height:15em;padding:2em;background-color:#E6E6E6;color:rgba(0,0,0,.87);box-shadow:0 0 2px rgba(0,0,0,.3)}.ui.cube.shape .side>.content{width:100%;height:100%;display:table;text-align:center;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.ui.cube.shape .side>.content>div{display:table-cell;vertical-align:middle;font-size:2em}.ui.text.shape.animating .sides{position:static}.ui.text.shape .side{white-space:nowrap}.ui.text.shape .side>*{white-space:normal}.ui.loading.shape{position:absolute;top:-9999px;left:-9999px}.ui.shape .animating.side{position:absolute;top:0;left:0;display:block;z-index:100}.ui.shape .hidden.side{opacity:.6}.ui.shape.animating .sides{position:absolute;-webkit-transition:-webkit-transform .6s ease-in-out,left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out;transition:transform .6s ease-in-out,left .6s ease-in-out,width .6s ease-in-out,height .6s ease-in-out}.ui.shape.animating .side{-webkit-transition:opacity .6s ease-in-out;transition:opacity .6s ease-in-out}.ui.shape .active.side{display:block}


--------------------------------------------------------------------------------
/codingpy/utils/upload.py:
--------------------------------------------------------------------------------
 1 | # -*- coding: utf-8 -*-
 2 | 
 3 | import os
 4 | import time
 5 | import random
 6 | import datetime
 7 | from flask import current_app, url_for
 8 | 
 9 | 
10 | class SaveUploadFile(object):
11 |     """文件上传到去云存储"""
12 | 
13 |     def __init__(self, fext, data):
14 |         # 图片文件自动生成文件名
15 |         # 非图片文件使用原文件名
16 |         if fext.startswith('.'):
17 |             self.filename = u'%s/%s%s' % (self.gen_dirname(),
18 |                                           self.gen_filename(), fext)
19 |         else:
20 |             self.filename = u'%s/%s' % (self.gen_dirname(), fext)
21 |         self.data = data
22 | 
23 |     def gen_dirname(self):
24 |         return datetime.date.today().strftime('%Y%m')
25 | 
26 |     def gen_filename(self):
27 |         filename_prefix = datetime.datetime.now().strftime('%Y%m%d%H%M%S')
28 |         return '%s%s' % (filename_prefix, str(random.randrange(1000, 10000)))
29 | 
30 |     def save(self):
31 |         if current_app.config.get('COS_AK') and \
32 |                 current_app.config.get('COS_SK'):
33 |             return self.qiniu_save_file()
34 |         return self.local_save_file()
35 | 
36 |     def cos_save_file(self):
37 |         pass
38 | 
39 |     def local_save_file(self):
40 |         '''保存文件到static目录'''
41 |         error = None
42 |         UPLOAD_FOLDER = os.path.join(current_app.static_folder, 'uploadfiles')
43 |         filepath = os.path.join(UPLOAD_FOLDER, self.filename)
44 | 
45 |         # 检查路径是否存在,不存在则创建
46 |         dirname = os.path.dirname(filepath)
47 |         if not os.path.exists(dirname):
48 |             try:
49 |                 os.makedirs(dirname)
50 |             except:
51 |                 error = 'ERROR_CREATE_DIR'
52 |         elif not os.access(dirname, os.W_OK):
53 |             error = 'ERROR_DIR_NOT_WRITEABLE'
54 | 
55 |         if not error:
56 |             with open(filepath, 'wb') as fp:
57 |                 fp.write(self.data)
58 |             return url_for('static', filename='%s/%s' % ('uploadfiles', self.filename))
59 |         return ''
60 | 


--------------------------------------------------------------------------------
/codingpy/static/vendor/semantic-ui/components/ad.min.css:
--------------------------------------------------------------------------------
 1 | /*!
 2 |  * # Semantic UI 2.1.6 - Ad
 3 |  * http://github.com/semantic-org/semantic-ui/
 4 |  *
 5 |  *
 6 |  * Copyright 2013 Contributors
 7 |  * Released under the MIT license
 8 |  * http://opensource.org/licenses/MIT
 9 |  *
10 |  */.ui.ad{display:block;overflow:hidden;margin:1em 0}.ui.ad:first-child,.ui.ad:last-child{margin:0}.ui.ad iframe{margin:0;padding:0;border:none;overflow:hidden}.ui.leaderboard.ad{width:728px;height:90px}.ui[class*="medium rectangle"].ad{width:300px;height:250px}.ui[class*="large rectangle"].ad{width:336px;height:280px}.ui[class*="half page"].ad{width:300px;height:600px}.ui.square.ad{width:250px;height:250px}.ui[class*="small square"].ad{width:200px;height:200px}.ui[class*="small rectangle"].ad{width:180px;height:150px}.ui[class*="vertical rectangle"].ad{width:240px;height:400px}.ui.button.ad{width:120px;height:90px}.ui[class*="square button"].ad{width:125px;height:125px}.ui[class*="small button"].ad{width:120px;height:60px}.ui.skyscraper.ad{width:120px;height:600px}.ui[class*="wide skyscraper"].ad{width:160px}.ui.banner.ad{width:468px;height:60px}.ui[class*="vertical banner"].ad{width:120px;height:240px}.ui[class*="top banner"].ad{width:930px;height:180px}.ui[class*="half banner"].ad{width:234px;height:60px}.ui[class*="large leaderboard"].ad{width:970px;height:90px}.ui.billboard.ad{width:970px;height:250px}.ui.panorama.ad{width:980px;height:120px}.ui.netboard.ad{width:580px;height:400px}.ui[class*="large mobile banner"].ad{width:320px;height:100px}.ui[class*="mobile leaderboard"].ad{width:320px;height:50px}.ui.mobile.ad{display:none}@media only screen and (max-width:767px){.ui.mobile.ad{display:block}}.ui.centered.ad{margin-left:auto;margin-right:auto}.ui.test.ad{position:relative;background:#545454}.ui.test.ad:after{position:absolute;top:50%;left:50%;width:100%;text-align:center;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%);content:'Ad';color:#FFF;font-size:1em;font-weight:700}.ui.mobile.test.ad:after{font-size:.85714286em}.ui.test.ad[data-text]:after{content:attr(data-text)}


--------------------------------------------------------------------------------
/codingpy/static/vendor/semantic-ui/components/tab.css:
--------------------------------------------------------------------------------
 1 | /*!
 2 |  * # Semantic UI 2.1.6 - Tab
 3 |  * http://github.com/semantic-org/semantic-ui/
 4 |  *
 5 |  *
 6 |  * Copyright 2015 Contributors
 7 |  * Released under the MIT license
 8 |  * http://opensource.org/licenses/MIT
 9 |  *
10 |  */
11 | 
12 | 
13 | /*******************************
14 |            UI Tabs
15 | *******************************/
16 | 
17 | .ui.tab {
18 |   display: none;
19 | }
20 | 
21 | 
22 | /*******************************
23 |              States
24 | *******************************/
25 | 
26 | 
27 | /*--------------------
28 |        Active
29 | ---------------------*/
30 | 
31 | .ui.tab.active,
32 | .ui.tab.open {
33 |   display: block;
34 | }
35 | 
36 | /*--------------------
37 |        Loading
38 | ---------------------*/
39 | 
40 | .ui.tab.loading {
41 |   position: relative;
42 |   overflow: hidden;
43 |   display: block;
44 |   min-height: 250px;
45 | }
46 | .ui.tab.loading * {
47 |   position: relative !important;
48 |   left: -10000px !important;
49 | }
50 | .ui.tab.loading:before,
51 | .ui.tab.loading.segment:before {
52 |   position: absolute;
53 |   content: '';
54 |   top: 100px;
55 |   left: 50%;
56 |   margin: -1.25em 0em 0em -1.25em;
57 |   width: 2.5em;
58 |   height: 2.5em;
59 |   border-radius: 500rem;
60 |   border: 0.2em solid rgba(0, 0, 0, 0.1);
61 | }
62 | .ui.tab.loading:after,
63 | .ui.tab.loading.segment:after {
64 |   position: absolute;
65 |   content: '';
66 |   top: 100px;
67 |   left: 50%;
68 |   margin: -1.25em 0em 0em -1.25em;
69 |   width: 2.5em;
70 |   height: 2.5em;
71 |   -webkit-animation: button-spin 0.6s linear;
72 |           animation: button-spin 0.6s linear;
73 |   -webkit-animation-iteration-count: infinite;
74 |           animation-iteration-count: infinite;
75 |   border-radius: 500rem;
76 |   border-color: #767676 transparent transparent;
77 |   border-style: solid;
78 |   border-width: 0.2em;
79 |   box-shadow: 0px 0px 0px 1px transparent;
80 | }
81 | 
82 | 
83 | /*******************************
84 |          Tab Overrides
85 | *******************************/
86 | 
87 | 
88 | 
89 | /*******************************
90 |         User Overrides
91 | *******************************/
92 | 
93 | 


--------------------------------------------------------------------------------
/codingpy/static/vendor/semantic-ui/components/reset.min.css:
--------------------------------------------------------------------------------
 1 | /*!
 2 |  * # Semantic UI 2.1.6 - Reset
 3 |  * http://github.com/semantic-org/semantic-ui/
 4 |  *
 5 |  *
 6 |  * Copyright 2015 Contributors
 7 |  * Released under the MIT license
 8 |  * http://opensource.org/licenses/MIT
 9 |  *
10 |  */*,:after,:before{box-sizing:inherit}html{box-sizing:border-box;font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}input[type=text],input[type=email],input[type=search],input[type=password]{-webkit-appearance:none;-moz-appearance:none}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre,textarea{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}


--------------------------------------------------------------------------------
/codingpy/templates/includes/popular.html:
--------------------------------------------------------------------------------
 1 | 
2 | 7 | 8 |
9 |
10 | {# 确定每个版块的ICON #} 11 | {% for article in recommended_articles %} 12 |
13 | 14 | 17 |
18 | {% endfor %} 19 | 20 |
21 |
22 | 23 |
24 |
25 | {# 确定每个版块的ICON #} 26 | {% for article in popular_articles %} 27 |
28 | 29 | 32 |
33 | {% endfor %} 34 | 35 |
36 |
37 |
38 |
39 | {% for article in random_articles %} 40 |
41 | 42 | 45 |
46 | {% endfor %} 47 | 48 |
49 |
50 |
-------------------------------------------------------------------------------- /codingpy/templates/includes/navbar.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codingpy/templates/includes/item.html: -------------------------------------------------------------------------------- 1 |
2 | {{ article.category.name}} 3 |
4 | 5 | {% if article.thumbnail %} 6 |
7 |
8 | 9 |
10 |
11 |
12 |
查看详情
13 |
14 |
15 |
16 | 17 |
18 | 19 |
20 | {% endif %} 21 | 22 |
23 |
24 | {{ article.summary }} 25 |
26 |
27 |
28 |
29 |
30 | {# avatar of this article's author {{article.author.username}} #} 31 | avatar of earlgrey 32 |
33 |
34 | {{moment(article.created_at, local=True).fromNow()}} 35 | {% for tag in article.tags %} 36 | {{ tag.name }} 37 | {% endfor %} 38 | 39 | 40 | {# #} 41 |
42 | 43 |
44 |
45 | 46 | 47 |
48 | 49 | {% if article != all_articles[-1] %} 50 |
51 | {% endif %} 52 |
-------------------------------------------------------------------------------- /codingpy/templates/login.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block title %}登陆编程派 每天学习Python{% endblock title %} 4 | 5 | {% block metas %} 6 | 7 | 8 | 9 | {% endblock metas %} 10 | 11 | {% block main %} 12 |
13 |
14 | {#

15 | 16 |
登陆编程派
17 |

#} 18 | 19 |
20 | 21 | 22 |
23 |
24 |
25 | 26 | 27 |
28 |
29 |
30 |
31 | 32 | 33 |
34 |
35 | 36 |
37 |
38 | 39 | 40 |
41 |
42 | 43 | 44 | 45 |
46 | 47 | 48 |
49 | 50 |
51 | 还不是会员?请先注册 52 |
53 | 54 |
55 | 56 |
57 | 58 | {% endblock main %} 59 | 60 | {% block scripts %} 61 | 62 | {% endblock scripts %} -------------------------------------------------------------------------------- /codingpy/templates/register.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% from 'wtf.html' import render_field %} 3 | {% block title %}注册会员{% endblock title %} 4 | 5 | {% block metas %} 6 | 7 | 8 | 9 | {% endblock metas %} 10 | 11 | {% block main %} 12 |
13 |
14 |

会员注册

15 |
16 | 17 |
18 |
19 |
20 | 21 | 22 |
23 |
24 |
25 |
26 | 27 | 28 |
29 |
30 |
31 |
32 | 33 | 34 |
35 |
36 |
37 |
38 | 39 | 40 |
41 |
42 | 43 |
44 | 45 | 46 |
47 | 48 |
49 | 已经是会员?点击这里登陆 50 |
51 | 52 |
53 | 54 |
55 | 56 | {% endblock main %} 57 | 58 | {% block scripts %} 59 | 60 | {% endblock scripts %} -------------------------------------------------------------------------------- /codingpy/templates/includes/footer.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

关于编程派

4 | 9 |
10 |
11 |

关注编程派

12 | 13 | 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 |
27 |

导航

28 | 35 |
36 |
37 |

Powered by

38 |
39 | python 40 | flask 41 |
42 | {# 43 | digitalocean #} 44 |
45 |
46 | -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/dimmer.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Dimmer 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.dimmable{position:relative}.ui.dimmer{display:none;position:absolute;top:0!important;left:0!important;width:100%;height:100%;text-align:center;vertical-align:middle;background-color:rgba(0,0,0,.85);opacity:0;line-height:1;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-transition:background-color .5s linear;transition:background-color .5s linear;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;will-change:opacity;z-index:1000}.ui.dimmer>.content{width:100%;height:100%;display:table;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}.ui.dimmer>.content>*{display:table-cell;vertical-align:middle;color:#FFF}.ui.segment>.ui.dimmer{border-radius:inherit!important}.animating.dimmable:not(body),.dimmed.dimmable:not(body){overflow:hidden}.dimmed.dimmable>.ui.animating.dimmer,.dimmed.dimmable>.ui.visible.dimmer,.ui.active.dimmer{display:block;opacity:1}.ui.disabled.dimmer{width:0!important;height:0!important}.ui.page.dimmer{position:fixed;-webkit-transform-style:'';transform-style:'';-webkit-perspective:2000px;perspective:2000px;-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center}body.animating.in.dimmable,body.dimmed.dimmable{overflow:hidden}body.dimmable>.dimmer{position:fixed}.blurring.dimmable>:not(.dimmer){-webkit-filter:blur(0) grayscale(0);filter:blur(0) grayscale(0);-webkit-transition:.8s -webkit-filter ease,.8s filter ease;transition:.8s filter ease}.blurring.dimmed.dimmable>:not(.dimmer){-webkit-filter:blur(5px) grayscale(.7);filter:blur(5px) grayscale(.7)}.blurring.dimmable>.dimmer{background-color:rgba(0,0,0,.6)}.blurring.dimmable>.inverted.dimmer{background-color:rgba(255,255,255,.6)}.ui.dimmer>.top.aligned.content>*{vertical-align:top}.ui.dimmer>.bottom.aligned.content>*{vertical-align:bottom}.ui.inverted.dimmer{background-color:rgba(255,255,255,.85)}.ui.inverted.dimmer>.content>*{color:#FFF}.ui.simple.dimmer{display:block;overflow:hidden;opacity:1;width:0;height:0%;z-index:-100;background-color:transparent}.dimmed.dimmable>.ui.simple.dimmer{overflow:visible;opacity:1;width:100%;height:100%;background-color:rgba(0,0,0,.85);z-index:1}.ui.simple.inverted.dimmer{background-color:rgba(255,255,255,0)}.dimmed.dimmable>.ui.simple.inverted.dimmer{background-color:rgba(255,255,255,.85)} -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/comment.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Comment 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.comments{margin:1.5em 0;max-width:650px}.ui.comments:first-child{margin-top:0}.ui.comments:last-child{margin-bottom:0}.ui.comments .comment{position:relative;background:0 0;margin:.5em 0 0;padding:.5em 0 0;border:none;border-top:none;line-height:1.2}.ui.comments .comment:first-child{margin-top:0;padding-top:0}.ui.comments .comment .comments{margin:0 0 .5em .5em;padding:1em 0 1em 1em}.ui.comments .comment .comments:before{position:absolute;top:0;left:0}.ui.comments .comment .comments .comment{border:none;border-top:none;background:0 0}.ui.comments .comment .avatar{display:block;width:2.5em;height:auto;float:left;margin:.2em 0 0}.ui.comments .comment .avatar img,.ui.comments .comment img.avatar{display:block;margin:0 auto;width:100%;height:100%;border-radius:.25rem}.ui.comments .comment>.content{display:block}.ui.comments .comment>.avatar~.content{margin-left:3.5em}.ui.comments .comment .author{font-size:1em;color:rgba(0,0,0,.87);font-weight:700}.ui.comments .comment a.author{cursor:pointer}.ui.comments .comment a.author:hover{color:#1e70bf}.ui.comments .comment .metadata{display:inline-block;margin-left:.5em;color:rgba(0,0,0,.4);font-size:.875em}.ui.comments .comment .metadata>*{display:inline-block;margin:0 .5em 0 0}.ui.comments .comment .metadata>:last-child{margin-right:0}.ui.comments .comment .text{margin:.25em 0 .5em;font-size:1em;word-wrap:break-word;color:rgba(0,0,0,.87);line-height:1.3}.ui.comments .comment .actions{font-size:.875em}.ui.comments .comment .actions a{cursor:pointer;display:inline-block;margin:0 .75em 0 0;color:rgba(0,0,0,.4)}.ui.comments .comment .actions a:last-child{margin-right:0}.ui.comments .comment .actions a.active,.ui.comments .comment .actions a:hover{color:rgba(0,0,0,.8)}.ui.comments>.reply.form{margin-top:1em}.ui.comments .comment .reply.form{width:100%;margin-top:1em}.ui.comments .reply.form textarea{font-size:1em;height:12em}.ui.collapsed.comments,.ui.comments .collapsed.comment,.ui.comments .collapsed.comments{display:none}.ui.threaded.comments .comment .comments{margin:-1.5em 0 -1em 1.25em;padding:3em 0 2em 2.25em;box-shadow:-1px 0 0 rgba(34,36,38,.15)}.ui.minimal.comments .comment .actions{opacity:0;position:absolute;top:0;right:0;left:auto;-webkit-transition:opacity .2s ease;transition:opacity .2s ease;-webkit-transition-delay:.1s;transition-delay:.1s}.ui.minimal.comments .comment>.content:hover>.actions{opacity:1}.ui.small.comments{font-size:.9em}.ui.comments{font-size:1em}.ui.large.comments{font-size:1.1em}.ui.huge.comments{font-size:1.2em} -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/breadcrumb.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Breadcrumb 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Breadcrumb 15 | *******************************/ 16 | 17 | .ui.breadcrumb { 18 | line-height: 1; 19 | display: inline-block; 20 | margin: 0em 0em; 21 | vertical-align: middle; 22 | } 23 | .ui.breadcrumb:first-child { 24 | margin-top: 0em; 25 | } 26 | .ui.breadcrumb:last-child { 27 | margin-bottom: 0em; 28 | } 29 | 30 | 31 | /******************************* 32 | Content 33 | *******************************/ 34 | 35 | 36 | /* Divider */ 37 | .ui.breadcrumb .divider { 38 | display: inline-block; 39 | opacity: 0.7; 40 | margin: 0em 0.21428571rem 0em; 41 | font-size: 0.92857143em; 42 | color: rgba(0, 0, 0, 0.4); 43 | vertical-align: baseline; 44 | } 45 | 46 | /* Link */ 47 | .ui.breadcrumb a { 48 | color: #4183C4; 49 | } 50 | .ui.breadcrumb a:hover { 51 | color: #1e70bf; 52 | } 53 | 54 | /* Icon Divider */ 55 | .ui.breadcrumb .icon.divider { 56 | font-size: 0.85714286em; 57 | vertical-align: baseline; 58 | } 59 | 60 | /* Section */ 61 | .ui.breadcrumb a.section { 62 | cursor: pointer; 63 | } 64 | .ui.breadcrumb .section { 65 | display: inline-block; 66 | margin: 0em; 67 | padding: 0em; 68 | } 69 | 70 | /* Loose Coupling */ 71 | .ui.breadcrumb.segment { 72 | display: inline-block; 73 | padding: 0.71428571em 1em; 74 | } 75 | 76 | 77 | /******************************* 78 | States 79 | *******************************/ 80 | 81 | .ui.breadcrumb .active.section { 82 | font-weight: bold; 83 | } 84 | 85 | 86 | /******************************* 87 | Variations 88 | *******************************/ 89 | 90 | .ui.mini.breadcrumb { 91 | font-size: 0.71428571rem; 92 | } 93 | .ui.tiny.breadcrumb { 94 | font-size: 0.85714286rem; 95 | } 96 | .ui.small.breadcrumb { 97 | font-size: 0.92857143rem; 98 | } 99 | .ui.breadcrumb { 100 | font-size: 1rem; 101 | } 102 | .ui.large.breadcrumb { 103 | font-size: 1.14285714rem; 104 | } 105 | .ui.big.breadcrumb { 106 | font-size: 1.28571429rem; 107 | } 108 | .ui.huge.breadcrumb { 109 | font-size: 1.42857143rem; 110 | } 111 | .ui.massive.breadcrumb { 112 | font-size: 1.71428571rem; 113 | } 114 | 115 | 116 | /******************************* 117 | Theme Overrides 118 | *******************************/ 119 | 120 | 121 | 122 | /******************************* 123 | Site Overrides 124 | *******************************/ 125 | 126 | -------------------------------------------------------------------------------- /codingpy/config.py: -------------------------------------------------------------------------------- 1 | #!usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import os 5 | import logging 6 | from hashlib import md5 7 | from logging.handlers import RotatingFileHandler 8 | 9 | basedir = os.path.abspath(os.path.dirname(__file__)) 10 | datadir = 'data' 11 | 12 | 13 | class Config: 14 | SITE_NAME = 'codingpy | 编程派' 15 | SECRET_KEY = os.urandom(32) 16 | DEBUG_TB_INTERCEPT_REDIRECTS = False 17 | 18 | BODY_FORMAT = os.getenv('BODY_FORMAT') or 'html' 19 | 20 | # mail setup 21 | MAIL_SERVER = 'smtp.126.com' 22 | MAIL_PORT = 25 23 | MAIL_USERNAME = os.environ.get('MAIL_USERNAME') 24 | MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD') 25 | MAIL_SUBJECT_PREFIX = '[CODINGPY]' 26 | MAIL_SENDER = 'CODINGPY Admin ' 27 | 28 | APP_ADMIN = os.environ.get('CODINGPY_ADMIN') 29 | 30 | # flask-cache configuration 31 | CACHE_KEY = 'view/%s' # ? 32 | CACHE_DEFAULT_TIMEOUT = 120 33 | # 使用uwsgi_cache效果更好 34 | # Used only for RedisCache, MemcachedCache and GAEMemcachedCache 35 | CACHE_KEY_PREFIX = '%s_' % md5(SECRET_KEY).hexdigest()[7:15] 36 | 37 | CACHE_TYPE = 'redis' 38 | CACHE_REDIS_HOST = 'localhost' 39 | CACHE_REDIS_PORT = 6379 40 | CACHE_REDIS_URL = 'redis://localhost:6379' 41 | CACHE_REDIS_PASSWORD = '' 42 | CACHE_REDIS_DB = '0' 43 | 44 | @staticmethod 45 | def init_app(app): 46 | _handler = RotatingFileHandler( 47 | 'app.log', maxBytes=10000, backupCount=1) 48 | _handler.setLevel(logging.WARNING) 49 | app.logger.addHandler(_handler) 50 | 51 | # TODO 52 | # mail_handler = Config.get_mailhandler() 53 | # app.logger.addHandler(mail_handler) 54 | 55 | 56 | class DevelopmentConfig(Config): 57 | DEBUG = True 58 | 59 | SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URI') \ 60 | or "postgresql://vagrant:vagrant@localhost/codingpy" or \ 61 | 'sqlite:///%s' % os.path.join(basedir, 'data_dev_sqlite.db') 62 | 63 | @classmethod 64 | def init_app(cls, app): 65 | Config.init_app(app) 66 | 67 | 68 | class ProductionConfig(Config): 69 | # CACHE_DIR = os.path.join(basedir, datadir, 'cache') 70 | DEBUG = False 71 | 72 | SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URI') or \ 73 | "postgresql://earlgrey:earlgrey@localhost/codingpy" 74 | 75 | @classmethod 76 | def init_app(cls, app): 77 | Config.init_app(app) 78 | 79 | 80 | class TestingConfig(Config): 81 | TESTING = True 82 | 83 | SQLALCHEMY_DATABASE_URI = os.environ.get('TEST_DATABASE_URI') or \ 84 | 'sqlite:///:memory:' 85 | 86 | 87 | config = { 88 | 'development': DevelopmentConfig, 89 | 'testing': TestingConfig, 90 | 'production': ProductionConfig, 91 | 'default': ProductionConfig, 92 | } 93 | -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/rail.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Rail 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Rails 15 | *******************************/ 16 | 17 | .ui.rail { 18 | position: absolute; 19 | top: 0%; 20 | width: 300px; 21 | height: 100%; 22 | } 23 | .ui.left.rail { 24 | left: auto; 25 | right: 100%; 26 | padding: 0em 2rem 0em 0em; 27 | margin: 0em 2rem 0em 0em; 28 | } 29 | .ui.right.rail { 30 | left: 100%; 31 | right: auto; 32 | padding: 0em 0em 0em 2rem; 33 | margin: 0em 0em 0em 2rem; 34 | } 35 | 36 | 37 | /******************************* 38 | Variations 39 | *******************************/ 40 | 41 | 42 | /*-------------- 43 | Internal 44 | ---------------*/ 45 | 46 | .ui.left.internal.rail { 47 | left: 0%; 48 | right: auto; 49 | padding: 0em 0em 0em 2rem; 50 | margin: 0em 0em 0em 2rem; 51 | } 52 | .ui.right.internal.rail { 53 | left: auto; 54 | right: 0%; 55 | padding: 0em 2rem 0em 0em; 56 | margin: 0em 2rem 0em 0em; 57 | } 58 | 59 | /*-------------- 60 | Dividing 61 | ---------------*/ 62 | 63 | .ui.dividing.rail { 64 | width: 302.5px; 65 | } 66 | .ui.left.dividing.rail { 67 | padding: 0em 2.5rem 0em 0em; 68 | margin: 0em 2.5rem 0em 0em; 69 | border-right: 1px solid rgba(34, 36, 38, 0.15); 70 | } 71 | .ui.right.dividing.rail { 72 | border-left: 1px solid rgba(34, 36, 38, 0.15); 73 | padding: 0em 0em 0em 2.5rem; 74 | margin: 0em 0em 0em 2.5rem; 75 | } 76 | 77 | /*-------------- 78 | Distance 79 | ---------------*/ 80 | 81 | .ui.close.rail { 82 | width: 301px; 83 | } 84 | .ui.close.left.rail { 85 | padding: 0em 1em 0em 0em; 86 | margin: 0em 1em 0em 0em; 87 | } 88 | .ui.close.right.rail { 89 | padding: 0em 0em 0em 1em; 90 | margin: 0em 0em 0em 1em; 91 | } 92 | .ui.very.close.rail { 93 | width: 300.5px; 94 | } 95 | .ui.very.close.left.rail { 96 | padding: 0em 0.5em 0em 0em; 97 | margin: 0em 0.5em 0em 0em; 98 | } 99 | .ui.very.close.right.rail { 100 | padding: 0em 0em 0em 0.5em; 101 | margin: 0em 0em 0em 0.5em; 102 | } 103 | 104 | /*-------------- 105 | Attached 106 | ---------------*/ 107 | 108 | .ui.attached.left.rail, 109 | .ui.attached.right.rail { 110 | padding: 0em; 111 | margin: 0em; 112 | } 113 | 114 | /*-------------- 115 | Sizing 116 | ---------------*/ 117 | 118 | .ui.rail { 119 | font-size: 1rem; 120 | } 121 | 122 | 123 | /******************************* 124 | Theme Overrides 125 | *******************************/ 126 | 127 | 128 | 129 | /******************************* 130 | Site Overrides 131 | *******************************/ 132 | 133 | -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/video.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.0.0 - Video 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2014 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Video 15 | *******************************/ 16 | 17 | .ui.video { 18 | background-color: #dddddd; 19 | position: relative; 20 | max-width: 100%; 21 | padding-bottom: 56.25%; 22 | height: 0px; 23 | overflow: hidden; 24 | } 25 | 26 | /*-------------- 27 | Content 28 | ---------------*/ 29 | 30 | 31 | /* Placeholder Image */ 32 | .ui.video .placeholder { 33 | background-color: #333333; 34 | } 35 | 36 | /* Play Icon Overlay */ 37 | .ui.video .play { 38 | cursor: pointer; 39 | position: absolute; 40 | top: 0px; 41 | left: 0px; 42 | z-index: 10; 43 | width: 100%; 44 | height: 100%; 45 | background: transparent; 46 | -webkit-transition: background 0.2s ease; 47 | transition: background 0.2s ease; 48 | } 49 | .ui.video .play.icon:before { 50 | position: absolute; 51 | top: 50%; 52 | left: 50%; 53 | z-index: 11; 54 | -webkit-transform: translateX(-50%) translateY(-50%); 55 | -ms-transform: translateX(-50%) translateY(-50%); 56 | transform: translateX(-50%) translateY(-50%); 57 | color: rgba(255, 255, 255, 0.7); 58 | font-size: 7rem; 59 | text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15); 60 | -webkit-transition: color 0.2s ease; 61 | transition: color 0.2s ease; 62 | } 63 | .ui.video .placeholder { 64 | position: absolute; 65 | top: 0px; 66 | left: 0px; 67 | display: block; 68 | width: 100%; 69 | height: 100%; 70 | } 71 | 72 | /* IFrame Embed */ 73 | .ui.video .embed iframe, 74 | .ui.video .embed embed, 75 | .ui.video .embed object { 76 | position: absolute; 77 | border: none; 78 | width: 100%; 79 | height: 100%; 80 | top: 0px; 81 | left: 0px; 82 | margin: 0em; 83 | padding: 0em; 84 | } 85 | 86 | 87 | /******************************* 88 | States 89 | *******************************/ 90 | 91 | 92 | /*-------------- 93 | Hover 94 | ---------------*/ 95 | 96 | .ui.video .play:hover { 97 | background: rgba(0, 0, 0, 0); 98 | } 99 | .ui.video .play:hover:before { 100 | color: #ffffff; 101 | } 102 | 103 | /*-------------- 104 | Active 105 | ---------------*/ 106 | 107 | .ui.active.video .play, 108 | .ui.active.video .placeholder { 109 | display: none; 110 | } 111 | .ui.active.video .embed { 112 | display: inline; 113 | } 114 | 115 | 116 | /******************************* 117 | Video Overrides 118 | *******************************/ 119 | 120 | 121 | 122 | /******************************* 123 | Site Overrides 124 | *******************************/ 125 | 126 | -------------------------------------------------------------------------------- /codingpy/static/vendor/glide/css/glide.theme.css: -------------------------------------------------------------------------------- 1 | .glide__arrows { 2 | position: absolute; 3 | } 4 | .glide--horizontal .glide__arrows { 5 | top: 50%; 6 | width: 92%; 7 | margin-left: 4%; 8 | } 9 | .glide--vertical .glide__arrows { 10 | left: 50%; 11 | height: 88%; 12 | margin-top: 6%; 13 | } 14 | .glide__arrow { 15 | position: absolute; 16 | z-index: 2; 17 | color: white; 18 | text-transform: uppercase; 19 | font: 11px Arial, sans-serif; 20 | padding: 9px 12px; 21 | background-color: transparent; 22 | border: 2px solid rgba(255, 255, 255, 0.5); 23 | border-radius: 4px; 24 | -webkit-transition: border 300ms ease-in-out; 25 | transition: border 300ms ease-in-out; 26 | } 27 | .glide__arrow:focus { 28 | outline: none; 29 | } 30 | .glide__arrow:hover { 31 | border-color: white; 32 | } 33 | .glide--horizontal .glide__arrow { 34 | -webkit-transform: translateY(-50%); 35 | -ms-transform: translateY(-50%); 36 | transform: translateY(-50%); 37 | } 38 | .glide--horizontal .glide__arrow.prev { 39 | left: 0; 40 | } 41 | .glide--horizontal .glide__arrow.next { 42 | right: 0; 43 | } 44 | .glide--vertical .glide__arrow { 45 | -webkit-transform: translateX(-50%); 46 | -ms-transform: translateX(-50%); 47 | transform: translateX(-50%); 48 | } 49 | .glide--vertical .glide__arrow.prev { 50 | top: 0; 51 | } 52 | .glide--vertical .glide__arrow.next { 53 | bottom: 0; 54 | } 55 | .glide__bullets { 56 | position: absolute; 57 | list-style: none; 58 | } 59 | .glide--horizontal .glide__bullets { 60 | bottom: 8%; 61 | left: 0; 62 | width: 100%; 63 | height: 12px; 64 | text-align: center; 65 | } 66 | .glide--vertical .glide__bullets { 67 | top: 50%; 68 | right: 8%; 69 | width: 12px; 70 | height: auto; 71 | -webkit-transform: translateY(-50%); 72 | -ms-transform: translateY(-50%); 73 | transform: translateY(-50%); 74 | } 75 | .glide__bullets > * { 76 | display: inline-block; 77 | background-color: rgba(255, 255, 255, 0.5); 78 | width: 12px; 79 | height: 12px; 80 | padding: 0; 81 | cursor: pointer; 82 | border-radius: 50%; 83 | border: 2px solid transparent; 84 | -webkit-transition: all 300ms ease-in-out; 85 | transition: all 300ms ease-in-out; 86 | } 87 | .glide--horizontal .glide__bullets > * { 88 | margin: 0 5px; 89 | } 90 | .glide--vertical .glide__bullets > * { 91 | vertical-align: middle; 92 | } 93 | .glide__bullets > *.active { 94 | background-color: white; 95 | } 96 | .glide__bullets > *:focus { 97 | outline: none; 98 | } 99 | .glide__bullets > *:hover, 100 | .glide__bullets > *:focus { 101 | border: 2px solid white; 102 | background-color: rgba(255, 255, 255, 0.5); 103 | } 104 | .glide--slider .glide__arrow { 105 | opacity: 1; 106 | -webkit-transition: opacity 150ms ease; 107 | transition: opacity 150ms ease; 108 | } 109 | .glide--slider .glide__arrow.disabled { 110 | opacity: 0.33; 111 | } 112 | -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_sources/foreword.txt: -------------------------------------------------------------------------------- 1 | 译者的话 2 | ==================================== 3 | 4 | 我是一名自学Python的编程爱好者。之所以说是爱好者,是因为我不是计算机专业毕业的。我的第一个单位是一家媒体,因为工作关系对当时新闻界流行的数据视觉化十分感兴趣,从《鲜活的数据》一书中了解到Python编程语言。而我使用的第一本教材,就是Allen Downey的《Think Python》,副标题叫“如何像计算机科学家一样思考”。 5 | 6 | 后来,我到了一家互联网公司,接触运营工作。我也利用业余时间开发出了自己的网站——[编程派](http://codingpy.com),而网站的定位就是专注Python编程,这也是网站名称和网站域名的由来:“编程派”中的“派”字,取自Python前两个字母的发音;codingpy,则是coding python的缩略。了解Python的朋友都知道,Python脚本的默认文件名后缀就是`.py`。 7 | 8 | 搭建“编程派”网站(后来还开通了“编程派”微信订阅号和今日头条号)的目的,就是为了能够让更多的人了解Python语言,更快地获取国外的Python教程和资源,一起交流、学习Python。因为我相信,每个人都值得学习一点编程知识,而在我看来,最好的入门语言就是Python。 9 | 10 | 为什么想要翻译一本书? 11 | ---------------------- 12 | 13 | 呃,其实我是语言类专业出身的,所以难免会有想要翻译一本书的冲动,可惜还没有出版社请我去翻书。所以只有自己上啦。 14 | 15 | 另外,这四个多月来通过网站和微信号,已经和大家分享了近百篇原创编译的Python教程,很多都得到了各大技术网站的转载。虽然大家在阅读文章的时候,可能并不太会注意“编程派”这个名字,但能够帮助到更多的人,还是不错的。但是这些原创编译的教程存在一个问题,就是各自是不关联的,而且也有一定的难度,对于完全零基础的人来说,根本没有什么卵用。 16 | 17 | 所以,我想成系列地与大家分享文章,而我最想帮助的人,就是那些零编程基础的朋友。因此,最适合的系列文章莫过于一本Python入门教材啦。 18 | 19 | 为什么选择《Think Python》 20 | --------------------------- 21 | 22 | 选择《Think Python》,一是因为它是我自己入门使用的第一本教材;二是,它确实非常浅显易懂,把很多概念用非常朴实的话进行了解释。至少,当时零基础的我,看这本书时没有大的障碍。 23 | 24 | 这和作者在设计、编写此书时的出发点密不可分。你可以在本书的“序言”部分(今天微信推送的另一篇文章),看到更加详细的解释。 25 | 26 | 为什么翻译Python 3版? 27 | --------------------------- 28 | 29 | 此书已经有了Python 2版,为什么还要更新到Python 3呢? 30 | 31 | (本书最新版与此前版本的区别,请看“序言”部分。) 32 | 33 | 这是因为Python 3才是Python的未来。Python之父Guido van Rossum早就坚决指出,不会再延长Python 2的支持协议。更具体一点说,就是到2020年时,Python核心开发团队就会停止对Python 2.7的开发、维护工作。而且,他们也早就不再往2.7版中添加新特性了。 34 | 35 | 虽然现在很多公司还在使用2.7,从Python 2迁移到Python 3的过程也非常的艰难,但是可以肯定的是,Python 3才是Python的未来! 36 | 37 | 所以,我们需要Python 3版的《Think Python》。 38 | 39 | (另外一个原因,当然是因为Python 2版的已经有中译本,而且已经出版啦。。。本书在翻译过程中,会参考[车万翔老师组织翻译的Python 2版](https://github.com/carfly/thinkpython-cn)。) 40 | 41 | 微信放送计划 42 | -------------------- 43 | 44 | 本书最新版一共21章,我目前的计划是一周放送两章(视章节长短和翻译进度进行调整),尽量不将时间拖得太长。所有译文将在微信公众号首发。 45 | 46 | 微信放送安排如下: 47 | 48 | - 周三早10点放送一个章节 49 | - 周六早10点再放送下一章 50 | 51 | 中间会穿插一些其他的Python教程和资源推送。如果大家希望能在微信群交流学习心得 ,可以加我的个人微信号,说明希望加群交流。 52 | 53 | 支持本书的翻译计划 54 | --------------------- 55 | 56 | 如果你也喜欢这本书,喜欢Python编程,希望你能够支持本书最新版的翻译工作。 57 | 58 | 支持的方式有很多种,你可以将本书的翻译计划告诉想学编程的朋友,并推荐本书。你也可以关注“编程派”的微信订阅号,将最新的译文分享给更多的人。甚至,你还可以联系我,加入到这本书的翻译工作中来。 59 | 60 | 当然,如果你愿意的话,你还可以扫描下面的二维码,让我能够一边翻书一边喝咖啡的。O(∩_∩)O~ 61 | 62 | ![赞助编程派的翻译计划](http://ww1.sinaimg.cn/mw690/006faQNTgw1f1g1gf903aj308w0ai74q.jpg) 63 | 64 | 加入本书的翻译 65 | ----------------------- 66 | 67 | 已经有两位同学表示愿意加入本书的翻译工作,其他希望加入的同学可以fork该repo,并提交issue说明希望负责哪几章。你可以在所负责章节一开头处,注明你在Gitub的ID和链接。 68 | 69 | 本书翻译完成后,我会将最终的文档托管在[编程派网站](http://codingpy.com),并提供PDF等其他格式的分享链接。 70 | 71 | 贡献者 72 | ------------------- 73 | 74 | To be added。 75 | 76 | 声明 77 | ------------------ 78 | 79 | 本书的原作是一本自由书籍(Free Book),以知识共享协议([Creative Commons Attribution-NonCommercial 3.0 Unported License](https://creativecommons.org/licenses/by-nc/3.0/us/))发布。因此,该中译版将以同样的协议发布,不会用于商业用途。你可以自由分享、修改、复制该中译版,但请不要用于商业用途。 80 | 81 | 此书原著版权归[Allen Downey](http://greenteapress.com/wp/think-python-2e/)所有,原作链接如下:[https://github.com/AllenDowney/ThinkPython2](https://github.com/AllenDowney/ThinkPython2)。 82 | 83 | 该中译版在翻译过程中,将参考车万翔老师组织翻译的Python 2版:[https://github.com/carfly/thinkpython-cn](https://github.com/carfly/thinkpython-cn)。 84 | -------------------------------------------------------------------------------- /codingpy/_base.py: -------------------------------------------------------------------------------- 1 | #!usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | # import os 5 | # import sys 6 | 7 | from flask import Flask, send_from_directory, render_template 8 | from flask_wtf.csrf import CsrfProtect 9 | # from flask_debugtoolbar import DebugToolbarExtension 10 | # from flask.ext.login import logout_user, current_user 11 | 12 | from .models import AnonymousUser 13 | from .ext import (db, moment, cache, login_manager, bcrypt) 14 | from .config import config 15 | from .admins import admin 16 | 17 | __all__ = ['create_app'] 18 | 19 | csrf = CsrfProtect() 20 | # toolbar = DebugToolbarExtension() 21 | 22 | 23 | def create_app(config_name): 24 | app = Flask(__name__) 25 | app.config.from_object(config[config_name]) 26 | config[config_name].init_app(app) 27 | 28 | db.init_app(app) 29 | 30 | # mail.init_app(app) 31 | moment.init_app(app) 32 | csrf.init_app(app) 33 | # toolbar.init_app(app) 34 | 35 | cache.init_app(app) 36 | bcrypt.init_app(app) 37 | admin.init_app(app) 38 | 39 | register_managers(app) 40 | register_routes(app) 41 | register_error_handle(app) 42 | 43 | # before every request 44 | # @app.before_request 45 | # def before_request(): 46 | # if not current_user.is_anonymous: 47 | # if not current_user.confirmed: 48 | # flash('请登录邮箱激活账户。') 49 | # logout_user() 50 | # if current_user.is_banned: 51 | # flash('账户已被禁用,请联系管理员。') 52 | # logout_user() 53 | 54 | @app.route('/favicon.ico') 55 | def favicon(): 56 | return send_from_directory(app.static_folder, 'favicon.ico', 57 | mimetype='image/vnd.microsoft.icon') 58 | 59 | @app.route('/robots.txt') 60 | def robotstxt(): 61 | return send_from_directory(app.static_folder, 'robots.txt') 62 | 63 | return app 64 | 65 | 66 | def register_routes(app): 67 | from .controllers import site, account 68 | 69 | app.register_blueprint(site.bp, url_prefix='') 70 | app.register_blueprint(account.bp, url_prefix='/account') 71 | 72 | 73 | def register_managers(app): 74 | 75 | # login_manager.session_protection = 'strong' 76 | # flask-login will keep track of ip and broswer agent, 77 | # will log user out if it detects a change 78 | login_manager.login_view = 'account.login' 79 | login_manager.login_message = '请先登陆' 80 | login_manager.anonymous_user = AnonymousUser 81 | login_manager.init_app(app) 82 | 83 | 84 | def register_error_handle(app): 85 | @app.errorhandler(403) 86 | def page_403(error): 87 | return render_template('errors/403.html'), 403 88 | 89 | @app.errorhandler(404) 90 | def page_404(error): 91 | return render_template('errors/404.html'), 404 92 | 93 | @app.errorhandler(500) 94 | def page_500(error): 95 | return render_template('errors/500.html'), 500 96 | 97 | @app.errorhandler(502) 98 | def page_502(error): 99 | return render_template('errors/502.html'), 502 100 | -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/colorize.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.0.0 - Colorize 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | !function(e,n,i,t){"use strict";e.fn.colorize=function(n){var i=e.isPlainObject(n)?e.extend(!0,{},e.fn.colorize.settings,n):e.extend({},e.fn.colorize.settings),o=arguments||!1;return e(this).each(function(n){var a,r,c,s,d,g,u,l,m=e(this),f=e("")[0],h=e("")[0],p=e("")[0],v=new Image,w=i.colors,b=(i.paths,i.namespace),y=i.error,C=m.data("module-"+b);return l={checkPreconditions:function(){return l.debug("Checking pre-conditions"),!e.isPlainObject(w)||e.isEmptyObject(w)?(l.error(y.undefinedColors),!1):!0},async:function(e){i.async?setTimeout(e,0):e()},getMetadata:function(){l.debug("Grabbing metadata"),s=m.data("image")||i.image||t,d=m.data("name")||i.name||n,g=i.width||m.width(),u=i.height||m.height(),(0===g||0===u)&&l.error(y.undefinedSize)},initialize:function(){l.debug("Initializing with colors",w),l.checkPreconditions()&&l.async(function(){l.getMetadata(),l.canvas.create(),l.draw.image(function(){l.draw.colors(),l.canvas.merge()}),m.data("module-"+b,l)})},redraw:function(){l.debug("Redrawing image"),l.async(function(){l.canvas.clear(),l.draw.colors(),l.canvas.merge()})},change:{color:function(e,n){return l.debug("Changing color",e),w[e]===t?(l.error(y.missingColor),!1):(w[e]=n,void l.redraw())}},canvas:{create:function(){l.debug("Creating canvases"),f.width=g,f.height=u,h.width=g,h.height=u,p.width=g,p.height=u,a=f.getContext("2d"),r=h.getContext("2d"),c=p.getContext("2d"),m.append(f),a=m.children("canvas")[0].getContext("2d")},clear:function(e){l.debug("Clearing canvas"),c.fillStyle="#FFFFFF",c.fillRect(0,0,g,u)},merge:function(){return e.isFunction(a.blendOnto)?(a.putImageData(r.getImageData(0,0,g,u),0,0),void c.blendOnto(a,"multiply")):void l.error(y.missingPlugin)}},draw:{image:function(e){l.debug("Drawing image"),e=e||function(){},s?(v.src=s,v.onload=function(){r.drawImage(v,0,0),e()}):(l.error(y.noImage),e())},colors:function(){l.debug("Drawing color overlays",w),e.each(w,function(e,n){i.onDraw(c,d,e,n)})}},debug:function(e,n){i.debug&&(n!==t?console.info(i.name+": "+e,n):console.info(i.name+": "+e))},error:function(e){console.warn(i.name+": "+e)},invoke:function(n,o,a){var r;return a=a||Array.prototype.slice.call(arguments,2),"string"==typeof n&&C!==t&&(n=n.split("."),e.each(n,function(n,t){return e.isPlainObject(C[t])?(C=C[t],!0):e.isFunction(C[t])?(r=C[t],!0):(l.error(i.error.method),!1)})),e.isFunction(r)?r.apply(o,a):!1}},C!==t&&o?("invoke"==o[0]&&(o=Array.prototype.slice.call(o,1)),l.invoke(o[0],this,Array.prototype.slice.call(o,1))):void l.initialize()}),this},e.fn.colorize.settings={name:"Image Colorizer",debug:!0,namespace:"colorize",onDraw:function(e,n,i,t){},async:!0,colors:{},metadata:{image:"image",name:"name"},error:{noImage:"No tracing image specified",undefinedColors:"No default colors specified.",missingColor:"Attempted to change color that does not exist",missingPlugin:"Blend onto plug-in must be included",undefinedHeight:"The width or height of image canvas could not be automatically determined. Please specify a height."}}}(jQuery,window,document); -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/css/badge_only.css: -------------------------------------------------------------------------------- 1 | .fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../font/fontawesome_webfont.eot");src:url("../font/fontawesome_webfont.eot?#iefix") format("embedded-opentype"),url("../font/fontawesome_webfont.woff") format("woff"),url("../font/fontawesome_webfont.ttf") format("truetype"),url("../font/fontawesome_webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:0.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;border-top:solid 10px #343131;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}img{width:100%;height:auto}} 2 | /*# sourceMappingURL=badge_only.css.map */ 3 | -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/nag.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Nag 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Nag 15 | *******************************/ 16 | 17 | .ui.nag { 18 | display: none; 19 | opacity: 0.95; 20 | position: relative; 21 | top: 0em; 22 | left: 0px; 23 | z-index: 999; 24 | min-height: 0em; 25 | width: 100%; 26 | margin: 0em; 27 | padding: 0.75em 1em; 28 | background: #555555; 29 | box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.2); 30 | font-size: 1rem; 31 | text-align: center; 32 | color: rgba(0, 0, 0, 0.87); 33 | border-radius: 0em 0em 0.28571429rem 0.28571429rem; 34 | -webkit-transition: 0.2s background ease; 35 | transition: 0.2s background ease; 36 | } 37 | a.ui.nag { 38 | cursor: pointer; 39 | } 40 | .ui.nag > .title { 41 | display: inline-block; 42 | margin: 0em 0.5em; 43 | color: #FFFFFF; 44 | } 45 | .ui.nag > .close.icon { 46 | cursor: pointer; 47 | opacity: 0.4; 48 | position: absolute; 49 | top: 50%; 50 | right: 1em; 51 | font-size: 1em; 52 | margin: -0.5em 0em 0em; 53 | color: #FFFFFF; 54 | -webkit-transition: opacity 0.2s ease; 55 | transition: opacity 0.2s ease; 56 | } 57 | 58 | 59 | /******************************* 60 | States 61 | *******************************/ 62 | 63 | 64 | /* Hover */ 65 | .ui.nag:hover { 66 | background: #555555; 67 | opacity: 1; 68 | } 69 | .ui.nag .close:hover { 70 | opacity: 1; 71 | } 72 | 73 | 74 | /******************************* 75 | Variations 76 | *******************************/ 77 | 78 | 79 | /*-------------- 80 | Static 81 | ---------------*/ 82 | 83 | .ui.overlay.nag { 84 | position: absolute; 85 | display: block; 86 | } 87 | 88 | /*-------------- 89 | Fixed 90 | ---------------*/ 91 | 92 | .ui.fixed.nag { 93 | position: fixed; 94 | } 95 | 96 | /*-------------- 97 | Bottom 98 | ---------------*/ 99 | 100 | .ui.bottom.nags, 101 | .ui.bottom.nag { 102 | border-radius: 0.28571429rem 0.28571429rem 0em 0em; 103 | top: auto; 104 | bottom: 0em; 105 | } 106 | 107 | /*-------------- 108 | White 109 | ---------------*/ 110 | 111 | .ui.inverted.nags .nag, 112 | .ui.inverted.nag { 113 | background-color: #F3F4F5; 114 | color: rgba(0, 0, 0, 0.85); 115 | } 116 | .ui.inverted.nags .nag .close, 117 | .ui.inverted.nags .nag .title, 118 | .ui.inverted.nag .close, 119 | .ui.inverted.nag .title { 120 | color: rgba(0, 0, 0, 0.4); 121 | } 122 | 123 | 124 | /******************************* 125 | Groups 126 | *******************************/ 127 | 128 | .ui.nags .nag { 129 | border-radius: 0em !important; 130 | } 131 | .ui.nags .nag:last-child { 132 | border-radius: 0em 0em 0.28571429rem 0.28571429rem; 133 | } 134 | .ui.bottom.nags .nag:last-child { 135 | border-radius: 0.28571429rem 0.28571429rem 0em 0em; 136 | } 137 | 138 | 139 | /******************************* 140 | Theme Overrides 141 | *******************************/ 142 | 143 | 144 | 145 | /******************************* 146 | User Overrides 147 | *******************************/ 148 | 149 | -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/loader.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Loader 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.loader{display:none;position:absolute;top:50%;left:50%;margin:0;text-align:center;z-index:1000;-webkit-transform:translateX(-50%) translateY(-50%);-ms-transform:translateX(-50%) translateY(-50%);transform:translateX(-50%) translateY(-50%)}.ui.loader:before{position:absolute;content:'';top:0;left:50%;border-radius:500rem;border:.2em solid rgba(0,0,0,.1)}.ui.loader:after{position:absolute;content:'';top:0;left:50%;-webkit-animation:loader .6s linear;animation:loader .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 transparent transparent;border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent}@-webkit-keyframes loader{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes loader{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ui.loader:after,.ui.loader:before{width:2.2585em;height:2.2585em;margin:0 0 0 -1.12925em}.ui.mini.loader:after,.ui.mini.loader:before{width:1.2857em;height:1.2857em;margin:0 0 0 -.64285em}.ui.small.loader:after,.ui.small.loader:before{width:1.7142em;height:1.7142em;margin:0 0 0 -.8571em}.ui.large.loader:after,.ui.large.loader:before{width:4.5714em;height:4.5714em;margin:0 0 0 -2.2857em}.ui.dimmer .loader{display:block}.ui.dimmer .ui.loader{color:rgba(255,255,255,.9)}.ui.dimmer .ui.loader:before{border-color:rgba(255,255,255,.15)}.ui.dimmer .ui.loader:after{border-color:#FFF transparent transparent}.ui.inverted.dimmer .ui.loader{color:rgba(0,0,0,.87)}.ui.inverted.dimmer .ui.loader:before{border-color:rgba(0,0,0,.1)}.ui.inverted.dimmer .ui.loader:after{border-color:#767676 transparent transparent}.ui.text.loader{width:auto!important;height:auto!important;text-align:center;font-style:normal}.ui.indeterminate.loader:after{-webkit-animation-direction:reverse;animation-direction:reverse;-webkit-animation-duration:1.2s;animation-duration:1.2s}.ui.loader.active,.ui.loader.visible{display:block}.ui.loader.disabled,.ui.loader.hidden{display:none}.ui.inverted.dimmer .ui.mini.loader,.ui.mini.loader{width:1.2857em;height:1.2857em;font-size:.71428571em}.ui.inverted.dimmer .ui.small.loader,.ui.small.loader{width:1.7142em;height:1.7142em;font-size:.92857143em}.ui.inverted.dimmer .ui.loader,.ui.loader{width:2.2585em;height:2.2585em;font-size:1em}.ui.inverted.dimmer .ui.loader.large,.ui.loader.large{width:4.5714em;height:4.5714em;font-size:1.14285714em}.ui.mini.text.loader{min-width:1.2857em;padding-top:1.99998571em}.ui.small.text.loader{min-width:1.7142em;padding-top:2.42848571em}.ui.text.loader{min-width:2.2585em;padding-top:2.97278571em}.ui.large.text.loader{min-width:4.5714em;padding-top:5.28568571em}.ui.inverted.loader{color:rgba(255,255,255,.9)}.ui.inverted.loader:before{border-color:rgba(255,255,255,.15)}.ui.inverted.loader:after{border-top-color:#FFF}.ui.inline.loader{position:relative;vertical-align:middle;margin:0;left:0;top:0;-webkit-transform:none;-ms-transform:none;transform:none}.ui.inline.loader.active,.ui.inline.loader.visible{display:inline-block}.ui.centered.inline.loader.active,.ui.centered.inline.loader.visible{display:block;margin-left:auto;margin-right:auto} -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/image.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Image 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.image{position:relative;display:inline-block;vertical-align:middle;max-width:100%;background-color:transparent}img.ui.image{display:block}.ui.image img,.ui.image svg{display:block;max-width:100%;height:auto}.ui.hidden.image,.ui.hidden.images{display:none}.ui.disabled.image,.ui.disabled.images{cursor:default;opacity:.45}.ui.inline.image,.ui.inline.image img,.ui.inline.image svg{display:inline-block}.ui.top.aligned.image,.ui.top.aligned.image img,.ui.top.aligned.image svg,.ui.top.aligned.images .image{display:inline-block;vertical-align:top}.ui.middle.aligned.image,.ui.middle.aligned.image img,.ui.middle.aligned.image svg,.ui.middle.aligned.images .image{display:inline-block;vertical-align:middle}.ui.bottom.aligned.image,.ui.bottom.aligned.image img,.ui.bottom.aligned.image svg,.ui.bottom.aligned.images .image{display:inline-block;vertical-align:bottom}.ui.rounded.image,.ui.rounded.image>*,.ui.rounded.images .image,.ui.rounded.images .image>*{border-radius:.3125em}.ui.bordered.image img,.ui.bordered.image svg,.ui.bordered.images .image,.ui.bordered.images img,.ui.bordered.images svg,img.ui.bordered.image{border:1px solid rgba(0,0,0,.1)}.ui.circular.image,.ui.circular.images{overflow:hidden}.ui.circular.image,.ui.circular.image>*,.ui.circular.images .image,.ui.circular.images .image>*{border-radius:500rem}.ui.fluid.image,.ui.fluid.image img,.ui.fluid.image svg,.ui.fluid.images,.ui.fluid.images img,.ui.fluid.images svg{display:block;width:100%;height:auto}.ui.avatar.image,.ui.avatar.image img,.ui.avatar.image svg,.ui.avatar.images .image,.ui.avatar.images img,.ui.avatar.images svg{margin-right:.25em;display:inline-block;width:2em;height:2em;border-radius:500rem}.ui.spaced.image{display:inline-block!important;margin-left:.5em;margin-right:.5em}.ui[class*="left spaced"].image{margin-left:.5em;margin-right:0}.ui[class*="right spaced"].image{margin-left:0;margin-right:.5em}.ui.floated.image,.ui.floated.images{float:left;margin-right:1em;margin-bottom:1em}.ui.right.floated.image,.ui.right.floated.images{float:right;margin-right:0;margin-bottom:1em;margin-left:1em}.ui.floated.image:last-child,.ui.floated.images:last-child{margin-bottom:0}.ui.centered.image,.ui.centered.images{margin-left:auto;margin-right:auto}.ui.mini.image,.ui.mini.images .image,.ui.mini.images img,.ui.mini.images svg{width:35px;height:auto;font-size:.71428571rem}.ui.tiny.image,.ui.tiny.images .image,.ui.tiny.images img,.ui.tiny.images svg{width:80px;height:auto;font-size:.85714286rem}.ui.small.image,.ui.small.images .image,.ui.small.images img,.ui.small.images svg{width:150px;height:auto;font-size:.92857143rem}.ui.medium.image,.ui.medium.images .image,.ui.medium.images img,.ui.medium.images svg{width:300px;height:auto;font-size:1rem}.ui.large.image,.ui.large.images .image,.ui.large.images img,.ui.large.images svg{width:450px;height:auto;font-size:1.14285714rem}.ui.big.image,.ui.big.images .image,.ui.big.images img,.ui.big.images svg{width:600px;height:auto;font-size:1.28571429rem}.ui.huge.image,.ui.huge.images .image,.ui.huge.images img,.ui.huge.images svg{width:800px;height:auto;font-size:1.42857143rem}.ui.massive.image,.ui.massive.images .image,.ui.massive.images img,.ui.massive.images svg{width:960px;height:auto;font-size:1.71428571rem}.ui.images{font-size:0;margin:0 -.25rem}.ui.images .image,.ui.images img,.ui.images svg{display:inline-block;margin:0 .25rem .5rem} -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/site.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Site 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Page 15 | *******************************/ 16 | 17 | @import url('https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin'); 18 | html, 19 | body { 20 | height: 100%; 21 | } 22 | html { 23 | font-size: 14px; 24 | } 25 | body { 26 | margin: 0px; 27 | padding: 0px; 28 | overflow-x: hidden; 29 | min-width: 320px; 30 | background: #FFFFFF; 31 | font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif; 32 | font-size: 14px; 33 | line-height: 1.4285em; 34 | color: rgba(0, 0, 0, 0.87); 35 | font-smoothing: antialiased; 36 | } 37 | 38 | 39 | /******************************* 40 | Headers 41 | *******************************/ 42 | 43 | h1, 44 | h2, 45 | h3, 46 | h4, 47 | h5 { 48 | font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif; 49 | line-height: 1.2857em; 50 | margin: calc(2rem - 0.14285em ) 0em 1rem; 51 | font-weight: bold; 52 | padding: 0em; 53 | } 54 | h1 { 55 | min-height: 1rem; 56 | font-size: 2rem; 57 | } 58 | h2 { 59 | font-size: 1.714rem; 60 | } 61 | h3 { 62 | font-size: 1.28rem; 63 | } 64 | h4 { 65 | font-size: 1.071rem; 66 | } 67 | h5 { 68 | font-size: 1rem; 69 | } 70 | h1:first-child, 71 | h2:first-child, 72 | h3:first-child, 73 | h4:first-child, 74 | h5:first-child { 75 | margin-top: 0em; 76 | } 77 | h1:last-child, 78 | h2:last-child, 79 | h3:last-child, 80 | h4:last-child, 81 | h5:last-child { 82 | margin-bottom: 0em; 83 | } 84 | 85 | 86 | /******************************* 87 | Text 88 | *******************************/ 89 | 90 | p { 91 | margin: 0em 0em 1em; 92 | line-height: 1.4285em; 93 | } 94 | p:first-child { 95 | margin-top: 0em; 96 | } 97 | p:last-child { 98 | margin-bottom: 0em; 99 | } 100 | 101 | /*------------------- 102 | Links 103 | --------------------*/ 104 | 105 | a { 106 | color: #4183C4; 107 | text-decoration: none; 108 | } 109 | a:hover { 110 | color: #1e70bf; 111 | text-decoration: none; 112 | } 113 | 114 | 115 | /******************************* 116 | Highlighting 117 | *******************************/ 118 | 119 | 120 | /* Site */ 121 | ::-webkit-selection { 122 | background-color: #CCE2FF; 123 | color: rgba(0, 0, 0, 0.87); 124 | } 125 | ::-moz-selection { 126 | background-color: #CCE2FF; 127 | color: rgba(0, 0, 0, 0.87); 128 | } 129 | ::selection { 130 | background-color: #CCE2FF; 131 | color: rgba(0, 0, 0, 0.87); 132 | } 133 | 134 | /* Form */ 135 | textarea::-webkit-selection, 136 | input::-webkit-selection { 137 | background-color: rgba(100, 100, 100, 0.4); 138 | color: rgba(0, 0, 0, 0.87); 139 | } 140 | textarea::-moz-selection, 141 | input::-moz-selection { 142 | background-color: rgba(100, 100, 100, 0.4); 143 | color: rgba(0, 0, 0, 0.87); 144 | } 145 | textarea::selection, 146 | input::selection { 147 | background-color: rgba(100, 100, 100, 0.4); 148 | color: rgba(0, 0, 0, 0.87); 149 | } 150 | 151 | 152 | /******************************* 153 | Global Overrides 154 | *******************************/ 155 | 156 | 157 | 158 | /******************************* 159 | Site Overrides 160 | *******************************/ 161 | 162 | -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/feed.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Feed 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.feed{margin:1em 0}.ui.feed:first-child{margin-top:0}.ui.feed:last-child{margin-bottom:0}.ui.feed>.event{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;width:100%;padding:.21428571rem 0;margin:0;background:0 0;border-top:none}.ui.feed>.event:first-child{border-top:0;padding-top:0}.ui.feed>.event:last-child{padding-bottom:0}.ui.feed>.event>.label{display:block;-webkit-box-flex:0;-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto;width:2.5em;height:auto;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;text-align:left}.ui.feed>.event>.label .icon{opacity:1;font-size:1.5em;width:100%;padding:.25em;background:0 0;border:none;border-radius:none;color:rgba(0,0,0,.6)}.ui.feed>.event>.label img{width:100%;height:auto;border-radius:500rem}.ui.feed>.event>.label+.content{margin:.5em 0 .35714286em 1.14285714em}.ui.feed>.event>.content{display:block;-webkit-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch;text-align:left;word-wrap:break-word}.ui.feed>.event:last-child>.content{padding-bottom:0}.ui.feed>.event>.content a{cursor:pointer}.ui.feed>.event>.content .date{margin:-.5rem 0 0;padding:0;font-weight:400;font-size:1em;font-style:normal;color:rgba(0,0,0,.4)}.ui.feed>.event>.content .summary{margin:0;font-size:1em;font-weight:700;color:rgba(0,0,0,.87)}.ui.feed>.event>.content .summary img{display:inline-block;width:auto;height:10em;margin:-.25em .25em 0 0;border-radius:.25em;vertical-align:middle}.ui.feed>.event>.content .user{display:inline-block;font-weight:700;margin-right:0;vertical-align:baseline}.ui.feed>.event>.content .user img{margin:-.25em .25em 0 0;width:auto;height:10em;vertical-align:middle}.ui.feed>.event>.content .summary>.date{display:inline-block;float:none;font-weight:400;font-size:.85714286em;font-style:normal;margin:0 0 0 .5em;padding:0;color:rgba(0,0,0,.4)}.ui.feed>.event>.content .extra{margin:.5em 0 0;background:0 0;padding:0;color:rgba(0,0,0,.87)}.ui.feed>.event>.content .extra.images img{display:inline-block;margin:0 .25em 0 0;width:6em}.ui.feed>.event>.content .extra.text{padding:0;border-left:none;font-size:1em;max-width:500px;line-height:1.4285em}.ui.feed>.event>.content .meta{display:inline-block;font-size:.85714286em;margin:.5em 0 0;background:0 0;border:none;border-radius:0;box-shadow:none;padding:0;color:rgba(0,0,0,.6)}.ui.feed>.event>.content .meta>*{position:relative;margin-left:.75em}.ui.feed>.event>.content .meta>:after{content:'';color:rgba(0,0,0,.2);top:0;left:-1em;opacity:1;position:absolute;vertical-align:top}.ui.feed>.event>.content .meta .like{color:'';-webkit-transition:.2s color ease;transition:.2s color ease}.ui.feed>.event>.content .meta .like:hover .icon{color:#FF2733}.ui.feed>.event>.content .meta .active.like .icon{color:#EF404A}.ui.feed>.event>.content .meta>:first-child{margin-left:0}.ui.feed>.event>.content .meta>:first-child::after{display:none}.ui.feed>.event>.content .meta a,.ui.feed>.event>.content .meta>.icon{cursor:pointer;opacity:1;color:rgba(0,0,0,.5);-webkit-transition:color .1s ease;transition:color .1s ease}.ui.feed>.event>.content .meta a:hover,.ui.feed>.event>.content .meta a:hover .icon,.ui.feed>.event>.content .meta>.icon:hover{color:rgba(0,0,0,.95)}.ui.small.feed{font-size:.92857143rem}.ui.feed{font-size:1rem}.ui.large.feed{font-size:1.14285714rem} -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/container.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Container 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Container 15 | *******************************/ 16 | 17 | 18 | /* All Sizes */ 19 | .ui.container { 20 | display: block; 21 | max-width: 100% !important; 22 | } 23 | 24 | /* Mobile */ 25 | @media only screen and (max-width: 767px) { 26 | .ui.container { 27 | width: auto !important; 28 | margin-left: 1em !important; 29 | margin-right: 1em !important; 30 | } 31 | .ui.grid.container { 32 | width: auto !important; 33 | } 34 | .ui.relaxed.grid.container { 35 | width: auto !important; 36 | } 37 | .ui.very.relaxed.grid.container { 38 | width: auto !important; 39 | } 40 | } 41 | 42 | /* Tablet */ 43 | @media only screen and (min-width: 768px) and (max-width: 991px) { 44 | .ui.container { 45 | width: 723px; 46 | margin-left: auto !important; 47 | margin-right: auto !important; 48 | } 49 | .ui.grid.container { 50 | width: calc( 723px + 2rem ) !important; 51 | } 52 | .ui.relaxed.grid.container { 53 | width: calc( 723px + 3rem ) !important; 54 | } 55 | .ui.very.relaxed.grid.container { 56 | width: calc( 723px + 5rem ) !important; 57 | } 58 | } 59 | 60 | /* Small Monitor */ 61 | @media only screen and (min-width: 992px) and (max-width: 1199px) { 62 | .ui.container { 63 | width: 933px; 64 | margin-left: auto !important; 65 | margin-right: auto !important; 66 | } 67 | .ui.grid.container { 68 | width: calc( 933px + 2rem ) !important; 69 | } 70 | .ui.relaxed.grid.container { 71 | width: calc( 933px + 3rem ) !important; 72 | } 73 | .ui.very.relaxed.grid.container { 74 | width: calc( 933px + 5rem ) !important; 75 | } 76 | } 77 | 78 | /* Large Monitor */ 79 | @media only screen and (min-width: 1200px) { 80 | .ui.container { 81 | width: 1127px; 82 | margin-left: auto !important; 83 | margin-right: auto !important; 84 | } 85 | .ui.grid.container { 86 | width: calc( 1127px + 2rem ) !important; 87 | } 88 | .ui.relaxed.grid.container { 89 | width: calc( 1127px + 3rem ) !important; 90 | } 91 | .ui.very.relaxed.grid.container { 92 | width: calc( 1127px + 5rem ) !important; 93 | } 94 | } 95 | 96 | 97 | /******************************* 98 | Types 99 | *******************************/ 100 | 101 | 102 | /* Text Container */ 103 | .ui.text.container { 104 | font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif; 105 | max-width: 700px !important; 106 | line-height: 1.5; 107 | } 108 | .ui.text.container { 109 | font-size: 1.14285714rem; 110 | } 111 | 112 | /* Fluid */ 113 | .ui.fluid.container { 114 | width: 100%; 115 | } 116 | 117 | 118 | /******************************* 119 | Variations 120 | *******************************/ 121 | 122 | .ui[class*="left aligned"].container { 123 | text-align: left; 124 | } 125 | .ui[class*="center aligned"].container { 126 | text-align: center; 127 | } 128 | .ui[class*="right aligned"].container { 129 | text-align: right; 130 | } 131 | .ui.justified.container { 132 | text-align: justify; 133 | -webkit-hyphens: auto; 134 | -moz-hyphens: auto; 135 | -ms-hyphens: auto; 136 | hyphens: auto; 137 | } 138 | 139 | 140 | /******************************* 141 | Theme Overrides 142 | *******************************/ 143 | 144 | 145 | 146 | /******************************* 147 | Site Overrides 148 | *******************************/ 149 | 150 | -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/shape.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Shape 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Shape 15 | *******************************/ 16 | 17 | .ui.shape { 18 | position: relative; 19 | vertical-align: top; 20 | display: inline-block; 21 | -webkit-perspective: 2000px; 22 | perspective: 2000px; 23 | -webkit-transition: -webkit-transform 0.6s ease-in-out, left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out; 24 | transition: transform 0.6s ease-in-out, left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out; 25 | } 26 | .ui.shape .sides { 27 | -webkit-transform-style: preserve-3d; 28 | transform-style: preserve-3d; 29 | } 30 | .ui.shape .side { 31 | opacity: 1; 32 | width: 100%; 33 | margin: 0em !important; 34 | -webkit-backface-visibility: hidden; 35 | backface-visibility: hidden; 36 | } 37 | .ui.shape .side { 38 | display: none; 39 | } 40 | .ui.shape .side * { 41 | -webkit-backface-visibility: visible !important; 42 | backface-visibility: visible !important; 43 | } 44 | 45 | 46 | /******************************* 47 | Types 48 | *******************************/ 49 | 50 | .ui.cube.shape .side { 51 | min-width: 15em; 52 | height: 15em; 53 | padding: 2em; 54 | background-color: #E6E6E6; 55 | color: rgba(0, 0, 0, 0.87); 56 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.3); 57 | } 58 | .ui.cube.shape .side > .content { 59 | width: 100%; 60 | height: 100%; 61 | display: table; 62 | text-align: center; 63 | -webkit-user-select: text; 64 | -moz-user-select: text; 65 | -ms-user-select: text; 66 | user-select: text; 67 | } 68 | .ui.cube.shape .side > .content > div { 69 | display: table-cell; 70 | vertical-align: middle; 71 | font-size: 2em; 72 | } 73 | 74 | 75 | /******************************* 76 | Variations 77 | *******************************/ 78 | 79 | .ui.text.shape.animating .sides { 80 | position: static; 81 | } 82 | .ui.text.shape .side { 83 | white-space: nowrap; 84 | } 85 | .ui.text.shape .side > * { 86 | white-space: normal; 87 | } 88 | 89 | 90 | /******************************* 91 | States 92 | *******************************/ 93 | 94 | 95 | /*-------------- 96 | Loading 97 | ---------------*/ 98 | 99 | .ui.loading.shape { 100 | position: absolute; 101 | top: -9999px; 102 | left: -9999px; 103 | } 104 | 105 | /*-------------- 106 | Animating 107 | ---------------*/ 108 | 109 | .ui.shape .animating.side { 110 | position: absolute; 111 | top: 0px; 112 | left: 0px; 113 | display: block; 114 | z-index: 100; 115 | } 116 | .ui.shape .hidden.side { 117 | opacity: 0.6; 118 | } 119 | 120 | /*-------------- 121 | CSS 122 | ---------------*/ 123 | 124 | .ui.shape.animating .sides { 125 | position: absolute; 126 | } 127 | .ui.shape.animating .sides { 128 | -webkit-transition: -webkit-transform 0.6s ease-in-out, left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out; 129 | transition: transform 0.6s ease-in-out, left 0.6s ease-in-out, width 0.6s ease-in-out, height 0.6s ease-in-out; 130 | } 131 | .ui.shape.animating .side { 132 | -webkit-transition: opacity 0.6s ease-in-out; 133 | transition: opacity 0.6s ease-in-out; 134 | } 135 | 136 | /*-------------- 137 | Active 138 | ---------------*/ 139 | 140 | .ui.shape .active.side { 141 | display: block; 142 | } 143 | 144 | 145 | /******************************* 146 | Theme Overrides 147 | *******************************/ 148 | 149 | 150 | 151 | /******************************* 152 | User Overrides 153 | *******************************/ 154 | 155 | -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/embed.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Video 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Types 15 | *******************************/ 16 | 17 | .ui.embed { 18 | position: relative; 19 | max-width: 100%; 20 | height: 0px; 21 | overflow: hidden; 22 | background: #DCDDDE; 23 | padding-bottom: 56.25%; 24 | } 25 | 26 | /*----------------- 27 | Embedded Content 28 | ------------------*/ 29 | 30 | .ui.embed iframe, 31 | .ui.embed embed, 32 | .ui.embed object { 33 | position: absolute; 34 | border: none; 35 | width: 100%; 36 | height: 100%; 37 | top: 0px; 38 | left: 0px; 39 | margin: 0em; 40 | padding: 0em; 41 | } 42 | 43 | /*----------------- 44 | Embed 45 | ------------------*/ 46 | 47 | .ui.embed > .embed { 48 | display: none; 49 | } 50 | 51 | /*-------------- 52 | Placeholder 53 | ---------------*/ 54 | 55 | .ui.embed > .placeholder { 56 | position: absolute; 57 | cursor: pointer; 58 | top: 0px; 59 | left: 0px; 60 | display: block; 61 | width: 100%; 62 | height: 100%; 63 | background-color: radial-gradient(transparent 45%, rgba(0, 0, 0, 0.3)); 64 | } 65 | 66 | /*-------------- 67 | Icon 68 | ---------------*/ 69 | 70 | .ui.embed > .icon { 71 | cursor: pointer; 72 | position: absolute; 73 | top: 0px; 74 | left: 0px; 75 | width: 100%; 76 | height: 100%; 77 | z-index: 2; 78 | } 79 | .ui.embed > .icon:after { 80 | position: absolute; 81 | top: 0%; 82 | left: 0%; 83 | width: 100%; 84 | height: 100%; 85 | z-index: 3; 86 | content: ''; 87 | background: -webkit-radial-gradient(transparent 45%, rgba(0, 0, 0, 0.3)); 88 | background: radial-gradient(transparent 45%, rgba(0, 0, 0, 0.3)); 89 | opacity: 0.5; 90 | -webkit-transition: opacity 0.5s ease; 91 | transition: opacity 0.5s ease; 92 | } 93 | .ui.embed > .icon:before { 94 | position: absolute; 95 | top: 50%; 96 | left: 50%; 97 | z-index: 4; 98 | -webkit-transform: translateX(-50%) translateY(-50%); 99 | -ms-transform: translateX(-50%) translateY(-50%); 100 | transform: translateX(-50%) translateY(-50%); 101 | color: #FFFFFF; 102 | font-size: 6rem; 103 | text-shadow: 0px 2px 10px rgba(34, 36, 38, 0.2); 104 | -webkit-transition: opacity 0.5s ease, color 0.5s ease; 105 | transition: opacity 0.5s ease, color 0.5s ease; 106 | z-index: 10; 107 | } 108 | 109 | 110 | /******************************* 111 | States 112 | *******************************/ 113 | 114 | 115 | /*-------------- 116 | Hover 117 | ---------------*/ 118 | 119 | .ui.embed .icon:hover:after { 120 | background: -webkit-radial-gradient(transparent 45%, rgba(0, 0, 0, 0.3)); 121 | background: radial-gradient(transparent 45%, rgba(0, 0, 0, 0.3)); 122 | opacity: 1; 123 | } 124 | .ui.embed .icon:hover:before { 125 | color: #FFFFFF; 126 | } 127 | 128 | /*-------------- 129 | Active 130 | ---------------*/ 131 | 132 | .ui.active.embed > .icon, 133 | .ui.active.embed > .placeholder { 134 | display: none; 135 | } 136 | .ui.active.embed > .embed { 137 | display: block; 138 | } 139 | 140 | 141 | /******************************* 142 | Video Overrides 143 | *******************************/ 144 | 145 | 146 | 147 | /******************************* 148 | Site Overrides 149 | *******************************/ 150 | 151 | 152 | 153 | /******************************* 154 | Variations 155 | *******************************/ 156 | 157 | .ui.square.embed { 158 | padding-bottom: 100%; 159 | } 160 | .ui[class*="4:3"].embed { 161 | padding-bottom: 75%; 162 | } 163 | .ui[class*="16:9"].embed { 164 | padding-bottom: 56.25%; 165 | } 166 | .ui[class*="21:9"].embed { 167 | padding-bottom: 42.85714286%; 168 | } 169 | -------------------------------------------------------------------------------- /codingpy/static/codehilite.css: -------------------------------------------------------------------------------- 1 | .codehilite .hll { background-color: #ffffcc } 2 | .codehilite { background: #f8f8f8; } 3 | .codehilite .c { color: #408080; font-style: italic } /* Comment */ 4 | .codehilite .err { border: 1px solid #FF0000 } /* Error */ 5 | .codehilite .k { color: #008000; font-weight: bold } /* Keyword */ 6 | .codehilite .o { color: #666666 } /* Operator */ 7 | .codehilite .cm { color: #408080; font-style: italic } /* Comment.Multiline */ 8 | .codehilite .cp { color: #BC7A00 } /* Comment.Preproc */ 9 | .codehilite .c1 { color: #408080; font-style: italic } /* Comment.Single */ 10 | .codehilite .cs { color: #408080; font-style: italic } /* Comment.Special */ 11 | .codehilite .gd { color: #A00000 } /* Generic.Deleted */ 12 | .codehilite .ge { font-style: italic } /* Generic.Emph */ 13 | .codehilite .gr { color: #FF0000 } /* Generic.Error */ 14 | .codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 15 | .codehilite .gi { color: #00A000 } /* Generic.Inserted */ 16 | .codehilite .go { color: #888888 } /* Generic.Output */ 17 | .codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ 18 | .codehilite .gs { font-weight: bold } /* Generic.Strong */ 19 | .codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 20 | .codehilite .gt { color: #0044DD } /* Generic.Traceback */ 21 | .codehilite .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ 22 | .codehilite .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ 23 | .codehilite .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ 24 | .codehilite .kp { color: #008000 } /* Keyword.Pseudo */ 25 | .codehilite .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ 26 | .codehilite .kt { color: #B00040 } /* Keyword.Type */ 27 | .codehilite .m { color: #666666 } /* Literal.Number */ 28 | .codehilite .s { color: #BA2121 } /* Literal.String */ 29 | .codehilite .na { color: #7D9029 } /* Name.Attribute */ 30 | .codehilite .nb { color: #008000 } /* Name.Builtin */ 31 | .codehilite .nc { color: #0000FF; font-weight: bold } /* Name.Class */ 32 | .codehilite .no { color: #880000 } /* Name.Constant */ 33 | .codehilite .nd { color: #AA22FF } /* Name.Decorator */ 34 | .codehilite .ni { color: #999999; font-weight: bold } /* Name.Entity */ 35 | .codehilite .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ 36 | .codehilite .nf { color: #0000FF } /* Name.Function */ 37 | .codehilite .nl { color: #A0A000 } /* Name.Label */ 38 | .codehilite .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ 39 | .codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */ 40 | .codehilite .nv { color: #19177C } /* Name.Variable */ 41 | .codehilite .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ 42 | .codehilite .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .codehilite .mb { color: #666666 } /* Literal.Number.Bin */ 44 | .codehilite .mf { color: #666666 } /* Literal.Number.Float */ 45 | .codehilite .mh { color: #666666 } /* Literal.Number.Hex */ 46 | .codehilite .mi { color: #666666 } /* Literal.Number.Integer */ 47 | .codehilite .mo { color: #666666 } /* Literal.Number.Oct */ 48 | .codehilite .sb { color: #BA2121 } /* Literal.String.Backtick */ 49 | .codehilite .sc { color: #BA2121 } /* Literal.String.Char */ 50 | .codehilite .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ 51 | .codehilite .s2 { color: #BA2121 } /* Literal.String.Double */ 52 | .codehilite .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ 53 | .codehilite .sh { color: #BA2121 } /* Literal.String.Heredoc */ 54 | .codehilite .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ 55 | .codehilite .sx { color: #008000 } /* Literal.String.Other */ 56 | .codehilite .sr { color: #BB6688 } /* Literal.String.Regex */ 57 | .codehilite .s1 { color: #BA2121 } /* Literal.String.Single */ 58 | .codehilite .ss { color: #19177C } /* Literal.String.Symbol */ 59 | .codehilite .bp { color: #008000 } /* Name.Builtin.Pseudo */ 60 | .codehilite .vc { color: #19177C } /* Name.Variable.Class */ 61 | .codehilite .vg { color: #19177C } /* Name.Variable.Global */ 62 | .codehilite .vi { color: #19177C } /* Name.Variable.Instance */ 63 | .codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */ 64 | -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/popup.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Popup 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.popup{display:none;position:absolute;top:0;right:0;min-width:-webkit-min-content;min-width:-moz-min-content;min-width:min-content;z-index:1900;border:1px solid #D4D4D5;line-height:1.4285em;max-width:250px;background:#FFF;padding:.833em 1em;font-weight:400;font-style:normal;color:rgba(0,0,0,.87);border-radius:.28571429rem;box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.08);margin:0}.ui.popup>.header{padding:0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1.125em;line-height:1.2;font-weight:700}.ui.popup>.header+.content{padding-top:.5em}.ui.popup:before{position:absolute;content:'';width:.75em;height:.75em;background:#FFF;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg);z-index:2;box-shadow:1px 1px 0 0 #bababc}.ui.top.popup{margin:0 0 .75em}.ui.top.left.popup{-webkit-transform-origin:left bottom;-ms-transform-origin:left bottom;transform-origin:left bottom}.ui.top.center.popup{-webkit-transform-origin:center bottom;-ms-transform-origin:center bottom;transform-origin:center bottom}.ui.top.right.popup{-webkit-transform-origin:right bottom;-ms-transform-origin:right bottom;transform-origin:right bottom}.ui.left.center.popup{margin:0 .75em 0 0;-webkit-transform-origin:right 50%;-ms-transform-origin:right 50%;transform-origin:right 50%}.ui.right.center.popup{margin:0 0 0 .75em;-webkit-transform-origin:left 50%;-ms-transform-origin:left 50%;transform-origin:left 50%}.ui.bottom.popup{margin:.75em 0 0}.ui.bottom.left.popup{-webkit-transform-origin:left top;-ms-transform-origin:left top;transform-origin:left top}.ui.bottom.center.popup{-webkit-transform-origin:center top;-ms-transform-origin:center top;transform-origin:center top}.ui.bottom.right.popup{-webkit-transform-origin:right top;-ms-transform-origin:right top;transform-origin:right top;margin-right:0}.ui.bottom.center.popup:before{margin-left:-.325em;top:-.325em;left:50%;right:auto;bottom:auto;box-shadow:-1px -1px 0 0 #bababc}.ui.bottom.left.popup{margin-left:0}.ui.bottom.left.popup:before{top:-.325em;left:1em;right:auto;bottom:auto;margin-left:0;box-shadow:-1px -1px 0 0 #bababc}.ui.bottom.right.popup:before{top:-.325em;right:1em;bottom:auto;left:auto;margin-left:0;box-shadow:-1px -1px 0 0 #bababc}.ui.top.center.popup:before{top:auto;right:auto;bottom:-.325em;left:50%;margin-left:-.325em}.ui.top.left.popup{margin-left:0}.ui.top.left.popup:before{bottom:-.325em;left:1em;top:auto;right:auto;margin-left:0}.ui.top.right.popup{margin-right:0}.ui.top.right.popup:before{bottom:-.325em;right:1em;top:auto;left:auto;margin-left:0}.ui.left.center.popup:before{top:50%;right:-.325em;bottom:auto;left:auto;margin-top:-.325em;box-shadow:1px -1px 0 0 #bababc}.ui.right.center.popup:before{top:50%;left:-.325em;bottom:auto;right:auto;margin-top:-.325em;box-shadow:-1px 1px 0 0 #bababc}.ui.bottom.popup:before,.ui.left.center.popup:before,.ui.right.center.popup:before,.ui.top.popup:before{background:#FFF}.ui.inverted.bottom.popup:before,.ui.inverted.left.center.popup:before,.ui.inverted.right.center.popup:before,.ui.inverted.top.popup:before{background:#1B1C1D}.ui.popup>.ui.grid:not(.padded){width:calc(100% + 1.75rem);margin:-.7rem -.875rem}.ui.loading.popup{display:block;visibility:hidden;z-index:-1}.ui.animating.popup,.ui.visible.popup{display:block}.ui.visible.popup{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.ui.basic.popup:before{display:none}.ui.wide.popup{max-width:350px}.ui[class*="very wide"].popup{max-width:550px}@media only screen and (max-width:767px){.ui.wide.popup,.ui[class*="very wide"].popup{max-width:250px}}.ui.fluid.popup{width:100%;max-width:none}.ui.inverted.popup{background:#1B1C1D;color:#FFF;border:none;box-shadow:none}.ui.inverted.popup .header{background-color:none;color:#FFF}.ui.inverted.popup:before{background-color:#1B1C1D;box-shadow:none!important}.ui.flowing.popup{max-width:none}.ui.mini.popup{font-size:.71428571rem}.ui.tiny.popup{font-size:.85714286rem}.ui.small.popup{font-size:.92857143rem}.ui.popup{font-size:1rem}.ui.large.popup{font-size:1.14285714rem}.ui.huge.popup{font-size:1.42857143rem} -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/pygments.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #eeffcc; } 3 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 6 | .highlight .o { color: #666666 } /* Operator */ 7 | .highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ 8 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 9 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 10 | .highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ 11 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 12 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 13 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 14 | .highlight .ge { font-style: italic } /* Generic.Emph */ 15 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 16 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 17 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 18 | .highlight .go { color: #333333 } /* Generic.Output */ 19 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 20 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 21 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 22 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 23 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 24 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 25 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 26 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 27 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 28 | .highlight .kt { color: #902000 } /* Keyword.Type */ 29 | .highlight .m { color: #208050 } /* Literal.Number */ 30 | .highlight .s { color: #4070a0 } /* Literal.String */ 31 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 32 | .highlight .nb { color: #007020 } /* Name.Builtin */ 33 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 34 | .highlight .no { color: #60add5 } /* Name.Constant */ 35 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 36 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 37 | .highlight .ne { color: #007020 } /* Name.Exception */ 38 | .highlight .nf { color: #06287e } /* Name.Function */ 39 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 40 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 41 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 42 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 43 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 44 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 45 | .highlight .mb { color: #208050 } /* Literal.Number.Bin */ 46 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 47 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 48 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 49 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 50 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 51 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 52 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 53 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 54 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 55 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 56 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 57 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 58 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 59 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 60 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 61 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 62 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 63 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 64 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 65 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /codingpy/templates/sitemap.xsl: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | XML Sitemap 11 | 12 | 58 | 59 | 60 |

XML Sitemap

61 |
62 |

63 | This is a XML Sitemap which is supposed to be processed by search engines like Google, MSN Search and YAHOO.
64 | 66 |

67 |
68 |
69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | high 82 | 83 | 91 | 94 | 97 | 100 | 101 | 102 |
URLPriorityChange FrequencyLastChange (GMT)
84 | 85 | 86 | 87 | 88 | 89 | 90 | 92 | 93 | 95 | 96 | 98 | 99 |
103 |
104 | 107 | 108 | 109 |
110 |
111 | -------------------------------------------------------------------------------- /codingpy/static/books/thinkpython2/_static/translations.js: -------------------------------------------------------------------------------- 1 | Documentation.addTranslations({"locale": "zh_Hans_CN", "messages": {"%(filename)s — %(docstitle)s": "%(filename)s — %(docstitle)s", "© Copyright %(copyright)s.": "© \u7248\u6743\u6240\u6709 %(copyright)s.", "© Copyright %(copyright)s.": "© \u7248\u6743\u6240\u6709 %(copyright)s.", ", in ": "\uff0c\u5728", "About these documents": "\u5173\u4e8e\u8fd9\u4e9b\u6587\u6863", "Automatically generated list of changes in version %(version)s": "\u81ea\u52a8\u751f\u6210\u7684 %(version)s \u7248\u672c\u4e2d\u7684\u66f4\u6539\u5217\u8868", "C API changes": "C API \u66f4\u6539", "Changes in Version %(version)s — %(docstitle)s": "\u66f4\u6539\u53d1\u751f\u5728\u7248\u672c %(version)s — %(docstitle)s", "Collapse sidebar": "\u6298\u53e0\u8fb9\u680f", "Complete Table of Contents": "\u5b8c\u6574\u7684\u5185\u5bb9\u8868", "Contents": "\u76ee\u5f55", "Copyright": "\u7248\u6743\u6240\u6709", "Created using Sphinx %(sphinx_version)s.": "\u7531 Sphinx %(sphinx_version)s \u521b\u5efa\u3002", "Enter search terms or a module, class or function name.": "\u8f93\u5165\u76f8\u5173\u7684\u672f\u8bed\uff0c\u6a21\u5757\uff0c\u7c7b\u6216\u8005\u51fd\u6570\u540d\u79f0\u8fdb\u884c\u641c\u7d22", "Expand sidebar": "\u5c55\u5f00\u8fb9\u680f", "From here you can search these documents. Enter your search\n words into the box below and click \"search\". Note that the search\n function will automatically search for all of the words. Pages\n containing fewer words won't appear in the result list.": "\u5728\u8fd9\u513f\uff0c\u4f60\u53ef\u4ee5\u5bf9\u8fd9\u4e9b\u6587\u6863\u8fdb\u884c\u641c\u7d22\u3002\u5411\u641c\u7d22\u6846\u4e2d\u8f93\u5165\u4f60\u6240\u8981\u641c\u7d22\u7684\u5173\u952e\u5b57\u5e76\u70b9\u51fb\u201c\u641c\u7d22\u201d\u3002\u6ce8\u610f\uff1a\u641c\u7d22\u5f15\u64ce\u4f1a\u81ea\u52a8\u641c\u7d22\u6240\u6709\u7684\u5173\u952e\u5b57\u3002\u5c06\u4e0d\u4f1a\u641c\u7d22\u5230\u90e8\u5206\u5173\u952e\u5b57\u7684\u9875\u9762.", "Full index on one page": "\u4e00\u9875\u7684\u5168\u90e8\u7d22\u5f15", "General Index": "\u603b\u76ee\u5f55", "Global Module Index": "\u5168\u5c40\u6a21\u5757\u7d22\u5f15", "Go": "\u8f6c\u5411", "Hide Search Matches": "\u9690\u85cf\u641c\u7d22\u7ed3\u679c", "Index": "\u7d22\u5f15", "Index – %(key)s": "\u7d22\u5f15 – %(key)s", "Index pages by letter": "\u6309\u7167\u5b57\u6bcd\u7684\u7d22\u5f15\u9875", "Indices and tables:": "\u7d22\u5f15\u548c\u8868\u683c\uff1a", "Last updated on %(last_updated)s.": "\u6700\u540e\u66f4\u65b0\u4e8e %(last_updated)s.", "Library changes": "\u5e93\u66f4\u6539", "Navigation": "\u5bfc\u822a", "Next topic": "\u4e0b\u4e00\u4e2a\u4e3b\u9898", "Other changes": "\u5176\u4ed6\u66f4\u6539", "Overview": "\u6982\u8ff0", "Permalink to this definition": "\u6c38\u4e45\u94fe\u63a5\u81f3\u76ee\u6807", "Permalink to this headline": "\u6c38\u4e45\u94fe\u63a5\u81f3\u6807\u9898", "Please activate JavaScript to enable the search\n functionality.": "\u8bf7\u6fc0\u6d3b JavaScript \u4ee5\u5f00\u542f\u641c\u7d22\u529f\u80fd", "Preparing search...": "\u51c6\u5907\u641c\u7d22\u2026\u2026", "Previous topic": "\u4e0a\u4e00\u4e2a\u4e3b\u9898", "Quick search": "\u5feb\u901f\u641c\u7d22", "Search": "\u641c\u7d22", "Search Page": "\u641c\u7d22\u9875\u9762", "Search Results": "\u641c\u7d22\u7ed3\u679c", "Search finished, found %s page(s) matching the search query.": "\u641c\u7d22\u5b8c\u6210\uff0c\u6709 %s \u4e2a\u9875\u9762\u5339\u914d\u3002", "Search within %(docstitle)s": "\u5728 %(docstitle)s \u4e2d\u641c\u7d22", "Searching": "\u641c\u7d22\u4e2d", "Show Source": "\u663e\u793a\u6e90\u4ee3\u7801", "Table Of Contents": "\u5167\u5bb9\u76ee\u5f55", "This Page": "\u672c\u9875", "Welcome! This is": "\u6b22\u8fce\uff01\u8fd9\u662f", "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories.": "\u6ca1\u6709\u4efb\u4f55\u6587\u6863\u5339\u914d\u60a8\u7684\u641c\u7d22\u3002\u8bf7\u786e\u4fdd\u4f60\u8f93\u5165\u7684\u8bcd\u62fc\u5199\u6b63\u786e\u5e76\u9009\u62e9\u4e86\u5408\u9002\u7684\u5206\u7c7b\u3002", "all functions, classes, terms": "\u6240\u7684\u51fd\u6570\uff0c\u7c7b\uff0c\u672f\u8bed", "can be huge": "\u53ef\u80fd\u4f1a\u5f88\u591a", "last updated": "\u6700\u540e\u66f4\u65b0\u4e8e", "lists all sections and subsections": "\u5217\u51fa\u6240\u6709\u7684\u7ae0\u8282\u548c\u90e8\u5206", "next chapter": "\u4e0b\u4e00\u7ae0", "previous chapter": "\u4e0a\u4e00\u7ae0", "quick access to all modules": "\u5feb\u901f\u67e5\u770b\u6240\u6709\u7684\u6a21\u5757", "search": "\u641c\u7d22", "search this documentation": "\u641c\u7d22\u6587\u6863", "the documentation for": "\u8fd9\u4efd\u6587\u6863\u662f"}, "plural_expr": "0"}); -------------------------------------------------------------------------------- /codingpy/templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | 4 | {% block title %} 5 | {% if 'category' in request.url %}{{ category.name }} | 编程派 6 | {% elif 'tag' in request.url %} {{ tag.name }} | 编程派 7 | {% else %} 编程派 | Coding Python 8 | {% endif %} 9 | {% endblock title %} 10 | 11 | {% block main %} 12 | 13 |
14 | {% if 'category' in request.url or 'tag' in request.url %} 15 | {% else %}{% include "includes/glide.html" %} 16 | {% endif %} 17 | 18 |
19 | 20 | {# latest content #} 21 |
22 | 23 |
24 | 25 |
26 | 27 |
28 | 29 | 37 | 38 | {% if all_articles %} 39 |
40 | {% include "includes/items.html" %} 41 |
42 | {% endif %} 43 | 44 |
45 | 46 |
47 | 48 | 49 | {# #} 50 | 51 |
52 |
53 | 54 | 64 |
65 | 66 |
67 | 68 | {# TODO: redesign index page #} 69 | {% endblock%} 70 | 71 | {% block scripts %} 72 | {{super()}} 73 | 74 | 118 | 119 | 160 | 161 | 162 | {% endblock scripts %} 163 | 164 | -------------------------------------------------------------------------------- /codingpy/templates/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {% block head %} 6 | 7 | {% block title %}{% endblock title %} 8 | 9 | 10 | 11 | 12 | 13 | 14 | {% block metas %} 15 | {% if category %} 16 | 17 | 18 | {% elif tag %} 19 | 20 | 21 | {% else %} 22 | 23 | 24 | {% endif %} 25 | 26 | 27 | {% endblock metas %} 28 | {% block styles %} 29 | {% assets "home_css" %} 30 | 31 | {% endassets %} 32 | {# #} 33 | 34 | {# 必须删了home.css才会更新源文件里的内容 #} 35 | {# #} 36 | 37 | 38 | 39 | {% endblock styles %} 40 | 41 | {% endblock head %} 42 | 43 | {% block head_extend %} 44 | 45 | {% endblock head_extend %} 46 | 47 | {% block analytics %} 48 | 57 | 58 | 68 | 69 | 70 | 76 | 77 | {% endblock analytics %} 78 | 79 | 80 | 81 | 82 | 83 | {% include "includes/sidebar.html" %} 84 | 85 |
86 | {% block content %} 87 | 88 | {% block navbar %} 89 | {% include "includes/navbar.html" %} 90 | {% endblock navbar %} 91 | 92 | {% block main %} 93 | 94 | {% endblock main %} 95 | 96 |
97 | {% block footer %} 98 | 103 | 104 | {% endblock footer %} 105 |
106 | 107 | {% block scripts %} 108 | 109 | {% assets "home_js" %} 110 | 111 | {% endassets %} 112 | {{moment.include_moment()}} 113 | {{ moment.lang('zh-CN')}} 114 | 115 | 139 | 140 | {% endblock scripts %} 141 | 142 | {% endblock content %} 143 |
144 | 145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /codingpy/templates/includes/comment.html: -------------------------------------------------------------------------------- 1 |
2 | 18 | 19 | 20 | 21 | 22 | {# 23 | 24 | 25 |
26 | 39 | 40 | 41 |
42 | 43 |
44 | 45 | 46 | 47 |
48 | Matt 49 | 52 |
53 | How artistic! 54 |
55 |
56 | Reply 57 |
58 |
59 |
60 |
61 | 62 | 63 | 64 |
65 | Elliot Fu 66 | 69 |
70 |

This has been very useful for my research. Thanks as well!

71 |
72 |
73 | Reply 74 |
75 |
76 |
77 |
78 | 79 | 80 | 81 |
82 | Jenny Hess 83 | 86 |
87 | Elliot you are always so right :) 88 |
89 |
90 | Reply 91 |
92 |
93 |
94 |
95 |
96 |
97 | 98 | 99 | 100 |
101 | Joe Henderson 102 | 105 |
106 | Dude, this is awesome. Thanks so much 107 |
108 |
109 | Reply 110 |
111 |
112 |
113 |
114 |
115 | 116 |
117 |
118 | Add Reply 119 |
120 |
121 |
#} -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/dimmer.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Dimmer 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | 12 | 13 | /******************************* 14 | Dimmer 15 | *******************************/ 16 | 17 | .dimmable { 18 | position: relative; 19 | } 20 | .ui.dimmer { 21 | display: none; 22 | position: absolute; 23 | top: 0em !important; 24 | left: 0em !important; 25 | width: 100%; 26 | height: 100%; 27 | text-align: center; 28 | vertical-align: middle; 29 | background-color: rgba(0, 0, 0, 0.85); 30 | opacity: 0; 31 | line-height: 1; 32 | -webkit-animation-fill-mode: both; 33 | animation-fill-mode: both; 34 | -webkit-animation-duration: 0.5s; 35 | animation-duration: 0.5s; 36 | -webkit-transition: background-color 0.5s linear; 37 | transition: background-color 0.5s linear; 38 | -webkit-user-select: none; 39 | -moz-user-select: none; 40 | -ms-user-select: none; 41 | user-select: none; 42 | will-change: opacity; 43 | z-index: 1000; 44 | } 45 | 46 | /* Dimmer Content */ 47 | .ui.dimmer > .content { 48 | width: 100%; 49 | height: 100%; 50 | display: table; 51 | -webkit-user-select: text; 52 | -moz-user-select: text; 53 | -ms-user-select: text; 54 | user-select: text; 55 | } 56 | .ui.dimmer > .content > * { 57 | display: table-cell; 58 | vertical-align: middle; 59 | color: #FFFFFF; 60 | } 61 | 62 | /* Loose Coupling */ 63 | .ui.segment > .ui.dimmer { 64 | border-radius: inherit !important; 65 | } 66 | 67 | 68 | /******************************* 69 | States 70 | *******************************/ 71 | 72 | .animating.dimmable:not(body), 73 | .dimmed.dimmable:not(body) { 74 | overflow: hidden; 75 | } 76 | .dimmed.dimmable > .ui.animating.dimmer, 77 | .dimmed.dimmable > .ui.visible.dimmer, 78 | .ui.active.dimmer { 79 | display: block; 80 | opacity: 1; 81 | } 82 | .ui.disabled.dimmer { 83 | width: 0 !important; 84 | height: 0 !important; 85 | } 86 | 87 | 88 | /******************************* 89 | Variations 90 | *******************************/ 91 | 92 | 93 | /*-------------- 94 | Page 95 | ---------------*/ 96 | 97 | .ui.page.dimmer { 98 | position: fixed; 99 | -webkit-transform-style: ''; 100 | transform-style: ''; 101 | -webkit-perspective: 2000px; 102 | perspective: 2000px; 103 | -webkit-transform-origin: center center; 104 | -ms-transform-origin: center center; 105 | transform-origin: center center; 106 | } 107 | body.animating.in.dimmable, 108 | body.dimmed.dimmable { 109 | overflow: hidden; 110 | } 111 | body.dimmable > .dimmer { 112 | position: fixed; 113 | } 114 | 115 | /*-------------- 116 | Blurring 117 | ---------------*/ 118 | 119 | .blurring.dimmable > :not(.dimmer) { 120 | -webkit-filter: blur(0px) grayscale(0); 121 | filter: blur(0px) grayscale(0); 122 | -webkit-transition: 800ms -webkit-filter ease, 800ms filter ease; 123 | transition: 800ms filter ease; 124 | } 125 | .blurring.dimmed.dimmable > :not(.dimmer) { 126 | -webkit-filter: blur(5px) grayscale(0.7); 127 | filter: blur(5px) grayscale(0.7); 128 | } 129 | 130 | /* Dimmer Color */ 131 | .blurring.dimmable > .dimmer { 132 | background-color: rgba(0, 0, 0, 0.6); 133 | } 134 | .blurring.dimmable > .inverted.dimmer { 135 | background-color: rgba(255, 255, 255, 0.6); 136 | } 137 | 138 | /*-------------- 139 | Aligned 140 | ---------------*/ 141 | 142 | .ui.dimmer > .top.aligned.content > * { 143 | vertical-align: top; 144 | } 145 | .ui.dimmer > .bottom.aligned.content > * { 146 | vertical-align: bottom; 147 | } 148 | 149 | /*-------------- 150 | Inverted 151 | ---------------*/ 152 | 153 | .ui.inverted.dimmer { 154 | background-color: rgba(255, 255, 255, 0.85); 155 | } 156 | .ui.inverted.dimmer > .content > * { 157 | color: #FFFFFF; 158 | } 159 | 160 | /*-------------- 161 | Simple 162 | ---------------*/ 163 | 164 | 165 | /* Displays without javascript */ 166 | .ui.simple.dimmer { 167 | display: block; 168 | overflow: hidden; 169 | opacity: 1; 170 | width: 0%; 171 | height: 0%; 172 | z-index: -100; 173 | background-color: rgba(0, 0, 0, 0); 174 | } 175 | .dimmed.dimmable > .ui.simple.dimmer { 176 | overflow: visible; 177 | opacity: 1; 178 | width: 100%; 179 | height: 100%; 180 | background-color: rgba(0, 0, 0, 0.85); 181 | z-index: 1; 182 | } 183 | .ui.simple.inverted.dimmer { 184 | background-color: rgba(255, 255, 255, 0); 185 | } 186 | .dimmed.dimmable > .ui.simple.inverted.dimmer { 187 | background-color: rgba(255, 255, 255, 0.85); 188 | } 189 | 190 | 191 | /******************************* 192 | Theme Overrides 193 | *******************************/ 194 | 195 | 196 | 197 | /******************************* 198 | User Overrides 199 | *******************************/ 200 | 201 | -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/rating.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Rating 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */ 11 | !function(e,n,t,i){"use strict";e.fn.rating=function(n){var t,a=e(this),o=a.selector||"",r=(new Date).getTime(),s=[],l=arguments[0],c="string"==typeof l,u=[].slice.call(arguments,1);return a.each(function(){var g,m=e.isPlainObject(n)?e.extend(!0,{},e.fn.rating.settings,n):e.extend({},e.fn.rating.settings),d=m.namespace,f=m.className,v=m.metadata,p=m.selector,b=(m.error,"."+d),h="module-"+d,y=this,x=e(this).data(h),R=e(this),C=R.find(p.icon);g={initialize:function(){g.verbose("Initializing rating module",m),0===C.length&&g.setup.layout(),m.interactive?g.enable():g.disable(),g.set.rating(g.get.initialRating()),g.instantiate()},instantiate:function(){g.verbose("Instantiating module",m),x=g,R.data(h,g)},destroy:function(){g.verbose("Destroying previous instance",x),g.remove.events(),R.removeData(h)},refresh:function(){C=R.find(p.icon)},setup:{layout:function(){var n=g.get.maxRating(),t=e.fn.rating.settings.templates.icon(n);g.debug("Generating icon html dynamically"),R.html(t),g.refresh()}},event:{mouseenter:function(){var n=e(this);n.nextAll().removeClass(f.selected),R.addClass(f.selected),n.addClass(f.selected).prevAll().addClass(f.selected)},mouseleave:function(){R.removeClass(f.selected),C.removeClass(f.selected)},click:function(){var n=e(this),t=g.get.rating(),i=C.index(n)+1,a="auto"==m.clearable?1===C.length:m.clearable;a&&t==i?g.clearRating():g.set.rating(i)}},clearRating:function(){g.debug("Clearing current rating"),g.set.rating(0)},bind:{events:function(){g.verbose("Binding events"),R.on("mouseenter"+b,p.icon,g.event.mouseenter).on("mouseleave"+b,p.icon,g.event.mouseleave).on("click"+b,p.icon,g.event.click)}},remove:{events:function(){g.verbose("Removing events"),R.off(b)}},enable:function(){g.debug("Setting rating to interactive mode"),g.bind.events(),R.removeClass(f.disabled)},disable:function(){g.debug("Setting rating to read-only mode"),g.remove.events(),R.addClass(f.disabled)},get:{initialRating:function(){return R.data(v.rating)!==i?(R.removeData(v.rating),R.data(v.rating)):m.initialRating},maxRating:function(){return R.data(v.maxRating)!==i?(R.removeData(v.maxRating),R.data(v.maxRating)):m.maxRating},rating:function(){var e=C.filter("."+f.active).length;return g.verbose("Current rating retrieved",e),e}},set:{rating:function(e){var n=e-1>=0?e-1:0,t=C.eq(n);R.removeClass(f.selected),C.removeClass(f.selected).removeClass(f.active),e>0&&(g.verbose("Setting current rating to",e),t.prevAll().andSelf().addClass(f.active)),m.onRate.call(y,e)}},setting:function(n,t){if(g.debug("Changing setting",n,t),e.isPlainObject(n))e.extend(!0,m,n);else{if(t===i)return m[n];m[n]=t}},internal:function(n,t){if(e.isPlainObject(n))e.extend(!0,g,n);else{if(t===i)return g[n];g[n]=t}},debug:function(){m.debug&&(m.performance?g.performance.log(arguments):(g.debug=Function.prototype.bind.call(console.info,console,m.name+":"),g.debug.apply(console,arguments)))},verbose:function(){m.verbose&&m.debug&&(m.performance?g.performance.log(arguments):(g.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),g.verbose.apply(console,arguments)))},error:function(){g.error=Function.prototype.bind.call(console.error,console,m.name+":"),g.error.apply(console,arguments)},performance:{log:function(e){var n,t,i;m.performance&&(n=(new Date).getTime(),i=r||n,t=n-i,r=n,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:y,"Execution Time":t})),clearTimeout(g.performance.timer),g.performance.timer=setTimeout(g.performance.display,500)},display:function(){var n=m.name+":",t=0;r=!1,clearTimeout(g.performance.timer),e.each(s,function(e,n){t+=n["Execution Time"]}),n+=" "+t+"ms",o&&(n+=" '"+o+"'"),a.length>1&&(n+=" ("+a.length+")"),(console.group!==i||console.table!==i)&&s.length>0&&(console.groupCollapsed(n),console.table?console.table(s):e.each(s,function(e,n){console.log(n.Name+": "+n["Execution Time"]+"ms")}),console.groupEnd()),s=[]}},invoke:function(n,a,o){var r,s,l,c=x;return a=a||u,o=y||o,"string"==typeof n&&c!==i&&(n=n.split(/[\. ]/),r=n.length-1,e.each(n,function(t,a){var o=t!=r?a+n[t+1].charAt(0).toUpperCase()+n[t+1].slice(1):n;if(e.isPlainObject(c[o])&&t!=r)c=c[o];else{if(c[o]!==i)return s=c[o],!1;if(!e.isPlainObject(c[a])||t==r)return c[a]!==i?(s=c[a],!1):!1;c=c[a]}})),e.isFunction(s)?l=s.apply(o,a):s!==i&&(l=s),e.isArray(t)?t.push(l):t!==i?t=[t,l]:l!==i&&(t=l),s}},c?(x===i&&g.initialize(),g.invoke(l)):(x!==i&&x.invoke("destroy"),g.initialize())}),t!==i?t:this},e.fn.rating.settings={name:"Rating",namespace:"rating",debug:!1,verbose:!1,performance:!0,initialRating:0,interactive:!0,maxRating:4,clearable:"auto",onRate:function(e){},error:{method:"The method you called is not defined",noMaximum:"No maximum rating specified. Cannot generate HTML automatically"},metadata:{rating:"rating",maxRating:"maxRating"},className:{active:"active",disabled:"disabled",selected:"selected",loading:"loading"},selector:{icon:".icon"},templates:{icon:function(e){for(var n=1,t="";e>=n;)t+='',n++;return t}}}}(jQuery,window,document); -------------------------------------------------------------------------------- /codingpy/static/vendor/semantic-ui/components/search.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * # Semantic UI 2.1.6 - Search 3 | * http://github.com/semantic-org/semantic-ui/ 4 | * 5 | * 6 | * Copyright 2015 Contributors 7 | * Released under the MIT license 8 | * http://opensource.org/licenses/MIT 9 | * 10 | */.ui.search{position:relative}.ui.search>.prompt{margin:0;outline:0;-webkit-appearance:none;-webkit-tap-highlight-color:rgba(255,255,255,0);text-shadow:none;font-style:normal;font-weight:400;line-height:1.2142em;padding:.67861429em 1em;font-size:1em;background:#FFF;border:1px solid rgba(34,36,38,.15);color:rgba(0,0,0,.87);box-shadow:0 0 0 0 transparent inset;-webkit-transition:background-color .1s ease,color .1s ease,box-shadow .1s ease,border-color .1s ease;transition:background-color .1s ease,color .1s ease,box-shadow .1s ease,border-color .1s ease}.ui.search .prompt{border-radius:500rem}.ui.search .prompt~.search.icon{cursor:pointer}.ui.search>.results{display:none;position:absolute;top:100%;left:0;-webkit-transform-origin:center top;-ms-transform-origin:center top;transform-origin:center top;background:#FFF;margin-top:.5em;width:18em;border-radius:.28571429rem;box-shadow:0 2px 4px 0 rgba(34,36,38,.12),0 2px 10px 0 rgba(34,36,38,.08);border:1px solid #D4D4D5;z-index:998}.ui.search>.results>:first-child{border-radius:.28571429rem .28571429rem 0 0}.ui.search>.results>:last-child{border-radius:0 0 .28571429rem .28571429rem}.ui.search>.results .result{cursor:pointer;display:block;overflow:hidden;font-size:1em;padding:.85714286em 1.14285714em;color:rgba(0,0,0,.87);line-height:1.33;border-bottom:1px solid rgba(34,36,38,.1)}.ui.search>.results .result:last-child{border-bottom:none!important}.ui.search>.results .result .image{float:right;overflow:hidden;background:0 0;width:5em;height:3em;border-radius:.25em}.ui.search>.results .result .image img{display:block;width:auto;height:100%}.ui.search>.results .result .image+.content{margin:0 6em 0 0}.ui.search>.results .result .title{margin:-.14285em 0 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-weight:700;font-size:1em;color:rgba(0,0,0,.85)}.ui.search>.results .result .description{margin-top:0;font-size:.92857143em;color:rgba(0,0,0,.4)}.ui.search>.results .result .price{float:right;color:#21BA45}.ui.search>.results>.message{padding:1em}.ui.search>.results>.message .header{font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1rem;font-weight:700;color:rgba(0,0,0,.87)}.ui.search>.results>.message .description{margin-top:.25rem;font-size:1em;color:rgba(0,0,0,.87)}.ui.search>.results>.action{display:block;border-top:none;background:#F3F4F5;padding:.92857143em 1em;color:rgba(0,0,0,.87);font-weight:700;text-align:center}.ui.search>.prompt:focus{border-color:rgba(34,36,38,.35);background:#FFF;color:rgba(0,0,0,.95)}.ui.loading.search .input>i.icon:before{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;border-radius:500rem;border:.2em solid rgba(0,0,0,.1)}.ui.loading.search .input>i.icon:after{position:absolute;content:'';top:50%;left:50%;margin:-.64285714em 0 0 -.64285714em;width:1.28571429em;height:1.28571429em;-webkit-animation:button-spin .6s linear;animation:button-spin .6s linear;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;border-radius:500rem;border-color:#767676 transparent transparent;border-style:solid;border-width:.2em;box-shadow:0 0 0 1px transparent}.ui.category.search>.results .category .result:hover,.ui.search>.results .result:hover{background:#F9FAFB}.ui.search .action:hover{background:#E0E0E0}.ui.category.search>.results .category.active{background:#F3F4F5}.ui.category.search>.results .category.active>.name{color:rgba(0,0,0,.87)}.ui.category.search>.results .category .result.active,.ui.search>.results .result.active{position:relative;border-left-color:rgba(34,36,38,.1);background:#F3F4F5;box-shadow:none}.ui.search>.results .result.active .description,.ui.search>.results .result.active .title{color:rgba(0,0,0,.85)}.ui.category.search .results{width:28em}.ui.category.search>.results .category{background:#F3F4F5;box-shadow:none;border-bottom:1px solid rgba(34,36,38,.1);-webkit-transition:background .1s ease,border-color .1s ease;transition:background .1s ease,border-color .1s ease}.ui.category.search>.results .category:last-child{border-bottom:none}.ui.category.search>.results .category:first-child .name+.result{border-radius:0 .28571429rem 0 0}.ui.category.search>.results .category .result{background:#FFF;margin-left:100px;border-left:1px solid rgba(34,36,38,.15);border-bottom:1px solid rgba(34,36,38,.1);-webkit-transition:background .1s ease,border-color .1s ease;transition:background .1s ease,border-color .1s ease;padding:.85714286em 1.14285714em}.ui.category.search>.results .category:last-child .result:last-child{border-radius:0 0 .28571429rem;border-bottom:none}.ui.category.search>.results .category>.name{width:100px;background:0 0;font-family:Lato,'Helvetica Neue',Arial,Helvetica,sans-serif;font-size:1em;float:1em;float:left;padding:.4em 1em;font-weight:700;color:rgba(0,0,0,.4)}.ui[class*="left aligned"].search>.results{right:auto;left:0}.ui[class*="right aligned"].search>.results{right:0;left:auto}.ui.fluid.search .results{width:100%}.ui.mini.search{font-size:.71428571em}.ui.small.search{font-size:.92857143em}.ui.search{font-size:1em}.ui.large.search{font-size:1.14285714em}.ui.big.search{font-size:1.28571429em}.ui.huge.search{font-size:1.42857143em}.ui.massive.search{font-size:1.71428571em} --------------------------------------------------------------------------------