Skip to content

Instantly share code, notes, and snippets.


Ionel Cristian Mărieș ionelmc

Block or report user

Report or block ionelmc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ionelmc /
Last active May 21, 2018
A more sophisticated celery fixture (logs + tree term)
from __future__ import print_function
import subprocess
import sys
import time
import psutil
import pytest
ionelmc /
Created May 21, 2018
pytest-django support for subprocesses
def django_db_setup(request,
import pytest_django.compat
def teardown_databases(db_cfg, verbosity, _teardown_databases=pytest_django.compat.teardown_databases):
View gist:58db6ad253e36e1e3a7f1983d78baf2b
"chrome": {
"default": "60.0",
"versions": {
"60.0": {
"image": "selenoid/chrome:60.0",
"port": "4444",
"path": "/"
Make sure you have a `socat readline unix-listen:/tmp/debugger` or `socat - unix-listen:/tmp/debugger` running in
a termial before using set_trace.
def set_trace():
from pdb import Pdb
import os
import socket
ionelmc / .gitignore
Last active Jun 16, 2019
Socat PPA (readline)
View aspectlib-perm-example.rst
Python 3.5.1 (default, Dec 18 2015, 00:00:00)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
    def delete(self, *, stuff_id, user):
    def change(self, *, stuff_id, params, user):
import pytest
class A(object):
def __init__(self, **kw):
for k, v in kw.items():
setattr(self, k, v)
class B(object):
ionelmc / .gitignore
Last active Mar 17, 2019
A JSON parser benchmark. See README.rst for instructions.
View .gitignore
View gist:8b88543e31f0a57fe3cb
__new__(<class 'file'>, '.coveragerc') <<< aspectlib/ < aspectlib/ < 2.7/ < coverage/ < coverage/ < coverage/ < pytest_cov/ < <string>:4:<module> < <string>:1:<module> < <string>:167:addpackage
__new__ => <closed file ?, mode '<uninitialized file>' at 0x00007f0a64e70720>
{__builtin__.file}.__init__('.coveragerc') <<< aspectlib/ < aspectlib/ < 2.7/ < coverage/ < coverage/ < coverage/ < pytest_cov/ < <string>:4:<module> < <string>:1:<module> < <string>:167:addpackage
{__builtin__.file}.__init__ => None
{__builtin__.file}.readline() <<< aspectlib/ < aspectlib/
ionelmc / python-dev.log
Created Mar 24, 2015
Fun times with simplejson on #python-dev
View python-dev.log
[2015-01-21 16:12:19] <ionelmc> haypo: it only happens when i got simplejson installed :-)
[2015-01-21 16:13:14] <haypo> ionelmc: so you know the fix, uninstall simplejson :-D
[2015-01-21 16:13:22] <haypo> ionelmc: it looks like a bug in this module
[2015-01-21 16:13:39] <haypo> ionelmc: python 2.7 provides a json module which is based on simplejson
[2015-01-21 16:13:51] <haypo> ionelmc: why not using the "builtin" json module?
[2015-01-21 16:14:08] <ionelmc> cauze someone was too lazy to cleanup the imports
[2015-01-21 16:14:19] <ionelmc> :-)
[2015-01-21 16:14:42] <ionelmc> haypo: so no speed difference?
[2015-01-21 16:14:50] <ionelmc> that someone is also too lazy to test :)
[2015-01-21 16:15:08] <Taggnostr2> ionelmc, in 2.7 the json module is accelerated in C, so it should be fast
You can’t perform that action at this time.