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 |
|---|---|---|---|---|---|---|---|
1ebfda57b49dd62f2ca931d615cd52d987d74890 | allow to procure from planned orders | mrp_multi_level/wizards/mrp_inventory_procure.py | mrp_multi_level/wizards/mrp_inventory_procure.py | # Copyright 2018-19 ForgeFlow S.L. (https://www.forgeflow.com)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError
class MrpInventoryProcure(models.TransientModel):
_name = "mrp.inventory.procure"
... | Python | 0 | @@ -2198,56 +2198,8 @@
i
-f active_model == %22mrp.inventory%22:%0A i
tems
@@ -2250,16 +2250,60 @@
e.item%22%5D
+%0A if active_model == %22mrp.inventory%22:
%0A
@@ -2336,31 +2336,28 @@
elf.env%5B
-%22mrp.inventory%22
+active_model
%5D%0A
@@ -2519,24 +2519,24 @@
ne.mrp_qty:%0A
-
... |
c4fde7ec13bd86718b7db55fa004a8c24aa0fa63 | Fix books recommendations view | apps/books/views.py | apps/books/views.py | from django.core.urlresolvers import reverse, reverse_lazy
from django.views.generic import ListView, DetailView, TemplateView, FormView, CreateView, UpdateView, View
from django.db.models import Q
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from django... | Python | 0 | @@ -456,16 +456,51 @@
ectMixin
+%0Afrom django.db.models import Count
%0A%0Afrom a
@@ -2954,38 +2954,42 @@
(self):%0A
-return
+queryset =
Book.objects.or
@@ -2990,38 +2990,126 @@
cts.
-order_by('-favourites', '-id')
+annotate(Count('favourites')%0A ).order_by('-favourites__count... |
6f69a770ef3b55a7d846abfc306e41025131d8a6 | Fix FeedEntry custom model admin | apps/feeds/admin.py | apps/feeds/admin.py | from django.contrib import admin
from .models import Feed, FeedEntry
class FeedEntryAdmin(admin.ModelAdmin):
list_display = ('title', 'link', 'feed',
'feed__created_by', 'added_to_kippt')
admin.site.register(Feed)
admin.site.register(FeedEntry, FeedEntryAdmin)
| Python | 0 | @@ -65,16 +65,99 @@
Entry%0A%0A%0A
+class FeedAdmin(admin.ModelAdmin):%0A list_display = ('feed_url', 'created_by')%0A%0A%0A
class Fe
@@ -259,17 +259,16 @@
'feed_
-_
created_
@@ -291,16 +291,141 @@
ippt')%0A%0A
+ def feed_created_by(self, obj):%0A return obj.feed.created_by%0A feed_created_by.sho... |
034070458b18805d7282f2bb7f0880f688bf3e6e | Remove all subdir functionality | stuff/urls.py | stuff/urls.py | import settings
from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
subdir = ''
urlpatterns = patterns('',
(r'^%sadmin/(.*)' % subdir, admin.site.root),
(r'^%spublication/' % subdir, include('stuff.publications.urls')),
(r'^%sfile/' % subdir, include('stuff.files.... | Python | 0.000004 | @@ -109,20 +109,8 @@
()%0A%0A
-subdir = ''%0A
urlp
@@ -140,18 +140,16 @@
(r'%5E
-%25s
admin/(.
@@ -151,25 +151,16 @@
in/(.*)'
- %25 subdir
, admin.
@@ -179,18 +179,16 @@
(r'%5E
-%25s
publicat
@@ -192,25 +192,16 @@
cation/'
- %25 subdir
, includ
@@ -243,25 +243,14 @@
(r'%5E
-%25s
file/'
- %25 subdir
... |
0fdacebfdcde53d92f9b17ccccf8fe815bd438c4 | Fix bug number. | assess_add_cloud.py | assess_add_cloud.py | #!/usr/bin/env python
from argparse import ArgumentParser
from collections import namedtuple
from copy import deepcopy
import logging
import sys
import yaml
from jujupy import (
AuthNotAccepted,
EnvJujuClient,
get_client_class,
JujuData,
NameNotAccepted,
TypeNotAccepted,
)
from utility im... | Python | 0 | @@ -3521,10 +3521,10 @@
164
-9
1
+9
81,
|
ea94909e180c23d6e4873b2b0cc3d3f3c8fa7fd9 | Move Student's class variable declarations outside of __init__ | student.py | student.py | from major import Major
from concentration import Concentration
from course import Course, getCourse
from standing import Standing
def print_entire_list_as_english(passed_list):
for i, item in enumerate(passed_list):
if len(self.passed_list) is 1:
output += item + " "
elif len(self.passed_list) is 2:
outp... | Python | 0 | @@ -556,16 +556,130 @@
tudent:%0A
+%09name = %22%22%0A%09start_year = 0%0A%09end_year = 0%0A%0A%09majors = %5B%5D%0A%09concentrations = %5B%5D%0A%09courses = %5B%5D%0A%09standing = Standing()%0A%0A
%09def __i
@@ -883,77 +883,8 @@
r)%0A%0A
-%09%09%09self.majors = %5B%5D%0A%09%09%09self.concentrations = %5B%5D%0A%09%0... |
75f3ab5331b9c5937e61af1bc279097cd9865e53 | Add role project resource | mint/django_rest/rbuilder/projects/models.py | mint/django_rest/rbuilder/projects/models.py | #
# Copyright (c) 2011 rPath, Inc.
#
# All Rights Reserved
#
from django.db import models
from mint.django_rest.rbuilder import modellib
from mint.django_rest.rbuilder import models as rbuildermodels
from xobj import xobj
class Projects(modellib.Collection):
class Meta:
abstract = True
_xobj = xobj.... | Python | 0.000001 | @@ -81,24 +81,52 @@
ort models%0A%0A
+from mint import userlevels%0A
from mint.dj
@@ -2179,65 +2179,282 @@
def
-_attributes(self):%0A return (%7B%22id%22: self.hostname%7D)
+serialize(self, request):%0A xobjModel = modellib.XObjIdModel.serialize(self, request)%0A member = self.members.filter(us... |
d112f8913bdfccfaf6e6bf9d8c48a4b57e437f7c | Rename file exists function | openassessment/fileupload/backends/filesystem.py | openassessment/fileupload/backends/filesystem.py | """ Filesystem backend for file upload. """
from pathlib import Path
from django.conf import settings
import django.core.cache
from django.urls import reverse
from django.utils.encoding import smart_text
from .. import exceptions
from .base import BaseBackend
class Backend(BaseBackend):
"""
Upload openass... | Python | 0 | @@ -1319,19 +1319,16 @@
f self._
-is_
file_exi
@@ -1329,19 +1329,17 @@
le_exist
-ing
+s
(key_nam
@@ -1857,11 +1857,8 @@
def
-_is
_fil
@@ -1864,19 +1864,17 @@
le_exist
-ing
+s
(self, k
|
f2395dd7c37798086cf7c67c0a8cfa7e48f4ec64 | Remove unnecessary loop | atlas/mongo_read.py | atlas/mongo_read.py | try:
import simplejson as json
except ImportError:
import json
from pymongo import MongoClient
from pymongo.errors import PyMongoError
from atlas.constants import MONGO
__author__ = 'rblourenco@uchicago.edu'
# 2015-09-04 - Initial commit
class MongoRead(object):
def __init__(self, a_x, a_y, b_x, b_y, c_... | Python | 0.000048 | @@ -1946,34 +1946,8 @@
%22%22%22%0A
- geojsonfiles = %5B%5D%0A
@@ -2395,24 +2395,25 @@
rue, %7D)%0A
+%0A
for docu
@@ -2408,102 +2408,27 @@
-for document in cursor:%0A geojsonfiles.append(document)%0A%0A return geojsonfiles
+return list(cursor)
%0A%0A
|
be800d70ef3085035bc8330037f0881203e978cc | fix SSL vdsClient connections | ovirt_hosted_engine_ha/broker/submonitor_util.py | ovirt_hosted_engine_ha/broker/submonitor_util.py | #
# ovirt-hosted-engine-ha -- ovirt hosted engine high availability
# Copyright (C) 2013 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the Licens... | Python | 0 | @@ -1589,20 +1589,19 @@
serv.use
-_ssl
+SSL
= use_s
|
3f325f9ac4106eb8b27ec8efc309eeb6ce87bb76 | Remove experimental dead code | base_geoengine/fields.py | base_geoengine/fields.py | # -*- coding: utf-8 -*-
##############################################################################
#
# This program 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
#... | Python | 0.000027 | @@ -2236,723 +2236,8 @@
se%0A%0A
- # type = 'many2one'%0A # _slots = %7B%0A # 'ondelete': 'set null', # what to do when value is deleted%0A # 'auto_join': False, # whether joins are generated upon search%0A # 'delegate': False, # whether self implements deleg... |
70ad96b2e6f46fbc0fa184ad767dada0212a40a5 | Use reflect mode, not constant | basics/bubble_segment.py | basics/bubble_segment.py |
import numpy as np
import warnings
import scipy.ndimage as nd
from astropy.nddata.utils import extract_array, add_array
from astropy.utils.console import ProgressBar
import astropy.units as u
import skimage.morphology as mo
from skimage.filters import threshold_adaptive
from radio_beam import Beam
from spectral_cube.... | Python | 0.000002 | @@ -5181,33 +5181,16 @@
e=struct
-, mode='constant'
)%0A%0A #
|
bf460618bc0b2e535de46a0dc0ddb08b8680ab6c | Stop to use the __future__ module. | octavia/db/migration/alembic_migrations/env.py | octavia/db/migration/alembic_migrations/env.py | # Copyright 2014 Rackspace
#
# 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 agree... | Python | 0.999929 | @@ -602,47 +602,8 @@
e.%0A%0A
-from __future__ import with_statement%0A%0A
impo
|
f562fd203c441c10269c0a28861c1238c8a0947e | Simplify the closeness checking | euclid.py | euclid.py | """
Simple 2D Euclidean geometric primitives.
"""
from collections import namedtuple
import math
EPSILON = 1e-8
def _near_zero(v):
return math.isclose(v, 0, abs_tol=EPSILON)
class BadGeometry(Exception):
"""Any exception raised by euclid."""
pass
class Point(namedtuple("Point", ["x", "y"])):
"""... | Python | 0.000025 | @@ -97,40 +97,24 @@
h%0A%0A%0A
-EPSILON = 1e-8%0A%0Adef _near_zero(v
+def isclose(a, b
):%0A
@@ -140,12 +140,12 @@
ose(
-v, 0
+a, b
, ab
@@ -154,15 +154,12 @@
tol=
-EPSILON
+1e-8
)%0A%0A%0A
@@ -518,23 +518,19 @@
urn
-_near_zero(x1 -
+isclose(x1,
x2)
@@ -538,23 +538,19 @@
and
-_near_zero(y1 -
+isclose(y1,
... |
38968cd1c0659ad258ac976c6950e1e8ebb98541 | Replace dashes with underscores when resolving commands | valohai_cli/plugin_cli.py | valohai_cli/plugin_cli.py | import pkgutil
from collections import defaultdict
from importlib import import_module
import click
from valohai_cli.utils import cached_property, match_prefix
class PluginCLI(click.MultiCommand):
aliases = {
'new': 'create',
'start': 'run',
}
def __init__(self, **kwargs):
self.... | Python | 0.000121 | @@ -1314,32 +1314,157 @@
lf, ctx, name):%0A
+ # Dashes aren't valid in Python identifiers, so let's just replace them here.%0A name = name.replace('-', '_')%0A%0A
command_
|
0592bd3759fad25a8aa50cd2e2e5a853d0863202 | Handle implicit encode/decode errors in Py3 (#4). | requests_negotiate/__init__.py | requests_negotiate/__init__.py | import base64
import re
import logging
import gssapi
from requests.auth import AuthBase
from requests.compat import urlparse
import www_authenticate
logger = logging.getLogger(__name__)
class HTTPNegotiateAuth(AuthBase):
def __init__(self, service='HTTP', service_name=None,
negotiate_client_na... | Python | 0 | @@ -2919,12 +2919,28 @@
te'%5D
+.encode('ascii')
) %5C%0A
-
@@ -3005,33 +3005,16 @@
token =
-base64.b64encode(
ctx.step
@@ -3023,17 +3023,16 @@
n_token)
-)
%0A
@@ -3262,32 +3262,84 @@
%5D =
-'Negotiate ' + out_token
+%5C%0A 'Negotiate ' + base64.b64encode(out_token).decode('ascii')
... |
25866e86338ac2cf0f042dded6a343a00b5f7241 | Bump version to 0.5.0-alpha.4. | rnachipintegrator/__init__.py | rnachipintegrator/__init__.py | # Current version of the library
__version__ = '0.5.0-alpha.3'
def get_version():
"""Returns a string with the current version of the library (e.g., "0.2.0")
"""
return __version__
| Python | 0 | @@ -57,9 +57,9 @@
pha.
-3
+4
'%0A%0Ad
|
e7421c5e8f3f26a617e71ee04fd16a7ebba97d53 | Remove unneeded import | bibpy/lexers/__init__.py | bibpy/lexers/__init__.py | """Various lexer functions used by the funcparserlib parser."""
import funcparserlib.lexer as lexer
import bibpy
from bibpy.compat import u
from bibpy.lexers.biblexer import BibLexer
from bibpy.lexers.name_lexer import NameLexer
from bibpy.lexers.namelist_lexer import NamelistLexer
from funcparserlib.lexer import Toke... | Python | 0.000002 | @@ -98,21 +98,8 @@
xer%0A
-import bibpy%0A
from
|
f97272eebc60eff9ca20550d4c8a3ba0f68817d9 | Remove a bit of debug code | linehaul/server.py | linehaul/server.py | # 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 agreed to in writing, software
# distributed under the Li... | Python | 0.00066 | @@ -2043,12 +2043,8 @@
tems
-%5B:1%5D
)%0A
|
fc3fa9871f0edc4c76a201547ec8c7f457aa2b35 | fix msg string and rename 'iter' variable | modules/bibcatalog/lib/bibcatalog_templates.py | modules/bibcatalog/lib/bibcatalog_templates.py | ## This file is part of Invenio.
## Copyright (C) 2009, 2010, 2011 CERN.
##
## Invenio 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 2 of the
## License, or (at your option) any later versio... | Python | 0.000002 | @@ -1668,19 +1668,16 @@
i
-ter
= 1%0A%0A
@@ -1691,16 +1691,17 @@
ines +=
+(
_(%22You h
@@ -1708,48 +1708,41 @@
ave
-%22)+str(len(tickets))+%22 %22+_(%22
+%25i tickets.%22) %25 len(
tickets
-%22)+%22.
+)) + %22
%3Cbr/
@@ -2261,19 +2261,16 @@
if (i
-ter
%3E= star
@@ -2278,19 +2278,16 @@
) and (i... |
1193980f77d715e1ca2b22bcb8a4b74eaed1122c | Add missing import | lino_book/projects/polls/test.py | lino_book/projects/polls/test.py | from lino.utils.djangotest import WebIndexTestCase
| Python | 0.000466 | @@ -1,8 +1,44 @@
+from lino.utils.test import DocTest%0A
from lin
|
26e14ff342e9063a6378f6b38be96b037df746c3 | Fix ordering validation and parsing | avocado/query/parsers/dataview.py | avocado/query/parsers/dataview.py | from modeltree.tree import trees
from modeltree.query import ModelTreeQuerySet
from django.core.exceptions import ValidationError
def has_keys(obj, keys):
"Check the required keys are present in `obj`"
for key in keys:
if key not in obj:
return False
return True
class Node(object):
... | Python | 0.000001 | @@ -1886,37 +1886,32 @@
for concept in
-self.
concepts:%0A
@@ -1934,16 +1934,21 @@
.append(
+list(
concept.
@@ -2043,16 +2043,17 @@
order'))
+)
%0A%0A
@@ -2694,50 +2694,153 @@
ring
- and len(node.order_by) != len(ordering):%0A
+:%0A for pk, direction in ordering:%0A if direction n... |
06a2e65423a6e26e3226cda724112219c0867fdd | Fix missing else | readthedocs/core/management/commands/update_repos.py | readthedocs/core/management/commands/update_repos.py | """
Custom management command to rebuild documentation for all projects.
Invoked via ``./manage.py update_repos``.
"""
import logging
from django.core.management.base import BaseCommand
from readthedocs.builds.constants import EXTERNAL, INTERNAL
from readthedocs.builds.models import Version
from readthedocs.core.ut... | Python | 0.998982 | @@ -3299,16 +3299,34 @@
rsion)%0A%0A
+ else:%0A
|
fcb7435cd6ae2710406fedfe340d66f3564a31c3 | Disable PositionLog and Noise filters (no need in production) | roboime/interface/__init__.py | roboime/interface/__init__.py | #from sys import platform
#if platform == 'win32':
# from multiprocessing.dummy import Process, Queue, Event, Lock
#else:
# from multiprocessing import Process, Queue, Event, Lock
from multiprocessing import Process, Event
from . import updater
from . import commander
from . import filter
from .. import options
... | Python | 0 | @@ -5023,24 +5023,25 @@
+#
filter.Posit
@@ -5380,24 +5380,25 @@
+#
filter.Noise
|
02a36c08caaec2c16a965c55a35b8378f2a7609b | add 1D cosmic-ray rejection after sky subtraction | 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.000017 | @@ -2452,16 +2452,147 @@
calib)%0A%0A
+ # Reject cosmics one more time after sky subtraction to catch cosmics close to sky lines%0A reject_cosmic_rays_1d(frame)%0A %0A
%0A # s
|
84159dae072424b0cc8d457b9e64e7b2490f08df | Remove some redundant URL configs. | base/components/people/urls.py | base/components/people/urls.py | from django.conf.urls import patterns, url
from django.http import Http404
from django.views.generic.base import RedirectView
from multiurl import ContinueResolving, multiurl
from .views import (GroupBrowseView, GroupDetailView, GroupDiscographyView, GroupMembershipView,
IdolBrowseView, IdolDetailView, IdolDiscog... | Python | 0 | @@ -655,1014 +655,298 @@
)),%0A
-%0A # url('%5Emusic/(?P%3Cslug%3E%5B-%5Cw%5D+)/$', name='album-detail', view=AlbumDetailView.as_view()),%0A # url('%5Emusic/(?P%3Cslug%3E%5B-%5Cw%5D+)/$', name='single-detail', view=SingleDetailView.as_view()),%0A catch=(Http404, ContinueResolving)%0A ),%0A%0A ... |
f1c1e471cb6c3de23991301379425dceacebe27d | change to PST | events.py | events.py | #!/usr/bin/env python
import requests
import time
import math
import os
import tempfile
from yattag import Doc
outputdir = "./"
allshards = {
'us': {
1701: 'Seastone',
1702: 'Greybriar',
1704: 'Deepwood',
1706: 'Wolfsbane',
1707: 'Faeblight',
1708: 'Laethys',
1721: 'Hailol'
},
'eu': ... | Python | 0.000581 | @@ -552,11 +552,27 @@
= '
-GMT
+America/Los_Angeles
'%0A%0Af
|
fc5b13f413713cacd147bbd29daac5df7f5bd2de | update notification sending tests | awx/main/tests/unit/test_tasks.py | awx/main/tests/unit/test_tasks.py | import pytest
from contextlib import contextmanager
from awx.main.models import (
UnifiedJob,
Notification,
)
from awx.main.tasks import (
send_notifications,
run_administrative_checks,
)
from awx.main.task_engine import TaskEnhancer
@contextmanager
def apply_patches(_patches):
[p.start() for p ... | Python | 0 | @@ -967,19 +967,21 @@
fication
+s
=
+%5B
mocker.M
@@ -1048,16 +1048,17 @@
world'%7D)
+%5D
%0A pat
@@ -1112,35 +1112,38 @@
ication.objects.
-get
+filter
', return_value=
@@ -1159,16 +1159,17 @@
fication
+s
))%0A%0A
@@ -1273,27 +1273,30 @@
ion.objects.
-get
+filter
.call_count
@@ -1298,17 +1298,17 @@... |
25ff7901a495a140e4c8d0890fdc0746f54104b7 | rename bundled assets files | eventviz/assets.py | eventviz/assets.py | # -*- coding: utf-8 -*-
from flask.ext.assets import Bundle, Environment
JS_ASSETS = [
'js/jquery-1.9.1.js',
'js/jquery.tablesorter.js',
'js/bootstrap.js'
]
JS_TIMELINE_ASSETS = [
'js/timeline.js',
'js/eventviz-timeline.js'
]
CSS_ASSETS = [
'css/bootstrap.css',
'css/eventviz.css'
]
CSS_TIM... | Python | 0.000001 | @@ -527,24 +527,31 @@
'js/eventviz
+-bundle
.min.js')%0A
@@ -669,24 +669,31 @@
'js/timeline
+-bundle
.min.js')%0A
@@ -815,16 +815,23 @@
eventviz
+-bundle
.min.css
@@ -964,16 +964,23 @@
timeline
+-bundle
.min.css
|
61e4693988c5b89b4a82457181813e7a6e73403b | Fix slugify for use without validator | utils/text.py | utils/text.py | import codecs
from django.core import exceptions
from django.utils import text
import translitcodec
def slugify(model, field, value, validator):
orig_slug = slug = text.slugify(codecs.encode(value, 'translit/long'))[:45]
i = 0
while True:
try:
try:
validator(slug)
... | Python | 0.000002 | @@ -94,16 +94,49 @@
tcodec%0A%0A
+def no_validator(arg):%0A pass%0A%0A
def slug
@@ -160,16 +160,29 @@
value,
+validator=no_
validato
|
75fbe0578ca831b0a6802f0f01c0d76b076153b3 | Update item tool docs | gaphas/tool/itemtool.py | gaphas/tool/itemtool.py | import logging
from typing import Optional, Tuple, Union
from gi.repository import Gdk, Gtk
from typing_extensions import Protocol
from gaphas.aspect import HandleMove, Move
from gaphas.canvas import ancestors
from gaphas.connector import Handle
from gaphas.geometry import distance_point_point_fast
from gaphas.item i... | Python | 0 | @@ -3436,16 +3436,35 @@
osition,
+ a tuple %60%60(x, y)%60%60
in view
|
728c1e57b37e51306eeae59d11792444f7798da5 | Change Events.default to use @propery access | events.py | events.py | EVENT_LEVELS = BLOCK, CONSUME, NOTIFY = range(3)
# events: dict of (event_name:handler_levels)
# handler_levels: 3-tuple of sets of functions
class Events(object):
def __init__(self, default = NOTIFY):
self.setdefault(default)
self.events = {}
def setdefault(self, value = NOTIFY... | Python | 0 | @@ -228,27 +228,25 @@
elf.
-set
default
-(
+ =
default
-)
%0A
@@ -272,24 +272,38 @@
%7B%7D%0A %0A
+ @property%0A
def
setdefau
@@ -294,19 +294,16 @@
def
-set
default(
@@ -310,41 +310,45 @@
self
-, value = NOTIFY):%0A if not
+):%0A return self._default%5B0%5D if
has
@@ -362,5... |
f2ffb339714ba848ea48008f20fa7adc71609b7f | add --update command to pr management util | people_admin/management/commands/create_pulls.py | people_admin/management/commands/create_pulls.py | from django.core.management.base import BaseCommand
from people_admin.models import DeltaSet, PullStatus
from people_admin.git import delta_set_to_pr
class Command(BaseCommand):
help = "create pull requests from deltas"
def add_arguments(self, parser):
parser.add_argument("--list", default=False, act... | Python | 0 | @@ -142,17 +142,32 @@
et_to_pr
+, get_pr_status
%0A
-
%0A%0Aclass
@@ -384,16 +384,92 @@
-delta%22)
+%0A parser.add_argument(%22--update%22, default=False, action=%22store_true%22)
%0A%0A de
@@ -1166,16 +1166,520 @@
.save()%0A
+ if options%5B%22update%22%5D:%0A nothing = False%0A ... |
88b01b80ce917fcc8fc38979b96893b9ba46c5cc | Migrate everlights light to color_mode (#69182) | homeassistant/components/everlights/light.py | homeassistant/components/everlights/light.py | """Support for EverLights lights."""
from __future__ import annotations
from datetime import timedelta
import logging
import pyeverlights
import voluptuous as vol
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_EFFECT,
ATTR_HS_COLOR,
PLATFORM_SCHEMA,
SUPPORT_BRIGHTNESS,
SUP... | Python | 0 | @@ -269,66 +269,42 @@
-PLATFORM_SCHEMA,%0A SUPPORT_BRIGHTNESS,%0A SUPPORT_COLOR
+COLOR_MODE_HS,%0A PLATFORM_SCHEMA
,%0A
@@ -839,82 +839,8 @@
_)%0A%0A
-SUPPORT_EVERLIGHTS = SUPPORT_EFFECT %7C SUPPORT_BRIGHTNESS %7C SUPPORT_COLOR%0A%0A
SCAN
@@ -2204,16 +2204,150 @@
ht.%22%22%22%0A%0A
+ _attr_color... |
efef8389f2536179ebea189fed33c3ca446e68ac | Refactor indicators | pyFxTrader/utils/indicators.py | pyFxTrader/utils/indicators.py | # -*- coding: utf-8 -*-
import numpy as np
def moving_average(x, n, type='simple'):
"""
compute an n period moving average.
type is 'simple' | 'exponential'
"""
x = np.asarray(x)
if type == 'simple':
weights = np.ones(n)
else:
weights = np.exp(np.linspace(-1., 0., n))
... | Python | 0.000001 | @@ -128,17 +128,16 @@
verage.%0A
-%0A
type
@@ -165,17 +165,16 @@
ential'%0A
-%0A
%22%22%22%0A
@@ -1349,16 +1349,39 @@
nfast=12
+, nsign=9, simple=False
):%0A %22
@@ -1460,16 +1460,20 @@
fast and
+%0A
slow ex
@@ -1502,90 +1502,53 @@
-return value is emaslow, emafast, macd which are len(x) ar... |
2eef6612a046b2982327a36ffe03beb4a0aa54f3 | Remove dependancies on lmi-sdp and sympy for is_passive. | control/passivity.py | control/passivity.py | '''
Author: Mark Yeatman
Date: May 15, 2022
'''
from . import statesp as ss
from sympy import symbols, Matrix, symarray
from lmi_sdp import LMI_NSD, to_cvxopt
from cvxopt import solvers
import numpy as np
def is_passive(sys):
'''
Indicates if a linear time invarient system is passive
Constructs a lin... | Python | 0 | @@ -76,137 +76,47 @@
ss%0A
-from sympy import symbols, Matrix, symarray%0Afrom lmi_sdp import LMI_NSD, to_cvxopt%0Afrom cvxopt import solvers%0A%0Aimport numpy as np
+import numpy as np%0Aimport cvxopt as cvx
%0A%0A%0Ad
@@ -585,76 +585,241 @@
-P = Matrix(symarray('p', A.shape))%0A%0A # enforce symmetry in P... |
6fde5b74509e11021d976860502a9a15f63201b8 | fix bug of view.file_name() is None when execute anonymous | events.py | events.py | import sublime
import sublime_plugin
import os
import time
from . import context
from .salesforce import util
class SFDCEventListener(sublime_plugin.EventListener):
def on_new_async(self, view):
"""
1. Eveytime when you open a new view, default syntax is Apex
2. Set Status with current def... | Python | 0.99976 | @@ -1171,32 +1171,76 @@
nt, just return%0A
+ if view.file_name() == None: return%0A
componen
|
7252c12fa39ac1a4007aaf46cab4105540fc0bb4 | Fix bug in pack/unpack mismatch accounting for padding. Unit test now work | vectortile/TypedMatrix.py | vectortile/TypedMatrix.py | """
TypedMatrix.py - read/write TypedMatrix format
"""
magic = 'tmtx' # Must be four bytes long!
version = 2
import StringIO
import struct
import json
import calendar
from datetime import datetime
# Header Structure
# {
# length: count of rows of data
# version: format version
# cols: array of column definitio... | Python | 0 | @@ -3066,75 +3066,83 @@
-headerlen = len(headerstr)%0A paddinglen = (4 - headerlen %25 4) %25 4
+paddinglen = (4 - len(header) %25 4) %25 4%0A headerstr += (%22 %22 * paddinglen)%0A
%0A%0A
@@ -3278,17 +3278,22 @@
i%22,
+len(
header
-len
+str)
))%0A
@@ -3317,38 +3317,8 @@
str)
-%0A f.write(%22 %2... |
6a4b14980d4afc5290c9b2bdf8301d045a1525e2 | add old command | paulla.ircbot/src/paulla/ircbot/plugins/Urls.py | paulla.ircbot/src/paulla/ircbot/plugins/Urls.py | import sqlite3
from os.path import exists, dirname, expanduser
import re
from urllib.parse import urlparse
from os import makedirs
import irc3
import requests
from bs4 import BeautifulSoup
@irc3.plugin
class Urls:
"""
A plugin for print Url title
"""
def __init__(self, bot):
self.bot = bot
... | Python | 0.99801 | @@ -137,16 +137,57 @@
rt irc3%0A
+from irc3.plugins.command import command%0A
import r
@@ -1581,32 +1581,33 @@
value text
+,
%0A
@@ -1867,72 +1867,8 @@
%22%22%22
-%0A%0A print(%22plop%22)%0A print(mask, event, target, data)
%0A
@@ -2554,17 +2554,24 @@
self.
-o
+displayO
... |
70d95cb6aabe4a135827ed9027fd46197d708240 | Add link to docs | homeassistant/components/mqtt_eventstream.py | homeassistant/components/mqtt_eventstream.py | """
homeassistant.components.mqtt_eventstream
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Connect two Home Assistant instances via mqtt.
Configuration:
To use the mqtt_eventstream component you will need to add the following to
your configuration.yaml file.
If you do not specify a publish_topic you will not forward ev... | Python | 0 | @@ -126,400 +126,150 @@
via
-mqtt.%0A%0AConfiguration:%0A%0ATo use the mqtt_eventstream component you will need to add the following to%0Ayour configuration.yaml file.%0A%0AIf you do not specify a publish_topic you will not forward events to the queue.%0AIf you do not specify a subscribe_topic then you will not recei... |
5cff305e60a6c8a13843789dbdff16d12f782e81 | Fix typo on openstack_nova_path help doc | perfkitbenchmarker/providers/openstack/flags.py | perfkitbenchmarker/providers/openstack/flags.py | # Copyright 2015 PerfKitBenchmarker Authors. 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 appli... | Python | 0.000016 | @@ -897,17 +897,17 @@
help='
-t
+T
he path
|
5a53726cafc776f50079dfbe7c574428b7424569 | fix permissions | nlp_engine.py | nlp_engine.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2015, 2016, 2017 Guenter Bartsch
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at ... | Python | 0 | |
7f17ad3874b95c34228f95cb5cb6b4dd98cf43fa | Update the doc string on _save_artifacts | bok_choy/web_app_test.py | bok_choy/web_app_test.py | """
Base class for testing a web application.
"""
from abc import ABCMeta
import sys
from unittest import SkipTest
from uuid import uuid4
from needle.cases import NeedleTestCase, import_from_string
from .browser import browser, save_screenshot, save_driver_logs, save_source
class WebAppTest(NeedleTestCase):
""... | Python | 0.000003 | @@ -4905,54 +4905,48 @@
s
-elenium driver logs, and the captured har file
+ource html, and the selenium driver logs
.%0A
|
28455c541b45ef6ca8e098702e0b7ea7c49a4a71 | Update ASDF version. | versions/software/asdf.py | versions/software/asdf.py | from versions.software.utils import get_response, get_text_between
def name():
"""Return the precise name for the software."""
return 'asdf'
def installed_version():
"""Return the installed version of asdf."""
# I don't have a command-line version to run to get this from
return '3.3.1'
def lat... | Python | 0 | @@ -305,9 +305,9 @@
3.3.
-1
+2
'%0A%0A%0A
|
4011c54fc1e20f9d2e9514c1344ce3ee5bf032db | fix docstring | lm_atm/__init__.py | lm_atm/__init__.py | """The pyro solver for low Mach number atmospheric flow. This
implements as second-order approximate projection method. The general
flow is:
* create the limited slopes of rho, u and v (in both directions)
* get the advective velocities through a piecewise linear Godunov
method
* enforce the divergence constrai... | Python | 0.000018 | @@ -268,17 +268,16 @@
Godunov
-
%0A metho
@@ -346,11 +346,9 @@
gh a
- %0A
+%0A
pr
@@ -699,10 +699,8 @@
mport *%0A
-%0A%0A
|
9362511d420a297fc1ed27f0642c4dcd527b4aff | Swap incorrect argument | babel_util/scripts/wos_to_edge.py | babel_util/scripts/wos_to_edge.py | #!/usr/bin/env python3
from parsers.wos import WOSStream
from util.PajekFactory import PajekFactory
from util.misc import open_file, Benchmark
if __name__ == "__main__":
import argparse
import sys
parser = argparse.ArgumentParser(description="Creates Pajek (.net) files from WOS XML")
parser.add_argumen... | Python | 0.998647 | @@ -476,22 +476,25 @@
en_file(
-p
ar
-ser
+guments
.infile)
|
48db4161ec662af6330d3c853db4482f7f459f9d | convert dates properly | generate/json_loader.py | generate/json_loader.py | import mimetypes
import os
import sys
import json
import urllib
import hashlib
import cStringIO
import unicodedata
import random
from django.db.models import get_model, FileField, ImageField
from django.db.models.fields.related import ForeignKey
from django.db.models.fields.related import ManyToManyField
from django.... | Python | 0.999722 | @@ -122,16 +122,46 @@
t random
+%0Afrom datetime import datetime
%0A%0Afrom d
@@ -193,16 +193,42 @@
t_model,
+ DateField, DateTimeField,
FileFie
@@ -2646,32 +2646,563 @@
d_field = value%0A
+ elif isinstance(model_field, DateTimeField):%0A try:%0A fields%5Bstr(field)%5D = datetime.... |
e5214b07ae60d16f796b68a519ce719ed09838fd | Fix aggregation not expanding into a actual list | localized_fields/fields/field.py | localized_fields/fields/field.py | import json
from typing import Union
from django.conf import settings
from django.db.utils import IntegrityError
from psqlextra.fields import HStoreField
from ..forms import LocalizedFieldForm
from ..value import LocalizedValue
from ..descriptor import LocalizedValueDescriptor
class LocalizedField(HStoreField):
... | Python | 0.000424 | @@ -1990,32 +1990,672 @@
s.attr_class()%0A%0A
+ # we can get a list if an aggregation expression was used..%0A # if we the expression was flattened when only one key was selected%0A # then we don't wrap each value in a localized value, otherwise we do%0A if isinstance(value, list):%0A ... |
c638f309dbe7621243f0b46555439506b12d5d37 | check that COOP solar rad values are good, non-negative | scripts/iemre/grid_rsds.py | scripts/iemre/grid_rsds.py | """Do the gridding of Solar Radiation Data
Called from RUN_MIDNIGHT.sh
"""
import netCDF4
import pygrib
import pyproj
import datetime
import psycopg2
import pytz
import os
import sys
import numpy as np
from pyiem import iemre
from scipy.interpolate import NearestNDInterpolator
P4326 = pyproj.Proj(init="epsg:4326")
L... | Python | 0.999981 | @@ -1104,24 +1104,86 @@
in cursor:%0A
+ if row%5B2%5D is None or row%5B2%5D %3C 0:%0A continue%0A
lons
|
8a92b08229119b21d7f79d1010fe73039bdd0d74 | Fix test regression from fixing #132 and #135. | south/tests/modelsparser.py | south/tests/modelsparser.py | # -*- coding: UTF-8 -*-
import unittest
from south.db import db
from south.tests import Monkeypatcher
from south.tests.fakeapp.models import HorribleModel, Other1, Other2
from south.modelsparser import get_model_fields, get_model_meta
class TestModelParsing(Monkeypatcher):
"""
Tests parsing of models.py fi... | Python | 0 | @@ -1446,14 +1446,20 @@
': %22
-'yays'
+default_func
%22, '
|
70868f7162bfd90978b89da8d48f0cf78dfc7658 | remove white space from gene ids | chanjo_report/server/blueprints/report/views.py | chanjo_report/server/blueprints/report/views.py | # -*- coding: utf-8 -*-
from __future__ import division
import datetime
import logging
from chanjo.store.api import filter_samples
from chanjo.store import Exon, Gene
from flask import abort, Blueprint, render_template, request, url_for
from flask_weasyprint import render_pdf
from chanjo_report.server.extensions impo... | Python | 0.000114 | @@ -1350,16 +1350,48 @@
ne_ids =
+ %5Bgene_id.strip() for gene_id in
gene_id
@@ -1398,24 +1398,25 @@
s.split(',')
+%5D
%0A sample_
|
7b6a16f2dc418e7898d5cca248228d50becf9d05 | Add a method representation() for transition calendars. | calexicon/calendars/historical.py | calexicon/calendars/historical.py | from datetime import date
from base import Calendar
from calexicon.dates import InvalidDate, DateWithCalendar
from main import JulianCalendar, ProlepticGregorianCalendar
class SwitchDateWithCalendar(DateWithCalendar):
def __str__(self):
return "%s (%s - %s)" % (
self.calendar.date_display_stri... | Python | 0 | @@ -1147,16 +1147,219 @@
ing(d)%0A%0A
+ @classmethod%0A def representation(cls, d):%0A if d %3E= cls.first_gregorian_day:%0A return ProlepticGregorianCalendar.representation(d)%0A return JulianCalendar.representation(d)%0A%0A
@cla
|
cc3d03d8750b436cf26633f1d785f14d39cb2bde | reduce the appearances of 1/n | tchisla.py | tchisla.py | import math
from fractions import Fraction
from itertools import count, product, combinations_with_replacement, chain, islice
from functools import reduce
from utils import sqrt, factorial
__all__ = ["Tchisla"]
MAX = 1 << 128
MAX_DIGITS = 128
MAX_CONCAT = 39
MAX_FACTORIAL = 34
class Tchisla:
def __init__(self, n... | Python | 0.999999 | @@ -1288,32 +1288,297 @@
return True%0A%0A
+ def quotient(self, p, q, depth):%0A if p %3C q:%0A p, q = q, p%0A quotient = p / q%0A if self.check(quotient, depth, (%22/%22, p, q)):%0A return True%0A if self.check(quotient ** -1, depth, (%22/%22, q, p)):%0A ... |
daed100280b615ab7bd50bbf54d7f40f1d5d2a42 | Add CAN_DETECT | bears/python/PyDocStyleBear.py | bears/python/PyDocStyleBear.py | from coalib.bearlib.abstractions.Lint import Lint
from coalib.bears.LocalBear import LocalBear
from coalib.bears.requirements.PipRequirement import PipRequirement
from coalib.settings.Setting import typed_list
class PyDocStyleBear(LocalBear, Lint):
executable = 'pydocstyle'
output_regex = r'(.*\.py):(?P<line>... | Python | 0.000006 | @@ -592,16 +592,65 @@
GPL-3.0'
+%0A CAN_DETECT = %7B'Formatting', 'Documentation'%7D
%0A%0A de
|
51872cd1a966f10976200dcdf9998a9119072d43 | write warnings to stderr, not stdout (which might be muted) | export.py | export.py | #!/usr/bin/env python
import optparse
import os
import sys
import starbound
def main():
p = optparse.OptionParser()
p.add_option('-d', '--destination', dest='path',
help='Destination directory')
options, arguments = p.parse_args()
if len(arguments) != 1:
raise ValueError('On... | Python | 0 | @@ -1180,29 +1180,153 @@
-print
+# break the dots in case std%7Bout,err%7D are the same tty:%0A sys.stdout.write('%5Cn')%0A sys.stdout.flush()
%0A
@@ -1336,17 +1336,34 @@
print
-'
+%3E%3Esys.stderr, 'W:
Failed t
|
8785cade9bfe7cc3c54db0d0a068f99c5883ef1b | Allow locations to be imported from codelists management page | maediprojects/views/codelists.py | maediprojects/views/codelists.py | from flask import Flask, render_template, flash, request, Markup, \
session, redirect, url_for, escape, Response, abort, send_file, jsonify
from flask.ext.login import login_required, current_user
from maediprojects import app, db, models
from maediprojects.query import activity as qact... | Python | 0 | @@ -718,33 +718,790 @@
es()
-%0A
+,%0A countries = codelists.get_codelists()%5B%22Country%22%5D,%0A countries_locations = qlocation.get_countries_locations()%0A )%0A%0A@app.route(%22/codelists/import_locations/%22, methods=%5B%22POST%22%5... |
bcedbe27c4fcd5a4ddb9312670b86b2548903192 | Remove category | pinax/ratings/templatetags/pinax_ratings_tags.py | pinax/ratings/templatetags/pinax_ratings_tags.py | from decimal import Decimal
from django import template
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.urls import reverse
from ..categories import category_value
from ..models import OverallRating, Rating
register = template.Libra... | Python | 0 | @@ -2755,33 +2755,8 @@
j.pk
-,%0A category=%22%22
%0A
|
e50d42032669d84c344e13863ccb8122b79b8b4a | prepare for release | auxlib/__about__.py | auxlib/__about__.py | # -*- coding: utf-8 -*-
"""auxiliary library to the python standard library"""
from __future__ import absolute_import, division, print_function
import os
import sys
import warnings
__all__ = ["__title__", "__author__", "__email__", "__license__", "__copyright__",
"__homepage__"]
__title__ = "auxlib"
__auth... | Python | 0 | @@ -140,45 +140,8 @@
tion
-%0Aimport os%0Aimport sys%0Aimport warnings
%0A%0A__
|
01d7850ccf5b23c448a898a1a23533e8207e8e49 | Bump version to 1.7.2 | betfairlightweight/__init__.py | betfairlightweight/__init__.py | import logging
from .apiclient import APIClient
from .exceptions import BetfairError
from .streaming import StreamListener
from . import filters
__title__ = 'betfairlightweight'
__version__ = '1.7.1'
__author__ = 'Liam Pauling'
# Set default logging handler to avoid "No handler found" warnings.
try: # Python 2.7+
... | Python | 0 | @@ -192,17 +192,17 @@
= '1.7.
-1
+2
'%0A__auth
|
975933d579bfcfb9354174ea3788964980107098 | Remove duplicate fast flag from kubernetes build | scenarios/kubernetes_build.py | scenarios/kubernetes_build.py | #!/usr/bin/env python
# Copyright 2016 The Kubernetes Authors.
#
# 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 appli... | Python | 0 | @@ -5188,85 +5188,8 @@
.')%0A
- PARSER.add_argument('--fast', action='store_true', help='Build quickly')%0A
|
b59fa7ea9648b654b40a68fdc79f546039aeb7d8 | Update handling of APINAME variable in api_config_pattern variable (#105) | pipeline/pipelines/batch_generation_pipeline.py | pipeline/pipelines/batch_generation_pipeline.py | # Copyright 2016 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 agree... | Python | 0.000001 | @@ -4432,32 +4432,171 @@
ch_apis == '*':%0A
+ glob_pattern = config_util.var_replace(api_config_pattern,%0A %7B'API_SHORT_NAME': '*'%7D)%0A
return s
@@ -4611,26 +4611,20 @@
ob.glob(
-api_config
+glob
_pattern
@@ -4695,22 +4695,69 @@
pattern,
- %7B'API
+%... |
24f546168b428580ccee05ba28f15e96fb5f64c9 | Create a financial year | scorecard/tests/test_views.py | scorecard/tests/test_views.py | import json
from django.test import (
TransactionTestCase,
Client,
override_settings,
)
from . import (
import_data,
)
from .resources import (
GeographyResource,
MunicipalityProfileResource,
MedianGroupResource,
RatingCountGroupResource,
)
@override_settings(
SITE_ID=2,
STAT... | Python | 0.000002 | @@ -4,16 +4,64 @@
ort json
+%0Afrom infrastructure.models import FinancialYear
%0A%0Afrom d
@@ -1013,32 +1013,104 @@
csv%22,%0A )%0A
+ FinancialYear.objects.create(budget_year=%222049/2050%22, active=1)%0A
# Make r
|
70482d032d1acef1570b16551bf170a0a271a7ec | Put the 'import *' back into test-settings.py | humbug/test-settings.py | humbug/test-settings.py | from settings import DATABASES
DATABASES['default']["NAME"] = "zephyr/tests/zephyrdb.test"
| Python | 0.000002 | @@ -14,25 +14,17 @@
import
-DATABASES
+*
%0A%0ADATABA
|
7c74017bc0d76ecb34e3fab44767290f51d98a09 | Decrease get_updates timeout for client test suite | humbug/test_settings.py | humbug/test_settings.py | from settings import *
DATABASES["default"] = {"NAME": "zephyr/tests/zephyrdb.test",
"ENGINE": "django.db.backends.sqlite3",
"OPTIONS": { "timeout": 20, },}
TORNADO_SERVER = 'http://localhost:9983'
| Python | 0 | @@ -241,8 +241,142 @@
t:9983'%0A
+%0A# Decrease the get_updates timeout to 1 second.%0A# This allows CasperJS to proceed quickly to the next test step.%0APOLL_TIMEOUT = 1000%0A
|
9279930fa8153ca082728d3ac8479519c5db26b8 | remove graph override= | hypergan/graph/graph.py | hypergan/graph/graph.py | from hypergan.util.ops import *
from hypergan.util.hc_tf import *
import tensorflow as tf
import hypergan.util.wavegan as wavegan
import hyperchamber as hc
TINY = 1e-12
class Graph:
def __init__(self, gan):
self.gan = gan
def generator(self, z, reuse=False):
config = self.gan.config
x... | Python | 0 | @@ -975,84 +975,8 @@
els%0A
- if self.gan.graph.xa is not None:%0A x = self.gan.graph.xa%0A
|
1c472ee60b69c0ce629b456d26c8b585d67d02cb | Fix badges with static text | indico/modules/events/registration/badges.py | indico/modules/events/registration/badges.py | # This file is part of Indico.
# Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN).
#
# Indico 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 (a... | Python | 0.000001 | @@ -4543,29 +4543,28 @@
elif
-tpl_data.
+item%5B'
text
+'%5D
:%0A
@@ -4584,21 +4584,20 @@
t =
-tpl_data.
+item%5B'
text
+'%5D
%0A%0A
|
cd9374fba293f504e1b0a1112ca212fff77da7ef | Update plotlog.py | benchmark/paddle/image/plotlog.py | benchmark/paddle/image/plotlog.py | # Copyright (c) 2016 PaddlePaddle Authors. 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 applic... | Python | 0.000001 | @@ -2105,48 +2105,8 @@
ric,
- batch_id, graph_title, line_style='b-',
%0A
@@ -2110,32 +2110,42 @@
+batch_id,%0A
@@ -2135,32 +2135,46 @@
%0A
+ graph_title,%0A
@@ -2182,50 +2182,52 @@
ine_
-label='y',%0A
+style='b-'... |
dfcc76dc1b3ca01859401bea4573d63ffadb419c | test group api DELETE method is not allowed for admin | billjobs/tests/tests_group_api.py | billjobs/tests/tests_group_api.py | from rest_framework import status
from billjobs.tests.generics import GenericAPIStatusCode
class GroupAPIAnonymousStatusCode(GenericAPIStatusCode):
"""
Tests status code returned by /groups endpoint for anonymous user
Permissions are tested in tests_api.py
"""
def setUp(self):
super().setU... | Python | 0.000001 | @@ -2314,28 +2314,322 @@
TTP_405_METHOD_NOT_ALLOWED)%0A
+%0A def test_api_group_delete_is_405(self):%0A %22%22%22%0A Test group api with DELETE method return HTTP_405_METHOD_NOT_ALLOWED%0A %22%22%22%0A super().status_code_is(%0A 'DELETE', self.url, self.data,%0A ... |
4e539a2c35484fedbee2284e894b2e60635de83c | create initial models | mdot/models.py | mdot/models.py | from django.db import models
# Create your models here.
| Python | 0.000001 | @@ -26,32 +26,1780 @@
els%0A
-%0A# Create your models here.%0A
+from django.contrib.auth.models import User%0Afrom django.forms import ModelForm%0A%0A# Create your models here.%0A%0Aclass Sponsor(models.Model):%0A name = models.CharField(max_length = 50)%0A netid = models.CharField(max_length = 8)%0A title = ... |
5e68e35bade60e1c291739123c3ee7b2905bc6cf | Remove leading and trailing whitespace from keyworder match groups. | lib/rapidsms/parsers/keyworder.py | lib/rapidsms/parsers/keyworder.py | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import re
class Keyworder(object):
TOKEN_MAP = [
("slug", "([a-z0-9\-]+)"),
("letters", "([a-z]+)"),
("numbers", "(\d+)"),
("whatever", "(.+)")]
def __init__(self):
self.regexen = []
self.prefix = ""
... | Python | 0 | @@ -2396,36 +2396,153 @@
-return (func, match.groups()
+# clean up leading and trailing whitespace%0A groups = map(lambda x: x.strip(), match.groups())%0A return (func, groups
)%0A
|
f3bdf87a7c615647673a20d21b35c06bccb44db0 | Fix instrumentation for commands when running admin script. | instrument.py | instrument.py | from newrelic.agent import (background_task, function_trace,
add_custom_parameter, wrap_function_trace, wrap_background_task,
wrap_function_wrapper, current_transaction, ExternalTrace,
FunctionTraceWrapper)
def wrapper_register_ip(wrapped, instance, args, kwargs):
def _bind_params(domain, h... | Python | 0 | @@ -105,22 +105,17 @@
_trace,
-wrap_b
+B
ackgroun
@@ -115,21 +115,27 @@
ckground
-_t
+T
ask
+Wrapper
,%0A
@@ -932,190 +932,191 @@
rap_
-background_task(module, 'upload_database_command')%0A wrap_background_task(module, 'download_database_command')%0A%0A wrap_function_wrapper(module, 'register_ip', wr... |
c3cc948ceede66a70eadc300e558a42c8b06769b | Update change_names_miseq.py | scripts/change_names_miseq.py | scripts/change_names_miseq.py | #import sys
import os
import argparse
import shutil
parser = argparse.ArgumentParser(description='This program takes Miseq fastq files and renames them as sample.read_direction.#.fastq and keeps a log of the change')
parser.add_argument('-s',action='store',dest='s',help='The sorce directory containing the original fas... | Python | 0 | @@ -1090,16 +1090,17 @@
ir(s):%0A
+#
print
|
9a7fe0e881298dc92a97782586508dec249fa53e | Fix the breaking PayPal tests caused by card expiration in the past. | billing/tests/pay_pal_tests.py | billing/tests/pay_pal_tests.py | from django.test import TestCase
from billing import get_gateway, get_integration, CreditCard
from billing.signals import *
from paypal.pro.models import PayPalNVP
from billing.gateway import CardNotSupported
from billing.utils.credit_card import Visa
from paypal.pro.tests import RequestFactory
from django.template imp... | Python | 0 | @@ -1308,17 +1308,17 @@
year=201
-1
+7
, %0A
|
6d0bc825a1fd9184bf7b4007bfa82b69e5c7cb35 | fix search to use sites | binstar_client/commands/search.py | binstar_client/commands/search.py | '''
Search binstar for packages
'''
from binstar_client.utils import get_binstar
from binstar_client.utils.pprint import pprint_packages
import logging
log = logging.getLogger('binstar.search')
def search(args):
binstar = get_binstar()
log.info("Run 'binstar show <USER/PACKAGE>' to get more details:")
... | Python | 0 | @@ -206,20 +206,16 @@
(args):%0A
-
%0A bin
@@ -233,17 +233,22 @@
binstar(
-)
+args)%0A
%0A log
|
83e071dd64807d1064fdd60ee0788f385b5f9334 | Remove noise | bin/symlinks.py | bin/symlinks.py | #! /usr/bin/env python
import os
import fnmatch
def link(source, dest):
try:
if not os.path.exists(dest):
print("linking " + source + " to " + dest)
os.symlink(source,dest)
except:
print("fail")
def dotlink(source):
dest = os.environ['HOME'] + "/." + os.path.basena... | Python | 0.000094 | @@ -493,92 +493,8 @@
st)%0A
- else:%0A print(%22skipping %22 + source + %22 already links to %22 + dest)%0A
|
f2235451f014019f08b53ffa962529dc3bfb4f87 | simplify the on_change method as suggested by O. Dony | addons/sale_order_dates/sale_order_dates.py | addons/sale_order_dates/sale_order_dates.py | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | Python | 0.001094 | @@ -3906,1150 +3906,8 @@
e):%0A
- lang = self.pool.get(%22res.users%22).browse(cr, uid, uid,%0A context=context).context_lang%0A if lang:%0A lang_ids = self.pool.get('res.lang').search(cr, uid,%0A ... |
6f7d0ce060a29af86bd7cf98de6b6b23bb248fdd | Add missing Bus import in can/__init__.py | cantools/database/can/__init__.py | cantools/database/can/__init__.py | from .database import Database
from .message import Message
from .message import EncodeError
from .message import DecodeError
from .signal import Signal
from .node import Node
| Python | 0.00005 | @@ -169,8 +169,29 @@
rt Node%0A
+from .bus import Bus%0A
|
903130b5802f34f619187635fb4b205184abd3d9 | Add an example check | example/example.py | example/example.py | import netuitive
import time
import os
ApiClient = netuitive.Client(url=os.environ.get('API_URL'), api_key=os.environ.get('CUSTOM_API_KEY'))
MyElement = netuitive.Element()
MyElement.add_attribute('Language', 'Python')
MyElement.add_attribute('app_version', '7.0')
MyElement.add_relation('my_child_element')
MyEleme... | Python | 0 | @@ -754,16 +754,102 @@
Event)%0A%0A
+MyCheck = netuitive.Check('heartbeat', 'element', 60)%0A%0AApiClient.post_check(MyCheck)%0A%0A
if ApiCl
|
c01d7215ac2408af31ddb68c72590fcbe0b35739 | Update application_initializations.py | niftynet/engine/application_initializations.py | niftynet/engine/application_initializations.py | import tensorflow as tf
from tensorflow.python.ops import init_ops
"""
all classes and docs are taken from
https://github.com/tensorflow/tensorflow/blob/r1.3/tensorflow/python/ops/init_ops.py
"""
class Constant(object):
@staticmethod
def get_instance(args):
value = float(args.get('value'), 0.0)
... | Python | 0.000001 | @@ -303,15 +303,15 @@
lue'
-)
, 0.0)
+)
%0A
@@ -2173,14 +2173,14 @@
tor'
-)
,1.0)
+)
%0A
|
5869cd6bd043e9eee5bbddc4c2c82c9576c35535 | error if customer without countries | addons/website_customer/controllers/main.py | addons/website_customer/controllers/main.py | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import werkzeug.urls
from odoo import http
from odoo.addons.website.models.website import unslug
from odoo.tools.translate import _
from odoo.http import request
class WebsiteCustomer(http.Controller):
_references... | Python | 0.999999 | @@ -2199,22 +2199,9 @@
in
-map(lambda x:
+(
x%5B'c
@@ -2214,17 +2214,25 @@
_id'%5D%5B0%5D
-,
+ for x in
countri
@@ -2233,16 +2233,35 @@
ountries
+ if x%5B'country_id'%5D
):%0A
|
7764c0a7fac551a95439881e53c1b0c28d13d239 | Handle file existing on symlink | mesonbuild/scripts/yelphelper.py | mesonbuild/scripts/yelphelper.py | # Copyright 2016 The Meson development team
# 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 agreed to ... | Python | 0 | @@ -3461,16 +3461,201 @@
try:%0A
+ try:%0A os.symlink(srcfile, outfile)%0A except FileExistsError:%0A os.remove(outfile)%0A
|
306bfdd744ba71439cf569528c9e091d4e9c691e | Use the logger | bin/tools/amount_to_text_en.py | bin/tools/amount_to_text_en.py | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
#... | Python | 0 | @@ -3988,24 +3988,42 @@
re.%0A %22%22%22%0A
+ import netsvc%0A
if nbr %3E
@@ -4037,55 +4037,83 @@
00:%0A
-#TODO: use logger
+
-%0A
- print %22
+netsvc.Logger().notifyChannel('translate', netsvc.LOG_
WARNING
-: n
+, _(%22N
umbe
@@ -4133,17 +4133,19 @@
%25d', can
-'
+ no
t transl
@@ -415... |
38b09d43d74ba9550c548dc33648ea7f4217bdc0 | Replaced assert_ by assertEqual and assertTrue | blaze/compute/tests/test_where.py | blaze/compute/tests/test_where.py | from __future__ import absolute_import, division, print_function
import unittest
import numpy as np
from numpy.testing import assert_array_equal, assert_allclose
from dynd import nd, ndt
import blaze
import unittest
import tempfile
import os
import glob
import blaze
import blz
from blaze.optional_packages import t... | Python | 0.999991 | @@ -98,70 +98,8 @@
s np
-%0Afrom numpy.testing import assert_array_equal, assert_allclose
%0A%0Afr
@@ -2750,33 +2750,36 @@
self.assert
-_
+True
(isinstance(st,
@@ -2811,17 +2811,20 @@
f.assert
-_
+True
(isinsta
@@ -2877,17 +2877,21 @@
f.assert
-_
+Equal
(t.dshap
@@ -2899,19 +2899,17 @@
.measure
- ==
+,
... |
6909fc497041761eadb5a8b8947eeb21b7fdbcc8 | use GetManager method in example | examples/avatar.py | examples/avatar.py |
"""
Telepathy example which requests the avatar for the user's own handle and
displays it in a Gtk window.
"""
import dbus.glib
import gtk
import sys
from telepathy.constants import CONNECTION_STATUS_CONNECTED
from telepathy.interfaces import (
CONN_MGR_INTERFACE, CONN_INTERFACE, CONN_INTERFACE_AVATARS)
import t... | Python | 0.000002 | @@ -1614,25 +1614,16 @@
%0A mgr
-_bus_name
= reg.G
@@ -1628,149 +1628,23 @@
.Get
-BusName(manager)%0A mgr_object_path = reg.GetObjectPath(manager)%0A%0A mgr = telepathy.client.ConnectionManager(mgr_bus_name, mgr_object_path
+Manager(manager
)%0A
|
390e5001a90b1e54cad713cd822feb1dced1015e | update examples/batman -- now available by invitation as well | examples/batman.py | examples/batman.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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, ... | Python | 0 | @@ -4228,13 +4228,13 @@
_ON_
-START
+ENTER
'%5D =
@@ -4288,12 +4288,12 @@
_ON_
-STOP
+EXIT
'%5D =
@@ -4447,12 +4447,15 @@
ine.
-bond
+get_bot
(res
|
298a55b28fcc04e4085e14c6f2999e14cc224d60 | Replace previous bash command to new one (#7005) | lib/spack/spack/platforms/cray.py | lib/spack/spack/platforms/cray.py | # Copyright 2013-2019 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)
import os
import re
import llnl.util.tty as tty
from spack.paths import build_env_path
from spack.util.executable import w... | Python | 0.000001 | @@ -4497,509 +4497,178 @@
#
-Based on the incantation:%0A # echo %22$(env - USER=$USER /bin/bash -l -c 'module list -lt')%22%0A if getattr(self, 'default', None) is None:%0A env = which('env')%0A env.add_default_arg('-')%0A # CAUTION - $USER is generally needed in the ... |
26c8839edf0f756c746dee1e13f4332f0f3bf706 | Update bashdoor.py | lib/modules/python/privesc/multi/bashdoor.py | lib/modules/python/privesc/multi/bashdoor.py | class Module:
def __init__(self, mainMenu, params=[]):
# metadata info about the module, not modified during runtime
self.info = {
# name for the module that will appear in module menus
'Name': 'bashdoor',
# list of one or more authors for the module
... | Python | 0 | @@ -3602,15 +3602,8 @@
ary/
-iTunes/
.%22 +
|
cda7e0d2242e5cc3dafca63a3af01f150fcd37be | Fix seeds for new names | server/seed.py | server/seed.py | from tables import *
fira = Font(name='Fira Sans Regular', family_id=1, author_id=1)
fira.tags.append(Tag(text='#pretty', type='opinion'))
fira.tags.append(Tag(text='Latin', type='language'))
thread1 = Thread(title='I don\'t like this word')
thread1.glyphs.append(Glyph(name='A', version_hash='9c7075ca420f30aedb27c481... | Python | 0.000137 | @@ -27,17 +27,21 @@
= Font(
-n
+fontN
ame='Fir
@@ -265,25 +265,30 @@
ppend(Glyph(
-n
+glyphN
ame='A', ver
@@ -377,25 +377,30 @@
ppend(Glyph(
-n
+glyphN
ame='a', ver
@@ -493,17 +493,22 @@
d(Glyph(
-n
+glyphN
ame='s',
@@ -596,25 +596,29 @@
%5B%0A User(
-n
+userN
ame='Eva', p
@@ -648,17 +648,21 @@
User(... |
67f535f92d79de05aa10e86da3cdd635bc71537b | Use proper stacklevel for deprecation warnings | w3lib/util.py | w3lib/util.py | from warnings import warn
def str_to_unicode(text, encoding=None, errors='strict'):
warn(
"The w3lib.utils.str_to_unicode function is deprecated and "
"will be removed in a future release.",
DeprecationWarning
)
if encoding is None:
encoding = 'utf-8'
if isinstance(text... | Python | 0.000001 | @@ -224,32 +224,55 @@
precationWarning
+,%0A stacklevel=2,
%0A )%0A if en
@@ -611,32 +611,55 @@
precationWarning
+,%0A stacklevel=2,
%0A )%0A if en
@@ -2096,16 +2096,39 @@
nWarning
+,%0A stacklevel=2,
%0A )%0A
|
bc4cebcd5d6d0657f8e16a895fca31aad8e4ac16 | Add OG help texts | meta/models.py | meta/models.py | # -*- coding: utf-8 -*-
from django.contrib.contenttypes import generic
from django.db import models
from django.forms.models import model_to_dict
from .settings import CONTENT_MODELS
###
# MODELS
###
class BaseMetatag(models.Model):
'''
This class represent the whole meta tags class.
url is og:url
... | Python | 0 | @@ -295,128 +295,8 @@
s.%0A%0A
- url is og:url%0A title is og:title%0A image is og:image%0A object_type is og:type%0A site_name is og:site_name%0A%0A
@@ -310,16 +310,19 @@
# Meta
+tag
propert
@@ -596,17 +596,23 @@
)%0A%0A
-#
+'''%0A
OG prop
@@ -629,287 +629,1035 @@
ues%0A
- url... |
cdb92202470fe2b2a89b80cd1cec89d51f19d18e | Update urls.py | contentcuration/contentcuration/urls.py | contentcuration/contentcuration/urls.py | """URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based views... | Python | 0.000002 | @@ -1091,26 +1091,82 @@
ort
-serializers%0Aimport
+contentcuration.serializers as serializers%0Aimport contentcuration.views as
vie
|
24f7d137c7a0f58625543858b8f4a09f1dead859 | Update client.py | examples/client.py | examples/client.py | from controlhost import Client
with Client('131.188.161.241') as client:
client.subscribe('foo')
try:
while True:
prefix, message = client.get_message()
print prefix.tag
print prefix.length
print message
except KeyboardInterrupt:
client._disco... | Python | 0.000001 | @@ -43,21 +43,15 @@
t('1
-31.188.161.24
+27.0.0.
1')
|
535640d2d26beec2c8aa56386473abf4858419de | Fix mixed indentation. | bitey/loader.py | bitey/loader.py | # loader.py
"""
Import hook loader for LLVM bitcode files.
Use the install() method to install the loader into sys.meta_path. Use
the remove() method to uninstall it.
"""
import sys
import os.path
import imp
from . import bind
def _check_magic(filename):
if os.path.exists(filename):
magic = open(filename,"rb")... | Python | 0.000001 | @@ -285,17 +285,24 @@
ename):%0A
-%09
+
magic =
@@ -506,17 +506,24 @@
else:%0A
-%09
+
return F
@@ -1112,17 +1112,24 @@
tload):%0A
-%09
+
self.pac
@@ -1139,17 +1139,24 @@
e = pkg%0A
-%09
+
self.nam
@@ -1164,17 +1164,24 @@
= name%0A
-%09
+
self.ful
@@ -1209,17 +1209,2... |
a475173ce00b2d6686c601ffc46a8d2bc3ed0a7f | Switch back to development version | dogen/version.py | dogen/version.py | version = "2.0.0"
| Python | 0 | @@ -10,9 +10,16 @@
%222.
-0.0
+1.0rc1.dev
%22%0A
|
57807697362d084afa92e45e24be155e5615e07f | make mv command work under Windows | src/CommandLineOperator.py | src/CommandLineOperator.py | #!/usr/bin/env python
# encoding: utf-8
"""
CommandLineOperator.py
Created by Tomas Knapen on 2010-09-23.
Copyright (c) 2010 __MyCompanyName__. All rights reserved.
"""
import os, sys, subprocess, shutil
import tempfile, logging
import re
import scipy as sp
import numpy as np
import matplotlib.pylab as pl
from IPytho... | Python | 0.000001 | @@ -4304,16 +4304,17 @@
h('win')
+:
%0A
|
c7439eb0d8a88a3a3584a3e73ed9badc910dcd05 | Move newrelic initialization to the very start of wsgi initialization | contentcuration/contentcuration/wsgi.py | contentcuration/contentcuration/wsgi.py | """
WSGI config for contentcuration 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("DJAN... | Python | 0 | @@ -235,12 +235,152 @@
ort
-os%0A%0A
+logging%0Aimport os%0A%0A# Attach newrelic APM%0Atry:%0A import newrelic.agent%0A%0A newrelic.agent.initialize()%0Aexcept ImportError:%0A pass%0A%0Atry:%0A
from
@@ -425,17 +425,20 @@
ication%0A
-%0A
+
os.envir
@@ -509,158 +509,129 @@
s%22)%0A
-%0A# Attach new... |
a765ddc7782f1e17aeba23b2a66b61986e20351c | Stop popen patch correctly in test_agent_linux_utils | neutron/tests/unit/test_agent_linux_utils.py | neutron/tests/unit/test_agent_linux_utils.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012, Nicira, Inc.
#
# 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.000001 | @@ -1086,24 +1086,33 @@
-instance
+self.mock_popen_p
= mock.
@@ -1179,16 +1179,25 @@
n =
-instance
+self.mock_popen_p
.sta
@@ -1240,16 +1240,18 @@
ck_popen
+_p
.stop)%0A%0A
|
55d54f67111583dab4209639ef8e3d6430ea7939 | Handle oversteer in turns. | src/Command_Interpreter.py | src/Command_Interpreter.py | # Motor driver for QuickBot_Follow.
# John Brewer 3/31/16
# Copyright (C) 2016 Jera Design LLC
# All Rights Reserverd
import Motor_Driver
import sys
Motor_Driver.init_pins()
print "Ready"
while True:
line = sys.stdin.readline().rstrip()
if not line:
break;
if line == "left":
print "turn... | Python | 0 | @@ -143,16 +143,39 @@
port sys
+%0Afrom time import sleep
%0A%0AMotor_
@@ -209,16 +209,37 @@
Ready%22%0A%0A
+last = %22%22%0Acount = 0%0A%0A
while Tr
@@ -364,16 +364,186 @@
n left%22%0A
+ if last != %22left%22:%0A count = 10%0A last = %22left%22%0A continue%0A if coun... |
262dc0ebe113056e21010e061234dd6989a80a70 | modify API to add parents | src/obudget/budget_lines/handlers.py | src/obudget/budget_lines/handlers.py | from datetime import datetime
import urllib
from django.db.models import Q
from django.contrib.contenttypes.models import ContentType
from django.core.urlresolvers import reverse
from django.core.cache import cache
from django.db.models import Count
from piston.resource import Resource
from piston.handler import BaseHa... | Python | 0 | @@ -1992,16 +1992,55 @@
'year',
+%0A 'parent',%0A
)%0A %0A
@@ -2421,16 +2421,319 @@
eturn qs
+%0A %0A @classmethod%0A def parent(self, line):%0A l = line.containing_line%0A parent = %5B%5D%0A while l != None:%0A parent.append(%7B 'budget_id' : ... |
6486a888cbcec7285df92020f76e3f1c5fbba0e2 | Load exchange rates in test setup. Make it posible to use --keepdb | bluebottle/test/test_runner.py | bluebottle/test/test_runner.py | from django.test.runner import DiscoverRunner
from django.db import connection
from tenant_schemas.utils import get_tenant_model
from bluebottle.test.utils import InitProjectDataMixin
class MultiTenantRunner(DiscoverRunner, InitProjectDataMixin):
def setup_databases(self, *args, **kwargs):
result = supe... | Python | 0 | @@ -71,16 +71,51 @@
nnection
+%0Afrom django.core import management
%0A%0Afrom t
@@ -538,16 +538,26 @@
tenant2
+, _created
= get_t
@@ -561,32 +561,54 @@
t_tenant_model()
+.objects.get_or_create
(%0A do
@@ -926,32 +926,113 @@
hema_to_public()
+%0A%0A management.call_command('loaddata', 'exchan... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.