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 |
|---|---|---|---|---|---|---|---|
2a63c3cc4a795e23ff00d7c2273ee40939ec3dea | mark string literal as regex to avoid runtime warning in python 3 | custom/aaa/urls.py | custom/aaa/urls.py | from __future__ import absolute_import
from __future__ import unicode_literals
from django.conf.urls import url, include
from custom.aaa.views import (
AggregationScriptPage,
LocationFilterAPI,
ProgramOverviewReport,
ProgramOverviewReportAPI,
UnifiedBeneficiaryReport,
UnifiedBeneficiaryReportAP... | Python | 0.000008 | @@ -611,32 +611,33 @@
url(%0A
+r
'%5Eunified_benefi
|
0240627e799672a3386202523015949588834ae2 | Update Sanctions test to reflect new _on_reject behavior | tests/test_registrations/test_models.py | tests/test_registrations/test_models.py | # -*- coding: utf-8 -*-
"""Unit tests for models and their factories."""
from nose.tools import * # noqa (PEP8 asserts)
import mock
from modularodm import Q
import datetime as dt
from website.models import MetaSchema, DraftRegistrationApproval
from tests.factories import (
UserFactory, ApiOAuth2ApplicationFact... | Python | 0 | @@ -6464,103 +6464,8 @@
%7B%7D)%0A
- assert_is_none(self.draft.approval)%0A assert_false(self.draft.is_pending_review)%0A
|
b86d157579b4e625bbe73dfa2d8dd7f24a787394 | debug fix fix | hyml/ext.py | hyml/ext.py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright (c) Marko Manninen <elonmedia@gmail.com>, 2017
#
# entry_points = """
# [babel.extractors]
# hyml = hyml.ext:babel_extract
# """
#
# should be added to distutils setup.py file and then:
#
# [hyml: **.hyml]
# [hyml: **.hy]
# extensions=hyml.ext.babel_extra... | Python | 0.000002 | @@ -1977,19 +1977,28 @@
rint(1,
-e,
+str(e), str(
readerma
@@ -1993,32 +1993,33 @@
str(readermacro)
+)
%0A if e ==
@@ -2106,25 +2106,17 @@
int(
-2, d, readermacro
+1, str(d)
)%0A
|
e7ae8140beb50e3091c0bd7ad1db4535540c95df | remove copyright | cwready/cwready.py | cwready/cwready.py | """
Clan War Readiness
"""
# -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2017 SML
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 limita... | Python | 0 | @@ -25,1112 +25,8 @@
%22%22%0A%0A
-# -*- coding: utf-8 -*-%0A%0A%22%22%22%0AThe MIT License (MIT)%0A%0ACopyright (c) 2017 SML%0A%0APermission is hereby granted, free of charge, to any person obtaining a%0Acopy of this software and associated documentation files (the %22Software%22),%0Ato deal in the Software without r... |
a8339f5a1393745f17eae5d287a85c7212d47789 | Remove break in def | tictactoe.py | tictactoe.py | from logishort import *
from getch import *
from logipy import logi_led
from logimap import logimap
import time
class TicTacToe:
def __init__(self):
init()
time.sleep(1)
self.accepted_keys = {
't':[0x14, 0, 0],
'y':[0x15, 0, 1],
'u':[0x16, 0, 2],
... | Python | 0.00005 | @@ -712,24 +712,28 @@
%0A if
+not
self.ended:
@@ -735,15 +735,13 @@
ded:
- break%0A
+%0A
@@ -803,32 +803,36 @@
b':%0A
+
self.someone_won
@@ -851,32 +851,36 @@
(c)%0A
+
+
self.turn_count
@@ -884,16 +884,20 @@
nt += 1%0A
+
@@ -969,32 +969,36 @@
9... |
48e66346dd12faa5cbecc052b877a847b5285e43 | disable a unit test for python 2.7 | _unittests/ut_pycode/test_pip_helper.py | _unittests/ut_pycode/test_pip_helper.py | """
@brief test tree node (time=2s)
"""
import sys
import os
import unittest
import re
import shutil
import warnings
import pandas
try:
import src
except ImportError:
path = os.path.normpath(
os.path.abspath(
os.path.join(
os.path.split(__file__)[0],
".... | Python | 0.000003 | @@ -1270,16 +1270,45 @@
ecutable
+ and sys.version_info%5B0%5D %3E= 3
:%0A
|
0e13bf2b23df3584109fcf9b62710efbb81b2226 | exit with help if no subcommand is supplied. | iacli/ia.py | iacli/ia.py | #!/usr/bin/env python
"""A command line interface for Archive.org.
usage:
ia [--debug] <command> [<args>...]
ia --help
ia --version
options:
-h, --help
-v, --version
-d, --debug [default: True]
commands:
help Retrieve help for subcommands.
configure Configure `ia`.
metadata ... | Python | 0 | @@ -83,18 +83,40 @@
%5B--debug
+ %7C --help %7C --version
%5D
+%5B
%3Ccommand
@@ -116,16 +116,17 @@
command%3E
+%5D
%5B%3Cargs%3E
@@ -133,39 +133,8 @@
...%5D
-%0A ia --help%0A ia --version
%0A%0Aop
@@ -1850,181 +1850,19 @@
elp'
-:%0A if not args%5B'%3Cargs%3E'%5D:%0A call(%5B'ia', '--h... |
f46731c1bfd3be6e7d66b4a1078ca09460d25af5 | Add OCA as author of OCA addons | account_partner_required/__openerp__.py | account_partner_required/__openerp__.py | # -*- encoding: utf-8 -*-
##############################################################################
#
# Account partner required module for OpenERP
# Copyright (C) 2014 Acsone (http://acsone.eu).
# @author Stéphane Bidoul <stephane.bidoul@acsone.eu>
#
# This program is free software: you can redistribu... | Python | 0 | @@ -1651,17 +1651,17 @@
uthor':
-'
+%22
ACSONE S
@@ -1664,17 +1664,50 @@
NE SA/NV
-'
+,Odoo Community Association (OCA)%22
,%0A 'w
|
8660650210eee8e7b2784cff5aad4e14c1edd4fc | Rename _apply_validator_chain argument | chassis/util/params.py | chassis/util/params.py | """Utility Parameter Tools for Chassis Applications."""
import six
from tornado import web
from chassis.util import decorators
from chassis.util import validators
def _fetch_arguments(handler, method):
"""Get the arguments depending on the type of HTTP method."""
if method.__name__ == 'get':
argume... | Python | 0.000065 | @@ -868,27 +868,21 @@
r_chain(
-_validators
+chain
, value,
@@ -955,35 +955,29 @@
if hasattr(
-_validators
+chain
, 'validate'
@@ -1005,34 +1005,22 @@
-_validators = %5B_validators
+chain = %5Bchain
, %5D%0A
@@ -1028,17 +1028,16 @@
for
-_
validato
@@ -1041,24 +1041,17 @@
ator
-s
in
-_validators
+... |
8bcc13c082fd366b3e4f7e93d4cf31a99846418d | Add comment about folsom compatibility change | ceilometer/service.py | ceilometer/service.py | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Copyright © 2012 eNovance <licensing@enovance.com>
#
# Author: Julien Danjou <julien@danjou.info>
#
# 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 Lice... | Python | 0.000001 | @@ -793,16 +793,261 @@
tError:%0A
+ # NOTE(dhellmann): We want to try to maintain compatibility%0A # with folsom for the time being, so set the name nova_config%0A # to a sentinal we can use to trigger different behavior%0A # when we try to set up the configuration object.%0A
nova
@@ -3005,24 +3005,26... |
15785b306557bb81643270415944ca1bda3ae0a8 | Remove database_project_name from api | dbaas_zabbix/dbaas_api.py | dbaas_zabbix/dbaas_api.py | # -*- coding: utf-8 -*-
class DatabaseAsAServiceApi(object):
def __init__(self, databaseinfra, credentials):
self.databaseinfra = databaseinfra
self.credentials = credentials
@property
def user(self):
return self.credentials.user
@property
def password(self):
retu... | Python | 0.000019 | @@ -1755,119 +1755,4 @@
ame%0A
-%0A @property%0A def database_project_name(self):%0A return self.databaseinfra.databases.get().project.name%0A
|
fac00c413d446a875000d11707755ccc6111b25b | Allow allura_import.py to find the dependent libraries in ../Allura | scripts/allura_import.py | scripts/allura_import.py | import os
import sys
import urllib
import urllib2
import urlparse
import hmac
import hashlib
import json
from optparse import OptionParser
from pprint import pprint
from datetime import datetime
from allura.lib.import_api import AlluraImportApiClient
def main():
optparser, options, args = parse_options()
im... | Python | 0 | @@ -189,16 +189,124 @@
tetime%0A%0A
+import os.path%0AscriptDir=os.path.dirname(__file__)%0Asys.path.append(os.path.join(scriptDir, '..', 'Allura'))%0A
from all
|
8fb8dc0734e91f2a2037c6446e36174e9878a4b6 | fix EndOfInfo | merc/features/rfc1459/info.py | merc/features/rfc1459/info.py | import collections
import datetime
from merc import util
from merc import feature
from merc import message
INFO_TEMPLATE = """\
____
__/ / /___ _ ___ ________
/_ . __/ ' \/ -_) __/ __/
/_ __/_/_/_/\__/_/ \__/
/_/_/
The Modern Extensible Relay Chat daemon, version {version}.
Copyright (C) {year}, #me... | Python | 0.000001 | @@ -1267,17 +1267,17 @@
ARITY =
-2
+1
%0A%0A def
@@ -1294,14 +1294,8 @@
elf,
- line,
rea
@@ -1327,37 +1327,16 @@
*args):%0A
- self.line = line%0A
self
|
4cbcb3ede718249b78b46ac0572d0e6c6c8c88b9 | Fix currency compute | bin/addons/base/res/res_currency.py | bin/addons/base/res/res_currency.py | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
#
# $Id: account.py 1005 2005-07-25 08:41:42Z nicoe $
#
# WARNING: This program as such is intended to be used by professional
# programme... | Python | 0.056095 | @@ -2692,19 +2692,31 @@
m_amount
+, round=True
):%0A
-
%09%09if to_
@@ -2770,17 +2770,16 @@
mount%0A%09%09
-%5B
from_cur
@@ -2787,19 +2787,20 @@
ency
-%5D
=self.
-read
+browse
(cr,
@@ -2828,12 +2828,14 @@
id%5D)
+%5B0%5D
%0A%09%09
-%5B
to_c
@@ -2845,17 +2845,16 @@
ency
-%5D
= self.
read
@@ -2849,20 +2849... |
f5c34b40c42490e5cf1bc5a67178a5fe9e0e635c | refactor _add_quicklink_context | myuw/views/page.py | myuw/views/page.py | import re
import logging
import traceback
from django.http import HttpResponseRedirect
from django.shortcuts import render
from django.contrib.auth import logout as django_logout
from django.conf import settings
from myuw.dao.term import get_current_quarter
from myuw.dao.affiliation import get_all_affiliations
from myu... | Python | 0.001025 | @@ -2672,24 +2672,73 @@
rr%22%5D = None%0A
+ affiliations = get_all_affiliations(request)%0A
context%5B
@@ -2763,24 +2763,16 @@
ons%22%5D =
-get_all_
affiliat
@@ -2775,25 +2775,16 @@
liations
-(request)
%0A%0A co
@@ -4352,39 +4352,44 @@
icklink_context(
-request
+affiliations
, context)%0A%0A
@@ ... |
518ee3265b619c763c20394baa046f18dbfb08d9 | Fix bug | my-ACG/util/ani_gamer_com_tw_animeVideo.py | my-ACG/util/ani_gamer_com_tw_animeVideo.py | import argparse
import logging
import re
import pywikibot
import requests
from bs4 import BeautifulSoup
class AniGamerComTwAnimeVideo:
RATING_IMG = {
'ALL': 0,
'6TO12': 6,
'12TO18': 12,
'15TO18': 15,
'18UP': 18,
}
RATING_ITEM = {
0: 'Q46',
6: 'Q47',... | Python | 0.000001 | @@ -1793,16 +1793,19 @@
.error('
+%5Ct
No anime
@@ -3586,75 +3586,71 @@
-if 'P27' in claims:%0A new_episodes = data%5B'episodes'%5D
+new_episodes = data%5B'episodes'%5D%0A if 'P27' in claims:
%0A
|
3b89f8df57fd345e873d87df7f342fe6a01b49ce | Fix config import from __init__ | darwin/__init__.py | darwin/__init__.py |
from .logger import setup_logging
setup_logging()
| Python | 0 | @@ -1,14 +1,20 @@
%0Afrom
+.utils
.logger
|
75a2c762ac9714363955530c6908efcc1df95567 | Improve consistency in the python example | bindings/python/test-integration.py | bindings/python/test-integration.py | #!/usr/bin/env python
import gtk
from igemacintegration import *
class MainWindow(gtk.Window):
def __init__(self):
gtk.Window.__init__(self)
self.set_default_size(400, 300)
vbox = gtk.VBox(False, 0)
self.add(vbox)
vbox.pack_start(gtk.Label("Some content here"), True, Tru... | Python | 0.000008 | @@ -1830,24 +1830,27 @@
ion%0A
+mac
dock = MacDo
@@ -1854,32 +1854,35 @@
cDock()%0A
+mac
dock.connect('qu
@@ -1930,16 +1930,19 @@
+mac
dock.con
@@ -2041,23 +2041,29 @@
self.
+mac
dock =
+mac
dock%0A
|
e972a2436807ff0f5af4282a7842451e07807e5e | bump to 0.0.8 | chacractl/__init__.py | chacractl/__init__.py | config = {'verbosity': 'info'}
__version__ = '0.0.7'
| Python | 0 | @@ -48,7 +48,7 @@
0.0.
-7
+8
'%0A
|
a31f4ff2fe25b2ac9844590912f4c851db131aa4 | Update brocade_fastiron_telnet.py | netmiko/brocade/brocade_fastiron_telnet.py | netmiko/brocade/brocade_fastiron_telnet.py | from __future__ import unicode_literals
import re
import time
from netmiko.cisco_base_connection import CiscoBaseConnection
class BrocadeFastironTelnet(CiscoBaseConnection):
"""Brocade FastIron aka ICX support."""
def session_preparation(self):
self.protocol = 'telnet'
"""FastIron requires to ... | Python | 0.000718 | @@ -5339,11 +5339,12 @@
g =
-Tru
+Fals
e%0A
|
fe47ba3a235f5b7e265e1e7cb3f1769467ca29db | Handle configuration better | cog/config.py | cog/config.py | # -*- coding: utf-8 -*-
# Copyright (c) 2013, Activision Publishing, Inc.
# the cog project is free software under 3-clause BSD licence
# see the LICENCE file in the project root for copying terms
# process configuration files
import os, sys
import yaml
import cog.util as util
user_settings_dir = os.environ['HOME'... | Python | 0.000001 | @@ -277,32 +277,30 @@
util%0A%0Auser_
-settings
+config
_dir = os.en
@@ -335,37 +335,250 @@
og'%0A
-sys_settings_dir = '/etc/cog'
+config_files = %5B%5D%0Atemplate_files = %5B%5D%0Afor config_dir in %5B'/etc/cog', '/usr/local/etc/cog'%5D:%0A if os.path.exists(config_dir):%0A config_files.append(config_dir... |
d88dcaa6e1256452715aa5071cbe326233f03195 | format model args | rest_framework_tracking/base_models.py | rest_framework_tracking/base_models.py | from django.db import models
from django.conf import settings
from django.utils.six import python_2_unicode_compatible
from .managers import PrefetchUserManager
@python_2_unicode_compatible
class BaseAPIRequestLog(models.Model):
""" Logs Django rest framework API requests """
user = models.ForeignKey(
... | Python | 0.000001 | @@ -375,16 +375,24 @@
ET_NULL,
+%0A
null=Tr
|
5db261f29cd654605df856d221ce511eeac0aad0 | remove metadata-root-ca.cer | setup_app/installers/fido.py | setup_app/installers/fido.py | import os
import glob
import shutil
from setup_app import paths
from setup_app.utils import base
from setup_app.static import AppType, InstallOption
from setup_app.config import Config
from setup_app.installers.jetty import JettyInstaller
class FidoInstaller(JettyInstaller):
def __init__(self):
setattr(b... | Python | 0.000459 | @@ -3177,232 +3177,8 @@
r)%0A%0A
- # Fido2 MDS TOC cert%0A self.copyFile(%0A os.path.join(Config.install_dir, 'static/fido2/mds_toc_cert/metadata-root-ca.cer'),%0A os.path.join(self.fido2ConfigFolder, 'mds/cert')%0A )%0A%0A
|
1b0b96d78d03af813b10359e1ee7d7dd47045307 | Correct URL to include entire base for API client | changes/api/client.py | changes/api/client.py | import json
from flask import current_app
class APIError(Exception):
pass
class APIClient(object):
"""
An internal API client.
>>> client = APIClient(version=0)
>>> response = client.get('/projects/')
>>> print response
"""
def __init__(self, version):
self.version = versio... | Python | 0 | @@ -379,16 +379,18 @@
url = '
+%25s
/api/%25d/
@@ -396,16 +396,48 @@
/%25s' %25 (
+current_app.config%5B'BASE_URI'%5D,
self.ver
@@ -467,24 +467,20 @@
-client =
+with
current
@@ -497,25 +497,39 @@
client()
-%0A
+ as client:%0A
response
@@ -520,16 +520,17 @@
+
response
@@ -544... |
81fb181fc3bc7a6866340ac9004004ef438608d7 | remove trailing period, fix grammar | boxoffice/models/discount_policy.py | boxoffice/models/discount_policy.py | # -*- coding: utf-8 -*-
import string
import random
from datetime import datetime
from werkzeug import cached_property
from itsdangerous import Signer, BadSignature
from sqlalchemy import event
from baseframe import __
from coaster.utils import LabeledEnum, uuid1mc, buid
from boxoffice.models import db, IdMixin, BaseS... | Python | 0.999901 | @@ -5091,16 +5091,17 @@
discount
+s
MUST ha
@@ -5127,17 +5127,16 @@
ted item
-.
%22)%0A%0A%0Adef
|
fa19f7bee1f8b0cd19790b12779ad362feec26a4 | Fix Brand.has_products() so it's not always True | satchmo/apps/satchmo_ext/brand/models.py | satchmo/apps/satchmo_ext/brand/models.py | from django.conf import settings
from django.contrib.sites.models import Site
from django.db import models
from django.utils.translation import ugettext_lazy as _
from l10n.mixins import TranslatedObjectMixin
import product
from product.models import Product
from satchmo_utils.thumbnail.field import ImageWithThumbnailF... | Python | 0.003399 | @@ -2001,24 +2001,26 @@
ucts().count
+()
%3E 0%0A
|
70f7e516755063864b7e3a52816a64eb071436ce | Change ExtendedUser to CustomUser & set default content type back to text/html. | restfulwebapisite/settings/defaults.py | restfulwebapisite/settings/defaults.py | """Django settings for restfulwebapisite project."""
import os
# To help us extend the defaults instead of overriding them with hardcoded values.
from django.conf import global_settings as DEFAULT_SETTINGS
PROJECT_PATH = os.path.abspath(os.path.join(os.path.join(os.path.dirname(__file__).replace('\\','/'), '..'), '.... | Python | 0 | @@ -5949,16 +5949,14 @@
nts.
-Extended
+Custom
User
@@ -6126,16 +6126,17 @@
######%0A%0A
+#
DEFAULT_
|
2ab57fd58150d9416986eb089430fcd090c9cc31 | Fix ipynb tests | binstar_client/inspect_package/ipynb.py | binstar_client/inspect_package/ipynb.py | import os
import re
import time
from ..utils.notebook.inflection import parameterize
from ..utils.notebook.data_uri import data_uri_from
class IPythonNotebook(object):
_name = None
_version = None
thumbnail_file = None
def __init__(self, filename, fileobj, *args, **kwargs):
self.filename = fi... | Python | 0.000002 | @@ -1572,24 +1572,96 @@
mbnail_file)
+%0A else:%0A ipython_notebook = IPythonNotebook(filename, fileobj)
%0A%0A packag
|
6672e556ecd82725cff5a3920bc5a537ccd91fab | Update radio.py | cogs/radio.py | cogs/radio.py | from .utils import config, checks, formats
import discord
from discord.ext import commands
import discord.utils
from .utils.api.pycopy import Copy
import random, json, asyncio
from urllib.parse import unquote
class Radio:
"""The radio-bot related commands."""
def __init__(self, bot):
self.... | Python | 0.000001 | @@ -4501,20 +4501,20 @@
en(self.
-file
+song
s)))%0D%0A
|
9cdd74a6f94ec2f7272cc66c5f5e9ff3e0999b40 | Extend bb_component test | bluebottle/common/tests/templatetags.py | bluebottle/common/tests/templatetags.py | from django.template import Template, Context, TemplateSyntaxError
import unittest
class BlockVerbatimTestCase(unittest.TestCase):
"""
Testcase testing the block_verbatim template tag.
block_verbatim parses other template tags while leaving {{foo}} structures
untouched. {% block %} inside block_ver... | Python | 0.000001 | @@ -3809,16 +3809,39 @@
=%5C'bar%5C'
+ valueBinding=%5C'title%5C'
errors=
@@ -4051,32 +4051,88 @@
bar%5C'', result)%0A
+ self.assertIn('valueBinding=%5C'title%5C'', result)%0A
self.ass
|
b85b2da345be12be400ebbdd33c7f04aaf3e51cf | Fix processing script to handle compound nodes with ports | scripts/graph-process.py | scripts/graph-process.py | #!/usr/bin/env python3
import sys
import re
import collections
import argparse
import json
parser = argparse.ArgumentParser(description='Merge connection graph and forest data.')
parser.add_argument('forest', type=str, help='json file containing forest')
parser.add_argument('graph', type=str, help='graphviz dot file c... | Python | 0.000021 | @@ -446,18 +446,21 @@
nodes =
-%5B%5D
+set()
%0A
@@ -764,24 +764,31 @@
out += node
+s%5Bnode%5D
.print(inden
@@ -803,112 +803,354 @@
-out += ' ' * indent + '%7D%5Cn'%0A return out%0A%0A def add(self, node):%0A self.nodes.append(node)
+if not self.nodes:%0A out += '%25d%5Bl... |
acc0cf7a9e44ca11384d7d2b0dcd743af6e99ef9 | Update version to 1.0.3 | chatterbot/__init__.py | chatterbot/__init__.py | """
ChatterBot is a machine learning, conversational dialog engine.
"""
from .chatterbot import ChatBot
__version__ = '1.0.2'
__author__ = 'Gunther Cox'
__email__ = 'gunthercx@gmail.com'
__url__ = 'https://github.com/gunthercox/ChatterBot'
__all__ = (
'ChatBot',
)
| Python | 0 | @@ -121,9 +121,9 @@
1.0.
-2
+3
'%0A__
|
52ab9eeaca097890e58c89acb4d85e5e0be2e86b | Refactor a method to perform only one functionality | sqlitebiter/_table_creator.py | sqlitebiter/_table_creator.py | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
import simplesqlite
from sqliteschema import SqliteSchemaExtractor
class TableCreator(object):
def __init__(self, logger, dst_con):
self.__logger = log... | Python | 0.000007 | @@ -404,16 +404,135 @@
+con_mem = simplesqlite.connect_sqlite_memdb()%0A con_mem.create_table_from_tabledata(tabledata=tabledata)%0A
is_renam
@@ -532,25 +532,16 @@
s_rename
-, con_mem
= self.
@@ -563,25 +563,45 @@
e_table(
-tabledata
+con_mem, tabledata.table_name
)%0A
@@ -1469,139 ... |
287b7b57056201d1d68c6d3cc963f1b2af2f7e83 | Update scripts/alerts/validate_alerts_format.py | scripts/alerts/validate_alerts_format.py | scripts/alerts/validate_alerts_format.py | import sys
import yaml
import json
from google.cloud import monitoring_v3
def check_json_in_metadata(path, file_id, file_version):
metadata_path = "/".join(path.split("/")[:-1]) + "/metadata.yaml"
check_metadata_entries(metadata_path)
f = open(metadata_path)
data = yaml.safe_load(f)
templates_metadata = data... | Python | 0 | @@ -1,12 +1,24 @@
+import json%0A
import sys%0Ai
@@ -28,28 +28,16 @@
rt yaml%0A
-import json%0A
from goo
|
d7df17b2f5bb8ce2d66eab8e23a9bdedcbb631bf | update IGDomain.__init__() for no element groups | sfepy/discrete/iga/domain.py | sfepy/discrete/iga/domain.py | """
Computational domain for isogeometric analysis.
"""
import os.path as op
import numpy as nm
from sfepy.base.base import assert_, Struct
from sfepy.discrete.common.domain import Domain
import sfepy.discrete.iga as iga
import sfepy.discrete.iga.io as io
from sfepy.discrete.iga.extmods.igac import eval_in_tp_coors
... | Python | 0.000012 | @@ -4621,67 +4621,8 @@
esh%0A
- from sfepy.discrete.fem.extmods.cmesh import CMesh%0A
@@ -4676,16 +4676,16 @@
e_remap%0A
+
%0A
@@ -5035,16 +5035,8 @@
n_el
-, n_gr=1
)%0A%0A
@@ -5292,34 +5292,23 @@
h =
-CMesh.from_mesh(self.
+self.mesh.c
mesh
-)
%0A
@@ -5624,16 +5624,16 @@
tems():%0A
+
... |
a1ea4cde0e82a882cb3c1c4a5d011092e4bae2e9 | fix flake8 errors | boards/opencm904/dist/robotis-loader.py | boards/opencm904/dist/robotis-loader.py | #!/usr/bin/env python
'''
MIT License
Copyright (c) 2014 Gregoire Passault
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, co... | Python | 0.999995 | @@ -1874,16 +1874,17 @@
d line%0A#
+
if len(s
@@ -1899,16 +1899,17 @@
!= 3:%0A#
+
exit
@@ -1963,16 +1963,17 @@
ary%3E')%0A#
+
pgm, por
@@ -2575,32 +2575,46 @@
, size))%0Aexcept:
+ # noqa: E722
%0A exit('! Una
@@ -2724,16 +2724,30 @@
%0Aexcept:
+ # noqa: E722
%0A exi
@@ -2931,9 +2931,8 @@
1.0)... |
fac1e1bbe26e0fb7b82d65e48619cacc742ea747 | Update default path | notebooks/utils/data_loading.py | notebooks/utils/data_loading.py | """Wrappers to simplify data loading."""
import pandas as pd
# Set default path
DEFAULT_PATH = '../datasets/raw/'
def load_users_data(path=DEFAULT_PATH, preprocessed=False):
"""Load users data into train and test users.
Parameters
----------
path: str
Path of the folder containing the data.... | Python | 0.000001 | @@ -98,20 +98,16 @@
'../data
-sets
/raw/'%0A%0A
|
95c1b7bb737db7ded2980ce2a378d3e5d3d5ed4f | Test admin create new user | billjobs/tests/tests_user_admin_api.py | billjobs/tests/tests_user_admin_api.py | from django.test import TestCase
from django.contrib.auth.models import User
from rest_framework import status
from rest_framework.test import APIClient, APIRequestFactory, \
force_authenticate
from billjobs.views import UserAdmin, UserAdminDetail
class UserAdminAPI(TestCase):
""" Test User Admin API REST ... | Python | 0 | @@ -248,16 +248,28 @@
inDetail
+%0Aimport json
%0A%0Aclass
@@ -2549,9 +2549,538 @@
IDDEN)%0A%0A
+ def test_admin_create_user(self):%0A request = self.factory.post('/billjobs/users/',%0A json.dumps(%7B%0A 'username': 'new_user',%0A 'email': 'new@jobs.org... |
94f3b24fb711aa4554ededfc126e8f637e89acfc | use shell=True on Windows | build/util/lastchange.py | build/util/lastchange.py | #!/usr/bin/env python
# Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
lastchange.py -- Chromium revision fetching utility.
"""
import optparse
import os
import subprocess
import sys
class Version... | Python | 0.004337 | @@ -1756,32 +1756,91 @@
cwd=directory
+,%0A shell=(sys.platform=='win32')
)%0A except OSErr
|
d03571b523ba125be94d68bc50cda74a9a934d6f | fix documents | chainer/functions/evaluation/r2_score.py | chainer/functions/evaluation/r2_score.py | from chainer import cuda
from chainer import function
from chainer.utils import type_check
class R2_score(function.Function):
def __init__(self, sample_weight, multioutput):
if sample_weight is not None:
raise NotImplementedError()
if multioutput in ['uniform_average', 'raw_values']:
... | Python | 0.000086 | @@ -1546,24 +1546,25 @@
arget values
+.
%0A tru
@@ -1654,16 +1654,17 @@
values
+.
%0A
@@ -1681,28 +1681,19 @@
ight: No
-tImplemented
+ne.
%0A
@@ -2233,16 +2233,17 @@
entiable
+.
%0A%0A %22%22
|
9c7373a519a61d9a5511d212d94898f1a091e2e8 | Add custom_vars_list argument for WebRTCFactory. | scripts/master/factory/webrtc_factory.py | scripts/master/factory/webrtc_factory.py | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from master.factory import chromium_factory
from master.factory import gclient_factory
from master.factory import chromium_commands
import config
clas... | Python | 0.000002 | @@ -778,16 +778,54 @@
st=None,
+ custom_vars_list=None,%0A
nohooks
@@ -1278,16 +1278,88 @@
eckout.%0A
+ custom_vars_list: List of tuples specifying custom GYP variables.%0A
cu
@@ -2031,33 +2031,83 @@
tom_vars_list =
-%5B
+custom_vars_list or %5B%5D%0A custom_vars_list.append(
self.CU... |
d6c20476bebed1265ccd0ac46e3020fdb3804bdd | Add type to command serialization | changes/api/serializer/models/command.py | changes/api/serializer/models/command.py | from changes.api.serializer import Serializer, register
from changes.models import Command
@register(Command)
class CommandSerializer(Serializer):
def serialize(self, instance, attrs):
return {
'id': instance.id.hex,
'name': instance.label,
'status': instance.status,
... | Python | 0.000002 | @@ -476,16 +476,51 @@
ce.cwd,%0A
+ 'type': instance.type,%0A
|
1c061f786cd702cc56a5e2fdc4ece9d1cb9c83b6 | fix the print method and fix the docstring of the migrate script | scripts/migrate_github_oauth_settings.py | scripts/migrate_github_oauth_settings.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Script to migrate nodes with invalid categories."""
import sys
import mock
from nose.tools import *
from framework.mongo import database
from website.app import init_app
from tests.base import OsfTestCase
from website.addons.github.api import GitHub
from website.add... | Python | 0.000001 | @@ -64,36 +64,77 @@
ate
-nodes with invali
+addongithubusersettings an
d c
+re
ate
-gorie
+ and attach addongithuboauthsetting
s.%22%22
@@ -2573,33 +2573,33 @@
print
-
+(
%22===AddonGithubU
@@ -2604,33 +2604,36 @@
bUserSettings===
-%22
+%5Cn%22)
%0A pri
@@ -2626,33 +2626,33 @@
... |
732d83b105ae27636bc3f97479732dff5c4b9331 | Fix typo | D20/Server.py | D20/Server.py | #!/usr/bin/env python3
# Copyright (c) 2015-2018 Agalmic Ventures LLC (www.agalmicventures.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limit... | Python | 0.999999 | @@ -2410,17 +2410,16 @@
._cipher
-2
.encrypt
|
e6300cc22369811f02ef59d2a71da8df31fe8221 | Add zlib.dll to Windows wheels | ci/bundle_hdf5_whl.py | ci/bundle_hdf5_whl.py | """Bundle HDF5 DLLs into an h5py wheel on Windows
This is meant to do something like auditwheel on Linux & delocate on Mac,
but h5py-specific.
"""
from base64 import urlsafe_b64encode
from contextlib import contextmanager
from glob import glob
import hashlib
import os
import os.path as osp
import shutil
import sys
imp... | Python | 0.000001 | @@ -462,30 +462,34 @@
5_path)%0A
-return
+yield from
glob(os.pat
@@ -525,16 +525,181 @@
*.dll'))
+%0A zlib_root = os.environ.get(%22ZLIB_ROOT%22)%0A if zlib_root:%0A print(%22ZLIB_ROOT%22, zlib_root)%0A yield os.path.join(zlib_root, 'bin_release', 'zlib.dll')
%0A%0Adef fi
|
7f4ae6e2973ccdd305ebac91c761050a4f9c1727 | add return_tuple parameter to get_one_row | database.py | database.py | """
Database Manager.
"""
import MySQLdb
import MySQLdb.cursors
class DatabaseManager(object):
def __init__(self, host, user, passwd, database, charset='utf8', large_scale=False):
"""Be careful using large_scale=True, SSDictCursor seems not reliable."""
self.conn = MySQLdb.connect(host=host, user=... | Python | 0.000002 | @@ -2002,32 +2002,52 @@
, sql, values=()
+, return_tuple=False
):%0A %22%22%22Ge
@@ -2064,32 +2064,123 @@
of SELECT query.
+%0A Tip: setting return_tuple=True returns tuple so you can unpack with ease.%0A
%22%22%22%0A curs
@@ -2200,32 +2200,59 @@
uery(sql, values
+, use_dict=not return... |
177e2eeb665899a0f116d20876c8c77b4ef27b98 | use java_common.merge instead of manual _collect util functions (#838) | scala/scala_import.bzl | scala/scala_import.bzl | load("@io_bazel_rules_scala//scala:jars_to_labels.bzl", "JarsToLabelsInfo")
#intellij part is tested manually, tread lightly when changing there
#if you change make sure to manually re-import an intellij project and see imports
#are resolved (not red) and clickable
def _scala_import_impl(ctx):
target_data = _code_... | Python | 0 | @@ -598,33 +598,74 @@
exports =
-_collect(
+java_common.merge(%5Bexport%5BJavaInfo%5D for export in
ctx.attr.exp
@@ -668,16 +668,17 @@
.exports
+%5D
)%0A tr
@@ -701,33 +701,70 @@
_jars =
-_collect_runtime(
+%5C%0A java_common.merge(%5Bdep%5BJavaInfo%5D for dep in
ctx.attr
@@ -780,44 +780,49 @@
de... |
76e1f2db2fe3763e1b8638c9044afa341e4d39bf | Fix fileno method in ReactorTransport. | sheared/reactor/transport.py | sheared/reactor/transport.py | # vim:nowrap:textwidth=0
import random, os, types
class StringTransport:
def __init__(self):
self.input = ''
self.output = ''
self.closed = 0
def read(self, cnt=4096):
cnt = min(cnt, 1 + int(random.random() * (len(self.input) - 1)))
data = self.input[:cnt]
self... | Python | 0.006964 | @@ -1893,34 +1893,107 @@
-return self.reactor.getfd(
+if type(self.file) is types.IntType:%0A return self.file%0A else:%0A return
self
@@ -1989,32 +1989,40 @@
return self.file
+.fileno(
)%0A%0A def close
|
20131f8ea26b989d74652416e5c23c85e979e36b | Use whoami properly | roushagent/plugins/input/task_input.py | roushagent/plugins/input/task_input.py | #!/usr/bin/env python
import json
import os
import threading
import time
from requests import ConnectionError
from roushclient.client import RoushEndpoint
name = 'taskerator'
task_getter = None
class TaskThread(threading.Thread):
def __init__(self, endpoint, name):
# python, I hate you.
super(T... | Python | 0 | @@ -811,17 +811,16 @@
point')%0A
-%0A
@@ -1165,17 +1165,16 @@
st ID')%0A
-%0A
@@ -1181,274 +1181,108 @@
-for node in self.endpoint.nodes.filter(%22name='%25s'%22 %25 (%0A self.name)):%0A self.host_id = node.id%0A%0A if not self.host_id:%0A ... |
08f07c880a69fc8e078ebcd871e4c7506ac31cf4 | fix too typo | bluebottle/projects/tests/test_unit.py | bluebottle/projects/tests/test_unit.py | from datetime import timedelta
from decimal import Decimal
from bluebottle.utils.utils import StatusDefinition
from django.test import TestCase
from bluebottle.test.factory_models.accounts import BlueBottleUserFactory
from bluebottle.utils.model_dispatcher import get_project_model
from bluebottle.test.factory_models.... | Python | 0.998754 | @@ -1625,20 +1625,16 @@
expired_
-too_
exact(se
@@ -1885,20 +1885,16 @@
expired_
-too_
more_tha
|
c64d7ba394e1f185b2ebb14cdcc58f5b329e130d | Translate "Images" word. | shop/products/admin/forms.py | shop/products/admin/forms.py |
from django.apps import apps
from django import forms
from suit.sortables import SortableTabularInline
from multiupload.fields import MultiFileField
class ProductForm(forms.ModelForm):
images = MultiFileField(max_num=100, min_num=1, required=False)
def save(self, commit=True):
product = super(Pro... | Python | 0.999996 | @@ -23,17 +23,16 @@
rt apps%0A
-%0A
from dja
@@ -47,16 +47,72 @@
rt forms
+%0Afrom django.utils.translation import ugettext_lazy as _
%0A%0Afrom s
@@ -267,16 +267,44 @@
leField(
+%0A label=_('Images'),
max_num=
|
e6f9cd49a57dfc5fd0acbcf757fd6e80c3749b4f | Support complex comparison (Issue #121) | numba/specialize/comparisons.py | numba/specialize/comparisons.py | import ast
from functools import reduce
import numba
from numba import *
from numba import error
from numba import visitors, nodes
from numba import function_util
from numba.symtab import Variable
from numba import pyconsts
logger = logging.getLogger(__name__)
opmap = {
ast.Eq : pyconsts.Py_EQ,
ast.No... | Python | 0 | @@ -606,16 +606,362 @@
bool_)%0A%0A
+def extract(complex_node):%0A complex_node = nodes.CloneableNode(complex_node)%0A%0A real = nodes.ComplexAttributeNode(complex_node, 'real')%0A imag = nodes.ComplexAttributeNode(complex_node.clone, 'imag')%0A%0A return real, imag%0A%0Adef compare(lhs, rhs):%0A result... |
faf5facbefc02d5c5144d036ff53fcaab40667f4 | fix pylint | anyway/parsers/news_flash_db_adapter.py | anyway/parsers/news_flash_db_adapter.py | import datetime
import logging
import pandas as pd
from flask_sqlalchemy import SQLAlchemy
from anyway.parsers import infographics_data_cache_updater
from anyway.parsers import timezones
from anyway.models import NewsFlash
# fmt: off
def init_db() -> "DBAdapter":
from anyway.app_and_db import db
return DBAda... | Python | 0.000003 | @@ -817,17 +817,16 @@
ocations
-
%0A
|
a21c31eb05c275d35e5bcdcaff923f6cc7b15bc4 | Fix upgrade handler call in install_node | octane/commands/install_node.py | octane/commands/install_node.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | Python | 0.000001 | @@ -3019,32 +3019,95 @@
node in nodes:%0A
+ # FIXME: properly call all handlers all over the place%0A
Controll
@@ -3119,18 +3119,8 @@
rade
-.predeploy
(nod
@@ -3135,44 +3135,8 @@
env,
-%0A
iso
@@ -3150,16 +3150,28 @@
solated)
+.predeploy()
%0A see
|
3bb928fa19e9e94c426746addff09f68cac1fec0 | Remove leftover (NC-1326) | nodeconductor/cost_tracking/serializers.py | nodeconductor/cost_tracking/serializers.py | from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.utils import six
from rest_framework import serializers
from nodeconductor.core.serializers import GenericRelatedField, AugmentedSerializerMixin, JSONField
from nodeconductor.core.signals import pre_serializ... | Python | 0 | @@ -5041,58 +5041,8 @@
ue)%0A
- limit = serializers.FloatField(required=True)%0A
|
67ff8c30d07f54c89d8072f480ded59e144d8463 | Update range test after reporting change | numba/tests/builtins/test_builtin_range.py | numba/tests/builtins/test_builtin_range.py | """
>>> range_ret1()
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> range_ret2()
[1, 2, 3, 4]
>>> range_ret3()
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4]
>>> forward1()
0 1 2 3 4 5 6 7 8 9 done
>>> forward2()
1 2 3 4 done
>>> forward3()
5 8 11 14 done
>>> backward1()
10 7 4 done
>>> backward2()
done
>>> backward3()
-5 -8... | Python | 0 | @@ -367,16 +367,109 @@
value()%0A
+--------------------- Numba Encountered Errors or Warnings ---------------------%0A%3CBLANKLINE%3E%0A
Warning
@@ -469,17 +469,17 @@
arning 9
-2
+6
:10: loc
@@ -532,16 +532,109 @@
ignment%0A
+%3CBLANKLINE%3E%0A----------------------------------------------------------------------... |
ca326b3bfaf642b3fde430241350c62578899a81 | Add add_method delegate on extension types type | numba/typesystem/exttypes/extensiontype.py | numba/typesystem/exttypes/extensiontype.py | # -*- coding: utf-8 -*-
"""
Extension type types.
"""
from numba.traits import traits, Delegate
from numba.typesystem import *
@traits
class ExtensionType(NumbaType, minitypes.ObjectType):
"""
Extension type Numba type.
Available to users through MyExtensionType.exttype (or
numba.typeof(MyExtensionT... | Python | 0 | @@ -49,16 +49,54 @@
s.%0A%22%22%22%0A%0A
+from numba.minivect import minitypes%0A%0A
from num
@@ -158,17 +158,25 @@
import
-*
+NumbaType
%0A%0A@trait
@@ -498,16 +498,55 @@
b_type')
+%0A add_method = Delegate('vtab_type')
%0A%0A at
|
aa5d9c85dc8267a5e3172c8e7792c2a059e1815c | sql db query: improved query timer logging | cantools/db/sql/query.py | cantools/db/sql/query.py | from sqlalchemy.sql import func
from cantools.util import start_timer, end_timer
from properties import *
from getters import *
from setters import *
from session import session, testSession, metadata, Session
_passthru = ["count", "all"]
_qmod = ["filter", "limit", "offset", "join"]
class Query(object):
def __in... | Python | 0.999852 | @@ -1433,16 +1433,22 @@
qkey = %22
+Query.
%25s: %25s %25
|
6f3560c680980e2954c937282f55a8f6da167590 | fix 299 and add make search case insensitive | capa/ida/plugin/proxy.py | capa/ida/plugin/proxy.py | # Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at: [package root]/LICENSE.txt
# Unless required by applicable law or agreed to in writing,... | Python | 0 | @@ -566,16 +566,26 @@
icense.%0A
+import six
%0Afrom Py
@@ -7431,18 +7431,31 @@
(data, s
-tr
+ix.string_types
):%0A
@@ -7581,16 +7581,32 @@
uery
- in data
+.lower() in data.lower()
:%0A
|
5826f791e824b7aa0b38b76570212b7de6e5d1e2 | Index descriptor_data as Text field in ES | resolwe/flow/elastic_indexes/collection.py | resolwe/flow/elastic_indexes/collection.py | """Elastic Search indexes for Collection model."""
import elasticsearch_dsl as dsl
from resolwe.elastic.fields import Name
from resolwe.elastic.indices import BaseIndex
from resolwe.flow.utils import dict_dot, iterate_schema
from ..models import Collection
from .base import BaseDocument, BaseIndexMixin
class Collec... | Python | 0 | @@ -81,48 +81,8 @@
sl%0A%0A
-from resolwe.elastic.fields import Name%0A
from
@@ -419,12 +419,16 @@
a =
-Name
+dsl.Text
(mul
|
c7b79f1bcd3616b7d780b8a99ae2fbea7d61886e | Check for malformed output path | cclib/scripts/ccframe.py | cclib/scripts/ccframe.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.
"""Script for writing data tables from computational chemistry files."""
import argparse
import os.p... | Python | 0 | @@ -733,16 +733,219 @@
)%5B1%5D%5B1:%5D
+%0A if not outputtype:%0A raise RuntimeWarning(%0A %22The output type could not be determined from the given path, %22%0A %22not writing DataFrame to disk%22%0A )
%0A%0A
|
ec6f54e52050cecb6bf88b3cfcaa6957f9ea0c60 | Fix unicode handling in selenium var templates | bzt/resources/selenium_taurus_extras.py | bzt/resources/selenium_taurus_extras.py | """
Copyright 2018 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | Python | 0.000013 | @@ -556,17 +556,16 @@
se.%0A%22%22%22%0A
-%0A
from str
@@ -660,16 +660,46 @@
ception%0A
+from bzt.six import text_type%0A
%0A%0Aclass
@@ -1235,19 +1235,25 @@
return
-str
+text_type
(self.tm
|
8d26b016e754f0927e1cb09dec226a7ee18bdc4b | fix .pretty_zip_size() | calaccess_processed/models/tracking.py | calaccess_processed/models/tracking.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Models for tracking processing of CAL-ACCESS snapshots over time.
"""
from __future__ import unicode_literals
from django.db import models
from hurry.filesize import size as sizeformat
from django.utils.encoding import python_2_unicode_compatible
from calaccess_processe... | Python | 0.000002 | @@ -2874,14 +2874,8 @@
elf.
-clean_
zip_
|
7381f177f392b699eed3d93f2e36b7fa39d33ad0 | remove unused import | build_and_push_images.py | build_and_push_images.py | #!/usr/bin/env python
import argparse
IMAGES = [
dict(image_name='geometalab/osmaxx-mediator', dockerfile='Dockerfile.mediator'),
dict(image_name='geometalab/osmaxx-worker', dockerfile='Dockerfile.worker'),
dict(image_name='geometalab/osmaxx-frontend', dockerfile='Dockerfile.frontend'),
]
def docker_buil... | Python | 0.000001 | @@ -19,25 +19,8 @@
hon%0A
-import argparse%0A%0A
IMAG
|
674bb111c11bfcfcbd00f4527e35f1c87312d738 | Append common VS directory to the path to fix build on x86 | cerbero/utils/msbuild.py | cerbero/utils/msbuild.py | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation... | Python | 0 | @@ -1922,136 +1922,709 @@
-def _call(self, command):%0D%0A properties = self._format_properties()%0D%0A msbuildpath = self.get_msbuild_tools_path()%0D%0A
+@staticmethod%0D%0A def get_vs_path():%0D%0A reg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)%0D%0A key = winreg.Op... |
7ca3308ced87a51ac073e50229d15b0784f5aed7 | Update chainerx/_docs/device.py | chainerx/_docs/device.py | chainerx/_docs/device.py | import chainerx
from chainerx import _docs
def _set_docs_device():
Device = chainerx.Device
_docs.set_doc(
Device,
"""Represents a physical computing unit.
""")
_docs.set_doc(
Device.synchronize,
"""Synchronizes the device.
""")
_docs.set_doc(
Device.name,
... | Python | 0 | @@ -950,16 +950,17 @@
argument
+s
.%0A%0AIf th
|
81787c22af5fa5da2a679898b118bce6235e83f4 | Fix authorize.net for python3 | cartridge/shop/payment/authorizenet.py | cartridge/shop/payment/authorizenet.py | from __future__ import unicode_literals
from future.builtins import str
try:
from urllib.request import Request, urlopen
from urllib.error import URLError
except ImportError:
from urllib2 import Request, urlopen, URLError
from django.core.exceptions import ImproperlyConfigured
from django.utils.http impor... | Python | 0.000002 | @@ -3393,16 +3393,32 @@
String'%5D
+.encode('utf-8')
%7D%0A tr
@@ -3616,16 +3616,32 @@
results.
+decode('utf-8').
split(tr
|
9a9d968f979dd12ee2bf4b1922aa1e0d70d27974 | switch to cmake | packages/dependencies/libogg.py | packages/dependencies/libogg.py | {
'repo_type' : 'git',
'url' : 'https://github.com/xiph/ogg.git',
# 'folder_name' : 'ogg-1.3.2',
'configure_options' : '{autoconf_prefix_options}',
'_info' : { 'version' : None, 'fancy_name' : 'ogg' },
} | Python | 0.000001 | @@ -66,36 +66,62 @@
',%0A%09
-# 'folder_name' : 'ogg-1.3.2
+'conf_system' : 'cmake',%0A%09'source_subfolder' : '_build
',%0A%09
@@ -147,17 +147,17 @@
: '
-%7Bautoconf
+.. %7Bcmake
_pre
@@ -168,16 +168,104 @@
options%7D
+ -DCMAKE_INSTALL_PREFIX=%7Btarget_prefix%7D -DBUILD_SHARED_LIBS=0 -DCMAKE_BUILD_TYPE=Release
... |
58c442c965e66934a39ca69f15fd6d8ae3280f93 | Add HTTPError handling when Reimbursement URL doesn't exist | rosie/rosie/chamber_of_deputies/adapter.py | rosie/rosie/chamber_of_deputies/adapter.py | import logging
import os
from datetime import date
from pathlib import Path
from re import match
import numpy as np
import pandas as pd
from serenata_toolbox.chamber_of_deputies.reimbursements import Reimbursements
from serenata_toolbox.datasets import fetch
class Adapter:
STARTING_YEAR = 2009
COMPANIES_DA... | Python | 0 | @@ -129,16 +129,51 @@
as as pd
+%0Afrom urllib.error import HTTPError
%0A%0Afrom s
@@ -2503,24 +2503,45 @@
om %7Byear%7D')%0A
+ try:%0A
@@ -2573,16 +2573,154 @@
.path)()
+%0A except HTTPError as e:%0A self.log.error(f'Could not update Reimbursement from year %7... |
5d136b1fc8d2d4945352e7ee9e6d25ebd2190e56 | rename tags to subjects to better match schema | scrapi/base/schemas.py | scrapi/base/schemas.py | from __future__ import unicode_literals
from dateutil.parser import parse
from .helpers import (
default_name_parser,
oai_extract_url,
# oai_extract_doi,
oai_process_contributors,
compose,
single_result,
format_tags,
language_code
)
CONSTANT = lambda x: lambda *_, **__: x
BASEXMLSCH... | Python | 0 | @@ -1288,19 +1288,23 @@
),%0A '
-tag
+subject
s': ('//
|
076d3831aa04941e6ae8d36dc95f03269a05436f | Fix python formatting issues. | backend/mcapi/machine.py | backend/mcapi/machine.py | from mcapp import app
from decorators import crossdomain, apikey, jsonp
from flask import request, g
import error
import rethinkdb as r
import dmutil
import json
import args
import access
@app.route('/machines', methods=['GET'])
@jsonp
def get_all_machines():
rr = r.table('machines').order_by(r.desc('birthtime'))... | Python | 0.000003 | @@ -98,21 +98,8 @@
, g%0A
-import error%0A
impo
@@ -134,20 +134,8 @@
til%0A
-import json%0A
impo
@@ -392,16 +392,17 @@
ction)%0A%0A
+%0A
@app.rou
@@ -1766,16 +1766,17 @@
_order',
+
j)%0A m
|
520d7f4d00f58ad1f6367ea627d9de074aacf8d5 | Fix redirect to checkout | satchless/contrib/checkout/common/views.py | satchless/contrib/checkout/common/views.py | # -*- coding:utf-8 -*-
try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps # Python 2.4 fallback.
from django.shortcuts import redirect
from django.template.response import TemplateResponse
from django.utils.decorators import available_attrs
from django.views.decorat... | Python | 0 | @@ -1247,25 +1247,95 @@
direct('
-checkout'
+satchless-checkout',%0A order_toke=order.token
)%0A
|
854c9e4843ebb5e2e4e95359cab2bb1f58f90b04 | Fix RepositoryEnv logic | decouple.py | decouple.py | # coding: utf-8
import os
import sys
# Useful for very coarse version differentiation.
PY3 = sys.version_info[0] == 3
if PY3:
from configparser import ConfigParser
else:
from ConfigParser import SafeConfigParser as ConfigParser
class UndefinedValueError(Exception):
pass
class Undefined(object):
"... | Python | 0.000001 | @@ -2949,21 +2949,25 @@
elf.data
-%5Bkey%5D
+.get(key)
or os.e
|
d19bcad058ba617b9fec91583be0a0f019a7d3dc | Replace spaces with underscores in ansible inventories | src/mist/io/inventory.py | src/mist/io/inventory.py | import mist.io.methods
class MistInventory(object):
def __init__(self, user, machines=None):
self.user = user
self.hosts = {}
self.keys = {}
self._cache = {}
self.load(machines)
def load(self, machines=None):
self.hosts = {}
self.keys = {}
if no... | Python | 0.999317 | @@ -2599,16 +2599,34 @@
%5B'name'%5D
+.replace(' ', '_')
%0A
|
1ebc38cd78a1453ab404714acb73fbe16840d0ed | Use `yaml.full_load_all` instead of `yaml.load_all` (#13577) | chart/tests/helm_template_generator.py | chart/tests/helm_template_generator.py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | Python | 0.000001 | @@ -2689,16 +2689,21 @@
= yaml.
+full_
load_all
|
f8f63d4b15ce68797d6e16943bd85efb19a77752 | Fix recording failure for system pollster | ceilometer/hardware/pollsters/system.py | ceilometer/hardware/pollsters/system.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | Python | 0.999017 | @@ -1500,33 +1500,32 @@
.TYPE_CUMULATIVE
-,
%0A UNIT = 'blo
@@ -1663,17 +1663,16 @@
MULATIVE
-,
%0A UNI
|
bf614837f9b05645bdcfb0f524d1d04b69ac49df | Add missing explicit cfg option import | ceilometer/tests/event/test_endpoint.py | ceilometer/tests/event/test_endpoint.py | # -*- encoding: utf-8 -*-
#
# Copyright © 2012 New Dream Network, LLC (DreamHost)
#
# Author: Doug Hellmann <doug.hellmann@dreamhost.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# ... | Python | 0.00025 | @@ -734,16 +734,44 @@
t mock%0A%0A
+from oslo.config import cfg%0A
import o
@@ -2801,16 +2801,123 @@
6',%0A%7D%0A%0A%0A
+cfg.CONF.import_opt('store_events', 'ceilometer.notification',%0A group='notification')%0A%0A%0A
class Te
|
cd28805878328e87a4c2f16d5d912a31805de332 | Add description to IPNetworkField | helpers/models.py | helpers/models.py | from django.db import models
from . import validators
# Create your models here.
class IPNetworkField(models.CharField):
def __init__(self, *args, **kwargs):
kwargs['max_length'] = 18
self.default_validators = [validators.validate_ipv4_network]
super().__init__(*args, **kwargs)
def... | Python | 0 | @@ -22,16 +22,72 @@
models%0A
+from django.utils.translation import ugettext_lazy as _%0A
%0A%0Afrom .
@@ -175,16 +175,62 @@
Field):%0A
+ description = _(%22IP address or network%22)%0A%0A
def
|
18618a56ce674c479a0737dcabd4a47913ae2dde | Add functionality to copy any missing files to the other folder | scripts/compare_dir.py | scripts/compare_dir.py | import os
dropboxFiles = []
localFiles = []
for dirpath, dirnames, filenames in os.walk(
'/media/itto/TOSHIBA EXT/Photos/Dropbox/ITTO/Southeast Asia 2017'):
dropboxFiles += filenames
for dirpath, dirnames, filenames in os.walk(
'/media/itto/TOSHIBA EXT/Photos/Southeast Asia'):
if ('Process' no... | Python | 0 | @@ -7,37 +7,172 @@
os%0A
-%0AdropboxF
+from shutil import copyfile%0A%0AFOLDER_A = '/media/itto/TOSHIBA EXT/Photos/Southeast Asia'%0AFOLDER_B = '/media/itto/disk/PRIVATE/AVCHD/BDMV/STREAM'%0Af
iles
+_a
= %5B%5D%0A
-localF
+f
iles
+_b
= %5B
@@ -221,101 +221,30 @@
alk(
-%0A '/media/itto/TOSHIBA EXT/Photos... |
b20a571c83d8c7727e7a8864e12b9ccde80af7cf | Update settings.py to use basedir more intelligently. | clintools/settings.py | clintools/settings.py | """
Django settings for clintools project.
Generated by 'django-admin startproject' using Django 1.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build path... | Python | 0 | @@ -670,16 +670,39 @@
th open(
+os.path.join(BASE_DIR,
'secrets
@@ -718,16 +718,17 @@
ey.txt')
+)
as f:%0A
|
94c0dc5ac2a73b373ca99ed7edca36523cdac230 | fix assert failure | scripts/parse-props.py | scripts/parse-props.py | #!/usr/bin/env python
# Parse property file.
#
# Usage:
#
# lglaf.py -c '!INFO GPRO \x08\x0b\0\0' > props.bin
# scripts/parse-props.py props.bin
import argparse, sys, struct
def stringify(resp):
if not isinstance(resp, str):
try: resp = resp.decode('ascii')
except: pass
return resp
def ge... | Python | 0.000002 | @@ -2646,24 +2646,27 @@
('%3CI', data)
+%5B0%5D
%0A expecte
|
8f24cd709aa5e8e4e5c1273c028344d7e934aeba | Use bson | scripts/serial_read.py | scripts/serial_read.py | #!/usr/bin/python3
import time
import datetime
import json
import zmq
import pymongo
import sys
import os
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
from panoptes.utils import config, logger, serial, error, database
# @logger.set_log_level(level='debug')
@logger.has_logger
@config.has_config
cl... | Python | 0.000002 | @@ -53,16 +53,51 @@
rt json%0A
+import bson.json_util as json_util%0A
import z
@@ -2110,16 +2110,21 @@
json
+_util
.dumps(m
|
b40d9aaf107fadc477d0a8463c25945c2e83153c | Make it easier to override has_sudo_privileges check in middleware | django_sudo/middleware.py | django_sudo/middleware.py | """
django_sudo.middleware
~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2014 by Matt Robenolt.
:license: BSD, see LICENSE for more details.
"""
from django_sudo import COOKIE_NAME
from django_sudo.utils import has_sudo_privileges
class SudoMiddleware(object):
def process_request(self, request):
assert hasattr(... | Python | 0.00001 | @@ -246,24 +246,154 @@
re(object):%0A
+ def has_sudo_privileges(self, request):%0A ## Override me to alter behavior%0A return has_sudo_privileges(request)%0A%0A
def proc
@@ -543,16 +543,21 @@
lambda:
+self.
has_sudo
|
31231afea71b3fd9213b39cf1bb32e10b2a9e843 | Add Bitpay config model to Django Admin panel | djangovirtualpos/admin.py | djangovirtualpos/admin.py | # coding=utf-8
from django.contrib import admin
from djangovirtualpos.models import VirtualPointOfSale, VPOSRefundOperation, VPOSCeca, VPOSRedsys, VPOSSantanderElavon, VPOSPaypal
admin.site.register(VirtualPointOfSale)
admin.site.register(VPOSRefundOperation)
admin.site.register(VPOSCeca)
admin.site.register(VPOSReds... | Python | 0 | @@ -172,16 +172,28 @@
OSPaypal
+, VPOSBitpay
%0A%0Aadmin.
@@ -402,10 +402,42 @@
Elavon)%0A
+admin.site.register(VPOSBitpay)%0A
%0A%0A
|
21837bb03e9a41eb8e932ece47fce0081fccba43 | Update settings_example.py | djing/settings_example.py | djing/settings_example.py | # -*- coding: utf-8 -*
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
from django.core.urlresolvers import reverse_lazy
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproj... | Python | 0.178665 | @@ -2412,18 +2412,16 @@
%0A
- #
'ENGINE
@@ -2461,17 +2461,16 @@
-#
'NAME':
@@ -2507,32 +2507,33 @@
ite3'),%0A
+#
'ENGINE': 'djang
@@ -2554,32 +2554,33 @@
mysql',%0A
+#
'NAME': 'djingdb
@@ -2590,16 +2590,17 @@
+#
'USER':
@@ -2647,16 +2647,17 @@
+#
'PASSWOR... |
3811543581d8c0ce31f7db332444f31802e68b46 | Bump version to 0.1a15 | chirptext/__version__.py | chirptext/__version__.py | # -*- coding: utf-8 -*-
# chirptext's package version information
__author__ = "Le Tuan Anh"
__email__ = "tuananh.ke@gmail.com"
__copyright__ = "Copyright (c) 2012, Le Tuan Anh"
__credits__ = []
__license__ = "MIT License"
__description__ = "ChirpText is a collection of text processing tools for Python."
__url__ = "ht... | Python | 0 | @@ -431,9 +431,9 @@
%7B%7Da1
-4
+5
%22.fo
|
ef15a8ba699e10b9f2d059669b63af6f4c768d39 | Change to console command prompt | casspy/admin_commands.py | casspy/admin_commands.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Cassoundra: admin-commands
~~~~~~~~~~
Module to handle special commands to control the bot once it is already running.
Created by Joshua Prince, 2017
"""
import discord
from casspy import cassoundra
async def process_input(loop):
while True:
command ... | Python | 0 | @@ -357,14 +357,8 @@
nput
-, %22%3E %22
)%0A
|
2d8570f35dd507236d9c3bdc9209da248f572ef2 | update version | cloudaux/__about__.py | cloudaux/__about__.py | __all__ = [
'__title__',
'__summary__',
'__uri__',
'__version__',
'__author__',
'__email__',
'__license__',
'__copyright__'
]
__title__ = 'cloudaux'
__summary__ = 'Cloud Auxiliary is a python wrapper and orchestration module for interacting with cloud providers'
__uri__ = 'https://githu... | Python | 0 | @@ -371,12 +371,11 @@
'1.
-4
+5
.1
-9
'%0A%0A_
|
7931243e5b6b14ea25f3a17bb86a6bb496df082d | Fix game over check | netscramble/gui.py | netscramble/gui.py | #!/usr/bin/env python2.7
from gi.repository import Gtk, GLib #pylint: disable=E0611
import time
from netscramble import res
from netscramble import game, scene, grid_view
from netscramble.score_dialog import ScoreDialog
class Timer(object):
"""Context manager for simple benchmarking."""
def __init__(self, p... | Python | 0 | @@ -2123,16 +2123,18 @@
ame_over
+()
,%0A
|
cfd65e98e694b2ad40e97d06ffdd9096a3dea909 | Fix flaky import test (#26953) | pandas/tests/test_downstream.py | pandas/tests/test_downstream.py | """
Testing that we work in the downstream packages
"""
import builtins
import importlib
import subprocess
import sys
import numpy as np # noqa
import pytest
from pandas.compat import PY36
from pandas import DataFrame
from pandas.util import testing as tm
def import_module(name):
# we *only* want to skip if t... | Python | 0.000072 | @@ -53,24 +53,8 @@
%22%22%22%0A
-import builtins%0A
impo
@@ -3500,27 +3500,16 @@
endency(
-monkeypatch
):%0A #
@@ -3526,900 +3526,332 @@
-original_import = __import__%0A%0A def mock_import_fail(name, *args, **kwargs):%0A if name == %22numpy%22:%0A raise ImportError(%22cannot import nam... |
0a49c20aa1ea78fbb6f159e8b29167f8d1663408 | Raise exceptions if answer from server is not as expected | netsecus/helper.py | netsecus/helper.py | from __future__ import unicode_literals, print_function
import base64
import imaplib
import logging
import os
import re
import smtplib
import sys
import tornado.web
from passlib.hash import pbkdf2_sha256
def processVariable(variables, text):
return re.sub(r'\$([a-zA-Z0-9_]+)',
lambda m: proces... | Python | 0.000001 | @@ -844,33 +844,8 @@
de:%0A
- if response:%0A
@@ -864,31 +864,16 @@
esponse%0A
- return%0A
else
@@ -882,30 +882,22 @@
-logging.error(
+err =
%22Server
@@ -950,33 +950,32 @@
, command, args)
-)
%0A raise E
@@ -977,104 +977,22 @@
ise
-Exception(%22Server responded wi... |
11aa00c96a456c3e3bb9699fc96c61ebbe7574d4 | fix removal of temp file | cerbero/bootstrap/osx.py | cerbero/bootstrap/osx.py | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... | Python | 0.000001 | @@ -2185,13 +2185,8 @@
le()
-.name
%0A
@@ -2228,32 +2228,37 @@
cpanm_installer
+.name
)%0A shell.
@@ -2285,32 +2285,37 @@
cpanm_installer
+.name
)%0A # Inst
@@ -2411,16 +2411,21 @@
nstaller
+.name
)%0A
|
d5a9d238ebdb312d3bc69071227175d0d49756a9 | Fix the security filtering to handle None as a severity. | security_check/main.py | security_check/main.py | """Checks the specified image for security vulnerabilities."""
import argparse
import json
import logging
import sys
import subprocess
_GCLOUD_CMD = ['gcloud', 'beta', 'container', 'images', '--format=json']
# Severities
_LOW = 'LOW'
_MEDIUM = 'MEDIUM'
_HIGH = 'HIGH'
_SEV_MAP = {
_LOW: 0,
_MEDIUM: 1,
... | Python | 0 | @@ -265,16 +265,39 @@
= 'HIGH'
+%0A_CRITICAL = 'CRITICAL'
%0A%0A_SEV_M
@@ -344,16 +344,35 @@
_HIGH: 2
+,%0A _CRITICAL: 3,
%0A%7D%0A%0A%0Adef
@@ -706,17 +706,21 @@
n parsed
-%5B
+.get(
'vulz_an
@@ -730,10 +730,18 @@
sis'
-%5D%5B
+, %7B%7D).get(
'Fix
@@ -752,17 +752,21 @@
ailable'
-%5D
+, %5B%5D)
:%0A
... |
661f048364a44e70f5c70202b392692c58850bee | Revert "Revert "Add after hana environment set up (#12878)" (#12900)" (#12901) | sap_hana/tests/conftest.py | sap_hana/tests/conftest.py | # (C) Datadog, Inc. 2019-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from contextlib import closing
from copy import deepcopy
import pytest
from hdbcli.dbapi import Connection as HanaConnection
from datadog_checks.dev import WaitFor, docker_run
from datadog_checks.dev.con... | Python | 0 | @@ -3460,16 +3460,34 @@
ord'%5D%7D,%0A
+ sleep=10,%0A
):%0A
|
da9a50ad2d5a5a254c7a842407d046485e410057 | Drop excessive import | satchless/util/__init__.py | satchless/util/__init__.py | from decimal import Decimal
import locale
def decimal_format(value, min_decimal_places=0):
decimal_tuple = value.as_tuple()
have_decimal_places = -decimal_tuple.exponent
digits = list(decimal_tuple.digits)
while have_decimal_places < min_decimal_places:
digits.append(0)
have_decimal_pla... | Python | 0 | @@ -24,22 +24,8 @@
imal
-%0Aimport locale
%0A%0Ade
|
b32eab807b54c9c378542474631b3bdbced94456 | add filter | cogs/r9k.py | cogs/r9k.py | import asyncio
import logging
import re
from cogs.cog import Cog
from utils import unzalgo
logger = logging.getLogger('terminal')
class R9K(Cog):
def __init__(self, bot):
super().__init__(bot)
self._messages = []
self._update_task = asyncio.run_coroutine_threadsafe(self._update_loop(), lo... | Python | 0.000002 | @@ -1156,16 +1156,98 @@
, msg):%0A
+ if not msg.guild or msg.guild.id != 217677285442977792:%0A return
%0A%0A
|
75c0861608871de2a2b1a6b4f2ea89c800dd8c07 | Make verbose loading messages optional | pava/implementation/__init__.py | pava/implementation/__init__.py | import sys
method_count = 0
def method(argcount, nlocals, stacksize, flags, codestring, constants, names,
varnames, filename, name, firstlineno, lnotab, modules, static):
global method_count
print 'define', name, method_count
method_count += 1
globals_dict = {}
for module_name in modu... | Python | 0.000037 | @@ -1,18 +1,44 @@
import
-sys
+new%0Aimport sys%0A%0ADEBUG = False
%0A%0Amethod
@@ -225,24 +225,42 @@
ethod_count%0A
+ if DEBUG:%0A
print 'd
|
c62d69249f7413e2142f7147ccce0872dbbae90a | Fix nipap CLI setup.py to include man file | nipap-cli/setup.py | nipap-cli/setup.py | #!/usr/bin/env python
from distutils.core import setup
import nipap_cli
# This is a bloody hack to circumvent a lack of feature with Python distutils.
# Files specified in the data_files list cannot be renamed upon installation
# and we don't want to keep two copies of the .nipaprc file in git
import shutil
shutil.c... | Python | 0 | @@ -53,27 +53,117 @@
tup%0A
-%0Aimport nipap_cli%0A%0A
+import subprocess%0Aimport sys%0A%0Aimport nipap_cli%0A%0A# return all the extra data files%0Adef get_data_files():%0A%0A
# Th
@@ -237,16 +237,20 @@
tutils.%0A
+
# Files
@@ -318,16 +318,20 @@
llation%0A
+
# and we
@@ -389,16 +389,20 @@
in git%... |
d7f78c25448360f8a77417de8ca1b3ddbf99fbd9 | Remove commented out lines. | chaco/cmap_image_plot.py | chaco/cmap_image_plot.py | #
# (C) Copyright 2013 Enthought, Inc., Austin, TX
# All right reserved.
#
# This file is open source software distributed according to the terms in
# LICENSE.txt
#
from numpy import zeros
# Enthought library imports.
from traits.api import Any, Bool, Float, Instance, Property, Tuple
# Local relative imports
from im... | Python | 0 | @@ -5380,39 +5380,8 @@
aw()
-%0A #self.request_redraw()
%0A%0A
@@ -5533,39 +5533,8 @@
aw()
-%0A #self.request_redraw()
%0A%0A
|
6ece66793b88fb8d03f6caffe1a3f5cc8d945ab6 | remove commented out print statements | citeseerx_citation_network/citations.py | citeseerx_citation_network/citations.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""Module that defines citations search results from an article"""
import re
import math
import random
import time
import requests
from bs4 import BeautifulSoup
from progressbar import ProgressBar
import permalink
class Citations(permalink.DigitalObjectIdentifier):
... | Python | 0.000001 | @@ -3608,38 +3608,8 @@
on)%0A
- # print(page_url)%0A
@@ -3638,16 +3638,16 @@
_soup.%5C%0A
+
@@ -3720,49 +3720,8 @@
'))%0A
- # print(list_of_result_soup)%0A
@@ -3791,79 +3791,8 @@
m()%0A
- # print('Pausing for %7B%7D seconds.'.format(str(pause_time)))%0A
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.