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 |
|---|---|---|---|---|---|---|---|
de2aab06efd9cc5673ad517d453e5f660ef6fcf7 | Disable test_socket_ssl timeout test on Windows. | Lib/test/test_socket_ssl.py | Lib/test/test_socket_ssl.py | # Test just the SSL support in the socket module, in a moderately bogus way.
from test import test_support
import socket
# Optionally test SSL support. This requires the 'network' resource as given
# on the regrtest command line.
skip_expected = not (test_support.is_resource_enabled('network') and
... | Python | 0 | @@ -71,16 +71,27 @@
s way.%0A%0A
+import sys%0A
from tes
@@ -697,24 +697,67 @@
f.close()%0A%0A
+if not sys.platform.startswith('win'):%0A
def test_tim
@@ -760,24 +760,28 @@
_timeout():%0A
+
test_sup
@@ -806,24 +806,28 @@
work')%0A%0A
+
+
s = socket.s
@@ -872,16 +872,20 @@
AM)%0A
+
+ ... |
abafd85eaa0179451ed8a26b4d2aed73de38b824 | Replace QuantityResult class by namedtuple in cart | satchless/cart/models.py | satchless/cart/models.py | # -*- coding: utf-8 -*-
from decimal import Decimal
from django.conf import settings
from django.db import models
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
from django.core.exceptions import ObjectDoesNotExist
import random
from ..item import ItemSet, ItemLine
... | Python | 0.000283 | @@ -45,16 +45,51 @@
Decimal%0A
+from collections import namedtuple%0A
from dja
@@ -494,22 +494,16 @@
RENCY%0A%0A%0A
-class
Quantity
@@ -512,42 +512,42 @@
sult
-(object):%0A%0A def __init__(self,
+ = namedtuple('QuantityResult', %5B'
cart
@@ -551,18 +551,20 @@
art_item
+'
,
+'
new_quan
@@ -571,189 +571,86... |
32ab2353d7a7f64300445688b0bd583fbe1a13fb | Improve keystone.conf [endpoint_policy] documentation | keystone/conf/endpoint_policy.py | keystone/conf/endpoint_policy.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 | @@ -771,16 +771,20 @@
-POLICY
+API
extensio
@@ -808,12 +808,12 @@
ated
- in%0A
+%0Ain
the
@@ -883,16 +883,20 @@
-POLICY%0A
+API
extensio
@@ -965,25 +965,25 @@
ble endpoint
-_
+-
policy funct
@@ -990,16 +990,125 @@
ionality
+, which allows policies to be associated%0Awith either specific endpoints, or endp... |
46070ee78862c18563297ceef4892394d3c065b6 | Fix EC2 script to write to /dev/xvdb | fedimg/services/ec2.py | fedimg/services/ec2.py | #!/bin/env python
# -*- coding: utf8 -*-
import os
import subprocess
from libcloud.compute.base import NodeImage
from libcloud.compute.deployment import MultiStepDeployment
from libcloud.compute.deployment import ScriptDeployment, SSHKeyDeployment
from libcloud.compute.providers import get_driver
from libcloud.comput... | Python | 0 | @@ -3387,17 +3387,91 @@
ployment
-A
+%0A # Device becomes /dev/xvdb on instance due to recent kernel change
%0A
@@ -3510,17 +3510,18 @@
%3E /dev/
-s
+xv
db%22.form
|
5dcef138bf9addd53a9abc80c5436ea948bb22d0 | Fix loading scheduler from subfolder (#1319) | src/diffusers/schedulers/scheduling_utils_flax.py | src/diffusers/schedulers/scheduling_utils_flax.py | # Copyright 2022 The HuggingFace Team. 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 applicabl... | Python | 0 | @@ -5517,16 +5517,61 @@
or_path,
+%0A subfolder=subfolder,%0A
return_
@@ -5581,32 +5581,44 @@
sed_kwargs=True,
+%0A
**kwargs%0A
@@ -5610,16 +5610,17 @@
**kwargs
+,
%0A
|
06cc18240422b042d87d05029f5a429be166cb59 | Remove overeager trailing commas | tools/scenario-player/scenario_player/tasks/channels.py | tools/scenario-player/scenario_player/tasks/channels.py | from scenario_player.exceptions import ScenarioAssertionError
from .raiden_api import RaidenAPIActionTask
class OpenChannelTask(RaidenAPIActionTask):
_name = 'open_channel'
_url_template = '{protocol}://{target_host}/api/1/channels'
_method = 'put'
@property
def _request_params(self):
if... | Python | 0.998924 | @@ -4637,17 +4637,16 @@
lues_all
-,
%0A
@@ -4787,17 +4787,16 @@
t_field%5D
-,
%0A
|
29384b927b620b7e943343409f62511451bb3059 | Fix problem with Hopfield energy function for Python 2.7 | neupy/algorithms/memory/utils.py | neupy/algorithms/memory/utils.py | from numpy import where
__all__ = ('sign2bin', 'bin2sign', 'hopfield_energy')
def sign2bin(matrix):
return where(matrix == 1, 1, 0)
def bin2sign(matrix):
return where(matrix == 0, -1, 1)
def hopfield_energy(weight, input_data, output_data):
energy_output = -0.5 * input_data.dot(weight).dot(output_da... | Python | 0.001066 | @@ -16,16 +16,66 @@
rt where
+, inner%0Afrom numpy.core.umath_tests import inner1d
%0A%0A%0A__all
@@ -308,31 +308,22 @@
-energy_output =
+return
-0.5 *
inpu
@@ -318,16 +318,24 @@
-0.5 *
+inner1d(
input_da
@@ -348,21 +348,18 @@
(weight)
-.dot(
+,
output_d
@@ -365,41 +365,6 @@
data
-.T)%0A return e... |
2bd75e14d351ebd076cbcd035145ffb394f90a44 | Use async memcopy | cgi-bin/paint_x2_unet/cgi_exe.py | cgi-bin/paint_x2_unet/cgi_exe.py | #!/usr/bin/env python
import numpy as np
import chainer
import chainer.functions as F
import chainer.links as L
import six
import os
import cv2
from chainer import cuda, optimizers, serializers, Variable
from chainer import training
from chainer.training import extensions
#from train import Image2ImageDataset
from i... | Python | 0.000001 | @@ -4530,32 +4530,50 @@
= cuda.to_gpu(x
+, cuda.Stream.null
)%0A y = se
@@ -5042,16 +5042,34 @@
nput_bat
+, cuda.Stream.null
)%0A
|
bf28376f252fd474d594e5039d0b2f2bb1afc26a | Add proper warnings on use of the backwards compatibility shim. | IPython/frontend.py | IPython/frontend.py | import sys
import types
class ShimModule(types.ModuleType):
def __getattribute__(self, key):
exec 'from IPython import %s' % key
return eval(key)
sys.modules['IPython.frontend'] = ShimModule('frontend')
| Python | 0 | @@ -1,172 +1,2033 @@
-import sys%0Aimport types%0A%0A%0Aclass ShimModule(types.ModuleType):%0A%0A def __getattribute__(self, key):%0A exec 'from IPython import %25s' %25 key%0A return eval(key)
+%22%22%22%0AShim to maintain backwards compatibility with old frontend imports.%0A%0AWe have moved all conte... |
f8a6e99980075384572e445c83065be538df583a | refactor accuracy score | model/building_type.py | model/building_type.py | """
This script executes the task of estimating the building type, based solely on the geometry for that building.
The data for this script can be generated by running the prep/get-data.sh and prep/preprocess-buildings.py scripts,
which will take about an hour or two.
"""
import os
from datetime import datetime
import... | Python | 0.000019 | @@ -515,16 +515,59 @@
ort Adam
+%0Afrom sklearn.metrics import accuracy_score
%0A%0Afrom t
@@ -662,17 +662,17 @@
= '0.2.2
-7
+8
'%0ASCRIPT
@@ -934,10 +934,11 @@
E',
-38
+102
4))%0A
@@ -3703,18 +3703,16 @@
se),%0A
- #
EarlySt
@@ -4252,16 +4252,17 @@
raining%0A
+%0A
test_pre
@@ -4269,430 +4269,123 @@
d = ... |
d8ceaa6cc9e475292633dae3927cf29f3783f9af | Update some comments | conda_tools/updater.py | conda_tools/updater.py | #!/usr/bin/env python
#
# updater.py
#
# Updates all packages in all installed conda environments.
# This script should be run under the root conda environment.
import os.path
import subprocess
import conda_api
from utils import get_root_prefix
def update_all(update_root=True, *blacklist_envs):
"""Updates all c... | Python | 0 | @@ -1036,16 +1036,111 @@
cklist.%0A
+ # The root environment will be the first element in this list,%0A # so exclude that also.%0A
envs
@@ -2682,11 +2682,8 @@
all
--q
-U p
|
7f800ee03790d28a25f0f5989c8f6a15401af172 | remove print statement | django/crashreport/symbols/views.py | django/crashreport/symbols/views.py | # -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
from django.shortcuts import rende... | Python | 0.999999 | @@ -797,29 +797,8 @@
me)%0A
- print(file_path)%0A
@@ -1182,32 +1182,8 @@
S)%0A%0A
- print(form.fields)%0A%0A
|
6833fbd6f29c5fd8477c6545d708af6d61c55473 | Fix filtering on preference type | UM/VersionUpgradeManager.py | UM/VersionUpgradeManager.py | # Copyright (c) 2015 Ultimaker B.V.
# Cura is released under the terms of the AGPLv3 or higher.
from UM.PluginRegistry import PluginRegistry
from UM.Preferences import Preferences
from UM.Settings.MachineInstance import MachineInstance
from UM.Settings.Profile import Profile
import collections #For deque, for breadth... | Python | 0 | @@ -6645,27 +6645,24 @@
-destination
+metadata
= regis
@@ -6709,32 +6709,168 @@
ersion_upgrade%22%5D
+%0A if preference_type not in metadata: #Filter by preference_type.%0A continue%0A destination = metadata
%5Bpreference_type
|
f782633c857932803283dd9c26621e69f6ccb44e | fix version | l10n_es_aeat_sii/__manifest__.py | l10n_es_aeat_sii/__manifest__.py | # -*- coding: utf-8 -*-
# Copyright 2017 Ignacio Ibeas <ignacio@acysos.com>
# (c) 2017 Diagram Software S.L.
# Copyright (c) 2017-TODAY MINORISA <ramon.guiu@minorisa.net>
# (c) 2017 Studio73 - Pablo Fuentes <pablo@studio73.es>
# (c) 2017 Studio73 - Jordi Tolsà <jordi@studio73.es>
# License AGPL-3.0 or later (http://www... | Python | 0.000001 | @@ -418,17 +418,17 @@
ion%22: %221
-1
+2
.0.1.3.2
|
7d7b12d176a0315057c54eff794fbe7117c7f6da | Include the Python version in the support tracking data. | reviewboard/admin/support.py | reviewboard/admin/support.py | from __future__ import unicode_literals
import base64
import time
from datetime import datetime
from hashlib import sha1
from django.conf import settings
from django.contrib.auth.models import User
from djblets.siteconfig.models import SiteConfiguration
from reviewboard import get_package_version
def get_install_k... | Python | 0 | @@ -48,16 +48,27 @@
base64%0A
+import sys%0A
import t
@@ -1117,24 +1117,67 @@
'company'),%0A
+ '%25s.%25s.%25s' %25 sys.version_info%5B:3%5D,%0A
%5D))%0A%0A%0Ade
|
64d5847f058dec81a288482665a1d8208f0f4e17 | Fix security issue in singularity + misc cleanups (#8657) | var/spack/repos/builtin/packages/singularity/package.py | var/spack/repos/builtin/packages/singularity/package.py | ##############################################################################
# Copyright (c) 2013-2018, 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 | @@ -1405,19 +1405,34 @@
= %22http
+s
://
+www.sylabs.io/
singular
@@ -1438,16 +1438,8 @@
rity
-.lbl.gov
/%22%0A
@@ -1504,19 +1504,49 @@
ity/
-archive/2.4
+releases/download/2.5.2/singularity-2.5.2
.tar
@@ -1559,147 +1559,125 @@
-v
+# V
ersion
-('2.4.5', '9afa903ee019448104b4f40be77a46e7')%0A version(... |
346e6c45b3c2a49168eac9fd1b703bd5c05503b1 | fix sql дата начала-создания направления из подверждения исследования | rmis_integration/sql_func.py | rmis_integration/sql_func.py | from django.db import connection
from laboratory.settings import TIME_ZONE
def get_confirm_direction(d_s, d_e, limit):
with connection.cursor() as cursor:
cursor.execute(
"""WITH
t_all_direction AS (
SELECT DISTINCT ON (napravleniye_id) napravleniye_id FROM public.dire... | Python | 0.000076 | @@ -394,31 +394,10 @@
z)s
-BETWEEN %25(d_start)s AND
+%3C=
%25(d
@@ -1178,32 +1178,115 @@
AND %0A
+ data_sozdaniya AT TIME ZONE %25(tz)s %3E= %25(d_start)s%0A AND %0A
|
77ffc94a0439dd7309df0630cddba7daf60bc5ee | Add imported requests to Audit context. | src/ggrc/converters/requests.py | src/ggrc/converters/requests.py | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: silas@reciprocitylabs.com
# Maintained By: silas@reciprocitylabs.com
from .base import *
from ggrc.models import Request
from .base_row import *
fr... | Python | 0 | @@ -278,16 +278,23 @@
s import
+ Audit,
Request
@@ -1409,18 +1409,23 @@
s):%0A
-if
+audit =
options
@@ -1437,16 +1437,29 @@
'audit')
+%0A if audit
:%0A
@@ -1476,37 +1476,55 @@
udit
-_id = options.get('audit').id
+ = audit%0A self.obj.context = audit.context
%0A
|
d4c98e176833a4b37b7edf1d68741bcfa8c50213 | Return the name_sha of each flaky test in build_flaky_tests | changes/api/build_flaky_tests.py | changes/api/build_flaky_tests.py | from __future__ import absolute_import
from sqlalchemy.orm import joinedload
from changes.api.base import APIView
from changes.config import db
from changes.constants import Result
from changes.models.build import Build
from changes.models.job import Job
from changes.models.phabricatordiff import PhabricatorDiff
from... | Python | 0.05876 | @@ -1350,24 +1350,67 @@
test.name,%0A
+ 'name_sha': test.name_sha,%0A
|
3b950782e0f4140715084ebace2820db4f61c600 | Fix reindent-rst.py: it works on binary files | Tools/scripts/reindent-rst.py | Tools/scripts/reindent-rst.py | #!/usr/bin/env python
# Make a reST file compliant to our pre-commit hook.
# Currently just remove trailing whitespace.
import sys, re, shutil
ws_re = re.compile(r'\s+(\r?\n)$')
def main(argv=sys.argv):
rv = 0
for filename in argv[1:]:
try:
with open(filename, 'rb') as f:
... | Python | 0.000008 | @@ -159,16 +159,17 @@
compile(
+b
r'%5Cs+(%5Cr
@@ -373,16 +373,17 @@
_re.sub(
+b
r'%5C1', l
|
4eb100414a139d15d55bc752965d81e96bf5404d | Refactor from review | src/globus_cli/login_manager.py | src/globus_cli/login_manager.py | import functools
import click
from .tokenstore import token_storage_adapter
class LoginManager:
def __init__(self):
self._token_storage = token_storage_adapter()
def has_login(self, resource_server: str):
"""
Determines if the user has a refresh token for the given
resource ... | Python | 0 | @@ -409,18 +409,22 @@
-if
+return
tokens
@@ -430,15 +430,20 @@
is
+not
None
-or
+and
%22re
@@ -454,20 +454,16 @@
h_token%22
- not
in toke
@@ -468,55 +468,8 @@
kens
-:%0A return False%0A%0A return True
%0A%0A%0Ad
|
6f0bd1e6f85bcd58db5cd99eb3dd8a801ec8af62 | add comment | channelguide/cache/middleware.py | channelguide/cache/middleware.py | from Cookie import SimpleCookie
import time
from django.conf import settings
from django.core.handlers.wsgi import WSGIRequest
from django.template import Context, loader
import client
class CacheTimingMiddleware(object):
def process_request(self, request):
request.start_time = time.time()
def proces... | Python | 0 | @@ -824,32 +824,141 @@
uest.start_time%0A
+ footer = '%5Cn%3C!-- %25s --%3E' %25 line%0A response.content = response.content + footer.encode('utf-8')%0A
return r
|
65e0d22cfc340a9df8d1b25e114cf7173198644b | Fix incorrect variable used in pressure_fit | UConnRCMPy/pressure_traces.py | UConnRCMPy/pressure_traces.py | from __future__ import print_function
import numpy as np
import cantera as ct
from .constants import (cantera_version,
one_atm_in_bar,
one_atm_in_torr,
one_bar_in_pa,
)
from .utilities import ParsedFilename
class PressureT... | Python | 0.000004 | @@ -1117,24 +1117,25 @@
08*self.
-samp
freq
+uency
)%0A
@@ -1186,16 +1186,17 @@
elf.
-samp
freq
+uency
, be
|
7ca9e20b57153e3f42a61b8596ca43d264a89014 | Bump version number | VMEncryption/main/Common.py | VMEncryption/main/Common.py | #!/usr/bin/env python
#
# VM Backup extension
#
# Copyright 2015 Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | Python | 0.000002 | @@ -769,17 +769,17 @@
.0.99917
-5
+6
'%0A ex
|
5221630769f53853fea490e04301c2a19711894c | Fix #296. Generate name according to profile's sex. Thanks @Dutcho for the report | faker/providers/profile/__init__.py | faker/providers/profile/__init__.py | # coding=utf-8
from .. import BaseProvider
import itertools
class Provider(BaseProvider):
"""
This provider is a collection of functions to generate personal profiles and identities.
"""
def simple_profile(self):
"""
Generates a basic profile with personal informations
"""
... | Python | 0.000669 | @@ -325,16 +325,68 @@
-return %7B
+sex = self.random_element(%5B%22F%22, %22M%22%5D)%0A if sex == 'F':
%0A
@@ -398,19 +398,14 @@
-%22user
name
-%22:
+ =
sel
@@ -420,20 +420,46 @@
tor.
-user_name(),
+name_female()%0A elif sex == 'M':
%0A
@@ -471,15 +471,14 @@
-%22
name
-%22:
... |
981a74b116081f3ce1d97262c3c88104a953cdf4 | Use numpy's float supporting range | saau/sections/misc/header.py | saau/sections/misc/header.py | import matplotlib.pyplot as plt
from operator import gt, lt, itemgetter
from lxml.etree import fromstring, XMLSyntaxError
def frange(start, stop, step):
cur = start
op = gt if start > stop else lt
while op(cur, stop):
yield cur
cur += step
def parse_lines(lines):
for line in lines:
... | Python | 0.000001 | @@ -49,16 +49,8 @@
port
- gt, lt,
ite
@@ -112,155 +112,27 @@
or%0A%0A
-%0Adef frange(start, stop, step):%0A cur = start%0A op = gt if start %3E stop else lt%0A%0A while op(cur, stop):%0A yield cur%0A cur += step
+import numpy as np%0A
%0A%0A%0Ad
@@ -566,17 +566,20 @@
p(calc,
-f
+np.a
rang... |
0100816670ad988e51ffbce1d3c2725f8ed69439 | change kurisu command to Zoidbot | addons/extras.py | addons/extras.py | import datetime
import discord
import os
import random
import re
import string
from discord.ext import commands
from sys import argv
class Extras:
"""
Extra things.
"""
def __init__(self, bot):
self.bot = bot
print('Addon "{}" loaded'.format(self.__class__.__name__))
prune_key = "n... | Python | 0.000017 | @@ -362,14 +362,15 @@
def
-kurisu
+zoidbot
(sel
@@ -390,22 +390,23 @@
%22%22About
-Kurisu
+Zoidbot
%22%22%22%0A
@@ -438,22 +438,23 @@
(title=%22
-Kurisu
+Zoidbot
%22, color
@@ -472,13 +472,11 @@
lor.
-g
re
-en
+d
())%0A
@@ -510,28 +510,19 @@
me=%22
-916253 and ihaveahax
+T3CHNOLOG1C
%22)%0A
@@ -630,21... |
4e2fa3a249b9027f9e50f0f957163cad3bdc28bf | Fix typo | src/gramcore/features/points.py | src/gramcore/features/points.py | """Functions for extracting interest points.
These are applied to numpy.arrays representing images.
"""
import numpy
from skimage import feature
def harris(parameters):
"""Harris interest point operator.
It wraps `skimage.feature.harris`. The `threshold`, `eps` and
`gaussian_deviation` options are not ... | Python | 0.999999 | @@ -743,34 +743,175 @@
-Instead a for loop is used
+so a for loop is used.%0A%0A .. note::%0A%0A The coordinates returned are not directly on the corner, but a pixel%0A inside the object (TODO: is this expected?)
.%0A%0A
@@ -1471,17 +1471,16 @@
istance=
-p
min_dist
|
0e72816ac15652953c5d02a7543c72567d0bc069 | Update utils.py | django_libs/utils.py | django_libs/utils.py | """Additional helpful utility functions."""
import random
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from bs4 import BeautifulSoup
from HTMLParser import HTMLParser
from .loaders import load_member_from_setting
class conditional_decorator(obj... | Python | 0.000001 | @@ -6253,12 +6253,19 @@
l, %22
-lxml
+html.parser
%22)%0A
|
f4bbb244716f9471b520f53ebffaf34a31503cd1 | Remove unused imports (besides they are Py 2.x only) | Web/scripts/CPWeb/__init__.py | Web/scripts/CPWeb/__init__.py | """
CPWeb - A collection of commonly used routines to produce CoolProp's online documentation
=====
"""
from __future__ import division, absolute_import, print_function
import codecs
import csv
import cStringIO
def get_version():
return 5.0
if __name__ == "__main__":
print('You are using version %s of the... | Python | 0 | @@ -168,52 +168,8 @@
on%0A%0A
-import codecs%0Aimport csv%0Aimport cStringIO%0A%0A%0A
def
|
3b77fbb82d2ba098f00f7221070f9610d0d90809 | add unknown person | game.py | game.py | import random
from adventurelib import Item, Bag, when, start
import rooms
import characters
from sys import exit
people = '123456'
rooms = 'abcdef'
# murder configuration
# who was where
# who is the murderer
# current configuration
# who was where
# player location
murder_config_people = list(people)
random.... | Python | 0.999999 | @@ -603,17 +603,16 @@
am in: %22
-
, curren
@@ -984,32 +984,60 @@
exit%0A else:%0A
+ if m in people:%0A
print (%22
@@ -1072,11 +1072,85 @@
m)%0A
+ else:%0A print (%22No one has ever heard of '%25s'!%22 %25 m)%0A%0A%0A
start()
+%0A
|
55ff20aa2d2504fb85fa2f63cc9b52934245b849 | make the subscription also work for new minions, fixes #8 | saltobserver/redis_stream.py | saltobserver/redis_stream.py | from saltobserver import app, redis_pool
import gevent
from redis import Redis
from distutils.version import StrictVersion
import json
import time
class RedisStream(object):
def __init__(self):
self.redis = Redis(connection_pool=redis_pool)
actual_version = StrictVersion(self.redis.info()['redi... | Python | 0 | @@ -566,64 +566,8 @@
b()%0A
- # TODO: update subscription on newcomer minions%0A
@@ -593,17 +593,16 @@
bscribe(
-%5B
%22__keysp
@@ -613,78 +613,74 @@
0__:
-%7B0%7D
+*
:*.*%22
-.format(minion) for minion in self.redis.smembers('minions')%5D)
+)%0A # TODO: make redis db number (this %5E) configur... |
388eebc7cd168b5fcb31f737741673750bbb2a16 | rename variable to reflect reality | examples/circuit_failure_rates.py | examples/circuit_failure_rates.py | #!/usr/bin/env python
##
## This example uses ICircuitListener to monitor how many circuits have
## failed since the monitor started up. If this figure is more than 50%,
## a warning-level message is logged.
##
## Like the :ref:`stream_circuit_logger.py` example, we also log all new
## circuits.
##
import os
import... | Python | 0.000248 | @@ -885,21 +885,21 @@
):%0A%0A
-total
+built
_circuit
@@ -1187,29 +1187,29 @@
float(self.
-total
+built
_circuits +
@@ -1390,37 +1390,37 @@
_circuits, self.
-total
+built
_circuits)%0A%0A
@@ -1556,29 +1556,29 @@
cuits, self.
-total
+built
_circuits)%0A
@@ -2321,21 +2321,21 @@
self.
-total
+built
... |
144a35d639ccd3a60f100793df00fd62aa81766b | document no trust algo | game.py | game.py | """
For player in game:
if current player:
send move
else:
listen for move
receive move
decide winner
"""
| Python | 0 | @@ -1,9 +1,27 @@
%22%22%22%0A
-F
+Play with trust:%0A%0Af
or p
@@ -106,24 +106,24 @@
en for move%0A
-
rece
@@ -145,12 +145,441 @@
winner%0A
+%0A%0APlay trusting no one:%0A%0ASwap hashes:%0A for player in game:%0A if current player:%0A send hasher(move + salt)%0A else:%0A ... |
0e36db47311b936076161ff0d724e6d8733c8726 | Test accessibility of custom IOLoop subclass via base IOLoop.instance. | zmq/tests/test_ioloop.py | zmq/tests/test_ioloop.py | #-----------------------------------------------------------------------------
# Copyright (c) 2010-2012 Brian Granger, Min Ragan-Kelley
#
# This file is part of pyzmq
#
# Distributed under the terms of the New BSD License. The full license is in
# the file COPYING.BSD, distributed as part of this software.
#-----... | Python | 0 | @@ -732,16 +732,163 @@
Timeout%0A
+try:%0A from tornado.ioloop import IOLoop as BaseIOLoop%0Aexcept ImportError:%0A from zmq.eventloop.minitornado.ioloop import IOLoop as BaseIOLoop%0A
%0A%0A#-----
@@ -3515,24 +3515,117 @@
oop.IOLoop)%0A
+ loop = BaseIOLoop.instance()%0A self.assertEqual(loop.__c... |
866e0ec72163debd9f46b1ecb8e4d07b040694b4 | Fix absolute import | sand/cytoscape/themes/ops.py | sand/cytoscape/themes/ops.py | import sand.cytoscape.themes.colors as c
import sand.cytoscape.themes.label_positions as p
settings = {
# node style
'NODE_TRANSPARENCY': 255,
'NODE_SIZE': 25,
'NODE_BORDER_WIDTH': 4,
'NODE_BORDER_PAINT': c.BRIGHT_GREEN,
'NODE_FILL_COLOR': c.DARK_GREEN,
'NODE_SELECTED_PAINT': c.BRIGHT_YELL... | Python | 0.000173 | @@ -1,74 +1,44 @@
-import sand.cytoscape.themes.colors as c%0Aimport sand.cytoscape.themes.
+from . import colors as c%0Afrom . import
labe
|
75635315598ccbcad887bf77f7cdc99772157033 | Add construct_data function to construct data for the API | gist.py | gist.py | import os
import sys
from parser import parser
args = parser.parse_args()
def process_files(args):
"""
:param args:
The arguments parsed by argparse
:returns:
A dict containing file_names as keys and a
dict containing a key `content` as the value
Example return:
{
... | Python | 0 | @@ -1264,8 +1264,326 @@
turn rq%0A
+%0Adef construct_data(args):%0A %22%22%22%0A :param args:%0A The arguments parsed by argparse%0A :returns:%0A %60data%60 dict to be passed to crete the POST request%0A %22%22%22%0A data = %7B%0A %22public%22: args.secret,%0A %22description%... |
4fc918a7f55d8ef5dbcb2cf65f23d2d08a5ed6d0 | Exclude broken PDF. | scrapers/philadelphia.py | scrapers/philadelphia.py | #!/usr/bin/env python
import datetime
import os
import re
from utils import BaseParser, prevnext
from utils import ParserSpeech as Speech, ParserSection as Section
class PhilaParser(BaseParser):
instance = 'philadelphia'
def get_transcripts(self):
base_url = 'http://legislation.phila.gov/transcripts... | Python | 0 | @@ -899,32 +899,34 @@
load%0A
+ #
'2013-06-13', '
@@ -919,24 +919,47 @@
2013-06-13',
+ Broken PDF%0A
'2013-06-06
|
8db806d30d7591828528ac937e8f3b334e957ed3 | remove shim should by symmetric to add_shim | _distutils_hack/__init__.py | _distutils_hack/__init__.py | import sys
import os
import re
import importlib
import warnings
is_pypy = '__pypy__' in sys.builtin_module_names
def enabled():
"""
Allow selection of distutils by environment variable.
"""
which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'stdlib')
return which == 'local'
def warn_distutils_... | Python | 0.000001 | @@ -2540,16 +2540,21 @@
sys.
+meta_
path.rem
|
37ab58016e69993b5ab1d63c99d9afcf54bd95af | Implement more TGT Neutral Epics | fireplace/cards/tgt/neutral_epic.py | fireplace/cards/tgt/neutral_epic.py | from ..utils import *
##
# Minions
# Kodorider
class AT_099:
inspire = Summon(CONTROLLER, "AT_099t")
| Python | 0.000006 | @@ -37,69 +37,551 @@
%0A%0A#
-Kodorider%0Aclass AT_099:%0A%09inspire = Summon(CONTROLLER, %22AT_099t%22
+Twilight Guardian%0Aclass AT_017:%0A%09play = HOLDING_DRAGON & Buff(SELF, %22AT_017e%22)%0A%0A%0A# Sideshow Spelleater%0Aclass AT_098:%0A%09play = Summon(CONTROLLER, Copy(ENEMY_HERO_POWER))%0A%0A%0A# Kodorider%0Ac... |
dfe1213ba9de5e5e5aaf9690a2cf5e3b295869fa | Remove Python 3 incompatible print statement | examples/graph/degree_sequence.py | examples/graph/degree_sequence.py | #!/usr/bin/env python
"""
Random graph from given degree sequence.
"""
__author__ = """Aric Hagberg (hagberg@lanl.gov)"""
__date__ = "$Date: 2004-11-03 08:11:09 -0700 (Wed, 03 Nov 2004) $"
__credits__ = """"""
__revision__ = "$Revision: 503 $"
# Copyright (C) 2004 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Sc... | Python | 0.998568 | @@ -475,17 +475,17 @@
1%5D%0Aprint
-
+(
is_valid
@@ -503,16 +503,17 @@
uence(z)
+)
%0A%0Aprint(
@@ -884,10 +884,8 @@
st%5Bd%5D))%0A
-%0A%0A
|
ed9e55468eb18c31594bb1cbfc5e940ea5b68151 | Update Si7021.py | Adafruit_SI7021/Si7021.py | Adafruit_SI7021/Si7021.py | # The MIT License (MIT)
# Copyright (c) 2016 John Robinson
# Author: John Robinson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the righ... | Python | 0 | @@ -4680,17 +4680,16 @@
id%0A%0A
-#
def read
@@ -4709,17 +4709,16 @@
-#
%22%22%22Read
@@ -4777,17 +4777,16 @@
#
-#
Read te
@@ -4819,17 +4819,16 @@
-#
t = self
@@ -4850,32 +4850,35 @@
6BE(
-MCP9808_REG_AMBIENT_TEMP
+SI7021_CMD_MEAS_TEMP_NOMSTR
)%0A
@@ -4875,33 +4875,32 @@
NOMS... |
fcb3d026faf4648bbacc73f84e0e6dd6a25eeb6d | delete plotting function | code/lamost/li_giants/residuals.py | code/lamost/li_giants/residuals.py | """ Calculate residuals """
import numpy as np
import matplotlib.pyplot as plt
from math import log10, floor
from matplotlib import rc
import matplotlib.gridspec as gridspec
from matplotlib.colors import LogNorm
plt.rc('text', usetex=True)
from matplotlib.ticker import MaxNLocator
import sys
sys.path.insert(0, '/home/... | Python | 0.000001 | @@ -1991,291 +1991,8 @@
s%0A%0A%0A
-%0Adef plot_fit():%0A plt.plot(wl, resid%5Bii%5D)%0A plt.xlim(6400,7000)%0A plt.ylim(-0.1,0.1)%0A plt.axvline(x=6707.8, c='r', linestyle='--', linewidth=2)%0A plt.axvline(x=6103, c='r', linestyle='--', linewidth=2)%0A plt.show()%0A plt.savefig(%22resid_%25s.png%... |
72e30b3b881418d40dd0446842176fc5c4468802 | Add name url converter | flask_roots/routing.py | flask_roots/routing.py | from werkzeug.routing import BaseConverter
class RegexConverter(BaseConverter):
def __init__(self, url_map, *items):
super(RegexConverter, self).__init__(url_map)
self.regex = items[0]
def setup_routing(app):
app.url_map.converters['re'] = RegexConverter
| Python | 0.000001 | @@ -202,16 +202,843 @@
ms%5B0%5D%0A%0A%0A
+def strip_accents(s):%0A s = unicode(s)%0A return ''.join((c for c in unicodedata.normalize('NFD', s) if unicodedata.category(c) != 'Mn'))%0A%0A%0Adef _urlify_name(name):%0A %22%22%22Converts a name or title into something we can put into a URI.%0A %0A This is ... |
78b27c492db12ab2ca208e34a342ee86e1a8a307 | Set correct Fileheaders when Uploading to S3 | flask_admin/contrib/fileadmin/s3.py | flask_admin/contrib/fileadmin/s3.py | import time
try:
from boto import s3
from boto.s3.prefix import Prefix
from boto.s3.key import Key
except ImportError:
s3 = None
from flask import redirect
from flask_admin.babel import gettext
from . import BaseFileAdmin
class S3Storage(object):
"""
Storage object representing files on... | Python | 0 | @@ -4196,32 +4196,115 @@
f.bucket, path)%0A
+ headers = %7B%0A 'Content-Type' : file_data.content_type,%0A %7D%0A
key.set_
@@ -4338,16 +4338,33 @@
a.stream
+, headers=headers
)%0A%0A d
|
42463351a598d45f2738c894e00d0eceec308f9c | Add docstring | aegea/billing.py | aegea/billing.py | """
View detailed billing reports.
Detailed billing reports can be configured at https://console.aws.amazon.com/billing/home#/preferences.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import os, sys, json, zipfile, csv, io
from io import BytesIO, TextIOWrapper
from datetime ... | Python | 0.000005 | @@ -2090,16 +2090,37 @@
reports'
+, description=__doc__
)%0Aparser
|
19025b97d38706eda4f425667b69f7803a39ca35 | add tinyint as a bool type | flask_admin/contrib/sqla/filters.py | flask_admin/contrib/sqla/filters.py | import warnings
from flask.ext.admin.babel import lazy_gettext
from flask.ext.admin.model import filters
from flask.ext.admin.contrib.sqla import tools
class BaseSQLAFilter(filters.BaseFilter):
"""
Base SQLAlchemy filter.
"""
def __init__(self, column, name, options=None, data_type=None):
... | Python | 0.000001 | @@ -2898,16 +2898,27 @@
boolean'
+, 'tinyint'
)%0A de
|
6bcda3ee17fe75039c1ead65ff6888cdc20b29a3 | print statements | viaduct/models/page.py | viaduct/models/page.py | import datetime
from viaduct import db
from viaduct.models import Group
page_ancestor = db.Table('page_ancestor',
db.Column('page_id', db.Integer, db.ForeignKey('page.id')),
db.Column('ancestor_id', db.Integer, db.ForeignKey('page.id'))
)
class Page(db.Model):
__tablename__ = 'page'
id = db.Column(db.Integer, ... | Python | 0.999987 | @@ -3235,24 +3235,47 @@
.permission%0A
+%09%09%09%09%09print permissions%0A
%09%09%09%09%09if (per
|
803fead9cbfa9d2a950e9fa16f42e905f6a942d7 | add module imports | flocker/ca/__init__.py | flocker/ca/__init__.py | # Copyright ClusterHQ Inc. See LICENSE file for details.
"""
A minimal certificate authority.
"""
__all__ = [
"RootCredential", "ControlCredential", "NodeCredential",
"ComparableKeyPair", "PathError", "CertificateAlreadyExistsError",
"KeyAlreadyExistsError", "EXPIRY_20_YEARS",
"AUTHORITY_CERTIFICATE_... | Python | 0.000001 | @@ -166,16 +166,34 @@
ential%22,
+ %22UserCredential%22,
%0A %22Co
@@ -503,16 +503,32 @@
dential,
+ UserCredential,
%0A Com
|
b45db0476212891dd23934d775bc3082cbcaabdf | Fix KLD | ws/CSUIBotClass2014/MCL/kldmcl.py | ws/CSUIBotClass2014/MCL/kldmcl.py | # @obj: implement the standard MCL alg.; table 8.2 on the book Prob. Robotics by S. Thrun
# @author: vektor dewanto
import numpy as np
import CSUIBotClass2014.action_model.model_uas as act_model
import CSUIBotClass2014.perception_model.beam_range_finder_model as obs_model
def normalize_weight(X):
# Normalize all ... | Python | 0.000003 | @@ -266,16 +266,52 @@
bs_model
+%0Afrom scipy import stats%0Aimport math
%0A%0Adef no
@@ -908,17 +908,15 @@
-X.append(
+return
X_ba
@@ -931,17 +931,16 @@
ate_idx%5D
-)
%0A
@@ -1146,29 +1146,118 @@
-X_bar
+epsilon = 0.05%0A delta = 0.01%0A Xt
= %5B%5D
+
%0A
-X
+b
= %5B
-%5D
+%5B0... |
bf476a199492c7966b6a3886da284867622a8b04 | Update populate_vm_metrics.py | perfmetrics/scripts/populate_vm_metrics.py | perfmetrics/scripts/populate_vm_metrics.py | """Executes vm_metrics.py by passing appropriate arguments.
To run the script:
>> python3 populate_vm_metrics.py <start_time> <end_time>
"""
import socket
import sys
import time
import os
from vm_metrics import vm_metrics
INSTANCE = socket.gethostname()
metric_data_name = ['start_time_sec', 'cpu_utilization_peak','c... | Python | 0.000004 | @@ -1294,13 +1294,12 @@
_metrics
-!
')%0A%0A
|
853c6ec8d1c4f518e28f9f14547e2d8999c17ad9 | Update models.py | flask_appbuilder/security/models.py | flask_appbuilder/security/models.py | from sqlalchemy import Table, Column, Integer, String, Boolean, ForeignKey
from sqlalchemy.orm import relationship, column_property
from flask.ext.appbuilder import Base
class Permission(Base):
__tablename__ = 'ab_permission'
id = Column(Integer, primary_key=True)
name = Column(String(100), unique = True... | Python | 0 | @@ -1019,20 +1019,16 @@
rmission
-view
')%0A v
|
c18972be7609b3de061ec41977ad73efccd5213c | Fix HTTP Basic authentication decorator | agir/lib/http.py | agir/lib/http.py | import base64
from functools import wraps
from hashlib import sha1
from django.http import HttpResponse
from django.utils.crypto import constant_time_compare
EMPTY_HASH = sha1().digest()
class HttpResponseUnauthorized(HttpResponse):
status_code = 401
def __init__(self, content=b'', realm="api", *args, **k... | Python | 0.000091 | @@ -434,10 +434,27 @@
lm%7D%22
+, charset=%22UTF-8%22
'%0A
-
%0A%0Ade
@@ -717,23 +717,15 @@
1%5D).
-decode().
split(
+b
':')
@@ -1063,16 +1063,33 @@
ized()%0A%0A
+ return None%0A%0A
%0Adef wit
@@ -1283,16 +1283,31 @@
ies%5Buser
+.encode('utf8')
%5D = h.di
@@ -1521,32 +1521,39 @@
+return
... |
70de505674e5675d969a84339b6bb59431333ed3 | Revise comments and add space lines, & revise main() | lc0234_palindrome_linked_list.py | lc0234_palindrome_linked_list.py | """Leetcode 234. Palindrome Linked List
Easy
URL: https://leetcode.com/problems/palindrome-linked-list/
Given a singly linked list, determine if it is a palindrome.
Example 1:
Input: 1->2
Output: false
Example 2:
Input: 1->2->2->1
Output: true
Follow up:
Could you do it in O(n) time and O(1) space?
"""
# Definiti... | Python | 0 | @@ -453,338 +453,21 @@
ass
-LinkedList(object):%0A def __init__(self):%0A self.head = None%0A%0A def append(self, val):%0A if not self.head:%0A self.head = ListNode(val)%0A return None%0A current = self.head%0A while current.next:%0A current = current... |
b695762ffdf0f03337368f430e45a2406b7451ad | fix url | app/remote_rpc.py | app/remote_rpc.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Created by follow on 2016/10/28
from flask import Flask
from flaskext.xmlrpc import XMLRPCHandler, Fault
import jenkins
import time
import base64
import commands
from jinja2.nodes import Output
import os
import MySQLdb
import re
app = Flask(__name__)
handler = XMLRPCHa... | Python | 0.86565 | @@ -4088,19 +4088,44 @@
//%7B%7D:%7B%7D/
-%7B%7D/
+uploaded_file/%7B%7D?folder=SCM-
%7B%7D%22.form
@@ -4150,14 +4150,8 @@
80%22,
- path,
fil
@@ -4155,16 +4155,22 @@
filename
+, path
)%0A do
|
dfba61137a76addd4d85cf864505222a66737d8c | Use OpenEx when available with visOpenCopy and visOpenRO flags | visio2img/visio2img.py | visio2img/visio2img.py | # -*- coding: utf-8 -*-
# Copyright 2014 Yassu
#
# 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 o... | Python | 0 | @@ -2116,32 +2116,479 @@
)%0A%0A try:%0A
+ if hasattr(self.app.Documents, %22OpenEx%22):%0A # Visio %3E= 4.5 supports OpenEx%0A # visOpenCopy + visOpenRO allows opening documents even%0A # if they're open in another visio instance...%0A visO... |
a63dea0f7cf448e8423359e5bc0989586fe94af8 | Fix could not handle error collectly if visio not found | visio2img/visio2img.py | visio2img/visio2img.py | #!/usr/bin/env python3
import sys
from sys import stderr
from os import path
from optparse import OptionParser
from math import log
__all__ = ('export_img')
GEN_IMG_FORMATS = ('.gif', '.jpeg', '.jpg', '.png')
VISIO_FORMATS = ('.vsd', '.vsdx')
def is_pywin32_available():
try:
import win32com # NOQA: i... | Python | 0 | @@ -1997,35 +1997,8 @@
%22%22%22%0A
- import win32com.client%0A
@@ -2715,41 +2715,38 @@
-# make instance for visio
+import win32com.client
%0A
_,
@@ -2745,79 +2745,17 @@
- _,
visio
-_extension = path.splitext(visio_filename)%0A application
+app
= w
@@ -2804,198 +2804,129 @@
... |
3e8d113a6fa32c7c9163d3334e484993c29080ba | remove split test | vlermv/test/test_s3.py | vlermv/test/test_s3.py | import json
import pytest
from .._s3 import S3Vlermv, split
class FakeBucket:
def __init__(self, name, **db):
self.db = db
self.name = name
def list(self):
for key in self.db:
yield self.new_key(key)
def new_key(self, key):
return FakeKey(self.db, key)
def ... | Python | 0.000006 | @@ -51,15 +51,8 @@
ermv
-, split
%0A%0Acl
@@ -1687,112 +1687,8 @@
D%7D%0A%0A
-def test_split():%0A assert split('a/bb/cc') == ('a', 'bb', 'cc')%0A assert split('one') == ('one',)%0A%0A
def
|
d4ffe068638aa1394c1a34eaa43859edb47c0473 | Update hodograph_inset example for plot the colormap by height. | examples/plots/Hodograph_Inset.py | examples/plots/Hodograph_Inset.py | # Copyright (c) 2016 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""
Hodograph Inset
===============
Layout a Skew-T plot with a hodograph inset into the plot.
"""
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1.inset_locator import... | Python | 0 | @@ -1412,16 +1412,55 @@
units.%0A%0A
+hght = df%5B'height'%5D.values * units.hPa%0A
p = df%5B'
@@ -2515,22 +2515,12 @@
v,
-np.hypot(u, v)
+hght
)%0A%0A#
|
c289c8a165850af76d45aa2d6773418a2c5c1ad3 | Add Pylint exemption. | Python_Toolbox_Template.pyt | Python_Toolbox_Template.pyt | # -*- coding=utf-8 -*-
"""##TODO: Docstring."""
##TODO: Standard lib imports.
import logging
##TODO: Third-party imports.
##TODO: Local imports.
import arcpy
LOG = logging.getLogger(__name__)
PARAMETER_ATTRIBUTES = {
'example_parameter': {
# Match parameter name to dictionary key.
... | Python | 0 | @@ -2474,16 +2474,48 @@
= False
+ # pylint: disable=invalid-name
%0D%0A
|
130234f0f62c04b3cc0a4b20f0de789959abf4c9 | Change default zoom to 16 and make it overridable | molly/maps/__init__.py | molly/maps/__init__.py | from molly.maps.osm.utils import fit_to_map
class Map:
"""
An object which represents a Map. This should be added to a context and then
passed to @C{render_map} in your template to get the appropriate HTML
"""
def __init__(self, centre_point, points, min_points, zoom, width, height):
"... | Python | 0 | @@ -2323,16 +2323,25 @@
='green'
+, zoom=16
):%0A %22
@@ -2498,10 +2498,12 @@
1,
-18
+zoom
, wi
|
3b0865bbfcee18afb842cc9f50f8c83c0d70f221 | Add the other v ;-). | sphinx/fabfile.py | sphinx/fabfile.py | from fabric.api import run, env, roles
from fabric.contrib.files import exists
from fabric.contrib.project import rsync_project
import sys
sys.path.append("source")
import conf
env.roledefs = {
'web': ['bokeh.pydata.org']
}
env.user = "bokeh"
@roles('web')
def deploy(v=None):
if v is None:
v = conf.... | Python | 0.000005 | @@ -1326,15 +1326,20 @@
s first.%22 %25
-v
+(v, v)
)%0A
|
b3ddba27c92f36ee9534903b43ff632daa148585 | Fix public body search index by indexing jurisdiction name | froide/publicbody/search_indexes.py | froide/publicbody/search_indexes.py | from django.conf import settings
from haystack import indexes
from haystack import site
from publicbody.models import PublicBody
from helper.searchindex import QueuedRealTimeSearchIndex
PUBLIC_BODY_BOOSTS = getattr(settings, "FROIDE_PUBLIC_BODY_BOOSTS", {})
class PublicBodyIndex(QueuedRealTimeSearchIndex):
te... | Python | 0.000723 | @@ -495,16 +495,22 @@
sdiction
+__name
', defau
|
8191d25e732b16a0121bd64320348108b9259892 | Add SecurityQuestionModelAdmin | molo/profiles/admin.py | molo/profiles/admin.py | import csv
from daterange_filter.filter import DateRangeFilter
from django.contrib import admin
from django.http import HttpResponse
from django.contrib.auth.models import User
from django.contrib.auth.admin import UserAdmin
from django.contrib.admin.sites import NotRegistered
from molo.profiles.admin_views import Fro... | Python | 0 | @@ -333,16 +333,66 @@
minView%0A
+from molo.profiles.models import SecurityQuestion%0A
from wag
@@ -2974,8 +2974,197 @@
ueryset%0A
+%0A%0Aclass SecurityQuestionModelAdmin(WagtailModelAdmin):%0A model = SecurityQuestion%0A menu_label = %22Security Questions%22%0A add_to_settings_menu = True%0A search_fiel... |
6499aecb18104114d47707ba4c1080bb817f7ccc | Update loadlogs.py | logger/loadlogs.py | logger/loadlogs.py | #!/usr/bin/env python
from tools import *
from ratchet import *
from logaccess_config import *
# Retrieving from CouchDB a Title dictionary as: dict['bjmbr']=XXXX-XXXX
acrondict = getTitles()
proc_coll = get_proc_collection()
allowed_issns = []
for key, issn in acrondict.items():
allowed_issns.append(issn)
if a... | Python | 0.000001 | @@ -697,11 +697,9 @@
mit=
-100
+5
)%0A
|
3da17a2f61daecc34772ead7e6caffa9da49bf48 | Add default values and shebang | 06-setPositionFromArgs.py | 06-setPositionFromArgs.py | # We have to import the minecraft api module to do anything in the minecraft world
from mcpi.minecraft import *
import sys
# this means that the file can be imported without executing anything in this code block
if __name__ == "__main__":
"""
First thing you do is create a connection to minecraft
This is... | Python | 0 | @@ -1,8 +1,31 @@
+#!/usr/bin/env python%0A%0A
# We hav
@@ -1018,24 +1018,81 @@
at(message)%0A
+ #Set Default values%0A newXposn = 0%0A newZposn = 0
%0A numOfAr
|
d41a6769fcb6d9d3788ad23ac031ecebd3775bc1 | fix "clang-format/tidy" mixup in doc comment [NFC] | scripts/clang_tidy_report.py | scripts/clang_tidy_report.py | #!/usr/bin/env python3
# Copyright 2020 Google LLC
#
# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://llvm.org/LICENSE.txt
#
# Unless required by applicable law ... | Python | 0 | @@ -913,22 +913,20 @@
y clang-
-format
+tidy
and ret
|
8a8ea6a554e0142823be8b13b9cfb1de43acafec | fix bug when get data by key | api/api/views.py | api/api/views.py | #coding:utf-8
from cgi import FieldStorage
import json
from uuid import uuid4
from schema.product import ProductSchema
import colander
from mapping.products import Product
from cornice import Service
from webob import exc
from webob.response import Response
from couchdb.json import encode as couchdb_json_encode
prod... | Python | 0 | @@ -1536,32 +1536,35 @@
h_data%5Bu'rows'%5D%5B
+0%5D%5B
u'value'%5D%5Bu'id'%5D
@@ -1578,32 +1578,35 @@
h_data%5Bu'rows'%5D%5B
+0%5D%5B
u'value'%5D%5Bu'_id'
@@ -1631,32 +1631,35 @@
h_data%5Bu'rows'%5D%5B
+0%5D%5B
u'value'%5D%5Bu'_id'
@@ -1704,16 +1704,19 @@
'rows'%5D%5B
+0%5D%5B
u'value'
|
de381a56e87a21da1e82146da01bb546c5094ec4 | Print the traceback as well for debugging purposes. | scripts/asgard-deploy.py | scripts/asgard-deploy.py | #!/usr/bin/env python
import sys
import logging
import click
from os import path
# Add top-level module path to sys.path before importing tubular code.
sys.path.append( path.dirname( path.dirname( path.abspath(__file__) ) ) )
from tubular import asgard
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
@cl... | Python | 0 | @@ -41,16 +41,33 @@
logging%0A
+import traceback%0A
import c
@@ -515,16 +515,46 @@
ion, e:%0A
+ traceback.print_exc()%0A
|
d24ea7a2e3b87861480b2ec9792811f177d974b4 | Fix over-correction of pixel coordinates in regions | aplpy/regions.py | aplpy/regions.py | try:
import pyregion
pyregion_installed = True
except:
pyregion_installed = False
def _check_pyregion_installed():
if not pyregion_installed:
raise Exception("The pyregion package is required to load region files")
from .decorators import auto_refresh
class Regions:
"""
Regions sub-... | Python | 0.001369 | @@ -3503,32 +3503,51 @@
n rrim:%0A
+for i in range(len(
r.coord_list%5B0%5D
@@ -3546,17 +3546,16 @@
list
-%5B0%5D += 1%0A
+)):%0A
@@ -3571,17 +3571,17 @@
rd_list%5B
-1
+i
%5D += 1%0A%0A
|
f06e5adfa9f01a9304e08288c8baf0ef652851f0 | fix timeout value to seconds | mopidy/stream/actor.py | mopidy/stream/actor.py | from __future__ import absolute_import, unicode_literals
import fnmatch
import logging
import re
import time
import pykka
from mopidy import audio as audio_lib, backend, exceptions, stream
from mopidy.audio import scan, tags
from mopidy.compat import urllib
from mopidy.internal import http, playlists
from mopidy.mod... | Python | 0.000001 | @@ -2436,12 +2436,8 @@
g up
- %25s:
%25s'
@@ -4957,16 +4957,21 @@
_timeout
+/1000
)%0A%0A
|
7b76b48bac70f1c19f4311c51d84eac8c7cf968a | Debug log when we get no browse results | mopidy_dirble/actor.py | mopidy_dirble/actor.py | from __future__ import unicode_literals
import logging
from mopidy import backend
from mopidy.models import Image, Ref, SearchResult
import pykka
from . import client, translator
logger = logging.getLogger(__name__)
class DirbleBackend(pykka.ThreadingActor, backend.Backend):
uri_schemes = ['dirble']
def... | Python | 0 | @@ -2220,24 +2220,143 @@
I: %25s', uri)
+%0A return %5B%5D%0A%0A if not result:%0A logger.debug('Did not find any browse results for: %25s', uri)
%0A%0A re
|
0a81356e0f8011f0764a8c28719d1371e5860656 | Make sure create_privatekml mgmt command produces unique names less than 100 chars; fail gracefully if not | lingcod/layers/management/commands/create_privatekml.py | lingcod/layers/management/commands/create_privatekml.py | from django.core.management.base import BaseCommand, AppCommand
from django.conf import settings
from optparse import make_option
import os
import glob
from lingcod.layers.models import PrivateKml
from django.contrib.auth.models import User, Group
class Command(BaseCommand):
help = "Populates the PrivateKml table ... | Python | 0 | @@ -1336,16 +1336,90 @@
'.')%5B0%5D%0A
+ privatekml_name = d+'_'+basename%0A try:%0A
@@ -1468,22 +1468,28 @@
ame=
-d+%22_%22+basename
+privatekml_name%5B:99%5D
,bas
@@ -1499,16 +1499,20 @@
ml=kml)%0A
+
@@ -1549,24 +1549,28 @@
+
pkml.sharin... |
3116617b4ab9d0b8168c8c8d7fb511a5793280bc | correct syntax of join | scripts/jython/import_osc.py | scripts/jython/import_osc.py | from xml.sax import make_parser, handler
from xml.sax.handler import ContentHandler
import sys
import java.lang
from org.apache.hadoop.hbase import HBaseConfiguration, HTableDescriptor, HColumnDescriptor, HConstants
from org.apache.hadoop.hbase.client import HBaseAdmin, HTable
from org.apache.hadoop.hbase.client im... | Python | 0.007571 | @@ -2352,16 +2352,22 @@
oin(%22%25s%22
+ %25 tag
for tag
|
9a1921fb27b7073d9c79f6727766eb516478f403 | Bump version 0.6.0 (git sync solution) | cmscloud_client/__init__.py | cmscloud_client/__init__.py | # -*- coding: utf-8 -*-
__version__ = '0.5.4'
| Python | 0 | @@ -38,9 +38,9 @@
'0.
-5.4
+6.0
'%0A
|
2301908ef1a0da7ede392c424c1c813fca517f7a | version bump | academictorrents/version.py | academictorrents/version.py | __version__ = "2.0.16"
| Python | 0.000001 | @@ -17,8 +17,8 @@
.0.1
-6
+7
%22%0A%0A
|
9926cbb1919b96999d479f5a8d67e17ce71a1091 | Improve the get_nick a tiny amount | motobot/irc_message.py | motobot/irc_message.py | class IRCMessage:
""" Class to store and parse an IRC Message. """
def __init__(self, msg):
""" Parse a raw IRC message to IRCMessage. """
self.sender = None
self.nick = None
self.command = None
self.params = []
self.__parse_msg(msg)
def __parse_msg(self, ... | Python | 0.000021 | @@ -1102,13 +1102,16 @@
plit('!'
+, 1
)%5B0%5D%0A
|
119ce47d9e876c345c2bc44751ccf04f0b226259 | Remove lie_system package dependency | components/lie_structures/setup.py | components/lie_structures/setup.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# package: lie_docking
# file: setup.py
#
# Part of ‘lie_docking’, a package providing molecular docking functionality
# for the LIEStudio package.
#
# Copyright © 2016 Marc van Dijk, VU University Amsterdam, the Netherlands
#
# Licensed under the Apache License, Version ... | Python | 0 | @@ -1397,22 +1397,8 @@
es=%5B
-'lie_system',
'ope
|
ad02f9e35409ae0d8301414d7d297257e9cec982 | change M-layer init to 'uniform' | m_layer/m_layer.py | m_layer/m_layer.py | # coding=utf-8
# Copyright 2020 The Google Research 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 applicab... | Python | 0.000182 | @@ -1962,22 +1962,23 @@
nit or '
-n
+unif
orm
-al
'%0A se
|
eb48fba5b3334437a752681df200c2bbefb0bc18 | change font to be purple | NEMbox/osdlyrics.py | NEMbox/osdlyrics.py | from PyQt4 import QtGui, QtCore, QtDBus
import sys
import os
from multiprocessing import Process
class Lyrics(QtGui.QWidget):
def __init__(self):
super(Lyrics, self).__init__()
self.initUI()
def initUI(self):
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
self.resize(900... | Python | 0.999989 | @@ -744,15 +744,19 @@
lor(
-0
+128
, 0,
-0
+128
))%0A
|
c61d4c6df77fe505074c81eebaec938c6716d9ab | Create columns before querying them. | sqlaload/query.py | sqlaload/query.py | import logging
from itertools import count
from sqlalchemy.sql import expression, and_
log = logging.getLogger(__name__)
def resultiter(rp):
""" SQLAlchemy ResultProxies are not iterable to get a
list of dictionaries. This is to wrap them. """
keys = rp.keys()
while True:
row = rp.fetchone()... | Python | 0 | @@ -80,16 +80,60 @@
on, and_
+%0Afrom sqlaload.schema import _ensure_columns
%0A%0Alog =
@@ -674,16 +674,55 @@
, **kw):
+%0A _ensure_columns(engine, table, kw)
%0A%0A if
|
0c4e6ff26d716bf20a1a7c36a4e3e363a1101c2a | add forced/default to plexpy.library.stream | Contents/Libraries/Shared/plex/objects/library/stream.py | Contents/Libraries/Shared/plex/objects/library/stream.py | from plex.objects.core.base import Descriptor, Property
class Stream(Descriptor):
id = Property(type=int)
index = Property(type=int)
stream_type = Property('streamType', type=int)
selected = Property(type=bool)
title = Property
duration = Property(type=int)
codec = Property
codec_id... | Python | 0 | @@ -224,16 +224,84 @@
=bool)%0A%0A
+ forced = Property(type=bool)%0A default = Property(type=bool)%0A%0A
titl
|
d03bd67e12201fa24f1f8c288246581224494357 | optimize analyze_all a bit | mptracker/proposals.py | mptracker/proposals.py | from time import sleep
import logging
import flask
from flask.ext.script import Manager
from flask.ext.rq import job
from mptracker import models
from mptracker.common import ocr_url
from mptracker.nlp import match_text_for_mandate
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
proposals = flask.B... | Python | 0.000001 | @@ -3372,32 +3372,90 @@
skip = n_ok = 0%0A
+ text_row_ids = models.OcrText.all_ids_for('proposal')%0A
for sponsors
@@ -3646,21 +3646,31 @@
osal
-.text is None
+_id not in text_row_ids
:%0A
|
e92a612ba231eebb8dbe7ac42d24ac002a89fbe1 | add docstring | frappe/utils/logger.py | frappe/utils/logger.py | # imports - compatibility imports
from __future__ import unicode_literals
# imports - standard imports
import logging
import os
from logging.handlers import RotatingFileHandler
# imports - third party imports
from six import text_type
# imports - module imports
import frappe
default_log_level = logging.DEBUG
site ... | Python | 0.000005 | @@ -416,19 +416,709 @@
):%0A%09
-global site
+%22%22%22Application Logger for your given module%0A%0A%09Args:%0A%09%09module (str): Name of your logger and consequently your log file.%0A%09%09with_more_info (bool, optional): Will log the form dict using the SiteContextFilter. Defaults to False.%0A%09%09_site (str, opt... |
951348a42e560ceb2ae0aef6b96f61c92493287d | fix pylint issues | sdcm/cluster_k8s/iptables.py | sdcm/cluster_k8s/iptables.py | # 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, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be usefu... | Python | 0.000001 | @@ -835,24 +835,65 @@
%22C%22, %22D%22%5D%0A%0A%0A
+# pylint: disable=too-few-public-methods%0A
class Iptabl
@@ -1657,24 +1657,65 @@
ec.ports%5D%0A%0A%0A
+# pylint: disable=too-few-public-methods%0A
class Iptabl
@@ -4652,16 +4652,53 @@
les))%0A%0A%0A
+# pylint: disable=too-many-arguments%0A
def ipta
|
24fbe55a3517e50f4d158bbb7b8857f8f10dc148 | Use argparse to parse julia-py arguments | src/julia/julia_py.py | src/julia/julia_py.py | from __future__ import print_function, absolute_import
from argparse import Namespace
import os
import sys
from .api import LibJulia
from .tools import julia_py_executable
def parse_args(args):
ns = Namespace(julia="julia")
jl_args = list(args)
if len(jl_args) >= 2 and jl_args[0] == "--julia":
... | Python | 0.000004 | @@ -1,12 +1,51 @@
+%22%22%22%0ALaunch Julia through PyJulia.%0A%22%22%22%0A%0A
from __futur
@@ -92,37 +92,22 @@
rt%0A%0A
-from argparse import Namespac
+import argpars
e%0Aim
@@ -152,16 +152,47 @@
ibJulia%0A
+from .core import enable_debug%0A
from .to
@@ -232,474 +232,92 @@
def
-parse_args(args):%0A ns = Name... |
59e7fc5c924ebf8af66e0aeef990da55e84d3f9e | update to 3.30.1 | packages/dependencies/sqlite3.py | packages/dependencies/sqlite3.py | {
'repo_type' : 'archive',
'custom_cflag' : '-O2', # make sure we build it without -ffast-math
'download_locations' : [
{ 'url' : 'https://www.sqlite.org/2019/sqlite-autoconf-3300000.tar.gz', 'hashes' : [ { 'type' : 'sha256', 'sum' : 'e0a8cf4c7a87455e55e10413d16f358ca121ccec687fe1301eac95e2d340fc58' }, ], },
{ '... | Python | 0.000001 | @@ -169,33 +169,33 @@
te-autoconf-3300
-0
+1
00.tar.gz', 'has
@@ -237,72 +237,72 @@
: '
-e0a8cf4c7a87455e55e10413d16f358ca121ccec687fe1301eac95e2d340fc58
+8c5a50db089bd2a1b08dbc5b00d2027602ca7ff238ba7658fabca454d4298e60
' %7D,
@@ -372,17 +372,17 @@
onf-3300
-0
+1
00.tar.g
@@ -432,72 +432,72 @@
: '
-e0a8cf4c7a8... |
6ad4796030aab2f6dbf8389b4030007d0fcf8761 | Update to test for mount setup | panoptes/test/mount/test_ioptron.py | panoptes/test/mount/test_ioptron.py | from nose.tools import raises
import panoptes
from panoptes.mount.ioptron import Mount
class TestIOptron():
@raises(AssertionError)
def test_no_config_no_commands(self):
""" Mount needs a config """
mount = Mount()
@raises(AssertionError)
def test_config_no_commands(self):
""" """
mount = Mount(config={... | Python | 0 | @@ -252,34 +252,35 @@
def test_config_
-no
+bad
_commands(self):
@@ -285,16 +285,82 @@
):%0A%09%09%22%22%22
+ Passes in a default config but blank commands, which should error
%22%22%22%0A%09%09m
@@ -451,11 +451,230 @@
nds=
-dict()
+%7B'foo': 'bar'%7D)%0A%0A%09def test_config_auto_commands(self):%0A%09%09%22%22%2... |
edcee81796f335c87ec15c258f4f551a6fd21c55 | kill UI when manager failed to start | selfdrive/manager/manager.py | selfdrive/manager/manager.py | #!/usr/bin/env python3
import datetime
import os
import signal
import subprocess
import sys
import traceback
from typing import List, Tuple, Union
import cereal.messaging as messaging
import selfdrive.sentry as sentry
from common.basedir import BASEDIR
from common.params import Params, ParamKeyType
from common.text_wi... | Python | 0.000005 | @@ -6168,24 +6168,104 @@
to start%22)%0A%0A
+ try:%0A managed_processes%5B'ui'%5D.stop()%0A except Exception:%0A pass%0A%0A
# Show l
|
6b3e44b5e3ba66b870a584544a15a17036cf043a | fix syntax error | fruitScope/plotjson.py | fruitScope/plotjson.py | import json
import Gnuplot, Gnuplot.PlotItems, Gnuplot.funcutils
import argparse
import time, os, sys
import tempfile
import math
def check_dir(directory):
if not os.path.exists(directory):
print "Directory {} does not exist...creating...".format(directory)
os.makedirs(directory)
def main():
p... | Python | 0.000003 | @@ -1531,28 +1531,16 @@
lf.cfg =
-%0A
%7B%0A
|
c884eae90e41577670b8bd194cc55b31e49f3f61 | fix data provider ref | src/py/crankshaft/crankshaft/clustering/kmeans.py | src/py/crankshaft/crankshaft/clustering/kmeans.py | from sklearn.cluster import KMeans
import numpy as np
from crankshaft.analysis_data_provider import AnalysisDataProvider
class Kmeans:
def __init__(self, data_provider=None):
if data_provider is None:
self.data_provider = AnalysisDataProvider()
else:
self.data_provider = d... | Python | 0 | @@ -2070,18 +2070,19 @@
elf.
-query_runn
+data_provid
er.g
|
4f0e0d4d92301dea408925d99001913e76a15ee1 | Update filterscan.py | lib/filterscan.py | lib/filterscan.py |
try:
import subprocess
from lib.core.core import Core
from lib.filter.filter import Filter
except ImportError, err:
from lib.core.core import Core
Core.print_error(err)
class FilterScan(Filter):
def __init__(self, args):
Filter.__init__(self, [args.pcap], args, "filter")
print self._output_dir
def _... | Python | 0 | @@ -1,10 +1,20 @@
-%0A
try:%0A
+%09import os%0A
%09imp
@@ -235,17 +235,37 @@
args):%0A%09
-%09
+%0A%09%09self.__args = args
%0A%09%09Filte
@@ -282,16 +282,23 @@
(self, %5B
+self.__
args.pca
@@ -301,16 +301,23 @@
.pcap%5D,
+self.__
args, %22f
@@ -328,33 +328,8 @@
r%22)%0A
-%09%09print self._output_dir%0A
%0A%... |
f953117b2e42721fafd52865145cbba7b989dd22 | Fix the wsgi path reference | accountant/settings/common.py | accountant/settings/common.py | """
Django settings for accountant project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
import os
import sys
from decimal import Decimal
import accounting
V... | Python | 0.001083 | @@ -2445,27 +2445,16 @@
TION = '
-accountant.
wsgi.app
|
bf9c799d1fb13098bd4bce65d44f86bb352b834a | Comment out an extensive validation | main.py | main.py | #!/usr/bin/python3
#
# The MIT License (MIT)
#
# Copyright (c) 2013 Andrian Nord
#
# 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... | Python | 0 | @@ -2348,32 +2348,34 @@
pre_pass(ast)%0A%0A%09
+#
ljd.ast.validato
@@ -2431,32 +2431,34 @@
k_locals(ast)%0A%0A%09
+#
ljd.ast.validato
@@ -2529,24 +2529,26 @@
rary(ast)%0A%0A%09
+#
ljd.ast.vali
@@ -2610,28 +2610,22 @@
nwarper.
-primary_pass
+unwarp
(ast)%0A%0A%09
@@ -2617,32 +2617,34 @@
.unwarp(ast)%0A%0A%09... |
3b6cc83cfea47550619d8a1d966131a1cc90f1c9 | clean up processes/threads | lib/ipf/engine.py | lib/ipf/engine.py |
###############################################################################
# Copyright 2012 The University of Texas at Austin #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #... | Python | 0.000001 | @@ -3170,73 +3170,20 @@
-# wait again, in case we terminated%0A while self._anyAlive(
+for step in
work
@@ -3184,33 +3184,32 @@
n workflow.steps
-)
:%0A ti
@@ -3206,30 +3206,26 @@
-time.sleep(0.1
+step.join(
)%0A%0A
@@ -4048,16 +4048,138 @@
ut(None)
+ # send None to indicate... |
c52d056091acf49624450cc2d1e01cbf0900a08f | Add a profiling option | main.py | main.py | #!/usr/bin/env python
import sys
from PyQt4.QtGui import QApplication as QApp
from gui.EditorWindow import MainWindow
def main():
import grammar.grammars
grammar.grammars.compileGrammars()
app = QApp(sys.argv)
ex = MainWindow()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
| Python | 0.00003 | @@ -298,16 +298,123 @@
ain__':%0A
+%0A profile = False%0A%0A if profile:%0A import cProfile%0A cProfile.run('main()')%0A else:%0A
main
|
c8a6699b7dca3f82905ae01f17f04337dd926b83 | Tweak for Android build. | main.py | main.py | #!/usr/bin/env python3
from flask import Flask
from flask import redirect
from flask_socketio import SocketIO, emit
from flask import stream_with_context, Response
from wsgidav.wsgidav_app import DEFAULT_CONFIG, WsgiDAVApp
from wsgidav.fs_dav_provider import FilesystemProvider
from werkzeug.wsgi import DispatcherMiddle... | Python | 0 | @@ -1210,16 +1210,41 @@
.stop()%0A
+ if not _ANDROID:%0A
Gtk.
|
30abf36b7626035f657a4417346fc303725462c4 | Add new grouptype to db init | main.py | main.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Shikin, political donations database.
"""
from argparse import ArgumentParser
import shikin
import os
from shikin.model import GroupType, DocType, PubType, User, AppConfig
def initdb_command(args):
"""Creates the database tables."""
db = shikin.app.dbobj
... | Python | 0 | @@ -817,24 +817,92 @@
ype(u'%E4%B8%8D%E6%98%8E'))%0A
+ if groups %3C 8:%0A db.session.add(GroupType(u'%E5%9B%BD%E4%BC%9A%E8%AD%B0%E5%93%A1%E9%96%A2%E4%BF%82%E6%94%BF%E6%B2%BB%E5%9B%A3%E4%BD%93'))%0A
db.s
@@ -1503,16 +1503,43 @@
hash='*'
+, email='admin@toumeika.jp'
))%0A
|
2a2d34dced729ca5896b10522ccc41f58278cb28 | add docstring to argparse_main function | main.py | main.py | #!/usr/bin/env python3
"""
responsible for calling other modules and interacting with user
To solve the challenge problem, run:
./main.py --count 7 7 -k2 -q2 -b2 -n1
"""
import sys
from time import time as now
import argparse
from pieces import ChessPiece
from solution import (
find_solutions_s,
find_solu... | Python | 0.000001 | @@ -1994,24 +1994,115 @@
rse_main():%0A
+ %22%22%22%0A parses the command line arguments and options, and performs operations%0A %22%22%22%0A
parser =
|
c76d77e8f639ea1eb9c61e41f1e11a4c12f6780e | allow lowercase urls | main.py | main.py | #!/usr/bin/env python
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
import pytz
from datetime import datetime
from google.appengine.api import memcache
from google.appengine.api import urlfetch
from google.appengine.ext import webapp
from google.appengine.ext.webapp import util, template
import logging
... | Python | 0.005941 | @@ -670,30 +670,16 @@
= False%0A
-
%0Adef _re
@@ -1214,28 +1214,16 @@
content)
-
%0A
@@ -1945,28 +1945,16 @@
00 OK%22)%0A
-
%0Aclass I
@@ -2929,24 +2929,16 @@
ON_ID'%5D%0A
-
%0A
@@ -3697,32 +3697,16 @@
else:
-
%0A
@@ -3760,2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.