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 requests | |
import couchdb | |
server = couchdb.client.Server() | |
tables = requests.get('http://localhost:5984/_all_dbs') | |
for table in tables.json: | |
if table.startswith('daybed-test'): | |
del server[table] |
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
def create_data(self, model_name, data, data_id=None): | |
"""Create a data to a model_name.""" | |
if data_id: | |
data_doc = self.db[data_id] | |
else: | |
data_doc = { | |
'type': 'data', | |
'model_name': model_name, | |
} | |
data_doc['data'] = data |
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
# -*- mode: ruby -*- | |
# Generated with /home/rhubscher/novapost/postbox/bin/postbox-configure --output-dir=var/vm/postbox --preset=vagrantfile-postbox vagrantfile | |
# **YOU SHOULD NOT EDIT THIS FILE MANUALLY.** | |
# You had better edit templates and presets, then run the generator again. | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
# All Vagrant configuration is done here. The most common configuration | |
# options are documented and commented below. For a complete reference, | |
# please see the online documentation at vagrantup.com. |
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
--- a/django/core/management/__init__.py 2012-10-01 13:06:10.000000000 +0200 | |
+++ postbox/lib/omelette/django/core/management/__init__.py 2012-10-01 13:08:35.329819345 +0200 | |
@@ -42,6 +42,7 @@ | |
parts.reverse() | |
part = parts.pop() | |
path = None | |
+ paths = [] | |
# When using manage.py, the project module is added to the path, | |
# loaded, then removed from the path. This means that |
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
# -*- coding: utf-8 -*- | |
import json | |
import sys | |
from ConfigParser import (ConfigParser, MissingSectionHeaderError, | |
ParsingError, DEFAULTSECT) | |
class StrictConfigParser(ConfigParser): | |
def _read(self, fp, fpname): |
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 django.conf.urls import patterns, url | |
from django.contrib.auth.decorators import login_required | |
from django.utils.translation import ugettext_lazy as _ | |
from youproject.yourapp import views | |
people_list = login_required(views.PeopleListView.as_view()) | |
people_detail = login_required(views.PeopleDetailView.as_view()) |
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
postgresql_db_user: novaauth | |
postgresql_db_password: novaauth | |
postgresql_db_name: novaauth |
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
{% load static i18n i18nurl %} | |
{% get_available_languages as LANGUAGES %} | |
{% for language_code, language_name in LANGUAGES %} | |
{% language language_code %} | |
<li><a href="#{{ language_code }}" class="{% if language_code == LANGUAGE_CODE %} active{% endif %}" data-lang="{{ language_code }}" data-next="{% current_i18nurl language_code %}"><i class="sprite-flag-{{ language_code }}"></i>{{ language_name }}</a></li> | |
{% endlanguage %} | |
{% endfor %} | |
<script type="text/javascript"> |
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
# -*- coding: utf-8 -*- | |
M = [["A", "B", "C", "D", "E"], | |
["F", "G", "H", "IJ", "K"], | |
["L", "M", "N", "O", "P"], | |
["Q", "R", "S", "T", "U"], | |
["V", "W", "X", "Y", "Z"]] | |
def decode(texte): |
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
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
from six.moves import input, xrange, map | |
from string import ascii_letters | |
alphabet = "ABCDEFGHIJKLMNOPQRSTUVXYZ" | |
def get_maps(keyword): | |
keyword = keyword.upper().replace('W', 'V') |