git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| """ | |
| Connect4.py | |
| Basic connect 4 game in Python | |
| Work in progress | |
| """ | |
| import operator, numpy |
| jQuery File Uploader (blueimp) and nginx benchmark notes. | |
| Hypothesis: | |
| Assigning the chunk size to be greater than the client_body_buffer_size will result in slower uploads and corrupt files. | |
| Table 1: Stability | |
| ------------------ | |
| The table below shows the number of successful file uploads after a random number of pause and resume operations. |
| """ | |
| Demo of json_required decorator for API input validation/error handling | |
| """ | |
| import inspect | |
| import functools | |
| import json | |
| from traceback import format_exception | |
| from flask import jsonify, request | |
| import sys |
| _.mixin({ | |
| // ### _.objMap | |
| // _.map for objects, keeps key/value associations | |
| objMap: function (input, mapper, context) { | |
| return _.reduce(input, function (obj, v, k) { | |
| obj[k] = mapper.call(context, v, k, input); | |
| return obj; | |
| }, {}, context); | |
| }, | |
| // ### _.objFilter |
| body { | |
| font-family: Helvetica, arial, sans-serif; | |
| font-size: 14px; | |
| line-height: 1.6; | |
| padding-top: 10px; | |
| padding-bottom: 10px; | |
| background-color: white; | |
| padding: 30px; } | |
| body > *:first-child { |
| os | |
| from flask_extended import Flask | |
| app = Flask(__name__) | |
| app.config.from_yaml(os.join(app.root_path, 'config.yml')) |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| The regex patterns in this gist are intended to match any URLs, | |
| including "mailto:[email protected]", "x-whatever://foo", etc. For a | |
| pattern that attempts only to match web URLs (http, https), see: | |
| https://gist.github.com/gruber/8891611 | |
| # Single-line version of pattern: | |
| (?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’])) |