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
a9cfdf8fdb6853f175cdc31abc2dec91ec6dcf3a
fix import
InvenTree/part/tasks.py
InvenTree/part/tasks.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from django.utils.translation import gettext_lazy as _ import InvenTree.helpers import InvenTree.tasks import common.notifications import part.models from part import tasks as part_tasks logger = logging.getLogger("inventree") def not...
Python
0.000001
@@ -229,45 +229,8 @@ dels -%0Afrom part import tasks as part_tasks %0A%0Alo @@ -1407,19 +1407,8 @@ -part_tasks. noti
26a21a9f5da718852c193420a0132ad822139ec0
Remove PHPBB crap
apps/devmo/context_processors.py
apps/devmo/context_processors.py
from django.conf import settings from django.utils import translation def i18n(request): return {'LANGUAGES': settings.LANGUAGES, 'LANG': settings.LANGUAGE_URL_MAP.get(translation.get_language()) or translation.get_language(), 'DIR': 'rtl' if translation.get_language_bi...
Python
0
@@ -500,303 +500,4 @@ n %7B%7D -%0A%0A%0Adef phpbb_logged_in(request):%0A %22%22%22Detect PHPBB login cookie.%22%22%22%0A return %7B%0A 'PHPBB_LOGGED_IN': (request.COOKIES.get(%0A '%25s_u' %25 settings.PHPBB_COOKIE_PREFIX, '1') != '1'),%0A 'PHPBB_SID': request.COOKIES.get(%0A ...
5c9452a125bd3d2bbeb15224db0a7effa94e5330
Correct showVisible value.
apps/python/PartyLaps/ACTable.py
apps/python/PartyLaps/ACTable.py
""" A table drawing utility for Assetto Corsa. """ class ACTable(object): def __init__(self, ac, window): self.ac = ac self.window = window self.setTablePadding(0, 0) self.setCellSpacing(0, 0) self.data = {} self.cells = {} def draw(self): """ ...
Python
0
@@ -801,13 +801,9 @@ el, -False +0 )%0A%0A
243f7eb02ad1f44560df1a24d357f97277f39531
Refactor get_content_types_pks to use ContentType.objects.get_for_models (which implements its own TransactionTestCase-compatible caching)
wagtail/contrib/postgres_search/utils.py
wagtail/contrib/postgres_search/utils.py
from __future__ import absolute_import, division, unicode_literals import operator import re from functools import partial, reduce from django.apps import apps from django.db import connections from django.db.models import Q from django.utils.lru_cache import lru_cache from django.utils.six.moves import zip_longest ...
Python
0
@@ -193,84 +193,8 @@ ons%0A -from django.db.models import Q%0Afrom django.utils.lru_cache import lru_cache%0A from @@ -2217,21 +2217,8 @@ )%0A%0A%0A -@lru_cache()%0A def @@ -2403,28 +2403,37 @@ ype%0A -return list( +content_types_dict = ContentT @@ -2440,24 +2440,26 @@ ype. -_default +objects.db _manager ...
2bf43e3ba86cc248e752175ffb82f4eab1803119
delete question module had bug previously
survey/models/question_module.py
survey/models/question_module.py
from survey.models import BaseModel from django.db import models class QuestionModule(BaseModel): name = models.CharField(max_length=255) description = models.TextField(null=True, blank=True) def remove_related_questions(self): self.question_templates.delete() def __unicode__(self): ...
Python
0
@@ -268,16 +268,22 @@ mplates. +all(). delete()
e21e2ff9b8258be5533261f7834438c80b0082cc
Use iter(...) instead of .iter()
framework/tasks/handlers.py
framework/tasks/handlers.py
# -*- coding: utf-8 -*- import logging import functools from flask import g from celery import group from website import settings logger = logging.getLogger(__name__) def celery_before_request(): g._celery_tasks = [] def celery_teardown_request(error=None): if error is not None: return try:...
Python
0.000004
@@ -386,19 +386,18 @@ oup( -tasks. iter( +tasks )).a
9e2f9b040d0dde3237daca1c483c8b2bf0170663
Update Arch package to 2.7
archlinux/archpack_settings.py
archlinux/archpack_settings.py
# # Biicode Arch Linux package settings. # # Check PKGBUILD_template docs for those settings and # what they mean. # def settings(): return { "version": "2.6.1", "release_number": "1", "arch_deps": ["cmake>=3.0.2", "zlib", "glibc", "sqlite", ...
Python
0
@@ -157,11 +157,9 @@ %222. -6.1 +7 %22,%0A%09
98e4452e07256aa3285906bba60e16ce4dfd1dc3
Replace do_add_subscription() in add_users_to_streams.
zerver/management/commands/add_users_to_streams.py
zerver/management/commands/add_users_to_streams.py
from __future__ import absolute_import from __future__ import print_function from optparse import make_option from typing import Any from django.core.management.base import BaseCommand from zerver.lib.actions import create_stream_if_needed, do_add_subscription from zerver.models import UserProfile, get_realm, get_u...
Python
0
@@ -238,18 +238,20 @@ needed, -do +bulk _add_sub @@ -259,16 +259,17 @@ cription +s %0Afrom ze @@ -2245,19 +2245,32 @@ -did +_ignore, already _subscri @@ -2275,13 +2275,16 @@ ribe +d = -do +bulk _add @@ -2300,30 +2300,132 @@ tion -(user_profile, stream) +s(%5Bstream%5D, %5Buser_profile%5D)%0A ...
ecd33e00eb5eb8ff58358e01a6d618262e8381a6
Update upstream version of vo
astropy/io/vo/setup_package.py
astropy/io/vo/setup_package.py
from distutils.core import Extension from os.path import join from astropy import setup_helpers def get_extensions(build_type='release'): VO_DIR = 'astropy/io/vo/src' return [Extension( "astropy.io.vo.tablewriter", [join(VO_DIR, "tablewriter.c")], include_dirs=[VO_DIR])] def get_pa...
Python
0
@@ -735,10 +735,8 @@ '0. -7.2 +8 ')%0A
dc7ac28109609e2a90856dbaf01ae8bbb2fd6985
Repair the test (adding a docstring to the module type changed the docstring for an uninitialized module object).
Lib/test/test_module.py
Lib/test/test_module.py
# Test the module type from test_support import verify, vereq, verbose, TestFailed import sys module = type(sys) # An uninitialized module has no __dict__ or __name__, and __doc__ is None foo = module.__new__(module) verify(foo.__dict__ is None) try: s = foo.__name__ except AttributeError: pass else: rai...
Python
0
@@ -373,20 +373,30 @@ _doc__, -None +module.__doc__ )%0A%0A# Reg
5abac5e7cdc1d67ec6ed0996a5b132fae20af530
Use the URLs input in the UI boxes
compare_text_of_urls.py
compare_text_of_urls.py
#!/usr/bin/env python from __future__ import print_function import json import os from os.path import join, dirname, abspath import subprocess import sys from get_text_from_url import process_page def main(argv=None): if argv is None: argv = sys.argv arg = argv[1:] # Enter two URLs with a spac...
Python
0
@@ -578,16 +578,21 @@ settings +_json :%0A @@ -593,27 +593,31 @@ -url +setting s = json.loa @@ -626,17 +626,50 @@ settings -) +_json)%0A url1 = settings %5B'source @@ -683,82 +683,70 @@ -%0A parsed_urls = urls.strip().split(' ')%0A assert len(parsed_urls) == + url...
4b8dbc9516a667c944107a9ef4039d0d88ca1e84
Fix location of TTF font for watermarks
astrobin/thumbnail_processors.py
astrobin/thumbnail_processors.py
import os from django.conf import settings from PIL import Image, ImageOps, ImageDraw, ImageEnhance, ImageFont, ImageFilter def rounded_corners(image, rounded = False, **kwargs): if rounded: mask = Image.open('astrobin/thumbnail-mask.png').convert('L') mask = mask.resize(image.size, Image.ANTIAL...
Python
0.000001
@@ -1344,31 +1344,38 @@ oin( -settings.STATIC_ROOT, ' +os.getcwd(), 'astrobin/static/ font
f81c36d4fe31815ed6692b573ad660067151d215
Drop use of 'oslo' namespace package
zaqarclient/_i18n.py
zaqarclient/_i18n.py
# Copyright 2014 Red Hat, Inc # All Rights .Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
Python
0.998108
@@ -631,17 +631,17 @@ rom oslo -. +_ i18n imp
2959d12b0131311faeb427f9022a0e1bbe8e7120
allow string keys in size legend
ggplot/components/legend.py
ggplot/components/legend.py
from matplotlib.patches import Rectangle import matplotlib.pyplot as plt from matplotlib.offsetbox import AnchoredOffsetbox, TextArea, DrawingArea, HPacker, VPacker import matplotlib.lines as mlines import operator import numpy as np def make_title(title): title = title.title() return TextArea(" %s " % title,...
Python
0.000012
@@ -864,24 +864,81 @@ bel, size):%0A + if not isinstance(label, (type(%22%22), type(u%22%22))):%0A label = @@ -953,16 +953,20 @@ bel, 2)%0A + labe
de44f08772dfeca31635167019f051ca16392dd5
Fix typo and send proper dbtime to statsd
zephyr/middleware.py
zephyr/middleware.py
from __future__ import absolute_import from django.conf import settings from zephyr.decorator import RequestVariableMissingError, RequestVariableConversionError from zephyr.lib.response import json_error from django.db import connection from zephyr.lib.utils import statsd from zephyr.lib.cache import get_memcached_tim...
Python
0
@@ -3832,26 +3832,26 @@ elta_ms( -time_delta +query_time ))%0A
962114f65db5de4a0e58ebec93ec8f06147ae790
add RAMONVolume#data
ndio/ramon/RAMONVolume.py
ndio/ramon/RAMONVolume.py
from __future__ import absolute_import from .enums import * from .errors import * import numpy from .RAMONBase import RAMONBase class RAMONVolume(RAMONBase): """ RAMONVolume Object for storing neuroscience data with a voxel volume """ def __init__(self, xyz_offset=(0, 0, 0), ...
Python
0
@@ -1399,8 +1399,560 @@ author)%0A +%0A def data(self):%0A %22%22%22%0A Gets the data from the volume and pumps it into a numpy.ndarray format,%0A regardless of whether it's stored in %60cutout%60 or %60voxels%60. Returns it%0A as though it were stored in %60cutout%60.%0A%0A This ...
1cba70e91b6592253a74d2c030e9c57faf0a1485
add header to backend.py
zmq/sugar/backend.py
zmq/sugar/backend.py
# this will be try/except when other try: from zmq.core import ( Context, Socket, IPC_PATH_MAX_LEN, Frame, Message, Stopwatch, device, proxy, strerror, zmq_errno, zmq_poll, zmq_version_info, constants, ) except ImportError: # here will ...
Python
0.000001
@@ -1,8 +1,623 @@ +%22%22%22Import basic exposure of libzmq C API as a backend%22%22%22%0A%0A#-----------------------------------------------------------------------------%0A# Copyright (C) 2013 Brian Granger, Min Ragan-Kelley%0A#%0A# This file is part of pyzmq%0A#%0A# Distributed under the terms of the New BSD Lice...
398c190bd96c2e398cdb6cafff526efcc27f9f77
Improve SpatialContext comparison
niche_vlaanderen/niche.py
niche_vlaanderen/niche.py
import rasterio import numpy as np from .vegetation import Vegetation from .acidity import Acidity from .nutrient_level import NutrientLevel import logging import os.path _allowed_input = ["soil_code", "mlw", "msw", "mhw", "seepage", "nutrient_level", "inundation_acidity", "inundation_nutrient","n...
Python
0.000001
@@ -1023,23 +1023,22 @@ def -compare +__eq__ (self, o @@ -1208,17 +1208,17 @@ on=0.01) -: +%5C %0A @@ -1226,96 +1226,112 @@ -return True%0A else:%0A print(self.affine)%0A print(other.affine) + and self.width == other.width and self.heigth == other.heigth:%0A ...
9d3d06e760cb4210405a3b720eb67c5da0478f72
remove succes_message variable
sync_settings/thread_progress.py
sync_settings/thread_progress.py
# -*- coding: utf-8 -*- #Credits to @wbond package_control import sublime, threading class ThreadProgress(): """ Animates an indicator, [= ], in the status area while a thread runs :param thread: The thread to track for activity :param message: The message to display next to the activit...
Python
0.000774
@@ -465,33 +465,11 @@ sage -, success_message = '' ):%0A + @@ -495,51 +495,8 @@ age%0A - self.success_message = success_message%0A @@ -682,16 +682,16 @@ lf, i):%0A + if n @@ -721,171 +721,8 @@ ():%0A - if self.success_message != %22%22:%0A self.success_message = 'Sync Settings: %25s...
c691c256682bec5f9a242ab71ab42d296bbf88a9
Add `Post`, `Tag` models to Admin
nightreads/posts/admin.py
nightreads/posts/admin.py
from django.contrib import admin # Register your models here.
Python
0.000001
@@ -31,33 +31,86 @@ in%0A%0A -# Register your models here. +from .models import Post, Tag%0A%0Aadmin.site.register(Post)%0Aadmin.site.register(Tag) %0A
0915a9d0ec055ebb0115f631baa78d8d15563918
Use logger
nipype/interfaces/bids.py
nipype/interfaces/bids.py
# -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Set of interfaces that allow interaction with BIDS data. Currently available interfaces are: BIDSDataGrabber: Query data from BIDS dataset using pybids grabbids. Change directo...
Python
0.000004
@@ -555,16 +555,38 @@ r)%0A%0A%22%22%22%0A +from .. import logging %0Afrom .b @@ -917,33 +917,47 @@ ue%0A%0A -from warnings import warn +LOGGER = logging.getLogger('workflows') %0A%0Acl @@ -5783,12 +5783,22 @@ +LOGGER. warn +ing (msg
e3226faeabc7e424442484355e27ed2861adcc59
Fix setmeta test because tab width changed.
gslib/tests/test_setmeta.py
gslib/tests/test_setmeta.py
# -*- coding: utf-8 -*- # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
Python
0
@@ -3659,10 +3659,8 @@ rt:%5C -t%5C tsou
95e36e9db9e28b808601df9c82ede19ea3486d7c
Add checks for lingering listeners
numba/tests/test_event.py
numba/tests/test_event.py
import unittest import string import numpy as np from numba import njit, jit, literal_unroll from numba.core import event as ev from numba.tests.support import TestCase class TestEvent(TestCase): def test_recording_listener(self): @njit def foo(x): return x + x with ev.insta...
Python
0
@@ -193,16 +193,344 @@ tCase):%0A +%0A def setUp(self):%0A # Trigger compilation to ensure all listeners are initialized%0A njit(lambda: None)()%0A self.__registered_listeners = len(ev._registered)%0A%0A def tearDown(self):%0A # Check there is no lingering listeners%0A self.ass...
afea4f0732e68f5cbb38f5a8ac194698aec8e520
Allow any of the previous tasks to satisfy requirements.
taskflow/patterns/linear_flow.py
taskflow/patterns/linear_flow.py
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Yahoo! Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ...
Python
0.001182
@@ -1205,24 +1205,26 @@ revious task +/s in the chai @@ -1448,24 +1448,103 @@ -if self.results: +for r in _convert_to_set(task.requires()):%0A # Find the last task that provided this. %0A @@ -1556,10 +1556,13 @@ +for ( -_ last @@ -1582,18 +1582,28 @@ esults) -= +in reversed( self.re...
e77380401d04feb1ff283add4dca9f6bad57f330
Rewrite order/tests/MemberViewTests.
haveaniceday/order/tests.py
haveaniceday/order/tests.py
from django.test import TestCase from .models import Member # Create your tests here. class OrderViewTests(TestCase): def test_order_view(self): response = self.client.get('/order/') self.assertEqual(response.status_code, 200) self.assertTemplateUsed(response, 'order/home.html') class Memb...
Python
0
@@ -52,16 +52,84 @@ t Member +%0Afrom website_component.models import CustomWebPage, CustomComponent %0A%0A# Crea @@ -680,16 +680,226 @@ r.save() +%0A page = CustomWebPage(name='%E4%BA%BA%E5%93%A1%E6%B8%85%E5%96%AE')%0A page.save()%0A customcomponent = CustomComponent(name='CustomComponent', val...
9d61639c0f2783c37bb1037d55d7670bc43e7d01
Should be break; not continue
oonib/bouncer/handlers.py
oonib/bouncer/handlers.py
import json import random import yaml from oonib import errors as e from oonib.handlers import OONIBHandler from oonib import config class Bouncer(object): def __init__(self): self.knownHelpers = {} self.updateKnownHelpers() self.updateKnownCollectors() def updateKnownCollectors(self)...
Python
0.998255
@@ -3273,16 +3273,13 @@ -continue +break %0A
718049a991470b6fa95d8db65a6482735219fc57
Fix get_acl_on
openquake/server/utils.py
openquake/server/utils.py
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2015-2017 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
Python
0.000001
@@ -2128,32 +2128,61 @@ false%60.%0A %22%22%22%0A + acl_on = settings.ACL_ON%0A if settings. @@ -2232,98 +2232,90 @@ -if not request.user.is_superuser and settings.ACL_ON:%0A acl_on = True%0A else:%0A +# ACL is always disabled for superusers%0A if request.user.is_superuser:%0A ...
0c1196723202655fcce5ae93db9f93997abf1b94
Remove unused .shaes attribute from CdnDecrypter
telethon/crypto/cdn_decrypter.py
telethon/crypto/cdn_decrypter.py
from hashlib import sha256 from ..tl import Session from ..tl.functions.upload import GetCdnFileRequest, ReuploadCdnFileRequest from ..tl.types.upload import CdnFileReuploadNeeded, CdnFile from ..crypto import AESModeCTR from ..errors import CdnFileTamperedError class CdnDecrypter: """Used when downloading a fil...
Python
0
@@ -699,77 +699,8 @@ shes -%0A self.shaes = %5Bsha256() for _ in range(len(cdn_file_hashes))%5D %0A%0A
4f2b4b07131c462873b87b869e8df1de41af5848
Add some test code
RNACompete/SeqStruct.py
RNACompete/SeqStruct.py
# Copyright 2000-2002 Brad Chapman. # Copyright 2004-2005 by M de Hoon. # Copyright 2007-2015 by Peter Cock. # All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # Modified Copyright...
Python
0.000037
@@ -1636,16 +1636,88 @@ struct_sequence%0A +%0Aif __name__ == %22__main__%22:%0A s = SeqStruct('AGC', 'BBB')%0A print s%0A
762f30d1bf11f46f8541735cd522bf0fae07ba42
add new sc to current window
sm.py
sm.py
# 1.create projects skeleton based on defined scaffolds # 2.create eslint.sublime-build # # Project: https://github.com/molee1905/ShenMa # License: MIT # import sublime, sublime_plugin import os import tempfile import shutil import re import subprocess import datetime, time import json SHORTCUTS_PATH_RE = re.compi...
Python
0
@@ -780,17 +780,21 @@ _path(), - +'-a', path)%0A @@ -819,18 +819,8 @@ (cmd -, cwd=path )%0A%0A%0A
951c0dbcfeb016dbde6e1a7a3f0eacc506c9211e
Rename sockjs router prefix to /ws/api/
ws.py
ws.py
import json from tornado import web, ioloop from sockjs.tornado import SockJSRouter, SockJSConnection from blimp.utils.websockets import WebSocketsRequest class EchoConnection(SockJSConnection): def on_open(self, info): self.send_json({'connected': True}) def on_message(self, data): respons...
Python
0.000002
@@ -158,20 +158,23 @@ %0A%0Aclass -Echo +RESTAPI Connecti @@ -590,16 +590,25 @@ rgument( +%0A '--port' @@ -716,16 +716,25 @@ rgument( +%0A '--debug @@ -949,16 +949,25 @@ rgument( +%0A '--verbo @@ -1237,20 +1237,23 @@ SRouter( -Echo +RESTAPI Connecti @@ -1262,12 +1262,15 @@ , '/ -echo...
a98107225a2a1925913b3e330dfb46d2f31d2801
Use argparse choices option to validate --tabular
mattersend.py
mattersend.py
#!/usr/bin/env python # -*- coding:utf-8 -*- name = 'mattersend' version = '1.2' url = 'https://github.com/mtorromeo/mattersend' description = "Sends messages to mattermost's incoming webhooks via CLI" def build(options, args, message): payload = {} # build request if message: payload['text'] = ...
Python
0.000001
@@ -1523,18 +1523,60 @@ ff', - nargs='?' +%0A nargs='?', choices=dialects ,%0A @@ -1674,65 +1674,21 @@ of -%7B%7D)'%0A .format(%22, %22.join(dialects)) +%25(choices)s)' )%0A @@ -3418,123 +3418,8 @@ '%5D%0A%0A - if args.tabular and args.tabular not in dialects:...
4fe8a1c1b294f0d75a901d4e8e80f47f5583e44e
Fix for test failure introduced by basic auth changes
pages/lms/info.py
pages/lms/info.py
from e2e_framework.page_object import PageObject from ..lms import BASE_URL class InfoPage(PageObject): """ Info pages for the main site. These are basically static pages, so we use one page object to represent them all. """ # Dictionary mapping section names to URL paths SECTION_PATH = {...
Python
0
@@ -1152,24 +1152,25 @@ (self):%0A +%0A stripped @@ -1165,69 +1165,73 @@ -stripped_url = self.browser.url.replace(BASE_URL, %22%22)%0A +# Find the appropriate css based on the URL%0A for url_path, css @@ -1235,17 +1235,18 @@ css_sel -= +in self.EX @@ -1259,66 +1259,197 @@ _CSS -%5...
70271985105fb1abec7180d0c60fcf2a4247fe99
Copy QtGui to QtPrintSupport in membership.py
membership.py
membership.py
import os import pkgutil import json from optparse import OptionParser from functools import reduce from pprint import pprint # This is where all files are read from and saved to PREFIX = '/Qt.py' SKIP_MODULES = [ 'PyQt4.uic.pyuic', # Problematic as it is executed on import 'PyQt5.uic.pyuic' # Problematic...
Python
0
@@ -1247,24 +1247,22 @@ tgui_to_ -qtwidget +module s():%0A @@ -1499,66 +1499,257 @@ -pyside%5B'QtWidgets'%5D = pyside%5B'QtGui'%5D%0A pyqt4%5B'QtWidgets +# When Qt4 was moved to Qt5, they split QtGui into QtGui, QtWidgets, and%0A # QtPrintSupport.%0A pyside%5B'QtWidgets'%5D = pyside%5B'QtGui'%5D%0A ...
4d942291734641bbdd6a71e16167fefca37a68e7
Fix default config file path on auto creation
passpie/config.py
passpie/config.py
import copy import logging import os import yaml DEFAULT_CONFIG_PATH = os.path.join(os.path.expanduser('~'), '.passpierc') DB_DEFAULT_PATH = os.path.join(os.path.expanduser('~'), '.passpie') DEFAULT_CONFIG = { 'path': DB_DEFAULT_PATH, 'short_commands': False, 'key_length': 4096, 'genpass_length': 32,...
Python
0.000001
@@ -1469,24 +1469,21 @@ T_CONFIG -%5B'path'%5D +_PATH , defaul
2559fa50a80ac90f36c3aed251bf397f1af83dd2
bump version to 0.1b2
paste/__init__.py
paste/__init__.py
name = 'paste' version = '0.1b1'
Python
0.000001
@@ -23,11 +23,11 @@ = '0.1b -1 +2 '%0A
cf716e0d35df2a76c57c0b08a027c092ff60fd47
Refactor `.open(...)` for clarity
pdfplumber/pdf.py
pdfplumber/pdf.py
import itertools import logging import pathlib from pdfminer.layout import LAParams from pdfminer.pdfdocument import PDFDocument from pdfminer.pdfinterp import PDFResourceManager from pdfminer.pdfpage import PDFPage from pdfminer.pdfparser import PDFParser from pdfminer.psparser import PSException from .container imp...
Python
0
@@ -1725,17 +1725,24 @@ i -f +s_path = isinsta @@ -1777,17 +1777,16 @@ b.Path)) -: %0A @@ -1786,20 +1786,16 @@ - fp = ope @@ -1813,21 +1813,45 @@ p, %22rb%22) -%0A + if is_path else path_or_fp%0A%0A @@ -1863,28 +1863,24 @@ - inst = cls(f @@ -1892,20 +1...
a9808c822e598fd17148b8fc4063ea11f0a270e9
Add bawler specific exception
pg_bawler/core.py
pg_bawler/core.py
''' ============== pg_bawler.core ============== Base classes for LISTEN / NOTIFY. Postgresql documentation for `LISTEN <https://www.postgresql.org/docs/current/static/sql-listen.html>`_ / `NOTIFY <https://www.postgresql.org/docs/current/static/sql-notify.html>`_. ''' import asyncio import logging import aiopg LOG...
Python
0.000001
@@ -362,16 +362,124 @@ ore')%0A%0A%0A +class PgBawlerException(Exception):%0A '''%0A Base class for all %60%60pg_bawler%60%60 related failures%0A '''%0A%0A%0A def cach
d350c180606060e9539c12d7d49eed4d6802ac8b
Bump to 1.1.5
pilkit/pkgmeta.py
pilkit/pkgmeta.py
__title__ = 'pilkit' __author__ = 'Matthew Tretter' __version__ = '1.1.4' __license__ = 'BSD' __all__ = ['__title__', '__author__', '__version__', '__license__']
Python
0.000205
@@ -68,9 +68,9 @@ 1.1. -4 +5 '%0A__
b1bd2acbe756922a4cfa2b3a307d60b7e89734c2
Update command.py
pipwin/command.py
pipwin/command.py
# -*- coding: utf-8 -*- """pipwin installs compiled python binaries on windows provided by Christoph Gohlke Usage: pipwin install (<package> | [-r=<file> | --file=<file>]) pipwin uninstall <package> pipwin download (<package> | [-r=<file> | --file=<file>]) [-d=<dest> | --dest=<dest>] pipwin search <package> ...
Python
0.000002
@@ -1201,16 +1201,24 @@ ckage%3E%22%5D +.lower() )%0A re
cfd06b763ad9329dccc5ef7f1f8f86a310997c6e
Break the loop immediately after lives are lost
ale.py
ale.py
import collections import os import sys import numpy as np import scipy.misc as spm from ale_python_interface import ALEInterface from PIL import Image import cv2 import environment class ALE(environment.EpisodicEnvironment): """Arcade Learning Environment. """ def __init__(self, rom_filename, seed=0, ...
Python
0.000001
@@ -3488,16 +3488,17 @@ nge(4):%0A +%0A @@ -3505,54 +3505,69 @@ -if self.ale.game_over():%0A break +# Last screeen must be stored before executing the 4th action %0A @@ -3649,16 +3649,17 @@ enRGB()%0A +%0A @@ -3721,65 +3721,13 @@ n%5D)%0A +%0A - self.last_screens...
5975f9e86951a751f2661a2571ee73a8fd94d142
make all file output using codecs(removes Ascii hack)
platsr2odyssey.py
platsr2odyssey.py
import json, urllib.request, re, html, codecs, sys def removeNonAscii(string): #Platsr.se does not return utf-8 encoded stuff so remove non supported Ascii(150) return ''.join(i for i in string if 150 != ord(i)) class Parse: platsrEndpoint = 'http://www.platsr.se/platsr/api/v1/' result = {} def __init__(se...
Python
0
@@ -49,174 +49,8 @@ ys%0A%0A -def removeNonAscii(string):%0A #Platsr.se does not return utf-8 encoded stuff so remove non supported Ascii(150)%0A return ''.join(i for i in string if 150 != ord(i))%0A%0A clas @@ -4185,16 +4185,23 @@ tFile = +codecs. open('ou @@ -4223,16 +4223,25 @@ xt', 'w' +, 'utf-8' )%0Aoutpu...
91167b7595b8a6c62b6aba3f7089e0ca87c0c6f5
Allow adding new reports dynamically.
pledger/report.py
pledger/report.py
from pledger.value import ZERO from pledger.util import struct, linearized, PrefixTree from pledger.template import BalanceTemplate, RegisterTemplate from pledger.ledger_processor import LedgerProcessor class BalanceEntryProcessor(object): Entry = struct("level", "account", "amount") def __init__(self): ...
Python
0
@@ -4215,16 +4215,285 @@ es%5B0%5D%5D%0A%0A + def __getitem__(self, name):%0A return self.reps%5Bname%5D%0A%0A def add(self, name, factory):%0A if name in self.reps:%0A raise Exception.new(%22Report %25s already exists%22 %25 name)%0A self.reps%5Bname%5D = factory%0A self.p...
3ce78ad88d8c963dfb819b323b40b2415d8624b2
Split create user feature into two functions
api.py
api.py
#!/usr/bin/env python """ Copyright 2016 Brian Quach Licensed under MIT (https://github.com/brianquach/udacity-nano-fullstack-conference/blob/master/LICENSE) # noqa """ import endpoints from protorpc import remote from resource import StringMessage from resource import USER_REQUEST @endpoints.api(name='poker', ver...
Python
0
@@ -428,344 +428,370 @@ -# Players are delt a five card hand and each player has one opportunity,%0A # starting with player one, to replace up to 5 cards in their hand with new%0A # cards from the top of the deck.%0A%0A # Once each player has finished replacing their cards, each hand is then%0A # reve...
ce8ba26877505481795edd024c3859b14c548ffd
Refactor comics.py
plugins/comics.py
plugins/comics.py
# Copyright 2017 Starbot Discord Project # # 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.000001
@@ -38,18 +38,17 @@ roject%0A# - %0A + # Lic @@ -224,17 +224,16 @@ nse at%0A# - %0A# @@ -278,17 +278,16 @@ SE-2.0%0A# - %0A# Un @@ -609,16 +609,44 @@ License. +%0A'''Get comics from xkcd.''' %0A%0Aimport @@ -651,17 +651,16 @@ rt json%0A -%0A from api @@ -722,24 +722,60 @@ plugin_in):%0A + ...
05531d19b1f891774bff8946b4acf2718712a677
Add resizing and better highlight method
plugins/notify.py
plugins/notify.py
# coding: UTF-8 """ Copyright (c) 2009 Michael Kuhn All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions a...
Python
0.000001
@@ -1808,16 +1808,20 @@ %22), -128, 128 +64, 64, True )%0A%09%09 @@ -2709,16 +2709,22 @@ ghlight( +self, text, ne @@ -3309,32 +3309,37 @@ essage))%0A%09%09elif +self. _has_highlight(m @@ -3755,23 +3755,28 @@ ction))%0A - %09%09elif +self. _has_hig
318e6b5fd2382766c065574f6b202fd09e68cf6e
increment version #
pmagpy/version.py
pmagpy/version.py
""" Module contains current pmagpy version number. Version number is displayed by GUIs and used by setuptools to assign number to pmagpy/pmagpy-cli. """ "pmagpy-3.11.0" version = 'pmagpy-3.11.0'
Python
0.000001
@@ -160,17 +160,17 @@ py-3.11. -0 +1 %22%0Aversio @@ -190,7 +190,7 @@ .11. -0 +1 '%0A
dfd326611c99c3c517746f0a6f6eee5680afaefa
Add subversion status as number of changed files in cwd
powerline-bash.py
powerline-bash.py
#!/usr/bin/python # -*- coding: utf-8 -*- import os import subprocess import sys class Powerline: separator = '⮀' separator_thin="⮁" ESC = '\e' LSQ = '\[' RSQ = '\]' clear_fg = LSQ + ESC + '[38;0m' + RSQ clear_bg = LSQ + ESC + '[48;0m' + RSQ reset = LSQ + ESC + '[0m' + RSQ def __i...
Python
0
@@ -1655,16 +1655,17 @@ +# cmd = %22g @@ -1703,16 +1703,16 @@ e '%5C*'%22%0A - @@ -1868,28 +1868,16 @@ .stdout, -%0A stdout= @@ -2107,16 +2107,1113 @@ pass%0A%0A +def add_svn_segment(powerline):%0A '''svn info:%0A First column: Says if item was added, deleted, or otherwi...
7150413cccbf8f812b3fd4a1fc2b82a4020aed9f
fix heroku postgresql path to allow sqlalchemy upgrade
app.py
app.py
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_compress import Compress from flask_debugtoolbar import DebugToolbarExtension import sentry_sdk from sentry_sdk.integrations.flask import FlaskIntegration from sqlalchemy.pool import NullPool import logging import sys import os import requests...
Python
0
@@ -1218,16 +1218,181 @@ warning%0A +db_uri = os.getenv(%22DATABASE_URL%22)%0Aif db_uri.startswith(%22postgres://%22):%0A db_uri = db_uri.replace(%22postgres://%22, %22postgresql://%22, 1) # temp heroku sqlalchemy fix%0A app.conf @@ -1427,33 +1427,14 @@ %5D = -os.getenv(%22DATABASE_URL%22) +db_uri %0Aapp
9c8f9bec47ebccca95b226c300709be219e4edf2
Bump version.
app.py
app.py
#!/usr/bin/python # coding: utf-8 """This app contains endpoints to calculate shared Steam games.""" import os import requests from flask import Flask from flask import g from flask import jsonify from flask import render_template from flask import request as flask_request __version__ = "1.3.0" def get_steam_api...
Python
0
@@ -289,17 +289,17 @@ __ = %221. -3 +4 .0%22%0A%0A%0Ade
b8bf769d55a61f9d29b15c4b657d9df293045304
convert to int
app.py
app.py
#!/usr/bin/env python from flask import Flask, render_template, Response, request from i2c import I2C from camera_pi import Camera RobotArduino = I2C(); #The robot's arduino controller app = Flask(__name__, template_folder='site') @app.route('/') def index(): """Main page: controller + video stream""" return...
Python
1
@@ -498,16 +498,17 @@ mmand')%0A +%0A prin @@ -575,20 +575,25 @@ eNumber( +int( val) +) %0A%0A re
0a3fd9d1a14e009215e2f1cfb76fe3989f00c30a
add route for events/<event-id>
app.py
app.py
#!/usr/bin/python from flask import Flask, url_for, request, session, redirect from flask.ext.restful import Resource, Api from api.artists import Artists from api.art import Art from api.artList import ArtList from api.artImage import get_image from api.venues import Venues,VenueList from api.events import Event,Even...
Python
0
@@ -3406,24 +3406,88 @@ 1/events/')%0A + api.add_resource(Event, '/api/v1/events/%3Cstring:event_id%3E')%0A api.add_
dd1948d9d9d057093fafc633b72fea73c92b3adc
Remove srcset filter for updating image links
app.py
app.py
from __future__ import print_function from flask import Flask, request, render_template, send_from_directory, url_for, redirect from mercury_parser import ParserAPI from urlparse import urljoin import validators import urllib import os import sys from bs4 import BeautifulSoup from config import MERCURY_API_KEY, DO_NOT_...
Python
0
@@ -2078,16 +2078,79 @@ links)%0A%0A + ''' removing srcset=True filter to catch lxml screwups '''%0A for @@ -2176,21 +2176,8 @@ img' -, srcset=True ):%0A
c432ae2dc25b2af77b3f57d610b111a24919d987
Add collision detection on paste creation
app.py
app.py
__author__ = 'zifnab' from flask import Flask, redirect, request, render_template, flash, current_app as app, abort from mongoengine import connect from flask_admin import Admin from flask_debugtoolbar import DebugToolbarExtension from flask_login import LoginManager, login_user, login_required, logout_user, current_us...
Python
0
@@ -2062,16 +2062,284 @@ tring()%0A +%0A collision_check = database.Paste.objects(name__exact=paste.name).first()%0A while collision_check is not None:%0A paste.name = random_string()%0A collision_check = database.Paste.objects(name__exact=paste.name).first()%0A%0A ...
3786d74b86dcde49243dfe9f85559fbcf49cbb85
Fix bug in game init method
app.py
app.py
import json import os import webapp2 from webapp2_extras import jinja2 import tokens from models import user_repo, game_repo from game import Game, GAME_STATUS class BaseHandler(webapp2.RequestHandler): @webapp2.cached_property def jinja2(self): return jinja2.get_jinja2(app=self.app) def rende...
Python
0.000001
@@ -2901,16 +2901,21 @@ ers, map +_name =map)%0A
038196b5bc478ff561b6f8031ecbcb37a765ba3e
Change to be more pep8 compliant.
bot.py
bot.py
import praw import urllib import cv2, numpy as np from PIL import Image import time import getpass import re # Eye Classifier eyeData = "xml/eyes.xml" eyeClass = cv2.CascadeClassifier(eyeData) # Glasses Asset glasses = cv2.imread('assets/glasses.png', cv2.IMREAD_UNCHANGED) ratio = glasses.shape[1] / glasses.shape[0] #...
Python
0
@@ -29,17 +29,23 @@ port cv2 -, +%0Aimport numpy a @@ -551,16 +551,17 @@ rd: %22)%0A%0A +%0A def proc
f67807b0f2064e1c6374fe4c10ed87c7a9222426
mark all events after processing it
bot.py
bot.py
#! /usr/bin/env python from time import gmtime, strftime from foaas import foaas from diaspy_client import Client import re import urllib2 def log_write(text): f = open('bot.log', 'a') f.write(strftime("%a, %d %b %Y %H:%M:%S ", gmtime())) f.write(text) f.write('\n') f.close() client=Client() notify = clie...
Python
0
@@ -565,49 +565,8 @@ nd)) -%0A%0A # finally mark as read%0A n.mark() %0A e @@ -613,16 +613,53 @@ RROR: %22+str(n))%0A +%0A # finally mark as read%0A n.mark()%0A
d3409629c120e366c9c7500bc111f61b13e74dc8
Change port.
bot.py
bot.py
import os import json import requests from flask import Flask from flask_restful import Resource, Api, reqparse from slackclient import SlackClient app = Flask(__name__) api = Api(app) token = os.environ.get('SLACK_KEY') sc = SlackClient(token) print sc.api_call('api.test') class RealName(Resource): def user_id...
Python
0
@@ -2495,24 +2495,84 @@ -app.run(debug=True +port = int(os.environ.get('PORT', 5000))%0A app.run(host='0.0.0.0', port=port )%0A
aa9d068095365dbc65fb3b8439df4fe59a8824c5
Remove extraneous code
bot.py
bot.py
import socket import ssl import sys import commands import config import log import utils import zirc class Bot(zirc.Client): def __init__(self): self.userdb = {} # zIRC self.connection = zirc.Socket(family=socket.AF_INET6, wrapper=ssl.wrap_socket) ...
Python
0.999999
@@ -1418,400 +1418,8 @@ raw) -%0A if event.arguments == 'VERSION':%0A sysver = %22%22.join(__import__(%22sys%22).version.split(%22%5Cn%22))%0A gitver = __import__(%22subprocess%22).check_output(%5B'git', 'rev-parse', '--short', 'HEAD'%5D).decode().split()%5B0%5D%0A messsage = %2...
92dedb59e89c8e590bee831ea79fb682baa736a2
Clean up
bot.py
bot.py
import os import json import asyncio import websockets import slacker ################################ # IMPORTANT: just for testing! # ################################ slack = slacker.Slacker('xoxb-24649221783-q40uS6HJkH7D6TMhykeyaH7h') # Use this for production: # # slack = slacker.Slacker(os.environ["SLACKAP...
Python
0.000002
@@ -794,17 +794,18 @@ # -w + W ait for @@ -834,17 +834,16 @@ come in -. %0A @@ -933,27 +933,23 @@ a)%0A%0A -%0A - #i +# I f a user @@ -1016,16 +1016,57 @@ _join':%0A + # Get their user id and name%0A @@ -1151,32 +1151,72 @@ r').get('name')%0A + # Open...
9ab748de8ca86b2f62bda30c5f2f3f0b2bde7047
Handle TimeoutException and improve code structure
bot.py
bot.py
import os import re import time import json import schedule import config from slackclient import SlackClient from handlers import HandlerManager from storage import Storage BOT_ID = '' sc = SlackClient(os.environ['SLACK_BOT_TOKEN']) storage = Storage() def post(channel, text, as_user=None): if as_user is None...
Python
0
@@ -1176,73 +1176,104 @@ def -parse_output(output_list):%0A +fetch_messages():%0A try:%0A messages = sc.rtm_read()%0A + if -output_list and len(output_list +messages and len(messages ) %3E @@ -1287,50 +1287,139 @@ + + for -output in output_list:%0A +m in messages:%0A ...
b367ff9e032d01f15aaaedc7e93446e9dda2649a
Fix outputing
bot.py
bot.py
import evaluation settings = {} current_grid = [[0]] current_round = 0 me = -1 op = -1 def play(grid, column, color): grid = [x[:] for x in grid] for row in reversed(grid): if row[column] == 0: row[column] = color return grid # Can't play there return None def nodes(gr...
Python
0.999986
@@ -10,16 +10,27 @@ aluation +%0Aimport sys %0A%0Asettin @@ -1360,16 +1360,29 @@ n best%0A%0A +first = True%0A if __nam @@ -2179,49 +2179,78 @@ if -current_round == 1:%0A print +first:%0A first = False%0A sys.stdout.write( ('pl @@ -2252,25 +2252,25 @@ (('place_dis -...
fae0989a5dc6886b11896f6ba5c6484cd1c1f735
Fix error on unknown command and blank game name
bot.py
bot.py
import asyncio import discord import text_adventure class Bot(object): def __init__(self, client, config): self.client = client self.config = config self.game_obj = None @asyncio.coroutine def do_command(self, message, command, *args): yield from getattr(self, command)(mess...
Python
0.000011
@@ -259,32 +259,49 @@ ommand, *args):%0A + try:%0A yield fr @@ -333,32 +333,80 @@ (message, *args) +%0A except AttributeError:%0A pass %0A%0A @asyncio.c @@ -1337,31 +1337,12 @@ e = -discord.Game(name = '') +None )%0A%0A
0958e4760264fcf232e655c47d88a03bf38896b0
Renamed subreddit command to reddit
bot.py
bot.py
import praw import discord from discord.ext import commands import os from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) reddit = praw.Reddit(client_id = os.environ.get("REDDIT_CLIENT_ID"), client_secret = os.environ.get("REDDIT_CLIENT_SECRET"), user_agent...
Python
0.999985
@@ -807,19 +807,16 @@ ync def -sub reddit(c @@ -1424,8 +1424,9 @@ TOKEN%22)) +%0A
af7af25ed5a13a4ce45f358ec5548c2f9e6a492e
remove wiki from DNL
bot.py
bot.py
import json import traceback from datetime import datetime from pathlib import Path import aiohttp import aredis import asyncpg from discord.ext import commands from utils.custom_context import CustomContext class QTBot(commands.Bot): def __init__(self, config_file, *args, **kwargs): self...
Python
0
@@ -500,16 +500,8 @@ mer%22 -, %22wiki%22 )%0D%0A%0D
b8fb30a06ff15000a2d7542e7089b6c8ac1074e5
Add --allow-drilled flag to cli.py, and increase recursion limit
cli.py
cli.py
# Copyright (c) 2015 Matthew Earl # # 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, merge, publish, distr...
Python
0.000001
@@ -1317,16 +1317,51 @@ =None):%0A + sys.setrecursionlimit(100000)%0A%0A pars @@ -1430,16 +1430,16 @@ ents.')%0A - pars @@ -1554,16 +1554,142 @@ ution%22)%0A + parser.add_argument('--allow-drilled', action='store_true',%0A help=%22Allow holes to be drilled out%22)%0A pars ...
2352ce413cebb9f0fd7b1f26bb33bd0325abedfd
make more pylint friendly
csw.py
csw.py
#!/usr/bin/python -u # -*- coding: ISO-8859-15 -*- # ================================================================= # # $Id$ # # Authors: Tom Kralidis <tomkralidis@hotmail.com> # # Copyright (c) 2010 Tom Kralidis # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and ...
Python
0.000002
@@ -1380,22 +1380,22 @@ server%0A%0A -config +CONFIG = 'defa @@ -1575,22 +1575,22 @@ -config +CONFIG = kvp.s @@ -1648,22 +1648,22 @@ ver.Csw( -config +CONFIG )%0A%0A# go!
12c7d473e2a270d46722b936a8fe9b62eb7548f1
Add test for issue 203
h5py/_hl/tests/test_slicing.py
h5py/_hl/tests/test_slicing.py
import numpy as np from .common import ut, TestCase import h5py from h5py.highlevel import File class BaseSlicing(TestCase): def setUp(self): self.f = File(self.mktemp(), 'w') def tearDown(self): if self.f: self.f.close() class TestSingleElement(BaseSlicing): """ F...
Python
0
@@ -3076,16 +3076,568 @@ bytes)%0A%0A +class TestSimpleSlicing(TestCase):%0A%0A %22%22%22%0A Feature: Simple NumPy-style slices (start:stop:step) are supported.%0A %22%22%22%0A%0A def setUp(self):%0A self.f = File(self.mktemp(), 'w')%0A self.arr = np.arange(10)%0A self.dset = self....
d72e6cc3069e280756c59d42406a070529ee8498
Switch to using non-deprecated method
pskc/xml.py
pskc/xml.py
# xml.py - module for parsing and writing XML for PSKC files # coding: utf-8 # # Copyright (C) 2014-2016 Arthur de Jong # # 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 ...
Python
0
@@ -2095,18 +2095,11 @@ ree. -getiterato +ite r():
8c87da20876c6b633988063eac81ff2b0f602dbb
Fix url encoding
ptscrape.py
ptscrape.py
#======================================================================= # Screen-scraping framework #======================================================================= import logging try: import bs4 as soup except ImportError: import BeautifulSoup as soup import urllib2 from urllib import urlencode ...
Python
0.998718
@@ -907,14 +907,8 @@ ' + -query. urle @@ -913,16 +913,21 @@ lencode( +query )%0A
51f46c57e209e35063f67055e45ff6e26f8aa552
Format error on urlfetch.get fail
heat/engine/resources/stack.py
heat/engine/resources/stack.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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 applicab...
Python
0.000002
@@ -613,16 +613,49 @@ cense.%0A%0A +from requests import exceptions%0A%0A from hea @@ -680,16 +680,16 @@ ception%0A - from hea @@ -1993,32 +1993,49 @@ e_create(self):%0A + try:%0A template @@ -2083,32 +2083,250 @@ _TEMPLATE_URL%5D)%0A + except (exceptions.RequestException, IOError) as r...
22aead72594e5aa7047858c04beb3018e93c59fe
Revert "started 0.2.x"
api/apps.py
api/apps.py
from __future__ import unicode_literals from django.apps import AppConfig APP_NAME = 'vsemionov.notes.api' APP_VERSION = '0.2' class ApiConfig(AppConfig): name = 'api'
Python
0
@@ -124,9 +124,11 @@ '0. -2 +1.0 '%0A%0A%0A
492005db9a7c34b2648de8b7335bdbdd18ffb13b
Update setup.py with release version.
py/setup.py
py/setup.py
# Lint as: python3 # 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 agr...
Python
0
@@ -945,14 +945,13 @@ on=%22 -0.1.12 +1.0.0 %22,%0A
31fc2949deff9af411cbdf5144362052d08fc276
add comments to qrscreen.py
qrscreen.py
qrscreen.py
import web import PyQRNative import pygame import os urls = ( '/q', 'QR', '/', 'Index', '/Dream', 'Dream' ) os.environ['SDL_VIDEODRIVER'] = 'fbcon' os.environ["SDL_FBDEV"] = "/dev/fb1" os.environ["SDL_MOUSEDEV"] = "/dev/input/touchscreen" os.environ["SDL_MOUSEDRV"] = "TSLIB" pygame.init() screen = pygame.display...
Python
0
@@ -45,16 +45,49 @@ mport os +%0A%0A# List of URLs for webpy server %0Aurls = @@ -141,16 +141,60 @@ eam'%0A)%0A%0A +# Variables needed to enable the TFT screen%0A os.envir @@ -352,16 +352,37 @@ %22TSLIB%22 +%0A%0A# Initialize pygame %0Apygame.
862d61569a4e7bc06acd4a676072fed79a1905e8
Switch to checking upvotes/downvotes.
replybot.py
replybot.py
#/u/GoldenSights import traceback import praw # simple interface to the reddit API, also handles rate limiting of requests import time import sqlite3 '''USER CONFIGURATION''' APP_ID = "" APP_SECRET = "" APP_URI = "" APP_REFRESH = "" # https://www.reddit.com/comments/3cm1p8/how_to_make_your_bot_use_oauth2/ USERAGENT =...
Python
0
@@ -1162,18 +1162,18 @@ %0AMIN -SCORE +UPVOTES = -10 0%0A# @@ -1184,21 +1184,93 @@ mum +upvotes comment must have to trigger reply%0AMINDOWNVOTES = 0%0A# Minimum upvotes comment - score mus @@ -2587,24 +2587,147 @@ ost. -score %3C MINSCORE +ups %3C MINUPVOTES:%0A # Comment does not meet minimum ...
71b93971486ac4bf80284de43962d4704642a890
add missing _ on line 37
riskroll.py
riskroll.py
from sys import exit from app.RollDice import roll def get_number_of_combatants(): """Take no input and return tuple of ints.""" num_of_attackers = [1,2,3] num_of_defenders = [1,2] attackers = 0 defenders = 0 while attackers not in num_of_attackers: attackers = int(raw_input('How...
Python
0.999982
@@ -932,16 +932,17 @@ attack +_ rolls.so
d31d767ec4c4452e8a1d5f9dd896ade19e4ac645
Fix tests
run_test.py
run_test.py
import asynctwitch as at class Bot(at.CommandBot, at.RankedBot): pass bot = Bot( user='justinfan100' # read-only client ) @bot.command("test", desc="Some test command") async def test(m, arg1:int): pass bot.add_rank("test rank", points=10) @bot.override async def raw_event(data): print(data) @bot...
Python
0.000003
@@ -349,16 +349,25 @@ omstate( +channel, tags):%0A
38a086d2c5ebf73f7ad0108def2304262a2e0452
Add trailing comma
runtests.py
runtests.py
#!/usr/bin/env python import os import sys import django from django.conf import settings DEFAULT_SETTINGS = dict( INSTALLED_APPS=[ "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.sites", "pinax.likes", "pinax.likes...
Python
0.999944
@@ -1135,16 +1135,17 @@ d%22%0A %5D +, %0A)%0A%0A%0Adef
3cc083e08a586e61a8e89a549ba63c6bc5ede2bb
Add :mod:`firmant.writers.staticrst` to tests
runtests.py
runtests.py
#!/usr/bin/python import gettext import unittest import doctest import sys from optparse import OptionParser from minimock import Mock from pprint import pprint from pysettings.modules import get_module gettext.install('firmant') def safe_displayhook(s): if s is not None: sys.stdout.write('%r\n' % s) ...
Python
0
@@ -1079,32 +1079,76 @@ riters.static',%0A + 'firmant.writers.staticrst',%0A '
98109c41048bb8330348cd0ab51a175328b056d6
make runtests executable
runtests.py
runtests.py
#!/usr/bin/env python import sys from django.conf import settings from django.core.management import execute_from_command_line if not settings.configured: settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', } }, INST...
Python
0.000003
8830fece0992a6e1360440b51956c6ae6a4b034a
Add `SECRET_KEY` to django config
runtests.py
runtests.py
#!/usr/bin/env python import sys from os.path import abspath, dirname import django from django.conf import settings import django sys.path.insert(0, abspath(dirname(__file__))) if not settings.configured: settings.configure( INSTALLED_APPS=( 'django.contrib.contenttypes', 'djan...
Python
0.000009
@@ -111,30 +111,65 @@ ettings%0A -import django%0A +from django.utils.crypto import get_random_string %0A%0Asys.pa @@ -210,17 +210,16 @@ e__)))%0A%0A -%0A if not s @@ -238,16 +238,16 @@ igured:%0A - sett @@ -262,16 +262,56 @@ figure(%0A + SECRET_KEY=get_random_string(),%0A @@ -737,19 +737,17...
d9caaf949e9fe59a656c5986180038b9b3dc34fe
remove league alias
bot/module/commands/command_processor.py
bot/module/commands/command_processor.py
import logging from bot.module.commands.calendar.calendar_processor import CalendarProcessor from bot.module.commands.info.info_processor import InfoProcessor from bot.module.commands.crs.crs_processor import CrsProcessor from bot.module.commands.wiki.wiki_processor import WikiProcessor class CommandProcessor(InfoPr...
Python
0.000395
@@ -1887,18 +1887,8 @@ ': %5B -'league', 'lig
cc626bef4bb9ad4888362476a3ce9f92154f7d53
Resolve #74 -- Use result.get instastad of ready
health_check/contrib/celery/plugin_health_check.py
health_check/contrib/celery/plugin_health_check.py
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from time import sleep from django.conf import settings from health_check.backends.base import ( BaseHealthCheckBackend, ServiceUnavailable ) from health_check.plugins import plugin_dir from .tasks import add class CeleryHealthCheck(BaseHealthChec...
Python
0
@@ -61,31 +61,8 @@ elta -%0Afrom time import sleep %0A%0Afr @@ -180,17 +180,53 @@ vailable -%0A +,%0A ServiceReturnedUnexpectedResult )%0Afrom h @@ -337,17 +337,16 @@ ckend):%0A -%0A def @@ -613,142 +613,34 @@ -now = datetime.now()%0A while (now + timedelta(seconds=3)) %3E datetime.now():...
b6130ccccf386e542dbe167214ea92fd31b48920
Version up
esipy/__init__.py
esipy/__init__.py
# -*- encoding: utf-8 -*- """ Entry point of EsiPy, also contains shortcuts for all required objects """ from __future__ import absolute_import try: from .client import EsiClient # noqa from .security import EsiSecurity # noqa from .app import EsiApp # noqa from pyswagger import App # noqa ...
Python
0
@@ -463,8 +463,8 @@ 0.4. -2 +3 '%0D%0A
ac6302f506299ed881ad4971ec30367e083c9433
remove unneeded lower() call on repo name in require.rpm.repo(), as we're doing it early in the method
fabtools/require/rpm.py
fabtools/require/rpm.py
""" Rpm packages =============== This module provides high-level tools for managing CentOS/RHEL/SL packages and repositories. """ from __future__ import with_statement from fabtools.system import get_arch from fabtools.rpm import * def package(pkg_name, repos=None, yes=None, options=None): """ Require a rp...
Python
0
@@ -2338,24 +2338,16 @@ if name -.lower() == 'rpm
8295c59deae9ddf103f843f93a04dd0f800702df
set default protocol specific data
api/push.py
api/push.py
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2012, Dongsheng Cai # # 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 ...
Python
0.000001
@@ -2225,150 +2225,8 @@ ne)%0A - data.setdefault('wns', %7B%7D)%0A data.setdefault('gcm', %7B%7D)%0A data.setdefault('mpns', %7B%7D)%0A data.setdefault('apns', %7B%7D)%0A @@ -4801,16 +4801,60 @@ PE_IOS:%0A + data.setdefault('apns', %7B%7D)%0A @@ -5046,16 +504...
f641c4be6e88aac1e1968ca8f07c5294d4dfe6fa
Bump version
facturapdf/__about__.py
facturapdf/__about__.py
__title__ = 'facturapdf' __summary__ = 'Create PDF invoice according to Spanish regulations.' __version__ = '0.0.2' __license__ = 'BSD 3-Clause License' __uri__ = 'https://github.com/initios/factura-pdf' __author__ = 'Carlos Goce' __email__ = 'cgonzalez@initios.com'
Python
0
@@ -110,9 +110,9 @@ 0.0. -2 +3 '%0A%0A_
32f06d1225eb578d3aaee52c8ece4b9bde6a23d7
Version 0.0.7
fastforward/__init__.py
fastforward/__init__.py
__version__ = '0.0.6' __author__ = 'nofdev'
Python
0.000001
@@ -16,9 +16,9 @@ 0.0. -6 +7 '%0A__
bd5b1c6506c7cf7d38eae31d4250300e1953ae26
Version bump
featureflow/__init__.py
featureflow/__init__.py
__version__ = '0.5.5' from model import BaseModel from feature import Feature, JSONFeature, TextFeature, CompressedFeature, \ PickleFeature from extractor import Node, Graph, Aggregator, NotEnoughData from bytestream import ByteStream, ByteStreamFeature from data import \ IdProvider, UuidProvider, UserSpec...
Python
0.000001
@@ -12,17 +12,17 @@ = '0.5. -5 +6 '%0A%0Afrom
1e3199618f55be86fa5e4259d1c6e4a7074e57ca
Update environment.py
features/environment.py
features/environment.py
""" Copyright 2017 Raul Alvarez Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writ...
Python
0.000001
@@ -580,16 +580,17 @@ nse.%0A%22%22%22 +%0A import S
44a41555d4f2ec3eed090711f34b233085e1aebf
add missing config entries
feedservice/settings.py
feedservice/settings.py
# -*- coding: utf-8 -*- import os, os.path def bool_env(val, default): """Replaces string based environment values with Python booleans""" if not val in os.environ: return default return True if os.environ.get(val) == 'True' else False DEBUG = bool_env('MYGPOFS_DEBUG', True) TEMPLATE_DEBUG = ...
Python
0.000002
@@ -1990,16 +1990,67 @@ .urls'%0A%0A +WSGI_APPLICATION = 'feedservice.wsgi.application'%0A%0A TEMPLATE @@ -2643,16 +2643,873 @@ ';'))%0A%0A%0A +# A sample logging configuration. The only tangible logging%0A# performed by this configuration is to send an email to%0A# the site admins on every HTTP 500 error when DEBUG...
576ea74646935c00e051a46244b8f56165710df0
Add multicast send
circuits/node/server.py
circuits/node/server.py
# Module: server # Date: ... # Author: ... """Server ... """ from circuits.net.sockets import TCPServer from circuits import handler, BaseComponent from .protocol import Protocol class Server(BaseComponent): """Server ... """ channel = 'node' __protocol = {} def __init__(self, b...
Python
0.000001
@@ -824,24 +824,124 @@ end(event)%0A%0A + def send_to(self, event, socks):%0A for sock in socks:%0A self.send(event, sock)%0A%0A def send
8c68031928f54d38c92308504bc93bf61ead57f5
Update clashcallerbot_reply.py added get list of messages older than current datetime, updated outline
clashcallerbot_reply.py
clashcallerbot_reply.py
#! python3 # -*- coding: utf-8 -*- """Checks messages in database and sends PM if expiration time passed. This module checks messages saved in a MySQL-compatible database and sends a reminder via PM if the expiration time has passed. If so, the message is removed from the database. """ import praw import praw.excepti...
Python
0
@@ -823,22 +823,16 @@ # - TODO: Get lis @@ -850,206 +850,211 @@ es o -rdered by expiration date (in MySQL)%0A%0A # TODO: Compare each message expiration datetime to current datetime (in MySQL?)%0A%0A # TODO: If current datetime is after expiration datetime, send +lder than current datetime%0A ...
f7f16611754181c28b1c8c6a3e5942731f851c46
add some docstring
fileparser/extractor.py
fileparser/extractor.py
#!/usr/bin/env python # -*- coding: utf-8 -*- r""" # .---. .----------- # / \ __ / ------ # / / \( )/ ----- (`-') _ _(`-') <-. (`-')_ # ////// '\/ ` --- ( OO).-/( (OO ).-> .-> \( OO) ) .-> # //// / // : : --- (,------....
Python
0.000041
@@ -2206,16 +2206,90 @@ (self):%0A + %22%22%22%0A Extract the content between keys(if has).%0A %22%22%22%0A
42923355855a53cd7d6df23f666c2c74a07c7068
fix healpix_helper to take of nans
lib/healpix_helper.py
lib/healpix_helper.py
import pyfits import numpy as np try: import pywcs except ImportError: import astropy.pywcs as pywcs import healpy import warnings class HealpixData(object): def __init__(self, nside, data, coord=None, nested=False, flipy=False): self._nside = nside self._data = data self._nested...
Python
0
@@ -379,24 +379,16 @@ = coord%0A - %0A def @@ -1117,41 +1117,9 @@ ta)%0A - %0A +%0A %0A @@ -1455,16 +1455,177 @@ x_ring%0A%0A +%0A # some values could be NaNs. Maske those out before calling%0A # ang2pix and recover them.%0A mask = np.isfinite(theta...
2cbae4650422f7982ef50e564e9e27e7fd294be8
Add ability to nix product to admin
fjord/feedback/admin.py
fjord/feedback/admin.py
from django.contrib import admin from django.core.exceptions import PermissionDenied from fjord.feedback.models import Product, Response class ProductAdmin(admin.ModelAdmin): list_display = ( 'id', 'enabled', 'on_dashboard', 'display_name', 'db_name', 'translation_...
Python
0
@@ -1231,16 +1231,303 @@ ption',) +%0A actions = %5B'nix_product'%5D%0A list_per_page = 200%0A%0A def nix_product(self, request, queryset):%0A ret = queryset.update(product=u'')%0A self.message_user(request, '%25s responses updated.' %25 ret)%0A nix_product.short_description = u'Remove produc...
08c2a121365f6d78a50117957db5dde2076e6263
update description
flaskext/mongoobject.py
flaskext/mongoobject.py
# -*- coding: utf-8 -*- """ flaskext.mongoobject ~~~~~~~~~~~~~~~~~~~~ Flask Extension for MongoDB Inspiration: https://github.com/slacy/minimongo/ :copyright: (c) 2011 by dqminh. :license: MIT, see LICENSE for more details. """ from __future__ import with_statement, absolute_import from bson.dbref import DBRef from ...
Python
0.000001
@@ -141,16 +141,62 @@ nimongo/ +%0Ahttps://github.com/mitsuhiko/flask-sqlalchemy %0A%0A:copyr
53d26896f9bd65a791d2b1967535e107254c269e
Use built-in HTML parser for django-compressor.
flicks/settings/base.py
flicks/settings/base.py
# This is your project's main settings file that can be committed to your # repo. If you need to override a setting locally, use settings_local.py from funfactory.settings_base import * PROD_LANGUAGES = ('de', 'en-US', 'es', 'fr', 'nl', 'pl', 'pt-BR', 'sl', 'sq', 'zh-TW') # Defines the views serve...
Python
0
@@ -4865,16 +4865,86 @@ r.png'%0A%0A +# django-compressor%0ACOMPRESS_PARSER = 'compressor.parser.HtmlParser'%0A%0A # Promo
e19e2d69baabac3adedfae4e7a8c6ef5bb3d6f53
Fix alembic script
alembic/versions/4e0500347ce7_add_multigame_tables.py
alembic/versions/4e0500347ce7_add_multigame_tables.py
"""add multigame tables Revision ID: 4e0500347ce7 Revises: 29344aa34d9 Create Date: 2016-03-30 12:26:36.632566 """ # revision identifiers, used by Alembic. revision = '4e0500347ce7' down_revision = '29344aa34d9' from alembic import op import sqlalchemy as sa def upgrade(): op.create_table( 'publisher'...
Python
0.000033
@@ -88,28 +88,28 @@ 16-0 -3-30 12:26:36.632566 +4-05 23:51:58.647657 %0A%0A%22%22 @@ -281,127 +281,100 @@ -op.create_table(%0A 'publisher',%0A sa.Column('id', sa.Integer, primary_key=True,autoincrement=True),%0A +### commands auto generated by Alembic - please adjust! ###%0A op.add_colum...
10f8deb343d17e73185bef916396a80c73b718ed
Add link to migration guide (#10821)
conans/pylint_plugin.py
conans/pylint_plugin.py
"""Pylint plugin for ConanFile""" import re import astroid from astroid import MANAGER from pylint.checkers import BaseChecker from pylint.interfaces import IRawChecker def register(linter): """required method to auto register this checker""" linter.register_checker(ConanDeprecatedImportsChecker(linter)) d...
Python
0
@@ -2303,16 +2303,88 @@ 'conans' +. Check migration guide at https://docs.conan.io/en/latest/conan_v2.html %22,%0A