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
45089267983376caea0d1e34dd92e9bb3f539010
add nutils.SI to container image
devtools/container/build.py
devtools/container/build.py
import argparse, textwrap, typing, sys, json from contextlib import ExitStack from pathlib import Path from tempfile import NamedTemporaryFile from .. import log, run from .._git import Git from . import OFFICIAL_CONTAINER_REPO, Container, Mount, get_container_tag_from_ref parser = argparse.ArgumentParser(description=...
Python
0
@@ -2688,24 +2688,8 @@ ase, - network='none', mou @@ -2863,16 +2863,156 @@ D='0'))%0A + container.run('pip', 'install', '--no-cache-dir', 'https://github.com/evalf/nutils-SI/archive/main.tar.gz', env=dict(PYTHONHASHSEED='0'))%0A contai
eb6b21ed3cbb1607910f10c21a93d120591d1190
move to wasabi for printing messages
tests/run.py
tests/run.py
#!/usr/bin/env python """Run the test suite that is specified in the .travis.yml file """ import os import sys import subprocess import yaml from colors import green, red def run_test(command, directory): """Execute a command that runs a test""" wrapped_command = "cd %s && %s" % (directory, command) pi...
Python
0
@@ -146,22 +146,22 @@ rom -colors +wasabi import gree @@ -160,19 +160,11 @@ ort -green, red%0A +msg %0A%0Ade @@ -424,27 +424,24 @@ -print(green +msg.good (%22TEST P @@ -443,25 +443,24 @@ EST PASSED%22) -) %0A else:%0A @@ -466,25 +466,24 @@ -print(red +msg.fail (%22TEST F @@ -489,17 ...
00d4e01f67a5ee0be16d14e4e1c105e24498fe3f
Use timezone-aware datetimes in API tests.
conf_site/api/tests/test_presentation.py
conf_site/api/tests/test_presentation.py
import datetime from django.core.urlresolvers import reverse from rest_framework import status from symposion.conference.models import Section from symposion.schedule.models import ( Presentation, Slot, SlotKind, Schedule, Day, ) from symposion.proposals.models import ProposalKind from symposion.s...
Python
0
@@ -1,21 +1,4 @@ -import datetime%0A%0A from @@ -37,16 +37,50 @@ reverse +%0Afrom django.utils import timezone %0A%0Afrom r @@ -1444,27 +1444,27 @@ ate= -datetime.date.today +timezone.now().date (),%0A @@ -1653,29 +1653,28 @@ start= -datetime.time +timezone.now (),%0A @@ -1693,21 +1693,20 @@ end= -dateti...
d3a0f891a17fa0dd96b632d9b43492ad1e1a00f3
Update test_SKIP_run_notebooks_pydata_2016_im2_ete3.py
_unittests/ut_documentation/test_SKIP_run_notebooks_pydata_2016_im2_ete3.py
_unittests/ut_documentation/test_SKIP_run_notebooks_pydata_2016_im2_ete3.py
# -*- coding: utf-8 -*- """ @brief test log(time=8s) """ import sys import os import unittest import shutil from pyquickhelper.loghelper import fLOG, CustomLog, run_cmd from pyquickhelper.pycode.venv_helper import is_virtual_environment from pyquickhelper.pycode import get_temp_folder, skipif_travis from pyquickh...
Python
0.000002
@@ -401,24 +401,8 @@ _ut%0A -import jupytalk%0A %0A%0Acl @@ -4107,32 +4107,64 @@ n the notebooks%0A + import jupytalk %0A res = ex
e796af14bf209c3322acbd87021a7f2954817cff
Update views_admin.py
electoral_district/views_admin.py
electoral_district/views_admin.py
# electoral/views_admin.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from .models import ElectoralDistrict, ElectoralDistrictManager from .controllers import electoral_districts_import_from_sample_file from admin_tools.views import redirect_to_sign_in_page from django.http import HttpResponse, Http...
Python
0.000001
@@ -4,16 +4,25 @@ lectoral +_district /views_a @@ -2572,8 +2572,9 @@ rgs=())) +%0A
3e22300eef4340af11b4e82e272e91229efade3c
Update documentation
src/pybel/io/web.py
src/pybel/io/web.py
# -*- coding: utf-8 -*- """This module facilitates rudimentary data exchange with `BEL Commons <https://bel-commons.scai.fraunhofer.de>`_.""" import logging import os import requests from .nodelink import from_json, to_json from ..constants import ( DEFAULT_SERVICE_URL, PYBEL_REMOTE_HOST, PYBEL_REMOTE_PASSWORD,...
Python
0
@@ -1186,17 +1186,16 @@ %22%22%22Send -s a graph @@ -1266,16 +1266,17 @@ e object +. %0A%0A :p @@ -1378,32 +1378,148 @@ Commons server. + Alternatively, looks up in PyBEL config with%0A %60%60PYBEL_REMOTE_HOST%60%60 or the environment as %60%60PYBEL_REMOTE_HOST%60%60 Defaults to%0A @@ -2766,17 +2766...
2b755e9d26942233cbeeccb4b13456a6bede007b
Fix watcherPackage loading
src/octopus/worker/process.py
src/octopus/worker/process.py
''' Used by Worker to spawn a new process. ''' __author__ = "Olivier Derpierre" __copyright__ = "Copyright 2009, Mikros Image" import logging import os import sys import subprocess import resource from octopus.worker import settings LOGGER = logging.getLogger("main.process") CLOSE_FDS = (os.name != 'nt') def setli...
Python
0
@@ -2153,13 +2153,24 @@ s) i -s str +n %5Bstr, unicode%5D :%0A
39256ba6b6f62b85e9ed302ad3b66784552dac1e
Remove impact from CalendarDay model
predicthq/endpoints/v1/events/schemas.py
predicthq/endpoints/v1/events/schemas.py
from predicthq.endpoints.schemas import ( PaginatedMixin, SortableMixin, Model, ResultSet, ListType, StringType, GeoJSONPointType, StringListType, StringModelType, Area, ModelType, IntRange, IntType, DateTimeRange, DateTimeType, FloatType, ResultType, DictType, DateType, Place, DateAround, LocationAroun...
Python
0
@@ -3306,39 +3306,16 @@ tType()%0A - impact = IntType()%0A rank
54ec9a2e13acbb9f92be9867c1e748e4cff3f324
Fix bug in translation logic
newsApp/translation.py
newsApp/translation.py
import os import logging import json import requests import urllib.request, urllib.parse, urllib.error from googleapiclient.discovery import build logger = logging.getLogger('translation') MSTRANSLATE_LANGS = ['hi', 'bn', 'ta', 'mr', 'gu', 'te', 'kn', 'ml'] GOOGLE_LANGS = ['hi', 'bn', 'ta', 'mr', 'gu', 'te', 'kn', '...
Python
0.000002
@@ -1474,16 +1474,25 @@ .content +.decode() )%0A%0Adef t
349dac6773f2154939334d8ed0cc3a3f5b3371d3
test commit
healthcareai/tests/test_dev_supervised_model_class.py
healthcareai/tests/test_dev_supervised_model_class.py
import unittest import numpy as np import pandas as pd from healthcareai import DevelopSupervisedModel from healthcareai.tests.helpers import fixture class TestRFDevTuneFalse(unittest.TestCase): def setUp(self): df = pd.read_csv(fixture('HCPyDiabetesClinical.csv'), na_values=['N...
Python
0.000001
@@ -3156,17 +3156,17 @@ 0.67188 -4 +5 )%0A%0A d
60a01f23f376842e9f84e33f5720d6c42330c2ea
Add dashboard.shipping to OSCAR_CORE_APPS
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, 1, 0, 'dev') def get_short_version(): return '%s.%s' % (VERSION[0], VERSION[1]) def get_version(): version = '%s.%s' % (VERSION[0], VERSION[1]) # Append 3rd digit if > 0 if VERSION[2]: versi...
Python
0
@@ -1846,24 +1846,61 @@ nications',%0A + 'oscar.apps.dashboard.shipping',%0A # 3rd-pa
2dba51717a096313ae7b4be770a4301d7770fad0
Remove password auth from pyrax
heat/engine/resources/rackspace/rackspace_resource.py
heat/engine/resources/rackspace/rackspace_resource.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
Python
0.000009
@@ -3262,24 +3262,88 @@ rax. -set_credentials( +auth_with_token(self.context.token,%0A tenant_id= self @@ -3351,24 +3351,25 @@ context. -username +tenant_id ,%0A @@ -3396,24 +3396,27 @@ -password +tenant_name =self.co @@ -3421,24 +3421,22 @@ context. -password +ten...
ad1131a3382963a4a17f78ed12194aeb67a2a240
Clean up lint and long lines in local.py
local.py
local.py
""" Local pmxbot extensions, incude the path to this file in your config.yaml. """ @command("yahoolunch", doc="Find a random neary restaurant for lunch using Yahoo Local. Defaults to 1 mile radius, but append Xmi to the end to change the radius.") def lunch(client, event, channel, nick, rest): yahooid = "eeGETYOUR...
Python
0
@@ -77,16 +77,84 @@ l.%0A%22%22%22%0A%0A +import random%0Aimport urllib%0A%0Afrom pmxbot import command, execdelay%0A%0A @command @@ -220,16 +220,23 @@ h using +%22%0A %22 Yahoo Lo @@ -296,16 +296,23 @@ end to +%22%0A %22 change t @@ -808,32 +808,40 @@ 236, results=20, +%0A query=%22lunch%22, ...
e1eb29666b3b02d2b4a7c33cb61a1c69f85ab95b
fix trailing spaces and finish implementation of multi_assoc
funcds/lookuptree.py
funcds/lookuptree.py
class LookupTreeNode: def __init__(self, index=-1, value=None): self.children = [None]*32 self.index = index self.value = value class LookupTree: def __init__(self, initvalues=None): self.root = LookupTreeNode() if initvalues == None: pass elif isinstance(initvalues, dict): for key,val in initvalues.i...
Python
0
@@ -1009,24 +1009,323 @@ rn newtree%0A%0A +%09def multi_assoc(self, values):%0A%09%09if isinstance(values, dict):%0A%09%09%09nndict = %5B(i, LookupTreeNode(i, values%5Bi%5D)) for i in values%5D%0A%09%09else:%0A%09%09%09nndict = %5B(i, LookupTreeNode(i, val)) for (i,val) in values%5D%0A%09%09newtree = LookupTree()%0A%0...
11a144016b66361d79e1fdcc5e6b15085051929b
add websites to admin
common/admin.py
common/admin.py
from django.contrib import admin # Register your models here.
Python
0
@@ -31,33 +31,62 @@ in%0A%0A -# Register your models here. +from .models import Website%0A%0Aadmin.site.register(Website) %0A
55d95118d3d694bef0656a4403d7a24e321cf332
Update to set functions.
codes/20200107_arcface_pytorch/src/temp.py
codes/20200107_arcface_pytorch/src/temp.py
from __future__ import print_function import os import numpy as np import random import time import torch from torch.utils import data import torch.nn.functional as F from torch.nn import DataParallel from torch.optim.lr_scheduler import StepLR import torchvision from config import config from utils import visualize...
Python
0
@@ -377,16 +377,25 @@ t resnet +, metrics %0A#from t @@ -433,16 +433,48 @@ main():%0A +%09device = torch.device(%22cuda%22)%0A%0A %09model = @@ -507,16 +507,547 @@ model)%0A%0A +%09num_classes = 13938%0A%09easy_margin = False%0A%09metric_fc = metrics.ArcMarginProduct(512, num_classes, s=30, m=0.5, easy_margin=easy...
f6e795efcfd7ec11e8163ec802a7b0b40f35a3ac
Fix base64 on Python 3 in yaql_functions.py
murano/engine/system/yaql_functions.py
murano/engine/system/yaql_functions.py
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
Python
0.000103
@@ -580,22 +580,8 @@ e.%0A%0A -import base64%0A impo @@ -682,16 +682,54 @@ pointer%0A +from oslo_serialization import base64%0A import s @@ -1154,17 +1154,22 @@ e64. -b64 encode +_as_text (val @@ -1291,17 +1291,22 @@ e64. -b64 decode +_as_text (val
96daf677b7eda7e4344da7e674d3d6c298875913
Fix OSS Android test failure
ReactNative/DEFS.bzl
ReactNative/DEFS.bzl
"""Helpers for referring to React Native open source code. This lets us build React Native: - At Facebook by running buck from the root of the fb repo - Outside of Facebook by running buck in the root of the git repo """ # @lint-ignore-every SKYLINT IS_OSS_BUILD = True GLOG_DEP = "//ReactAndroid/build/third-party-...
Python
0.000002
@@ -1079,24 +1079,114 @@ -_ignore = kwargs +new_kwargs = %7B%0A k: v%0A for k, v in kwargs.items()%0A if k.startswith(%22exported_%22)%0A %7D%0A %0A @@ -1272,16 +1272,38 @@ ty%22, %5B%5D) +,%0A **new_kwargs %0A )%0A%0A
329305b3da831bff3b883e368396f7c74b0bea90
print slug of new docs
collector/management/commands/configure.py
collector/management/commands/configure.py
import yaml from django.core.management.base import BaseCommand from django.utils.module_loading import import_string from ...models import Document class Command(BaseCommand): help = "Imprt configuration file" def add_arguments(self, parser): parser.add_argument('config_path') def handle(self,...
Python
0.000001
@@ -659,17 +659,19 @@ ( -_ +doc , create @@ -878,12 +878,16 @@ print d -ata +oc.slug %0A
d99011bc623f0c02c3fa35050c282f273f153d87
Update RestartProgram.py
ProBot_BeagleBone/RestartProgram.py
ProBot_BeagleBone/RestartProgram.py
#!/usr/bin/python import sys import os import zmq import SocketCommunication Pub_Sub = SocketCommunication.publisher_and_subscriber() class Restart(): def RestartProgram (self): while True: # Checking if the program needs to restart restartVar = Pub_Sub.subscriber2() if restartVar is None: restartVa...
Python
0.000001
@@ -71,16 +71,61 @@ cation%0A%0A +# Initialization of classes from local files%0A Pub_Sub
a3c6b1d66915d6f9e608bf81838d3ea7b66ba10a
Update find-the-duplicate-number.py
Python/find-the-duplicate-number.py
Python/find-the-duplicate-number.py
# Time: O(n) # Space: O(1) # Two pointers method, same as Linked List Cycle II. class Solution(object): def findDuplicate(self, nums): """ :type nums: List[int] :rtype: int """ # Treat each (key, value - 1) pair of the array as the (pointer, next) node of the linked list, ...
Python
0.000109
@@ -403,129 +403,9 @@ ist. -%0A # Besides, there is always a cycle in the linked list which%0A # starts from the last element of the array. +: %0A @@ -417,37 +417,25 @@ slow = nums%5B -len(nums) - 1 +0 %5D%0A fa @@ -453,28 +453,11 @@ ums%5B -len(nums) - 1%5D - 1%5D%0A +0%5D%5D %0A @@ -5...
36ebb3e124335fc99d14b8721164e4ea14a889b4
Add --force option to backfill_course_outlines.
cms/djangoapps/contentstore/management/commands/backfill_course_outlines.py
cms/djangoapps/contentstore/management/commands/backfill_course_outlines.py
""" Management command to create the course outline for all courses that are missing an outline. Outlines are built automatically on course publish and manually using the `update_course_outline` command, but they can be backfilled using this command. People updating to Lilac release should run this command as part of t...
Python
0
@@ -1385,271 +1385,682 @@ )%0A -%0A def handle(self, *args, **options):%0A dry_run = options.get('dry', False)%0A log.info(%22Starting backfill_course_outlines%7B%7D%22.format(%22 (dry run)%22 if dry_run else %22%22))%0A%0A all_course_keys_qs = CourseOverview.objects.values_list('id', flat=Tr...
58963d1d5e91ed0421076e8f32c9a7f124170990
edit exec env
panda.py
panda.py
#!/usr/bin/python3 #author=zeek import urllib.request import socket import json import time import threading import os import kmp import platform CHATINFOURL = 'http://www.panda.tv/ajax_chatinfo?roomid=' DELIMITER = b'}}' KMP_TABLE = kmp.kmpTb(DELIMITER) IGNORE_LEN = 16 FIRST_REQ = b'\x00\x06\x00\x02' FIRST_RPS = b'\x...
Python
0.000001
@@ -4,16 +4,20 @@ usr/bin/ +env python3%0A
cd87547806e12420f0e969ef6577353e14aef89b
Put initial time
exp/recommendexp/MovieLensDataset.py
exp/recommendexp/MovieLensDataset.py
import numpy import array import logging import sys import pickle import os import scipy.sparse import numpy.testing as nptst import gc from datetime import datetime, timedelta from exp.util.SparseUtils import SparseUtils from apgl.util.PathDefaults import PathDefaults from apgl.util.Util import Util fro...
Python
0.000038
@@ -138,16 +138,29 @@ ort gc %0A +import time %0A from dat @@ -962,17 +962,51 @@ p = -789652009 +time.mktime(datetime(2005,1,1).timetuple()) %0A
4ee482751c9ec8508e33eca0b6728db8b3a581d1
Use rsync rather than scp to copy incremental pieces of the JAR.
application-deployment-fabfile.py
application-deployment-fabfile.py
# fabfile.py # TODO - Description. # ########################################################################### ## ## Copyright (c) 2014 Adobe Systems Incorporated. All rights reserved. ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the Lice...
Python
0
@@ -843,57 +843,8 @@ t *%0A -from fabric.contrib.project import rsync_project%0A from @@ -1472,50 +1472,194 @@ ask%0A -@roles('all')%0A@parallel%0Adef sync():%0A put( +def sync():%0A # put(config%5B'local_jar_dir'%5D + '/' + config%5B'jar'%5D, config%5B'remote_jar_dir'%5D)%0A for server in config%5B'all'%5D:%0A ...
f736495e4423bcc1c6eae328e19bafe49c68aaac
modify push more like cp.
gdrv/command_push.py
gdrv/command_push.py
#!/usr/bin/python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai import os import sys import logging import progressbar import global_mod as gm from apiclient import errors from apiclient.http import MediaFileUpload from command_base import DriveServiceCommand lg = logging.getLogger("DRIVE.PUSH") #lg.setLevel(logg...
Python
0
@@ -621,20 +621,20 @@ command -list +push help')%0A @@ -898,185 +898,696 @@ n')%0A -%0A def do_service_command(self):%0A %22%22%22push files%0A %22%22%22%0A%0A lg.debug(%22YMK in do_command%22)%0A lg.debug(self.args)%0A #sys.stderr.write(%22YMK STDERR%5Cn%22) + self.cmd...
0df2e6269286b629cc673f456c431bfedee123d5
Tweak __all__ of bayeslite __init__.py.
src/__init__.py
src/__init__.py
# -*- coding: utf-8 -*- # Copyright (c) 2010-2016, MIT Probabilistic Computing Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENS...
Python
0
@@ -3947,24 +3947,54 @@ metamodel',%0A + 'bayesdb_upgrade_schema',%0A 'bql_quo @@ -4054,27 +4054,8 @@ r',%0A - '__version__',%0A %5D%0A%0Af
ec04c23e283aa9aaa0d2d3d51e53c2781d610ff6
Return default parser
parse.py
parse.py
#!/usr/bin/env python import logging import os import datetime import re import mmap import contextlib import itertools import sys import lib.handlers.grant_handler as grant_handler import lib.patSQL as patSQL import lib.argconfig_parse as argconfig_parse from lib.config_parser import get_xml_handlers xmlclasses = [p...
Python
0.000004
@@ -1763,16 +1763,50 @@ terange%5D +%0A return xmlhandlers%5B'default'%5D %0A%0Adef ex
9f7bf4b7669f4aef7b99825d21eceeeb35f306b8
remove old todo
parse.py
parse.py
#!/usr/bin/env python import logging import os import datetime import re import sys import lib.argconfig_parse as argconfig_parse import lib.alchemy as alchemy import shutil from lib.config_parser import get_xml_handlers logfile = "./" + 'xml-parsing.log' logging.basicConfig(filename=logfile, level=logging.DEBUG) com...
Python
0.000705
@@ -4497,54 +4497,8 @@ )%0A%0A%0A -# TODO: this should only move alchemy.sqlite3%0A def
c7c872f91251b7c21927f6d34ebdb65775bd443c
move xmlclasses definition out of method
parse.py
parse.py
#!/usr/bin/env python import logging # http://docs.python.org/howto/argparse.html import argparse import os import datetime import re import mmap import contextlib import multiprocessing import itertools import sys sys.path.append( '.' ) sys.path.append( './lib/' ) from patXML import * regex = re.compile(r""" ([<]...
Python
0.000001
@@ -452,16 +452,206 @@ +re.X)%0A%0A +# TODO: put into configuration file (low priority)%0Axmlclasses = %5BAssigneeXML, CitationXML, ClassXML, InventorXML, %5C%0A PatentXML, PatdescXML, LawyerXML, ScirefXML, UsreldocXML%5D%0A%0A%0A def list @@ -1609,209 +1609,8 @@ t):%0A - # TODO: put into configurati...
ae734e38f1b4eea66661b910ca15cfcf2f6c02f1
Fix issues with headers
agateexcel/table_xlsx.py
agateexcel/table_xlsx.py
#!/usr/bin/env python """ This module contains the XLSX extension to :class:`Table <agate.table.Table>`. """ import datetime from collections import OrderedDict import agate import openpyxl import six NULL_TIME = datetime.time(0, 0, 0) def from_xlsx(cls, path, sheet=None, skip_lines=0, header=True, read_only=True...
Python
0
@@ -2074,32 +2074,123 @@ if header:%0A + sheet_header = sheet.iter_rows(min_row=1 + skip_lines, max_row=1 + skip_lines)%0A colu @@ -2253,25 +2253,27 @@ .value) for -c +row in sheet%5B1 @@ -2273,24 +2273,28 @@ heet -%5B1 + skip_lines%5D +_header for c in row %5D%0A
e9728b910f70076b71a7b6eb4b73b0ea91631124
add columns for month and year
corehq/apps/userreports/reports/specs.py
corehq/apps/userreports/reports/specs.py
from jsonobject import JsonObject, StringProperty, BooleanProperty, ListProperty, DictProperty from jsonobject.base import DefaultProperty from sqlagg import CountUniqueColumn, SumColumn from sqlagg.columns import SimpleColumn from corehq.apps.reports.sqlreport import DatabaseColumn from corehq.apps.userreports.reports...
Python
0.000312
@@ -207,28 +207,70 @@ import -SimpleColumn +(%0A MonthColumn,%0A SimpleColumn,%0A YearColumn,%0A) %0Afrom co @@ -596,24 +596,50 @@ iqueColumn,%0A + 'month': MonthColumn,%0A 'sum': S @@ -676,16 +676,40 @@ Column,%0A + 'year': YearColumn,%0A %7D%0A%0A%0Aclas
37956a6f0fae8506abd026d4f9eb70fdfb496c84
handle errors in AsyncRequest
network.py
network.py
import threading try: # python3 from urllib.request import urlopen from urllib.parse import urlsplit, parse_qs, urlencode, urlunsplit except ImportError: #python2 from urllib import urlopen, urlencode from urlparse import urlsplit, parse_qs, urlunsplit import settings import event class AsyncRequest(thre...
Python
0.000001
@@ -616,16 +616,50 @@ f._url)%0A + response_text = %22%22%0A try:%0A resp @@ -701,16 +701,18 @@ tbytes)%0A + resp @@ -755,16 +755,83 @@ utf-8%22)%0A + except Exception as e:%0A print(%22async request failed:%22, e)%0A # av
047a8fb22717fcee8a4725827c85cb1013d07e15
Change send-alert script
app/management/commands/send_alert.py
app/management/commands/send_alert.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.core.management.base import BaseCommand, CommandError from django.core.mail import send_mass_mail from django.contrib.auth.models import User from app.models import Alert from datetime import datetime class Command(BaseCommand): args = '' help = 'Run alerts ...
Python
0.000001
@@ -410,17 +410,16 @@ :%25M')%0A%09%09 -# alerts = @@ -466,24 +466,25 @@ cur_time)%0A%09%09 +# alerts = Ale @@ -632,16 +632,36 @@ %09%09%09msg = + u'%D0%97%D0%B4%D1%80%D0%B0%D0%B2%D1%81%D1%82%D0%B2%D1%83%D0%B9%D1%82%D0%B5, ' + alert.u @@ -679,16 +679,18 @@ ame + u' +. %D0%A1%D0%B5%D1%80%D0%B2%D0%B8%D1%81 L @@...
e606d44c7fcaf28adbae8c68e23fa33366a57dd7
Change script for email alerts
app/management/commands/send_alert.py
app/management/commands/send_alert.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.core.management.base import BaseCommand, CommandError from django.core.mail import send_mass_mail from django.contrib.auth.models import User from app.models import Alert from datetime import datetime class Command(BaseCommand): args = '' help = 'Run alerts ...
Python
0
@@ -252,16 +252,33 @@ datetime +, date, timedelta %0A%0Aclass @@ -323,11 +323,12 @@ = ' -Run +Send ale @@ -428,16 +428,46 @@ :%25M')%0A%09%09 +cur_date = date.today()%0A%09%09pre_ alerts = @@ -518,13 +518,55 @@ time +, start__lte=cur_date, finish__gte=cur_date )%0A%09%09 -# aler @@ -574,47 +574,297 @@ s = ...
1c59bae012249d5e1624d1b9445590b499546d80
change save interval
src/pos_prediction.py
src/pos_prediction.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # import unicodecsv as csv from nupic.data.inference_shifter import InferenceShifter from nupic.frameworks.opf.modelfactory import ModelFactory import pprint import os import model_params.model_params as model_params import pos_tags DATA_DIR = "data/" INPUT_FILE = "firef...
Python
0.000001
@@ -1282,91 +1282,8 @@ er:%0A -%0A if countor %25 100 == 0:%0A print(%22input line:%22, countor)%0A%0A @@ -1381,16 +1381,17 @@ input))%0A +%0A @@ -1398,69 +1398,76 @@ -# print(%22DEBUG:%22, row%5B1%5D, result.inferences%5B%22anomalyScore%22%5D)%0A +if countor %25 100 ==...
48587d0c7a5906bd95c2c26db92365bf0843ddee
add Music
zblog/models.py
zblog/models.py
from django.db import models class Classify(models.Model): name = models.CharField(max_length=20) def __unicode__(self): return self.name class Tag(models.Model): name = models.CharField(max_length=20) def __unicode__(self): return self.name class Article(models.Model): title ...
Python
0.000002
@@ -88,32 +88,33 @@ (max_length=20)%0A +%0A def __unicod @@ -218,16 +218,17 @@ gth=20)%0A +%0A def @@ -418,24 +418,37 @@ teTimeField( +auto_now=True )%0A classi @@ -570,21 +570,16 @@ ult=0)%0A%0A - %0A clas @@ -832,24 +832,25 @@ blank=True)%0A +%0A def __un @@ -1050,96 +1050,517 @@ ...
90c2c22e9b878c180cec3ae7ebb6b3fbcb429206
Add commented-out debug print statement for nocrash ecode==5
nocrash.py
nocrash.py
#!/usr/bin/python from sh import git import os import subprocess as sp from time import sleep import sys # Get environment variables ChatExchangeU = os.environ.get('ChatExchangeU') ChatExchangeP = os.environ.get('ChatExchangeP') if ChatExchangeU is None: ChatExchangeU = str(input("Username: ")).strip('\r\n') os...
Python
0.000002
@@ -1812,16 +1812,55 @@ e == 5:%0A + # print %22%5BNoCrash%5D Rebooting.%22%0A
f1da3568386952850fbdcf04c86558ceafaf2884
Add "-nightly" to version in API view
nextcloudappstore/core/api/v1/views.py
nextcloudappstore/core/api/v1/views.py
from django.db import transaction from django.http import Http404 from nextcloudappstore.core.api.v1.release.importer import ReleaseImporter from nextcloudappstore.core.api.v1.release.provider import AppReleaseProvider from nextcloudappstore.core.api.v1.serializers import AppSerializer, \ AppReleaseDownloadSerializ...
Python
0.000001
@@ -3961,16 +3961,134 @@ '%5D%5B'id'%5D +%0A%0A if serializer.validated_data%5B'nightly'%5D:%0A info%5B'app'%5D%5B'release'%5D%5B'version'%5D += '-nightly' %0A
5135208b8e3525265c3c582f850e00cb77443f4b
Add start and end fields to youtube.json
youtube/main.py
youtube/main.py
""" Download all the songs inside a YouTube playlist and for each song: - add metadata - adjust gain - add artwork """ import json import subprocess from pathlib import Path import functools import webvtt import settings here = Path(__file__).parent download_dir = here / 'downloads' output_dir = here / 'output' j...
Python
0
@@ -2027,16 +2027,32 @@ 'id'%5D%7D%22, +%0A path=in @@ -2061,16 +2061,84 @@ %5B'path'%5D +,%0A start=None,%0A end=None,%0A )%0A%0A j @@ -5628,16 +5628,79 @@ %5Bitem%5D%0A%0A + # Get rid of tuple elements whose second elements are None%0A cmd
a677e25a75291091a23e309afd30c2542f8a61f1
Bump version (0.3.10)
zou/__init__.py
zou/__init__.py
__version__ = "0.3.9"
Python
0
@@ -16,7 +16,8 @@ 0.3. -9 +10 %22%0A
c1d979cae180b96c3117d7ee2908c032256cb259
configure SQLALCHEMY_TRACK_MODIFICATIONS, default will change with future flask-sqlalchemy
app/gbi_server/config.py
app/gbi_server/config.py
# This file is part of the GBI project. # Copyright (C) 2013 Omniscale GmbH & Co. KG <http://omniscale.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 copy of the License at # # http://www.apache.org/licens...
Python
0
@@ -1186,17 +1186,16 @@ igreen'%0A -%0A SQLA @@ -1209,24 +1209,229 @@ ECHO = False +%0A # from warning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.%0A # TODO check if tracking is required%0A SQLALCHEMY_TRACK_MODIFICATIONS=True %0A%0A ACCEPT...
956fe7362dfedb05808f6675b5457cbb18336895
Fix unused return value in ec2_vpc_vgw_facts module (#41697)
lib/ansible/modules/cloud/amazon/ec2_vpc_vgw_facts.py
lib/ansible/modules/cloud/amazon/ec2_vpc_vgw_facts.py
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
Python
0
@@ -3803,21 +3803,14 @@ -snaked_vgws = +return %5Bca @@ -3875,23 +3875,16 @@ - - for vgw @@ -3928,60 +3928,8 @@ %5D%5D%0A%0A - module.exit_json(virtual_gateways=snaked_vgws)%0A%0A %0Adef @@ -4809,22 +4809,32 @@ it_json( -result +virtual_gateways =results
82141de809dbb2fb8f278d1de888e40e4be0f5a5
Allow toggling IOTD submissions
astrobin_apps_iotd/permissions.py
astrobin_apps_iotd/permissions.py
# Python from datetime import datetime, timedelta # Django from django.conf import settings from django.contrib.auth.models import Group from django.utils.translation import ugettext_lazy as _ def may_toggle_submission_image(user, image): if not user.groups.filter(name = 'iotd_submitters').exists(): retu...
Python
0
@@ -1231,155 +1231,8 @@ td%0A%0A - if IotdSubmission.objects.filter(submitter = user, image = image).exists():%0A return False, _(%22You have already submitted this image.%22)%0A%0A
a70cb568827fcdcdfe212e7e8105aa632ae9a01f
Fix bug in quantile-generator.py.
contrib/plots/quantile-generator.py
contrib/plots/quantile-generator.py
#!/usr/bin/env python3 """ BenchExec is a framework for reliable benchmarking. This file is part of BenchExec. Copyright (C) 2007-2015 Dirk Beyer 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...
Python
0
@@ -2663,16 +2663,40 @@ ect_only + or options.scored_based )%0A%0A #
2ff50deea8f8b605af7e21fa8a448bc68d2844b4
Fix is_locked()
numba/compiler_lock.py
numba/compiler_lock.py
import threading import functools # Lock for the preventing multiple compiler execution class _CompilerLock(object): def __init__(self): self._lock = threading.RLock() self._locked = False def acquire(self): self._lock.acquire() self._locked = True def release(self): ...
Python
0.000003
@@ -198,21 +198,17 @@ ocked = -False +0 %0A%0A de @@ -278,14 +278,12 @@ ked ++ = -True +1 %0A%0A @@ -328,15 +328,12 @@ ked +- = -False +1 %0A @@ -538,16 +538,20 @@ ._locked + %3E 0 %0A%0A de
1668e0e5e1643e345acaf8aaf8d56d49df92a926
Fix random.py to work when installed and not use Python 2.x-only function execfile
numba/random/random.py
numba/random/random.py
import ctypes as ct import numpy.random as nr import os.path from numpy.distutils.misc_util import get_shared_lib_extension direc = os.path.dirname(nr.__file__) mtrand = ct.CDLL(direc + os.path.sep + 'mtrand' + get_shared_lib_extension()) # Should we parse this from randomkit.h in the numpy directory? RK_STATE_LEN ...
Python
0
@@ -2050,37 +2050,257 @@ nt%0A%0A -execfile('_rng_generated.py') +_thisname = os.path.abspath(__file__)%0A_filename = os.path.dirname(_thisname) + os.path.sep + '_rng_generated.py'%0Awith open(_filename) as f:%0A _code = compile(f.read(), _filename, 'exec')%0A exec(_code)%0A%0Adel _thisname%0Adel _filename%0Adel...
4f55afcb5db10ad65f95fd35f3de0c0f1bd70038
mean_functions.py is noe pep8 compliant
GPflow/mean_functions.py
GPflow/mean_functions.py
import tensorflow as tf import numpy as np from param import Param, Parameterized import transforms class MeanFunction(Parameterized): """ The base mean function class. To implement a mean funcion, write the __call__ method. This takes a tensor X and returns a tensor m(X). In accordance with the GPfl...
Python
0.998208
@@ -79,25 +79,8 @@ zed%0A -import transforms %0A%0Acl @@ -227,17 +227,16 @@ takes a - %0A ten @@ -414,17 +414,16 @@ ow of X. - %0A%0A Me @@ -489,16 +489,20 @@ s for an +%0A example @@ -571,18 +571,17 @@ tedError -, +( %22Impleme @@ -591,24 +591,59 @@ the __call__ +%5C%0A ...
8f37c13394143f90421ffcea45dbdf4282ecbdce
Add function to scan the network for IPs
backend/breach/helpers/network.py
backend/breach/helpers/network.py
import netifaces def get_interface(): return netifaces.gateways()['default'][netifaces.AF_INET][1] def get_local_IP(): def_gw_device = get_interface() return netifaces.ifaddresses(def_gw_device)[netifaces.AF_INET][0]['addr'] def get_netmask(): def_gw_device = get_interface() return netifaces.i...
Python
0
@@ -10,16 +10,91 @@ tifaces%0A +import ipaddress%0Aimport subprocess%0Aimport os%0Afrom bs4 import BeautifulSoup%0A %0A%0Adef ge @@ -447,8 +447,692 @@ tmask'%5D%0A +%0A%0Adef scan_network():%0A possible_victims = %5B%5D%0A%0A local_ip = get_local_IP()%0A netmask = get_netmask()%0A network = str(ipaddress...
ec0899600047859c8acc040837a88b0381a13d7d
Add note on tags matching tokenization (see #1613)
examples/training/train_tagger.py
examples/training/train_tagger.py
#!/usr/bin/env python # coding: utf8 """ A simple example for training a part-of-speech tagger with a custom tag map. To allow us to update the tag map with our custom one, this example starts off with a blank Language class and modifies its defaults. For more details, see the documentation: * Training: https://spacy.i...
Python
0
@@ -1058,18 +1058,16 @@ ts vary. -%0A# Ensure @@ -1070,16 +1070,18 @@ ure your +%0A# strings @@ -1092,17 +1092,276 @@ unicode -. + and that the number of tags assigned matches spaCy's%0A# tokenization. If not, you can always add a 'words' key to the annotations%0A# that specifies the gold-standard tokenization...
a5e63933f61beb32a596fd0b09b56c49eece206b
Version num
examples/tutorial/gl/fireworks.py
examples/tutorial/gl/fireworks.py
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -------------------------------------------------------------------------...
Python
0
@@ -1010,32 +1010,46 @@ rtex_code = %22%22%22%0A +#version 120%0A%0A uniform float ti @@ -1545,16 +1545,30 @@ e = %22%22%22%0A +#version 120%0A%0A uniform
f8df32c28905cd97b6bfd562d16ed2394a67d297
Fix Dick Blick scraper
locations/spiders/dick_blick.py
locations/spiders/dick_blick.py
# -*- coding: utf-8 -*- import scrapy import re from scrapy.utils.url import urljoin_rfc from scrapy.utils.response import get_base_url from locations.items import GeojsonPointItem class DickBlickSpider(scrapy.Spider): name = "dick_blick" allowed_domains = ["www.dickblick.com"] start_urls = ( 'htt...
Python
0
@@ -44,96 +44,8 @@ t re -%0Afrom scrapy.utils.url import urljoin_rfc%0Afrom scrapy.utils.response import get_base_url %0A%0Afr @@ -88,16 +88,17 @@ ntItem%0A%0A +%0A class Di @@ -1319,50 +1319,8 @@ e):%0A - base_url = get_base_url(response)%0A @@ -1457,38 +1457,33 @@ Request( -urljoin_rfc(base_url, +...
3af2a5b6eda4af972e3a208e727483384f313cb9
Remove index and check filename
octotribble/csv2tex.py
octotribble/csv2tex.py
#!/usr/bin/env python """Convert a CSV table into a latex tabular using pandas.""" import argparse import pandas as pd def convert(filename, transpose=False): """convert csv to tex table.""" df = pd.read_csv(filename) if transpose: df = df.transpose() tex_name = filename.replace(".csv", ...
Python
0.000001
@@ -327,24 +327,45 @@ spose.tex%22)%0A + index = True%0A else:%0A @@ -358,24 +358,24 @@ e%0A else:%0A - tex_ @@ -410,24 +410,189 @@ v%22, %22.tex%22)%0A + index=False%0A%0A assert tex_name != filename, %22This will overwrite the file, did you pass in a csv?%22%0A%0A %0A late...
bae92f91baa43e44582d78a4183868b8b32016e9
Put new values from supervisor
GreenThumb/supervisor.py
GreenThumb/supervisor.py
# -*- coding: utf-8 -*- import dht11 import time import os measurements_buffer = {} def ouput_val(pin): pin_hash = str(pin) try: (humidity, temperature) = dht11.read(pin) measurements_buffer[pin_hash] = (humidity, temperature) except: if pin_hash in measurements_buffer: ...
Python
0.000003
@@ -52,16 +52,44 @@ mport os +%0Aimport requests%0Aimport json %0A%0Ameasur @@ -456,17 +456,34 @@ = ( -'-', '-') +-1, -1)%0A return %0A%0A @@ -618,24 +618,24 @@ emperature)%0A - print '- @@ -659,16 +659,319 @@ ------'%0A + data = %7B'id':pin, 'temperature': temperature, 'humidity': humidity%...
75b50ffcb6575e38e6792356dd58612089ee4f55
Return 400 for inexistant accounts
django_mercadopago/views.py
django_mercadopago/views.py
import logging from django.conf import settings from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from .models import Notification, Account logger = logging.getLogger(__name__) # Maybe use a form for this? :D @csrf_exempt def create_notification(request, slug): topic = ...
Python
0.00007
@@ -936,16 +936,29 @@ s=400)%0A%0A + try:%0A owne @@ -992,16 +992,114 @@ g=slug)%0A + except Account.DoesNotExist:%0A return HttpResponse('Unknown account/slug', status=400)%0A%0A noti
08be96e39db786b1187ab7acc8beafe5c186ae54
Bump Version
djangocms_forms/__init__.py
djangocms_forms/__init__.py
__version__ = '0.2.3' default_app_config = 'djangocms_forms.apps.DjangoCMSFormsConfig'
Python
0
@@ -16,9 +16,9 @@ 0.2. -3 +4 '%0A%0Ad
3ddeb65ab76e85382e27db3781137631c9014479
add tags entries to schemas
dlstats/fetchers/schemas.py
dlstats/fetchers/schemas.py
# -*- coding: utf-8 -*- from datetime import datetime from voluptuous import All, Length, Schema, Invalid, Optional, Any, Extra, Range def date_validator(value): """Custom validator (only a few types are natively implemented in voluptuous) """ if isinstance(value, datetime): return value else...
Python
0.000001
@@ -1789,24 +1789,63 @@ None, str),%0A + Optional('tags'): Any(None, list),%0A 'metadat @@ -2346,24 +2346,63 @@ dict),%0A %0A + Optional('tags'): Any(None, list),%0A 'metadat @@ -3483,32 +3483,71 @@ Any(None, str),%0A + Optional('tags'): Any(None, list),%0A 'slug': All(
e2d5fcf9997ff7cdac1ba55b6fe47e4e6ad2b182
simplify options
percy.py
percy.py
#!/usr/bin/python import argparse file = open('your filename here', 'r') # change this to correspond to your list def getYear(date): slashDate = date.split('/') year = slashDate[2] return year def info(title, author, owned, start, end, format, date): print title + ' by ' + author print 'Owned: ' + owned pr...
Python
0.999999
@@ -1953,20 +1953,8 @@ -a', - '--author', hel @@ -2004,23 +2004,8 @@ -p', - '--published', hel @@ -2065,19 +2065,8 @@ -t', - '--title', hel @@ -2115,18 +2115,8 @@ -y', - '--year', hel @@ -2475,22 +2475,8 @@ -h%5C' - or %5C'--help%5C' '%0A%0Af
ea2645b1bb9c4fca5c0e8ad8185839fc26f62fe4
Fix breakage with python-daemon>=2.1
maildump_runner/geventdaemon.py
maildump_runner/geventdaemon.py
import daemon import signal # Moved gevent imports into functions. # See http://stackoverflow.com/q/11587164/298479 # TLDR: Importing gevent before forking is a bad idea class GeventDaemonContext(daemon.DaemonContext): """ DaemonContext for gevent. Receive same options as a DaemonContext (python-daemon), E...
Python
0.000001
@@ -1276,16 +1276,255 @@ options) +%0A # python-daemon%3E=2.1 has initgroups=True by default but it requires root privs%0A # older versions don't have the kwarg so we set it manually instead of using%0A # the constructor argument%0A self.initgroups = False %0A%0A de
d52c9460411fee14a66eaf8f4793ea25e349d6f7
Make sure the _texture is always defined.
UM/Scene/Platform.py
UM/Scene/Platform.py
from . import SceneNode from UM.Application import Application from UM.View.Renderer import Renderer from UM.Resources import Resources class Platform(SceneNode.SceneNode): def __init__(self, parent): super().__init__(parent) self._settings = None self._material = None Application...
Python
0
@@ -286,32 +286,61 @@ material = None%0A + self._texture = None%0A Applicat
d7dacfc6bdb80a9ad09bd58c20e97516a62da58f
Update zipslip_good.py
python/ql/src/experimental/Security/CWE-022/zipslip_good.py
python/ql/src/experimental/Security/CWE-022/zipslip_good.py
import zipfile zf = zipfile.ZipFile(filename) with zipfile.open() as zipf: for entry in zipf: zipf.extract(entry, "/tmp/unpack/")
Python
0.000001
@@ -10,16 +10,44 @@ pfile %0A%0A +def unzip(filename, dir):%0A zf = zip @@ -73,100 +73,109 @@ me)%0A -with + zf.extractall(dir)%0A %0A%0Adef un zip +1( file -.open() as zipf:%0A for entry in zipf:%0A zipf.extract(entry, %22/tmp/unpack/%22 +name, dir):%0A zf = zipfile.ZipFile(filename)%0A zf.extr...
109a6aec8b8b4a888462129bb9f5cac01ddc97f9
Update jupyter_notebook_config.py (#3664)
tensorflow/tools/docker/jupyter_notebook_config.py
tensorflow/tools/docker/jupyter_notebook_config.py
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0.000001
@@ -771,13 +771,37 @@ rt = + int(os.getenv('PORT', 8888 +)) %0Ac.N
88cb54854fc5f6b0c9c2d048f2d7fc6af5d8c3bd
Use correct application name in collecttools_kubernetes
resolwe/flow/management/commands/collecttools_kubernetes.py
resolwe/flow/management/commands/collecttools_kubernetes.py
""".. Ignore pydocstyle D400. ========================================================================= Collect Processes' tools and store them in configmap object in Kubernetes ========================================================================= """ import hashlib import json from pathlib import Path from typin...
Python
0
@@ -278,16 +278,31 @@ rt json%0A +import logging%0A from pat @@ -471,76 +471,8 @@ or%0A%0A -from resolwe.flow.executors.prepare import BaseFlowExecutorPreparer%0A from @@ -566,16 +566,107 @@ label,%0A) +%0Afrom resolwe.flow.utils import get_apps_tools%0Afrom resolwe.utils import BraceMessage as __ %0A%0A# Time @@...
05e671a41641746802f6ae6155f79fdcb13a3c6a
Fix Authorization header that is not a Bearer to not return a token
oauthlib/openid/connect/core/tokens.py
oauthlib/openid/connect/core/tokens.py
""" authlib.openid.connect.core.tokens ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module contains methods for adding JWT tokens to requests. """ from oauthlib.oauth2.rfc6749.tokens import TokenBase, random_token_generator class JWTToken(TokenBase): __slots__ = ( 'request_validator', 'token_generator', ...
Python
0.000002
@@ -1281,37 +1281,44 @@ rs:%0A -token +split_header = request.heade @@ -1340,19 +1340,142 @@ zation') -%5B7: +.split()%0A if len(split_header) == 2 and split_header%5B0%5D.lower() == 'bearer':%0A token = split_header%5B1 %5D%0A
8063970bd063d53cf2a05734643f6326f69bcd97
move to release 0.0.7
sphinxgallery/__init__.py
sphinxgallery/__init__.py
"""Sphinx Gallery """ import os __version__ = '0.0.6' def _path_static(): """Returns path to packaged static files""" return os.path.abspath(os.path.dirname(__file__))+'/_static'
Python
0
@@ -48,17 +48,16 @@ 0.0. -6 +7 '%0A%0Adef -_ path
b06142ff2ef04c250b7b04fb29ffcdff157d98e0
FIX frontend_editing error introduced in dd087a9af2166cc942f4c80cd7c0cfd172440f71
feincms/module/page/processors.py
feincms/module/page/processors.py
import sys from django.conf import settings as django_settings from django.http import Http404, HttpResponseRedirect def require_path_active_request_processor(page, request): """ Checks whether any ancestors are actually inaccessible (ie. not inactive or expired) and raise a 404 if so. """ if not...
Python
0
@@ -1013,16 +1013,66 @@ return%0A%0A + response = HttpResponseRedirect(request.path)%0A if r @@ -1253,54 +1253,8 @@ -response = HttpResponseRedirect(request.path)%0A
f194771adfbcc13814d2ef12541d7e2416422966
Debug test
pipin.py
pipin.py
import argparse from collections import defaultdict import os import re import sys try: unicode except NameError: # Python 3 basestring = unicode = str BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8) # dirs to exclude from search EXCLUDE_PATHS = [ '.git', '.hg', '.egg', 'eggs', 'dist'...
Python
0.000001
@@ -2692,59 +2692,8 @@ e):%0A - print('here')%0A print(os.path.abspath(root))%0A @@ -2761,51 +2761,9 @@ -print('inside')%0A print(path)%0A +# if @@ -2800,32 +2800,34 @@ _PATHS):%0A + # continue%0A
a8dae08c6ec6c8cda94f6c375bc0f9db94ee148d
remove the extra licenses from python bigquery IT
sdks/python/apache_beam/io/gcp/bigquery_io_read_pipeline.py
sdks/python/apache_beam/io/gcp/bigquery_io_read_pipeline.py
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
Python
0
@@ -782,606 +782,8 @@ %0A#%0A%0A -%0A# Copyright 2016 Google Inc. All Rights Reserved.%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A# http://www.apache.org/licenses...
06ce21b1589b96cfe6a1dc644884b69348c55462
Add Beam :inaspacesuit parsing
cactusbot/services/beam/parser.py
cactusbot/services/beam/parser.py
import json from os import path from ...packets import EventPacket, MessagePacket class BeamParser: # TODO: update with accurate values ROLES = { "Owner": 100, "Founder": 91, "Staff": 90, "Global Mod": 85, "Mod": 50, "Subscriber": 20, "Pro": 5, ...
Python
0
@@ -943,32 +943,199 @@ e.append(chunk)%0A + elif component%5B%22type%22%5D == %22inaspacesuit%22:%0A chunk%5B%22type%22%5D = %22emoji%22%0A chunk%5B%22data%22%5D = %22%22%0A message.append(chunk)%0A elif @@ -2730,16 +2730,109 @@ text%22%5D%0A%0A + ...
b8026962c56e74cf3320f07bff61bbbada750706
Add Notification types in models.py
corehq/apps/notifications/models.py
corehq/apps/notifications/models.py
import datetime from django.contrib.auth.models import User from django.contrib.postgres.fields import ArrayField from django.db import models from django.db.models import Q NOTIFICATION_TYPES = ( ('billing', 'Billing Notification'), ('info', 'Product Notification'), ('alert', 'Maintenance Notification'),...
Python
0
@@ -169,16 +169,61 @@ port Q%0A%0A +# Changing these values requires a migration%0A NOTIFICA @@ -359,16 +359,114 @@ tion'),%0A + ('feat_basic', 'Feature Discovery (Basic)'),%0A ('feat_pro', 'Feature Discovery (Advanced)')%0A )%0A%0A%0Aclas
7777bb182906e7808f407d0d0c9eb25adaae5417
Define debug.
riot/utils.py
riot/utils.py
# -*- coding: utf-8 -*- import sys def walk(root, function, path=None): if not root: return path = path or [] if not function(root, path): return for index, child in enumerate(root.children().items()): walk(child, function, path + [index]) def get_ui_by_path(root, path): im...
Python
0.000005
@@ -29,16 +29,118 @@ rt sys%0A%0A +def debug(*args):%0A for arg in args:%0A print %3E%3E sys.stderr, arg,%0A print %3E%3E sys.stderr, ''%0A%0A def walk @@ -164,24 +164,24 @@ path=None):%0A - if not r @@ -644,24 +644,113 @@ tents%5B0%5D%5B0%5D%0A + elif isinstance(ui, urwid.ListBox):%0A ...
d694128b1ceb66e68e058499157b7f112bc35e59
use localized, customized description in the app
corehq/apps/userreports/fixtures.py
corehq/apps/userreports/fixtures.py
from datetime import datetime from xml.etree import ElementTree from corehq import toggles from corehq.apps.app_manager.dbaccessors import get_apps_in_domain from corehq.apps.app_manager.models import ( Application, AutoFilter, CustomDataAutoFilter, ReportModule, StaticChoiceFilter, StaticChoic...
Python
0
@@ -484,16 +484,66 @@ Factory%0A +from corehq.apps.userreports.util import localize%0A from cor @@ -2741,26 +2741,58 @@ n', -report.description +localize(report_config.description, user.language) ))%0A
dd9e40881e7159a4b2bfbf8a2a012b39b1f5acb1
Add missing hoststates
rocketchat.py
rocketchat.py
#!/usr/bin/python # Copyright (c) 2015 Andre Freitas <p.andrefreitas@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights...
Python
0.003956
@@ -1466,16 +1466,107 @@ NKNOWN%22: + %22#e3e4e6%22,%0A %22DOWN%22: %22#d00000%22,%0A %22UNKNOWN%22: %22#e3e4e6%22,%0A %22UNREACHABLE%22: %22#e3e4e
d9348572a7c00f69b6f4f2d426bfb73f69d20a08
fix imports
geotweet/geotweet.py
geotweet/geotweet.py
import os import sys import json import argparse root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(root) from log import logger from stream import TwitterStream from load import LogListener from steps import GeoFilterStep, ExtractStep, LogStep # Bounding Box: [Lon,Lat SW corner, Lon...
Python
0.000002
@@ -142,141 +142,139 @@ rom -log import logger%0Afrom stream import TwitterStream%0Afrom load import LogListener%0Afrom steps import GeoFilterStep, ExtractStep, LogStep +twitter import TwitterStream, LogListener, GeoFilterStep, ExtractStep, LogStep%0A%0Aimport logging%0Alogger = logging.getLogger(__name__) %0A%0A%0A...
23af1eddcaeddb5bae01ddf6affccbc1e621d32f
update docs for 0.9, closes 60
couchdb/tools/replication_helper.py
couchdb/tools/replication_helper.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008 Jan Lehnardt <jan@apache.org> # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. """ CouchDB DbUpdateNotification Script that triggers replication Daemon script that acts as Cou...
Python
0
@@ -462,17 +462,55 @@ our -couch.ini +local.ini, in the section %5Bupdate_notification%5D :%0ADb
efa47544297f7f33696fc30e539ae08b21205c32
suppressed output in roistats2R.py
roistats2R.py
roistats2R.py
import sys import os import writeOutput def roistats2R(subj_gp, exp): trialCount=rtrialCount = r= 0 dataTable1=lineTemp=line=dataLine=Con=[] allData=[] Contrasts = [] subj = [] hem = ['lh', 'rh'] roiName = [] inFile = "/cluster/kuperbe...
Python
0.998558
@@ -1463,16 +1463,18 @@ Con%5B5%5D)%0A +## @@ -1489,16 +1489,18 @@ ntrasts%0A +## @@ -1528,16 +1528,18 @@ j_num):%0A +## @@ -1731,16 +1731,18 @@ line%5B2%5D%0A +## @@ -2987,32 +2987,34 @@ %0A%0A +## print al
2ab0083a2b143130d19552a37ae4366b2a681720
Add a comment explaining what these tests are for, and where to look for tests of complex().
Lib/test/test_complex.py
Lib/test/test_complex.py
from test_support import TestFailed from random import random # XXX need many, many more tests here. nerrors = 0 def check_close_real(x, y, eps=1e-9): """Return true iff floats x and y "are close\"""" # put the one with larger magnitude second if abs(x) > abs(y): x, y = y, x if y == 0: ...
Python
0
@@ -56,16 +56,143 @@ random%0A%0A +# These tests ensure that complex math does the right thing; tests of%0A# the complex() function/constructor are in test_b1.py.%0A%0A # XXX ne
a2810fb4154685456e8ad4381234e109cf657d6e
modify assert in distance.py
sprocket/util/distance.py
sprocket/util/distance.py
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import numpy as np def melcd(array1, array2): """Calculate mel-cepstrum distortion Calculate mel-cepstrum distortion between the arrays or vectors. This function assumes the shapes of arrays or vectors are same...
Python
0.000001
@@ -234,24 +234,13 @@ rays +. %0A - or vectors. Thi @@ -282,23 +282,8 @@ rays -%0A or vectors are @@ -366,16 +366,33 @@ , %60dim%60) + or shape (%60dim%60) %0A @@ -534,15 +534,152 @@ -assert +if array1.shape != array2.shape:%0A raise ValueError(%0A %22The shapes of both ar...
870915b4ff62911a4d19295b45ff9e95a92532d3
Simplify runner for installer
installers/sasview.py
installers/sasview.py
# -*- coding: utf-8 -*- #!/usr/bin/env python """ Run sasview in place. This allows sasview to use the python files in the source tree without having to call setup.py install first. A rebuild is still necessary when working on sas models or c modules. Usage: ./run.py [(module|script) args...] Without arguments ru...
Python
0
@@ -60,3128 +60,83 @@ iew -in place. This allows sasview to use the python%0Afiles in the source tree without having to call setup.py install%0Afirst. A rebuild is still necessary when working on sas models%0Aor c modules.%0A%0AUsage:%0A%0A./run.py %5B(module%7Cscript) args...%5D%0A%0AWithout arguments run.py runs ...
d4a1282e7e7c3a6cc804d2f583d37d484961adad
handle the case where a package has no downloads
crate_project/apps/packages/stats/views.py
crate_project/apps/packages/stats/views.py
import collections import json import time import isoweek from django.http import HttpResponse from django.shortcuts import get_object_or_404 from packages.models import Package, Release, DownloadDelta, DownloadStatsCache def fetch_stats(package): releases = Release.objects.filter(package=package) releases...
Python
0.000006
@@ -543,16 +543,53 @@ y Checks +%0A if not deltas:%0A return %5B%5D %0A%0A da
e9b7ebabea90567682fb95df3e135ec380ee9073
fix bugs
haproxy.py
haproxy.py
# coding: utf-8 import re import socket from fabkit import api, env, sudo, Service, filer from fablib.base import SimpleBase RE_CENTOS = re.compile('CentOS.*') class Haproxy(SimpleBase): def __init__(self): self.data_key = 'haproxy' self.data = {} self.services = { 'CentOS L...
Python
0.000001
@@ -1639,32 +1639,68 @@ '/tmp/authkey') +%0A sudo('rm /tmp/authkey') %0A%0A else:%0A @@ -1879,48 +1879,8 @@ y')%0A - sudo('rm /tmp/authkey')%0A
c8ab2e4770db695af1229a1f45b06219b39dd5bf
disable logging
pug/crawlnmine/crawlnmine/settings.py
pug/crawlnmine/crawlnmine/settings.py
""" Django settings for crawlnmine project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ import sys # Build paths inside the project like this: os.path.join(B...
Python
0.000002
@@ -3525,16 +3525,86 @@ iles')%0A%0A +LOGGING = %7B%0A 'version': 1,%0A 'disable_existing_loggers': True,%0A%7D%0A %0A# List
2d6ea66a5ef078ec000dee05ba855ee5e22fbd6c
Address review comments, fix signatures that the docs lied about
cryptography/hazmat/bindings/openssl/dh.py
cryptography/hazmat/bindings/openssl/dh.py
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
Python
0
@@ -1140,16 +1140,22 @@ char *, + const BIGNUM @@ -1198,21 +1198,21 @@ nt, -char +void *);%0A -char +void *DH
c0beb9718229c70fca763797aa36b9bac5d78146
use tuples, not lists, as the backend storage, to save memory.
src/robot/model/itemlist.py
src/robot/model/itemlist.py
# Copyright 2008-2013 Nokia Siemens Networks Oyj # # 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.000001
@@ -853,18 +853,18 @@ items = -%5B%5D +() %0A @@ -1104,20 +1104,18 @@ tems -.append + += (item +, )%0A @@ -1641,32 +1641,195 @@ f._items -.extend + += tuple(items)%0A%0A if hasattr(tuple, 'index'): # tuples got index method in Python 2.6%0A def index(self, item):%0A return self._i...
9af41157b5f675842832d06f8d139d82bccc7db1
Fix get_zabbix_hosts onr edis
dbaas_zabbix/database_providers.py
dbaas_zabbix/database_providers.py
# -*- coding: utf-8 -*- from dbaas_zabbix.provider import ZabbixProvider import logging LOG = logging.getLogger(__name__) class DatabaseZabbixProvider(ZabbixProvider): def __init__(self, dbaas_api, zabbix_api): super(DatabaseZabbixProvider, self).__init__(dbaas_api, zabbix_api) self.main_clientg...
Python
0.000001
@@ -5615,32 +5615,41 @@ nstance in self. +database_ instances:%0A
c2699d9769aff771985bac7fbb6dd60a943307f9
add the tests results to pull
dci/analytics/access_data_layer.py
dci/analytics/access_data_layer.py
# -*- coding: utf-8 -*- # # Copyright (C) Red Hat, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
Python
0.000002
@@ -1267,32 +1267,81 @@ nload(%22files%22))%0A + .options(sa_orm.selectinload(%22results%22))%0A .options
cf7b1be0c416142c6f0b991f715b9c9df88a0c05
handle event priority in the DI extension
ioc/extra/event/di.py
ioc/extra/event/di.py
import ioc.loader, ioc.component, ioc.exceptions import os, datetime class Extension(ioc.component.Extension): def load(self, config, container_builder): container_builder.add('ioc.extra.event_dispatcher', ioc.component.Definition('ioc.event.Dispatcher')) def post_build(self, container_builder, contai...
Python
0
@@ -724,16 +724,105 @@ %0A%0A + if 'priority' not in option:%0A option%5B'priority'%5D = 0%0A%0A @@ -913,9 +913,29 @@ ethod'%5D) +, option%5B'priority'%5D )
277222434b184cab036445aee95aac4e7dec8e31
Revert "Let's ignore utf8 issues for now."
demo/django_docusign_demo/tests.py
demo/django_docusign_demo/tests.py
# coding=utf8 import os from django.core.urlresolvers import reverse import django.test from django_docusign_demo import models here = os.path.abspath(os.path.dirname(__file__)) fixtures_dir = os.path.join(here, 'fixtures') class SignatureFunctionalTestCase(django.test.TestCase): """Functional test suite for ...
Python
0
@@ -827,17 +827,17 @@ Accentu -e +%C3%A9 ',%0A
b2edf9d07d73a041244f641018d093b6e2adece1
Add test cases to ftom_roman
roman_test.py
roman_test.py
import roman1 import unittest class KnownValues(unittest.TestCase): known_values = ( (1, 'I'), (2, 'II'), (3, 'III'), (4, 'IV'), (5, 'V'), (6, 'VI'), (7, 'VII'), (8, 'VIII...
Python
0.000635
@@ -2988,16 +2988,460 @@ , 0.5)%0A%0A +%09def test_from_roman_known_values(self):%0A%09%09'''from_roman should give known result with known input'''%0A%09%09for integer, numeral in self.known_values:%0A%09%09%09result = roman1.from_roman(numeral)%0A%09%09%09self.assertEqual(integer, result)%0A%0A%09def test_roundtrip(...
51dbdc5c31c14835d0ee75dd831793a95602cae7
Update BVT-VERIFY-NO-ERROR-IN-LOGS.py
remote-scripts/BVT-VERIFY-NO-ERROR-IN-LOGS.py
remote-scripts/BVT-VERIFY-NO-ERROR-IN-LOGS.py
#!/usr/bin/python from azuremodules import * import argparse import os parser = argparse.ArgumentParser() parser.add_argument('-wl', '--whitelist', help='specify the xml file which contains the ignorable errors') args = parser.parse_args() white_list_xml = args.whitelist def RunTest(): UpdateState("TestRunnin...
Python
0.000015
@@ -1615,16 +1615,49 @@ s,re.M)%0A + matchcount = 0%0A index = 0%0A if(m @@ -1672,16 +1672,16 @@ ng):%09%09%09%0A - @@ -1764,16 +1764,117 @@ + msg)%0A + matchcount +=1%0A %0A while matchcount %3E 0:%0A matchcount -=1%0A @@ -1900,17 +1900,21 ...
d3c753a145b173cd5cad9e053c691d8460dad8f0
add _add_child to ForeignFutureOperation
flow_workflow/future_operation.py
flow_workflow/future_operation.py
from flow_workflow.factory import operation_variable_name class FutureOperation(object): def __init__(self, operation_class, operation_id, name, parent, **kwargs): self.operation_class = operation_class self.operation_id = int(operation_id) self.name = name self.parent = parent ...
Python
0.000062
@@ -1794,32 +1794,79 @@ n_data.net_key%0A%0A + def _add_child(self, child):%0A pass%0A%0A def net_key(
3eb5effc0f7620ea0268c804614e43e36801105a
fix APP_NAME definition in google authenticator
hal/internet/gmail/gauthenticator.py
hal/internet/gmail/gauthenticator.py
# !/usr/bin/python # coding: utf_8 # Copyright 2017-2018 Race UP # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0.00029
@@ -774,118 +774,8 @@ ge%0A%0A -# app settings%0AAPP_NAME = %22Happy Birthday sender + Cake reminder%22%0AAPP_ORGANIZATION_WEBSITE = %22www.raceup.it%22%0A%0A %0Acla @@ -830,16 +830,26 @@ , scope, + app_name, app_sec @@ -858,16 +858,33 @@ ts_path, +%0A user_cr @@ -966,16 +966,80 @@ of api%0A +...
67e37e785f9ea630c4fc760d39a8c00c5968e334
Remove needless print
iroha_cli/commands.py
iroha_cli/commands.py
import base64 import os from enum import Enum import binascii from iroha_cli import crypto, file_io from iroha_cli.libs.amount import int_to_amount from iroha_cli.exception import CliException from primitive_pb2 import Amount, uint256 from commands_pb2 import * BASE_NAME = "iroha-mizuki-cli" class CommandList: ...
Python
0.000197
@@ -7956,57 +7956,8 @@ y%22%5D%0A - print(%22main:%7B%7D%22.format(main_pubkey))%0A @@ -8098,62 +8098,8 @@ d%22%5D%0A - print(%22account_id:%7B%7D%22.format(account_id))%0A
afce0f198e47b1fd1d8ba70ac748eda5e3943d25
Remove get_normalized_sentiment. Sentiment score need not to be normalized.
pygraphc/anomaly/SentimentAnalysis.py
pygraphc/anomaly/SentimentAnalysis.py
from textblob import TextBlob from operator import itemgetter class SentimentAnalysis(object): """Get sentiment analysis with only positive and negative considered. Positive means normal logs and negative sentiment refers to possible attacks. This class uses sentiment analysis feature from the TextBlob l...
Python
0.000213
@@ -2144,620 +2144,4 @@ ore%0A -%0A def get_normalized_sentiment(self):%0A %22%22%22Get normalized sentiment score.%0A%0A Returns%0A -------%0A normalized_score : dict%0A A dictionary containing key: cluster id and value: normalized sentiment score.%0A %22%22%22%0A ...
cbffa8a650ec99ad3a1626250579d8b9cf56cb12
Handle parsing error in one execution
pabot/result_merger.py
pabot/result_merger.py
# Copyright 2014->future! Mikko Korpela # # 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 agree...
Python
0.000001
@@ -876,16 +876,51 @@ nResult%0A +from robot.errors import DataError%0A from rob @@ -5286,24 +5286,41 @@ in results:%0A + try:%0A res @@ -5342,16 +5342,160 @@ lt(src)%0A + except DataError as err:%0A print(err.message)%0A print(%22Skipping '%25s' from final result%2...
2a63e93dc2ecb8f3d195411a140c6fc3c0c50bf7
Remove missed `website.models` import
framework/celery_tasks/signals.py
framework/celery_tasks/signals.py
# -*- coding: utf-8 -*- """Attach callbacks to signals emitted by Celery. This module should only be imported by Celery and is not used elsewhere in the application. """ import logging from celery import signals from framework.mongo import storage, set_up_storage, StoredObject from website import models, settings lo...
Python
0
@@ -238,33 +238,8 @@ port - storage, set_up_storage, Sto @@ -271,16 +271,8 @@ port - models, set @@ -704,148 +704,64 @@ -logger.debug('Not setting storage backends because USE_POSTGRES = True')%0A return%0A set_up_storage(models.MODELS, storage.MongoStorage +return%0A logger.error('USE_POSTGRES...
9412c956a724178885d3b6e37594c76974935f91
test update
pymatgen/io/xtb/tests/test_outputs.py
pymatgen/io/xtb/tests/test_outputs.py
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import os import unittest from pymatgen.core.structure import Molecule from pymatgen.io.qchem.outputs import check_for_structure_changes from pymatgen.io.xtb.outputs import CRESTOutput from pymatgen.util.test...
Python
0.000087
@@ -697,53 +697,121 @@ __), - %22..%22, %22..%22, %22..%22, %22..%22, %22test_files%22, %22xtb%22, +%0A PymatgenTest.TEST_FILES_DIR, %22xtb%22,%0A %22sa @@ -901,44 +901,35 @@ _), -%22..%22, %22..%22, %22..%22, %22..%22, %22test_files%22 +Py...
b639e094f0ac9feb008c0d13deb26c55bbb50793
Make jumping between changes loop back around
git_gutter_change.py
git_gutter_change.py
import sublime import sublime_plugin try: from GitGutter.view_collection import ViewCollection except ImportError: from view_collection import ViewCollection class GitGutterBaseChangeCommand(sublime_plugin.WindowCommand): def lines_to_blocks(self, lines): blocks = [] last_line = -2 ...
Python
0.000003
@@ -1175,27 +1175,30 @@ t_row), -current_row +all_changes%5B0%5D )%0A%0A%0Aclas @@ -1415,20 +1415,24 @@ t_row), -current_row +all_changes%5B-1%5D )
27ba004d3a886cd17eae4c5d3b4573837557559a
Remove laposte
roulier/carriers/laposte/laposte_transport.py
roulier/carriers/laposte/laposte_transport.py
# -*- coding: utf-8 -*- """Implement laposteWS.""" import requests import email.parser from lxml import objectify, etree from jinja2 import Environment, PackageLoader from roulier.transport import Transport from roulier.ws_tools import remove_empty_tags import logging log = logging.getLogger(__name__) class LaposteT...
Python
0
@@ -1163,83 +1163,8 @@ ge)%0A - log.info('WS response time %25s' %25 response.elapsed.total_seconds())%0A
71e1369eab7a389cb8d89e62eaa24724a249524e
FIX constrains sale.order.type
sale_order_type_automation/sale_order_type.py
sale_order_type_automation/sale_order_type.py
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, fields, api, _ from op...
Python
0
@@ -1449,21 +1449,19 @@ @api. -model +one %0A @ap @@ -1716,24 +1716,44 @@ %0A if +self.journal_id and self.journal @@ -1845,32 +1845,60 @@ ame)%0A if +self.payment_journal_id and self.payment_jou @@ -2006,24 +2006,51 @@ %0A if +self.refund_journal_id and self.refund_ @@ -2184,32...