commit
stringlengths
40
40
subject
stringlengths
1
3.25k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
old_contents
stringlengths
0
26.3k
lang
stringclasses
3 values
proba
float64
0
1
diff
stringlengths
0
7.82k
a918d12a2081d0b6da8074b3478c5f2c5e380bcd
Fix syntax errors in test resulting from recent changes to command_line program in r4305 or 6; now fails due to assertion errors rather than type errors (progress of a kind) N.B. seems shift was 0,0,0...
test/command_line/tst_discover_better_experimental_model.py
test/command_line/tst_discover_better_experimental_model.py
from __future__ import division import os import libtbx.load_env from libtbx import easy_run from libtbx.test_utils import approx_equal from libtbx.test_utils import open_tmp_directory from scitbx import matrix # apply a random seed to avoid this randomly crashing... I hope import random random.seed(12345) have_dials...
Python
0
@@ -1147,16 +1147,17 @@ _path2%5D%0A +%0A comman @@ -1380,32 +1380,33 @@ ('optimized_ -imageset +datablock .json')%0A fr @@ -1578,58 +1578,120 @@ zed_ -imageset = load.imageset('optimized_imageset.json' +datablock = load.datablock('optimized_datablock.json',%0A check_format...
2024506ca76d5e7bae3016f1c74800bb02a13e1e
Remove default run behavior for if calling as __name__ == '__main__'.
qav/listpack.py
qav/listpack.py
import random import string class ListPack(object): BOLD = '\033[1m' OFF = '\033[0m' def __init__(self, lp, sep=": ", padding=" ", indentation=0, width=79): self.sep = sep self.padding = padding self.indentation = indentation self.width = width self._lp = lp ...
Python
0
@@ -1,33 +1,4 @@ -import random%0Aimport string%0A%0A %0Acla @@ -1350,987 +1350,4 @@ str%0A -%0A%0Adef id_generator(size=6, chars=None):%0A if chars is None:%0A chars = string.ascii_lowercase + string.ascii_uppercase + string.digits%0A letter = random.choice(string.ascii_lowercase)%0A return letter + ...
e0f8555788bd198c7841326b169983672e6e4079
raise a 404 if a section does not exist
src/pressroom/views.py
src/pressroom/views.py
from datetime import datetime from django.template.context import RequestContext from django.views.generic import list_detail from django.shortcuts import render_to_response from pressroom.models import Article, Section def index(request): articles = Article.objects.get_published()[:5] try: ...
Python
0.000002
@@ -171,16 +171,35 @@ response +, get_object_or_404 %0D%0A%0D%0Afrom @@ -651,39 +651,39 @@ n = -Section.objects.get(slug__exact +get_object_or_404(Section, slug =slu @@ -1728,8 +1728,10 @@ ge=page) +%0D%0A
4934d3488321126fb73d236f00f37fe152f05476
Add test database and some notes
rbm2m/config.py
rbm2m/config.py
# -*- coding: utf-8 -*- import os def get_app_env(): return os.environ.get('RBM2M_ENV', 'Production') class Config(object): APP_ENV = get_app_env() DEBUG = False TESTING = False DATABASE_URI = 'mysql://rbm2m:rbm2m@localhost/dbm2m' REDIS_URI = 'redis://@localhost:6379/0' class ProductionCon...
Python
0
@@ -187,24 +187,50 @@ ING = False%0A + # TODO: ?charset=utf8%0A DATABASE @@ -267,17 +267,17 @@ calhost/ -d +r bm2m'%0A @@ -552,16 +552,78 @@ TESTING = True%0A + DATABASE_URI = 'mysql://rbm2m:rbm2m@localhost/rbm2m_test'%0A
531b441d6a5fddbbe8f6186aa57c0ad56176edbf
Change root user to nobody. See JAMES-663
src/python/sendmail.py
src/python/sendmail.py
#!/usr/bin/python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2...
Python
0.000001
@@ -2786,12 +2786,14 @@ = %22 -root +nobody @%22 +
9a382008eba526a57bbc9be3abfe0d058b1c63af
update wsgi.py
deskxd_com/wsgi.py
deskxd_com/wsgi.py
""" WSGI config for deskxd_com project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SE...
Python
0
@@ -228,16 +228,21 @@ mport os +, sys %0A%0Afrom d @@ -286,16 +286,150 @@ cation%0A%0A +path = '/home/active/Django_deskxd.com'%0Aif path not in sys.path:%0A print %22====== Not in! ======%22%0A sys.path.append(path)%0A%0A os.envir
563fbbb0fc2e4ef7a9790bd62ea6b9d5702e07ac
Version 1.2.4
dezede/__init__.py
dezede/__init__.py
# coding: utf-8 from __future__ import unicode_literals __version__ = 1, 2, 3 get_version = lambda: '.'.join(str(i) for i in __version__) __verbose_name__ = 'Dezède'
Python
0
@@ -76,9 +76,9 @@ 2, -3 +4 %0Aget
7d3b4f149a1028bb68d917fec2bc3a89a0f170ee
set ALLOWED_HOSTS for production
reviewsHub/reviewsHub/settings/production.py
reviewsHub/reviewsHub/settings/production.py
DEBUG = False TEMPLATE_DEBUG = False SECRET_KEY = '$d416i%#@eqim_ms34y42jy%7-+(ml7*7iz8l!w7*7h%et!i3l' ALLOWED_HOSTS = [] DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '', 'USER': '', 'PASSWORD': '', 'HOST': '', ...
Python
0
@@ -113,16 +113,49 @@ OSTS = %5B +'.schelder.com', '.schelder.com.' %5D%0ADATABA
8dfd5a6a0be659ab8df63c8e9e735e8f2e6433ef
Fix computed sort bug.
lib/djtables/table.py
lib/djtables/table.py
#!/usr/bin/env python # vim: et ts=4 sw=4 from django.template.loader import render_to_string from .metatable import MetaTable from .urls import extract, build class Table(object): __metaclass__ = MetaTable def __init__(self, object_list=None, request=None, **kwargs): self._object_list = object_lis...
Python
0
@@ -1666,17 +1666,17 @@ return o -b +l %0A%0A
7980a33b5ed08c6a590229d8739c300e3d495f51
Add atsd, kdb+, elasticsearch, graphite, gnocchi, seriesly, akumuli, databus (part 3/3)
vagrant_files/generator/files/databases/seriesly_cl1_rf1.py
vagrant_files/generator/files/databases/seriesly_cl1_rf1.py
#!/usr/bin/env python2 # -*- coding: utf-8 -*- __author__ = 'Rene Trefft' __version__ = "0.01" # db_folders -> List of DB Folder (for space check) # db_client -> name of ycsb client # db_args -> special ycsb arguments for this db # db_name -> name of this db (e.g. for workload file) # db_desc -> more detailed name/de...
Python
0
@@ -3651,16 +3651,67 @@ riesly%22%0A + dbConfig%5B%22db_args%22%5D=%22-p port=3133 -p ip=%25%25IP%25%25%22 %0A dbC
2c5fc14bf9019ecf03d977860520ae2e4d5ec896
add v3.55.0 (#27558)
var/spack/repos/builtin/packages/py-progressbar2/package.py
var/spack/repos/builtin/packages/py-progressbar2/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyProgressbar2(PythonPackage): """A progress bar for Python 2 and Python 3""" homepa...
Python
0
@@ -418,16 +418,113 @@ ar.gz%22%0A%0A + version('3.55.0', sha256='86835d1f1a9317ab41aeb1da5e4184975e2306586839d66daf63067c102f8f04')%0A vers
a2275fc2a2414e0e456aa1fb99bcdfc1aa716781
Allow flake8 to take --snippet option
lintreview/tools/flake8.py
lintreview/tools/flake8.py
import os import logging from lintreview.tools import Tool from lintreview.tools import run_command from lintreview.utils import in_path log = logging.getLogger(__name__) class Flake8(Tool): name = 'flake8' # see: http://flake8.readthedocs.org/en/latest/config.html PYFLAKE_OPTIONS = [ 'exclude'...
Python
0.000011
@@ -442,16 +442,35 @@ exity',%0A + 'snippet',%0A %5D%0A%0A
6a154f52bcb89bef3f3df591064863bf81cc679c
Fix imports in server
manyfaced/server/server.py
manyfaced/server/server.py
import pickle import time import os import signal from multiprocessing import Process, Lock from requests.exceptions import ConnectionError from socket import (socket, AF_INET, SOCK_STREAM, SOL_SOCKET, SO_REUSEADDR, error as sockerror) import status from dbconnect import Insert from myenc import AE...
Python
0.000001
@@ -254,56 +254,61 @@ r)%0A%0A -import status%0Afrom dbconnect import Insert%0Afrom +from common.status import CLIENT_TIMEOUT%0Afrom common. myen @@ -331,16 +331,23 @@ er%0Afrom +common. settings @@ -370,16 +370,48 @@ EDBEARS%0A +from db.dbconnect import Insert%0A %0A%0Adef du @@ -1033,15 +1033,8 @@ out= -stat...
19fa10640f3687ad3ad2b03a55fe179ffbd09495
fix for matrix columns.
src/scripts/mapping.py
src/scripts/mapping.py
#! /usr/bin/python # -*- coding: utf-8 -*- __author__ = "Osman Baskaya" import sys from collections import defaultdict as dd import numpy as np import random from sklearn.preprocessing import normalize random.seed(42) def chunks(l, n): """ Yield successive n-sized chunks from l. """ for i in xrange(0, len(...
Python
0
@@ -1797,24 +1797,84 @@ on.keys())%0A%0A +%0A gold_ids = set(gold_ids)%0A test_ids = set(test_ids)%0A%0A m = len(
c42513616ed06f79239fe4f6d3fbcac37e43e65f
Switch back to lower-level boto interface (faster) #71
calaccess_website/management/commands/createlatestlinks.py
calaccess_website/management/commands/createlatestlinks.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Save copies of data files from the most recently completed update in a latest/ directory in the Django project's default file storage. """ import os import logging from django.core.files.storage import default_storage from calaccess_raw.models import RawDataCommand from...
Python
0
@@ -225,47 +225,93 @@ o.co -re.files.storage import default_storage +nf import settings%0Afrom boto.s3.connection import S3Connection, OrdinaryCallingFormat %0Afro @@ -1458,36 +1458,29 @@ -default_storage.save +self.copy_key (latest_ @@ -1499,32 +1499,37 @@ zip_file_archive +.name )%0A%0A # loo @@...
4612ea182799b772678879cd5dbe70d09a92cf35
Add an errback for if initialization fails.
src/test_echoclient.py
src/test_echoclient.py
import os from twisted.internet import task, stdio, reactor from twisted.internet.defer import Deferred from twisted.internet.protocol import ClientFactory from twisted.protocols.basic import Int16StringReceiver, LineReceiver from twisted.internet.task import LoopingCall import panda_test from src.parsing_utils impo...
Python
0
@@ -219,16 +219,47 @@ Receiver +%0Afrom twisted.python import log %0A%0Afrom t @@ -896,16 +896,343 @@ ctory)%0A%0A + # Setup an errback in case any of the callbacks we set above fail.%0A # This needs to be done after all the callbacks; if you add callbacks after%0A # you've added an errback, it looks like t...
2519cf06b3cfbdf37f0e79b6222f55f7688ec291
fix import
src/test_encode_map.py
src/test_encode_map.py
import unittest import mock import encode_map class TestEncodeMap(unittest.TestCase): def setUp(self): pass def test_strip_extensions(self): pass def test_resolve_reference(self): pass def test_crop(self): pass def test_process(self): pass if __name__...
Python
0.000001
@@ -13,20 +13,8 @@ est%0A -import mock%0A impo
ac3ba70ed97fb026a24376e1ba9dbfec659fb83e
Update global_defaults_to_system_settings.py
erpnext/patches/v4_0/global_defaults_to_system_settings.py
erpnext/patches/v4_0/global_defaults_to_system_settings.py
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from collections import Counter from frappe.core.doctype.user.user import STANDARD_USERS def execute(): system_settings = frappe.get_doc("System Settings") #...
Python
0.000002
@@ -527,16 +527,17 @@ l_defaul +t s:%0A%09%09for
e888d008c4c0d0861c7309187091740360865397
Fix exit channel home page on opps multi site
opps/channel/models.py
opps/channel/models.py
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ValidationError, ObjectDoesNotExist from mptt.models import MPTTModel, TreeForeignKey from opps.core.models import Publishable from opps.channel.utils import generate_long_sl...
Python
0
@@ -46,16 +46,49 @@ models%0A +from django.conf import settings%0A from dja @@ -1937,16 +1937,92 @@ .filter( +site=settings.SITE_ID,%0A homepage
cea9f476999cc3cb05b56f98761135eb7954bbc3
make sure atom exists before deleting
orbis/gui/sketchpad.py
orbis/gui/sketchpad.py
import matplotlib import matplotlib.patches import settings import numpy import wx from plots import Plot #==================================================================================== class SketchPad(Plot): """sketch pad for drawing molecules""" PICK_TOLERANCE = 5 #--------------------------...
Python
0.000002
@@ -2616,16 +2616,33 @@ s_pick() + and self.up_atom %0A
8be0c31e2319eb3718ecb3476d22d5b7ce5101e7
Update 07_Weather_Station.py
07_Weather_Station/07_Weather_Station/07_Weather_Station.py
07_Weather_Station/07_Weather_Station/07_Weather_Station.py
import MCP3202 import time import datetime import os from time import strftime try: while 1: os.system('clear') value1= MCP3202.readADC(0) # range data 0 - vref (volt) voltage=round(float(value1*5000/4096),2) temperature = (voltage-550)/10 tampil= round(float(temperature),2) print "Weather ...
Python
0
@@ -83,18 +83,15 @@ %0D%0A%0D%0A -%0D%0A try:%0D%0A - +%09 whil @@ -101,16 +101,17 @@ :%0D%0A %09 +%09 os.syste @@ -116,18 +116,19 @@ tem( -' +%22 clear -' +%22 )%0D%0A +%09 %09val @@ -154,47 +154,19 @@ C(0) -%09# range data 0 - vref (volt) %0D%0A +%09 %09voltage =rou @@ -161,17 +161,19 @@ %09voltage...
73fe441f081a4d1b327cf411025e5f7b29ba13d7
improve model recognition
pak_profiles/common.py
pak_profiles/common.py
#! /usr/bin/env python3 #-*- coding: UTF-8 -*- ### Legal # # Author: Thomas DEBESSE <dev@illwieckz.net> # License: ISC # file_common_deps = { "file_base": "DEPS", "description": "Package DEPS file", "action": "copy", } file_common_external_editor = { "file_ext": [ "xcf", "psd", "ora", ], "description":...
Python
0.000057
@@ -1000,28 +1000,63 @@ %0A%09%09%22 -qc%22,%0A%09%09%22ase%22,%0A%09%09%22md3 +ase%22,%0A%09%09%22iqm%22,%0A%09%09%22md3%22,%0A%09%09%22md5anim%22,%0A%09%09%22md5mesh%22,%0A%09%09%22qc %22,%0A%09
efb0175b0a46ec91cac35437ae3b63f483a754c1
Fix filename
parser/omwg/fra2tab.py
parser/omwg/fra2tab.py
#!/usr/share/python # -*- encoding: utf-8 -*- # # Extract synset-word pairs from the WOLF (Wordnet Libre du Français) # Remap 'b' to 'r' # Some clean up (remove ' ()', '|fr.*') import sys, re import codecs, collections ### Change this! wndata = "../data/" wnname = "WOLF (Wordnet Libre du Français)" wnurl = "http://a...
Python
0.999905
@@ -212,16 +212,39 @@ lections +%0Afrom toolsomw import * %0A%0A### Ch @@ -632,16 +632,41 @@ v%22, 'w') +%0AwriteHeaderWord(wordcsv) %0A%0A#%0A# Da @@ -2587,16 +2587,26 @@ = open(' +csv_files/ rels-fra @@ -2617,12 +2617,70 @@ ', ' -a')%0A +w')%0AwriteHeaderRels(rels)%0AhyperRels(wn, hyper, 'fra', rels)%0A%0A# f...
8be9a250c190d9dd8615da4616cdfe401ad6e0af
Bump version number for 1.7 alpha 1.
django/__init__.py
django/__init__.py
VERSION = (1, 7, 0, 'alpha', 0) def get_version(*args, **kwargs): # Don't litter django/__init__.py with all the get_version stuff. # Only import if it's actually called. from django.utils.version import get_version return get_version(*args, **kwargs) def setup(): """ Configure the settings ...
Python
0
@@ -22,17 +22,17 @@ alpha', -0 +1 )%0A%0A%0Adef
4f533e22278833831948dbba9bc3259c58c90965
Fix ignored pair input to retrieve methods
btcebot/database.py
btcebot/database.py
# Copyright (c) 2013 Alan McIntyre import cPickle import datetime import decimal import os.path import sqlite3 import btceapi from btceapi.public import Trade # Add support for conversion to/from decimal def adapt_decimal(d): return int(d*decimal.Decimal("1e8")) def convert_decimal(s): return decimal.Decima...
Python
0.000001
@@ -4433,33 +4433,28 @@ ir_to_index%5B -'btc_usd' +pair %5D%0A sq @@ -5378,17 +5378,12 @@ dex%5B -'btc_usd' +pair %5D%0A
75528a6a2b39b5d6bea5ba1d5d2560f495a8da5c
remove outdated comments/docstrings
bipy/maths/stats/distance/permanova.py
bipy/maths/stats/distance/permanova.py
#! /usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2013, The bipy Developers. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------...
Python
0
@@ -3847,35 +3847,8 @@ %5D)%0A%0A - # Compute F value.%0A @@ -4148,251 +4148,8 @@ n):%0A - %22%22%22Performs the calculations for the F value.%0A%0A Arguments:%0A grouping_tri - a list associating the distances to their groups%0A unique_n - list containing how many sam...
87b65820d86f846731f429c3c23a3bde30cc3908
Update mqtt_client_v2.py
ArduCAM_Mini_OV2640_Capture_MQTT/mqtt_client_v2.py
ArduCAM_Mini_OV2640_Capture_MQTT/mqtt_client_v2.py
import paho.mqtt.publish as publish import paho.mqtt.subscribe as subscribe import paho.mqtt.client as mqtt import time import base64 meta = True file_close = False filename = "" local_feed_name = 'camPIC' local_feed_name_command = 'snapPIC' local_feed_name_log = 'camLOG' local_mqtt_server_name = 'asus-lap' usernam...
Python
0.000001
@@ -322,18 +322,8 @@ = ' -sundukevi4 '%0Apa @@ -348,40 +348,8 @@ = ' -933f50bb32a545e9bfa07d70a049902d '%0Are
e494e38b28fbafc70a1e5315a780d64e315113b4
Make the way chameleon settings are defined more generic; any Chameleon setting can now be in the chameleon config section.
more/chameleon/main.py
more/chameleon/main.py
import morepath import chameleon class ChameleonApp(morepath.App): pass @ChameleonApp.setting_section(section='chameleon') def get_setting_section(): return { 'auto_reload': False } @ChameleonApp.template_engine(extension='.pt') def get_chameleon_render(path, original_render, settings): co...
Python
0
@@ -163,25 +163,16 @@ return %7B -%0A 'auto_re @@ -183,21 +183,16 @@ ': False -%0A %7D%0A%0A%0A@Cha @@ -305,32 +305,16 @@ config = - %7B'auto_reload': setting @@ -329,20 +329,16 @@ eon. -auto_reload%7D +__dict__ %0A
507351612ed635c756e27b9528f2f21c605288ee
Fix missing space in decision validation error
moto/swf/exceptions.py
moto/swf/exceptions.py
from __future__ import unicode_literals from boto.exception import JSONResponseError class SWFClientError(JSONResponseError): def __init__(self, message, __type): super(SWFClientError, self).__init__( 400, "Bad Request", body={"message": message, "__type": __type} ) clas...
Python
0.000525
@@ -4175,32 +4175,33 @@ error detected: + %22%0A else:%0A @@ -4252,16 +4252,17 @@ etected: + %22%0A
d3bd003a044159b73d3567266a13c5584217adc3
add zorder keyword to nightshade
examples/daynight.py
examples/daynight.py
import numpy as np from mpl_toolkits.basemap import Basemap, netcdftime import matplotlib.pyplot as plt from datetime import datetime from numpy import ma # example showing how to compute the day/night terminator and shade nightime # areas on a map. def epem(date): """ input: date - datetime object (assumed U...
Python
0.000001
@@ -2569,19 +2569,31 @@ lpha=0.5 +,zorder=None ):%0A - @@ -2873,22 +2873,20 @@ -return +CS = map.con @@ -2933,16 +2933,285 @@ a=alpha) +%0A # set zorder on ContourSet collections show night shading%0A # is on top.%0A for c in CS.collections:%0A if zorder is None:...
b88abd98834529f1342d69e2e91b79efd68e5e8d
Add get parameter parsing for fakeshibboleth auto mode
backend/uclapi/dashboard/middleware/fake_shibboleth_middleware.py
backend/uclapi/dashboard/middleware/fake_shibboleth_middleware.py
from django.utils.deprecation import MiddlewareMixin class FakeShibbolethMiddleWare(MiddlewareMixin): def process_request(self, request): if request.POST.get("convert-post-headers") == "1": for key in request.POST: request.META[key] = request.POST[key]
Python
0
@@ -288,8 +288,289 @@ ST%5Bkey%5D%0A +%0A if request.GET.get(%22convert-get-headers%22) == %221%22:%0A for key in request.GET:%0A http_key = key.upper()%0A http_key.replace(%22-%22, %22_%22)%0A http_key = %22HTTP_%22 + http_key%0A request.ME...
7f7e3eb729be0c204b54c1fb11d92986abdf00e1
fix version for python 3
doc/guides/conf.py
doc/guides/conf.py
# BSD LICENSE # Copyright(c) 2010-2015 Intel Corporation. All rights reserved. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the ...
Python
0.000055
@@ -1760,16 +1760,32 @@ rsion'%5D) +.decode('utf-8') %0Arelease
59d06e022a45ec3060aca4b39987b3bd1986777f
fix councillors selector
ca_on_toronto/people.py
ca_on_toronto/people.py
from __future__ import unicode_literals from utils import CanadianScraper, CanadianPerson as Person import re COUNCIL_PAGE = 'http://www1.toronto.ca/wps/portal/contentonly?vgnextoid=c3a83293dc3ef310VgnVCM10000071d60f89RCRD' class TorontoPersonScraper(CanadianScraper): def scrape(self): page = self.lxml...
Python
0.000186
@@ -478,16 +478,19 @@ '//table +%5B1%5D //a%5Bcont
b43a7f5c6d1a48d66ef92d479e42fafadcb32d94
Remove linestring from multipath widget (ref #114)
caminae/core/widgets.py
caminae/core/widgets.py
from django.conf import settings from django.contrib.gis.geos import GEOSException, fromstr import floppyforms as forms class LeafletMapWidget(forms.gis.BaseGeometryWidget): map_srid = settings.MAP_SRID template_name = 'core/formfieldmap_fragment.html' display_wkt = settings.DEBUG def value_from_dat...
Python
0
@@ -1735,25 +1735,17 @@ ass -PointOrLineString +MultiPath Widg @@ -1766,146 +1766,246 @@ dget -, +): %0A - +is_multipath = True%0A +%0A - forms.gis.PointWidget,%0A forms.gis.LineStringWidget):%0A geom_type = 'GEOMETRY' +def get_context(self, *args, **k...
a2483ece93ae8e598cd6bf832967ad0952209e81
add --no-zero-ivar option
py/desispec/scripts/procexp.py
py/desispec/scripts/procexp.py
""" This script processes an exposure by applying fiberflat, sky subtraction, spectro-photometric calibration depending on input. """ from desispec.io import read_frame, write_frame from desispec.io import read_fiberflat from desispec.io import read_sky from desispec.io.fluxcalibration import read_flux_calibration fr...
Python
0.000386
@@ -1879,16 +1879,149 @@ he sky') +%0A parser.add_argument('--no-zero-ivar', action='store_true',%0A help = 'Do NOT set ivar=0 for masked pixels') %0A%0A ar @@ -3326,28 +3326,16 @@ (frame)%0A - %0A @@ -3474,16 +3474,53 @@ = False +, zero_ivar = (not args.no_zero_iva...
0c0c5a0503bd7e6a9ecee54475c349b0c0ba433c
impl is_destiny_landline
src/account_profile/core.py
src/account_profile/core.py
import enum class Profile( object ): def add_call( self, call ): """ Args: call ( account_profile.core.Call ): The call you desire add in profile """ pass def get_long_distance_landline_call_usage( self ): """ Returns: A value representi...
Python
0.999546
@@ -2381,20 +2381,75 @@ -pass +return self.call_destiny_type == Call.DestinyType.LANDLINE%0A %0A def
063d3b0b531dd6e59181094eccc3f88085fc988a
Add option to update newsletter subscription.
pybossa/newsletter/__init__.py
pybossa/newsletter/__init__.py
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2014 SF Isle of Man Limited # # PyBossa is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
Python
0
@@ -1381,24 +1381,40 @@ list_id=None +, old_email=None ):%0A %22 @@ -1428,16 +1428,24 @@ ribe +, update a user to a @@ -1440,18 +1440,18 @@ a user -t o +f a mailc @@ -1477,16 +1477,52 @@ try:%0A + update_existing = False%0A @@ -1600,44 +1600,255 @@ -self.client.lists.s...
c9818442c54a6865d2fd51c3820f97c78d199149
Fix bug in for_brownian_motion in GapCloseSolver
sktracker/tracker/solver/gap_close_solver.py
sktracker/tracker/solver/gap_close_solver.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function import numpy as np import logging log = logging.getLogger(__name__) from ..matrix import CostMatrix from ..cost_function import AbstractCostFu...
Python
0.000001
@@ -1702,17 +1702,16 @@ _params - = %7B'link @@ -1739,16 +1739,34 @@ rcentile +, 'coords': coords %7D%0A%0A @@ -1848,16 +1848,100 @@ ax_speed +,%0A 'coords': coords %7D)%0A
c7d07a6c1ef0854e81c6627f1bb2e3b550f51f1f
Check that pickling does not work.
pycurl/tests/test_internals.py
pycurl/tests/test_internals.py
# $Id$ # vi:ts=4:et import pycurl, sys try: from gc import get_objects import gc del get_objects gc.enable() except ImportError: gc = None print "Testing", pycurl.version print pycurl.__file__, pycurl.__COMPILE_DATE__ ##### ##### self-test assertion section ##### # remove an invalid handle: th...
Python
0
@@ -18,31 +18,39 @@ et%0A%0A -import pycurl, sys%0Atry: +try:%0A # Python 2.2 or better %0A @@ -162,16 +162,66 @@ = None%0A%0A +import pycurl, sys%0Afrom StringIO import StringIO%0A%0A print %22T @@ -292,16 +292,141 @@ DATE__%0A%0A +try:%0A import cPickle%0Aexcept ImportError:%0A cPickle = None%0Atry:%...
595fd1627095d1945f3826c1f7b6223458f14c21
Add additional tests to TestCharacter
pydiff/tests/test_character.py
pydiff/tests/test_character.py
import pydiff import utils class TestCharacter(utils.TestBase): def setUp(self): super(TestCharacter, self).setUp(pydiff.CharacterDiff) def test_diff_characters(self): self.check_xml('New Value.', 'New ValueMoreData.', 'New Value<ins>MoreData</ins>.') self.ch...
Python
0
@@ -174,24 +174,32 @@ aracters +_general (self):%0A @@ -182,32 +182,32 @@ _general(self):%0A - self.che @@ -677,32 +677,52 @@ - # Some +def test_diff_characters_ corner - +_ cases -%0A +(self): %0A @@ -943,24 +943,24 @@ ue%3C/ins%3E')%0A%0A - self @@ -1008,16 +1008,600 @...
9dfbe15a11ec6a99b93a004c7f0b91b2aa6387dc
fix bug in JSON properties bug would lead to undesired unique_index constraints on JSON properties
neomodel/properties.py
neomodel/properties.py
from .exception import InflateError, DeflateError, RequiredProperty, NoSuchProperty from datetime import datetime, date from .relationship_manager import RelationshipDefinition, RelationshipManager import os import types import pytz import json import sys import functools import logging logger = logging.getLogger(__nam...
Python
0
@@ -7062,38 +7062,32 @@ self).__init__( -self, *args, **kwargs)
ceae688f8428f109e8bc0ce3a9dde332caa4ef01
Improve __unicode__ string
src/apps/dive_log/models.py
src/apps/dive_log/models.py
# coding=utf-8 from django.db import models from django.utils.translation import ugettext as _ from discipline.models import Discipline class Session(models.Model): #pool = models.ForeignKey(Pool) date = models.DateField(verbose_name=_(u'Datum')) time = models.TimeField(verbose_name=_(u'Tid')) comment...
Python
0.999997
@@ -2379,28 +2379,37 @@ %7B%7D m - - %7B%7D C - %7B%7D slag/minut' +'.format(self.second, self.depth)
5257616478568cfcd706f9c31eb698455a3ce6f1
Update CV in TS family data
pymodels/TS_V04_01/families.py
pymodels/TS_V04_01/families.py
"""Element family definitions""" import pyaccel as _pyaccel _family_segmentation = { 'B': 20, 'CH': 1, 'CV': 1, 'QF1A': 1, 'QF1B': 1, 'QD2': 1, 'QF2': 1, 'QF3': 1, 'QD4A': 1, 'QF4': 1, 'QD4B': 1, 'InjSeptF': 6, 'InjSeptG': 6, 'EjeSeptF': 6, 'EjeSeptG': 6, 'ICT': 1, 'FCT': 1, 'Scrn': 1, 'BPM': 1 ...
Python
0
@@ -2922,16 +2922,238 @@ x%5B0%5D)%0A%0A + # cv - slow horizontal correctors (inside quadrupoles)%0A idx = %5B%5D%0A fams = %5B'QF1A', 'QD2', 'QD4A', 'QD4B', 'CV'%5D%0A for fam in fams:%0A idx.extend(data%5Bfam%5D)%0A data%5B'CV'%5D = sorted(idx, key=lambda x: x%5B0%5D)%0A%0A # no
5c7f0b8515ca59bc464f81f36dc0f4419530c7b1
add import_validate api url
molo/core/content_import/urls.py
molo/core/content_import/urls.py
from django.conf.urls import patterns, include, url urlpatterns = patterns( '', url(r'^api-auth/', include( 'rest_framework.urls', namespace='rest_framework')), url( r'^repos/$', 'molo.core.content_import.views.get_repos', name='get_repos' ), url( r'^repos/(...
Python
0.000001
@@ -728,10 +728,161 @@ %0A ),%0A + url(%0A r'%5Erepos/(?P%3Cname%3E%5B%5Cw-%5D+)/validate/',%0A 'molo.core.content_import.views.import_validate',%0A name='import_validate'%0A ),%0A )%0A
74650b7cad318403e0d6c75ec693962c1124fe16
Allow user to set speeds
morse_trainer/test_send_morse.py
morse_trainer/test_send_morse.py
#!/bin/env python3 # -*- coding: utf-8 -*- """ Test the 'send_morse' module. """ import sys import os import getopt from send_morse import SendMorse # get program name from sys.argv prog_name = sys.argv[0] if prog_name.endswith('.py'): prog_name = prog_name[:-3] def usage(msg=None): if msg: print((...
Python
0.000001
@@ -454,16 +454,25 @@ %25s %5B-h%5D + %5B-s c,w%5D %5Cn%5Cn%22%0A @@ -490,16 +490,20 @@ ere -h + means pr @@ -503,17 +503,16 @@ eans pri -o nt this @@ -524,16 +524,75 @@ and stop +%5Cn%22%0A %22 -s c,w means set char and word speeds %22 %25 prog @@ -690,16 +690,18 @@ argv, 'h +s: ', %...
2378a8f1c4235ce333232d9f357be462a9ce47c4
use MPFile.from_dict at end of MPFile.from_string
mpcontribs/io/archieml/mpfile.py
mpcontribs/io/archieml/mpfile.py
from __future__ import unicode_literals, print_function import six, archieml, warnings, pandas from mpcontribs.config import mp_level01_titles from ..core.mpfile import MPFileCore from ..core.recdict import RecursiveDict from ..core.utils import nest_dict, normalize_root_level from ..core.utils import read_csv, pandas_...
Python
0.000001
@@ -545,34 +545,18 @@ -mpfile = MPFile.from_ +rec dict -( + = Recu @@ -586,17 +586,16 @@ s(data)) -) %0A @@ -670,30 +670,22 @@ key in -mpfile.documen +recdic t.keys() @@ -947,30 +947,22 @@ not in -mpfile.documen +recdic t:%0A @@ -976,30 +976,22 @@ -mpfile.documen +recdic t.inse...
662a2f4e26a0ea3eff78415145078072136f83e4
add webapp flag to render_dataframe
mpcontribs/io/core/components.py
mpcontribs/io/core/components.py
import uuid, json from pandas import DataFrame from mpcontribs.config import mp_level01_titles from recdict import RecursiveDict from utils import disable_ipython_scrollbar from IPython.display import display_html, display, HTML from IPython import get_ipython from plotly.offline.offline import _plot_html class Tree(R...
Python
0.000002
@@ -1593,27 +1593,41 @@ dataframe(df +, webapp=False ):%0A - %22%22%22use B @@ -1826,17 +1826,16 @@ html = - %22%3Cdiv i @@ -1882,24 +1882,113 @@ t(uuid_str)%0A + html += %22%3Cscript%3E%22%0A if webapp:%0A html += %22requirejs(%5B'main'%5D, function() %7B%22%0A html += @@ -1995,21 +199...
89fb6886752170520a8dad800bdab37cf77daf6c
Test the handling of non-JSON payloads
ni/test/test_github.py
ni/test/test_github.py
import asyncio import unittest from aiohttp import hdrs, web from .. import github # Inheriting from web.Request is bad as the docs explicitly say not to create # instances manually. # http://aiohttp.readthedocs.org/en/stable/web_reference.html#aiohttp.web.Request class FakeRequest: def __init__(self, payload,...
Python
0.000073
@@ -312,16 +312,19 @@ payload +=%7B%7D , conten @@ -351,16 +351,16 @@ json'):%0A - @@ -692,24 +692,24 @@ def run_ -coroutin +awaitabl e(self, @@ -851,46 +851,8 @@ e)%0A%0A - @unittest.skip('not implemented')%0A @@ -930,27 +930,335 @@ n'.%0A -... +# https://developer.github.com/webhoo...
cd8d7a9fb46418633f32808d808eac0fc0cbb79c
Implement fair selection of units since the order is randomized.
pysc2/agents/scripted_agent.py
pysc2/agents/scripted_agent.py
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
Python
0.000001
@@ -3243,26 +3243,31 @@ lf._ -current_marine = 0 +marine_selected = False %0A @@ -3572,37 +3572,112 @@ t = -marines%5Bself._current_ +next((m for m in marines%0A if m.is_selected == self._marine_selected), marine -%5D +s%5B0%5D) %0A @@ -3815,16 +3815,51 @@ lected.%0A + self._ma...
b01e552f5cff6f588d35711f727cec0de1cdf20e
Fix a lint error
pytablereader/factory/_text.py
pytablereader/factory/_text.py
""" .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from .._logger import logger from ..csv.core import CsvTableTextLoader from ..html.core import HtmlTableTextLoader from ..json.core import JsonTableTextLoader from ..jsonlines.core import JsonLinesTableTextLoader from ..ltsv.core import LtsvTableT...
Python
0.001125
@@ -3250,17 +3250,16 @@ xtLoader -, %7D%0A
4752f704596613bbb80a649b275c79ce156b32ec
Fix library not found on linux
python/libgdf_cffi/__init__.py
python/libgdf_cffi/__init__.py
from __future__ import absolute_import import os, sys from .wrapper import _libgdf_wrapper from .wrapper import GDFError # re-exported try: from .libgdf_cffi import ffi except ImportError: pass else: def _get_lib_name(): if os.name == 'posix': # TODO this will need to be cha...
Python
0.000001
@@ -42,17 +42,23 @@ mport os -, +%0Aimport sys%0A%0Afr @@ -408,34 +408,32 @@ -return './ +path = ' libgdf.dylib @@ -472,18 +472,16 @@ -return './ +path = ' libg @@ -487,16 +487,34 @@ gdf.so'%0A + else:%0A @@ -577,16 +577,224 @@ s.name)) +%0A # Prefer local version ...
e66fc25d05105f25ba477d6ae761f7ff9f96242e
fix spell and copyright year
qiskit/aqua/utils/subsystem.py
qiskit/aqua/utils/subsystem.py
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2018, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
Python
0.000004
@@ -83,10 +83,10 @@ , 20 -19 +20 .%0A#%0A
a26d7612106e748c0fb4fb9d4dfa570bc679b2f0
fix race conditions in additional-trust-anchors
test/sanity/additional_trust_anchors/test.py
test/sanity/additional_trust_anchors/test.py
import time import os import subprocess import platform from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common import utils chrome_options = Options() chrome_options.add_argument("nwapp=" + os.path.dirname(os.path.abspath(__file__))) chrome_options.add_expe...
Python
0
@@ -48,16 +48,126 @@ platform +%0Aimport sys%0Asys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))%0Afrom nw_util import * %0A%0Afrom s @@ -1717,32 +1717,149 @@ ver.current_url%0A + timeout = 10%0A ret = ''%0A elem_id = 'result'%0A while timeout %3E 0:%0A ...
70ae46aab717a7695239bc36ca2aa2db764e6d3e
Fix small mistake in CV example comment
examples/undocumented/python_modular/evaluation_cross_validation_classification.py
examples/undocumented/python_modular/evaluation_cross_validation_classification.py
#!/usr/bin/env python # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # Written (W) 2012 Heiko Strathmann # Copyrigh...
Python
0.000678
@@ -1452,26 +1452,16 @@ %0A # %22 -Stratified CrossVal
6c124f057e992a65079a1ab9ac61e35b5368ee97
install qemu-img and add client deploy logic
imagestorebackupstorage/ansible/imagestorebackupstorage.py
imagestorebackupstorage/ansible/imagestorebackupstorage.py
#!/usr/bin/env python # encoding: utf-8 import argparse from zstacklib import * from datetime import datetime start_time = datetime.now() # set default value file_root = "files/imagestorebackupstorage" pip_url = "https=//pypi.python.org/simple/" proxy = "" sproxy = "" chroot_env = 'false' zstack_repo = 'false' current...
Python
0
@@ -428,16 +428,28 @@ ge = %22%22%0A +client = %22%22%0A remote_u @@ -1584,16 +1584,97 @@ = True%0A%0A +command = %22yum install -y qemu-img%22%0Arun_remote_command(command, host_post_info)%0A%0A command @@ -2668,16 +2668,41 @@ server%0A +if client != %22true%22:%0A command @@ -2777,16 +2777,20 @@ estart%...
207e7c133ca9d9304980047add7f8e862f2cd562
Improve test for Pandas < 0.14
statsmodels/tsa/base/tests/test_base.py
statsmodels/tsa/base/tests/test_base.py
import numpy as np import numpy.testing as npt import pandas as pd from statsmodels.tsa.base.datetools import _freq_to_pandas from statsmodels.tsa.base.tsa_model import TimeSeriesModel from statsmodels.tools.testing import assert_equal def test_pandas_nodates_index(): data = [988, 819, 964] dates = ['a', 'b'...
Python
0
@@ -228,16 +228,31 @@ rt_equal +, assert_raises %0A%0A%0Adef t @@ -801,138 +801,60 @@ -_freq_to_pandas%5B'N'%5D%0A from pandas import version%0A if version.version %3C '0.14':%0A raise NotImplementedError +# Check for Numpy %3C 1.7%0A _freq_to_pandas%5B'N'%5D %0A @@ -1030,16 ...
e76c72b2c74526ef050e6d2bee165dd163e4319f
add default name
stock_level_from_excel/product_excel.py
stock_level_from_excel/product_excel.py
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################### # # ODOO (ex OpenERP) # Open Source Management Solution # Copyright (C) 2001-2015 Micronaet S.r.l. (<https://micronaet.com>) # Developer: Nicola Riolini @thebrush (<https://it.linkedin.com/in/thebru...
Python
0.000004
@@ -2210,28 +2210,22 @@ Update -commercializ +market ed produ @@ -2828,16 +2828,48 @@ _excel = + os.path.expanduser(%0A company @@ -2887,32 +2887,59 @@ l_external_excel + or '~/VTA PCA 2011A.xlsx') %0A stock_l @@ -3496,20 +3496,14 @@ uct -commercializ +market ed:%0A
05570d1ac584b0f75b8d6e8de4d108ee3be6c349
form.is_valid() is False
myhpom/tests/test_signup_view.py
myhpom/tests/test_signup_view.py
from django.core.urlresolvers import reverse from django.test import Client, TestCase from myhpom.models import User, UserDetails, State class SignupTestCase(TestCase): """ * GET retries page * POST invalid data returns to the page * POST valid data in non-supported state for non-existing user redirec...
Python
0.999999
@@ -1164,16 +1164,42 @@ nup page + and result in form errors %22%22%22%0A @@ -1418,32 +1418,94 @@ ts/signup.html') +%0A self.assertFalse(response.context%5B'form'%5D.is_valid()) %0A%0A def test_p
6589155791ba297e967432f619ce080480f288b7
fix property names
activedata_etl/imports/parse_lcov.py
activedata_etl/imports/parse_lcov.py
# encoding: utf-8 # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Author: Tyler Blair (tblair@cs.dal.ca) # """ Parses an lcov-generated coverage file and converts...
Python
0.000017
@@ -661,17 +661,17 @@ F:', 'FN -N +H :', 'LF: @@ -672,16 +672,23 @@ , 'LF:', + 'LH:', 'LN:', @@ -858,16 +858,64 @@ a stream +%0A%0A :param source_key:%0A :param source_name: %0A :pa
414a991d850ee21f682015c3c277170842f44404
fix translation string
corehq/apps/api/util.py
corehq/apps/api/util.py
from django.core.exceptions import ObjectDoesNotExist from django.utils.translation import ugettext as _ from couchdbkit.exceptions import ResourceNotFound def get_object_or_not_exist(cls, doc_id, domain): """ Given a Document class, id, and domain, get that object or raise an ObjectDoesNotExist exception ...
Python
0.999998
@@ -905,16 +905,26 @@ t find %25 +(doc_type) s with i @@ -930,15 +930,65 @@ id %25 +(id) s%22) %25 -( +%5C%0A %7B%22doc_type%22: doc_ @@ -996,14 +996,20 @@ ype, + %22id%22: doc_id -) +%7D )%0A
dd8efa077bfc05dabe04319776787a0f5330bd52
Fix SAPs having multiple ports
test/testframework/generator/sg_generator.py
test/testframework/generator/sg_generator.py
#!/usr/bin/python -u # # Copyright (c) 2016 Balazs Nemeth # # This file is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This file i...
Python
0.000007
@@ -2323,16 +2323,100 @@ de%5Bsap%5D%0A + if len(sapo.ports) %3E 0:%0A for sapp in sapo.ports:%0A break%0A else:%0A sapp
e6e144c38edb9121f7f03b5b8ed164692e4b36b9
Remove failing test assertion.
tests/events/test_inviting.py
tests/events/test_inviting.py
from tests.util.base import event def test_invite_generation(event, default_account): from inbox.events.ical import generate_icalendar_invite event.sequence_number = 1 event.participants = [{'email': 'helena@nylas.com'}, {'email': 'myles@nylas.com'}] cal = generate_icalendar...
Python
0
@@ -2084,252 +2084,8 @@ = 1%0A -%0A if (format_type, subtype) == ('text', 'html'):%0A assert 'A long walk on the beach' in mimepart.body%0A%0A if (format_type, subtype) == ('text', 'plain'):%0A assert '**A long walk on the beach**' in mimepart.body%0A%0A
91bea0273b3502a439498156578b038c98830be1
remove redundant check
casepro/statistics/migrations/0010_existing_case_timings_count.py
casepro/statistics/migrations/0010_existing_case_timings_count.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from math import ceil from django.db import migrations, models def calculate_totals_for_cases(apps, schema_editor): from casepro.statistics.models import datetime_to_date Case = apps.get_model('cases', 'Case') CaseAction = apps.get_model('ca...
Python
0.000006
@@ -3061,99 +3061,8 @@ g)%0A%0A - # don't count self-assigned cases%0A if case.assignee == partner:%0A @@ -3104,36 +3104,32 @@ by this partner%0A - auth @@ -3203,20 +3203,16 @@ first()%0A - @@ -3327,20 +3327,16 @@ - if autho @@ -3418,20 +3...
30198bad431b5dbaa9a5355d64aca1ff92beb54d
Update 01_Blinking_and_Fading_a_LED.py
01_Blinking_and_Fading_a_LED/01_Blinking_and_Fading_a_LED.py
01_Blinking_and_Fading_a_LED/01_Blinking_and_Fading_a_LED.py
import wiringpi # import library WiringPi-Python from time import sleep # import library sleep wiringpi.wiringPiSetup() # Must be called before using IO function wiringpi.pinMode(1,1) # Set pin 9 to 1 (OUTPUT) / 0 (INPUT) wiringpi.softPwmCreate(1,0,100) # Set PWM on pin ...
Python
0
@@ -1,9 +1,8 @@ -%0A import w
6b6307d8264a9ec6c45b83eb0382066fcb53b4b5
Fix flake8 error
tests/integration/models/test_preferences.py
tests/integration/models/test_preferences.py
import mock from praw.models import Preferences from .. import IntegrationTest class TestPreferences(IntegrationTest): def test_creation(self): prefs_obj = self.reddit.user.preferences assert isinstance(prefs_obj, Preferences) def test_view(self): some_known_keys = ('allow_clicktrack...
Python
0.000001
@@ -3400,18 +3400,18 @@ %5Bparam%5D -== +is True%0A @@ -3511,18 +3511,18 @@ %5Bparam%5D -== +is False%0A
0974f16fdd434fe47bc37aacea5d2aa166425161
Fix deprecation warning
tests/integration/store/test_pickle_store.py
tests/integration/store/test_pickle_store.py
import bson from datetime import datetime as dt, timedelta from mock import patch import numpy as np import re from arctic.arctic import Arctic def test_save_read_bson(library): blob = {'foo': dt(2015, 1, 1), 'bar': ['a', 'b', ['x', 'y', 'z']]} library.write('BLOB', blob) saved_blob = library.read('BLOB'...
Python
0.000099
@@ -884,16 +884,20 @@ om.rand( +int( 2.1 * 10 @@ -906,16 +906,17 @@ * 1024) +) .tostrin
76ef4b051dec7564150939a279f903a404191b1d
Fix reading calc report [skip CI]
svir/dialogs/show_full_report_dialog.py
svir/dialogs/show_full_report_dialog.py
# -*- coding: utf-8 -*- # /*************************************************************************** # Irmt # A QGIS plugin # OpenQuake Integrated Risk Modelling Toolkit # ------------------- # begin : 2013-10-24 # copyright ...
Python
0
@@ -1573,17 +1573,16 @@ path, 'r -b ') as rs
2a82d102d7bc7377a8766485e7f484392ac0d5a8
Disable debug logging
tests/plugins/test_manager.py
tests/plugins/test_manager.py
# Copyright (c) 2015 Nicolas JOUANIN # # See the file license.txt for copying permission. import unittest import logging import asyncio from hbmqtt.plugins.manager import PluginManager formatter = "[%(asctime)s] {%(filename)s:%(lineno)d} %(levelname)s - %(message)s" logging.basicConfig(level=logging.DEBUG, format=form...
Python
0.000001
@@ -179,16 +179,17 @@ anager%0A%0A +# formatte @@ -262,16 +262,17 @@ sage)s%22%0A +# logging.
b1dcf10e4c8cbc3f380cb812bfe65dea2a1753f3
Fix test
tests/sources/chicago_test.py
tests/sources/chicago_test.py
import pytest import unittest.mock as mock from tests.helpers import MockOpen import os.path import numpy as np import open_cp.sources.chicago as chicago def test_set_data_dir(): chicago.set_data_directory("..") assert chicago.get_default_filename() == os.path.join("..", "chicago.csv") @pytest.fixture def st...
Python
0.000004
@@ -1162,25 +1162,29 @@ , 456%5D) -/ 3.28084 +* 1200 / 3937 )%0A @@ -1260,17 +1260,21 @@ 2%5D) -/ 3.28084 +* 1200 / 3937 )%0A%0A
c067b2f82c8a1cfcd04d7f234cca2d05fba2a22c
reformat cli command to use subparsers
statsquid/statsquid.py
statsquid/statsquid.py
import os,sys,logging from argparse import ArgumentParser from . import __version__ from top import StatSquidTop from listener import StatListener from collector import StatCollector log = logging.getLogger('statsquid') def main(): commands = [ 'agent', 'master', 'top' ] envvars = { 'STATSQUID_COMMAND' : 'com...
Python
0
@@ -235,112 +235,19 @@ -commands = %5B 'agent', 'master', 'top' %5D%0A envvars = %7B 'STATSQUID_COMMAND' : 'command',%0A +envvars = %7B 'ST @@ -396,24 +396,31 @@ ost' %7D%0A%0A +common_ parser = Arg @@ -435,54 +435,35 @@ ser( -description='statsquid %25s' %25 __version__)%0A +add_he...
60a73b46c537fc27f6ea92a91dec851361da12a2
Move plugins to Custom
stginga/plugin_info.py
stginga/plugin_info.py
"""This module contains functions to handle ``stginga`` plugins. See :ref:`stginga-run`. """ from __future__ import absolute_import, division, print_function # GINGA from ginga.misc.Bunch import Bunch __all__ = ['load_plugins', 'show_plugin_install_info'] def load_plugins(ginga): """Load the ``stginga`` plugin...
Python
0
@@ -1395,39 +1395,38 @@ category=' -stginga +Custom ', ptype='local' @@ -1510,39 +1510,38 @@ category=' -stginga +Custom ', ptype='local' @@ -1624,39 +1624,38 @@ category=' -stginga +Custom ', ptype='local' @@ -1744,23 +1744,22 @@ tegory=' -stginga +Custom ', ptype
e5e890f3117c792544d6a87d887543d502d1cb55
Fix nova.tests.test_nova_rootwrap on Fedora 17.
nova/tests/test_nova_rootwrap.py
nova/tests/test_nova_rootwrap.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
Python
0.000023
@@ -2887,32 +2887,50 @@ %5B%22/bin/sleep%22 +, %22/usr/bin/sleep%22 %5D)%0A userc @@ -3289,32 +3289,50 @@ %5B%22/bin/sleep%22 +, %22/usr/bin/sleep%22 %5D)%0A userc
2b99ef66938ed71853c8746ca301704e2be5d0e4
fix condition when normalize_memory tries to use integer as a string
lib/tools/__init__.py
lib/tools/__init__.py
from lib.constants import VM_MIN_MEM, VM_MAX_MEM from lib.exceptions import VmCLIException def normalize_memory(value): """Function converts passed value to integer, which will represent size in megabytes as well as performs control whether the value sits between global limits.""" if value.endswith('T'):...
Python
0.000006
@@ -286,16 +286,51 @@ ts.%22%22%22%0A%0A + if isinstance(value, str):%0A if v @@ -345,24 +345,28 @@ swith('T'):%0A + valu @@ -401,32 +401,36 @@ 1024 * 1024%0A + + elif value.endsw @@ -435,24 +435,28 @@ swith('G'):%0A + valu @@ -488,24 +488,28 @@ * 1024%0A + + ...
b61dfffa600c05eed34c5bcc30a2da61f0f6bd73
Update __version__.py
payplug/__version__.py
payplug/__version__.py
# -*- coding: utf-8 -*- __version__ = '1.3.0'
Python
0.000044
@@ -40,7 +40,7 @@ 1.3. -0 +1 '%0A
faebb3b9fabf139f4306e6106837211db46f08d3
Add update_transfer_recipient method to invoice class
paystackapi/invoice.py
paystackapi/invoice.py
"""Script used to define the paystack Page class.""" from paystackapi.base import PayStackBase class Invoice(PayStackBase): """docstring for Invoice.""" @classmethod def create(cls, **kwargs): """ Method defined to create a new invoice. Args: customer: customer id or...
Python
0
@@ -3443,24 +3443,508 @@ archive/%7Bid_or_code%7D')%0A%0A + @classmethod%0A def update_transfer_recipient(cls, recipient_code_or_id, **kwargs):%0A %22%22%22%0A Method defined to archive a draft.%0A%0A Args:%0A recipient_code_or_id: recipient code or ID%0A name: a name f...
4f0a98db06ea0fc65a15a4025104482ecfc9f8cc
Fix #275 (restrict migration names to only valid module names)
south/management/commands/schemamigration.py
south/management/commands/schemamigration.py
""" Startmigration command, version 2. """ import sys import os import re import string import random import inspect import parser from optparse import make_option try: set except NameError: from sets import Set as set from django.core.management.base import BaseCommand from django.core.management.color impo...
Python
0
@@ -2645,16 +2645,145 @@ e = %22-%22%0A +%09%0A%09if re.search('%5B%5E_%5Cw%5D', name):%0A%09 self.error(%22Migration names should contain only alphanumeric characters and underscores.%22)%0A
2050e845eee27b19534cc49376a1d38907d58f90
version 1.1.3
ojoalplato/__init__.py
ojoalplato/__init__.py
# -*- coding: utf-8 -*- __version__ = '0.1.0' __version_info__ = tuple([int(num) if num.isdigit() else num for num in __version__.replace('-', '.', 1).split('.')])
Python
0.000002
@@ -36,13 +36,13 @@ = ' -0.1.0 +1.1.3 '%0A__
91caa5b4303bfa0b4604ecf95d56ae72a7074b0b
Fix off by one error in SRV result shuffling
synapse/http/federation/srv_resolver.py
synapse/http/federation/srv_resolver.py
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # Copyright 2019 New Vector Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
Python
0
@@ -1924,16 +1924,24 @@ orithms +roughly follows @@ -1974,16 +1974,65 @@ RFC2782 +,%0A # changed to remove an off-by-one error .%0A @@ -2092,19 +2092,20 @@ hat -you +they should pick @@ -2104,247 +2104,248 @@ uld +be pick - that server%0A # last *or* that its the only server in thi...
88ea067f541581800205029aa60af3ad97ad4e18
Fix schedule error message
src/nodeconductor_openstack/tasks/dr_backup.py
src/nodeconductor_openstack/tasks/dr_backup.py
from nodeconductor.core import tasks as core_tasks from . import models class SetDRBackupErredTask(core_tasks.ErrorStateTransitionTask): """ Mark DR backup and all related resources that are not in state OK as Erred """ def execute(self, dr_backup): super(SetDRBackupErredTask, self).execute(dr_backu...
Python
0.000003
@@ -1315,16 +1315,23 @@ _backup. +source_ instance
e8df7672a89979ec02e69ee00d0966b9ae4fdcfe
add only_once decorator
oozappa/fabrictools.py
oozappa/fabrictools.py
# -*- coding:utf8 -*- import os from fabric.main import load_fabfile from fabric.contrib.files import upload_template as fabric_upload_template import logging logger = logging.getLogger('oozappa') class FabricTask(object): def __init__(self, task_dict): self._task_dict = task_dict def name(self): ...
Python
0.000003
@@ -25,16 +25,43 @@ port os%0A +from fabric.api import env%0A from fab @@ -3168,11 +3168,409 @@ =mode)%0A%0A +def only_once(f):%0A '''Task decorator. Run task only once while executing multiple task'''%0A def _f(*args, **kwargs):%0A flag_format = 'only_once_function_%7B0%7D'%0A try:%0A if not env.get(fl...
0d66e594eeb09c1415964a00a4cfa2280464f840
add allow empty and not in for states
synergine/core/simulation/MetaStates.py
synergine/core/simulation/MetaStates.py
from synergine.synergy.Simulation import Simulation class MetaStates(): def __init__(self, list): self._list = list # TODO: have_list etc def have_list(self, object_id, states): for state in states: if not self._list.have(Simulation.STATE, object_id, state, allow_empty=True): ...
Python
0.000001
@@ -1428,32 +1428,71 @@ object_id, state +, allow_empty=False, allow_not_in=False ):%0A self. @@ -1530,32 +1530,84 @@ object_id, state +, allow_empty=allow_empty, allow_not_in=allow_not_in )%0A%0A def remov @@ -1628,32 +1628,71 @@ bject_id, states +, allow_empty=False, allow_not_in=False ):%0A fo...
a42c60da88a3ca851952584e706876000e84843b
load filename mappings
openelex/base/fetch.py
openelex/base/fetch.py
from os.path import dirname, exists, join import inspect import os from urllib import urlretrieve import urlparse import requests import json import csv class BaseFetcher(object): """ Base class for downloading result files. Intended to be subclassed in state-specific fetch.py modules. Caches resource...
Python
0.000001
@@ -846,16 +846,267 @@ pass +%0A # check for the ocd mappings csv and the mappings.json files - if they don't exist, create them.%0A open(join(self.mappings_dir, self.state+'.csv'), 'a').close()%0A open(join(self.mappings_dir, 'mappings.json'), 'a').close() %0A%0A de @@ -3403,24 +3...
0a9f4188237523d3ac93fc4e9fd6b907fcc27ace
remove errant TODO comment
library/cfssl_sign.py
library/cfssl_sign.py
#!/usr/bin/python import base64 import binascii import hashlib import hmac import json import requests import urlparse from ansible.module_utils.basic import AnsibleModule # TODO DOCUMENTATION = ''' --- module: cfssl_sign short_description: Signs a CSR using the cfssl API. description: - The M(cfssl_sign) modul...
Python
0
@@ -173,15 +173,8 @@ e%0A%0A%0A -# TODO%0A DOCU
88e839144f4a1dac1468e03f5cd506841caadc84
Fix typo in 'job not found message' and jobs list output code
django_schedulermanager/management/commands/schedulejob.py
django_schedulermanager/management/commands/schedulejob.py
from django.core.management.base import BaseCommand from django_schedulermanager.manager import manager class Command(BaseCommand): help = 'Schedules a job' def add_arguments(self, parser): # Positional arguments parser.add_argument('jobs_name', nargs='+') def handle(self, *args, **opti...
Python
0.998687
@@ -522,16 +522,17 @@ %7B%7D. Ava +i lable jo @@ -564,27 +564,8 @@ oin( -%5Bjob for job, _ in mana @@ -577,16 +577,14 @@ obs. -item +key s() -%5D ))%0A
bd166b623a3a92c1ae21bc3e8a091b68dcba089a
Test cosmetics.
tetrahydra/tests/test_core.py
tetrahydra/tests/test_core.py
"""Test core functions.""" import pytest import numpy as np from tetrahydra.core import closure, perturb, power def test_closure(): """Test closure operator.""" data = np.random.random([2, 3]) assert np.sum(closure(data), axis=1) == pytest.approx(np.ones(2)) def test_perturb(): """Test perturbation...
Python
0
@@ -153,32 +153,44 @@ re operator.%22%22%22%0A + # Given%0A data = np.ra @@ -213,22 +213,61 @@ 3%5D)%0A -assert +expected = np.ones(2)%0A # When%0A output = np.sum( @@ -288,16 +288,45 @@ axis=1) +%0A # Then%0A assert output == pyte @@ -335,26 +335,24 @@ .approx( -np.ones(2) +expected )...
fee4b8137961ed828ebcabae3a2e7270601a1ce1
Fix version number
lightning/__init__.py
lightning/__init__.py
from .main import Lightning from .session import Session from .visualization import Visualization from .types.plots import * from .types.images import * from .types.streaming import * from .types.three import * __version__ = "1.0.6"
Python
0.000041
@@ -228,7 +228,7 @@ 1.0. -6 +8 %22%0A
2b04602c070ffab249609c8b1367c71c0f17d15a
Remove not null constraint on ProcessedDataVersion.zip_size
calaccess_processed/models/tracking.py
calaccess_processed/models/tracking.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Models for tracking processing of CAL-ACCESS snapshots over time. """ from __future__ import unicode_literals from django.db import models from hurry.filesize import size as sizeformat from django.utils.encoding import python_2_unicode_compatible from calaccess_raw impo...
Python
0.000001
@@ -1478,36 +1478,35 @@ d(%0A null= -Fals +Tru e,%0A verbo
02535df1ce4ae43ba142a169810910d375605792
Fix the space correcting code because restructured text still adds a bunch of paragraph tags
StackSmash/apps/lib/templatetags/restructuredtext_filter.py
StackSmash/apps/lib/templatetags/restructuredtext_filter.py
from django import template from django.core.cache import cache from docutils import nodes from docutils.core import publish_parts from docutils.parsers.rst import directives, Directive from docutils.core import publish_cmdline, default_description from pygments import highlight from pygments.lexers import get_lexer_by...
Python
0.047932
@@ -2556,16 +2556,489 @@ p%3E%3Cp%3E')%0A +%09%09parts%5B'fragment'%5D = parts%5B'fragment'%5D.replace('%3C/p%3E%5Cn%3Cbr /%3E%3Cp%3E', '%3C/p%3E%3Cp%3E')%0A%09%09parts%5B'fragment'%5D = parts%5B'fragment'%5D.replace('%3C/p%3E%3Cbr /%3E%5Cn%3Cp%3E', '%3C/p%3E%3Cp%3E')%0A%09%09parts%5B'fragment'%5D = parts%5B'fragment'...
53fd0748356ce3fb91a513c2b41ecc61867a9723
add DeclaredNamespacedNamedTuple utility.
src/pyramid_torque_engine/util.py
src/pyramid_torque_engine/util.py
# -*- coding: utf-8 -*- """Utility functions.""" import logging logger = logging.getLogger(__name__) import collections import inspect import urllib import zope.interface def as_namespaced_named_tuple(name, data): """Takes a name and either a dict or list of strings, uses the name to namespace the values ...
Python
0
@@ -168,16 +168,1597 @@ erface%0A%0A +class DeclaredNamespacedNamedTuple(object):%0A %22%22%22Instantiate one of these with a namespace. Call %60%60register%60%60 to add%0A values and then access as normal attributes. I.e.:%0A%0A %3E%3E%3E ACTIONS = DeclaredNamespacedNamedTuple(u'Action')%0A ...
b8597aa3d53a0d68b8ac1e61bce97804fa02ba3a
Add versioning support to ryu controller
loader/controllers.py
loader/controllers.py
# coding=utf-8 """ Copyright (c) 2015, NetIDE Consortium (Create-Net (CN), Telefonica Investigacion Y Desarrollo SA (TID), Fujitsu Technology Solutions GmbH (FTS), Thales Communications & Security SAS (THALES), Fundacion Imdea Networks (IMDEA), Universitaet Paderborn (UPB), Intel Research & Innovation Ireland Ltd (I...
Python
0
@@ -741,24 +741,8 @@ t):%0A - cmd = None%0A @@ -775,36 +775,38 @@ None%0A%0A def v -alid +ersion (self):%0A @@ -810,34 +810,18 @@ r -aise NotImplementedError() +eturn None %0A%0A @@ -990,33 +990,8 @@ yu%22%0A - cmd = %22ryu-manager%22%0A @@ -1132,16 +1132,130 @@ ypoint%0A%0A ...
d2d743248a97f7045d50e29541bb513efeed3f44
Add missing numpy import to pytools.io
src/python/essentia/pytools/io.py
src/python/essentia/pytools/io.py
# Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation (FSF), either version 3 of the ...
Python
0.000003
@@ -803,16 +803,35 @@ tempfile +%0Aimport numpy as np %0A%0Adef te
c0f0725c00fa1f67eaafc7e6a733ec6a5bb0bc2a
initialize build flavors
mint/distro/group_trove.py
mint/distro/group_trove.py
# # Copyright (c) 2005 rPath, Inc. # # All Rights Reserved # import os.path import tempfile import sys from conary import checkin from conary import conarycfg from conary import versions from conary.build import cook from conary.deps import deps from conary.repository import netclient from imagegen import ImageGenera...
Python
0
@@ -1163,16 +1163,52 @@ = arch%0A + cfg.initializeFlavors()%0A
939e449887a9354a43944acb6137fac4ff7a5daf
Print % completion in 'importdata' command
HadithHouseWebsite/hadiths/management/commands/importdata.py
HadithHouseWebsite/hadiths/management/commands/importdata.py
import codecs import os from django.core.management.base import BaseCommand, CommandError from hadiths.models import Hadith, Book from hadiths import initial_data class Command(BaseCommand): help = 'Import data to the website' def add_arguments(self, parser): parser.add_argument('dataname', nargs=1, type=st...
Python
0.000107
@@ -728,16 +728,195 @@ = None%0A + # The total number of verses in the Holy Quran is 6236, excluding Basmalas%0A # at the beginning of Suras.%0A total_verse_count = 6236%0A perc, prev_perc = 0, 0%0A return%0A with @@ -971,16 +971,19 @@ for + i, line in @@ -983,20 +983,31 @@ line in +enum...
cdf6ab90f77583c9a716afd9d751b417396fe976
add SESSION_COOKIE_NAME setting
deployutils/settings.py
deployutils/settings.py
# Copyright (c) 2014, Djaodjin Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
Python
0.000001
@@ -2798,16 +2798,51 @@ ROOT))%0A%0A +SESSION_COOKIE_NAME = 'sessionid'%0A%0A DJAODJIN
8a5984f9b49c978e296a315ed62b52c92548636c
fix populate wikivoyage
destinate/wikivoyage.py
destinate/wikivoyage.py
import mwclient def find_city(city_name): pass
Python
0.000005
@@ -13,40 +13,1268 @@ ent%0A -%0Adef find_city(city_name):%0A pass +import mwparserfromhell%0A%0AHOST = 'en.wikivoyage.org'%0A%0Adef find_city(city_name):%0A return fetch(city_name)%0A%0Adef fetch(page_name):%0A page = site.Pages%5Bpage_name%5D%0A retun %7B%0A 'guide': build_guide(page.text()),%0A ...
7758988978e5ea3de9020673cf77890036ca3b99
allow blank columns
neuropower/apps/neuropowertoolbox/models.py
neuropower/apps/neuropowertoolbox/models.py
from __future__ import unicode_literals from django.db import models from picklefield.fields import PickledObjectField import os from django.conf import settings #import tempfile #temp_dir = tempfile.gettempdir() class NeuropowerModel(models.Model): SID = models.CharField(max_length=300,default="") step = mo...
Python
0.001964
@@ -1230,24 +1230,35 @@ ld(default=0 +,blank=True )%0A ExcZ = @@ -1281,24 +1281,35 @@ ld(default=0 +,blank=True )%0A DoF = @@ -1331,24 +1331,35 @@ ld(default=0 +,blank=True )%0A Subj = @@ -1416,24 +1416,35 @@ ld(default=0 +,blank=True )%0A Sample @@ -1634,32 +1634,43 @@ tField(default=0 +,blank=Tr...
ff360898ce7fb39350688362ebcbd89b0229b321
Correct DoesNotExist except in linking
src/sentry/integrations/slack/link_identity.py
src/sentry/integrations/slack/link_identity.py
from __future__ import absolute_import, print_function from django.core.urlresolvers import reverse from django.http import Http404 from django.views.decorators.cache import never_cache from sentry import http from sentry.models import Integration, Identity, IdentityProvider, IdentityStatus, Organization from sentry....
Python
0.000001
@@ -1807,34 +1807,39 @@ except I -ntegration +dentityProvider .DoesNotExis
92fe0ae8a192fa06ccbaa2c8a8d7b8102cb08326
add some python 3 readiness
online_monitor/utils/settings.py
online_monitor/utils/settings.py
import ConfigParser import ast import sys import os file_name = os.path.dirname(sys.modules[__name__].__file__) + r'/../OnlineMonitor.ini' def add_converter_path(path): # path where to search for converter modules config = ConfigParser.SafeConfigParser() config.read(file_name) paths = get_converter_path...
Python
0.002184
@@ -4,28 +4,8 @@ ort -ConfigParser%0Aimport ast%0A @@ -24,16 +24,131 @@ mport os +%0A%0Atry:%0A import ConfigParser%0Aexcept ImportError: # renaming in python 3k%0A import configparser as ConfigParser %0A%0Afile_n
15f046a9e0b0a701ab93eaf5f8b0341bcab96f30
combine dependencies and devDepdencies for each module to spot cross-inconsistencies between packages
src/scripts/check_npm_packages.py
src/scripts/check_npm_packages.py
#!/usr/bin/env python3 """ Consistency check for npm packages across node modules Hint: to get a "real time" info while working on resolving this, run $ /usr/bin/watch -n1 check_npm_packages.py in the COCALC_ROOT dir in a separate terminal. """ import os from os.path import abspath, dirname, basename impo...
Python
0
@@ -1254,18 +1254,8 @@ ages -, dep_type ) -%3E @@ -1280,24 +1280,24 @@ Set%5Bstr%5D%5D:%0A + installs @@ -1385,16 +1385,81 @@ ckages:%0A + for dep_type in %5B'dependencies', 'devDependencies'%5D:%0A @@ -1482,24 +1482,28 @@ (open(pkg))%0A + modu @@ -1534,24 +1534,28 @@ g))%0...
b278ded7892eda47ef6213034c484d4a330713c5
Remove Organization.owner (from Python)
src/sentry/models/organization.py
src/sentry/models/organization.py
""" sentry.models.organization ~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function from bitfield import BitField from django.conf import settings from django.db im...
Python
0
@@ -605,28 +605,8 @@ eld, - FlexibleForeignKey, Mod @@ -2534,76 +2534,8 @@ ue)%0A - owner = FlexibleForeignKey(settings.AUTH_USER_MODEL, null=True)%0A