This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
int main() { | |
// References in work. | |
int x(0); | |
int &ref = x; | |
x = 10; |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
int main() { | |
/* | |
* References are often confused with pointers but three major | |
* differences between references and pointers are: | |
* - You cannot have NULL references. You must always be able to assume | |
* that a reference is connected to a legitimate piece of storage. |
This file contains hidden or 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
# http://editorconfig.org | |
root = true | |
[*] | |
indent_style = space | |
indent_size = 4 | |
insert_final_newline = true | |
trim_trailing_whitespace = true | |
end_of_line = lf |
This file contains hidden or 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
#include <iostream> | |
using namespace std; | |
void pre_increment() { | |
// Pre-increment. | |
// i is: 1 | |
// j is: 1 | |
// ++i | |
int i(0); |
This file contains hidden or 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
[bumpversion] | |
current_version = 3.0.0.a0 | |
commit = True | |
tag = False | |
files = setup.py docs/conf.py wtforms/__init__.py | |
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\.(?P<release>[a-z]+)(?P<n>\d+))? | |
serialize = | |
{major}.{minor}.{patch}.{release}{n} | |
{major}.{minor}.{patch} |
This file contains hidden or 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 remote_pdb | |
def main(): | |
""" | |
A dummy function. | |
""" | |
remote_pdb.set_trace(host='0.0.0.0', port=4444) | |
return True |
This file contains hidden or 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
version: '2' | |
services: | |
backend: | |
build: . | |
command: > | |
gunicorn -b 0.0.0.0:5005 | |
--worker-class eventlet | |
--access-logfile - | |
--reload |
This file contains hidden or 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 blinker import Namespace | |
_signals = Namespace() | |
pre_save = _signals.signal('pre_save') | |
class Sender: | |
def __init__(self, name): | |
self.name = name |
This file contains hidden or 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
#!/bin/bash | |
echo "### Cleaning *.pyc, *.swp and *.DS_Store files." | |
# Get a path from the first argument. | |
if [[ $* ]]; then | |
LOCATION=$* | |
else | |
LOCATION=$(pwd) | |
fi |
This file contains hidden or 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 functools import wraps | |
from werkzeug.security import ( | |
generate_password_hash, | |
check_password_hash | |
) | |
from flask import abort |