I hereby claim:
- I am guewen on github.
- I am guewen (https://keybase.io/guewen) on keybase.
- I have a public key ASAQTfK_7H26dnaTrYfE2YF_iXZotEEMvW97PWhFgilG2Ao
To claim this, I am signing this object:
| # to run in odoo shell | |
| import timeit | |
| code_recordset = """ | |
| result = env['product.product'].browse() | |
| for record in records: | |
| result |= record | |
| """ |
| from odoo.tools import convert_file | |
| convert_file(env.cr, 'account_invoice_sent', 'wizards/account_invoice_state_view.xml', {}, mode='update', kind='data') | |
| env.cr.commit() | |
| def reload(addon, path): | |
| from odoo.tools import convert_file | |
| convert_file(env.cr, addon, path, {}, mode='update', kind='data') | |
| env.cr.commit() |
| CREATE OR REPLACE FUNCTION normalize_query(IN TEXT, OUT TEXT) AS $body$ | |
| SELECT | |
| regexp_replace( | |
| lower($1), | |
| -- Remove IN values | |
| 'in\s*\([,\s\?]*\)', 'in (...)', 'g' ) | |
| ; | |
| $body$ | |
| LANGUAGE SQL; |
| # -*- coding: utf-8 -*- | |
| # Copyright 2016 Camptocamp SA | |
| # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) | |
| import logging | |
| import random | |
| import threading | |
| from collections import defaultdict |
I hereby claim:
To claim this, I am signing this object:
| # Dockerfile | |
| FROM ubuntu:14.04 | |
| # Set the locale | |
| RUN locale-gen en_US.UTF-8 | |
| ENV LANG en_US.UTF-8 | |
| ENV LANGUAGE en_US:en | |
| ENV LC_ALL en_US.UTF-8 | |
| # Install dependencies |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Dowload new log files from S3. | |
| New files are compressed with gzip and only new files are downloaded. | |
| """ | |
| from __future__ import print_function |
| -- Needs pg_buffercache | |
| select count(*) from pg_buffercache; |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from __future__ import print_function | |
| from urllib2 import urlopen | |
| import bs4 as BeautifulSoup | |
| html = urlopen('http://menus.epfl.ch/cgi-bin/getMenus?resto_id=42&pagejahia=1') | |
| soup = BeautifulSoup.BeautifulSoup(html) |