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
88cdce0c2a753f4e0a60fe27e6e77b8e51bddc0a
compress database dump
grouprise/core/management/commands/database_dump.py
grouprise/core/management/commands/database_dump.py
import getpass import datetime import os from subprocess import check_call, CalledProcessError from django.core.management.base import BaseCommand, CommandError from django.conf import settings def create_filename(directory, prefix, filename=None): return os.path.abspath(os.path.join(directory, '{prefix}{filename...
Python
0.998886
@@ -24,16 +24,28 @@ atetime%0A +import gzip%0A import o @@ -249,24 +249,35 @@ ilename=None +, suffix='' ):%0A retur @@ -337,16 +337,24 @@ ilename%7D +%7Bsuffix%7D '.format @@ -510,16 +510,43 @@ + '.sql' +,%0A 'suffix': suffix, %0A %7D)) @@ -2229,16 +2229,30 @@ put_file +, suffix=%22.gz%22 )%0A%0A...
35eca403a1ab9817b7e1538b84827c5e64ddab0a
Add suport for MERGE_MSG
gitcommitautosave.py
gitcommitautosave.py
"""Git Commit Auto Save. Sublime Text 3 package to auto save commit messages when the window is closed. This allows the user to close the window without having to save before, or having to deal with the "Save File" popup. """ import sublime_plugin class GitCommitAutoSave(sublime_plugin.EventListener): def on_load(s...
Python
0
@@ -593,16 +593,29 @@ se-todo' +, 'MERGE_MSG' )%0A%09if pa
1e3f114a3d88b63390691db026d259bec7632bc1
fix linting
histomicstk/saliency/tests/tissue_detection_test.py
histomicstk/saliency/tests/tissue_detection_test.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Sep 18 00:06:28 2019. @author: mtageld """ import unittest import os import tempfile import shutil from imageio import imread, imwrite import girder_client import numpy as np # from matplotlib import pylab as plt # from matplotlib.colors import Listed...
Python
0.000003
@@ -2796,16 +2796,17 @@ n=doc)%0A%0A +%0A def suit
c23375a18b1793dfe0e9066763c85bf45cbf255c
Add case for test message
homeassistant/components/device_tracker/locative.py
homeassistant/components/device_tracker/locative.py
""" homeassistant.components.device_tracker.locative ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Locative platform for the device tracker. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/device_tracker.locative/ """ import logging from functools imp...
Python
0.00003
@@ -2811,26 +2811,28 @@ transition -to +from %7B%7D%22.format( @@ -2844,24 +2844,234 @@ ion_name))%0A%0A + elif direction == 'test':%0A # In the app, a test message can be sent. Just return something to%0A # the user to let them know that it works.%0A handler.write_text(%22Received test me...
726eb82758ba6ceec8e31611b2854e5f4c0cee72
Mark RPI Power binary sensor as diagnostic (#76198)
homeassistant/components/rpi_power/binary_sensor.py
homeassistant/components/rpi_power/binary_sensor.py
""" A sensor platform which detects underruns and capped status from the official Raspberry Pi Kernel. Minimal Kernel needed is 4.14+ """ import logging from rpi_bad_power import UnderVoltage, new_under_voltage from homeassistant.components.binary_sensor import ( BinarySensorDeviceClass, BinarySensorEntity, ...
Python
0
@@ -413,16 +413,72 @@ sistant%0A +from homeassistant.helpers.entity import EntityCategory%0A from hom @@ -1299,16 +1299,70 @@ PROBLEM%0A + _attr_entity_category = EntityCategory.DIAGNOSTIC%0A _att
fad59b6266118f3799bf70b1057b7f265143692c
Set settings' DEBUG to False by default
simple_web_scraper/settings.py
simple_web_scraper/settings.py
""" Django settings for simple_web_scraper project. Generated by 'django-admin startproject' using Django 1.8.13. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ ...
Python
0.000001
@@ -826,19 +826,145 @@ on!%0A +# DEBUG - = Tru +'s default values has been set to False and should be changed to True%0A# in local's untracked file %60local_settings.py%60%0ADEBUG = Fals e%0A%0AA
9248f3bc98c02fce23f79e4448bc7c8563ad4bc7
Fix handling of missing extra requirements of entry points in plugin loader.
trac/loader.py
trac/loader.py
# -*- coding: utf-8 -*- # # Copyright (C) 2005-2006 Edgewall Software # Copyright (C) 2005-2006 Christopher Lenz <cmlenz@gmx.de> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://...
Python
0.00001
@@ -3565,25 +3565,278 @@ -entry_point.load( +try:%0A entry_point.load()%0A except pkg_resources.DistributionNotFound, e:%0A env.log.warning('Cannot load plugin %25s because it '%0A 'requires %22...
f65cb4fa50c67ffdaf1b5ef26534bc03e8751dd0
add tests for program categories
modules/arte/test.py
modules/arte/test.py
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
Python
0
@@ -1698,28 +1698,580 @@ o %22%25s%22 not found' %25 (v.id))%0A +%0A def test_program(self):%0A l1 = list(self.backend.iter_resources(%5BBaseVideo%5D, %5Bu'arte-program'%5D))%0A assert len(l1)%0A # some categories may contain no available videos (during summer period for example)%0A for ...
728d749a239c2a546320b63938f9531eb27486dc
rewrite `get_text()`
gittip/utils/i18n.py
gittip/utils/i18n.py
from __future__ import print_function, unicode_literals import os import re from aspen.utils import utcnow from babel.dates import format_timedelta import babel.messages.pofile from babel.numbers import ( format_currency, format_decimal, format_number, format_percent ) ternary_re = re.compile(r' *(.*) *\? *(.*)...
Python
0.000498
@@ -706,218 +706,599 @@ ext( -s, loc, count):%0A if loc in LANGS:%0A message = LANGS%5Bloc%5D.get(s)%0A s = message.string if message else s%0A if isinstance(s, tuple):%0A try:%0A i = int(LANGS%5Bloc%5D.plural_func(count)) +request, loc, s, *a, **kw):%0A catalog = LANGS.get(loc...
a0ec9e4faba5f5342a7b0d2653f7552e2d19a67d
change prod setting
avipost/avipost/settings/prod.py
avipost/avipost/settings/prod.py
from .base import * INSTALLED_APPS += ( 'corsheaders', ) # need to be before django.middleware.common.CommonMiddleware MIDDLEWARE_CLASSES = ( 'corsheaders.middleware.CorsMiddleware', ) + MIDDLEWARE_CLASSES CORS_ORIGIN_ALLOW_ALL = True # TODO: set the database parameters
Python
0.000001
@@ -276,8 +276,422 @@ ameters%0A +%0AALLOWED_HOSTS = %5B%2252.16.214.13%22, %22127.0.0.1%22, %22localhost%22%5D%0A%0ADATABASES = %7B%0A 'default': %7B%0A 'ENGINE': 'django.contrib.gis.db.backends.postgis',%0A 'NAME': 'postgres',%0A 'USER': 'postcard_admin',%0A 'PASSWORD': get_env_variabl...
28c39136aadd34253ff0c925504427a19bccfd49
Update to version v0.0.4
domain_parser/__init__.py
domain_parser/__init__.py
__version__ = '0.0.3.4'
Python
0
@@ -16,9 +16,7 @@ 0.0. -3. 4'%0A
8beee9b0b61789d0b54f4b3cd83f2d8d450da77d
Disable inbox_benchmark.Inbox.
tools/perf/benchmarks/inbox_benchmark.py
tools/perf/benchmarks/inbox_benchmark.py
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from page_sets import inbox from telemetry import benchmark from telemetry.web_perf import timeline_based_measurement @benchmark.Disabled('android') class I...
Python
0
@@ -156,16 +156,159 @@ file.%0A%0A +# TODO: Benchmark is failing; see crbug.com/452257. Comment out instead of%0A# disabling because the failure happens before the Disabled check.%0A# from pag @@ -327,16 +327,17 @@ t inbox%0A +# from tel @@ -360,16 +360,17 @@ nchmark%0A +# from tel @@ -419,17 +419,19 @@ urement...
d4eb6ddeb95a80b843c7dcbe9d92d483d13e8284
Rename variable
tracker/app.py
tracker/app.py
"""The app module, containing the app factory function.""" from flask import Flask, render_template from flask_security import SQLAlchemyUserDatastore from . import commands, core, survey, iati from .security.models import User, Role from .extensions import cache, db, debug_toolbar, migrate, webpack, security from .da...
Python
0.000003
@@ -1048,21 +1048,16 @@ pp)%0A -user_ datastor @@ -1131,13 +1131,8 @@ pp, -user_ data
6d938af57f827d56482eac383119f44a19915ef8
Add paginated contact retrieval.
go_http/contacts.py
go_http/contacts.py
""" Experimental client for Vumi Go's contacts API. TODO: * Factor out common API-level code, such as auth. * Implement more of the API as the server side grows. """ import json import requests class ContactsApiClient(object): """ Client for Vumi Go's contacts API. :param str auth_token: An...
Python
0
@@ -1515,16 +1515,527 @@ json()%0A%0A + def contacts(self):%0A %22%22%22%0A Retrieve all contacts.%0A%0A This uses the API's paginated contact download.%0A%0A :returns:%0A An iterator over all contacts.%0A %22%22%22%0A page = self._api_request(%22GET%22, %22conta...
51c25fba0ecfa627ac91e6a9ab83c2bd44fab29c
remove debug
podhub/follower/views.py
podhub/follower/views.py
from . import app from feed import Feed from flask import jsonify, request @app.route('/') def index(): return jsonify() @app.route('/audio') def feed(): url = request.args.get('feed_url') index = request.args.get('index') if not index: index = -1 feed = Feed(url=url) entry = feed....
Python
0.000002
@@ -296,16 +296,29 @@ l=url)%0A%0A + try:%0A entr @@ -341,24 +341,16 @@ %5Bindex%5D%0A - %22%22%22%0A exce @@ -540,16 +540,8 @@ 400 -%0A %22%22%22 %0A%0A
355f35dcf825ed7a340d26d8ebc2982f3fa7d89b
Add utils function to archive and download outputs files
polyaxon/libs/archive.py
polyaxon/libs/archive.py
import os import tarfile from django.conf import settings from libs.paths.experiments import get_experiment_outputs_path from libs.paths.jobs import get_job_outputs_path def check_archive_path(archive_path=None): if not os.path.exists(archive_path): os.makedirs(archive_path) def create_tarfile(files, ...
Python
0
@@ -165,16 +165,58 @@ ts_path%0A +from libs.stores import get_outputs_store%0A %0A%0Adef ch @@ -2351,28 +2351,709 @@ PUTS_ARCHIVE_ROOT, tar_name%0A +%0A%0Adef archive_outputs_file(persistence_outputs, outputs_path, namepath, filepath):%0A check_archive_path(settings.OUTPUTS_DOWNLOAD_ROOT)%0A namepath = namepat...
b844fdda8d3912ef54aa19b5afc8787238167bc6
add working copy to svn command line
SharedProcessors/SVNUpdater.py
SharedProcessors/SVNUpdater.py
#!/usr/bin/env python # # Copyright 2016 Gerard Kok # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
Python
0.000001
@@ -2532,24 +2532,42 @@ ng_copy(self +, working_copy_dir ):%0A r @@ -2587,16 +2587,34 @@ update'%5D +, working_copy_dir )%0A @@ -2659,16 +2659,34 @@ opy(self +, working_copy_dir ): %0A @@ -2716,16 +2716,34 @@ eckout'%5D +, working_copy_dir )%0A%0A%0A @@ -3065,32 +3065,48 @@ te_working_copy...
e2b63141d08d3317b32acf8af7ce0854c7ffb1ee
use custom classes for targets. Closes #62
modules/gnome.py
modules/gnome.py
# Copyright 2015 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
@@ -2960,36 +2960,27 @@ an_target = -build.Custom +Gir Target(scan_ @@ -3411,28 +3411,23 @@ arget = -build.Custom +Typelib Target(t @@ -5262,8 +5262,274 @@ odule()%0A +%0Aclass GirTarget(build.CustomTarget):%0A def __init__(self, name, subdir, kwargs):%0A super().__init__(name, subdir, kwargs)%0A%0Acla...
67344f18b2126329d11450ec31fea23fad694ac6
Fix add event - close #142
poradnia/events/views.py
poradnia/events/views.py
import locale from dateutil.relativedelta import relativedelta from django.utils.html import mark_safe from django.shortcuts import get_object_or_404 from django.http import HttpResponse from django.utils.translation import ugettext as _ from django.views.generic import MonthArchiveView, ArchiveIndexView, CreateView, U...
Python
0
@@ -1182,16 +1182,201 @@ wargs)%0A%0A + def get_form_kwargs(self, *args, **kwargs):%0A kwargs = super(EventCreateView, self).get_form_kwargs(*args, **kwargs)%0A kwargs%5B'case'%5D = self.case%0A return kwargs%0A%0A def
af2f374297e77f9b58af861e5ced7dd1e9eb5274
Check if autopep8 is installed
p_autopep8.py
p_autopep8.py
# -*- coding: utf-8 -*- u""" :author: Joseph Martinot-Lagarde Created on Sat Jan 19 14:57:57 2013 """ from __future__ import ( print_function, unicode_literals, absolute_import, division) import autopep8 from spyderlib.qt.QtGui import QWidget # Local imports from spyderlib.baseconfig import get_translation _ = ...
Python
0
@@ -187,16 +187,25 @@ ision)%0A%0A +try:%0A import a @@ -211,16 +211,132 @@ autopep8 +%0A is_autopep8_installed = True%0Aexcept ImportError:%0A is_autopep8_installed = False%0Aprint(is_autopep8_installed) %0A%0Afrom s @@ -1444,24 +1444,27 @@ Enabled( +is_ autopep8 is not @@ -1459,20 +1459,18 @@ pep8...
f1b93779783f462fb270393e6614b4a00f9c91e8
Refactor caching behaviour from api endpoints.
backend/pfamserver/extensions.py
backend/pfamserver/extensions.py
"""Extensions builders.""" from flask_caching import Cache from flask_sqlalchemy import SQLAlchemy from flask_wtf.csrf import CSRFProtect cache = Cache() csrf = CSRFProtect() db = SQLAlchemy() # session_options={"autoflush": False})
Python
0
@@ -132,16 +132,43 @@ Protect%0A +from flask import request%0A%0A %0Acache = @@ -256,8 +256,137 @@ False%7D)%0A +%0A%0Adef make_cache_key(*args, **kwargs):%0A path = request.path%0A args = str(list(request.args.items()))%0A return path + args%0A
48abf60b6f6c26807f949f1a4846fa8652abc6d7
Switch to contains for matching dependent tickets. Fixes #70
inthe_am/taskmanager/task.py
inthe_am/taskmanager/task.py
import copy import datetime import dateutil import pytz class Task(object): DATE_FIELDS = [ 'due', 'entry', 'modified', 'start', 'wait', 'scheduled', ] LIST_FIELDS = [ 'annotations', 'tags', ] READ_ONLY_FIELDS = [ 'id', 'uuid', 'urgency', 'entry', 'modified', 'imask', ...
Python
0
@@ -2650,16 +2650,25 @@ 'depends +.contains ': uuid,
58b805b7fce9b09826abba13623883cd130e847c
remove white space
portal/views/patients.py
portal/views/patients.py
"""Patient view functions (i.e. not part of the API or auth)""" from flask import abort, Blueprint, jsonify, render_template, request, current_app from flask_user import roles_required from sqlalchemy import and_ from ..extensions import oauth from ..models.assessment_status import AssessmentStatus from ..models.inter...
Python
0.015486
@@ -7047,13 +7047,12 @@ erventions)%0A -%0A
eceb81d04416cecc0b70a1730dba0fa29f301650
add zone support
datastax.py
datastax.py
import yaml import base64 import json def GenerateFirewall(context): name = 'opscenterfirewall-' + context.env['name'] firewalls = [ { 'name': name, 'type': 'compute.v1.firewall', 'properties': { 'sourceRanges': [ '0.0.0.0/0' ...
Python
0
@@ -1641,16 +1641,133 @@ google%22%0A + zone=$(curl %22http://metadata.google.internal/computeMetadata/v1/instance/zone%22 -H %22Metadata-Flavor: Google%22)%0A @@ -1787,13 +1787,13 @@ ame= -%22foo%22 +$zone %0A
8d8a74d8b2f86d2548a04565744ab122537a4f62
Add benchmarks between an array and its transpose that share data, which should be optimized, versus the same configuration without shared data.
benchmarks/benchmarks/bench_linalg.py
benchmarks/benchmarks/bench_linalg.py
from __future__ import absolute_import, division, print_function from .common import Benchmark, get_squares_, get_indexes_rand, TYPES1 import numpy as np class Eindot(Benchmark): def setup(self): self.a = np.arange(60000.0).reshape(150, 400) self.b = np.arange(240000.0).reshape(400, 600) ...
Python
0
@@ -247,24 +247,86 @@ e(150, 400)%0A + self.at = self.a.T%0A self.atc = self.a.T.copy()%0A self @@ -682,32 +682,308 @@ elf.a, self.b)%0A%0A + def time_dot_trans_a_at(self):%0A np.dot(self.a, self.at)%0A%0A def time_dot_trans_a_atc(self):%0A np.dot(self.a, self.atc)%0A%0A ...
771e64449577467c1701d9a40080d98ff68069f9
Annotate mopidy.http.actor minimally
mopidy/http/actor.py
mopidy/http/actor.py
import json import logging import secrets import threading import pykka import tornado.httpserver import tornado.ioloop import tornado.netutil import tornado.web import tornado.websocket from mopidy import exceptions, models, zeroconf from mopidy.core import CoreListener from mopidy.http import Extension, handlers fr...
Python
0.000038
@@ -1,12 +1,48 @@ +from __future__ import annotations%0A%0A import json%0A @@ -87,16 +87,49 @@ hreading +%0Afrom typing import TYPE_CHECKING %0A%0Aimport @@ -429,16 +429,84 @@ etwork%0A%0A +if TYPE_CHECKING:%0A from typing import Any, ClassVar, List, Type%0A%0A try:%0A @@ -559,16 +559,32 @@ o = None + # ty...
13639181c2c63a800fdad754259b7282b0fbf63a
fix race condition in open-remote
test/sanity/open-remote/test.py
test/sanity/open-remote/test.py
import time import os import subprocess import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from nw_util import * from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common import utils chrome_options = Options() chrome_optio...
Python
0
@@ -928,16 +928,105 @@ 1)%0Atry:%0A + wait_window_handles(driver, 2)%0A driver.switch_to_window(driver.window_handles%5B0%5D)%0A prin @@ -1189,43 +1189,8 @@ lt)%0A - wait_window_handles(driver, 2)%0A
08fc67df449a35d83f7a0f578e3342a21fcacd81
Change the names of thread on process in module pwork
grab/tools/pwork.py
grab/tools/pwork.py
from multiprocessing import Process, Queue import time try: from Queue import Empty except ImportError: from queue import Empty import logging from grab.util.py3k_support import * class Stop(object): pass STOP = Stop() class Worker(Process): def __init__(self, callback, taskq, resultq, ignore_except...
Python
0.000001
@@ -1114,22 +1114,24 @@ %22limit%22 -thread +processe s, do ta @@ -1454,22 +1454,24 @@ mber of -thread +processe s%0A %22%22 @@ -1680,16 +1680,17 @@ taskq + = Queue( @@ -1765,16 +1765,17 @@ resultq + = Queue( @@ -1817,26 +1817,30 @@ it%22 -threads%0A thread +processes%0A processe s = @@ -18...
23145c39053f6fd977334f8bae9c49b1908eafc5
Remove key from response and add some comments.
binder/plugins/views/multi_request.py
binder/plugins/views/multi_request.py
from django.http import HttpRequest, JsonResponse from django.db import transaction from django.core.handlers.base import BaseHandler from binder.exceptions import ( BinderException, BinderRequestError, BinderMethodNotAllowed, ) from binder.json import jsonloads, jsondumps class RequestHandler(BaseHandler): def _...
Python
0
@@ -985,16 +985,48 @@ y', i)%0A%0A +%09%09%09%09# Get response from request%0A %09%09%09%09try: @@ -1224,16 +1224,53 @@ e(req)%0A%0A +%09%09%09%09# Serialize and add to responses%0A %09%09%09%09res_ @@ -1340,127 +1340,197 @@ %09%09%09%09 -res_data%5B'key'%5D = key%0A%09%09%09%09key_responses%5Bkey%5D = res_data%0A...
f5014e83525e3c30b4f890f6e09fbb5a706f6afd
Fix references to email HTML in tests
tests/app/main/views/test_email_preview.py
tests/app/main/views/test_email_preview.py
import re import pytest from bs4 import BeautifulSoup from flask import url_for @pytest.mark.parametrize( "query_args, result", [ ({}, True), ({'govuk_banner': 'false'}, 'false') ] ) def test_renders(client, mocker, query_args, result): mocker.patch('app.main.views.index.HTMLEmailTemplat...
Python
0
@@ -1680,32 +1680,47 @@ ct(%22body %3E table +:nth-of-type(3) table %3E tr:nth- @@ -1719,33 +1719,33 @@ tr:nth-of-type( -2 +1 ) %3E td:nth-of-ty @@ -1739,33 +1739,33 @@ td:nth-of-type( -5 +2 )%22)%5B0%5D%5C%0A @@ -2467,30 +2467,39 @@ body %3E table - table +:nth-of-type(1) %3E tr:nth-of @@ -2504,17 ...
fd65b57b08fe129fd2124e657559f6d33ca31d74
fix the help message of the active field. Try not to tell the opposite of the actual behavior.
addons/sales_team/sales_team.py
addons/sales_team/sales_team.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
Python
0
@@ -3781,11 +3781,12 @@ %22 -tru +fals e, i
e92ad9e6fe0dc9088ed440470efef1aedc0ea500
update scope of tsstats.log._sort_logs (rename to tsstats.log._bundle_logs)
tsstats/log.py
tsstats/log.py
# -*- coding: utf-8 -*- import logging import re from collections import namedtuple from datetime import datetime from glob import glob from os.path import basename from tsstats.client import Client, Clients re_log_filename = re.compile(r'ts3server_(?P<date>\d{4}-\d\d-\d\d)' '__(?P<time>...
Python
0.000001
@@ -1244,139 +1244,124 @@ ef _ -sort_logfiles(log_glob):%0A '''%0A collect logfiles from %60log_glob%60 and sort them by date%0A and bundle them by virtualserver-id +bundle_logs(logs):%0A '''%0A bundle %60logs%60 by virtualserver-id%0A and sort by timestamp from filename (if exists) %0A%0A @@ -137...
2d832339471b2762307f2e18936e6ba6115554d7
Fix Title/Text modifiers
preparation/modifiers.py
preparation/modifiers.py
""" Common modifiers for use in resources. """ import itertools import re import copy from hb_res.explanations import Explanation, ExplanationKey from preparation.lang_utils.cognates import are_cognates from preparation.lang_utils.morphology import get_valid_noun_initial_form GAP_VALUE = '###' class Modifier: d...
Python
0.000039
@@ -783,23 +783,16 @@ , target -='text' , **kwar @@ -1105,32 +1105,43 @@ xt':%0A + ret.text = self._modify(e. @@ -1133,24 +1133,28 @@ self._modify +_str (e.text)%0A @@ -1165,17 +1165,19 @@ if -e +ret .text is @@ -1232,24 +1232,36 @@ %0A + ret.title = self._modif @@ -1261,16 +1...
6ef73bb54f0e5f403012d672a756591969567698
Add symbol method to Terminal class
grammpy/Terminal.py
grammpy/Terminal.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ class Terminal: def __init__(self, symbol, grammar): self.__symbol = symbol self.__grammar = grammar def __hash__(self): return hash((self.__symbol, id(self.__grammar))) ...
Python
0.000001
@@ -106,16 +106,29 @@ y%0A%0A%22%22%22%0A%0A +import copy%0A%0A %0Aclass T @@ -323,20 +323,16 @@ mmar)))%0A - %0A def @@ -426,8 +426,75 @@ (other)%0A +%0A def symbol(self):%0A return copy.deepcopy(self.__symbol)%0A
dae5bb7174959aa50ee65b5992bae3d4fce8da18
Use the KeyBindingManager.
pgcli/key_bindings.py
pgcli/key_bindings.py
import logging from prompt_toolkit import filters from prompt_toolkit.keys import Keys from prompt_toolkit.key_binding.registry import Registry from prompt_toolkit.key_binding.bindings.emacs import load_emacs_bindings _logger = logging.getLogger(__name__) def pgcli_bindings(): """ Custom key bindings for pgcl...
Python
0
@@ -12,43 +12,8 @@ ing%0A -from prompt_toolkit import filters%0A from @@ -81,106 +81,40 @@ ing. -registry import Registry%0Afrom prompt_toolkit.key_binding.bindings.emacs import load_emacs_bindings +manager import KeyBindingManager %0A%0A_l @@ -231,78 +231,76 @@ -registry = Registry +key_binding_manager = Key...
77564de1071396af164ee0b71cd93186d9ccffef
Remove access to monitor page for non maintainer
monitor/views.py
monitor/views.py
from django.shortcuts import render, get_object_or_404 from urllib.parse import unquote from django.http import HttpResponseRedirect from django.db.models import Count from django.db.models.functions import TruncDay from django.contrib.auth.decorators import login_required, user_passes_test from django.core.urlresolver...
Python
0
@@ -972,33 +972,23 @@ Y%0A%0A%0A -# Create your views here. +@login_required %0Adef @@ -1018,16 +1018,16 @@ _name):%0A - data @@ -1078,24 +1078,160 @@ short_name)%0A + if not dataset.user_is_maintainer(request.user):%0A return HttpResponseRedirect(reverse('dataset', args=%5Bdataset.short_name%5D))%0A...
ce5376b6af0cb73bf0ed82827d771208be3cfca9
print error if GitPython bug raises
dvc/scm.py
dvc/scm.py
import os from dvc.exceptions import DvcException class SCMError(DvcException): pass class FileNotInRepoError(DvcException): pass class Base(object): def __init__(self, root_dir=os.curdir): self.root_dir = os.path.abspath(os.path.realpath(root_dir)) @staticmethod def is_repo(root_dir...
Python
0
@@ -44,16 +44,46 @@ ception%0A +from dvc.logger import Logger%0A %0A%0Aclass @@ -3139,33 +3139,489 @@ -self.repo.index.add(paths +# NOTE: GitPython is not currently able to handle index version %3E= 3.%0A # See https://github.com/iterative/dvc/issues/610 for more details.%0A try:%0A se...
d9f5118e8271a2e7b1d4ecbaa1301cfd92e324df
fix typo
test/test_rm_spurious_events.py
test/test_rm_spurious_events.py
import re from filecmp import cmp from scripttest import TestFileEnvironment bindir = "bin/" datadir = "test/data/" testdir = "test/testenv_rm_spurious_events/" env = TestFileEnvironment(testdir) # relative to test file environment bindir_rel = "../../" + bindir datadir_rel = "../../" + datadir def test_call_without...
Python
0.999991
@@ -2056,16 +2056,17 @@ not sor +t ed and o
120741c260656c59f87bd0f9e4d06a9a19b581d6
Handle when not on a Mac
munger/filemunger.py
munger/filemunger.py
# -*- coding: utf-8 -*- import sys, subprocess, os, shutil import csv import datamunger class fileManager(object): def __init__(self): self.home_path = os.environ['HOME'] self.backup = self.home_path + "/.munger/hosts_backup.bak" # Initialize the database object for use by file manager self.dbstuff = datamu...
Python
0.000001
@@ -2738,16 +2738,26 @@ ziness.%0A +%09%09%09%09try:%0A%09 %09%09%09%09subp @@ -2801,16 +2801,48 @@ che%22%5D) %0A +%09%09%09%09except Exception:%0A%09%09%09%09%09pass%0A %09%09%09%09retu
ab598f8b7e4beb1afdeff5446c65936f26826728
Change name for reference search direction.
motion_docgen.py
motion_docgen.py
""" Produce documentation for motion axes from commissioning spreadsheet. Retrieves information from commissioning spreadsheet and reformats into a more readable layout. Different output options available. """ import xlrd import argparse import pandas as pd from subprocess import call def process_arguments(): de...
Python
0
@@ -1182,25 +1182,26 @@ ' -Approach movement +Reference approach dir
0b55a7f74f0ea0a0bf884f0c49a54e788ba73bed
Disable EPEL after puppet is installed
plugins/puppet_950.py
plugins/puppet_950.py
""" Installs and configures puppet """ import logging import os import uuid import engine_validators as validate import basedefs import common_utils as utils # Controller object will be initialized from main flow controller = None # Plugin name PLUGIN_NAME = "OSPUPPET" PLUGIN_NAME_COLORED = utils.getColoredText(PLUG...
Python
0
@@ -4778,16 +4778,105 @@ uppet%22)%0A + server.append(%22sed -i -e 's/enabled=1/enabled=0/g' /etc/yum.repos.d/epel.repo %22)%0A
e53413787918df7565755c87cddb863d02b25642
Proper hash-bang line
plugins/python/acm.py
plugins/python/acm.py
#!/sw/bin/python2.4 #!/usr/bin/env python import sys, urllib, urllib2, urlparse, cgi, re, mechanize, codecs from BeautifulSoup import BeautifulSoup ACM_URL = 'http://portal.acm.org/' ERR_STR_PREFIX = 'status\terr\t' # # Plugins get passed the URL as a line of stdin # url = sys.stdin.readline().strip() url_query = ...
Python
0.999867
@@ -1,24 +1,4 @@ -#!/sw/bin/python2.4%0A #!/u
dd611db0142ad27be0800ed11753820bb8607fec
Check if running within xorg
furikura/utils.py
furikura/utils.py
import gi gi.require_version('Gdk', '3.0') gi.require_version('Notify', '0.7') import os import sys import requests from functools import wraps from gi.repository import Gdk from gi.repository import Notify from .config import Config def get_file(path): project_path = os.path.abspath(path) user_path = "/usr...
Python
0
@@ -3092,24 +3092,73 @@ ot_window()%0A +%0A if not root_window:%0A return tuple()%0A%0A buf = Gd
8d1516535a499b65441ee39873f03e4d19a7426e
Bump version
greenado/version.py
greenado/version.py
__version__ = '0.2.0'
Python
0
@@ -12,11 +12,11 @@ = '0.2. -0 +1 '%0A
9a6daa63daeac1bae17980915d84f9babec525ee
add some helper functions
client.py
client.py
import logging import socket import threading from channel import Channel, ChannelList from message import Message class Client: def __init__(self, server, nick, username, realname, **conf): self.sock = None self.nick = None self.server = None self.conf = { "port": 6667, "autorejoin": True, "autoco...
Python
0.000002
@@ -1802,16 +1802,447 @@ rip())%0A%0A +%09def say(self, to, *msg):%0A%09%09%22%22%22Send a message to a user or channel.%22%22%22%0A%09%09self.send(%22PRIVMSG%22, to, %22 %22.join(msg))%0A%0A%09def notice(self, to, *msg):%0A%09%09%22%22%22Send a notice to a user or channel.%22%22%22%0A%09%09self.send(%22NOTICE%22, to,...
864ad2dbb7e58b6aac7f9b02ba2babddeb7f8d53
rename sandbox to server for run command
src/plone.server/setup.py
src/plone.server/setup.py
# -*- coding: utf-8 -*- from setuptools import find_packages from setuptools import setup setup( name='plone.server', version=open('VERSION').read().strip(), long_description=(open('README.rst').read() + '\n' + open('CHANGELOG.rst').read()), classifiers=[ 'Framework :: Plo...
Python
0.000001
@@ -1422,14 +1422,13 @@ 's -andbox +erver = p
84da85dcd3fe734fbd34628de4f1c9eafaef2981
introduce PayloadDecoder
client.py
client.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from aiocoap import resource from aiocoap.message import Message from aiocoap.numbers.codes import Code from aiocoap.protocol import Context from aiocoap.resource import ObservableResource from encdec import PayloadEncoder from handlers import * from model import ClientM...
Python
0.000002
@@ -264,16 +264,32 @@ dEncoder +, PayloadDecoder %0Afrom ha @@ -541,16 +541,25 @@ encoder +, decoder ):%0A @@ -657,16 +657,47 @@ encoder +%0A self.decoder = decoder %0A%0A de @@ -3144,36 +3144,90 @@ -# TODO: implement write here +self.model.apply(self.decoder.decode(request.payload, request...
ee9a30d2c6d6c7e7c9e7f073d1898ff016583142
Update database name
config.py
config.py
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = 'f63f65a3f7274455bfd49edf9c6b36bd' SQLALCHEMY_COMMIT_ON_TEARDOWN = True @staticmethod def init_app(app): pass class DevelopmentConfig(Config): DEBUG = True SQLALCHEMY_DATABASE_URI = 'sqlite:///...
Python
0.000001
@@ -402,16 +402,15 @@ ' -data-dev +weather .sql
28518572a472f28c20ba60cdf536c51c7e9a7796
use metrics_file variable
config.py
config.py
graphite_url = 'http://dori.intra.douban.com:8800' listen_host = '0.0.0.0' listen_port = 8808 debug = False
Python
0.000002
@@ -101,8 +101,38 @@ = False%0A +metrics_file = 'metrics.json'%0A
5f8ce25447905650343be76f73eba8287196a352
change blank
src/reservierung/forms.py
src/reservierung/forms.py
from django import forms import datetime from .models import Reservierung,Raum # Create the form class class ReservierungForm(forms.Form): choice = () model = Reservierung() choice = model.create_choice() reserviertFür = forms.CharField(max_length=40,blank=True) reservierterRaum = forms.ChoiceFiel...
Python
0.005261
@@ -266,17 +266,21 @@ =40, -blank=Tru +required=Fals e)%0A
6d7aa4f1929b48854af0a4012a08f2e70a20d53f
undo breakage
src/startme.py
src/startme.py
#!/usr/bin/env python """ start up my fancy app fix this giant heaping mess later """ import cast_channel_pb2 import socket, ssl, select, time, re from thread import start_new_thread from struct import pack, unpack import sys, os import json #from hexdump import hexdump request_id = os.getpid() chromecast_serve...
Python
0.000002
@@ -1459,24 +1459,25 @@ 4:%0A +# print(%22.%22)%0A @@ -1475,16 +1475,16 @@ nt(%22.%22)%0A - @@ -1882,16 +1882,17 @@ d_utf8)%0A +# prin @@ -1920,16 +1920,16 @@ dent=4)%0A - retu @@ -2130,17 +2130,16 @@ sage)%0A%0A%0A -%0A ######## @@ -2293,17 +2293,16 @@ %0A%0Aprint -( %22Connect ...
09da36df33026560a75b5ebcf6fd17bbb3e93a61
Version up 1.1.3 -> 1.1.4
polemarch/__init__.py
polemarch/__init__.py
''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from vstutils.enviro...
Python
0.000001
@@ -1050,9 +1050,9 @@ 1.1. -3 +4 %22%0A%0Ap
f9548f93e3e6154c3207b0d7b6f3e741ae5287a2
bump to 0.15.1
gemini/version.py
gemini/version.py
__version__="0.15.0"
Python
0.000012
@@ -11,11 +11,11 @@ _=%220.15. -0 +1 %22%0A
f114141aa1311bae4301e158cf2e6db43fe7391a
Bump version to 2.0.0b1
polemarch/__init__.py
polemarch/__init__.py
""" ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) """ import os import warnings try: from vstutils.enviro...
Python
0
@@ -1046,13 +1046,15 @@ = %22 -1.8.5 +2.0.0b1 %22%0A%0Ap
0c1976007c5f34d14bcc01f2fab9dee7c23e6381
bump version to 0.5.0b
gemini/version.py
gemini/version.py
__version__="0.4.0b"
Python
0.000001
@@ -12,9 +12,9 @@ =%220. -4 +5 .0b%22
86e2cdb566fed36571f0ce676c222e4ef18e2e3c
Remove a trailing whitespace
pingparsing/_stats.py
pingparsing/_stats.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import, division, unicode_literals class PingStats(object): def __init__(self, *args, **kwargs): self.__destination = kwargs.pop("destination", None) self.__packet_transmit =...
Python
1
@@ -3159,17 +3159,16 @@ t_unit%7C. - %0A%0A
245b32775db0de95d4feb54533a423748bddf7a0
Bump version number
police_api/version.py
police_api/version.py
__version__ = '1.0.2dev'
Python
0.000002
@@ -17,9 +17,6 @@ .0.2 -dev '%0A
c8457d4b3dd3ac2b16d8cc2d98346740e6acb804
Add reporting engine to system to replace reporting
pitchfork/__init__.py
pitchfork/__init__.py
# Copyright 2014 Dave Kludt # # 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, s...
Python
0
@@ -855,25 +855,22 @@ bp%0Afrom -reporting +engine import @@ -875,22 +875,22 @@ t bp as -report +engine _bp%0A# En @@ -1096,22 +1096,22 @@ ueprint( -report +engine _bp, url @@ -1124,17 +1124,14 @@ x='/ -reporting +engine ')%0A%0A
50ead4fe13eec7ad9760f0f577212beb8e8a51be
Use a queryset to display only kind=page
pombola/info/views.py
pombola/info/views.py
from django.views.generic import DetailView from models import InfoPage class InfoPageView(DetailView): """Show the page, or 'index' if no slug""" model = InfoPage
Python
0.000001
@@ -122,26 +122,22 @@ page -, +f or -'index' if no +the given slu @@ -154,16 +154,80 @@ odel = InfoPage%0A + queryset = InfoPage.objects.filter(kind=InfoPage.KIND_PAGE)%0A
d61aec840ef8aee4fcb4be881e59b32633495da1
fix lambda parameter mismatch
dynamic_rest/renderers.py
dynamic_rest/renderers.py
from collections import defaultdict from rest_framework import renderers class DynamicJSONRenderer(renderers.JSONRenderer): """ Custom renderer that handles post-processing operations such as sideloading and metadata injection. Optional view parameters that control this behavior: * _sideload: (Default: Tr...
Python
0.000066
@@ -979,34 +979,32 @@ al_name', lambda - x : 'objects')()%0A @@ -1073,10 +1073,8 @@ mbda - x : 'o
4fde34e5ae8d316fbb9ded2ff8af29e0f162f99b
Add missing keys in keypair create response
eclcli/bare/v2/keypair.py
eclcli/bare/v2/keypair.py
from eclcli.common import command from eclcli.common import utils class CreateKeypair(command.ShowOne): """Create/Import keypair with/without a SSH public key""" def get_parser(self, prog_name): parser = super(CreateKeypair, self).get_parser(prog_name) parser.add_argument( "keypair...
Python
0.000006
@@ -793,32 +793,63 @@ 'Name',%0A + 'Fingerprint',%0A @@ -1057,32 +1057,124 @@ 'Name',%0A + 'Fingerprint',%0A 'Public Key',%0A 'Private Key',%0A )%0A
330a9a45babc50a46aa8490b3156ff581c423c60
update components
edisgo/grid/components.py
edisgo/grid/components.py
class Component: """Generic component _id : :obj:`int` Unique ID _geom : :shapely:`Shapely Point object<points>` Location as Shapely Point object _grid : #TODO: ADD CORRECT REF The MV or LV grid this component belongs to Notes ----- In case of a MV-LV voltage statio...
Python
0.000001
@@ -126,16 +126,60 @@ points%3E%60 + or %60Shapely LineString object%3Clinestrings%3E%60 %0A @@ -2794,38 +2794,150 @@ %22%22%22 -Location in MV grid ring where +Disconnecting point object%0A%0A Medium voltage disconnecting points = points where MV rings are split under%0A normal operation conditions (=...
245eb98b193238fc49dd43fdf3d3d99c1ac40027
Replace ad-hoc check with math.isclose
ppb_vector/vector2.py
ppb_vector/vector2.py
import typing import collections from math import acos, atan2, cos, degrees, hypot, isclose, radians, sin from numbers import Real from collections.abc import Sequence __all__ = 'Vector2', VectorLike = typing.Union[ 'Vector2', typing.List[Real], # TODO: Length 2 typing.Tuple[Real, Real], typing.Dict...
Python
0
@@ -6176,19 +6176,16 @@ not -(0.99999 %3C +isclose( surf @@ -6205,17 +6205,10 @@ ngth +, -%3C 1.0000 1):%0A
c8e8663f4cc93f2d4c7ed73344521b704ce902df
Write empty string when model has null value for the key (n case of key exists)
pptx_template/text.py
pptx_template/text.py
# # coding=utf-8 import logging import re import numbers from six import string_types import pptx_template.pyel as pyel from pptx.shapes.graphfrm import GraphicFrame from pptx.shapes.table import Table log = logging.getLogger() _EL_RE = re.compile(r"\{([A-Za-z0-9._\-]+)\}") _SLIDE_ID_RE = re.compile(r"\{id:([A-Za...
Python
0.000003
@@ -2727,81 +2727,27 @@ -log.error(u%22Cannot find model value for %7B%25s%7D%22 %25 el)%0A continue%0A +replacing_text = '' %0A @@ -2747,24 +2747,26 @@ ''%0A +el if isinstanc
3fa0f7d3a6f52eb9f7cb7b32dc4e3760d1b50f62
Update __init__.py
ggame/__init__.py
ggame/__init__.py
from ggame.ggame import *
Python
0.000072
@@ -19,8 +19,36 @@ mport *%0A +from ggame.pyinput import *%0A
ceded05092e6193afc914167ce293d8f4725814c
add noise base frequency option
blender/addons/mira_tools/mi_noise.py
blender/addons/mira_tools/mi_noise.py
# ***** BEGIN GPL LICENSE BLOCK ***** # # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distribute...
Python
0.000001
@@ -1466,16 +1466,59 @@ %0A )%0A%0A + frequency = FloatProperty(default=1.0)%0A inte @@ -2672,16 +2672,33 @@ se_pos = + self.frequency * vert.co @@ -3548,28 +3548,29 @@ h.update_edit_mesh(obj.data) +%0A
3441b61821f88b0e04655953fb49fe56c950c852
Use colors from config utils.
gpmcc/utils/plots.py
gpmcc/utils/plots.py
# -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright (c) 2014 Baxter S. Eaves Jr, # Copyright (c) 2015-2016 MIT Probabilistic Computing Project # Lead Developer: Feras Saad <fsaad@mit.edu> # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documen...
Python
0
@@ -1253,93 +1253,45 @@ E.%0A%0A -_colors = %5B'black', 'red', 'blue', 'green', 'yellow', 'orange', 'purple',%0A 'pink'%5D +from gpmcc.utils.config import colors %0A%0A_p @@ -1952,15 +1952,16 @@ %5D = -_ colors +() %0A
fd9ca3fad2f8bf900a2343a2a989636b19e9a780
Update file name for graph from exercise
s5v2.py
s5v2.py
from s5v1 import * def plot_all_bars(price_in_float, exported_figure_filename): prices = list(map(int, price_in_float)) # create a list of prices, maping the int() function onto each item in the price in float list X = numpy.arange(len(prices)) # use numpy to arange (how?) the length of the prices variable, and then...
Python
0
@@ -3888,16 +3888,19 @@ _charts/ +s5- price_in
00ccc121a3b5a87b7aa1c492ce51c07bb2b98ed6
Remove unused ckeditor
admin/base/settings/defaults.py
admin/base/settings/defaults.py
""" Django settings for the admin project. """ import os from urlparse import urlparse from website import settings as osf_settings from django.contrib import messages # import local # Build own local.py (used with postgres) BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # Q...
Python
0
@@ -2066,24 +2066,8 @@ e',%0A - 'ckeditor',%0A
a9b61963d6c1fe6c85c4cafaed47a17f4f5ca589
Add Version, Author and License info
multi-browser.py
multi-browser.py
from burp import IBurpExtender from burp import IHttpListener from burp import IProxyListener from burp import IInterceptedProxyMessage from burp import IContextMenuFactory from javax.swing import JMenuItem from java.awt.event import ActionListener from java.io import PrintWriter class BurpExtender(IBurpExtender,IPr...
Python
0
@@ -1,24 +1,89 @@ +# Author: %09Emmanuel Law%0A# Version:%091.0%0A# License: %09MIT License%0A%0A%0A from burp import IBurpEx
7443aee487c4605e16cd9acef70d0b44c71fa858
make some changes to the version api endpoint to give better version numbers for all of graphite's components
graphiteapi/views.py
graphiteapi/views.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Graphite-api views.""" try: import simplejson as json except: import json import os from functools import wraps from django.http import HttpResponse, Http404 from os.path import splitext from django.conf import settings class JsonResponse(HttpResponse): "...
Python
0
@@ -1034,22 +1034,65 @@ t):%0A -import +from django.conf import settings%0A import glob, pkginfo @@ -1096,24 +1096,23 @@ nfo%0A -graphite +whisper _version @@ -1212,24 +1212,218 @@ i').version%0A + carbon_pkginfo = glob.glob('/opt/graphite/lib/carbon*egg-info')%5B-1%5D%0A try:%0A carbon_ve...
28de4cfc42fc45d8b0ad019b8334ba79ab0e14bd
Make it work properly.
desutest.py
desutest.py
from motobot import IRCBot, IRCLevel import desutest as this import threading import traceback def worker(): this.bot.run() def main(): IRCBot.load_plugins('plugins') this.bot.load_database('desutest.json') this.bot.join('#MotoChan') thread = threading.Thread(target=worker) thread.start()...
Python
0.000043
@@ -135,28 +135,30 @@ main():%0A -IRCB +this.b ot.load_plug @@ -446,20 +446,22 @@ -IRCB +this.b ot.load_
df55075bf9df18ac2e4e62f6be4f768bede3aeb6
Clarified an example param
apollo-ws/visualizer-services/GAIA/trunk/VisualizerServiceClient.py
apollo-ws/visualizer-services/GAIA/trunk/VisualizerServiceClient.py
# Copyright 2013 University of Pittsburgh # # 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.999483
@@ -1552,20 +1552,20 @@ = %22PSC_ -GAIA +FRED _v1.0_42
5c2eccfe652dfad9d5122c01af381a57a5d6d693
Send frames to the TCP socket with a single call instead of 3, this small change causes the unittests to run over 2x faster on my laptop.
amqplib/client_0_8/transport.py
amqplib/client_0_8/transport.py
""" Read/Write AMQP frames over network transports. 2009-01-14 Barry Pederson <bp@barryp.org> """ # Copyright (C) 2009 Barry Pederson <bp@barryp.org> # # 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 Softwa...
Python
0
@@ -2287,18 +2287,41 @@ ck('%3EBHI -', +%25dsB' %25 size,%0A frame_t @@ -2342,66 +2342,24 @@ size -))%0A self._write(payload)%0A self._write('%5Cxce' +, payload, 0xce) )%0A%0A%0A
db87621ec04d599da8b62bb3569d83ac365dca3e
use latest Odoo address, instead of (old) stored ones
l10n_pt_account_invoicexpress/models/res_partner.py
l10n_pt_account_invoicexpress/models/res_partner.py
# Copyright (C) 2021 Open Source Integrators # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import models class ResPartner(models.Model): _inherit = "res.partner" def _prepare_invoicexpress_vals(self): self.ensure_one() vals = { "name": self.name, ...
Python
0
@@ -313,67 +313,8 @@ me,%0A - %22code%22: self.vat or %22ODOO-%7B%7D%22.format(self.id),%0A
504d01e5d3f0842985cb48eb79c4d2700245a5c0
Add publish button to Publisher.
source/harmony/ui/publisher.py
source/harmony/ui/publisher.py
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. from PySide import QtGui import harmony.ui.error_tree class Publisher(QtGui.QDialog): '''Publisher dialog.''' def __init__(self, session, factory, parent=None): '''Initialise with *session*, widg...
Python
0
@@ -1153,16 +1153,121 @@ le(True) +%0A self._publishButton = QtGui.QPushButton('Publish')%0A self._publishButton.setDisabled(True) %0A%0A @@ -1392,16 +1392,80 @@ retch=1) +%0A self.layout().addWidget(self._publishButton, stretch=0) %0A%0A de @@ -3395,32 +3395,79 @@ ex()%0A )%0A...
1bb99080a27658db4685f26f6d2da3cac5d36a6d
fix salt archive cache file bug
sources/salt/states/archive.py
sources/salt/states/archive.py
# -*- coding: utf-8 -*- """ Archive states. """ import logging import os # Import salt libs import salt.utils log = logging.getLogger(__name__) def extracted(name, source, archive_format, tar_options=None, source_hash=None, if_missing=None, ...
Python
0
@@ -4162,32 +4162,49 @@ if re_fetched:%0A + try:%0A sfn = __ @@ -4244,16 +4244,209 @@ _env__)%0A + except Exception, e:%0A ret%5B'result'%5D = False%0A ret%5B'comment'%5D = 'Download source file %25s failed.' %25 source%0A ret%5B'stdout'%5D = str(e)%0A ...
45209ff8fef8662a448a86e67c111b76e0c13f34
fix uncaught python exception python on startup (from rexviewer.getUiView() returning None)
bin/pymodules/usr/keycommands.py
bin/pymodules/usr/keycommands.py
"""a module that executes test commands bound to keys, to help py api dev and testing""" try: import rexviewer as r except ImportError: #not running under rex import mockviewer as r from circuits import Component from naali import inputcontext from PythonQt.QtCore import Qt class KeyCommander(Component): ...
Python
0.00003
@@ -1098,24 +1098,47 @@ getUiView()%0A + if uiview:%0A uivi
f13bf3163913906cd5435417f8aff0f595795a3b
Remove config
radar2gif.py
radar2gif.py
#!/usr/bin/env import requests import pytz import os from PIL import Image from datetime import datetime from images2gif import writeGif from bs4 import BeautifulSoup as Soup from StringIO import StringIO from twython import Twython from config import APP_KEY, APP_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET if not APP_KEY...
Python
0.000002
@@ -226,16 +226,17 @@ Twython%0A +# from con @@ -736,16 +736,136 @@ .get(url +, headers=%7B'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/20100101 Firefox/16.0,gzip(gfe)'%7D) )%0A so
e77bb8f3c3418d5f42c6b382e2d271e85a9e8377
Fix already using rbenv + default ruby. Resolves #369.
pre_commit/languages/ruby.py
pre_commit/languages/ruby.py
from __future__ import unicode_literals import contextlib import io import os.path import shutil from pre_commit.envcontext import envcontext from pre_commit.envcontext import Var from pre_commit.languages import helpers from pre_commit.util import CalledProcessError from pre_commit.util import clean_path_on_failure ...
Python
0
@@ -512,22 +512,25 @@ n):%0A -return +patches = (%0A @@ -608,53 +608,8 @@ v),%0A - ('RBENV_VERSION', language_version),%0A @@ -817,16 +817,131 @@ ,%0A )%0A + if language_version != 'default':%0A patches += (('RBENV_VERSION', language_version),)%0A return patches%0A %0A%0A@con...
5540e720025c0f3beb4ba38584e8729d47202f61
Fix path and file name of report json in test executor (#767)
monitoring/uss_qualifier/rid/test_executor.py
monitoring/uss_qualifier/rid/test_executor.py
import json import os import uuid from pathlib import Path from typing import List from monitoring.monitorlib.auth import make_auth_adapter from monitoring.monitorlib.infrastructure import DSSTestSession from monitoring.uss_qualifier.rid import display_data_evaluator, reports, aircraft_state_replayer from monitoring.u...
Python
0
@@ -3062,17 +3062,18 @@ en(' -../ report +_rid .jso
dc7a3dc3af5a5c286e75b07d5646f271f669151e
Handle some more reply formats to fix a test failure.
plugins/Internet.py
plugins/Internet.py
### # Copyright (c) 2002-2004, Jeremiah Fincher # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of co...
Python
0
@@ -2716,16 +2716,26 @@ er Name' +, 'domain' %5D%0A _r
140f4d85ce07d8c2fad5918dd3146c9a1678d705
fix : remove misc comment
nautilus-python/extensions/linuxdependency.py
nautilus-python/extensions/linuxdependency.py
# This example is contributed by Martin Enlund import os, os.path import urllib from gi.repository import Nautilus, GObject, GConf QLDD_KEY = '/usr/bin/Qldd' class OpenQlddExtension(Nautilus.MenuProvider, GObject.GObject): def __init__(self): pass def _open_qldd(self, file): filename...
Python
0
@@ -1,50 +1,4 @@ -# This example is contributed by Martin Enlund %0Aimp
fe998861aadf2e1964badc90a8881a0329eca439
Update paramsweep.py with new Python package name
paramsweep.py
paramsweep.py
#!/usr/bin/env python """ Run multiple simulations varying a single parameter. """ import foampy from foampy.dictionaries import replace_value import numpy as np from subprocess import call import os import pandas as pd from modules import processing as pr def zero_tsr_fluc(): """Set TSR fluctuation amplitude to...
Python
0
@@ -223,15 +223,32 @@ rom -modules +py_unh_rvat_turbinesfoam imp
fc6b7e95cc7a581f4d49b6e9dfa59de73cac6c63
use explicite matmul and skip operator for old pythons
tests/cupy_tests/math_tests/test_matmul.py
tests/cupy_tests/math_tests/test_matmul.py
import operator import unittest import numpy from cupy import testing @testing.parameterize( *testing.product({ 'shape_pair': [ ((3, 2), (2, 4)), ((2,), (2, 4)), ((3, 2), (2,)), ((2,), (2,)), ((5, 3, 2), (5, 2, 4)), ...
Python
0
@@ -29,19 +29,43 @@ est%0A -%0Aimport num +import sys%0A%0Aimport numpy%0A%0Aimport cu py%0A%0A @@ -1282,16 +1282,606 @@ ir%5B1%5D)%0A%0A + @unittest.skipUnless(sys.version_info %3E= (3, 5),%0A 'Only for Python3.5 or higher')%0A @testing.for_all_dtypes(name='dtype1')%0A @testing.for_...
695a76d98987161ce363e23233fbf7802fe49e57
add failing test
molo/core/tests/test_template_tags.py
molo/core/tests/test_template_tags.py
# coding=utf-8 import pytest from django.test import TestCase, RequestFactory from molo.core.models import ( Main, SiteLanguageRelation, Languages, BannerPage) from molo.core.tests.base import MoloTestCaseMixin from molo.core.templatetags.core_tags import get_parent, bannerpages @pytest.mark.django_db class TestM...
Python
0.00005
@@ -155,16 +155,33 @@ nnerPage +, ArticlePageTags )%0Afrom m @@ -269,16 +269,18 @@ s import + ( get_par @@ -295,16 +295,44 @@ nerpages +,%0A load_tags_for_article) %0A%0A%0A@pyte @@ -5419,12 +5419,675 @@ None)%0A +%0A def test_load_tags_for_article(self):%0A request = self.factory.get('/')%0A...
d8f6092b023660540c69ffb233716f98eb98208c
make sure the datadog port is an int
contentcuration/contentcuration/production_settings.py
contentcuration/contentcuration/production_settings.py
import os from .settings import * SITE_ID = 3 STORAGE_ROOT = "/contentworkshop_content/storage/" DB_ROOT = "/contentworkshop_content/databases/" STATIC_ROOT = "/contentworkshop_static/" MEDIA_ROOT = STORAGE_ROOT SITE_ID = 3 SESSION_ENGINE = "django.contrib.sessions.backends.db" if os.getenv("USE_DATADOG"): I...
Python
0.000128
@@ -580,24 +580,28 @@ GENT_PORT': +int( os.getenv(%22D @@ -620,16 +620,25 @@ D_PORT%22) + or 8126) ,%0A
cccdac334e99ffe026877ff6d72eaed55d7357a7
Add 'self' to data structure definitions in Pomodoro
plugins/pomodoro.py
plugins/pomodoro.py
from twisted.words.protocols import irc from twisted.internet import protocol from twisted.internet import reactor import bot class Pomodoro(): """A pomodoro timer.""" def __init__(self): pomodoros = [] commands = {"start": self.pomodoro_start, "clear": self.clear_pomodoros}...
Python
0
@@ -198,16 +198,21 @@ +self. pomodoro @@ -226,16 +226,21 @@ +self. commands
a7371af8b6583b05152fbd52820a327ac6527272
Add improved error handling to initial parsing of plugin
mozdef_util/mozdef_util/plugin_set.py
mozdef_util/mozdef_util/plugin_set.py
import os import pynsive from operator import itemgetter from utilities.dict2List import dict2List from utilities.logger import logger class PluginSet(object): def __init__(self, plugin_location, enabled_plugins=None): self.plugin_location = plugin_location self.enabled_plugins = self.identify_plu...
Python
0
@@ -1236,16 +1236,37 @@ ntinue%0A%0A + try:%0A @@ -1330,16 +1330,20 @@ + reload(m @@ -1353,16 +1353,20 @@ le_obj)%0A + @@ -1422,16 +1422,20 @@ + if 'prio @@ -1466,16 +1466,20 @@ s_obj):%0A + @@ -1535,16 +1535,20 @@ + el...
ffa4bddcadb3d7310db464e31eeaa8597c3750d3
Increase sleep timeout for pillar refresh test
tests/integration/modules/test_saltutil.py
tests/integration/modules/test_saltutil.py
# -*- coding: utf-8 -*- ''' Integration tests for the saltutil module. ''' # Import Python libs from __future__ import absolute_import import os import time import textwrap # Import Salt Testing libs from tests.support.case import ModuleCase from tests.support.paths import TMP_PILLAR_TREE # Import Salt Libs import s...
Python
0
@@ -6817,17 +6817,17 @@ leep', %5B -1 +5 %5D)%0A%0A
0ec52bf3d0764b110f70e677e2ec9ede8dcbfda1
increase coverage
src/unittest/python/netkraken_tests.py
src/unittest/python/netkraken_tests.py
from __future__ import print_function from datetime import datetime import unittest from mock import patch import netkraken from testhelper import myAssertDictEqual class NetKrakenTests(unittest.TestCase): def test_get_timestamp(self): self.assertEquals(("minute", "2042-12-12T12:12"), ...
Python
0
@@ -205,16 +205,138 @@ Case):%0A%0A + def setUp(self):%0A netkraken.settings%5B%22stagedir%22%5D = %22/stage%22%0A netkraken.settings%5B%22finaldir%22%5D = %22/final%22%0A%0A def @@ -1353,16 +1353,380 @@ ngs())%0A%0A + self.assertEqual(%22/stage/2042-12-12T12:12%22, netkraken.get_current...
00c1cf47fd012b1cbd965a43347615184e404dbe
Fix error in data/geo/airports/download.py (#719)
data/geo/airports/download.py
data/geo/airports/download.py
#!/usr/bin/env python3 # Copyright (c) 2020 VMware Inc. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 # # 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.ap...
Python
0
@@ -1095,28 +1095,16 @@ pefiles/ -airports.zip %22%0A fi
62ea39b80843bb1f8b1c8e585fc5986051146f14
Version 0.0.14
GameOfLife/__init__.py
GameOfLife/__init__.py
'''Conway's Game of Life See: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life This particular Game of Life is implemented as a two dimensional world populated with cells. ''' __author__ = '\n'.join(["Erik O'Shaughnessy", 'erik.oshaughnessy@gmail.com', 'https://gi...
Python
0.000001
@@ -367,9 +367,9 @@ .0.1 -3 +4 %22%0A%0Af
e65aa289792d7721a4bf7954806083d64243a36b
Replace a _get_hashables(self) with a property
nengo_spinnaker/builder/connection.py
nengo_spinnaker/builder/connection.py
import nengo import numpy as np from .builder import Model, ObjectPort, spec from .model import ReceptionParameters, InputPort, OutputPort try: from xxhash import xxh64 as fast_hash except ImportError: from hashlib import md5 as fast_hash @Model.source_getters.register(nengo.base.NengoObject) def generic_so...
Python
0.000009
@@ -1748,32 +1748,42 @@ n True%0A%0A +@property%0A def -_get _hashables(s @@ -1906,20 +1906,16 @@ h(self._ -get_ hashable @@ -1915,18 +1915,16 @@ ashables -() )%0A%0A%0Aclas @@ -2805,36 +2805,32 @@ ameters, self)._ -get_ hashables() +%0A @@ -2814,34 +2814,32 @@ self)._hashables -() +%0A ...
39dbda7b0b1787212c1be592b12da6d0229c8655
Update tests/pytests/unit/states/test_restconf.py
tests/pytests/unit/states/test_restconf.py
tests/pytests/unit/states/test_restconf.py
import pytest import salt.states.restconf as restconf from salt.utils.odict import OrderedDict from tests.support.mock import MagicMock, patch @pytest.fixture(autouse=True) def setup_loader(): setup_loader_modules = {restconf: {}} with pytest.helpers.loader_mock(setup_loader_modules) as loader_mock: y...
Python
0
@@ -157,47 +157,45 @@ ture -(autouse=True)%0Adef setup_loader +%0Adef configure_loader_modules ():%0A setu @@ -194,145 +194,29 @@ -setup_loader_modules = %7Brestconf: %7B%7D%7D%0A with pytest.helpers.loader_mock(setup_loader_modules) as loader_mock:%0A yield loader_mock +return %7Brestconf: %7B%7...
0826548cdc2c75db0ddda128124ec443a1a1b29f
set invalid positions to -1
src/learn/dev_yu/MovePredictionBot.py
src/learn/dev_yu/MovePredictionBot.py
import os from os.path import dirname, abspath import numpy as np import math from src import Utils from src.play.model.Board import EMPTY, BLACK, WHITE from src.play.model.Move import Move BLACK_VAL = -1.35 WHITE_VAL = 1.25 EMPTY_VAL = 0.25 class MovePredictionBot: def __init__(self): project_dir = dir...
Python
0.999806
@@ -1664,17 +1664,18 @@ _idx%5D = -0 +-1 %0A
a6fae3b1090542e19fc90797ea4396d455b8b206
Check if the key meets the cinder API validation
openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.py
openstack_dashboard/dashboards/admin/volume_types/qos_specs/forms.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 t...
Python
0.019802
@@ -539,16 +539,27 @@ cense.%0A%0A +import re%0A%0A from dja @@ -764,16 +764,212 @@ t api%0A%0A%0A +KEY_NAME_REGEX = re.compile(r%22%5E%5Ba-zA-Z0-9-_:. /%5D+$%22, re.UNICODE)%0AKEY_ERROR_MESSAGES = %7B%0A 'invalid': _(%22The key must match the following the regex: %22%0A %22'%5E%5Ba-zA-Z0-9-_:. /%...
bc041886fc502cd0c4fd6405535d6ca9ba94d827
Allow verifyssl to be disabled
kerioapi/python/kerio/api.py
kerioapi/python/kerio/api.py
#!/usr/bin/env python import sys import requests import simplejson as json class KerioApi(): def __init__(self, hostname = '', username = '', password = '', webmail = False, nossl = False): self.hostname = hostname self.username = username self.password = password self.url = ...
Python
0
@@ -178,32 +178,50 @@ e, nossl = False +, verifyssl = True ):%0A self. @@ -410,16 +410,51 @@ webmail +%0A self.verifyssl = verifyssl %0A%0A @@ -2333,32 +2333,55 @@ headers=headers +, verify=self.sslverify )%0A return @@ -3061,32 +3061,55 @@ headers=headers +, verify=self.sslverify ...
7cbcee5dd6488316789fbad6f8d93fc929d560b7
Update users/admin.py
users/admin.py
users/admin.py
from django.contrib import admin from .models import DoctorProfile, AssignmentTemplates, AssignmentResearches, Speciality, Position, AvailableResearchByGroup, DistrictResearchLimitAssign, GroupHideMainMenuButtons class DocAdmin(admin.ModelAdmin): list_filter = ( 'podrazdeleniye', 'specialities', ...
Python
0
@@ -881,24 +881,33 @@ _display = ( +%0A 'title_butto @@ -902,32 +902,40 @@ 'title_buttons', +%0A 'group',)%0A l @@ -927,16 +927,21 @@ 'group', +%0A )%0A li @@ -960,16 +960,25 @@ inks = ( +%0A 'title_b @@ -985,16 +985,24 @@ uttons', +%0A 'group' @@ -1002,16 +1002,21 @@...
06384c5e55498945d5d18cb72ae56fbd63413cd5
Add GCI programs to program map
app/soc/modules/gci/callback.py
app/soc/modules/gci/callback.py
# Copyright 2009 the Melange 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 applicable law or agreed to in writ...
Python
0
@@ -2274,28 +2274,450 @@ ion.getDjangoURLPatterns())%0A +%0A def registerWithProgramMap(self):%0A %22%22%22Called by the server when program_map entries should be registered.%0A %22%22%22%0A%0A self.core.requireUniqueService('registerWithProgramMap')%0A%0A from soc.modules.gci.models.program import GCIPro...