I hereby claim:
- I am craigds on github.
- I am craigds (https://keybase.io/craigds) on keybase.
- I have a public key ASD9-xLoSxRjbgeH8F-DvkQdtdsBmK9_6E8uiVhvL1yY9wo
To claim this, I am signing this object:
| services: | |
| happy-server: | |
| image: happy-server:latest | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| ports: | |
| - "3005:3005" | |
| restart: unless-stopped | |
| environment: |
| #!/usr/bin/env python3 | |
| """Create a zip file with configurable dirs x files x 1000 null bytes each (compressed).""" | |
| import zipfile | |
| import argparse | |
| def create_large_zip(output_file="large.zip", num_dirs=1000, files_per_dir=1000): | |
| """Create a zip with many files containing null bytes.""" | |
| # Create 1000 null bytes in memory once |
| import pytest | |
| from _pytest.python_api import ApproxBase | |
| from _pytest.assertion.util import _compare_eq_dict | |
| # Subclassing ApproxBase means we can patch into the pytest machinery for | |
| # custom assertion error messages, since that class provides a `_repr_compare` method | |
| # that is not present on any other types. | |
| # https://github.com/pytest-dev/pytest/blob/556e075d23a91eb42821129a5d874ec3174e17ad/src/_pytest/assertion/util.py#L219 |
| def diff_iterators(iter1, iter2): | |
| """ | |
| Yields every value that differs between two iterators, assuming they're ordered the same. | |
| ie, given | |
| iter1 = iter([1, 2, 5, 7, 9, 10, 12]) | |
| iter2 = iter([1, 3, 4, 5, 6, 9, 11]) | |
| yields: | |
| 2, 3, 4, 6, 7, 10, 11, 12 |
| # coding: utf-8 | |
| from __future__ import absolute_import, division, print_function, unicode_literals | |
| import os | |
| import time | |
| import koordinates | |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| """ | |
| Converts Internet Explorer 'capture network traffic' XML to a HAR file. | |
| Turns out that XML is just a HAR file anyways, but in XML form. So this | |
| just converts it to JSON, and Bob's your uncle. | |
| Requires Python 2.7+ and LXML. | |
| """ | |
| from __future__ import unicode_literals |
| javascript:(function()%7Bvar%20r%20%3D%20R.player%2C%20oVol%20%3D%20r.volume()%2C%20tf%20%3D%20r._onTrackFinished%2C%20ar%20%3D%20r._onAudioReady%2C%20n%20%3D%20r._next%3Br._onTrackFinished%20%3D%20function()%20%7Bconsole.log(%22iree%3AtrackFinished%3A%22%2Barguments)%3Bif%20(.001%20!%3D%3D%20r.volume())%7BoVol%20%3D%20r.volume()%3Br.volume(.001)%3B%7Dreturn%20tf.apply(this%2C%20arguments)%3B%7D%3Br._onAudioReady%20%3D%20function()%20%7Bconsole.log(%22iree%3AaudioReady%3A%22%2Br.playingAd())%3Bif%20(!r.playingAd())%7Br.volume(oVol)%3B%7Dreturn%20ar.apply(this%2C%20arguments)%3B%7D%3Bdocument.getElementById('header').style.backgroundColor%20%3D%20'blue'%7D)() |
| #!/usr/bin/env python | |
| import mapnik | |
| import random | |
| import time | |
| w,h = 16,16 | |
| img = mapnik.Image(w,h) | |
| img.background = mapnik.Color("white") |
| from fieldsignals import post_save_changed | |
| from mptt.models import MPTTModel | |
| class Category(MPTTModel): | |
| parent = models.ForeignKey('self', null=True, blank=True, db_index=True) | |
| name = models.CharField(max_length=50) | |
| slug = models.SlugField(max_length=50, db_index=True) | |
| url = models.CharField(max_length=256, unique=True, db_index=True) |