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
49f68d89d28650609e92db515063d3847d614eb8
use isotropic sigma
tests/mesh/test_cylMeshInnerProducts.py
tests/mesh/test_cylMeshInnerProducts.py
from SimPEG import Mesh import numpy as np import sympy from sympy.abc import r, t, z import unittest TOL = 1e-1 class CylInnerProducts_Test(unittest.TestCase): def test_FaceInnerProduct(self): # Here we will make up some j vectors that vary in space # j = [j_r, j_z] - to test face inner products...
Python
0.000004
@@ -481,18 +481,18 @@ %5B -54 +10 0/sympy. @@ -542,10 +542,10 @@ , -54 +10 0/sy @@ -562,9 +562,9 @@ z)** -4 +2 %5D,%0A @@ -1932,16 +1932,19 @@ %3C TOL)%0A%0A +%0A%0A%0A if __nam
5912b58233a795d5c6e6a377441c609f15634cb0
Add 'warning' as an alias to 'warn'
oslo/messaging/notify/notifier.py
oslo/messaging/notify/notifier.py
# Copyright 2011 OpenStack Foundation. # All Rights Reserved. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licens...
Python
0.998216
@@ -7289,24 +7289,44 @@ d, 'WARN')%0A%0A + warning = warn%0A%0A def erro
490230242d51d23650406085a7af92dfbb14c16d
Use shop ID from order
byceps/blueprints/shop/orders/views.py
byceps/blueprints/shop/orders/views.py
""" byceps.blueprints.shop.orders.views ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from flask import abort, g from ....services.party import service as party_service from ....services.shop.order import service as order_service f...
Python
0
@@ -1963,33 +1963,11 @@ ons( -shop.id, order.order_numb +ord er)%0A @@ -2031,27 +2031,11 @@ ons( -shop_id, order_numb +ord er): @@ -2065,16 +2065,22 @@ p', str( +order. shop_id) @@ -2108,24 +2108,30 @@ er_number': +order. order_number
652711e9a4884a31be74df6ae791e47dcd401871
remove deprecated test suite declarations
account_partner_required/tests/__init__.py
account_partner_required/tests/__init__.py
# -*- encoding: utf-8 -*- ############################################################################## # # Account partner required module for OpenERP # Copyright (C) 2014 Acsone (http://acsone.eu). # @author Stéphane Bidoul <stephane.bidoul@acsone.eu> # # This program is free software: you can redistribu...
Python
0
@@ -1074,71 +1074,4 @@ red%0A -%0Afast_suite = %5B%0A%5D%0A%0Achecks = %5B%0A test_account_partner_required,%0A%5D%0A
76453755c53aeabb082847b4c9635528490a8830
Update states.py
weiss/flows/states.py
weiss/flows/states.py
""" This file defines the concrete control flow logic Author: Ming Fang """ from weiss.flows.abstractState import State, AbstractState from weiss.utils.switch import switch from weiss.dialogue.actions import Action """ Definitions of the system states """ """ Definition of the control flow 1. Next Random Comment 2...
Python
0.998823
@@ -1102,17 +1102,17 @@ eturn St -e +a te.Entit
7706c282758a1fb6f4894993fad007a99879a554
Create score.py
score.py
score.py
""" @authors: Nishanth and Nikhith !! """ from pycricbuzz import Cricbuzz import sys """ Writing a CLI for Live score """ try: cric_obj = Cricbuzz() # cric_obj contains object instance of Cricbuzz Class matches = cric_obj.matches() except: print "Connection dengindi bey!" sys.exit(0) ...
Python
0.000008
@@ -1526,19 +1526,31 @@ sc'%5D)+%22 --%3E + match id : %22+str(ma
c4dd08d0d98ce28dd0f69270bae398b1b0ea293f
Fix mkdocs attr
momo/plugins/mkdocs.py
momo/plugins/mkdocs.py
import os import shutil import yaml from momo.utils import run_cmd, mkdir_p, utf8_encode, txt_type from momo.plugins.base import Plugin class Mkdocs(Plugin): mkdocs_configs = { 'theme': 'readthedocs', } momo_configs = { 'page_level': 1, } def setup(self): configs = self.se...
Python
0.000007
@@ -29,16 +29,28 @@ rt yaml%0A +import glob%0A from mom @@ -960,16 +960,228 @@ ite_dir) +%0A css_files = glob.glob(os.path.join(self.mkdocs_dir, '*.css'))%0A for css in css_files:%0A filename = os.path.basename(css)%0A os.symlink(css, os.path.join(self.docs_dir, filename)) %0A%0A...
a0fcd2a8986573b72871b7c04629c9e947997658
Fix docstring
tests/mock_vws/test_database_summary.py
tests/mock_vws/test_database_summary.py
""" Tests for the mock of the database summary endpoint. """ from datetime import datetime, timedelta import pytest import requests from freezegun import freeze_time from requests import codes from requests_mock import GET from tests.conftest import VuforiaServerCredentials from tests.mock_vws.utils import is_valid_...
Python
0.00003
@@ -4064,16 +4064,17 @@ is se +n t, no er @@ -4091,16 +4091,151 @@ urned.%0A%0A + If the date header is more than five minutes before or after the%0A request is sent, a %60FORBIDDEN%60 response is returned.%0A%0A
55983401814bc0e7158d213885ebdfdbc7e02e9b
Add dependency on the requests module and refactor
DeployUtil/authentication.py
DeployUtil/authentication.py
import urllib.request import http.cookiejar import DeployUtil.toolsession as session #TODO: give an indicator of success #TODO: handle errors a bit better. def do_pair(ip, pin, **_args): # IF YOU DON'T DO THIS OVER HTTPS YOU WILL GET 308s to goto HTTPS scheme = 'https://' port = '' api = '/api/authorize/pair?pin=...
Python
0.000001
@@ -4,30 +4,24 @@ ort -urllib. request +s %0Aimport http @@ -20,61 +20,10 @@ ort -http.cookiejar%0Aimport DeployUtil.toolsession as sessi +js on%0A%0A @@ -192,16 +192,205 @@ o HTTPS%0A +%09# But we cannot verify our HTTPS cert yet because we cannot get it off%0A%09# of all devices.%0A%09# If the tooling gets ...
40957fe0b273f92a28e0b5f27cc4a46ba5e1f2b8
Add coverage pragma
sktracker/trajectories/__init__.py
sktracker/trajectories/__init__.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function import logging log = logging.getLogger(__name__) from .trajectories import Trajectories try: from . import draw __all__ = ['Trajectorie...
Python
0.000003
@@ -262,16 +262,36 @@ es%0A%0Atry: + # pragma: no cover %0A fro @@ -364,16 +364,36 @@ rtError: + # pragma: no cover %0A log
0610cebeccbd8431906558506ba22654e1104ea9
fix test
corehq/ex-submodules/couchexport/tests/test_writers.py
corehq/ex-submodules/couchexport/tests/test_writers.py
# coding: utf-8 from codecs import BOM_UTF8 import StringIO from couchexport.writers import ZippedExportWriter, CsvFileWriter, PythonDictWriter from django.test import SimpleTestCase from mock import patch, Mock class ZippedExportWriterTests(SimpleTestCase): def setUp(self): self.zip_file_patch = patch...
Python
0.000002
@@ -510,32 +510,78 @@ dExportWriter()%0A + self.writer.archive_basepath = 'path'%0A self.wri
92ebaf9e1507acf1fc10f4448fc00db43508f23b
Allow alternate string key lookup for enums
djstripe/enums.py
djstripe/enums.py
from enum import Enum as _Enum from django.utils.decorators import classproperty class Enum(_Enum): @classproperty def choices(cls): return tuple((k, v.value) for k, v in cls.__members__.items()) class CardTokenizationMethod(Enum): apple_pay = "Apple Pay" android_pay = "Android Pay"
Python
0
@@ -158,17 +158,34 @@ tuple(( -k +cls.keys.get(k, k) , v.valu @@ -225,16 +225,329 @@ ems())%0A%0A + @classproperty%0A def keys(cls):%0A # Returns a mapping of key overrides.%0A # This allows using syntactically-incorrect values as keys,%0A # such as keywords (%22pass%22) or spaces (%22Din...
eadfd0c784d077db4b48facb5e7161c76ede598a
remove commented out code
graphitepager/worker.py
graphitepager/worker.py
import datetime import time import redis import requests import requests.exceptions from graphitepager.config import get_config from graphitepager.description import get_descriptions from graphitepager.description import missing_target_descriptions from graphitepager.graphite_data_record import GraphiteDataRecord fro...
Python
0
@@ -3326,63 +3326,8 @@ ts:%0A - # print 'Checking', (name, target)%0A @@ -3585,83 +3585,8 @@ t))%0A - # else:%0A # print 'Seen', (name, target)%0A
b02323eb57b99ede10549a82fc9c6443095c093d
fix max line error
accelerator_abstract/models/base_business_proposition.py
accelerator_abstract/models/base_business_proposition.py
import swapper from django.db import models from accelerator_abstract.models.accelerator_model import AcceleratorModel EXCLUDED_FIELDS = ['id', 'created_at', 'updated_at', 'startup', 'applications'] PAIN_POINT_HELP_TEXT = ('Please describe what ' 'problem you are trying to solve?') SOLUTION_H...
Python
0.000005
@@ -589,16 +589,39 @@ society. +'%0A ' What me @@ -712,16 +712,39 @@ missions +'%0A ' removed
758a2c8e91651f087c0ebadaa55c1456c59609df
remove some logging
interpreter.py
interpreter.py
import parser, compiler, bytecode, objects, errors, prelude class Interpreter(object): def __init__(self): self.last_bc = '' self.context = compiler.Context() self.import_prelude() def import_prelude(self): index = self.context.register_variable("print") self.conte...
Python
0.000002
@@ -1538,24 +1538,25 @@ +# print %22(arg
ec5cc5d30b50e12c2e11f6206c220b4f2731e352
implement class
pgmapcss/misc/pgcache.py
pgmapcss/misc/pgcache.py
class PGCache: def __init__(self, id, read_id=False, read_geo=False): global PGCaches try: PGCaches except: PGCaches = {} PGCaches[id] = self def add(self, data, id=None, geo=None): pass def get(self, id=None): pass def query(se...
Python
0.000001
@@ -200,147 +200,2144 @@ elf%0A -%0A def add(self, data, id=None, geo=None):%0A pass%0A%0A def get(self, id=None):%0A pass%0A%0A def query(self, qry):%0A pass + self.id = id%0A self.read_id = read_id%0A self.read_geo = read_geo%0A self.cache_id = len(PGCaches)%...
1f2c7f1123762e2f45b9e9ed707e6839c0246ec4
Revert "model is required for collection since now"
mongoext/collection.py
mongoext/collection.py
from __future__ import absolute_import import pymongo import mongoext.cursor import mongoext.scheme class Collection(object): CONNECTION = None DATABASE = None KEYS_COMPRESSION = None NAME = None def __init__(self, model): self.model = model self.__pymongo_collection = None ...
Python
0
@@ -235,24 +235,29 @@ (self, model +=None ):%0A s
6094b147dccc4abf3ef23d5e54b1e23a955d6ecb
remove prints
slider/templatetags/slider_tags.py
slider/templatetags/slider_tags.py
# -*- coding: utf-8 -*- from django import template from slider.models import SliderImage register = template.Library() @register.assignment_tag def get_slider_images(limit=False, randomize=True, slider=1): qs = SliderImage.objects.filter(is_visible=True,slider=slider) print randomize if randomize: ...
Python
0.000012
@@ -278,29 +278,8 @@ %0A - print randomize%0A%0A
267fafde515cea4663a3c08ca433ee11cc9c2f79
Add retry & timeout in pipeline tests Problem: Test failure happens when try to get source code provider config before they are created for a new project
tests/integration/suite/test_pipeline.py
tests/integration/suite/test_pipeline.py
import pytest from .pipeline_common import MockGithub from .conftest import ProjectContext, rancher MOCK_GITHUB_PORT = 4016 MOCK_GITHUB_HOST = "localhost:4016" MOCK_GITHUB_REPO_URL = 'https://github.com/octocat/Hello-World.git' MOCK_GITHUB_USER = 'octocat' GITHUB_TYPE = 'github' @pytest.fixture(scope="module") def m...
Python
0.000002
@@ -7,16 +7,28 @@ pytest%0A +import time%0A from .pi @@ -4236,144 +4236,53 @@ -client = user_pc.client%0A configs = client.list_source_code_provider_config()%0A gh = None%0A for c in configs:%0A if c.type == +gh = get_source_code_provider_config(user_pc, %22gi @@ -4300,36 +4300,17 @@ eConfig...
2378a64ab1e106c8f6f455a9023d350eaf627767
add manual
oa_manual.py
oa_manual.py
from collections import defaultdict from time import time from util import elapsed # things to set here: # license, free_metadata_url, free_pdf_url # free_fulltext_url is set automatically from free_metadata_url and free_pdf_url def get_overrides_dict(): override_dict = defaultdict(dict) # cindy wu ex...
Python
0
@@ -1987,16 +1987,198 @@ anual%22%0A%0A + # not indexing this location yet, from @rickypo%0A override_dict%5B%2210.1207/s15327957pspr0203_4%22%5D%5B%22free_pdf_url%22%5D = %22http://www2.psych.ubc.ca/~schaller/528Readings/Kerr1998.pdf%22%0A%0A retu
8206ea76804cf08298eeab8673b2326440aa8663
check for existing bonds before drawing
orbis/gui/sketchpad.py
orbis/gui/sketchpad.py
import matplotlib import matplotlib.patches import numpy import wx from plots import Plot #==================================================================================== class SketchPad(Plot): """sketch pad for drawing molecules""" ATOM_RADIUS = 0.1 PICK_TOLERANCE = 5 #--------------------...
Python
0
@@ -547,32 +547,596 @@ equal%22)%0A +self.up_atom = None%0A self.down_atom = None%0A #---------------------------------------------------------------------------%0A def on_button_down(self,event):%0A super(SketchPad,self).on_button_down(event)%0A self.down_atom = self.atom_at_event_p...
f6740a7b2662ce8ad4112757663cf0e4ab184394
convert all sample fields to their respective types
rowprocsv.py
rowprocsv.py
""" Module for reading and exporting csv files exported from Concept2 RowPro """ import datetime import tcx class RowProCSV: HEADER_SUMMARY = 'Date,TotalTime,TotalDistance,' FIELDS_SUMMARY = [ 'date', 'total_time', 'total_distance', 'avg_pace', 'unit', 'origin', 'total_cals', 'duty_cycle', 'type', ...
Python
0.002177
@@ -507,16 +507,26 @@ PLES = %5B +%0A ( 'time_ms @@ -532,84 +532,227 @@ s', -'distance', 'pace', 'watts', 'cals', 'spm', 'hr', 'duty_cycle', 'rowfile_id' +int),%0A ('distance', float),%0A ('pace', float),%0A ('watts', float),%0A ('cals', float),%0A ('spm', int),%0A (...
d3d9e0f5c0da8408bcdb241509cb7dd1f41fd4bd
use hash when title not present
src/you_get/extractors/imgur.py
src/you_get/extractors/imgur.py
#!/usr/bin/env python from ..common import * from ..extractor import VideoExtractor from .universal import * class Imgur(VideoExtractor): name = "Imgur" stream_types = [ {'id': 'original'}, {'id': 'thumbnail'}, ] def prepare(self, **kwargs): if re.search(r'imgur\.com/a/', sel...
Python
0.000083
@@ -2308,24 +2308,41 @@ age%5B'title'%5D + or image%5B'hash'%5D %0A%0A def ex
c55f21aa4925f6227086dedca2a3f839db98d8e1
implement unit tests for debug command
tests/lib/cmdline/commands/test_debug.py
tests/lib/cmdline/commands/test_debug.py
# Copyright 2015 Curtis Sand # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Python
0.000005
@@ -582,24 +582,29 @@ unittest +.mock import skip%0A%0Aim @@ -595,20 +595,21 @@ import -skip +patch %0A%0Aimport @@ -857,183 +857,939 @@ -@skip('NI')%0A def test_print_state(self):%0A pass%0A%0A @skip('NI')%0A def test_interactive(self):%0A pass%0A%0A @skip('NI')%0A def test_...
ecdcfe6d3e5f076f92b38b4a76d2975bce2bc4a2
add -b and -sp
rna_tools/tools/md/rna_minimize.py
rna_tools/tools/md/rna_minimize.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ """ from __future__ import print_function from simtk.openmm.app import * from simtk.openmm import * from simtk.unit import * from sys import stdout import argparse def get_parser(): parser = argparse.ArgumentParser( description=__doc__, formatter_class=arg...
Python
0.000004
@@ -43,16 +43,19 @@ -*-%0A%22%22%22%0A +ddd %0A%22%22%22%0Afro @@ -90,30 +90,24 @@ nction%0Afrom -simtk. openmm.app i @@ -119,22 +119,16 @@ *%0Afrom -simtk. openmm i @@ -144,13 +144,14 @@ rom -simtk +openmm .uni @@ -200,16 +200,64 @@ rgparse%0A +from rna_tools.tools.mq.lib.timex import timex%0A%0A %0Adef ...
482f9ffaf1c2998fafc924a91b07656d3c054c91
fix string
bin/extract_darkmatter.py
bin/extract_darkmatter.py
#!/usr/bin/env python import argparse import leveldb import os import shutil import sys from Bio import SeqIO def main(args): parser = argparse.ArgumentParser(description="Script to extract darkmatter - predicted proteins with no similarities") parser.add_argument("-i", "--input", dest="input", help="Name of ...
Python
0.999999
@@ -1256,17 +1256,19 @@ rts%5B0%5D, -1 +%22X%22 )%0A %0A
75b56a313dda12299f8283016a584e1d455567ee
remove ignored radius_units from glyphs.py example
examples/glyphs/glyphs.py
examples/glyphs/glyphs.py
import numpy as np from bokeh.models import ColumnDataSource, DataRange1d, Plot, LinearAxis, Grid from bokeh.models.widgets import VBox, Tabs, Panel from bokeh.models.glyphs import (AnnularWedge, Annulus, Arc, Bezier, Circle, Line, MultiLine, Oval, Patch, Patches, Quad, Quadratic, Ray, Rect, Segment, Square, Wedge...
Python
0
@@ -2739,29 +2739,8 @@ 0.1, - radius_units=%22data%22, fil
a8ad980a0e06550b4051b67c0834349bad54de5a
Remove wrong __all__ variable from api module.
pyssh/api.py
pyssh/api.py
# -*- coding: utf-8 -*- import ctypes import ctypes.util __all__ = ['library'] def load_library(): libpath = ctypes.util.find_library('ssh') libssh = ctypes.CDLL(libpath) return libssh SSH_OK = 0 SSH_ERROR = -1 SSH_AGAIN = -2 SSH_EOF = -127 SSH_OPTIONS_HOST = 0 SSH_OPTIONS_PORT = 1 SSH_OPTIONS_PORT_S...
Python
0
@@ -56,31 +56,8 @@ il%0A%0A -__all__ = %5B'library'%5D%0A%0A %0Adef
929ce25d9097fa29766575bbd354aeb5633b20a4
rename some methods that got missed
dnstest_checks.py
dnstest_checks.py
""" Logic for checking desired DNS configuration against actual configuration on prod and test servers. """ from dnstest_dns import DNStestDNS class DNStestChecks: config = None DNS = None def __init__(self, config): """ init """ self.config = config self.DNS =...
Python
0.000001
@@ -1701,25 +1701,24 @@ changed_name -s (self, n, ne @@ -3728,17 +3728,16 @@ ded_name -s (self, n
b49f22af96644daa67c8d75881f59edd98b652b0
Fix import broken by s/html/serialization
kraken/transcrib.py
kraken/transcrib.py
# -*- coding: utf-8 -*- # # Copyright 2015 Benjamin Kiessling # # 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.000001
@@ -802,20 +802,29 @@ kraken. -html +serialization import
19d5d98350c8ef6f8e3d9153a899a6ce466e5e21
Rename `UserOwnedModelManager` to just `UserOwnedManager` for consistency with Django naming convention. Replace `_for_user` methods with methods that override the base manager methods - this should help enforce a user context for models, and implement initial set of method overrides in this manner.
owned_models/models.py
owned_models/models.py
from django.conf import settings from django.db import models class UserOwnedModelManager(models.Manager): def filter_for_user(self, user, *args, **kwargs): return super(UserOwnedModelManager, self).get_queryset().filter(user = user, *args, **kwargs) def get_for_user(self, user, *args, **kwargs): ...
Python
0
@@ -77,61 +77,519 @@ nedM +anager(m odel +s. Manager -(models.Manager):%0A%0A def filter_for_user +):%0A %22%22%22%0A Wraps standard Manager query methods and adds a required %60user%60 argument, to enforce all calls%0A made through this manager to be made within a user context.%0A %22%22%22%0A%0A ...
aa6b1daedbd911c23857033bcc601bdae37627f0
Fix the Stream wrapping class. It had moved from elsewhere, but wasn't corrected for its new home in util.py
subversion/bindings/swig/python/svn/util.py
subversion/bindings/swig/python/svn/util.py
# # svn.util: public Python interface for miscellaneous bindings # # Subversion is a tool for revision control. # See http://subversion.tigris.org for more information. # # ==================================================================== # Copyright (c) 2000-2001 CollabNet. All rights reserved. # # This software...
Python
0.999587
@@ -688,16 +688,129 @@ ####%0A#%0A%0A +# to retain backwards Python compat, we don't use 'import foo as bar'%0Aimport string%0A_string = string%0Adel string%0A%0A # bring @@ -1600,21 +1600,16 @@ data = -util. svn_stre @@ -1630,21 +1630,16 @@ stream, -util. SVN_STRE @@ -1731,16 +1731,17 @@ return +_ string...
b41ad87d9cb941abce185d367c973e0a3f2802cb
Update flaskext sqlalchemy module import.
pystil/db.py
pystil/db.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 by Florian Mounier, Kozea # This file is part of pystil, licensed under a 3-clause BSD license. from flaskext.sqlalchemy import SQLAlchemy from datetime import timedelta from sqlalchemy import func, desc from sqlalchemy.orm import column_property from s...
Python
0
@@ -170,12 +170,9 @@ lask -ext. +_ sqla
893e5986fa3c14d28abd729f4dc4cc0d4107a850
fix test_get_result
tests/test_agent/test_http_api_state.py
tests/test_agent/test_http_api_state.py
# No shebang line, this module is meant to be imported # # Copyright 2014 Oliver Palmer # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
Python
0.000026
@@ -5718,16 +5718,35 @@ rtEqual( +%0A dumps( loads(re @@ -5764,23 +5764,75 @@ en%5B0%5D), -expected_data +sort_keys=True),%0A dumps(expected_data, sort_keys=True) )%0A
0606c70c29cec7025e322726b1559b7a3f4360f3
Remove resolution filter from Easynews search
stagehand/searchers/easynews.py
stagehand/searchers/easynews.py
import os import urllib import logging import re import asyncio from bs4 import BeautifulSoup from ..config import config from ..toolbox import dateutils from ..toolbox.net import download from .base import SearcherBase, SearchResult, SearcherError from .easynews_config import config as modconfig __all__ = ['Searche...
Python
0
@@ -2260,24 +2260,103 @@ 00M'%0A + # XXX: easynews doesn't support HEVC so remove resolution filtering.%0A # res = '1x54 @@ -2384,16 +2384,33 @@ else '' +%0A res = '' %0A%0A @@ -4826,8 +4826,9 @@ s.tmpl') +%0A
be10731cab38445a3d1c3a6df3703fba3fecc93f
Fix accessing argv
examples/move-by-label.py
examples/move-by-label.py
#!/usr/bin/env python """ Example script to move torrents based on their label set in ruTorrent. ./move-by-label.py USERNAME HOSTNAME [PATH] """ from __future__ import print_function from time import sleep import sys from xirvik.client import ruTorrentClient USERNAME = sys.argv[1] HOST = sys.arg[2] try: PATH = s...
Python
0.000006
@@ -292,16 +292,17 @@ sys.arg +v %5B2%5D%0Atry:
b2fd88546c73e4aadb0e697233a7bfd20398e429
Check the PBS_NUM_NODES environment variable first when auto_npar = True.
sshcustodian/vasp/sshjobs.py
sshcustodian/vasp/sshjobs.py
# File: sshcustodian/vasp/sshjobs.py # -*- coding: utf-8 -*- from __future__ import unicode_literals, division """ """ import os import shutil import math from pymatgen.io.vasp import Incar from pymatgen.io.smart import read_structure from pymatgen.io.vasp.sets import MPVaspInputSet from custodian.vasp.interpreter...
Python
0
@@ -2710,11 +2710,11 @@ try -sge +pbs env @@ -2767,133 +2767,532 @@ # -(since multiprocessing counts cores on the current machine only)%0A ncores = os.environ.get('NSLOTS') or +try sge environment variable second%0A # Note!%0A # multiprocessin...
44804828d9c0e3afa08f28e5e90e3b3674adb9e5
fix namespace issues with mdps dict
tests/test_sim_setup/test_simulation.py
tests/test_sim_setup/test_simulation.py
"""This contains a set of tests for paratemp.sim_setup.Simulation""" ######################################################################## # # # This script was written by Thomas Heavey in 2018. # # theavey@bu.edu tho...
Python
0
@@ -2092,52 +2092,8 @@ n)%0A%0A - @pytest.fixture%0A def mdps(self):%0A @@ -2131,28 +2131,24 @@ /minim.mdp'%0A - equil_md @@ -2184,28 +2184,24 @@ il.mdp'%0A - - prod_mdp = ' @@ -2231,28 +2231,24 @@ od.mdp'%0A - - mdps = dict( @@ -2304,20 +2304,16 @@ - produc...
6ece7062e539e2196ff04c49f07913c884907878
rearrange lines to make colors to player map clear
run-relax.py
run-relax.py
#!/usr/bin/env python import sys import time from Mindwave.mindwave import BluetoothHeadset, FakeHeadset # Note: on OS X, BluetoothHeadset will not work from parameters import SharedParameters from threads import HeadsetThread from gameplay import GameObject from game_effects import generate_player_renderer from contr...
Python
0
@@ -1069,16 +1069,162 @@ DDRESS)%0A + yellowish = %5B1.0, 0.84, 0.28%5D%0A greenish = %5B0.2, 0.4, 0.%5D%0A renderer_high = generate_player_renderer(shared_params, greenish, yellowish)%0A%0A play @@ -1315,74 +1315,8 @@ SS)%0A -%0A yellowish = %5B1.0, 0.84, 0.28%5D%0A greenish = %5B0.2, 0.4, 0.%5D%...
0f0fc4037997f6ae4eef019547e3c8d8cf05db9c
modify test data
drda/tests/test_derby.py
drda/tests/test_derby.py
############################################################################## # The MIT License (MIT) # # Copyright (c) 2016 Hajime Nakagami # # 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...
Python
0.000006
@@ -1765,210 +1765,343 @@ te(%22 -create table test (s varchar(20), i int, d decimal(18, 2))%22)%0A cur.execute(%22insert into test (s, i, d) values ('abcdefghijklmnopq', 1, 1.1)%22)%0A cur.execute(%22insert into test (s, i, d) values +%22%22%0A CREATE TABLE test (%0A s VARCHAR(...
2ab1c23ca4be991c174514998496ea4f7c8f6c3a
Make indentation consistent with other code
serve.py
serve.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This module serves a WSGI application using werkzeug. Author: Logan Raarup <logan@logan.dk> """ import importlib import os import sys try: from werkzeug import serving except ImportError: # pragma: no cover sys.exit('Unable to import werkzeug (run: pip instal...
Python
0.000144
@@ -894,49 +894,14 @@ - str( host -) ,%0A - @@ -915,31 +915,16 @@ (port),%0A - @@ -933,31 +933,16 @@ gi_app,%0A - @@ -956,39 +956,24 @@ ugger=True,%0A - use_ @@ -999,61 +999,23 @@ - ...
543b1853a5fa9b52c15a67c7a66ee5bd75f5c87c
update cabal project status whenever backend changes
backend_cmds.py
backend_cmds.py
import threading import sublime import sublime_plugin import SublimeHaskell.internals.backend_mgr as BackendManager import SublimeHaskell.internals.utils as Utils import SublimeHaskell.sublime_haskell_common as Common import SublimeHaskell.internals.settings as Settings class SublimeHaskellStartBackend(sublime_plug...
Python
0
@@ -1006,32 +1006,129 @@ elf.busy = False +%0A cabal_project_status(self.window.active_view(), BackendManager.BackendManager()) %0A%0A def is_ena @@ -1897,32 +1897,129 @@ elf.busy = False +%0A cabal_project_status(self.window.active_view(), BackendManager.BackendManager()) %0A%0A ...
89ad9ad4e8d8820b89b65b281375782d80275446
Fix status
aldryn_essential_addons_dashboard/views.py
aldryn_essential_addons_dashboard/views.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json import re from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.views.generic import View from versionfield.version import Version from versionfield.constants import DEFAULT_NUMBER_BITS from ...
Python
0.000001
@@ -2846,18 +2846,8 @@ ta%5B' -matrix'%5D%5B' stat
cdedb1d6875a8ab5f42369b1801a1fc0ee205654
Add option to generate coverage report
run_tests.py
run_tests.py
#!/usr/bin/env python """ Driver script for testing nu-TuLiP. Try calling it with "-h" flag. SCL; 6 May 2013. """ import sys import os.path import nose if __name__ == "__main__": if ("-h" in sys.argv) or ("--help" in sys.argv): print """Usage: run_tests.py [--fast] [OPTIONS...] [[-]TESTFILES...] TE...
Python
0
@@ -97,13 +97,13 @@ CL; -6 May +5 Sep 201 @@ -265,16 +265,26 @@ tests.py + %5B--cover%5D %5B--fast @@ -1019,81 +1019,329 @@ -argv = %5Bsys.argv%5B0%5D%5D%0A if skip_slow:%0A argv.append(%22--attr=!slow%22 +if %22--cover%22 in sys.argv:%0A measure_coverage = True%0A sys.argv.remove(%...
b74d9d3a780082b8cb326a553a9b4c84ca5368be
Add IS_OFFLINE environment variable to serve
serve.py
serve.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This module serves a WSGI application using werkzeug. Author: Logan Raarup <logan@logan.dk> """ import importlib import os import sys try: from werkzeug import serving except ImportError: # pragma: no cover sys.exit('Unable to import werkzeug (run: pip instal...
Python
0
@@ -787,16 +787,55 @@ pass%0A%0A + os.environ%5B'IS_OFFLINE'%5D = 'True'%0A%0A serv
224aa339ee7f1720ebb3616aa62ba06975c1a11d
handle .blend model sources
pak_profiles/common.py
pak_profiles/common.py
#! /usr/bin/env python3 #-*- coding: UTF-8 -*- ### Legal # # Author: Thomas DEBESSE <dev@illwieckz.net> # License: ISC # file_common_deps = { "file_base": "DEPS", "description": "Package DEPS file", "action": "copy", } file_common_external_editor = { "file_ext": [ "xcf", "psd", "ora", ], "description":...
Python
0
@@ -1109,32 +1109,154 @@ on%22: %22copy%22,%0A%7D%0A%0A +file_common_model_source = %7B%0A%09%22file_ext%22: %5B%0A%09%09%22blend%22,%0A%09%5D,%0A%09%22description%22: %22Common Model Source%22,%0A%09%22action%22: %22ignore%22,%0A%7D%0A%0A file_common_text
d8a4d97f97d744be695c911cd16a94b2c95ac76d
allow .5 seconds for all elements to be created before running selenium tests
tests/selenium_tests/jbrowse_selenium.py
tests/selenium_tests/jbrowse_selenium.py
import os import time import unittest from selenium import webdriver from selenium.webdriver import ActionChains from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.support.ui import Select class ...
Python
0
@@ -629,16 +629,40 @@ ) +%0A time.sleep(0.5) %0A%0A ##
52d835ec8a3dfec53c3cab23598be6f63da9addc
Update prims_minimum_spanning.py
algorithms/graph/prims_minimum_spanning.py
algorithms/graph/prims_minimum_spanning.py
import heapq # for priority queue # prim's algo. to find weight of minimum spanning tree def prims(graph): vis=[] s=[[0,1]] prim = [] mincost=0 while(len(s)>0): v=heapq.heappop(s) x=v[1] if(x in vis): continue mincost += v[0] prim.append(x)...
Python
0
@@ -1,8 +1,438 @@ +'''%0AThis Prim's Algorithm Code is for finding weight of minimum spanning tree%0Aof a connected graph.%0AFor argument graph, it should be a dictionary type%0Asuch as%0Agraph = %7B%0A 'a': %5B %5B3, 'b'%5D, %5B8,'c'%5D %5D,%0A 'b': %5B %5B3, 'a'%5D, %5B5, 'd'%5D %5D,%0A 'c': %5B %5B8, 'a'%5D...
0227f7e964dcc1a31b4accc657eb40f78b0282d1
Deal with Django 1.8 deprecation/removal of django.test.simple.
run_tests.py
run_tests.py
#!/usr/bin/env python import os, sys from django.conf import settings import django DIRNAME = os.path.dirname(__file__) if django.VERSION[1] < 4: # If the version is NOT django 4 or greater # then remove the TZ setting. settings.configure(DEBUG=True, DATABASES={ ...
Python
0
@@ -64,16 +64,57 @@ ettings%0A +from django.test.utils import get_runner%0A import d @@ -1785,16 +1785,25 @@ pass%0A%0A +try:%0A from dja @@ -1847,16 +1847,20 @@ eRunner%0A + test_run @@ -1900,16 +1900,105 @@ sity=1)%0A +except ImportError:%0A TestRunner = get_runner(settings)%0A test_runner = Te...
608225fa8a62cb5c0aa42b1a2e371c1e1b731d58
fix bug in GrandPrixWidget
driver27/admin/common.py
driver27/admin/common.py
from django import forms from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from tabbed_admin import TabbedModelAdmin from django.utils.safestring import mark_safe from django.utils.html import format_html from django.utils.encoding import force_text class GrandPrixWidget...
Python
0
@@ -1114,16 +1114,24 @@ _attr = +getattr( grand_pr @@ -1156,19 +1156,27 @@ _circuit -.pk +, 'pk', '') %0A%0A
9e0f62c3eedd2c5376af4178a0ecf529898a041b
Update command doc for open
guild/commands/open_.py
guild/commands/open_.py
# Copyright 2017-2020 TensorHub, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
0
@@ -1501,16 +1501,26 @@ run path + or output .%0A%0A T
3cbe58244ca1f3e4c276623ab345aa3d95c8f925
Save message can show the number of lines written.
szu_ed.py
szu_ed.py
#!/usr/bin/env python3 # # Copyright (c) 2014 the Sanzang Utils authors # # 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...
Python
0
@@ -4768,37 +4768,52 @@ te(' -Saved: ' + table_fpath + '%5Cn' +%22%25s%22 (%25d lines)%5Cn' %25 (table_fpath, len(tab)) )%0A
885489ac23add2cbae8eb5d0215feaf120c42263
Fix bug where years still had brackets around them when importing from imdb
plexlibrary/imdbutils.py
plexlibrary/imdbutils.py
# -*- coding: utf-8 -*- import datetime import requests from lxml import html from utils import add_years class IMDb(object): def __init__(self, tmdb, tvdb): self.tmdb = tmdb self.tvdb = tvdb def _handle_request(self, url): """Stolen from Automated IMDB Top 250 Plex library script b...
Python
0
@@ -1713,34 +1713,48 @@ )%0A el -se +if imdb_years%5Bi%5D :%0A @@ -1772,24 +1772,32 @@ tetime.date( +int(str( imdb_years%5Bi @@ -1801,14 +1801,130 @@ s%5Bi%5D -, +).strip(%22()%22)),%0A 1 +2 , -1 +31)%0A else:%0A date = date...
f25f935c024b243068b42a8da846579fc656982a
Install PhantomJS 1.9.8 from binary download
provision.py
provision.py
import os import sys import logging import platform try: import sh except ImportError: import pbs as sh SUPPORTED_PLATFORMS = { "Ubuntu": [ "trusty", ], } APT_DEPENDENCIES = { "trusty": [ "libffi-dev", "memcached", "rabbitmq-server", "libldap2-dev", ...
Python
0
@@ -557,29 +557,8 @@ t%22,%0A - %22phantomjs%22,%0A @@ -2434,32 +2434,632 @@ _path, **LOUD)%0A%0A + with sh.sudo:%0A PHANTOMJS_PATH = %22/srv/phantomjs%22%0A PHANTOMJS_TARBALL = os.path.join(PHANTOMJS_PATH, %22phantomjs-1.9.8-linux-x86_64.tar.bz2%22)%0A sh.mkdir(%22-p%22, PHANTOMJ...
f12b3f5c5a1409f44fc2acbb54d53fc668028e4a
Set print options for numpy 1.14 to 1.13.
landlab/__init__.py
landlab/__init__.py
#! /usr/bin/env python """The Landlab :Package name: TheLandlab :Release date: 2013-03-24 :Authors: Greg Tucker, Nicole Gasparini, Erkan Istanbulluoglu, Daniel Hobley, Sai Nudurupati, Jordan Adams, Eric Hutton :URL: http://csdms.colorado.edu/trac/landlab :License: MIT """ from __future__ import absolute_import im...
Python
0.000107
@@ -322,16 +322,154 @@ ort os%0A%0A +from numpy import set_printoptions%0Atry:%0A set_printoptions(legacy='1.13')%0Aexcept TypeError:%0A pass%0Afinally:%0A del set_printoptions%0A%0A from ._r
c7ec5792f689e0b9c7324edfd170ec01c85ddb6b
Make sure all editors picks are resaved on edit. Fixes #408
wagtail/wagtailsearch/views/editorspicks.py
wagtail/wagtailsearch/views/editorspicks.py
from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import permission_required from django.contrib import messages from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.utils.translation import ugettext as _ from django.views.decorators.va...
Python
0
@@ -1940,16 +1940,151 @@ er = i%0A%0A + # Make sure the form is marked as changed so it gets saved with the new order%0A form.has_changed = lambda: True%0A%0A
580cdb55be700a981946f1009a10b384f704b1b2
Install git pre-commit hooks in the vm as part of provisioning.
provision.py
provision.py
import os import logging import platform try: import sh except ImportError: import pbs as sh SUPPORTED_PLATFORMS = { "Ubuntu": [ "trusty", ], } APT_DEPENDENCIES = { "trusty": [ "libffi-dev", "memcached", "rabbitmq-server", "libldap2-dev", "redis-ser...
Python
0.000001
@@ -2977,16 +2977,36 @@ tabase() +%0Ash.setup_git_repo() %0A%0Awith s
bcac5b2faf882fda49a3bff7eae147bcb8cbd460
Fix spelling of setup-readme.md
setup.py
setup.py
# -*- coding: utf-8 -*- from __future__ import print_function from os import sys try: from skbuild import setup except ImportError: print('scikit-build is required to build from source.', file=sys.stderr) print('Please run:', file=sys.stderr) print('', file=sys.stderr) print(' python -m pip instal...
Python
0.000008
@@ -451,25 +451,25 @@ ory / %22setup -_ +- readme.md%22).
e6c81b2173fa96d10daad1eb582443184c08889d
Fix log file name
badger/input.py
badger/input.py
# Copyright (C) 2015 SINTEF ICT, # Applied Mathematics, Norway. # # Contact information: # E-mail: eivind.fonn@sintef.no # SINTEF ICT, Department of Applied Mathematics, # P.O. Box 4760 Sluppen, # 7045 Trondheim, Norway. # # This file is part of BADGER. # # BADGER is free software: you can redistribute it and/or modify...
Python
0.000019
@@ -3548,46 +3548,8 @@ g')%0A - log.log_file = args.file + '.log'%0A
caf45bc9d92bb496a3fb32b494db623b5b405208
bump version
picker/__init__.py
picker/__init__.py
VERSION = (0, 4, 0) default_app_config = 'picker.apps.PickerConfig' def get_version(): return '.'.join(map(str, VERSION))
Python
0
@@ -11,9 +11,9 @@ (0, -4 +5 , 0)
2b939c703951c0a7042fa336d9c685c437fb0586
Bump to version 1.2
setup.py
setup.py
"""Setup script for templer.django-project-app""" from setuptools import setup from setuptools import find_packages version = '1.1' setup( name='templer.django-project-app', version=version, description='Templer extension for creating ' 'Django applications within projects.', long_description=open...
Python
0
@@ -123,17 +123,17 @@ on = '1. -1 +2 '%0A%0Asetup
b1501e02a53706c748f3963dd8c6769b1cf62de8
Add temporary wordaround for #12
hangups/conversation.py
hangups/conversation.py
"""Conversation objects.""" import logging from tornado import gen from types import SimpleNamespace from hangups import parsers, exceptions, event, user logger = logging.getLogger(__name__) class Conversation(object): """Wrapper around Client for working with a single chat conversation.""" def __init__(s...
Python
0
@@ -2087,35 +2087,295 @@ -return self._users%5Buser_id%5D +# TODO: Remove this temporary fix. Conversations don't (can't?) know%0A # what users participated in the past and later left the conversation.%0A try:%0A return self._users%5Buser_id%5D%0A except KeyError:%0A ret...
392e2a7905cf6dffe0c3aebe19408ae65a7f1a9e
fix fixeddatateacher docstring
parlai/core/fixed_data_teacher.py
parlai/core/fixed_data_teacher.py
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from .agents import Teache...
Python
0.000002
@@ -3117,16 +3117,21 @@ .receive +_data %60%60 - the
9669a99d1a76f346b2cfb9b4197636ac3142f9d2
Update users table in a batched manner
synapse/storage/schema/delta/30/as_users.py
synapse/storage/schema/delta/30/as_users.py
# Copyright 2016 OpenMarket Ltd # # 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 writin...
Python
0
@@ -1879,20 +1879,20 @@ wned -%5Buser_id%5D = +.setdefault( apps @@ -1900,16 +1900,37 @@ rvice.id +, %5B%5D).append(user_id) %0A%0A fo @@ -1935,22 +1935,23 @@ for -user +as _id, -as +user _id +s in @@ -1961,24 +1961,159 @@ ed.items():%0A + n = 100%0A user_chunks = (user_ids%5Bi:i + 100%5D...
81ae2b03954f4a4ec9d19193cb117d59a4e71f3b
Fix incorrect logging message
blitz/io/client_states.py
blitz/io/client_states.py
__author__ = 'Will Hart' from blitz.constants import * class BaseState(object): """ A base state diagram which provides a few methods - this should not be directly instantiated. All methods return a BaseState derived object which should handle future message processing """ def enter_state(self, ...
Python
0.998716
@@ -2971,35 +2971,34 @@ ng starting. -s en -d_messag +ter_stat e: %22 + state
9bc6607b8349fef43bf219610bd8030e311348ae
Fix too long line
examples/vae/train_vae.py
examples/vae/train_vae.py
#!/usr/bin/env python """Chainer example: train a VAE on MNIST """ from __future__ import print_function import argparse import os import chainer from chainer import training from chainer.training import extensions import numpy as np import net def main(): parser = argparse.ArgumentParser(description='Chainer e...
Python
0.999592
@@ -2461,16 +2461,25 @@ Updater( +%0A train_it @@ -2492,16 +2492,24 @@ timizer, +%0A device= @@ -2521,47 +2521,8 @@ gpu, -%0A los
57bd308348243d77a116f509bc08c264423789d4
Stop failing the build if a dependency has been removed. Review URL: http://codereview.chromium.org/7350
chrome/tools/build/win/dependencies.py
chrome/tools/build/win/dependencies.py
#!/usr/bin/python # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Script to verify a Portable Executable's dependencies. Analyzes the input portable executable (a DLL or an EXE for example), e...
Python
0.000007
@@ -3891,24 +3891,34 @@ ected):%0A +# Setting found_extra @@ -3921,11 +3921,175 @@ tra -= 1 +to 1 causes the build to fail. In some case, some%0A # dependencies are stripped out on optimized build; don't break anything%0A # just for that.%0A found_extra = 0 %0A
da5a05c27f1c19c69ce23f5cd6cd0f09edb9d7f7
Refactor common serializer selection code.
paranuara_api/views.py
paranuara_api/views.py
from rest_framework import viewsets from paranuara_api.models import Company, Person from paranuara_api.serializers import ( CompanySerializer, CompanyListSerializer, PersonListSerializer, PersonSerializer ) class CompanyViewSet(viewsets.ReadOnlyModelViewSet): queryset = Company.objects.all() ...
Python
0
@@ -229,23 +229,165 @@ ass -CompanyViewSet( +MultiSerializerMixin(object):%0A%0A def get_serializer_class(self):%0A return self.serializers%5Bself.action%5D%0A%0A%0Aclass CompanyViewSet(MultiSerializerMixin, view @@ -588,111 +588,51 @@ %7D%0A%0A - def get_serializer_class(self):%0A return self...
a2a849f3d425e9c544a66d2b04ab80555be16add
Fix path error
drivnal/handlers/path.py
drivnal/handlers/path.py
from drivnal.constants import * from drivnal.backup import Client import drivnal.utils as utils from drivnal import server import os import flask @server.app.route('/path', methods=['GET']) @server.app.route('/path/<path:path>', methods=['GET']) def path_get(path=None): path = '/' + (path or '') paths = [] ...
Python
0.000014
@@ -524,16 +524,23 @@ OSError +, error :%0A
9728d151967b6796ef2a34d8a9867fd109fe48f3
remove psutil from setup.py
setup.py
setup.py
# Copyright 2013-2014 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
Python
0.000001
@@ -1075,56 +1075,8 @@ sts%22 -,%0A %22tests_require%22: %5B%22psutil%3E=2.0%22%5D %7D%0A%0Ai @@ -1193,17 +1193,16 @@ quire%22%5D -+ = %5B%22unit
90cec05ed692e9be580d0df6a7738684fe76a6a1
Add print method
publisher.py
publisher.py
#!/usr/bin/python # # Copyright 2014 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 required b...
Python
0.000068
@@ -1706,16 +1706,225 @@ .track%0A%0A + print 'service_account_email: %22%25s%22' %25 service_account_email%0A print 'key_file: %22%25s%22' %25 key_file%0A print 'package_name: %22%25s%22' %25 package_name%0A print 'apk_file: %22%25s%22' %25 apk_file%0A print 'track: %22%25s%22' %25 track%0A%0A f = fi
cc17684b207277028019f6f90f0e101dad766bdf
Add property with list of Stratis block devices to StratisPoolDevice
blivet/devices/stratis.py
blivet/devices/stratis.py
# devices/stratis.py # # Copyright (C) 2020 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the...
Python
0
@@ -2086,24 +2086,145 @@ **kwargs)%0A%0A + @property%0A def blockdevs(self):%0A %22%22%22 A list of this pool block devices %22%22%22%0A return self.parents%5B:%5D%0A%0A @propert
f8ee0fc34d060016f0f601e1d84000b9c612efc6
exclude "abstract" methods from coverage
muninn/storage/base.py
muninn/storage/base.py
import os.path import muninn.util as util class StorageBackend(object): def __init__(self): self.supports_symlinks = False self.global_prefix = '' def get_tmp_root(self, product): if self._tmp_root: tmp_root = os.path.join(self._tmp_root, product.core.archive_path) ...
Python
0
@@ -924,24 +924,44 @@ epare(self): + # pragma: no cover %0A # P @@ -1038,24 +1038,44 @@ xists(self): + # pragma: no cover %0A # C @@ -1177,16 +1177,36 @@ ration): + # pragma: no cover %0A @@ -1283,24 +1283,44 @@ stroy(self): + # pragma: no cover %0A # D @@ -1363,32 +1363,58 @@ e...
5261aa35eb5ab697310efc5bc8b7d11e8655127b
Update project info
setup.py
setup.py
""" setup script for "portal" package for development: python setup.py develop to install: python setup.py install """ from setuptools import setup project = "portal" # maintain long_description as a single long line. # workaround for a bug in pkg_info._get_metadata("PKG-INFO") long_description =\ """Alph...
Python
0
@@ -330,39 +330,38 @@ of the TrueNTH -Central +Shared Services RESTfu @@ -591,13 +591,8 @@ rtal -_demo %22,%0A @@ -619,15 +619,14 @@ NTH -Central +Shared Ser @@ -684,16 +684,22 @@ author=%22 +CIRG, Universi @@ -713,24 +713,63 @@ ashington%22,%0A + author_email=%22truenth-dev@uw.edu%22,%0A classi...
e65790cdab1ed63064ae9c338d5489dfa5d4ab7a
Fix extra new line in setup script
docker/compose/mozdef_bootstrap/files/initial_setup.py
docker/compose/mozdef_bootstrap/files/initial_setup.py
#!/usr/bin/env python # 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) 2014 Mozilla Corporation import argparse from datetime import datetime, timedelt...
Python
0.000001
@@ -998,17 +998,16 @@ rgs()%0A%0A%0A -%0A esserver
fda17500f59f29b754aeddad9a7c4b5b538737a2
Set pool info on the block devices when adding/removing Stratis pool
blivet/devices/stratis.py
blivet/devices/stratis.py
# devices/stratis.py # # Copyright (C) 2020 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the...
Python
0
@@ -4323,32 +4323,565 @@ ool(self.uuid)%0A%0A + def add_hook(self, new=True):%0A super(StratisPoolDevice, self).add_hook(new=new)%0A if new:%0A return%0A%0A for parent in self.parents:%0A parent.format.pool_name = self.name%0A parent.format.pool_uuid = self.uuid...
61d62bca67ff98ce830144d9d0f4d41b3c191289
fix health_check page for azure
open-hackathon-server/src/hackathon/health/health_check.py
open-hackathon-server/src/hackathon/health/health_check.py
# -*- coding: utf-8 -*- # # ----------------------------------------------------------------------------------- # Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this softw...
Python
0
@@ -4014,17 +4014,16 @@ zure_key -s = Azure @@ -4035,16 +4035,24 @@ bjects() +.first() %0A @@ -4060,33 +4060,32 @@ if not azure_key -s :%0A re @@ -4206,49 +4206,8 @@ %7D%0A - for azure_key in azure_keys:%0A @@ -4248,20 +4248,16 @@ - if azure @@ -4269,36 +4269,...
95e0f194a489ce5799fb5367b755601830ea7a1a
Add venue to views
project/apps/api/views.py
project/apps/api/views.py
import logging log = logging.getLogger(__name__) from rest_framework import ( viewsets, permissions, ) from drf_haystack.viewsets import HaystackViewSet from .filters import ( ConventionFilter, PersonFilter, GroupFilter, TuneFilter, VenueFilter, ) from .models import ( Arranger, ...
Python
0
@@ -3531,32 +3531,49 @@ 'organization',%0A + 'venue',%0A ).prefetch_r
6ce8537236f6bbc92789dc57a07befad391e2bc8
fix install_requires
setup.py
setup.py
from setuptools import setup version = '2.4.1' setup( name='cbagent', version=version, description='Stats collectors package for Couchbase Server monitoring', author='Couchbase', license='Apache Software License', packages=[ 'cbagent', 'cbagent.collectors', 'cbagent.col...
Python
0.000001
@@ -38,17 +38,17 @@ = '2.4. -1 +2 '%0A%0Asetup @@ -528,17 +528,17 @@ se==1.2. -0 +1 ',%0A
750da37d3bf7ce393dcb6afbf54515fb3cd7091d
Make it future-proof.
tasks/generate_bdi_data.py
tasks/generate_bdi_data.py
import math from datetime import date, datetime import factory from cumulusci.tasks.bulkdata.factory_utils import Adder, ModuleDataFactory, Models def now(): return datetime.now().date() JOB_ID = datetime.now().isoformat().rsplit(":", 1)[0] START_DATE = date(2019, 1, 1) # Per https://salesforce.quip.com/gLf...
Python
0.000006
@@ -487,16 +487,33 @@ batchnum +, **other_options ):%0A
4e24c542bdd99c9f0f49a6f272ebaf5494697e6a
add count parameter to ec2cleanls, for overriding default 5
ec2cleanlc/ec2cleanlc.py
ec2cleanlc/ec2cleanlc.py
#!/usr/bin/python # # Copyright (c) 2014 Vincent Janelle <randomfrequency@gmail.com> # 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 cop...
Python
0
@@ -2371,32 +2371,97 @@ n=%22store_true%22)%0A +parser.add_argument(%22-c%22, %22--count%22, help=%22max count%22, type=int)%0A parser.add_argum @@ -2636,16 +2636,57 @@ ry_run%0A%0A +if args.count:%0A MAX_COUNT=args.count%0A%0A conffile
cfc5b528a25b0c77086208755d7075bf1f17efbc
Add patient id in SimplePatientSerializer
patient/serializers.py
patient/serializers.py
from django.contrib.auth.models import User from .models import Patient from rest_framework import serializers import datetime from next_of_kin.models import NextOfKin from next_of_kin.serializers import NextOfKinSerializer class SimpleUserSerializer(serializers.ModelSerializer): full_name = serializers.Serializer...
Python
0.000001
@@ -637,23 +637,28 @@ elds = ( +'id', 'user' -, )%0A%0A%0Aclas
b1933e4d998d703a14bbb1769e04a078fac215bc
Update HexStats.py
HexChat/HexStats.py
HexChat/HexStats.py
import hexchat #Based on Weechat's Weestats: https://weechat.org/scripts/source/weestats.py.html/ #By Filip H.F. 'FiXato' Slagter <fixato [at] gmail [dot] com> __module_name__ = 'HexStats' __module_version__ = '0.0.1' __module_description__ = 'Displays HexChat Wide User Statistics' __module_author__ = 'Vlek' def st...
Python
0.000001
@@ -255,18 +255,18 @@ HexChat - W +-w ide User @@ -742,52 +742,61 @@ -contextlist = %5Bi.context for i in chans if i +ops = %5B%5D%0A for channel in chans:%0A if channel .typ @@ -805,30 +805,21 @@ == 2 -%5D%0A +:%0A -ops = %5B%5D%0A + -for con @@ -827,24 +827,30 @@ ext -in contex...
226e1ebfb71cfeea248425d3a157c3f43b6d95cb
Remove todo comments
bes/__init__.py
bes/__init__.py
""" Log events to Elastic Search via bulk upload """ import datetime as _datetime import json as _json import logging as _logging import socket as _socket __version__ = '0.1' LOG = _logging.getLogger(__name__) DEFAULT = { 'host': 'localhost', 'port': 9700, 'protocol': 'UDP', 'index': 'log', 'd...
Python
0
@@ -2494,341 +2494,8 @@ %22%22%22%0A - #TODO indexes, types, and what Kibana likes.%0A #Try it out and adjust%0A #throwing all of payloads **kwargs into an 'additional' or simular field might %0A #required, and I don't know what happens if we send different data types with%0A #the same name ie a **kwarg...
26281cbe36ae999f01d24af4cebf62874c3ba76d
Fix profile image URLs for image storage on non-public S3 buckets
openedx/core/djangoapps/user_api/accounts/image_helpers.py
openedx/core/djangoapps/user_api/accounts/image_helpers.py
""" Helper functions for the accounts API. """ import hashlib from django.conf import settings from django.contrib.staticfiles.storage import staticfiles_storage from django.core.exceptions import ObjectDoesNotExist from django.core.files.storage import get_storage_class from openedx.core.djangoapps.site_configurat...
Python
0.999999
@@ -1892,32 +1892,321 @@ sion)%0A )%0A + # Return the URL, with the %22v%22 parameter added as its query%0A # string with %22?v=%22. If the original URL already includes a%0A # query string (such as signed S3 URLs), append to the query%0A # string with %22&v=%22 instead.%0A se...
1a6b79629c4e79e3917287a693047fbe5e0129ad
Check user if admin before lockdown
plugins/lock_the_chat.py
plugins/lock_the_chat.py
""" Echo plugin example """ import octeon global locked locked = [] PLUGINVERSION = 2 # Always name this variable as `plugin` # If you dont, module loader will fail to load the plugin! plugin = octeon.Plugin() @plugin.message(regex=".*") # You pass regex pattern def lock_check(bot, update): if update.message.chat_i...
Python
0.000001
@@ -738,77 +738,275 @@ chat -.type != %22PRIVATE%22 and not update.message.chat_id in locked:%0A +_id in locked:%0A return octeon.message(%22Chat is already locked%22)%0A if update.message.chat.type != %22PRIVATE%22:%0A for admin in update.message.chat.get_administrators():%0A if admin.user...
b3204ccf3bd3ac26cabb4e6aa75bdb9dbf3f9e75
Sentence case the biscuit
elections/uk/migrations/0005_add_favourite_biscuits.py
elections/uk/migrations/0005_add_favourite_biscuits.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): def create_simple_fields(apps, schema_editor): ExtraField = apps.get_model('candidates', 'ExtraField') db_alias = schema_editor.connection.alias ...
Python
0.999999
@@ -468,9 +468,9 @@ ite -B +b iscu
e45fac8e85d5b04e34a63dee8bd676ba294886e5
Remove unused import in hadec.py
astropy/coordinates/builtin_frames/hadec.py
astropy/coordinates/builtin_frames/hadec.py
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np from astropy import units as u from astropy.utils.decorators import format_doc from astropy.coordinates import representation as r from astropy.coordinates.baseframe import BaseCoordinateFrame, RepresentationMap...
Python
0
@@ -86,28 +86,8 @@ st%0A%0A -import numpy as np%0A%0A from
e37219c0403810adfb74bd321dfa2a916ef77820
update "completion_from_script"
jedi_daemon.py
jedi_daemon.py
# -*- coding: utf-8 -*- import os import sys import json import logging from logging import handlers from optparse import OptionParser import jedi from jedi.api import NotFoundError log = logging.getLogger('') log.setLevel(logging.DEBUG) def write(data): if not isinstance(data, str): data = json.dumps...
Python
0
@@ -2128,16 +2128,86 @@ pletions +%0A%0A :type script: jedi.api.Script%0A :rtype: list of (str, str)%0A %22%22%22%0A @@ -2235,17 +2235,20 @@ .complet -e +ions ()%0A r
d60f0fa1f942a24ca38ce20f2b5a617eb5181456
update session backend
hiren/hiren/settings.py
hiren/hiren/settings.py
""" Django settings for hiren project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) impo...
Python
0.000001
@@ -1405,16 +1405,91 @@ re',%0A)%0A%0A +MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage'%0A ROOT_URL
8b01df8ffb790a66cb054206def0a425275539c4
Fix encoding issue and comment improvement (#1807)
endpoints/getting-started/clients/google-jwt-client.py
endpoints/getting-started/clients/google-jwt-client.py
#!/usr/bin/env python # Copyright 2016 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 required...
Python
0
@@ -1784,32 +1784,61 @@ # swagger spec + (e.g. service account email) . It can be any @@ -1988,24 +1988,87 @@ -'sub': '12345678 +# sub should match 'iss'%0A 'sub': 'jwt-client.endpoints.sample.google.com ',%0A @@ -2158,16 +2158,32 @@ payload) +.decode('UTF-8') %0A%0A re
e7424f77dcaeabc39f923ade405694457287fae9
Strip out the .json file extension when loading from a json store
pump_json.py
pump_json.py
#!/usr/bin/env python import logging import os import simplejson as json import struct import sys import shutil import tempfile import zipfile import couchbaseConstants import pump JSON_SCHEME = "json://" class JSONSource(pump.Source): """Reads json file or directory or zip file that contains json files.""" ...
Python
0.998307
@@ -4536,32 +4536,109 @@ .basename(path)%0A + if key.endswith('.json'):%0A key = key%5B:-5%5D%0A @@ -4884,32 +4884,109 @@ .basename(path)%0A + if key.endswith('.json'):%0A key = key%5B:-5%5D%0A
6447d231565ecb4445a4630cf24069caeefc061b
version bump
bids/version.py
bids/version.py
from __future__ import absolute_import, division, print_function # Format expected by setup.py and doc/source/conf.py: string of form "X.Y.Z" _version_major = 0 _version_minor = 0 _version_micro = 1 # use '' for first of series, number for 1 and above _version_extra = '' # _version_extra = '' # Uncomment this for fu...
Python
0.000001
@@ -1758,17 +1758,16 @@ ups.com%22 -, %0ADESCRIP @@ -1922,17 +1922,16 @@ lchenko%22 -, %0AAUTHOR_ @@ -1961,17 +1961,16 @@ ian.com%22 -, %0APLATFOR
243c4ba66d35efbe58944ff973d668d9a3b7c6f8
Update __init__.py
VertexActions/__init__.py
VertexActions/__init__.py
#
Python
0.000072
@@ -1,2 +1 @@ -# %0A
f168068ee4fb957e45293cf24028d02e565be2b5
check if files exist before comparing (closes #37)
GUI/InstanceWindowWrapper.py
GUI/InstanceWindowWrapper.py
from PyQt5.QtWidgets import * from functools import partial from webbrowser import open as webopen from API.MultiMC import MultiMCInstance from API.CurseAPI import CurseAPI, CurseProject from Utils.Utils import clear_layout from Utils.Config import Config, Setting from GUI.InstanceWindow import Ui_InstanceWindow f...
Python
0
@@ -3500,16 +3500,32 @@ if +len(fs) %3E 0 and fs%5B0%5D.pu
9a9a6643bbc26a3f359df52b0b4bbb4207225017
Update VariationalAutoencoderRunner.py
autoencoder/VariationalAutoencoderRunner.py
autoencoder/VariationalAutoencoderRunner.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import sklearn.preprocessing as prep import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data from autoencoder_models.VariationalAutoencoder import VariationalAutoe...
Python
0.000001
@@ -376,19 +376,17 @@ one_hot - = += True)%0A%0A%0A @@ -982,19 +982,17 @@ n_input - = += 784,%0A @@ -1000,19 +1000,17 @@ n_hidden - = += 200,%0A @@ -1019,19 +1019,17 @@ ptimizer - = += tf.train
32fa9354c221f91cc6790177371a00468d22cb85
Fix the scan script
scan/scan.py
scan/scan.py
# Add your Python code here. E.g. from microbit import * MAX_ROWS=4 def scan(level,pause=500, reverse=False): for i in range(0,10): x = 0 rows = i cols = i while x <= i: for y in range(0,rows+1): if x <= MAX_ROWS and y <= MAX_ROWS: co...
Python
0.001609
@@ -61,16 +61,26 @@ X_ROWS=4 +%0Alevel = 9 %0A%0Adef sc @@ -86,14 +86,8 @@ can( -level, paus @@ -135,16 +135,17 @@ (0,10):%0A +%0A @@ -591,10 +591,8 @@ can( -9, 150)
9360c15f8883543ad5d83aa7dc870c60a1fed5ec
add infos
setup.py
setup.py
#!/usr/bin/env python3 # # The MIT License (MIT) # # Copyright (c) 2014 Philippe Proulx <philippe.proulx@efficios.com> # # 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, i...
Python
0
@@ -1866,16 +1866,73 @@ l.com',%0A + license='MIT',%0A keywords='tsdl ctf metadata',%0A ur
dc1773eaf3e66ddf5cbaa564bb55dbb8e51218ff
Fix #752: test case failed
topbeat/tests/system/test_filesystem.py
topbeat/tests/system/test_filesystem.py
from topbeat import TestCase """ Contains tests for ide statistics. """ class Test(TestCase): def test_filesystems(self): """ Checks that system wide stats are found in the output and have the expected types. """ self.render_config_template( system_stats=False...
Python
0
@@ -22,16 +22,30 @@ estCase%0A +import numbers %0A%0A%22%22%22%0ACo @@ -792,35 +792,41 @@ assert -typ +isinstanc e(output%5Bkey%5D) i @@ -826,18 +826,25 @@ key%5D -) is float +, numbers.Number) %0A%0A
1dacd99bbe1b32586a013d7d6f0874271e097e7c
Revise var to reach
lc0055_jump_game.py
lc0055_jump_game.py
"""Leetcode 55. Jump Game Medium URL: https://leetcode.com/problems/jump-game/ Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Determine if you are able to reach the last index. E...
Python
0
@@ -874,20 +874,16 @@ reach -able = 0%0A%0A @@ -975,20 +975,16 @@ if reach -able %3C i:%0A @@ -1037,20 +1037,16 @@ te reach -able by taki @@ -1094,20 +1094,16 @@ reach -able = max(r @@ -1106,20 +1106,16 @@ ax(reach -able , i + nu