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 |
|---|---|---|---|---|---|---|---|
3c217b3d5333cbcce53534fa384035a790ef4e32 | Use gabor_map | tools/get_texture.py | tools/get_texture.py | #!/usr/bin/env python2
"""Calculate texture properties for a ROI."""
import argparse
import glob
import re
import numpy as np
import dwi.asciifile
import dwi.dataset
import dwi.mask
import dwi.plot
import dwi.texture
import dwi.util
def parse_args():
"""Parse command-line arguments."""
p = argparse.Argument... | Python | 0.000001 | @@ -3364,16 +3364,47 @@
ADCm'%5D)%0A
+ roi.shape = roi.shape%5B:-1%5D%0A
#roi
@@ -3437,25 +3437,35 @@
i.std()%0A
-d
+tmap, names
= dwi.textu
@@ -3476,19 +3476,25 @@
abor
-(roi%5B...,0%5D
+_map(roi, winsize
, si
@@ -3557,38 +3557,83 @@
for
-k, v
+a, n
in
-d.iteritems():
+zip(tmap%5B:,sl,sl%5D,... |
3cedde019466570221555fe292fca3faa11b17a4 | Bump version | sigopt/version.py | sigopt/version.py | VERSION = '2.11.1'
| Python | 0 | @@ -9,11 +9,11 @@
= '2.11.
-1
+2
'%0A
|
2761c6f70df6db259fa6be2e70f6ff6b537546f0 | Fix typo | tools/glidein_gdb.py | tools/glidein_gdb.py | #!/bin/env python
#
# glidein_gdb.py
#
# Description:
# Execute a ls command on a condor job working directory
#
# Usage:
# glidein_gdb.py <cluster>.<process> <pid> [<command>] [-name <schedd_name>] [-pool <pool_name> ] [-timeout <nr secs>]
#
# Supported gdb commands:
# watch (default)
#
# Author:
# Igor Sfiligoi... | Python | 0.999999 | @@ -269,20 +269,20 @@
ds:%0A# w
-atch
+here
(defaul
@@ -646,28 +646,28 @@
gdb_cmd=%22w
-atch
+here
%22%0A if len
@@ -698,20 +698,20 @@
v%5B1%5D==%22w
-atch
+here
%22:%0A
@@ -727,20 +727,20 @@
b_cmd=%22w
-atch
+here
%22%0A
@@ -820,12 +820,12 @@
ly w
-atch
+here
sup
|
27e263d2b0cebebc374553a99006dc7b2766de44 | Correct copyright date. | simplefix/data.py | simplefix/data.py | # -*- python -*-
########################################################################
# SimpleFIX
# Copyright (C) 2016-2017, David Arnold.
#
# 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 Softwar... | Python | 0.00001 | @@ -115,13 +115,8 @@
(C)
-2016-
2017
|
59533cc8fb516429ef1cf4f9b930a75e5ece336e | Add Lady Liadrin's Reinforce to Justicar Trueheart's map | fireplace/cards/tgt/neutral_legendary.py | fireplace/cards/tgt/neutral_legendary.py | from ..utils import *
##
# Minions
# Confessor Paletress
class AT_018:
inspire = Summon(CONTROLLER, RandomMinion(rarity=Rarity.LEGENDARY))
# Skycap'n Kragg
class AT_070:
cost_mod = -Count(FRIENDLY_MINIONS + PIRATE)
# Gormok the Impaler
class AT_122:
play = (Count(FRIENDLY_MINIONS) >= 4) & Hit(TARGET, 4)
# C... | Python | 0 | @@ -1169,24 +1169,57 @@
2_PALADIN%22,%0A
+%09%09%22CS2_101_H%22: %22AT_132_PALADIN%22,%0A
%09%09%22CS1h_001%22
|
a030e92b46acf27c05500ed2cb47b2cece4e87ac | Work around selenium Edge driver bug | test/selenium/selenium-base.py | test/selenium/selenium-base.py | #!/usr/bin/python3
# we need to be able to find and import seleniumlib, so add this directory
from testlib_avocado.seleniumlib import SeleniumTest, clickable
import os
import sys
machine_test_dir = os.path.dirname(os.path.abspath(__file__))
if machine_test_dir not in sys.path:
sys.path.insert(1, machine_test_dir)
... | Python | 0 | @@ -1169,12 +1169,22 @@
xt(%22
-udev
+cockpit.socket
%22)%0A
@@ -1347,14 +1347,13 @@
xt(%22
-reboot
+basic
.tar
@@ -1490,19 +1490,21 @@
t_text(%22
-ssh
+audit
d%22)%0A
|
94950494dcf861913c7a624c16c2962f88cf44e6 | test plugin update function | tests/test_api_plugins.py | tests/test_api_plugins.py | import os
from vent.api.plugins import Plugin
from vent.api.templates import Template
def test_add():
""" Test the add function """
instance = Plugin()
status = instance.add('https://github.com/cyberreboot/vent', build=False)
assert status[0] == True
status = instance.add('https://github.com/cyber... | Python | 0 | @@ -4269,20 +4269,195 @@
e(tools%5B1%5D) == list%0A
+%0Adef test_update():%0A %22%22%22 Test the update function %22%22%22%0A instance = Plugin()%0A status = instance.update()%0A assert type(status) == tuple%0A assert status%5B0%5D == False%0A
|
61e280ea32718443895af7619dd750e959ddd629 | Add a complementary test for givers and zero | tests/test_communities.py | tests/test_communities.py | from __future__ import absolute_import, division, print_function, unicode_literals
from gittip.testing import Harness
class Tests(Harness):
def setUp(self):
Harness.setUp(self)
self.client.website.NMEMBERS_THRESHOLD = 1
# Alice joins a community.
self.alice = self.make_participa... | Python | 0 | @@ -1132,32 +1132,445 @@
b' not in html%0A%0A
+ def test_givers_dont_show_up_if_they_give_zero(self):%0A%0A # Alice tips bob.%0A self.make_participant(%22bob%22, claimed_time='now')%0A self.alice.set_tip_to('bob', '1.00')%0A self.alice.set_tip_to('bob', '0.00')%0A%0A html = self.c... |
cc8229db3bade779fc15c2307ecaf1a637ac0149 | Add parentheses to clarify precedence. | tests/test_data.py | tests/test_data.py | #!/usr/bin/env python3
import csv
import glob
import os
import pandas
import pytest
import re
import unittest
columns = ['candidate', 'county', 'district', 'office', 'votes']
@pytest.mark.parametrize("year,date,election_type", [
("2014", "0603", "primary"),
("2014", "1104", "general"),
("2015", "0317",... | Python | 0.000013 | @@ -3135,16 +3135,17 @@
tent %7C=
+(
re.searc
@@ -3171,16 +3171,17 @@
not None
+)
%0A%0A
|
f254cddb52bf58d4cd89ac6fa5c516ce683890aa | Updated the description | tests/test_gem_indexer.py | tests/test_gem_indexer.py | """
.. Copyright 2017 EMBL-European Bioinformatics Institute
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 applic... | Python | 0.999999 | @@ -826,11 +826,11 @@
the
-BWA
+GEM
ind
|
10308f01f05d26a898bca4a334fdc1c9b7e35e0f | modify relationship test | tests/test_data.py | tests/test_data.py | import numpy as np
def min_max(data, meta, dataname):
"""
Test for ensuring all variables are within their logical minimum and
maximum
"""
for var in meta.keys():
availability = meta[var]['availability']
min_value = meta[var]['range']['min']
max_value = meta[var]['range']['... | Python | 0.000001 | @@ -939,16 +939,279 @@
ariables
+.%0A%0A Note: we have weakened the n24 %3C= nu18 assertion for the PUF because%0A the only way to ensure it held true would be to create extreamly small%0A bins during the tax unit matching process, which had the potential to%0A reduce the overall match accuracy.
%0A %2... |
93354f88e5c778678d008b91f39410b31af75c3d | Fix doc test in travis | tests/test_docs.py | tests/test_docs.py | """
Documentation testing
Based on:
https://github.com/cprogrammer1994/ModernGL/blob/master/tests/test_documentation.py
by Szabolcs Dombi
"""
import inspect
import os
import re
import unittest
from demosys.test import DemosysTestCase
import demosys
from demosys import effects, opengl
# Modules we want to remove from... | Python | 0.000001 | @@ -191,48 +191,73 @@
est%0A
-from demosys.test import DemosysTestCase
+%0Aos.environ%5B'DEMOSYS_SETTINGS_MODULE'%5D = 'tests.settings' # noqa
%0A%0Aim
|
7038462953b3261b56b3f5728872ca50b2b7fe08 | Add an option to yield results in thread_multi | src/utils.py | src/utils.py | import os
from concurrent.futures import ThreadPoolExecutor, as_completed
from datetime import datetime
from typing import List, Any
from funcy import contextmanager
from steem import Steem
from steemdata.helpers import simple_cache, create_cache
from steemdata.markets import Markets
usernames_cache = create_cache()
... | Python | 0 | @@ -125,16 +125,23 @@
ist, Any
+, Union
%0A%0Afrom f
@@ -3003,16 +3003,27 @@
s: List%5B
+Union%5BAny,
List%5BAny
@@ -3024,16 +3024,17 @@
st%5BAny%5D%5D
+%5D
,%0A
@@ -3074,16 +3074,45 @@
kers=100
+,%0A yield_results=False
):%0A %22
@@ -3166,102 +3166,441 @@
ly.%0A
+%0A
-The functions are ... |
219e0fed56f91954e2132b68d0e606f0d2825060 | Remove unnecessary print in test_missingnode | tests/test_missingnode.py | tests/test_missingnode.py | from disco.test import DiscoJobTestFixture, DiscoTestCase
def unique_nodename(nodenames, count=0):
nodename = 'missingnode_%s' % count
if nodename not in nodenames:
return nodename
return unique_nodename(nodenames, count + 1)
class MissingNodeTestCase(DiscoJobTestFixture, Disco... | Python | 0.000004 | @@ -372,58 +372,8 @@
f):%0A
- print range(self.num_workers * 2)%0A
|
dac2a76051271c52bf9c12874f8345eb0e1c3937 | purge test jobs after requesting them | tests/test_jobq.py | tests/test_jobq.py | """
Test JobQ
"""
from hstestcase import HSTestCase
class JobqTest(HSTestCase):
def test_basic(self):
#authpos(JOBQ_PUSH_URL, data="", expect=400)
spider1 = self.project.jobq.push('spidey')
spider2 = self.project.jobq.push(spider='spidey')
spider3 = self.project.jobq.push(spider='... | Python | 0 | @@ -639,16 +639,17 @@
s) %3C= 8
+
# 8 are
@@ -658,16 +658,16 @@
quested%0A
-
@@ -864,32 +864,33 @@
spider1%5B'key'%5D%5D%0A
+%0A
# only c
@@ -1403,16 +1403,122 @@
tarted()
+%0A job3 = self.hsclient.get_job(spider3%5B'key'%5D)%0A job4 = self.hsclient.get_job(spider4%5B'key'%5D)
... |
59926b4a2d37e6232d8cd2bce3f289dcb484e63d | Fix the test_wish_modules_all to use pip, an actually imported module always present. | tests/test_pytest_wish.py | tests/test_pytest_wish.py | # -*- coding: utf-8 -*-
import pytest_wish
TEST_FACTORIAL_PY = '''
def test_factorial(wish):
factorial = wish
assert factorial(0) == 1
assert factorial(1) == 1
assert factorial(21) == 51090942171709440000
'''
TEST_FACTORIAL_TXT = '''
# test
math:fabs # comment
math:factorial
math:dummy
dummy:dummy
'... | Python | 0 | @@ -2012,20 +2012,30 @@
ncludes=
-math
+pip.exceptions
',%0A
@@ -2112,71 +2112,29 @@
ial*
-math:fabs*xfail',%0A '*test_factorial*math:factorial*XPASS
+pip.exceptions:*xfail
',%0A
|
6cc9011d5523548ed913796ab4b0627b910b6b58 | Fix deprecation warnings | tests/test_simple_eval.py | tests/test_simple_eval.py | import unittest
import simple_eval
class TestTokenizer(unittest.TestCase):
def case(self, input, output):
self.assertEqual(list(simple_eval.tokenize(input,
simple_eval.BOOL_SYNTAX, simple_eval.WHITESPACE)),
output)
def test_chars(self):
self.case("foo", [(0, "foo")])
... | Python | 0.00011 | @@ -2497,33 +2497,32 @@
ssertRaisesRegex
-p
(ValueError, %22In
@@ -2669,17 +2669,16 @@
sesRegex
-p
(ValueEr
|
031e408310002aed1cbc098466c5141277c25a39 | Fix plot massacre | lcapy/plot.py | lcapy/plot.py | """
This module performs plotting using matplotlib.
Copyright 2014--2017 Michael Hayes, UCECE
"""
import numpy as np
from matplotlib.pyplot import figure
# Perhaps add Formatter classes that will produce the plot data?
def plot_pole_zero(obj, **kwargs):
poles = obj.poles()
zeros = obj.zeros()
try:
... | Python | 0.999359 | @@ -2085,35 +2085,30 @@
if
-not
obj.is_
-positive
+complex
:%0A
@@ -2577,32 +2577,57 @@
1, f, **kwargs)%0A
+ ax2 = ax.twinx()%0A
kwargs%5B'
@@ -3228,35 +3228,36 @@
(False,
-Tru
+Fals
e) : ax.plot%7D%0A
@@ -3384,16 +3384,15 @@
ts%5B(
-Tru
+Fals
e,
-x.
log_
|
70fb77dd35fd647e0c4fc8b8c8ef5b30fc099476 | update tests | tests/test_misc.py | tests/test_misc.py | # -*- coding: utf-8 -*-
import os
wd = os.path.dirname(__file__)
def test_build_dictionary():
from ddf_utils.chef.api import Chef
from ddf_utils.chef.helpers import build_dictionary
d = {'China': 'chn', 'USA': 'usa'}
c = Chef()
assert build_dictionary(c, d) == d
d2 = {
"imr_median... | Python | 0.000001 | @@ -950,17 +950,17 @@
1 - t0,
-5
+3
, 1) #
@@ -977,12 +977,8 @@
1.5
-+ 2
=
-5
+3
%0A
|
1f245bdc5b24a1649f58e0d4c7b92d78dd145c96 | Remove unused imports | tests/tests_functional.py | tests/tests_functional.py | # coding=utf-8
import os
import unittest
from faker import Factory
from facturapdf import InvoiceGenerator, DefaultStrategy
from tests.helper import get_output_folder, get_initios_logo_path
from os.path import isdir, isfile, splitext
from facturapdf.dtos import Customer, Metadata, Data
import locale
locale.setlocale(... | Python | 0.000001 | @@ -103,25 +103,8 @@
ator
-, DefaultStrategy
%0Afro
|
fef751b569d741d6f6d4ca78db208aaf5f835046 | Test case for checking isolation under crashes | tests/test_rdfa.py | tests/test_rdfa.py | # -*- coding: utf-8 -*-
import json
from pprint import pformat
import unittest
from extruct.rdfa import RDFaExtractor
from tests import get_testdata
def tupleize(d):
if isinstance(d, list):
return sorted(tupleize(e) for e in d)
if isinstance(d, dict):
return sorted((k, tupleize(v)) for k, v in... | Python | 0 | @@ -2966,32 +2966,446 @@
ata, expected)%0A%0A
+ # This is for testing that the fix to issue 116 does not affect%0A # severely rdfa output even in a presence of a bug in the code%0A def mocked_fix_order(x, y, z):%0A raise Exception()%0A%0A rdfae._fix_order = mo... |
bad5210c6881953dca8fcc3ce034437fe3e998ef | bump Deployment's chcek_expected_status max_wait argument from 180 to 300 | tests/MenderAPI/deployments.py | tests/MenderAPI/deployments.py | #!/usr/bin/python
# Copyright 2016 Mender Software AS
#
# 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... | Python | 0 | @@ -3812,10 +3812,10 @@
ait=
-18
+30
0, p
|
d0821037130bdd7ba233ed3f72b7db41e0b5844d | Stop autosaving on focus | statusbar.py | statusbar.py | import re
import sublime
import sublime_plugin
from git import GitTextCommand
class GitBranchStatusListener(sublime_plugin.EventListener):
def on_activated(self, view):
view.run_command("git_branch_status")
def on_post_save(self, view):
view.run_command("git_branch_status")
class GitBranch... | Python | 0 | @@ -567,32 +567,46 @@
how_status=False
+, no_save=True
)%0A else:%0A
@@ -794,16 +794,30 @@
us=False
+, no_save=True
)%0A
|
ad915e0482ad004691196d0614540b747eb3cff8 | Fix serializer poi type mobile | geotrek/api/mobile/serializers/common.py | geotrek/api/mobile/serializers/common.py | import os
from django.conf import settings
from drf_dynamic_fields import DynamicFieldsMixin
from rest_framework import serializers
from geotrek.common import models as common_models
from geotrek.flatpages import models as flatpage_models
from geotrek.trekking import models as trekking_models
if 'geotrek.zoning' in... | Python | 0.000001 | @@ -6815,32 +6815,89 @@
delSerializer):%0A
+ name = serializers.ReadOnlyField(source='label')%0A
pictogra
@@ -7332,21 +7332,20 @@
('id', '
-label
+name
', 'pict
|
b33fde31d789c389f5f1e89f567797fc89cd1b68 | add comment support | src/ovirtcli/shell/engineshell.py | src/ovirtcli/shell/engineshell.py | #
# Copyright (c) 2010 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | Python | 0 | @@ -3229,32 +3229,70 @@
necmd(self, s):%0A
+ if not s.startswith('#'):%0A
return c
|
57151faa40af3c545e6557bd22de9a80a0d3e49c | Add sqlite url test | tests/test_urls.py | tests/test_urls.py | from unittest import TestCase
from cbs.urls import parse_dburl
class TestUrlParse(TestCase):
def test_simple(self):
result = parse_dburl(
"postgres://user:password@hostname:1234/dbname?conn_max_age=15&local_option=test"
)
self.assertEqual(
result,
{
... | Python | 0.000002 | @@ -687,16 +687,215 @@
%7D,%0A )%0A
+%0A def test_sqlite(self):%0A result = parse_dburl(%22sqlite:///db.sqlite%22)%0A%0A self.assertEqual(%0A result, %7B%22ENGINE%22: %22django.db.backends.sqlite3%22, %22NAME%22: %22db.sqlite%22%7D%0A )%0A
|
066281d2e0f571484392dde3ad5ce6372cf1dc55 | test illegal id | tests/test_user.py | tests/test_user.py | #!/usr/bin/env python3
import pytest
import os
import sys
from pprint import pprint
sys.path.append(os.path.join(os.path.dirname(__file__), "../lib"))
import dartsense.user
def test_user_init():
user = dartsense.user.User()
assert isinstance(user, dartsense.user.User)
assert hasattr(user, 'id')
... | Python | 0.000011 | @@ -337,16 +337,79 @@
= None%0A%0A
+ assert hasattr(user, 'name')%0A assert user.name == None%0A%0A
asse
@@ -444,16 +444,16 @@
sions')%0A
-
asse
@@ -665,16 +665,223 @@
p_vars)%0A
+ user = dartsense.user.User(id=-1)%0A assert isinstance(user, dartsense.user.User)%0A assert hasattr(user, 'id')... |
97c669551174da9324e60c63e6766b14a7892c4f | Add test for is_git_ancestor | tests/test_util.py | tests/test_util.py | import docker
import pytest
from dockci.util import client_kwargs_from_config
class TestClientKwargsFromConfig(object):
""" Tests for ``dockci.util.client_kwargs_from_config`` """
@pytest.mark.parametrize('host_str,expected,expected_tls_dict', (
('https://localhost', {'base_url': 'https://localhost'}... | Python | 0.000447 | @@ -1,12 +1,31 @@
+import subprocess%0A%0A
import docke
@@ -90,16 +90,33 @@
m_config
+, is_git_ancestor
%0A%0A%0Aclass
@@ -4031,8 +4031,1232 @@
== None%0A
+%0A%0Aclass TestGitAncestor(object):%0A %22%22%22 Tests the is_git_ancestor utility %22%22%22%0A def test_two_commits(self, tmpdir):%0A %22%22%22%0... |
b726d78c60577fed310fb679d96faee23cf4ba93 | Fix bytes to str conversion in tests | tests/views/test_tasks.py | tests/views/test_tasks.py | import json
import time
from celery.events import Event
from flower.events import EventsState
from tests import AsyncHTTPTestCase
from tests.utils import task_succeeded_events, task_failed_events
class TaskTest(AsyncHTTPTestCase):
def test_unknown_task(self):
r = self.get('/task/unknown')
self.a... | Python | 0.000001 | @@ -1615,34 +1615,45 @@
json.loads(
-str(
r.body
+.decode(%22utf-8%22
))%0A s
@@ -2895,26 +2895,37 @@
n.loads(
-str(
r.body
+.decode(%22utf-8%22
))%0A
|
acd749504087d1c7fe527ab78b044827b7d9e3a7 | Make ast generation tools silent when BUILDFARM is set. | dev/tools.py | dev/tools.py | ## ----------------------------------------------------------------------------
## Tools for python generators
## ----------------------------------------------------------------------------
import string, re, sys
import os, stat, filecmp, shutil
## Display a warning.
def warning (msg):
print >>sys.stderr, "Warning... | Python | 0 | @@ -618,16 +618,63 @@
, new):%0A
+ verbose = os.getenv(key='BUILDFARM') is None%0A
if not
@@ -696,16 +696,34 @@
(old):%0A
+ if verbose:%0A
prin
@@ -762,32 +762,50 @@
move (new, old)%0A
+ if verbose:%0A
os.system(%22d
@@ -866,16 +866,34 @@
, new):%0A
+ if verbose:%0A
prin
@@ -1103,... |
0882819f6e961672b6cdb6a4e07cc1f5a40381e8 | update docs | suarm/cli.py | suarm/cli.py | # -*- coding: utf-8 -*-
from .cluster import *
@click.group(chain=True)
@click.option('--config', '-f', type=click.Path(), help='Config file "swarm.json"')
def main():
click.echo("\nStarting...")
@main.command('node')
@click.option('--resize', '-r', is_flag=True, help='Upgrade plan of a node')
@click.option('--d... | Python | 0.000001 | @@ -159,16 +159,22 @@
ef main(
+config
):%0A c
|
a62a009b71584d90712f9ceccc998ba6782e6301 | Use pull instead of up in GitClone | enrique/package.py | enrique/package.py | import os
from urlparse import urlparse
import requests
from plumbum.cmd import git, tar
ENRIQUE_DIR = os.path.expanduser("~/.mesos-magellan/enrique")
os.makedirs(ENRIQUE_DIR)
PACKAGES_DIR = os.path.join(ENRIQUE_DIR, "packages")
os.makedirs(PACKAGES_DIR)
def get_problem_path(name, url):
package_cls = Package.g... | Python | 0 | @@ -3009,10 +3009,12 @@
me%7D
-u
p
+ull
%22)%0A
|
29b1f31a2622f749df83c3072c4cbb22615bff95 | Fix tests | spotdl/lyrics/providers/genius.py | spotdl/lyrics/providers/genius.py | from bs4 import BeautifulSoup
import urllib.request
import json
from spotdl.lyrics.lyric_base import LyricBase
from spotdl.lyrics.exceptions import LyricsNotFoundError
import logging
logger = logging.getLogger(__name__)
BASE_URL = "https://genius.com"
BASE_SEARCH_URL = BASE_URL + "/api/search/multi?per_page=1&q="
#... | Python | 0.000003 | @@ -4597,24 +4597,32 @@
l, linesep,
+timeout=
timeout)%0A%0A
|
ff09e7e3ca38a66079f4648623c9921f66f3661d | set `__defaults__` to `None` when there are no defaults | agoraplex/annotation/__init__.py | agoraplex/annotation/__init__.py | # agoraplex.annotation
from backports import inspect
empty = inspect.Signature.empty
def returns (annotation):
"""
Decorator to add ``annotation`` to ``func``'s ``return``
annotation, as though it were a Python 3 ``-> ...`` annotation.
>>> from agoraplex.annotation import returns
>>> @retu... | Python | 0 | @@ -3332,31 +3332,24 @@
-func.__
defaults
__ = tup
@@ -3340,18 +3340,16 @@
defaults
-__
= tuple
@@ -3355,24 +3355,16 @@
e((d%5B1%5D%0A
-
@@ -3438,32 +3438,24 @@
-
if len(d) %3E
@@ -3457,16 +3457,202 @@
d) %3E 1))
+%0A # use %60%60None%60%60 if there ... |
1d3d83d1555c2be640e186352e7915035fe34dec | Fix formatting | byceps/blueprints/user_admin/views.py | byceps/blueprints/user_admin/views.py | """
byceps.blueprints.user_admin.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from collections import defaultdict
from flask import abort, request
from ...services.authorization import service as authorization_service
from .... | Python | 0.057169 | @@ -1730,17 +1730,16 @@
d_filter
-
)%0A%0A u
|
20da93bb737a1148405c5e24bbff3fd6575f2152 | change host for hostname | dbaas_zabbix/metrics.py | dbaas_zabbix/metrics.py | from collections import OrderedDict
from dbaas_zabbix.errors import ZabbixApiKeyNotFoundError, ZabbixApiNoDataBetweenTimeError
KEY_DISK_SIZE_DATA = 'hrStorageSizeInBytes[/data]'
KEY_DISK_USED_DATA = 'hrStorageUsedInBytes[/data]'
class ZabbixMetrics(object):
def __init__(self, zappix_api, group):
self.ap... | Python | 0.000009 | @@ -385,25 +385,24 @@
f, key, host
-_
name):%0A
@@ -587,17 +587,16 @@
t': host
-_
name, 's
@@ -956,24 +956,28 @@
, keys, host
+name
):%0A i
@@ -1074,21 +1074,16 @@
ms(key,
-host.
hostname
@@ -1158,29 +1158,24 @@
dError(host=
-host.
hostname, ke
@@ -1553,13 +1553,8 @@
ost=
-host.
host
@@ -1920,2... |
fa0c048f37b30ec591c370defdb8f72e59022de9 | make python test runner produces similar output than catch | app/clingo/tests/run.py | app/clingo/tests/run.py | #!/usr/bin/python
import os
import os.path
import sys
import subprocess as sp
import difflib as dl
import argparse
parser = argparse.ArgumentParser(description="""
Can be used to run and normalize tests.
Additional options can be passed to clingo by adding them at the end of the command line preceded by '--'.
""")
pa... | Python | 0.022823 | @@ -3964,108 +3964,8 @@
3%5D)%0A
- print (%22-%22 * 79)%0A print (b + %22.lp%22)%0A print (%22.%22 * 79)%0A
@@ -4541,19 +4541,8 @@
rint
- (%22failed%22)
%0A
@@ -4558,33 +4558,33 @@
print (%22
-!
+-
%22 * 79)%0A
@@ -4650,17 +4650,17 @@
t (%22
-!... |
863515a72aaf4c881240f47c1fda8129b9b6d96d | add songs to the **end** of the queue... | spotipi/sandbox/requesthandler.py | spotipi/sandbox/requesthandler.py | from collections import deque
from ConfigParser import SafeConfigParser
import threading
from flask import Flask, request, render_template
import spotify
config = SafeConfigParser()
config.read("spotipi.cfg")
app = Flask(__name__)
app.debug = True
song_queue = deque()
session = spotify.Session()
loop = spotify.Ev... | Python | 0 | @@ -1469,16 +1469,20 @@
e.append
+left
(link)%0A
|
d7cb42a9a630a94a1707223b8eb84d8e7fca4a72 | update dependencies to include Cython 0.17 | dipy/info.py | dipy/info.py | """ This file contains defines parameters for dipy that we use to fill
settings in setup.py, the dipy top-level docstring, and for building the
docs. In setup.py in particular, we exec this file, so it cannot import dipy
"""
# dipy version information. An empty _version_extra corresponds to a
# full release. '.dev'... | Python | 0 | @@ -2536,9 +2536,9 @@
='1.
-2
+3
'%0ASC
@@ -2560,20 +2560,12 @@
='0.
-6' # Guessed
+7.2'
%0ACYT
@@ -2584,17 +2584,17 @@
ION='0.1
-3
+7
'%0ANIBABE
|
94695827c8f70e305021a25d2d02a5b1b7241957 | Fix returning `None` if badge ID is unknown | byceps/services/user_badge/service.py | byceps/services/user_badge/service.py | """
byceps.services.user_badge.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from collections import defaultdict
from ...database import db
from .models import Badge, BadgeAwarding
def create_badge(label, image_filename, ... | Python | 0.002642 | @@ -694,24 +694,67 @@
(badge_id)%0A%0A
+ if badge is None:%0A return None%0A%0A
return b
|
17e4141703e8b9d2975e8c7de37729aef8905751 | fix test_playlist.test_title | tests/contrib/test_playlist.py | tests/contrib/test_playlist.py | # -*- coding: utf-8 -*-
from unittest import mock
from unittest.mock import MagicMock
from pytube import Playlist
@mock.patch("request.get")
def test_title(request_get):
request_get.return_value = ""
list_key = "PLsyeobzWxl7poL9JTVyndKe62ieoN-MZ3"
url = "https://www.fakeurl.com/playlist?list=" + list_key... | Python | 0.000529 | @@ -46,44 +46,8 @@
mock
-%0Afrom unittest.mock import MagicMock
%0A%0Afr
@@ -87,16 +87,40 @@
.patch(%22
+pytube.contrib.playlist.
request.
@@ -190,60 +190,93 @@
= %22
-%22%0A list_key = %22PLsyeobzWxl7poL9JTVyndKe62ieoN-MZ3
+%3Ctitle%3E(149) Python Tutorial for Beginners (For Absolute Beginners) - YouTube%3C/t... |
821a616c1935b6265c3dd1fcc7563665c92aed94 | Move this line up, to sync with the way the JSON handler does it. | appengine/handlers/atom.py | appengine/handlers/atom.py | import datetime
import pickle
import re
import time
from xml.etree import ElementTree
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util
from models import CHPIncident
from utils import conditional_http
class AtomHandler(webapp.RequestHandler):
def get(self):
center = self.reque... | Python | 0 | @@ -465,16 +465,57 @@
oads%22)%0A%0A
+%09%09last_mod = datetime.datetime.utcnow()%0A%0A
%09%09incide
@@ -754,48 +754,8 @@
a)%0A%0A
-%09%09last_mod = datetime.datetime.utcnow()%0A
%09%09if
|
fbbd5a7d28cdda0f38e01822b904e24d6b4f232e | Update main.py | aidu_user_management/src/main.py | aidu_user_management/src/main.py | #!/usr/bin/env python
__author__ = 'Rolf Jagerman'
import roslib; roslib.load_manifest('aidu_user_management')
import rospy
from aidu_user_management.srv import Authenticate, AuthenticateResponse
from aidu_user_management.msg import User, Authentication
authenticate_service = None
authentication_publisher = None
de... | Python | 0 | @@ -488,31 +488,24 @@
== '
-670056546044310CA932A80
+campus-card-code
':%0A
@@ -559,25 +559,29 @@
d, '
-Robert', 'Peuchen
+Firstname', 'Lastname
', %5B
@@ -584,24 +584,25 @@
', %5B1%5D)%0A
+#
if req.id ==
@@ -607,167 +607,32 @@
== '
-670047480047453BA202A80':%0A success = True%0A user = User(r... |
fba6eecfa751408d6cbd58806fd803f3885c7d71 | add a user limit field to coupon with default of 1 like before | coupons/models.py | coupons/models.py | import random
from django.conf import settings
from django.db import IntegrityError
from django.db import models
from django.dispatch import Signal
from django.utils.encoding import python_2_unicode_compatible
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from .settings imp... | Python | 0 | @@ -2318,24 +2318,98 @@
upon to.%22))%0A
+ users_limit = models.PositiveIntegerField(_(%22User limit%22), default=1)%0A
created_
|
ac0207e5699301d66ac9a59c6e29a61f09fed358 | Improve thumbnail utils | zou/app/utils/thumbnail.py | zou/app/utils/thumbnail.py | import os
import shutil
import math
from zou.app.utils import fs
from PIL import Image
Image.MAX_IMAGE_PIXELS = 20000 * 20000
RECTANGLE_SIZE = 150, 100
SQUARE_SIZE = 100, 100
PREVIEW_SIZE = 1200, 0
BIG_SQUARE_SIZE = 400, 400
def save_file(tmp_folder, instance_id, file_to_save):
"""
Save file in given folde... | Python | 0 | @@ -1846,25 +1846,24 @@
ght) = size%0A
-%0A
if h
@@ -1937,106 +1937,437 @@
- else:%0A im = prepare_image_for_thumbnail(im
+else:%0A size = im.size%0A%0A im.thumbnail(size, Image.LANCZOS)%0A if im.mode == %22CMYK%22:%0A im = im.convert(%22RGB%22)%0A final = Image.new(... |
6a6682c15324efe5cc617d619f8af1275f32770a | update with ssl | databricks/databricks-jobs.py | databricks/databricks-jobs.py | import sys
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
import json
# REMOVE WHEN SSL IS ENABLED
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
INSTANCE_ID = sys.argv[1]
JOB_NAME = sys.argv[2]
API_VERSION = '/api/2.1'
print("----------RUNNING JOB " + JOB... | Python | 0 | @@ -109,105 +109,8 @@
on%0A%0A
-# REMOVE WHEN SSL IS ENABLED%0Arequests.packages.urllib3.disable_warnings(InsecureRequestWarning)%0A%0A
INST
@@ -266,16 +266,74 @@
d param%0A
+# /jobs/list/ with api 2.0 returns all jobs, 2.1 does not%0A
def getR
@@ -634,62 +634,8 @@
ms,%0A
- verify = False #Needed because we d... |
0c27d4ab049b436b1bd54d09ca457c64c1b9e3f1 | add dynamic cache expiration time | htdocs/json/nwstext_search.py | htdocs/json/nwstext_search.py | #!/usr/bin/env python
"""
Search for NWS Text, return JSON
"""
import memcache
import cgi
import sys
import datetime
import pytz
import json
def run(sts, ets, awipsid):
""" Actually do some work! """
import psycopg2
dbconn = psycopg2.connect(database='afos', host='iemdb', user='nobody')
cursor = ... | Python | 0 | @@ -1598,32 +1598,187 @@
imezone(%22UTC%22))%0A
+ now = datetime.datetime.utcnow()%0A now = now.replace(tzinfo=pytz.timezone(%22UTC%22))%0A cacheexpire = 0 if ets %3C now else 120%0A %0A
res = ru
@@ -1823,16 +1823,29 @@
key, res
+, cacheexpire
)%0A%0A i
|
4f6247db91bf9fbe54ec9fb9c8dc466a5805fe3f | Return UserProjects object from restrict_projects() | akvo/rsr/models/user_projects.py | akvo/rsr/models/user_projects.py | # -*- coding: utf-8 -*-
# Akvo RSR is covered by the GNU Affero General Public License.
# See more details in the license.txt file located at the root folder of the Akvo RSR module.
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.
from django.db import models
from djan... | Python | 0.000011 | @@ -1522,24 +1522,50 @@
e(project)%0A%0A
+ return user_projects%0A%0A
%0Adef unrestr
@@ -1876,16 +1876,42 @@
oject)%0A%0A
+ return user_projects%0A%0A
%0Adef che
|
71df41f93eaf80279ab32c865096269739918d66 | update to keep additional track record | Doga/statistics.py | Doga/statistics.py | # -*- coding: utf-8 -*-
"""
Doga.statistics
This module manage information about log statistics
Shows data summary periodically in each 10 seconds
"""
import time
import threading
from thread_timer import ThreadTimer
#class ThreadTimer(threading.Thread):
#
# def __init__(self, event, callback):
# thread... | Python | 0 | @@ -151,20 +151,8 @@
%22%22%0A%0A
-import time%0A
impo
@@ -168,329 +168,77 @@
ing%0A
-%0A
from
-thread_timer import ThreadTimer%0A%0A%0A#class ThreadTimer(threading.Thread):%0A#%0A# def __init__(self, event, callback):%0A# threading.Thread.__init__(self)%0A# self.stopped = event%0A#%0A# sel... |
33987bc77b596ef910c3f6f08b3e6177c675f6c7 | add image shrinker to movie maker | zplib/image/write_movie.py | zplib/image/write_movie.py | import numpy
import freeimage
from . import ffmpeg
from . import colorize
def write_movie(image_generator, output_file, framerate=15):
"""Write a movie from images.
Parameters:
image_generator: a generator that will produce images for movie frames.
output_file: filename to write movie file. ... | Python | 0.000009 | @@ -68,16 +68,38 @@
colorize
+%0Afrom . import pyramid
%0A%0Adef wr
@@ -2217,16 +2217,394 @@
rate=10)
+%0A%0A 4) Downsample (shrink) images to make a smaller movie:%0A image_dir = pathlib.Path('/path/to/images')%0A image_files = sorted(image_dir.glob('*.png'))%0A image_generat... |
85537b6bee3efdd1862726a7e68bd79f693ecd4f | Make still class available when decorating class with @page | tornado_menumaker/helper/Page.py | tornado_menumaker/helper/Page.py | #!/usr/bin/python
# -*- encoding: utf-8 -*-
"""
"""
import inspect
from tornado.web import Application
from .Route import Route
from .Index import IndexRoute
__author__ = 'Martin Martimeo <martin@martimeo.de>'
__date__ = '16.06.13 - 23:46'
class Page(Route):
"""
A Page
"""
def __init__(self, u... | Python | 0 | @@ -1048,16 +1048,20 @@
urn self
+.cls
%0A
|
9f45b90abfb44cf96ae2d7e44d465a82aa66886e | fix ordering bug | FoodScan/ShopSync/Shops/kaufland.py | FoodScan/ShopSync/Shops/kaufland.py | # -*- coding: utf-8 -*-
import pickle
import time
import urlparse
from urllib2 import quote
from bs4 import BeautifulSoup
from pysimplelog import Logger
from requests import Session
from FoodScan.ShopSync.Shops.shop import Shop
from FoodScan.items import ShopItem
class Kaufland(Shop):
search_url_prefix = 'htt... | Python | 0 | @@ -5946,19 +5946,19 @@
sorted(
-fit
+ids
, key=fi
|
8d888d735b0a061f07e20531843e578aea97b770 | Make opp_player required | capstone/rl/utils/plot.py | capstone/rl/utils/plot.py | from __future__ import division
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter
from .callbacks import Callback
from ...game.players import GreedyQ, RandPlayer
from ...game.utils import play_series
class EpisodicWLDPlotter(Callback):
'''
Plot... | Python | 0.000003 | @@ -442,13 +442,8 @@
ayer
-=None
, n_
@@ -459,25 +459,8 @@
000,
-%0A
per
|
323a534d4204f9db4bd82dbce3b1c1124dc72fdc | switch to DOMAIN per margarita upgrade | traffic_stops/settings/deploy.py | traffic_stops/settings/deploy.py | # Settings for live deployed environments: vagrant, staging, production, etc
from .base import * # noqa
os.environ.setdefault('CACHE_HOST', '127.0.0.1:11211')
os.environ.setdefault('BROKER_HOST', '127.0.0.1:5672')
ENVIRONMENT = os.environ['ENVIRONMENT']
DEBUG = False
TEMPLATE_DEBUG = DEBUG
DATABASES['default']['NA... | Python | 0 | @@ -1926,16 +1926,17 @@
HOSTS =
+%5B
os.envir
@@ -1943,34 +1943,17 @@
on%5B'
-ALLOWED_HOSTS'%5D.split(';')
+DOMAIN'%5D%5D
%0A%0A#
|
d3223822cc349f1d31cb0c2018fa4121b9737c92 | Add scopefunc argument to BaseManager | src/pybel/manager/base_manager.py | src/pybel/manager/base_manager.py | # -*- coding: utf-8 -*-
"""This module contains the base class for connection managers in SQLAlchemy"""
import logging
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker, scoped_session
from .models import Base
from ..constants import get_cache_connection, config
__all__ = [
'BaseMana... | Python | 0 | @@ -1212,19 +1212,52 @@
mit=None
+,%0A scopefunc=None
):%0A
-
@@ -1988,32 +1988,504 @@
configuration.%0A
+ :param scopefunc: Scoped function to pass to :func:%60sqlalchemy.orm.scoped_session%60%0A%0A%0A From the Flask-SQLAlchemy documentation:%0A%0A An extra key %60%60... |
7969af0e6713b2b30a4668a68233865aa44124b5 | Test should use mock doi | deposit/zenodo/tests.py | deposit/zenodo/tests.py | # -*- encoding: utf-8 -*-
# Dissemin: open access policy enforcement tool
# Copyright (C) 2014 Antonin Delpeuch
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License
# as published by the Free Software Foundation; either version 2
# of th... | Python | 0.00001 | @@ -4254,16 +4254,57 @@
ssage)%0A%0A
+ @pytest.mark.usefixtures('mock_doi')%0A
def
|
de9e48174f921a84408d9fb0d48e59a7d0693336 | Change unnecessary Sonos coroutine to callback (#60643) | homeassistant/components/sonos/number.py | homeassistant/components/sonos/number.py | """Entity representing a Sonos number control."""
from __future__ import annotations
from homeassistant.components.number import NumberEntity
from homeassistant.const import ENTITY_CATEGORY_CONFIG
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from .const import SONOS_CREATE_LEVELS
from .entity... | Python | 0 | @@ -191,16 +191,56 @@
_CONFIG%0A
+from homeassistant.core import callback%0A
from hom
@@ -609,29 +609,37 @@
ry.%22%22%22%0A%0A
-async
+@callback%0A
def _async_
|
3a705c47d90b42d65cae9104d6c15d118d4937fd | update comments | analyzer/darwin/lib/core/host.py | analyzer/darwin/lib/core/host.py | #!/usr/bin/env python
# Copyright (C) 2015 Dmitry Rodionov
# This file is part of my GSoC'15 project for Cuckoo Sandbox:
# http://www.cuckoosandbox.org
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
import socket
import datetime
from bson import ... | Python | 0 | @@ -1640,16 +1640,34 @@
nt)%3Ctime
+ (in milliseconds)
since a
@@ -4280,16 +4280,17 @@
ke 1 mil
+l
isecond)
|
93157800175722eb36ef1f8a920f0052f6c64495 | Update honeypot.py | honeypot/honeypot.py | honeypot/honeypot.py | from flask import Flask, jsonify, request
import os
import requests
from pprint import pprint
import json
if 'LOG_HOST' not in os.environ or 'LOG_PORT' not in os.environ:
raise(Exception("LOG_HOST OR LOG_PORT NOT DEFINED"))
POST_URL = "http://{host}:{port}/log".format(host=os.environ['LOG_HOST'],port=os.environ['... | Python | 0 | @@ -56,50 +56,39 @@
ort
-requests%0Afrom pprint import pprint
+logging%0Aimport logstash
%0Aimport
json
@@ -83,20 +83,19 @@
%0Aimport
-json
+sys
%0A%0Aif 'LO
@@ -105,40 +105,8 @@
OST'
- not in os.environ or 'LOG_PORT'
not
@@ -155,20 +155,8 @@
OST
-OR LOG_PORT
NOT
@@ -171,108 +171,205 @@
))%0A%0A
-POST_... |
c15bb272a9c4cf7e6387df32e8bef1fa715c3e98 | Fix rendering of code blocks from within reStructuredText. | trac/mimeview/rst.py | trac/mimeview/rst.py | # -*- coding: utf-8 -*-
#
# Copyright (C) 2004-2006 Edgewall Software
# Copyright (C) 2004 Oliver Rutherfurd
# 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://trac.edgewall.org/wi... | Python | 0.999925 | @@ -1168,16 +1168,27 @@
rocessor
+, Formatter
%0Afrom tr
@@ -5540,25 +5540,25 @@
ocessor(
-f
+F
ormatter
, langua
@@ -5549,16 +5549,25 @@
ormatter
+(context)
, langua
|
d2110e629ea38c6ed7bfffd87a771ec3177c0c75 | Bump version: 0.4.1 → 0.5.2 | time2relax/__version__.py | time2relax/__version__.py | __title__ = 'time2relax'
__description__ = 'A CouchDB driver for Python.'
__url__ = 'https://github.com/rwanyoike/time2relax'
__version__ = '0.4.1'
__author__ = 'Raymond Wanyoike'
__author_email__ = 'raymond.wanyoike@gmail.com'
__license__ = 'MIT'
__copyright__ = '2017 Raymond Wanyoike'
__couch__ = u'\u2728 \U0001f6cb ... | Python | 0 | @@ -140,11 +140,11 @@
'0.
-4.1
+5.2
'%0A__
|
1bb21659bada82180687075933e5d2e17a289553 | clear authorization token | trackhub/registry.py | trackhub/registry.py | #
# Author : Manuel Bernal Llinares
# Project : trackhub-creator
# Timestamp : 23-08-2017 14:40
# ---
# © 2017 Manuel Bernal Llinares <mbdebian@gmail.com>
# All rights reserved.
#
"""
This module models the trackhub registry
"""
import json
import requests
# App imports
import config_manager
import ensembl.ser... | Python | 0.000005 | @@ -4312,32 +4312,69 @@
e.status_code))%0A
+ self.__auth_token = None%0A
self
|
8a1cab9bc57a756222c1895b2f6fa4a27f4e03ac | Fix error handling for invalid duds. | debile/master/incoming_dud.py | debile/master/incoming_dud.py | # Copyright (c) 2012-2013 Paul Tagliamonte <paultag@debian.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, ... | Python | 0 | @@ -1597,18 +1597,16 @@
IP: Inva
-va
lid dud
@@ -1611,20 +1611,19 @@
d file %7B
-path
+tag
%7D%22.forma
|
4a36798e38703f890452c2c03b99e8abf00c8e0d | Add tornado and bokeh to get_versions (#1181) | distributed/versions.py | distributed/versions.py | """ utilities for package version introspection """
from __future__ import print_function, division, absolute_import
import platform
import struct
import os
import sys
import locale
import importlib
required_packages = [('dask', lambda p: p.__version__),
('distributed', lambda p: p.__version__)... | Python | 0 | @@ -453,32 +453,87 @@
p.__version__),%0A
+ ('tornado', lambda p: p.version),%0A
@@ -664,32 +664,201 @@
ndas', lambda p:
+ p.__version__),%0A ('bokeh', lambda p: p.__version__),%0A ('lz4', lambda p: p.__version__),%0A ('b... |
f56377a38fb553471ba7c20d17d0b9fa6c8fd141 | Fix race locking issue in noded | lib/jstore.py | lib/jstore.py | #
#
# Copyright (C) 2006, 2007 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distri... | Python | 0 | @@ -3608,16 +3608,201 @@
file%22)%0A%0A
+ if not must_lock:%0A # There's no need for more error handling. Closing the lock file below in%0A # case of an error will unlock it anyway.%0A queue_lock.Unlock()%0A%0A
except
|
1b3c81f513409e2a5bc42448e73d0400aa3e4611 | add missing values | cleverhans_tutorials/mnist_tutorial_pytorch.py | cleverhans_tutorials/mnist_tutorial_pytorch.py | """
This tutorial shows how to generate adversarial examples using FGSM
and train a model using adversarial training with TensorFlow.
It is very similar to mnist_tutorial_keras_tf.py, which does the same
thing but with a dependence on keras.
The original paper can be found at:
https://arxiv.org/abs/1412.6572
"""
from _... | Python | 0.019773 | @@ -953,16 +953,69 @@
.FLAGS%0A%0A
+NB_EPOCHS = 6%0ABATCH_SIZE = 128%0ALEARNING_RATE = .001%0A%0A
%0Aclass P
|
eefada10f8fa0ce5312595dbada4da8bbdf40423 | Fix imports for django 1.8 | django_babel/extract.py | django_babel/extract.py | # -*- coding: utf-8 -*-
from django.template import Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK
from django.utils.translation.trans_real import (
inline_re, block_re, endblock_re, plural_re, constant_re)
from django.utils.encoding import smart_text
def extract_django(fileobj, keywords, comment_tags, options):
"... | Python | 0.000009 | @@ -17,16 +17,25 @@
f-8 -*-%0A
+try:%0A
from dja
@@ -96,16 +96,159 @@
N_BLOCK%0A
+except ImportError:%0A # Django 1.8 moved most stuff to .base%0A from django.template.base import Lexer, TOKEN_TEXT, TOKEN_VAR, TOKEN_BLOCK%0A%0A
from dja
|
9cb47842067ecc9390228602215dc2fc54448c3c | Rename model_class -> model and get_query -> get_queryset, | djangular/views/crud.py | djangular/views/crud.py | # -*- coding: utf-8 -*-
import json
from django.core.exceptions import ValidationError
from django.core import serializers
from django.core.serializers.json import DjangoJSONEncoder
from django.forms.models import modelform_factory
from django.http import HttpResponse
from django.views.generic import FormView
class ... | Python | 0 | @@ -449,27 +449,25 @@
verride
+%60%60
model
-_class
+%60%60
with yo
@@ -698,22 +698,16 @@
model
-_class
= None%0A
@@ -1530,22 +1530,16 @@
lf.model
-_class
.DoesNot
@@ -1968,22 +1968,16 @@
om model
-_class
%0A
@@ -2024,22 +2024,16 @@
lf.model
-_class
)%0A%0A d
@@ -4123,38 +4123,32 @@
eturn se... |
f09a870a3246462f73096f0d95a13f770aabb599 | Move logging format to settings | delete_old_converts.py | delete_old_converts.py | import argparse
import logging
import os
from file_checks import get_files_in_folder, get_input_path
from settings import CONVERSIONS, EXPORT_PATH
logger = logging.getLogger(__name__)
def get_arg_parser():
"""
Return an argument parser for this script.
Does not include any subparsers.
Returns
-------
arg... | Python | 0.000001 | @@ -140,16 +140,32 @@
ORT_PATH
+, LOGGING_FORMAT
%0A%0A%0Alogge
@@ -1851,149 +1851,8 @@
)%0A%0A%0A
-yaml_fmt = '''%0A- file: %25(pathname)s%0A level: %25(levelname)s%0A line: %25(lineno)s%0A message: %7C%0A %25(message)s%0A time: %25(asctime)s%0A'''.strip()%0A%0A%0A
if '
@@ -1906,16 +1906,22 @@
mat=
-yaml_f... |
6d0a6f70ddf8ee23a53e6933445f11a736a13a3c | correct worker2 | demos/demo1/worker2.py | demos/demo1/worker2.py | # worker2.py
import datetime
import pyrax
import medareda_worker_lib
import os
class Worker2(object):
def __init__(self,in_table):
self.conn = medareda_worker_lib.get_conn()
self.in_table = in_table
self.server_id = self._getServerId()
self.setStatusIdle()
... | Python | 0.999141 | @@ -53,23 +53,16 @@
edareda_
-worker_
lib%0Aimpo
@@ -162,15 +162,8 @@
eda_
-worker_
lib.
@@ -1144,22 +1144,15 @@
#
-%C2%A0
+
set
-worker
stat
@@ -1351,20 +1351,21 @@
)%0A %0AtestWorker2()
+%0A
|
99c9dd4b255e5ab6e58fd23d6ac77a2d7dda792a | add same defaults and a root obj to GovObj | lib/models.py | lib/models.py | from peewee import *
from pprint import pprint
from time import time
import os
import sys
sys.path.append( os.path.join( os.path.dirname(__file__), '..' ) )
import config
import simplejson
import binascii
env = os.environ.get('SENTINEL_ENV') or 'production'
db_cfg = config.db[env]
dbname = db_cfg.pop('database')
db ... | Python | 0 | @@ -784,32 +784,41 @@
= IntegerField(
+default=0
)%0A object_cre
@@ -884,32 +884,43 @@
ash = CharField(
+default='0'
)%0A object_par
@@ -977,24 +977,35 @@
= CharField(
+default='0'
)%0A object
@@ -1021,24 +1021,33 @@
ntegerField(
+default=0
)%0A object
@@ -1112,16 +1112,26 @@
arField(
+default=''
... |
668b27f185b7bccd29bed62cd7a28adcc25513ac | Add experimental django 1.7 migrations support. | djorm_pgarray/fields.py | djorm_pgarray/fields.py | # -*- coding: utf-8 -*-
import json
from django import forms
from django.core.exceptions import ValidationError
from django.core.serializers.json import DjangoJSONEncoder
from django.db import models
from django.utils import six
from django.utils.encoding import force_text
from django.utils.translation import ugettex... | Python | 0 | @@ -1848,32 +1848,309 @@
rgs, **kwargs)%0A%0A
+ def deconstruct(self):%0A name, path, args, kwargs = super(ArrayField, self).deconstruct()%0A kwargs%5B%22dbtype%22%5D = self._array_type%0A kwargs%5B%22type_cast%22%5D = self._type_cast%0A kwargs%5B%22dimension%22%5D = self._dimension%0A ... |
da37c4c7504568ede5ce12487887eceb4dd1e5c4 | Update djrill/mail/__init__.py | djrill/mail/__init__.py | djrill/mail/__init__.py | from django.core.exceptions import ImproperlyConfigured
from django.core.mail import EmailMultiAlternatives
class DjrillMessage(EmailMultiAlternatives):
alternative_subtype = "mandrill"
def __init__(self, subject='', body='', from_email=None, to=None, bcc=None,
connection=None, attachments=None, head... | Python | 0 | @@ -451,19 +451,20 @@
ipients=
-Tru
+Fals
e):%0A%0A
|
4bcf35efcfc751a1c337fdcf50d23d9d06549717 | Fix typo in doc string | demo/apps/catalogue/models.py | demo/apps/catalogue/models.py | from django.db import models
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore.models import Page
class Category(Page):
"""
user oscars category as a wagtail Page.
this works becuase they both use treebeard
"""
name = models.CharField(
verbose_name=_('name')... | Python | 0.01274 | @@ -163,21 +163,20 @@
-user o
+The O
scars
-c
+C
ateg
@@ -184,17 +184,17 @@
ry as a
-w
+W
agtail P
@@ -200,15 +200,14 @@
Page
-.
%0A
-t
+T
his
@@ -219,10 +219,10 @@
bec
-u
a
+u
se t
@@ -234,17 +234,17 @@
oth use
-t
+T
reebeard
|
9e9615376e0b9e9b61948add0f8b46d762fca508 | Fix typo | dlstats/fetchers/BEA.py | dlstats/fetchers/BEA.py | # -*- coding: utf-8 -*-
"""
Created on Fri Apr 3 17:04:10 2015
It is the first draft of fetching the National account data from U.S.
Bureau of Economic Analysis (BEA).
Work In Progress
"""
from dlstats.fetchers._skeleton import Skeleton, Category, Series, BulkSeries, Dataset, Provider
import urllib
import xlrd
impo... | Python | 0.999999 | @@ -1161,33 +1161,8 @@
me)%0A
- dic = %7B%7D%0A
@@ -1205,32 +1205,62 @@
concept = %5B%5D%0A
+ year_row = %5B%5D%0A
@@ -1694,32 +1694,37 @@
ne_.append(line_
+draft
%5Bcount_%5D.value)%0A
@@ -2651,68 +2651,8 @@
cy)%0A
- dic%5B'data_set'%5D =... |
a33b05785b2b2710670b9ad974239c9cb0cffa14 | Add TwrTimelineError | twitter/twr_error.py | twitter/twr_error.py | #!/usr/bin/env python
#
# Copyright (c) 2013 Martin Abente Lahaye. - tch@sugarlabs.org
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the righ... | Python | 0.000001 | @@ -1292,28 +1292,74 @@
sError(Exception):%0A pass%0A
+%0A%0Aclass TwrTimelineError(Exception):%0A pass%0A
|
96cdeac4dbb1ac2e3863cbc98438750701198563 | fix imports for __init__ (CircuitListenerMixin misisng) | txtorcon/__init__.py | txtorcon/__init__.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import with_statement
from txtorcon._metadata import __version__, __author__, __contact__
from txtorcon._metadata import __license__, __copyright__, __url__
fro... | Python | 0 | @@ -1888,16 +1888,38 @@
istener,
+ CircuitListenerMixin,
%0A IRo
|
6f49998c1b13ab522dbcd184af7269916f0ce681 | Fix locale issues (shouldn't have tried unlazy) | apps/phonebook/forms.py | apps/phonebook/forms.py | import re
import tempfile
from django import forms
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
import happyforms
import Image
from easy_thumbnails import processors
from tower import ugettext as _
from phonebook.helpers import vouched
from phonebook.models import Invite
fro... | Python | 0.000002 | @@ -81,62 +81,8 @@
ings
-%0Afrom django.core.exceptions import ObjectDoesNotExist
%0A%0Aim
@@ -180,16 +180,40 @@
ext as _
+, ugettext_lazy as _lazy
%0A%0Afrom p
@@ -963,16 +963,20 @@
(label=_
+lazy
(u'First
@@ -1039,16 +1039,20 @@
(label=_
+lazy
(u'Last
@@ -1113,16 +1113,20 @@
(label=_
+lazy
(u'Bio')
@@ -126... |
b37bbf65e1211f1c398e43072c27a1a20c409d6b | Update models.py | apps/projects/models.py | apps/projects/models.py | from django.db import models
from django.conf import settings
'''crates model Projects with
userId as ForeignKey from User
name as CharField
category as ForeignKey from Category
subcategory as ForeignKey from Subategory
producer as CharField
typ as CharField
note as TextField
'''
class Project(models.Model):
pro... | Python | 0 | @@ -310,60 +310,8 @@
l):%0A
- project = models.IntegerField(primary_key=True)%0A
@@ -1041,18 +1041,16 @@
category
-ID
= model
@@ -1258,18 +1258,16 @@
ct_image
-ID
= model
@@ -1310,18 +1310,16 @@
project
-ID
= model
|
0a69133e44810dd0469555f62ec49eba120e6ecc | Add utility function to convert a language code to a its full name | apps/storybase/utils.py | apps/storybase/utils.py | """Shared utility functions"""
from django.template.defaultfilters import slugify as django_slugify
def slugify(value):
"""
Normalizes string, converts to lowercase, removes non-alpha characters,
converts spaces to hyphens, and truncates to 50 characters.
"""
slug = django_slugify(value)
slug ... | Python | 0.002079 | @@ -25,16 +25,49 @@
ons%22%22%22%0A%0A
+from django.conf import settings%0A
from dja
@@ -126,16 +126,256 @@
_slugify
+%0Afrom django.utils.translation import ugettext as _%0A%0Adef get_language_name(language_code):%0A %22%22%22Convert a language code into its full (localized) name%22%22%22%0A languages = dict(... |
193327d17072324cffa6275ea4c2e2a69c2ce7c3 | Use Python 3 supported import | detecthttp/__init__.py | detecthttp/__init__.py | from ._version import __version__ # noqa
from plugin import DetectHTTP # noqa
| Python | 0.000004 | @@ -40,16 +40,17 @@
qa%0Afrom
+.
plugin i
|
54c63472f3d315641f411312128443b1d13f2bdc | Fix lingering reference to a variable that no longer existed. | disable_remote_mgmt.py | disable_remote_mgmt.py | # Disable remote management and remote firmware updates on Sercomm's Speedport W 724 Typ C (tested on the OTE variant)
# The same effect can be achieved (assuming you have access to a busybox shell on the router) by executing:
# /usr/sbin/cmld_client set Device.ManagementServer.EnableCWMP=0
# Requires the requests modu... | Python | 0 | @@ -964,16 +964,40 @@
':'0'%7D)%0A
+%09decoded_res = r.json()%0A
%09result
@@ -1029,24 +1029,27 @@
d_varid(
-r.json()
+decoded_res
, 'statu
|
0e3cad231e3010ad69b92ce9470cf09a5433d9d6 | Fix display of output in Bash kernel | metakernel_bash/metakernel_bash.py | metakernel_bash/metakernel_bash.py | from __future__ import print_function
from metakernel import MetaKernel
class MetaKernelBash(MetaKernel):
implementation = 'MetaKernel Bash'
implementation_version = '1.0'
language = 'bash'
language_version = '0.1'
banner = "MetaKernel Bash - interact with bash"
language_info = {
'mim... | Python | 0.000002 | @@ -1141,32 +1141,39 @@
'shell'%5D%0A
+ resp =
shell_magic.eva
@@ -1226,16 +1226,36 @@
e done')
+%0A return resp
%0A%0A de
|
50e3bab3c559615fb1a01c2292b65b0902ff851f | fix whitespace | mitmproxy/contentviews/xml_html.py | mitmproxy/contentviews/xml_html.py | import io
import re
import textwrap
from typing import Iterable
from mitmproxy.contentviews import base
from mitmproxy.utils import sliding_window
"""
A custom XML/HTML prettifier. Compared to other prettifiers, its main features are:
- Implemented in pure Python.
- Modifies whitespace only.
- Works with any input.
... | Python | 0.999999 | @@ -3841,36 +3841,32 @@
ag:%0A
-
return True # %3C
|
052a14ad0af6ed0ac8eb44d2ff7a208d101aff7b | disable refreshing the cache | crate_project/apps/pypi/models.py | crate_project/apps/pypi/models.py | from django.core.urlresolvers import reverse
from django.db import models
from django.db.models.signals import post_save, post_delete
from django.dispatch import receiver
from model_utils import Choices
from model_utils.models import TimeStampedModel
class PyPIMirrorPage(TimeStampedModel):
package = models.Fore... | Python | 0.000001 | @@ -2350,16 +2350,18 @@
%7D%0A%0A%0A
+#
@receive
@@ -2396,16 +2396,18 @@
orPage)%0A
+#
@receive
|
1967b75bdb6ca3329b6685ee4d47ba90e40cab26 | fix bug about room start_time | crawler/gather/spiders/quanmin.py | crawler/gather/spiders/quanmin.py | # -*- coding: utf-8 -*-
from scrapy import Spider, Request
from datetime import datetime
from ..items import ChannelItem, RoomItem
import json
class QuanminSpider(Spider):
name = 'quanmin'
allowed_domains = ['quanmin.tv']
start_urls = [
'https://www.quanmin.tv/json/categories/list.json'
]
... | Python | 0 | @@ -1790,16 +1790,265 @@
ps://')%0A
+ try:%0A start_time = datetime.utcfromtimestamp(float(rjson%5B'start_time'%5D))%0A except ValueError:%0A start_time = datetime.strptime(rjson%5B'play_at'%5D, '%25Y-%25m-%25d %25H:%25M:%25S')%0A
... |
f86bf4a7f3b194cd75ca8b58bd0960f18c23ff8d | Handle exceptions with generating thumbnails on demand (return "") | cropduster/templatetags/images.py | cropduster/templatetags/images.py | from coffin import template
from coffin.template.loader import get_template
register = template.Library()
from django.conf import settings
from cropduster.models import Size
from cropduster.models import AUTO_SIZE
from os.path import exists
CROPDUSTER_CROP_ONLOAD = getattr(settings, "CROPDUSTER_CROP_ONLOAD", True)
CRO... | Python | 0 | @@ -1157,16 +1157,26 @@
turn %22%22%0A
+%09%09%09%09try:%0A%09
%09%09%09%09imag
@@ -1217,16 +1217,43 @@
p=True)%0A
+%09%09%09%09except:%0A%09%09%09%09%09return %22%22%0A
%09%09%0A%09%09if
|
1d3e0822243d2a48d756ae8371795342767e4338 | remove unnecessary constructor | cursesmenu/items/external_item.py | cursesmenu/items/external_item.py | import curses
import cursesmenu.curses_menu
from cursesmenu.curses_menu import MenuItem
class ExternalItem(MenuItem):
"""
A base class for items that need to do stuff on the console outside of curses mode.
Sets the terminal back to standard mode until the action is done.
Should probably be subclassed... | Python | 0.00053 | @@ -328,292 +328,8 @@
%22%22%0A%0A
- def __init__(self, text, menu=None, should_exit=False):%0A # Here so Sphinx doesn't copy extraneous info from the superclass's docstring%0A super(ExternalItem, self).__init__(%0A text=text,%0A menu=menu,%0A should_exit=should_exit,%... |
fa71e3e91e6de94c46a02081ef0499f8136aa61b | Fix __call__() method in mini-huey. | huey/contrib/mini.py | huey/contrib/mini.py | #
# Minimal huey-like API using gevent and running within the parent process.
#
import datetime
import heapq
import logging
import time
from functools import wraps
import gevent
from gevent.event import AsyncResult
from gevent.event import Event
from gevent.pool import Pool
from huey.api import crontab
logger = log... | Python | 0.000007 | @@ -343,16 +343,84 @@
ini')%0A%0A%0A
+class MiniHueyResult(AsyncResult):%0A __call__ = AsyncResult.get%0A%0A%0A
class Mi
@@ -1210,37 +1210,40 @@
async_result =
-Async
+MiniHuey
Result()%0A
@@ -1771,21 +1771,24 @@
esult =
-Async
+MiniHuey
Result()
|
feb800379f5dce1e3f55c6c61e7fa41e43ab5bd4 | Fix problem where only the last source would be used to make the tile. | joerd/server.py | joerd/server.py | from joerd.mkdir_p import mkdir_p
import joerd.tmpdir as tmpdir
import joerd.download as download
from joerd.plugin import plugin
from contextlib2 import ExitStack, contextmanager
import logging
import traceback
import os.path
import sys
def _download(d, store):
"""
Download a source file from the internet an... | Python | 0 | @@ -5969,24 +5969,28 @@
+
if vrts:%0A
@@ -5982,24 +5982,28 @@
if vrts:%0A
+
|
81eb3db62e1ad559ba667f551f67f228d53a3a6b | length must be nonzero | DTPath2D.py | DTPath2D.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This software is under a BSD license. See LICENSE.txt for details.
import numpy as np
def _max_bounding_box(a, b):
(xmin_a, xmax_a, ymin_a, ymax_a) = a
(xmin_b, xmax_b, ymin_b, ymax_b) = b
return (np.nanmin((xmin_a, xmin_b)), np.nanmax((xmax_a, xmax_b)), n... | Python | 0.999999 | @@ -917,128 +917,8 @@
%0A
- Pass empty arrays for points to get an empty collection%0A that can be added to with add_point().%0A %0A
@@ -1432,24 +1432,97 @@
lengths%22 %0A
+ assert len(xvalues) %3E 0, %22empty arrays are not allowed%22%0A %0A
xval
|
b28b23561b40c9bdb936b9551f07880b62ffd3af | Comment out a comment | convenience/file_convenience/cache_download.py | convenience/file_convenience/cache_download.py | from __future__ import print_function
import os
from urllib import urlretrieve
#===============================================================================
# CACHE_DOWNLOAD
#============================================================================... | Python | 0 | @@ -1437,16 +1437,17 @@
---%0A
+#
check th
|
547679d0fa1be685eb05cfd3c9b17c1953563dfa | Add feature - file verification of local file to cache_download() | convenience/file_convenience/cache_download.py | convenience/file_convenience/cache_download.py | from __future__ import print_function
import os
from urllib import urlretrieve
#===============================================================================
# CACHE_DOWNLOAD
#============================================================================... | Python | 0 | @@ -72,16 +72,63 @@
etrieve%0A
+from file_verification import file_verification
%0A%0A#=====
@@ -400,16 +400,41 @@
(%22%22, %22%22)
+, v_type=None, v_val=None
):%0A %22
@@ -2368,223 +2368,385 @@
-if file_exists:%0A # TODO: perform verification process.%0A file_verified = True # Set to True fo... |
62b1c49c67c72c36d4177c657df49a4700586c06 | Change the url patters from python_social_auth to social_django | djangoTemplate/urls.py | djangoTemplate/urls.py | """djangoTemplate URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
"""
from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url('', include('base.urls')),
url('', ... | Python | 0.999999 | @@ -332,24 +332,15 @@
cial
-.apps.
+_
django
-_app
.url
|
e14599ce03c7c326479655ead88246047eee7c16 | bump version | django_nyt/__init__.py | django_nyt/__init__.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
_disable_notifications = False
VERSION = "0.9.7.3"
def notify(*args, **kwargs):
"""
DEPRECATED - please access django_nyt.utils.notify
"""
from django_nyt.utils import notify
return notify(*arg... | Python | 0 | @@ -148,11 +148,9 @@
0.9.
-7.3
+8
%22%0A%0A%0A
|
62f4c6b7d24176284054b13c4e1e9b6d631c7b42 | Update basic test Now uses the new format by @BookOwl. | basicTest.py | basicTest.py | import slither, pygame, time
snakey = slither.Sprite()
snakey.setCostumeByName("costume0")
SoExcited = slither.Sprite()
SoExcited.addCostume("SoExcited.png", "avatar")
SoExcited.setCostumeByNumber(0)
SoExcited.goTo(300, 300)
SoExcited.setScaleTo(0.33)
slither.slitherStage.setColor(40, 222, 40)
screen = slither.se... | Python | 0 | @@ -340,293 +340,116 @@
er%0A%0A
-continueLoop = True%0Awhile continueLoop:%0A slither.blit(screen) # Display%0A snakey.changeXBy(1)%0A SoExcited.changeDirectionBy(1)%0A # Handle quitting%0A for event in pygame.event.get():%0A if event.type == pygame.QUIT:%0A continueLoop = False%0A ... |
5c09104a470ee807126a5df04f2fb5452e8741d1 | Add xi namespace to Schemas | iati/core/schemas.py | iati/core/schemas.py | """A module containing a core representation of IATI Schemas."""
from lxml import etree
import iati.core.codelists
import iati.core.constants
import iati.core.exceptions
import iati.core.resources
import iati.core.utilities
class Schema(object):
"""Represenation of a Schema as defined within the IATI SSOT.
A... | Python | 0.000002 | @@ -3668,82 +3668,53 @@
-# add the namespace%0A self._schema_base_tree.getroot().nsmap%5B
+iati.core.utilities.add_namespace(self,
'xi'
-%5D =
+,
'ht
@@ -3747,44 +3747,8 @@
ude'
-%0A # import pdb;pdb.set_trace(
)%0A%0A
|
6c8cc6d25d078bd0ce6000e650338017703a76cb | mark no sleep etag test as xfail if it fails | tests/vdir_test.py | tests/vdir_test.py | # Copyright (c) 2013-2016 Christian Geier et al.
#
# 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, modify, merge, ... | Python | 0.000013 | @@ -1489,32 +1489,45 @@
om_file(fpath)%0A%0A
+ try:%0A
assert old_e
@@ -1534,32 +1534,126 @@
tag != new_etag%0A
+ except AssertionError:%0A pytest.xfail(%0A %22Do we need to sleep?%22%0A )%0A
%0A%0Adef test_etag_
|
9492ab707d92693559fa50922fa15f9bff096f02 | Bump to 0.2.3 | snoop/__init__.py | snoop/__init__.py | '''
Usage:
import snoop
@snoop
def your_function(x):
...
A log will be written to stderr showing the lines executed and variables
changed in the decorated function.
For more information, see https://github.com/alexmojaki/snoop
'''
from .configuration import install, Config
from .variables impor... | Python | 0.000411 | @@ -520,17 +520,17 @@
= '0.2.
-2
+3
'%0A__vers
|
27f201e7f771d76f9483c4a424664240bbc19bd7 | remove unused import | song2/__init__.py | song2/__init__.py | #!/usr/bin/env python
# -*- encoding:utf-8 -*-
from __future__ import absolute_import
__song2__ = 'song2'
__version__ = '0.1.0'
__author__ = 'Takumakanari'
__license__ = 'MIT'
__description__ = 'Dict based immutable/typesafe schema'
import inspect
from song2.types import _Property
class UnknownProperty(Exception):... | Python | 0.000001 | @@ -233,23 +233,8 @@
'%0A%0A%0A
-import inspect%0A
from
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.