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 |
|---|---|---|---|---|---|---|---|
6fb6fdee06410d1d051134f0b9dcb47ad2ac1885 | Simplify code around re-raising an error. | azurectl/setup_account_task.py | azurectl/setup_account_task.py | # Copyright (c) 2015 SUSE Linux GmbH. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | Python | 0.999998 | @@ -2477,46 +2477,8 @@
ed:%0A
- t, v, tb = sys.exc_info()%0A
@@ -2630,17 +2630,8 @@
aise
- t, v, tb
%0A%0A
|
e12f0d753817c4774af9e59aff81a6fa6b98b119 | Version devel | src/robotide/version.py | src/robotide/version.py | # Automatically generated by `pavement.py`.
VERSION = '1.4.1'
| Python | 0 | @@ -52,13 +52,24 @@
= '
-1.4.1
+devel-2015-08-13
'%0A
|
03cae330bcad76fc01ea591e527790bc35139490 | Fix itypes param typo | client/movie_rec_app.py | client/movie_rec_app.py |
from appdata import AppData
import predictionio
import sys
from app_config import APP_KEY, API_URL
ENGINE_NAME = 'movie-rec'
SIM_ENGINE_NAME = 'movie-sim'
class App:
def __init__(self):
self._app_data = AppData()
self._client = predictionio.Client(APP_KEY, 1, API_URL)
def run(self):
state = "[Main Menu]"
... | Python | 0.000895 | @@ -2248,17 +2248,17 @@
ypes' :
-v
+i
.genres
|
202cec13f135988e5e73764790f1d10427d6f139 | fix import path for InstagramException, been causing exceptions when running examples | InstagramAPI/src/InstagramRegistration.py | InstagramAPI/src/InstagramRegistration.py | import hmac
import json
import pycurl
import re
import urllib
from collections import OrderedDict
from InstagramAPI import InstagramException
try:
from StringIO import StringIO as BytesIO
except ImportError:
from io import BytesIO
from Constants import Constants
from Utils import *
class InstagramRegistrat... | Python | 0 | @@ -109,16 +109,20 @@
agramAPI
+.src
import
|
8b927f90c7416cfe1ba50ac1ad073e859206410d | increase max number length from 9 to 12 | plugins/conversion.py | plugins/conversion.py | import logging
log = logging.getLogger(__name__)
import collections
import datetime
import json
import re
import urllib.error
import botologist.http
import botologist.plugin
def format_number(number):
if not isinstance(number, int):
number = float(number)
if number % 1 == 0.0:
number = int(number)
if isin... | Python | 0.999874 | @@ -446,9 +446,10 @@
) %3E
-9
+12
:%0A%09%09
|
bd98a1b1119b34a5435855478d733ca582ebcf0c | Update version to dev | powerpool/__init__.py | powerpool/__init__.py | __version__ = "0.6.2"
__version_info__ = (0, 6, 2)
| Python | 0 | @@ -12,17 +12,21 @@
= %220.6.
-2
+3-dev
%22%0A__vers
@@ -49,7 +49,7 @@
6,
-2
+3
)%0A
|
9814f3565690f11d0d40c5470c1afdbe05037499 | Use `type(self)` as a constructor | ppb_vector/vector2.py | ppb_vector/vector2.py | import typing
import collections
from math import acos, atan2, cos, degrees, hypot, isclose, radians, sin
from numbers import Real
from collections.abc import Sequence
__all__ = 'Vector2',
VectorLike = typing.Union[
'Vector2',
typing.List[Real], # TODO: Length 2
typing.Tuple[Real, Real],
typing.Dict... | Python | 0.000058 | @@ -2343,23 +2343,26 @@
return
-Vector2
+type(self)
(self.x
@@ -5502,23 +5502,26 @@
return
-Vector2
+type(self)
(x, y)%0A%0A
|
49cf5af6c62bb23c8fce660f4b649bb0775ecdbc | 494. Target Sum | problems/test_0494.py | problems/test_0494.py | import unittest
from typing import List
import utils
# O(len(nums) * sum(nums)) time. O(len(nums) * sum(nums)) space. DP, 0-1 knapsack.
class Solution:
def findTargetSumWays(self, nums: List[int], S: int) -> int:
sum_nums = sum(nums)
if not (-sum_nums <= S <= sum_nums):
return 0
... | Python | 0.999999 | @@ -57,32 +57,33 @@
# O(len(nums) *
+(
sum(nums)) time.
@@ -75,16 +75,29 @@
um(nums)
+ + max(nums))
) time.
@@ -110,16 +110,17 @@
nums) *
+(
sum(nums
@@ -120,16 +120,29 @@
um(nums)
+ + max(nums))
) space.
@@ -249,24 +249,80 @@
-sum_nums
+if not nums:%0A return 1 if S == 0 else 0%0A%0A ... |
6da626bf1a999101af188d3d20710a6dddc8dbae | shell=True | ide.py | ide.py | # NOTE: pass -d to this to print debugging info when the server crashes.
from flask import Flask, render_template, url_for, request
from subprocess import Popen, PIPE, check_call
import sys, os, string, glob, logging
app = Flask(__name__)
app.logger.addHandler(logging.StreamHandler(sys.stdout))
app.logger.setLevel(lo... | Python | 0.999989 | @@ -1188,16 +1188,28 @@
nes=True
+, shell=True
)%0A
|
ae7ffdaf67e156922b3af3fd21f82c41a7aca764 | fix data | log.py | log.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import time
from datetime import datetime
from struct import *
import adafruit_dht
import board
import csv
import paho.mqtt.client as mqtt
import json
import sqlite3 as lite
# sudo apt install postgresql-client libpq-dev
# sudo pip i... | Python | 0.000176 | @@ -2457,32 +2457,35 @@
int_
-humidity
+temperature
%5B%22value%22%5D =
@@ -2522,35 +2522,32 @@
int_
-temperature
+humidity
%5B%22value%22%5D =
|
ff99addf5ac6589b4ee2c53ef1debf4e9c07b47d | Bump version 0.2 Stable | __tryton__.py | __tryton__.py | #This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
{
'name': 'Nereid Catalog',
'version': '2.0.0.1',
'author': 'Openlabs Technologies & Consulting (P) LTD',
'email': 'info@openlabs.co.in',
'website': 'http://w... | Python | 0.000001 | @@ -193,9 +193,9 @@
0.0.
-1
+2
',%0A
|
d826e54996bc504d245286b50f7ab5671f1999ae | Update solution.py | data_structures/linked_list/problems/find_pattern_in_linked_list/py/solution.py | data_structures/linked_list/problems/find_pattern_in_linked_list/py/solution.py | import LinkedList
# Problem description: Find a pattern represented as a linked list in a target linked list.
# Solution time complexity: O(n^2)
# Comments: A brute force solution w/o any optimizations. Simply traverse a list looking for the pattern.
# If the node travers... | Python | 0.000001 | @@ -47,16 +47,23 @@
Find a
+string
pattern
|
1fe7a69eb4d40684ef4100a578620593727470c5 | fix one error add split large ip range function change output | sgi.py | sgi.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Scan Google IPs
import argparse
import multiprocessing
import os
import re
import subprocess
__author__ = 'gino'
IGNORE_IP = ['64.18.0.0/20', '72.14.192.0/18', '74.125.0.0/16',
'173.194.0.0/16', '66.102.0.0/20',
'66.249.80.0/20', '216.58.192.0/19... | Python | 0.000003 | @@ -171,245 +171,9 @@
= %5B
-'64.18.0.0/20', '72.14.192.0/18', '74.125.0.0/16',%0A '173.194.0.0/16', '66.102.0.0/20',%0A '66.249.80.0/20', '216.58.192.0/19', '216.239.32.0/19',%0A '207.126.144.0/20', '209.85.128.0/17'%5D#'64.233.160.0/19'
+%5D
%0A%0AEX
|
7ceaec12381e8bc7f597b1cc32d50655d30d9843 | use inplace installs (#5865) | nox.py | nox.py | # Copyright 2017, Google LLC All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | Python | 0 | @@ -1057,28 +1057,29 @@
install
-this
+local
package
in-plac
@@ -1070,16 +1070,17 @@
package
+s
in-plac
@@ -1136,21 +1136,82 @@
cov'
-, *LOCAL_DEPS
+)%0A for local_dep in LOCAL_DEPS:%0A session.install('-e', local_dep
)%0A
@@ -2612,32 +2612,112 @@
t')%0A
-session.install(
+for local_dep in ... |
7c527f486e2e129861915f73e0625ec00388e15e | Fix failing MPI tests | test/hoomd_script/test_multiple_contexts.py | test/hoomd_script/test_multiple_contexts.py | # -*- coding: iso-8859-1 -*-
from hoomd_script import *
import hoomd_script;
context.initialize()
import unittest
import os
# unit test to run a simple polymer system with pair and bond potentials
class multi_context(unittest.TestCase):
def test_run(self):
self.c1 = context.SimulationContext()
sel... | Python | 0.000013 | @@ -404,17 +404,18 @@
andom(N=
-5
+20
00, phi_
@@ -685,17 +685,18 @@
andom(N=
-2
+10
00, phi_
|
67351bb6cf56d8ccf4e78e809ec9f2a6fc67146a | Fix sanitization test to fit new exit codes | test/integration/command_line_sanitizing.py | test/integration/command_line_sanitizing.py | #!/usr/bin/python
from test_common import *
# returns (return_value, stdout, stderr) or None in case the process did not terminate within timeout seconds
# run_rethinkdb() automatically fills in -f, -s, -c and -p if not specified in flags
def run_rethinkdb(opts, flags = [], timeout = 10):
executable_path = get_exe... | Python | 0.000001 | @@ -2904,144 +2904,8 @@
se:%0A
- if expected_return_value %3E 127:%0A expected_return_value = 128 - expected_return_value # We have to wrap over it seems%0A
@@ -3197,55 +3197,57 @@
r =
-134 # That's what
+255 #
we
-get when abort() is called
+return -1 given a bad command line input
%0A%0... |
988ed4be9152632b2844e962e225adac63d869db | Fix crash on windows | spd.py | spd.py | #!/usr/bin/env python3
import os
import re
import sys
from subprocess import call
from urllib.request import Request, urlopen
def getWebPage(url):
print("\ngetting: "+url)
h = Request(url)
h.add_header('User-Agent', 'SPD/1.0')
webpage = urlopen(h).read()
return str(webpage) # convert from bytes... | Python | 0 | @@ -49,16 +49,63 @@
rt sys%0A%0A
+from platform import system as operatingSystem%0A
from sub
@@ -625,16 +625,149 @@
kground%0A
+ if operatingSystem() == 'Windows':%0A # NUL ~ /dev/null%0A call(%5B'wget', '-b', '-N', '-o', 'NUL', link%5D)%0A else:%0A
call
@@ -2343,15 +2343,77 @@
%5B1%5D%... |
1e8094a187284961a380bea94bbc806aa4430a3d | fix to t2m.py | t2m.py | t2m.py | #! /usr/bin/env python
# Requires python 2.7
import sys
import socket
import datetime
import json
import logging
if os.path.exists('/vagrant'):
logfilename = '/vagrant/.t2m.log'
else:
logfilename = '/tmp/.t2m.log'
logging.basicConfig(
filename=logfilename,
level=logging.DEBUG)
BUFSIZE = 1024
DEBUG ... | Python | 0.999996 | @@ -108,16 +108,27 @@
ogging%0A%0A
+import os%0A%0A
if os.pa
|
4557568d940aff86d269f7418b3519b5cd9ae322 | Fix för Importfel: Deadline exceeded while waiting for HTTP response #58 | scoutnet.py | scoutnet.py | # -*- coding: utf-8 -*-
# cannot use requests library, doesn't work in gae!
#import requests
import urllib
import urllib2
import cookielib
import codecs
import logging
import sys
import json
from flask import render_template
from google.appengine.api import mail
from google.appengine.runtime import apiproxy_errors
from... | Python | 0 | @@ -607,16 +607,28 @@
(request
+, timeout=25
) # %22let
|
4a5a20835e75a0096287064487ab4885e7c03d9f | fix overlapping name, cmdline test | bin/tools/amount_to_text_en.py | bin/tools/amount_to_text_en.py | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | Python | 0.000603 | @@ -3136,24 +3136,25 @@
rn ret%0A%0Adef
+_
amount_to_te
@@ -3155,16 +3155,19 @@
_to_text
+_en
(number,
@@ -3728,16 +3728,17 @@
%7B'en' :
+_
amount_t
@@ -3743,16 +3743,19 @@
_to_text
+_en
%7D%0A %0A#
@@ -4789,33 +4789,36 @@
print i, %22%3E%3E%22,
-i
+amou
nt_to_text(i, la
@@ -4888,17 +4888,20 @@
, %22%... |
96f93e39ad12d893d8672dd2bb2abea4e6020799 | update the file name in the send file to uri | bin/utils/sftp_transactions.py | bin/utils/sftp_transactions.py | import pysftp as sftp
import sys
import os
from email_transactions import email_transactions
import paramiko
# This addresses the issues with relative paths
file_dir = os.path.dirname(os.path.realpath(__file__))
goal_dir = os.path.join(file_dir, "../")
proj_root = os.path.abspath(goal_dir)+'/'
sys.path.insert(0, proj_... | Python | 0.000001 | @@ -564,20 +564,16 @@
ta = %5B%5D%0A
-
%0A def
@@ -626,32 +626,43 @@
ord, remotepath,
+ file_name,
localpath, cont
@@ -1025,33 +1025,25 @@
transaction%0A
-
%0A
+
'''%0A
@@ -1270,25 +1270,17 @@
bridge)%0A
-
%0A
+
@@ -1608,17 +1608,17 @@
ath+
-'smi.xml'
+file_name
)%0A... |
0d4c041d239e7d7ed234f359ae483523b05e367b | correct the 'View Credentials' icon | openstack_dashboard/dashboards/project/access_and_security/api_access/tables.py | openstack_dashboard/dashboards/project/access_and_security/api_access/tables.py | # Copyright 2012 Nebula, 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 agree... | Python | 0.000003 | @@ -2383,12 +2383,11 @@
= %22
-plus
+eye
%22%0A
|
402e9515419f0db7f449eac9f810389a4608b878 | Comment out venue for now, since we don't have one yet | settings.py | settings.py | # -*- encoding: utf-8 -*-
import os
from wafer.settings import *
try:
from localsettings import *
except ImportError:
pass
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse_lazy
pyconzadir = os.path.dirname(__file__)
STATICFILES_DIRS = (
os.path.join(... | Python | 0 | @@ -545,32 +545,33 @@
tems%22: %5B%5D%7D,%0A
+#
%7B%22name%22: %22venue%22
@@ -593,24 +593,25 @@
enue%22),%0A
+#
%22url%22: reve
|
39586322784382e9dfd4a961bda4253bb27bca5f | Add support for the django debug toolbar | settings.py | settings.py | # Django settings for authentic project.
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgre... | Python | 0 | @@ -59,16 +59,41 @@
= True%0A
+USE_DEBUG_TOOLBAR = True%0A
TEMPLATE
@@ -3260,8 +3260,182 @@
.idp'%0A)%0A
+%0AINTERNAL_IPS = ('127.0.0.1',)%0A%0Aif USE_DEBUG_TOOLBAR:%0A MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',)%0A INSTALLED_APPS += ('debug_toolbar',)%0A
|
0a019a6d23b88a49dce081c743cfb46fe568ba6d | Remove brute force protection | settings.py | settings.py | # Django settings for Sal project.
from system_settings import *
from settings_import import ADMINS, TIME_ZONE, LANGUAGE_CODE, ALLOWED_HOSTS, DISPLAY_NAME, DEFAULT_MACHINE_GROUP_KEY,DEBUG, BRUTE_COOLOFF, BRUTE_LIMIT
from os import path
import saml2
from saml2.saml import NAMEID_FORMAT_PERSISTENT
import logging
import s... | Python | 0.000054 | @@ -184,36 +184,8 @@
EBUG
-, BRUTE_COOLOFF, BRUTE_LIMIT
%0Afro
@@ -2017,131 +2017,8 @@
%7D%0A%0A
-if BRUTE_PROTECT==True:%0A INSTALLED_APPS+= ('axes',)%0A MIDDLEWARE_CLASSES+=('axes.middleware.FailedLoginMiddleware',)%0A%0A
# PG
|
145c31a283bb458bdce72169ea16f07040236ee5 | add comment about settings.py | settings.py | settings.py | SECRET_KEY = 'x'
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'travis_ci_test',
}
}
INSTALLED_APPS=(
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.gis',
'boundaries',
)
| Python | 0 | @@ -1,8 +1,95 @@
+%22%22%22%0ATo run %60django-admin.py syncdb --settings settings --noinput%60 before testing.%0A%22%22%22%0A%0A
SECRET_K
|
e2f8175fd53893b4af47f40e02a3f721b1882cd1 | Fix bug in calling function | tests/convergence_tests/convergence_lspr.py | tests/convergence_tests/convergence_lspr.py | import re
import os
import sys
import time
import numpy
import pickle
import datetime
try:
import pycuda
except ImportError:
ans = input('PyCUDA not found. Regression tests will take forever. Do you want to continue? [y/n] ')
if ans in ['Y', 'y']:
pass
else:
sys.exit()
from pygbe.mai... | Python | 0.000004 | @@ -6848,24 +6848,19 @@
0 =
-compiled
+test
_result
-s
%5B'Ce
|
4a3aa9e539d1ebad025f3d5978f6b8185c37a7ae | Use built-in assertions | tests/e2e/data/services/test_bq_datasets.py | tests/e2e/data/services/test_bq_datasets.py | import unittest
import pandas
import geopandas
from shapely import wkt
import uuid
from cartoframes.data.services import BQUserDataset, BQJob
from io import StringIO
EXPECTED_CSV_SAMPLE = """state_fips_code,county_fips_code,geo_id,tract_name,internal_point_geo
60,10,60010950100,9501.0,POINT (-170.5618796 -14.2587411... | Python | 0.999306 | @@ -2570,37 +2570,34 @@
self.assert
-Equal
+In
(status, 'done')
@@ -2581,38 +2581,50 @@
ssertIn(status,
+%5B
'done'
+, 'failed'%5D
)%0A%0A def test_
@@ -2939,21 +2939,18 @@
f.assert
-Equal
+In
(status,
@@ -2950,22 +2950,34 @@
status,
+%5B
'done'
+, 'failed'%5D
)%0A%0A d
|
417ab5241c852cdcd072143bc2444f20f2117623 | Update capture profiler to new spec of providing board instead of string. | tests/execution_profiles/capture_profile.py | tests/execution_profiles/capture_profile.py | import cProfile
from pqhelper import capture
def main():
cProfile.run('test_solution(catapult)')
def test_solution(board_string):
print capture.capture(board_string)
skeleton = '''
..*..*..
.gm..mg.
.ms..sm.
.rs..sr.
.ggmmgg.
.rsggsr.
.rsrrsr.
ssgssgss'''
giant_rat = '''
...mm...
..mrym..
.mgyrgm.
mygryg... | Python | 0 | @@ -132,16 +132,56 @@
tring):%0A
+ board = capture.Board(board_string)%0A
prin
@@ -203,23 +203,16 @@
re(board
-_string
)%0A%0Askele
|
5829afb4345d09a04fca61e51624f580a95c408d | remove None.appspot.com from settings.PLAYGROUND_HOSTS | settings.py | settings.py | """Module containing global playground constants and functions."""
import os
from google.appengine.api import app_identity
from google.appengine.api import backends
import appids
import secret
DEBUG = True
# user content hostname prefix
USER_CONTENT_PREFIX = 'user-content'
# RFC1113 formatted 'Expires' to preve... | Python | 0.000005 | @@ -1815,17 +1815,17 @@
HOSTS =
-(
+%5B
'localho
@@ -2028,17 +2028,17 @@
stname()
-)
+%5D
%0A # PLA
@@ -2234,17 +2234,17 @@
HOSTS =
-(
+%5B
'%7B%7D.apps
@@ -2284,20 +2284,108 @@
_APP_ID)
-,
+%5D
%0A
+if appids.PLAYGROUND_APP_ID_ALIAS:%0A PLAYGROUND_HOSTS.append('%7B%7D.appspot.com'%0A
... |
08edcd99f379962cbd761c743a727e86095b7a48 | Convert to list in case it is not | setup.in.py | setup.in.py | #
# Copyright 2012-2019 CNRS-UM LIRMM, CNRS-AIST JRL
#
from __future__ import print_function
try:
from setuptools import setup
from setuptools import Extension
except ImportError:
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
import hashlib
impo... | Python | 1 | @@ -2136,16 +2136,58 @@
pyx_src%0A
+ pkg.include_dirs=list(pkg.include_dirs)%0A
return
|
a12d61e9a9b85c436d5b21b39862497b7e3ed903 | update tpp.py for gen3 | tpp.py | tpp.py | #This script will show updates to the Twitch Plays Pokemon live feed on reddit.
#You can only show important updates by passing the --important flag when you run the script
#This could be easily adapted for other live feeds (or totally generic) but for now
#it is hardcoded for the TPP feed.
#python-requests is require... | Python | 0 | @@ -691,34 +691,34 @@
ive/
-m5n42gvbpy
+nawsz3vn7u
i6hd
-i
s
+g
ciytw
-amw3a
+cxadi
%22%0A_h
|
c81eb510c72511c1f692f02f7bb63ef4caa51d27 | Add management functions for migration | apps/concept/management/commands/update_concept_totals.py | apps/concept/management/commands/update_concept_totals.py | from optparse import make_option
import sys
from django.core.management.base import BaseCommand
from education.models import Concept
class Command(BaseCommand):
args = ""
help = "Update concept total_question counts (post db import)"
def handle(self, *args, **options):
for concept in Concept.o... | Python | 0 | @@ -98,17 +98,15 @@
rom
-education
+concept
.mod
|
6a39a514ae82f412c107dd87944cdb17b6a9d036 | remove isinstance assert in test_remove_site_packages_64bit | tests/test_server32_remove_site_packages.py | tests/test_server32_remove_site_packages.py | import os
import sys
try:
import pytest
except ImportError: # the 32-bit server does not need pytest installed
class Mark(object):
@staticmethod
def skipif(condition, reason=None):
def func(function):
return function
return func
class pytest(object)... | Python | 0.000007 | @@ -1215,41 +1215,8 @@
e()%0A
- assert isinstance(path, str)%0A
|
7d47ab3aed3fb1c591966fe1a84e7c5f8d4ce909 | Print usage if only an optional option sent | qos.py | qos.py | #!/usr/bin/python
# Author: Anthony Ruhier
# Set QoS rules
import os
import subprocess
import argparse
import sys
import logging
try:
from config import DEBUG
except ImportError:
DEBUG = False
import tools
def run_as_root():
"""
Restart the script as root
"""
# Need to be root
if os.get... | Python | 0.000005 | @@ -2959,21 +2959,126 @@
tion
-%0A args.func(
+, or print usage%0A try:%0A args.func()%0A except AttributeError:%0A parser.print_usage()%0A sys.exit(1
)%0A
|
6fc065dc2f88c0c59037f5a6efa89738d963977e | Support XML-RPC marshalling of mx.DateTime. | rpc.py | rpc.py | import xmlrpclib
import traceback
from cStringIO import StringIO
allowed = ('package_releases', 'package_urls', 'package_data',
'search', 'list_packages', 'release_urls', 'release_data',
'updated_releases', 'changelog', 'post_cheesecake_for_release')
def handle_request(webui_obj):
webui_obj.handler.send_r... | Python | 0 | @@ -254,16 +254,333 @@
ease')%0A%0A
+# monkey-patch xmlrpclib to marshal mx.DateTime correctly.%0Aimport mx.DateTime%0Adef dump_DateTime(self, value, write):%0A write(%22%3Cvalue%3E%3CdateTime.iso8601%3E%22)%0A write(value.strftime(%22%25Y%25m%25dT%25H:%25M:%25S%22))%0A write(%22%3C/dateTime.iso8601%3E%3C/val... |
d72171899b75eaf4675e5fd3d8586aa300b04583 | Fix APU object construction with id_name | apsuite/commissioning_scripts/measure_id_integrals.py | apsuite/commissioning_scripts/measure_id_integrals.py | """."""
from threading import Thread as _Thread, Event as _Event
import time as _time
import numpy as _np
from siriuspy.devices import SOFB, APU, Tune
from epics import PV
from pymodels import si
from .base import BaseClass
class IDParams:
"""."""
def __init__(self, phases=None, meas_type='static'):
... | Python | 0.000001 | @@ -1584,30 +1584,20 @@
APU(
-APU.DEVICES.APU22_09SA
+self.id_name
)%0A
|
79ef0fe21b136b80889a8e6e06339074ac73a1f1 | Comment out section | run.py | run.py | __author__ = 'matt'
import datetime
import blockbuster
blockbuster.app.debug = blockbuster.config.debug_mode
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@")
blockbuster.bb_logging.logger.info("@@@@@@@@@@@@@@@@@@ BlockBuster " + blockbuster.__version__ + " "
... | Python | 0 | @@ -14,16 +14,18 @@
'matt'%0A%0A
+#
import d
@@ -32,16 +32,16 @@
atetime%0A
-
import b
@@ -52,16 +52,18 @@
buster%0A%0A
+#
blockbus
@@ -108,17 +108,20 @@
ug_mode%0A
-%0A
+#%0A#
blockbus
@@ -200,32 +200,34 @@
@@@@@@@@@@@@@%22)%0A
+#
blockbuster.bb_l
@@ -311,16 +311,17 @@
_ + %22 %22%0A
+#
@@ -41... |
35028b84d4757e1343a97da653670db049ac5e8d | replace default handler with static handler | web.py | web.py | #!/usr/bin/env python2
import tornado
import log
import magic
from tornado import web, httpserver
_http_server = None
_https_server = None
_html_root = './'
_log = None
_magic = None
class DefaultHandler(tornado.web.RequestHandler):
def get(self, match):
_log.info("incoming request: {}".format(self.reque... | Python | 0 | @@ -47,21 +47,8 @@
log%0A
-import magic%0A
from
@@ -155,1612 +155,391 @@
one%0A
-_magic = None%0A%0Aclass DefaultHandler(tornado.web.RequestHandler):%0A def get(self, match):%0A _log.info(%22incoming request: %7B%7D%22.format(self.request))%0A _log.info(%22matched default match: %7B%7D%22.format(mat... |
d3f03d6e2cf48929f8233e52720b07242ccd64da | Put tweets back | web.py | web.py | """ Heroku/Python Quickstart: https://blog.heroku.com/archives/2011/9/28/python_and_django"""
import os
import random
import requests
from flask import Flask
import tweepy
import settings
app = Flask(__name__)
@app.route('/')
def home_page():
return 'Hello from the SPARK learn-a-thon!'
def get_instagram_im... | Python | 0 | @@ -968,24 +968,75 @@
f_tweets()%0A%0A
+ tweets = tweepy.Cursor(api.search, q='#spark')%0A
return t
|
686c01757c80dbca3181b74fa49c9c22fb5040e5 | fix cache | web.py | web.py | from functools import wraps
import datetime
import json
import os
import urlparse
from flask import Flask, flash, g, redirect, request, render_template, Response
from flaskext.babel import Babel
import postmark
import pymongo
import requests
LANGUAGES = ('en', 'es')
EMPTY_BLOCK = """<br><br>"""
POSTMARK_KEY = os.env... | Python | 0.000004 | @@ -733,16 +733,17 @@
value):%0A
+%0A
@@ -2794,40 +2794,8 @@
():%0A
- print request.authorization%0A
@@ -5233,16 +5233,47 @@
g/rss%22%0A%0A
+ if url in SCARY_CACHE:%0A
doc
@@ -5289,32 +5289,22 @@
ACHE
-.get(url)
+%5Burl%5D
%0A
-if not doc
+else
:%0A
|
c772951ffbe06be23ff56d0281b78d7b9eac456b | Add option to generate executable name from the current branch | pycket/entry_point.py | pycket/entry_point.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
from pycket.expand import load_json_ast_rpython, expand_to_ast, PermException
from pycket.interpreter import interpret_one, ToplevelEnv, interpret_module, GlobalConfig
from pycket.error import SchemeException
from pycket.option_helper import parse_args, ensure_json_ast
f... | Python | 0.000001 | @@ -1218,16 +1218,212 @@
args):%0A
+ if %22--with-branch%22 in args:%0A import subprocess%0A base_name = subprocess.check_output(%5B%22git%22, %22rev-parse%22, %22--abbrev-ref%22, %22HEAD%22%5D).strip()%0A else:%0A base_name = 'pycket-'%0A
if d
@@ -1470,39 +1470,45 @@
iver.exe_name = ... |
96a61255bb813544c496a5ee2c3bc645cd97567c | Make note of inefficiency | pycket/hash/simple.py | pycket/hash/simple.py |
from pycket import values
from pycket.cont import label
from pycket.error import SchemeException
from pycket.hash.base import (
W_MutableHashTable,
W_ImmutableHashTable,
w_missing,
get_dict_item)
from pycket.hash.persistent_... | Python | 0.000051 | @@ -5421,32 +5421,58 @@
m(self, index):%0A
+ # XXX Inefficient%0A
i = 0%0A
@@ -6080,32 +6080,58 @@
m(self, index):%0A
+ # XXX Inefficient%0A
i = 0%0A
|
423af3c8fbd7e1614ec24dcd8ef842ae9dfcc5d0 | version bump for ensembl85 | pyensembl/__init__.py | pyensembl/__init__.py | # Copyright (c) 2015. Mount Sinai School of Medicine
#
# 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 | @@ -1303,17 +1303,17 @@
= '0.9.
-5
+6
'%0A%0A_cach
|
17fe4613518def551e637764e644c5d58b1665d9 | Add BodeAnalyser instrument to instrument table | pymoku/instruments.py | pymoku/instruments.py | import sys
from . import _instrument
from . import _oscilloscope
from . import _waveform_generator
from . import _phasemeter
from . import _specan
from . import _lockinamp
from . import _datalogger
from . import _bodeanalyser
from . import _stream_instrument
from . import _frame_instrument
from . import _input_instrum... | Python | 0 | @@ -1150,20 +1150,28 @@
mp,%0A%099:
-None
+BodeAnalyser
,%0A%0910: N
|
5a506ff7005f09b14faa4d6036563e0125ca00f4 | Fix indent | pymystrom/__init__.py | pymystrom/__init__.py | """
Copyright (c) 2015-2017 Fabian Affolter <fabian@affolter-engineering.ch>
Licensed under MIT. All rights reserved.
"""
import requests
from . import exceptions
class MyStromPlug(object):
"""A class for a myStrom switch."""
def __init__(self, host):
"""Initialize the switch."""
self.resour... | Python | 0.000854 | @@ -159,16 +159,17 @@
ptions%0A%0A
+%0A
class My
@@ -598,32 +598,53 @@
= requests.get(
+%0A
'%7B%7D/relay'.forma
@@ -664,47 +664,8 @@
ce),
-%0A
par
@@ -684,35 +684,16 @@
: '1'%7D,%0A
-
@@ -1084,24 +1084,45 @@
equests.get(
+... |
c034282423d47a6530ed0bb77c54e133de72115b | add more verbose output to PushwooshClient when debut=True | pypushwoosh/client.py | pypushwoosh/client.py | import logging
import requests
from .base import PushwooshBaseClient
log = logging.getLogger('pypushwoosh.client.log')
class PushwooshClient(PushwooshBaseClient):
"""
Implementation of the Pushwoosh API Client.
"""
headers = {'User-Agent': 'PyPushwooshClient',
'Content-Type': 'appli... | Python | 0.003164 | @@ -794,16 +794,84 @@
command)
+%0A url = self.path(command)%0A payload = command.render()
%0A%0A
@@ -987,32 +987,23 @@
: %25s' %25
-command.render()
+payload
)%0A
@@ -1038,67 +1038,15 @@
: %25s
-://%25s%25s' %25 (self.scheme, self.hostname, self.path(command))
+' %25 url
)%0A
@@ -119... |
b7ed71cc0b620f460a0d24eeef7891e9770fc39e | Modify & Access time in pyls. | pysh/shell/builtin.py | pysh/shell/builtin.py | import collections
import csv
import os
import pwd
import StringIO
from pysh.shell.pycmd import register_pycmd
from pysh.shell.pycmd import pycmd
from pysh.shell.pycmd import IOType
from pysh.shell.table import Table
def file_to_array(f):
return map(lambda line: line.rstrip('\r\n'), f.readlines())
class Permissio... | Python | 0 | @@ -23,16 +23,32 @@
ort csv%0A
+import datetime%0A
import o
@@ -1965,16 +1965,34 @@
'group',
+ 'mtime', 'atime',
'path'%5D
@@ -1993,16 +1993,16 @@
path'%5D)%0A
-
for ar
@@ -2168,16 +2168,134 @@
& 0777%0A
+ mtime = datetime.datetime.fromtimestamp(stat.st_mtime)%0A atime = datetime.datetime.fromtimestamp... |
933e3193bbd1ceb45d33a9b2dc37f3bb80b5bc7b | fix in broadcasting code | broadcast/broadcast_service.py | broadcast/broadcast_service.py | #!/usr/bin/python
#broadcast_service.py
#
# <<<COPYRIGHT>>>
#
#
#
#
"""
.. module:: broadcast_service
@author: Veselin
"""
#------------------------------------------------------------------------------
_Debug = True
_DebugLevel = 6
#------------------------------------------------------------------------------ ... | Python | 0.00014 | @@ -1953,34 +1953,34 @@
-json_data%5B'owner'%5D
+my_id.getLocalID()
, %0A
|
fda17a416790a04bd265946a5554cf5d0639d442 | Add identifiers URL for refseq | indra/databases/__init__.py | indra/databases/__init__.py | import logging
logger = logging.getLogger(__name__)
def get_identifiers_url(db_name, db_id):
"""Return an identifiers.org URL for a given database name and ID.
Parameters
----------
db_name : str
An internal database name: HGNC, UP, CHEBI, etc.
db_id : str
An identifier in the gi... | Python | 0.000001 | @@ -4240,32 +4240,126 @@
HSAG%25s' %25 db_id%0A
+ elif db_name == 'REFSEQ_PROT':%0A url = '%09https://identifiers.org/refseq:%25s' %25 db_id%0A
elif db_name
|
b2d016d1a1eb7bf36d94b57af99cd627a065c173 | use getattr_static to avoid executing code | python/bncompleter.py | python/bncompleter.py | """ This file is a modified version of rlcompleter.py from the Python
project under the Python Software Foundation License 2:
https://github.com/python/cpython/blob/master/Lib/rlcompleter.py
https://github.com/python/cpython/blob/master/LICENSE
The only changes made were to modify the regular expression in attr_matche... | Python | 0.000001 | @@ -5945,24 +5945,31 @@
al = getattr
+_static
(thisobject,
|
d5245c08e96b374d67bf35c319c8076c41c2feb1 | Reset auth | Htpc.py | Htpc.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-A
"""
This is the main executable of HTPC Manager. It parses the
command line arguments, sets globals variables and calls the
start function to start the server.
"""
import os
import sys
import htpc
def parse_arguments():
""" Get variables from commandline """
impor... | Python | 0.000011 | @@ -38,17 +38,17 @@
tf-8 -*-
-A
+%0A
%0A%22%22%22%0AThi
@@ -1419,16 +1419,172 @@
ebdir')%0A
+ parser.add_argument('--resetauth', action='store_true', default=False,%0A help='Resets the username and password to HTPC-Manager')%0A
pars
@@ -5263,24 +5263,224 @@
password')%0A%0A
+ # Res... |
f56cc7acae3c3b295febafec384bcfdf3b2dcee0 | koda za python | Koda.py | Koda.py | from csv import DictReader
import pandas as ps
def fileReaderSmucNesrece():
fp = open("evidencanesrecnasmuciscihV1.csv", "rt", encoding=" utf -8 ")
reader = DictReader(fp)
return [line for line in reader] #branje
SmucNes = fileReaderSmucNesrece()
SmucNes = ps.DataFrame(SmucNes) # uporaba pandas
prin... | Python | 0.999999 | @@ -1,8 +1,183 @@
+%0Aimport csv%0A%0Aimport numpy as np%0Aimport matplotlib.pyplot as plt%0Afrom datetime import datetime%0Afrom scipy.stats import multivariate_normal as mvn%0Afrom scipy.stats import beta%0A%0A
from csv
@@ -213,17 +213,17 @@
das as p
-s
+a
%0A%0Adef fi
@@ -389,18 +389,8 @@
der%5D
- #branje
%0A... |
ac2f32bc48a1763cf8f7b57094990329da621a59 | Fix long line of code in Main.py | Main.py | Main.py | """Main Module of PDF Splitter"""
import argparse
import logging
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on, concat_pdf_pages, merge_with_next, is_landscape, write_pdf_file, \
add_pages
# Get default logger
logging.basicConfig(level=logging.INFO)
log = loggin... | Python | 0.999065 | @@ -206,16 +206,22 @@
ndscape,
+ %5C%0A
write_p
@@ -228,22 +228,16 @@
df_file,
- %5C%0A
add_pag
|
f503d49a2753d3a92a480a2923c6b955d7f45348 | Include rendered (instead of raw) body in tourney match comments JSON | byceps/blueprints/tourney/match/views.py | byceps/blueprints/tourney/match/views.py | """
byceps.blueprints.tourney.match.views
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2018 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from flask import abort, g, jsonify, request, url_for
from ....services.tourney import match_service
from ....util.framework.blueprint import... | Python | 0 | @@ -1857,16 +1857,25 @@
ent.body
+_rendered
,%0A
|
dd526ef40d3eb13681dca602b82390d66363783f | fix FlipDimension for LinearDimension | src/Mod/Draft/draftguitools/gui_dimension_ops.py | src/Mod/Draft/draftguitools/gui_dimension_ops.py | # ***************************************************************************
# * (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * ... | Python | 0 | @@ -3530,16 +3530,72 @@
ension%22,
+%0A %22LinearDimension%22,
%22Angula
|
c3802c77e3e6dc5171fc31152314e804967986ee | Document response JSON for login | authentication/authentication.py | authentication/authentication.py | import os
from flask import Flask, jsonify, request
from flask.ext.bcrypt import Bcrypt
from flask.ext.login import (
LoginManager,
login_required,
login_user,
logout_user,
UserMixin,
)
from flask.ext.sqlalchemy import SQLAlchemy
from requests import codes
db = SQLAlchemy()
class User(db.Model,... | Python | 0 | @@ -2349,16 +2349,176 @@
on/json%0A
+ :resjson string email: The email address which has been logged in.%0A :resjson string password: The password of the user which has been logged%0A in.%0A
:sta
|
3b41b94b4ad7b249a2ff1040d6bf2d4759d48b14 | revise task error handling (exceptions bubble up now) | ape/main.py | ape/main.py | import argparse
import inspect
import importlib
import sys
import os
from ape import tasks, TaskNotFound, FeatureNotFound, EnvironmentIncomplete
from featuremonkey import get_features_from_equation_file
def get_task_parser(task):
'''
construct an ArgumentParser for task
this function returns a tuple (parse... | Python | 0 | @@ -62,16 +62,33 @@
port os%0A
+import traceback%0A
from ape
@@ -461,17 +461,16 @@
rd args,
-
%0A pro
@@ -2594,20 +2594,16 @@
nd line%0A
-
%0A fea
@@ -2649,16 +2649,18 @@
ariable
+%60%60
PRODUCT_
@@ -2667,16 +2667,18 @@
EQUATION
+%60%60
.%0A If
@@ -2693,16 +2693,18 @@
ot set,
+%60%60
PRODUCT... |
17474a74a8c382c1cc5923c0e2128e4a4e776553 | Add method I am yet to use | eva/util/nutil.py | eva/util/nutil.py | import numpy as np
def to_rgb(pixels):
return np.repeat(pixels, 3 if pixels.shape[2] == 1 else 1, 2)
def binarize(arr, generate=np.random.uniform):
return (generate(size=arr.shape) < arr).astype('i')
| Python | 0 | @@ -204,8 +204,112 @@
pe('i')%0A
+%0Adef quantisize(arr, levels):%0A return (np.digitize(arr, np.arange(levels) / levels) - 1).astype('i')%0A
|
57773e149ae2c7634e262b103a10cc35f6e138b2 | Ids are strings. | src/scim/schema/core.py | src/scim/schema/core.py | # -*- coding: utf-8 -*-
from . import attributes, types
class Metadata(attributes.Base):
"""A complex attribute containing resource metadata.
"""
#! The DateTime the Resource was added to the Service Provider.
created = attributes.Singular(types.DateTime)
#! The most recent DateTime the details ... | Python | 0.999944 | @@ -1866,23 +1866,22 @@
r(types.
-Integer
+String
, requir
@@ -2372,15 +2372,14 @@
pes.
-Integer
+String
)%0A%0A
|
fb2cfe4759fb98de644932af17a247428b2cc0f5 | Fix Auth API key check causing error 500s | api/auth.py | api/auth.py | from django.http import HttpResponseForbidden
from django.contrib.auth.models import AnonymousUser
from api.models import AuthAPIKey
class APIKeyAuthentication(object):
def is_authenticated(self, request):
params = {}
for key,value in request.GET.items():
params[key.lower()] = value
... | Python | 0 | @@ -324,31 +324,24 @@
if
-params%5B
'apikey'
%5D:%0A
@@ -332,17 +332,26 @@
'apikey'
-%5D
+ in params
:%0A
|
1d67f755ea0f638c3cabef9e9359665d5b50ff86 | Clean up BeamConstellation | cactusbot/services/beam/constellation.py | cactusbot/services/beam/constellation.py | """Interact with Beam Constellation."""
from logging import getLogger
import re
import json
import asyncio
from .. import WebSocket
class BeamConstellation(WebSocket):
"""Interact with Beam Constellation."""
URL = "wss://constellation.beam.pro"
RESPONSE_EXPR = re.compile(r'^(\d+)(.+)?$')
INTERFA... | Python | 0.000041 | @@ -38,39 +38,8 @@
%22%22%0A%0A
-from logging import getLogger%0A%0A
impo
@@ -61,24 +61,8 @@
on%0A%0A
-import asyncio%0A%0A
from
@@ -394,51 +394,8 @@
L)%0A%0A
- self.logger = getLogger(__name__)%0A%0A
@@ -594,197 +594,8 @@
er%0A%0A
- async def read(self, handle):%0A %22%22%22Read packets fr... |
948dadbd4aa262c86e561c56e7cd7748cdefa18b | Extend teacher column for institute courses | data_center/models.py | data_center/models.py | # -*- coding: utf-8 -*-
from datetime import datetime
from django.db import models
class Course(models.Model):
"""Course database schema"""
no = models.CharField(max_length=20, blank=True)
code = models.CharField(max_length=20, blank=True)
eng_title = models.CharField(max_length=200, blank=True)
... | Python | 0 | @@ -620,33 +620,34 @@
ield(max_length=
-8
+12
0, blank=True)
|
1e3ea59bb631bb78dd0525dcf92a96a6a39053d8 | fix hooks may not been assignment #148 | py12306/helpers/request.py | py12306/helpers/request.py | import requests
from requests.exceptions import *
from py12306.helpers.func import *
from requests_html import HTMLSession, HTMLResponse
requests.packages.urllib3.disable_warnings()
class Request(HTMLSession):
"""
请求处理类
"""
# session = {}
def save_to_file(self, url, path):
response = se... | Python | 0 | @@ -877,22 +877,16 @@
-exist_
hooks =
@@ -934,22 +934,16 @@
nstance(
-exist_
hooks, l
@@ -947,16 +947,28 @@
, list):
+%0A
hooks =
@@ -973,14 +973,8 @@
= %5B
-exist_
hook
|
89aa3cbc62a947b3623380f7d1fe631bdf070b98 | fix the need of admin to run | homeassistant/components/influxdb.py | homeassistant/components/influxdb.py | """
homeassistant.components.influxdb
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
InfluxDB component which allows you to send data to an Influx database.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/influxdb/
"""
import logging
import homeassistant.util as util... | Python | 0 | @@ -1645,67 +1645,51 @@
-databases = %5Bi%5B'name'%5D for i in influx.get_list_database()%5D
+influx.query(%22select * from /.*/ LIMIT 1;%22)
%0A
@@ -1718,32 +1718,39 @@
luxDBClientError
+ as exc
:%0A _LOGGE
@@ -1789,17 +1789,36 @@
cessible
-.
+ due to '%25s', please
%22%0A
@@ -1839,15 +1839,... |
19161f3259237bb70904c7fb469e1831dd424fa6 | Update test_Vulnerability.py | cairis/cairis/test/test_Vulnerability.py | cairis/cairis/test/test_Vulnerability.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... | Python | 0 | @@ -1406,35 +1406,32 @@
tProperties%22%5D%5B0%5D
-%5B0%5D
,self.iVuln%5B0%5D%5B%22
@@ -1449,35 +1449,32 @@
entProperties%22%5D%5B
-0%5D%5B
1%5D)%0A iVuln2 =
@@ -1616,35 +1616,32 @@
tProperties%22%5D%5B0%5D
-%5B0%5D
,self.iVuln%5B1%5D%5B%22
@@ -1659,35 +1659,32 @@
entProperties%22%5D%5B
-0%5D%5B
1%5D)%0A i... |
f0243e8ab8897d218bcf45af91a7cd03a3f83c5e | Add section comments. | cloudkitpy/container.py | cloudkitpy/container.py | #
# container.py
# CloudKitPy
#
# Created by James Barrow on 28/04/2016.
# Copyright (c) 2013-2016 Pig on a Hill Productions. All rights reserved.
#
# !/usr/bin/env python
class Container:
public_cloud_database = None
private_cloud_database = None
container_identifier = None
environment = None
a... | Python | 0 | @@ -186,16 +186,64 @@
ainer:%0A%0A
+ # Getting the Public and Private Databases%0A%0A
publ
@@ -297,24 +297,71 @@
base = None%0A
+%0A # Getting the Identifier and Environment%0A%0A
containe
@@ -558,32 +558,57 @@
:%0A pass%0A%0A
+ # Discovering Users%0A%0A
def fetch_us
|
9274ec308974b0d6702e7f98a0b8a2c3be1cbe11 | FIX #170 Throw Python34 compatible exception | autosklearn/util/dependencies.py | autosklearn/util/dependencies.py | from warnings import warn
import pkg_resources
import re
from distutils.version import LooseVersion
RE_PATTERN = re.compile('^(?P<name>[\w\-]+)((?P<operation>==|>=|>)(?P<version>(\d+\.)?(\d+\.)?(\d+)))?$')
def verify_packages(packages):
if not packages:
return
if isinstance(packages, str):
... | Python | 0 | @@ -959,18 +959,8 @@
ame)
- from None
%0A%0A
|
c06800d2bd70c2cde6fb40de925450342f9c6d91 | Update comment about timeout (no effect on SFTP/functions) | example/deploy.py | example/deploy.py | # pyinfra
# File: example/deploy.py
# Desc: example deploy script for the pyinfra CLI, targets: Ubuntu/Debian, CentOS & OpenBSD
# Host represents the *current* server begin managed
from pyinfra import host
# Modules provide namespaced operations, which do the work
from pyinfra.modules import server, apt, yum, files, ... | Python | 0 | @@ -653,34 +653,76 @@
0 #
-ignored for SFTP transfers
+only applies to commands on the remote host (not SFTP, local Python)
%0A)%0A%0A
|
07e767f9c19ece3c41e33cca24dd2b0317244292 | Update the latest version | src/site/sphinx/conf.py | src/site/sphinx/conf.py | # -*- coding: utf-8 -*-
import sys, os, re
import xml.etree.ElementTree as etree
from datetime import date
from collections import defaultdict
def etree_to_dict(t):
t.tag = re.sub(r'\{[^\}]*\}', '', t.tag)
d = {t.tag: {} if t.attrib else None}
children = list(t)
if children:
dd = defaultdict(li... | Python | 0 | @@ -1252,9 +1252,9 @@
.21.
-3
+4
.Fin
|
7965ce3036f98a9b880f19f688e7e282644e63cf | remove server_name | app/main.py | app/main.py | from flask import Flask, render_template
app = Flask(__name__)
app.config['DEBUG'] = True
app.config['SERVER_NAME'] = "vcaen.com"
@app.route('/')
def show_about():
return render_template('aboutme.html')
if __name__ == '__main__':
app.run() | Python | 0.000008 | @@ -62,74 +62,8 @@
__)%0A
-app.config%5B'DEBUG'%5D = True%0Aapp.config%5B'SERVER_NAME'%5D = %22vcaen.com%22
%0A%0A%0A@
|
8b6daea77356631d657feee438da41379a8f5f90 | Version 0.46.0 | cloudvolume/__init__.py | cloudvolume/__init__.py | from .connectionpools import ConnectionPool
from .cloudvolume import CloudVolume
from .lib import Bbox
from .provenance import DataLayerProvenance
from .skeletonservice import PrecomputedSkeleton, SkeletonEncodeError, SkeletonDecodeError
from .storage import Storage
from .threaded_queue import ThreadedQueue
from .excep... | Python | 0 | @@ -573,9 +573,9 @@
'0.4
-5
+6
.0'%0A
|
a1d9312e1ac6f66aaf558652d890ac2a6bd67e40 | Add parent so we can track versions. | backend/loader/model/datafile.py | backend/loader/model/datafile.py | from dataitem import DataItem
class DataFile(DataItem):
def __init__(self, name, access, owner):
super(DataFile, self).__init__(name, access, owner, "datafile")
self.checksum = ""
self.size = 0
self.location = ""
self.mediatype = ""
self.conditions = []
self.... | Python | 0 | @@ -373,12 +373,37 @@
tadirs = %5B%5D%0A
+ self.parent = %22%22%0A
|
424b50960e7ca42c61ccc98864f9876e9688dcd4 | remove empty elements | example/models.py | example/models.py | from django.db import models
class Cake(models.Model):
name = models.CharField(max_length=100)
description = models.TextField()
class Meta:
verbose_name = 'Cake'
verbose_name_plural = 'Cakes'
def __unicode__(self):
return unicode('{}'.format(self.name))
def get_summary_d... | Python | 0.319064 | @@ -342,34 +342,73 @@
return
-self.name,
+filter(None, (%0A self.name,%0A
self.descri
@@ -412,16 +412,28 @@
cription
+,%0A ))
%0A%0A%0Aclass
@@ -757,27 +757,78 @@
urn
-self.name, self.rating
+filter(None, (%0A self.name,%0A self.rating,%0A ))
%0A
|
bcc7692e14b7b695f08dfb39aaccf3dbfa67d857 | Add safeGetInt to BMConfigParser | src/configparser.py | src/configparser.py | import ConfigParser
from singleton import Singleton
@Singleton
class BMConfigParser(ConfigParser.SafeConfigParser):
def set(self, section, option, value=None):
if self._optcre is self.OPTCRE or value:
if not isinstance(value, basestring):
raise TypeError("option values must be... | Python | 0.000001 | @@ -1099,16 +1099,244 @@
False%0A%0A
+ def safeGetInt(self, section, field):%0A if self.has_option(section, field):%0A try:%0A return self.getint(section, field)%0A except ValueError:%0A return 0%0A return 0%0A%0A
def
|
311459eef0178b5c3e337ff16c15a26d56f36471 | Allow reverse proxy to set https | hoover/site/settings/docker_local.py | hoover/site/settings/docker_local.py | import os
from pathlib import Path
from urllib.parse import urlparse
import re
from logzero import logger as log
from .common import *
base_dir = Path(__file__).absolute().parent.parent.parent.parent
SECRET_KEY = os.environ.get('SECRET_KEY')
_hostname = os.environ.get('HOOVER_HOSTNAME')
if _hostname:
HOOVER_BA... | Python | 0.000001 | @@ -2908,16 +2908,151 @@
_URL')%0A%0A
+_secure_header = os.environ.get('SECURE_PROXY_SSL_HEADER')%0Aif _secure_header:%0A SECURE_PROXY_SSL_HEADER = (_secure_header, 'https')%0A%0A
log.info
|
5bce4bb123a086dd116abbd0932d34fa170a83cd | Update view to point to corrected template path | search/views.py | search/views.py | # GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
#
# 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 versio... | Python | 0 | @@ -2355,18 +2355,46 @@
request,
- '
+%0A 'mediagoblin/plugins/
search/r
|
f9087a4d11db748586227829f44b5bb26994a67e | Ajuste do nome da classe de acordo com python3 | pycep_correios/correios.py | pycep_correios/correios.py | # -*- coding: utf-8 -*-
# #############################################################################
# The MIT License (MIT)
#
# Copyright (c) 2016 Michell Stuttgart
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software")... | Python | 0 | @@ -1354,38 +1354,24 @@
uests%0A%0Afrom
-pycep_correios
.correios_ex
@@ -1423,38 +1423,24 @@
eption%0Afrom
-pycep_correios
.correios_ex
@@ -1487,38 +1487,24 @@
eption%0Afrom
-pycep_correios
.correios_ex
@@ -1553,22 +1553,8 @@
rom
-pycep_correios
.cor
@@ -1634,16 +1634,8 @@
eios
-(object)
:%0A%0A
|
d77777c2a011e77b284748d1dfbd3cd31e6c8565 | make verifier regexing more robust | c_test_environment/verifier.py | c_test_environment/verifier.py | import re
import sys
def verify(testout, expected, ordered):
test = ({}, [])
expect = ({}, [])
def addTuple(tc, t):
if ordered:
tcl = tc[1]
tcl.append(t)
else:
tcs = tc[0]
if t not in tcs:
tcs[t] = 1
else:
... | Python | 0.000004 | @@ -55,16 +55,93 @@
dered):%0A
+ numpat = re.compile(r'(%5Cd+)')%0A tuplepat = re.compile(r'Materialized')%0A
test
@@ -500,42 +500,50 @@
-if re.match(r'Materialized', line)
+m = tuplepat.search(line)%0A if m
:%0A
@@ -589,34 +589,38 @@
for number in
-re
+numpat
.finditer(r'(%5Cd+
@@ ... |
82641a936b2215480e29896cdafed3872c2928c6 | Remove xfails for newly passing tests in test_recipe_integration.py | test/test_recipes_integration.py | test/test_recipes_integration.py | import pytest
import os
import subprocess
import json
# Each test with recipe and appropriate parameters in one line
# Using bracket annotation to set it optional (xfail)
TEST_CASES = [
"activedata_usage",
["backout_rate"],
["code_coverage --path caps --rev 45715ece25fc"],
"code_coverage_by_suite --pat... | Python | 0.000004 | @@ -208,17 +208,16 @@
e%22,%0A
-%5B
%22backout
@@ -222,17 +222,16 @@
ut_rate%22
-%5D
,%0A %5B%22
@@ -390,25 +390,24 @@
erage%22,%0A
-%5B
%22intermitten
@@ -414,24 +414,22 @@
t_tests%22
-%5D
,%0A
-%5B
%22intermi
@@ -444,17 +444,16 @@
st_data%22
-%5D
,%0A %5B%22
@@ -584,25 +584,24 @@
e10s%22... |
4be67b6f46c5f4a7f8a2b89199cff2373dcc7a43 | Fix casing | ca_qc_trois_rivieres/people.py | ca_qc_trois_rivieres/people.py | # coding: utf-8
from utils import CanadianScraper, CanadianPerson as Person
import re
COUNCIL_PAGE = 'http://www.v3r.net/a-propos-de-la-ville/vie-democratique/conseil-municipal/conseillers-municipaux'
MAYOR_URL = 'http://www.v3r.net/a-propos-de-la-ville/vie-democratique/mairie'
class TroisRivieresPersonScraper(Can... | Python | 0.000006 | @@ -1530,12 +1530,8 @@
er()
- not
in
@@ -1639,16 +1639,156 @@
aire'):%0A
+ district = re.sub('%5CA(?:de(?: la)?%7Cdes%7Cdu) ', lambda match: match.group(0).lower(), district, flags=re.I)%0A else:%0A
|
7471d1bcfc80864ee4e9ca9ad3b8ad10868a3cdc | use tempest img | ceilometer/tests/tempest/scenario/test_autoscaling.py | ceilometer/tests/tempest/scenario/test_autoscaling.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
# d... | Python | 0.000013 | @@ -661,166 +661,32 @@
pest
- import test%0A%0Afrom ceilometer.tests.tempest.service import client%0A%0A%0Aclass ClientManager(client.Manager):%0A load_clients = %5B%0A 'image_client_v2',%0A %5D
+.scenario import manager
%0A%0A%0Ac
@@ -715,25 +715,28 @@
bbi(
-test.BaseTestCase
+manager.ScenarioTest
):%... |
5ecab61cd66b821d70e73006f60d8f7908bfb403 | Remove comment | capstone/mdp/fixed_game_mdp.py | capstone/mdp/fixed_game_mdp.py | from .mdp import MDP
from .game_mdp import GameMDP
from ..utils import utility
class FixedGameMDP(GameMDP):
def __init__(self, game, opp_player, opp_idx):
'''
opp_player: the opponent player
opp_idx: the idx of the opponent player in the game
'''
self._game = game
... | Python | 0 | @@ -444,46 +444,8 @@
%7B%7D%0A%0A
- #######%0A # MDP #%0A #######%0A%0A%0A
|
8b29dd1e3b343d2e7f6e20c88bf6d09bb65f5c5e | raise AttributeError instead of asserting | config_loader/loader.py | config_loader/loader.py | from __future__ import unicode_literals
import yaml
from .errors import ConfigError
class ConfigLoader(object):
config_root_class = None
def __init__(self, config_text, context={}, *args, **kwargs):
assert self.config_root_class is not None
self.config_text = config_text
self.config... | Python | 0 | @@ -216,20 +216,30 @@
-assert
+if not hasattr(
self
-.
+, '
conf
@@ -255,20 +255,108 @@
lass
- is not None
+'):%0A raise AttributeError('config_root_class must defined in subclasses of ConfigLoader')
%0A%0A
|
b8c3ad8c9eb4cdf2618839b425b8413181a443ff | Fix bug in writePrecisePathToSnapshot not bactracking prperly to the initial structure | AdaptivePELE/analysis/writePrecisePathToSnapshot.py | AdaptivePELE/analysis/writePrecisePathToSnapshot.py | """
Recreate the trajectory fragments to the led to the discovery of a snapshot,
specified by the tuple (epoch, trajectory, snapshot) and write as a pdb file
"""
import os
import sys
import argparse
import glob
import itertools
from AdaptivePELE.utilities import utilities
def parseArguments():
"""
... | Python | 0 | @@ -1857,20 +1857,12 @@
ile
-epoch != %220%22
+True
:%0A
@@ -1912,22 +1912,24 @@
hPrefix,
+
epoch,
+
%22*traj*_
@@ -2087,16 +2087,210 @@
pshots)%0A
+ if epoch == '0':%0A # Once we get to epoch 0, we just need to append the trajectory%0A # where the cluster was found and we can br... |
d5196874181ce55585770bbb72f6d8b8ef1df5a3 | Add tests for joins and wildcard tables | test/test_sqlalchemy_bigquery.py | test/test_sqlalchemy_bigquery.py | from sqlalchemy.engine import create_engine
from sqlalchemy.schema import Table, MetaData, Column
from sqlalchemy import types, func, case
from sqlalchemy.sql import expression, select, literal_column
from sqlalchemy.exc import NoSuchTableError
from sqlalchemy.orm import sessionmaker
import pytest
import sqlalchemy
imp... | Python | 0 | @@ -1564,16 +1564,17 @@
query%0A%0A
+%0A
def test
@@ -4811,28 +4811,549 @@
%0A assert len(result) %3E 0%0A
+%0A%0Adef test_joins(session, table, table_one_row):%0A result = (session.query(table.c.string, func.count(table_one_row.c.integer))%0A .join(table_one_row, table_one_row.c.string ==... |
c072f88df49dada1c664c0f4d71e8084c3690449 | Make the message optional in /ping. | horsefax/bot/modules/groups.py | horsefax/bot/modules/groups.py | from pony.orm import *
import pony.orm
from typing import cast, Optional
from horsefax.telegram.services.command import Command
from ..core import HorseFaxBot, ModuleTools, BaseModule, ChatService
from ..db import db
from .tracking import TelegramUser
class PingGroup(db.Entity):
id = PrimaryKey(int, auto=True)
... | Python | 0.000002 | @@ -2379,9 +2379,9 @@
) %3C
-2
+1
:%0A
@@ -2430,17 +2430,17 @@
me%3E
-%3C
+%5B
message
-%3E
+%5D
%60%22%0A
@@ -2744,33 +2744,33 @@
oup.name%7D%60 has n
-p
+o
members.%22%0A
|
1549510fd9371818cff6644984896a5a9060cb36 | Fix print statements with python3 syntax. | benchmarks/TSP/compare_to_BKS.py | benchmarks/TSP/compare_to_BKS.py | # -*- coding: utf-8 -*-
import json, sys, os
import numpy as np
# Compare a set of computed solutions to best known solutions on the
# same problems.
def s_round(v, d):
if d == 0:
return str(int(v))
else:
return str(round(v, d))
def log_comparisons(BKS, files):
print ','.join(["Instance", "Jobs", "Vehi... | Python | 0.000038 | @@ -273,25 +273,25 @@
es):%0A print
-
+(
','.join(%5B%22I
@@ -390,16 +390,17 @@
(ms)%22%5D)
+)
%0A%0A jobs
@@ -1308,17 +1308,17 @@
print
-
+(
','.join
@@ -1346,16 +1346,17 @@
, line))
+)
%0A%0A prin
@@ -1356,20 +1356,21 @@
%0A print
-
+(
','
+)
%0A%0A prin
@@ -1370,17 +1370,17 @@
%0A print
-
+... |
63bd0d8905ea9392e56f501381c054ba3a4ed1a7 | Update __init__.py | chainer/optimizers/__init__.py | chainer/optimizers/__init__.py | from chainer.optimizers.ada_delta import AdaDelta # NOQA
from chainer.optimizers.ada_grad import AdaGrad # NOQA
from chainer.optimizers.adam import Adam # NOQA
from chainer.optimizers.momentum_sgd import MomentumSGD # NOQA
from chainer.optimizers.msvag import MSVAG # NOQA
from chainer.optimizers.nesterov_ag import... | Python | 0.000072 | @@ -1,28 +1,60 @@
+-# import classes and functions%0A
from chainer.optimizers.ada_
|
f77b48036968ce49ad1094c9913b06d977b2d6e0 | add year() type checker | arg_type.py | arg_type.py | '''type verifiers for argparse
each function either
- returns an argument parsed from a string (possible the string); OR
- raises argpare.ArgumentTypeError
'''
import argparse
import multiprocessing
import pdb
if False:
pdb
def features(s):
's is a name for a group of features'
return _in_set(s, set('s... | Python | 0.000002 | @@ -3744,8 +3744,228 @@
train'%5D)
+%0A%0A%0Adef year(s):%0A 'convert s to integer that could be a year'%0A try:%0A assert len(s) == 4%0A value = int(s)%0A return value%0A except:%0A raise argparse.ArgumentTypeError('%25s is not a year' %25 s)
|
7a7661bd03c947212ee46ca598cae5cd316757c1 | Fix flake8 | chainercv/datasets/__init__.py | chainercv/datasets/__init__.py | from chainercv.datasets.camvid.camvid_dataset import camvid_ignore_label_color # NOQA
from chainercv.datasets.camvid.camvid_dataset import camvid_label_colors # NOQA
from chainercv.datasets.camvid.camvid_dataset import camvid_label_names # NOQA
from chainercv.datasets.camvid.camvid_dataset import CamVidDataset # NO... | Python | 0 | @@ -308,32 +308,161 @@
Dataset # NOQA%0A
+from chainercv.datasets.cityscapes.cityscapes_semantic_segmentation_dataset import CityscapesSemanticSegmentationDataset # NOQA%0A
from chainercv.d
@@ -520,16 +520,22 @@
es_label
+_color
s # NOQ
@@ -705,144 +705,9 @@
abel
-_colors # NOQA%0Afrom chainercv.datasets.citys... |
b27398e4dd246d542c0a82ecc35da60911edc9fd | revert to dev version | regionmask/version.py | regionmask/version.py | version = "0.7.0"
| Python | 0 | @@ -9,10 +9,14 @@
= %220.7.0
++dev
%22%0A
|
b318ced455f13477743a6d2d81b3556695b27374 | Make to_factorized_noisy support args | chainerrl/links/noisy_chain.py | chainerrl/links/noisy_chain.py | import chainer
from chainer.links import Linear
from chainerrl.links.noisy_linear import FactorizedNoisyLinear
def to_factorized_noisy(link):
"""Add noisiness to components of given link
Currently this function supports L.Linear (with and without bias)
"""
_map_links(_func_to_factorized_noisy, link)... | Python | 0.000001 | @@ -131,24 +131,41 @@
d_noisy(link
+, *args, **kwargs
):%0A %22%22%22Ad
@@ -287,63 +287,17 @@
%22%22%22%0A
+%0A
-_map_links(_func_to_factorized_noisy, link)%0A%0A%0A
def
-_
func
@@ -320,32 +320,36 @@
oisy(link):%0A
+
+
if isinstance(li
@@ -361,16 +361,20 @@
inear):%0A
+
@@ -406,1... |
af9006169d6f537d26f58926873334312bd6ed99 | Add simple bounded cache decorator | pykit/utils/convenience.py | pykit/utils/convenience.py | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import
try:
import __builtin__ as builtins
except ImportError:
import builtins
import string
import functools
import collections
from itertools import chain
map = lambda *args: list(builtins.map(*args))
invert = lambda d: di... | Python | 0 | @@ -2353,20 +2353,23 @@
%0A%0Adef ca
-ched
+ll_once
(f):%0A
@@ -2404,16 +2404,47 @@
function
+, so that it's called only once
%22%22%22%0A
@@ -2636,26 +2636,378 @@
er%0A%0A
-call_once = cached
+def cached(limit=1000):%0A %22%22%22Cache the result for the arguments just once%22%22%22%0A def decorator(f... |
c23169b4b6557ebf83a20888bb5f9408d5e4d34b | Remove ipdb in single_request | src/core/vkstalk.py | src/core/vkstalk.py | # -*- coding: utf-8 -*-
# Required modules
from __future__ import unicode_literals
from bs4 import BeautifulSoup
from datetime import datetime, timedelta
from helpers.h_logging import get_logger
from helpers.utils import clear_screen, as_client_tz, make_data_updates_string,\
delta_minutes
from core.parser import P... | Python | 0.000001 | @@ -859,33 +859,16 @@
(self):%0A
- try:%0A
@@ -927,20 +927,16 @@
-
data = s
@@ -953,28 +953,24 @@
user_data()%0A
-
self
@@ -996,28 +996,24 @@
ta)%0A
-
self.console
@@ -1022,79 +1022,8 @@
og()
-%0A except Exception, e:%0A import ipdb; ip... |
1fd876e82bc856d044f30903b74f19e2047009d9 | improve certs error | betfairlightweight/baseclient.py | betfairlightweight/baseclient.py | import os
import time
import requests
import collections
from .exceptions import PasswordError, AppKeyError, CertsError
from .utils import default_user_agent
IDENTITY = "https://identitysso.betfair{tld}/api/"
IDENTITY_CERT = "https://identitysso-cert.betfair{tld}/api/"
API = "https://api.betfair.com/exchange/"
NAVIGA... | Python | 0.000016 | @@ -5754,16 +5754,33 @@
tsError(
+%0A
%22Certifi
@@ -5817,20 +5817,91 @@
'%25s'
-%22 %25 ssl_path
+ (make sure .crt and .key file is present)%22%0A %25 ssl_path%0A
)%0A
|
a5da284b70e3e04a919679475e9cf2e276430077 | Fix "--attribution" option (doesn't need an argument) | renderchan/manager.py | renderchan/manager.py | __author__ = 'Konstantin Dmitriev'
from gettext import gettext as _
from optparse import OptionParser
import os.path
from renderchan.core import RenderChan
from renderchan.core import Attribution
from renderchan.file import RenderChanFile
from renderchan.project import RenderChanProject
def process_args():
pars... | Python | 0.001461 | @@ -967,34 +967,57 @@
ction=%22store
-%22, nargs=1
+_true%22,%0A default=False
,%0A
|
629d8a699e0ab944d4775bd6a31709546d4ca839 | add doc string | contacts/models/misc.py | contacts/models/misc.py |
#!/usr/bin/python
#Django Imports
from django.db import models
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from jsonfield import JSONField
#Local Imports
import transports
from utils.models import TimeStampedModel,BaseQuerySet
cla... | Python | 0.000002 | @@ -2701,16 +2701,17 @@
rname)%0A%0A
+%0A
class Ev
@@ -2731,24 +2731,323 @@
ampedModel):
+%0A %22%22%22%0A The basic idea behind this model is to keep track of which staff accounts take which actions.%0A%0A These are currently created in the %22visit seen%22 and %22attended DRF%22 end points, however%0A ... |
6535755cfdc914efc5e1efc6a89ed9dca7c78b87 | Correct docstrings of result_suite/sample.py | checker/result_suite/sample.py | checker/result_suite/sample.py | from checker.base import BakeryTestCase as TestCase
class SampleTest(TestCase):
target = 'result'
path = '.'
def setUp(self):
# read ttf
# self.font = fontforge.open(self.path)
pass
def test_ok(self):
""" This test failed """
self.assertTrue(True)
def tes... | Python | 0.000002 | @@ -252,38 +252,40 @@
%22%22%22 This test
-fail
+succe
ed
+s
%22%22%22%0A sel
@@ -358,18 +358,17 @@
est fail
-ed
+s
%22%22%22%0A
|
1c88a828ee2df37148b9744500f700d20b512095 | Fix for issue #1; devnull | dbbackup/commander.py | dbbackup/commander.py | """
Process the Backup or Restore commands.
"""
import copy, re, shlex, sys
from datetime import datetime
from django.conf import settings
from django.core.management.base import CommandError
from subprocess import Popen
READ_FILE = '<READ_FILE>'
WRITE_FILE = '<WRITE_FILE>'
DATE_FORMAT = getattr(settings, 'DBBACKUP_D... | Python | 0 | @@ -53,16 +53,20 @@
rt copy,
+ os,
re, shl
@@ -71,13 +71,8 @@
hlex
-, sys
%0Afro
@@ -5020,19 +5020,18 @@
pen(
-'/
+os.
dev
-/
null
-'
, 'w
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.