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
3a6e9b2a0c5806f0e39bbadd768e9e9cbe503479
Add RST `long_description` to setup.py for nice layout on Pypi.
setup.py
setup.py
#!/usr/bin/env python import os import sys from setuptools import setup ROOT_DIR = os.path.dirname(__file__) SOURCE_DIR = os.path.join(ROOT_DIR) requirements = [ 'docker-py >= 1.0.0', ] exec(open('docker_zabbix_sender/version.py').read()) setup( name="docker-zabbix-sender", version=version, author="...
Python
0
@@ -65,16 +65,136 @@ t setup%0A +from textwrap import dedent%0A%0ANAME = %22docker-zabbix-sender%22%0AGITHUB_ORG_URL = %22https://github.com/dockermeetupsinbordeaux%22 %0AROOT_DI @@ -264,54 +264,8 @@ R)%0A%0A -requirements = %5B%0A 'docker-py %3E= 1.0.0',%0A%5D%0A%0A exec @@ -330,38 +330,20 @@ name= -%22dock...
3aae6bc4eabd934c2c5ee60f43b649715f63b3b3
Declare ourselves zip-sage
setup.py
setup.py
#!/usr/bin/env python import subprocess from setuptools import setup requirements = None with open('requirements.txt') as reqsfile: requirements = reqsfile.readlines() setup( name='px', version=subprocess.check_output(['git', 'describe', '--dirty']).decode('utf-8').strip(), description='Cross Functi...
Python
0.000001
@@ -519,16 +519,132 @@ ments,%0A%0A + # See: http://setuptools.readthedocs.io/en/latest/setuptools.html#setting-the-zip-safe-flag%0A zip_safe=True,%0A%0A setu
89a871c76207b5354fe00e7e0cdb401020e0461a
add python 3.5 support
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of tornadis library released under the MIT license. # See the LICENSE file for more information. from setuptools import setup, find_packages DESCRIPTION = "tornadis is an async minimal redis client for tornado " \ "ioloop designed for p...
Python
0.000009
@@ -1570,16 +1570,65 @@ : 3.4',%0A + 'Programming Language :: Python :: 3.5',%0A
cb22b419a0aa631a96818796d200287ab269baa4
return hostname for chroots
rmake/server/servercfg.py
rmake/server/servercfg.py
# # Copyright (c) 2006 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.opensource.org/licen...
Python
0.998689
@@ -2734,16 +2734,65 @@ etPath%0A%0A + def getName(self):%0A return '_local_'%0A%0A def
572fef2fb200369bcd2090f1e7d000928ba3926e
Replace `17.5.31` => `2017.5.31`
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup( name='py-vkontakte', version='17.5.31', packages=['vk'], url='https://github.com/sgaynetdinov/py-vkontakte', license='MIT License', author='Sergey Gaynetdinov', author_email='s.gaynetdinov@gmail.com', description='Python API wrap...
Python
0.000285
@@ -90,16 +90,18 @@ ersion=' +20 17.5.31'
b99a4ee8e8e807a130e5aef71897a8fa98f44df1
Fix comments
src/autoqwopper.py
src/autoqwopper.py
import ImageGrab import Image import os import time from random import * import win32api, win32con import threading ### GLOBALS # Bounding box for QWOP start_x, start_y = 520, 270 end_x, end_y = 1159, 668 frame = (start_x, start_y, end_x, end_y) # Bounding box for the "metres" dialogue box metres_start_x, metres_st...
Python
0
@@ -115,18 +115,16 @@ g%0A%0A# -## GLOBALS + Globals %0A%0A# @@ -566,16 +566,28 @@ bon_y)%0A%0A +# Key codes%0A VK_CODE @@ -674,43 +674,8 @@ %7D%0A%0A -# TODO: Allow parallel key presses%0A def @@ -1099,26 +1099,8 @@ 0)%0A%0A -# TODO: Implement%0A clas
f57cf6b7f29904196e4d7c4bd290c4a6b11ed0fa
Update setup.py
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import codecs try: from setuptools import setup except ImportError: from distutils.core import setup __version__ = '0.0.1' def read(fname): return codecs.open( os.path.join(os.path.dirname(__file__), fname), 'r', 'utf-8').read() readme = ...
Python
0.000001
@@ -330,11 +330,10 @@ DME. -rst +md ')%0A%0A @@ -852,19 +852,19 @@ oved :: -BSD +MIT License
5776579ffa5ca58459a07ccde925729c1fb007af
Correct classifiers in ``setup.py``.
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- u""" Deprecated Library ------------------ Deprecated is Easy to Use ````````````````````````` If you need to mark a function or a method as deprecated, you can use the ``@deprecated`` decorator: Save in a hello.py: .. code:: python from deprecated import deprecat...
Python
0
@@ -5103,32 +5103,34 @@ :: 3.9',%0A + # 'Programming La @@ -5155,16 +5155,43 @@ : 3.10', + # scheduled on 2021-10-04 %0A
4fc9d6872555ee3d33989399e40e947284fc3557
Bump pre-commit from 1.16.0 to 1.16.1
setup.py
setup.py
# -*- coding: utf-8 -*- import codecs import re import sys from setuptools import setup INSTALL_REQUIRES = ["click>=4.0", "click-completion>=0.3.1", "click-didyoumean>=0.0.3"] if "win32" in str(sys.platform).lower(): # Terminal colors for Windows INSTALL_REQUIRES.append("colorama>=0.2.4") EXTRAS_REQUIRE = {...
Python
0.000026
@@ -570,17 +570,17 @@ t==1.16. -0 +1 %22,%0A %5D
dc88f21b61ee55e737c827d098ce36d9e1cb9fa9
Bump version as instructed by bamboo. Switch to increase the minor instead of patch
setup.py
setup.py
import os from setuptools import setup, find_packages README_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.rst') dependencies = [ 'django>=1.3,<1.5', 'django-cms>=2.3,<2.3.6', 'django-admin-extend' ] dependency_links = [ 'http://github.com/pbs/djan...
Python
0
@@ -443,12 +443,11 @@ ='0. -1.23 +2.0 ',%0A
cde6a2a37070810394d61a63efc4a0142a677967
Upgrade pycodestyle, pydocstyle and pylint versions
setup.py
setup.py
import os.path import setuptools # Get long description from README. with open('README.rst', 'r') as fh: long_description = fh.read() # Get package metadata from '__about__.py' file. about = {} base_dir = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(base_dir, 'resolwe_bio', '__about__.py'), '...
Python
0
@@ -1879,172 +1879,8 @@ : %5B%0A - # pycodestyle 2.3.0 raises false-positive for variables%0A # starting with 'def'%0A # https://github.com/PyCQA/pycodestyle/issues/617%0A @@ -1903,17 +1903,17 @@ tyle~=2. -2 +4 .0',%0A @@ -1932,19 +1932,19 @@ docstyle -%3E=1 +~=3 .0.0',%0A...
0a4acdff376f3798b9d53023c51a54f7ffee7dc7
Update profile.py, allow process_exception middleware to fire
profile.py
profile.py
try: import cProfile as profile except ImportError: import profile import pstats from cStringIO import StringIO from django.conf import settings class ProfilerMiddleware(object): """ Simple profile middleware to profile django views. To run it, add ?prof to the URL like this: http://local...
Python
0
@@ -1127,16 +1127,37 @@ ck_args%0A + try:%0A @@ -1224,16 +1224,188 @@ _kwargs) +%0A except:%0A # we want the process_exception middleware to fire%0A # https://code.djangoproject.com/ticket/12250%0A return %0A%0A de
7a0d0a70050bb7b1b3ecdad1285b8b87049fbe3d
Add basic return-type checking to odin.local.
distarray/odin.py
distarray/odin.py
""" ODIN: ODin Isn't Numpy """ from IPython.parallel import Client from distarray.client import DistArrayContext, DistArrayProxy from itertools import chain # Set up a global DistArrayContext on import _global_client = Client() _global_view = _global_client[:] _global_context = DistArrayContext(_global_view) context...
Python
0
@@ -4193,24 +4193,25 @@ tement)%0A +%0A return D @@ -4206,53 +4206,638 @@ -return DistArrayProxy(result_key, subcontext) +type_key = subcontext._generate_key()%0A type_statement = %22%7B%7D = str(type(%7B%7D))%22.format(type_key, result_key)%0A subcontext._execute0(type_statement)%0A ...
fd128e39d2c55105ffcdd553d76717e0f400c904
Add twisted.plugins to find_modules() result
setup.py
setup.py
#!/usr/bin/env python ## # Copyright (c) 2006-2007 Apple 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 r...
Python
0.000003
@@ -2101,71 +2101,42 @@ = %5B -%5D # distutils does not want a generator, because it uses len( ) +%0A %22twisted.plugins%22,%0A %5D%0A %0A
e13b8bfc0871414c6547d795cea2a5224161a4c9
Update __init__.py
djeym/__init__.py
djeym/__init__.py
# coding: utf-8 """ $$$$$___$$$$$$__$$$$$__$$__$$__$$___$$ $$__$$______$$__$$______$$$$___$$$_$$$ $$__$$______$$__$$$$_____$$____$$_$_$$ $$__$$__$$__$$__$$_______$$____$$___$$ $$$$$____$$$$___$$$$$____$$____$$___$$ """ __title__ = 'DjEYM (django-editor-ymaps)' __version__ = '1.0.9' __author__ = 'genkosta' __license__ ...
Python
0.000072
@@ -278,9 +278,10 @@ 1.0. -9 +10 '%0A__
488abb1fe9c1d9746d2fb3c9dc8ee9f76eeb0484
Update setup.py
setup.py
setup.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ____ ____ __ __ # /\ _`\ __/\ _`\ /\ \ /\ \/'\_/`\ # \ \ \/\ \ /\_\ \ \L\_\ `\`\\/'/\ \ # \ \ \ \ \\/\ \ \ _\L`\ `\ /'\ \ \__\ \ # \ \ \_\ \\ \ \ \ \L\ \`\ \ \ \ \ \_/\ \ # \ \____/_\ \ \ \____/ \ \_\ \ \_\\ \_\ # \/___//\ \_\...
Python
0.000001
@@ -690,17 +690,17 @@ (2, 1, 1 -4 +5 )%0A__vers
2aed3674c6bfa352d5bda02307bed837843ad1cf
update file for description
setup.py
setup.py
import re import os import codecs from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) def find_version(*parts): # Open in Latin-1 so that we avoid encoding errors. # Use codecs.open for Python 2 compatibility with codecs.open(os.path.join(here, *parts), 'r', 'l...
Python
0
@@ -1120,11 +1120,10 @@ DME. -rst +md '),%0A
d1bacfc2331e7c06e5fefccdc5b5f527e7eb9d02
add gffutils requirement
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages requirements = [ "kipoi>=0.4.2", # "genomelake", "pybedtools", "pyfaidx", "numpy", "pandas", "tqdm", "colorlog", "related>=0.6.0", # sometimes required "h5py", ] test_requirements = [...
Python
0
@@ -289,16 +289,31 @@ %22h5py%22,%0A + %22gffutils%22%0A %5D%0A%0Atest_
eca68b722ce52f987eb07f03e60daf9a1f64bd96
bump version
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup from pip.req import parse_requirements import sys description = ("This library provides a simple to use Python API for parsing, " "formatting, and normalizing variant names specified in the " "standard recommended by the Human Genome Var...
Python
0
@@ -640,17 +640,17 @@ on='0.9. -2 +3 ',%0A
fef30e00b2123ee9acbbee916fc87f11936b964d
update setup.py
setup.py
setup.py
import ez_setup ez_setup.use_setuptools() from setuptools import setup from distutils.extension import Extension from Cython.Distutils import build_ext import sys import os import numpy if 'setuptools.extension' in sys.modules: m = sys.modules['setuptools.extension'] m.Extension.__dict__ = m._Extension.__dict_...
Python
0.000001
@@ -68,258 +68,42 @@ tup%0A -from distutils.extension import Extension%0Afrom Cython.Distutils import build_ext%0Aimport sys%0Aimport os%0Aimport numpy%0A%0Aif 'setuptools.extension' in sys.modules:%0A m = sys.modules%5B'setuptools.extension'%5D%0A m.Extension.__dict__ = m._Extension.__dict__ +import sys%0Aimpor...
c4046ee4ba4f592d57f99ad10c0035d26518e9f3
Add WSGI entrypoint to setup.py
setup.py
setup.py
""" setup script for "portal" package for development: python setup.py develop to install: python setup.py install """ import datetime import os from setuptools import setup, find_packages project = "portal" # maintain long_description as a single long line. # workaround for a bug in pkg_info._get_metadata...
Python
0
@@ -1463,24 +1463,43 @@ manage.py%22,%0A + %22wsgi.py%22,%0A os.p
9c3bc4f2a141502b4121109d814fc18e90974744
Bump the Development Status to Stable
setup.py
setup.py
#!/usr/bin/env python3 # coding: utf-8 """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ from setuptools import setup, find_packages import keysmith with open('README.rst') as readme_file: README = readme_file.read() setu...
Python
0
@@ -1188,16 +1188,29 @@ :: -4 - Beta +5 - Production/Stable ',%0A
c2a7bf92a0e7b0c1d02e238b50c701aabad9162e
bump version: 0.4.0
setup.py
setup.py
"""Setup information for the Garmin Connect activity exporter.""" from setuptools import setup, Extension from os import path # needed for Python 2.7 (ensures open() defaults to text mode with universal # newlines, and accepts an argument to specify the text encoding. from io import open here = path.abspath(path.dirn...
Python
0.000002
@@ -614,17 +614,17 @@ sion='0. -3 +4 .0',%0A
963857463cd706260667995bd8817bd2facea5f0
Include the official nydus release
setup.py
setup.py
#!/usr/bin/python from setuptools import setup, find_packages tests_require=[ 'nose', 'mock', ] setup( name="sunspear", license='Apache License 2.0', version="0.1.0a", description="Activity streams backed by Riak.", zip_safe=False, long_description=open('README.rst', 'r').read(), ...
Python
0
@@ -690,21 +690,22 @@ hub.com/ -numan +disqus /nydus/t @@ -711,22 +711,22 @@ tarball/ -0.10.4 +master #egg=nyd
42f963ba0f015e8aa08586bdd42f8e39cfb5b8dd
bump up version
setup.py
setup.py
#!/usr/bin/env python try: from setuptools import setup except ImportError: from distutils.core import setup import os dependency_libs = [ "beautifulsoup4", "dropbox", "feedparser", "google_api_python_client", "humanfriendly", "humanize", "ipython", "lxml", # https://githu...
Python
0
@@ -627,9 +627,9 @@ .43. -5 +6 %22,%0A
a8e472cfdec472d24e1f7b3b73c2c637a86e85dd
Fix xmldoc example
examples/xmldoc/XMLload.py
examples/xmldoc/XMLload.py
import pyjd from pyjamas.ui.Button import Button from pyjamas.ui.RootPanel import RootPanel from pyjamas.ui.HTML import HTML from pyjamas.ui.DockPanel import DockPanel from pyjamas.ui import HasAlignment from pyjamas.ui.Hyperlink import Hyperlink from pyjamas.ui.VerticalPanel import VerticalPanel from pyjamas.ui.Scrol...
Python
0.000137
@@ -448,19 +448,41 @@ JS(%22%22%22%0A + var xmlDoc;%0A try + %7B //Inter @@ -496,18 +496,20 @@ lorer%0A -%7B%0A + xmlDoc @@ -548,16 +548,22 @@ LDOM%22);%0A + xmlDoc @@ -578,16 +578,22 @@ false%22;%0A + xmlDoc @@ -612,20 +612,22 @@ t);%0A + %7D -%0A + catch(e) %0A %7B ...
fbb13eb1c45f9e70cfb8199e08f45c4073f09bd1
Add optional dependencies for complete NLTK installation to setup.py
setup.py
setup.py
#!/usr/bin/env python # # Setup script for the Natural Language Toolkit # # Copyright (C) 2001-2016 NLTK Project # Author: Steven Bird <stevenbird1@gmail.com> # Edward Loper <edloper@gmail.com> # Ewan Klein <ewan@inf.ed.ac.uk> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT # Work ...
Python
0
@@ -2584,24 +2584,449 @@ %3E=1.10.0'%5D,%0A + extras_require = %7B%0A 'all': %5B%0A 'nose%3E=1.3.0',%0A 'tox%3E=1.6.1',%0A 'coverage%3E=3.7.1',%0A 'pylint%3E=1.1.0',%0A 'numpy%3E=1.8.0',%0A 'scipy%3E=0.13.2',%0A 'matplotlib%3E=1.3.1...
f233f828dd38c0221f57b14fdf6d0e04f5530ff8
Add "plotting" extra to setup.py which requires matplotlib
setup.py
setup.py
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2013-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.00003
@@ -2213,16 +2213,55 @@ %3C4.0%22%5D,%0A + 'plotting': %5B%22matplotlib %3E=1.5%22%5D,%0A %7D%0A%0Asetup
a4c4f3918e13cea2bac5e8edaf1e072debe06463
Remove hard versioning
setup.py
setup.py
""" Can be run to install all the subpieces. """ from __future__ import print_function try: from setuptools import setup from setuptools.command.install import install from setuptools.command.sdist import sdist except ImportError: from distutils.core import setup from distutils.command.install imp...
Python
0.000002
@@ -1523,17 +1523,17 @@ cks-cli -= +%3E = 0.8.7' @@ -1550,17 +1550,17 @@ 'docopt -= +%3E = 0.6.2' @@ -1580,17 +1580,17 @@ tPython -= +%3E = 3.1.2' @@ -1616,17 +1616,17 @@ -python -= +%3E = 2.2.0' @@ -1646,17 +1646,17 @@ rkdown2 -= +%3E = 2.3.7' @@ -1679,17 +1679,17 @@ monious -= +%3E = 0.8.1' @@ -1708...
0e92abaf74fd79de127d783bd6a3814a3a23e08b
Include visualization component in setup.py
setup.py
setup.py
try: from setuptools import setup except ImportError: from distutils.core import setup import os import re def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() # Implemented from http://stackoverflow.com/a/41110107 def get_property(prop, project): result ...
Python
0
@@ -796,16 +796,40 @@ 'geomdl' +, 'geomdl.visualization' %5D,%0D%0A
6f2fa67510f66cdee1778f5b6dfd2703b7375745
Exclude "test" not "tests" from find_packages
setup.py
setup.py
# /setup.py # # Installation and setup script for polysquare-generic-file-linter # # See /LICENCE.md for Copyright information """Installation and setup script for polysquare-generic-file-linter.""" from setuptools import find_packages from setuptools import setup setup(name="polysquare-generic-file-linter", ve...
Python
0.000756
@@ -1334,17 +1334,16 @@ e=%5B%22test -s %22%5D),%0A
78526e31cd18ac710ff74002741dd6e65b105233
Use include_dirs in setup.py
setup.py
setup.py
#!/usr/bin/env python # Copyright (c) 2016-present, Gregory Szorc # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE file for details. from setuptools import setup, Extension zstd_sources = ['zstd/%s' % p for p in ( 'common/entropy_common...
Python
0
@@ -812,25 +812,19 @@ -extra_compile_arg +include_dir s=%5B%0A @@ -828,26 +828,24 @@ =%5B%0A ' --I zstd',%0A @@ -840,34 +840,32 @@ zstd',%0A ' --I zstd/common',%0A @@ -867,26 +867,24 @@ ',%0A ' --I zstd/compres @@ -892,26 +892,24 @@ ',%0A ' --I zstd/decompr @@ -927,10 +...
ce5ec0555c80b79f0d329b7b0b58e33d5226cd41
Update our support list.
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import sys try: from setuptools import setup except ImportError: from distuitls.core import setup # Get the version version_regex = r'__version__ = ["\']([^"\']*)["\']' with open('wsproto/__init__.py', 'r') as f: text = f.read() match ...
Python
0
@@ -1194,17 +1194,17 @@ thon :: -2 +3 ',%0A @@ -1245,58 +1245,11 @@ :: -2.7',%0A 'Programming Language :: Python :: 3 +3.5 ',%0A @@ -1284,33 +1284,33 @@ :: Python :: 3. -5 +6 ',%0A 'Prog
9bc56a273804cf48a282b266d8206179f7b09ede
include all files on install and some minor fixes
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages setup( name = "django-blocks", version = "1.0", packages = find_packages(), author = "Helder Rossa", author_email = "kimus.linuxus@gmail.com", description = "An easier way to build Web apps more quickly and with almost no code.", license = "MI...
Python
0
@@ -15,16 +15,26 @@ python%0A +import os%0A from set @@ -57,23 +57,129 @@ etup -, find_packages +%0A%0A# allow setup.py to be run from any path%0Aos.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) %0A%0A%0As @@ -244,23 +244,46 @@ s = -find_packages() +%5B'blocks'%5D,%0A%09include_pack...
04c21325c15a7100b4bce154e06d6eda8b468778
Fix 'TypeError: a bytes-like object is required, not 'str'' issue
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from setuptools import setup, find_packages import skeppa if sys.argv[-1] == "publish": os.system("python setup.py sdist upload") sys.exit() package_exclude = ("tests*", "examples*") packages = find_packages(exclude=package_exclude) # Han...
Python
0.003112
@@ -1178,17 +1178,17 @@ sifiers= -( +%5B %0A @@ -1854,13 +1854,13 @@ n%22,%0A -) +%5D ,%0A)%0A
02d942410d2976bf7c597d6002e6325dc4a3365b
add request to the template environment
pygreen.py
pygreen.py
#! /usr/bin/python # PyGreen # Copyright (c) 2013, Nicolas Vanhoren # # Released under the MIT license # # 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 with...
Python
0
@@ -3793,16 +3793,39 @@ =pygreen +,request=bottle.request )%0A
427292a82aea2a2291833ca0cb3f30cee2afd497
Fix NR deploy notification bug
ixdjango/management/commands/newrelic_notify_deploy.py
ixdjango/management/commands/newrelic_notify_deploy.py
""" Management command to enable New Relic notification of deployments .. moduleauthor:: Infoxchange Development Team <development@infoxchange.net.au> """ import os from subprocess import call, Popen, PIPE from django.conf import settings from django.core.management.base import NoArgsCommand class Command(NoArgsC...
Python
0
@@ -758,32 +758,49 @@ ername.strip()%0A%0A + try:%0A ini_file @@ -816,13 +816,9 @@ iron -.get( +%5B 'NEW @@ -840,25 +840,35 @@ ILE' -,%0A +%5D%0A except KeyError:%0A @@ -875,22 +875,26 @@ - +ini_file = setting @@ -911,17 +911,16 @@ C_CONFIG -) %0A%...
35d5cd0115e76f7df93735f31641656bcbac1f4f
Save particle evolution to disk.
examples/unpFromLattice.py
examples/unpFromLattice.py
import uci.BorisUpdater as BorisUpdater import uci.CoulombAcc as CoulombAcc import uci.Ptcls as Ptcls import numpy as np import pyopencl as cl import pyopencl.array as cl_array # Some helpful constants. fund_charge = 1.602176565e-19 # Mass of Sr88 ions. atomic_unit = 1.66053892e-27 ion_mass = 87.9056 * atomic_unit ...
Python
0
@@ -348,17 +348,17 @@ wells = -1 +5 0%0An_ions @@ -1050,10 +1050,8 @@ = 3 -00 .0%0Ae @@ -1958,10 +1958,112 @@ 0e-1 -2%0A +1%0Anum_steps = 100%0Afor i in range(100):%0A np.save('ptcls' + str(i) + '.npy',ptcls.ptclList%5B0:3,:%5D)%0A upda @@ -2133,12 +2133,37 @@ dt, - 1)%0A +%0A 100)%0A...
b039f26ada3bff7ba10937405874ba3dec3002d1
Update Crossmatch to Merge with Clobbering
flexget/plugins/filter/crossmatch.py
flexget/plugins/filter/crossmatch.py
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import logging from flexget import plugin from flexget.event import event log = logging.getLogger('crossmatch') class CrossMatch(object): """ Perform action based on...
Python
0
@@ -2566,21 +2566,122 @@ -entry.update( +for key in generated_entry:%0A if key not in entry:%0A entry%5Bkey%5D = gene @@ -2691,17 +2691,21 @@ ed_entry -) +%5Bkey%5D %0A
153955d3c8ca8db233c073f4f3288efd2a16c828
Update nessus_invoker.py
Nessus/nessus_invoker.py
Nessus/nessus_invoker.py
/*Copyright 2017 Uha Durbha * *Licensed under the Apache License, Version 2.0 (the "License"); *you may not use this file except in compliance with the License. *You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * *Unless required by applicable law or agreed to in writing, softwar...
Python
0
@@ -1,10 +1,66 @@ /* + ===================================================%0A * Copyrigh @@ -77,19 +77,22 @@ Durbha%0A + *%0A -* + * Licensed @@ -147,17 +147,19 @@ ense%22);%0A -* + * you may @@ -215,17 +215,19 @@ icense.%0A -* + * You may @@ -262,13 +262,13 @@ at%0A + *%0A -* +* htt @@ -311,...
ad7a2145fc479507d9b721af482ce78274418cb3
Refactor require.system.locales(): remove duplication
fabtools/require/system.py
fabtools/require/system.py
""" System settings =============== """ from re import escape from fabric.api import settings, warn from fabric.contrib.files import append, uncomment from fabtools.files import is_file, watch from fabtools.system import ( UnsupportedFamily, distrib_family, distrib_id, get_hostname, set_hostname, get...
Python
0.000113
@@ -2471,124 +2471,55 @@ -missing = set(names) - set(%5Bname for name, _ in supported%5D)%0A if missing:%0A raise UnsupportedLocales(missing +_check_for_unsupported_locales(names, supported )%0A%0A @@ -3098,49 +3098,136 @@ d = -%5Bname for +supported_locales()%0A _check_for_unsupported_locales( ...
e9be2b95cfb5999d5a9f89eb5db14828a09e2604
Remove unused import
fabtools/require/system.py
fabtools/require/system.py
""" System settings =============== """ from __future__ import with_statement from re import escape from fabric.api import warn, shell_env from fabric.contrib.files import append, uncomment from fabtools.files import is_file, watch from fabtools.system import ( distrib_family, distrib_id, get_hostname, set_h...
Python
0.000001
@@ -126,19 +126,8 @@ warn -, shell_env %0Afro
35623660535c7955818022be26d0d0f28a37be48
Return ordered plugins
feincms2_content/models.py
feincms2_content/models.py
""" This is the core of FeinCMS All models defined here are abstract, which means no tables are created in the feincms\_ namespace. """ from __future__ import unicode_literals from collections import defaultdict import operator from django.db import models from django.utils.encoding import python_2_unicode_compatib...
Python
0.000001
@@ -320,60 +320,8 @@ ble%0A -from django.utils.functional import cached_property%0A %0A%0Acl @@ -2191,29 +2191,124 @@ ttr( -self, region.name, c) +%0A self,%0A region.name,%0A sorted(c, key=operator.attrgetter('ordering')))%0A %0A
8f2115a1515e651ed1b91dfad21540cab2e8634d
Add tax type label to the order receipt. Closes #194.
cartridge/shop/templatetags/shop_tags.py
cartridge/shop/templatetags/shop_tags.py
from __future__ import unicode_literals from future.builtins import str from decimal import Decimal import locale import platform from django import template from cartridge.shop.utils import set_locale register = template.Library() @register.filter def currency(value): """ Format a value as currency acc...
Python
0
@@ -1111,102 +1111,52 @@ Add -%60%60item_total%60%60, %60%60shipping_total%60%60, %60%60discount_total%60%60, %60%60tax_total%60%60,%0A and %60%60order_ +shipping/tax/discount/order types and total -%60%60 +s to @@ -1167,16 +1167,20 @@ template +%0A context @@ -1189,16 +1189,36 @@ Use the +context's c...
6d1dc290ec02f756d83ed7f0a69070943e273c5f
Fix api time format
frontend/app/blueprints/analytics.py
frontend/app/blueprints/analytics.py
from flask import Blueprint from flask import request, abort, jsonify import model.analytics as analytics from playhouse.shortcuts import model_to_dict import config analytic_api = Blueprint('analytic_api', __name__) PageViewTable, UserTable = analytics.initialize(config.settings['MYSQL_DB'], config.settings['MYSQL_U...
Python
0.001577
@@ -1144,16 +1144,47 @@ iew.date +.strftime('%25B %25d, %25Y %25H:%25M:%25S') )%0A re
72ad6a987923c75ea97119dc4238d7d832c596a3
Update AudioCapture.py
service/AudioCapture.py
service/AudioCapture.py
from org.myrobotlab.service import Runtime from org.myrobotlab.service import AudioCapture from time import sleep audiocapture = Runtime.createAndStart("audiocapture","AudioCapture") #it starts capturing audio audiocapture.captureAudio() # it will record for 5 seconds sleep(5) #then it stops recording audio audiocaptur...
Python
0
@@ -1,157 +1,591 @@ -from org.myrobotlab.service import Runtime%0Afrom org.myrobotlab.service import AudioCapture%0Afrom time import sleep%0Aaudiocapture = Runtime.createAndStart(%22 +audiocapture = Runtime.createAndStart(%22audiocapture%22,%22AudioCapture%22)%0A#it starts capturing audio%0Aaudiocapture.captureAudio()%...
312b0745b52145ba4fd378447affc04bca0db8d2
fix test imports
tests.py
tests.py
""" Clipy YouTube video downloader test suite """ from __future__ import absolute_import, print_function, unicode_literals import curses import asyncio import unittest import pyperclip import clipy.ui class ClipyUITest(unittest.TestCase): def setUp(self): def main(stdscr): self.stdscr = st...
Python
0.000001
@@ -47,82 +47,8 @@ %22%22%22%0A -from __future__ import absolute_import, print_function, unicode_literals%0A%0A impo @@ -120,18 +120,41 @@ t clipy. -ui +panel%0Aimport clipy.window %0A%0A%0Aclass @@ -292,18 +292,22 @@ = clipy. -ui +window .DetailW @@ -350,18 +350,22 @@ = clipy. -ui +window .ListWin @@ -399,34 +...
658745b45ae46753b3894edc011947c8092f96a9
Update motion_sensor.py
src/motion_sensor.py
src/motion_sensor.py
#!/usr/bin/python import RPi.GPIO as GPIO import time INPUT_PIN = 7 SLEEP_TIME_SECONDS = .1 class MotionSensorTimeoutException(Exception): pass class MotionSensor(): def __init__(self, input_pin=INPUT_PIN): self.input_pin = input_pin GPIO.setmode(GPIO.BOARD) GPIO.setup(input_pin, GP...
Python
0
@@ -12,16 +12,1091 @@ python%0A%0A +'''%0AMIT License%0ACopyright (c) 2016 Joshua Palmer%0APermission is hereby granted, free of charge, to any person obtaining a copy%0Aof this software and associated documentation files (the %22Software%22), to deal%0Ain the Software without restriction, including without limitation...
a1c319f28b0c3cbc73ceedcfee82bff5f1bdb9ab
test annotation
tests.py
tests.py
import unittest import markdown import alignment_extension import graph_com_ann_extension import highlight_extension from markdown.extensions.toc import TocExtension import re class TestMarkdown(unittest.TestCase): md = None def setUp(self): graph_com_ann_ext = graph_com_ann_extension.Extensions(Fals...
Python
0.000002
@@ -3461,16 +3461,194 @@ div%3E')%0A%0A + def test_annotation(self):%0A text = '@%5Btext%5D'%0A self.assertEqual(self.md.convert(text), '%3Cdiv%3E%3Chr /%3E%5Cn%3Cp%3E%3Cstrong%3EAnnotation:%3C/strong%3E text%3C/p%3E%5Cn%3Chr /%3E%5Cn%3C/div%3E')%0A%0A %0A%0A%0A# dul
0c1aed5f16c62e7234e38ddda84156c71bab1d64
remove workaround for unsupported older pybind11
src/pikepdf/codec.py
src/pikepdf/codec.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2017, James R. Barlow (https://github.com/jbarlow83/) import codecs from typing import Container, Opti...
Python
0
@@ -1970,21 +1970,8 @@ ad'%0A - try:%0A @@ -2029,626 +2029,8 @@ er)%0A - except RuntimeError as e: # pragma: no cover%0A # In pybind11 %3C 2.7.0, a RuntimeError occurs when attempting to handle%0A # Unicode surrogates. Looks like:%0A # %22Unable to extract string contents! (enc...
180a587d69fa8c1c57073f18589623a57dfce62d
Update eval harness integration for versioning (#20)
train.py
train.py
import argparse import json import time import numpy as np import wandb from tqdm import tqdm from mesh_transformer.build_model import build_model from lm_eval import evaluator, tasks from tasks.eval_harness import EvalHarnessAdaptor from tfrecord_loader import TFRecordNewInputs import multiprocessing def parse_arg...
Python
0
@@ -5423,25 +5423,93 @@ results -.items(): +%5B%22results%22%5D.items():%0A version = results%5B%22versions%22%5D%5Btask_name%5D %0A @@ -5612,16 +5612,27 @@ sk_name%7D +-v%7Bversion%7D /%7Bmetric
1b8ad8da3d42b38ef1a2a6bbcc156e8fc820db0c
add dbaccessor to get full reverse indices from a list of case ids
corehq/ex-submodules/casexml/apps/case/dbaccessors/related.py
corehq/ex-submodules/casexml/apps/case/dbaccessors/related.py
from casexml.apps.case.sharedmodels import CommCareCaseIndex def get_indexed_case_ids(domain, case_ids): """ Given a base list of case ids, gets all ids of cases they reference (parent cases) """ from casexml.apps.case.models import CommCareCase keys = [[domain, case_id, 'index'] for case_id in ca...
Python
0
@@ -1,28 +1,63 @@ +from collections import namedtuple%0A from casexml.apps.case.share @@ -89,16 +89,16 @@ seIndex%0A - %0A%0Adef ge @@ -674,276 +674,80 @@ -from casexml.apps.case.models import CommCareCase%0A keys = %5B%5Bdomain, case_id, 'reverse_index'%5D for case_id in case_ids%5D%0A return %5Br%5B'va...
8229d3130e3008eac6e5579407a075b59ce8ffe3
fix NoneType not iterable if followers is None
src/request/tasks.py
src/request/tasks.py
import logging from datetime import datetime import pytz from typing import Optional from dateutil.relativedelta import relativedelta from celery import shared_task from community.models import Community from request.twitter_request import get_incoming_friendship from request.models import Queue from moderation.models ...
Python
0.999976
@@ -5529,20 +5529,19 @@ -if userid in +followers = upd @@ -5666,21 +5666,258 @@ lowers%22%0A - ) +%0A if not followers:%0A followers = update_social_ids(%0A user=userid,%0A cached=True,%0A bot_screen_name=username,%0A relationship=%22followers%22%0A ...
9d7fb3d40774a9e87162918b13aff884997663da
Add a few nocoverage pragmas for pypy dependent code.
reg/arginfo.py
reg/arginfo.py
from __future__ import unicode_literals import inspect def arginfo(callable): """Get information about the arguments of a callable. Returns a :class:`inspect.ArgSpec` object as for :func:`inspect.getargspec`. :func:`inspect.getargspec` returns information about the arguments of a function. argin...
Python
0
@@ -2557,16 +2557,38 @@ pass + # pragma: nocoverage %0A%0A%0Aclass @@ -3241,24 +3241,46 @@ e_empty_init + # pragma: nocoverage %0A return @@ -3402,32 +3402,54 @@ AttributeError: + # pragma: nocoverage %0A return
643a6a039238f51252dc4163373e41bed1e374ec
Improve readability of problem test
picoCTF-web/functional_tests/test_problem_workflow.py
picoCTF-web/functional_tests/test_problem_workflow.py
""" Functional tests regarding solving problems. """ import pytest import time import api from common import * from api.common import safe_fail, WebException, InternalException from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.webdriver.common.by import By from sele...
Python
0.00007
@@ -2155,17 +2155,17 @@ abs the -p +# id from @@ -2175,19 +2175,22 @@ -pid +target = probl @@ -2255,16 +2255,63 @@ target%22) +%0A%0A # remove the %22#%22%0A pid = target %5B1:%5D%0A%0A
7e3a2017d103e7efe9bfff790fb298a7e1568433
Add test that uses MHT instead of DPCT for exclusion constraints
tests/core/test_conflictingsegmentations.py
tests/core/test_conflictingsegmentations.py
import logging from hytra.core.ilastik_project_options import IlastikProjectOptions from hytra.core.conflictingsegmentsprobabilitygenerator import ConflictingSegmentsProbabilityGenerator from hytra.core.ilastikhypothesesgraph import IlastikHypothesesGraph from hytra.core.fieldofview import FieldOfView import dpct def...
Python
0
@@ -301,19 +301,185 @@ iew%0A -import dpct +%0Atry:%0A import multiHypoTracking_with_cplex as mht%0Aexcept ImportError:%0A try:%0A import multiHypoTracking_with_gurobi as mht%0A except ImportError:%0A mht = None%0A %0A%0Ade @@ -4472,16 +4472,730 @@ == 2)%0A%0A + # use multiHypoTracking, in...
2555d56010df92a4a76e56522e9576cfb0e5446b
Remove junk and fix wrong method name
test/functional/test_dhcp.py
test/functional/test_dhcp.py
# Copyright 2012 Midokura Japan KK import os import sys import unittest from webob import exc TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), os.pardir, os.pardir, os.pardir)) sys.path.insert(...
Python
0.000008
@@ -1076,88 +1076,19 @@ est_ -list(self):%0A self.bridge.list(self.test_tenant_name)%0A%0A def test_ create +_list _get
f6f9ce94c33ad959cfd3f9cbb1b19e8bff17126d
Fix python object searilization problem in yaml
solar/solar/utils.py
solar/solar/utils.py
import io import glob import yaml import logging import os from uuid import uuid4 from jinja2 import Template logger = logging.getLogger(__name__) def create_dir(dir_path): logger.debug(u'Creating directory %s', dir_path) if not os.path.isdir(dir_path): os.makedirs(dir_path) def yaml_load(file_pa...
Python
0.999505
@@ -445,16 +445,21 @@ rn yaml. +safe_ dump(yam
35f90d10e215e73f4959dc9cb70ee06ccf96aeb5
Fix characters for json output
sonarwan/sonarwan.py
sonarwan/sonarwan.py
import pyshark import time import json import sys from logger import logger from environment import Environment from models import AppLess, DeviceLess, ServiceLess import utils import errors from tools import main_tools class SonarWan(object): def __init__(self, arguments): self.arguments = arguments ...
Python
0.999912
@@ -6388,14 +6388,14 @@ s=(' -: +, ', ' -, +: '))%0A
377abb226943566747ff3952be20d64aed4e0975
make compatible with expect_many() fix
tests/twisted/tubes/accept-muc-dbus-tube.py
tests/twisted/tubes/accept-muc-dbus-tube.py
import dbus from servicetest import assertEquals, assertNotEquals, call_async, EventPattern from gabbletest import exec_test, acknowledge_iq, make_muc_presence import constants as cs from twisted.words.xish import xpath import ns from mucutil import join_muc_and_check def test(q, bus, conn, stream, access_control):...
Python
0.000001
@@ -2962,16 +2962,33 @@ _changed +1, names_changed2 , presen @@ -3168,16 +3168,117 @@ _TUBE),%0A + EventPattern('dbus-signal', signal='DBusNamesChanged', interface=cs.CHANNEL_TYPE_DBUS_TUBE),%0A @@ -4227,16 +4227,141 @@ _changed +1.args%0A assertEquals(%7Bbob_handle: bob_bus_name%7D, added)%0A ...
bef1a3311d1bee0597690a7e7b7c0024ac499463
update test
test/on_yubikey/test_fido.py
test/on_yubikey/test_fido.py
import unittest from ykman.util import TRANSPORT from .util import (DestructiveYubikeyTestCase, missing_mode, ykman_cli) @unittest.skipIf(*missing_mode(TRANSPORT.U2F)) class TestFidoFunctions(DestructiveYubikeyTestCase): def test_fido_set_pin(self): output = ykman_cli('--log-level', 'DEBUG', 'fido', 'inf...
Python
0.000001
@@ -281,32 +281,8 @@ cli( -'--log-level', 'DEBUG', 'fid
d0fd16baa30e972e32fde6561ff9c4bd0bd2bd3d
removed erroneous "lazy"
test/orm/poly_linked_list.py
test/orm/poly_linked_list.py
import testbase from sqlalchemy import * class PolymorphicCircularTest(testbase.ORMTest): keep_mappers = True def define_tables(self, metadata): global Table1, Table1B, Table2, Table3, Data table1 = Table('table1', metadata, Column('id', Integer, primary_key=True), ...
Python
0.981975
@@ -2857,19 +2857,8 @@ ata) -, lazy=lazy )%0A @@ -6909,8 +6909,9 @@ e.main() +%0A
e055bf11abb78919a4a4dc08a40cfc9a0a209656
fix credentials retrieval from xml file
UI/utilities/account_manager.py
UI/utilities/account_manager.py
import xml.etree.cElementTree as ET class AccountManager: def __init__(self, login_email=None, password=None): self.login_email = login_email self.password = password def save_account_credentials(self): root = ET.Element("account") doc = ET.SubElement(root, "credentials") ...
Python
0
@@ -673,37 +673,34 @@ et = -etree +ET .parse(%22storj_ac @@ -863,33 +863,46 @@ print %22 -Unspecified error +Error in Account Manager login %22%0A%0A @@ -1105,37 +1105,34 @@ et = -etree +ET .parse(%22storj_ac @@ -1265,33 +1265,53 @@ print %22 -Unspecified err +Error in Account Mana...
07227f2d7d6a10511481ecd44e220019cfad979f
Add initial test for WordSet class
test/test_cognon_extended.py
test/test_cognon_extended.py
# Copyright 2013 Pau Haro Negre # based on C++ code by Carl Staelin Copyright 2009-2011 # # See the NOTICE file distributed with this work for additional information # regarding copyright ownership. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance wit...
Python
0
@@ -809,16 +809,52 @@ ort Word +%0Afrom cognon_extended import WordSet %0A%0Afrom n @@ -1369,16 +1369,148 @@ fset)%0A%0A%0A +class TestWordSet:%0A%0A def test_empty(self):%0A ws = WordSet()%0A eq_(len(ws.words), 0)%0A eq_(len(ws.delays), 0)%0A%0A%0A class Te
a36b612cc8065c9cff5af93989fa37150759d1a1
Update pickling tests to made them fail
test/test_sqlalchemy_json.py
test/test_sqlalchemy_json.py
import pickle import sys import pytest from sqlalchemy import ( Column, ForeignKey, Integer, Text, create_engine, ) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from sqlalchemy_json import ( MutableJson, NestedMutableDict, NestedMutab...
Python
0
@@ -2504,24 +2504,110 @@ %5B5, 6, 7%5D%7D)%0A + %0A # Force _parents WeakKeyDict creation%0A one._parents%0A two._parents%0A %0A one_relo
572dff2273532a39d797a63008522fd632c62a3b
fix unit tests.
testcube/tests/test_utils.py
testcube/tests/test_utils.py
from django.test import TestCase as TC from testcube.utils import * class ModelsTestCase(TC): def setUp(self): pass def test_get_domain(self): assert get_domain() == 'company.com' Configuration.objects.create(key='domain', value='my.com') assert get_domain() == 'my.com' ...
Python
0
@@ -33,16 +33,51 @@ as TC%0A%0A +from testcube.core.models import *%0A from tes
78c298e56355033561b2749421d7613dd8838df7
Fix test to test Norway fix (#2626)
tests/components/test_sun.py
tests/components/test_sun.py
"""The tests for the Sun component.""" # pylint: disable=too-many-public-methods,protected-access import unittest from unittest.mock import patch from datetime import timedelta, datetime import homeassistant.core as ha import homeassistant.util.dt as dt_util import homeassistant.components.sun as sun from tests.commo...
Python
0
@@ -3420,16 +3420,19 @@ dt_util. +utc now',%0A
0fd626f0e78b80deee11a56a594bad22d848ad19
Add test to test request_user_link view
gallery/tests/test_view.py
gallery/tests/test_view.py
from django.test import TestCase from django.test.client import Client from mock import patch from signup import models as signup_api from gallery import models as gallery_api @patch('signup.models.sequence_model.get_current_sequence_number', lambda: 1) class ViewTest(TestCase): SIGNUP_DATA = { 'email':...
Python
0.000001
@@ -1409,16 +1409,371 @@ os), 0)%0A +%0A%0A @patch('gallery.emails.mailgun.api.send_mass_email')%0A def test_request_user_link(self, patcher):%0A signup = signup_api.create_signup(**self.SIGNUP_DATA)%0A c = Client()%0A resp = c.post('/gallery/request_link/', self.BIO_DATA, follow=True)%0A ...
00fe3d6944f91d52b24d0f59cc9a4dd83be99bcf
Validate sample weight with check_sample weight in kernel_ridge (#16154)
sklearn/kernel_ridge.py
sklearn/kernel_ridge.py
"""Module :mod:`sklearn.kernel_ridge` implements kernel ridge regression.""" # Authors: Mathieu Blondel <mathieu@mblondel.org> # Jan Hendrik Metzen <jhm@informatik.uni-bremen.de> # License: BSD 3 clause import numpy as np from .base import BaseEstimator, RegressorMixin, MultiOutputMixin from .metrics.pairwi...
Python
0
@@ -418,21 +418,8 @@ port - check_array, che @@ -470,16 +470,38 @@ s_fitted +, _check_sample_weight %0A%0A%0Aclass @@ -6000,19 +6000,28 @@ t = +_ check_ -array +sample_weight (sam @@ -6036,23 +6036,9 @@ ht, -ensure_2d=False +X )%0A%0A
e771ae7cba6bca2082dbfd000f6726f53e6f7eb1
bump version
snortunsock/__init__.py
snortunsock/__init__.py
__author__ = 'John Lin' __author_email__ = 'linton.tw@gmail.com' __license__ = 'Apache License 2.0' __url__ = 'https://github.com/John-Lin/snortunsock' __version__ = '0.0.2'
Python
0
@@ -164,11 +164,11 @@ = '0.0. -2 +3 '%0A
118829c3c6cfb062cbc446065e628e0e2624777b
Remove redundant function
social/author/models.py
social/author/models.py
from django.db import models from django.contrib.auth.models import User from django.conf import settings import socket from django.db.models import Q import uuid; from .utils import can_view_post, can_view_feed # Create your models here. class Author(models.Model): genderChoices = ( ('M', 'male'), ...
Python
0.999981
@@ -2178,80 +2178,8 @@ f)%0A%0A - def friendRequests(self):%0A return get_friend_requests(self)%0A%0A
5dfcd4e8cea8d821d2476700f2c661c27cae3557
make CI pass for now
packages/python/plotly/plotly/tests/test_core/test_px/test_pandas_backend.py
packages/python/plotly/plotly/tests/test_core/test_px/test_pandas_backend.py
import plotly.express as px import numpy as np import pandas as pd import pytest @pytest.mark.parametrize( "pandas_fn,px_fn", [ (lambda df: df.plot(), px.line), (lambda df: df.plot.scatter("A", "B"), lambda df: px.scatter(df, "A", "B"),), (lambda df: df.plot.line(), px.line), (...
Python
0
@@ -76,16 +76,164 @@ ytest%0A%0A%0A +@pytest.mark.skipif(%0A not hasattr(pd.options.plotting, %22backend%22),%0A reason=%22Currently installed pandas doesn't support plotting backends.%22,%0A)%0A @pytest.
6fe3ae841b9e4a51c4fba798a308d26ee27c760e
make sure we import _ to translate
addons/website_crm/controllers/main.py
addons/website_crm/controllers/main.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import babel from datetime import datetime, timedelta from odoo import http from odoo.http import request from odoo.addons.website.controllers.backend import WebsiteBackend from odoo.tools import DEFAULT_SERVER_DATETIM...
Python
0
@@ -169,16 +169,19 @@ ort http +, _ %0Afrom od
54d452662b92786ab706d97a1075512b6bfd2201
delete print for test
sony_camera_liveview.py
sony_camera_liveview.py
from sony_camera_api import sony_api import json import urllib2 import socket # Common Header # 0--------1--------2--------+--------4----+----+----+----8 # |0xFF |payload | sequence number | Time stamp | # | |type | | | # +------------------------------------------...
Python
0.000001
@@ -2405,26 +2405,8 @@ 16)%0A -%09print start_code%0A %09if @@ -2763,16 +2763,18 @@ payload_header%0A +%0A%0A
3fc20d745ee67e4784645f27ec433fd0c7f9ae61
fix errors
amnesia/modules/account/views/login.py
amnesia/modules/account/views/login.py
# -*- coding: utf-8 -*- from marshmallow import ValidationError from pyramid.httpexceptions import HTTPFound from pyramid.security import remember from pyramid.view import view_defaults from pyramid.view import view_config from amnesia.utils.forms import render_form from amnesia.modules.account.validation import Lo...
Python
0.000014
@@ -948,32 +948,76 @@ def post(self):%0A + params = self.request.POST.mixed()%0A%0A try:%0A @@ -1025,22 +1025,20 @@ -result +data = Login @@ -1055,33 +1055,14 @@ oad( -self.request.POST.mixed() +params )%0A @@ -1134,35 +1134,30 @@ : self.form( -result.data +params , error.mess @@ -...
b0d5c88ce1a72df5a7cd5ad478d9dc72f51b1a72
remove unused module
amnesia/modules/document/views/crud.py
amnesia/modules/document/views/crud.py
# -*- coding: utf-8 -*- import logging from marshmallow import ValidationError from pyramid.view import view_config from pyramid.httpexceptions import HTTPFound from amnesia.modules.folder import FolderEntity from amnesia.modules.document import Document from amnesia.modules.document import DocumentEntity from amne...
Python
0.000002
@@ -308,62 +308,8 @@ ity%0A -from amnesia.modules.document import DocumentResource%0A from
cef9cf8c7830c0596194820109fc12d1ecc871f5
Fix after merge
tasks/DynamoTable.py
tasks/DynamoTable.py
from Task import Task import os.path import yaml import botocore import name_constructor import time import sys class DynamoTable(Task): """Create or remove a table by yaml definition file""" known_params = { 'name': 'name of the table to be created or removed', 'source': 'full name of the file with the de...
Python
0.000002
@@ -356,16 +356,17 @@ on.yml)' +, %0A 'st
da3c7132f5baef052c290cf0e70587ca05e96443
Bump version to 0.7.0-alpha-3
tcconfig/__init__.py
tcconfig/__init__.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ VERSION = "0.7.0-alpha-2"
Python
0.000001
@@ -104,7 +104,7 @@ pha- -2 +3 %22%0A
9bdd0d5189b3f81183869bf678836631f85c2ca4
send notif only if it is an insert not an update
telepathy/signals.py
telepathy/signals.py
import models from notify.models import PreNotification from django.core.urlresolvers import reverse def thread_save(**kwargs): assert kwargs['sender'] == models.Thread thread = kwargs['instance'] #TODO: use truncate instead of str[:N] PreNotification.objects.create( node=thread, text=...
Python
0
@@ -168,16 +168,46 @@ Thread%0A%0A + if kwargs%5B'created'%5D:%0A thre @@ -226,24 +226,28 @@ 'instance'%5D%0A + #TODO: u @@ -277,24 +277,28 @@ str%5B:N%5D%0A + + PreNotificat @@ -317,32 +317,36 @@ create(%0A + node=thread,%0A @@ -346,24 +346,28 @@ ad,%0A + +...
fcbe586511c9182792f56f31b7237c7e51aaf922
Add middleware logging statements
falcon_stats/middleware.py
falcon_stats/middleware.py
import logging from datetime import datetime from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from .models import (IP, URI, Base, ContentType, Method, ReqRespInfo, Status, UserAgent, get_or_create) logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) ...
Python
0.000001
@@ -335,16 +335,22 @@ T = %22%22%22%0A +-----%0A Date: %7Bd @@ -410,25 +410,8 @@ od%7D%0A -Scheme: %7Bscheme%7D%0A URI: @@ -531,26 +531,13 @@ us%7D%0A -Success: %7Bsuccess%7D +----- %0A%22%22%22 @@ -646,16 +646,92 @@ debug:%0A + logger.debug(%22Using MySQL connection at %25s%22, kwargs%5B%22db_addr%2...
7c3a8555b89cc3a45a43ccb10d22dd5dd7d66218
Add try/except to BEST and WORST constants
feedback/surveys/models.py
feedback/surveys/models.py
# -*- coding: utf-8 -*- from feedback.database import ( Column, db, Model ) from feedback.surveys.constants import ( ROLES, PURPOSE, ROUTES, BEST, WORST ) class Stakeholder(Model): ''' Stakeholder model - each field contains a string of e-mails separated by commas. ''' __tablename__ = 'sta...
Python
0.000004
@@ -1979,32 +1979,49 @@ role_en(self):%0A + try:%0A return R @@ -2035,16 +2035,71 @@ lf.role%5D +%0A except KeyError:%0A return self.route %0A%0A @p @@ -2286,84 +2286,45 @@ -if self.best_other is None:%0A return BEST%5Bself.best%5D%0A else: +return ge...
910e8b9264d8cfeed294b767cdbd6efcc23562b5
Remove some dead code
feincms_oembed/contents.py
feincms_oembed/contents.py
import json from django.core.exceptions import ValidationError from django.db import models from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from feincms_oembed.models import CachedLookup class OembedContent(models.Model): """ Content type for integ...
Python
0.00075
@@ -1667,122 +1667,8 @@ s)%0A%0A - if 'parameters' in dir(self) and self.parameters:%0A params.update(json.loads(self.parameters))%0A%0A
14201e82c77ae8ff9c5554eb00c384e927a4f296
use messaging for admin publish success/error #37
findingaids/admin/views.py
findingaids/admin/views.py
from django.shortcuts import render_to_response from django.template import RequestContext import os import glob from datetime import datetime from django.conf import settings from eulcore.django.existdb.db import ExistDB def main(request): """ Main admin page. List recently modified files in configured s...
Python
0
@@ -84,16 +84,134 @@ Context%0A +from django.contrib import messages%0Afrom django.core.urlresolvers import reverse%0Afrom django.http import HttpResponse%0A import o @@ -332,16 +332,118 @@ ExistDB +%0Afrom eulcore.xmlmap.core import load_xmlobject_from_file%0Afrom findingaids.fa.models import FindingAid %0A%0Adef...
ed7a135125d704bec9c8a02067c3aaceae68b042
remove "formats"
flask_admin/form/fields.py
flask_admin/form/fields.py
import time import datetime from wtforms import fields, widgets from flask.ext.admin.babel import gettext from flask.ext.admin._compat import text_type, as_unicode from . import widgets as admin_widgets __all__ = ['DateTimeField', 'TimeField', 'Select2Field', 'Select2TagsField'] class DateTimeField(fields.DateTimeF...
Python
0.998452
@@ -530,30 +530,16 @@ at=None, - formats=None, widget_
4eb9cb10943e1b1b25aa1fa89686d3fa41d535b8
Make CACHE_KEY_PREFIX work for RedisCache. It is available for Werkzeug >= 0.8.1.
flaskext/cache/backends.py
flaskext/cache/backends.py
from werkzeug.contrib.cache import (NullCache, SimpleCache, MemcachedCache, GAEMemcachedCache, FileSystemCache) def null(app, args, kwargs): return NullCache() def simple(app, args, kwargs): kwargs.update(dict(threshold=app.config['CACHE_THRESHOLD'])) return SimpleCache...
Python
0
@@ -1325,16 +1325,142 @@ ssword%0A%0A + key_prefix = app.config.get('CACHE_KEY_PREFIX')%0A if key_prefix:%0A kwargs%5B'key_prefix'%5D = key_prefix%0A%0A
13a26fce9640122006e7c4bd7ea35eb40ed78f67
Remove unused import
renamer.py
renamer.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import click import os import shutil from utils import TempDir @click.command() @click.argument('path', type=click.Path(exists=True, file_okay=False)) @click.option('--start', type=click.IntRange(min=0), prompt=True) def renamer(path, start): files = sorted([f for f ...
Python
0.000001
@@ -67,22 +67,8 @@ os%0A -import shutil%0A from
81e35474a8a05e8ef1fe34abd104695489d5a9ae
handle missing field in input file
renamer.py
renamer.py
#!/usr/bin/env python3 # 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 and the following disclaimer. # # 2. Redistri...
Python
0
@@ -3566,16 +3566,128 @@ errno)%0A%0A +except ValueError:%0A print(%22ERROR!%22)%0A print(%22Missing field in %7B%7D file%22.format(args.file))%0A sys.exit(1)%0A%0A # Print
5ccbec054c01cda00f3b4ef94c393f57c5bafb42
Tidy up FlaskMustache class
flask_mustache/__init__.py
flask_mustache/__init__.py
# flask-mustache Flask plugin import os from jinja2 import Template from flask import current_app class FlaskMustache(object): "Wrapper to inject Mustache stuff into Flask" def __init__(self, app=None, configure_jinja=True): self._configure_jinja = configure_jinja self.app = app if a...
Python
0.000001
@@ -94,16 +94,46 @@ nt_app%0A%0A +__all__ = ('FlaskMustache',)%0A%0A class Fl @@ -238,80 +238,10 @@ None -, configure_jinja=True):%0A self._configure_jinja = configure_jinja +): %0A @@ -386,38 +386,44 @@ -if self._configure_jinja:%0A +# set up global %60mustache%60 function%0A @@ -469,16 +...
890c9878fcef52cf6cf5c17fa0824068b1cfbda4
Allow GLTrace to workaround some PyOpenGL bugs.
src/GLTrace.py
src/GLTrace.py
# The Vision Egg: GLTrace # # Copyright (C) 2001-2004 Andrew Straw # Copyright (C) 2004 California Institute of Technology # # Author: Andrew Straw <astraw@users.sourceforge.net> # URL: <http://www.visionegg.org/> # # Distributed under the terms of the GNU Lesser General Public License # (LGPL). See LICENSE.TXT that ca...
Python
0.000032
@@ -4352,16 +4352,494 @@ tr_name%0A + if not hasattr(gl,'GL_CLAMP_TO_EDGE'):%0A # XXX This hack requires opengl %3E= 1.2. See Core.py for more info.%0A globals()%5B'GL_CLAMP_TO_EDGE'%5D = 0x812F%0A if hasattr(gl,'glActiveTexture'):%0A # XXX Another, similar hack.%0A globals()%5B'glAct...
d61027f18f1e1b5317ad4f43c5edbf1b63d7bea8
Fix for issue #309.
flopy/mf6/modflow/mfgwf.py
flopy/mf6/modflow/mfgwf.py
# DO NOT MODIFY THIS FILE DIRECTLY. THIS FILE MUST BE CREATED BY # mf6/utils/createpackages.py from .. import mfmodel from ..data.mfdatautil import ListTemplateGenerator, ArrayTemplateGenerator class ModflowGwf(mfmodel.MFModel): """ Modflowgwf defines a gwf model Parameters ---------- ...
Python
0
@@ -4608,35 +4608,42 @@ self.name_file. -lis +print_inpu t.set_data(print @@ -4666,36 +4666,43 @@ self.name_file. -list +print_flows .set_data(print_ @@ -4724,36 +4724,42 @@ self.name_file. -list +save_flows .set_data(save_f @@ -4780,36 +4780,45 @@ self.name_file. -list +newtonoptions .set_data(newton @@ -4...
1873f8eca4ff96ff987d50e119882bfee363d0b4
return better Changes and support test=True
salt/states/nfs_export.py
salt/states/nfs_export.py
# -*- coding: utf-8 -*- ''' Management of NFS exports =============================================== To ensure an NFS export exists: .. code-block:: yaml add_simple_export: nfs_export.present: - name: '/srv/nfs' - hosts: '10.0.2.0/24' - options: 'rw' For more complex expo...
Python
0.999382
@@ -1373,16 +1373,177 @@ in old:%0A + if __opts__%5B'test'%5D:%0A ret%5B'comment'%5D = 'Export %7B0%7D would be removed'.format(path)%0A ret%5B'result'%5D = None%0A return ret%0A%0A @@ -1581,24 +1581,24 @@ orts, path)%0A - ret%5B @@ -1671,26 +1671,26 @@ e...
7a0ec66727644e26948d237e62c3ed69c47931bc
Update main.py
src/client/main.py
src/client/main.py
#!/usr/bin/env python from __future__ import print_function if __name__ == "__main__": print("Hello Client")
Python
0.000001
@@ -55,16 +55,57 @@ nction%0A%0A +def main():%0A%09print(%22Running main loop%22)%0A%0A if __nam @@ -143,11 +143,46 @@ o Client +!%22)%0A%09main()%0A%09print(%22Goodbye Client! %22)%0A
622967954d3813f6b40c4fdb869becbf663733d1
Fix global import cards
api/management/commands/importcards.py
api/management/commands/importcards.py
# -*- coding: utf-8 -*- from api.management.commands.importbasics import * from api.management.commands.importcardstats import importcardstats from api.management.commands.import_jp_events import import_jp_events from api.management.commands.import_en_events import import_en_events from api.management.commands.import_w...
Python
0.000001
@@ -420,96 +420,8 @@ ese%0A -from api.management.commands.import_transparent_images import import_transparent_images%0A from
97c200c3b242b8794b14642099ba51e0085b0ff2
Remove debugging lines
regparser/eregs_index.py
regparser/eregs_index.py
"""The eregs_index directory contains the output for many of the shell commands. This module provides a quick interface to this index""" import os from lxml import etree ROOT = ".eregs_index" class Path(object): """Encapsulates access to a particular directory within the index""" def __init__(self, *dirs):...
Python
0.000033
@@ -880,68 +880,8 @@ e()%0A - print self.path%0A print os.listdir(self.path)%0A
f27ba20590e8a2b1d14e1506fbec48996de5ac62
Make `swift_module_alias` propagate an ObjC provider.
swift/internal/swift_module_alias.bzl
swift/internal/swift_module_alias.bzl
# Copyright 2018 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
Python
0.000001
@@ -2442,24 +2442,111 @@ res,%0A )%0A%0A + objc_fragment = (ctx.fragments.objc if toolchain.supports_objc_interop else None)%0A%0A compile_ @@ -3071,24 +3071,63 @@ nfiles_dir,%0A + objc_fragment = objc_fragment,%0A )%0A%0A r @@ -5467,16 +5467,24 @@ %5B%22swift%22 +, %22objc%22 %5D,%0A i...
d71b5207d7ae22a26006b6e4f67e9e3ee0200a77
Update plot history.
spam/common/utils.py
spam/common/utils.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import matplotlib.pyplot as plt from sklearn.cross_validation import train_test_split from spam.common.collections import Dataset, Data def split_dataset(x, y, seed=0): """ Split the dataset into unlabel, train, and test sets. """ # split the data into label an...
Python
0
@@ -40,16 +40,31 @@ -8 -*-%0A%0A +import random%0A%0A import m @@ -867,14 +867,8 @@ eta( -self, data @@ -1935,16 +1935,59 @@ history%0A + plt.figure(random.randint(a=1, b=100))%0A plt.
dafbab65d487b27da91a9c1f8ea595344ab40da6
Add redaction to foirequest feed description
froide/foirequest/feeds.py
froide/foirequest/feeds.py
import re from django.conf import settings from django.contrib.syndication.views import Feed from django.utils.feedgenerator import Atom1Feed from django.utils.translation import ugettext_lazy as _ from django.urls import reverse from django.shortcuts import get_object_or_404 from .models import FoiRequest from .filt...
Python
0
@@ -3411,16 +3411,29 @@ _or_404( +%0A FoiReque @@ -3458,16 +3458,78 @@ lic=True +,%0A visibility=FoiRequest.VISIBLE_TO_PUBLIC%0A )%0A%0A d @@ -3734,16 +3734,20 @@ ean(obj. +get_ descript @@ -3741,32 +3741,34 @@ .get_description +() )%0A%0A def items
2de4a2e3ddc304cbc6e68cd8ccfda75d06ef9514
Add related_name to part_of field
froide/georegion/models.py
froide/georegion/models.py
from django.utils.translation import ugettext_lazy as _ from django.contrib.gis.db import models class GeoRegion(models.Model): name = models.CharField(_('Name'), max_length=255) slug = models.SlugField(_('Slug'), max_length=255) description = models.TextField(blank=True) kind = models.CharField(_('...
Python
0.000001
@@ -1541,16 +1541,44 @@ ank=True +, related_name='sub_regions' %0A )%0A%0A @@ -1751,8 +1751,263 @@ elf.pk)%0A +%0A def get_all_sub_regions(self):%0A def get_subregions(region):%0A for sub_region in region.sub_regions.all():%0A yield sub_region%0A yield from get_s...
0c3c5750c878927ac7521bca11ef82dd8fa6dbc6
Add instructions to tackerclient
tackerclient/tacker/v1_0/vm/device.py
tackerclient/tacker/v1_0/vm/device.py
# # Copyright 2013 Intel # Copyright 2013 Isaku Yamahata <isaku.yamahata at intel com> # <isaku.yamahata at gmail com> # 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 m...
Python
0.000012
@@ -5934,32 +5934,83 @@ tachInterface):%0A + %22%22%22Attach a network interface to a server.%22%22%22%0A%0A def call_api @@ -6150,24 +6150,77 @@ Interface):%0A + %22%22%22Detach a network interface from a server.%22%22%22%0A%0A def call
ba022365174ea6037c76e909f05cb0ed5bd4addb
Set raster plotter in __init__.py
spectral/__init__.py
spectral/__init__.py
######################################################################### # # spectral/__init__.py - This file is part of the Spectral Python (SPy) # package. # # Copyright (C) 2001-2010 Thomas Boggs # # Spectral Python is free software; you can redistribute it and/ # or modify it under the terms of t...
Python
0.000017
@@ -1699,16 +1699,57 @@ ypylab%0D%0A + spectral.settings.viewer = graphics%0D%0A except:%0D