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
ca2a6d06f09f5f2d511d6cf676fdd9a8f6c411cf
remove cruft, bump heroku
src/settings/production.py
src/settings/production.py
from base import * DEBUG = False ALLOWED_HOSTS = ["*"] SECRET_KEY = os.environ.get("DJANGO_SECRET_KEY", "afaefawe23af") assert SECRET_KEY, "Set your DJANGO_SECRET_KEY env var" # Celery BROKER_URL = os.environ.get('CLOUDAMQP_URL', None) # BROKER_URL = os.environ.get("RABBITMQ_BIGWIG_URL", None) #assert BROKER_URL,...
Python
0
@@ -237,67 +237,8 @@ one) -%0A# BROKER_URL = os.environ.get(%22RABBITMQ_BIGWIG_URL%22, None) %0A%0A#a
5526f8e3dca2f84fce34df5a134bada8479a2f69
Fix dumpdata ordering for VRFs
netbox/ipam/models/__init__.py
netbox/ipam/models/__init__.py
from .fhrp import * from .ip import * from .services import * from .vlans import * from .vrfs import * __all__ = ( 'ASN', 'Aggregate', 'IPAddress', 'IPRange', 'FHRPGroup', 'FHRPGroupAssignment', 'Prefix', 'RIR', 'Role', 'RouteTarget', 'Service', 'ServiceTemplate', 'V...
Python
0
@@ -1,14 +1,124 @@ -from .fhrp +# Ensure that VRFs are imported before IPs/prefixes so dumpdata & loaddata work correctly%0Afrom .fhrp import *%0Afrom .vrfs imp @@ -185,36 +185,16 @@ import * -%0Afrom .vrfs import * %0A%0A__all_
e0c046abe14d7666d9fea54dc0339579f2b0ba98
Fix indentation
neuralmonkey/runners/runner.py
neuralmonkey/runners/runner.py
from typing import Callable, Dict, List import numpy as np import tensorflow as tf from neuralmonkey.runners.base_runner import (BaseRunner, Executable, ExecutionResult, NextExecute) # tests: mypy,pylint # pylint: disable=too-few-public-methods class GreedyRunner(BaseRu...
Python
0.017244
@@ -654,20 +654,16 @@ - tf.get_c
29c7e28e56e6affb60a71364a0e55ad47baa0952
Add dependency for number of posts on archive pages.
nikola/plugins/task/archive.py
nikola/plugins/task/archive.py
# -*- coding: utf-8 -*- # Copyright © 2012-2013 Roberto Alsina and others. # 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 t...
Python
0
@@ -4074,32 +4074,106 @@ )%0A + n = len(post_list) if 'posts' in context else len(months)%0A @@ -4212,32 +4212,38 @@ 0%5D.config, 2: kw +, 3: n %7D%0A @@ -5709,32 +5709,51 @@ 0%5D.config, 2: kw +, 3: len(post_list) %7D%0A @@ -7018,16 +7018,...
fe0691595eea7197db07f3505446e1553df3d188
Bump version number after merging pull request.
src/openvr/version.py
src/openvr/version.py
# Store the version here so: # 1) we don't load dependencies by storing it in __init__.py # 2) we can import it in setup.py for the same reason # 3) we can import it into your module module # http://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package __version__ = '1.0.0601'
Python
0
@@ -300,11 +300,12 @@ '1.0.060 -1 +2a '%0A
4e74ba40f442dd27ddd29464b518c2a06ad1019a
Bump version
src/oscar/__init__.py
src/oscar/__init__.py
import os # Use 'dev', 'beta', or 'final' as the 4th element to indicate release type. VERSION = (1, 0, 1, 'machtfit', 21) def get_short_version(): return '%s.%s' % (VERSION[0], VERSION[1]) def get_version(): return '{}.{}.{}-{}-{}'.format(*VERSION) # Cheeky setting that allows each template to be acces...
Python
0
@@ -115,17 +115,17 @@ tfit', 2 -1 +2 )%0A%0A%0Adef
bbf5ba5b87acb4a2dc858b15030eef8abae6b52a
Can't raise a string
src/parsy/__init__.py
src/parsy/__init__.py
# -*- coding: utf-8 -*- # import re from .version import __version__ from functools import wraps from collections import namedtuple def line_info_at(stream, index): if index > len(stream): raise "invalid index" prefix = stream[0:index] line = prefix.count("\n") last_nl = prefix.rfind("\n") col = ...
Python
0.999999
@@ -187,23 +187,42 @@ stream): - raise +%0A raise ValueError( %22invalid @@ -228,17 +228,17 @@ d index%22 -%0A +) %0A pre
6011cf6d892d4ca941c47b578fdaebc80672f532
Raise an error if the run was cancelled.
api/kiveapi/runstatus.py
api/kiveapi/runstatus.py
""" This module defines a class that keeps track of a run in Kive. """ from . import KiveRunFailedException from .dataset import Dataset class RunStatus(object): """ This keeps track of a run in Kive. There isn't a direct analogue in Kive for this, but it represents a part of Run's functionality. ...
Python
0
@@ -736,16 +736,125 @@ run_id)%0A + if %22x%22 in data%5B%22status%22%5D:%0A raise KiveRunFailedException(%22Run %25s cancelled%22 %25 self.run_id)%0A @@ -1204,107 +1204,8 @@ .%22%0A%0A - if '!' in status:%0A raise KiveRunFailedException(%22Run %25s failed%22 %25 self.run...
74d877abfad21b8d2865ac2491cbd1babb5fd82b
Make sure if this pattern needs repeating that we do it properly
api/nodes/serializers.py
api/nodes/serializers.py
from rest_framework import serializers as ser from api.base.serializers import JSONAPISerializer, LinksField, Link, WaterbutlerLink from website.models import Node from framework.auth.core import Auth class NodeSerializer(JSONAPISerializer): category_choices = Node.CATEGORY_MAP.keys() category_choices_strin...
Python
0
@@ -234,24 +234,268 @@ erializer):%0A + # TODO: If we have to redo this implementation in any of the other serializers, subclass ChoiceField and make it%0A # handle blank choices properly. Currently DRF ChoiceFields ignore blank options, which is incorrect in this%0A # instance %0A categor
580c133c09758050aae30ae3aa453ce3c5b22e56
refactor python
Python/stack.py
Python/stack.py
__author__ = 'Daniel' class Stack(): def __init__(self): self.items = [] def push(self, item): self.items.append(item) def is_empty(self): return self.items == [] def size(self): return len(self.items) def pop(self): return self.items.pop() def peek...
Python
0.999983
@@ -1902,86 +1902,29 @@ t()%0A +%0A -evalStack = Stack()%0A for token in tokens:%0A if token == %22+%22:%0A +def eval_op(f):%0A @@ -1931,33 +1931,34 @@ right = eval -S +_s tack.pop()%0A @@ -1952,36 +1952,32 @@ k.pop()%0A - left = evalStack @@ -1963,33 +1963,34 @@ ...
343fa1849457202a393ccfdc5b86075cc1b0b88c
add observables
plugins/feeds/public/hybdrid_analysis.py
plugins/feeds/public/hybdrid_analysis.py
import logging from datetime import timedelta from core.errors import ObservableValidationError from core.feed import Feed from core.observables import Hash, Hostname class Hybrid_Analysis(Feed): default_values = { "frequency": timedelta(minutes=5), "name": "Hybdrid-Analy...
Python
0.00209
@@ -2466,16 +2466,17 @@ source': + self.nam @@ -2594,8 +2594,1297 @@ error(e) +%0A%0A if 'extracted_files' in item:%0A for extracted_file in item%5B'extracted_files'%5D:%0A context_file_dropped = %7B'source': self.name%7D%0A%0A if not 'sha256' in extracted_file:%0A ...
aa7bbd84fa16105417ceb7f9e06d392a4e54fdc6
Remove unused import
salt/beacons/twilio_txt_msg.py
salt/beacons/twilio_txt_msg.py
# -*- coding: utf-8 -*- ''' Beacon to emit Twilio text messages ''' # Import Python libs from __future__ import absolute_import from datetime import datetime import logging # Import 3rd Party libs try: from twilio.rest import TwilioRestClient HAS_TWILIO = True except ImportError: HAS_TWILIO = False log =...
Python
0.000001
@@ -126,38 +126,8 @@ ort%0A -from datetime import datetime%0A impo
f59da23fc66c24759d202ca30d6c407954db757c
fix openbsdservice
salt/modules/openbsdservice.py
salt/modules/openbsdservice.py
# -*- coding: utf-8 -*- ''' The service module for OpenBSD ''' # Import python libs import os import logging log = logging.getLogger(__name__) # XXX enable/disable support would be nice # Define the module's virtual name __virtualname__ = 'service' __func_alias__ = { 'reload_': 'reload' } def __virtual__(): ...
Python
0.000041
@@ -3749,48 +3749,175 @@ t)', - clean_env=True, output_loglevel='quiet' +%0A clean_env=True,%0A output_loglevel='quiet',%0A python_shell=True ).sp
c340c1b92a3d82a25ce2e43b19603ee58de0b146
Improve celery logging
home/core/async.py
home/core/async.py
""" async.py ~~~~~~~~ Handles running of tasks in an asynchronous fashion. Not explicitly tied to Celery. The `run` method simply must exist here and handle the execution of whatever task is passed to it, whether or not it is handled asynchronously. """ from apscheduler.schedulers.background import BackgroundScheduler...
Python
0.000005
@@ -382,16 +382,61 @@ security +%0Afrom celery.utils.log import get_task_logger %0A%0Asetup_ @@ -807,16 +807,52 @@ tart()%0A%0A +logger = get_task_logger(__name__)%0A%0A %0A@queue. @@ -958,24 +958,102 @@ es.%0A %22%22%22%0A + logger.info('Running %7B%7D with config: %7B%7D'.format(method.__name__, kwargs))%0...
d4a89c2a2400e984bd74c27cc9bf5cb5222f8226
Adding a waiting time
src/snakefiles/assembly.py
src/snakefiles/assembly.py
rule assembly_split_pe_files: """ Split pe_pe files into _1 and _2. """ input: fastq_pe = norm + "{sample}.final.pe_pe.fq.gz" output: left = assembly + "{sample}_1.fq.gz", right = assembly + "{sample}_2.fq.gz" threads: 1 priority: 20 params: ...
Python
0.999953
@@ -747,16 +747,26 @@ og%7D 2%3E&1 + ; sleep 5 %22%0A%0Arule
8414668c97c359a39cf96a37819cb7e37b54c670
Fix new Pylint
ixdjango/utils.py
ixdjango/utils.py
""" Utility classes/functions """ import os from random import choice import re from subprocess import PIPE, Popen def random_string( length=10, chars='abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789' ): """ Generates a random string of length specified and using supplied chars. Useful for...
Python
0.000025
@@ -114,52 +114,23 @@ n%0A%0A%0A -def random_string(%0A length=10,%0A chars= +ALPHANUMERIC = 'abc @@ -183,16 +183,65 @@ 456789'%0A +%0A%0Adef random_string(length=10, chars=ALPHANUMERIC ):%0A %22
5859e7102654e016dd836e2cb9428f5b2daac35c
Support mixing generic and non generic inlines
genericadmin/admin.py
genericadmin/admin.py
import json from functools import update_wrapper from django.contrib import admin from django.conf.urls import patterns, url from django.conf import settings from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType try: from django.utils.encoding import force_text ...
Python
0
@@ -2675,16 +2675,82 @@ uest)):%0A + if hasattr(inline, 'get_generic_field_list'):%0A @@ -2795,16 +2795,20 @@ refix()%0A + @@ -2888,24 +2888,16 @@ prefix)%0A - %0A
c8df242ed423717891f5b5fcd061cf702990c362
Fix serialisation of unicode values to XML
molly/utils/simplify.py
molly/utils/simplify.py
import itertools import datetime from logging import getLogger from lxml import etree from django.contrib.gis.geos import Point from django.core.paginator import Page from django.db import models logger = getLogger(__name__) class DateUnicode(unicode): pass class DateTimeUnicode(unicode): pass _XML_DATATYPES = ( ...
Python
0.000008
@@ -4192,32 +4192,49 @@ ment('literal')%0A + try:%0A node.tex @@ -4244,32 +4244,180 @@ unicode(value)%0A + except UnicodeDecodeError:%0A # Encode as UTF-8 if ASCII string can not be encoded%0A node.text = unicode(value, 'utf-8')%0A node.att
771860a6a9176dc6627f25f5faac960ab3edcc50
add expand user
src/speaker-recognition.py
src/speaker-recognition.py
#!/usr/bin/env python2 # -*- coding: UTF-8 -*- # File: speaker-recognition.py # Date: Wed Oct 29 22:42:26 2014 +0800 # Author: Yuxin Wu <ppwwyyxxc@gmail.com> import argparse import sys import glob import os import itertools import scipy.io.wavfile as wavfile sys.path.append(os.path.join( os.path.dirname(os.path.r...
Python
0.000002
@@ -83,27 +83,27 @@ te: -Wed Oct 29 22:42:26 +Sat Nov 29 14:06:43 201 @@ -1627,16 +1627,48 @@ t_dirs = + %5Bos.path.expanduser(k) for k in input_d @@ -1686,16 +1686,17 @@ .split() +%5D %0A dir @@ -2426,16 +2426,48 @@ ob.glob( +%5Bos.path.expanduser(k) for k in input_fi @@ -2469,16 +2469,17 @@ ut_files +...
ff4ebc169392d8768cce4be39765682dbba64e8f
Return a Glyph() in Spell.getGlyphLearned()
game/spells/__init__.py
game/spells/__init__.py
# -*- coding: utf-8 -*- """ Spells - Spell.dbc """ from .. import * from .. import durationstring from ..globalstrings import * POWER_TYPE_HEALTH = -2 POWER_TYPE_MANA = 0 POWER_TYPE_RAGE = 1 POWER_TYPE_FOCUS = 2 POWER_TYPE_ENERGY = 3 POWER_TYPE_RUNES = 5 POWER_TYPE_RUNIC_POWER = 6...
Python
0.000281
@@ -4370,16 +4370,89 @@ == 74:%0A +%09%09%09from ..glyphs import Glyph, GlyphProxy%0A%09%09%09Glyph.initProxy(GlyphProxy)%0A %09%09%09retur @@ -4453,16 +4453,22 @@ %09return +Glyph( effects%5B @@ -4482,27 +4482,17 @@ _value_1 -%0A%09%09return 0 +) %0A%09%0A%09def
64cecfb1ada97d1aeb5987289772fd2200da78d7
fix creation of view
recycleview.py
recycleview.py
""" RecycleView =========== Data accepted: list of dict. TODO: - recycle old widgets based on the class - add custom function to get view height - add custom function to get view class - update view size when created - move all internals to adapter - selection """ from kivy.compat import stri...
Python
0
@@ -6247,36 +6247,16 @@ -view = viewclass()%0A # +# FIXME: we @@ -6312,21 +6312,16 @@ hat wont - work %0A @@ -6322,16 +6322,21 @@ # + work for kv- @@ -6431,16 +6431,49 @@ s well.%0A + view = viewclass(**item)%0A
06a648614d51e2c9f456a33dc164c11021c724a8
Handle adding to WHERE where WHERE already exists.
gemini/gemini_region.py
gemini/gemini_region.py
#!/usr/bin/env python import sqlite3 import re import os import sys import GeminiQuery def _report_results(args, query, gq): # report the results of the region query gq.run(query) if args.use_header and gq.header: print gq.header for row in gq: print row def get_region(args, gq): ...
Python
0
@@ -1977,14 +1977,8 @@ = %22 - WHERE chr @@ -2000,32 +2000,32 @@ chrom + %22'%22 + %5C%0A + %22 AND (( @@ -2152,23 +2152,410 @@ ery -+= where_clause += _add_to_where_clause(args.query, where_clause)%0A%0A%0Adef _add_to_where_clause(query, where_clause):%0A where_index = query.lower().find(%22where%22...
9b18db54d64e168231079255334649fb9b503f3e
Add murrine back into monodevelop-mac-dev packages list
profiles/monodevelop-mac-dev/packages.py
profiles/monodevelop-mac-dev/packages.py
import os from bockbuild.darwinprofile import DarwinProfile class MonoDevelopMacDevPackages: def __init__ (self): # Toolchain self.packages.extend ([ 'autoconf.py', 'automake.py', 'libtool.py', 'gettext.py', 'pkg-config.py' ]) # Base Libraries self.packages.extend ([ 'libpng.py', 'libj...
Python
0
@@ -641,24 +641,41 @@ ngines.py',%0A +%09%09%09'murrine.py',%0A %09%09%09'gtk-quar
5ca4e1df8fc67f9b56d5ea55cb4e17e78c5c6ed5
Fix test factory
project/apps/smanager/tests/factories.py
project/apps/smanager/tests/factories.py
# Standard Library import datetime import rest_framework_jwt # Third-Party from factory import Faker # post_generation, from factory import Iterator from factory import LazyAttribute from factory import PostGenerationMethodCall from factory import RelatedFactory from factory import Sequence from factory import SubF...
Python
0.000001
@@ -2034,16 +2034,92 @@ quartet%0A + name = %22International Championship%22%0A district = Session.DISTRICT.bhs%0A is_i
1e4c1c7213763ba70780707e690e37a1c01e6b59
use cpp to preprocess the input files and handle multiple DGETs per line
generate_task_header.py
generate_task_header.py
#!/usr/bin/python import os import re from toposort import toposort_flatten import copy dtask_re = re.compile('DTASK\(\s*(\w+)\s*,(.+)\)') dget_re = re.compile('DGET\(\s*(\w+)\s*\)') def find_tasks_in_file(filename): tasks = [] with open(filename) as f: for line in f: match = dtask_re.se...
Python
0
@@ -81,16 +81,34 @@ ort copy +%0Aimport subprocess %0A%0Adtask_ @@ -123,16 +123,17 @@ compile( +r 'DTASK%5C( @@ -174,16 +174,17 @@ compile( +r 'DGET%5C(%5C @@ -257,55 +257,197 @@ -with open(filename) as f:%0A for line in f +cpp = subprocess.Popen(%5B'cpp', '-w', filename%5D,%0A ...
f76daf38fb8998bbf5d0b663ff64572fb240fd24
bump Python API version am: 454844e69f am: 07e940c2de am: 19c98a2e99 am: 9bc9e3d185 am: 4289bd8427
src/trace_processor/python/setup.py
src/trace_processor/python/setup.py
from distutils.core import setup setup( name='perfetto', packages=['perfetto', 'perfetto.trace_processor'], package_data={'perfetto.trace_processor': ['*.descriptor']}, include_package_data=True, version='0.2.9', license='apache-2.0', description='Python API for Perfetto\'s Trace Processor'...
Python
0
@@ -225,11 +225,11 @@ ='0. -2.9 +3.0 ',%0A @@ -481,12 +481,23 @@ ive/ -v6.0 +refs/tags/v20.1 .tar
1a49fafea536a8cdd992ebb6e0ae08c8e0174923
Update model.py
geostatsmodels/model.py
geostatsmodels/model.py
import numpy as np import variograms def opt( fct, x, y, c, parameterRange=None, meshSize=1000 ): ''' Optimize parameters for a model of the semivariogram ''' if parameterRange == None: parameterRange = [ x[1], x[-1] ] mse = np.zeros( meshSize ) a = np.linspace( parameterRange[0], param...
Python
0.000001
@@ -2273,21 +2273,20 @@ semivari -ogram +ance ( fct, p
5ff44efbcfca5316796a1ea0191b2a92894a59ee
Fix resolve error
gerber/render/render.py
gerber/render/render.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # copyright 2014 Hamilton Kibbe <ham@hamiltonkib.be> # Modified from code by Paulo Henrique Silva <ph.silva@gmail.com> # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a ...
Python
0.000006
@@ -1881,38 +1881,104 @@ -return x or self.x, y or self. +x = x if x is not None else self.x%0A y = y if y is not None else self.y%0A return x, y%0A%0A
75ece1dbe7d101948bf8810bc4050764be2aca47
add explanation to warm_start error for lightfm
polara/recommender/external/lightfm/lightfmwrapper.py
polara/recommender/external/lightfm/lightfmwrapper.py
import numpy as np from numpy.lib.stride_tricks import as_strided from lightfm import LightFM from polara.recommender.models import RecommenderModel from polara.lib.similarity import stack_features from polara.tools.timing import track_time class LightFMWrapper(RecommenderModel): def __init__(self, *args, item_fe...
Python
0
@@ -3300,16 +3300,45 @@ tedError +('Not supported by LightFM.') %0A%0A
2025dae49acd6827d0e961e9be345ad9cb3f1086
Add pytables to save cosine similarity
pygraphc/similarity/LogTextSimilarity.py
pygraphc/similarity/LogTextSimilarity.py
from pygraphc.preprocess.PreprocessLog import PreprocessLog from pygraphc.similarity.StringSimilarity import StringSimilarity from itertools import combinations class LogTextSimilarity(object): """A class for calculating cosine similarity between a log pair. This class is intended for non-graph based clust...
Python
0
@@ -154,16 +154,37 @@ nations%0A +from tables import *%0A %0A%0Aclass @@ -352,24 +352,146 @@ od.%0A %22%22%22%0A + class Cosine(IsDescription):%0A source = Int32Col()%0A dest = Int32Col()%0A similarity = Float32Col()%0A%0A def __in @@ -1294,16 +1294,365 @@ s_text%0A%0A + # h5...
446bdb2d9906c39b0917dfd1cc5ce35230f78cfa
rename an argument
pytablereader/spreadsheet/excelloader.py
pytablereader/spreadsheet/excelloader.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import, unicode_literals from pytablereader import DataError from six.moves import range from tabledata import TableData from .._logger import FileSourceLogger from .._validator import FileValid...
Python
0.000123
@@ -4140,21 +4140,17 @@ ell_type -_list +s ):%0A @@ -4257,21 +4257,17 @@ ell_type -_list +s %5D)%0A%0A
e384aee40e41d36c2ff32b76a1d4d162e0c9cecc
Stopping for the night. corrected JsLibraryAnalyser.js
pythonium/BowerLoad/JsLibraryAnalyser.py
pythonium/BowerLoad/JsLibraryAnalyser.py
__author__ = 'Jason' import glob import os class Mapper: #map out files -> classes -> functions+returns moduleMap = {} RootJsfileList = [] def __init__(self): pass def _find_entry_Points(self): os.chdir("/mydir") for file in glob.glob("*.js"): print(file) ...
Python
0.999996
@@ -37,16 +37,31 @@ port os%0A +import fnmatch%0A %0A%0Aclass @@ -86,16 +86,18 @@ ut files +%7B%7D -%3E clas @@ -99,16 +99,18 @@ classes +%7B%7D -%3E func @@ -118,21 +118,37 @@ ions -+ +%7B%7Binputs:%5B%5D, returns +:%5B%5D%7D %0A +# modu @@ -159,34 +159,161 @@ p = -%7B%7D%0A RootJsfileList = %5B...
a5840150f7089b1e00296f12254ef161f8ce93b6
fix foo("bar").baz()
pythonscript/pythonscript_transformer.py
pythonscript/pythonscript_transformer.py
from ast import Str from ast import Expr from ast import Call from ast import Name from ast import Assign from ast import Attribute from ast import FunctionDef from ast import NodeTransformer class PythonScriptTransformer(NodeTransformer): def visit_ClassDef(self, node): name = Name(node.name, None) ...
Python
0.999868
@@ -1686,32 +1686,24 @@ one), %5Bself. -generic_ visit(node.v @@ -1741,24 +1741,95 @@ one, None)%0A%0A + def visit_Expr(self, node):%0A return self.visit(node.value)%0A%0A def visi
3b2730edbbef3f32aef6682d9d446d8416fc7562
add setWindowMinimizeButtonHint() for dialog
quite/controller/dialog_ui_controller.py
quite/controller/dialog_ui_controller.py
from . import WidgetUiController from ..gui import Shortcut class DialogUiController(WidgetUiController): def __init__(self, parent=None, ui_file=None): super().__init__(parent, ui_file) Shortcut('ctrl+w', self.w).excited.connect(self.w.close) def exec(self): return self.w.exec() ...
Python
0
@@ -53,16 +53,45 @@ hortcut%0A +from PySide.QtCore import Qt%0A %0A%0Aclass @@ -340,16 +340,149 @@ exec()%0A%0A + def setWindowMinimizeButtonHint(self):%0A self.w.setWindowFlags(Qt.WindowMinimizeButtonHint %7C Qt.WindowMaximizeButtonHint)%0A%0A @cla
a08919c24e1af460ccba8820eb6646492848621e
Bump Version 0.5.4
libmc/__init__.py
libmc/__init__.py
from ._client import ( PyClient, ThreadUnsafe, encode_value, MC_DEFAULT_EXPTIME, MC_POLL_TIMEOUT, MC_CONNECT_TIMEOUT, MC_RETRY_TIMEOUT, MC_HASH_MD5, MC_HASH_FNV1_32, MC_HASH_FNV1A_32, MC_HASH_CRC_32, MC_RETURN_SEND_ERR, MC_RETURN_RECV_ERR, MC_RETURN_CONN_POLL_ERR, ...
Python
0
@@ -536,15 +536,15 @@ _ = -' +%22 0.5. -3' +4%22 %0A__v @@ -564,20 +564,9 @@ 0.5. -3-3-g3eb1a97 +4 %22%0A__ @@ -651,27 +651,27 @@ = %22 -Sat +Thu Jul 1 -1 14:24:54 +6 18:20:00 201
778f284c2208438b7bc26226cc295f80de6343e0
Use loop.add_signal_handler for handling SIGWINCH.
libpymux/utils.py
libpymux/utils.py
import array import asyncio import fcntl import signal import termios def get_size(stdout): # Thanks to fabric (fabfile.org), and # http://sqizit.bartletts.id.au/2011/02/14/pseudo-terminals-in-python/ """ Get the size of this pseudo terminal. :returns: A (rows, cols) tuple. """ #assert st...
Python
0
@@ -1587,19 +1587,30 @@ callback +, loop=None ):%0A - %22%22%22%0A @@ -1731,38 +1731,23 @@ -def sigwinch_handler(n, frame) +if loop is None :%0A @@ -1783,16 +1783,45 @@ t_loop() +%0A%0A def sigwinch_handler(): %0A @@ -1854,21 +1854,31 @@ -signal.signal +loop.add_signal_handler (sig
fa57fa679b575ce871af3c4769828f400e6ab28b
bump version 2.1.3 for issue #70
premailer/__init__.py
premailer/__init__.py
from premailer import Premailer, transform __version__ = '2.1.2'
Python
0
@@ -56,11 +56,11 @@ = '2.1. -2 +3 '%0A
062ce0f6fd9f6940b6c9ca45185e98e5d566e916
add timestamp to masterbugtable
preproc/buildlists.py
preproc/buildlists.py
#!/usr/bin/python import json, glob, urllib, os, urllib2,csv,StringIO,re, sys from pprint import pprint from urlparse import urlparse import socket socket.setdefaulttimeout(240) # Seconds. Loading Bugzilla searches can be slow if os.path.exists('/home/hallvors/lib'): # custom path for tldextract module on hallvord.co...
Python
0.000016
@@ -70,16 +70,22 @@ ,re, sys +, time %0Afrom pp @@ -4154,16 +4154,66 @@ ugs'%5D)%7D%0A + masterBugTable%5B'timestamp'%5D = time.time()%0A %09# Write
0b42303f94d0662b0b50439b9c2fdfa649633bd5
Remove newline
librb/rbRadios.py
librb/rbRadios.py
import requests from librb.rbConstants import endpoints, BASE_URL def request(endpoint, **kwargs): fmt = kwargs.get("format", "json") if fmt == "xml": content_type = "application/%s" % fmt else: content_type = "application/%s" % fmt headers = {"content-type": content_type, "User-Ag...
Python
0.000073
@@ -5633,29 +5633,28 @@ request(endpoint, **kwargs) -%0A
3cdbcc16450faa958e27f60d5f2adc7a943562d8
Fix MacOS build
platforms/osx/build_framework.py
platforms/osx/build_framework.py
#!/usr/bin/env python """ The script builds OpenCV.framework for OSX. """ from __future__ import print_function import os, os.path, sys, argparse, traceback, multiprocessing # import common code sys.path.insert(0, os.path.abspath(os.path.abspath(os.path.dirname(__file__))+'/../ios')) from build_framework import Build...
Python
0.000047
@@ -1795,32 +1795,169 @@ the framework')%0A + parser.add_argument('--disable', metavar='FEATURE', default=%5B%5D, action='append', help='OpenCV features to disable (add WITH_*=OFF)')%0A parser.add_a @@ -2799,16 +2799,30 @@ without, + args.disable, args.en
0782ba56218e825dea5b76cbf030a522932bcfd6
Remove unnecessary (and debatable) comment.
networkx/classes/ordered.py
networkx/classes/ordered.py
""" OrderedDict variants of the default base classes. These classes are especially useful for doctests and unit tests. """ try: # Python 2.7+ from collections import OrderedDict except ImportError: # Oython 2.6 try: from ordereddict import OrderedDict except ImportError: OrderedDic...
Python
0
@@ -52,74 +52,8 @@ s.%0A%0A -These classes are especially useful for doctests and unit tests.%0A%0A %22%22%22%0A
05e162a7fcc9870e37a6deab176cf3c6491e8481
add docstrings for methods of PrimaryDecider and refactor them a bit
plenum/server/primary_decider.py
plenum/server/primary_decider.py
from typing import Iterable from collections import deque from plenum.common.message_processor import MessageProcessor from plenum.server.has_action_queue import HasActionQueue from plenum.server.router import Router, Route from stp_core.common.log import getlogger from typing import List logger = getlogger() class...
Python
0
@@ -436,124 +436,8 @@ lf)%0A - # TODO: How does primary decider ensure that a node does not have a%0A # primary while its catching up%0A @@ -1555,24 +1555,32 @@ maries(self) + -%3E None :%0A %22%22 @@ -1593,14 +1593,25 @@ -Choose +Start election of the @@ -1658,53 +1658,15 @@ nce ...
8f78c04f6e2f21deb02a285fc78c5da907f0287b
Delete extra print()
nn/file/cnn_dailymail_rc.py
nn/file/cnn_dailymail_rc.py
import functools import tensorflow as tf from .. import flags from ..flags import FLAGS class _RcFileReader: def __init__(self): # 0 -> null, 1 -> unknown self._word_indices = flags.word_indices def read(self, filename_queue): key, value = tf.WholeFileReader().read(filename_queue) return (key, ...
Python
0.000003
@@ -1000,70 +1000,8 @@ %5D)%0A%0A - print(tf.reshape(context, %5Bcontext_length%5D).get_shape())%0A%0A
9a59705e3d85a93a8e82a22cfdde66600d18e650
Version bump
projector/__init__.py
projector/__init__.py
""" Project management Django application with task tracker and repository backend integration. """ VERSION = (0, 1, 9) __version__ = '.'.join((str(each) for each in VERSION[:4])) def get_version(): """ Returns shorter version (digit parts only) as string. """ return '.'.join((str(each) for each in V...
Python
0.000001
@@ -115,9 +115,17 @@ 1, -9 +10, 'dev' )%0A%0A_
55eac8bed7e08c245642c1292ebc644fcbd8e12a
Add jobs serializers' tests
polyaxon/api/jobs/serializers.py
polyaxon/api/jobs/serializers.py
from rest_framework import fields, serializers from rest_framework.exceptions import ValidationError from db.models.jobs import Job, JobStatus from libs.spec_validation import validate_job_spec_config class JobStatusSerializer(serializers.ModelSerializer): uuid = fields.UUIDField(format='hex', read_only=True) ...
Python
0
@@ -2370,87 +2370,8 @@ %22%22%22%0A - # config is optional%0A if not config:%0A return config%0A%0A @@ -2806,628 +2806,4 @@ d))%0A -%0A def validate(self, attrs):%0A if self.initial_data.get('check_specification') and not attrs.get('config'):%0A raise ValidationErro...
16bf079d1b139db08988fdb3cc1ff818cecfc12e
Add ModelTranslationAdminMixin.
linguist/admin.py
linguist/admin.py
# -*- coding: utf-8 -*- from django.contrib import admin from .models import Translation class TranslationAdmin(admin.ModelAdmin): pass admin.site.register(Translation, TranslationAdmin)
Python
0
@@ -95,43 +95,201 @@ ass -TranslationAdmin(admin.ModelAdmin): +ModelTranslationAdminMixin(object):%0A %22%22%22%0A Mixin for model admin classes.%0A %22%22%22%0A pass%0A%0A%0A%0Aclass TranslationAdmin(admin.ModelAdmin):%0A %22%22%22%0A Translation model admin options.%0A %22%22%22 %0A
9515271143c0ae9cbcde98b981f665e8ccda5955
Clean up jupyter testing.
positivity_check/jupiter_test.py
positivity_check/jupiter_test.py
#%% import pandas as pd import collections import matplotlib.pyplot as plt import os import sys import pprint import re module_path = os.path.abspath(os.path.join('..')) if module_path not in sys.path: sys.path.append(module_path) from positivity_check.positivity_check import UserText office_file = os.getcwd() + ...
Python
0
@@ -1,9 +1,10 @@ # + %25%25%0A%0Aimpo @@ -476,16 +476,17 @@ _file)%0A%0A +%0A def coun @@ -906,16 +906,17 @@ counts%0A%0A +%0A def line @@ -1027,32 +1027,51 @@ 'episode'%5D == 1) +%0A & (df%5B'speaker' @@ -1118,16 +1118,17 @@ _lines%0A%0A +%0A def remo @@ -1312,16 +1312,17 @@ result%0A%0A...
cfeb26b8c591b6d61f3184de74b2a37a2c2c21cc
Fix `lintreview register`
lintreview/cli.py
lintreview/cli.py
import argparse import lintreview.github as github from lintreview.web import app def main(): parser = create_parser() args = parser.parse_args() args.func(args) def register_hook(args): credentials = None if args.login_user and args.login_pass: credentials = { 'GITHUB_USER'...
Python
0
@@ -45,16 +45,42 @@ github%0A%0A +from flask import url_for%0A from lin @@ -102,16 +102,16 @@ ort app%0A - %0A%0Adef ma @@ -419,71 +419,496 @@ %7D%0A - github.register_hook(app, args.user, args.repo, credentials +%0A with app.app_context():%0A if credentials:%0A credentials%5B'GITHUB_URL'...
01d65552b406ef21a5ab4f53fd20cdd9ed6c55f8
support github ping events
lintreview/web.py
lintreview/web.py
import logging import pkg_resources from flask import Flask, request, Response from lintreview.config import load_config from lintreview.github import get_client from lintreview.github import get_lintrc from lintreview.tasks import process_pull_request from lintreview.tasks import cleanup_pull_request config = load_c...
Python
0
@@ -618,24 +618,134 @@ t_review():%0A + event = request.headers.get('X-Github-Event')%0A if event == 'ping':%0A return Response(status=200)%0A%0A try:%0A
f4a7200decbff0cb1a2ddde0b3f044da5d6c5250
Return repository collaborators as User instances.
github2/repositories.py
github2/repositories.py
from github2.core import BaseData, GithubCommand, Attribute, DateAttribute class Repository(BaseData): name = Attribute("Name of repository.") description = Attribute("Repository description.") forks = Attribute("Number of forks of this repository.") watchers = Attribute("Number of people watching this...
Python
0
@@ -69,16 +69,49 @@ ribute%0A%0A +from github2.users import User%0A%0A%0A class Re @@ -7396,36 +7396,34 @@ return self. -make_req +get_val ues -t (%22show%22, pro @@ -7463,32 +7463,36 @@ + filter=%22contribu @@ -7492,14 +7492,29 @@ ontributors%22 +, datatype=User )%0A
7594763e5e6167c15fa7898b13283e875c13c099
Update BotPMError.py
resources/Dependencies/DecoraterBotCore/BotPMError.py
resources/Dependencies/DecoraterBotCore/BotPMError.py
# coding=utf-8 """ DecoraterBotCore ~~~~~~~~~~~~~~~~~~~ Core to DecoraterBot :copyright: (c) 2015-2017 Decorater :license: MIT, see LICENSE for more details. """ import discord __all__ = ['BotPMError'] class BotPMError: """ Class for PMing bot errors. """ def __init__(self, bot): self.bot ...
Python
0.000001
@@ -1280,16 +1280,21 @@ await +self. bot.send
bec6505195543536cd3952966fcb31702a3c6166
Add set header
gpm/utils/git_client.py
gpm/utils/git_client.py
import os from gitdb import GitDB from git import Repo, Git from github import Github, GithubObject from gpm.utils.operation import LocalOperation from gpm.utils.log import Log from gpm.utils.console import gets from gpm.const.status import Status from gpm.utils.conf import SYSConf import getpass class GitClient(Local...
Python
0.000001
@@ -1624,16 +1624,97 @@ origin%0A%0A + @property%0A def branch(self):%0A return self.repo.active_branch.name%0A%0A def @@ -2762,104 +2762,60 @@ -repo = self.repo.create_head('master')%0A #repo.set_tracking_branch(self.origin.refs.master +self.run(%22git config --global push.default matc...
87b3122ef1210d419bf58341962c5bdb09b6dbda
Remove traces of pdb
nsls2_build_tools/mirror.py
nsls2_build_tools/mirror.py
#!/usr/bin/env conda-execute """ CLI to mirror all files in a package from one conda channel to another """ # conda execute # env: # - anaconda-client # # run_with: python import os from argparse import ArgumentParser from pprint import pprint import re import sys import subprocess import pdb import binstar_client ...
Python
0.000002
@@ -281,19 +281,8 @@ cess -%0Aimport pdb %0A%0Aim @@ -684,34 +684,8 @@ pe)%0A - # pdb.set_trace()%0A
cb7f6efbbbe640a2c360f7dc93cb2bc87b2e0ab2
fix example
entity_extract/examples/pos_extraction.py
entity_extract/examples/pos_extraction.py
#from entity_extract.extractor.extractors import PosExtractor from entity_extract.extractor.utilities import SentSplit, Tokenizer from entity_extract.extractor.extractors import PosExtractor from entity_extract.extractor.pos_tagger import PosTagger #p = PosExtractor() sents = p.SentPlit('This is a sentence about the ...
Python
0.0001
@@ -244,16 +244,111 @@ Tagger%0A%0A +# Initialize Services%0AsentSplitter = SentSplit()%0Atokenizer = Tokenizer()%0Atagger = PosTagger()%0A%0A #p = Pos @@ -371,15 +371,23 @@ s = -p.SentP +sentSplitter.sp lit( @@ -511,17 +511,17 @@ okens = -T +t okenizer @@ -547,25 +547,26 @@ tags = -PosT +t agger +.tag (to...
8dc5b661149fe075d703042cb32af7bbc0bd5d4a
Switch encoding.py to python3 type hints.
encoding.py
encoding.py
"""Script for encoding a payload into an image.""" import argparse import pathlib from PIL import Image, ImageMath import utilities def argument_parser(): # type: () -> argparse.ArgumentParser """Returns a configured argparser.ArgumentParser for this program.""" parser = argparse.ArgumentParser( ...
Python
0
@@ -155,24 +155,8 @@ er() -:%0A # type: () -%3E @@ -178,16 +178,17 @@ ntParser +: %0A %22%22%22 @@ -1465,32 +1465,39 @@ %0Adef encode(host +: Image , payload, n_sig @@ -1489,16 +1489,23 @@ payload +: Image , n_sign @@ -1522,45 +1522,9 @@ gits -):%0A # type: (PIL.Image, PIL.Image, +: int @@ -1532,...
9bc9137ec22b45b0611b2d786451db890f46f424
Add `initial` parameter to es.__init__
entities.py
entities.py
# vim: set et ts=4 sw=4 fdm=marker """ MIT License Copyright (c) 2016 Jesse Hogan 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 u...
Python
0.000002
@@ -1207,32 +1207,46 @@ ef __init__(self +, initial=None ):%0A self. @@ -1252,16 +1252,77 @@ .clear() +%0A if initial != None:%0A self.append(initial) %0A%0A de
015fcfaaed0a3ff54801f5821df4f5527255ab06
Update SSL.py
gevent_openssl/SSL.py
gevent_openssl/SSL.py
"""gevent_openssl.SSL - gevent compatibility with OpenSSL.SSL. """ import sys import socket import OpenSSL.SSL class Connection(object): def __init__(self, context, sock): self._context = context self._sock = sock self._connection = OpenSSL.SSL.Connection(context, sock) self._make...
Python
0.000001
@@ -112,16 +112,19 @@ %0A%0Aclass +SSL Connecti @@ -134,16 +134,52 @@ object): +%0A %22%22%22OpenSSL Connection Wapper%22%22%22 %0A%0A de @@ -545,31 +545,19 @@ f __ +io wait -_sock_io(self, sock +(self , io @@ -1394,33 +1394,15 @@ f.__ +io wait -_sock_io(self._sock, +( self @@ -1495,33 +1495,15 @@ f....
b0a4683670f05ed068a702144814f310586331fb
fix models error
src/public/models.py
src/public/models.py
# coding=utf-8 from django.db import models from django.contrib.auth.models import BaseUserManager, AbstractBaseUser, PermissionsMixin # todo: Group设置:供应商组,采购商组? class Org(models.Model): """组织""" name = models.CharField('名称', max_length=50) code = models.CharField('编码', max_length=50) location = model...
Python
0.000001
@@ -4351,36 +4351,31 @@ ay = models. -SmallInteger +Boolean Field('%E6%98%AF%E8%8A%82%E5%81%87%E6%97%A5' @@ -4384,17 +4384,21 @@ default= -0 +False )%0A ho
78ef8bbb721d6673ba576726c57dfae963153153
fix bugs in evaluate.py
evaluate.py
evaluate.py
from envs import create_env import numpy as np import time import argparse def evaluate_loop(env, network, max_episodes, args): sleep_time = args.sleep_time render = args.render verbose = args.verbose last_state = env.reset() last_features = network.get_initial_features() n_episode, step = 0,...
Python
0.000001
@@ -617,16 +617,26 @@ action +, features = fetch @@ -640,16 +640,29 @@ tched%5B0%5D +, fetched%5B2:%5D %0A%0A @@ -972,16 +972,113 @@ rminal:%0A + last_state = env.reset()%0A last_features = network.get_initial_features()%0A%0A @@ -1233,32 +1233,8 @@ tep%0A - env...
2e6c80717099fb6c6ca59d9d6193807b1aabfa8b
Update docstring
git_update/actions.py
git_update/actions.py
"""Git repo actions.""" import logging import os import pathlib import click from git import InvalidGitRepositoryError, Repo from git.exc import GitCommandError LOG = logging.getLogger(__name__) def crawl(path): """Crawl the path for possible Git directories.""" main_dir = pathlib.Path(path) if not main...
Python
0
@@ -260,16 +260,76 @@ ctories. +%0A%0A Args:%0A path (str): Original path to crawl.%0A %22%22%22%0A
ef1f303072307f259e8555e0148c29677b4f7d6f
Fix approve permissions typing
idb/ipc/approve.py
idb/ipc/approve.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. from typing import Set, Dict # noqa F401 from idb.grpc.types import CompanionClient from idb.grpc.idb_pb2 import ApproveRequest MAP = { # type: Dict[str, ApproveRequest.Permission] "photos": ApproveRequest.PHOTOS, ...
Python
0.000009
@@ -122,21 +122,13 @@ Dict - # noqa F401 +, Any %0A%0Afr @@ -221,20 +221,8 @@ %0AMAP - = %7B # type : Di @@ -234,33 +234,15 @@ r, A -pproveRequest.Permission%5D +ny%5D = %7B %0A @@ -442,16 +442,16 @@ et%5Bstr%5D%0A + ) -%3E Non @@ -457,80 +457,8 @@ ne:%0A - print(f%22Sending %7B%5BMAP%5Bpermission%5D f...
025ad18a2b6e483c2d44fe84d1b9d1ad0a7288b6
add njobs cli option
mriqc/classifier/cli.py
mriqc/classifier/cli.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: oesteban # @Date: 2015-11-19 16:44:27 # @Last Modified by: oesteban # @Last Modified time: 2017-01-13 15:45:09 """ mriqc_fit command line interface definition """ from __future__ import absolute_import, division, print_function, unicode_literals from sys im...
Python
0.000001
@@ -161,14 +161,14 @@ 13 1 -5:45:0 +6:31:3 9%0A%0A%22 @@ -3490,24 +3490,138 @@ d scores')%0A%0A + g_input.add_argument('--njobs', action='store', default=-1,%0A help='number of jobs')%0A%0A%0A opts = p @@ -4069,16 +4069,35 @@ _labels, + n_jobs=opts.njobs, %0A
61cb93a348879a36902159a6055b7e32b959e1c1
Fix data formatting bugs.
projects/tpoafptarbmit/scrape.py
projects/tpoafptarbmit/scrape.py
#!/usr/bin/env python3 from urllib.parse import parse_qsl import json import os import os.path import re import sys from bs4 import BeautifulSoup import requests import shapely.geometry ROUTE_BASE_URL = 'http://www.thepassageride.com/Routes/' OUTPUT_DIR = 'data/' def fetch_text(url): r = requests.get(url) ...
Python
0
@@ -2035,16 +2035,14 @@ s': -%5B coords -%5D %7D,%0A @@ -2306,16 +2306,21 @@ return +list( line.sim @@ -2338,24 +2338,25 @@ ance).coords +) %0A%0A%0Adef to_fi @@ -3683,16 +3683,29 @@ th open( +os.path.join( OUTPUT_D @@ -3723,16 +3723,17 @@ geojson' +) , 'w') a
7cb9703b1af4138e8f1a036245125d723add55a3
Fix error handling to return sensible HTTP error codes.
grano/views/__init__.py
grano/views/__init__.py
from colander import Invalid from flask import request from grano.core import app from grano.lib.serialisation import jsonify from grano.views.base_api import blueprint as base_api from grano.views.entities_api import blueprint as entities_api from grano.views.relations_api import blueprint as relations_api from grano...
Python
0
@@ -47,16 +47,62 @@ request +%0Afrom werkzeug.exceptions import HTTPException %0A%0Afrom g @@ -1118,42 +1118,37 @@ if -not hasattr(exc, 'get_descri +isinstance(exc, HTTPExce ption -' ):%0A @@ -1634,24 +1634,34 @@ status= -exc.code +body.get('status') ,%0A
b4f0bbb8e9fd198cfa60daa3a01a4a48a0fd18af
Replace assertFalse/assertTrue(a in b)
sahara/tests/unit/plugins/storm/test_config_helper.py
sahara/tests/unit/plugins/storm/test_config_helper.py
# Copyright 2017 Massachusetts Open Cloud # # 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...
Python
0.000311
@@ -1141,36 +1141,34 @@ self.assert -True +In ('nimbus.host' i @@ -1157,35 +1157,33 @@ In('nimbus.host' - in +, configs_092.key @@ -1198,37 +1198,37 @@ self.assert -False +NotIn ('nimbus.seeds' @@ -1218,35 +1218,33 @@ n('nimbus.seeds' - in +, configs_092.key @@ -1409,37 +1409,37 @@ self.asser...
d98ac8c127caf4b70c8b0da9b6b6415c47f0f3eb
remove cruft
munge/codec/__init__.py
munge/codec/__init__.py
import os import imp __all__ = ['django', 'mysql', 'json', 'yaml'] __codecs = {} # TODO move to .load? def _do_find_import(directory, skiplist=None, suffixes=None): # explicitly look for None, suffixes=[] might be passed to not load anything if suffixes is None: suffixes = [t[0] for t in imp.get_su...
Python
0
@@ -82,1174 +82,8 @@ %7D%0A%0A%0A -# TODO move to .load?%0Adef _do_find_import(directory, skiplist=None, suffixes=None):%0A # explicitly look for None, suffixes=%5B%5D might be passed to not load anything%0A if suffixes is None:%0A suffixes = %5Bt%5B0%5D for t in imp.get_suffixes()%5D%0A%0A loaded = d...
603c36aec2a4704bb4cf41c224194a5f83f9babe
Set the module as auto_install
sale_payment_method_automatic_workflow/__openerp__.py
sale_payment_method_automatic_workflow/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
Python
0.000001
@@ -1291,12 +1291,11 @@ l': -Fals +Tru e,%0A
0d4ad25bb01dc1e303ebaf940853f1b18532b3cd
update hook
muxiwebsite/__init__.py
muxiwebsite/__init__.py
# coding: utf-8 """ muxiwebsite: 木犀团队的官网 ~~~~~~~~~~~~~~~~~~~~~~~~~ 木犀团队是华中师范大学自由的学生互联网团队,分为 web(前端、后台),设计, 安卓 组 木犀官网是木犀团队的官方网站: 功能模块: 1.muxi: 木犀官网 木犀的简介信息 2.blog: 木犀博客 木犀团队的博客 3.book: 木犀图书 木犀图书管理 4.share: 木犀分享 木犀内部的分享小站 管理模块: ba...
Python
0
@@ -2199,12 +2199,45 @@ -i: -9001 +5555%60;sudo kill %60sudo lsof -t -i:5555 %60;gi @@ -2346,11 +2346,8 @@ test - 23 %3C/h1
a90142fb0ae6282fda3cadaa31a4f8ce73af1352
modify __init__.py
muxiwebsite/__init__.py
muxiwebsite/__init__.py
# coding: utf-8 """ muxiwebsite: 木犀团队的官网 ~~~~~~~~~~~~~~~~~~~~~~~~~ 木犀团队是华中师范大学自由的学生互联网团队,分为 web(前端、后台),设计, 安卓 组 木犀官网是木犀团队的官方网站: 功能模块: 1.muxi: 木犀官网 木犀的简介信息 2.blog: 木犀博客 木犀团队的博客 3.book: 木犀图书 木犀图书管理 4.share: 木犀分享 木犀内部的分享小站 管理模块: backend...
Python
0.000162
@@ -68,16 +68,17 @@ ~~~~~~~%0A +%0A %E6%9C%A8%E7%8A%80%E5%9B%A2%E9%98%9F @@ -98,16 +98,17 @@ %E8%81%94%E7%BD%91%E5%9B%A2%E9%98%9F%EF%BC%8C%E5%88%86%E4%B8%BA%0A +%0A @@ -127,16 +127,17 @@ %E8%AE%A1%EF%BC%8C %E5%AE%89%E5%8D%93 %E7%BB%84%0A +%0A %E6%9C%A8%E7%8A%80%E5%AE%98%E7%BD%91 @@ -154,24 +154,2...
27b0e86f15a2f89b2f8715dffa5cade17b7f5adf
Update singletons.py
omstd_lefito/lib/singletons.py
omstd_lefito/lib/singletons.py
# -*- coding: utf-8 -*- __ALL__ = ["Displayer", "IntellCollector"] # ------------------------------------------------------------------------- class Displayer: """Output system""" instance = None # --------------------------------------------------------------------- def __new__(cls, *args, **kwargs):...
Python
0.000001
@@ -2535,24 +2535,570 @@ et%22, None)%0A%0A + # --------------------------------------------------------------------------%0A def getsess(self):%0A out = Displayer()%0A if 'set-cookie' in self.originalhead:%0A out.display(self.originalhead%5B'set-cookie'%5D)%0A m = re.search(%...
989988aa604b5a125c765294080777c57ec6c535
Fix bug OppsDetail, add channel_long_slug
opps/articles/views/generic.py
opps/articles/views/generic.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.views.generic.detail import DetailView from django.views.generic.list import ListView from django.contrib.sites.models import get_current_site from django.shortcuts import get_object_or_404 from django.utils import timezone from django import template from djang...
Python
0
@@ -2078,16 +2078,43 @@ WS_LIMIT +%0A channel_long_slug = %5B%5D %0A%0A de @@ -2839,16 +2839,17 @@ 'slug')%0A +%0A
5878a9f6102acc466a95d286931fed494c81e571
Add debug
pskb_website/views.py
pskb_website/views.py
""" Main views of PSKB app """ from functools import wraps from flask import redirect, url_for, session, request, render_template, flash, json, g from . import app from . import remote from . import models def login_required(f): @wraps(f) def decorated_function(*args, **kwargs): if 'github_token' n...
Python
0.000003
@@ -2439,24 +2439,70 @@ thor_name)%0A%0A + print 'session', session%5B'github_token'%5D%0A%0A articles
da9a82aedac233cd5411c3edd7be6ac0b0957838
Fix return issue of testexecutor.
ptest/testexecutor.py
ptest/testexecutor.py
from datetime import datetime import threading import traceback from ptest import plistener, plogger, screencapturer from enumeration import PDecoratorType, TestCaseStatus from plogger import pconsole from testsuite import test_suite, NoTestCaseAvailableForThisThread __author__ = 'karl.gong' class TestExecutor(thr...
Python
0.000001
@@ -4304,24 +4304,31 @@ y(key):%0A +return threading.cu @@ -4376,24 +4376,31 @@ name():%0A +return threading.cu
4a6060f476aebac163dbac8f9822539596379c0a
Use current_app.babel_instance instead of babel
welt2000/__init__.py
welt2000/__init__.py
from flask import Flask, request, session from flask.ext.babel import Babel from babel.core import negotiate_locale from welt2000.__about__ import ( __title__, __summary__, __uri__, __version__, __author__, __email__, __license__, ) # noqa app = Flask(__name__) app.secret_key = '1234567890' babel = Babel(a...
Python
0.000018
@@ -34,16 +34,29 @@ session +, current_app %0Afrom fl @@ -335,151 +335,174 @@ p)%0A%0A -translations = %5B'en'%5D%0Atranslations.extend(map(str, babel.list_translations()))%0A%0A%0A@app.template_global()%0A@babel.localeselector%0Adef get_locale(): +%0A@app.template_global()%0A@babel.localeselector%0Adef get_locale(...
58ec62fe47bf6e7acb3302a29fd0df48c4342cec
Enable break and continue in templates
logya/template.py
logya/template.py
# -*- coding: utf-8 -*- import io import os from jinja2 import Environment, BaseLoader, TemplateNotFound, escape def filesource(logya_inst, name, lines=None): """Read and return source of text files. A template function that reads the source of the given file and returns it. The text is escaped so it ca...
Python
0
@@ -1210,16 +1210,124 @@ ates))%0A%0A + # Enable break and continue in templates%0A self.env.add_extension('jinja2.ext.loopcontrols')%0A%0A
fcbc7a5a1551c1148ea747a51976c2047a3850a2
Clean up code a bit
graph/weight-graph.py
graph/weight-graph.py
#!/usr/bin/env python3 import sys import tkinter as tk import tkplot import threading from queue import Queue, Empty import serial import struct from collections import namedtuple import time import csv import math def execute_delayed(root, generator): """For each yielded value wait the given amount of time (in s...
Python
0.000002
@@ -1161,97 +1161,8 @@ e):%0A - %0A t_ms = 0%0A pwm = 0%0A setpoint = 0%0A temp_outside = 0%0A%0A
86465840261a8af2a777c87a6f09a3b4f5390c73
Check that at least source/dest are bound before attempting to plot
graphistry/plotter.py
graphistry/plotter.py
import random import string import json import pandas import pygraphistry import util class Plotter(object): def __init__(self): # Bindings self.edges = None self.nodes = None self.source = None self.destination = None self.node = None self.edge_title = Non...
Python
0
@@ -2161,24 +2161,303 @@ e else nodes +%0A%0A if self.source is None or self.destination is None:%0A raise ValueError('Source/destination must be bound before plotting.')%0A if n is not None and self.node is None:%0A raise ValueError('Node identifier must be bound when using node da...
6f0740fbd94acc2398f0628552a6329c2a90a348
Allow start and end arguments to take inputs of multiple words such as 'New York'
greengraph/command.py
greengraph/command.py
from argparse import ArgumentParser from matplotlib import pyplot as plt from graph import Greengraph def process(): parser = ArgumentParser( description="Produce graph quantifying the amount of green land between two locations") parser.add_argument("--start", required=True, he...
Python
0.000065
@@ -278,33 +278,44 @@ , required=True, + nargs=%22+%22, %0A - @@ -401,16 +401,27 @@ ed=True, + nargs=%22+%22, %0A @@ -759,16 +759,17 @@ ()%0A%0A +# mygraph @@ -1073,32 +1073,32 @@ .out)%0A else:%0A - plt.save @@ -1113,16 +1113,66 @@ ph.png%22) +%0A print arguments.st...
75a47485629725f9035c7a4aa7c154ce30de3b5e
Add new allowed host
greenland/settings.py
greenland/settings.py
""" Django settings for greenland project. Generated by 'django-admin startproject' using Django 1.9.5. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os ...
Python
0
@@ -849,16 +849,41 @@ OSTS = %5B +'greenland.herokuapp.com' %5D%0A%0A%0A# Ap
3fe0a520a458a575117fc8d809f21efd133d2887
Add license file
wikilink/__init__.py
wikilink/__init__.py
""" wiki-link ~~~~~~~~ wiki-link is a web-scraping application to find minimum number of links between two given wiki pages. :copyright: (c) 2016 - 2018 by Tran Ly VU. All Rights Reserved. :license: Apache License 2.0. """ __all__ = ["wiki_link"] __author__ = "Tran Ly Vu (vutransingapore@gmail.com)" __ve...
Python
0
@@ -82,16 +82,17 @@ m number + %0A%09of lin
7a9f3f6cc880d2bcf0cdac8b5193b471eb2b9095
Refactor Adapter pattern
structural/adapter.py
structural/adapter.py
""" Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces. """ import abc class Target(metaclass=abc.ABCMeta): """ Define the domain-specific interface that Client uses. """ def __init__(s...
Python
0
@@ -312,24 +312,33 @@ _init__(self +, adaptee ):%0A s @@ -356,17 +356,15 @@ e = -A +a daptee -() %0A%0A @@ -734,16 +734,40 @@ main():%0A + adaptee = Adaptee()%0A adap @@ -780,16 +780,23 @@ Adapter( +adaptee )%0A ad
e8ec681a7bd6485874114b2eec4050e931fd7ee6
update UserKarma for the new row structure
hamper/plugins/karma.py
hamper/plugins/karma.py
import operator import re from collections import defaultdict from datetime import datetime from hamper.interfaces import ChatCommandPlugin, Command from hamper.utils import ude, uen from sqlalchemy import Column, DateTime, Integer, String from sqlalchemy.ext.declarative import declarative_base SQLAlchemyBase = decl...
Python
0
@@ -6393,20 +6393,24 @@ -user +rec_list = kt.fi @@ -6425,18 +6425,22 @@ maTable. -us +receiv er == th @@ -6448,37 +6448,138 @@ ng). -first()%0A%0A if user: +all()%0A%0A if rec_list:%0A total = 0%0A for r in rec_list:%0A total += r.kco...
37a5126f75ef64492c918d6e5f9b84641c7f03c8
fix import
otindex/query_study_helpers.py
otindex/query_study_helpers.py
# helper functions for the find_studies views from .models import ( DBSession, Study, Tree, Curator, Property, ) import simplejson as json import sqlalchemy import logging from sqlalchemy.dialects.postgresql import JSON,JSONB from sqlalchemy import Integer from sqlalchemy.exc import Programmin...
Python
0.000001
@@ -419,16 +419,38 @@ t_values +, get_study_properties %0A%0A_LOG = @@ -1842,29 +1842,24 @@ roperties = -util. get_study_pr @@ -2274,21 +2274,16 @@ abels = -util. get_stud @@ -2332,13 +2332,8 @@ t = -util. get_
bc40db9fa1c4663db604cb7890de10ef91d6a65e
Use correct name
haproxystats/metrics.py
haproxystats/metrics.py
""" haproxstats.metrics ~~~~~~~~~~~~~~~~~~ This module provides the field names contained in the HAProxy statistics. """ DAEMON_METRICS = [ 'CompressBpsIn', 'CompressBpsOut', 'CompressBpsRateLim', 'ConnRate', 'ConnRateLimit', 'CumConns', 'CumReq', 'CumSslConns', 'CurrConns', 'Cu...
Python
0
@@ -342,16 +342,17 @@ d_maxcon +n ',%0A '
3c63201d6113d01c870748f21be2501282a2316a
Remove unneeded import in gmail.py.
paas_manager/app/util/gmail.py
paas_manager/app/util/gmail.py
import sys import smtplib from email.mime.text import MIMEText from email.utils import formatdate import yaml from ... import config def create_message(from_addr, to_addr, subject, message, encoding): body = MIMEText(message, 'plain', encoding) body['Subject'] = subject body['From'] = from_addr body['T...
Python
0
@@ -95,20 +95,8 @@ ate%0A -import yaml%0A from
f7922bef544044f62b49c25b69de5fae8fa6e458
Update cs2quiz1.py
cs2quiz1.py
cs2quiz1.py
# 13.5 pts of 15 for terminology # 20 pts of 25 for programming #Part 1: Terminology (15 points) #1 1pt) What is the symbol "=" used for? # assigning values, function calls to a variable # 1 pt right answer # #2 3pts) Write a technical definition for 'function' # A function is a named sequence of statements that perfor...
Python
0
@@ -29,17 +29,17 @@ logy%0A# 2 -0 +3 pts of
f5aa2ab4796b258be54112ea87809e7ada4ee3e0
add advice shortlink
csp/urls.py
csp/urls.py
from django.conf.urls import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.decorators.csrf import csrf_exempt from django.views.generic import RedirectView from rest_framework.routers import SimpleRouter from crowdsourcing import views from crowdsourcing.v...
Python
0.000001
@@ -3823,24 +3823,236 @@ k_url'%7D)),%0A%0A + url(r'%5Eadvice', RedirectView.as_view(url='https://docs.google.com/forms/d/e/1FAIpQLScB5yz_2gdJOjSDu76gqDrMpUyiczQt-MTgtii4QLhuoP3YMA/viewform'),%0A name='advice'),%0A%0A
331c7a349e2d507ca52b24619ffc9cb1c4570e0b
Change default to *NOT* run image_harvest
harvester/run_ingest.py
harvester/run_ingest.py
""" Script to run the ingest process. Usage: $ python run_ingest.py user-email url_collection_api """ import sys import os from email.mime.text import MIMEText from dplaingestion.scripts import enrich_records from dplaingestion.scripts import save_records from dplaingestion.scripts import remove_deleted_records f...
Python
0.000002
@@ -2308,19 +2308,20 @@ harvest= -Tru +Fals e):%0A
4588a52ebfc3aee127a34a9e10067c0121c4f72e
add 'tab' and 'shift tab' for down/up movement
subiquity/ui/frame.py
subiquity/ui/frame.py
# Copyright 2015 Canonical, Ltd. # # This program 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 # License, or (at your option) any later version. # # This program is distribute...
Python
0
@@ -897,16 +897,77 @@ tWrap):%0A + key_conversion_map = %7B'tab': 'down', 'shift tab': 'up'%7D%0A%0A def @@ -1282,24 +1282,155 @@ elf.frame)%0A%0A + def keypress(self, size, key):%0A key = self.key_conversion_map.get(key, key)%0A return super().keypress(size, key)%0A%0A def set_
791fb484937cabeb3a098bcd173db782efe53d7c
support filtering of Authors by organization and positions
authors/views.py
authors/views.py
from rest_framework import viewsets, permissions from . import serializers from . import models class AuthorViewSet(viewsets.ModelViewSet): permission_classes = (permissions.DjangoModelPermissionsOrAnonReadOnly,) queryset = models.Author.objects.all() serializer_class = serializers.AuthorSerializer f...
Python
0
@@ -321,32 +321,59 @@ ilter_fields = ( +'organization', 'positions' )%0A search_fie
71265b648aa9410c0ec9aa250e50bf421dda23a4
Rename TestCase and test methods.
headers/cpp/ast_test.py
headers/cpp/ast_test.py
#!/usr/bin/env python # # Copyright 2008 Neal Norwitz # Portions Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
Python
0.017761
@@ -1912,16 +1912,46 @@ %0A%0Aclass +AstBuilder_ConvertBaseTokensTo AstTest( @@ -1987,32 +1987,8 @@ test -_ConvertBaseTokensToAST_ Simp @@ -2207,32 +2207,8 @@ test -_ConvertBaseTokensToAST_ Temp @@ -2491,32 +2491,8 @@ test -_ConvertBaseTokensToAST_ Temp @@ -2832,32 +2832,8 @@ test -_ConvertBaseTokensToAST_ T...
8aa52ea8f07f922bc6d5952ca8ad56bedd042a1f
Bump version number.
nativeconfig/version.py
nativeconfig/version.py
VERSION = '2.3.0'
Python
0
@@ -10,9 +10,9 @@ '2. -3 +4 .0'%0A
1085c00f4372a0ab63cf8b597983adecf3f5ad76
Refactor conversion to float array.
svtools/breakpoint.py
svtools/breakpoint.py
import l_bp class Breakpoint: ''' Class for storing information about Breakpoints for merging ''' def __init__(self, line, percent_slop=0, fixed_slop=0): ''' Initialize with slop for probabilities ''' self.l = line (self.sv_type, self.chr_l, self...
Python
0
@@ -406,17 +406,16 @@ start_r, - %0A @@ -418,33 +418,32 @@ self.end_r, - %0A m) = l_ @@ -472,215 +472,103 @@ -# TODO Handle missing PRPOS and PREND with intelligent message. Pull out into method.%0A self.p_l = %5Bfloat(x) for x in m%5B'PRPOS'%5D.split(',')%5D%0A self.p_r = %...
fb223397ccdee519af7e17dc73db864fe0120e8b
Create a random HDFS folder for unit testing
fs/tests/test_hadoop.py
fs/tests/test_hadoop.py
""" fs.tests.test_hadoop: TestCases for the HDFS Hadoop Filesystem This test suite is skipped unless the following environment variables are configured with valid values. * PYFS_HADOOP_NAMENODE_ADDR * PYFS_HADOOP_NAMENODE_PORT [default=50070] * PYFS_HADOOP_NAMENODE_PATH [default="/"] All tests will be executed wi...
Python
0
@@ -390,16 +390,28 @@ unittest +%0Aimport uuid %0A%0Afrom f @@ -677,29 +677,50 @@ def -setUp(self +__init__(self, *args, **kwargs ):%0A +%0A name @@ -707,32 +707,37 @@ args):%0A%0A +self. namenode_host = @@ -780,32 +780,37 @@ _ADDR%22)%0A +self. namenode_port = @@ -852,16 +852,60 @...
db33f2d1e14c48cd2c73ae3e3c835fac54f39224
lower bool priority, raise int priority
sympy/core/sympify.py
sympy/core/sympify.py
"""sympify -- convert objects SymPy internal format""" # from basic import Basic, BasicType, S # from numbers import Integer, Real # from interval import Interval import decimal class SympifyError(ValueError): def __init__(self, expr, base_exc=None): self.expr = expr self.base_exc = base_exc d...
Python
0.999987
@@ -1975,88 +1975,8 @@ n a%0A - elif isinstance(a, bool):%0A raise NotImplementedError(%22bool support%22)%0A @@ -2365,16 +2365,96 @@ * imag%0A + elif isinstance(a, bool):%0A raise NotImplementedError(%22bool support%22)%0A elif
4dac601f24556f3949e7a0e711d1a1b56215beac
Bump version for release.
jsmin/__init__.py
jsmin/__init__.py
# This code is original from jsmin by Douglas Crockford, it was translated to # Python by Baruch Even. It was rewritten by Dave St.Germain for speed. # # The MIT License (MIT) # # Copyright (c) 2013 Dave St.Germain # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and...
Python
0
@@ -1509,17 +1509,17 @@ = '2.0. -7 +8 '%0A%0A%0Adef
926bf60c77673571cb8f6d12e3754507f41b9e80
add optional args
ngage/plugins/napalm.py
ngage/plugins/napalm.py
from __future__ import absolute_import import ngage from ngage.exceptions import AuthenticationError, ConfigError import napalm_base from napalm_base.exceptions import ( ConnectionException, ReplaceConfigException, MergeConfigException ) @ngage.plugin.register('napalm') class Driver(ngage.plugins.Driver...
Python
0.000001
@@ -528,16 +528,75 @@ ssword') +%0A self.optional_args = config.get('driver_args', %7B%7D) %0A%0A @@ -697,21 +697,15 @@ - (na, driver -) = c @@ -731,16 +731,19 @@ (':', 2) +%5B1%5D %0A @@ -788,16 +788,16 @@ driver)%0A - @@ -846,16 +846,50 @@ password +, optional_args=self.o...
2573d4ba20649d0ed506b34bfe8aa932f17a6bbe
Fix handling of CTRL+C on Windows Windows doesn't support os.killpg
src/rez/cli/_util.py
src/rez/cli/_util.py
import os import sys import signal from rez.vendor.argparse import _SubParsersAction, ArgumentParser, SUPPRESS, \ ArgumentError # Subcommands and their behaviors. # # 'arg_mode' determines how cli args are parsed. Values are: # * 'grouped': Args can be separated by '--'. This causes args to be grouped into # li...
Python
0.000001
@@ -4203,24 +4203,124 @@ O_KILLPG%22):%0A + if os.name == %22nt%22:%0A os.kill(os.getpid(), signal.CTRL_C_EVENT)%0A else:%0A os.k
b524b8047467f0282e303aeec090833baf16dfd9
Use comprehension instead of map(add, ...).
dask/dot.py
dask/dot.py
from __future__ import absolute_import, division, print_function import re from subprocess import check_call, CalledProcessError from graphviz import Digraph from toolz.curried.operator import add from .core import istask, get_dependencies, ishashable from .compatibility import BytesIO def task_label(task): "...
Python
0
@@ -156,47 +156,8 @@ raph -%0Afrom toolz.curried.operator import add %0A%0Afr @@ -3457,15 +3457,8 @@ g = -map(add (fil @@ -3462,18 +3462,33 @@ filename -), + + ext for ext in ('.dot'
68cf8281b512ea5941ec0b88ca532409e0e97866
Fix circular import
app/evaluation/emails.py
app/evaluation/emails.py
import json from django.conf import settings from django.core.mail import send_mail from comicsite.core.urlresolvers import reverse from evaluation.models import Result, Job def send_failed_job_email(job: Job): message = ( f'Unfortunately the evaluation for the submission to ' f'{job.challenge.s...
Python
0.000005
@@ -131,50 +131,8 @@ rse%0A -from evaluation.models import Result, Job%0A %0A%0Ade @@ -162,13 +162,8 @@ (job -: Job ):%0A @@ -1023,16 +1023,8 @@ sult -: Result ):%0A