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
022e8a8099c154789d8c2cde925f54639c2ae1b6
Fix query
ogn/collect/ognrange.py
ogn/collect/ognrange.py
from celery.utils.log import get_task_logger from sqlalchemy import String from sqlalchemy import and_, insert, update, exists, between from sqlalchemy.sql import func, null from sqlalchemy.sql.expression import literal_column from ogn.collect.celery import app from ogn.model import AircraftBeacon, ReceiverCoverage f...
Python
0.999801
@@ -68,16 +68,22 @@ t String +, Date %0Afrom sq @@ -1781,63 +1781,28 @@ -literal_column(%22'%7B%7D'%22.format(date.strftime('%25Y-%25m-%25d')) +func.cast(date, Date ).la @@ -2600,32 +2600,24 @@ age.date == -query.c. date)) %5C%0A @@ -3374,32 +3374,32 @@ .c.receiver_id,%0A + @@ -3424,24...
a5b5acb62466c77e665f81692970ce6b2976b778
extend handshake test
devp2p/tests/test_peer.py
devp2p/tests/test_peer.py
from devp2p import peermanager from devp2p import crypto from devp2p.app import BaseApp import devp2p.muxsession import rlp import devp2p.p2p_protocol import time import gevent import copy def get_connected_apps(): a_config = dict(p2p=dict(listen_host='127.0.0.1', listen_port=3000), node=dict(...
Python
0.000002
@@ -1134,32 +1134,120 @@ gevent.sleep(1)%0A + assert a_app.services.peermanager.peers%0A assert b_app.services.peermanager.peers%0A a_app.stop()
e844847323a39f8bfd1870a21071f9f07f110274
manage password
models/user.py
models/user.py
from peewee import CharField, DateTimeField from flask_login import UserMixin from hashlib import sha1 from time import mktime import datetime from models.base import BaseModel class User(BaseModel, UserMixin): created = DateTimeField(default=datetime.datetime.now) email = CharField(max_length=50) passwo...
Python
0.000004
@@ -456,16 +456,117 @@ user. +update_password(password)%0A return user%0A%0A def update_password(self, password):%0A self. password @@ -610,36 +610,16 @@ digest() -%0A return user %0A%0A de
648b4e6ed9f998c735226549b9cd2c62d82336d7
Make display of reference stack line defaulting to False
django/projects/mysite/settings_base.py
django/projects/mysite/settings_base.py
# General Django settings for mysite project. import django.conf.global_settings as DEFAULT_SETTINGS # A list of people who get code error notifications. They will get an email # if DEBUG=False and a view raises an exception. ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) # A tuple in the same format as ...
Python
0.999959
@@ -2868,19 +2868,20 @@ LINES = -Tru +Fals e%0APROFIL
d2bf3f6d830fb5d4f929af324052f1699c82fcb7
fix modified files not being updated
mopidy/local/commands.py
mopidy/local/commands.py
from __future__ import print_function, unicode_literals import logging import os import time from mopidy import commands, exceptions from mopidy.audio import scan from mopidy.local import translator from mopidy.utils import path logger = logging.getLogger(__name__) def _get_library(args, config): libraries = ...
Python
0
@@ -2193,40 +2193,8 @@ g)%0A%0A - uris_in_library = set()%0A @@ -2852,18 +2852,17 @@ ris_ -in_library +to_update .add
31381728cb8d76314c82833d4400b4140fcc573f
Change parameter name so it does not conflict with an url parameter called "name".
django_jinja/builtins/global_context.py
django_jinja/builtins/global_context.py
# -*- coding: utf-8 -*- import logging from django.conf import settings from django.core.urlresolvers import reverse as django_reverse, NoReverseMatch from django.contrib.staticfiles.storage import staticfiles_storage JINJA2_MUTE_URLRESOLVE_EXCEPTIONS = getattr(settings, "JINJA2_MUTE_URLRESOLVE_EXCEPTIONS", False) l...
Python
0.000001
@@ -359,16 +359,21 @@ def url( +view_ name, *a @@ -700,16 +700,21 @@ reverse( +view_ name, ar
4ae3d012fefdf10448f88c9de34c182b0a6b9f9f
fix paths in test
marmot/features/tests/test_alignment_feature_extractor.py
marmot/features/tests/test_alignment_feature_extractor.py
#!/usr/bin/python # -*- coding: utf-8 -*- import os, glob from subprocess import call import unittest from marmot.features.alignment_feature_extractor import AlignmentFeatureExtractor class AlignmentFeatureExtractorTests(unittest.TestCase): def setUp(self): self.module_path = os.path.dirname(os.path.rea...
Python
0.000007
@@ -397,32 +397,38 @@ ./preprocessing/ +tests/ test_data/corpus @@ -508,24 +508,30 @@ eprocessing/ +tests/ test_data/co @@ -1621,17 +1621,16 @@ tractor( - src_file
6dffa2d22fa5da3b2d8fbcdff04477ff0116bfc1
Resolve a bug in the write function
utilities.py
utilities.py
# Function to return a list of pvs from a given file import pkg_resources pkg_resources.require('aphla') import aphla as ap def get_pv_names(mode): ''' Given a certain ring mode as a string, return all available pvs ''' ap.machines.load(mode) result = set() elements = ap.getElements('*') for el...
Python
0.00024
@@ -809,17 +809,18 @@ (element -, + + '%5Cn')%0A
1002b81ba5d612271a1e4c33e411eed01398f6fa
Remove not needed env string
dhcpcanon/clientscript.py
dhcpcanon/clientscript.py
# """""" from __future__ import unicode_literals import os import logging import attr import subprocess from constants import STATES2REASONS logger = logging.getLogger('dhcpcanon') @attr.s class ClientScript(object): """Simulates the behaviour of isc-dhcp client-script or Network Manager nm-dhcp-helper. ...
Python
0.00082
@@ -1837,111 +1837,8 @@ env%0A - envstr = %22%5Cn%22.join(%5B%22%25s='%25s'%22 %25 (k, v) for (k, v) in%0A env.items()%5D)%0A
c829f5328065e4051160a3ee7d99c061bb41f08c
add additional args to yum commands
pyinfra/modules/yum.py
pyinfra/modules/yum.py
''' Manage yum packages and repositories. Note that yum package names are case-sensitive. ''' from __future__ import unicode_literals from six import StringIO from six.moves.urllib.parse import urlparse from pyinfra.api import operation from . import files from .util.packaging import ensure_packages @operation de...
Python
0.000001
@@ -3885,16 +3885,69 @@ =False,%0A + installArgs='', updateArgs='', uninstallArgs='',%0A ):%0A ' @@ -4224,16 +4224,219 @@ um clean +%0A + installArgs: additional arguments to the yum install command%0A + updateArgs: additional arguments to the yum update command%0A + uninstallArgs: additional argument...
d09fa37069dd6f107d464870d2c59c05fd9625d6
add tool menu flag
sansview/local_config.py
sansview/local_config.py
""" Application settings """ import time import os from sans.guiframe.gui_style import GUIFRAME # Version of the application __appname__ = "SansView" __version__ = '1.9_release_candidate' __download_page__ = 'http://danse.chem.utk.edu' __update_URL__ = 'http://danse.chem.utk.edu/sansview_version.php' ...
Python
0.000002
@@ -1958,16 +1958,39 @@ NAGER_ON +%7CGUIFRAME.CALCULATOR_ON %0D%0ASPLASH
f6a5bb4784bc069813e68278a8f78abacd49f4f6
raise exception when parsing XML failed and libxml2 was the backend
bakefile/src/xmlparser.py
bakefile/src/xmlparser.py
class Element: def __init__(self): self.name = None self.value = None self.props = {} self.children = [] self.filename = None self.lineno = None def __copy__(self): x = Element() x.name = self.name x.value = self.value x.props = s...
Python
0.000004
@@ -674,16 +674,84 @@ pass%0A%0A +def __libxml2err(ctx, str):%0A print str%0A raise ParsingError()%0A%0A def __pa @@ -3178,16 +3178,70 @@ Libxml2%0A + libxml2.registerErrorHandler(__libxml2err, %22--%3E%22)%0A except(I
3cf13b783a1aa3a5bd956d38ad2ca193bc67f1ae
Fix call
pyproteome/__init__.py
pyproteome/__init__.py
from .utils import DEFAULT_DPI from .analysis import ( correlation, tables, volcano, ) from .motifs import ( logo, motif, phosphosite, ) from . import ( analysis, bca, data_sets, discoverer, levels, loading, modification, motifs, paths, pride, protein, sequence, utils, version, ) from . import clus...
Python
0.000001
@@ -462,16 +462,44 @@ ne%0A%0A%0Aif +get_ipython is not None and get_ipyt
55f4507c2285b5927e911a455065dd9c6d60112a
add a Node.__repr__ method
pypuppetdbquery/ast.py
pypuppetdbquery/ast.py
# -*- coding: utf-8 -*- # # This file is part of pypuppetdbquery. # Copyright © 2016 Chris Boot <bootc@bootc.net> # # 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.or...
Python
0
@@ -655,16 +655,32 @@ cense.%0A%0A +import inspect%0A%0A %0Aclass N @@ -692,28 +692,520 @@ bject):%0A -pass +def __repr__(self):%0A # Represent the variables defined in the constructor in the same order%0A # that they are listed in the constructor.%0A members = %5B%5D%0A for var in in...
4be8aea26f5dbec2c93413f6e545a47e850a7382
Mark test as xfail due to new connection factory behavior
irc/tests/test_client.py
irc/tests/test_client.py
import datetime import random import pytest import mock import irc.client def test_version(): assert 'VERSION' in vars(irc.client) assert isinstance(irc.client.VERSION, tuple) assert irc.client.VERSION, "No VERSION detected." def test_delayed_command_order(): """ delayed commands should be sorted by delay time...
Python
0
@@ -974,32 +974,106 @@ sg(socket_mod):%0A +%09pytest.xfail(%22Fails because server finds 'write' method on mock socket%22)%0A %09server = irc.cl
0314334373b380c41e72ed41bfef1f7cbc65b894
Add CAN_DETECT
bears/yml/YAMLLintBear.py
bears/yml/YAMLLintBear.py
from coalib.bearlib.abstractions.Linter import linter from coalib.bears.requirements.PipRequirement import PipRequirement @linter(executable='yamllint', output_format="regex", output_regex=r'.+:(?P<line>\d+):(?P<column>\d+): ' r'\[(?P<severity>error|warning)\] (?P<message>.+)') cl...
Python
0.000235
@@ -704,16 +704,58 @@ GPL-3.0' +%0A CAN_DETECT = %7B'Syntax', 'Formatting'%7D %0A%0A @s
0d9b29c80502f8c4f23920ec65bc89093d553e47
Corrige numero da versao do pacote
pysigep/__version__.py
pysigep/__version__.py
__title__ = 'pysigep' __description__ = 'API python para uso dos serviços fornecidos pelo ' \ 'SIGEPWeb dos Correios ' __version__ = '0.4.4' __url__ = 'https://github.com/mstuttgart/pysigep' __download_url__ = 'https://github.com/mstuttgart/pysigep' __author__ = 'Michell Stuttgart' __author_email__ = ...
Python
0
@@ -151,11 +151,11 @@ '0. -4.4 +1.0 '%0A__
1a0c9bb4cf26e75745398cdfa38252c250267d9a
add show plot in example code
librosa/feature/rhythm.py
librosa/feature/rhythm.py
#!/usr/bin/env python # -*- coding: utf-8 -*- '''Rhythmic feature extraction''' import numpy as np from .. import util from ..core.audio import autocorrelate from ..util.exceptions import ParameterError from ..filters import get_window __all__ = ['tempogram'] # -- Rhythmic features -- # def tempogram(y=None, sr=...
Python
0
@@ -4795,16 +4795,35 @@ ayout()%0A + %3E%3E%3E plt.show()%0A '''%0A
124d202ee6c18b79e5baf560b1cbfaddf47ed194
allow runtests.py to run only certain tests
mpmath/tests/runtests.py
mpmath/tests/runtests.py
#!/usr/bin/env python """ python runtests.py -py Use py.test to run tests (more useful for debugging) python runtests.py -psyco Enable psyco to make tests run about 50% faster python runtests.py -profile Generate profile stats (this is much slower) python runtests.py -nogmpy Run tests without u...
Python
0.000004
@@ -504,24 +504,156 @@ l mpmath%0D%0A%0D%0A +Additional arguments are used to filter the tests to run. Only files that have%0D%0Aone of the arguments in their name are executed.%0D%0A%0D%0A %22%22%22%0D%0A%0D%0Aimpor @@ -1387,16 +1387,45 @@ s = %5B%5D%0D%0A + args = sys.argv%5B1:%5D%0D%0A @@ -1518,1...
e023c87a8ce566e6fd320677d0c9c7269665e6e4
add -r resolution argument
python/data_browser.py
python/data_browser.py
#!/usr/bin/python import numpy as np import argparse import glob #from obspy import Stream ''' Author: Qingkai Kong, qingkai.kong@gmail.com This is a script quickly view station on maps and the waveforms. It plots map of the stations on the top, and the waveform data at bottom. When you select the station on the...
Python
0.000001
@@ -3159,16 +3159,158 @@ umber') +%0A %0A parser.add_argument('-r', '--resolution', action='store',%0A help='specify input files as strings') @@ -3775,24 +3775,121 @@ %0A + resolution = results.resolution%0A if not resolution:%0A resolution =...
c9157639b1e412d9d13fcfca8bf4e0f04858e323
Fix tempfile cleanup.
betago/corpora/archive.py
betago/corpora/archive.py
import os import shutil import tarfile import tempfile from contextlib import contextmanager from operator import attrgetter __all__ = [ 'SGF', 'find_sgfs', ] class SafetyError(Exception): pass class SGF(object): def __init__(self, locator, contents): self.locator = locator self.con...
Python
0
@@ -2970,24 +2970,37 @@ ll(tempdir)%0A + try:%0A yield %5BS @@ -3091,24 +3091,28 @@ %0A + for sgf_name @@ -3126,16 +3126,33 @@ _names%5D%0A + finally:%0A shut @@ -3166,24 +3166,28 @@ ee(tempdir)%0A + tf.close
2373734b9eda5c887621ee64a2ca755850685699
test c-model
transiNXOR_modeling/transixor_predictor.py
transiNXOR_modeling/transixor_predictor.py
import sys sys.path.append('../') import numpy as np from itertools import product from pinn_api import predict_ids_grads, predict_ids import matplotlib.pyplot as plt import glob ## ------------ True data --------------- ids_file = glob.glob('./transiXOR_data/current_D9.npy') # ids_file = glob.glob('./transiXOR_data...
Python
0.000005
@@ -1547,16 +1547,18 @@ show()%0A%0A +# ids_true @@ -1580,16 +1580,18 @@ 20, :%5D%0A +# vtg_true @@ -1620,16 +1620,18 @@ .3, 41)%0A +# plt.plot @@ -1651,16 +1651,18 @@ d, 'r')%0A +# plt.plot @@ -1682,16 +1682,18 @@ s_true)%0A +# plt.show @@ -1695,16 +1695,18 @@ .show()%0A +# plt.semi @@ -1739,16 +173...
56a78baf677a345ae23035111f978dd695407d48
Bump version to 0.6.6 (#4621)
python/ray/__init__.py
python/ray/__init__.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys if "pyarrow" in sys.modules: raise ImportError("Ray must be imported before pyarrow because Ray " "requires a specific version of pyarrow (which is " ...
Python
0
@@ -2754,16 +2754,11 @@ %220. -7.0.dev2 +6.6 %22%0A%0A_
99cd22c7a727b5a45ac0391f0d3aa0e79f7dd107
Return the actual status code that was returned
jacquard/commands_dev.py
jacquard/commands_dev.py
"""Useful commands for Jacquard development.""" import io import json import functools import itertools import contextlib from werkzeug.test import Client from jacquard.cli import main as run_command from jacquard.service import get_wsgi_app from jacquard.commands import BaseCommand, CommandError from jacquard.utils...
Python
0.000097
@@ -7115,28 +7115,46 @@ or(%22 -Class 4 or 5 status%22 +Status: %7B%7D%22.format(result.status_code) )%0A
168b29e28dd3b48f4b4fc3ce82daa0e13ffa7223
Use Cython i.o. setuptools
python/smurff/setup.py
python/smurff/setup.py
import subprocess from setuptools import setup from setuptools import Extension from Cython.Build import build_ext import numpy import numpy.distutils.system_info as sysinfo import sys import os lapack_opt_info = sysinfo.get_info("lapack_opt") # {'libraries': ['mkl_rt', 'pthread'], # 'library_dirs': ['/Users/vandera...
Python
0
@@ -42,32 +42,38 @@ setup%0Afrom -setuptoo +Cython.Distuti ls import Ex @@ -96,13 +96,17 @@ hon. -Build +Distutils imp
d692ed6c48fc36b296b9a3e952dd1f70b133210c
add migrate script to remove ezid from suggestions
portality/migrate/p1p2/suggestionrestructure.py
portality/migrate/p1p2/suggestionrestructure.py
from portality import models, settings import requests, json # first thing to do is delete suggestions which are marked "waiting for answer" q = { "query" : { "bool" : { "must" : [ {"term" : {"admin.application_status.exact" : "waiting for answer"}} ] } ...
Python
0
@@ -1186,24 +1186,263 @@ %22)%0A %0A + # remove any EzID from the persistent identifier schemes%0A pids = s.bibjson().persistent_identifier_scheme%0A if %22EzID%22 in pids:%0A i = pids.index(%22EzID%22)%0A del pids%5Bi%5D%0A s.bibjson().persistent_identifier_scheme = pids%0A %0A ...
4bc871aaa72fa1d793203e5627a2ac5f859ae27d
add dependencies; still incomplete
tardis/montecarlo/setup_package.py
tardis/montecarlo/setup_package.py
#setting the right include from setuptools import Extension import numpy as np import os from astropy_helpers.setup_helpers import get_distutils_option from glob import glob if get_distutils_option('with_openmp', ['build', 'install', 'develop']) is not None: compile_args = ['-fopenmp', '-W', '-Wall', '-Wmissing-p...
Python
0
@@ -855,16 +855,263 @@ '*.c'))%5D +%0A deps = %5Bos.path.relpath(fname) for fname in glob(%0A os.path.join(os.path.dirname(__file__), 'src', '*.h'))%5D%0A deps += %5Bos.path.relpath(fname) for fname in glob(%0A os.path.join(os.path.dirname(__file__), 'src/randomkit', '*.h'))%5D %0A%0A re @@ -13...
df16f3e9c49ba2fb3cdbfdc62e120c6358eb25f9
Add 'dump_header' function
edgedb/lang/common/markup/__init__.py
edgedb/lang/common/markup/__init__.py
## # Copyright (c) 2011 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## from . import elements, serializer, renderers from .serializer import serialize from .serializer import base as _base_serializer from semantix.exceptions import ExceptionContext as _ExceptionContext from semantix.utils import ...
Python
0.000005
@@ -1068,32 +1068,176 @@ p, file=file)%0A%0A%0A +def dump_header(header, file=None):%0A markup = elements.doc.Section(title=header, body=%5B%5D)%0A renderers.terminal.render(markup, file=file)%0A%0A%0A def dump(obj, *,
551c99864e6082aeb43e4e78e545720cecde5679
Use find for URL exclusions, rather than match
modules/url.py
modules/url.py
#!/usr/bin/env python """ url.py - Willie URL title module Copyright 2010-2011, Michael Yanovich, yanovich.net, Kenneth Sham Copyright 2012 Edward Powell Licensed under the Eiffel Forum License 2. http://willie.dftba.net """ import re from htmlentitydefs import name2codepoint import web import unicodedata import urlp...
Python
0
@@ -4050,21 +4050,20 @@ pattern. -match +find (match)
9aeecaac014e67e5ad55b670be2dc4ab5dd95b5f
decrease max files size limit from 2mb to 250kb (#3602)
ecommerce/extensions/offer/constants.py
ecommerce/extensions/offer/constants.py
from django.utils.translation import ugettext_lazy as _ DYNAMIC_DISCOUNT_FLAG = 'offer.dynamic_discount' # OfferAssignment status constants defined here to avoid circular dependency. OFFER_ASSIGNMENT_EMAIL_PENDING = 'EMAIL_PENDING' OFFER_ASSIGNED = 'ASSIGNED' OFFER_REDEEMED = 'REDEEMED' OFFER_ASSIGNMENT_EMAIL_BOUNCED...
Python
0
@@ -2845,16 +2845,23 @@ achments +: 250kb %0AMAX_FIL @@ -2887,11 +2887,10 @@ = 2 -097152 +56000 %0A
ab6e5754283999ece4e77da959c6f9c868b964a7
Add Security Manager information
variables.py
variables.py
""" Define the variables in a module. """ NOT_EVALUATED_PHASE = 'Not Evaluated' NOT_STARTED_PHASE = 'Not Started' IN_PROGRESS_PHASE = 'In Progress' DONE_PHASE = 'Done'
Python
0
@@ -1,11 +1,12 @@ %22%22%22 +%0D %0ADefine @@ -35,14 +35,18 @@ ule. -%0A +%0D%0A%0D %0A%22%22%22 -%0A +%0D%0A%0D %0ANOT @@ -79,16 +79,17 @@ aluated' +%0D %0ANOT_STA @@ -114,16 +114,17 @@ Started' +%0D %0AIN_PROG @@ -149,16 +149,17 @@ rogress' +%0D %0ADONE_PH @@ -170,9 +170,151 @@ = 'Done' +%0D%0A%0D%0ASECU...
e44021fff840435fe49aaef1a1531cb2ccf44e43
Add back to "rebuild_data" command
project/api/management/commands/rebuild_data.py
project/api/management/commands/rebuild_data.py
# Django from django.apps import apps from django.core.management.base import BaseCommand from django.utils import timezone import datetime class Command(BaseCommand): help = "Command to rebuild denorms." def add_arguments(self, parser): parser.add_argument( '--days', type=int...
Python
0.000005
@@ -1361,34 +1361,32 @@ .group')%0A - # Group.objects.d @@ -1410,34 +1410,32 @@ =cursor)%0A - # Group.objects.s @@ -1452,18 +1452,16 @@ %0A - # Group.o
f728e80b97343aba18e39972b3208ccaafa43dd0
add test for create_schedule with "cron" = ""
tdclient/test/schedule_api_test.py
tdclient/test/schedule_api_test.py
#!/usr/bin/env python from __future__ import print_function from __future__ import unicode_literals try: from unittest import mock except ImportError: import mock import pytest from tdclient import api from tdclient.test.test_helper import * def setup_function(function): unset_environ() def test_create...
Python
0
@@ -921,16 +921,458 @@ # UTC%0A%0A +def test_create_schedule_without_cron_success():%0A td = api.API(%22APIKEY%22)%0A # TODO: should be replaced by wire dump%0A body = b%22%22%22%0A %7B%0A %22start%22: null%0A %7D%0A %22%22%22%0A td.post = mock.MagicMock(return_value=make_respo...
b24ed88670460f9037b6fbfa17a37d7912d45af9
Fix test that fails when you have a SMTP server on localhost
openspending/ui/test/functional/test_account.py
openspending/ui/test/functional/test_account.py
from .. import ControllerTestCase, url, helpers as h from openspending.model import Account, meta as db from openspending.lib.mailer import MailerException import json class TestAccountController(ControllerTestCase): def test_login(self): response = self.app.get(url(controller='account', action='login'))...
Python
0.000001
@@ -149,16 +149,42 @@ ception%0A +from pylons import config%0A import j @@ -1947,32 +1947,173 @@ _post_ok(self):%0A + try:%0A original_smtp_server = config.get('smtp_server')%0A config%5B'smtp_server'%5D = 'non-existent-smtp-server'%0A account @@ -2123,32 +2123,36 @@ .make...
d37a36cea14bbb9c050196ccf42251db6250f3c0
Add ManyToMAnyFields
project_template/project_name/dolphin/models.py
project_template/project_name/dolphin/models.py
from __future__ import unicode_literals from django.db import models class Actor(models.Model): actor_id = models.IntegerField(primary_key=True) first_name = models.CharField(max_length=45) last_name = models.CharField(max_length=45) last_update = models.DateTimeField() def __unicode__(self): ...
Python
0.000001
@@ -273,32 +273,96 @@ .DateTimeField() +%0A films = models.ManyToManyField('Film', through='FilmActor') %0A%0A def __unic @@ -1213,32 +1213,99 @@ .DateTimeField() +%0A films = models.ManyToManyField('Film', through='FilmCategory') %0A%0A def __unic @@ -3570,16 +3570,154 @@ a guess. +%0A categories =...
53cc5af4a43f0dd8a5a2943a1f62250914f4635d
exclude unnecessary paths from GA
ndohyep/settings/base.py
ndohyep/settings/base.py
""" Django settings for base ndohyep. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ from os.path import abspath, dirname, join from django.conf import global_set...
Python
0.000002
@@ -6159,16 +6159,21 @@ PATH = %5B +%0A '/health @@ -6176,16 +6176,74 @@ alth/', +'/favicon.ico', '/robots.txt', '/admin/', '/django-admin/' %5D%0A%0A%0A# Ce
48b33bedda0da0ad324f8f7a3ac2fbafa8e6f665
change issue commit to markdown
moment/main.py
moment/main.py
from sanic import Sanic from sanic.response import json as response_json import aiohttp import json from moment.gitlab_message_dict import get_dingtalk_data app = Sanic(__name__) async def post(url, json_data): headers = { "Content-Type": "application/json" } conn = aiohttp.TCPConnector(verify_ss...
Python
0
@@ -681,16 +681,25 @@ est.body +.decode() %7D')%0A
8ec6b8b6c2f099261f85a3f68b5d6e87cbdb1c25
set context to none for ws://
src/mattermostdriver/websocket.py
src/mattermostdriver/websocket.py
import json import ssl import asyncio import logging import websockets logging.basicConfig(level=logging.INFO) log = logging.getLogger('mattermostdriver.websocket') class Websocket: def __init__(self, options, token): self.options = options self._token = token @asyncio.coroutine def connect(self, event_handl...
Python
0.000014
@@ -852,16 +852,34 @@ 'ws://' +%0A%09%09%09context = None %0A%0A%09%09url @@ -2812,28 +2812,29 @@ from event_handler(message) +%0A
63529c668acaa196ca8480c70a0d19edd2c7baa0
Replace Bounty.data with dict
common/bounty.py
common/bounty.py
import os, pickle, re, sys from common.safeprint import safeprint from multiprocessing import Lock from hashlib import sha256 global bountyList global bountyLock global bountyPath bountyList = [] bountyLock = Lock() bountyPath = "data" + os.sep + "bounties.pickle" class Bounty(object): ip = "" btc = "" reward =...
Python
0.999992
@@ -325,18 +325,18 @@ data = -%5B%5D +%7B%7D %0A %0A de @@ -560,15 +560,15 @@ data -List=%5B%5D +Dict=%7B%7D ):%0A @@ -667,19 +667,19 @@ a = data -Lis +Dic t%0A %0A
238c49d4fb1fe67ffd63ed7b9dc5dce0915ae389
remove internationalisation of uri. fix issue #2
django_authopenid/urls.py
django_authopenid/urls.py
# -*- coding: utf-8 -*- from django.conf.urls.defaults import patterns, url from django.utils.translation import ugettext as _ urlpatterns = patterns('django_authopenid.views', # yadis rdf url(r'^yadis.xrdf$', 'xrdf', name='yadis_xrdf'), # manage account registration url(r'^%s$' % _('signin/'), 'signi...
Python
0.000001
@@ -290,27 +290,17 @@ (r'%5E -%25s$' %25 _(' signin/ +$ ' -) , 's @@ -343,26 +343,16 @@ (r'%5E -%25s$' %25 _(' signout/ '), @@ -347,18 +347,18 @@ signout/ +$ ' -) , 'signo @@ -399,35 +399,15 @@ (r'%5E -%25s%25s$' %25 (_('signin/'), _(' +signin/ comp @@ -415,11 +415,10 @@ ete/ +$ ' -)) , 'c @@ -438,17 +4...
1e0079b168a598ca2e5dcbb97503d08b7f927a09
Update check_permissions to better reflect what the server requires.
montage/api.py
montage/api.py
import mimetypes __all__ = ('DataAPI', 'FileAPI', 'RoleAPI', 'SchemaAPI') class DocumentsAPI(object): def __init__(self, client): self.client = client def save(self, schema, *documents): endpoint = 'schemas/{0}/documents'.format(schema, schema) return self.client.request(endpoint, me...
Python
0
@@ -3175,21 +3175,16 @@ , action -=None , resour @@ -3204,33 +3204,32 @@ payload = %7B -%7D %0A if acti @@ -3225,47 +3225,20 @@ -if action:%0A payload%5B + 'action' %5D = @@ -3237,27 +3237,27 @@ ion' -%5D = +: action -%0A +,%0A if r @@ -3256,19 +3256,20 @@ -i...
62ef1602ab3caa0b0730a19d9c5e146d2d320c0c
update url
osmaxx/excerptexport/models/extraction_order.py
osmaxx/excerptexport/models/extraction_order.py
import json from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_save from django.dispatch.dispatcher import receiver from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from django_enumfield import en...
Python
0.000001
@@ -5316,56 +5316,20 @@ ort: -status', kwargs=%7B'extraction_order_id': self.id%7D +export_list' )%0A%0A
fe314468c4a8c02650b3b983a239acd06bfc003f
Improve config file handling on the job.
lobster/cmssw/data/job.py
lobster/cmssw/data/job.py
#!/usr/bin/env python import base64 import json import os import pickle import subprocess import sys def edit_process_source(cmssw_config_file, config_params): (dataset_files, lumis) = config_params config = open(cmssw_config_file, 'a') with open(cmssw_config_file, 'a') as config: fragment = ('imp...
Python
0
@@ -66,16 +66,30 @@ pickle%0A +import shutil%0A import s @@ -110,16 +110,288 @@ rt sys%0A%0A +fragment = %22%22%22import FWCore.ParameterSet.Config as cms%0Aprocess.source.fileNames = cms.untracked.vstring(%7Binput_files%7D)%0Aprocess.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(-1))%0Aprocess.source....
95a21d9c758e471f7d458f6dc597d615605afe73
Add function to derive iRODS zone name and use to make correct collection
jicirodsmanager/irods.py
jicirodsmanager/irods.py
"""Module for storing irods specific code.""" import logging from jicirodsmanager import StorageManager, CommandWrapper logger = logging.getLogger(__name__) def string_to_list(s): """Return a list of items. :param s: string with white space separated items :returns: list of items """ return s....
Python
0
@@ -40,16 +40,38 @@ de.%22%22%22%0A%0A +import os%0Aimport json%0A import l @@ -77,16 +77,16 @@ logging%0A - %0Afrom ji @@ -349,24 +349,379 @@ ).split()%0A%0A%0A +def irods_zone_collection_name(group_name):%0A %22%22%22Return iRODS collection name derived from group_name including working%0A out the iRODS zo...
74a59179311e456e3ad5a01e7320284aa819d7b6
patch prev. commit
conductor/cli.py
conductor/cli.py
import json import click from click import echo from click_spinner import spinner from prettytable import PrettyTable from tabulate import tabulate from .config import get_config, new_config, set_config from .feeds import run_price_feeds from .markets import Markets from .utils import generate_signing_key from .watch...
Python
0.000006
@@ -3773,19 +3773,20 @@ default= -Tru +Fals e)%0Adef f
4645f904d0f522d51148d9fde3f50da6a619c6a8
add forms widget factory beginnings
examples/djangowanted/wanted/forms.py
examples/djangowanted/wanted/forms.py
from django.forms import ModelForm from django import forms from wanted.models import * class FlagForm(ModelForm): item = forms.ModelChoiceField(queryset=Item.objects.all()) type = forms.ModelChoiceField(queryset=FlagType.objects.all()) value = forms.CharField(max_length=255) class ItemForm(ModelForm): ...
Python
0.000001
@@ -531,16 +531,33 @@ gth=1000 +, label=%22Details%22 )%0A pr
a441ed9b5ccd3eaf74c235a60ba5ab3771533db7
Add __str__ and __unicode__ to BlacklistedGuest
SigmaPi/PartyList/models.py
SigmaPi/PartyList/models.py
from django.db import models from django.contrib.auth.models import User from django import forms from datetime import datetime import editdistance def timeStamped(fname, fmt='%Y-%m-%d_{fname}'): """ Utility function to add a timestamp to uploaded files. """ return datetime.now().strftime(fmt).for...
Python
0.999977
@@ -1603,24 +1603,47 @@ els.Model):%0A + #TODO- DOC_UPDATE!%0A name = m @@ -1756,16 +1756,118 @@ CE = 5%0A%0A + def __unicode__(self):%0A return self.name%0A%0A def __str__(self):%0A return self.name%0A%0A def
abffd85d6038494eea93b277b2d25af816dc2b78
Enable bidi tests for Firefox 86+
py/test/selenium/webdriver/common/bidi_tests.py
py/test/selenium/webdriver/common/bidi_tests.py
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
Python
0
@@ -1056,80 +1056,8 @@ ari%0A -@pytest.mark.xfail_firefox(reason=%22This is not in release firefox yet%22)%0A @pyt @@ -1442,80 +1442,8 @@ ari%0A -@pytest.mark.xfail_firefox(reason=%22This is not in release firefox yet%22)%0A @pyt
e0681bcee248e409dcec9f0918a8cd8101cb1c0d
Set terminal width for Vyatta Driver
netmiko/vyos/vyos_ssh.py
netmiko/vyos/vyos_ssh.py
import time from netmiko.cisco_base_connection import CiscoSSHConnection class VyOSSSH(CiscoSSHConnection): """Implement methods for interacting with VyOS network devices.""" def session_preparation(self): """Prepare the session after the connection has been established.""" self._test_channel...
Python
0
@@ -413,16 +413,82 @@ gth 0%22)%0A + self.set_terminal_width(command=%22set terminal width 512%22)%0A
f2c9a930a3f9f8dc0b7904f1d490b2665979d768
Update forward compatibility horizon to 2020-09-10
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow 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 applica...
Python
0
@@ -1444,17 +1444,18 @@ 020, 9, -9 +10 )%0A_FORWA
420807ff32a9c6327e233a5512204fe53083603c
Fix bug.
SigmaPi/Standards/models.py
SigmaPi/Standards/models.py
from django.db import models from django.contrib.auth.models import User class Bone(models.Model): """ Model for a single bone that is given to a User """ bonee = models.ForeignKey(User, related_name='+') boner = models.ForeignKey(User, related_name='+') reason = models.TextField() dateReceived = models.DateFi...
Python
0
@@ -1854,20 +1854,32 @@ rn self. -user +brother.username %0A%0A%09def _ @@ -1906,20 +1906,32 @@ rn self. -user +brother.username %0A%0A%09class
9722016a0117682fa7d0d5599a8dc2f1a75f7c6a
remove softmax / centroidloss
pyannote/audio/embedding/approaches/__init__.py
pyannote/audio/embedding/approaches/__init__.py
#!/usr/bin/env python # encoding: utf-8 # The MIT License (MIT) # Copyright (c) 2017-2018 CNRS # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limita...
Python
0.00003
@@ -1230,24 +1230,26 @@ TripletLoss%0A +# from .centro @@ -1276,16 +1276,18 @@ oidLoss%0A +# from .so @@ -1311,51 +1311,4 @@ max%0A -# from .agg_triplet_loss import AggTripletLoss%0A
57a1e59f034b0edbabaa76376ba6475d6e4d0297
Add code to work out the Julian representation of a date.
qual/calendars/main.py
qual/calendars/main.py
from datetime import date, timedelta from qual.helpers import ordinal, month_string from date import DateWithCalendar, InvalidDate from base import Calendar class ProlepticGregorianCalendar(Calendar): display_name = "Proleptic Gregorian Calendar" def date(self, year, month, day): try: d =...
Python
0.000001
@@ -947,24 +947,431 @@ False%0A%0A +@staticmethod%0A def date_display_string(d):%0A year, month, day = JulianCalendar.julian_representation(d)%0A return %22%25s %25s %25s%22 %25 (ordinal(day), month_string(month), year)%0A%0A @staticmethod%0A def julian_representation(d):%0A offset =...
692d35dfd92c9a3c4697a74bb45fe8963d7e39f3
Update forward compatibility horizon to 2022-02-01
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow 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 applica...
Python
0
@@ -1335,12 +1335,11 @@ 22, -1 +2 , -3 1)%0A_
82f563d7ed8dc53d00edf361af1f607f9a89b918
Add the rv32mi tests.
Simulation/core/conftest.py
Simulation/core/conftest.py
#!/usr/bin/env python # Copyright (c) 2015 Angel Terrones (<angelterrones@gmail.com>) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the r...
Python
0
@@ -1688,16 +1688,95 @@ st_hex = + glob.glob(%22Simulation/tests/rv32mi-p-*.hex%22)%0A list_hex = list_hex + glob.gl
55fbe047e091669d005a73ebb333392954186ace
Compact test false negative fix
jpp/cli_test/cli_test.py
jpp/cli_test/cli_test.py
import os import shutil import subprocess import unittest from collections import namedtuple CURR_DIR = os.path.dirname(os.path.realpath(__file__)) class TestCli(unittest.TestCase): TMP_TEST_FILES = os.path.join(CURR_DIR, '__tmp__') @classmethod def setUpClass(cls): FileDef = namedtuple('FileDe...
Python
0.999412
@@ -2401,16 +2401,24 @@ ne-liner + at most %0A @@ -2429,16 +2429,20 @@ f.assert +Less Equal(cm @@ -2461,17 +2461,17 @@ b'%5Cn'), -0 +1 )%0A%0A d
03baff9626f1c163e99e53eb9a9cf4f981c79121
Update forward compatibility horizon to 2020-09-15
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow 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 applica...
Python
0
@@ -1449,9 +1449,9 @@ 9, 1 -4 +5 )%0A_F
ab5c36e8d50eacf7c13234c75e17b606c0d97758
convert HTTP request arguments to lowercase
webserver.py
webserver.py
import threading __author__ = 'bawki' from http.server import BaseHTTPRequestHandler, HTTPServer import socket import multiprocessing import json from database import CatDb class CatHandler(BaseHTTPRequestHandler): def servePingData(self, arguments): self.sendSuccessHeader() print('servePingData:...
Python
0.999999
@@ -805,16 +805,24 @@ ath%5B1:%5D. +lower(). split(%22/
b193f9ccabb1093db8a803f7994adb14a85caf5a
Update __init__.py
djconnectwise/__init__.py
djconnectwise/__init__.py
# -*- coding: utf-8 -*- VERSION = (0, 3, 31, 'final') # pragma: no cover if VERSION[-1] != "final": __version__ = '.'.join(map(str, VERSION)) else: # pragma: no cover __version__ = '.'.join(map(str, VERSION[:-1])) default_app_config = 'djconnectwise.apps.DjangoConnectwiseConfig'
Python
0.000005
@@ -35,17 +35,17 @@ (0, 3, 3 -1 +2 , 'final
062924016bc5be483bbd477bc5e2aaaa37ede66b
Update forward compatibility horizon to 2021-03-21
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow 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 applica...
Python
0
@@ -1445,17 +1445,17 @@ 21, 3, 2 -0 +1 )%0A_FORWA
0e9d3f5c2bae999dc71c8f7bb62e380faac5dec7
improve example
examples/widgets/tabbed_panel_test.py
examples/widgets/tabbed_panel_test.py
''' TabbedPannel ====== Test of the widget TabbedPannel. ''' from kivy.app import App from kivy.animation import Animation from kivy.clock import Clock from kivy.uix.button import Button from kivy.uix.floatlayout import FloatLayout from kivy.uix.tabbedpannel import TabbedPannel from kivy.properties import ObjectPrope...
Python
0.000031
@@ -625,20 +625,16 @@ B -ubbleButton: +oxLayout %0A @@ -733,18 +733,143 @@ -text: 'Cut +padding: 3%0A TextInput:%0A text: 'everything is relative!'%0A BubbleButton:%0A text:'dummy '%0A @@ -1901,42 +1901,172 @@ im, -*lt):%0A _anim.start(l%...
b8e1d2419a1dbe065e1828599e60867bc845f0e3
Add some docs to nm root package
neuralmonkey/__init__.py
neuralmonkey/__init__.py
Python
0
@@ -0,0 +1,69 @@ +%22%22%22The neuralmonkey package is the root package of this project.%22%22%22%0D%0A
aa741b5a2b18a7df402325b53476eba36e448b40
Update to 0.0.49
djconnectwise/__init__.py
djconnectwise/__init__.py
# -*- coding: utf-8 -*- VERSION = (0, 0, 48, 'alpha') # pragma: no cover if VERSION[-1] != "final": __version__ = '.'.join(map(str, VERSION)) else: # pragma: no cover __version__ = '.'.join(map(str, VERSION[:-1]))
Python
0.000001
@@ -35,17 +35,17 @@ (0, 0, 4 -8 +9 , 'alpha
3726ed139ff990899a582325950a5721cc8c49f3
Update forward compatibility horizon to 2022-07-23
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow 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 applica...
Python
0
@@ -1335,17 +1335,17 @@ 22, 7, 2 -2 +3 )%0A_FORWA
818de1beb4dc2d5986e1affa661af06b7c9df37c
Update forward compatibility horizon to 2019-07-27
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow 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 applica...
Python
0
@@ -1387,9 +1387,9 @@ 7, 2 -6 +7 )%0A%0A_
6c4e55e05cd719a52c6ddba376cada5142a03e9c
Update forward compatibility horizon to 2022-09-28
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow 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 applica...
Python
0
@@ -1339,9 +1339,9 @@ 9, 2 -7 +8 )%0A_F
90df282f121422049b65efd09378d48ff080cf1e
Update forward compatibility horizon to 2019-07-15
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow 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 applica...
Python
0
@@ -1387,9 +1387,9 @@ 7, 1 -4 +5 )%0A%0A_
ef8b8fd6b6446b00334a80809a65e51ab6f78dff
Create a method for getting a list of the items in a particular config section.
quickrelease/config.py
quickrelease/config.py
import ConfigParser import os from quickrelease import constants from quickrelease.exception import ReleaseFrameworkError class ConfigSpecError(ReleaseFrameworkError): NO_OPTION_ERROR = 0 INTERPOLATION_MISSING_OPTION_ERROR = 1 INTERPOLATION_SYNTAX_ERROR = 2 COERCION_TYPE_ERROR = 3 def __init__(self, ...
Python
0
@@ -2194,24 +2194,262 @@ entSection%0A%0A + def GetSectionItems(self, sectionName):%0A try:%0A return list(x%5B0%5D for x in self.GetRawConfig().items(sectionName))%0A except ConfigParser.NoSectionError:%0A raise ValueError(%22No config section '%25s'%22 %25 sectionName)%0A%0A def GetDe...
95f09bc7d61d6ea0a1228229a5092e2bff889855
make website_multi_company_demo hidden
website_multi_company_demo/__manifest__.py
website_multi_company_demo/__manifest__.py
# -*- coding: utf-8 -*- { "name": """Demo Data for \"Real Multi Website\"""", "summary": """Provides demo websites""", "category": "eCommerce", # "live_test_URL": "", "images": [], "version": "1.0.0", "application": False, "author": "IT-Projects LLC, Ivan Yelizariev", "support": "ap...
Python
0
@@ -141,17 +141,14 @@ %22: %22 -eCommerce +Hidden %22,%0A
03931ff739f8a3a051ef15d1c63795ef10ab0c12
Update forward compatibility horizon to 2021-08-07
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow 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 applica...
Python
0
@@ -1448,9 +1448,9 @@ 8, -6 +7 )%0A_F
cbc3be65f46bf6ec2dc12157c019921e82791412
Remove blank line
jsonrpcserver/request.py
jsonrpcserver/request.py
"""A JSON-RPC request object. Used internally by the library, but class attributes can be modified to configure various options for handling requests. """ import json import logging import re import pkgutil try: # Python 2 from collections import Mapping, Sequence except ImportError: # Python 3 from co...
Python
0.999999
@@ -6834,17 +6834,16 @@ wargs)%0A%0A -%0A @pro
f6b80d5cd39d5764174a8e05f3b4f73d1ea70827
Update forward compatibility horizon to 2018-11-26
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow 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 applica...
Python
0
@@ -1143,9 +1143,9 @@ 1, 2 -5 +6 )%0A%0A%0A
a8333a5c3e9c6b07df2b04782c9e0cc3c4b6e60c
Bump Version
common.py
common.py
VERSION_YEAR = 2017 VERSION_MONTH = 10 VERSION_DAY = 2 VERSION_REV = 1 whos_in = None twitter = None users = {} twilio_client = None ARGS = {} smmry_api_key = None # Variable hold trumps last tweet id last_id = 0 trump_chance_roll_rdy = False # Runtime stats duels_conducted = 0 items_awarded = 0 trump_tweets_seen = ...
Python
0
@@ -46,17 +46,17 @@ N_DAY = -2 +5 %0AVERSION @@ -62,17 +62,17 @@ N_REV = -1 +0 %0A%0Awhos_i
086b5a028d3d85f9fa6e71a5fc08b61ae9426e7b
Copy the right file :)
readthedocs/doc_builder/backends/sphinx_dash.py
readthedocs/doc_builder/backends/sphinx_dash.py
from glob import glob import logging import os import shutil import tarfile from django.conf import settings from django.template import Template, Context from doc_builder.base import restoring_chdir from doc_builder.backends.sphinx import Builder as HtmlBuilder from projects.utils import run from core.utils import c...
Python
0
@@ -3074,64 +3074,8 @@ -from_globs = glob(os.path.join(outputted_path, %22*.tgz%22)) %0A @@ -3079,19 +3079,20 @@ -xml +from _globs = @@ -3129,19 +3129,19 @@ ath, %22*. -xml +tgz %22))%0A @@ -3551,32 +3551,97 @@ _file, to_file)) +%0A%0A xml_globs = glob(os.path.join(outputted_path, %22...
7047816b5edc7911685219d53970c892728d0220
add os to config
config.py
config.py
# -*- encoding: utf-8 -*- import datetime # ----------------------------------------------------- # Application configurations # ------------------------------------------------------ DEBUG = True SECRET_KEY = os.environ['SECRET_KEY'] PORT = os.environ['PORT'] HOST = os.environ['HOST'] # -----------------------------...
Python
0.000001
@@ -34,16 +34,26 @@ datetime +%0Aimport os %0A%0A# ----
4748a984b2e594c2e92b02eaac3b27457ec1d023
reorder l2 lambda
config.py
config.py
import tensorflow as tf from classes.model import Layer class BaseConfig(): TRAINING_DATA = './assignment/train_potus_by_county.csv' TESTING_DATA = './assignment/train_potus_by_county.csv' TARGET_LABEL = 'Winner' OUTFILES = {'targets': './targets.csv', 'preprocessing_means': './prep...
Python
0.999999
@@ -1397,16 +1397,19 @@ _reg': %5B +0, 1E-5, 1E @@ -1416,19 +1416,16 @@ -4, 1E-3 -, 0 %5D,%0A
9a09b6fdcd26fbacfa73574835da1fe27a8760f6
Add separate config for preview.
config.py
config.py
class Config(object): DEBUG = False class DevelopmentConfig(object): DEBUG = True RULES_ENGINE_URL = "http://localhost:5005" BANKRUPTCY_DATABASE_API = "http://localhost:5004" CASEWORK_DATABASE_API = "http://localhost:5006"
Python
0
@@ -57,30 +57,30 @@ pmentConfig( -object +Config ):%0A DEBUG @@ -239,8 +239,192 @@ st:5006%22 +%0A%0A%0Aclass PreviewConfig(Config):%0A RULES_ENGINE_URL = %22http://localhost:5005%22%0A BANKRUPTCY_DATABASE_API = %22http://localhost:5004%22%0A CASEWORK_DATABASE_API = %22http://localhost:5006%22
dbf8a78c9506ad316d4d02cec14dd77ce3c0402c
Fix timeout
src/checker/net.py
src/checker/net.py
import requests from requests.exceptions import InvalidSchema, ConnectionError, MissingSchema, Timeout from urllib.parse import urlparse, urlencode import os import tempfile import magic import logging import math import time class NetworkError(Exception): pass class ConditionError(Exception): pass class ...
Python
0.001785
@@ -2205,32 +2205,109 @@ )%0A%0A try:%0A + log.debug(%22Timeout set to: %22 + str(conf.getProperty(%22timeout%22)))%0A r = @@ -2402,19 +2402,17 @@ timeout - = += conf.get @@ -2425,16 +2425,19 @@ ty(%22time +out %22), veri
e87562d15de92bac443be418d45dce0fe47cb4e1
switch to utc
events.py
events.py
#!/usr/bin/env python import requests import time import math import os import shutil import tempfile from six.moves import configparser from yattag import Doc # Read config file in mydir = os.path.dirname(os.path.realpath(__file__)) configReader = configparser.RawConfigParser() configReader.read(mydir + "/config.txt"...
Python
0.000982
@@ -14,16 +14,17 @@ v python +3 %0Aimport @@ -96,16 +96,46 @@ empfile%0A +import asyncio%0Aimport aiohttp%0A from six @@ -985,27 +985,11 @@ = ' -America/Los_Angeles +UTC '%0A%0Af
1c895f37f3b3090f1f53ab9d01bc639758f14a2f
refine coding style
nthuoj/urls.py
nthuoj/urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf import settings from django.http import HttpResponseRedirect from ckeditor.views import upload, browse from utils.user_info import validate_user import autocomplete_light # OP autodiscover autocomplete_light.autodisco...
Python
0.908904
@@ -662,16 +662,21 @@ atterns( +%0A '',%0A @@ -729,16 +729,24 @@ upload), +%0A name='c @@ -821,16 +821,24 @@ browse), +%0A name='c @@ -916,16 +916,24 @@ .serve', +%0A %7B'docum
7f13b29cc918f63c4d1fc24717c0a0b5d2f5f8ad
Fix problem with array values.
filter.py
filter.py
import numpy as np class LowPassFilter(object): ''' First order discrete IIR filter. ''' def __init__(self, feedback_gain, initial_value=0.0): self.feedback_gain = np.ones_like(initial_value) * feedback_gain self.initial_value = initial_value self.output_gain = 1.0 - feedback_ga...
Python
0.000021
@@ -1011,22 +1011,20 @@ value = -np.nan +None %0A @@ -1042,22 +1042,20 @@ value = -np.nan +None %0A%0A de @@ -1124,17 +1124,8 @@ if -np.isnan( self @@ -1131,25 +1131,32 @@ f.mean_value -) + is None :%0A
bb8e3163920bb81998bc9851a3abceac498e0b0e
add coding:utf-8 comment to finder.py
finder.py
finder.py
from design import FindDesigns class Finder(object): def __init__(self, payload, preferred_radial_size, delta_vs, accelerations, pressures, gimbal, boosters, electricity, length): """Initializes this finder. Args: payload (Int) - Payload size in kilograms. ...
Python
0
@@ -1,8 +1,33 @@ +# -*- coding: utf-8 -*-%0A%0A from des
1f78da6be6aa0aaa2d361eaa3994488f1a8b4a07
add nodesMentioned, edgesMentioned
src/dig/outline.py
src/dig/outline.py
#!/usr/bin/env python import sys try: from StringIO import StringIO except ImportError: from io import StringIO from pprint import pprint from collections import defaultdict iii = None class Outline(object): def __init__(self, graph, subgraph, query, root, **kwargs): self.graph = graph se...
Python
0.000036
@@ -175,16 +175,38 @@ aultdict +%0Afrom util import info %0A%0Aiii = @@ -458,16 +458,110 @@ bal iii%0A + edgesMentioned = %5B%5D%0A nodesMentioned = %5B%5D%0A must = %5B%5D%0A should = %5B%5D%0A @@ -666,23 +666,23 @@ -covered +touches = dict( @@ -877,33 +877,225 @@ ...
9378ee0d414321bd557b478ffb6725ee899bc9b0
simplify code and add comment
TaskList/FileInfo/FileInfo.py
TaskList/FileInfo/FileInfo.py
#!/usr/bin/python3.4 # -*-coding:Utf-8 -* '''module to manage blender file info''' import xml.etree.ElementTree as xmlMod from TaskList.FileInfo.Scene import * from usefullFunctions import XML import os class FileInfo: '''class to manage blender file info''' def __init__(self, xml): '''initialize blender file ...
Python
0.000001
@@ -1010,24 +1010,54 @@ .scenes)%0A%09%09%0A +%09%09# can't add empty task file%0A %09%09if scenes @@ -1127,16 +1127,77 @@ None%0A%09%09%0A +%09%09# no need to choose if there is only one scene in the file%0A %09%09if sce @@ -1241,43 +1241,25 @@ ene -in file. All scene will be rendered +to render in file .')%0A...
87d026455424be83346019e0a6e75c16810ccc39
add some debug messages for superuser auth/acl
backend/src/gosa/backend/plugins/mqtt/mosquitto_auth.py
backend/src/gosa/backend/plugins/mqtt/mosquitto_auth.py
# This file is part of the GOsa project. # # http://gosa-project.org # # Copyright: # (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de # # See the LICENSE file in the project's top-level directory for details. import logging from gosa.backend.utils import BackendTypes from gosa.common import Environment from go...
Python
0
@@ -1597,16 +1597,108 @@ eruser:%0A + self.log.debug(%22MQTT AUTH request from '%25s' %5BSUPERUSER%5D =%3E GRANTED%22 %25 username)%0A @@ -6879,91 +6879,425 @@ -self.send_result(self.get_argument('username', '') == self.superuser)%0A else: +is_allowed = self.get_argument('username', '...
3dc58e0467a1be86208fffd08097652c6fe46f94
Rename Tor to control_agent
ooni/templates/httpt.py
ooni/templates/httpt.py
# -*- encoding: utf-8 -*- # # :authors: Arturo Filastò # :licence: see LICENSE import copy import random import struct from twisted.python import usage from twisted.plugin import IPlugin from twisted.internet import protocol, defer from twisted.internet.ssl import ClientContextFactory from twisted.internet import rea...
Python
0.000004
@@ -5419,19 +5419,29 @@ (%22Using -tor +control agent for the @@ -5502,19 +5502,23 @@ = self. -tor +control _agent%0A
b0f25b7263a42fbd1e90cf7ebe3dcba50f9cfe42
use the correct class name
amiconfig/plugins/rmakeserver.py
amiconfig/plugins/rmakeserver.py
# # Copyright (c) 2008 rPath, Inc. # import os from rmakeplugin import rMakePlugin class rMakeServer(rMakePlugin): name = 'rmakeserver' def pluginMethod(self): self._setupProxy() self._setuprBuilder() self._setupRepoUrl() def _setupProxy(self): proxycfg = '/etc/rmake/ser...
Python
0.999948
@@ -89,19 +89,23 @@ ass -rMakeServer +AMIConfigPlugin (rMa
28b535ef3db6eb79b6cb0f0c86e30b78899d31d9
Rewrite .current_translation using a window function.
amnesia/translations/__init__.py
amnesia/translations/__init__.py
# -*- coding: utf-8 -*- import logging from pyramid.i18n import default_locale_negotiator from pyramid.threadlocal import get_current_registry from pyramid.threadlocal import get_current_request from sqlalchemy import orm from sqlalchemy import sql from sqlalchemy import event from sqlalchemy.types import String fro...
Python
0
@@ -1027,257 +1027,341 @@ -content_mapper.add_properties(%7B%0A 'current_translation': orm.relationship(%0A lambda: translation_cls,%0A primaryjoin=lambda: sql.and_(%0A # XXX: use base_mapper.class_%0A # pylint: disable=no-member +partition = sql.select(%...
ba31be554d3cc4fd51b7189434071596143b686c
add audio.load.readrecf
hvc/audio/load.py
hvc/audio/load.py
import numpy as np def read_cbin(filename): """ loads .cbin files output by EvTAF """ data = np.fromfile(filename,dtype=">d") # ">d" means big endian, double return data def readrecf(filename): """ reads .rec files output by EvTAF """
Python
0
@@ -243,28 +243,2639 @@ les output by EvTAF%0A %22%22%22%0A +%0A rec_dict = %7B%7D%0A with open(filename,'r') as recfile:%0A line_tmp = %22%22%0A while 1:%0A if line_tmp == %22%22:%0A line = recfile.readline()%0A else:%0A line = lime_tmp%0A ...
8d1e13301de96eb2a4caee2e53b7691ee4d7dab5
add some array functions
benchmarks/__init__.py
benchmarks/__init__.py
# -*- coding: utf-8 -*- # Copyright 2012 Christoph Reiter # # 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 License, or (at your option) any later version. im...
Python
0.000034
@@ -3742,24 +3742,655 @@ turn times%0A%0A + def bench_arrays(rounds):%0A times = %5B%5D%0A for i in xrange(rounds):%0A t0 = time.time()%0A GIMarshallingTests.array_fixed_int_return()%0A GIMarshallingTests.array_fixed_short_return()%0A GIMarshallingTests.arra...
4b46c07b795e3e16c16a8897ac42a0755e88c213
Use trial logging.
analysis/sanity-count-markers.py
analysis/sanity-count-markers.py
#!/usr/bin/env python import climate import collections import joblib import lmj.cubes import lmj.plot import numpy as np logging = climate.get_logger('count') def count(trial): trial.load() trial.mask_dropouts() total = len(trial.df) markers = {m: trial.df[m + '-c'].count() / total for m in trial.m...
Python
0
@@ -405,32 +405,19 @@ -logging.info('%25s %25s %25s: +trial.log(' %25d r @@ -443,89 +443,8 @@ %25)', -%0A trial.subject.key, trial.block.key, trial.key,%0A tot
8c651899be8eab478d0cc6da22f695ecd3b33313
Add parents
anybox/recipe/openerp/vcs/git.py
anybox/recipe/openerp/vcs/git.py
import os import subprocess import logging from ..utils import working_directory_keeper from .base import BaseRepo from .base import SUBPROCESS_ENV logger = logging.getLogger(__name__) class GitRepo(BaseRepo): """Represent a Git clone tied to a reference branch.""" vcs_control_dir = '.git' def uncommi...
Python
0.000069
@@ -298,16 +298,309 @@ '.git'%0A%0A + def parents(self):%0A %22%22%22Return full hash of parent nodes. %22%22%22%0A os.chdir(self.target_dir)%0A p = subprocess.Popen(%5B'git', 'rev-parse', '--verify', 'HEAD'%5D,%0A stdout=subprocess.PIPE, env=SUBPROCESS_ENV)%0A ...
be291475601657cbcd3903679c77c2860b543308
fix doc
deepchem/feat/tests/test_dummy_featurizer.py
deepchem/feat/tests/test_dummy_featurizer.py
import unittest import deepchem as dc import numpy as np class TestDummyFeaturizer(unittest.TestCase): """ Test for DummyFeaturizer. """ def test_featurize(self): """ Test the featurize method on a list of inputs. """ input_array = np.array([[ "N#C[S-].O=C(CBr)c1ccc(C(F)(F...
Python
0.000001
@@ -104,18 +104,16 @@ :%0A %22%22%22%0A - Test f @@ -132,18 +132,16 @@ urizer.%0A - %22%22%22%0A%0A @@ -175,20 +175,16 @@ %22%22%22%0A - Test @@ -213,13 +213,15 @@ on a - list +n array of @@ -228,20 +228,16 @@ inputs.%0A - %22%22%22%0A
c8a97a33449eedc110169cb9b3f0120124d95e49
Add tiny test for ToPickle (#6021)
distributed/protocol/tests/test_to_pickle.py
distributed/protocol/tests/test_to_pickle.py
from typing import Dict import dask.config from dask.highlevelgraph import HighLevelGraph, MaterializedLayer from distributed.client import Client from distributed.protocol.serialize import ToPickle from distributed.utils_test import gen_cluster class NonMsgPackSerializableLayer(MaterializedLayer): """Layer tha...
Python
0
@@ -142,16 +142,62 @@ Client%0A +from distributed.protocol import dumps, loads%0A from dis @@ -289,16 +289,234 @@ uster%0A%0A%0A +def test_ToPickle():%0A class Foo:%0A def __init__(self, data):%0A self.data = data%0A%0A msg = %7B%22x%22: ToPickle(Foo(123))%7D%0A frames = dumps(msg)%0A ...
63b20c15d3749fc60fcb7e1e43fbbc8832b50354
Alphabetize imports
django_graph_api/tests/graphql/test_types.py
django_graph_api/tests/graphql/test_types.py
import pytest from unittest import mock from django_graph_api.graphql.schema import Schema from django_graph_api.graphql.types import Boolean, Float, Field, Int, String, List schema = Schema() def test_field_get_value_calls_coerce(): field = Field() field.type_ = mock.Mock() field.name = 'foo' fiel...
Python
0.999913
@@ -161,20 +161,20 @@ nt, +List, String -, List %0A%0Asc
288d02bccf08ff0498767aafca9bd37509213ec3
Update forms.py
djforms/communications/printrequest/forms.py
djforms/communications/printrequest/forms.py
# -*- coding: utf-8 -*- from django import forms from django.conf import settings from localflavor.us.forms import USPhoneNumberField from djforms.communications.printrequest.models import PrintRequest, FORMATS class PrintRequestForm(forms.ModelForm): phone = USPhoneNumberField( label = "Phone ...
Python
0
@@ -940,16 +940,152 @@ iling%22)%0D +%0A %0D%0A print_format = cleaned_data.get(%22print_format%22)%0D%0A print_format_other = cleaned_data.get(%22print_format_other%22)%0D %0A%0D%0A @@ -1504,24 +1504,213 @@ ield.%22%5D)%0D%0A%0D%0A + if print_format == %22Other%22:%0D%0A ...
1b13a929122c2bcb7e524b39183610ac3e57f191
Mark Show.upcoming as @staticmethod
karspexet/show/models.py
karspexet/show/models.py
from django.db import models import datetime class Production(models.Model): name = models.CharField(max_length=100) description = models.TextField(blank=True) def __str__(self): return self.name class Show(models.Model): production = models.ForeignKey(Production, on_delete=models.PROTECT) ...
Python
0
@@ -419,16 +419,34 @@ OTECT)%0A%0A + @staticmethod%0A def
f79bb6e549c311e7b45bebba58e223826c713132
Fix ContenderSerializer
driver27/api.py
driver27/api.py
from .models import Competition, Contender, Driver, Race, Result, Season, Seat, Team from rest_framework import routers, serializers, viewsets from rest_framework.decorators import detail_route, list_route from rest_framework.response import Response from django_countries.serializer_fields import CountryField class D...
Python
0.000003
@@ -306,16 +306,291 @@ Field%0A%0A%0A +class CompetitionSerializer(serializers.HyperlinkedModelSerializer):%0A # https://github.com/SmileyChris/django-countries/issues/106%0A country = CountryField()%0A%0A class Meta:%0A model = Competition%0A fields = ('url', 'name', 'full_name', 'country', 'sl...
8ad3308738890d6f4301c7b306afc95d480930ef
Fix spurious headers in ListBucket requests
euca2ools/commands/walrus/listbucket.py
euca2ools/commands/walrus/listbucket.py
# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software 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 above copyright notice, # this list of conditions and t...
Python
0.000003
@@ -1974,16 +1974,43 @@ + default=argparse.SUPPRESS, help=ar
92008233d8418e1166b3aab18d93f91e552f4a8f
Order elections by election ID
every_election/apps/elections/models.py
every_election/apps/elections/models.py
from django.db import models from django.core.urlresolvers import reverse from suggested_content.models import SuggestedByPublicMixin from .managers import ElectionManager class ElectionType(models.Model): """ As defined at https://democracyclub.org.uk/projects/election-ids/reference/ """ name = mo...
Python
0
@@ -2917,24 +2917,77 @@ _manager()%0A%0A + class Meta:%0A ordering = ('election_id',)%0A%0A def get_