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
diff --git a/lettuce/languages.py b/lettuce/languages.py | |
index 02401d7..4e52709 100644 | |
--- a/lettuce/languages.py | |
+++ b/lettuce/languages.py | |
@@ -23,7 +23,7 @@ LANGUAGES = { | |
'native': u'English', | |
'scenario': u'Scenario', | |
'scenario_outline': u'Scenario Outline', |
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
def _cmp(a, b): | |
# print a, b | |
if a == b: | |
return 0 | |
if a.startswith(b) == 0: | |
return 1 | |
else: | |
return -1 | |
# my CMP... Comparing the first letter is not enough, IMHO. |
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
### My question is: is this solution elegant enough? | |
### I mean: if I'm adding several other functions to "clean" my "cell", will it still be "Pythonic"? | |
### e.g.: for f in (func1, func2, func3, func..): stuff = f(stuff) | |
def strip(cell): | |
return cell.strip() | |
def removedblspaces(cell): | |
return u' '.join(cell.split()) |
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
Oh troll, oh désespoir, oh java ennemi | |
N'ai-je donc tant codé que pour cette infâmie ? | |
Et me suis-je commit dans des hacks réguliers | |
Que pour voir en un bug flétrir tant de guillemets ? |
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
Show hidden characters
/** | |
* Sample key binding (emacs users will hate it, but they're probably not using SublimeText2) | |
* | |
*/ | |
[ | |
{ "keys": ["ctrl+w"], "command": "run_macro_file", "args": {"file": "Packages/User/Quick Wrap.sublime-macro"}} | |
] |
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
/** | |
* wrap_line command will use the "rulers" settings to calculate le line width. | |
*/ | |
[ | |
{ "keys": ["alt+q"], "command": "wrap_line"} | |
] |
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 | |
#-*- coding: utf-8 -*- | |
import os | |
import time | |
def cls(): | |
os.system(['clear', 'cls'][os.name == 'nt']) | |
figure_repos = '.o.' |
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
require 'erb' | |
weekday = Time.now.strftime('%A') | |
simple_template = "Today is <%= weekday %>." | |
renderer = ERB.new(simple_template) | |
puts output = renderer.result() | |
# This throws: | |
# NameError: undefined local variable or method `weekday' for #<Object:0x10116b2a8> |
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 | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the active virtualenv | |
# * the branch/status of the current Git, Mercurial or Subversion repository | |
# * the return value of the previous command | |
# * the fact you just came from Windows and are used to having newlines in | |
# your prompts. |
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
#-*- coding: utf8 -*- | |
import logging | |
from cmdbot.core import Bot, direct | |
from cmdbot.core import logger | |
from cmdbot.configs import ArgumentConfiguration | |
logger.setLevel(logging.DEBUG) | |
class Djangobot(Bot): | |
welcome_message = "Salut les djangosaures !" |
OlderNewer