Skip to content

Instantly share code, notes, and snippets.

From 09679928282f6757050e8b5fddc5a908699238ef Mon Sep 17 00:00:00 2001
From: Georges Dubus <georges.dubus@compiletoi.net>
Date: Sun, 27 Mar 2011 15:58:00 +0200
Subject: [PATCH] adding translation for french
---
lettuce/languages.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/lettuce/languages.py b/lettuce/languages.py
From bb459af50a4daa5022b93576ccc9035c4081353d Mon Sep 17 00:00:00 2001
From: Georges Dubus <georges.dubus@compiletoi.net>
Date: Tue, 12 Apr 2011 14:09:14 +0200
Subject: [PATCH] French translation fixed.
---
lettuce/languages.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lettuce/languages.py b/lettuce/languages.py
# -*- coding: utf-8 -*-
# language: fr
Fonction: Avoir des fonctions qui marchent
Pour faire mes tests
Je veux que mes fonctions soient reconnues
Scénario: Rien
Quand je ne fait rien
Alors rien ne se passe
@madjar
madjar / extract.py
Created March 15, 2012 09:27
Automatically extract pseudo-sqlalchemy objects from the github api doc
import requests, re
result = requests.get('https://raw.github.com/github/developer.github.com/master/content/v3/events/types.md')
content = result.content
for event in re.findall('## [^#]*', content):
blocks = event.split('\n\n')
event_name = blocks[0][3:]
if 'Hook name' in blocks[1]:
description = ''
6,7M ./shallow/yasnippet
148K ./shallow/smex
428K ./shallow/s.el
3,4M ./shallow/python-mode
308K ./shallow/popup-el
152K ./shallow/pkgbuild-mode
10M ./shallow/org-mode
980K ./shallow/magit
144K ./shallow/fuzzy-el
1,5M ./shallow/flycheck
@madjar
madjar / counterexample_tpb.py
Created September 23, 2013 13:42
An attempt to find the perfect scrapper form
import re
from collections import namedtuple
import requests
from bs4 import BeautifulSoup
Torrent = namedtuple('Torrent', 'name link magnet torrent created size'
' user seeders leechers')
@madjar
madjar / json.rs
Created October 20, 2013 21:53
A nice Json wrapper for rust
/*
* Hi there !
*
* I found that handling Json was quite annoying, so I wrote this
* little lib to help. You can find an example of the usage in the
* tests at the end.
*
* I lacked inspiration on the naming of value() and item(), and got
* lost in the lifetimes, so from_json takes a Json and not a
* JsonLike.
@madjar
madjar / scrapper.py
Last active March 5, 2023 15:02
A example of scrapper using asyncio and aiohttp
import asyncio
import aiohttp
import bs4
import tqdm
@asyncio.coroutine
def get(*args, **kwargs):
response = yield from aiohttp.request('GET', *args, **kwargs)
return (yield from response.read_and_close(decode=True))

Keybase proof

I hereby claim:

  • I am madjar on github.
  • I am georges (https://keybase.io/georges) on keybase.
  • I have a public key whose fingerprint is F683 691F D4AE A070 B860 077A D62C 17B1 0DE2 67C2

To claim this, I am signing this object:

import os
from collections import namedtuple
import subprocess
import tarfile
import re
import requests
from bs4 import BeautifulSoup
import jinja2