I hereby claim:
- I am buxx on github.
- I am buxx (https://keybase.io/buxx) on keybase.
- I have a public key ASBiqrMvEzxYFEjTpnHrAOeKpNL3Yt3VYArT-iJ2sFbZ8go
To claim this, I am signing this object:
| <?php | |
| /* | |
| * Adapt to your AppKernel.php path | |
| */ | |
| require_once(__DIR__ . "../../../../../../app/AppKernel.php"); | |
| /** | |
| * @see http://haulynjason.net/weblog/2012/01/fully-isolated-tests-in-symfony2/ | |
| */ | 
| #!/bin/bash | |
| line=$(head -n 1 $1) | |
| # need to be fixed below | |
| if ! [ $line="# coding: utf-8" ]; then | |
| printf '%s\n' "# coding: utf-8" | cat - $1 > $1.n && mv $1.n $1 | |
| fi; | |
| # use like: | |
| # find -iname '*.py' ! -path "./venv3.5/*" -exec ./u.sh {} \; | 
| alias uuid="python -c 'import uuid; print(uuid.uuid4())'" | |
| alias gen="python -c 'import uuid; print(str(uuid.uuid4()).replace(\"-\", \"\"))'" | |
| alias freezelist="python -c \"import pip; print(list(sorted(['{}{}'.format(d.project_name, '=={}'.format(getattr(d, 'version')) if getattr(d, 'version') else '') for d in pip.get_installed_distributions(local_only=True)], key=lambda s: s.lower())))\"" | |
| alias prettyjson='python -m json.tool' | 
| from pyglet.gl import * | |
| # glEnable(GL_TEXTURE_2D) | |
| # glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST) | |
| desert_img = pyglet.image.load('assets/desert.png') | |
| data = desert_img.data | |
| data = b'\x00' * 200000 + data[200000:] | |
| desert_img.data = data | 
| from aiohttp import web | |
| async def handle(request): | |
| response = web.StreamResponse( | |
| status=200, | |
| reason='OK', | |
| headers={'Content-Type': 'text/plain'}, | |
| ) | |
| await response.prepare(request) | 
I hereby claim:
To claim this, I am signing this object:
| src = create_engine('mysql+oursql://username:[email protected]:3306/dbname') | |
| dst = create_engine('postgresql://username:password@localhost:5432/dbname') | |
| tables = Base.metadata.tables; | |
| for tbl in tables: | |
| data = src.execute(tables[tbl].select()).fetchall() | |
| for a in data: print(a) | |
| if data: | |
| print (tables[tbl].insert()) | |
| dst.execute( tables[tbl].insert(), data) | 
| import asyncio | |
| """ | |
| asyncio: résoudre les problèmes d'attente | |
| """ | |
| class Progress: | |
| def __init__(self, start: float): | |
| self.value = start | 
| import dataclasses | |
| import abc | |
| import typing | |
| @dataclasses.dataclass | |
| class Person: | |
| name: str | |
| class RuleSet(abc.ABC): |