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 |
|---|---|---|---|---|---|---|---|
30bcdc2c6bc18eb8460ec1706e74bdd72bae0610 | Fix test after using cool_filter | test/python/topology/test_names.py | test/python/topology/test_names.py | # Licensed Materials - Property of IBM
# Copyright IBM Corp. 2017
import unittest
import itertools
from streamsx.topology.topology import *
def f42():
pass
class cool_class(object):
def __init__(self):
pass
def __call__(self, t):
return t
class cool_filter(object):
def __init__(self):... | Python | 0.000001 | @@ -2061,17 +2061,17 @@
l_class_
-4
+3
%22)%0A%0A
@@ -2233,17 +2233,17 @@
l_class_
-5
+4
%22)%0A
|
5934669c0edbd914d14612e16be7c88641b50bee | Fix test for eq and test eq with other classes | test/test_chat_chatserverstatus.py | test/test_chat_chatserverstatus.py | from pytwitcherapi import chat
def test_eq_str(servers):
assert servers[0] == '192.16.64.11:80',\
"Server should be equal to the same address."
def test_noteq_str(servers):
assert servers[0] != '192.16.64.50:89',\
"""Server should not be equal to a different address"""
def test_eq(servers)... | Python | 0 | @@ -443,32 +443,138 @@
uld be equal%22%22%22%0A
+ assert not (s1 == 123),%5C%0A %22%22%22Servers should not be eqaul to other classes with different id%22%22%22%0A
%0A%0Adef test_noteq
@@ -587,32 +587,37 @@
rs):%0A assert
+not (
servers%5B0%5D != se
@@ -611,17 +611,17 @@
vers%5B0%5D
-!
+=
= server
... |
03624fa9dbe1a0dbb74e324a35ee0cda44234bc8 | add domain name when having issues in the warn output (#5105) | certbot-apache/certbot_apache/display_ops.py | certbot-apache/certbot_apache/display_ops.py | """Contains UI methods for Apache operations."""
import logging
import os
import zope.component
from certbot import errors
from certbot import interfaces
import certbot.display.util as display_util
logger = logging.getLogger(__name__)
def select_vhost(domain, vhosts):
"""Select an appropriate Apache Vhost.
... | Python | 0 | @@ -2763,19 +2763,74 @@
biguity
-but
+when trying to find a vhost for %22%0A %22%7B0%7D but was
unable
@@ -3017,16 +3017,31 @@
ctives.%22
+.format(domain)
)%0A
|
a004abd76af602192704cf4d01d9daf3903d6477 | Remove unused code | child_switzerland/models/child_compassion.py | child_switzerland/models/child_compassion.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: David Coninckx <david@coninckx.com>
#
# The licence is in the file __manifest__.p... | Python | 0.000006 | @@ -431,13 +431,8 @@
elds
-, api
%0A%0A%0Ac
@@ -696,1113 +696,4 @@
ue)%0A
-%0A @api.model%0A def correct_old_children(self):%0A old_children = self.search(%5B('global_id', '=', False)%5D).filtered(%0A lambda c: len(c.local_id) %3C 11)%0A for child in old_children:%0A if chil... |
07d17373891b501fa9e20d175ea993e021158c78 | Add TODO | app/slot/controller.py | app/slot/controller.py | # 3rd Party Modules
import datetime
import os
from flask import request, redirect, render_template, json
from app import app
import config
from auth import requires_auth
from app.slot import db_fieldbook, messaging
import utils
def index():
ops = db_fieldbook.get_all_opportunities()
for op in ops:
i... | Python | 0.000002 | @@ -2618,24 +2618,60 @@
ive_sms():%0A%0A
+ # TODO: Convert to dict literal%0A
sms = di
|
92f5cff9edfbeb2219fc2fb714364dc590bd912f | Fix too long line in soc.cache.logic module. | app/soc/cache/logic.py | app/soc/cache/logic.py | #!/usr/bin/python2.5
#
# Copyright 2009 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | Python | 0.000001 | @@ -982,80 +982,110 @@
-new_value = value.key().id_or_name() if isinstance(value, db.Model) else
+if isinstance(value, db.Model):%0A new_value = value.key().id_or_name()%0A else:%0A new_value =
val
|
ced24cc4af10e914d2cbd176be179543e6366d05 | Update plot_post.py | mcmcplotlib/plot_post.py | mcmcplotlib/plot_post.py | from __future__ import division
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
from hpd import hpd_grid
def plot_post(sample, alpha=0.05, show_mode=True, kde_plot=True, bins=50,
ROPE=None, comp_val=None, roundto=2):
"""Plot posterior and HPD
Parameters
-------... | Python | 0 | @@ -1601,25 +1601,16 @@
e, alpha
-, roundto
)%0D%0A p
|
bed9390490ad0c9d8d8319ea017f13d075284450 | Make sure SQL file gets closed | calaccess_processed_filings/managers.py | calaccess_processed_filings/managers.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Custom manager for loading raw data in to "filings" models.
"""
from __future__ import unicode_literals
import itertools
# Django tricks
from django.db.models import Q
from django.db import connection
# Managers
from calaccess_processed.managers import BulkLoadSQLMana... | Python | 0.000001 | @@ -647,22 +647,20 @@
-return
+fp =
open(se
@@ -680,15 +680,70 @@
'r')
-.read()
+%0A sql = fp.read()%0A fp.close()%0A return sql
%0A%0A
|
c1ebf656a43ecec0cbcd6d8b7b2758651c77f7a7 | Add params to upload_volume command | tempest/api/volume/test_volumes_actions.py | tempest/api/volume/test_volumes_actions.py | # Copyright 2012 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 requ... | Python | 0.000001 | @@ -5547,32 +5547,228 @@
, 'available')%0A%0A
+ image_info = self.images_client.show_image(image_id)%0A self.assertEqual(image_name, image_info%5B'name'%5D)%0A self.assertEqual(CONF.volume.disk_format, image_info%5B'disk_format'%5D)%0A%0A
@decorators.
|
a2398d77f550a5b73c5bbd76d30131c88c64caa4 | Make the example a bit more exciting. | swig/test.py | swig/test.py | import formast
e = formast.Expr()
formast.parse_xml("test.txt", e)
class Visitor(formast.Visitor):
def expr_uint(self, v):
print(v)
def expr_add(self, left, right):
print "("
self.expr(left)
print "+"
self.expr(right)
print ")"
def expr_sub(self, left, rig... | Python | 0.000001 | @@ -68,22 +68,22 @@
%0A%0Aclass
-Visito
+Printe
r(formas
@@ -139,11 +139,11 @@
rint
-(v)
+ v,
%0A%0A
@@ -186,32 +186,33 @@
print %22(%22
+,
%0A self.ex
@@ -229,32 +229,33 @@
print %22+%22
+,
%0A self.ex
@@ -273,32 +273,33 @@
print %22)%22
+,
%0A%0A def expr_s
@@ -330,3... |
13de22d42ecbc51ea19bdd571262959eb29804d9 | Fix crop_and_resize usage | frcnn/roi_pool.py | frcnn/roi_pool.py | import sonnet as snt
import tensorflow as tf
import numpy as np
CROP = 'crop'
ROI_POOLING = 'roi_pooling'
class ROIPoolingLayer(snt.AbstractModule):
"""ROIPoolingLayer which applies ROI pooling (or tf.crop_and_resize)"""
def __init__(self, pooling_mode=CROP, pooled_width=7, pooled_height=7,
... | Python | 0.000001 | @@ -58,16 +58,39 @@
as np%0A%0A
+slim = tf.contrib.slim%0A
%0ACROP =
@@ -688,32 +688,41 @@
bboxes(self, roi
+_proposal
s, pretrained):%0A
@@ -1079,24 +1079,33 @@
tf.slice(roi
+_proposal
s, %5B0, 1%5D, %5B
@@ -1152,24 +1152,33 @@
tf.slice(roi
+_proposal
s, %5B0, 2%5D, %5B
@@ -1226,24 +1226,33 @@
tf.slice(roi
... |
a7e4a12a9d083fd9f0ab8a73b9207f2ec1911044 | Use unique colormap names | typhon/tests/plots/test_colors.py | typhon/tests/plots/test_colors.py | # -*- coding: utf-8 -*-
"""Testing the functions in typhon.plots.colors.
"""
import filecmp
import os
from tempfile import mkstemp
import matplotlib.pyplot as plt
import matplotlib.colors as mcolors
import numpy as np
import pytest
from typhon.plots import colors
class TestColors:
"""Testing the cm functions.""... | Python | 0 | @@ -3010,32 +3010,36 @@
me=%22viridis_read
+_txt
%22)%0A%0A asse
@@ -3361,16 +3361,20 @@
dis_read
+_act
%22)%0A%0A
|
df9b8428d6575bf68699534c37425bd1bc1c6ae8 | decrease the cache time for the block | paiji2_shoutbox/modular.py | paiji2_shoutbox/modular.py | from django.conf.urls import url, include
from modular_blocks import ModuleApp, TemplateTagBlock, modules
from . import urls
class ShoutboxModule(ModuleApp):
app_name = 'bulletin_board'
name = 'bulletin-board'
urls = url(r'^shoutbox/', include(urls))
templatetag_blocks = [
TemplateTagBlock(
... | Python | 0.000003 | @@ -449,15 +449,9 @@
ime=
-30 * 60
+1
,%0A
|
c47d11fbe4e09dcec8d0c40d778c38b04b8ccc7b | Add List-Id and List-Unsubscribe headers | uchicagohvz/users/mailing_list.py | uchicagohvz/users/mailing_list.py | # Mailing list configuration
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from uchicagohvz import secrets
from .tasks import smtp_localhost_send
from .models import Profile
from rest_framework.response import Response
from rest_framework.views import APIVi... | Python | 0 | @@ -1362,16 +1362,163 @@
bject'%5D%0A
+%09%09%09msg%5B'List-Id'%5D = 'HvZ-Chatter %3Chttps://www.uchicagohvz.org%3E'%0A%09%09%09msg%5B'List-Unsubscribe'%5D = '%3Chttps://www.uchicagohvz.org/users/update_profile/%3E'%0A
%09%09%09to_ad
|
43dcd3dc3ee4b090832455acf43e8dd483a6117b | Use current device scope in `initialize_tpu_system` if called without a cluster resolver. | tensorflow/python/tpu/tpu_strategy_util.py | tensorflow/python/tpu/tpu_strategy_util.py | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0 | @@ -1132,24 +1132,71 @@
rt function%0A
+from tensorflow.python.framework import device%0A
from tensorf
@@ -1227,16 +1227,16 @@
ort ops%0A
-
from ten
@@ -1968,16 +1968,29 @@
.%0A %22%22%22%0A
+ job = None%0A
if clu
@@ -2012,16 +2012,352 @@
s None:%0A
+ # If no cluster resolver is specified, and running eag... |
0cc04e9a486fb7dcf312a5c336f8f529f8b1f32d | Update version 1.0.4 -> 1.0.5 | skcode/__init__.py | skcode/__init__.py | """
SkCode (Python implementation of BBcode syntax) parser library.
"""
# Package information
__author__ = "Fabien Batteix (@skywodd)"
__copyright__ = "Copyright 2015, TamiaLab"
__credits__ = ["Fabien Batteix", "TamiaLab"]
__license__ = "GPLv3"
__version__ = "1.0.4"
__maintainer__ = "Fabien Batteix"
__email__ = "fabie... | Python | 0 | @@ -262,9 +262,9 @@
1.0.
-4
+5
%22%0A__
|
f343a8bc7592ab9befb5c03ccd09db61439e3f76 | remove extra buttons labelled Make Maintenance Visit | erpnext/patches/jan_mar_2012/allocated_to_profile.py | erpnext/patches/jan_mar_2012/allocated_to_profile.py | def execute():
"""
Changes allocated_to option to Profile in
DocType Customer Issue
"""
import webnotes
webnotes.conn.sql("""
UPDATE `tabDocField`
SET options='Profile'
WHERE fieldname='allocated_to'
""")
from webnotes.modules.module_manager import reload_doc
reload_doc('support', 'doctype', 'customer... | Python | 0 | @@ -214,16 +214,143 @@
%0A%09%22%22%22)%0A%0A
+%09webnotes.conn.sql(%22%22%22%0A%09%09DELETE from %60tabDocField%60%0A%09%09WHERE parent='Customer Issue'%0A%09%09AND label='Make Maintenance Visit'%0A%09%22%22%22)%0A%0A
%09from we
|
dc3ad128d7e55d939ecffbedd9c3664ce81dcf77 | Add fallback argument for Command-line tool. | slackpy/slackpy.py | slackpy/slackpy.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Takahiro Ikeuchi'
import os
import requests
import json
import traceback
from argparse import ArgumentParser
class SlackLogger:
def __init__(self, web_hook_url, channel=None, username='Logger'):
self.web_hook_url = web_hook_url
self.us... | Python | 0 | @@ -5439,16 +5439,289 @@
Logger')
+%0A parser.add_argument('-f',%0A '--fallback',%0A type=str,%0A required=False,%0A help='A plain-text summary of the attachment',%0A default=''... |
96176bb223f9971311a0a42c6c9845ca1c0170cc | Add base class to throttling | user_management/api/throttling.py | user_management/api/throttling.py | from rest_framework.throttling import ScopedRateThrottle
class DefaultRateMixin(object):
def get_rate(self):
try:
return self.THROTTLE_RATES[self.scope]
except KeyError:
return self.default_rate
class PostRequestThrottleMixin(object):
def allow_request(self, request, ... | Python | 0.000001 | @@ -533,21 +533,22 @@
%0A%0Aclass
-Login
+Scoped
RateThro
@@ -543,32 +543,36 @@
opedRateThrottle
+Base
(%0A Defaul
@@ -578,32 +578,24 @@
ltRateMixin,
-%0A
PostRequest
@@ -604,33 +604,143 @@
rottleMixin,
-%0A
+ ScopedRateThrottle):%0A %22%22%22Base class to define a scoped rate throttle... |
b952f803b3f4cf9fc380a9168543e669de35cc61 | Fix test code for streamsx.ec - don't use internals | test/python/spl/testtkpy/opt/python/streams/test_ec.py | test/python/spl/testtkpy/opt/python/streams/test_ec.py | # Licensed Materials - Property of IBM
# Copyright IBM Corp. 2017
# Import the SPL decorators
from streamsx.spl import spl
import streamsx.ec as ec
import pickle
#------------------------------------------------------------------
# Test Execution Context (streamsx.ex) functions
#--------------------------------------... | Python | 0 | @@ -1237,42 +1237,8 @@
ok =
- ec._supported%0A ok = ok and
sel
|
190cea0914b2b3db7c2a7856e18635d9b074cefc | add vertex and line | meshio/avsucd/_avsucd.py | meshio/avsucd/_avsucd.py | """
I/O for AVS-UCD format, cf.
<https://lanl.github.io/LaGriT/pages/docs/read_avs.html>.
"""
import numpy
from .._exceptions import ReadError, WriteError
from .._files import open_file
from .._helpers import register
from .._mesh import Mesh
meshio_to_avsucd_type = {
"triangle": "tri",
"quad": "quad",
"... | Python | 0.000003 | @@ -261,24 +261,64 @@
cd_type = %7B%0A
+ %22vertex%22: %22pt%22,%0A %22line%22: %22line%22,%0A
%22triangl
@@ -537,24 +537,63 @@
o_order = %7B%0A
+ %22vertex%22: %5B0%5D,%0A %22line%22: %5B0, 1%5D,%0A
%22triangl
|
72e0eb9728119d5f9c05c5b456ffb9d0c02962b1 | Correctly replace the winners column with the 0-1-2 values | data_readers.py | data_readers.py | # coding: utf-8
"""
Functions that return the data in the files, sometimes raw, with some cleaning
and/or summarization.
"""
import pandas as pd
RAW_MATCHES_FILE = 'raw_matches.csv'
RAW_WINNERS_FILE = 'raw_winners.csv'
TEAM_RENAMES_FILE = 'team_renames.csv'
def apply_renames(column):
"""Apply team renames to a ... | Python | 0.999979 | @@ -1142,22 +1142,40 @@
winner'%5D
-.apply
+ = matches%5B'winner'%5D.map
(winner_
|
34ffbbfcd30a3ff0064afdfb5a07f86f425494ea | Add Todo download file test | kboard/functional_test/test_post_file_upload.py | kboard/functional_test/test_post_file_upload.py | import os
from django.conf import settings
from .base import FunctionalTest
class PostFileUploadTest(FunctionalTest):
def test_file_upload(self):
self.browser.get(self.live_server_url)
self.move_to_default_board()
# 지훈이는 첨부파일을 추가하여 새 게시글을 작성하기 위해 글 쓰기 버튼을 누른다.
self.click_create_... | Python | 0 | @@ -1469,24 +1469,114 @@
test.txt')%0A%0A
+ # %EC%97%85%EB%A1%9C%EB%93%9C %EB%90%9C %EC%B2%A8%EB%B6%80%ED%8C%8C%EC%9D%BC%EC%9D%B8 'test.txt'%EC%9D%84 %EB%8B%A4%EC%9A%B4%EB%B0%9B%EC%9D%84 %EC%88%98 %EC%9E%88%EB%8A%94%EC%A7%80 %ED%99%95%EC%9D%B8%ED%95%9C%EB%8B%A4.%0A # TODO Add file download test%0A%0A
... |
67f3964f88b921f1c84b1e7169408806fdeade26 | hello encoding | fuckingweather.py | fuckingweather.py | """
fuckingweather.py - Willie module for The Fucking Weather
Copyright 2013 Michael Yanovich
Copyright 2013 Edward Powell
Licensed under the Eiffel Forum License 2.
http://willie.dftba.net
"""
from willie.module import commands, rate, priority, NOLIMIT
from willie import web
import re
@commands('fucking_weather', ... | Python | 0.999155 | @@ -189,16 +189,40 @@
net%0A%22%22%22%0A
+# -*- coding: utf-8 -*-%0A
from wil
|
07760e1b31c0cc33533d595f7a29e6231d580039 | remove unused component | tests/cypress/dash/v_copy_paste.py | tests/cypress/dash/v_copy_paste.py | # pylint: disable=global-statement
import dash
from dash.dependencies import Input, Output, State
import dash_html_components as html
import dash_core_components as dcc
import os
import pandas as pd
import sys
sys.path.append(
os.path.abspath(
os.path.join(os.path.dirname(sys.argv[0]), os.pardir, os.pardir... | Python | 0.000004 | @@ -131,43 +131,8 @@
tml%0A
-import dash_core_components as dcc%0A
impo
|
7be26218dbf808c1c18b9f42813dea5fa5c540aa | fix failing tests | corehq/motech/repeaters/tests/test_populate_caserepeater.py | corehq/motech/repeaters/tests/test_populate_caserepeater.py | from datetime import datetime
from django.core.management import call_command
from django.test import TestCase
from corehq.motech.models import ConnectionSettings
from corehq.motech.repeaters.management.commands.migrate_caserepeater import \
Command as MigrationCommand
from corehq.motech.repeaters.models import Ca... | Python | 0.000003 | @@ -2003,20 +2003,8 @@
tput
-.split('%5Cn')
, %5B%0A
|
4ebb0e7f4dc8ed7507560c7e378473fd4baf4914 | update caviar orders scraping logic, add additional html parsing catches | app/scrapers/caviar.py | app/scrapers/caviar.py | from lxml import html
import json
from datetime import datetime
from utils import *
import logging
import os
import requests
_logger = logging.getLogger(__name__)
handler = logging.StreamHandler()
formatter = logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s')
handler.setFormatter(formatter)
_logg... | Python | 0 | @@ -2796,30 +2796,79 @@
rder
-_information_list-item
+-history_orders_content-body-column order-history_orders_content-column
%22%5D/t
@@ -3051,17 +3051,9 @@
%22%22%0A
-
%0A
+
@@ -3513,33 +3513,61 @@
rder
-_information_list%22%5D//a')%0A
+-history_orders_content-body%22%5D//a')%0A try:%0A ... |
e0713d8c537c17c9a4701fc7dcd9006749072201 | increase dimension for supplier invoice number | l10n_it_account/wizard/check_account_invoive.py | l10n_it_account/wizard/check_account_invoive.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2017 Didotech SRL
#
# 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; eithe... | Python | 0 | @@ -2488,10 +2488,10 @@
ize=
-16
+32
),%0A
|
8aa348a0252dbac1f8cf4d79b7faf62fd31c95f2 | FIX evaluation stream check | avalanche/training/plugins/evaluation.py | avalanche/training/plugins/evaluation.py | import warnings
from copy import copy
from collections import defaultdict
from typing import Union, Sequence, TYPE_CHECKING
from avalanche.evaluation.metric_results import MetricValue
from avalanche.evaluation.metrics import accuracy_metrics, loss_metrics
from avalanche.logging import InteractiveLogger
if TYPE_CHECKI... | Python | 0 | @@ -8520,16 +8520,33 @@
l_stream
+%5B0%5D.origin_stream
%0A
|
70fdc88e73e52a800dd86504bab7fbf9ad89e1d8 | Add partial_path property explicitly to the Work model. | app/soc/models/work.py | app/soc/models/work.py | #!/usr/bin/python2.5
#
# Copyright 2008 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | Python | 0 | @@ -2150,24 +2150,556 @@
publicly')%0A%0A
+ #: Required path, prepended to a %22link name%22 to form the document URL.%0A #: The combined path and link name must be globally unique on the%0A #: site. Except in /site/docs (Developer) forms, this field is not%0A #: usually directly editable by the User, but is inst... |
226639f98dee43e21db70070108d0c3131d75729 | move to version 0.2.1b | gemini/version.py | gemini/version.py | __version__="0.2.0b"
| Python | 0.000001 | @@ -10,12 +10,12 @@
__=%220.2.
-0
+1
b%22%0A
|
e01eccd8af27ad97a20b784b81ddde5cc8515e4b | fix incorrect codding utf8 to utf-8 (#903) | faker/providers/internet/hu_HU/__init__.py | faker/providers/internet/hu_HU/__init__.py | # coding=utf8
from __future__ import unicode_literals
from .. import Provider as InternetProvider
class Provider(InternetProvider):
free_email_domains = (
'gmail.com',
'hotmail.com',
'yahoo.com',
)
tlds = (
'hu',
'com',
'com.hu',
'info',
'o... | Python | 0.000018 | @@ -5,16 +5,17 @@
ding=utf
+-
8%0Afrom _
|
975f8e44f2d16e8f4e144291283b221e04edd95c | add a test in test_expand_path_cfg() | tests/unit/selection/factories/test_expand_path_cfg.py | tests/unit/selection/factories/test_expand_path_cfg.py | # Tai Sakuma <tai.sakuma@gmail.com>
import os
import sys
import pytest
from alphatwirl.selection.factories.FactoryDispatcher import expand_path_cfg
##__________________________________________________________________||
@pytest.fixture()
def alias_dict():
return {
'alias1': 'ev : ev.var1[0] >= 10',
... | Python | 0.000001 | @@ -4809,32 +4809,503 @@
ict-not'%0A ),%0A
+ pytest.param(%0A dict(Any=(%0A 'ev : ev.x%5B0%5D == 0',%0A dict(All=(%0A 'ev : ev.x%5B0%5D %3E= 1',%0A 'ev : ev.y%5B0%5D %3E= 100',%0A )),%0A dict(Not=dict(%0A Any=(%0A... |
69c6c5126ebed3d2144300259c6d739f5323f0c3 | fix bug, return data instead of none | geotweet/steps.py | geotweet/steps.py | import json
from log import logger, get_rotating_logger
class ProcessStep(object):
""" Base Class used to build data processing chain """
next_step = None
def get_next(self):
return self.next_step
def set_next(self, next_step):
self.next_step = next_step
def next(self, ... | Python | 0.000002 | @@ -410,20 +410,20 @@
return
-None
+data
%0A%0A de
@@ -1055,36 +1055,21 @@
f record
-:%0A return
+ and
self._v
@@ -1091,16 +1091,34 @@
record)
+ %5C%0A
and sel
@@ -1134,21 +1134,54 @@
te('
-geo', record)
+coordinates', record):%0A return True
%0A
@@ -2393,43 +239... |
fa3eeb3010d7adc1c3b958abd973fffeb3f711a0 | fix cors header issue | gfsad/__init__.py | gfsad/__init__.py | from flask import Flask, request, g, redirect
from flask.ext.cache import Cache
from flask.ext.compress import Compress
from flask.ext.restless import APIManager
from flask_jwt import JWT
from flask_mail import Mail
from gfsad.exceptions import FieldError
from flask.ext.celery import Celery
from flask_limiter import Li... | Python | 0 | @@ -1664,17 +1664,16 @@
w-Method
-s
'%5D = req
|
75ab7e06d78d0534e700b5a910419cd655b156ba | Add --crawl_since flag when not providing repos file | git_downloader.py | git_downloader.py | #!/usr/bin/env python
#
import sys, os, argparse, logging, fnmatch, posixpath, socket
from github import Github
if sys.version_info < (3, 0):
# python 2
import urlparse
from urllib import urlretrieve
else:
# python 3
import urllib.parse as urlparse
from urllib.request import urlretrieve
def ma... | Python | 0 | @@ -84,34 +84,23 @@
ket%0A
-from github
import
-G
+g
ithub%0A
+%0A
if s
@@ -452,16 +452,23 @@
g =
+github.
Github()
@@ -626,24 +626,28 @@
+def
repo_gen
= (repo
@@ -642,69 +642,399 @@
_gen
- = (repo.html_url for repo in g.get_repos() if not repo.fork)
+():%0A last_page = args.crawl... |
d08d7b3763fa10b34c6e68c78d85055771c4f8df | Handle ReleaseEvent | github3/events.py | github3/events.py | # -*- coding: utf-8 -*-
"""
github3.events
==============
This module contains the class(es) related to Events
"""
from github3.models import GitHubObject
class Event(GitHubObject):
"""The :class:`Event <Event>` object. It structures and handles the data
returned by via the `Events <http://developer.githu... | Python | 0.000001 | @@ -4050,24 +4050,213 @@
n payload%0A%0A%0A
+def _release(payload):%0A from github3.repos.release import Release%0A release = payload.get('release')%0A if release:%0A payload%5B'release'%5D = Release(release)%0A return payload%0A%0A%0A
def _team(pa
@@ -5179,24 +5179,54 @@
: identity,%0A
+ 'Rele... |
0352f542341fe25be74c0130e7e50394c6f0bb6d | add interactive message colorization | gitmagic/fixup.py | gitmagic/fixup.py | import gitmagic
import git.cmd
import tempfile
def fixup(repo, destination_picker, change_finder, args={}):
repo.index.reset()
for change in change_finder(repo):
_apply_change(repo, change)
destination_commits = destination_picker.pick(change)
if not destination_commits:
rep... | Python | 0.000001 | @@ -472,191 +472,45 @@
int(
-%22Should I create fixup commit for %7B%7D -%3E %7B%7D:%7B%7D%5Cn%7B%7D%22.format(%0A change.a_file_name,%0A destination.hexsha%5B:7%5D,%0A destination.summary,%0A change.diff
+ _colorize_change(change, destination
), a
@@ -868,8 +868,988 @@
na... |
835b1ff03d517c4a621237d3cd1682df1322e0e8 | add missing build dependency to py-execnet (#6443) | var/spack/repos/builtin/packages/py-execnet/package.py | var/spack/repos/builtin/packages/py-execnet/package.py | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | Python | 0 | @@ -1718,16 +1718,67 @@
build')%0A
+ depends_on('py-setuptools-scm', type='build')%0A
depe
|
fe0d9a4de405d4324f33edf33b84ff22016c1ac1 | Remove model details from raw machine output. | lib/python2.6/aquilon/server/formats/machine.py | lib/python2.6/aquilon/server/formats/machine.py | # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
#
# Copyright (C) 2008,2009,2010 Contributor
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the EU DataGrid Software License. You should
# have received a copy of the li... | Python | 0 | @@ -4451,54 +4451,108 @@
end(
-self.redirect_raw(machine.model, indent + %22 %22
+indent + %22 %7B0:c%7D: %7B0.name%7D %7B1:c%7D: %7B1.name%7D%22.format(%0A machine.model.vendor, machine.model
))%0A
|
8c6793f62658c116a991800502b2dd3ee1463206 | add pagination generic note | snug/pagination.py | snug/pagination.py | """Tools for pagination.
.. versionadded:: 1.2
"""
import abc
import typing as t
from operator import attrgetter
from .compat import HAS_PEP492, PY3
from .query import Query, async_executor, executor
__all__ = [
'paginated',
'Page',
'Pagelike',
]
AsyncIterator = t.AsyncIterator if HAS_PEP492 else t.Iter... | Python | 0 | @@ -694,16 +694,293 @@
inated%60.
+%0A%0A Note%0A ----%0A Pagelike is a :class:%60~typing.Generic%60.%0A This means you may write %60%60Pagelike%5B%3Ctype-of-content%3E%5D%60%60%0A as a descriptive type annotation.%0A%0A For example: %60%60Pagelike%5BList%5Bstr%5D%5D%60%60 indicates a page-like%0A ... |
98e2e0bdefd3fb7941d589c01b7a7fa92f8375e6 | add fuzzing test for ZstdDecompressor.write_to() | tests/test_decompressor_fuzzing.py | tests/test_decompressor_fuzzing.py | import os
try:
import unittest2 as unittest
except ImportError:
import unittest
try:
import hypothesis
import hypothesis.strategies as strategies
except ImportError:
raise unittest.SkipTest('hypothesis not available')
import zstd
from . common import (
random_input_data,
)
@unittest.skipUn... | Python | 0 | @@ -1,12 +1,22 @@
+import io%0A
import os%0A%0At
@@ -13,16 +13,16 @@
port os%0A
-
%0Atry:%0A
@@ -280,16 +280,31 @@
mport (%0A
+ make_cffi,%0A
rand
@@ -322,16 +322,1157 @@
ta,%0A)%0A%0A%0A
+@unittest.skipUnless('ZSTD_SLOW_TESTS' in os.environ, 'ZSTD_SLOW_TESTS not set')%0A@make_cffi%0Aclass TestDecompress... |
baed814d73ea645794d172614bb79f456730b42c | Fix auth providers to work around Python's broken import system. | apps/auth/providers.py | apps/auth/providers.py | # Universal Subtitles, universalsubtitles.org
#
# Copyright (C) 2012 Participatory Culture Foundation
#
# 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 3 of the
# License, ... | Python | 0 | @@ -770,41 +770,150 @@
l.%0A%0A
-%0Aauthentication_provider_registry
+from django.conf import settings%0A%0A%0Aif not hasattr(settings, 'AUTHENTICATION_PROVIDER_REGISTRY'):%0A settings.AUTHENTICATION_PROVIDER_REGISTRY
= %7B
@@ -950,21 +950,24 @@
ider(ap_
-class
+instance
):%0A i
@@ -971,21 +971,24 @@
if a... |
8f429a41f3541c5f32a9809a529dd800f7dafa0a | Fix log output for Docker daemonised | temp2dash.py | temp2dash.py | import json
import os
import requests
import sys
import time
import traceback
from temperusb import TemperHandler
URL = os.environ['DASHING_URL']
SCALE = float(os.environ['TEMP_SCALE'])
OFFSET = float(os.environ['TEMP_OFFSET'])
SENSOR = int(os.environ['TEMP_SENSOR'])
SLEEP = int(os.environ['SLEEP_TIME'])
th = TemperH... | Python | 0.000002 | @@ -519,16 +519,26 @@
FFSET)%0A%0A
+chars = 0%0A
while Tr
@@ -907,48 +907,104 @@
s
-ys.stdout.write(u
+tring = %22%22%0A if chars %3E 72:%0A chars = 0%0A string = %22%5Cn%22 %0A string +=
'%250.1f
-%25s
, ' %25
- (%0A
tem
@@ -1015,43 +1015,61 @@
ture
-,%0A
+%0A
- u'%5CN%7... |
bbd4f595fe83e9ce4881990be4c16ba53cefa5d8 | fix small bug in rewind with scavenger | solver/comeback.py | solver/comeback.py | import utils.log
class ComeBack(object):
# object to handle the decision to choose the next area when all locations have the "no comeback" flag.
# handle rewinding to try the next area in case of a stuck.
# one ComebackStep object is created each time we have to use the no comeback heuristic, used for rewi... | Python | 0.000001 | @@ -7181,27 +7181,33 @@
Area ==
-maxAreaName
+self.curSolveArea
:%0A
|
fd380c79b9644e6a51086e590812aef6e9377a22 | Add test case to reproduce dnsmasq.set_config failure in #34263 | tests/unit/modules/dnsmasq_test.py | tests/unit/modules/dnsmasq_test.py | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Rupesh Tare <rupesht@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import (
mock_open,
MagicMock,
patch,
NO_MOCK,
NO_MOCK_... | Python | 0 | @@ -1658,24 +1658,932 @@
fig(), %7B%7D)%0A%0A
+ @patch('salt.modules.dnsmasq.get_config', MagicMock(return_value=%7B'conf-dir': 'A'%7D))%0A def test_set_config_filter_pub_kwargs(self):%0A '''%0A Test that the kwargs returned from running the set_config function%0A do not contain the __pub th... |
2186fa0cb389bc8e458eb0f276bc56aefbe34a29 | add another multi-root case | tests/utils/test_floyd_warshall.py | tests/utils/test_floyd_warshall.py | import unittest
from nalaf.structures.data import Dataset, Document, Part, Token, Label, Entity
from nalaf.preprocessing.spliters import NLTKSplitter
from nalaf import print_verbose, print_debug
from nalaf.preprocessing.tokenizers import Tokenizer, NLTK_TOKENIZER, GenericTokenizer
from nalaf.features import get_spacy_n... | Python | 0.000003 | @@ -2201,16 +2201,372 @@
essed .%22
+,%0A %22Consistent with this inference , Arabidopsis or maize ( Zea mays ) PyrR ( At3g47390 or GRMZM2G090068 ) restored riboflavin prototrophy to an E. coli ribD deletant strain when coexpressed with the corresponding PyrD protein ( At4g20960 or GRMZM2G320099 ) but not when expr... |
6e9f329f5a770955370e93c926c25d511ba8b981 | Update the_ends_test/FunctionsUnitTest.py | the_ends_test/FunctionsUnitTest.py | the_ends_test/FunctionsUnitTest.py | import unittest
from the_ends.functions import function_finder
class TheEndsTestCases(unittest.TestCase):
def setUp(self):
pass
# before test cases
def tearDown(self):
pass
# after test cases
def test_isupper(self):
# example test
self.assertTrue('FOO'.isupper(... | Python | 0.000003 | @@ -56,16 +56,59 @@
_finder%0A
+import sys%0A%0Asys.path.insert(0, '/the_ends')
%0A%0Aclass
|
76829380376c31ea3f1e899770d1edffd1afc047 | Change gravatar url to use https | apps/profiles/utils.py | apps/profiles/utils.py | import hashlib
def get_gravatar_url(email):
email_hash = hashlib.md5(email.lower().encode('utf-8')).hexdigest()
return "http://www.gravatar.com/avatar/{}".format(email_hash)
| Python | 0 | @@ -127,16 +127,17 @@
rn %22http
+s
://www.g
|
c7f50eb666423ce3cc08d5e0714f4d18d672d326 | clean up test | corehq/apps/hqadmin/tests/test_utils.py | corehq/apps/hqadmin/tests/test_utils.py | from django.test import TestCase
from pillowtop.listener import BasicPillow
from corehq.apps.domain.models import Domain
from ..utils import pillow_seq_store, EPSILON
from ..models import PillowCheckpointSeqStore
def import_settings():
class MockSettings(object):
PILLOWTOPS = {'test': ['corehq.apps.hqadm... | Python | 0.000001 | @@ -25,16 +25,35 @@
TestCase
+, override_settings
%0Afrom pi
@@ -232,71 +232,122 @@
e%0A%0A%0A
-def import_settings():%0A class MockSettings(object):%0A
+class DummyPillow(BasicPillow):%0A document_class = Domain%0A%0A def run(self):%0A pass%0A%0A%0A@override_settings(
PILL
@@ -352,19 +352,1... |
11ef828a8180ba17f522e03ac198440feab40aa0 | Update version | apt_select/__init__.py | apt_select/__init__.py | __version__ = '1.0.1'
| Python | 0 | @@ -12,11 +12,11 @@
= '1.0.
-1
+2
'%0A
|
a3a408b9345291ca9a1999a779879afe0296f0a3 | Update grayscale.py | 08_Image_Processing/Color_Spaces/grayscale/grayscale.py | 08_Image_Processing/Color_Spaces/grayscale/grayscale.py | import os, cv2
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
_projectDirectory = os.path.dirname(__file__)
_imagesDirectory = os.path.join(_projectDirectory, "images")
_images = []
for _root, _dirs, _files in os.walk(_imagesDirectory):
for _file in _files:
i... | Python | 0.000001 | @@ -530,31 +530,28 @@
figure(%22
-Grayscale
+Color
Space
+s
%22)%0D%0A_gs
@@ -962,8 +962,10 @@
t.show()
+%0D%0A
|
37167a9473a99931efbc60a8e46400ed017c8fa4 | set up initial condition arrays | Assignment_5_partial_differentials/P440_Assign5_Exp2.py | Assignment_5_partial_differentials/P440_Assign5_Exp2.py | '''
Kaya Baber
Physics 440 - Computational Physics
Assignment 5 - PDEs
Exploration 2 - Parabolic PDEs: The Wave Equation
'''
import numpy as np
from numpy import linalg as LA
import matplotlib.pyplot as plt
import math
#make initial velocity array in real space
#make initial density array in real space
#fft both to f... | Python | 0.000001 | @@ -217,93 +217,450 @@
ath%0A
-%0A#make initial velocity array in real space%0A#make initial density array in real space
+import cmath%0A%0A%0A%0AL = 2.*math.pi #set the x range to (0-%3E2pi)%0AN = 1000 #number of spatial intervals and points (since it loops)%0Asteps = 1000 #number of timesteps%0AstepSize =... |
60b2c0db865fcf09636359888ead82ffc7666ae3 | Add test for failed login when user is not active | yunity/userauth/tests/test_api.py | yunity/userauth/tests/test_api.py | from django.contrib import auth
from rest_framework import status
from rest_framework.test import APITestCase
from yunity.users.factories import UserFactory
class TestUserAuthAPI(APITestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.user = UserFactory()
cls.url = '/a... | Python | 0.000001 | @@ -292,16 +292,73 @@
ctory()%0A
+ cls.disabled_user = UserFactory(is_active=False)%0A
@@ -1505,16 +1505,397 @@
.', %5D)%0A%0A
+ def test_login_as_disabled_user_fails(self):%0A data = %7B'email': self.disabled_user.email, 'password': self.disabled_user.display_name%7D%0A response = s... |
67773a4b848d14bf6e6b160eb918e036971b7f0e | Use Python 3 type syntax in zerver/webhooks/semaphore/view.py. | zerver/webhooks/semaphore/view.py | zerver/webhooks/semaphore/view.py | # Webhooks for external integrations.
from typing import Any, Dict
import ujson
from django.http import HttpRequest, HttpResponse
from django.utils.translation import ugettext as _
from zerver.decorator import api_key_only_webhook_view
from zerver.lib.actions import check_send_stream_message
from zerver.lib.request ... | Python | 0 | @@ -555,16 +555,42 @@
uest
-, user_p
+: HttpRequest, user_profile: UserP
rofi
@@ -626,16 +626,32 @@
payload
+: Dict%5Bstr, Any%5D
=REQ(arg
@@ -702,16 +702,21 @@
stream
+: str
=REQ(def
@@ -734,69 +734,8 @@
s'))
-:%0A # type: (HttpRequest, UserProfile, Dict%5Bstr, Any%5D, str)
-%3E
@@ -746,16 +746,17 @@
... |
753893ac5ddaf6b17454180cea55b2ce0b94b571 | fix comparación | account_analytic_cost_line/models/account.py | account_analytic_cost_line/models/account.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2016 Comunitea All Rights Reserved
# $Jesús Ventosinos Mayor <jesus@comunitea.com>$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | Python | 0.000102 | @@ -3155,16 +3155,19 @@
d.uom_id
+.id
:%0A
|
d9d68abe350d253d6952041d61872bd3eec5f95d | FIX after duplicating an old invoice and validating it, get The invoice date cannot be later than the date of registration | account_invoice_entry_date/models/account.py | account_invoice_entry_date/models/account.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2004-2010 ISA srl (<http://www.isa.it>).
# Copyright (C) 2014 Associazione Odoo Italia
# http://www.openerp-italia.org>
#
# This program is free software: you can redistribute it and/or m... | Python | 0.000001 | @@ -1503,16 +1503,36 @@
nt date%22
+,%0A copy=False
)%0A%0A d
|
b3c1aa9b3415240e03ae790d58df72d8442ae761 | Fix PEP8 | account_statement_so_completion/statement.py | account_statement_so_completion/statement.py | # -*- coding: utf-8 -*-
###############################################################################
# #
# Author: Joel Grand-Guillaume #
# Copyright 2011-2012 Camptocamp SA ... | Python | 0.005634 | @@ -1844,17 +1844,16 @@
mport _%0A
-%0A
from ope
@@ -1915,16 +1915,22 @@
import
+%5C%0A
ErrorToo
@@ -1949,33 +1949,32 @@
%0A%0Aclass
-a
+A
ccount
-_s
+S
tatement
_complet
@@ -1957,34 +1957,33 @@
AccountStatement
-_c
+C
ompletion_rule(o
@@ -1975,18 +1975,17 @@
mpletion
-_r
+R
ule(orm.
@@ -2166,33 +216... |
c330eabd69fd2d047d5197946dc763dea6716347 | Fix sphinx no longer works if PYTHONPATH is set (to 2.7) | test/test.py | test/test.py | #!/usr/bin/env python
"""
Test jenkinsflow.
"""
from __future__ import print_function
import sys, os, getpass, shutil, copy
major_version = sys.version_info.major
if major_version < 3:
import subprocess32 as subprocess
else:
import subprocess
from os.path import join as jp
import click
import tenjin
from te... | Python | 0 | @@ -6292,16 +6292,53 @@
ource')%0A
+ del os.environ%5B'PYTHONPATH'%5D%0A
|
8a082670b108f36f95e5c421df41ea964843d122 | Rename method | cartoframes/data/services/bq_datasets.py | cartoframes/data/services/bq_datasets.py | import os
import requests
from carto.utils import ResponseStream
# from carto.auth import APIKeyAuthClient
from carto.exceptions import CartoException
# TODO: this shouldn't be hardcoded
DO_ENRICHMENT_API_URL = 'http://localhost:7070/bq'
class BQDataset:
def __init__(self, name_id):
self.name = name_id... | Python | 0.000002 | @@ -1445,20 +1445,21 @@
def
-create_impor
+import_datase
t(se
|
872f5d997ec48b1c8eb7771ec3771f05dc27cd96 | Put in target states for each state | catching_raindrops/catching_raindrops.py | catching_raindrops/catching_raindrops.py | # catching_raindrops.py 08/03/2016 D.J.Whale
# game parameters
CUP_CAPACITY = 5
SPEED = 6
MAX_MISSES = 3
AUTO_EMPTY = False
SENSITIVITY = 400
def get_cup_position():
acc = accelerometer.get_x()/SENSITIVITY
return math.clamp(0, 4, acc+2)
def show_splash_screen():
pass # TODO show an animation until... | Python | 0.999999 | @@ -471,16 +471,21 @@
EWDROP%22%0A
+ %0A
##st
@@ -544,36 +544,49 @@
P%22:%0A
-pass
+state = %22RAINING%22
%0A %0A
@@ -620,36 +620,78 @@
G%22:%0A
-pass
+state = %22ATCUP%22%0A state = %22EMPTYING%22
%0A %0A
@@ -723,36 +723,74 @@
P%22:%0A ... |
8d8f470ad0788b1e6e91155f07b351de04051824 | add test for search by name and pagination | app/mod_bucketlists/tests/test_bucketlist.py | app/mod_bucketlists/tests/test_bucketlist.py | from app.test_config import BaseTestCase
class BucketListTestCase(BaseTestCase):
def test_creates_new_bucketlist_with_token(self):
data = {
'bucket_name': 'Christmas'
}
response = self.client.post('/bucketlists/', data=data, headers=self.token, follow_redirects=True)
s... | Python | 0 | @@ -841,32 +841,452 @@
ed', response)%0A%0A
+ def test_search_bucketlist_by_name(self):%0A response = self.client.get('/bucketlists/?q=Check', headers=self.token, follow_redirects=True)%0A%0A response = response.data.decode('utf-8')%0A self.assertIn('Checkpoint', response)%0A self.assert... |
036610f8f9830e58432e2484e49af1b4385b5056 | fix the typo | artifacia/artifacia.py | artifacia/artifacia.py | import json
import requests
class Client:
"""
This is the entry point in Python client API.
if you are going to use our API, first of all you should instanciate
client objent with your username and passwrod which you got from the dashboard.
Now start using Artifacia recommendations APIS.
"""
... | Python | 1 | @@ -3339,14 +3339,14 @@
tem%5D
+)
, %22&%22
-)
%5D)%0A
|
7855d8a4a4c3151f0b3f4da04696322cca92ee06 | fix tests | cla_frontend/apps/cla_auth/tests/urls.py | cla_frontend/apps/cla_auth/tests/urls.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import http
from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from . import base
@login_required
def test_view(request):
return http.HttpResponse('logged in')
zone_url = patt... | Python | 0.000001 | @@ -212,16 +212,66 @@
rt base%0A
+from django.core.urlresolvers import reverse_lazy%0A
%0A%0A@login
@@ -603,16 +603,191 @@
%5B1%5D%0A
+ ),%0A)%0A%0Aglobal_urls = patterns(%0A '',%0A url(r'%5Elogout/$', 'django.contrib.auth.views.logout',%0A %7B'next_page': reverse_lazy('login')%7D,%0A name='gl... |
4bc0b7981f6eaa1744c90d0c080b9678af52d624 | fix bug in picture specs | apps/project_sheet/project_pictures_specs.py | apps/project_sheet/project_pictures_specs.py | """
Specification for image manipulation throw imagekit
"""
from imagekit.specs import ImageSpec
from imagekit import processors
from imagekit.processors import ImageProcessor
from imagekit.lib import ImageColor
class Center(ImageProcessor):
"""
Generic image centering processor
"""
width = None
he... | Python | 0 | @@ -204,16 +204,24 @@
ageColor
+, Image%0A
%0A%0Aclass
|
354eea19773b652e705f68648c68c235bfa27dd7 | Fix weird naming | twisted/plugins/nanoplay_plugin.py | twisted/plugins/nanoplay_plugin.py | from zope.interface import implements
from twisted.python import usage
from twisted.plugin import IPlugin
from twisted.internet import reactor
from twisted.application import service, strports
from nanoplay import PayloadProtocol, ControlProtocol, CustomServer, Player
class Options(usage.Options):
optParameters = ... | Python | 0.030363 | @@ -1177,39 +1177,39 @@
rent(s)%0A
-payload
+control
_service = strpo
@@ -1322,39 +1322,39 @@
layer))%0A
-payload
+control
_service.setServ
|
e5603d855e22e27181890a972a329fd40a5f1989 | Structure wasn't being written by run_gamma_calculations. | twod_materials/friction/startup.py | twod_materials/friction/startup.py | import os
import math
import numpy as np
from monty.serialization import loadfn
import twod_materials.utils as utl
from pymatgen.core.structure import Structure
from pymatgen.io.vasp.inputs import Incar
import twod_materials
from twod_materials.stability.startup import get_magmom_string
PACKAGE_PATH = twod_mate... | Python | 0 | @@ -2008,24 +2008,61 @@
', 'POSCAR')
+%0A structure.to('POSCAR', 'POSCAR')
%0A%0A for x
|
25f0bd4064e527006b492a2242586c8025a2cd9d | Fix bug in normalization | athenet/algorithm/derest/layers/inception.py | athenet/algorithm/derest/layers/inception.py | from athenet.algorithm.derest.layers import DerestSoftmaxLayer,\
DerestReluLayer, DerestPoolLayer, DerestNormLayer, DerestLayer, \
DerestFullyConnectedLayer, DerestConvolutionalLayer, DerestDropoutLayer
from athenet.layers import Softmax, ReLU, PoolingLayer, LRN, \
ConvolutionalLayer, Dropout, FullyConnecte... | Python | 0.000002 | @@ -2088,21 +2088,16 @@
if
-self.
normaliz
@@ -2101,20 +2101,8 @@
lize
-_activations
:%0A
|
7f314bd4ee1602fc7ae05334ba6acc01bb2e214c | Handle case when there are no wip/ branches. | utils/update_tools/update_tools.py | utils/update_tools/update_tools.py | #!/usr/bin/env python3
"""
Semi-automated python script to maintain WIP master branches forked
from third-party tools.
The user needs to provide a location of the git project that needs to be
updated. In case the directory does not exist, the user needs to provide
the URL of the git repository.
This script takes into... | Python | 0.000001 | @@ -5292,24 +5292,45 @@
o, remote)%0A%0A
+ if branches:%0A
branches
@@ -5358,16 +5358,20 @@
anches)%0A
+
resu
@@ -5416,16 +5416,48 @@
_string)
+%0A else:%0A result = True
%0A%0A if
|
411c66bbdb9e9f270a3aff6ec2f6cdd53808a47a | Fix #1091 All contacts have the same email on add AR Contact Combos If an object has a method that overrides a field from the Schema, get priority to the value returned by the method over the value returned by the attribute from the schema. i.e Contact object (which inherits from object Person) has the field EmailAddre... | bika/lims/browser/widgets/referencewidget.py | bika/lims/browser/widgets/referencewidget.py | from AccessControl import ClassSecurityInfo
from bika.lims import bikaMessageFactory as _
from bika.lims.browser import BrowserView
from bika.lims.interfaces import IReferenceWidgetVocabulary
from bika.lims.permissions import *
from bika.lims.utils import to_unicode as _u
from bika.lims.utils import to_utf8 as _c
from ... | Python | 0 | @@ -4954,24 +4954,256 @@
olumnName'%5D%0A
+ # Prioritize method retrieval over field retrieval from schema%0A obj = p.getObject()%0A value = getattr(obj, fieldname, None)%0A if not value or hasattr(value, 'im_self'):%0A
|
b3eb2ef5e65ee18384b3d49981d604cbcf30c400 | Rename noop setup to 'noop'. | buzzmobile/tests/test_utils/rostest_utils.py | buzzmobile/tests/test_utils/rostest_utils.py | """A collection of utilities to make testing with ros less painful.
"""
import os
import random
import subprocess
import unittest
import socket
def rand_port():
"""Picks a random port number.
This is potentially unsafe, but shouldn't generally be a problem.
"""
return random.randint(10311, 12311)
... | Python | 0.000007 | @@ -515,25 +515,14 @@
def
-fake_settear(self
+noop(_
):%0A
@@ -536,16 +536,12 @@
-_ = self
+pass
%0A%0A
@@ -637,28 +637,20 @@
setup =
-fake_settear
+noop
%0A
@@ -754,20 +754,12 @@
n =
-fake_settear
+noop
%0A%0A
|
5eb11aa2a41e2d2448cf81d3ef4416a7aaf3a537 | change db location to match reinit.sh script | calebasse/settings/local_settings_example.py | calebasse/settings/local_settings_example.py |
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'calebasse.sqlite3',
}
}
| Python | 0 | @@ -99,16 +99,26 @@
alebasse
+/calebasse
.sqlite3
|
717721018eff9897d2488b48aa932fcaa3694615 | Fix crash | chatterbot/adapters/logic/closest_meaning.py | chatterbot/adapters/logic/closest_meaning.py | from chatterbot.adapters.exceptions import EmptyDatasetException
from .base_match import BaseMatchAdapter
from nltk.corpus import wordnet
from nltk.corpus import stopwords
from nltk import word_tokenize
class ClosestMeaningAdapter(BaseMatchAdapter):
def __init__(self, **kwargs):
super(ClosestMeaningAdap... | Python | 0.000011 | @@ -3517,32 +3517,49 @@
nt = statement%0A%0A
+ try:%0A
confiden
@@ -3592,32 +3592,75 @@
total_similarity
+%0A except:%0A confidence = 0
%0A%0A return
|
55d364500e92e596f3d6e1897dbd4dded2b2410c | Move skylib to 0.7.0. | apple/repositories.bzl | apple/repositories.bzl | # Copyright 2018 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | Python | 0.001424 | @@ -4089,33 +4089,33 @@
tag = %220.
-6
+7
.0%22,%0A ign
|
26d104b5758d41954d0da4a3447cc22c089c1cf0 | fix migrations | cmsplugin_iframe2/migrations/0001_initial.py | cmsplugin_iframe2/migrations/0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2017-04-01 18:26
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('cms', '0016_auto_20160608_1535'),
]
... | Python | 0.000002 | @@ -181,16 +181,45 @@
letion%0A%0A
+from ..conf import settings%0A%0A
%0Aclass M
@@ -756,28 +756,41 @@
ces=
-%5B(None, 'no class')%5D
+settings.CMSPLUGIN_IFRAME_CLASSES
, he
@@ -947,96 +947,40 @@
ces=
-%5B('200', '200 pixels'), ('400', '400 pixels'), ('800', '800 pixels'), ('100%25', '100 %25')%5D
+settings.CMSPLU... |
2ef94518cdc933e619f4809941932631213ab945 | Should be http not https | apps/comments/tests.py | apps/comments/tests.py | # -*- coding: utf-8 -*-
# Amara, universalsubtitles.org
#
# Copyright (C) 2012 Participatory Culture Foundation
#
# 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 3 of the
#... | Python | 0.999636 | @@ -2710,33 +2710,32 @@
ssertEqual(%22http
-s
://%25s/videos/%25s/
@@ -2844,17 +2844,16 @@
al(%22http
-s
://%25s/vi
|
4c96d4c2132575f89abdd3dd41eef5bb27a210e8 | Fix timezone warnings in factory.py | apps/core/factories.py | apps/core/factories.py | from factory import Faker, Iterator, SubFactory
from factory.django import DjangoModelFactory
from apps.data.factories import EntryFactory, RepositoryFactory
from . import models
class SpeciesFactory(DjangoModelFactory):
name = Faker('word')
reference = SubFactory(EntryFactory)
repository = SubFactory(R... | Python | 0.000015 | @@ -86,16 +86,50 @@
lFactory
+%0Afrom django.utils import timezone
%0A%0Afrom a
@@ -195,23 +195,209 @@
rom
-. import models
+faker import Faker as faker_Faker%0Afrom . import models%0A%0A%0Adef Get_date_with_timezone():%0A TZ = timezone.get_default_timezone()%0A fake = faker_Faker()%0A return fake.date_tim... |
53f5e4cfdf3c841cb3cb87c7a63cc9d2d24d2ae6 | error when employee res_partner relation it is false | hr_employee_catch_partner/models/hr_employee.py | hr_employee_catch_partner/models/hr_employee.py | # -*- coding: utf-8 -*-
# (c) 2016 Alfredo de la Fuente - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import models, api
class HrEmployee(models.Model):
_inherit = 'hr.employee'
@api.multi
def onchange_user(self, user_id):
user_obj = self.env['res.users'... | Python | 0.999991 | @@ -922,16 +922,57 @@
False):%0A
+ if self.address_home_id:%0A
@@ -1005,16 +1005,20 @@
search(%0A
+
@@ -1094,16 +1094,20 @@
+
('id', '
@@ -1131,16 +1131,20 @@
imit=1)%0A
+
|
322cf2ad0909b021c2f0c740943fe0e3b443d630 | Update backend | app/urlshortener/__init__.py | app/urlshortener/__init__.py | import redis
from app.urlshortener.name import getNthName
class URLShortener:
def __init__(self):
self.r = redis.StrictRedis(host='localhost', port=6379, db=0)
self.namespace = 'shorturl'
self.ttl = 60*60*24*7*2 # two weeks
def shorten(self, url, name):
existing_url = sel... | Python | 0.000001 | @@ -95,24 +95,37 @@
_init__(self
+, default_ttl
):%0A s
@@ -203,73 +203,189 @@
lf.n
-amespace = 'shorturl'%0A self.ttl = 60*60*24*7*2 # two weeks
+ew_namespace = 'lyli'%0A self.old_namespace = 'shorturl' # This can be removed on 29.11.2014 at 22:50%0A self.namespace = self.new_namespace%0... |
d8c60afae9f116bae963d91fe097eb8b7fd1f1a0 | Fix merge conflicts | bluebottle/clients/tests/test_commands.py | bluebottle/clients/tests/test_commands.py | import mock
from shutil import copyfile
<<<<<<< HEAD
=======
from django.db import connection
>>>>>>> hotfix/speed-up-tests
from django.test import TestCase
from django.test.utils import override_settings
from django.core.management import call_command
from django.conf import settings
from bluebottle.members.models i... | Python | 0.000008 | @@ -38,29 +38,8 @@
le%0A%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD%0A=======%0A
from
@@ -71,38 +71,8 @@
ion%0A
-%3E%3E%3E%3E%3E%3E%3E hotfix/speed-up-tests%0A
from
|
7ef6132194ccd207c554521209ba3472bf523940 | Make factories return unicode data | common/djangoapps/student/tests/factories.py | common/djangoapps/student/tests/factories.py | from student.models import (User, UserProfile, Registration,
CourseEnrollmentAllowed, CourseEnrollment)
from django.contrib.auth.models import Group
from datetime import datetime
from factory import DjangoModelFactory, SubFactory, PostGenerationMethodCall, post_generation, Sequence
from uuid... | Python | 0.005613 | @@ -405,16 +405,17 @@
name =
+u
'staff_M
@@ -442,16 +442,16 @@
Course'%0A
-
%0A%0Aclass
@@ -548,16 +548,17 @@
name =
+u
'Robot T
@@ -605,16 +605,17 @@
ender =
+u
'm'%0A
@@ -649,16 +649,17 @@
goals =
+u
'World d
@@ -798,16 +798,32 @@
d4().hex
+.decode('ascii')
%0A%0A%0Aclass
@@ -900,24 +900,25 @@
... |
0d1518bc9a329a8ccf6ed2559998ab8e65cbcb33 | Don't assert the response is a JSON response | argonauts/testutils.py | argonauts/testutils.py | import json
import functools
from django.conf import settings
from django.test import Client, TestCase
__all__ = ['JsonTestClient', 'JsonTestCase']
class JsonTestClient(Client):
def _json_request(self, method, url, data=None, *args, **kwargs):
method_func = getattr(super(JsonTestClient, self), method)
... | Python | 0.99848 | @@ -663,14 +663,10 @@
-assert
+if
res
@@ -713,18 +713,22 @@
n/json')
-%0A%0A
+:%0A
@@ -782,24 +782,28 @@
SET%0A
+
resp.json =
@@ -843,16 +843,17 @@
arset))%0A
+%0A
|
9be70159a8649e101cde029328fa376a621eaf98 | Fix output file name to match output directory | accre_job_submitter.py | accre_job_submitter.py | #!/usr/bin/env python3
import os
import subprocess
from uuid import uuid4
ACCRE_JOB_TEMPLATE = """\
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=1G
#SBATCH --time=0-00:30:00
#SBATCH --job-name=PCreo_Sphere
module load Anaconda3
PARAM_S=<|PARAM_S|>
PARAM_D=<|PARAM_D|>
PAR... | Python | 0.000002 | @@ -210,11 +210,11 @@
=0-0
-0:3
+1:0
0:00
@@ -245,16 +245,46 @@
o_Sphere
+%0A#SBATCH --output=slurm-%25j.out
%0A%0Amodule
|
20bbacc8683512ba877654e810a0ce65876804c7 | Use keyword to construct the help message. | appointments/handlers/new.py | appointments/handlers/new.py | from __future__ import unicode_literals
from django.db.models import Q
from django.utils.translation import ugettext_lazy as _
from .base import AppointmentHandler
from ..forms import NewMessageForm
from ..models import Timeline, TimelineSubscription, now
class NewHandler(AppointmentHandler):
"Subscribes a user... | Python | 0.000002 | @@ -402,16 +402,69 @@
esage.%22%0A
+ keyword = self.keyword.split('%7C')%5B0%5D.upper()%0A
@@ -519,19 +519,27 @@
refix)s
-NEW
+%25(keyword)s
%3CKEY%3E %3C
@@ -618,16 +618,36 @@
f.prefix
+, 'keyword': keyword
%7D%0A
@@ -1125,32 +1125,106 @@
le(self, text):%0A
+ %22Register user with... |
8b964d306f5c81ec0f2a3a17d3f03fb8adaec35d | Make checker mode a QObject | pcef/core/modes/checker.py | pcef/core/modes/checker.py | """
This module contains the checker mode, a base class for code checker modes.
"""
from pcef.core.mode import Mode
from pcef.core.system import DelayJobRunner
from pcef.core.panels.marker import Marker
from pcef.core.decoration import TextDecoration
from pcef.qt import QtCore, QtGui
#: Status value for an informatio... | Python | 0.000025 | @@ -2047,16 +2047,32 @@
ker(Mode
+, QtCore.QObject
):%0A %22
@@ -2760,32 +2760,70 @@
.__init__(self)%0A
+ QtCore.QObject.__init__(self)%0A
self.__j
|
fe288fdbb9f14715206006ba8de725bde5d6dee6 | enable id_attribute again | apps/projects/serializers.py | apps/projects/serializers.py | from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
from apps.core.serializers import MarkdownSerializerMixin
from apps.domain.models import AttributeEntity, Attribute, Option, Range, VerboseName, Condition
from apps.questions.models import Catalog, Section, Subsection, Ques... | Python | 0.000001 | @@ -3234,32 +3234,88 @@
ead_only=True)%0A%0A
+ id_attribute = serializers.SerializerMethodField()%0A%0A
class Meta:%0A
@@ -3306,32 +3306,32 @@
class Meta:%0A
-
model =
@@ -3375,32 +3375,60 @@
'id',%0A
+ 'id_attribute',%0A
'ver
@@ -3459,24 +3459,24 @@
condition... |
bbc5953cbaf29ef3421049db3c7ac00fd94c3734 | Clean up nocookie code | pelican_youtube/youtube.py | pelican_youtube/youtube.py | # -*- coding: utf-8 -*-
# Copyright (c) 2013 Kura
# 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.000411 | @@ -2195,33 +2195,34 @@
-nocookie = self.options%5B'
+youtube_domain = 'youtube-
noco
@@ -2226,17 +2226,16 @@
ocookie'
-%5D
%5C%0A
@@ -2280,75 +2280,8 @@
lse
-False%0A youtube_domain = 'youtube-nocookie' if nocookie else
'you
|
6a58541a0fe1a942c3a2c187eb0358bd8350a51f | Change default output folder of minimize-content-pack.py. | minimize-content-pack.py | minimize-content-pack.py | """
minimize-content-pack
Remove assessment items, subtitles and po files from a content pack.
Usage:
minimize-content-pack.py <old-content-pack-path> <out-path>
"""
import zipfile
from pathlib import Path
from docopt import docopt
ITEMS_TO_TRANSFER = [
"metadata.json",
"content.db",
"backend.mo",
... | Python | 0 | @@ -935,16 +935,20 @@
%22
+out/
minimal.
|
35e6559bd13f46679333e72b6356a82a0657cce4 | fix thinko in kepler test | gala/potential/potential/tests/test_against_galpy.py | gala/potential/potential/tests/test_against_galpy.py | """Test some builtin potentials against galpy"""
# Third-party
import numpy as np
from astropy.constants import G
import astropy.units as u
import pytest
# This project
from ...._cconfig import GSL_ENABLED
from ....units import galactic
from ..builtin import (KeplerPotential, MiyamotoNagaiPotential,
... | Python | 0 | @@ -1369,16 +1369,19 @@
/ u.pc)
+%5B2%5D
,%0A
@@ -1408,17 +1408,17 @@
lpy_pot.
-R
+z
force(R=
|
7073ab92491d82f23af1c61f3c68e6f29a3261c2 | Version bump. fixes #4 | assetfiles/__init__.py | assetfiles/__init__.py | __version__ = '0.5.0'
| Python | 0.000004 | @@ -14,9 +14,9 @@
'0.
-5
+6
.0'%0A
|
20f7102daf411a07ec922fceb2fac6c00356a84b | Revert "Version in function" | asgi_redis/__init__.py | asgi_redis/__init__.py | import pkg_resources
from .core import RedisChannelLayer
from .local import RedisLocalChannelLayer
def get_version():
return pkg_resources.require('asgi_redis')[0].version
| Python | 0 | @@ -97,38 +97,21 @@
er%0A%0A
-%0Adef get_version():%0A return
+__version__ =
pkg
|
ea0847a1c509b2eba1e652b597f2921b0c19da2d | Add field for name in mail dict | mail_parser.py | mail_parser.py | #!/usr/bin/env python3
# -*- coding: utf8 -*-
import os, sys
from email.parser import Parser
import json
import re
def parse_mail(file_in):
"""
Extract Subject & Body of mail file
headers must be formatted as a block of RFC 2822 style
"""
# filename_out = os.path.splitext(os.path.basenam... | Python | 0 | @@ -956,16 +956,176 @@
ody'%5D)%0A%0A
+ date = os.path.dirname(file_in).split('/').pop() + '-'%0A name = os.path.splitext(os.path.basename(file_in))%5B0%5D%0A formated_mail%5B'name'%5D = date+name%0A %0A
retu
|
ae916c1ee52941bb5a1ccf87abe2a9758897bd08 | Add deprecation warnings and message to getlines function | IPython/utils/ulinecache.py | IPython/utils/ulinecache.py | """
Wrapper around linecache which decodes files to unicode according to PEP 263.
"""
import functools
import linecache
import sys
from IPython.utils import py3compat
from IPython.utils import openpy
getline = linecache.getline
# getlines has to be looked up at runtime, because doctests monkeypatch it.
@functools.wr... | Python | 0 | @@ -1,12 +1,64 @@
%22%22%22%0A
+This module has been deprecated since IPython 6.0.%0A%0A
Wrapper
@@ -175,16 +175,42 @@
port sys
+%0Afrom warnings import warn
%0A%0Afrom I
@@ -415,16 +415,16 @@
tlines)%0A
-
def getl
@@ -460,16 +460,243 @@
=None):%0A
+ %22%22%22%0A Deprecated since IPython 6.0%0A %22%22%... |
eec612ae54010485bb53403ada88f723d9a21cc1 | Use Dict Comprehension and add criticality | InterviewSchedulerGurobi.py | InterviewSchedulerGurobi.py | from gurobipy import *
from datetime import datetime
def read_input_csv(filename):
row_header, matrix, col_header = list(), dict(), set()
with open(filename) as f:
for csvline in f:
csvline = csvline.strip()
if len(row_header) == 0:
row_header = csvline.split(',... | Python | 0.000001 | @@ -370,32 +370,67 @@
line.split(',')%0A
+ col_header.add(row%5B0%5D)%0A
for
@@ -521,46 +521,8 @@
i%5D)%0A
- col_header.add(row%5B0%5D)
%0A
@@ -1327,208 +1327,179 @@
-costs = dict()%0A%0A maxpanels = dict()%0A for c in clubs:%0A
+# Find out max number of ... |
59f324229acfab30811cc61b3880770292699a6d | update country in email to group | tola/util.py | tola/util.py | import unicodedata
import urllib2
import json
import sys
from activitydb.models import Country, TolaUser
from django.contrib.auth.models import User
from django.core.mail import send_mail, mail_admins, mail_managers, EmailMessage
#CREATE NEW DATA DICTIONARY OBJECT
def siloToDict(silo):
parsed_data = {}
key_v... | Python | 0.000001 | @@ -3157,15 +3157,8 @@
iter
- + %22, %22
)%0A
|
59936f52f319073324cda22707464728bcd9bbf3 | Update Internet.hexip to handle IPv6 | plugins/Internet/plugin.py | plugins/Internet/plugin.py | ###
# Copyright (c) 2003-2005, Jeremiah Fincher
# Copyright (c) 2010-2011, James Vega
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above c... | Python | 0 | @@ -6258,32 +6258,86 @@
IP.%0A %22%22%22%0A
+ ret = %22%22%0A if utils.net.isIPV4(ip):%0A
quads =
@@ -6350,37 +6350,24 @@
it('.')%0A
- ret = %22%22%0A
for
@@ -6393,16 +6393,20 @@
+
i = int(
@@ -6419,24 +6419,28 @@
+
+
ret += '%2502x... |
04065919be55d8e4371cc1e7fec1a0148298ccf7 | throw if obj is not serializable | mygeotab/serializers.py | mygeotab/serializers.py | # -*- coding: utf-8 -*-
"""
mygeotab.serializers
~~~~~~~~~~~~~~~~~~~~
JSON serialization and deserialization helper objects for the MyGeotab API.
"""
import re
import arrow
import six
use_rapidjson = False
try:
import rapidjson
DATETIME_MODE = rapidjson.DM_SHIFT_TO_UTC | rapidjson.DM_ISO8601
use_rapi... | Python | 0.000008 | @@ -1061,19 +1061,93 @@
j) else
-obj
+raise TypeError(%22Unserializable object %7B%7D of type %7B%7D%22.format(obj, type(obj)))
%0A%0A%0Adef o
|
c2c4e47f5cdae6e683e87dcc8c7b536633755c5a | fix with black formatter | examples/distribuited_execution_terraform/aws/plan/basic.py | examples/distribuited_execution_terraform/aws/plan/basic.py | import time
from locust import HttpUser, task, between
class Quickstart(HttpUser):
wait_time = between(1, 5)
@task
def google(self):
self.client.request_name = "google"
self.client.get("https://google.com/")
@task
def microsoft(self):
self.client.request_name = "microsoft"... | Python | 0.000029 | @@ -49,16 +49,17 @@
etween%0A%0A
+%0A
class Qu
|
c43bfe9bdec958b18573a9d0fa87cd6a881d6281 | Fix python 3 compatibility issue for StringIO | test/test_provider_object_store_service.py | test/test_provider_object_store_service.py | import StringIO
import uuid
from test.helpers import ProviderTestBase
import test.helpers as helpers
class ProviderObjectStoreServiceTestCase(ProviderTestBase):
def __init__(self, methodName, provider):
super(ProviderObjectStoreServiceTestCase, self).__init__(
methodName=methodName, provider... | Python | 0.000004 | @@ -1,19 +1,120 @@
-import StringIO
+# Python 3 compatibility fix%0Atry:%0A from StringIO import StringIO%0Aexcept ImportError:%0A from io import StringIO%0A
%0Aimp
@@ -4002,17 +4002,8 @@
m =
-StringIO.
Stri
|
a967fbb3b38e0788ccbde0650076ab05e693806a | Bump version number. | nativeconfig/version.py | nativeconfig/version.py | VERSION = '2.9.1'
| Python | 0 | @@ -8,11 +8,11 @@
= '
-2.9.1
+3.0.0
'%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.