This file contains 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 UserFactory(factory.Factory): | |
FACTORY_FOR = User | |
first_name = factory.InfiniteIterator([ 'Peggie', 'Gabe', 'King', 'Fredy', 'Ole', 'Vernice' ]) | |
last_name = factory.InfiniteIterator([ 'Leannon', 'Barton', 'Sauer', 'Walker', 'Strosin']) | |
username = factory.LazyAttribute( | |
lambda o: '%s.%[email protected]' % (o.first_name.lower(), o.last_name.lower()) | |
) | |
# How can I feed data in dict, metadata isn't another Entities (MongoDB context) |
This file contains 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
Samedi matin : | |
* Processus de développement de CPython (Antoine Pitrou) | |
* La boite à outils pour Django (Ordoquy Xavier) | |
* Picasso, le polyglotte et le philosophe (Marc Chantreux) | |
* Je configure mes serveurs avec fabric et fabtools (Ronan Amicel) | |
Samedi après midi : | |
* OpenERP : gestion d'entreprise Open Source en Python (Alexandre ALLOUCHE) |
This file contains 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
casper.then(function() { | |
this.test.assertEval(function() { | |
$('[name="name"]').simulate("key-sequence", {sequence: "{selectall}Foobar"}); | |
return $('.title').text() == 'Foobar'; | |
}); | |
}); |
This file contains 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
var casper = casperjs.create({ | |
verbose: true, | |
logLevel: "error", | |
clientScripts: [ | |
'jquery.js', | |
'jquery.simulate.js', | |
'jquery.simulate.ext.js', | |
'jquery.simulate.drag-n-drop.js', | |
'jquery.simulate.key-combo.js', | |
'jquery.simulate.key-sequence.js' |
This file contains 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 | |
import sys | |
# Lamson is an application, but also the best way to read email without | |
# struggling with "battery include" libraries. | |
from lamson.encoding import from_string | |
from pyelasticsearch import ElasticSearch | |
from pyelasticsearch.exceptions import ElasticHttpNotFoundError |
This file contains 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 unittest | |
import re | |
class BaseTest(unittest.TestCase): | |
def assertEqualEllipsis(self, first, second, ellipsis_marker='...', msg=None): | |
""" | |
Example : | |
>>> self.assertEqualEllipsis('foo123bar', 'foo...bar') |
This file contains 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 contextlib import nested | |
from fabric.api import task, run, settings, env | |
def switch_user(user): | |
return nested(settings( | |
user=user, | |
host_string="%s@%s:%s" % (user, env['host'], env['port']) | |
)) | |
@task |
This file contains 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 | |
# | |
# lxc: linux Container library | |
# Authors: | |
# Daniel Lezcano <[email protected]> | |
# This library is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU Lesser General Public |
This file contains 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 <stdio.h> | |
void ft_is_negative(int n) | |
{ | |
if (n < 0) | |
{ | |
putchar('N'); | |
} | |
else | |
{ |
This file contains 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 <stdio.h> | |
int main () | |
{ | |
int chiffres[3]; | |
char *pn = 0; | |
x = 0; | |
pn = chiffres; |
OlderNewer