This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<user_review>I read math books for fun. I realize that, right away, this puts me in an unusual portion of the population. It’s not <em>just</em> my fancy math degree that makes these books attractive. However, I do think that there are some math books written for people interested in math (whether professionally or amateurly), and then there are math books written for people who, usually thanks to a bad experience in school, have sworn off math like they said they would swear off cheap booze. <em>Our Days Are Numbered</em> is one of the latter. In a passionate and personal exploration of shape, algebra, geometry, and number, Jason I. Brown illuminates the fundamental mathematics behind some everyday tasks. While some people will still run away screaming, others will hopefully begin to see math in a new way.<br /><br />Among the topics Brown explores are: converting between units, using graphs to display data, the meaning behind averages, the role of chance in decision-makin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
from wtforms import Form, StringField | |
from wtforms.fields.html5 import DateField | |
from wtforms.widgets.html5 import TimeInput | |
class TimeField(StringField): | |
"""HTML5 time input.""" | |
widget = TimeInput() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.11) | |
// Compass (v1.0.3) | |
// ---- | |
// Generates background properties for Cartesian axes in specified quadrant | |
@mixin axes($q: 1, $bg-colour: rgba(#fff,0.5), $pad: 0.5em) { | |
// Define pairs for x-axis position. y-axis is always opposite | |
$x-pairs: ((bottom, right), (bottom, left), (top, left), (top, right)); | |
// Define quadrants in which each axis is inverted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> | |
<script>window.jQuery || document.write('<script src="js/jquery-1.11.2.min.js"><\/script>')</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.twitter-timeline { | |
border: 1px solid blue !important; /* Replace "blue" with another named colour or hexadecimal color code of your choice. The "!important" flag prevents the inline styling from overriding this rule. */ | |
border-radius: 5px; /* This makes the corners rounded slightly. */ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Requires Arrow package | |
class DateTimeWidget: | |
"""Widget for DateTimeFields using separate date and time inputs.""" | |
def __call__(self, field, **kwargs): | |
id = kwargs.pop('id', field.id) | |
date = time = '' | |
if field.data: | |
dt = arrow.get(field.data).to(current_app.config['TIMEZONE']) | |
date = dt.format('YYYY-MM-DD') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logging_config = { | |
"version": 1, | |
"disable_existing_loggers": False, | |
"formatters": { | |
"simple": { | |
"format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s" | |
} | |
}, | |
"handlers": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Supplier(db.Model): | |
"""A supplier of consignment items.""" | |
__tablename__ = 'consignment_suppliers' | |
id = db.Column(db.Integer, primary_key=True) | |
supplier_name = db.Column(db.String(200), | |
unique=True, | |
info={'label': 'Business name', | |
'filters': [lambda x: x or None]}) | |
person_id = db.Column(db.Integer, db.ForeignKey('person.id')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("twitter.com") { | |
.dashboard-right { | |
visibility: hidden; | |
} | |
.js-moments-tab { | |
visibility: hidden; | |
width: 0px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from app import db | |
from sqlalchemy import desc, event, func, orm | |
from sqlalchemy.ext.associationproxy import association_proxy | |
from sqlalchemy.ext.declarative import declared_attr | |
from sqlalchemy_utils import ArrowType, auto_delete_orphans | |
from slugify import slugify_unicode | |
tags = db.Table('tag_associations', | |
db.Column('tag_id', db.Integer, db.ForeignKey('tags.id')), | |
db.Column('article_id', db.Integer, db.ForeignKey('articles.id'))) |
OlderNewer