I hereby claim:
- I am rickycook on github.
- I am rickycook (https://keybase.io/rickycook) on keybase.
- I have a public key whose fingerprint is 1255 FA8D 8DE3 0534 D431 4564 79D6 68B9 12F3 6735
To claim this, I am signing this object:
| """ | |
| Test the "latency" of different ways to trigger multiprocessing start. | |
| This will essentially create a multiprocessing `Process` object and measure the | |
| time from when we tell that process to start processing (not necessarily | |
| `Process.start`) until the time that the process picks up the request to start. | |
| This is done in several ways: | |
| - Without a blocker: the time is recorded, then the `Process.start` method |
| # Uses the rsync change summary to figure out how many things changed, and uses that | |
| # to tell Ansible if something changed or not | |
| - name: sync hieradata | |
| shell: rsync --delete -ri "/tmp/repo/hieradata" "/etc/puppet/hieradata" | awk '{print $1}' | grep -vE '..\.\..\.\.\.\.' | wc -l | |
| register: hieradata_changes | |
| changed_when: "hieradata_changes.stdout|int != 0" |
I hereby claim:
To claim this, I am signing this object:
| [MESSAGES CONTROL] | |
| disable=bad-continuation, | |
| fixme, | |
| locally-disabled, | |
| relative-import, | |
| star-args, | |
| wildcard-import, | |
| [REPORTS] | |
| output-format=colorized |
| #!/bin/bash | |
| for version_line in $(git log -G 'version=' setup.py | grep commit | awk '{print $2}' | \ | |
| xargs git show --date=iso | \ | |
| grep -E '^((\+\s*version=)|(commit )|Date:)' | \ | |
| sed "s/\+\s*version='//" | sed "s/',$//" | \ | |
| sed 's/commit //' | \ | |
| sed 's/Date:\s*//' | \ | |
| awk '{printf("%s%s", $0, (NR%3 ? "," : "\n"))}' | \ | |
| sed 's/ /_/g'); do | |
| c="$(echo $version_line | awk -F ',' '{print $1}')" |
See models.old.py for the models we will be migrating from and models.py for the models we will be migrating to.
OneToOne and GenericForeignKey side by side for data migration./manage.py schemamigration <yourapp> --autocontent_type_id and object_id to 1; We will change them in the data migration| # | |
| # General setup | |
| # Import your app and set APP_URLS to your urlpatterns | |
| # | |
| import iss.urls | |
| APP_URLS = iss.urls.urlpatterns | |
| from url_levels import url_levels | |
| out = url_levels(APP_URLS) |
| """ | |
| Very simple play with libpulseaudio | |
| pip install libpulseaudio | |
| Help with the API: | |
| http://www.ypass.net/blog/2009/10/pulseaudio-an-async-example-to-get-device-lists/ | |
| http://freedesktop.org/software/pulseaudio/doxygen/index.html | |
| """ |
| #!/bin/bash | |
| ######## | |
| ELASTIC_URL="<host>:9200/<index>/" | |
| SLEEP=5 | |
| ######## | |
| # AHAHHAHAHAHAHHAHAHH awwwwwful | |
| PYTHON_CODE=' |
| #!/usr/bin/python | |
| import re | |
| import requests | |
| DEBUG = True | |
| PROJECT_ID = '' | |
| TOKEN = '' |