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 |
|---|---|---|---|---|---|---|---|
a55dd124d54955476411ee8ae830c9fd3c4f00dc | Test get_errors() method of LatexBuildError. | tests/test_pdfbuild.py | tests/test_pdfbuild.py | from latex import build_pdf
from latex.exc import LatexBuildError
import pytest
def test_generates_something():
min_latex = r"""
\documentclass{article}
\begin{document}
Hello, world!
\end{document}
"""
pdf = build_pdf(min_latex)
assert pdf
def test_raises_correct_exception_on_fail():
broken_late... | Python | 0 | @@ -20,16 +20,33 @@
uild_pdf
+, LatexBuildError
%0Afrom la
@@ -54,18 +54,21 @@
ex.e
-xc
+rrors
import
Late
@@ -63,31 +63,25 @@
import
-LatexBuildError
+parse_log
%0A%0Aimport
@@ -384,16 +384,16 @@
Error):%0A
-
@@ -408,16 +408,355 @@
f(broken_latex)%0A
+%0A%0Adef test_finds_errors_correctly():%0A ... |
e202859dc105b60c081a3bcec004abe5d160e240 | fix ie fullscreen args | tests/test_playback.py | tests/test_playback.py | from __future__ import unicode_literals
import unittest
import xml.etree.ElementTree as ET
import subprocess
import xbmc
from lib import constants as const
from lib.utils import os_join
from lib import playback
from lib import remote
def read_external_player_config(player):
playerfilername = "chrome" if player =... | Python | 0.000001 | @@ -954,53 +954,20 @@
ayer
-process = subprocess.Popen(%5Bself.playerfile,
+args.append(
os_j
@@ -1014,35 +1014,33 @@
le episode.htm%22)
-%5D +
+)
%0A
@@ -1036,45 +1036,65 @@
-
+self.playerprocess = subprocess.Popen(%5Bself.playerfile%5D +
sel
@@ -1946,53... |
8535c59c26e2c5badfd3637d41901f1bc987e200 | Add a test for the __call__ method of the APIRequest class. | tests/test_requests.py | tests/test_requests.py | """Test the api_requests module."""
from pytest import mark
from gobble.api_requests import APIRequest
SIMPLE = ('foo.bar', dict(), ['https://foo.bar'])
LOCAL = ('0.0.0.0', dict(port=5000, schema='http'), ['http://0.0.0.0:5000'])
LONG = (
'foo.bar',
dict(
path=['spam', 'eggs'],
query={'foo': ... | Python | 0.000001 | @@ -684,8 +684,106 @@
in urls%0A
+%0A%0Adef test_call():%0A request = APIRequest('google.com')%0A assert request().status_code == 200%0A
|
9f0cd5c3e0f47f20e2470bd0436d8ffe58b8546a | fix for django 1.3 testing | tests/test_settings.py | tests/test_settings.py | # Django settings for {{ project_name }} project.
import os
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add ... | Python | 0 | @@ -2313,25 +2313,54 @@
TIC_ROOT = '
-'
+%25s/static_root/' %25 PROJECT_DIR
%0A%0A# URL pref
|
6eab19b3e27cef4d7cf7d19287c4e71ebe8cd23d | Test for the copyto | tests/test_sql_copy.py | tests/test_sql_copy.py | import os
import pytest
import time
import cStringIO
import random
from carto.exceptions import CartoException
from carto.sql import SQLClient, BatchSQLClient, CopySQLClient
SETUP_QUERIES = [
'DROP TABLE IF EXISTS carto_python_sdk_copy_test',
"""
CREATE TABLE carto_python_sdk_copy_test (
the_geom ge... | Python | 0 | @@ -3223,28 +3223,795 @@
t result%5B'total_rows'%5D == 3%0A
+%0A%0A%0A%0Adef test_copyto(copy_client):%0A arbitrary_subquery = 'SELECT i cartodb_id, ST_AsEWKT(ST_SetSRID(ST_MakePoint(i, i),4326)) the_geom FROM generate_series(1,10) i'%0A query = 'COPY (%7Bsubquery%7D) TO STDOUT'.format(subquery=arbitrary_subquer... |
acc64adea162a6920143c0b2416e05095859814b | Disable Shell for subprocess.call. | lib/docker.py | lib/docker.py | from json import loads as json_loads
import subprocess
def get_vms():
cmd = ['python', 'bin/compose', 'ps', '-q']
vms_id = subprocess.check_output(cmd, shell=True).splitlines()
vms_info = dict()
for vm_id in vms_id:
vm_id = vm_id.decode('utf-8', 'strict')
vms_info[vm_id] = extract_vm_i... | Python | 0 | @@ -157,20 +157,8 @@
(cmd
-, shell=True
).sp
|
c0e560ac711f6ec5c25ed5c47e0f0747889688c5 | Fix watchdog test | tests/test_watchdog.py | tests/test_watchdog.py | import unittest
import subprocess
import os
import sys
from random import random, randrange
import urllib as url
import time
from nose.plugins.skip import SkipTest
sys.path.append(os.getcwd())
from ddagent import Application
from util import Watchdog
class TestWatchdog(unittest.TestCase):
"""Test watchdog in vari... | Python | 0.000002 | @@ -2027,17 +2027,18 @@
duration
-,
+ %3C
self.JI
|
443373703ae321c66076644c4c97abde3e693133 | Add fix for broken test post submission | tests/tests/addpost.py | tests/tests/addpost.py | import sqlalchemy
import selenium
from selenium.webdriver.common import keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.common.by import By
from timpani import database
LOGIN_TITLE = "Login - Timpani"
ADD_POST_TITLE = "Add ... | Python | 0 | @@ -1569,20 +1569,44 @@
ment_by_
-id(%22
+css_selector(%22#editor %3E .ql-
editor%22)
|
82f19d9a70bb678bc73955c1ab19ea5080f03b47 | Update version. | chex/__init__.py | chex/__init__.py | # Lint as: python3
# Copyright 2020 DeepMind Technologies Limited. 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
#
# ... | Python | 0.000001 | @@ -3179,17 +3179,17 @@
= %220.0.
-3
+4
%22%0A%0A__all
|
b8ac8ad15bf0fa8687527b2a180355211c2955b3 | Update refraction_test_input.py | tests/refraction_test_input.py | tests/refraction_test_input.py | Python | 0.000002 | @@ -0,0 +1,2222 @@
+import unittest%0D%0Aimport sys%0D%0Afrom os import path%0D%0Asys.path.append(path.dirname(path.dirname(path.abspath(__file__))))%0D%0Afrom src.refraction import *%0D%0A%0D%0Aclass TestRefractionInput(unittest.TestCase):%0D%0A%0D%0A def testInputCorrect(self):%0D%0A try:%0D%0A s... | |
0bee13a823ec41fcb4a899bcd96cd05e511c8abc | Fix the data resizer test. | tests/test_ImageDataResizer.py | tests/test_ImageDataResizer.py | import unittest
from core.data.DataResizer import DataResizer
from vtk import vtkImageData
class DataResizerTest(unittest.TestCase):
def setUp(self):
self.imageResizer = DataResizer()
def tearDown(self):
del self.imageResizer
def testDataResizer(self):
self.assertTrue(True)
def testDataResizerDimensions(... | Python | 0 | @@ -364,16 +364,18 @@
tor = 0.
+12
5%0A%09%09imag
|
3176f21500534a70cab0141ec41e2a2958c87675 | fix a comment typo | nova/console/manager.py | nova/console/manager.py | # Copyright (c) 2010 OpenStack Foundation
# 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 ... | Python | 0.000002 | @@ -3961,16 +3961,17 @@
us we ne
+e
d to ask
|
bdd1ebf0b50d8b0e8fc43a624db73966319c8ef6 | Fix test failures on Windows. | tests/unit/test_api.py | tests/unit/test_api.py | """Tests the isort API module"""
from io import StringIO
from unittest.mock import MagicMock, patch
import pytest
from isort import api
from isort.settings import Config
imperfect_content = "import b\nimport a\n"
fixed_content = "import a\nimport b\n"
fixed_diff = "\n+import a\n import b\n-import a\n"
@pytest.fixt... | Python | 0 | @@ -50,16 +50,26 @@
tringIO%0A
+import os%0A
from uni
@@ -257,16 +257,42 @@
ort b%5Cn%22
+.replace('%5Cn', os.linesep)
%0Afixed_d
@@ -334,16 +334,43 @@
ort a%5Cn%22
+.replace ('%5Cn', os.linesep)
%0A%0A%0A@pyte
|
03a4f552088ee6a0ab44e199035bd8fc70fbb9d5 | fix broken test | tests/test_api_menu_helpers.py | tests/test_api_menu_helpers.py | from vent.api.menu_helpers import MenuHelper
def test_cores():
""" Test the cores function """
instance = MenuHelper()
cores = instance.cores('install')
assert cores[0] == True
cores = instance.cores('build')
assert cores[0] == True
cores = instance.cores('start')
assert cores[0] == Tr... | Python | 0.000005 | @@ -38,16 +38,52 @@
uHelper%0A
+from vent.api.plugins import Plugin%0A
%0A%0Adef te
@@ -780,32 +780,200 @@
ts function %22%22%22%0A
+ instance = Plugin()%0A status = instance.add('https://github.com/cyberreboot/vent', build=False)%0A assert isinstance(status, tuple)%0A assert status%5B0%5D == True%0A
... |
2237d438548129c800ba1e75f3de113642f58f12 | Add tests for cli help and parameter verbosity | tests/unit/test_cli.py | tests/unit/test_cli.py | from __future__ import unicode_literals
import os
import sys
import mock
try:
import StringIO as io # Python2
except ImportError:
import io # Python3
try:
import unittest2 as unittest # Python2.6
except ImportError:
import unittest
import trovebox
from trovebox.main import main
class TestException(Exc... | Python | 0 | @@ -4709,16 +4709,30 @@
in(%5B%22-v%22
+, %22-F foo=bar%22
%5D)%0A
@@ -4855,32 +4855,89 @@
dout.getvalue())
+%0A self.assertIn(%22foo=bar%22, mock_stdout.getvalue())
%0A%0A @mock.patc
@@ -5603,12 +5603,265 @@
__ + %22%5Cn%22)%0A%0A
+ @mock.patch('sys.stdout', new_callable=io.StringIO)%0A def t... |
88dc5ad3f66f672d54f47cd19229838b860c1cf1 | correct domain option in tests; | tests/test_hosting_commands.py | tests/test_hosting_commands.py | # -*- coding: utf-8 -*-
from syncano_cli.main import cli
from tests.base import BaseCLITest
class HostingCommandsTest(BaseCLITest):
def _base_test(self, domain):
# test publishing;
self._publish_files(domain=domain)
result = self._get_list_files_output(domain=domain)
self.assertIn... | Python | 0 | @@ -2575,17 +2575,16 @@
--domain
-s
')%0A
|
de56983cba34d874292a74ff3e3c039797cc01f4 | Fix demographics syncing | radar/ukrdc_importer/demographics.py | radar/ukrdc_importer/demographics.py | import logging
from cornflake.exceptions import ValidationError
from radar.database import db
from radar.models.patient_demographics import PatientDemographics
from radar.ukrdc_importer.serializers import PatientSerializer
from radar.ukrdc_importer.utils import (
delete_list,
build_id,
get_path,
get_i... | Python | 0.00002 | @@ -2826,112 +2826,8 @@
ics(
-demographics_id):%0A return PatientDemographics.query.get(demographics_id)%0A%0A%0Adef get_demographics_list(
pati
@@ -3001,417 +3001,14 @@
n q.
-all()%0A%0A%0Adef sync_demographics(patient, demographics_to_keep):%0A def log(demographics):%0A logger.info('Deleting demograph... |
c81655b2853ec4e072bff79e2600b4ec5d1063d5 | Fix test_observers_winapi.py::test___init__() on Windows | tests/test_observers_winapi.py | tests/test_observers_winapi.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com>
# Copyright 2012 Google, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ... | Python | 0.000171 | @@ -1614,16 +1614,36 @@
ME = 2%0A%0A
+ emitter.start()%0A
slee
|
3c7342c0b131f23c450b8a0bc0160eb686489fa7 | test btnName argument | tests/test_stateful_browser.py | tests/test_stateful_browser.py | import mechanicalsoup
import sys
import re
from bs4 import BeautifulSoup
def test_submit_online():
"""Complete and submit the pizza form at http://httpbin.org/forms/post """
browser = mechanicalsoup.StatefulBrowser()
browser.set_user_agent('testing https://github.com/hickford/MechanicalSoup')
browser.... | Python | 0.000279 | @@ -66,16 +66,70 @@
fulSoup%0A
+from test_form import setup_mock_browser%0Aimport pytest
%0A%0Adef te
@@ -4038,16 +4038,916 @@
l('a')%0A%0A
+@pytest.mark.parametrize(%22expected_post%22, %5B%0A pytest.param(%0A %5B%0A ('comment', 'Selecting an input submit'),%0A ('diff', 'Review Chang... |
4c993698a334eac29bd8b64fd199a2caa869657b | Put the libc loading in the test. | tests/test_stdout_capturing.py | tests/test_stdout_capturing.py | #!/usr/bin/env python
# coding=utf-8
import os
import sys
import pytest
from sacred.stdout_capturing import get_stdcapturer
from sacred.optional import libc
def test_python_tee_output(capsys):
expected_lines = {
"captured stdout",
"captured stderr"}
capture_mode, capture_stdout = get_stdcapt... | Python | 0 | @@ -821,32 +821,412 @@
output(capsys):%0A
+ # Get libc in a cross-platform way and use it to also flush the c stdio buffers%0A # credit to J.F. Sebastians SO answer from here:%0A # http://stackoverflow.com/a/22434262/1388435%0A import ctypes%0A from ctypes.util import find_library%0A%0A try:%0A ... |
6f604c1e78bb4f7d4d1f421c73e29528b1448ab6 | Test for a consistent category path after generating the data. | _scripts/cfdoc_metadata.py | _scripts/cfdoc_metadata.py | # The MIT License (MIT)
#
# Copyright (c) 2013 CFEngine AS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modif... | Python | 0 | @@ -1374,16 +1374,610 @@
onfig)%0A%0A
+%09# validate that the category tree is consistent, ie that there is an%0A%09# index page for every subdirectory. Otherwise, Jekyll bails out%0A%09category_tree = config%5B%22category_tree%22%5D%0A%09for node in category_tree:%0A%09%09branch = category_tree.get(node)%0A%09%09if b... |
ca136d81cacc213d9a4eed36f0fed2c6f208f9ae | Update register user form view to be tied to just one OSF user. | admin/common_auth/views.py | admin/common_auth/views.py | from __future__ import absolute_import, unicode_literals
from django.core.urlresolvers import reverse, reverse_lazy
from password_reset.views import Recover
from password_reset.forms import PasswordRecoveryForm
from django.http import Http404
from django.shortcuts import redirect
from django.utils.decorators import me... | Python | 0 | @@ -114,103 +114,8 @@
azy%0A
-from password_reset.views import Recover%0Afrom password_reset.forms import PasswordRecoveryForm%0A
from
@@ -2517,262 +2517,8 @@
e()%0A
- reset_form = PasswordRecoveryForm(%0A data=%7B'username_or_email': osf_user.username%7D%0A )%0A if reset_form.is_vali... |
1270ca85f8ccd9ea2a336a4aac89a6acc4550a74 | Enable pre-caching mustache templates from extensions | src/ggrc/assets.py | src/ggrc/assets.py | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: dan@reciprocitylabs.com
# Maintained By: dan@reciprocitylabs.com
"""Manage "static" assets
The actual list of stylesheets and javascripts to compi... | Python | 0 | @@ -321,17 +321,16 @@
le is in
-
%0A%60assets
@@ -2564,16 +2564,210 @@
paths)%0A%0A
+def path_without_assets_base(path):%0A steps = path.split(os.path.sep)%0A if len(steps) %3E 3 and steps%5B1%5D == 'assets' and steps%5B2%5D == 'mustache':%0A return os.path.join(*steps%5B3:%5D)%0A return path%0A%0A
from web
... |
c87d38d07d711cd3437974fc775a44d6aaf1b8cc | Update docstring. | message.py | message.py | """This module extracts information from a message string."""
import json
import re
import urllib2
from bs4 import BeautifulSoup
class Message(object):
"""This class parses a message and finds mentions, emoticons, and links.
Truncates messages longer than Message.MAX_MESSAGE_LEN.
Attributes to extract ... | Python | 0 | @@ -332,26 +332,24 @@
by
-Message.ATTR_REGEX
+compiled regexes
.%0A%0A
|
b9af71959bca5ccd6536994d8f56715bc70b0a57 | Fix loading config | tof_server/__init__.py | tof_server/__init__.py | """Module init."""
from flask import Flask
from flask.ext.mysqldb import MySQL
app = Flask(__name__)
mysql = MySQL()
app.config.from_object('config')
mysql.init_app(app)
from tof_server import views
| Python | 0.000002 | @@ -132,22 +132,22 @@
rom_
-object
+pyfile
('config
')%0Am
@@ -142,16 +142,19 @@
('config
+.py
')%0Amysql
|
7004df72afa17b90c2954f73b6a284bb6d3f68f4 | Fix for the context manager version (#62) | toon/input/mp_input.py | toon/input/mp_input.py | import multiprocessing as mp
import ctypes
import gc
import os
import psutil
import numpy as np
from toon.input.helper import check_and_fix_dims, shared_to_numpy
class MultiprocessInput(object):
def __init__(self, device=None,
high_priority=True, use_gc=False,
nrow=None, **kwargs... | Python | 0 | @@ -5691,16 +5691,36 @@
.start()
+%0A return self
%0A%0A de
|
ca7403462588f374cf1af39d537765c02fc7726c | Fix status codes of handled responses | mctrl/rest.py | mctrl/rest.py | from flask import Flask, url_for, Response, json, request
class MonitorApp(object):
def __init__(self, monitor):
self.app = Flask(__name__)
self.app.monitor = monitor
self.setup()
def setup(self):
@self.app.route('/anomaly', methods = ['POST'])
def api_anomaly():
... | Python | 0.000001 | @@ -496,32 +496,37 @@
return
+self.
handle_response(
@@ -524,32 +524,38 @@
response(success
+, data
)%0A el
@@ -918,16 +918,21 @@
return
+self.
handle_r
@@ -946,16 +946,22 @@
(success
+, data
)%0A
@@ -1090,19 +1090,62 @@
success
+, data
):%0A
+ json_data = json.dumps(data)... |
f2003fb2c8567b6d71676a4344e8318668fb55c3 | Fix using PUT for new files and added arguments for file.py run directly | web/file.py | web/file.py | import mimetypes
import os
import shutil
import sys
import web
_local = None
_remote = None
_dir_index = False
_modify = False
routes = {}
class FileHandler(web.HTTPHandler):
def __init__(self, request, response, groups):
web.HTTPHandler.__init__(self, request, response, groups)
self.filename = _local + self.g... | Python | 0 | @@ -37,19 +37,8 @@
util
-%0Aimport sys
%0A%0Aim
@@ -1460,16 +1460,22 @@
if not
+given
a file)%0A
@@ -1547,13 +1547,51 @@
#If
-file,
+not directory, open (possibly new) file and
fil
@@ -1615,24 +1615,28 @@
body%0A%09%09%09if
+not
os.path.isfi
@@ -1633,20 +1633,19 @@
.path.is
-file
+dir
(self.fi
@@ -252... |
2717d0eec58fcce31740aa7eed863d59ca53344c | Change error | code/hashTable.py | code/hashTable.py | # -*- coding: utf-8 -*-
import numpy as np
def hashTable(patch,Qangle,Qstrenth,Qcoherence):
[gx,gy] = np.gradient(patch)
G = np.matrix((gx.ravel(),gy.ravel())).T
x = G.T*G
[eigenvalues,eigenvectors] = np.linalg.eig(x)
#For angle
angle = np.math.atan2(eigenvectors[0,1],eigenvectors[0,0])
... | Python | 0.000001 | @@ -406,16 +406,34 @@
es.max()
+/eigenvalues.sum()
%0A %0A
|
b3806ce87438ecbeb52ffa5ee7755adaf21eef2b | add placeholder enable_omnistaging method (#3907) | jax/config.py | jax/config.py | # Copyright 2018 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | Python | 0 | @@ -3909,16 +3909,72 @@
= True%0A%0A
+ def enable_omnistaging(self):%0A pass # placeholder%0A
%0Aclass N
|
5fb9e8b22d39be21bf918ff3d377ef4eade7ed6f | Add unit test for module name is found. | tests/unit/utils/test_utils.py | tests/unit/utils/test_utils.py | # coding=utf-8
'''
Test case for utils/__init__.py
'''
from __future__ import unicode_literals, print_function, absolute_import
from tests.support.unit import TestCase, skipIf
from tests.support.mock import (
NO_MOCK,
NO_MOCK_REASON,
MagicMock,
patch
)
try:
import pytest
except ImportError:
pyt... | Python | 0 | @@ -3108,28 +3108,711 @@
nt(_globals) == expectation%0A
+%0A def test_get_module_environment_mname_found(self):%0A '''%0A Test for salt.utils.get_module_environment%0A Module name is found.%0A%0A :return:%0A '''%0A expectation = %7B'msg': 'All operators are on strike due to... |
0d7d5746ccff0e933a5bdfa22f3fd63914593ded | Use correct class to avoid side effects | tests/unittests/test_client.py | tests/unittests/test_client.py | import httpx
import pytest
from aioxmlrpc.client import Fault, ProtocolError, ServerProxy
RESPONSES = {
"http://localhost/test_xmlrpc_ok": {
"status": 200,
"body": """<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value><int>1</int></value>
</param>
</params>
<... | Python | 0.000001 | @@ -4,28 +4,50 @@
ort
+pytest%0Afrom
httpx
-%0A
+
import
-pytest%0A
+Request, Response
%0Afro
@@ -953,24 +953,26 @@
%0A %7D,%0A%7D%0A%0A%0A
+#
class Respon
@@ -975,16 +975,18 @@
sponse:%0A
+#
def
@@ -1006,16 +1006,18 @@
, url):%0A
+#
@@ -1042,16 +1042,18 @@
ES%5Burl%5D%0A
+#
... |
79f255322846a6badc4c1325d7023d3a94461ae5 | Use set operations in tests for readability | tests/functional/test_new_resolver.py | tests/functional/test_new_resolver.py | import json
from tests.lib import create_basic_wheel_for_package
def assert_installed(script, **kwargs):
ret = script.pip('list', '--format=json')
installed = set(
(val['name'], val['version'])
for val in json.loads(ret.stdout)
)
assert all(item in installed for item in kwargs.items()... | Python | 0 | @@ -269,42 +269,12 @@
ert
-all(item in installed for item in
+set(
kwar
@@ -284,16 +284,29 @@
items())
+ %3C= installed
, %5C%0A
@@ -522,51 +522,149 @@
-assert all(a not in installed for a in args
+# None of the given names should be listed as installed, i.e. their%0A # intersection should be empty.%... |
25865ac3f68f455856fdcb39f8ea105e40c45bad | raise structured exception if connecting to socket failed | tests/integration/WatchmanInstance.py | tests/integration/WatchmanInstance.py | # vim:ts=4:sw=4:et:
# Copyright 2012-present Facebook, Inc.
# Licensed under the Apache License, Version 2.0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# no unicode literals
import tempfile
import json
import os.path
import subprocess
import pywatchman... | Python | 0 | @@ -2317,32 +2317,8 @@
up%0A
- last_err = None%0A
@@ -2592,83 +2592,8 @@
o()%0A
- last_err = ''.join(traceback.format_exception(t, val, tb))%0A
@@ -2718,30 +2718,42 @@
-raise Exception(last_err
+pywatchman.compat.reraise(t, val, tb
)%0A
|
87bf261345919e90cb88853165fb1556046c80ef | Fix typo in mock usage | tests/mpd/protocol/test_connection.py | tests/mpd/protocol/test_connection.py | from __future__ import absolute_import, unicode_literals
from mock import patch
from tests.mpd import protocol
class ConnectionHandlerTest(protocol.BaseTestCase):
def test_close_closes_the_client_connection(self):
with patch.object(self.session, 'close') as close_mock:
self.send_request('cl... | Python | 0 | @@ -348,29 +348,17 @@
k.assert
-EqualResponse
+_
called_o
|
0a5d8cb536e80b77049537c409f5b60cc55c5116 | Fix test for HiveToMySqlTransfer Operator (#4447) | tests/operators/test_hive_to_mysql.py | tests/operators/test_hive_to_mysql.py | # -*- coding: utf-8 -*-
#
# 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
#... | Python | 0 | @@ -1739,34 +1739,35 @@
ce_with(
-self.kwargs%5B'sql'%5D
+'sql', hive_conf=%7B%7D
)%0A
|
6cfc37fe0c496ddcda125f628d446dba8e33f154 | add a test for query_map_point by building up a run length encoded 'grid' and checking ends of output | tests/python_tests/datasource_test.py | tests/python_tests/datasource_test.py | #!/usr/bin/env python
from nose.tools import *
from utilities import execution_path
import os, mapnik2
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('.'))
def test_field_listing():
lyr = mapnik2.Layer('t... | Python | 0.000003 | @@ -2051,12 +2051,910 @@
t,str%5D)%0A
-
+%0Adef test_hit_grid():%0A import os%0A from itertools import groupby%0A%0A def rle_encode(l):%0A %22%22%22 encode a list of strings with run-length compression %22%22%22%0A return %5B%22%25d:%25s%22 %25 (len(list(group)), name) for name, group in gro... |
8d45812f345b5542169121080943423c848a3123 | Remove unused imports | tests/unit/modules/win_status_test.py | tests/unit/modules/win_status_test.py | # -*- coding: utf-8 -*-
# Import python libs
import new
import sys
# Import Salt Testing libs
from salttesting import skipIf, TestCase
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')
# wmi and pythoncom modules are platform specific...
wmi = new.module('wmi')
sys.modules['wmi'] = wmi
p... | Python | 0.000001 | @@ -456,14 +456,8 @@
tch,
- call,
ANY
|
b98c7e4d792fdfff40b8358d27d86034e28191d7 | remove unnecessary code in test. | tests/utils/test_saliency_maps_gat.py | tests/utils/test_saliency_maps_gat.py | # -*- coding: utf-8 -*-
#
# Copyright 2018-2019 Data61, CSIRO
#
# 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 ... | Python | 0.000002 | @@ -2137,140 +2137,8 @@
n%0A%0A%0A
-def get_ego_node_num(graph, target_idx):%0A G_ego = nx.ego_graph(graph, target_idx, radius=2)%0A return G_ego.number_of_nodes()%0A%0A%0A
def
@@ -2157,24 +2157,24 @@
ency_map():%0A
+
graph =
@@ -3022,206 +3022,8 @@
ts)%0A
- for var in keras_model_gat.non_trainable_... |
7c79ce6083f5ce93d9c64b458da243fe87a484f7 | Fix argument parsing default setup | src/jg/__main__.py | src/jg/__main__.py | import re
import sys
from itertools import chain
import argparse
import py
from graphviz import Digraph
EXTENDS_RE = re.compile(r'{%\s*extends\s*[\'"](.*)[\'"]\s*%}')
INCLUDE_RE = re.compile(r'{%\s*include\s*[\'"](.*)[\'"]\s*%}')
TEMPLATE_PATTERN = '*.html'
def main(argv=()):
"""
Args:
argv (list):... | Python | 0.000003 | @@ -703,17 +703,16 @@
,%0A )%0A
-%0A
args
@@ -736,16 +736,32 @@
rgs(argv
+ or sys.argv%5B1:%5D
)%0A ro
|
ce6426376f1a0d4b463b3a4b83aa34157896397d | add meetings list to committee api v2 | committees/api.py | committees/api.py | '''
Api for the committees app
'''
from tastypie.api import Api
from tastypie.constants import ALL
from tastypie.bundle import Bundle
import tastypie.fields as fields
from apis.resources.base import BaseResource
from models import Committee, CommitteeMeeting, ProtocolPart
from mks.api import MemberResource
class Com... | Python | 0 | @@ -374,16 +374,106 @@
'''%0A%0A
+ meetings = fields.ToManyField('committees.api.CommitteeMeetingResource', 'meetings')%0A%0A
clas
|
43038fdbb8d916eea1b3bcc0f80d26ee524d3c03 | Fix the unit-test broken by r4160 | trac/web/tests/auth.py | trac/web/tests/auth.py | from trac.test import EnvironmentStub, Mock
from trac.web.auth import LoginModule
from trac.web.href import Href
from Cookie import SimpleCookie as Cookie
import unittest
class LoginModuleTestCase(unittest.TestCase):
def setUp(self):
self.env = EnvironmentStub()
self.db = self.env.get_db_cnx()
... | Python | 0.000965 | @@ -1,16 +1,48 @@
+from trac.core import TracError%0A
from trac.test i
@@ -4729,33 +4729,28 @@
ssertRaises(
-Assertion
+Trac
Error, self.
|
79e4653b543e9ac9996a0b5405262ad15918b22e | Use .distinct() rather than set() to maintain order | tracpro/polls/rules.py | tracpro/polls/rules.py | from decimal import Decimal, InvalidOperation
from functools import wraps
from django.utils.translation import ugettext_lazy as _
# Rule tests that suggest that the expected data is numeric.
NUMERIC_TESTS = ('number', 'lt', 'eq', 'gt', 'between')
def get_category(rule):
"""Return the rule category name."""
... | Python | 0.000032 | @@ -1125,16 +1125,23 @@
tegories
+ + %5B''%5D
)%0A ex
@@ -1150,12 +1150,49 @@
a =
-set(
+extra.exclude(category=None)%0A extra =
extr
@@ -1227,16 +1227,36 @@
at=True)
+.distinct('category'
)%0A fo
|
9f5953577ea8c37674003d3d1bff8788b92379e4 | Integrate LLVM at llvm/llvm-project@8e5f3d04f269 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "17800f900dca8243773dec5f90578cce03069b8f"
LLVM_SHA256 = "779e3e2a575e2630571f03518782009de9ed075c9b18ce3139715d34a328a66a"
tf_http_archive(
... | Python | 0.000004 | @@ -160,133 +160,133 @@
= %22
-17800f900dca8243773dec5f90578cce03069b8f%22%0A LLVM_SHA256 = %22779e3e2a575e2630571f03518782009de9ed075c9b18ce3139715d34a328a66a
+8e5f3d04f269dbe791076e775f1d1a098cbada01%22%0A LLVM_SHA256 = %2251f4950108027260a6dfeac4781fdad85dfde1d8594f8d26faea504e923ebcf2
%22%0A%0A
|
adcf84d66af103636e9c6715892652e8643796bc | Integrate LLVM at llvm/llvm-project@69a909b9fefe | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "6f85d9e104ca5f785718b25dccb5817b0c6c208d"
LLVM_SHA256 = "d92d32307cb050c2a2a1d4fa2d7ceddea26207ad39ab87f47e389fab830fa0c6"
tfrt_http_archive(
... | Python | 0 | @@ -163,132 +163,132 @@
= %226
-f85d9e104ca5f785718b25dccb5817b0c6c208d%22%0A LLVM_SHA256 = %22d92d32307cb050c2a2a1d4fa2d7ceddea26207ad39ab87f47e389fab830fa0c6
+9a909b9fefeec5d4ece6f3162f8332f125ea202%22%0A LLVM_SHA256 = %220ffd99b2775505b9a9efc2efb9ad7251d4403844ca13777f8f8ef6caad460acb
%22%0A%0A
|
cbf7fb49dc8d0714e29fccb28bf2108ba45951aa | Integrate LLVM at llvm/llvm-project@09f43c107fc7 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tfrt_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "505d57486e57eb61e29bed6517de5152d208fede"
LLVM_SHA256 = "d94ac445e026e6cc29387a8345eedc77c428b0c0ac81eb9b843c0295515df494"
tfrt_http_archive(
... | Python | 0.000001 | @@ -162,132 +162,132 @@
= %22
-505d57486e57eb61e29bed6517de5152d208fede%22%0A LLVM_SHA256 = %22d94ac445e026e6cc29387a8345eedc77c428b0c0ac81eb9b843c0295515df49
+09f43c107fc7688639346d3beead72472cdadbdb%22%0A LLVM_SHA256 = %2203eaf8e80cdbd0e998c16ab5d5215e346ed7688777344940ad8c1492064674f
4%22%0A%0A
|
ae32af2969f7444b6cb6d4a4b4aea366409c507a | Integrate LLVM at llvm/llvm-project@5dbc7cf7cac4 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "42836e283fc58d5cebbcbb2e8eb7619d92fb9c2d"
LLVM_SHA256 = "c44be2c5da50431b370fe9dc1762399c27522ec2c5daeda5d618dddf502f4608"
tf_http_archive(
... | Python | 0.000002 | @@ -160,133 +160,133 @@
= %22
-42836e283fc58d5cebbcbb2e8eb7619d92fb9c2d%22%0A LLVM_SHA256 = %22c44be2c5da50431b370fe9dc1762399c27522ec2c5daeda5d618dddf502f4608
+5dbc7cf7cac4428e0876a94a4fca10fe60af7328%22%0A LLVM_SHA256 = %22389c14f6cc12103828f319df9161468d3403c3b70224e3a7a39a87bb99f1ff0c
%22%0A%0A
|
69887d843fef19802765a3f484f95b88e51628a8 | Integrate LLVM at llvm/llvm-project@f962dafbbdf6 | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "a429773b3ec6978e2cfd27d2ff6a6585b6e88198"
LLVM_SHA256 = "3beb955cfc9b981a35e4bd712db0fe2d4bc8ff03d3c2acc36b30036d7c2bf429"
tf_http_archive(
... | Python | 0.000001 | @@ -160,132 +160,132 @@
= %22
-a429773b3ec6978e2cfd27d2ff6a6585b6e88198%22%0A LLVM_SHA256 = %223beb955cfc9b981a35e4bd712db0fe2d4bc8ff03d3c2acc36b30036d7c2bf42
+f962dafbbdf61234bfa51bde95e2e5c52a02e9b9%22%0A LLVM_SHA256 = %229ae9cae1c72a35630499345bffa72ab45e2fcec2442acba6cbf88f5dee57591
9%22%0A%0A
|
6db82f5c41c88792a877865b8606f4490acd29e4 | Update get_absolute_url of Project model | trex/models/project.py | trex/models/project.py | # -*- coding: utf-8 -*-
#
# (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com>
#
# See LICENSE comming with the source of 'trex' for details.
#
from django.conf import settings
from django.core.urlresolvers import reverse_lazy
from django.db import models
class Project(models.Model):
name = models.CharField(max_len... | Python | 0 | @@ -752,17 +752,16 @@
t-detail
-s
%22, kwarg
|
ef589126ad2e1102a25caf2f2c6a5dc84dc389dd | update to refect geopydb's api change | tx_elevators/models.py | tx_elevators/models.py | from django.core.urlresolvers import reverse
from django.db import models
class Building(models.Model):
"""Some place with an address that holds `Elevator` object(s)."""
# LICNO
elbi = models.IntegerField(
u'Building Number',
unique=True,
help_text='The Building Number is a TDLR is... | Python | 0 | @@ -1550,16 +1550,29 @@
+from geopydb
import g
@@ -1573,20 +1573,22 @@
port geo
-pydb
+coders
%0A
@@ -1595,20 +1595,22 @@
g = geo
-pydb
+coders
.GoogleV
|
74951792670a060ffbe7e25a610d998f8cdbc700 | Fix silly pyflakes complaint | txjsonrpc/util/dist.py | txjsonrpc/util/dist.py | import os
legalReSTFiles = [
"README.rst",
"TODO",
"DEPENDENCIES",
]
def setup(*args, **kwds):
"""
Compatibility wrapper.
"""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
return setup(*args, **kwds)
def findPackages(... | Python | 0.998744 | @@ -853,20 +853,24 @@
return
-True
+docutils
%0A exc
|
2046e6fa4f18a298cbcae1c00e9e63f59716e0d8 | Remove dead handle_json_error code | typedjsonrpc/server.py | typedjsonrpc/server.py | """Contains the Werkzeug server for debugging and WSGI compatibility."""
from __future__ import absolute_import, print_function
import json
from werkzeug.debug import DebuggedApplication
from werkzeug.exceptions import abort
from werkzeug.serving import run_simple
from werkzeug.routing import Map, Rule
from werkzeug.... | Python | 0.00006 | @@ -126,21 +126,8 @@
on%0A%0A
-import json%0A%0A
from
@@ -2222,332 +2222,8 @@
s)%0A%0A
- @staticmethod%0A def handle_json_error(environ, start_response, traceback):%0A %22%22%22Handles a json error specially by returning the id which links to the failure%22%22%22%0A response = Response(json.dumps... |
c8af134a0852eabb1b196a1087cb4f5c176a4818 | Modify module import syntax to avoid confusion with test method | thumbnailer/test_thumbnails.py | thumbnailer/test_thumbnails.py | from thumbnailer import _resizer
from unittest import TestCase, main
import os.path as path
from PIL import Image
class ThumbnailerTests(TestCase):
def path(self, filename):
return path.join(self.img_path, filename)
def setUp(self):
self.img_path = path.join(path.dirname(__file__), "test_data... | Python | 0 | @@ -75,21 +75,8 @@
t os
-.path as path
%0Afro
@@ -167,32 +167,35 @@
%0A return
+os.
path.join(self.i
@@ -251,32 +251,35 @@
self.img_path =
+os.
path.join(path.d
@@ -264,32 +264,35 @@
= os.path.join(
+os.
path.dirname(__f
@@ -1128,16 +1128,19 @@
return
+os.
path.joi
@@ -1210,16 +1210,19 @@
_path =... |
538089f7055b90926adea159bdac03da1d5318d4 | Fix Zika build to include all JSONs | builds/zika/zika.process.py | builds/zika/zika.process.py | from __future__ import print_function
import os, sys
# we assume (and assert) that this script is running from the virus directory, i.e. inside H7N9 or zika
sys.path.append(os.path.join(os.path.dirname(__file__), '../..'))
import base.process
from base.process import process
def collect_args():
"""Returns a Zika-... | Python | 0 | @@ -1245,35 +1245,8 @@
rue%7D
-,%0A %22extra_jsons%22: %5B%5D
%0A
|
fda1cbb413f8647c2ab5be858ec0aaa32a0fbfac | add SEND_MAIL_USER setting | mail/models.py | mail/models.py | """mail models"""
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from django.db import models
from django.core.urlresolvers import reverse
from django.conf import settings
from jinja2 import Template
from tinymce.models import HTMLField
class Receiver(models.Model):
"""mail... | Python | 0.000004 | @@ -1387,18 +1387,17 @@
ngs.
-EMAIL_HOST
+SEND_MAIL
_USE
|
fb46c994e5b2c7d289586638ca838e508c643219 | Fix incorrect comment | tkp/steps/source_extraction.py | tkp/steps/source_extraction.py | import logging
import tkp.utility.accessors
from tkp.utility.accessors import sourcefinder_image_from_accessor
import tkp.utility.accessors
logger = logging.getLogger(__name__)
def extract_sources(image_path, parset):
"""
Extract sources from an image.
:param image_path: path to file to extract sources ... | Python | 0.999206 | @@ -294,16 +294,27 @@
to file
+from which
to extra
@@ -323,21 +323,17 @@
sources
- from
+.
%0A :pa
@@ -348,32 +348,18 @@
et:
-parameter set *filename*
+dictionary
con
@@ -378,32 +378,16 @@
east the
-%0A
detecti
@@ -401,16 +401,24 @@
analysis
+%0A
thresho
@@ -447,32 +447,16 @@
... |
6873a477890c08f51b54b616555fe88bb3a9704e | Add the Plivo outgoing number | cabot_alert_plivo/models.py | cabot_alert_plivo/models.py | from os import environ as env
from django.conf import settings
from django.template import Context, Template
from django.db import models
from cabot.cabotapp.alert import AlertPlugin, AlertPluginUserData
import requests
import logging
import plivo
# get the environment variables (see cabot/conf/development.env)
au... | Python | 0.999994 | @@ -1707,16 +1707,91 @@
der(c)%0A%0A
+%09%09# get the source number%0A%09%09src_number = env.get('PLIVO_OUTGOING_NUMBER')%0A%0A
%09%09# get
@@ -2061,22 +2061,18 @@
src=
-'441233801333'
+src_number
,%0A%09%09
|
b733feeff14ff02fb62697dcb8585b055cab2bfe | Debug with newline | cabot_alert_sensu/models.py | cabot_alert_sensu/models.py | from django.db import models
#from django.conf import settings
#from django.template import Context, Template
from cabot.cabotapp.alert import AlertPlugin, AlertPluginUserData
from os import environ as env
#import requests
sensu_port = env.get('SENSU_PORT') or '3030'
DEBUG = env.get('SENSU_DEBUG') or True ... | Python | 0 | @@ -610,16 +610,18 @@
o Sensu.
+%5Cn
' )%0A
@@ -1610,24 +1610,25 @@
%0A
+#
output = %22,
@@ -1643,16 +1643,40 @@
utputs)%0A
+ output = 'TEST'%0A
@@ -1819,16 +1819,23 @@
+ output
+ + '%5Cn'
)
@@ -2454,16 +2454,23 @@
handlers
+ + '%5Cn'
)
@@ -2801,46 +2801,99 @@
... |
a88b30030b2ff8ab266b88e3e6da3327c44099a9 | remove ascii stuff | src/linked_list.py | src/linked_list.py | """Singly-Linked List in Python."""
class Node(object):
"""Inistantiate a new data node with point to next item."""
def __init__(self, data, next_item=None):
"""Init for instance of a node."""
self.data = data
self.next_item = next_item
class LinkedList(object):
"""Class for hea... | Python | 0.000011 | @@ -851,34 +851,32 @@
al:
-%E2%80%9C
(12,
-%E2%80%98sam%E2%80%99
+'sam'
, 37,
-%E2%80%98
+'
tango
-%E2%80%99)%E2%80%9D
+')
%0A
|
65d1ed5b7c9d91c55da1ff8e4e9b378f82ca0809 | Make brlmon a dock again. | src/orca/brlmon.py | src/orca/brlmon.py | # Orca
#
# Copyright 2006 Sun Microsystems Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This libra... | Python | 0.000001 | @@ -2091,17 +2091,16 @@
False)%0A%09
-#
self.con
|
023ca238220f79fc07a14ea9298d81157a236e9d | Add dash to fileparser arguments so it does not wait for input | cluster/utils.py | cluster/utils.py | import os
import bz2
import time
from project.utils import StringIO, SSHClient, SFTPClient
from models import Credential
from data.models import JobTemplate
def get_ssh_connection_obj(obj):
if isinstance(obj, Credential):
try:
return obj.get_ssh_connection()
except: # sometimes this... | Python | 0 | @@ -1906,16 +1906,18 @@
arser.py
+ -
%22%0A _,
|
eaf1cb57043032007271b90805cf92d8464c76e3 | Delete redundant constants | cmcb/__main__.py | cmcb/__main__.py | import asyncio
import league
import reddit
import utils
import website
import static_data
MINUTE = static_data.MINUTE
LEAGUE_API_KEY = static_data.LEAGUE_API_KEY
LEAGUE_UPDATE_TIMEOUT = static_data.LEAGUE_CACHE_UPDATE_TIMEOUT
LEAGUE_REGIONS = static_data.LEAGUE_REGIONS
REDDIT_ID = static_data.REDDIT_CLIENT_ID
REDDI... | Python | 0.001134 | @@ -89,36 +89,8 @@
ta%0A%0A
-MINUTE = static_data.MINUTE%0A
%0ALEA
@@ -134,72 +134,8 @@
KEY%0A
-LEAGUE_UPDATE_TIMEOUT = static_data.LEAGUE_CACHE_UPDATE_TIMEOUT%0A
LEAG
|
b55c8a33887a9e2932113ed279b9292b7b547a5d | update : change cmmedia/view.py resvers images to images_url | cmmedia/views.py | cmmedia/views.py | # encoding=utf-8
from django.utils.translation import ugettext_lazy as _
from rest_framework.response import Response
from rest_framework.reverse import reverse
from rest_framework.views import APIView
from rest_framework import generics
from rest_framework.viewsets import ModelViewSet
from cmmedia.models import Image
... | Python | 0 | @@ -595,16 +595,20 @@
u%22images
+_url
%22).strip
|
5621e16fd050860418c16510d872f822f95e8175 | include Python traceback and exception in reported errors when running with --debug switch (useful when debugging Bakefile itself) | src/errors.py | src/errors.py | #
# This file is part of Bakefile (http://www.bakefile.org)
#
# Copyright (C) 2003,2004 Vaclav Slavik
#
# 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 wit... | Python | 0.000004 | @@ -1840,16 +1840,28 @@
== None:
+%0A
context
@@ -2196,100 +2196,865 @@
xt)%0A
+%0A
-def __str__(self):%0A return 'error: %25s%5Cn%25s' %25 (self.desc, ErrorBase.__str__(self))
+ # include additional debugging information if debugging bakefile itself:%0A from config import debug%0A... |
4b6da3d2d60b6ad6301a30b05e6960aa10491650 | add formula | libs/client.py | libs/client.py | #-*-coding: utf-8-*-
from tornado import gen
from tornado.httpclient import AsyncHTTPClient, HTTPError, HTTPRequest
from tornado.options import options
from functools import wraps
from tornado import escape
import tornado.ioloop
import base64
import time
import datetime
import json
from math import exp
AsyncHTTPClien... | Python | 0.998694 | @@ -400,17 +400,17 @@
: 2 ** 1
-1
+0
/ (1 +
@@ -432,17 +432,17 @@
- 2 **
-8
+7
) / 2 **
@@ -442,17 +442,17 @@
/ 2 **
-6
+5
))%0A%0A%0Adef
|
20e50e81ef46741a2b9a1c4b239b9e18e21c76f8 | use ternary-ish expression | libtasks/fs.py | libtasks/fs.py | #!/usr/bin/env python
# coding: utf-8
"""
Contains file related operations, especially `isolatedmove`, which
will copy files or directories as atomic as possible.
It is not atomic, because:
* there's a tempfile left over if `isolatedmove` is interrupted, although this
will be cleaned up via `cleanup_temporary_file... | Python | 0.00102 | @@ -951,73 +951,42 @@
-if delete:%0A prefix = TMP_PREFIX%0A else:%0A prefix =
+prefix = TMP_PREFIX if delete else
TMP
|
82fb79904dd05c2f9d205b66d3446418aa6affcd | Return empty list rather than HTTP 404 when namespace_id metrics endpoint filter doesn't match. (#34) | inbox/api/metrics_api.py | inbox/api/metrics_api.py | from collections import defaultdict
from flask import Blueprint, jsonify, request
from operator import itemgetter
from sqlalchemy.orm.exc import NoResultFound
from inbox.api.err import NotFoundError
from inbox.api.kellogs import APIEncoder
from inbox.heartbeat.status import get_ping_status
from inbox.models import Fol... | Python | 0.000002 | @@ -938,92 +938,37 @@
r
-aise NotFoundError(%22Couldn't find namespace %7B%7D%22.format(request.args%5B'namespace_id'%5D)
+eturn APIEncoder().jsonify(%5B%5D
)%0A
|
a9ffe71a9b5b7d742082ae80fa089e7f130e5427 | set session variables in when opening connection | tap_mysql/connection.py | tap_mysql/connection.py | #!/usr/bin/env python3
import backoff
import pymysql
from pymysql.constants import CLIENT
import singer
import ssl
LOGGER = singer.get_logger()
CONNECT_TIMEOUT_SECONDS = 300
READ_TIMEOUT_SECONDS = 3600
# We need to hold onto this for self-signed SSL
match_hostname = ssl.match_hostname
@backoff.on_exception(backo... | Python | 0.000001 | @@ -507,16 +507,1008 @@
nect()%0A%0A
+ warnings = %5B%5D%0A with connection.cursor() as cur:%0A try:%0A cur.execute('SET @@session.time_zone=%22+0:00%22')%0A except pymysql.err.InternalError as e:%0A warnings.append('Could not set session.time_zone. Error: (%7B%7D) %7B%7D'.for... |
c54a430daa9309c5aaaac86010f7e1cf10b1a8a9 | Add missing CLI Neutron tests | tempest/cli/__init__.py | tempest/cli/__init__.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation
# 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.apach... | Python | 0.000008 | @@ -5084,16 +5084,71 @@
result
+,%0A stderr=result_err
)%0A
@@ -5978,16 +5978,27 @@
, output
+, stderr=%22%22
):%0A
@@ -6082,8 +6082,37 @@
output%0A
+ self.stderr = stderr%0A
|
36110646c5c5abead8c2a3a7d98d36bb6d49db59 | Remove pointless models include | subsend/models.py | subsend/models.py | from django.db import models
# Create your models here.
models
| Python | 0 | @@ -1,34 +1,4 @@
-from django.db import models%0A%0A
# Cr
@@ -24,11 +24,4 @@
re.%0A
-models%0A
|
a4062588d1eae0883dd8d56f198e84a8875eabb5 | make self_test not import if pytest is not installed | sunpy/__init__.py | sunpy/__init__.py | """
SunPy
=====
An open-source Python library for Solar Physics data analysis.
Web Links
---------
Homepage: http://www.sunpy.org
Documentation: http://sunpy.readthedocs.org/en/latest/index.html
"""
from __future__ import absolute_import
import warnings
__version__ = '0.3.3'
try:
from sunpy.version import vers... | Python | 0 | @@ -519,16 +519,25 @@
em_info%0A
+try:%0A
from sun
@@ -569,16 +569,45 @@
elf_test
+%0Aexcept ImportError:%0A pass
%0A%0A# Samp
@@ -688,17 +688,16 @@
5_IMAGE,
-
%0A
|
ca0f19a0b3ab65f0dfd31dacf226f274187f5abc | Update syaml.py to solve deprecated unsafe loader. | src/syaml/syaml.py | src/syaml/syaml.py | import io
import os
import functools
import six
import yaml
from mako.template import Template
from zope.interface import implementer
from zope.component import IFactory
from .interfaces import (
IParser,
IPostProcess,
IPreProcess,
IReader,
)
NAME = 'syaml'
@implementer(IPreProcess)
class Syam... | Python | 0 | @@ -1341,16 +1341,39 @@
j.read()
+,loader=yaml.SafeLoader
)%0A%0A%0A@imp
|
583d621c5804ecf4193bc6a33714d68995eaf3b8 | broadcast_collect subs correctly | blaze/expr/broadcast2.py | blaze/expr/broadcast2.py | from datashape import *
import itertools
from toolz import curry
from .expressions import *
from .expressions import Field
from .arithmetic import maxshape, Arithmetic, Add
__all__ = ['broadcast', 'Broadcast', 'scalar_symbols', 'broadcast_collect']
def broadcast(expr, leaves, scalars=None):
scalars = scalars or ... | Python | 0.998627 | @@ -1886,22 +1886,22 @@
hildren=
-%5B
+(
x, y
-%5D
+)
, _scala
@@ -2015,17 +2015,17 @@
ren=
-%5B
+(
2 * y, x
%5D, _
@@ -2020,17 +2020,17 @@
2 * y, x
-%5D
+)
, _scala
@@ -2361,9 +2361,17 @@
ubs(
-%7B
+dict(zip(
expr
@@ -2378,17 +2378,17 @@
._inputs
-:
+,
childre
@@ -2392,9 +2392,10 @@
dren
-%7D
+))
)%0A%0... |
336093ee08fdc46c3f95656ca44a43a0dd045c4d | update last_login when authing with token | bluebottle/auth/views.py | bluebottle/auth/views.py | from rest_framework.views import APIView
from rest_framework.authtoken.models import Token
from rest_framework.response import Response
from rest_framework.authtoken.serializers import AuthTokenSerializer
from rest_framework.authentication import get_authorization_header
from rest_framework import parsers, renderers
fr... | Python | 0 | @@ -431,16 +431,45 @@
import%0A
+from datetime import datetime
%0A%0Aclass
@@ -1502,16 +1502,77 @@
_token)%0A
+ user.last_login = datetime.now()%0A user.save()%0A
|
2a8e45575657da57bd21c832ccdd221b5044fc40 | Update bottlespin.py | bottlespin/bottlespin.py | bottlespin/bottlespin.py | import discord
from discord.ext import commands
from random import choice
class Bottlespin:
"""Spins a bottle and lands on a random user."""
def __init__(self, bot):
self.bot = bot
@commands.command(pass_context=True, no_pm=True, alias=["bottlespin"])
async def spin(self, ctx, role):
... | Python | 0 | @@ -355,20 +355,16 @@
oles = %5B
-str(
ctx.mess
@@ -379,17 +379,16 @@
er.roles
-)
%5D%0A
@@ -417,16 +417,21 @@
tr(roles
+.name
))%0A
|
d1eb4cda70a348a4f7bfa1613267c50bb8060253 | Add more tests for plugins._are_plugins_different | test/db/plugins_test.py | test/db/plugins_test.py | # -*- coding: utf-8 -*-
import unittest
import db.plugins
class PluginsTest(unittest.TestCase):
def test_update_plugin(self):
def assert_update(old, new, expected):
updated = db.plugins.update_plugin(old, new)
self.assertEquals(updated, expected)
# Ensure we get basic d... | Python | 0 | @@ -4158,16 +4158,382 @@
'bbq'%7D))
+%0A self.assertTrue(diff(%0A %7B'vimorg_id': 1, 'github_owner': 2, 'github_repo_name': 2%7D,%0A %7B'vimorg_id': 1, 'github_owner': 3, 'github_repo_name': 3%7D))%0A self.assertTrue(diff(%0A %7B'vimorg_id': 2, 'github_owner':... |
dbe038e8de248ce57a7f4b2eb64c70eff98728b2 | Disable defusedxml test for ublli3 transport | test/grab_defusedxml.py | test/grab_defusedxml.py | # coding: utf-8
"""
See details here: https://github.com/tiran/defusedxml/blob/master/README.md
"""
from test.util import temp_dir, build_grab
from test.util import BaseGrabTestCase
import os
from lxml.etree import parse
from six import BytesIO
from defusedxml import EntitiesForbidden
class GrabSimpleTestCase(BaseGra... | Python | 0 | @@ -135,16 +135,40 @@
ild_grab
+, exclude_grab_transport
%0Afrom te
@@ -1169,16 +1169,55 @@
ere!')%0A%0A
+ @exclude_grab_transport('urllib3')%0A
def
|
5cf4e1181dd3146b6070e144d720406bb7fb13d5 | Add qiutil to logging. | test/helpers/logging.py | test/helpers/logging.py | """
This test logging module configures test case logging to print
debug messages to stdout.
"""
from qiutil.logging import (configure, logger)
configure('test', level='DEBUG')
| Python | 0 | @@ -156,16 +156,26 @@
('test',
+ 'qiutil',
level='
|
67659e8da1a6479dac0eae2b0219962a4eb4eae9 | fix arg bug | src/strava_local_client.py | src/strava_local_client.py | #!/usr/bin/env python
"""
Strava Development Sandbox.
Get your *Client ID* and *Client Secret* from https://www.strava.com/settings/api
Usage:
strava_local_client.py get_write_token <client_id> <client_secret> [options]
Options:
-h --help Show this screen.
--port=<port> Local port for OAuth client [defa... | Python | 0.000004 | @@ -904,16 +904,72 @@
_doc__)%0A
+ t = Terminal()%0A%0A if args%5B'get_write_token'%5D:%0A
CLIE
@@ -1040,60 +1040,8 @@
%3E'%5D%0A
- t = Terminal()%0A%0A if args%5B'get_write_token'%5D:%0A
@@ -1111,12 +1111,27 @@
_id=
-1418
+args%5B'%3Cclient_id%3E'%5D
,%0A
|
5342163b9d6c4b489a16157d6a97ed7f389d4037 | Use BUILDKITE_JOB_ID for better navigation for flaky tracker (#26021) | ci/build/get_build_info.py | ci/build/get_build_info.py | #!/usr/bin/env python
"""
This script gathers build metadata from Travis environment variables and Travis
APIs.
Usage:
$ python get_build_info.py
{
"json": ["containing", "build", "metadata"]
}
"""
import os
import sys
import json
def gha_get_self_url():
import requests
# stringed together api call to ... | Python | 0 | @@ -1359,46 +1359,14 @@
RL%22%5D
-%0A + %22#%22%0A
+ + %22#%22
+ o
@@ -1386,21 +1386,19 @@
ILDKITE_
-BUILD
+JOB
_ID%22%5D%0A
|
f8aa0ea6e33857b5271e8624991429116e1b3acf | 'delta' should be an int and 'interval' a float | ckanext/timeline/plugin.py | ckanext/timeline/plugin.py | from __future__ import absolute_import, with_statement, print_function, generators, nested_scopes, unicode_literals, division
import logging
import threading
import multiprocessing
from urllib2 import urlopen
import ckan.plugins as plugins
import ckan.logic
import ckan.lib.search
import ckan.lib.search.query
from cka... | Python | 0.999663 | @@ -2866,14 +2866,8 @@
a =
-float(
end
@@ -2869,25 +2869,24 @@
end - start
-)
%0A log.deb
@@ -3081,16 +3081,18 @@
rval = 1
+.0
%0A
@@ -3115,19 +3115,14 @@
S -
-int(
delta)
-)
//
|
b090a68575fc7727635adbc49c54e6ce0f977513 | Add mime-types | imgsize.py | imgsize.py | import imghdr
import struct
SIZE = {}
def size(fname):
'''
Return a dict of data about a file if we can determine its file type.
fname::
Either a filename str, or a file object.
Returns::
dict() of details with at least 'width', 'height', and 'type'.
None if type is not know... | Python | 0.999029 | @@ -1,12 +1,35 @@
+#!/usr/bin/env python%0A%0A
import imghd
@@ -49,18 +49,116 @@
ct%0A%0A
-SIZE = %7B%7D%0A
+# Map of imghdr type string to sizing function%0ASIZE = %7B%7D%0A%0A# Map of imghdr type string to MIME type%0AMIME = %7B%7D
%0A%0Ade
@@ -632,16 +632,34 @@
, type=t
+, mime=MIME.get(t)
)%0A%0A%0Adef
@@ -12... |
7dd4aa82ea090fd37a9b312092b7952f376dfcdf | fix import pattern | tools/scripts/telemeta-crem-import.py | tools/scripts/telemeta-crem-import.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Guillaume Pellerin
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://svn.parisson.org/telemeta/TelemetaLicense.
#
... | Python | 0.000001 | @@ -4506,32 +4506,41 @@
ce_dir, log_file
+, pattern
)%0A t.wav_
|
45a738783bf20fd354f97a9a3a6e2aee9e21e615 | add test cases of anytemplate.utils.find_template_from_path | anytemplate/tests/utils.py | anytemplate/tests/utils.py | #
# Copyright (C). 2011, 2012 Satoru SATOH <ssato at redhat.com>
#
import os.path
import os
import unittest
import anytemplate.utils as TT
import anytemplate.tests.common
class Test_00_functions(unittest.TestCase):
def test_02_uniq(self):
self.assertEquals(TT.uniq([]), [])
self.assertEquals(TT.u... | Python | 0.000002 | @@ -1838,16 +1838,519 @@
one)%5D)%0A%0A
+ def test_60_find_template_from_path__wo_paths(self):%0A self.assertEquals(TT.find_template_from_path(__file__), __file__)%0A%0A def test_62_find_template_from_path__w_paths(self):%0A fn = os.path.basename(__file__)%0A fdir = os.path.dirname(__file__)... |
6a87213bc19a83cf23dd8df6acadf6f8abf5f659 | add automatic system related operation | updategit/updategit.py | updategit/updategit.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# .---. .-----------
# / \ __ / ------
# / / \( )/ ----- (`-') _ _(`-') <-. (`-')_
# ////// '\/ ` --- ( OO).-/( (OO ).-> .-> \( OO) ) .->
# //// / // : : --... | Python | 0.000001 | @@ -2588,16 +2588,26 @@
port cm%0A
+import os%0A
%0Adef gi
@@ -3043,22 +3043,8 @@
r):%0A
- import os%0A
@@ -3791,37 +3791,644 @@
def
-main():%0A tardir = raw_inpu
+__updatebrew():%0A print pcolor.WARNING + 'BREW UPDATE' + pcolor.ENDC%0A brewstatus = os.popen('brew update')%0A for line in brew... |
1e02020785cdf6df1fa2bda215edc86340b6b309 | Fix spelling mistake | mbuild/box.py | mbuild/box.py | from warnings import warn
import numpy as np
__all__ = ['Box']
class Box(object):
"""A box representing the bounds of the system.
Attributes
----------
mins : np.ndarray, shape=(3,), dtype=float
Minimum x, y, z coordinates.
maxs : np.ndarray, shape=(3,), dtype=float
Maximum x, y,... | Python | 1 | @@ -4807,16 +4807,17 @@
reroute
+d
to the%0A
|
403c4a31e1ceb3e900a8e1241d5ab9e1093d0171 | Build reorg: * 'build_lib' -> 'build_purelib' * new 'build_lib' and 'build_temp' options * use 'get_platform()' to initialize 'build_platlib' and 'build_temp' | command/build.py | command/build.py | """distutils.command.build
Implements the Distutils 'build' command."""
# created 1999/03/08, Greg Ward
__rcsid__ = "$Id$"
import os
from distutils.core import Command
class build (Command):
description = "build everything needed to install"
user_options = [
('build-base=', 'b',
"base d... | Python | 0 | @@ -126,16 +126,21 @@
%0A%0Aimport
+ sys,
os%0Afrom
@@ -170,16 +170,55 @@
Command%0A
+from distutils.util import get_platform
%0A%0Aclass
@@ -407,18 +407,23 @@
ild-
+pure
lib=',
-'l'
+None
,%0A
@@ -422,32 +422,38 @@
None,%0A %22
+build
directory for pl
@@ -463,19 +463,28 @@
orm-
-shared file
+ne... |
854eb3b6cf92dc7c54c931f9f128a4577bca5b2a | Bump version number | sslyze/__init__.py | sslyze/__init__.py |
__author__ = 'Alban Diquet'
__version__ = '1.4.3'
__email__ = 'nabla.c0d3@gmail.com'
PROJECT_URL = 'https://github.com/nabla-c0d3/sslyze'
| Python | 0.000002 | @@ -41,13 +41,13 @@
= '
-1.4.3
+2.0.0
'%0A__
|
c2ae2d3a35ee9dc6faf956c90604459fac96473c | Update st2client description and classifiers. | st2client/setup.py | st2client/setup.py | #!/usr/bin/env python2.7
# Licensed to the StackStorm, Inc ('StackStorm') 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 "Lice... | Python | 0 | @@ -1298,18 +1298,11 @@
ion=
-'CLI and p
+('P
ytho
@@ -1318,16 +1318,24 @@
library
+and CLI
for the
@@ -1351,16 +1351,49 @@
m (st2)
+event-driven '%0A '
automati
@@ -1405,16 +1405,17 @@
atform.'
+)
,%0A au
@@ -1562,16 +1562,29 @@
::
-4 - Beta
+5 - Production/Stable
',%0A
@@ -1637,16 ... |
48f75d4ccccf43ef25519a1c623de319443729df | add an all | measure_it.py | measure_it.py | from time import time
from functools import wraps
def print_metric(name, count, elapsed):
"""A metric function that prints
:arg str name: name of the metric
:arg int count: number of elements
:arg float elapsed: time in seconds
"""
if name is not None:
print("%s: %d elements in %.2... | Python | 0.999993 | @@ -42,16 +42,54 @@
rt wraps
+%0A__all__ = %5B'measure', 'measure_each'%5D
%0A%0Adef pr
|
e34bcec834bf4d84168d04a1ea0a98613ad0df4e | Update migration to fetch domains with applications using old location fixture | corehq/apps/locations/management/commands/migrate_new_location_fixture.py | corehq/apps/locations/management/commands/migrate_new_location_fixture.py | from django.core.management.base import BaseCommand
from toggle.models import Toggle
from corehq.apps.locations.models import LocationFixtureConfiguration, SQLLocation
from corehq.toggles import FLAT_LOCATION_FIXTURE
class Command(BaseCommand):
help = """
To migrate to new flat fixture for locations. Update ... | Python | 0 | @@ -1,12 +1,24 @@
+import json%0A
from django.
@@ -132,24 +132,27 @@
import
+SQL
Location
FixtureC
@@ -147,40 +147,52 @@
tion
-FixtureConfiguration, SQLLocatio
+%0Afrom corehq.apps.domain.models import Domai
n%0Afr
@@ -216,20 +216,28 @@
import
-FLAT
+HIERARCHICAL
_LOCATIO
@@ -245,16 +245,34 @@
_FIXTURE
+, ... |
a17ed4f65b7fa5a035efb7c6ff19fcf477a65429 | Remove remaining django-mptt 0.7 compatibility code | categories_i18n/managers.py | categories_i18n/managers.py | """
The manager classes.
"""
import django
from django.db.models.query import QuerySet
from mptt.managers import TreeManager
from mptt.querysets import TreeQuerySet
from parler.managers import TranslatableManager, TranslatableQuerySet
class CategoryQuerySet(TranslatableQuerySet, TreeQuerySet):
"""
The Querys... | Python | 0 | @@ -809,364 +809,4 @@
Set%0A
-%0A def get_queryset(self):%0A # Nasty: In some django-mptt 0.7 versions, TreeManager.get_querset() no longer calls super()%0A # Hence, redefine get_queryset() here to have the logic from django-parler and django-mptt.%0A return self._queryset_class(self.model, usi... |
2e255335d2cd0c598f238b5abf595f9ad8e7d907 | Fix documentation and add is_image_file (#507) | torchvision/datasets/folder.py | torchvision/datasets/folder.py | import torch.utils.data as data
from PIL import Image
import os
import os.path
def has_file_allowed_extension(filename, extensions):
"""Checks if a file is an allowed extension.
Args:
filename (string): path to a file
Returns:
bool: True if the filename ends with a known image extensio... | Python | 0 | @@ -231,16 +231,93 @@
o a file
+%0A extensions (iterable of strings): extensions to consider (lowercase)
%0A%0A Re
@@ -372,21 +372,20 @@
ith
-a known image
+one of given
ext
@@ -390,16 +390,17 @@
xtension
+s
%0A %22%22%22
@@ -503,24 +503,318 @@
tensions)%0A%0A%0A
+def is_image_file(filename):%0A ... |
07df11f81cf050d88218f5fb6348b1193bfb4e20 | use the right user to chown | ceph_installer/templates.py | ceph_installer/templates.py |
setup_script = """#!/bin/bash -x -e
if [[ $EUID -ne 0 ]]; then
echo "You must be a root user or execute this script with sudo" 2>&1
exit 1
fi
echo "--> creating new user with disabled password: ansible"
useradd -m ceph-installer
passwd -d ceph-installer
echo "--> adding provisioning key to the ansible authorized... | Python | 0 | @@ -459,23 +459,37 @@
-R
-ansible:ansib
+ceph-installer:ceph-instal
le
+r
/ho
|
77c9e9022c4f18cbba3f681f60c94a0eb3783a9b | add support for bool literals in visitor. | toydist/core/parser/visitor.py | toydist/core/parser/visitor.py | import sys
from toydist.core.parser.nodes \
import \
Node
def split_newline(s):
try:
ind = [i.type for i in s].index("newline")
return [s[:ind+1], s[ind+1:]]
except ValueError:
return [s]
def split_newlines(s):
t = []
def _split_newlines(s):
sp = split_newl... | Python | 0 | @@ -1448,16 +1448,51 @@
.osvar,%0A
+ %22bool%22: self.bool_var,%0A
@@ -5932,8 +5932,65 @@
latform%0A
+%0A def bool_var(self, node):%0A return node.value%0A
|
40bb813010b3f217ae65d522784fd50b56296592 | make IntervalTrigger stateful to fix PTB example bug | chainer/training/trigger.py | chainer/training/trigger.py | class IntervalTrigger(object):
"""Trigger based on a fixed interval.
This trigger accepts iterations divided by a given interval. There are two
ways to specify the interval: per iterations and epochs. `Iteration` means
the number of updates, while `epoch` means the number of sweeps over the
traini... | Python | 0 | @@ -765,16 +765,39 @@
t = unit
+%0A self.count = 0
%0A%0A de
@@ -1342,39 +1342,43 @@
-return updater.is_new_epoch and
+old_count, self.count = self.count,
upd
@@ -1387,18 +1387,26 @@
er.epoch
- %25
+_detail //
self.pe
@@ -1409,21 +1409,59 @@
f.period
- == 0
+%0A return old_count != se... |
121bb5bb4bf17e3eb2446b851223ef30168aefd3 | put the username/password into the URL | channelguide/guide/feeds.py | channelguide/guide/feeds.py | # Copyright (c) 2008 Participatory Culture Foundation
# See LICENSE for details.
from channelguide import init
init.init_external_libraries()
from channelguide import util
from channelguide.guide import api
from channelguide.guide.models import Channel, Category, Tag, Language
from django.conf import settings
from dja... | Python | 0.999999 | @@ -4578,26 +4578,444 @@
def
-title(self
+get_object(self, bits):%0A if len(bits) != 2:%0A raise ObjectDoesNotExist%0A username, password = bits%0A try:%0A user = User.query(username=username).get(self.request.connection)%0A except LookupError:%0A raise... |
a8d6abd869fc30d395ffafec9eea566f58fb840c | add new code tables to admin console | app/backend/wells/admin.py | app/backend/wells/admin.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
distri... | Python | 0 | @@ -598,34 +598,207 @@
min%0A
-%0A# Register your models here.
+from wells.models import (%0A WaterQualityCharacteristic,%0A WaterQualityColour%0A)%0A%0A# Register your models here.%0A%0Aadmin.site.register(WaterQualityCharacteristic)%0Aadmin.site.register(WaterQualityColour)
%0A
|
ee1bb1064d9193c3cf04ab37f85ce82985f309dd | Whitelist DeviceSpec for export without documentation. Change: 120868127 | tensorflow/python/__init__.py | tensorflow/python/__init__.py | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Python | 0 | @@ -5165,24 +5165,42 @@
nfigProto',%0A
+ 'DeviceSpec',%0A
'Event',
|
4455044ec8c1a4aab2b774224d19d97a35d819e8 | add accent and typo correction to title | tarbell_config.py | tarbell_config.py | # -*- coding: utf-8 -*-
"""
Tarbell project configuration
"""
# Short project name
NAME = "geografiadedolor"
# Descriptive title of project
TITLE = "Geografia de dolor"
# Google spreadsheet key
SPREADSHEET_KEY = "1_Duj8Upko57n-AXHFQCa_vy3zaJx19hjvnwPuX5otJo"
# Exclude these files from publication
EXCLUDES = ["*.md... | Python | 0.000002 | @@ -1236,31 +1236,32 @@
e': 'Geograf
-i
+%C3%AD
a de
- d
+l D
olor'%0A%7D%0A%0A# B
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.