The idea of the ramp up is to have a scalable way to activate a software feature slowly so that the scale is handled.
If you have let say 10 million users and you want to launch a most wanted feature.
import asyncio.subprocess | |
@asyncio.coroutine | |
def demo(): | |
proc = yield from asyncio.create_subprocess_exec('ls', '-1', stdout=asyncio.subprocess.PIPE) | |
while True: | |
line = yield from proc.stdout.readline() | |
if not line: | |
break | |
print(line) |
#!/bin/sh | |
# http://www.alfredklomp.com/programming/shrinkpdf | |
# Licensed under the 3-clause BSD license: | |
# | |
# Copyright (c) 2014, Alfred Klomp | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: |
import hashlib | |
import sys | |
from uuid import UUID | |
text = sys.stdin.read() | |
print UUID(hashlib.sha256(text).hexdigest()[:32]) |
# From http://snippet.gabory.fr/snippet/9/ | |
# Similar to `cut -d ":" -f 1 | sort | uniq -c | sort -n` | |
# | |
# Usage: flake8 venv | python cutfdu.py | |
# Mock : flake8 venv | cut -d ":" -f 1 | sort | uniq -c | sort -n | |
# | |
# From Natim with love (2014-02-14) | |
import itertools | |
import sys |
var value = 0; | |
var regex = /[+-]?\d+\,\d+/g; | |
$('.ember-view .price').each(function(){ value += $(this).html().match(regex).map(function(v) { return parseFloat(v.replace(',', '.')); })[0] }); | |
console.log(value); |
SELECT numero, geom FROM parcelle | |
WHERE ST_Intersects(geom, ST_Transform( | |
ST_ConvexHull('SRID=4326;MULTIPOINT(2.232 48.818, | |
2.246 48.82, | |
2.241 48.809, | |
2.232 48.818)'::geometry), | |
27572)); |
# -*- 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') |
# -*- 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): |
{% 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"> |