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
-- ResetPrototype | |
-- | |
-- Copyright (c) 2011, Charles-Axel Dein | |
-- All rights reserved. | |
-- | |
-- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | |
-- | |
-- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | |
-- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | |
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE |
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
description "supervisord" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
exec /usr/local/bin/supervisord --nodaemon --configuration /etc/supervisord.conf |
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
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index 1d6612c..852fd1b 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -64,7 +64,9 @@ OPTION(WITH_DD "Build Driving distance library" OFF) | |
IF(UNIX) | |
SET(LIBRARY_INSTALL_PATH ${LIB_DIR}) | |
- SET(SQL_INSTALL_PATH /usr/share/postlbs) | |
+ if(NOT SQL_INSTALL_PATH) |
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
diff --git a/util/gaul/gaul_util.h b/util/gaul/gaul_util.h | |
index d81df51..74511d9 100755 | |
--- a/util/gaul/gaul_util.h | |
+++ b/util/gaul/gaul_util.h | |
@@ -175,6 +175,7 @@ typedef short _Bool; | |
#if HAVE__BOOL != 1 | |
typedef short _Bool; | |
#endif | |
+typedef short _Bool; | |
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
#!/usr/bin/env python | |
# | |
# Copyright 2007 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.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
from sqlalchemy.orm import sessionmaker, scoped_session | |
... | |
Session = scoped_session(sessionmaker()) | |
# When using scoped_session, Session and Session() expose the same .commit() .query() .add() etc. methods. | |
... |
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 sqlalchemy import Column, Integer, Unicode | |
from sqlalchemy import create_engine | |
from sqlalchemy.orm import sessionmaker, scoped_session | |
from sqlalchemy.ext.declarative import declarative_base | |
Base = declarative_base() | |
Session = scoped_session(sessionmaker()) | |
class User(Base): |
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 time | |
from celery import chord | |
from celery.utils import uuid | |
from my_app.celery import celery | |
class ProgressChord(chord): |
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
class ProgressChord(chord): | |
""" | |
Chord that returns both the callback's AsyncResult and the group's | |
AsyncResult. | |
""" | |
# See: | |
# http://stackoverflow.com/questions/15441101/how-to-track-the-progress-of-individual-tasks-inside-a-group-which-forms-the-hea | |
# https://groups.google.com/forum/?fromgroups=#!topic/celery-users/xSdxI-Z08Cw |
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 alembic.script import ScriptDirectory | |
from alembic.config import Config | |
from alembic.migration import MigrationContext | |
from sqlalchemy import create_engine | |
# current head | |
config = Config() | |
config.set_main_option("script_location", "myapp:migrations") | |
script = ScriptDirectory.from_config(config) | |
head_revision = script.get_current_head() |
OlderNewer