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
efa6e176aa63f646486fbf1c0ea9309ab9c0e127
Make it so if password_hash=='disabled', we do not allow login
ox_herd/core/login_stub.py
ox_herd/core/login_stub.py
"""Stub module for login to allow stand-alone usage. If you import this module via something like from ox_herd.core import login_stub app.register_blueprint(login_stub.LOGIN_STUB_BP) you will enable a simple stub login. """ import passlib from passlib.apps import custom_app_context as pwd_context f...
Python
0.000285
@@ -1063,16 +1063,90 @@ sword'%5D%0A + password_hash = settings.STUB_USER_DB.get('username', 'disabled')%0A @@ -1186,17 +1186,16 @@ _DB and -( pwd_cont @@ -1236,40 +1236,21 @@ rd, -settings.STUB_USER_DB%5Busername%5D) +password_hash ):%0A
2fbfd1724b3fa03b06390cf3bd6bbe6eb6ab7dee
fix starting movies with spaces in the name
omxremote/dbus_connection.py
omxremote/dbus_connection.py
import os import time import shlex import dbus import getpass from dbus.exceptions import DBusException from subprocess import Popen # see https://raw.githubusercontent.com/popcornmix/omxplayer/master/dbuscontrol.sh DBUS_COMMANDS = { 'pause' : 16, 'stop' : 15, 'volumeup' : 18, 'volumedown' : 17, 't...
Python
0.999973
@@ -1606,20 +1606,42 @@ i -b - %25s' %25 movie +'%0A #TODO is +%5Bmovie%5D safe? %0A @@ -1671,16 +1671,26 @@ lit(cmd) + + %5Bmovie%5D , stdout
aa2ab1ca31899d84592f3c6182a7ecef4240038a
fix bugs in creating new task
oysterapp/oyster/models.py
oysterapp/oyster/models.py
import re import os import uuid from datetime import datetime, timedelta from pytz import timezone from django.contrib.auth.models import User from django.db import models from django.db.models.signals import post_save from django.db.models import Sum from amazonproduct import API class UserProfile(models.Model): ...
Python
0.000058
@@ -4321,25 +4321,16 @@ delta = -datetime. timedelt @@ -5268,16 +5268,21 @@ if +self. completa
72be844311f3fe8ad9e5a272cabd83152382f3df
Allow subscribing without a callback (useful if you just want the raw cursor)
mongotools/pubsub/channel.py
mongotools/pubsub/channel.py
import re import logging from datetime import datetime from collections import defaultdict from pymongo.errors import OperationFailure from pymongo.cursor import _QUERY_OPTIONS from mongotools.sequence import Sequence log = logging.getLogger(__name__) class Channel(object): def __init__(self, db, name): ...
Python
0
@@ -973,19 +973,24 @@ callback +=None ):%0A - @@ -1039,16 +1039,49 @@ ttern))%0A + def decorator(func):%0A @@ -1115,16 +1115,117 @@ .append( +func)%0A return func%0A if callback is None: return decorator%0A return decorator( callback
f9515b02b3063aa9b323f8d78ae377b8407ef372
remove query check
corehq/apps/userreports/tests/test_save_errors.py
corehq/apps/userreports/tests/test_save_errors.py
from __future__ import absolute_import from __future__ import unicode_literals import uuid from alembic.operations import Operations from alembic.runtime.migration import MigrationContext from django.test import TestCase from corehq.apps.userreports.app_manager.helpers import clean_table_name from corehq.apps.userrep...
Python
0.000001
@@ -2916,51 +2916,8 @@ e()%0A - with self.assertNumQueries(2):%0A
624e6b783f38fa0ad8dce54a2a3efcd1d84ed5cc
Update corehq/ex-submodules/dimagi/utils/django/email.py
corehq/ex-submodules/dimagi/utils/django/email.py
corehq/ex-submodules/dimagi/utils/django/email.py
from smtplib import SMTPDataError, SMTPSenderRefused from django.conf import settings from django.core.mail import get_connection from django.core.mail.message import EmailMultiAlternatives from dimagi.utils.logging import notify_exception from django.utils.translation import ugettext as _ from corehq.util.metrics im...
Python
0
@@ -4410,17 +4410,16 @@ -b %22Configu @@ -4448,16 +4448,21 @@ ist%22 in +repr( e.smtp_e @@ -4457,32 +4457,33 @@ epr(e.smtp_error +) %0A and
e46280ea27d08170a2312dfe9cb16a337833c110
Update docs in __init__.py
vispy/__init__.py
vispy/__init__.py
# -*- coding: utf-8 -*- # Copyright (c) 2013, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Vispy is a collaborative project that has the goal to allow more sharing of code between visualization projects based on OpenGL. It does this by providing powerful interfa...
Python
0.000001
@@ -384,105 +384,284 @@ y.%0A%0A -These layers are:%0A * vispy.gloo.gl: raw OpenGL ES 2.0 API%0A * vispy.gloo: Object oriented GL API +Vispy consists of the following modules:%0A * vispy.gloo: Object oriented GL API%0A * vispy.gloo.gl: Low level OpenGL API%0A * vispy.app: for creating windows, timers and mainloop...
de027339faf8223dc70c23c73ecafe198cd0551a
set server settings DEBUG var value to True definitly
openquake/server/settings.py
openquake/server/settings.py
import os from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS from openquake.engine import settings as oqe_settings OQSERVER_ROOT = os.path.dirname(__file__) DEBUG = True # NB: when True, test_haz_risk_ok breaks! TEMPLATE_DEBUG = DEBUG PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) ADMI...
Python
0.000062
@@ -187,51 +187,8 @@ True - # NB: when True, test_haz_risk_ok breaks! %0ATEM
50ee776f1945d926e609e89432cc38ee366455fb
Convert Whois Contact_Type from subelement to attribute.
cybox/objects/whois_object.py
cybox/objects/whois_object.py
# Copyright (c) 2013, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import cybox.bindings.whois_object as whois_binding import cybox from cybox.common import ObjectProperties, BaseProperty, String, DateTime, Date from cybox.objects.address_object import Address, EmailAddress from c...
Python
0
@@ -1274,18 +1274,20 @@ contact_ -id +type = Typed @@ -1297,27 +1297,21 @@ ld(%22 -C +c ontact_ -ID%22, String +type%22 )%0A @@ -1312,36 +1312,34 @@ e%22)%0A contact_ -type +id = TypedField(%22C @@ -1345,20 +1345,18 @@ Contact_ -Type +ID %22, Strin
d10b9ae52a6d1894ff2b6686c502fa398b2753da
fix bug of viz
bin/sofa_viz.py
bin/sofa_viz.py
import os import subprocess import sys from functools import partial from sofa_config import * from sofa_print import * def sofa_viz(cfg): print_warning(cfg, 'If your rendering timeline is slow, please try \033[4msofa report --plot_ratio=10\033[24m to downsample scatter points,') print_warning(cfg, '...
Python
0
@@ -772,10 +772,8 @@ hon3 -.6 -m
e48eeab11696c2fcf90cad92ad0a72e617b01e56
Update cluster.py
msmexplorer/plots/cluster.py
msmexplorer/plots/cluster.py
import numpy as np from matplotlib import pyplot as pp from scipy.spatial import Voronoi from ..utils import msme_colors from ..palettes import msme_rgb __all__ = ['plot_voronoi'] @msme_colors def plot_voronoi(kmeans, ax=None, obs=(0, 1), cluster_centers=True, radius=None, color_palette=None, xlabe...
Python
0.000001
@@ -4113,33 +4113,8 @@ .1)) -%0A ax.axis('equal') %0A%0A
d5c0d57ded4428164734039e5345b408a614d10f
fix test_rest_api.py (#4483)
py/testdir_multi_jvm/test_rest_api.py
py/testdir_multi_jvm/test_rest_api.py
# TODO: ugh: import sys, pprint, os sys.path.insert(1, '..') sys.path.insert(1, '.') sys.path.insert(1, os.path.join("..", "py")) import h2o import h2o_test_utils from h2o_test_utils import ModelSpec import os import argparse import time import json import requests sys.path.insert(1, '../rest_tests') ##############...
Python
0
@@ -491,16 +491,25 @@ egator', +%0A 'word2v @@ -561,16 +561,23 @@ forest', + 'gam', 'generi @@ -579,25 +579,16 @@ eneric', -%0A 'target @@ -718,16 +718,88 @@ k' : 2 %7D +,%0A 'gam': %7B 'gam_x': 'dummy_column' %7D, %0A
a935cc920624d2b539fb49fabf87a22a5be89789
Update for Python 3.2; encode postdata as ASCII
coursenotify.py
coursenotify.py
#!/usr/bin/python import urllib.parse, urllib.request, urllib.error import re import config from emailgateway import EmailGateway from time import sleep nosectex = b"NO SECTIONS FOUND FOR THIS INQUIRY." coursenrex = b"<TD class=deleft style=background-color:WHITE>\n<FONT SIZE=\"1\">(.+?)<\/FONT>\n<\/TD>" coursetitex ...
Python
0.002708
@@ -1173,16 +1173,32 @@ ostdata) +.encode('ascii') %0A%09%09page
7da5a62b9e7ccf31c76c1b7ae6b20e23a886d04b
comment to tlg cleaner issue
cltk/corpus/utils/formatter.py
cltk/corpus/utils/formatter.py
"""Process downloaded or local corpora from one format into another. Some formatting can happen here, or invoke language-specific formatters in other files. TODO: Add function to build all tlg/phi files from the index """ __author__ = ['Kyle P. Johnson <kyle@kyle-p-johnson.com>', 'Stephen Margheim <step...
Python
0
@@ -1462,32 +1462,95 @@ se submit bugs!%0A + TODO: %5C%7B.+?%5C%7D%7C%5C(.+?%5C) not always working, tho ok for latin%0A %22%22%22%0A remo
23f5ff5f7e75df9665e650412bbc42ccbf6aa287
Add method get_cluster_message
pygraphc/anomaly/SentimentAnalysis.py
pygraphc/anomaly/SentimentAnalysis.py
from textblob import TextBlob class SentimentAnalysis(object): """Get sentiment analysis with only positive and negative considered. Positive means normal logs and negative sentiment refers to possible attacks. This class uses sentiment analysis feature from the TextBlob library [Loria2016]_. Refere...
Python
0.000007
@@ -23,16 +23,48 @@ extBlob%0A +from operator import itemgetter%0A %0A%0Aclass @@ -664,72 +664,955 @@ lf, -cluster_message):%0A self.cluster_message = cluster_message +graph, clusters):%0A self.graph = graph%0A self.clusters = clusters%0A self.cluster_message = %7B%7D%0A%0A def get_c...
62cc569446f7217fa768f260418e504373f05621
Use one_hot=True when building MNIST
pylearn2/datasets/tests/test_mnist.py
pylearn2/datasets/tests/test_mnist.py
from pylearn2.datasets.mnist import MNIST import unittest from pylearn2.testing.skip import skip_if_no_data import numpy as np class TestMNIST(unittest.TestCase): def setUp(self): skip_if_no_data() self.train = MNIST(which_set = 'train') self.test = MNIST(which_set = 'test') def test_r...
Python
0.0006
@@ -250,16 +250,30 @@ 'train' +, one_hot=True )%0A @@ -310,16 +310,30 @@ = 'test' +, one_hot=True )%0A%0A d
025867a11bbc2bb3f85d44ef44fde059b92557bb
add gcloud-python header to user agent (#9551)
storage/google/cloud/storage/_http.py
storage/google/cloud/storage/_http.py
# Copyright 2014 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
Python
0
@@ -1414,16 +1414,286 @@ sion__%0A%0A + # TODO: When metrics all use gccl, this should be removed #9552%0A if self._client_info.user_agent is None: # pragma: no branch%0A self._client_info.user_agent = %22%22%0A self._client_info.user_agent += %22 gcloud-python/%7B%7D %22.format(__vers...
973052fb81bd57a15eb9f5531d7ce2ae5b572319
Use DB_PW insead of SECRET_KEY
optional/postgresql/start.py
optional/postgresql/start.py
#!/usr/bin/python3 import anosql import psycopg2 import jinja2 import glob import os import subprocess def setup(): conn = psycopg2.connect(user='postgres') queries = anosql.load_queries('postgres', '/conf/queries.sql') # Mailu user queries.create_mailu_user(conn) queries.update_pw(conn, pw=os.en...
Python
0.999521
@@ -328,18 +328,13 @@ et(%22 -SECRET_KEY +DB_PW %22))%0A
6f6cb4760c76f18b859a3c559914ab795b81222e
Fix migration for tests
bluebottle/mails/migrations/0002_auto_20171211_1117.py
bluebottle/mails/migrations/0002_auto_20171211_1117.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2017-12-11 09:38 from __future__ import unicode_literals import urllib2 from django.core.files import File from django.core.files.temp import NamedTemporaryFile from django.db import migrations, connection def scrape_mail_logo(apps, schema_editor): Client =...
Python
0.000002
@@ -750,16 +750,29 @@ t File%0A%0A + try:%0A img_ @@ -810,16 +810,20 @@ e=True)%0A + img_ @@ -867,24 +867,28 @@ read())%0A + + img_temp.flu @@ -893,16 +893,20 @@ lush()%0A%0A + mail @@ -965,24 +965,28 @@ reate()%0A + + mail_setting @@ -1037,16 +1037,58 @@ _temp))%0A...
f2c01877bd9006d739b840317ad7974197bfd95f
Connect to nodes with timeout
king/controller.py
king/controller.py
import redis, string from utilities import distance, threaded_map from plumbum import SshMachine from rpyc.utils.factory import ssh_connect all_dns = redis.Redis(connection_pool=redis.ConnectionPool(host='localhost', port=6379, db=0)) open_resolvers = redis.Redis(connection_pool=redis.ConnectionPool(host='localhost', ...
Python
0
@@ -2203,26 +2203,19 @@ )), -30.0)%0A%0Aprint pl_nodes +timeout=10.0)%0A %0A
eba363f161d0d026bbde295efe814fa6351d94e0
Document the FFT
2019/16b.alt.py
2019/16b.alt.py
#!/usr/bin/env python3 # This does an honest computation of the Flawed Frequency Transmission # that doesn't rely on the offset being large. It computes all of the digits # of the FFT. # On my laptop it ran in two minutes using pypy. from __future__ import print_function import sys import time def go(n, partials): ...
Python
0.000001
@@ -17,18 +17,20 @@ ython3%0A%0A -# +%22%22%22%0A This doe @@ -90,18 +90,16 @@ mission%0A -# that doe @@ -161,17 +161,15 @@ the - +%0A digits -%0A# of @@ -180,10 +180,9 @@ FFT. -%0A# + On @@ -226,16 +226,635 @@ pypy.%0A%0A +The trick is that we compute a partial sums array,%0Awhere partials%5B0%5D =...
bd1bb209aee9370fdb524beffd1bde08ebcec545
Fix announcement board postlist bug
board/mixins.py
board/mixins.py
from django.conf import settings from django.contrib import messages from django.contrib.auth.hashers import check_password, make_password from django.core.exceptions import PermissionDenied from django.db.models import Q from django.http import JsonResponse from django.shortcuts import render from django.utils.transla...
Python
0
@@ -5340,32 +5340,161 @@ queryset(self):%0A + if self.board.type == Board.TYPE_ANNOUNCEMENT:%0A pqs = Post.objects.filter(board=self.board)%0A else:%0A pqs = Po
b0a0cf81ee91226a5ab327d5e2aaa5b7eeb4c984
set the name of the run to be the title in summary_plots()
cr2/__init__.py
cr2/__init__.py
#!/usr/bin/python from pid_controller import PIDController from power import OutPower, InPower from thermal import Thermal, ThermalGovernor from run import Run from results import CR2, get_results, combine_results def summary_plots(actor_order, map_label, **kwords): """A summary of plots as similar as possible to...
Python
0
@@ -1235,130 +1235,8 @@ ne%0A%0A - run_data = Run(path=path)%0A%0A basetime = run_data.thermal.data_frame.index%5B0%5D%0A run_data.normalize_time(basetime)%0A%0A @@ -1443,32 +1443,33 @@ %22%22%0A%0A -plot_temp_kwords +kwords_wout_title = kword @@ -1499,63 +1499,199 @@ in -plot_temp_kwords:%0A ...
98a9ee19511526c95d3b357065356b0b7b3d04cf
Fix timezone issue
board/models.py
board/models.py
import datetime from hashlib import sha224 from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.db import models class UserProfile(models.Model): user = models.OneToOneField(User, related_name='profile') nick = models.CharField(max_length=16) def __str__(...
Python
0.000033
@@ -1,21 +1,4 @@ -import datetime%0A%0A from @@ -139,16 +139,50 @@ models%0A +from django.utils import timezone%0A %0A%0Aclass @@ -2624,24 +2624,15 @@ e = -datetime.datetim +timezon e.no
96b53217c52f02cfd696a6694865d4c43fdf0603
add adaptive protect
apps/pages/templatetags/email2img.py
apps/pages/templatetags/email2img.py
import os, PIL from PIL import Image, ImageDraw, ImageFont from django import template register = template.Library() from mysmile.settings.main import STATIC_ROOT @register.filter(name='email2img') def email2img(email): """ protect email via img """ if os.path.isfile(STATIC_ROOT+'static/images/email2im...
Python
0
@@ -157,17 +157,34 @@ TIC_ROOT +, BASE_DIR, DEBUG %0A - %0A%0A@regi @@ -281,70 +281,479 @@ -if os.path.isfile(STATIC_ROOT+'static/images/email2img.png'):%0A +try:%0A os.path.isfile(STATIC_ROOT+'static/images/email2img.png')%0A if DEBUG:%0A email_mod_time = round(os.stat(BASE_DIR+'conf...
89aed2ef9bcd213bc0d5fef6eee58767d6d16555
Use urllib3.util.retry.Retry
create_books.py
create_books.py
"""Creates a PDF from an article of the project „Mathe für Nicht-Freaks“.""" import time import os import shelve import sys import logging import requests report_logger = logging.getLogger("report_logger") report_logger.setLevel(logging.DEBUG) console_handler = logging.StreamHandler() console_handler.setLevel(logging...
Python
0
@@ -136,24 +136,8 @@ ging -%0Aimport requests %0A%0Are @@ -567,16 +567,70 @@ ndler)%0A%0A +import requests%0Afrom urllib3.util.retry import Retry%0A%0A from mfn @@ -2425,16 +2425,85 @@ ssion()%0A + retry = Retry(total=10, connect=5, read=5, backoff_factor=1)%0A @@ -2558,17 +2558,21 @@ retries= -5...
1b09b30897d92a71e353bd5fd7c7ff2680f74a01
Fix sending of root posts
endpoint/post.py
endpoint/post.py
import json, falcon from db import session import model import util from thread import Thread class Post(object): def on_put(self, req, resp, id): self.on_get(req, resp, id) def on_get(self, req, resp, id): user_id = req.context['user'].get_id() if req.context['user'].is_logged_in() else None post = sessi...
Python
0.000008
@@ -1304,24 +1304,35 @@ rent'%5D%0A%09%09if +parent and not session.
25e2feff3660b2830db43fbb6e428f3eb0fb91bc
Update comment regarding fetch with SHA
gdm/shell.py
gdm/shell.py
"""Utilities to call shell programs.""" import os import sys import logging from sh import Command, ErrorReturnCode from . import common logging.getLogger('sh').setLevel(logging.WARNING) log = common.logger(__name__) def _call(name, *args, ignore=False, catch=True, capture=False): """Call a shell program with...
Python
0
@@ -2370,30 +2370,56 @@ tch -doesn't +only work +s with +a SHA -s + if already present locally %0A
4846e2d50eb66d354b51a72943ceaf7bae714244
add docstring
kuyruk/__main__.py
kuyruk/__main__.py
from __future__ import absolute_import import os import ast import logging import argparse from kuyruk import __version__, importer, Kuyruk from kuyruk.master import Master from kuyruk.config import Config from kuyruk.requeue import Requeuer from kuyruk.manager import Manager logger = logging.getLogger(__name__) de...
Python
0.000005
@@ -1,12 +1,158 @@ +%22%22%22%0AThis is the entry point for main %22kuyruk%22 executable command.%0AIt implements the command line parsing for subcommands and configuration.%0A%0A%22%22%22%0A%0A from __futur
2f25d83cd3e39ae6dbcddcd05f871b4049d8f299
Remove unsafe
laboratory/urls.py
laboratory/urls.py
from django.urls import include, path from django.conf.urls.static import static from django.contrib import admin from django.conf import settings from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import RedirectView, TemplateView from users.views import home from clients.vi...
Python
0.000008
@@ -6963,36 +6963,8 @@ %5D + - staticfiles_urlpatterns() + sta
50f82d92b082e2f6aed95702a3fa4d9f95f420ad
Remove channel masking
wavenet/models.py
wavenet/models.py
'''Models.''' #%% from __future__ import print_function from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import numpy as np import chainer import chainer.functions as F import chainer.links as L import wavenet.utils as utils class MaskedConvolution2D(L....
Python
0.000001
@@ -872,290 +872,41 @@ -def bmask(i_out, i_in):%0A cout_idx = np.expand_dims(np.arange(Cout) %25 3 == i_out, 1)%0A cin_idx = np.expand_dims(np.arange(Cin) %25 3 == i_in, 0)%0A a1, a2 = np.broadcast_arrays(cout_idx, cin_idx)%0A return a1 * a2%0A%0A for j in range(...
d400de72c15902b0bcf169134b4aedd6d4f96438
Allow filename completion for dirname/
pythonx/completers/common/filename.py
pythonx/completers/common/filename.py
# -*- coding: utf-8 -*- import os import re import logging import glob import itertools from completor import Completor from .utils import test_subseq, LIMIT logger = logging.getLogger('completor') PAT = re.compile('(\w{2,}:(//?[^\s]*)?)|(</[^\s>]*>?)|(//)') def gen_entry(pat, dirname, basename): prefix = len...
Python
0.000001
@@ -256,16 +256,78 @@ %7C(//)')%0A +START_NO_DIRNAME = re.compile(%22%5E(%5C.%7B0,2%7D/%7C~/%7C%5Ba-zA-Z%5D:/%7C%5C$)%22)%0A %0A%0Adef ge @@ -1827,16 +1827,88 @@ -Za-z%5D:/ +%7C%0A%0A # 'dirname/'%0A %5B@a-zA-Z0-9()%7B%7D$ +_~.'%22%5Cx80-%5Cxff-%5C%5B%5C%5D%5D+/ %0A @@ -2827,43 +2827,195 @@ ...
effa235eb67bef44389d5e141dcc0abfa8b9b492
Fix typeo in param name (#41287)
lib/ansible/modules/network/edgeos/edgeos_command.py
lib/ansible/modules/network/edgeos/edgeos_command.py
#!/usr/bin/python # Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['...
Python
0
@@ -5809,18 +5809,18 @@ =msg, fa -l i +l ed_condi
459d16bea2f67601c6cf538bd70efaa4a01c28d5
Remove obsolete api-key
sdk/python-sdk/examples/demo-movielens/app_config.py
sdk/python-sdk/examples/demo-movielens/app_config.py
#APP_KEY = 'bfs7QCga121RitVkToTaoSOFTB4i0clnQbu7zTI8hqWMjVKXL9mj225YC7VfpaIR' APP_ID = 2 API_URL = 'http://localhost:7070' THREADS = 25 REQUEST_QSIZE = 500
Python
0.001714
@@ -1,84 +1,4 @@ -%0A%0A#APP_KEY = 'bfs7QCga121RitVkToTaoSOFTB4i0clnQbu7zTI8hqWMjVKXL9mj225YC7VfpaIR'%0A APP_
9aac36daf8df994586761189f5eed9498404bd7f
Enable django-extensions in development.
mystartupmanager/settings.py
mystartupmanager/settings.py
""" Django settings for mystartupmanager project. Generated by 'django-admin startproject' using Django 1.9. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ impor...
Python
0.000014
@@ -1082,16 +1082,74 @@ ff',%0A%5D%0A%0A +if DEBUG:%0A INSTALLED_APPS.append('django_extensions')%0A%0A MIDDLEWA
75b9d1d3f29b6b2fae546b5145b36bfe58bee8c4
use ipaddress on NIC
n0core/model/resource/nic.py
n0core/model/resource/nic.py
from os.path import join from enum import Enum from typing import Dict, List # NOQA from n0core.model import Model from n0core.model import _Dependency # NOQA class NIC(Model): """NIC manage IP address resource. Example: ```yaml id: 0a0615bf-8d26-4e9f-bfbc-bbd0890fcd4f type: resourc...
Python
0.000001
@@ -40,16 +40,75 @@ rt Enum%0A +from ipaddress import IPv4Interface, IPv6Interface # NOQA%0A from typ @@ -1897,27 +1897,59 @@ type: List%5B -str +Union%5BIPv4Interface, IPv6Interface%5D %5D%0A @@ -2445,26 +2445,24 @@ self. -__ hw_addr = hw @@ -2574,102 +2574,8 @@ es%0A%0A - @property%0A ...
859ef23afc78821285188a1cdfc236ac4fede09c
Fix error message print
gh_status.py
gh_status.py
#!/usr/bin/env python ''' File: gh_status.py Author: Carno <carnophage at dobramama dot pl> Description: Simple command line snippet to check GitHub status page ''' from __future__ import print_function import sys import simplejson try: import requests except ImportError: print('Missing module: requests.') ...
Python
0.000149
@@ -2462,14 +2462,16 @@ date + @%7B2%7D: - +%5Cn %7B1%7D%22 @@ -2478,16 +2478,17 @@ .format( +* gh_statu
2ed2df585446518f31ceb996e302c5a7378b5776
Remove contact
lib/modules/exfiltration/Invoke_ExfilDataToGitHub.py
lib/modules/exfiltration/Invoke_ExfilDataToGitHub.py
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): # metadata info about the module, not modified during runtime self.info = { # name for the module that will appear in module menus 'Name': 'Invoke-ExfilDataToGitHub', # list ...
Python
0
@@ -388,35 +388,8 @@ oang - %3Cnga.hoang@nccgroup.trust%3E '%5D,%0A
04cffe48844bf97050d4ae312b2412c492ed5faa
Make heartbeat output less verbose
normandy/health/api/views.py
normandy/health/api/views.py
import os from django.conf import settings from django.core.checks.registry import registry as checks_registry from django.core.checks import messages as checks_messages from rest_framework import status from rest_framework.decorators import api_view, authentication_classes from rest_framework.response import Respons...
Python
0.999999
@@ -1401,16 +1401,17 @@ .DEBUG)%0A +%0A deta @@ -1421,91 +1421,226 @@ = %7B -check.__name__: heartbeat_check_detail(check) for check in all_checks%7D%0A%0A +%7D%0A statuses = %7B%7D%0A level = 0%0A%0A for check in all_checks:%0A detail = heartbeat_check_detail(check)%0A statuses%5Bcheck._...
3780a6e90ebef8c04ba57b0cfc18eefd60d173db
Add `db` attribute to Connector objects.
katagawa/backends/base.py
katagawa/backends/base.py
""" The base implementation of a backend. This provides some ABC classes. """ import abc import typing from abc import abstractmethod import collections from urllib.parse import ParseResult from katagawa.meta import AsyncABC class BaseDialect(abc.ABC): """ The base class for a SQL dialect describer. ...
Python
0
@@ -6025,19 +6025,23 @@ :class:%60 -dsn +urllib. parse.Pa @@ -6259,16 +6259,44 @@ password +%0A self.db = dsn.query %0A%0A @a
0858e4622a3f5eb6761780d9ab35db94086262a3
Add integer defaults for testing_create
keg_elements/db/mixins.py
keg_elements/db/mixins.py
import datetime as dt import random import arrow from blazeutils.strings import randchars from keg.db import db import sqlalchemy as sa from sqlalchemy.inspection import inspect as sainsp import six import sqlalchemy.orm as saorm from sqlalchemy_utils import ArrowType from .utils import ( session_commit, sess...
Python
0.000001
@@ -3196,17 +3196,112 @@ -# +%22%22%22Create an object for testing with default data appropriate for the field type%0A%0A * Will automat @@ -3310,17 +3310,16 @@ ally set -s most fi @@ -3331,92 +3331,142 @@ ypes -. Any fields passed into the method%0A # will override the automatic behavi ...
793c002c838c2e953a15da78bd58423bfefcaec4
Update kfold_cross_validation.py
kfold_cross_validation.py
kfold_cross_validation.py
import pandas as pd import numpy as np from sklearn import model_selection from sklearn.linear_model import LogisticRegression from sklearn.naive_bayes import GaussianNB from sklearn.discriminant_analysis import LinearDiscriminantAnalysis from sklearn.discriminant_analysis import QuadraticDiscriminantAnalysis from skle...
Python
0.000001
@@ -1141,16 +1141,17 @@ ppend((%22 +G NB%22, Gau @@ -2127,16 +2127,17 @@ (%22Result +s : %22+str(
0fc9fbdf171816f240d902190205420e57f70247
support for image, scale and alpha parameters
kivy/modules/touchring.py
kivy/modules/touchring.py
''' Touchring module ================ Show ring around every touch on the table. You can use this module for checking if you don't have any calibration trouble with touches. ''' import os from kivy import kivy_data_dir from kivy.core.image import Image from kivy.graphics import Color, Rectangle if not 'KIVY_DOC' in ...
Python
0
@@ -296,135 +296,68 @@ le%0A%0A -if not 'KIVY_DOC' in os.environ:%0A ring_fn = os.path.join(kivy_data_dir, 'images', 'ring.png')%0A ring_img = Image(ring_fn)%0A +pointer_image = None%0Apointer_scale = 1.0%0Apointer_alpha = 0.7 %0A%0Ade @@ -518,18 +518,29 @@ , 1, 1, -.7 +pointer_alpha )%0A @@ -550,24 +5...
38819f56efad67594c2a4230118dd85833c62e29
Add owner & group support to DirectoryProvider
kokki/providers/system.py
kokki/providers/system.py
from __future__ import with_statement import grp import os import pwd import subprocess from kokki.base import Fail from kokki.providers import Provider class FileProvider(Provider): def action_create(self): path = self.resource.path write = False content = self._get_content() if ...
Python
0
@@ -3068,63 +3068,59 @@ -if self.resource.mode:%0A stat = os.stat(path) +stat = os.stat(path)%0A if self.resource.mode: %0A @@ -3352,32 +3352,32 @@ .resource.mode)%0A - @@ -3393,32 +3393,839 @@ urce.updated()%0A%0A + if self.resource.owner:%0A try:%0A ...
30dbd07eaf234b72c85859698462999ac06e3a18
fix omission
lab/cloud/cloud_server.py
lab/cloud/cloud_server.py
from lab.server import Server from lab.decorators import section class CloudServer(Server): def __init__(self, cloud, dic): self.cloud = cloud self._dic = dic if 'compute' in dic else self.os_show(name_or_id=dic.get('ID', dic.get('id'))) super(CloudServer, self).__init__(ip=self.ips, user...
Python
0.998708
@@ -3719,16 +3719,22 @@ srv. +cloud. pod.r_co
b020d1549b99ea85569fcefbeb6582ee186b8ef6
print HA networks to log, print ports
lab/deployers/__init__.py
lab/deployers/__init__.py
import abc from lab.with_config import WithConfig class Deployer(WithConfig): @abc.abstractmethod def wait_for_cloud(self, list_of_servers): """Make sure that cloud is up and running on the provided list of servers :param list_of_servers: list of server provided during provisioning phase ...
Python
0.000001
@@ -398,122 +398,1012 @@ from -_server.run(command='neutron net-list %7Bcloud%7D'.format(cloud=cloud))%0A from_server.run(command='neutron subne + lab.logger import create_logger%0A%0A log = create_logger()%0A net_list = from_server.run(command='neutron net-list %7Bcloud%7D'.format(cloud=cloud))%0...
9044ae987f059c8dc173f6c21d75a4908a121afe
Update link of dependency
sale_payment_method_transaction_id/__openerp__.py
sale_payment_method_transaction_id/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
Python
0
@@ -1166,17 +1166,18 @@ -' +# base_tra @@ -1191,64 +1191,124 @@ n_id -', # in lp:banking-addons/bank-statement-reconcile-7.0 + is in%0A # https://github.com/OCA/bank-statement-reconcile/tree/7.0%0A 'base_transaction_id', %0A
49bd9ae52e24375b61999fa6a4915866ea9a0377
add travis ci
test/test.py
test/test.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # __author__ = 'kute' # __mtime__ = '2016/12/25 17:47' """ """ # from __future__ import absolute_import import unittest from eventor.core import Eventor from eventor.util import EventorUtil import os class SimpleTest(unittest.TestCase): def test_run_with_tasklis...
Python
0.001532
@@ -828,16 +828,25 @@ get_dir( +relative= %22..%22), %22 @@ -857,16 +857,37 @@ .txt%22)%0A%0A + print(file)%0A%0A
ec1d1f4de3c46257d3ecaaba6d2775637e6cfe44
Fix travis ci test configuration
test/test.py
test/test.py
import subprocess import sys import shlex import signal import os process = None def main(): global process cwd = os.path.dirname(os.path.realpath(__file__)) command = os.path.join(cwd, '..', 'npmws.sh') if os.environ.get('TRAVIS_CI'): print 'travis detected' fp = open(command, 'r') ...
Python
0.000001
@@ -240,17 +240,38 @@ ('TRAVIS -_ +') or os.environ.get(' CI'):%0A
c7e55bfd8284c4bb6755abc51dd7c940bca9d81a
Add sound level to influx
sensor_consumers/dust_node.py
sensor_consumers/dust_node.py
# coding=utf-8 from local_settings import * from utils import SensorConsumerBase import redis import datetime import sys class DustNode(SensorConsumerBase): def __init__(self): SensorConsumerBase.__init__(self, "indoor_air_quality") def run(self): self.subscribe("dust-node-pubsub", self.pubsu...
Python
0.000014
@@ -951,16 +951,77 @@ ty%22%5D, 5) +,%0A %22sound_level%22: data%5B%22data%22%5D%5B%22sound_level%22%5D, %0A
8418e695e2a93e0d00cc03513d85d6c5bd542d9d
clean up
NodeGraphQt/widgets/scene.py
NodeGraphQt/widgets/scene.py
from PySide import QtGui, QtCore from .constants import VIEWER_BG_COLOR, VIEWER_GRID_OVERLAY, VIEWER_GRID_COLOR class NodeScene(QtGui.QGraphicsScene): def __init__(self, parent=None): super(NodeScene, self).__init__(parent) self.background_color = VIEWER_BG_COLOR self.grid = VIEWER_GRID_...
Python
0.000001
@@ -428,29 +428,16 @@ .format( -%0A self.__m @@ -448,33 +448,109 @@ e__, - self.__class__.__name__, +%0A self.__class__.__name__,%0A sel @@ -559,25 +559,16 @@ viewer() -%0A )%0A%0A d
b0f0a71ec1aa232bc544d53e19418acb167e4df4
Update configuration.py
configuration/configuration.py
configuration/configuration.py
import discord from cogs.utils import checks from discord.ext import commands from cogs.utils.chat_formatting import pagify class Config: def __init__(self, bot): self.bot = bot @commands.command() async def countservers(self): """ Checks how many servers the bot is on""" m...
Python
0.000001
@@ -952,499 +952,9 @@ - #Lines 38 to 69 are not written by me, are edited from TwentySix26's rift.py%0A #https://github.com/Twentysix26/26-Cogs/blob/master/LICENSE%0A #Under the GNU General Public License, I have the permission to reuse and modify this code for commercial purposes%0A #I fork...
6e9b1ad4af56dbde51673176113bec91baa90327
add iosdriver
contesto/basis/driver_mixin.py
contesto/basis/driver_mixin.py
from contesto.exceptions import UnknownBrowserName class AbstractDriver(object): _driver_type = None dc_from_config = None @classmethod def _form_desired_capabilities(cls, driver_settings): try: cls.dc_from_config = driver_settings["desired_capabilities"] except KeyError: ...
Python
0.000001
@@ -1373,28 +1373,655 @@ return desired_capabilities%0A +%0A%0Aclass IosDriver(AbstractDriver):%0A _driver_type = 'iosdriver'%0A%0A @classmethod%0A def _form_desired_capabilities(cls, driver_settings):%0A super(IosDriver, cls)._form_desired_capabilities(driver_settings)%0A if cls.dc_from_config:...
be99d4282b51b91cd756077e3cf946f44d641210
Fix login redirect URL.
contributions/settings/base.py
contributions/settings/base.py
""" Django settings for contributions project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ....
Python
0
@@ -5835,23 +5835,16 @@ URL = '/ -dariah_ contribu @@ -5851,14 +5851,9 @@ tion -s/list +/ '%0A%0AM
7970536f0fffb8ff60be13b34ec3a5c3ac569269
Fix a bug that does not save features in track_propagation_share_net.
tools/propagate/track_propagation_share_net.py
tools/propagate/track_propagation_share_net.py
#!/usr/bin/env python # -------------------------------------------------------- # Test regression propagation on ImageNet VID video # Modified by Kai KANG (myfavouritekk@gmail.com) # -------------------------------------------------------- """Test a Fast R-CNN network on an image database.""" import argparse import...
Python
0
@@ -5580,21 +5580,30 @@ ep_feat= -False +args.keep_feat , batch_
845a8795286efca7ca5a794a0e4de493aa0c0abf
Add support for FIELD_TIMESTAMP in jamendo client
services/3rd_party/jamendo.py
services/3rd_party/jamendo.py
from ac_mediator.exceptions import * from services.acservice.constants import * from services.acservice.utils import * from services.acservice.base import BaseACService from services.acservice.auth import ACServiceAuthMixin from services.acservice.search import ACServiceTextSearchMixin, translates_field from services.a...
Python
0
@@ -412,16 +412,32 @@ adMixin%0A +import datetime%0A %0A%0Aclass @@ -2497,16 +2497,224 @@ url'%5D)%0A%0A + @translates_field(FIELD_TIMESTAMP)%0A def translate_field_timestamp(self, result):%0A return datetime.datetime.strptime(result%5B'releasedate'%5D, '%25Y-%25m-%25d').strftime(AUDIOCOMMONS_STRING_TI...
f6533f739277f55abe8980cff1e6a0f27d8d7a71
Fix relation backreference modelization
src/adhocracy_core/adhocracy_core/sheets/relation.py
src/adhocracy_core/adhocracy_core/sheets/relation.py
"""Sheets for statements about relations between process content/comments.""" import colander from adhocracy_core.interfaces import IPredicateSheet from adhocracy_core.interfaces import ISheet from adhocracy_core.interfaces import ISheetReferenceAutoUpdateMarker from adhocracy_core.interfaces import SheetToSheet from ...
Python
0.000044
@@ -452,27 +452,8 @@ ence - as ReferenceSchema %0Afro @@ -1781,38 +1781,32 @@ ject = Reference -Schema (reftype=Polariz @@ -1830,52 +1830,8 @@ ence -,%0A backref=True )%0A @@ -1850,22 +1850,16 @@ eference -Schema (reftype @@ -2210,16 +2210,171 @@ re.%22%22%22%0A%0A + polarizat...
cb9f41eeef3eccc88e7cbc5e9e5028aa10ac74e0
version bump
spyne/__init__.py
spyne/__init__.py
# # spyne - Copyright (C) Spyne contributors. # # 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. # # This libra...
Python
0.000001
@@ -787,17 +787,17 @@ = '2.9. -3 +4 '%0A%0Afrom
c577690bbb6a52986fc2697ce0244d629d178238
remove debug mode from sqhelper
sqhelper/group.py
sqhelper/group.py
import pysam import os from bcbio.utils import file_exists, safe_makedir from bcbio.provenance import do from bcbio.distributed.transaction import tx_tmpdir, file_transaction from bcbio.log import logger import shutil MAX_EDIT_DISTANCE = 2 MAX_BEST = 1000 logger.LOG_NAME = "seqcluster-helper" def run_seqcluster(data...
Python
0.000002
@@ -2241,12 +2241,8 @@ pts%7D - -d %22)%0A
b3fd19f309c883b9f09be964f1647dfb455ccb68
Fix domain models __slots__ field
domain_models/model.py
domain_models/model.py
"""Domain models model.""" import six from . import fields class DomainModelMetaClass(type): """Domain model meta class.""" def __new__(mcs, class_name, bases, attributes): """Domain model class factory.""" cls = type.__new__(mcs, class_name, bases, attributes) for field_name, fiel...
Python
0.999113
@@ -669,60 +669,8 @@ ()%0A%0A - __slots__ = ('__view_key__', '__unique_key__')%0A%0A
cc84a379132c8d500de62a5a111210ca867a71ae
Fix typo registrant->registrar
domaintools/results.py
domaintools/results.py
"""Defines the used Result object based on the current versions and/or features available to Python runtime Additionally, defines any custom result objects that may be used to enable more Pythonic interaction with endpoints. """ import sys from itertools import chain try: # pragma: no cover from collections impor...
Python
0.000413
@@ -2149,18 +2149,17 @@ registra -nt +r _%7B0%7D'.fo
92150ddbdac63da3920297197f723c18fc0a9aac
Add HagarTheHorrible
dosagelib/plugins/h.py
dosagelib/plugins/h.py
# Copyright (C) 2012-2013 Bastian Kleineidam from re import compile from ..scraper import _BasicScraper from ..util import tagre from ..helpers import bounceStarter class HarkAVagrant(_BasicScraper): url = 'http://www.harkavagrant.com/' starter = bounceStarter(url, compile(tagre("a", "href", r'(http:...
Python
0.000112
@@ -122,16 +122,43 @@ rt tagre +, getPageContent, fetchUrls %0Afrom .. @@ -188,16 +188,908 @@ arter%0A%0A%0A +class HagarTheHorrible(_BasicScraper):%0A url = 'http://www.hagarthehorrible.net/'%0A stripUrl = 'http://www.hagardunor.net/comicstrips_us.php?serietype=9&colortype=1&serieno=%25s'%0A firstStripUrl ...
3256d46fe1063f1da65b58942fd4f68b3c0d081f
Append extra args with a space for dox.yml
dox/config/dox_yaml.py
dox/config/dox_yaml.py
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # 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.000005
@@ -1190,32 +1190,42 @@ %0A return +%22 %22.join(%5B self._open_dox_y @@ -1249,20 +1249,11 @@ ds') +%5D + - %22 %22.join( extr
4369de9f0f44860f27d26f6814dc100fefe421be
Fix tests for Django 1.10
test_urls.py
test_urls.py
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'temp.views.home', name='home'), # url(r'^temp/', include('temp.foo.urls')), # Uncommen...
Python
0.000002
@@ -1,110 +1,51 @@ -from django.conf.urls import patterns, include, url%0A%0A# Uncomment the next two lines to enable the admin:%0A# +import django%0A%0Aif django.VERSION %3E= (1,10):%0A fro @@ -60,20 +60,22 @@ .con -trib +f.urls import admi @@ -74,420 +74,154 @@ ort -admin%0A# admin.autodiscover()%0A%0Aurl...
03b36b5dc594bbe239d0ad66dc43ea7d1832072c
Remove warnings
setuptools/distutils_patch.py
setuptools/distutils_patch.py
""" Ensure that the local copy of distutils is preferred over stdlib. See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 for more motivation. """ import sys import re import os import importlib import warnings is_pypy = '__pypy__' in sys.builtin_module_names def warn_distutils_present(): ...
Python
0
@@ -233,652 +233,8 @@ s%0A%0A%0A -is_pypy = '__pypy__' in sys.builtin_module_names%0A%0A%0Adef warn_distutils_present():%0A if 'distutils' not in sys.modules:%0A return%0A if is_pypy and sys.version_info %3C (3, 7):%0A # PyPy for 3.6 unconditionally imports distutils, so bypass the warning%0A ...
a66601287def87dd518e9171e509bf0afadd7d5b
change logger warn to debug for logger not provided
portality/tasks/harvester_helpers/epmc/client.py
portality/tasks/harvester_helpers/epmc/client.py
from portality.core import app from portality.lib import httputil import urllib.request, urllib.parse, urllib.error, string from portality.settings import BASE_FILE_PATH from portality.tasks.harvester_helpers.epmc import models from portality.tasks.harvester_helpers.epmc.queries import QueryBuilder from datetime impor...
Python
0
@@ -2268,20 +2268,21 @@ .logger. -warn +debug (%22Logger
9358c36179e91a1ccb4fe9911c415290e4baee4e
make data span 24 hours
data/prepare.py
data/prepare.py
#!/usr/bin/env python ONLINE_RETAIL_XLSX = 'OnlineRetail.xlsx' ONLINE_RETAIL_CSV = 'OnlineRetail.csv' ONLINE_RETAIL_JSON = 'OnlineRetail.json' def download_spreadsheet(): print('Starting download_spreadsheet() ...') # support python 2 and 3 try: # python 3 import urllib.request as url...
Python
0.999982
@@ -680,16 +680,37 @@ s as pd%0A + import datetime%0A%0A df = @@ -771,20 +771,16 @@ etail')%0A - %0A # r @@ -901,105 +901,84 @@ nt)%0A +%0A -df%5B'InvoiceTime'%5D = pd.DatetimeIndex(df%5B'InvoiceDate'%5D).time%0A%0A # +# remove negative quantities - this also remove +s n -egative quantit...
9882ef2dcdffb238bfd1fd8c32365e8716f8c29a
Update nvidia_vbios_vfio_patcher.py
nvidia_vbios_vfio_patcher.py
nvidia_vbios_vfio_patcher.py
#!/usr/bin/env python from __future__ import print_function import sys import binascii import argparse import re # raw_input doesn't exist in Python 3 try: raw_input except NameError: raw_input = input PROMPT_TEXT = "I agree to be careful" WARNING_TEXT = """ USE THIS SOFTWARE AT YOUR OWN DISCRETION. THIS...
Python
0.000001
@@ -922,24 +922,46 @@ offsets(self +, disable_footer=False ):%0A %22 @@ -1175,16 +1175,19 @@ header: + %0A @@ -1619,33 +1619,22 @@ not -args. disable -- +_ footer --strip :%0A @@ -3862,16 +3862,38 @@ rom(self +, disable_footer=False ):%0A @@ -4070,33 +4070,22 @@ not -args. disable...
cdf0e53acf6d8164d186f8e6fa1735ed81f5f515
Fix import in v2 pool types
octavia/api/v2/types/pool.py
octavia/api/v2/types/pool.py
# Copyright 2014 Rackspace # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
Python
0
@@ -679,33 +679,33 @@ om octavia.api.v -1 +2 .types import he @@ -735,17 +735,17 @@ ia.api.v -1 +2 .types i
0534822dc02285060f57cdb27bda5ad3fbce8727
Add support for altpassword.
sippy/IVoiSysAuthorisation.py
sippy/IVoiSysAuthorisation.py
# Copyright (c) 2003-2005 Maxim Sobolev. All rights reserved. # Copyright (c) 2006-2007 Sippy Software, Inc. All rights reserved. # # This file is part of SIPPY, a free RFC3261 SIP stack and B2BUA. # # SIPPY is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
Python
0
@@ -1557,16 +1557,62 @@ , domain +, ' %5C%0A 'altpassword, use_alt_password FROM SB @@ -2007,45 +2007,166 @@ main - = results%5B0%5D%5B0%5D%0A res_cb(( +, altpassword, use_alt_password = results%5B0%5D%5B0%5D%0A if use_alt_password == 0:%0A altpassword = password%0A ...
b2354fdde28bf841bebfc1f5347b2bde3c3cc390
Fix bill table missed column
db/TableBill.py
db/TableBill.py
{ PDBConst.Name: "bill", PDBConst.Columns: [ { PDBConst.Name: "ID", PDBConst.Attributes: ["int", "not null", "auto_increment", "primary key"] }, { PDBConst.Name: "Datetime", PDBConst.Attributes: ["datetime", "not null"] }, { PDBConst.Name: "Amount", ...
Python
0.000005
@@ -168,32 +168,124 @@ %22%5D%0A %7D,%0A %7B%0A + PDBConst.Name: %22PID%22,%0A PDBConst.Attributes: %5B%22int%22, %22not null%22%5D%0A %7D,%0A %7B%0A PDBConst
e0ba2d5b7e7b1958d269dc23f6159671db4f13eb
handle MultipleObjectsReturned exception in views when display_key is null
dynamic_forms/views.py
dynamic_forms/views.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import messages from django.http import Http404 from django.utils.translation import ugettext_lazy as _ from django.views.generic import TemplateView, DetailView, FormView from dynamic_forms.actions import action_registry from dynamic...
Python
0
@@ -3867,16 +3867,17 @@ except +( FormMode @@ -3894,16 +3894,56 @@ NotExist +, FormModelData.MultipleObjectsReturned) :%0A
5da6ebbab96dd29a205d82b8fd0996085995cd2b
Update to fix width/height for rotation.
db_oldrotate.py
db_oldrotate.py
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- from pyexiv2 import Image as ExivImage from db_add import exif2rotation from dbclient import dbclient client = dbclient() posts = client._search_post("SPFrotate", ["rotate"]) print len(posts), "posts" for post in posts: if post["rotate"] == -1: m = post["md5"] e...
Python
0
@@ -84,16 +84,29 @@ ivImage%0A +import Image%0A from db_ @@ -164,28 +164,162 @@ ent%0A -%0Aclient = dbclient() +from sys import argv%0A%0Aopts = argv%5B1%5D # z for size (fix for rotation), r for rotate (from exif)%0A%0Aclient = dbclient()%0Afields = %5B%22rotate%22, %22width%22, %22height%22%5D %0Apos @@ -351,27 +...
b047bb4b75df155cb20308612954767c8a5f5ac8
Fix error message displayed when the initial api call on the dialogue screen fails
go/apps/dialogue/view_definition.py
go/apps/dialogue/view_definition.py
from django.http import HttpResponse from bootstrap.forms import BootstrapForm from go.api.go_api import client from go.api.go_api.client import GoApiError from go.conversation.view_definition import ( ConversationViewDefinitionBase, ConversationTemplateView) class DialogueEditView(ConversationTemplateView): ...
Python
0.000001
@@ -797,20 +797,15 @@ oad -routing tabl +dialogu e fr
a50bb67591ce134c0333176872e3953eaedc6d2b
fix missing archive extention
perfrunner/helpers/remote.py
perfrunner/helpers/remote.py
from uuid import uuid4 from fabric.api import execute, hide, get, run, parallel, settings from logger import logger from perfrunner.helpers import Helper def all_hosts(task): def wrapper(*args, **kargs): self = args[0] with hide('output', 'running'): with settings(user=self.ssh_usern...
Python
0.000262
@@ -1907,32 +1907,36 @@ get('/tmp/%7B0%7D +.zip '.format(fname)) @@ -1955,32 +1955,36 @@ ('rm -f /tmp/%7B0%7D +.zip '.format(fname))
45d9869665f97baacad5da7df2064d9ff859b5ef
Fix ordering of globbed log files.
post.py
post.py
#!/usr/bin/python # Read irc logs from our private channel and post them to our wiki import glob import json import os import re import sys import textwrap from simplemediawiki import MediaWiki with open(os.path.expanduser('~/.mediawiki'), 'r') as f: conf = json.loads(f.read())['ircbot'] wiki = MediaWiki(conf...
Python
0
@@ -1793,20 +1793,16 @@ -for filename in @@ -1797,19 +1797,19 @@ filename - in +s = sorted( @@ -1835,16 +1835,135 @@ path'%5D)) +%0A ordered_filenames = filenames%5B1:%5D%0A ordered_filenames.append(filenames%5B0%5D)%0A for filename in ordered_filenames :%0A
944075769a7b0e00588f23ee89d3936ae8e189c0
Add support for unstaging files
pvcs.py
pvcs.py
import os import sys import click from lib import file_helpers @click.group() def cli(args=sys.argv): """A simple, easy-to-use version control system """ pass @cli.command("init") def initialize(): try: os.mkdir(".pvcs") os.mkdir(".pvcs/revisions") except FileExistsError: p...
Python
0
@@ -2171,28 +2171,1547 @@ paths):%0A -pass +files_to_unstage = %5B%5D%0A for file_path in paths:%0A%0A # Create list of full path for each file listed%0A if os.path.isdir(file_path):%0A # Loop through directory%0A files_to_unstage.extend(file_helpers.expand_directory(file_pat...
35eb304e2a4d499094499e027396b48d7655e9ec
fix try catch block
remu.py
remu.py
import telebot import logging import time import threading import argparse # from datetime import date, time, datetime, timedelta import libremu_backend as engine logging.basicConfig(filename='log.txt', format='[%(asctime)s] [%(levelname)s] %(message)s', level=logging.INFO) f = open('token.id', 'r') token = f.read(...
Python
0.000001
@@ -4130,16 +4130,33 @@ e True:%0A + try:%0A @@ -4177,16 +4177,20 @@ + + except:%0A @@ -4185,16 +4185,20 @@ except:%0A + @@ -4227,16 +4227,29 @@ wn =(%22)%0A + %0A engi
fba5a5cbe7beb964e25a1f2d7a3a5bbf73b45f40
Make Dialogs OPTIONALLY cancellable
bot/base_bot.py
bot/base_bot.py
from telegram import Bot, Update from telegram.ext import CommandHandler, Filters, MessageHandler, Updater from typing import * class Context: def __init__(self, base_bot, bot: Bot, update: Update, args: List[str]=None): self.base_bot = base_bot self.bot = bot self.update = update ...
Python
0.999599
@@ -2006,31 +2006,20 @@ -ctx.send_message(%22...%22) +return False %0A%0A @@ -3460,24 +3460,27 @@ +if dialog.cance @@ -3481,25 +3481,30 @@ .cancel(ctx) -%0A +:%0A
e6d539d073bcac1bee247ca66706621b11969fd6
Support Meta and F* keys in urwid.
bpython/keys.py
bpython/keys.py
# The MIT License # # Copyright (c) 2008 Simon de Vlieger # # 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 rights # to use, copy, modify...
Python
0
@@ -1955,17 +1955,67 @@ %25s' %25 c - +%0A urwid_key_dispatch%5B'M-%25s' %25 c%5D = 'meta %25s' %25 c %0A%0A# fill @@ -2447,17 +2447,17 @@ (x)%5D = ' -F +f %25s' %25 st
6c866caa0b5d6a251c694e13a3f1d5e32c45ae3a
Add missing NameFilter.to_es_filter() implementation
corehq/apps/export/filters.py
corehq/apps/export/filters.py
from corehq.apps.es import filters as esfilters from corehq.apps.es.cases import ( owner, is_closed, opened_range, modified_range, user, closed_range, ) class ExportFilter(object): """ Abstract base class for an export filter on a single case or form property """ def to_es_fil...
Python
0.000004
@@ -1132,16 +1132,17 @@ losed)%0A%0A +%0A class Na @@ -1277,32 +1277,53 @@ r -aise NotImplementedError +eturn esfilters.term('name', self.case_name)%0A %0A%0Acl @@ -1387,32 +1387,32 @@ s_filter(self):%0A - return o @@ -1462,16 +1462,17 @@ f.lte)%0A%0A +%0A class Op
b170167612435211d6eee45a4d13365686fc642d
Return sale's shipment address as shipping address on txn #4883
sale.py
sale.py
# -*- coding: utf-8 -*- """ sale :copyright: (c) 2014 by Openlabs Technologies & Consulting (P) Limited :license: BSD, see LICENSE for more details. """ from decimal import Decimal from trytond.model import fields from trytond.pool import PoolMeta, Pool from trytond.pyson import Eval from trytond.transact...
Python
0
@@ -5306,8 +5306,118 @@ 'Sale')%0A +%0A def get_shipping_address(self, name):%0A return self.sale and self.sale.shipment_address.id or None%0A
fe3edb61291950fc7412eece65bc1b5a76a8b476
Enable simple logging
cvdb/settings.py
cvdb/settings.py
""" Django settings for cvdb project. Generated by 'django-admin startproject' using Django 1.11.1. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os im...
Python
0.000001
@@ -4137,8 +4137,362 @@ tatic')%0A +%0ALOGGING = %7B%0A 'version': 1,%0A 'disable_existing_loggers': False,%0A 'handlers': %7B%0A 'console': %7B%0A 'level': 'DEBUG',%0A 'class': 'logging.StreamHandler'%0A %7D%0A %7D,%0A 'loggers': %7B%0A 'viewcv': %7B%0A ...
4548f5d5e87d8403f6bfd381a9956cb59c9c3468
Fix default for default_return_policy
sale.py
sale.py
# -*- coding: utf-8 -*- """ sale.py :copyright: (c) 2015 by Openlabs Technologies & Consulting (P) Limited :license: BSD, see LICENSE for more details. """ from trytond.model import fields from trytond.pool import Pool, PoolMeta from trytond.pyson import Eval, Bool, And __all__ = ['SaleLine', 'SaleConfigu...
Python
0.000039
@@ -2358,29 +2358,27 @@ -Configuration +sale_config = Pool( @@ -2404,16 +2404,19 @@ ration') +(1) %0A%0A @@ -2428,24 +2428,71 @@ urn -Configuration(1) +sale_config.default_return_policy and %5C%0A sale_config .def
84dafdc9637d7220b042cb84c995dbf3bcd4c7b5
reformat tests
tests/features/gerritbot_behave/bot.py
tests/features/gerritbot_behave/bot.py
import json import logging import os import queue import subprocess import tempfile import threading from behave import fixture class BotHandler: def __init__(self, *, process, message_queue, message_timeout): self.process = process self.message_queue = message_queue self.message_timeout ...
Python
0.000324
@@ -479,33 +479,16 @@ %7B -%0A %22email%22: @@ -501,32 +501,16 @@ r.email, -%0A %22text%22: @@ -517,30 +517,16 @@ message -,%0A %7D%0A @@ -1263,34 +1263,9 @@ rn %5B -%0A m%0A +m for @@ -1291,28 +1291,16 @@ messages -%0A ...
b0cdeed95296d60a13fd209433733c59d2eff134
Fix import of pathsimulators (abs, not rel)
openpathsampling/__init__.py
openpathsampling/__init__.py
# start by importing version, because for some weird reason, I sometimes get # networkx as over-riding the version here (no idea why...) try: # should work if installed through normal means: setup.py-based with # pip, conda, easy_install, etc. from . import version except ImportError: # pragma: no cover ...
Python
0
@@ -4790,24 +4790,40 @@ ver%0A)%0A%0Afrom +openpathsampling .pathsimulat
cba50d57bf0fc430f4224eb3526d4d88f78437c4
Fix gdb Thread.dump_all function (#549)
debug/thread.py
debug/thread.py
import gdb from .cmd import SimpleCommand, AutoCompleteMixin from .struct import enum, cstr, GdbStructMeta, ProgramCounter, TailQueue from .utils import func_ret_addr, local_var, TextTable from .ctx import Context class Thread(metaclass=GdbStructMeta): __ctype__ = 'struct thread' __cast__ = {'td_waitpt': Pro...
Python
0
@@ -3026,32 +3026,37 @@ cur_td = Thread. +from_ current()%0A
7543b0ab5d1b069ca90d600aa6c7fc6f26ae14d4
move pidfile flush inside flush block
daemon/daemon.py
daemon/daemon.py
import os import sys import signal class Daemon: """Base for a UNIX daemon. Only function to be run is required. Mostly created from this guide http://www.netzmafia.de/skripten/unix/linux-daemon-howto.html Args: pidfile(str) - file containing the process identification number (pid) stdin(str)...
Python
0.000001
@@ -2445,24 +2445,52 @@ ().strip())%0A + pidfile.flush()%0A exce @@ -2528,53 +2528,8 @@ one%0A - finally:%0A pidfile.flush()%0A
b4250c4f8e700906a6d82915f98b8a0133892396
Make subclass testing more boring
astropy/table/tests/test_subclass.py
astropy/table/tests/test_subclass.py
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # TEST_UNICODE_LITERALS from ... import table from .. import pprint class MyRow(table.Row): def __str__(self): return str(self.data) class MyColumn(table.Column): def cool(self): return 'Cool!' class M...
Python
0.00001
@@ -269,46 +269,12 @@ -def cool(self):%0A return 'Cool!' +pass %0A%0A%0Ac @@ -316,52 +316,12 @@ -def cool(self):%0A return 'MaskedCool!' +pass %0A%0A%0Ac @@ -369,58 +369,12 @@ -def cool(self):%0A return 'CoolTableColumns!' +pass %0A%0A%0Ac @@ -427,60 +427,13 @@ -def cool(...
5db183c681af4b078fa8addc8cf4268b7315678a
allow to give modifiers to grep values
jsontool.py
jsontool.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ jsontool - Perform some actions with json using CLI http://github.com/mysz/jsontool Author: Marcin Sztolcman (marcin@urzenia.net) Get help with: jsontool.py --help Information about version: jsontool.py --version """ from __future__ import print_funct...
Python
0
@@ -1279,91 +1279,441 @@ -for definition in filter_definitions:%0A key, value = definition.split(':', 1) +modifiers = %7B%0A 'i': int,%0A 'f': float,%0A 's': str,%0A 'b': bool,%0A %7D%0A for definition in filter_definitions:%0A try:%0A key, value, modifie...
9109458ca157907145d5ae2ce5f709bd72bacc6b
Update Error Message
readthedocs/doc_builder/exceptions.py
readthedocs/doc_builder/exceptions.py
# -*- coding: utf-8 -*- """Exceptions raised when building documentation.""" from django.utils.translation import ugettext_noop class BuildEnvironmentException(Exception): message = None status_code = None def __init__(self, message=None, **kwargs): self.status_code = kwargs.pop( 's...
Python
0
@@ -2483,18 +2483,15 @@ nfig -uration wa + file i s in
c1f31f69ca7ba75185100cf7a8eabf58ed41ccdf
Connect signal callback using the model class as sender.
atmo/apps.py
atmo/apps.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, you can obtain one at http://mozilla.org/MPL/2.0/. import logging import session_csrf from django.apps import AppConfig from django.db.models.signals import post_save, pre...
Python
0
@@ -946,16 +946,62 @@ ignals.%0A + from atmo.jobs.models import SparkJob%0A @@ -1094,16 +1094,29 @@ connect( +%0A assign_g @@ -1121,32 +1121,44 @@ _group_perm, +%0A sender= 'jobs.SparkJ @@ -1141,38 +1141,32 @@ sender= -'jobs. SparkJob ',%0A @@ -1153,33 +11...
3abd0b2a3a7ce5f3072258e23478b7a81f94c271
add constant and modify docstring
incidents/incident_script.py
incidents/incident_script.py
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
0.000001
@@ -906,18 +906,45 @@ _metric%22 -, +in the current GCP project,%0A trigger @@ -966,17 +966,17 @@ resolve -%0A + the inci @@ -987,17 +987,17 @@ . To use - +%0A it corre @@ -1025,17 +1025,17 @@ e custom -%0A + metric ( @@ -1038,17 +1038,17 @@ ic (only - +%0A do this @@ -1090,16 +1090,16 @@ te a -%0A...
477e200d36de1ec83146fd0117745997ae3d7357
Update clean documentation
recordlinkage/standardise/cleaning.py
recordlinkage/standardise/cleaning.py
from __future__ import division from __future__ import absolute_import import logging import numpy as np import pandas as pd import itertools def clean(s, lower=True, replace_by_none='[^ \-\_A-Za-z0-9]+', replace_by_whitespace='[\-\_]', remove_brackets=True): """ clean(lower=True, replace_by_none='[^ \-\_A-...
Python
0
@@ -392,57 +392,138 @@ -Remove special tokens from a series of strings. %0A +Clean a pandas Series with strings. Remove unwanted tokens and additional%0A whitespace.%0A%0A :param s: A pandas.Series to clean. %0A @@ -835,24 +835,186 @@ emselves. %0A%0A + :type s: pandas.Series%0A :type lower: bool...
314014f0c4064398eb550f745085ff83bea3adf0
Update webhost.py
web/webhost.py
web/webhost.py
import sys import logging from twisted.python import log from twisted.internet import reactor, defer from twisted.web.server import Site from twisted.web.static import File from autobahn.websocket import listenWS from autobahn.wamp import exportRpc, \ WampServerFactory, \ ...
Python
0.000001
@@ -781,67 +781,8 @@ l):%0A - def __init__(self, kernel):%0A self._kernel = kernel%0A @@ -1111,16 +1111,82 @@ _port):%0A + def __init__(self, kernel):%0A self._kernel = kernel%0A %0A log.s @@ -1318,16 +1318,8 @@ ocol -(kernel) %0A
54fc1c7622d4ca9c87427617bbde51e2e23cf6d1
Make Records plural in docstring
ehrcorral/ehrcorral.py
ehrcorral/ehrcorral.py
# -*- coding: utf-8 -*- """Contains core classes and functions for defining populations and acting upon them. """ from __future__ import print_function from __future__ import division from __future__ import absolute_import from __future__ import unicode_literals import sys from collections import namedtuple import je...
Python
0.000351
@@ -5977,16 +5977,17 @@ .Record%60 +s %0A
b972634c03a00527c7fadefa873376737ecbcb61
Update webhost.py
web/webhost.py
web/webhost.py
import sys import logging from twisted.python import log from twisted.internet import reactor, defer from twisted.web.server import Site from twisted.web.static import File from autobahn.websocket import listenWS from autobahn.wamp import exportRpc, \ WampServerFactory, \ ...
Python
0.000001
@@ -772,42 +772,8 @@ rn %7B -'gpsfix' : self._kernel.data.fix, 'lat @@ -1484,8 +1484,9 @@ or.run() +%0A
1a047cd32438b86aef1b0e597b5d801853bccf76
add check for Predict.R file (some tests don't have this phase)
h2o-perf/bench/py/h2oPerf/Runner.py
h2o-perf/bench/py/h2oPerf/Runner.py
from H2O import * from Process import * from PerfTest import * import PerfUtils import traceback import os import time from multiprocessing import Process class PerfRunner: """ A class for running the perfomrance tests. The tests list contains a Test object for every test. The tests_not_started is a...
Python
0
@@ -2317,24 +2317,32 @@ st_root_dir, + prefix, testDir, %22p
eae226f016a468187469b33770782bd81b24e651
Change actions and merged_into into a property (#2526)
src/appengine/libs/issue_management/jira/__init__.py
src/appengine/libs/issue_management/jira/__init__.py
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
0
@@ -3722,16 +3722,28 @@ (self)%0A%0A + @property%0A def ac @@ -3765,16 +3765,28 @@ pass%0A%0A + @property%0A def me
6ec4c21cf7af09401aabadff79898fe783efe9bd
Fix import of rotate function
skimage/transform/__init__.py
skimage/transform/__init__.py
from .hough_transform import * from .radon_transform import * from .finite_radon_transform import * from .integral import * from ._geometric import (estimate_transform, SimilarityTransform, AffineTransform, ProjectiveTransform, PolynomialTransform) from ._warps import w...
Python
0.000015
@@ -330,16 +330,24 @@ _coords, + rotate, swirl,