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
c54fb802932717b417ed2e189da85b500c8e06b8
Update rasa_core/policies/mapping_policy.py
rasa_core/policies/mapping_policy.py
rasa_core/policies/mapping_policy.py
import logging import os from typing import Any, List, Text, Optional from rasa_core.actions.action import (ACTION_LISTEN_NAME, ACTION_RESTART_NAME, ACTION_BACK_NAME) from rasa_core import utils from rasa_core.domain import Domain from rasa_core.policies.policy import Policy from...
Python
0
@@ -699,21 +699,11 @@ ty: -Optional%5B int -%5D = 5
e7c6d70fccf709e2d84a8e63fb01ce15aa6aff92
An Thing
django_www/common_settings.py
django_www/common_settings.py
# Settings common to www.djangoproject.com and docs.djangoproject.com import json import os import platform from unipath import FSPath as Path ### Utilities # The full path to the repository root. BASE = Path(__file__).absolute().ancestor(2) # Far too clever trick to know if we're running on the deployment server...
Python
0.999997
@@ -1121,16 +1121,17 @@ project' +, %0A
71f22b00c3a643a0615c54764db4d6a88291e1c1
Version bump
djangocms_snippet/__init__.py
djangocms_snippet/__init__.py
__version__ = '1.0.1'
Python
0.000001
@@ -12,11 +12,11 @@ = '1.0. -1 +2 '%0A
673b123b147b99f49357b02c227b1d34ae653485
Set up some realistic defaults.
bootstrap.py
bootstrap.py
"""This script will bootstrap the database to a minimal level for usage. You will be left with the following buildings: * Town Hall (homely). * Farm (requires Town Hall). * Stable (requires Farm) You will be left with the following land features: * Mine (provides gold) * Quarry (provides stone) * Lake (provides water...
Python
0
@@ -921,24 +921,33 @@ uildingType( +%0A name='Town H @@ -963,16 +963,49 @@ ely=True +, gold=15, wood=30, stone=10%0A )%0A fa @@ -1018,24 +1018,33 @@ uildingType( +%0A name='Farm', @@ -1061,16 +1061,46 @@ own_hall +, gold=5, wood=5, stone=1%0A )%0A st @@ -1115,24 +1115,33 @@ uildin...
96afec8d7a8adc60547dca4591dd9bc36ba31712
Move instance list generator into class
botox/aws.py
botox/aws.py
# If developing this further, see the following e-buddies to collaborate as they # also have internal/unreleased solutions and have indicated interest: # # * Gavin McQuillan (gmcquillan) # * Travis Swicegood (tswicegood) # * Christopher Groskopf (onyxfish) import os import pprint import sys import time from boto.ec...
Python
0.000001
@@ -3338,24 +3338,294 @@ **kwargs)%0A%0A + @property%0A def instances(self):%0A %22%22%22%0A Generator yielding all instances in this connection's account.%0A %22%22%22%0A for reservation in self.get_all_instances():%0A for instance in reservation.instances:%0A ...
7d60136a49fc908e0f1912d35b7154e15f548ba8
Remove redundant lines
bqx/query.py
bqx/query.py
import textwrap import bqx.parts import bqx.abstract from copy import deepcopy Column = bqx.parts.Column Table = bqx.parts.Table Alias = bqx.abstract.Alias class Query: def __init__(self, udf=[], indent=True, auto_alias=False): self.partial = True self.applied_c = [] self.alias_name = Non...
Python
0.999999
@@ -1404,83 +1404,8 @@ s))%0A - elif arg == self._Special.ALL:%0A col.append('*')%0A @@ -5215,110 +5215,33 @@ -if self.alias_name:%0A return self.alias_name%0A else:%0A return self.real_name +raise NotImplementedError %0A%0A
208b6cf99d90494df9a0f6d66a0ea3669ff5fe66
remove get, add ls and rm
dog/ext/config.py
dog/ext/config.py
import logging from discord.ext import commands from dog import Cog log = logging.getLogger(__name__) class Config(Cog): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.permitted_keys = [ 'woof_response' ] @commands.group() @commands.guild_...
Python
0.000002
@@ -1362,12 +1362,29 @@ me=' -get' +list', aliases=%5B'ls'%5D )%0A @@ -1402,18 +1402,19 @@ config_ -ge +lis t(self, @@ -1412,35 +1412,24 @@ st(self, ctx -, name: str ):%0A %22 @@ -1435,30 +1435,36 @@ %22%22%22 -Fetches a config field +Lists set configuration keys for @@ -1481,25 +1481,24 @@ er. %2...
786cedc72c913d6026c45a75947a3f7195f6b118
Check isn't necessary
purchase_partial_invoicing/wizard/po_line_invoice.py
purchase_partial_invoicing/wizard/po_line_invoice.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>) # Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>) # # This program is free software: you can redistribute it and/or modify # ...
Python
0
@@ -2915,47 +2915,8 @@ _id%0A - if not_invoiced_lines.ids:%0A @@ -2969,43 +2969,8 @@ e%7D)%0A - if invoiced_lines.ids:%0A
546f1188444365a365dc1dd7a81c2ffc974cf8b2
change of documentation in the param vector class
ParamVector.py
ParamVector.py
class ParamVector(object): """ This class represents the vectors that defines a firewall a ParamVector is a class that represents a vector that defines a firewall. we have our indicator functions that should get parameters, lets call these functions g1...gn for each gi we can say that there is a vec...
Python
0
@@ -399,17 +399,17 @@ sum of -F +f i%5Egi wh @@ -412,17 +412,17 @@ where -F +f i is a m
edd054533e122d67b1d60cf51d366591044d443e
add docstring for remove [ticket:1715]
lib/sqlalchemy/orm/scoping.py
lib/sqlalchemy/orm/scoping.py
# scoping.py # Copyright (C) the SQLAlchemy authors and contributors # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import sqlalchemy.exceptions as sa_exc from sqlalchemy.util import ScopedRegistry, ThreadLocalRegistry, \ ...
Python
0.000004
@@ -1690,32 +1690,98 @@ f remove(self):%0A + %22%22%22Dispose of the current contextual session.%22%22%22%0A %0A if self.
1c7317ea85206541c8d518a3fc6cb338ad6873d3
Fix requires_auth decorator
fickle/api.py
fickle/api.py
import os from functools import wraps import flask from flask import request, json USERNAME = 'fickle' def Response(data, status = 200): body = json.dumps(data) return flask.Response(body, status = status, mimetype = 'application/json') def SuccessResponse(dataset_id = None): return Response({ 'success'...
Python
0.000001
@@ -648,16 +648,85 @@ uth(f):%0A + if not bool(os.environ.get('FICKLE_PASSWORD')):%0A return f%0A @wra
de09ac74af398e30f41acea106235cdafdc55c7d
Fix typo
grip/assets.py
grip/assets.py
from __future__ import print_function, unicode_literals import errno import os import posixpath import re import sys import shutil from abc import ABCMeta, abstractmethod try: from urlparse import urljoin except ImportError: from urllib.parse import urljoin import requests from flask import safe_join from .c...
Python
0.999999
@@ -933,16 +933,17 @@ def _st +r ip_url_p @@ -1450,16 +1450,17 @@ self._st +r ip_url_p
9437e024b1e1630e06d1b05972eb9049af442be0
fix bad copy/paste
build_all.py
build_all.py
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import subprocess # list of projects progs = [ {'path': 'apps/EHD', 'travis': True}, {'path': 'apps/fractal/cpp', 'travis': False}, {'path': 'apps/GenMAI', 'travis': True}, {'path': 'apps/md5', 'travis': True}, {'path': 'apps/minibarreTE', '...
Python
0.000009
@@ -949,23 +949,22 @@ eune', ' -lejeune +travis ': True%7D
a8cb15b1983c48547edfeb53bfb63245f7e7c892
Revert "log integrations with zabbix through pyzabbix"
dbaas_zabbix/__init__.py
dbaas_zabbix/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import sys from dbaas_zabbix.dbaas_api import DatabaseAsAServiceApi from dbaas_zabbix.provider_factory import ProviderFactory from pyzabbix import ZabbixAPI stream = logging.StreamHandler(sys.stdout) stream.setLevel(logging.DEBUG) log = logging.getLogger('p...
Python
0
@@ -43,35 +43,8 @@ -*-%0A -import logging%0Aimport sys%0A%0A from @@ -190,169 +190,8 @@ PI%0A%0A -stream = logging.StreamHandler(sys.stdout)%0Astream.setLevel(logging.DEBUG)%0Alog = logging.getLogger('pyzabbix')%0Alog.addHandler(stream)%0Alog.setLevel(logging.DEBUG)%0A %0Adef
81c1f1609428690ff4ba951c7454054dbd5f9c54
add new channelsection files to the gyp file
ircd.gyp
ircd.gyp
{ 'variables': { 'python-includes': 'python -c "from distutils import sysconfig; import ntpath; print sysconfig.get_python_inc().replace(ntpath.sep, \'/\')"', 'python-version': 'python -c "from distutils import sysconfig; print sysconfig.get_config_var(\\"VERSION\\")"', 'python-libpath': 'python -c "fr...
Python
0
@@ -820,32 +820,66 @@ ude/channel.h',%0A + 'include/channelsection.h',%0A 'include/c @@ -2288,32 +2288,63 @@ rc/channel.cc',%0A + 'src/channelsection.cc',%0A 'src/clien
b3c1b3b66d1c720172e731d1bfc44cfb44c992a3
Revert of [Android] Re-enable content_browsertests on main waterfall. (https://codereview.chromium.org/132403005/)
build/android/pylib/gtest/gtest_config.py
build/android/pylib/gtest/gtest_config.py
# Copyright (c) 2013 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. """Configuration file for android gtest suites.""" # Add new suites here before upgrading them to the stable list below. EXPERIMENTAL_TEST_SUITES = [ ...
Python
0.000251
@@ -303,32 +303,60 @@ TEST_SUITES = %5B%0A + 'content_browsertests',%0A 'content_gl_ @@ -1020,36 +1020,8 @@ s',%0A - 'content_browsertests',%0A %5D%0A%0AW
3812403655153e86a8b0e1ac68c9b15e69d6a4e3
Update BUILD_OSS to 4770.
src/data/version/mozc_version_template.bzl
src/data/version/mozc_version_template.bzl
# Copyright 2010-2021, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and ...
Python
0
@@ -1609,9 +1609,9 @@ = 47 -5 +7 0%0A%0A#
c3d610472708cd95054c4cb3447023051e2e0479
rename hash/chksum -> md5sum in more places
dogen/plugins/cct.py
dogen/plugins/cct.py
import os import yaml import subprocess import shutil from dogen.plugin import Plugin class CCT(Plugin): @staticmethod def info(): return "cct", "Support for configuring images via cct" def __init__(self, dogen): super(CCT, self).__init__(dogen) def extend_schema(self, parent_schema...
Python
0
@@ -3898,12 +3898,14 @@ ce%5B' -hash +md5sum '%5D = @@ -3917,11 +3917,11 @@ ce%5B' -chk +md5 sum'
3c223248a80043b12e700b09f1e32ebf54f6ebd3
Support Path objects for DataLibrary.register_filename
openmc/data/library.py
openmc/data/library.py
import os import xml.etree.ElementTree as ET import h5py from openmc.mixin import EqualityMixin from openmc._xml import clean_indentation from openmc.checkvalue import check_type class DataLibrary(EqualityMixin): """Collection of cross section data libraries. Attributes ---------- libraries : list ...
Python
0
@@ -37,16 +37,31 @@ ee as ET +%0Aimport pathlib %0A%0Aimport @@ -1277,32 +1277,40 @@ filename : str + or Path %0A Pat @@ -1366,113 +1366,134 @@ -# Support pathlib%0A # TODO: Remove when support is Python 3.6+ only%0A filename = str( +if not isinstance(filename, pathlib.Path):%0A ...
b6d747599661f3ce19b4d2f6ea9f80ec9839a2d8
Update couchm.reactor.py
resources/reactors/couchm.reactor.py
resources/reactors/couchm.reactor.py
#!/usr/bin/python import argparse import mosquitto #from pushover import PushoverClient import os, sys import urllib2 import json, base64 #Posting data to couchDB def post(doc): global config url = 'http://%(server)s/%(database)s/_design/energy_data/_update/measurement' % config # print url request = urllib2....
Python
0
@@ -132,16 +132,36 @@ , base64 +%0Aimport ConfigParser %0A%0A#Posti
ad5df2624e19779f264443f9ec779ab8a018baaa
Add socket based fallback approach in get_local_ip
catt/util.py
catt/util.py
import ipaddress import json import tempfile import time from pathlib import Path import click import ifaddr def warning(msg): click.secho("Warning: ", fg="red", nl=False, err=True) click.echo("{}.".format(msg), err=True) def echo_json(data_dict): click.echo(json.dumps(data_dict, indent=4, default=str)...
Python
0
@@ -22,16 +22,30 @@ rt json%0A +import socket%0A import t @@ -1610,24 +1610,512 @@ l_ip(host):%0A + %22%22%22%0A The primary ifaddr based approach, tries to guess the local ip from the cc ip,%0A by comparing the subnet of ip-addresses of all the local adapters to the subnet of the cc ip.%0A This should w...
1453c4c7fa7283e461b9870372679ac5df94c834
remove extraneous print statement
update.py
update.py
# class to help update local file geodatabase data from SDE from os.path import join import arcpy from datetime import datetime from numpy.testing import assert_almost_equal from itertools import izip changes = [] def updateFGDBfromSDE(fgdb, sde, logger=None): global changes """ fgdb: file geodatabase ...
Python
0.999999
@@ -2384,46 +2384,8 @@ or:%0A - print(row%5B0%5D)%0A
7a2fd7bbdaed3ffda3cb8740d38e5f3e88dd8ce8
add name for the thread
update.py
update.py
from time import time from app import db import argparse from jobs import update_registry from util import elapsed # needs to be imported so the definitions get loaded into the registry import jobs_defs """ examples of calling this: # update everything python update.py Person.refresh --limit 10 --chunk 5 --rq # up...
Python
0
@@ -1070,16 +1070,99 @@ queue%22) +%0A parser.add_argument('--name', nargs=%22?%22, type=str, help=%22name for the thread%22) %0A%0A #
ce625cb3c6769e859d47b3bcc90bc772b7d92a3e
use default widget many2one in tree view
partner_multi_relation_tabs/tablib/tab.py
partner_multi_relation_tabs/tablib/tab.py
# Copyright 2014-2018 Therp BV <https://therp.nl>. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). import logging from lxml import etree from odoo import _ from odoo.osv.orm import transfer_modifiers_to_node _logger = logging.getLogger(__name__) # pylint: disable=invalid-name NAME_PREFIX = '...
Python
0.000001
@@ -1519,34 +1519,24 @@ et='many2one -_clickable ')%0A t @@ -1865,18 +1865,8 @@ 2one -_clickable ')%0A
0b54c244e6e4b745a678fe69fc1be7c16850203d
Fix a mistake.
python/distutils/example_without_dependency/setup.py
python/distutils/example_without_dependency/setup.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # PyNurseryRhymesDemo # The MIT License # # Copyright (c) 2010,2015 Jeremie DECOCK (http://www.jdhp.org) # # 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 ...
Python
0.003448
@@ -1607,17 +1607,8 @@ m :: - POSIX :: OS
d0a42e06baa46f1f9455fbfbe16a0ba3f16b4b61
Fix CellView has no set_completion method
gaphor/adapters/profiles/metaclasseditor.py
gaphor/adapters/profiles/metaclasseditor.py
""" Metaclass item editors. """ from builtins import object from zope import component from gi.repository import Gtk from zope.interface import implementer from gaphor import UML from gaphor.adapters.propertypages import create_hbox_label, EventWatcher from gaphor.core import _, transactional from gaphor.diagram imp...
Python
0
@@ -1397,15 +1397,34 @@ oBox -(model= +.new_with_model_and_entry( mode
e129577665a9d476888a8d3ad949d5754cd7744b
remove cosines from args
gary/coordinates/tests/test_propermotion.py
gary/coordinates/tests/test_propermotion.py
# coding: utf-8 """ Test conversions in propermotion.py """ from __future__ import absolute_import, division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" import tempfile import numpy as np import astropy.coordinates as coord import astropy.units as u from ..propermotion import * _txt = """ #...
Python
0.004387
@@ -1548,26 +1548,15 @@ mulb -, cosb=True )%5B:,0%5D%0A + @@ -1913,19 +1913,8 @@ mulb -, cosb=True )%0A @@ -2277,29 +2277,16 @@ (c, muad -, cosdec=True )%5B:,0%5D%0A @@ -2591,32 +2591,32 @@ %5D))*u.mas/u.yr%0A%0A + trans_mu @@ -2646,21 +2646,8 @@ muad -, cosdec=True )%0A
6c11b9cc9b213928e32d883d4f557f7421da6802
Add kamerstukken to dossier API
document/api.py
document/api.py
from rest_framework import serializers, viewsets from document.models import Document, Kamerstuk, Dossier class DossierSerializer(serializers.HyperlinkedModelSerializer): documents = serializers.HyperlinkedRelatedField(read_only=True, view_name='document-detail...
Python
0
@@ -380,16 +380,233 @@ =True)%0A%0A + kamerstukken = serializers.HyperlinkedRelatedField(read_only=True,%0A view_name='kamerstuk-detail',%0A many=True)%0A%0A clas @@ -683,16 +683,32 @@ 'title', + 'kamerstukke...
4f8c2e6ccab17f220a46d9b8e22bf72dffceb135
Improve Unit Tests for Dashboard
test/test_dashboard.py
test/test_dashboard.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015-2017: # Matthieu Estrada, ttamalfor@gmail.com # # This file is part of (AlignakApp). # # (AlignakApp) 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 Sof...
Python
0
@@ -882,16 +882,32 @@ t_config +, set_app_config %0Afrom al @@ -4582,24 +4582,130 @@ dget.pos()%0A%0A + # Test set_position affect Dashboard%0A set_app_config('Dashboard', 'position', 'top:right')%0A unde @@ -4726,17 +4726,16 @@ ition()%0A -%0A @@ -4796,12 +4796,255 @@ al_position)...
2642128696fd0448edac6623d57b5964775c339a
add reset command
dog/ext/time.py
dog/ext/time.py
import logging import datetime import discord import pycountry import pytz from discord.ext.commands import group from lifesaver.bot import Cog, Context from lifesaver.bot.storage import AsyncJSONStorage log = logging.getLogger(__name__) class Time(Cog): def __init__(self, bot): super().__init__(bot) ...
Python
0.000042
@@ -1223,24 +1223,457 @@ ed_time%7D')%0A%0A + @time.command(name='reset')%0A async def time_reset(self, ctx: Context):%0A %22%22%22Resets your timezone.%22%22%22%0A if await ctx.confirm(title='Are you sure?', message='Your timezone will be removed.'):%0A try:%0A await self...
68cdb1264ba77367f10f880103aaf558498a0ed8
Return None on poll of "starting" container
dockerspawner/swarmspawner.py
dockerspawner/swarmspawner.py
""" A Spawner for JupyterHub that runs each user's server in a separate docker service """ from pprint import pformat from textwrap import dedent from docker.types import ( ContainerSpec, TaskTemplate, Resources, EndpointSpec, Mount, DriverConfig ) from docker.errors import APIError from tornado import gen from t...
Python
0.000241
@@ -3373,16 +3373,28 @@ unning%22, + %22starting%22, %22pendin
e0db7a514982a040b0d5d75faae8db5e531a7789
Fix missed quotes
dimod/core/initialized.py
dimod/core/initialized.py
# Copyright 2020 D-Wave Systems 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...
Python
0
@@ -2548,16 +2548,21 @@ e func:%60 +dimod .as_samp @@ -3915,16 +3915,17 @@ le with +%60 %60%5B'initi @@ -3997,16 +3997,17 @@ 'seed'%5D%60 +%60 as gene
51e35e88597d2c34905222cd04a46a2a840c0d92
Refactor Poly ABC
dimod/core/polysampler.py
dimod/core/polysampler.py
# Copyright 2019 D-Wave Systems 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...
Python
0
@@ -727,16 +727,118 @@ aclass%0A%0A +from dimod.core.composite import Composite%0Afrom dimod.higherorder.polynomial import BinaryPolynomial%0A%0A __all__ @@ -853,16 +853,38 @@ ampler', + 'ComposedPolySampler' %0A%0A%0A@add_ @@ -943,18 +943,8 @@ pler -/Composite sup @@ -969,20 +969,16 @@ omials.%0A - %0A ...
e9806e906ae8a15dceb5aeb77cdacb753af3943c
Make interpolation compatibility optional
Lib/fontmake/font_project.py
Lib/fontmake/font_project.py
# Copyright 2015 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 by applicable law or a...
Python
0.000002
@@ -1807,16 +1807,25 @@ run_all( +%0A self, gl @@ -1849,16 +1849,34 @@ th=None, + compatible=False, interpo @@ -2432,16 +2432,43 @@ time()%0A + if compatible:%0A @@ -2496,29 +2496,102 @@ tic( +* ufos -, compatible=True +)%0A else:%0A for ufo in ufos:%0A ...
efc4826bf692937129f57a046c5d06c02c0dc911
Update pd.DataFrame.read_excel parameters
vdd/io.py
vdd/io.py
import re import collections import itertools import warnings import numpy as np try: import pandas as pd import xlrd except ImportError: warnings.warn('`pandas` and `xlrd` packages required for ' 'spreadsheet support.') class ExcelParser(object): # 20 characteristic definitions a...
Python
0
@@ -995,22 +995,19 @@ -par +u se -_ cols=%22C:
81cd0b74e611532f8421d0dfb22266cd789a5a6a
add in oauth_keys to dev (bug 858813)
solitude/settings/sites/dev/db.py
solitude/settings/sites/dev/db.py
"""private_base will be populated from puppet and placed in this directory""" import logging import dj_database_url import private_base as private from solitude.settings import base from django_sha2 import get_password_hashers ADMINS = () ALLOWED_HOSTS = ['payments-dev.allizom.org', 'localhost'] DATABASES = {} D...
Python
0
@@ -1045,27 +1045,29 @@ True%0ACLIENT_ -JWT +OAUTH _KEYS = priv @@ -1081,11 +1081,13 @@ ENT_ -JWT +OAUTH _KEY
a8972158ab12ec3aef3a224264f1145d5ed910e4
Move intervention to corner nav and outwork to footer
derrida/outwork/migrations/0002_initial_pages.py
derrida/outwork/migrations/0002_initial_pages.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-17 20:12 from __future__ import unicode_literals from collections import OrderedDict from attrdict import AttrDict from django.conf import settings from django.db import migrations from django.utils import timezone from mezzanine.core.models import CONTE...
Python
0
@@ -3313,23 +3313,29 @@ ,%0A (' -outwork +interventions ', %7B'tit @@ -3344,18 +3344,92 @@ ': ' -Outwork +Interventions',%0A 'description': 'Explore the traces of Derrida%E2%80%99s reading. '%7D) +, %0A%5D)%0A @@ -3734,24 +3734,63 @@ _content%7D),%0A + ('outwork', %7B'title': 'Outwork'%7D),%0A (...
6e3ad1b462a95a5d51ab7b56e475b334fed32260
add "--style=symbol_index" for outputting symbox index
shotglass/app/management/commands/show.py
shotglass/app/management/commands/show.py
import collections import os import sys from django.core.management.base import BaseCommand from django.db.models import Avg, Max, Sum from app.models import SourceFile, Symbol def show_file_index(projects): FORMAT = '{name:20} {path:50} {num_lines:>5}' print FORMAT.format(name='NAME', path='PATH', num_line...
Python
0.000487
@@ -1072,24 +1072,17 @@ als())%0A%0A -# XX V1 %0A + def show @@ -1125,36 +1125,20 @@ = '%7B -name +0 :30%7D %7B -path%7D:%7Bline_number +1%7D:%7B2 %7D'%0A%0A @@ -1270,16 +1270,21 @@ +proj_ symbols @@ -1290,17 +1290,13 @@ = S -ourceLine +ymbol .obj @@ -1312,32 +1312,45 @@ er(%0A +source...
701bb76a49ec88ba1352ca85e75c43e5f204ab73
remove commented code commited by mistake.
depsolver/solver/core.py
depsolver/solver/core.py
import six from depsolver.errors \ import \ DepSolverError from depsolver.compat \ import \ OrderedDict from depsolver.bundled.traitlets \ import \ HasTraits, Instance from depsolver.solver.decisions \ import \ DecisionsSet from depsolver.operations \ import \ ...
Python
0
@@ -2510,84 +2510,8 @@ ed:%0A - #print %22%5Ctrule %7B%7D is an assertion or disabled%22.format(rule)%0A @@ -2608,69 +2608,8 @@ 0%5D%0A%0A - #print %22%5Ctlooking at literal %7B%7D%22.format(literal)%0A
b068180ef61b3e865bc0eb325e7722ddffa72bce
Add OTP_VERIFY_URL default val
droll/settings.py
droll/settings.py
""" Django settings for droll project. Generated by 'django-admin startproject' using Django 1.8.13. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ import os im...
Python
0.000005
@@ -3402,16 +3402,49 @@ ss.User' +%0A%0AOTP_VERIFY_URL = '/access/otp/' %0AOTP_SES
3422c60553c6cd1a746e7c6e39a3e2ac707b0cf7
return only mean predictions for cost and omit variance
robo/acquisition/EnvEntropySearch.py
robo/acquisition/EnvEntropySearch.py
''' Created on Jun 8, 2015 @author: Aaron Klein ''' import emcee import numpy as np from robo.acquisition.LogEI import LogEI from robo.acquisition.EntropyMC import EntropyMC from scipy import stats class EnvEntropySearch(EntropyMC): ''' classdocs ''' def __init__(self, model, cost_model, X_lower,...
Python
0.000001
@@ -835,23 +835,24 @@ def -compute +__call__ (self, X @@ -965,16 +965,19 @@ edict(X) +%5B0%5D %0A%0A @@ -1295,16 +1295,17 @@ _old%5D%5D)%0A +%0A @@ -1659,16 +1659,16 @@ ubspace%0A + @@ -1747,9 +1747,8 @@ e == 1%5D%0A -%0A
2d8c8cce8885b24ac1766912ee7bd1897900ae0c
fix up Comment model
dwitter/models.py
dwitter/models.py
from django.db import models from django.contrib.auth import get_user_model from django.contrib.auth.models import User from django.dispatch import receiver from django.db.models.signals import pre_delete def get_sentinel_user(): users = get_user_model().objects return users.get_or_create(username='[deleted]'...
Python
0.000001
@@ -1889,16 +1889,17 @@ s%22)%0A +_ author = @@ -1950,16 +1950,159 @@ SCADE)%0A%0A + @property%0A def author(self):%0A return self._author%0A%0A @author.setter%0A def author(self, value):%0A self._author = value%0A%0A def
142a893a006d3226d8d4caa512c8fdfffd9acb31
Fix CLI dispatch to work with previous refactoring
dotfiles/cli.py
dotfiles/cli.py
# -*- coding: utf-8 -*- """ dotfiles.cli This module provides the CLI interface to dotfiles. """ import os from . import core import ConfigParser from optparse import OptionParser, OptionGroup DEFAULT_REPO = "~/Dotfiles" def method_list(object): return [method for method in dir(object) if callable...
Python
0
@@ -4049,24 +4049,27 @@ 1)%0A%0A -getattr( +dotfiles = core.Dot @@ -4078,240 +4078,652 @@ les( -location=opts.repo,%0A prefix=opts.prefix,%0A ignore=opts.ignore,%0A externals=opts.externals,%0A force=opts.force),...
3c87476c4d0861638ff7c3d6950377c75d3057dd
read true positions
streams/io/core.py
streams/io/core.py
# coding: utf-8 """ Code for helping to select stars from the nearby Sgr wraps. """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import os, sys import gc # Third-party import h5py import numpy as np import numexpr import astropy.units as u from as...
Python
0.000938
@@ -1574,32 +1574,280 @@ cl%5B%22tub%22%5D.value%0A + return_dict%5B%22true_particles%22%5D = Particle(ptcl%5B%22true_data%22%5D.value.T,%0A frame=heliocentric,%0A units=%5Bu.Unit(x) for x in ptcl%5B%22un...
51522b68b55a0a5a8a879ef6592960b3d8a465bb
Add status raise
scraper.py
scraper.py
import csv import sys import time import lxml.html import progressbar import requests from cache import Cache USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) ' \ 'AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.80 ' \ 'Safari/537.36' RATE_LIMIT_SLEEP = 0.01 CACHE = Ca...
Python
0.000001
@@ -2289,16 +2289,49 @@ AGENT%7D)%0A + response.raise_for_status()%0A%0A cont
c98662bf577afa1dcf1b847193dd2e856a90e864
Fix flopped windows comment
examples/app-two-programs.py
examples/app-two-programs.py
# ----------------------------------------------------------------------------- # Copyright (c) 2009-2016 Nicolas P. Rougier. All rights reserved. # Distributed under the (new) BSD License. # ----------------------------------------------------------------------------- import numpy as np from glumpy import gl, app, glo...
Python
0
@@ -676,11 +676,12 @@ the -lef +righ t%0Apr @@ -791,36 +791,35 @@ ) # red on the -righ +lef t%0Aprogram2%5B'a_po
818f1431fe67120967f385ee090d06c1038e48c4
Add project level imports so users don't have to worry about the module names.
dimensionful/__init__.py
dimensionful/__init__.py
Python
0
@@ -0,0 +1,105 @@ +from units import Unit%0Afrom quantity import Quantity%0A%0Afrom common_units import *%0Afrom constants import *%0A
d511bd84295a8d07f886ca8482cfea25dfca0519
fix comment
skimage/transform/tests/test_geometric.py
skimage/transform/tests/test_geometric.py
import numpy as np from numpy.testing import assert_equal, assert_array_almost_equal from skimage.transform._geometric import _stackcopy from skimage.transform import (estimate_transform, SimilarityTransform, AffineTransform, ProjectiveTransform, Polynomial...
Python
0
@@ -4593,17 +4593,9 @@ ms)%0A - %0A +%0A %0Adef @@ -4707,38 +4707,42 @@ transformation -matrix +parameters %0A tform2 = Po
c713aa4953063cb6e64ecaaaed464f2a441482bb
Add testing scaffolding.
lilkv/testsuite/test_basic.py
lilkv/testsuite/test_basic.py
# -*- coding: utf-8 -*- """ lilkv.testsuite.basic Test lilkv basic functionality. """ from lilkv.testsuite import LilKVTestCase from lilkv.keyspace import Keyspace from lilkv.columnfamily import ColumnFamily from lilkv.column import Column class BasicTests(LilKVTestCase): """Baseclass for testing out ...
Python
0
@@ -667,8 +667,149 @@ milies)%0A +%0A def test_adding_data(self):%0A pass%0A%0A def test_reading_data(self):%0A pass%0A%0A def test_deleting_data(self):%0A pass%0A
f9e4d580eb01d16a2ed48d64b7413dedb1c3bdb1
make requested changes
cupy/indexing/insert.py
cupy/indexing/insert.py
import numpy import cupy from cupy import core def place(arr, mask, vals): """Change elements of an array based on conditional and input values. This function uses the first N elements of `vals`, where N is the number of true values in `mask`. Args: arr (cupy.ndarray): Array to put data int...
Python
0
@@ -2255,16 +2255,8 @@ ore. -_kernel. Elem @@ -2493,32 +2493,34 @@ place, based on +a conditional mask @@ -2704,16 +2704,17 @@ Args +: %0A @@ -3444,36 +3444,35 @@ :%0A raise -Valu +Typ eError('%60a%60 shou @@ -3549,36 +3549,35 @@ :%0A raise -Valu +Typ eError('%60mask%60 s @@ -3686...
34fa0d9a3285c8161a34bcf39dae0474c4fd34c4
allow members to be specified on instantiation
salt/states/libcloud_loadbalancer.py
salt/states/libcloud_loadbalancer.py
# -*- coding: utf-8 -*- ''' Apache Libcloud Load Balancer State =================================== Manage load balancers using libcloud :codeauthor: :email:`Anthony Shaw <anthonyshaw@apache.org>` Apache Libcloud load balancer management for a full list of supported clouds, see http://libcloud.readthedocs.io/en/...
Python
0
@@ -1439,27 +1439,41 @@ gorithm=None +, members=None ):%0A - '''%0A @@ -1993,32 +1993,157 @@ gorithm: %60%60str%60%60 +%0A%0A :param members: An optional list of members to create on deployment%0A :type members: %60%60list%60%60 of %60%60dict%60%60 (ip, port) %0A '''%0A bal @@ -2357,32 +2357,2...
573d1e2498467da357a79bb865683e162e16eb14
increment version to 0.13.1
gym/version.py
gym/version.py
VERSION = '0.13.0'
Python
0.000683
@@ -9,11 +9,11 @@ = '0.13. -0 +1 '%0A
d83e8f8702755766c1c15a35297b40d25051d55e
Bump version
gym/version.py
gym/version.py
VERSION = '0.4.8'
Python
0
@@ -12,7 +12,7 @@ 0.4. -8 +9 '%0A
3f6d5aa5ee18462ff3a9a0e366ea48f508c93a58
move to target
character.py
character.py
import pyglet # noqa from pyglet.gl import * # noqa from utility import load_image, mainbatches, window_width, window_height, calc_vel_xy # noqa from collide import * # noqa import random import math # from controller import Controller def mean(inp): return sum(inp) / float(len(inp)) green_sprite = pyglet.image...
Python
0
@@ -722,24 +722,51 @@ ke_sprite()%0A + self.target = None%0A # se @@ -869,32 +869,400 @@ f update(self):%0A + if not self.target:%0A self.target = (random.randint(50, window_width - 50), random.randint(50, window_height - 50))%0A print self.target%0A print self.sprite_m...
bb9aafe090d71c2a25eb3f3a6d591a205dbb7e5e
bump to 0.9.5
dvc/__init__.py
dvc/__init__.py
""" DVC ---- Make your data science projects reproducible and shareable. """ import os VERSION = '0.9.4' if os.getenv('APPVEYOR_REPO_TAG', '').lower() != 'true' and os.getenv('TRAVIS_TAG', '') == '': # Dynamically update version try: import git repo = git.Repo(os.curdir, search_parent_director...
Python
0
@@ -100,9 +100,9 @@ 0.9. -4 +5 '%0A%0Ai
3b65181e01aeaa884f3386f131aa2fcf0b09a3c7
remove unneeded <??:?? for unknown ETA
dvc/progress.py
dvc/progress.py
"""Manages progress bars for DVC repo.""" import logging import sys from threading import RLock from funcy import merge from tqdm import tqdm from dvc.utils import env2bool logger = logging.getLogger(__name__) tqdm.set_lock(RLock()) class Tqdm(tqdm): """ maximum-compatibility tqdm-based progressbars "...
Python
0.999655
@@ -835,22 +835,16 @@ elapsed%7D -%3C??:?? , %7Brate_
14d1466400ee37c41b5b57146666913a4feb5254
Add device information to solarlog integration (#43680)
homeassistant/components/solarlog/sensor.py
homeassistant/components/solarlog/sensor.py
"""Platform for solarlog sensors.""" import logging from urllib.parse import ParseResult, urlparse from requests.exceptions import HTTPError, Timeout from sunwatcher.solarlog.solarlog import SolarLog from homeassistant.const import CONF_HOST from homeassistant.helpers.entity import Entity from homeassistant.util impo...
Python
0
@@ -344,16 +344,24 @@ t import + DOMAIN, SCAN_IN @@ -3025,16 +3025,263 @@ _state%0A%0A + @property%0A def device_info(self):%0A %22%22%22Return the device information.%22%22%22%0A return %7B%0A %22identifiers%22: %7B(DOMAIN, self.entry_id)%7D,%0A %22name%22: self.device_nam...
3aac2716972c49eb3b1b688cb1fad89ce690ca58
fix incorrect empty list condition
filter_log.py
filter_log.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2017 ciel <ciel@cieldeMBP> # # Distributed under terms of the MIT license. """ filter git log """ import codecs from call_cmd import call import config def filter_log(last_commit): commit_valid = call('git -C {} cat-file -e '.format(...
Python
0.999117
@@ -804,16 +804,20 @@ %0A if +not log_has_ @@ -826,14 +826,8 @@ efix -.count :%0A
ee795da3215374f30005c9daa42de6f9d581580f
Make finglonger output a bit easier to read
finglonger.py
finglonger.py
#!/usr/bin/python import os import sys import subprocess import tempfile import yaml def validate_config(config): environment = config.get('environment') if environment is None: print "No environment set, set one in config.yaml " sys.exit(1) def validate_environment(config): if os.path...
Python
0.000005
@@ -1854,24 +1854,43 @@ )%0A%0A print + %22Tasks on master%22, len(master_ @@ -1905,16 +1905,94 @@ print + %22Tasks on done%22, len(done_tasks)%0A print %22Tasks to do%22, len(master_tasks) - len(don
cb4f022fb1fe0780eb2e37c8fdc8ff6a4409115c
Test and implementation for !ptr+offset loading
ostester/yamlreader.py
ostester/yamlreader.py
import collections.abc from io import StringIO import yaml import ast def parse(file): return yaml.safe_load(file) def parse_from_string(string): return parse(StringIO(string)) class Zeros(collections.abc.Sequence): """ Represents a zeroed region of memory in C >>> yaml.load("!zeros 5") ...
Python
0
@@ -1426,24 +1426,89 @@ er('value')%0A + %3E%3E%3E yaml.load('!ptr array+3')%0A Pointer('array', offset=3)%0A %3E%3E%3E yaml @@ -1531,16 +1531,16 @@ alue%22))%0A - %22!pt @@ -1671,22 +1671,27 @@ ffset = +int( offset +) %0A%0A @s @@ -1734,32 +1734,85 @@ (loader, node):%0A + args = map(st...
fe9e6e0335716333c7cbdf6d11a737125551dc5f
Use get_terminal_size directly from shutil on newer Python version.
halo/_utils.py
halo/_utils.py
# -*- coding: utf-8 -*- """Utilities for Halo library. """ import codecs import platform import six from backports.shutil_get_terminal_size import get_terminal_size from colorama import init from termcolor import colored init(autoreset=True) def is_supported(): """Check whether operating system supports main sy...
Python
0
@@ -93,16 +93,123 @@ ort six%0A +from sys import version_info%0Aif version_info %3E= (3, 3):%0A from shutil import get_terminal_size%0Aelse:%0A from bac
3329b260fbea858dcfe3f6f6a9ff365467352d1f
optimize sum_lines for time consuming
fileprocess/filesline.py
fileprocess/filesline.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- r""" # .---. .----------- # / \ __ / ------ # / / \( )/ ----- (`-') _ _(`-') <-. (`-')_ # ////// '\/ ` --- ( OO).-/( (OO ).-> .-> \( OO) ) .-> # //// / // : : --- (,------...
Python
0.012633
@@ -1346,12 +1346,421 @@ -pass +# TODO(edony): optimize algorithm of sum_lines method%0A filesname = %5B%5D%0A for item_dir in self.dirlist.keys():%0A for item_file in self.dirlist%5Bitem_dir%5D%5B1%5D:%0A filesname.append(item_dir + '/' + item_file)%0A for filename ...
e1f1f0ca797b639a730e8804dbd5595ad0f395e0
Add docstring for module.py
package_name/module.py
package_name/module.py
import numpy as np def cubic_rectification(x): ''' Returns the rectified value of the cube of X. If X is positive, this is the cube of X, if X is negative it is 0. ''' return np.maximum(0, x**3)
Python
0.000001
@@ -1,8 +1,72 @@ +%22%22%22%0AModule provides a simple cubic_rectification function.%0A%22%22%22%0A%0A import n
d71c0745a4032ce60dd506e91665e46c4c98271f
Update forwarder_ZMQ_Server.py
ProBot_Server/Midi_Device/forwarder_ZMQ_Server.py
ProBot_Server/Midi_Device/forwarder_ZMQ_Server.py
#!/usr/bin/python import zmq def main(): print "\nServer for ProBot is running..." try: context = zmq.Context(1) # Socket facing clients frontend = context.socket(zmq.SUB) frontend.bind("tcp://*:5559") frontend.setsockopt(zmq.SUBSCRIBE, "") # So...
Python
0.000001
@@ -52,25 +52,27 @@ %22%5Cn -Server for ProBot +ProBot's ZMQ Server is @@ -83,16 +83,17 @@ ing...%22%0A +%0A try:
788cc159e4d734b972e22ccf06dbcd8ed8f94885
Update DictStack implementation from jaraco.collections 3.5.1
distutils/_collections.py
distutils/_collections.py
import collections import itertools # from jaraco.collections 3.5 class DictStack(list, collections.abc.Mapping): """ A stack of dictionaries that behaves as a view on those dictionaries, giving preference to the last. >>> stack = DictStack([dict(a=1, c=2), dict(b=2, a=2)]) >>> stack['a'] 2 ...
Python
0
@@ -60,17 +60,19 @@ ions 3.5 +.1 %0A - class Di @@ -356,32 +356,57 @@ tack%5B'c'%5D%0A 2%0A + %3E%3E%3E len(stack)%0A 3%0A %3E%3E%3E stack.pu @@ -1017,21 +1017,43 @@ eversed( +tuple(list.__iter__( self) +)) :%0A @@ -1197,16 +1197,16 @@ other):%0A - @@ -1262,8 +1262,69 @@ other)%0...
3ff2ecfd26097b37832a397a43db6121a0bc3627
Remove superfluous comment.
djadyen/management/commands/adyen_maintenance.py
djadyen/management/commands/adyen_maintenance.py
from datetime import timedelta from django.apps import apps from django.core.management.base import BaseCommand from django.utils import timezone from djadyen import settings from djadyen.choices import Status from djadyen.models import AdyenNotification class Command(BaseCommand): help = "Process the adyen not...
Python
0.000001
@@ -487,216 +487,8 @@ S%5D%0A%0A - #%0A # N.B. In our implementations there use to be a limit at how far back in the past we%0A # would go to process notifications. I'm not sure why it existed, so i've removed it.%0A #%0A%0A
32eba84ec5527f1afc82998e98f5d15035e311c1
Allow forced loading. Contemplating changing the default too.
chef/base.py
chef/base.py
from chef.api import ChefAPI class DelayedAttribute(object): """Descriptor that calls ._populate() before access to implement lazy loading.""" def __init__(self, attr): self.attr = attr def __get__(self, instance, owner): if instance is None: return self if not getattr...
Python
0
@@ -865,32 +865,43 @@ , name, api=None +, lazy=True ):%0A self. @@ -1014,16 +1014,66 @@ elf.name +%0A if not lazy:%0A self._populate() %0A%0A @c
6ba2dc8cf06efd74cae941c370e75ccddcf1d25c
fix broken arg of DnnL2Pool2DNode
treeano/sandbox/nodes/l2_pool.py
treeano/sandbox/nodes/l2_pool.py
import numpy as np import theano import theano.tensor as T import treeano import treeano.nodes as tn fX = theano.config.floatX @treeano.register_node("l2_pool") class L2PoolNode(treeano.Wrapper1NodeImpl): """ node that takes the L2 norm of the pooled over region """ hyperparameter_names = ("pool_s...
Python
0.000004
@@ -1424,19 +1424,8 @@ ame, - pool_size, **k
539038ba1135b68786adb44d7660c82a96794971
Remove logging
imgproc.py
imgproc.py
from SimpleCV import * import numpy import cv2 def process_image(obj, img, config, each_blob=None): """ :param obj: Object we're tracking :param img: Input image :param config: Controls :param each_blob: function, taking a SimpleCV.Blob as an argument, that is called for every candidate blob :...
Python
0.000001
@@ -382,128 +382,8 @@ V()%0A - print(%5Bconfig.min_hue, config.min_sat, config.min_val%5D)%0A print(%5Bconfig.max_hue, config.max_sat, config.max_val%5D)%0A
372ce38d1ddcf2fd65d83df2499d97d4fc2128e6
Fix issue in cbb.py
ed2d/physics/cbb.py
ed2d/physics/cbb.py
from ed2d.physics.collisiondata import* from ed2d.glmath import vector # Circle Bounding Box class CBB(object): def __init__(self, radius, center): '''Creates a circle bounding box object to be used with the physics engine. Takes in a float for the radius and an array for the center.''' self.radius =...
Python
0.000001
@@ -735,17 +735,16 @@ etration - %0A %09de @@ -901,16 +901,21 @@ return +self. center%0A%0A @@ -954,14 +954,20 @@ return +self. radius +%0A
1451d199833b405929105f939f57b4d4faf50fa2
Use new py.test to generate vector-vs-scalar tests
skyfield/tests/test_vectorization.py
skyfield/tests/test_vectorization.py
"""Determine whether arrays work as well as individual inputs.""" import pytest from numpy import array from ..constants import T0 from ..planets import earth, mars from ..timescales import JulianDate, julian_date dates = array([ julian_date(1969, 7, 20, 20. + 18. / 60.), T0, julian_date(2012, 12, 21), ...
Python
0
@@ -64,21 +64,34 @@ %22%22%0A%0A +from itertools import -pytest +izip %0Afro @@ -444,22 +444,21 @@ %5D)%0A%0Adef -genera +compu te_plane @@ -963,173 +963,310 @@ ce%0A%0A -@pytest.fixture(params=%5Bgenerate_planetary_position%5D)%0Adef gradual_computation(request):%0A return request.param%0A%0Adef test_gradu...
0ea687403b01dbc6268c15550f0caf45a54e9106
Fix Joust picking with multiple minions in the deck
fireplace/cards/utils.py
fireplace/cards/utils.py
import random from hearthstone.enums import CardClass, CardType, GameTag, Race, Rarity from ..actions import * from ..aura import Refresh from ..dsl import * from ..events import * from ..utils import custom_card # For buffs which are removed when the card is moved to play (eg. cost buffs) # This needs to be Summon, ...
Python
0
@@ -1888,16 +1888,23 @@ = Joust( +RANDOM( FRIENDLY @@ -1917,18 +1917,26 @@ + MINION +) , +RANDOM( ENEMY_DE @@ -1947,16 +1947,17 @@ MINION) +) %0A%0A%0Adef S
42462135cec040d17f8ce4488c1ee6bb3b59f406
Bump mono-basic to @mono/mono-basic/b8011b2f274606323da0927214ed98336465f467
packages/mono-basic.py
packages/mono-basic.py
GitHubTarballPackage ('mono', 'mono-basic', '3.0', '0d0440feccf648759f7316f93ad09b1e992ea13a', configure = './configure --prefix="%{prefix}"', override_properties = { 'make': 'make' } )
Python
0.000001
@@ -42,55 +42,57 @@ ', ' -3 +4 .0 +.1 ', ' -0d0440feccf648759f7316f93ad09b1e992ea13a +b8011b2f274606323da0927214ed98336465f467 ',%0A%09
3ddddbd24bb37c30df80233ec4c70c38b6c29e82
Update leaflet request to be over https
emstrack/forms.py
emstrack/forms.py
from django.contrib.gis.forms import widgets class LeafletPointWidget(widgets.BaseGeometryWidget): template_name = 'leaflet/leaflet.html' class Media: css = { 'all': ('https://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css', 'leaflet/css/location_form.css', ...
Python
0
@@ -198,38 +198,51 @@ 'https://cdn -.leafletjs.com +js.cloudflare.com/ajax/libs /leaflet/v0. @@ -418,22 +418,35 @@ /cdn -.leafletjs.com +js.cloudflare.com/ajax/libs /lea
984140261620ae275aaedebe044502f2be185b0f
Remove legacy_api.utils.filter_version() as it's not used at all
src/olympia/legacy_api/utils.py
src/olympia/legacy_api/utils.py
import re from django.conf import settings from django.utils.html import strip_tags from olympia import amo from olympia.amo.helpers import absolutify from olympia.amo.urlresolvers import reverse from olympia.amo.utils import urlparams, epoch from olympia.tags.models import Tag from olympia.versions.compare import ve...
Python
0
@@ -278,57 +278,8 @@ Tag%0A -from olympia.versions.compare import version_int%0A %0A%0A# @@ -5265,371 +5265,4 @@ ms)%0A -%0A%0Adef filter_version(version, app_id):%0A %22%22%22%0A Returns filters that can be sent to ES for app version ranges.%0A%0A If the version is a alpha, beta, or pre-release this does ...
612698f37ab726fb77aa1f284c97d01d1d726abf
Bump version
django_anyvcs/__init__.py
django_anyvcs/__init__.py
# Copyright (c) 2014-2016, Clemson University # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditio...
Python
0
@@ -1561,13 +1561,13 @@ __ = '2. -4 +5 .0'%0A
e5e3afeb61f0c6da8a8f2cf7ce6e8c822517ba8d
refactor unsupported parameter
ensembl/models.py
ensembl/models.py
# # Author    : Manuel Bernal Llinares # Project   : trackhub-creator # Timestamp : 03-07-2017 16:50 # --- # © 2017 Manuel Bernal Llinares <mbdebian@gmail.com> # All rights reserved. # """ This module contains Ensembl models used as Entities and DAO/Services """ import config_manager class Species: def __init...
Python
0.000007
@@ -610,16 +610,21 @@ default +Value ='-not_a @@ -767,16 +767,21 @@ default +Value %0A%0A de
9674a0869c2a333f74178e305677259e7ac379c3
Make the Websocket's connection header value case-insensitive
examples/ignore_websocket.py
examples/ignore_websocket.py
# This script makes mitmproxy switch to passthrough mode for all HTTP # responses with "Connection: Upgrade" header. This is useful to make # WebSockets work in untrusted environments. # # Note: Chrome (and possibly other browsers), when explicitly configured # to use a proxy (i.e. mitmproxy's regular mode), send a CON...
Python
0.005274
@@ -1042,10 +1042,15 @@ -if +value = flo @@ -1101,20 +1101,51 @@ one) - == %22Upgrade +%0A if value and value.upper() == %22UPGRADE %22:%0A
7c90e73d3ffa2a8209a751b01c7cd8bd3122b13b
Use actual feature values instead of binary for making pivot predictions
scripts/build_pivot_training_data.py
scripts/build_pivot_training_data.py
#!/usr/bin/env python from os.path import join, dirname from sklearn.datasets import load_svmlight_file, dump_svmlight_file import numpy as np import scipy.sparse import sys from uda_common import read_feature_groups def main(args): if len(args) < 3: sys.stderr.write("Three required arguments: <pivot file...
Python
0
@@ -1621,33 +1621,13 @@ += -( all_X - %3E 0).astype('int') %0A
58d754c3904f53c2fbb527a8fd7d9abf19c37a52
clear cache after switching
cms/views.py
cms/views.py
import os import pygit2 import shutil from beaker.cache import cache_region from cms import models as cms_models, utils from gitmodel.workspace import Workspace from pyramid.view import view_config from pyramid.renderers import get_renderer from pyramid.decorator import reify from pyramid.httpexceptions import HTTPFo...
Python
0.000001
@@ -69,16 +69,32 @@ e_region +, cache_managers %0Afrom cm @@ -334,16 +334,17 @@ PFound%0A%0A +%0A CACHE_TI @@ -4004,32 +4004,154 @@ ync_repo_index() +%0A%0A # clear caches%0A for _cache in cache_managers.values():%0A _cache.clear() %0A return
187bd62a74d9b1bc995085a90cbcfa700e2454a7
Bump to 2.0.1.
wessex.py
wessex.py
import hashlib import hmac import posixpath import urllib import urlparse import requests __all__ = ['Harold', 'connect_harold'] __version__ = '2.0.0' class Harold(object): def __init__(self, url, secret, timeout=3): self.scheme, self.netloc, self.path, query, fragment = urlparse.urlsplit(url) ...
Python
0
@@ -144,17 +144,17 @@ = '2.0. -0 +1 '%0A%0A%0Aclas
d981caff4b6710a3779f25fd8955fd111d9ea0cf
fix export error in dj 19
django_tablib/datasets.py
django_tablib/datasets.py
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from .base import BaseDataset class SimpleDataset(BaseDataset): def __init__(self, queryset, headers=None, encoding='utf-8'): self.queryset = queryset self.encoding = encoding if headers is None: ...
Python
0
@@ -569,32 +569,217 @@ ct)%0A +try:%0A field_names = v_qs.query.values_select%0A except AttributeError:%0A # django %3C 1.9%0A field_names = v_qs.field_names%0A headers.extend(v @@ -777,21 +777,16 @@ .extend( -v_qs. field_na
82de88c784018a0a1403a117a5fbb2b386f8a41f
Comment added
ThreeDeeBFS.py
ThreeDeeBFS.py
"""Author:Dom Modica The purpose of this program is to solve the problem described @ http://www.reddit.com/r/dailyprogrammer/comments/2o5tb7/2014123_challenge_191_intermediate_space_probe/ Essentially one is to create a 2D NxN matrix along with various obstacles denoted as gravity wells and asteroids and implement a BF...
Python
0
@@ -3364,16 +3364,55 @@ n moves: + #iterates through the bank of %22moves%22 %0A @@ -3693,16 +3693,17 @@ move%5B2%5D%5D + %0A
a43b62c60b00233fa84c66bf4a332410903476eb
fix typo
django_fabric/fabfile.py
django_fabric/fabfile.py
# -*- coding: utf8 -*- from fabric.api import local, run, cd from fabric.operations import sudo from fabric import colors from fabric.context_managers import settings from fabric.contrib.console import confirm from fabric.contrib import django from fabric.utils import abort class App(): project_paths = {} pro...
Python
0.999991
@@ -3125,17 +3125,16 @@ les%5B -' instance '%5D)%0A @@ -3129,12 +3129,11 @@ instance -' %5D)%0A
a5add45a7f4fb1f9651e49fb5f20fe1c9953c0b8
Assert expected dates for A1
esios/archives.py
esios/archives.py
# -*- coding: utf-8 -*- from datetime import datetime from libsaas import http, parsers, port from libsaas.services import base from esios.utils import translate_param, serialize_param LIQUICOMUN_PRIORITY = [ 'C7', 'A7', 'C6', 'A6', 'C5', 'A5', 'C4', 'A4', 'C3', 'A3', 'C2', 'A2', 'C1', 'A1' ] def parser_n...
Python
0.999994
@@ -46,16 +46,51 @@ datetime +%0Afrom dateutil import relativedelta %0A%0Afrom l @@ -605,21 +605,21 @@ alidate_ -dates +range (self, s @@ -981,21 +981,21 @@ alidate_ -dates +range (start_d @@ -2956,64 +2956,569 @@ %22%22%22%0A - ## Validate dates in A1 period (this month & future) +%0A def validate_range(s...
2aaf601b3ad1bbce9252b10e709e76995b00845c
Use thousand separator in numbers
django_zoook/settings.py
django_zoook/settings.py
# -*- coding: utf-8 -*- ############################################################################################ # # Zoook e-sale for OpenERP, Open Source Management Solution # Copyright (C) 2011 Zikzakmedia S.L. (<http://www.zikzakmedia.com>). All Rights Reserved # $Id$ # # Module Modified: 2012-06-07 ...
Python
0.00002
@@ -1612,16 +1612,47 @@ AL = 5%0A%0A +USE_THOUSAND_SEPARATOR = True%0A%0A CATALOG_
4c500ce1995da97861e37647b61efaf14c6b08d0
Load saved RDD
code/main.py
code/main.py
from spark_model import SparkModel import socket from document import Document from pyspark import SparkContext, SparkConf from boto.s3.connection import S3Connection from pyspark import SparkConf, SparkContext import json import sys from datetime import datetime def log_results(model_type, start_time, end_time, score...
Python
0.000001
@@ -266,32 +266,39 @@ def log_results( +saved, model_type, star @@ -345,16 +345,16 @@ _subs):%0A - with @@ -745,16 +745,47 @@ score)%0A + f.write('Saved.'*saved)%0A %0A%0Aif __n @@ -1463,16 +1463,26 @@ process( +'rdd3.pkl' )%0A su @@ -1583,41 +1583,127 @@ s -m.RDD.saveAsPickleFile('rdd.pkl') ...
74158ab0decf443dcb8222e1220deba664bb26c9
Use cls.objects when we check for objects attribute, fixes issue #6
djmoney/models/fields.py
djmoney/models/fields.py
from django.db import models from django.utils.encoding import smart_unicode from exceptions import Exception from moneyed import Money, Currency, DEFAULT_CURRENCY from djmoney import forms from decimal import Decimal __all__ = ('MoneyField', 'currency_field_name', 'NotSupportedLookup') currency_field_name...
Python
0
@@ -3834,32 +3834,23 @@ ger(cls. -_default_manager +objects )%0D%0A
9ec2382de5a3d5377fee03a6151e5afbf36f8e71
add doc link
code/mode.py
code/mode.py
def mode(array): count = {} for elem in array: try: count[elem] += 1 except (KeyError): count[elem] = 1 # get max count maximum = 0 modeKey = 0 for key in count.keys(): if count[key] > maximum: maximum = count[key] modeKey =...
Python
0
@@ -1,8 +1,159 @@ +# an in-depth rundown of this program%0A# can be found at:%0A# https://github.com/joshhartigan/learn-programming/blob/master/Most%2520Frequent%2520Integer.md%0A%0A def mode
ae2284fa85e1ef7be43792b72480018729b1c2ba
Bump PEP version for __version__ comment
fluent_blogs/__init__.py
fluent_blogs/__init__.py
# following PEP 386 __version__ = "1.0" # Fix for internal messy imports. # When base_models is imported before models/__init__.py runs, there is a circular import: # base_models -> models/managers.py -> invoking models/__init__.py -> models/db.py -> base_models.py # # This doesn't occur when the models are imported f...
Python
0.000001
@@ -13,11 +13,11 @@ PEP -386 +440 %0A__v
ac249c24c2f72764a8618a0f2e9cd1909d50d1d5
Allow to specify custom options for EscapeCode preprocessor.
foliant/backends/base.py
foliant/backends/base.py
from importlib import import_module from shutil import copytree from datetime import date from logging import Logger from foliant.utils import spinner class BaseBackend(object): '''Base backend. All backends must inherit from this one.''' targets = () required_preprocessors_before = () required_prep...
Python
0
@@ -3270,32 +3270,108 @@ e):%0A +if isinstance(self.config%5B'escape_code'%5D, dict):%0A escapecode_ preprocessors = @@ -3370,42 +3370,255 @@ ssor -s = -(%0A 'escapecode' +%7B%0A 'escapecode': self.config%5B'escape_code'%5D.get('options', %7B%7D)%0A ...
ef9cd0033ccfd314592be7987c262a61d0ec2fba
fix thing I apparently never testedgit add light.py
light.py
light.py
import RPi.GPIO as GPIO class Light: def __init__(self, pin): self.pin = pin self.status = False GPIO.setup(pin, GPIO.OUT) def toggle(self): self.status = not self.status self.do() def on(self): self.status = True self.do() def off(self): self.status = False self.do() ...
Python
0
@@ -347,24 +347,22 @@ put( -light +self .pin, -light +self .sta @@ -373,21 +373,20 @@ %0A if -light +self .status: @@ -454,13 +454,12 @@ m': -light +self .pin
31387ec27be3757ee7dceac7cc4d196fc74fdd65
Allow parameter server to be killed
worker.py
worker.py
#!/usr/bin/env python import cv2 import go_vncdriver import tensorflow as tf import argparse import logging import os import universe.utils from a3c import A3C from envs import create_env logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) # Disables write_meta_graph argument, which freezes entire proc...
Python
0.000001
@@ -101,16 +101,28 @@ logging%0A +import time%0A import o @@ -5008,25 +5008,24 @@ :ps%22%5D))%0A -%0A server.j @@ -5020,20 +5020,47 @@ -server.join( +while True:%0A time.sleep(1000 )%0A%0Ai
f0d4b430b627fb9e2b18ba3f82c936698fac6430
Update to version 1.3
__openerp__.py
__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Account Report CSV, for OpenERP # Copyright (C) 2013 XCG Consulting (http://odoo.consulting) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Aff...
Python
0
@@ -1022,17 +1022,17 @@ on%22: %221. -2 +3 %22,%0A %22
7b176d1e775ddec384a76d6de9c121e114a8738e
load ACL
__openerp__.py
__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Account Analytic Online, for OpenERP # Copyright (C) 2013 XCG Consulting (www.xcg-consulting.fr) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
Python
0.000002
@@ -1402,16 +1402,56 @@ ata%22: %5B%0A + 'security/ir.model.access.csv',%0A
febfb4c9a5ec5ddfe1f13067c1bc63533e58b09b
DEBUG = False
elgassia/settings.py
elgassia/settings.py
""" Django settings for elgassia project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) i...
Python
0.000001
@@ -715,35 +715,36 @@ uction!%0ADEBUG = -Tru +Fals e%0A%0ATEMPLATE_DEBU @@ -747,19 +747,20 @@ DEBUG = -Tru +Fals e%0A%0ATEMPL @@ -1202,16 +1202,55 @@ me',%0A)%0A%0A +# should be changed in local_settings%0A%0A ALLOWED_ @@ -1258,16 +1258,25 @@ OSTS = %5B +%0A '*'%0A %5D%0A%0A%0A# Ap @@ -2269,16 +2269,58 @@ ...
08fddbdc0ac70a549bac82131771218107186def
add discription
__openerp__.py
__openerp__.py
# -*- coding: utf-8 -*- { 'name': "Account Discount", 'summary': """ Apply Discount model to taxes""", 'description': """ The purpose is to apply discount record for the same tax model """, 'author': "Khaled Hamed", 'website': "http://www.grandtk.com", # Categories can be...
Python
0.000952
@@ -83,37 +83,43 @@ -Apply Discount model to taxes +Use Tax model for discounts as well %22%22%22, @@ -155,70 +155,508 @@ -The purpose is to apply discount record for the same tax model +%0A Odoo OpenERP Account Discount from Tax%0A %0AThis module adds new concept to use tax model as discount mod...
6d83f2150f7c6177385b9f2d8abbe48cd2979130
Add staleness to MonthCache Admin display
events/admin.py
events/admin.py
from django.contrib import admin from .models import Calendar,MonthCache # Register your models here. @admin.register(Calendar) class CalendarAdmin(admin.ModelAdmin): list_display = ('name','remote_id','css_class') @admin.register(MonthCache) class MonthCacheAdmin(admin.ModelAdmin): list_display = ('calend...
Python
0
@@ -341,11 +341,28 @@ ched_on' +,'is_cache_stale' )%0A%0A
d308bbd0200e1b4783bf63cafda03650579b9351
change help text
ynr/apps/official_documents/models.py
ynr/apps/official_documents/models.py
import os from django.db import models from django.urls import reverse from django_extensions.db.models import TimeStampedModel DOCUMENT_UPLOADERS_GROUP_NAME = "Document Uploaders" def document_file_name(instance, filename): return os.path.join( "official_documents", str(instance.ballot.ballot_paper_id)...
Python
0.000029
@@ -923,26 +923,14 @@ The -page that links to +URL of thi
cedae39716587fcc0459a05e74acc43b190d7457
split download
example-era5.py
example-era5.py
#!/usr/bin/env python # (C) Copyright 2018 ECMWF. # # This software is licensed under the terms of the Apache Licence Version 2.0 # which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. # In applying this licence, ECMWF does not waive the privileges and immunities # granted to it by virtue of its status...
Python
0.000005
@@ -779,24 +779,5 @@ b%22)%0A -print(r)%0Ar.delete() %0A