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 |
|---|---|---|---|---|---|---|---|
aebc2c88b1ef1092d1266d2eb0aeb8333a1396c2 | Add context manager functionality to event bus. | rave/events.py | rave/events.py | """
rave event bus.
"""
import rave.log
## API.
class StopProcessing(BaseException):
""" Exception raised to indicate this event should onot be processed further. """
pass
class EventBus:
def __init__(self):
self.handlers = {}
def hook(self, event, handler=None):
if not handler:
... | Python | 0 | @@ -38,16 +38,38 @@
og%0A%0A
-%0A## API.
+_log = rave.log.get(__name__)%0A
%0A%0Acl
@@ -158,17 +158,16 @@
should
-o
not be p
@@ -198,16 +198,355 @@
pass%0A%0A
+class HookContext:%0A def __init__(self, bus, event, handler):%0A self.bus = bus%0A self.event = event%0A self.handler = handle... |
df055bfcd5c3c29ae9ff8c361acebed71f5e6475 | version 0.0.22 | datary/version.py | datary/version.py | #!/usr/bin/env python
__version__ = "0.0.21"
| Python | 0.000001 | @@ -39,7 +39,7 @@
.0.2
-1
+2
%22%0A
|
2a4c16b565b2cd7ab9feb17c528d6a0a678b7523 | Update handlers.py | redislog/handlers.py | redislog/handlers.py | import logging
import redis
import simplejson as json
class RedisFormatter(logging.Formatter):
def format(self, record):
"""
JSON-encode a record for serializing through redis.
Convert date to iso format, and stringify any exceptions.
"""
data = record._raw.copy()
... | Python | 0.000001 | @@ -763,14 +763,8 @@
None
-, **kw
)%0A%0A%0A
|
cb48f67d3e752e02945efea48567a7937ecad5c9 | Move definition of default batch size | qnd/inputs.py | qnd/inputs.py | import os
import tensorflow as tf
from . import util
from .flag import FLAGS, add_flag, add_required_flag
MODES = [tf.contrib.learn.ModeKeys.TRAIN,
tf.contrib.learn.ModeKeys.EVAL,
tf.contrib.learn.ModeKeys.INFER]
def _add_file_flag(mode):
assert isinstance(mode, str)
flag_name = "{}_fil... | Python | 0.000001 | @@ -103,16 +103,40 @@
_flag%0A%0A%0A
+DEFAULT_BATCH_SIZE = 64%0A
MODES =
@@ -647,29 +647,8 @@
ES%0A%0A
- BATCH_SIZE = 64%0A%0A
@@ -788,32 +788,40 @@
pe=int, default=
+DEFAULT_
BATCH_SIZE,%0A
@@ -901,34 +901,76 @@
e_capacity%22,
- type=int,
+%0A type=int,%0A
... |
00858c1fbf24d96e90d6353d8c1b4c25b7d8177b | Add delete method for Trie nodes. | typeahead_search/search.py | typeahead_search/search.py | import sys
import string
class TypeAheadSearchTrie(object):
"""A Trie (prefix tree) class for use in typeahead search.
Every node in the TypeAheadSearchTrie is another TypeAheadSearchTrie
instance.
"""
def __init__(self):
# The children of this node. Because ordered traversals are not
... | Python | 0 | @@ -1228,32 +1228,431 @@
n self.entries%0A%0A
+ def delete(self, word, entry):%0A %22%22%22Deletes the given data entry from the given Trie word.%0A The word is removed if it becomes empty.%0A %22%22%22%0A self.entries.discard(entry)%0A if not self.entries:%0A return Tr... |
931ce1866e274c4ea28b924fbc0a3ca58869c6e1 | simplify and fix the mock fixture | pytest_mock.py | pytest_mock.py | import sys
import pytest
if sys.version_info >= (3, 3): # pragma: no cover
import unittest.mock as mock_module
else:
import mock as mock_module
class MockFixture(object):
"""
Fixture that provides the same interface to functions in the mock module,
ensuring that they are uninstalled at the end ... | Python | 0 | @@ -2377,38 +2377,32 @@
all()%0A%0A%0A@pytest.
-yield_
fixture%0Adef mock
@@ -2402,16 +2402,22 @@
ef mock(
+mocker
):%0A %22
@@ -2635,23 +2635,21 @@
-for m i
+retur
n mocker
():%0A
@@ -2648,23 +2648,5 @@
cker
-():%0A yield m
+%0A
|
830bda6b5a316f17e2b90f4a38dd136fc51fab7a | allow lower case ndarray attributes | redmapper/catalog.py | redmapper/catalog.py | import fitsio
import esutil as eu
import numpy as np
import itertools
from numpy.lib.recfunctions import merge_arrays
class DataObject(object):
"""Abstract base class to encapsulate info from FITS files."""
def __init__(self, *arrays):
"""Constructs DataObject from arbitrary number of ndarrays.
... | Python | 0.00206 | @@ -1486,16 +1486,119 @@
pper()%5D%0A
+ elif attr.lower() in self._ndarray.dtype.names:%0A return self._ndarray%5Battr.lower()%5D%0A
@@ -3368,16 +3368,122 @@
r()%5D%5B0%5D%0A
+ elif attr.lower() in self._ndarray.dtype.names:%0A return self._ndarray%5Battr.lower()%5D%5B0%5... |
6c4e3e4ee28b4228f9ca975f169919e2e2ed4108 | Fix to code style requirements | pogom/proxy.py | pogom/proxy.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import logging
import requests
import sys
import time
from queue import Queue
from threading import Thread
log = logging.getLogger(__name__)
# Simple function to do a call to Niantic's system for testing proxy connectivity
def check_proxy(proxy_queue, timeout, proxies, sho... | Python | 0.00006 | @@ -3982,9 +3982,8 @@
%25s', e)%0A
-%0A
|
96cb833c6a58214d9b043332efc6acb45cf90de7 | Change autoexam_folder variable setup | qtui/main.pyw | qtui/main.pyw | #!/usr/bin/env python
import sys
import os
import os.path
os.environ['AUTOEXAM_FOLDER'] = os.path.dirname(os.getcwd())
sys.path.append(os.environ['AUTOEXAM_FOLDER'])
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from PyQt4 import uic
from exam_wizard import ExamWizard
from os import mkdir, environ
from os.pat... | Python | 0 | @@ -108,15 +108,29 @@
(os.
-getcwd(
+path.dirname(__file__
))%0As
|
73c3c9deac8f298a118c19d81648d86820d69001 | save to config | runner_GUI.py | runner_GUI.py | import tkinter as tk
from tkinter import ttk
from configparser import RawConfigParser
from gui import match_settings_frame
from gui.team_frames.team_frame_notebook import NotebookTeamFrame
from gui.utils import get_file, IndexManager
from utils.rlbot_config_parser import create_bot_config_layout, get_num_players
from ... | Python | 0.000001 | @@ -1117,32 +1117,48 @@
g%0A%0Adef save_cfg(
+overall_config,
team1, team2, ma
@@ -1180,32 +1180,77 @@
-print(%22Need to save cfg%22
+with open(%22rlbot.cfg%22, %22w%22) as f:%0A f.write(str(overall_config)
)%0A%0Ad
@@ -2150,24 +2150,40 @@
a: save_cfg(
+overall_config,
team1, team2
|
1ad6468d33758b44b33611a35fb31748948039fc | Remove autoplay for video in course about page | cms/djangoapps/models/settings/course_details.py | cms/djangoapps/models/settings/course_details.py | import re
import logging
import datetime
import json
from json.encoder import JSONEncoder
from xmodule.modulestore import Location
from xmodule.modulestore.exceptions import ItemNotFoundError
from xmodule.modulestore.inheritance import own_metadata
from contentstore.utils import get_modulestore, course_image_url
from ... | Python | 0.000001 | @@ -7320,19 +7320,8 @@
+ '?
-autoplay=1&
rel=
|
3c7afc4c157d75ebd3411303e285b42539ef6779 | Remove trailing white space. | python/07-1.py | python/07-1.py | #!/usr/bin/env python
import re
instructions = []
def doOperation(operator, operands):
if operator == '':
return operands[0]
elif operator == 'NOT':
return ~operands[0]
elif operator == 'AND':
return operands[0] & operands[1]
elif operator == 'OR':
return operands[0] | operands[1]... | Python | 0.000003 | @@ -1665,22 +1665,16 @@
break%0A
-
%0A i
|
19a633310feb3283d979c4ab4cb11a53dcfb6af6 | Fix version comparisons. | scons/llvm.py | scons/llvm.py | """llvm
Tool-specific initialization for LLVM
"""
#
# Copyright (c) 2009 VMware, Inc.
#
# 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 ... | Python | 0 | @@ -2703,16 +2703,92 @@
roup(1)%0A
+ llvm_version = distutils.version.LooseVersion(llvm_version)%0A
@@ -5358,16 +5358,84 @@
rstrip()
+%0A llvm_version = distutils.version.LooseVersion(llvm_version)
%0A%0A
@@ -5901,72 +5901,8 @@
ion%0A
- llvm_version = distutils.version.Loose... |
fad8972f9ac9dec41b505b31271d01d0a14b80b1 | Fix MasteryLogSErializer.get_pastattempts | kolibri/core/logger/serializers.py | kolibri/core/logger/serializers.py | import json
from django.db.models import Sum
from django.utils.timezone import now
from le_utils.constants import exercises
from rest_framework import serializers
from kolibri.core.auth.models import FacilityUser
from kolibri.core.logger.constants.exercise_attempts import MAPPING
from kolibri.core.logger.models impor... | Python | 0 | @@ -2539,19 +2539,8 @@
n =
-json.loads(
obj.
@@ -2556,17 +2556,16 @@
riterion
-)
%0A
|
282131179642e653ef292050c53f1620ebddb269 | Make program description more concise | src/merge.py | src/merge.py | #!/usr/bin/env python
'''
A simple program designed to allow a user to merge a pdf document
that contains only the front pages to a separate document that contains
only the back pages, and merge them in the right order into a new pdf
document.
@author: Matt Garriott
'''
import argparse
import os
from pyPdf import Pdf... | Python | 0.99993 | @@ -23,58 +23,22 @@
'''%0A
-A simple program designed to allow a user to merge
+Merge together
a p
@@ -52,21 +52,16 @@
ment
-%0Athat
contain
s on
@@ -60,19 +60,17 @@
tain
-s
+ing
only
-the
fron
@@ -77,18 +77,20 @@
t pages
-to
+with
a separ
@@ -92,17 +92,17 @@
separate
-
+%0A
document
@@ -106,30 +106... |
ef72ac56633feff8bc6ab1320e4b8d332363505a | Fix wrong patch in unit tests | sahara/tests/unit/plugins/vanilla/hadoop2/test_edp_engine.py | sahara/tests/unit/plugins/vanilla/hadoop2/test_edp_engine.py | # Copyright (c) 2017 EasyStack 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 wri... | Python | 0.000001 | @@ -692,49 +692,8 @@
ine%0A
-from sahara.service.edp import job_utils%0A
from
@@ -965,41 +965,91 @@
-job_utils.get_plugin = mock.Mock(
+with mock.patch('sahara.service.edp.job_utils.get_plugin',%0A
retu
@@ -1072,17 +1072,22 @@
lugins')
-%0A
+:%0A
|
c8ffd1fc4c4e06cd71e86d1d48749a3fe527a54e | Fix test to accommodate change of error message. | biosys/apps/main/tests/api/test_serializers.py | biosys/apps/main/tests/api/test_serializers.py | from django.test import TestCase
from main.api.serializers import DatasetSerializer
from main.tests.api import helpers
class TestDatsetSerializer(helpers.BaseUserTestCase):
def test_name_uniqueness(self):
"""
Test that the serializer report an error if the dataset name is not unique within a pro... | Python | 0 | @@ -1187,44 +1187,63 @@
In('
-project, name must make a unique set
+A dataset with this name already exists in the project.
', e
|
c6b13093b6d767775d7411105fc4f8fb6eb6f0a4 | check for variable.txt | rank_models.py | rank_models.py | #!/usr/bin/env python
"""
Rank all available models
@copyright: The Broad Institute of MIT and Harvard 2015
"""
import os, glob, argparse
import operator
var_file = "./data/variables.txt"
def load_vars(fn):
res = []
if not os.path.exists(fn):
fn = var_file
with open(fn, "rb") as vfile:
f... | Python | 0.000001 | @@ -1801,16 +1801,32 @@
unt = 0%0A
+empty_count = 0%0A
for dir_
@@ -1971,16 +1971,79 @@
*.csv%22)%0A
+ var_file = os.path.exists(dir_name + %22/variables.txt%22)%0A
@@ -2052,24 +2052,36 @@
train_files
+ or var_file
:%0A
|
d4ff808cf9d93dcf38b672823777358850d0a09d | Update testnet defaults #10 | raiden/app.py | raiden/app.py | # -*- coding: utf8 -*-
from __future__ import print_function
import signal
import gevent
import click
from ethereum import slogging
from pyethapp.rpc_client import JSONRPCClient
from raiden.raiden_service import RaidenService
from raiden.network.discovery import ContractDiscovery
from raiden.network.transport import ... | Python | 0 | @@ -2340,48 +2340,48 @@
lt='
-b224d093ce716e2e9983107357dd9702098230e7
+07d153249abe665be6ca49999952c7023abb5169
',
@@ -2541,48 +2541,48 @@
lt='
-36d6e50d4d690a1cf7168bf7df33af5b5f01f438
+1376c0c3e876ed042df42320d8a554a51c8c8a87
',
|
5d63166d4a6b4b51c29379ad3673d1792ab7983c | fix merge issues | safety/cli.py | safety/cli.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import sys
import click
from safety import __version__
from safety import safety
from safety.formatter import report
import itertools
from safety.util import read_requirements
from safety.errors import DatabaseFetchError, DatabaseFileNotFoundError, InvalidK... | Python | 0.000001 | @@ -2890,16 +2890,21 @@
%5D
+ %0A
prox
@@ -3405,28 +3405,24 @@
-
vulns=vulns,
@@ -3422,20 +3422,16 @@
=vulns,%0A
-
@@ -3452,20 +3452,16 @@
report,%0A
-
@@ -3494,20 +3494,16 @@
-
bare_rep
@@ -3512,20 +3512,16 @@
t=bare,%0A
-
@... |
9c092536c5db8d5bf14a1aa366ba45c860eeec5e | remove redundant kwarg | scrapy/log.py | scrapy/log.py | """
Scrapy logging facility
See documentation in docs/topics/logging.rst
"""
import sys
import logging
import warnings
from twisted.python import log
import scrapy
from scrapy.utils.python import unicode_to_str
from scrapy.settings import overridden_settings
# Logging levels
DEBUG = logging.DEBUG
INFO = logging.INF... | Python | 0.999912 | @@ -4663,29 +4663,8 @@
wler
-, print_headers=False
):%0A
|
4dfd7c28be7931e3b12be330aade94452f6a8e08 | Add new replacement primitives | primitives.py | primitives.py | from itertools import ifilter
import re
# string primitives
def str_remove_tabs(s):
return s.replace("\t", " ")
def str_remove_endline(s):
return s.replace("\n", " ")
def str_remove_consecutive_spaces(s):
return re.sub(r'\ +', ' ', s)
def str_strip(s):
return s.strip()
# regexp primitives
s2l_date1... | Python | 0 | @@ -1,34 +1,4 @@
-from itertools import ifilter%0A
impo
@@ -73,32 +73,33 @@
ace(%22%5Ct%22, %22 %22)%0A%0A
+%0A
def str_remove_e
@@ -142,16 +142,17 @@
, %22 %22)%0A%0A
+%0A
def str_
@@ -204,24 +204,25 @@
ub(r
-'%5C +', ' '
+%22%5C +%22, %22 %22
, s)%0A%0A
+%0A
def
@@ -257,16 +257,140 @@
trip()%0A%0A
+%0Adef s... |
6ef80f7603ae41bce42eecfbd272704b39fb30ec | Change salt-call to use the new outputter systems | salt/cli/caller.py | salt/cli/caller.py | '''
The caller module is used as a front-end to manage direct calls to the salt
minion modules.
'''
# Import python modules
import sys
import logging
import traceback
# Import salt libs
import salt.loader
import salt.minion
import salt.output
from salt._compat import string_types
from salt.log import LOG_LEVELS
# Cu... | Python | 0.000001 | @@ -2861,35 +2861,24 @@
pts)%0A
- printout =
salt.output
@@ -2878,26 +2878,28 @@
.output.
-get_printo
+display_outp
ut(grain
@@ -2922,82 +2922,8 @@
opts
-, indent=2)%0A printout(grains, color=not bool(self.opts%5B'no_color'%5D)
)%0A%0A
@@ -3029,35 +3029,24 @@
ll()%0A
- printout =
salt.ou... |
661c4792001e4d7a00d01efcfbc0af69e614f601 | print EV | python/main.py | python/main.py | from optparse import OptionParser
from pyspark import SparkContext
from dictionaries import D
from geoname_extractor import processDoc
import ProbabilisticER
import json
import codecs
# Given a path in json, return value if path, full path denoted by a separator,like '$'or '.',
# (example address.name) exists, otherw... | Python | 0.999671 | @@ -178,16 +178,517 @@
codecs%0A%0A
+%22%22%22%0ARUN AS:%0Aspark-submit --master local%5B*%5D --executor-memory=8g --driver-memory=8g %5C%0A--py-files lib/python-lib.zip main.py /tmp/geonames/input/input.jl /tmp/geonames/geo-out %5C%0A/tmp/geonames/output/prior_dict.json 3 /tmp/geonames/output/state_dict.json ... |
75de38ef00770ce24cf2637e557201c52145c9ab | Add initial yaw angle offset | python/path.py | python/path.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import scipy.integrate
import matplotlib.patches
import matplotlib.pyplot as plt
import seaborn as sns
import filter as ff
import util
def get_trajectory(r, velocity_window_size, yaw_rate_window_size,
plot=False, trial_id=None):
c... | Python | 0.000022 | @@ -1695,16 +1695,149 @@
%5Bs%5D')%0A%0A
+ def f(y, t):%0A i = np.argmax(r%5B'time'%5D %3E= t)%0A return yf%5Bi%5D%0A yaw_angle = scipy.integrate.odeint(f, 0, r%5B'time'%5D)%0A%0A
def
@@ -2105,17 +2105,33 @@
%5B0, 0,
-0
+-yaw_angle.mean()
%5D, r%5B'ti
@@ -3437,16 +3437,35 @@
=handles
+,... |
beda7793bdd2a05a87e3f297eb4025e247c5d77e | Modify a return value | sqliteschema/_schema.py | sqliteschema/_schema.py | """
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import io
import warnings
from typing import Any, Dict, List, Optional
from mbstrdecoder import MultiByteStrDecoder
from tabledata import TableData
from ._const import MAX_VERBOSITY_LEVEL, SQLITE_SYSTEM_TABLES, SchemaHeader
from ._logger import ... | Python | 0.009879 | @@ -6553,29 +6553,27 @@
)%0A%0A return
-None
+%22%22
%0A
|
0fb2747074751e713d6feb60a52e9a07e9efc02d | Rename a variable | sqliteschema/_schema.py | sqliteschema/_schema.py | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import, unicode_literals
import six
from tabledata import TableData
from ._const import MAX_VERBOSITY_LEVEL, SQLITE_SYSTEM_TABLE_LIST, SchemaHeader
from ._logger import logger
class SQLiteTabl... | Python | 0.905921 | @@ -1282,20 +1282,19 @@
et(attr_
-name
+key
)%0A
@@ -1312,20 +1312,19 @@
or attr_
-name
+key
in self
|
73f247e122a44b262e031c940d1f6aea71d1cd16 | Rewrite threadpool code for better readability | rbm2m/action/scraper.py | rbm2m/action/scraper.py | # -*- coding: utf-8 -*-
from concurrent import futures
import rbm_parser
import downloader
from rbm2m.helpers import retry
POOL_SIZE = 5
class ScrapeError(Exception):
"""
Raised if scraping failed for any reason (after all retries)
"""
pass
class Scrape(object):
"""
Represents one... | Python | 0.000001 | @@ -2046,30 +2046,76 @@
_to_recid =
-dict((
+%7B%7D%0A for rec_id in rec_ids:%0A fut =
executor.sub
@@ -2141,29 +2141,9 @@
_id)
-, rec_id)%0A
+%0A
@@ -2154,35 +2154,34 @@
- for
+fut_to_
rec
-_
id
- in
+%5Bfut%5D =
rec_id
-s)
%0A%0A
@@ -2956,18 +2956,22 @@
mages... |
47c498a174c3a5f32db34b6cc1e646e016ee2187 | Implement make_temp() | coalib/tests/output/dbus/BuildDbusServiceTest.py | coalib/tests/output/dbus/BuildDbusServiceTest.py | import sys
import unittest
import tempfile
import os
from setuptools.dist import Distribution
from distutils.errors import DistutilsOptionError
sys.path.insert(0, ".")
from coalib.output.dbus.BuildDbusService import BuildDbusService
from coalib.misc import Constants
class BuildDbusServiceTest(unittest.TestCase):
... | Python | 0 | @@ -24,34 +24,8 @@
est%0A
-import tempfile%0Aimport os%0A
from
@@ -235,16 +235,66 @@
nstants%0A
+from coalib.misc.ContextManagers import make_temp%0A
%0A%0Aclass
@@ -510,58 +510,44 @@
-handle, uut.output = tempfile.mkstemp(text=True)%0A%0A
+with make_temp() as uut.output:%0A
@@ -578,24 +578,28 @@
... |
25b42909cf1a5fdce0f16831473b79920c2b85d1 | remove debug | AutoNetkit/readwrite/graphml.py | AutoNetkit/readwrite/graphml.py | # -*- coding: utf-8 -*-
"""
Graphml
"""
__author__ = "\n".join(['Simon Knight'])
# Copyright (C) 2009-2011 by Simon Knight, Hung Nguyen
__all__ = ['load_graphml']
import networkx as nx
import itertools
import pprint
import AutoNetkit as ank
import os
#TODO: make work with network object not self.ank
#TODO: split ... | Python | 0.000002 | @@ -1514,45 +1514,8 @@
%22)%5D%0A
- print %22empty%22, empty_label_nodes%0A
|
e36e2d58526cf2ab8c4445ee28ab5e53440f4218 | Fix UID strings. | Aufgabe2/server/mail.py | Aufgabe2/server/mail.py | import os
class Mail():
def __init__(self, filename):
self.filename = filename
self.content = []
self.uid = ''
self.deleted = False
def load(self):
file = open(self.filename, 'r')
self.content = file.read().split('\r\n')
self.uid = file.name[:file.name.index('.')]
file.close()
def size(self):
re... | Python | 0.000053 | @@ -247,28 +247,67 @@
d =
-file.name%5B:file.name
+os.path.basename(file.name)%0A%09%09self.uid = self.uid%5B:self.uid
.ind
|
6ba3f8e0b59b8fe880345be7ae594ccd76661f6d | Include column numbers with all error messages (#426) | pyflakes/messages.py | pyflakes/messages.py | """
Provide the class Message and its subclasses.
"""
class Message(object):
message = ''
message_args = ()
def __init__(self, filename, loc):
self.filename = filename
self.lineno = loc.lineno
self.col = getattr(loc, 'col_offset', 0)
def __str__(self):
return '%s:%s: ... | Python | 0.000631 | @@ -312,16 +312,18 @@
'%25s:%25s:
+%25s
%25s' %25 (
@@ -349,17 +349,31 @@
.lineno,
-%0A
+ self.col+1,%0A
|
ebf501b34b8bb9083005bfb0e7de7d6219a22854 | Fix Deeplab | deeplab/seg_carv_4_train.py | deeplab/seg_carv_4_train.py | # pylint: skip-file
import sys, os
import argparse
import mxnet as mx
import numpy as np
import logging
import seg_carv_7_init_from_cls
from symbols.irnext_v2_deeplab_v3_dcn_w_hypers import *
from data import FileIter
from data import BatchFileIter
from solver import Solver
from dice_metric import DiceMetric
logger =... | Python | 0.000007 | @@ -195,120 +195,178 @@
rom
-data import FileIter%0Afrom data import BatchFileIter%0Afrom solver import Solver%0Afrom dice_metric import DiceMetric
+seg_carv_1_data_loader import FileIter%0Afrom seg_carv_1_data_loader import BatchFileIter%0Afrom seg_carv_2_dicemetric import DiceMetric%0Afrom seg_carv_3_solver import ... |
a8bae93806648d0b87015d098b801818dffeb755 | update automl dependencies (#3162) | pyzoo/setup.py | pyzoo/setup.py | #!/usr/bin/env python
#
# Copyright 2018 Analytics Zoo Authors.
#
# 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 appl... | Python | 0 | @@ -5290,16 +5290,32 @@
%3C2.0.0',
+ 'h5py==2.10.0',
'ray%5Btu
@@ -5491,68 +5491,8 @@
sts'
-,%0A 'bayesian-optimization'
%5D%7D,%0A
|
8b8523f36d5fc51b64a548152befcbe346eec845 | Add site.categories template variable. | wok/engine.py | wok/engine.py | #!/usr/bin/python2
import os
import yaml
import shutil
from datetime import datetime
from optparse import OptionParser
import wok
from wok import page
from wok import renderers
from wok import util
from wok import devserver
class Engine(object):
default_options = {
'content_dir' : 'content',
'temp... | Python | 0 | @@ -3432,32 +3432,61 @@
ake_tree(self):%0A
+ self.categories = %7B%7D%0A
site_tre
@@ -3649,32 +3649,262 @@
self.all_pages:%0A
+ if len(p.category) %3E 0:%0A top_cat = p.category%5B0%5D%0A if not top_cat in self.categories:%0A self.categories%... |
1a737458f6be27fd13110a30c3f00c461b4c4268 | Fix `qiime tools peek` for visualizations (#102) | q2cli/tools.py | q2cli/tools.py | # ----------------------------------------------------------------------------
# Copyright (c) 2016--, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# -----------------------------------------------... | Python | 0 | @@ -3356,16 +3356,56 @@
a.type)%0A
+ if metadata.format is not None:%0A
clic
@@ -3443,32 +3443,36 @@
een%22, nl=False)%0A
+
click.secho(
|
96384acb793a7be82a7ce066866729b94958bb05 | add more ifs to ensembles/Set a lower tolfunc for cmaes | AutoML2015/ensembles.py | AutoML2015/ensembles.py | '''
Created on Dec 19, 2014
@author: Aaron Klein
'''
import os
import sys
import cma
import time
import logging
import numpy as np
from data import data_io
from models import evaluate
import util.Stopwatch
def weighted_ensemble_error(weights, *args):
predictions = args[0]
true_labels = args[1]
metric =... | Python | 0 | @@ -1080,21 +1080,291 @@
1%5D,
- 'seed': seed
+%0A 'seed': seed,%0A 'verb_log': 0, # No output files%0A 'tolfun': 1e-9 # Default was 1e-11%0A ... |
86d74b665b6603cea39a1f13b51f1970ebb691f5 | Remove unnecessary import | nanogen.py | nanogen.py | """
nanogen - a very small blog generator
"""
from __future__ import absolute_import
import os
import re
import shutil
import datetime
import subprocess
import jinja2
import logger
import renderer
__author__ = 'Bill Israel <bill.israel@gmail.com>'
__version__ = (0, 9, 9)
version = '.'.join(map(str, __version__))
... | Python | 0.000011 | @@ -43,48 +43,8 @@
%22%22%22%0A
-from __future__ import absolute_import%0A%0A
impo
|
894896f6ce0d6f60093a694e142658fde706aff0 | Add missing versionadded note to new exception class | paramiko/ssh_exception.py | paramiko/ssh_exception.py | # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (a... | Python | 0 | @@ -5452,16 +5452,44 @@
vs v6).
+%0A%0A .. versionadded:: 1.16
%0A %22%22%22
|
06c76b924b27db0158de4048eeb8a11e25badaf4 | Add middleware to set request.is_secure from behind a proxy. | comrade/core/middleware.py | comrade/core/middleware.py | from django.conf import settings
from django.http import (HttpResponsePermanentRedirect, get_host, HttpResponse,
HttpResponseForbidden, Http404)
from django.core.exceptions import PermissionDenied
from django.contrib.auth.views import redirect_to_login
import re
import itertools
try:
# Import Piston if it... | Python | 0 | @@ -2256,16 +2256,197 @@
ponse%0A%0A%0A
+class ForwadedSSLMiddleware(object):%0A def process_request(self, request):%0A request.is_secure = lambda: request.META.get(%0A 'HTTP_X_FORWARDED_SSL') == 'on'%0A%0A%0A
class Ss
|
900c939178381f17c0129f200a292725830968e5 | make h5 file more general, put usgs data in a usgs group | pyhis/usgs_tables.py | pyhis/usgs_tables.py | """
module that defines pytables cache
"""
import os
import tempfile
import tables
from pyhis import usgs_core
# default hdf5 file path
HDF5_FILE_PATH = os.path.join(tempfile.gettempdir(), "pyhis_usgs.h5")
class USGSSite(tables.IsDescription):
agency = tables.StringCol(20)
code = tables.StringCol(20)
c... | Python | 0 | @@ -195,13 +195,8 @@
yhis
-_usgs
.h5%22
@@ -1514,19 +1514,69 @@
HIS
-USGS cache%22
+data%22)%0A usgs = h5file.createGroup('/', 'usgs', 'USGS Data'
)%0A
@@ -1596,19 +1596,20 @@
teTable(
-'/'
+usgs
, 'sites
|
e0c05f7d563fa70c36a0ff2e102b2b96097f07fe | Change the behavior of MessageHandler.transition() | rosbridge_library/src/rosbridge_library/internal/subscription_modifiers.py | rosbridge_library/src/rosbridge_library/internal/subscription_modifiers.py | # Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, 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... | Python | 0 | @@ -2903,32 +2903,59 @@
throttle_rate ==
+ 0 and self.queue_length ==
0:%0A
@@ -3373,32 +3373,59 @@
throttle_rate ==
+ 0 and self.queue_length ==
0:%0A
@@ -4301,16 +4301,43 @@
_rate ==
+ 0 and self.queue_length ==
0:%0A
|
23c964580f3fc58146865d9e4d1afbf588068de0 | Update pykubectl/kubectl.py | pykubectl/kubectl.py | pykubectl/kubectl.py | import json
import logging
import tempfile
from subprocess import CalledProcessError, check_output
class KubeCtl:
def __init__(self, bin='kubectl', global_flags=''):
super().__init__()
self.kubectl = f'{bin} {global_flags}'
def execute(self, command, definition=None, safe=False):
cmd ... | Python | 0 | @@ -563,10 +563,8 @@
me%7D'
- %5C
%0A%0A
|
0b1376caef3a32d260d36bff4522199b9bf484fe | Normalize version number. | pyptouch/__init__.py | pyptouch/__init__.py | # -*- coding: utf-8 -*-
"""Python driver for P-Touch series of label-printers, with various utilities.
.. moduleauthor:: Terje Elde <terje@elde.net>
"""
__author__ = 'Terje Elde'
__email__ = 'terje@elde.net'
__version__ = '0.0.1-dev0'
| Python | 0.000008 | @@ -224,15 +224,15 @@
= '0.0.1
--
+.
dev0'%0A
|
4e209ce3b531edf41c643cdec94f9746ad032338 | fix rspy.repo.build to not include RelWithDebInfo (in LibCI) | unit-tests/py/rspy/repo.py | unit-tests/py/rspy/repo.py | # License: Apache 2.0. See LICENSE file in root directory.
# Copyright(c) 2021 Intel Corporation. All Rights Reserved.
import os
# this script is located in librealsense/unit-tests/py/rspy, so main repository is:
root = os.path.dirname( os.path.dirname( os.path.dirname( os.path.dirname( os.path.abspath( __file__ ))))... | Python | 0 | @@ -459,26 +459,8 @@
tic'
-, 'RelWithDebInfo'
)%0Ai
|
9faad8e2e78df8d8ed1e6a76a606cc4abd69c74d | Fix typo in plugin.py | pytest_cpp/plugin.py | pytest_cpp/plugin.py | import os
import stat
import sys
import pytest
from pytest_cpp.boost import BoostTestFacade
from pytest_cpp.error import CppFailureRepr, CppFailureError
from pytest_cpp.google import GoogleTestFacade
FACADES = [GoogleTestFacade, BoostTestFacade]
DEFAULT_MASKS = ("test_*", "*_test")
_ARGUMENTS = "cpp_arguments"
# ... | Python | 0.000002 | @@ -2612,17 +2612,16 @@
n, requi
-e
res -s%22,
|
bc587fec6f3a8781be59528c17ebf56a04bc313a | remove blessing (colorize) dependeces | pytest_dependency.py | pytest_dependency.py | """pytest-dependency - Manage dependencies of tests
This pytest plugin manages dependencies of tests. It allows to mark
some tests as dependent from other tests. These tests will then be
skipped if any of the dependencies did fail or has been skipped.
"""
import pytest
__version__ = "0.2"
from blessings import T... | Python | 0.000012 | @@ -270,31 +270,8 @@
test
-%0A%0A__version__ = %220.2%22
%0Afro
@@ -299,16 +299,39 @@
rminal%0A%0A
+__version__ = %220.2%22%0A%0A
terminal
@@ -1980,16 +1980,117 @@
msg =
+ %22%25s depends on %25s (failed)%22 %25 (item.name, i)%0A # color version%0A # msg =
%22%25s dep
@@ -217... |
78dd3f4c46939c619f4a78b854c07612d4b74573 | Update cam_timeLapse_Threaded_cam.py | camera/timelapse/cam_timeLapse_Threaded_cam.py | camera/timelapse/cam_timeLapse_Threaded_cam.py | #!/usr/bin/env python2.7
import time
import picamera
import os
import errno
FRAME_INTERVAL = 30
DIRNAME = "/home/pi/timelapse"
frame = 1
def create_dir():
TIME = time.localtime()
CURRENT_YEAR = TIME[0]
CURRENT_MONTH = TIME[1]
CURRENT_DAY = TIME[2]
CURRENT_HOUR = TIME[3]
global DIRNAME
DIR... | Python | 0.000001 | @@ -70,16 +70,279 @@
errno%0A%0A
+import sys%0A%0Aclass Logger(object):%0A def __init__(self):%0A self.terminal = sys.stdout%0A self.log = open(%22logfile.log%22, %22a%22)%0A%0A def write(self, message):%0A self.terminal.write(message)%0A self.log.write(message) %0A%0Asys.stdout = L... |
5a557eed24ac2351b59b76ddd9fa2fefa4369afb | Add -fPIC flag to compile. Needed for 64bits architecture. | pythran/interface.py | pythran/interface.py | '''This module contains all the stuff to make your way from python code to a dynamic library
* cxx_generator transforms a python module to c++ code
* compile transforms c++ code into a native module
'''
import sys
import os.path
import distutils.sysconfig
from cxxgen import *
import ast
from middlend import re... | Python | 0 | @@ -4822,16 +4822,47 @@
python')
+%0A tc.ldflags.append('-fPIC')
%0A%0A tc
|
9a867e450c86083eb582addb7c078d12452d0217 | Fix bug in constant propagation. | pythran/intrinsic.py | pythran/intrinsic.py | class UpdateEffect(object):
pass
class ReadEffect(object):
pass
class Intrinsic:
def __init__(self, argument_effects=(UpdateEffect(),) * 11,
global_effects=True,
return_alias=lambda x: {None}):
self.argument_effects = argument_effects
self.global_effects = global_... | Python | 0 | @@ -177,19 +177,20 @@
effects=
-Tru
+Fals
e,%0A
@@ -649,12 +649,33 @@
urn
-any(
+not any(%0A
isin
@@ -728,17 +728,62 @@
_effects
-)
+%0A ) and not self.global_effects
%0A%0A%0Aclass
|
0a5c9f8cdf55916ac9a914a0d2fe68893d2c26af | Fix upload listing test | qa/upload_listing.py | qa/upload_listing.py | import requests
import json
from collections import OrderedDict
from test_framework.test_framework import OpenBazaarTestFramework, TestFailure
class UploadListingTest(OpenBazaarTestFramework):
def __init__(self):
super().__init__()
self.num_nodes = 1
def setup_network(self):
self.set... | Python | 0 | @@ -1456,11 +1456,13 @@
!=
+%22
213
+%22
:%0A
|
2a4e97b554669b95bb1d22f220ac2d7ba6df9012 | Fix wrong if statement | quilt/patchimport.py | quilt/patchimport.py | # vim: fileencoding=utf-8 et sw=4 ts=4 tw=80:
# python-quilt - A Python implementation of the quilt patch system
#
# Copyright (C) 2012 Björn Ricks <bjoern.ricks@googlemail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as ... | Python | 0 | @@ -1817,12 +1817,8 @@
if
-not
new_
|
c608e7c572027f2c80bf62563c89871effcd8209 | Add next and __iter__ to the list of file methods that should raise ValueError when called for a closed file. | Lib/test/test_file.py | Lib/test/test_file.py | import sys
import os
from array import array
from test.test_support import verify, TESTFN, TestFailed
from UserList import UserList
# verify writelines with instance sequence
l = UserList(['1', '2'])
f = open(TESTFN, 'wb')
f.writelines(l)
f.close()
f = open(TESTFN, 'rb')
buf = f.read()
f.close()
verify(buf == '12')
... | Python | 0 | @@ -2042,16 +2042,24 @@
isatty',
+ 'next',
'read',
@@ -2070,16 +2070,27 @@
adinto',
+%0A
'readli
@@ -2143,16 +2143,27 @@
'write',
+%0A
'xreadl
@@ -2167,17 +2167,28 @@
adlines'
-
+, '__iter__'
%5D%0Aif sys
|
ec88e78d783af4f4d92c2fea561eca694c54e0ab | Move importlib import location. | large_image/tilesource/__init__.py | large_image/tilesource/__init__.py | import os
from .. import config
from ..constants import SourcePriority
from ..exceptions import (TileGeneralError, TileGeneralException,
TileSourceAssetstoreError,
TileSourceAssetstoreException, TileSourceError,
TileSourceException, TileSour... | Python | 0 | @@ -4,16 +4,138 @@
ort os%0A%0A
+try:%0A from importlib.metadata import entry_points%0Aexcept ImportError:%0A from importlib_metadata import entry_points%0A%0A
from ..
@@ -1760,146 +1760,8 @@
%22%22%22%0A
- try:%0A from importlib.metadata import entry_points%0A except ImportError:%0A from ... |
bae7de9167f3d51bd8b2a61c12dee814a8293d8f | Fix simple typo: resposne -> response | lassie/filters/oembed/providers.py | lassie/filters/oembed/providers.py | # -*- coding: utf-8 -*-
"""
lassie.filters.providers
~~~~~~~~~~
This module contains oembed providers and a python oembed consumer.
"""
import re
import oembed
from ...utils import convert_to_int
HYPERLINK_PATTERN = re.compile(r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+')
PR... | Python | 0.999942 | @@ -958,10 +958,10 @@
espo
-s
n
+s
e da
|
c38278a1e72a24022a03fe12335908e2f39b25df | Remove unused methods. | panel/candidatewindow.py | panel/candidatewindow.py | import gtk
import gtk.gdk as gdk
import gobject
import ibus
from candidatepanel import CandidatePanel
class CandidateWindow (gtk.Window):
__gsignals__ = {
"cursor-up" : (
gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE,
()),
"cursor-down" : (
gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE,
()),
}
de... | Python | 0 | @@ -1121,196 +1121,8 @@
w)%0A%0A
-%09def show_preedit_string (self, text, attrs):%0A%09%09self._candidate_panel.show_preedit_string ()%0A%0A%09def hide_preedit_string (self, text, attrs):%0A%09%09self._candidate_panel.hide_preedit_string ()%0A%0A
%09def
|
c3e0249602f2173f21b56af1b88864323baf4e39 | Remove warnings | panoptes/utils/config.py | panoptes/utils/config.py | import yaml
import warnings
import os
import panoptes.utils.error
panoptes_config = '{}/../../config.yaml'.format(os.path.dirname(__file__))
def has_config(Class):
""" Class Decorator: Adds a config singleton to class """
# If already read, simply return config
if not has_config._config:
load_config(config_f... | Python | 0 | @@ -9,24 +9,8 @@
aml%0A
-import warnings%0A
impo
|
9a36b60fc5a5a3b103582ee438f06c81889ec1f4 | fix pid dir for daemon | deliverdaemon.py | deliverdaemon.py | import argparse
from supay import Daemon
from updater import prepare, loop
def init_d():
return Daemon(name='deliver', pid_dir='.')
def run():
daemon = init_d()
daemon.start(check_pid=True, verbose=True)
prepare()
loop()
def stop():
daemon = init_d()
daemon.stop(verbose=T... | Python | 0.000001 | @@ -9,16 +9,27 @@
rgparse%0D
+%0Aimport os%0D
%0A%0D%0Afrom
@@ -147,11 +147,39 @@
dir=
-'.'
+os.path.abspath(os.path.curdir)
)%0D%0A%0D
|
108c76d85c268891cac2b166f94e437ad498b383 | fix average calculation to be blocks over time | parse_disk_buffer_log.py | parse_disk_buffer_log.py | #!/bin/python
import os, sys, time
lines = open(sys.argv[1], 'rb').readlines()
# logfile format:
# <time(ms)> <key>: <value>
# example:
# 16434 read cache: 17
key_order = ['receive buffer', 'send buffer', 'write cache', 'read cache', 'hash temp']
colors = ['30f030', 'f03030', '80f080', 'f08080', '4040ff']
keys = [... | Python | 0.00704 | @@ -418,16 +418,37 @@
les = %7B%7D
+%0Afield_timestamp = %7B%7D
%0A%0Afor c
@@ -551,16 +551,40 @@
s%5Bc%5D = 0
+%0A%09field_timestamp%5Bc%5D = 0
%0A%0Alast_t
@@ -933,51 +933,87 @@
= 0%0A
-%0A
+%09
%09field
-s
+_sum
%5Bc%5D =
-n%0A%0A%09field_sum
+0%0A%09%09field_num_samples%5Bc%5D = 0%0A%09%09field_timestamp
... |
a9714450bed4efb07c798d56058ddd33f1e40402 | Allow to pass file names as arguments when invoking the script. | partitioned_hash_join.py | partitioned_hash_join.py | from io import open
from os import makedirs, path
from time import time
NR_OF_BUCKETS = 150
R = 'r10m.txt' # 'file1.txt'
S = 's10m.txt' # 'file2.txt'
def init_buckets(name):
if not path.exists('./tmp'):
makedirs('./tmp')
return [open('./tmp/{}_{}.txt'.format(name, i), 'w') for i in xrange(NR_OF_BUC... | Python | 0 | @@ -1,12 +1,495 @@
+#! /usr/bin/env python%0A%22%22%22This script computes the intersection of two files.%0A%0AUsage:%0A ./partitioned_hash_join.py -s file1 -r file2%0A%0AExample Usage:%0A ./partitioned_hash_join.py -r file1.txt -s file2.txt%0A%0AThis computes the intersection of the specified files and saves the res... |
91073bd5a6733b14f5f684139477fad38494447d | remove debug print | eventviz/views/timeline.py | eventviz/views/timeline.py | # -*- coding: utf-8 -*-
from flask import Blueprint, render_template, request, url_for, redirect
import eventviz
from eventviz import settings
from eventviz.db import connection, get_fieldnames, get_event_types, get_item
timeline = Blueprint('timeline', __name__)
@timeline.route('/', methods=['GET', 'POST'])
def i... | Python | 0.000008 | @@ -959,34 +959,8 @@
():%0A
- print db_item%0A
|
ea3a60da2f68969a39e7c13d5dcf1e465bcc597d | add health check | everyclass/server/views.py | everyclass/server/views.py | from flask import Blueprint, flash, jsonify, redirect, render_template, request, url_for
from markupsafe import escape
from everyclass.server.exceptions import NoClassException, NoStudentException
main_blueprint = Blueprint('main', __name__)
@main_blueprint.route('/')
def main():
"""首页"""
return render_temp... | Python | 0 | @@ -852,32 +852,145 @@
donate.html')%0A%0A%0A
+@main_blueprint.route('/_healthCheck')%0Adef health_check():%0A %22%22%22%E5%81%A5%E5%BA%B7%E6%A3%80%E6%9F%A5%22%22%22%0A return jsonify(%7B%22status%22: %22ok%22%7D)%0A%0A%0A
@main_blueprint.
|
5098e6e5f6156709b77037d3759dae1f43eec667 | Add solution for Lesson_5_Problem_Set/01-Most_Common_City_Name | Lesson_5_Problem_Set/01-Most_Common_City_Name/city.py | Lesson_5_Problem_Set/01-Most_Common_City_Name/city.py | #!/usr/bin/env python
"""
Use an aggregation query to answer the following question.
What is the most common city name in our cities collection?
Your first attempt probably identified None as the most frequently occurring city name.
What that actually means is that there are a number of cities without a name field ... | Python | 0.000085 | @@ -1777,10 +1777,187 @@
= %5B
- %5D
+%7B%22$match%22: %7B%22name%22: %7B%22$ne%22: None%7D%7D%7D,%0A %7B%22$group%22: %7B%22_id%22: %22$name%22, %22count%22: %7B%22$sum%22: 1%7D%7D%7D,%0A %7B%22$sort%22: %7B%22count%22: -1%7D%7D,%0A %7B%22$limit%22: 1%7D%5D%0A
%0A
|
43c597f1b76388a22a3807670b0864c143006c71 | Fix typo | pelican_links_summary.py | pelican_links_summary.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
'''This script is used to create a page on a Pelican blog with the last links shared on Twitter.'''
__author__ = 'quack1'
__version__ = '0.9'
__date__ = '2014-05-27'
__copyright__ = 'Copyright © 2013-2014, Quack1'
__licence__ = 'BSD'
__credits__ = ['Q... | Python | 0.999999 | @@ -3088,16 +3088,17 @@
= u%22%25s %22
+%25
s%0A%09%09%09els
|
d2bfe37c1043a980a457875054ee4a18e60105d3 | Add execute permission for sanitytest.py | sanitytest.py | sanitytest.py | #!/usr/bin/python
import sys
sys.path.insert(0, sys.argv[1])
import libvirt
globals = dir(libvirt)
# Sanity test that the generator hasn't gone wrong
# Look for core classes
for clsname in ["virConnect",
"virDomain",
"virDomainSnapshot",
"virInterface",
... | Python | 0 | |
8eafd5bc9a0b1f10884f6a943a65eda14a234788 | Add url-prefix option | scripts/jenkins_console_log_search.py | scripts/jenkins_console_log_search.py | #!/usr/bin/env python3
"""
This short script uses curl requests to search the last 100 builds of
a jenkins job to find recurring errors, written in Python3.
It results in printing a list of links to builds that match the search
As the requests package is not included within kv, you will need to either
download this pa... | Python | 0.000007 | @@ -575,56 +575,8 @@
me%0A%0A
-serverURL = 'http://cv.jenkins.couchbase.com/'%0A%0A
# Cr
@@ -1964,66 +1964,356 @@
a%22)%0A
-%0Aargs = argParser.parse_args()%0Ajob = 'job/' + args.job + '
+argParser.add_argument('--url-prefix', '-u', type=str, default='cv',%0A help='Determine the endpoint of log... |
c90ad580e9d81f64d4641cc51c43512d9ea0b1ef | remove netcardmgr from src/network_setup.py | src/network_setup.py | src/network_setup.py | #!/usr/bin/env python
#
# Copyright (c) 2020 GhostBSD
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk
import sys
import os
import re
networkmgr = "/usr/local/share/networkmgr"
sys.path.append(networkmgr)
from net_api import networkdictionary
logo = "/usr/local/lib/gbi/logo.png"
os.system... | Python | 0 | @@ -141,18 +141,8 @@
sys%0A
-import os%0A
impo
@@ -298,34 +298,8 @@
g%22%0A%0A
-os.system(%22netcardmgr%22)%0A%0A%0A
cssP
|
3c771bf0eb4ebf1b6874da9ce7a95f3104b8ec01 | Make Cue subclass Directory | untz_manager/collection.py | untz_manager/collection.py | """Implementation of collections of music files"""
from typing import Iterator
import glob
import os
import re
import subprocess
import tempfile
class Directory:
def __init__(self, directory: str):
if not os.path.isdir(directory):
raise ValueError(f"{directory} is not a directory")
sel... | Python | 0 | @@ -463,16 +463,27 @@
lass Cue
+(Directory)
:%0A de
@@ -2140,74 +2140,39 @@
-def __iter__(self) -%3E Iterator%5Bstr%5D:%0A return glob.iglob(f%22%7B
+ super().__init__(directory=
self
@@ -2185,15 +2185,6 @@
name
-%7D/*.flac%22
)%0A
|
88b01dba22aa1915778f5a0227c6a3d9851add41 | make UnitsNotReducible import in physical_constants private | unyt/physical_constants.py | unyt/physical_constants.py | """
Predefined useful physical constants
Note that all of these names can be imported from the top-level unyt namespace.
For example::
>>> from unyt.physical_constants import gravitational_constant, solar_mass
>>> from unyt import AU
>>> from math import pi
>>>
>>> period = 2 * pi * ((1 * AU)**3 /... | Python | 0 | @@ -902,16 +902,38 @@
educible
+ as _UnitsNotReducible
%0Afrom un
@@ -1754,16 +1754,17 @@
except
+_
UnitsNot
|
ec6d42b2559aca58c2b4d7e116156c37d916e4cb | fix bug where was looking at one id for the auc, also added a bit nicer print | updatemodel/updatemodel.py | updatemodel/updatemodel.py | import boto3
import json
import re
import time
def lookup_by_tag(key, val, client):
res = client.describe_ml_models(FilterVariable='MLModelType', EQ='BINARY')
resource_type = 'MLModel'
model_id = None
for model in res['Results']:
tags_response = client.describe_tags(ResourceId=model['MLModelId'], Resour... | Python | 0 | @@ -609,20 +609,16 @@
EQ=
-old_
model_id
@@ -4519,16 +4519,38 @@
tion tag
+ from %22+old_model_id+%22
to new
@@ -4689,24 +4689,113 @@
%0A %7D,%0A
+ %7B%0A 'Key': 'prod-timestamp',%0A 'Value': timestamp%0A %7D,%0A
%5D,%0A R
|
208fbd6ac390d050fb23f0ec5d6e620f6b4a3164 | update phoenix login description | phoenix/account/schema.py | phoenix/account/schema.py | import colander
import deform
class PhoenixSchema(colander.MappingSchema):
password = colander.SchemaNode(
colander.String(),
title='Password',
description='If this is a demo instance your password might be "qwerty"',
validator=colander.Length(min=4),
widget=deform.widget.P... | Python | 0 | @@ -187,51 +187,70 @@
'If
-this is a demo instance your password might
+you have not configured your password yet then it is likely to
be
@@ -302,9 +302,9 @@
min=
-4
+6
),%0A
|
468ede353d0f69753212e7dcb1eb448667fd1dc9 | Add missing imports. | repocracy/repo/tasks.py | repocracy/repo/tasks.py | import os
import subprocess
from repo.models import Repository
@task
def translate_repository(repo_pk):
pass
@task
def clone_repository(repo_pk):
try:
repo = Repository.objects.get(pk=repo_pk)
destination = os.path.join(
settings.REPOCRACY_BASE_REPO_PATH,
repo.pk
... | Python | 0.000002 | @@ -25,13 +25,93 @@
ess%0A
-from
+%0Afrom django.conf import settings%0Afrom celery.decorators import task%0A%0Afrom repocracy.
repo
@@ -135,17 +135,16 @@
pository
-
%0A%0A@task%0A
@@ -285,16 +285,75 @@
po_pk) %0A
+ except Repository.DoesNotExist:%0A pass%0A else:%0A
@@ -1219,53 +1219,4 @@... |
873aac264d5edbe7ff341a6270cdd4f687e56f0e | Make requirements compile disable pip's require-virtualenv flag always | requirements/compile.py | requirements/compile.py | #!/usr/bin/env python
from __future__ import annotations
import os
import subprocess
import sys
from pathlib import Path
if __name__ == "__main__":
os.chdir(Path(__file__).parent)
os.environ["CUSTOM_COMPILE_COMMAND"] = "requirements/compile.py"
os.environ.pop("PIP_REQUIRE_VIRTUALENV", None)
common_arg... | Python | 0 | @@ -266,13 +266,9 @@
iron
-.pop(
+%5B
%22PIP
@@ -291,15 +291,15 @@
ENV%22
-, None)
+%5D = %220%22
%0A
|
1a9b9e608d36b80bd8ccf15291bd4cb8ba7b12ad | extend create_django_user/group and with backend_id arg | ipynbsrv/core/auth/authentication_backends.py | ipynbsrv/core/auth/authentication_backends.py | from django.contrib.auth.hashers import make_password
from django.contrib.auth.models import Group, User
from ipynbsrv.conf.helpers import *
from ipynbsrv.contract.backends import GroupBackend, UserBackend
from ipynbsrv.contract.errors import *
from ipynbsrv.core import settings
from ipynbsrv.core.models import Backend... | Python | 0.000001 | @@ -2962,32 +2962,37 @@
ackend.FIELD_PK)
+, uid
)%0A
@@ -3070,16 +3070,21 @@
ELD_PK),
+ uid,
group.b
@@ -3166,32 +3166,60 @@
end_user.save()%0A
+ user.save()%0A
@@ -3243,16 +3243,107 @@
d(user)%0A
+ group.save()%0A%0A print(%22%7B%7D ad... |
a9b9c1b36b6e2dedb44806b9c0f4b69f7e2bb94f | Use single error model for all read lengths. | piquant/flux_simulator.py | piquant/flux_simulator.py | """
Functions for writing and reading FluxSimulator parameter and output files.
Exports:
read_expression_profiles: Return data from a FluxSimulator .pro file.
write_flux_simulator_params_files: Write FluxSimulator parameters files.
PRO_FILE_TRANSCRIPT_ID_COL: Transcript ID column in FluxSimulator .pro file.
PRO_FILE_... | Python | 0 | @@ -1641,32 +1641,8 @@
.26%0A
-_ERROR_MODEL_SHORT = 35%0A
_ERR
@@ -3128,122 +3128,8 @@
LONG
- if %5C%0A read_length %3E 0.5*(_ERROR_MODEL_SHORT + _ERROR_MODEL_LONG) %5C%0A else _ERROR_MODEL_SHORT
%0A%0A
|
49181062e5f697775b8f3fe12050d350b1dd8b9d | Clean up and store http response code as well | scrapi/requests.py | scrapi/requests.py | from __future__ import absolute_import
import json
import logging
import functools
from datetime import datetime
import requests
import cqlengine
from cqlengine import columns
from cqlengine import management
from cassandra.cluster import NoHostAvailable
from scrapi import settings
logger = logging.getLogger(__nam... | Python | 0 | @@ -175,507 +175,111 @@
mns%0A
+%0A
from
-cqlengine import management%0Afrom cassandra.cluster import NoHostAvailable%0A%0Afrom scrapi import settings%0A%0A%0Alogger = logging.getLogger(__name__)%0A%0A%0Atry:%0A cqlengine.connection.setup(settings.CASSANDRA_URI, settings.CASSANDRA_KEYSPACE)%0A management.creat... |
d2c5c5867a8d8ccd3af23251170fdff405c4cea2 | comment out all ddb | src/resources/playback_db.py | src/resources/playback_db.py | import boto3
import os
dynamodb = boto3.resource('dynamodb', region_name='eu-west-1',
endpoint_url=("https://dynamodb.eu-west-1."
"amazonaws.com"),
aws_access_key_id=os.environ['AWS_ACCESS_KEY_ID'],
a... | Python | 0 | @@ -581,24 +581,26 @@
io_url):%0A
+ #
table.put_i
@@ -603,24 +603,26 @@
ut_item(%0A
+ #
Item=%7B%0A
@@ -620,24 +620,26 @@
Item=%7B%0A
+ #
'us
@@ -654,24 +654,26 @@
user_id,%0A
+ #
'au
@@ -691,24 +691,26 @@
udio_url%0A
+ #
%7D%0A )
@@ -704,25 +704,36 @@
# %... |
8cfaa2938e3c4ab018abcff7e22c6774fea59a7a | Enforce canonical type names in the schema | raco/scheme.py | raco/scheme.py | from raco import expression
from collections import OrderedDict
class DummyScheme(object):
"""Dummy scheme used to generate plans in the absence of catalog info."""
def __len__(self):
return 0
def __repr__(self):
return "DummyScheme()"
class Scheme(object):
'''Add an attribute to t... | Python | 0.000026 | @@ -20,16 +20,34 @@
pression
+%0Aimport raco.types
%0A%0Afrom c
@@ -345,91 +345,8 @@
eme.
- Type is a function that returns true for%0A any value that is of the correct type
'''%0A
@@ -632,15 +632,144 @@
me,
+_
type):%0A
+ if not _type in raco.types.type_names:%0A print 'Invalid type name: %... |
1b878b1e90745867e431ddca60a53c2f5628a58b | Fix relative path in run_buildbot_steps.py. | chrome/test/chromedriver/run_buildbot_steps.py | chrome/test/chromedriver/run_buildbot_steps.py | #!/usr/bin/env python
# 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.
"""Runs all the buildbot steps for ChromeDriver except for update/compile."""
import optparse
import os
import sys
import urllib2
... | Python | 0.000243 | @@ -1171,28 +1171,16 @@
./../../
-../../../../
scripts/
|
ee2970064759eb1f3683410c1ab0d6d5a35b3470 | Fix warning Django 1.9 | src/permission/utils/autodiscover.py | src/permission/utils/autodiscover.py | # coding=utf-8
"""
"""
__author__ = 'Alisue <lambdalisue@hashnote.net>'
import copy
def autodiscover(module_name=None):
"""
Autodiscover INSTALLED_APPS perms.py modules and fail silently when not
present. This forces an import on them to register any permissions bits
they may want.
"""
from dj... | Python | 0.000002 | @@ -306,34 +306,123 @@
%22%22%22%0A
-from django.utils.
+if django.VERSION %3C (1, 8):%0A from django.utils.importlib import import_module%0A else%0A from
importli
@@ -1758,34 +1758,123 @@
del%0A
-from django.utils.
+if django.VERSION %3C (1, 8):%0A from django.utils.importlib import... |
b2f91bd5b0a9f06ddcdcff8f220756ad4a6286f7 | Fix stray webkitpy unit test after r157385. | Tools/Scripts/webkitpy/common/net/buildbot/chromiumbuildbot_unittest.py | Tools/Scripts/webkitpy/common/net/buildbot/chromiumbuildbot_unittest.py | # Copyright (C) 2013 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 the f... | Python | 0.000103 | @@ -2281,31 +2281,11 @@
-results
-/layout-test-results
')%0A
|
199b83ccad15e12995038ab0e2a9819e86bdac5a | test killing phantomjs after parsing | core/web/site_manager.py | core/web/site_manager.py | import time
import subprocess
from django.conf import settings
from selenium import webdriver
from core.configuration_provider import ConfigurationProvider
from core.web.ofm_page_constants import Constants
class SiteManager:
def __init__(self, user=None):
cfg = ConfigurationProvider()
self.bro... | Python | 0 | @@ -1748,16 +1748,78 @@
+subprocess.Popen(kill_cmd, shell=True).communicate()%0A #
subproce
|
f25a723466ef310297e9297936cf72e8eb68b842 | add quickview and conc edit | corpkit/interrogation.py | corpkit/interrogation.py | class Interrogation:
"""
Stores results of a corpus interrogation, before or after editing.
.. py:attribute:: results: DataFrame containing counts for each subcorpus
.. py:attribute:: totals: Series containing summed results DataFrame
.. py:attribute:: query: dict containing values that generated t... | Python | 0.000001 | @@ -715,17 +715,16 @@
urn st%0A%0A
-%0A
def
@@ -1801,16 +1801,119 @@
wargs)%0A%0A
+ def quickview(self, n = 25):%0A from corpkit import quickview%0A quickview(self, n = n)%0A%0A
%0Aimport
@@ -2545,24 +2545,127 @@
s, **kwargs)
+%0A%0A def quickview(self, n = 25):%0A from corpkit imp... |
2af1130bc082205ff42b3e3b098c103c9debf76a | Fix empty multiselect for Creator in Control widget | src/ggrc_basic_permissions/roles/Creator.py | src/ggrc_basic_permissions/roles/Creator.py | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "System"
description = """
This role grants a user basic object creati... | Python | 0 | @@ -387,34 +387,16 @@
on%22,%0A
- %7B%0A %22type%22:
%22Catego
@@ -408,147 +408,49 @@
-
- %22terms%22: %7B%0A %22list_property%22: %22owners%22,%0A %22value%22: %22$current_user%22%0A %7D,%0A %22condition%22: %22contains%22%0A %7D
+%22ControlCategory%22,%0A ... |
d602b8081897f897740740f4bc4c1ec8919fe7df | modify Python script to pass duplicate keys (multiple 'q' parameters now work). closes #21 | couchdb-external-hook.py | couchdb-external-hook.py | #!/usr/bin/python
import httplib
import optparse as op
import sys
import traceback
import urllib
try:
import json
except:
import simplejson as json
__usage__ = "%prog [OPTIONS]"
httpdict = {"etag":"ETag", "content-type":"Content-Type"}
def options():
return [
op.make_option('--remote-host', des... | Python | 0.00002 | @@ -90,16 +90,26 @@
t urllib
+%0Aimport re
%0A%0Atry:%0A
@@ -252,16 +252,104 @@
Type%22%7D%0A%0A
+query_re = re.compile('(?:%22query%22:%7B)(%5B%5E%7D%5D+)')%0Aarg_re = re.compile('(%22%5Cw+%22):(%22%5B%5E%22%5D+%22)')%0A%0A
def opti
@@ -1075,19 +1075,20 @@
for
-req
+line
in requ
@@ -1091,24 +1091,55 @@
r... |
3d86a49e5d6130f4f748017f92287df807ffe79f | fix bad ref to potentially empty checkpoint | couchexport/shortcuts.py | couchexport/shortcuts.py | import logging
from zipfile import ZipFile
from couchdbkit.ext.django.schema import Document
from django.http import HttpResponse
from StringIO import StringIO
from unidecode import unidecode
from django.core.cache import cache
import hashlib
def get_export_files(export_tag, format=None, previous_export_id=None, filte... | Python | 0.000001 | @@ -3002,16 +3002,43 @@
metype)%0A
+ if checkpoint:%0A
|
ac9c94eac31d177c57e51c296995cf2024a9f971 | Update MERGER_BASE_URL | councilmatic/settings.py | councilmatic/settings.py | """
Django settings for councilmatic project.
Generated by 'django-admin startproject' using Django 1.8.3.
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/
"""
# Build... | Python | 0.000001 | @@ -3156,16 +3156,24 @@
f-merger
+-upgrade
.datamad
|
471c6f3f0fa45066d2eb5b5c4dfc0439141842f4 | fix profile tests | user/tests/test_profile.py | user/tests/test_profile.py | from selenium.common.exceptions import NoSuchElementException
import time
from test.testcases import LiveTornadoTestCase
from test.selenium_helper import SeleniumHelper
class EditProfileTest(LiveTornadoTestCase, SeleniumHelper):
@classmethod
def setUpClass(cls):
super(EditProfileTest, cls).setUpClas... | Python | 0.000001 | @@ -1182,31 +1182,37 @@
_by_
-link_text(%22Edit profile
+css_selector(%22.fw-avatar-card
%22).c
@@ -4928,16 +4928,24 @@
tEqual(%22
+Login -
Fidus Wr
@@ -4952,18 +4952,8 @@
iter
- - Log In.
%22, d
|
da8a8c9b777792d99d8413f966ba5b7cdf6cf938 | Fix relative path join | create_local_settings.py | create_local_settings.py | #!/usr/bin/env python3
import codecs
import os
import random
import shutil
import string
import tempfile
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
LOCAL_SETTINGS_PATH = os.path.join(BASE_DIR, './website/local_settings.py')
LOCAL_SETTINGS_EXAMPLE_PATH = os.path.join(BASE_DIR, './website/local_settings_exa... | Python | 0.000004 | @@ -193,34 +193,32 @@
join(BASE_DIR, '
-./
website/local_se
@@ -287,10 +287,8 @@
R, '
-./
webs
|
823c438af84be297b18c187d9a1b4367ff8664bd | add settings variable for grids file directory | crimemapping/settings.py | crimemapping/settings.py | """
Django settings for crimemapping project.
Generated by 'django-admin startproject' using Django 1.9.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os... | Python | 0 | @@ -3668,16 +3668,48 @@
ctors/'%0A
+GRIDS_DIR = 'map/data/vectors/'%0A
%0A%0Atry:%0A
|
38a848fb06312d9fc471c6ab186f9175299655ea | Fix a typo. | crits/backdoors/views.py | crits/backdoors/views.py | import json
import urllib
from django.contrib.auth.decorators import user_passes_test
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template import RequestContext
from crits.backdoors.forms import Add... | Python | 0.999957 | @@ -1411,17 +1411,17 @@
te the B
-A
+a
ckdoor d
|
abe311fb9de6a58c9b40b1079785473b5a72d12c | Update activate-devices.py | cron/activate-devices.py | cron/activate-devices.py | #!/usr/bin/env python
import MySQLdb
#import datetime
#import urllib2
#import os
import datetime
import RPi.GPIO as GPIO
try:
import RPi.GPIO as GPIO
except RuntimeError:
print("Error importing RPi.GPIO!")
servername = "localhost"
username = "pi"
password = "password"
dbname = "pi_heating_db"
cnx = MySQLdb.... | Python | 0.000001 | @@ -1253,27 +1253,30 @@
-#
print(%22
-* * * * * *
+- - - - - - - -
%22)%0A
@@ -1453,25 +1453,24 @@
LUE)%0A %0A
-#
print( DEVIC
|
9dcc06f8b489443512fd897d41f06e3cd502b67d | fix both error of issue 739 (#756) | contents/huffman_encoding/code/python/huffman.py | contents/huffman_encoding/code/python/huffman.py | # Huffman Encoding
# Python 2.7+
# Submitted by Matthew Giallourakis
from collections import Counter
# constructs the tree
def build_huffman_tree(message):
# get sorted list of character and frequency pairs
frequencies = Counter(message)
trees = frequencies.most_common()
# while there is more than o... | Python | 0 | @@ -1029,22 +1029,110 @@
-huffman_tree =
+# Return an empty list if the message was empty, else the tree%0A huffman_tree = %5B%5D if not trees else
tre
@@ -1239,16 +1239,174 @@
ode=''):
+%0A # Check whether our tree contains more than 1 element or not%0A if not tree:%0A return %5B%5D%0A elif... |
47e470f9c3cdf806fb7190b71447275a9f7a772e | test in base_test adjusted to tuples for parameters | uws/UWS/tests/test_base.py | uws/UWS/tests/test_base.py | # -*- coding: utf-8 -*-
import unittest
from uws import UWS
class BaseTest(unittest.TestCase):
def testValidateAndParseFilter(self):
filters = {
'phases': ['COMPLETED', 'PENDING']
}
params = UWS.base.BaseUWSClient(None)._validate_and_parse_filters(filters)
self.asser... | Python | 0.000001 | @@ -318,12 +318,8 @@
sert
-Dict
Equa
@@ -332,21 +332,18 @@
ms,
-%7B
+%5B(
'PHASE
-%5B%5D': %5B
+',
'COM
@@ -341,34 +341,44 @@
ASE','COMPLETED'
+)
,
+('PHASE',
'PENDING'%5D%7D)%0A%0A
@@ -374,10 +374,10 @@
ING'
+)
%5D
-%7D
)%0A%0A
|
7e5c22706b039203453180a9ba4014619ec0c975 | Use own mirror when SF is offline | platformio/pkgmanager.py | platformio/pkgmanager.py | # Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
from os import makedirs, remove
from os.path import basename, isdir, isfile, join
from shutil import rmtree
from time import time
import click
import requests
from platformio import exception, telemetry, util
from platformio.app import get_sta... | Python | 0 | @@ -2713,16 +2713,17 @@
except
+(
requests
@@ -2749,16 +2749,69 @@
ionError
+,%0A exception.FDUnrecognizedStatusCode)
:%0A
|
74749972d3ac526c665875ab617dec641cace19d | Use `get_schema` in the resolver too | valohai_yaml/validation.py | valohai_yaml/validation.py | import json
import os
import re
from codecs import open # required for Python 2, doesn't hurt for Python 3
from jsonschema import Draft4Validator, RefResolver
from jsonschema.compat import lru_cache
from .utils import read_yaml
SCHEMATA_DIRECTORY = os.path.join(os.path.dirname(__file__), 'schema')
class Validatio... | Python | 0 | @@ -980,195 +980,55 @@
-local_filename = os.path.join(SCHEMATA_DIRECTORY, local_match.group(1))%0A with open(local_filename, 'r', encoding='utf-8') as infp:%0A schema = json.load(infp)%0A
+schema = get_schema(name=local_match.group(1))%0A
@@ -1056,28 +1056,24 @@
l%5D = schema%... |
85905353b23ba4d6bec8fbbd37546ae2849967d9 | Update puush.py | src/puush.py | src/puush.py | import config
import time
import multipart
import StringIO
# from gi.repository import Gtk, Gdk
import gtk
import os
import pynotify
NO_INTERNET = False
SERVER = 'puush.me'
API_END_POINT = '/api/tb'
FORMAT = 'png'
NOTIFY_TIMEOUT = 10
def screenshot(x, y, w, h):
screenshot = gtk.gdk.Pixbuf.get_from_drawable(gtk.gdk... | Python | 0 | @@ -1118,64 +1118,8 @@
k%0A%0A%0A
-%0A%0A%09_notify(link%5B10:len(link) - 11%5D)%0A%0Adef _notify(link):%0A
%09# l
@@ -1209,16 +1209,69 @@
se tags%0A
+%09_notify(link%5B10:len(link) - 11%5D)%0A%0Adef _notify(link):
%0A%09clip =
|
24217196f4516e198155b843d807d02b4911db6c | Include an external_version property in the coverity.hpi.VERSION file created by build.py | build.py | build.py | #/*******************************************************************************
# * Copyright (c) 2016 Synopsys, Inc
# * All rights reserved. This program and the accompanying materials
# * are made available under the terms of the Eclipse Public License v1.0
# * which accompanies this distribution, and is available ... | Python | 0 | @@ -1373,16 +1373,46 @@
build_id
+, %22external_version%22 : version
%7D, inde
|
8df4a663c974fc87f77dd1ca94a4514c330851e0 | Build dmg file on Mac OS X. | build.py | build.py | #!/usr/bin/env python2.7
#coding=UTF-8
import sys, os, shutil
import app_info
project_root = os.path.dirname(os.path.realpath(__file__))
project_syspath = [
project_root,
os.path.join(project_root, "..", "fsmonitor")
] + sys.path
target_name = "devo"
main_script = "main.py"
dist_dir = "dist"
target_dir = os... | Python | 0 | @@ -55,16 +55,28 @@
, shutil
+, subprocess
%0Aimport
@@ -785,16 +785,94 @@
ll%22,%0A%5D%0A%0A
+def run(*args, **kwargs):%0A subprocess.Popen(args, **kwargs).communicate()%0A%0A
class At
@@ -3747,32 +3747,197 @@
),%0A )%0A%0A
+ run(%22hdiutil%22, %22create%22, %22-srcfolder%22, target_dir, %22-volna... |
876e2fd9439d280b6b9b69e143e76073e51b81c8 | Create new financial.move | l10n_br_financial/wizards/financial_create.py | l10n_br_financial/wizards/financial_create.py | # -*- coding: utf-8 -*-
# Copyright 2017 KMEE
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
from odoo.addons.l10n_br_financial.models.financial_move_model import (
FINANCIAL_MOVE
)
class FinancialMoveCreate(models.TransientModel):
_name = 'financial.mov... | Python | 0 | @@ -2830,61 +2830,8 @@
)%0A
- import wdb; wdb.set_trace() # BREAKPOINT%0A
@@ -3574,48 +3574,101 @@
-imp
+# Err
or
-t
w
-db; wdb.set_trace() # BREAKPOINT
+hile validating constraint%0A # The finacial move must have a due date!
%0A
@@ -4165,22 +4165,20 @@
nt_item=
-record
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.