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 |
|---|---|---|---|---|---|---|---|
60b705ac031aa885306c31c96743b0fbc4c963a3 | Fix dbcursor issue | sso/services/__init__.py | sso/services/__init__.py | import settings
from django.db import load_backend, transaction, IntegrityError
def get_api(api):
if settings.DISABLE_SERVICES:
return BaseService()
try:
mod = __import__(api)
except ImportError:
raise Exception('Error creating service')
for i in api.split(".")[1:]:
m... | Python | 0 | @@ -2254,18 +2254,16 @@
elf._db.
-db
cursor()
|
aacace8b3215a3303325b5ad848b4b69b92261f3 | update keypair hook to match route53 update | stacker/hooks/keypair.py | stacker/hooks/keypair.py | import logging
import os
import boto3
from . import utils
logger = logging.getLogger(__name__)
def find(lst, key, value):
for i, dic in enumerate(lst):
if dic[key] == value:
return lst[i]
return False
def ensure_keypair_exists(provider, context, **kwargs):
"""Ensure a specific key... | Python | 0 | @@ -739,17 +739,16 @@
ext.
-parameter
+variable
s.ge
|
dc007104ad760c8e07e7444a8d620d8b2d90fbef | Fix preferences API authentication | smart/accesscontrol/rules/accesstoken.py | smart/accesscontrol/rules/accesstoken.py | """
Rules for Accounts
"""
from smart.views import *
from smart.models.rdf_rest_operations import *
from smart.models.record_object import *
try:
from smart.plugins import *
except ImportError: pass
def check_token_for_record_wrapper(token):
def check_token_for_record(request, view_func, view_args, vie... | Python | 0.000013 | @@ -996,21 +996,15 @@
gs%5B'
-account_email
+user_id
'%5D%0A
|
b16d5c08b5766e40fbf1773e3490dce461b20098 | Exit code as int. | ci/github-pullrequest.py | ci/github-pullrequest.py | import json
import sys
import os
import requests
token = os.environ['GITHUB_ACCESS_TOKEN']
with open('version/version') as version_file:
version = version_file.read()
print("Making PR request to this release {}".format(version))
response = requests.post(
url='https://api.github.com/repos/aws-quickstart/quic... | Python | 0 | @@ -707,58 +707,74 @@
de)%0A
-print(response)%0A%0Asys.exit(response.status_code %3C 300
+%0Aif response.status_code %3C 300:%0A sys.exit(0)%0Aelse:%0A sys.exit(1
)%0A
|
b1bc019320eaa8ceb7a70eca21b20fcda9cf609e | Add a timeout to the nginx cache clearing request | ckanext/nhm/lib/cache.py | ckanext/nhm/lib/cache.py | # !/usr/bin/env python
# encoding: utf-8
#
# This file is part of ckanext-nhm
# Created by the Natural History Museum in London, UK
import logging
import requests
from ckan.plugins import toolkit
log = logging.getLogger(__name__)
def cache_clear_nginx_proxy():
'''Clear NGINX Proxy Cache - issue PURGE request t... | Python | 0 | @@ -548,16 +548,29 @@
repare()
+, timeout=0.5
)%0A
|
5c9278226ca74eb614b940faa56b6c063d7e0198 | Update clashcallerbot_search.py added send_message() | clashcallerbot_search.py | clashcallerbot_search.py | #! python3
# -*- coding: utf-8 -*-
"""Searches recent reddit comments for ClashCaller! string and saves to database.
This module uses the Python Reddit API Wrapper (PRAW) to search recent reddit comments
for the ClashCaller! string. If found, the username, comment time, message, and
expiration time (if any) are parsed... | Python | 0 | @@ -451,16 +451,32 @@
ort praw
+%0Aimport prawcore
%0A%0Aimport
@@ -5484,16 +5484,555 @@
abase%0A%0A%0A
+def send_message(uid: str, subj: str, msg: str) -%3E bool:%0A %22%22%22Send message to reddit user.%0A%0A Function sends given message with given subject line to given user.%0A%0A Args:%0A uid: ... |
46f2ff677372299c690da947356d814a1b588b5d | Correct AuditLog._format_value for selection field | smile_audit/models/audit_log.py | smile_audit/models/audit_log.py | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | Python | 0.000001 | @@ -2719,15 +2719,17 @@
if
-callabl
+isinstanc
e(se
@@ -2735,16 +2735,28 @@
election
+, basestring
):%0A
@@ -2778,25 +2778,23 @@
ction =
-selection
+getattr
(self.en
@@ -2815,16 +2815,29 @@
d.model%5D
+, selection)(
)%0A
|
c7990836b51cc5e05c5ae3bd49a316c418bac44e | Revert "redirect www.storycheck.co.za to storycheck.co.za" | code4sa/middleware.py | code4sa/middleware.py | from django.http import HttpResponse, HttpResponsePermanentRedirect, Http404
import newrelic.agent
class RedirectsMiddleware(object):
redirects = {
# domain (without www.) -> full new URL
'living-wage.code4sa.org': 'http://livingwage.code4sa.org/',
'livingwagestory.code4sa.org': 'http://l... | Python | 0 | @@ -1031,63 +1031,8 @@
rg',
-%0A 'storycheck.co.za': 'http://storycheck.co.za',
%0A%0A
|
7e6dc283dbecf4bf9674559198b4a2c06e9f4c2e | Fix unicode import in test | spacy/tests/regression/test_issue1799.py | spacy/tests/regression/test_issue1799.py | '''Test sentence boundaries are deserialized correctly,
even for non-projective sentences.'''
import pytest
import numpy
from ... tokens import Doc
from ... vocab import Vocab
from ... attrs import HEAD, DEP
def test_issue1799():
problem_sentence = 'Just what I was looking for.'
heads_deps = numpy.asarray([[... | Python | 0.00034 | @@ -86,16 +86,56 @@
nces.'''
+%0Afrom __future__ import unicode_literals
%0A%0Aimport
|
5feeabbc562e238a27143c376c772b5aa413610c | tweak motor control numbers and controls | combined_robot/app.py | combined_robot/app.py | #!/usr/bin/env python
from __future__ import division
import cv
import cv2
import video
from common import RectSelector
from mosse import MOSSE
# Constants
LAUNCH = 0
CARRIAGE = 1
class App:
def __init__(self, video_src, robotq, appq):
self.cap = video.create_capture(video_src)
_, self.frame = ... | Python | 0 | @@ -523,17 +523,18 @@
, 3920,
-5
+10
000, sel
@@ -1468,50 +1468,48 @@
hen
-the speed is changed, send it to the robot
+we toggle bounce shots, update the speed
.'''
@@ -3005,12 +3005,11 @@
ing
-righ
+lef
t%22%0A
@@ -3059,17 +3059,17 @@
100000,
-0
+1
))%0A
@@ -3207,35 +3207,36 @@
print %22Going
-l... |
6b121711d4f905ef1795031f142cf3b0ac5063f6 | Fix user_is_authenticated() for < 1.10 | src/oscar/core/compat.py | src/oscar/core/compat.py | import csv
import sys
import django
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ImproperlyConfigured
from django.utils import six
from oscar.core.loading import get_model
# A setting that can be used in foreign key declarations
AUTH_USER_MODEL = get... | Python | 0.000024 | @@ -2912,25 +2912,25 @@
return user
-_
+.
is_authentic
@@ -2934,20 +2934,16 @@
ticated(
-user
)%0A%0A%0Adef
|
b4214ec8cbacfe383b0f436df5cf49653a609e12 | Fix formatting of print in run function. | scripts/lib/zulip_tools.py | scripts/lib/zulip_tools.py | #!/usr/bin/env python
from __future__ import print_function
import datetime
import errno
import os
import pwd
import shutil
import subprocess
import sys
import time
if False:
from typing import Sequence, Any
DEPLOYMENTS_DIR = "/home/zulip/deployments"
LOCK_DIR = os.path.join(DEPLOYMENTS_DIR, "lock")
TIMESTAMP_FOR... | Python | 0.000003 | @@ -2468,16 +2468,135 @@
args)))%0A
+%0A if kwargs.get('shell'):%0A # With shell=True we can only pass string to Popen%0A args = %22 %22.join(args)%0A%0A
proc
|
780963217b05efa4ff3937efa3101972e3fc9901 | Add timeouts | commands/wikipedia.py | commands/wikipedia.py | import json
import requests
from CommandTemplate import CommandTemplate
import Constants
import GlobalStore
import SharedFunctions
class Command(CommandTemplate):
triggers = ['wikipedia', 'wiki', 'wikirandom']
helptext = "Searches for the provided text on Wikipedia, and returns the start of the article, if it's fo... | Python | 0.000001 | @@ -801,16 +801,24 @@
False):%0A
+%09%09try:%0A%09
%09%09page =
@@ -887,16 +887,202 @@
/random'
+, timeout=10.0)%0A%09%09except requests.exceptions.Timeout:%0A%09%09%09return (False, %22Apparently Wikipedia couldn't pick between all of its interesting articles, so it took too long to reply. Sorry!%22
)%0A%09%09self... |
ebdf2f9eb47ac52adb02ad87f40dcc8874910c21 | Change witness heading information; sort reference texts to the top. | scripts/proteus-cluster.py | scripts/proteus-cluster.py | from __future__ import print_function
import sys
from re import sub
from pyspark.sql import SparkSession, Row
from pyspark.sql.functions import col, udf, regexp_replace
def formatPassage(r):
text = ""
if r.url:
text += "<h2><a href=\"%s\">%s</a></h2>" % (r.url, (r.title or r.id))
else:
te... | Python | 0 | @@ -197,24 +197,130 @@
text = %22%22%0A
+ source = 'From ' + (('%3Ccite%3E%25s%3C/cite%3E' %25 r.source) or 'unknown source')%0A title = r.title or source%0A
if r.url
@@ -380,33 +380,21 @@
(r.url,
-(r.
title
- or r.id)
)%0A el
@@ -433,25 +433,123 @@
%22 %25
-(r.title or r.id)
+title%0A if r.cr... |
a2f66370843658090ccca3fbdbb2ff9d12c7605a | Update to current spotpy code stlye | spotpy/examples/tutorial_own_database.py | spotpy/examples/tutorial_own_database.py | '''
Copyright 2015 by Tobias Houska
This file is part of Statistical Parameter Estimation Tool (SPOTPY).
:author: Tobias Houska
This example implements the Rosenbrock function into SPOT.
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ im... | Python | 0 | @@ -447,67 +447,12 @@
-slow = 1000%0A def __init__(self):%0A self.params
+a
=
-%5B
spot
@@ -468,197 +468,108 @@
ter.
-List('x', %5B1, 2, 3, 4, 6, 7, 8, 9, 0%5D), #Give possible x values as a List%0A spotpy.parameter.List('y', %5B0, 1, 2, 5, 7, 8, 9, 0, 1%5D)%5D #Give possible... |
2ccdaf4ac5397a7fb1795cf3f3e52348e775dbbb | Bump version. | settingsjs/__init__.py | settingsjs/__init__.py | __version__ = (0, 1, 2)
def get_version():
return '.'.join(map(str, __version__))
| Python | 0 | @@ -18,9 +18,9 @@
1,
-2
+3
)%0A%0A%0A
|
2b299ab6b26ab5f0cfdbe08d3bff57a03483ca93 | update import script for Epsom & Ewell (closes #2134) | polling_stations/apps/data_collection/management/commands/import_epsom_and_ewell.py | polling_stations/apps/data_collection/management/commands/import_epsom_and_ewell.py | from addressbase.models import Address
from uk_geo_utils.helpers import Postcode
from data_collection.github_importer import BaseGitHubImporter
class Command(BaseGitHubImporter):
srid = 27700
districts_srid = 27700
council_id = "E07000208"
elections = ["europarl.2019-05-23"]
scraper_name = "wdiv-... | Python | 0 | @@ -270,12 +270,8 @@
= %5B%22
-euro
parl
@@ -280,13 +280,13 @@
019-
-05-23
+12-12
%22%5D%0A
|
ce3e9044ed915450d44056a360a8908c02f08d0b | Remove iterm2 from system startup | conf/mac.py | conf/mac.py | # type: ignore
# silence linter errors
defaults = defaults
run = run
### trackpad settings ###
for key in (
'com.apple.AppleMultitouchTrackpad',
'com.apple.driver.AppleBluetoothMultitouch.trackpad'
):
trackpad = defaults[key]
trackpad['Clicking'] = True # touch to click
# enable *both* methods o... | Python | 0 | @@ -4198,17 +4198,8 @@
ux',
- 'iTerm',
'Al
|
f3cff666d72d41c8e65cd52bdb438748175d3ee8 | move import to top of file | communityalmanac/controllers/almanac.py | communityalmanac/controllers/almanac.py | # Community Almanac - A place for your stories.
# Copyright (C) 2009 Douglas Mayle, Robert Marianski,
# Andy Cochran, Chris Patterson
# This file is part of Community Almanac.
# Community Almanac is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
... | Python | 0 | @@ -1549,16 +1549,71 @@
rt desc%0A
+from webhelpers.paginate import Page as PaginationPage%0A
import c
@@ -3652,71 +3652,8 @@
me%0A%0A
- from webhelpers.paginate import Page as PaginationPage%0A
|
55d7749ca06dda5c636aced8aed3f0bd9a3d6acc | Print tracebacks on exception | commands.py | commands.py | import asyncio
import sys
client = None
class Event: #Class to store event data
def __init__(self, f, triggerType, name, **kwargs):
self.handler = f
self.name=name
self.triggerType = triggerType
triggerHandlers = {
"\\message" : {},
"\\messageNoBot" : {}... | Python | 0.000001 | @@ -20,16 +20,34 @@
ort sys%0D
+%0Aimport traceback%0D
%0A%0D%0Aclien
@@ -3799,16 +3799,74 @@
c_info()
+%5B1%5D)%0D%0A traceback.print_tb(sys.exc_info()%5B2%5D
)%0D%0A
|
f4f600a82d652d25cb7fe8fcc3bbea8efa49c0b8 | update help | commands.py | commands.py | import requests
import random
import config
def help():
msg = """
*Commands:*
`/js <library>`: checks if library is cool or not
`/help`: return this
"""
return 'message', {'text': msg, 'parse_mode': 'Markdown'}
def js(string):
if string:
return 'message', {'text': '{} is gay'.format(string)}... | Python | 0 | @@ -73,18 +73,21 @@
*Command
-s:
+ list
*%0A%0A%60/js
@@ -96,17 +96,18 @@
ibrary%3E%60
-:
+ -
checks
@@ -139,17 +139,18 @@
%0A%60/help%60
-:
+ -
return
@@ -154,16 +154,33 @@
rn this%0A
+%60/sadness%60 - cry%0A
%22%22%22%0A
|
cf1728cd472b6675ce3e253ec350972c09e7c5f6 | fix update-ordinals.py for posterity to reflect best scripting practices | scripts/update-ordinals.py | scripts/update-ordinals.py | import sys
import logging
from pylons import c
from ming.orm import session
from ming.orm.ormsession import ThreadLocalORMSession
from allura import model as M
log = logging.getLogger(__name__)
handler = logging.StreamHandler(sys.stdout)
log.addHandler(handler)
def main():
test = sys.argv[-1] == 'test'
num_... | Python | 0 | @@ -184,28 +184,42 @@
ger(
-__name__)%0Ah
+'update-ordinals')%0Alog.addH
andler
- =
+(
logg
@@ -251,31 +251,8 @@
out)
-%0Alog.addHandler(handler
)%0A%0Ad
|
a9b7115f2dadf568317dfa26d5835c669133308e | implement builder + operator | simpleplotly/figure.py | simpleplotly/figure.py | # -*- coding: utf-8 -*-
import plotly.graph_objs as go
from plotly import tools
from .layout import ElementBuilder
from .plot import AtomBuilder
from .subplot import SubPlotSpec, PlotCanvas
import itertools
class FigureHolder(object):
def __init__(self, figure):
self.figure = figure
def plot(self, ... | Python | 0.000004 | @@ -1043,24 +1043,46 @@
t='blank'):%0A
+ # new builder%0A
new_
|
0c5daf77caaa6674a011b94ac06c308dbb430cc5 | add PDF and TXT minetype | composer.py | composer.py | #!/usr/bin/python
from types import *
import db
import json
class Composer():
def __init__(self, output_format, db):
self.output_format = output_format
self.db = db
def compose(self, content, path):
if self.output_format == "JSON":
if type(content) is ListType: # directory list, DIR
r... | Python | 0 | @@ -1643,47 +1643,238 @@
h('.
-css'):%0A content_type = 'text/css
+txt'):%0A content_type = 'text/plain'%0A ret = content%0A elif path.endswith('.css'):%0A content_type = 'text/css'%0A ret = content%0A elif path.endswith('.pdf'):%0A content_type = 'application/x-pdf
... |
e9cb40d1c044aa48beb221686df3cbfb47524a72 | Remove unused import | statirator/blog/views.py | statirator/blog/views.py | from __future__ import absolute_import
from django.db.models import Count
from django.views.generic.detail import DetailView
from django.views.generic.list import ListView
from django.views.generic.base import TemplateView
from .models import Post, I18NTag
class PostView(DetailView):
models = Post
def get... | Python | 0.000001 | @@ -37,43 +37,8 @@
rt%0A%0A
-from django.db.models import Count%0A
from
|
c767ec0308d61c73b41bf20f9c5bf069238a04e4 | change in the iteration state to make things slightly more readable. | src/python/Problem066.py | src/python/Problem066.py | '''
Created on Feb 21, 2012
@author: mchrzanowski
'''
from math import sqrt
from Problem064 import getQuotients
from Problem065 import findRationalApproximation
from time import time
LIMIT = 10 ** 3
def getConvergentPair(i, difference=1):
''' a generator that will return iterations of increasingly-precise nume... | Python | 0.000002 | @@ -591,18 +591,18 @@
State =
-0
+-1
@@ -1140,16 +1140,20 @@
entState
+ + 1
, len(nu
@@ -1400,20 +1400,16 @@
tate = j
- + 1
%0A%0Adef ma
@@ -1719,27 +1719,8 @@
'''%0A
- start = time()%0A
@@ -2165,24 +2165,81 @@
, maxD%0A %0A
+if __name__ == '__main__':%0A start = time()%0A main()%0A... |
ae95e372fd625c5fb78750675ff2eca2c8b41a82 | Fix due date bug | library.py | library.py | # coding=utf-8
"""
GOAL: Use object-oriented Python to model a public library (w/ three classes:
Library, Shelf, & Book). The library should be aware of a number of shelves.
Each shelf should know what books it contains. Make the book object have
"enshelf" and "unshelf" methods that control what shelf the book is sit... | Python | 0.000024 | @@ -904,26 +904,37 @@
medelta(days
-,
+=days, weeks=
weeks)%0A r
|
4532880091643d48bfb9df2a0a028d80c7db6864 | Use same metavar for --scripts in up and provision | cloudenvy/commands/up.py | cloudenvy/commands/up.py | import logging
from cloudenvy import exceptions
import cloudenvy.envy
class Up(cloudenvy.envy.Command):
def _build_subparser(self, subparsers):
help_str = 'Create and optionally provision an ENVy.'
subparser = subparsers.add_parser('up', help=help_str,
d... | Python | 0 | @@ -577,16 +577,74 @@
cripts',
+ nargs='*', metavar='PATH',%0A
default
@@ -649,27 +649,16 @@
lt=None,
- nargs='*',
%0A
|
d6b51c610ac6002217785107858eb4f749e6367b | Fix bug in project get_yaml method | clowder/model/project.py | clowder/model/project.py | """Model representation of clowder.yaml project"""
import os
from clowder.utility.print_utilities import (
print_project_status,
print_validation,
print_verbose_status
)
from clowder.utility.git_utilities import (
git_groom,
git_stash,
git_is_dirty
)
from clowder.utility.git_utilities import (
... | Python | 0 | @@ -1641,16 +1641,60 @@
remote':
+ self.remote_name,%0A 'source':
self.so
|
e8055b821cc534b10964f670d3b41af594bd19cf | Fix for makefile with coverage | setupext/build_makefile.py | setupext/build_makefile.py | # -*- coding: utf-8 -*-
from __future__ import print_function
import os
from setuptools.command.build_ext import build_ext
# This setup target constructs a prototype Makefile suitable for compiling
# the _jpype extension module. It is intended to help with development
# of the extension library on unix systems.
#
# T... | Python | 0 | @@ -1380,32 +1380,58 @@
x = x%5B1:%5D%0A
+ i = x.index(%22-o%22)%0A
self.lib
@@ -1439,17 +1439,18 @@
ary = x%5B
--
+i+
1%5D%0A
@@ -1456,39 +1456,32 @@
-print(x%5B-3:%5D)%0A x = x%5B:-3
+del x%5Bi%5D%0A del x%5Bi
%5D%0A
|
da3c550bfd935fcdf18c04c021b3ff0cd33e13b3 | Fix show_launcher logic | sugar/activity/bundle.py | sugar/activity/bundle.py | import logging
import os
from ConfigParser import ConfigParser
class Bundle:
"""Info about an activity bundle. Wraps the activity.info file."""
def __init__(self, path):
self._name = None
self._icon = None
self._service_name = None
self._show_launcher = False
self._valid = True
self._path = path
self.... | Python | 0.000002 | @@ -1219,11 +1219,10 @@
== '
-yes
+no
':%0A%09
@@ -1246,19 +1246,20 @@
ncher =
-Tru
+Fals
e%0A%0A%09%09if
|
a21c0ec3ee4518f9072fbc5181fb419b1973afd3 | Fix style #373 | shinken/reactionnerlink.py | shinken/reactionnerlink.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2012 :
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
# Gregory Starck, g.starck@gmail.com
# Hartmut Goebel, h.goebel@goebel-consult.de
#
# This file is part of Shinken.
#
# Shinken is free software: you ... | Python | 0 | @@ -1164,18 +1164,9 @@
%22%22%22%0A
- %0A
%0A
+
@@ -1353,17 +1353,16 @@
d=True),
-
%0A
@@ -1455,18 +1455,18 @@
passive'
-
:
+
@@ -1901,21 +1901,17 @@
%0A %7D)%0A
-
%0A
+
def
@@ -1964,17 +1964,16 @@
r_name%0A%0A
-%0A
def
@@ -2047,17 +2047,16 @@
self)%0A%0A%0A... |
8d59abab151cbdecb623b7b184dade6193144497 | Store Group enums as strings in Database (internally still as enums) | sigma_core/models/group.py | sigma_core/models/group.py | from django.db import models
class Group(models.Model):
class Meta:
pass
VIS_PUBLIC = 0
VIS_PRIVATE = 1
VISIBILITY_CHOICES = (
(VIS_PUBLIC, 'PUBLIC'),
(VIS_PRIVATE, 'PRIVATE')
)
MEMBER_ANYONE = 0
MEMBER_REQUEST = 1
MEMBER_INVITATION = 2
MEMBERSHIP_CHOICES ... | Python | 0 | @@ -100,31 +100,63 @@
LIC
-= 0%0A VIS_PRIVATE = 1
+ = 'public'%0A VIS_PRIVATE = 'private'
%0A
@@ -201,22 +201,40 @@
UBLIC, '
-PUBLIC
+Anyone can see the group
'),%0A
@@ -252,23 +252,36 @@
IVATE, '
-PRIVATE
+Group is not visible
')%0A )
@@ -300,19 +300,32 @@
_ANYONE
-= 0
+ =... |
5e66929d051047385cce9d7e910ce02b61fa1afe | Use joined loading for follower lists | skylines/model/follower.py | skylines/model/follower.py | # -*- coding: utf-8 -*-
from datetime import datetime
from sqlalchemy import ForeignKey, Column
from sqlalchemy.types import Integer, DateTime
from sqlalchemy.orm import relationship
from .base import DeclarativeBase
from .session import DBSession
class Follower(DeclarativeBase):
__tablename__ = 'followers'
... | Python | 0 | @@ -539,24 +539,47 @@
%5Bsource_id%5D,
+%0A lazy='joined',
backref='fo
@@ -771,16 +771,39 @@
ion_id%5D,
+%0A lazy='joined',
backref
|
244d46b9cfb3d3420979dd3d747b20ab384707d3 | Fix ImportError in test | smbackend/test/conftest.py | smbackend/test/conftest.py | import os
import json
import pytest
import haystack
from django.utils import timezone
from django.conf import settings
from django.core.management import call_command
from services.models import Unit, UnitConnection, Organization, Service
def read_config(name):
return json.load(open(
os.path.join(
... | Python | 0.000003 | @@ -224,23 +224,28 @@
zation,
-Service
+OntologyWord
%0A%0A%0Adef r
@@ -346,33 +346,8 @@
IR,%0A
- 'smbackend',%0A
@@ -1865,15 +1865,20 @@
s =
-Service
+OntologyWord
(id=
@@ -2534,9 +2534,8 @@
it': u%7D%0A
-%0A
|
40f4f721b59108a929ca0f8a8f9df6619ebccea3 | Fix persona backend | social/backends/persona.py | social/backends/persona.py | """
BrowserID support
"""
from social.backends.base import BaseAuth
from social.exceptions import AuthFailed, AuthMissingParameter
class PersonaAuth(BaseAuth):
"""BrowserID authentication backend"""
name = 'persona'
def get_user_id(self, details, response):
"""Use BrowserID email as ID"""
... | Python | 0.000002 | @@ -1321,14 +1321,12 @@
y',
-params
+data
=%7B%0A
@@ -1435,16 +1435,31 @@
%7D
+, method='POST'
)%0A
|
538bae320ba46764fbe8cce3aef19f22ddd1b1ec | Add simple Lede to ClustersInJSON | articulate/clustering/clusterformats.py | articulate/clustering/clusterformats.py | """Clusters for Humans"""
import itertools
import simplejson as json
from articulate.pymotherlode.api import *
def clustersToJSON(articles, assignments, insertContent):
tag = "kmeans"
clusters = list(set(assignments))
clustersForHumans = []
if insertContent:
print "Inserting content into ClusterInJSON"
else:... | Python | 0.000002 | @@ -106,16 +106,201 @@
port *%0A%0A
+def getLede(content):%0A%09#ledeRE = re.compile('%5E(.*?(?%3C!%5Cb%5Cw)%5B.?!%5D)%5Cs+%5BA-Z0-9%5D')%0A%09#ledes = ledeRE.match(content)%0A%09#return ledes.group(0)%0A%09lede = content%5B:50%5D%0A%09lede += %22...%22%0A%09return lede%0A%0A
def clus
@@ -660,16 +660,139 @@
r == i:%... |
223ccc18239d7417a19fb0ec29da6bc5579949fa | Add muse to the list of tested returned instruments | astroquery/eso/tests/test_eso_remote.py | astroquery/eso/tests/test_eso_remote.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import tempfile
import shutil
from astropy.tests.helper import pytest, remote_data
try:
import keyring
HAS_KEYRING = True
except ImportError:
HAS_KEYRING = False
try:
from ...eso import Eso
ESO_IMPORTED = True
except ImportErr... | Python | 0 | @@ -3308,16 +3308,25 @@
hooter',
+ u'muse',
u'crire
|
273a0b264955780dbc0341a46936e2cc8941f5cd | Simplify get_name | binstar_client/utils/projects/models.py | binstar_client/utils/projects/models.py | import inspect
import os
import tarfile
from tempfile import SpooledTemporaryFile
from binstar_client.errors import BinstarError
class CondaProject(object):
# TODO: This class will be moved into Anaconda-Project
def __init__(self, project_path, *args, **kwargs):
self.project_path = project_path
... | Python | 0.011797 | @@ -2286,24 +2286,38 @@
%0A if
+os.path.isdir(
self.project
@@ -2325,15 +2325,9 @@
path
- == %22.%22
+)
:%0A
@@ -2343,17 +2343,16 @@
return
-
os.path.
@@ -2380,95 +2380,8 @@
ath(
-%22.%22))%0A if os.path.isdir(self.project_path):%0A return os.path.basename(
self
@@ -2389,24 +2389,... |
f15ebf385bfc6ac706b2344db12a7be9967540ef | Test for symm.symmetrize_space | symm/test/test_addons.py | symm/test/test_addons.py | #
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
import unittest
import numpy
from pyscf import gto
from pyscf import scf
from pyscf.symm import addons
mol = gto.Mole()
mol.build(
verbose = 0,
atom = [
["O" , (0. , 0. , 0.)],
[1 , (0. , -0.757 , 0.587)],
[1 , (0. , 0.757 , 0.587)] ],
b... | Python | 0 | @@ -1123,16 +1123,510 @@
42838)%0A%0A
+ def test_symmetrize_space(self):%0A from pyscf import gto, symm, scf%0A mol = gto.M(atom = 'C 0 0 0; H 1 1 1; H -1 -1 1; H 1 -1 -1; H -1 1 -1',%0A basis = 'sto3g', verbose=0)%0A mf = scf.RHF(mol).run()%0A mol.build(0, 0,... |
cd0eb0f8dc0f9cceb370407ba1fa876238951af5 | Fix Windows unittest build on VC2012 R=mark at https://breakpad.appspot.com/539003/ | src/client/windows/unittests/testing.gyp | src/client/windows/unittests/testing.gyp | # Copyright (c) 2010, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and t... | Python | 0.000003 | @@ -2062,32 +2062,332 @@
',%0A %5D
-%0A %7D
+,%0A # Visual C++ implements variadic templates strangely, and%0A # VC++2012 broke Google Test by lowering this value. See%0A # http://stackoverflow.com/questions/12558327/google-test-in-visual-studio-2012%0A 'defines': %5B'_VARIADIC_... |
57d07fa351795dff22c7d706534b047c6720f829 | Default to 'text' rather than 'python' | splunk_handler/__init__.py | splunk_handler/__init__.py | import logging
import socket
import traceback
from threading import Thread
import requests
class SplunkHandler(logging.Handler):
"""
A logging handler to send events to a Splunk Enterprise instance
"""
def __init__(self, host, port, username, password, index, hostname=None, source=None, sourcetype=... | Python | 0.999589 | @@ -318,14 +318,12 @@
pe='
-python
+text
', v
|
30f9348dc93d1cec8466b0663cb522c9843b11f0 | rename .cli.utils.show_psrs to make its purpose clear | src/anyconfig/cli/utils.py | src/anyconfig/cli/utils.py | #
# Copyright (C) 2011 - 2021 Satoru SATOH <satoru.satoh gmail.com>
# SPDX-License-Identifier: MIT
#
"""Utilities for anyconfig.cli.*.
"""
import functools
import os
import sys
import warnings
from .. import api, parser, utils
from . import parse_args
@functools.lru_cache(None)
def list_parser_types():
"""An wra... | Python | 0.000013 | @@ -693,25 +693,28 @@
%0A%0Adef show_p
-s
+arse
rs():%0A %22%22
@@ -1871,17 +1871,20 @@
show_p
-s
+arse
rs()%0A
|
86a34765774a5ac909cad769d711a41a2429a8ee | Prepare for Python 3. | minipkg.py | minipkg.py | #!/usr/bin/env python
"""minipkg.py - install pkgsrc
Usage: python minipkg.py [-h | --help] [-v | --version]
"""
from __future__ import print_function
import hashlib
import os
import subprocess
import sys
import urllib2
__author__ = 'Mansour Moufid'
__copyright__ = 'Copyright 2015, Mansour Moufid'
__email__ = 'ma... | Python | 0 | @@ -206,22 +206,220 @@
sys%0A
-import urllib2
+try:%0A from urllib2 import (%0A Request as url_request,%0A urlopen as url_open,%0A )%0Aexcept ImportError:%0A import urllib.request.Request as url_request%0A import urllib.request.urlopen as url_open
%0A%0A%0A_
@@ -1440,14 +1440,10 @@
url
-li... |
abebb922de7bfbaed75e14b2a53c9cf45534b72f | check loader | src/apps/loader/handler.py | src/apps/loader/handler.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from children.models import Child
from history.models import ParamHistory, Param
from common.utils import get_dictionary_item
def values_is_in_dictionary(values_list, type_name):
for value in values_list:
if get_dictionary_item(value, type_name):
... | Python | 0.000002 | @@ -776,16 +776,74 @@
rgs%5B4%5D%0A%0A
+ print(last_name, first_name , middle_name, birthday)%0A%0A
chil
@@ -1001,24 +1001,42 @@
=birthday)%0A%0A
+ print(child)%0A%0A
return c
|
9839aa026986a35c1c13363169116193f4602355 | Coding is hard | conftest.py | conftest.py | #
# See https://github.com/dials/dials/wiki/pytest for documentation on how to
# write and run pytest tests, and an overview of the available features.
#
from __future__ import absolute_import, division, print_function
import os
import pytest
@pytest.fixture(scope="session")
def dials_regression():
'''Return the a... | Python | 0.999986 | @@ -1420,16 +1420,17 @@
x2rpath)
+:
%0A pyt
|
b79d3dc3af2f2b3871bbf9cf1a8d7cab909c152c | Fix case when files missing and download disabled | conftest.py | conftest.py | #
# See https://github.com/dials/dials/wiki/pytest for documentation on how to
# write and run pytest tests, and an overview of the available features.
#
from __future__ import absolute_import, division, print_function
import os
import re
import procrunner
import py.path
import pytest
from dials.conftest import (dia... | Python | 0.000001 | @@ -4676,16 +4676,55 @@
d_only)%0A
+ if self._cache%5Btest_data%5D:%0A
@@ -4859,32 +4859,191 @@
che%5Btest_data%5D:%0A
+ if read_only:%0A pytest.skip('Regression data is required to run this test. Run with --regression or run xia2.fetch_test_data')%0A else:%0A
py... |
509deaf89a5c6dbe8844319469998c0958947656 | test send_mail | src/bccf/util/emailutil.py | src/bccf/util/emailutil.py | import logging
log = logging.getLogger(__name__)
from django.db.models.loading import get_model
from django.core.mail import send_mail, BadHeaderError, EmailMultiAlternatives
from django.template import Context
from django.template.loader import render_to_string
from mezzanine.utils.email import send_mail_template
f... | Python | 0.000001 | @@ -2854,18 +2854,16 @@
ml%22)%0A
- #
msg.sen
@@ -2906,16 +2906,120 @@
Email%22%0A
+ send_mail('Test Email', 'Test Email', fr, %5Bto%5D, fail_silently=False, html_message=html_content)%0A
|
f07cbc4a36c857468869c075bc695e977bea19b8 | fix CATKIN_IGNORE to affect the folder where it is instead of only ignoring subfolders | src/catkin_pkg/packages.py | src/catkin_pkg/packages.py | # Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above... | Python | 0 | @@ -1887,32 +1887,11 @@
%60 it
-s%0A subdirectories are
+ is
ign
@@ -2146,16 +2146,108 @@
if
+'CATKIN_IGNORE' in filenames:%0A del dirnames%5B:%5D%0A continue%0A elif
PACKAGE_
@@ -2483,100 +2483,8 @@
nue%0A
- elif 'CATKIN_IGNORE' in filenames:%0A del dirnam... |
a8b50df748115e41cc705be1a0fc6c76fe1b98cc | disable cache | src/cid/utils/fileUtils.py | src/cid/utils/fileUtils.py | # -*- encoding: utf-8 -*-
"""
@authors: Sebastián Ortiz V. neoecos@gmail.com
@license: GNU AFFERO GENERAL PUBLIC LICENSE
Caliope Server is the web server of Caliope's Framework
Copyright (C) 2013 Infometrika
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU A... | Python | 0.000002 | @@ -3030,24 +3030,25 @@
'rb')%0A%0A
+#
data = jsOpt
|
2cd19b395f4320330b66dff1ef98d149f3a40a31 | Add test for notify dataset/update | ckanext/syndicate/tests/test_plugin.py | ckanext/syndicate/tests/test_plugin.py | from mock import patch
import unittest
import ckan.model as model
from ckan.model.domain_object import DomainObjectOperation
from ckanext.syndicate.plugin import SyndicatePlugin
class TestPlugin(unittest.TestCase):
def test_notify_syndicates_task(self):
entity = model.Package()
entity.extras = ... | Python | 0 | @@ -186,22 +186,22 @@
ass Test
-Plugin
+Notify
(unittes
@@ -225,42 +225,60 @@
def
-test_n
+setUp(self):%0A super(TestN
otify
-_syndicates_task(self):
+, self).setUp()
%0A
@@ -278,24 +278,29 @@
p()%0A
+self.
entity = mod
@@ -320,16 +320,21 @@
+self.
entity.e
@@ -363,25 +363,24 @@
't... |
a5b673864a25c5fc4f60281e7397d2afa965431a | reorder imports | biff/tests/test_against_fortran.py | biff/tests/test_against_fortran.py | # coding: utf-8
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import os
# Third-party
import astropy.units as u
from astropy.constants import G as _G
G = _G.decompose([u.kpc,u.Myr,u.Msun]).value
import numpy as np
# Project
from .._bfe import densi... | Python | 0.000009 | @@ -214,16 +214,109 @@
G as _G%0A
+from astropy.utils.data import get_pkg_data_filename%0Afrom astropy.tests.helper import pytest%0A
G = _G.d
@@ -435,102 +435,8 @@
nt%0A%0A
-from astropy.utils.data import get_pkg_data_filename%0Afrom astropy.tests.helper import pytest%0A%0A
@pyt
|
ef02a2c4fb2c0cd2d0b0d1a243169df87515532e | remove default to value for request | bin/addons/base/res/res_request.py | bin/addons/base/res/res_request.py | ##############################################################################
#
# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences r... | Python | 0 | @@ -4566,55 +4566,8 @@
id,%0A
-%09%09'act_to': lambda obj,cr,uid,context=%7B%7D: uid,%0A
%09%09's
|
4339393275a347044cd656b84b05a4fe33a91914 | should have been part of 6ca53737b4a38fe | bin/assess-vulnerabilities-risk.py | bin/assess-vulnerabilities-risk.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This script analyzes Clair generated vulnerabilities.
The script is intended to be incorporated into a CI process
to generate a non-zero exit status when vulnerabilities
exceed an acceptable threshold.
"""
import logging
import optparse
import re
import sys
import time
... | Python | 0.999972 | @@ -864,17 +864,19 @@
G, ERROR
-,
+ or
CRITICA
@@ -880,17 +880,8 @@
ICAL
- or FATAL
%22%0A
|
6d6fc2ed77db220ddfeeaa8709a3518724bb278a | Correct paths in extraction of shape per msa | bin/data_prep/extract_shape_msa.py | bin/data_prep/extract_shape_msa.py | """extract_shape_msa.py
Output one shapefile per MSA containing all the blockgroups it contains
"""
import os
import csv
import fiona
#
# Import MSA to blockgroup crosswalk
#
msa_to_bg = {}
with open('data/2000/crosswalks/msa_blockgroup.csv', 'r') as source:
reader = csv.reader(source, delimiter='\t')
reade... | Python | 0.00001 | @@ -203,21 +203,16 @@
n('data/
-2000/
crosswal
@@ -247,24 +247,24 @@
as source:%0A
+
reader =
@@ -684,29 +684,24 @@
.open('data/
-2000/
shp/state/%25s
@@ -1030,37 +1030,32 @@
ath.isdir('data/
-2000/
shp/msa/%25s'%25msa)
@@ -1075,29 +1075,24 @@
mkdir('data/
-2000/
shp/msa/%25s'%25
@@ -1185,16 +1185,16 @@
... |
e0a4024a79f65c1b35648603bad2662ccb9a3305 | Update cloudstack_common.py | cloudstack_plugin/cloudstack_common.py | cloudstack_plugin/cloudstack_common.py | ########
# Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | Python | 0.000009 | @@ -2997,28 +2997,22 @@
%0A if
-secret_probe
+config
is None
|
80a1912ce69fd356d6c54bb00f946fbc7874a9ce | Allow multiple alarms for same metric type | bluecanary/set_cloudwatch_alarm.py | bluecanary/set_cloudwatch_alarm.py | import boto3
from bluecanary.exceptions import NamespaceError
from bluecanary.utilities import throttle
@throttle()
def set_cloudwatch_alarm(identifier, **kwargs):
if not kwargs.get('Dimensions'):
kwargs['Dimensions'] = _get_dimensions(identifier, **kwargs)
if not kwargs.get('AlarmName'):
kw... | Python | 0.00001 | @@ -363,33 +363,308 @@
ier,
- kwargs.get('MetricName')
+%0A kwargs.get('MetricName'))%0A%0A if kwargs.get('AlarmNameModifier'):%0A kwargs%5B'AlarmName'%5D = '%7B%7D_%7B%7D'.format(kwargs.get('AlarmName'),%0A kwargs.get('A... |
ecc5f2a1e1638bf2a97b1a41a22c67802d077fc0 | fix monogo-insert can not get collection if it is not exist. | boliau/plugins/mongo/missionlib.py | boliau/plugins/mongo/missionlib.py | #!/usr/bin/env python
# -*- encoding=utf8 -*-
#
# File: missionlib.py
#
# Copyright (C) 2013 Hsin-Yi Chen (hychen)
# Author(s): Hsin-Yi Chen (hychen) <ossug.hychen@gmail.com>
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Sof... | Python | 0 | @@ -1483,30 +1483,28 @@
t()%0A
-return
+db =
self.conn%5Bd
@@ -1513,24 +1513,74 @@
ame%5D
-%5Bcollectionname%5D
+%0A collection = db%5Bcollectionname%5D%0A return collection
%0A%0Acl
@@ -2823,17 +2823,21 @@
ient
-%5B
+.get(
dbname
-%5D%5B
+,
coll
@@ -2843,34 +2843,73 @@
lection_name
-%5D... |
0bef41a9df057fe37b58ac68f77f4cff7702b360 | remove dead code | cmsplugin_cascade/bootstrap4/mixins.py | cmsplugin_cascade/bootstrap4/mixins.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.forms import MediaDefiningClass, widgets
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from cmsplugin_cascade.fields import GlossaryField
from... | Python | 0.999454 | @@ -822,698 +822,8 @@
f)%0A%0A
- def Xget_form(self, request, obj=None, **kwargs):%0A glossary_fields = list(kwargs.pop('glossary_fields', self.glossary_fields))%0A choices = %5B(None, _(%22Select CSS%22))%5D%0A choices.extend(%5B(clsname, clsname) for clsname in %5B'a', 'b', 'c'%5D%5D)%0A ... |
b514f1c20e479732a0e636bb5fb484abb9f34662 | fix test that fails certain times of day | springboard_iogt/tests/test_filters.py | springboard_iogt/tests/test_filters.py | from operator import attrgetter
from datetime import datetime, timedelta
from mock import Mock
from pyramid import testing
from springboard.tests import SpringboardTestCase
from springboard.views.base import SpringboardViews
from springboard_iogt import filters
class TestFilters(SpringboardTestCase):
maxDiff ... | Python | 0.000026 | @@ -1534,16 +1534,32 @@
utcnow()
+.replace(hour=2)
%0A%0A
|
5c1576ae50f18d5ff96a3d564df120465b060e04 | add tab loop to bundle readme view (#255) | conjure/ui/views/bundle_readme_view.py | conjure/ui/views/bundle_readme_view.py | """ Service Walkthrough view
List out the updated bundle in a cleaner view showing what
charms and their relations will be done.
"""
from glob import glob
import os
from urwid import BoxAdapter, Filler, ListBox, Pile, Text, WidgetWrap
from conjure import utils
from conjure.app_config import app
from ubuntui.ev impor... | Python | 0 | @@ -905,16 +905,263 @@
n True%0A%0A
+ def keypress(self, size, key):%0A if key == 'tab':%0A cur = self.pile.focus_position%0A self.pile.focus_position = 3 if cur == 1 else 1%0A else:%0A return super(BundleReadmeView, self).keypress(size, key)%0A%0A
def
@@ -2332,1... |
5f1e539f5c7a49670c7dee6737595027fba22ad1 | Remove unused variable | cinder/db/migration.py | cinder/db/migration.py | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a ... | Python | 0.000002 | @@ -1321,34 +1321,8 @@
134%0A
-MIGRATE_MIGRATIONS_PATH =
ALEM
|
67d0388102c2bbf7abff17a23979bbfd02940ee1 | fix gmock/gtest installation | build/fbcode_builder/specs/gmock.py | build/fbcode_builder/specs/gmock.py | #!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
def fbcode_builder_spec(builder):
return {
'steps': [
# google mock also provides the gtest libraries
builder.g... | Python | 0.000005 | @@ -208,95 +208,138 @@
-return %7B%0A 'steps': %5B%0A # google mock also provides the gtest libraries
+builder.add_option(%0A 'google/googletest:cmake_defines',%0A %7B'BUILD_GTEST': 'ON'%7D%0A )%0A return %7B%0A 'steps': %5B
%0A
@@ -404,19 +404,8 @@
', '
-googlemo... |
e65dd84adb878d073383bb681e4a38c8b94444e4 | Fix from_torch paths | src/models/from_torch.py | src/models/from_torch.py | # coding=utf-8
from __future__ import absolute_import, division, print_function
import numpy as np
import os
import pickle as pkl
import torchfile
CONV_TRANSPOSE = (2, 3, 1, 0)
def from_torch(torch_model):
def expand_module(module):
if 'weight' in module._obj or b'weight' in module._obj:
ret... | Python | 0.000007 | @@ -2520,18 +2520,8 @@
dir,
- 'models',
'pr
@@ -2683,18 +2683,69 @@
pen(
-'../models
+os.path.join(DIR_PATH, os.pardir, os.pardir, 'pretrained', '.
/pre
@@ -2767,16 +2767,17 @@
net.pkl'
+)
, 'wb')
|
03b2337c9786975de242a2fad4f400a4fc99de1c | Add aspect ratio setting | notes-processor.py | notes-processor.py | #!/usr/bin/env python
# Python script to automatically convert poor-quality
# photos of paper with writing on them into duotone images.
import sys
import cv2
import numpy as np
import os.path
import multiprocessing
from itertools import starmap
NBHD_SIZE = 19
UNSHARP_T = 48
ADAPT_T = 24
INVERT = False
def proces... | Python | 0 | @@ -301,16 +301,34 @@
= False
+%0AASPECT = 8.5/11.0
%0A%0Adef pr
@@ -3022,32 +3022,30 @@
= h, int(h*
-8.5/11.0
+ASPECT
)%0A else:%0A
@@ -3076,24 +3076,22 @@
, int(h*
-8.5/11.0
+ASPECT
)%0A de
|
f5d419c95ea86719afff9924dbd837f574c216ae | Revert "Restore proper default color for Toolbar" | kivymd/toolbar.py | kivymd/toolbar.py | # -*- coding: utf-8 -*-
from kivy.clock import Clock
from kivy.lang import Builder
from kivy.metrics import dp
from kivy.properties import ListProperty, StringProperty, OptionProperty
from kivy.uix.boxlayout import BoxLayout
from kivymd.backgroundcolorbehavior import BackgroundColorBehavior
from kivymd.button import MD... | Python | 0 | @@ -2283,36 +2283,28 @@
roperty(
-None, allownone=True
+%5B0, 0, 0, 1%5D
)%0A%0A d
@@ -2384,113 +2384,8 @@
gs)%0A
- if self.background_color == %5B%5D:%0A self.background_color = self.theme_cls.primary_color%0A
|
a84ccc871b5f85f80844d1cd413ddbf44194da17 | Add version information to documentation | doc/conf.py | doc/conf.py | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | Python | 0 | @@ -1,24 +1,53 @@
+# coding=utf-8%0Aimport ibei%0A%0A%0A
# Configuration file for
@@ -809,16 +809,43 @@
Smith'%0A
+version = ibei.__version__%0A
%0A%0A# -- G
|
6ffd01cd9578d008d757da86755ca1c3927bf910 | remove default JSONEncoder | backend/geonature/app.py | backend/geonature/app.py | """
Démarrage de l'application
"""
import logging
from json import JSONEncoder
from flask import Flask
from flask_mail import Message
from flask_cors import CORS
from sqlalchemy import exc as sa_exc
from flask_sqlalchemy import before_models_committed
from pkg_resources import iter_entry_points
from geonature.utils... | Python | 0.000005 | @@ -49,38 +49,8 @@
ng%0A%0A
-from json import JSONEncoder%0A%0A
from
@@ -1702,151 +1702,8 @@
fig)
-%0A # change default flask JSONEncoder for perf reaseon and because %22as_dict%22 already manage non JSON Types%0A app.json_encoder = JSONEncoder
%0A%0A
|
e3f5900d62f702bc543ada6991648cd98e7ce917 | add libmagic rule for debian jessie's `file` | snoop/content_types.py | snoop/content_types.py | import mimetypes
import magic
mimetypes.add_type('message/x-emlx', '.emlx')
mimetypes.add_type('message/x-emlxpart', '.emlxpart')
mimetypes.add_type('application/vnd.ms-outlook', '.msg')
mimetypes.add_type('application/x-hoover-pst', '.pst')
mimetypes.add_type('application/x-hoover-pst', '.ost')
mimetypes.add_type('ap... | Python | 0 | @@ -3115,16 +3115,89 @@
r-pst%22,%0A
+ %22Composite Document File V2 Document%22: %22application/vnd.ms-outlook%22,%0A
%7D%0A%0AMAGIC
|
c2d622e1d800c7d89c20ba224550a1692d5e497f | update intersphinx for sqlalchemy | doc/conf.py | doc/conf.py | # -*- coding: utf-8 -*-
import os
import sys
import alagitpull
# Get the project root dir, which is the parent dir of this
cwd = os.getcwd()
project_root = os.path.dirname(cwd)
sys.path.insert(0, project_root)
sys.path.append(os.path.abspath(
os.path.join(os.path.dirname(__file__), "_ext")))
# package data
abo... | Python | 0 | @@ -2360,16 +2360,21 @@
'http://
+docs.
sqlalche
@@ -2376,28 +2376,16 @@
alchemy.
-readthedocs.
org/en/l
|
94c09cb1442f064496a80be7f49781f640bd3a70 | Merge [14531] from 1.0-stable | sample-plugins/workflow/StatusFixer.py | sample-plugins/workflow/StatusFixer.py | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2013 Edgewall Software
# Copyright (C) 2007 Eli Carter <retracile@gmail.com>
# 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://trac.... | Python | 0.000001 | @@ -2638,17 +2638,16 @@
tatus to
-:
%22, rende
|
ba89dc2008616d1fb11a187484596cb7af0ec29f | Add autosectionlabel extension | doc/conf.py | doc/conf.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# remoteStorage.js documentation build configuration file, created by
# sphinx-quickstart on Fri Aug 25 14:11:51 2017. # # This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in... | Python | 0 | @@ -1092,16 +1092,52 @@
ions = %5B
+%0A 'sphinx.ext.autosectionlabel',%0A
'sphinx_
@@ -1140,16 +1140,18 @@
inx_js',
+%0A
'sphinx
@@ -1158,17 +1158,59 @@
_issues'
-%5D
+%0A%5D%0A%0Aautosectionlabel_prefix_document = True
%0A%0A# Add
|
7611a4b3e064868c37b9f52778c8fe9f721e86c5 | Update namespace monitor with exception handling | polyaxon/events/management/commands/monitor_namespace.py | polyaxon/events/management/commands/monitor_namespace.py | import time
from kubernetes.client.rest import ApiException
from django.conf import settings
from clusters.models import Cluster
from events.management.commands._base_monitor import BaseMonitorCommand
from events.monitors import namespace
from polyaxon_k8s.manager import K8SManager
class Command(BaseMonitorCommand... | Python | 0 | @@ -87,16 +87,89 @@
settings
+%0Afrom django.db import InterfaceError, ProgrammingError, OperationalError
%0A%0Afrom c
@@ -446,16 +446,463 @@
ents.'%0A%0A
+ def get_cluster_or_wait(self, log_sleep_interval):%0A max_trials = 10%0A trials = 0%0A while trials %3C max_trials:%0A try:%0... |
ad26a38263655ddfb3421f7cb748ce7782a91aeb | Fix tests_require | setup.py | setup.py | #
# Copyright 2014 Infoxchange Australia
#
# 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.000003 | @@ -1619,24 +1619,25 @@
test
+s
_require
s=test_r
@@ -1628,17 +1628,16 @@
_require
-s
=test_re
|
05cd3098f55acc1745bd43d20e1db2c3fe3f8d01 | Version update.` | setup.py | setup.py | # -*- coding: utf-8 -*-
# MIT License
#
# Copyright (c) 2017 Tijme Gommers
#
# 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
# ... | Python | 0 | @@ -1285,17 +1285,17 @@
n =%222.0.
-4
+5
%22, %0A
|
969acffd6562c27a53973a1fd7551bcf5c6c6cbc | tweak setup to include new version and reqs | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from setuptools import setup, find_packages
APP_NAME = 'tarbell'
VERSION = '0.9b2'
settings = dict()
# Publish Helper.
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
settings.update(
name=APP_NAME,
... | Python | 0 | @@ -143,17 +143,17 @@
= '0.9b
-2
+3
'%0A%0Asetti
@@ -716,40 +716,8 @@
1%22,%0A
- %22GitPython==0.3.2.RC1%22,%0A
@@ -733,24 +733,24 @@
a2==2.7.1%22,%0A
+
%22Mar
@@ -820,32 +820,8 @@
4%22,%0A
- %22async==0.6.1%22,%0A
@@ -834,17 +834,17 @@
oto==2.1
-8
+9
.0%22,%0A
@@ -864,143 ... |
317e4126331b9889433d634993039ef6848e75ef | version bump | setup.py | setup.py | from distutils.core import setup
from distutils.extension import Extension
cmdclass = { }
try:
from Cython.Distutils import build_ext
cmdclass.update({ 'build_ext': build_ext })
EXT = ".pyx"
except:
EXT = ".c"
NAME = "cypyserialize"
VERSION = "1.0.2"
DESCR = "Really easy, really quick, binary parser ... | Python | 0.000001 | @@ -260,17 +260,17 @@
= %221.0.
-2
+3
%22%0ADESCR
|
5abbc9c3b56b97fd6365719a903121604e1d4539 | Version 1.1.62 | setup.py | setup.py | """
The setup package to install the SeleniumBase Test Framework plugins
"""
from setuptools import setup, find_packages # noqa
setup(
name='seleniumbase',
version='1.1.61',
url='http://seleniumbase.com',
author='Michael Mintz',
author_email='@mintzworld',
maintainer='Michael Mintz',
desc... | Python | 0 | @@ -174,17 +174,17 @@
n='1.1.6
-1
+2
',%0A u
|
5506ecd2bd86dbd052b07247fa0b21c985df2b5c | Remove unuseful directories in setup.py | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2015:
# Frederic Mohier, frederic.mohier@gmail.com
#
# This file is part of (WebUI).
#
# (WebUI) 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 Fou... | Python | 0.000001 | @@ -2144,62 +2144,8 @@
bui%22
-,%0A 'libexec': %22/var/lib/alignak_webui/libexec%22,
%0A
@@ -2429,32 +2429,42 @@
'run': %22/
+usr/local/
var/run/alignak_
@@ -2493,53 +2493,8 @@
- %22/var/log/alignak_webui%22,%0A 'libexec':
%22/u
@@ -2494,39 +2494,39 @@
%22/usr/local/
-libexec
+v... |
bf465d2a00d2d1fd77dc17dd4e90e2cf013273dd | version bump | setup.py | setup.py | #!/usr/bin/env python
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
VERSION = '0.0.2'
LONG_DESC = """\
"""
setup(name='django-dockit',
version=VERSION,
description="",
long_description=LONG_DESC,
classifiers=[
... | Python | 0.000001 | @@ -161,9 +161,9 @@
0.0.
-2
+3
'%0ALO
|
0e178c8bcb0bad2146fede1e6361bc57bdbf8102 | Bump version for 0.3.0 | setup.py | setup.py | #!/usr/bin/env python
try:
from Cython.Build import cythonize
import Cython
except ImportError:
raise RuntimeError('No cython installed. Please run `pip install cython`')
if Cython.__version__ < '0.19.1':
raise RuntimeError('Old cython installed. Please run `pip install -U cython`')
from distutils.cor... | Python | 0 | @@ -357,17 +357,17 @@
MINOR =
-2
+3
%0AMICRO =
@@ -367,17 +367,17 @@
MICRO =
-1
+0
%0AVERSION
|
8b95eac9d92856b521265b1e2139b73805baf94d | Version bump | setup.py | setup.py | #
# Copyright 2014 Infoxchange Australia
#
# 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.000001 | @@ -790,9 +790,9 @@
.2.1
-5
+6
',%0A
|
1f14b95b26e84336e4c1e8a11ea2fd06fa1a802d | Bump version to make PyPI happy | setup.py | setup.py | import os
import sys
from setuptools import setup, Extension, find_packages
ext_modules = []
# C speedups are no good for PyPy
if '__pypy__' not in sys.builtin_module_names:
ext_modules.append(
Extension('gevent_fastcgi.speedups', ['gevent_fastcgi/speedups.c']))
setup(
name='gevent-fastcgi',
vers... | Python | 0 | @@ -323,16 +323,18 @@
n='1.0.2
+.1
',%0A d
|
c4ec856f26e4d83eb11296480ab8180f14588934 | Update python versions | setup.py | setup.py | #!/usr/bin/env python3
from os import path
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='ogn-python',
versio... | Python | 0 | @@ -1008,17 +1008,66 @@
on :: 3.
-4
+5',%0A 'Programming Language :: Python :: 3.6
',%0A
@@ -1102,28 +1102,129 @@
Python :: 3.
-5
+7
',%0A
+ 'Programming Language :: Python :: 3.8',%0A 'Programming Language :: Python :: 3.9-dev'%0A
%5D,%0A k
|
a7717abd4c9fe436eb657c376e5d5eef44323d42 | Version 1.10.0 | setup.py | setup.py | from setuptools import setup, find_packages
import sys, os
version = '1.9.4'
install_requires = [
# -*- Extra requirements: -*-
]
setup(name='twitter',
version=version,
description="An API and command-line toolset for Twitter (twitter.com)",
long_description=open("./README", "r").read(),
... | Python | 0 | @@ -70,11 +70,12 @@
'1.
-9.4
+10.0
'%0A%0Ai
|
e2455de9a8a9a4d1147b75307d73f513cc866e11 | Bump setup.py version to 0.3.0. | setup.py | setup.py | from setuptools import setup
requirements = ["dataclasses==0.8;python_version<'3.7'"]
setup(
name="clr",
version="0.2.0",
description="A command line tool for executing custom python scripts.",
author="Color",
author_email="dev@getcolor.com",
url="https://github.com/color/clr",
packages=["... | Python | 0 | @@ -119,17 +119,17 @@
sion=%220.
-2
+3
.0%22,%0A
|
0404c2d0b25d8d8e3bb542b4872361b24ea568e9 | add long description | setup.py | setup.py | # No shebang line, this module is meant to be imported
#
# Copyright 2013 Oliver Palmer
#
# 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
#
# U... | Python | 0.999999 | @@ -1547,16 +1547,69 @@
m.%22%22%22),%0A
+ long_description=open(%22README.rst%22, %22r%22).read(),%0A
clas
|
b79e11ccc4a07a5a257d2135aa9c7d3c2ff75546 | Fix released | setup.py | setup.py | from setuptools import setup
setup(
name='edn',
version='0.0.1',
packages=['edn'],
package_data={'edn': ['edn.parsley']},
install_requires=[
# iso8601 0.1.5 introduces a timezone parsing bug.
# https://bitbucket.org/micktwomey/pyiso8601/issue/8/015-parses-negative-timezones-incorre... | Python | 0 | @@ -160,170 +160,8 @@
s=%5B%0A
- # iso8601 0.1.5 introduces a timezone parsing bug.%0A # https://bitbucket.org/micktwomey/pyiso8601/issue/8/015-parses-negative-timezones-incorrectly%0A
@@ -176,15 +176,15 @@
8601
-=
+%3E
=0.1.
-4
+6
',%0A
|
3f6aaf630658e42862aa40037def28e16541f930 | Fix title parsing in markdown | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
from os.path import join, dirname
from setuptools import setup, find_packages
ROOT = dirname(__file__)
RE_REQUIREMENT = re.compile(r'^\s*-r\s*(?P<filename>.*)$')
RE_MD_CODE_BLOCK = re.compile(r'```(?P<language>\w+)?\n(?... | Python | 0.004923 | @@ -918,16 +918,17 @@
t%7D%0A'''%0A%0A
+%0A
def md2p
@@ -2505,16 +2505,20 @@
level'))
+ - 1
%5D%0A
|
763d59db4d6369434c55af25caa69cf57f8d712f | Fix user statement rendering issues. | libapol/policyrep/user.py | libapol/policyrep/user.py | # Copyright 2014, Tresys Technology, LLC
#
# This file is part of SETools.
#
# SETools 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 ... | Python | 0 | @@ -1561,23 +1561,21 @@
def mls_
-default
+level
(self):%0A
@@ -1644,13 +1644,13 @@
.MLS
-Range
+Level
(sel
@@ -1680,21 +1680,25 @@
bol.get_
-range
+dfltlevel
(self.po
@@ -1794,37 +1794,37 @@
return mls.MLS
-Level
+Range
(self.policy, se
@@ -1838,33 +1838,29 @@
_symbol.get_
-dfltlevel
+range
(self.policy
@@... |
af3a7217b94254f2ce533deefd4d9e636b9937f9 | Bump version to 0.2-dev | setup.py | setup.py | from distutils.core import setup
setup(
name='Zuice',
version='0.1',
description='A dependency injection framework for Python',
author='Michael Williamson',
author_email='mike@zwobble.org',
url='http://gitorious.org/zuice',
packages=['zuice'],
)
| Python | 0 | @@ -71,9 +71,13 @@
='0.
-1
+2-dev
',%0A
|
099a5b3f0300f0a37d4aea8c3bc27a9fb00aff6a | Update python classifiers in setup.py | setup.py | setup.py | import codecs
import os
import shutil
import sys
import warnings
import setuptools
from setuptools import find_packages, setup, Command
from setuptools.command.egg_info import egg_info
PACKAGE_NAME = 'certvalidator'
PACKAGE_VERSION = '0.12.0.dev1'
PACKAGE_ROOT = os.path.dirname(os.path.abspath(__file__))
# setupto... | Python | 0.000002 | @@ -3162,24 +3162,71 @@
License',%0A%0A
+ 'Programming Language :: Python :: 2',%0A
'Pro
@@ -3307,24 +3307,71 @@
on :: 2.7',%0A
+ 'Programming Language :: Python :: 3',%0A
'Pro
@@ -3701,16 +3701,65 @@
: 3.8',%0A
+ 'Programming Language :: Python :: 3.9',%0A
|
cfec28aca4a4da5ec89b831b1ad13e551d8d73fa | Modify setup.py | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
__version__ = "0.1.1"
setup(
name='RSK Mind',
version=__version__,
description='Framework for machine learning platform',
keywords='machine learning deep learning',
url='git@bitbucket.org:rasarmy/framework.git',
author='RSK Proj... | Python | 0.000001 | @@ -626,16 +626,34 @@
'tests',
+ 'tests.*', 'doc',
'tests.
|
c7124022925c71bc5b89e02cac059f7f9a03625d | Fix license filename in setup.py | setup.py | setup.py | import pwnedcheck
from distutils.core import setup
setup(
name="PwnedCheck",
packages=["pwnedcheck"],
package_dir={"pwnedcheck": "pwnedcheck"},
version=pwnedcheck.__version__,
description="Python package to interact with http://haveibeenpwned.com",
long_description=open("README.rst").read() + ... | Python | 0.000003 | @@ -502,20 +502,16 @@
ENSE.rst
-.rst
%22).read(
|
353e13a622e6a51670ce205da3d16a8b119d72fd | Version bump | setup.py | setup.py | # Copyright (c) 2017 David Preece - davep@polymath.tech, All rights reserved.
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDIN... | Python | 0.000001 | @@ -777,17 +777,17 @@
n='1.0.1
-1
+2
',%0A a
|
913ce9a6346a226672f264b11fcf15ce408830f6 | Version bump. | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Name: arpeggio.py
# Purpose: PEG parser interpreter
# Author: Igor R. Dejanović <igor DOT dejanovic AT gmail DOT com>
# Copyright: (c) 2009 Igor R. Dejanović <igor DOT dejanovic AT gmail DOT c... | Python | 0 | @@ -671,9 +671,9 @@
%220.
-5
+6
%22%0A%0Af
|
528d43ffdf1ae3182f20aab30d73183a6210d3be | include pxd file in depends | setup.py | setup.py | import os
from distutils.util import get_platform
import numpy as np
from Cython.Distutils import build_ext
from setuptools import Extension, find_packages, setup
platform = get_platform()
if platform.startswith("win"):
extra_compile_args = []
extra_link_args = []
else:
extra_compile_args = [
"-fP... | Python | 0 | @@ -606,19 +606,24 @@
ls%22%0A
-pyx
+basename
= os.pa
@@ -674,12 +674,8 @@
tils
-.pyx
%22)%0A
@@ -758,11 +758,25 @@
es=%5B
+basename + %22.
pyx
+%22
%5D,%0A
@@ -795,16 +795,33 @@
epends=%5B
+basename + %22.pxd%22
%5D,%0A
|
f68053b7d6bb1e8459095c11600cc53979f39ed0 | Bump version | setup.py | setup.py | # coding: utf-8
# Copyright 2013 The Font Bakery Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | Python | 0 | @@ -2493,17 +2493,17 @@
n='0.0.1
-0
+1
',%0A u
|
176107d2de6b559b0d7045b006941e0da5927336 | Bump SoS version requirement (INFO field fix) | setup.py | setup.py | #!/usr/bin/env python
__author__ = "Gao Wang"
__copyright__ = "Copyright 2016, Stephens lab"
__email__ = "gaow@uchicago.edu"
__license__ = "MIT"
import os, sys
sys.path.append('src')
_py_ver = sys.version_info
if _py_ver.major == 2 or (_py_ver.major == 3 and (_py_ver.minor, _py_ver.micro) < (6, 0)):
raise SystemErr... | Python | 0 | @@ -2340,17 +2340,17 @@
%3E=0.19.1
-1
+3
', 'sos-
|
ad15cc955413575008d6fe242d253c9fce5d744a | update setup.py | setup.py | setup.py | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-facebox',
version='0.2',
packages=['facebox'],
... | Python | 0.000001 | @@ -31,16 +31,31 @@
rt setup
+, find_packages
%0A%0AREADME
@@ -315,19 +315,42 @@
ges=
-%5B'facebox
+find_packages(exclude=%5B'example
'%5D
+)
,%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.