Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import os
import sys
import subprocess
from piptools import CACHE_DIR
def main(requirements_in):
aldryn-boilerplates==0.7.2
aldryn-client==0.9.12
aldryn-sites==0.5
aldryn-snake==0.0.2
argparse==1.4.0 # via djeese-fs
beautifulsoup==3.2.1
boto==2.38.0
certifi==2015.9.6.2 # via djeese-fs
cffi==1.2.1 # via cryptography
chardet==2.3.0 # via djeese-fs
import pygit2
import sys
import subprocess
import re
from giturlparse import parse as giturlparse
TOKEN_USER = b'x-oauth-basic'
#!/usr/bin/env python
from __future__ import print_function, unicode_literals
import os
import math
import glob
import click
import polib
from optparse import make_option
from django.core.management.base import BaseCommand
from products.models import SupplierOpportunity
class Command(BaseCommand):
def handle(self, *args, **options):
objs = SupplierOpportunity.objects.raw("""
SELECT
pip install django-filer [ 1 ]
Collecting django-filer
Using cached django-filer-0.9.8.tar.gz
Requirement already satisfied (use --upgrade to upgrade): Django>=1.4 in /opt/boxen/homebrew/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from django-filer)
Collecting easy-thumbnails>=1.0 (from django-filer)
Using cached easy-thumbnails-2.2.tar.gz
Collecting django-mptt==0.5.2,==0.6,==0.6.1 (from django-filer)
Could not find a version that satisfies the requirement django-mptt==0.5.2,==0.6,==0.6.1 (from django-filer) (from versions: 0.1, 0.2, 0.2.1, 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.4.2, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.6.0, 0.6.1)
Some externally hosted files were ignored as access to them may be unreliable (use --allow-external to allow).
No distributions matching the version for django-mptt==0.5.2,==0.6,==0.6.1 (from django-filer)
import logging, requests, pprint
# Setup logging
logging.basicConfig(level=logging.DEBUG)
base = 'https://<instance>.atlassian.net'
username = 'user'
password = '******'
session = requests.Session()

Keybase proof

I hereby claim:

  • I am garetjax on github.
  • I am garetjax (https://keybase.io/garetjax) on keybase.
  • I have a public key whose fingerprint is 8BF0 FED5 D83A 051A 3EF7 86B5 1E77 02F3 A815 E535

To claim this, I am signing this object:

@GaretJax
GaretJax / README.md
Created November 13, 2014 07:33
Remove fuzzy markers from manually updated translation files.

Simple script to remove the fuzzy keyword from translations files when those have been translated manually. Needs a file containing the modified lines, which can be created with the followign script:

git diff base.po new.po | grep '^+[^#]' > updated_lines

It can then be invoked with:

./remove_fuzzy.py new.po updated_lines new_removed.po
class StudentImportUploadForm(forms.Form):
import_file = forms.FileField(required=True)
importer = lo.Importer(
lo.SkippingIterator(3),
lo.HeadersMapper([
'first_name',
'last_name',
'email',
'birthday',
'phone',