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 |
|---|---|---|---|---|---|---|---|
dfb0067affabeb79b6bd225c35cd0b22bd57fbe3 | use serializer variable for class assignment | hs_core/views/resource_metadata_rest_api.py | hs_core/views/resource_metadata_rest_api.py | import logging
from django.http import QueryDict
from rest_framework.response import Response
from rest_framework.exceptions import ValidationError
from rest_framework import status
from rest_framework import generics
from rest_framework import serializers
from hs_core import hydroshare
from hs_core.models import Co... | Python | 0 | @@ -6818,34 +6818,16 @@
class =
-resource.metadata.
serializ
|
cca2ef0f3700c4eafe66c8f751ecb2fc03318e2b | Disable boto3 deprecation warning logs | tools/delete_fleet.py | tools/delete_fleet.py | import sys
from time import sleep
import boto3
from botocore.exceptions import ClientError
def describe_fleets(region, fleet_id):
ec2 = boto3.client('ec2', region_name=region)
response = ec2.describe_fleets(
FleetIds=[
fleet_id
],
)
errors = response['Fleets'][0]['Errors']
... | Python | 0 | @@ -86,16 +86,67 @@
tError%0A%0A
+boto3.compat.filter_python_deprecation_warnings()%0A%0A
def desc
|
8a6370f7c91fec6c220bc2e438a236816c636341 | Revert throttle Arlo api calls (#13174) | homeassistant/components/arlo.py | homeassistant/components/arlo.py | """
This component provides support for Netgear Arlo IP cameras.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/arlo/
"""
import logging
from datetime import timedelta
import voluptuous as vol
from requests.exceptions import HTTPError, ConnectTimeout
... | Python | 0 | @@ -200,39 +200,8 @@
ging
-%0Afrom datetime import timedelta
%0A%0Aim
@@ -344,48 +344,8 @@
cv%0A
-from homeassistant.util import Throttle%0A
from
@@ -1202,75 +1202,8 @@
lse%0A
- arlo.update = Throttle(timedelta(seconds=10))(arlo.update)%0A
|
712f1498ae2b605a781896c934778720f451cde2 | Add voluptuous to Vera. | homeassistant/components/vera.py | homeassistant/components/vera.py | """
Support for Vera devices.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/vera/
"""
import logging
from collections import defaultdict
from requests.exceptions import RequestException
from homeassistant.util.dt import utc_from_timestamp
from homea... | Python | 0.014603 | @@ -199,16 +199,42 @@
ltdict%0A%0A
+import voluptuous as vol%0A%0A
from req
@@ -275,17 +275,16 @@
eption%0A%0A
-%0A
from hom
@@ -411,16 +411,74 @@
scovery%0A
+from homeassistant.helpers import config_validation as cv%0A
from hom
@@ -768,16 +768,56 @@
= None%0A%0A
+CONF_CONTROLLER = 'vera_controller_url'%0A
CONF... |
b221ed2e83cd352b1eec0ad74a3e02946db39197 | Add an example of yielding a dict in plpy | examples/spouse_example/plpy_extractor/udf/ext_people.py | examples/spouse_example/plpy_extractor/udf/ext_people.py | #! /usr/bin/env python
import ddext
import itertools
# Format of plpy_extractor:
# Anything Write functions "init", "run" will not be accepted.
# In "init", import libraries, specify input variables and return types
# In "run", write your extractor. Return a list containing your results, each item in the list should ... | Python | 0.000875 | @@ -1379,16 +1379,26 @@
a tuple
+or a dict
to datab
@@ -1401,16 +1401,16 @@
atabase%0A
-
for ph
@@ -1438,16 +1438,18 @@
ies:%0A
+ #
yield (
@@ -1461,24 +1461,26 @@
nce_id, %0A
+ #
phrase%5B
@@ -1483,24 +1483,26 @@
ase%5B0%5D, %0A
+ #
len(phr
@@ -1511,16 +1511,18 @@
e), %0A
+ #
... |
b9c93a583b8ebb28c6875513191438bf67595415 | Fix timezone stuff | reports/models.py | reports/models.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import re
from bs4 import BeautifulSoup
from django.contrib.auth.models import User
from django.db import models
import pytz
class Report(models.Model):
report_dt = models.DateTimeField(null=True, blank=True)
body = models.TextFi... | Python | 0.000262 | @@ -1566,82 +1566,21 @@
-pytz.timezone('America/Los_Angeles').localize(incident_dt)%0A
+incident_dt =
pyt
@@ -1632,19 +1632,17 @@
cident_d
-ate
+t
)%0A%0A
|
3010b38a15ca90f51a72e0cf3698ca218aaa144f | Remove an execution warning. | requests_graph.py | requests_graph.py | #!/usr/bin/env python3
import sys
import time
import array
import datetime
import requests
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
NB_HOURS = 24
GRANULOMETRY = 15 # must be a divisor of 60
if len(sys.argv) != 2:
print('Syntax: %s file.png' % sys.argv[0])
exit(1)
# Get data
da... | Python | 0.000005 | @@ -1164,16 +1164,17 @@
uests%22)%0A
+#
plt.lege
|
4daba5e5f5377fd6e068b4b7059b1bd78819aa53 | fix ZeroDivisionError | statistics.py | statistics.py | #
# A Class that couples samples from a simulation
# with some statistics functions
#
# Kevin Greenan (kmgreen@cs.ucsc.edu)
#
# Improved by Min Fu (fumin@hust.edu.cn)
from mpmath import *
import random
#
# A Class that incapsulates a set of samples with
# operations over those samples (i.e. statistics)
#
class Sampl... | Python | 0.000411 | @@ -2926,32 +2926,93 @@
evel, samples):%0A
+ %0A self.calcConfInterval(conf_level, samples)%0A%0A
if self.
@@ -3043,31 +3043,31 @@
-return None%0A
+self.byte_re = 0%0A
-%0A
@@ -3077,47 +3077,38 @@
elf.
-calcConfInterval(conf_level, samples)%0A%0A
+prob_re = 0%0A e... |
a240cbaa13be8682e5611241634a761df581efff | fix format | sw-project.py | sw-project.py | # Import the SDK
import facebook
# import the secret token
import secret
# For date and time operations
from datetime import datetime, date, time
# open connection
g = facebook.GraphAPI(secret.ACCESS_TOKEN)
# retrieve friends
friends = g.get_connections("me", "friends")['data']
# retrieve their likes
likes = { frien... | Python | 0.00006 | @@ -303,25 +303,24 @@
es%0Alikes = %7B
-
friend%5B'name
@@ -313,33 +313,32 @@
%7Bfriend%5B'name'%5D
-
: g.get_connecti
@@ -364,32 +364,33 @@
likes%22)%5B'data'%5D%0A
+
for frie
@@ -402,17 +402,16 @@
friends
-
%7D%0A%0Astatu
@@ -417,17 +417,16 @@
uses = %7B
-
friend%5B'
@@ -431,17 +431,16 @@
%5... |
bdad53692d9728ff8f7a33a2549f680940834292 | Add helpful comment | robot_algorithm.py | robot_algorithm.py | class RobotRuntimeException(BaseException):
"""
Generic runtime exception for game interpreter
"""
class RobotAlgorithm:
def __init__(self, robot, raw_program):
self.robot = robot
commands = self.__to_commands_list(raw_program)
stack = self.__to_stack(commands)
... | Python | 0 | @@ -5084,24 +5084,78 @@
collection))
+ # in Python, pop() removes the last entry of the list
%0A %0A
|
e99239184cffbdc1ca08ba0050f6e4f23e1155fd | Allow import error to propagate up | romanesco/spark.py | romanesco/spark.py | import six
import romanesco
import os
import sys
from ConfigParser import ConfigParser, NoOptionError
def setup_spark_env():
# Setup pyspark
try:
spark_home = romanesco.config.get('spark', 'spark_home')
# If not configured try the environment
if not spark_home:
spark_home... | Python | 0 | @@ -932,29 +932,16 @@
Context%0A
- try:%0A
from
@@ -984,169 +984,8 @@
ext%0A
- except Exception as ex:%0A six.raise_from(Exception('Unable to create SparkContext, check Spark '%0A 'installation'), ex)%0A
%0A%0Ade
|
7a81c289d944bad4505a51c80b701f5f11159787 | stop bandwagon leaving temp files around | apps/bandwagon/tests/test_tasks.py | apps/bandwagon/tests/test_tasks.py | import os
import shutil
import tempfile
from django.conf import settings
from nose.tools import eq_
from PIL import Image
from amo.tests.test_helpers import get_image_path
from bandwagon.tasks import resize_icon
def test_resize_icon():
somepic = get_image_path('mozilla.png')
src = tempfile.NamedTemporaryF... | Python | 0 | @@ -392,24 +392,47 @@
delete=False
+, dir=settings.TMP_PATH
)%0A dest =
@@ -487,16 +487,78 @@
x=%22.png%22
+,%0A dir=settings.TMP_PATH
)%0A%0A #
@@ -1109,16 +1109,39 @@
te=False
+, dir=settings.TMP_PATH
)%0A sh
|
4e7bc1dc4cc571f09667a9b29ceff8b5acdfbb13 | Drop supplementary variables from formula | apps/metricsmanager/serializers.py | apps/metricsmanager/serializers.py | from rest_framework import serializers
from .models import *
from .formula import validate_formula
from .formula import ComputeSemantics
from drf_compound_fields import fields as compound_fields
class MetricSerializer(serializers.ModelSerializer):
formula = serializers.CharField()
creator_path = serializers.F... | Python | 0 | @@ -516,16 +516,33 @@
%0A
+ variables_used =
validat
@@ -584,24 +584,284 @@
variables'%5D)
+%0A%0A # Accept if too many vars are provided and filter them here%0A attrs%5B'variables'%5D = %7B var_name: value for var_name, value%0A in attrs%5B'variables'%5D.items()%0... |
79bd9ff614f48d82e05625f61c9b5960b9459ea0 | Fix indent error | salt/states/git.py | salt/states/git.py | '''
Interaction with Git repositories.
==================================
NOTE: This modules is under heavy development and the API is subject to change.
It may be replaced with a generic VCS module if this proves viable.
Important, before using git over ssh, make sure your remote host fingerprint
exists in "~/.ssh/k... | Python | 0.000033 | @@ -2659,14 +2659,8 @@
ode:
- --dif
%0A
|
f98926efc99e4a0f5bd772028375a8c84937a8d8 | Add versioning suppor tto the pkg state | salt/states/pkg.py | salt/states/pkg.py | '''
Package Management
==================
Salt can manage software packages via the pkg state module, packages can be
set up to be installed, latest, removed and purged. Package management
declarations are typically rather simple:
.. code-block:: yaml
vim:
pkg:
- installed
'''
import logging
import ... | Python | 0 | @@ -291,16 +291,37 @@
led%0A'''%0A
+# Import python ilbs%0A
import l
@@ -434,24 +434,38 @@
talled(name,
+ version=None,
refresh=Fal
@@ -1050,18 +1050,22 @@
g()%0A
-if
+cver =
__salt_
@@ -1078,33 +1078,364 @@
.version'%5D(name)
-:
+%0A if cver == version:%0A # The package is installed and is the c... |
c8847c21b724e4875e0cafde5bbf85409c351754 | update docstrings for the pkg state | salt/states/pkg.py | salt/states/pkg.py | '''
State enforcing for packages
'''
def installed(name):
'''
Verify that the package is installed, return the packages changed in the
operation and a bool if the job was sucessfull
'''
if __salt__['pkg.version'](name):
return {'name': name,
'changes': {},
'r... | Python | 0 | @@ -1,196 +1,552 @@
'''%0A
-State enforcing for packages%0A'''%0A%0Adef installed(name):%0A '''%0A Verify that the package is installed, return the packages changed in the%0A operation and a bool if the job was sucessfu
+Package Management%0A==================%0ASalt can manage software packages via the pkg s... |
13225498b064dad6af99302cece847fcff3eeb6c | fix transfer_output_remaps | iceprod/server/plugins/condor.py | iceprod/server/plugins/condor.py | """
The Condor plugin. Allows submission to
`HTCondor <http://research.cs.wisc.edu/htcondor/>`_.
Note: Condor was renamed to HTCondor in 2012.
"""
from __future__ import print_function
import os
import sys
import random
import math
import logging
import getpass
from datetime import datetime,timedelta
im... | Python | 0.000003 | @@ -4108,24 +4108,25 @@
ut_remaps =
+%22
iceprod_log
@@ -4124,17 +4124,17 @@
prod_log
-
+=
iceprod_
@@ -4161,35 +4161,33 @@
'
- ;
+;
iceprod_out icep
@@ -4181,17 +4181,17 @@
prod_out
-
+=
iceprod_
@@ -4230,11 +4230,9 @@
'
- ;
+;
icep
@@ -4238,17 +4238,17 @@
prod_err
-
+=
iceprod_
@@... |
0926cc173151dd223e517cabd03e7f0b5bd6c7b2 | Change DOI extraction in PubMed client | indra/databases/pubmed_client.py | indra/databases/pubmed_client.py | import urllib, urllib2
from functools32 import lru_cache
import xml.etree.ElementTree as ET
pubmed_search = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi'
pubmed_fetch = 'http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi'
pmid_convert = 'http://www.ncbi.nlm.nih.gov/pmc/utils/idconv/v1.0/'
@lru_cac... | Python | 0 | @@ -2243,15 +2243,19 @@
trib
-%5B
+.get(
'doi'
-%5D
+)
%0A
|
c95e54b558d9a910181715df291402c44e0d8d55 | Specify only luci buckets instead of hardcoding trybot names | infra/bots/update_meta_config.py | infra/bots/update_meta_config.py | # Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Update meta/config of the specified Skia repo."""
import argparse
import json
import os
import subprocess
import sys
import urllib2
import git_utils
... | Python | 0.999011 | @@ -394,21 +394,21 @@
HROMIUM_
-TRYBO
+BUCKE
TS = %5B%0A
@@ -410,17 +410,16 @@
= %5B%0A
-(
'luci.ch
@@ -434,1216 +434,33 @@
ry',
- %5B%0A 'android_optional_gpu_tests_rel',%0A 'linux-blink-rel',%0A 'linux_chromium_compile_dbg_ng',%0A 'linux_chromium_dbg_ng',%0A 'linux_chromiu... |
52bc51e4d55322b45019d9ddf3bb273282dd80b3 | Call `super` at the start of `setup_experiment` and `post_batch`. prev | nupic/research/frameworks/pytorch/imagenet/mixins/lr_range_test.py | nupic/research/frameworks/pytorch/imagenet/mixins/lr_range_test.py | # ------------------------------------------------------------------------------
# Copyright (C) 2020, Numenta, Inc. All rights reserved.
#
# The information and source code contained herein is the
# exclusive property of Numenta Inc. No part of this software
# may be used, reproduced, stored or distributed in any for... | Python | 0.001165 | @@ -2146,32 +2146,74 @@
ate%0A %22%22%22%0A
+ super().setup_experiment(config)%0A%0A
# Ensure
@@ -2239,16 +2239,16 @@
idated.%0A
-
@@ -2765,49 +2765,8 @@
fig)
-%0A super().setup_experiment(config)
%0A%0A
@@ -3281,41 +3281,8 @@
%22%22%22%0A
- self.lr_scheduler.step()... |
216bb86730436f4b2d167d917a903dcd982b7897 | remove log for values modifier disabled | openedx/core/djangoapps/appsembler/sites/config_values_modifier.py | openedx/core/djangoapps/appsembler/sites/config_values_modifier.py | """
Tahoe: Configuration modifiers for Tahoe.
"""
from urllib.parse import urlsplit
from logging import getLogger
from django.conf import settings
from openedx.core.djangoapps.appsembler.sites.waffle import ENABLE_CONFIG_VALUES_MODIFIER
log = getLogger(__name__)
class TahoeConfigurationValueModifier:
"""
... | Python | 0 | @@ -3808,130 +3808,4 @@
ce)%0A
- else:%0A log.info('ENABLE_CONFIG_VALUES_MODIFIER: switch is not enabled, not using TahoeConfigurationValueModifier')%0A
|
0da1b4f4041ebe415782d36f6f69af91faad024f | Include some useful links for future development | src/dataset/retriever.py | src/dataset/retriever.py | """
Subset of reuters 21578, "ModApte", considering only received categories.
"""
from nltk.corpus import reuters
class ReutersCollection:
interest_categories = []
documents = []
train_docs = []
test_docs = []
"""
Initializes the collection considering only the received categories.
:par... | Python | 0 | @@ -70,16 +70,321 @@
egories.
+%0A%0Autil: %0A- http://www.nltk.org/book/ch02.html%0A- https://miguelmalvarez.com/2015/03/20/classifying-reuters-21578-collection-with-python-representing-the-data/%0A%0Amight be useful:%0A- http://www.nltk.org/howto/corpus.html%0A- https://miguelmalvarez.com/2016/11/07/classifying-reut... |
3c538233d30a39281a5e2d79df51f114480c33fc | Add in a way to specify different ways of generating the hostname. Some people want to use a fqdn, others uname, others hardcoded, and others reversed. This allows a easier way to code a new method into place | src/diamond/collector.py | src/diamond/collector.py |
import inspect
from diamond import *
from diamond.metric import Metric
# Detect the architecture of the system and set the counters for MAX_VALUES
# appropriately. Otherwise, rolling over counters will cause incorrect or
# negative values.
if platform.architecture()[0] == '64bit':
MAX_COUNTER = (2 ** 64) - 1
el... | Python | 0.000042 | @@ -8,16 +8,40 @@
inspect
+%0Aimport os%0Aimport socket
%0A%0Afrom d
@@ -2228,16 +2228,806 @@
l'%5D))%7D%0A%0A
+ def get_hostname(self):%0A if 'hostname' in self.config:%0A hostname = self.config%5B'hostname'%5D%0A if 'hostname_method' not in self.config or self.config%5B'hostname_method... |
2209d03532d6c0ed7d55cf4cf759fd82585b5ad3 | Update item.py | item.py | item.py | import pygame
class Item(pygame.sprite.Sprite):
def __init__(self, level, *groups):
super(Item, self).__init__(*groups)
#the game level
self.level = level
#base image
#self.level.animator.set_Img(0,5)
#self.image = self.level.animator.get_Img().convert()
#self.image.set_colorkey((255,0,0))
self.level.... | Python | 0 | @@ -174,138 +174,8 @@
age%0A
-%09%09#self.level.animator.set_Img(0,5)%0A%09%09#self.image = self.level.animator.get_Img().convert()%0A%09%09#self.image.set_colorkey((255,0,0))%0A
%09%09se
@@ -367,16 +367,27 @@
lescope'
+, 'canteen'
%5D%0A%09%09self
@@ -540,242 +540,63 @@
elf.
-scrnx = self.level.mymap%5Bx%5D%5By%5... |
5b524ae21920f05de32737f8587918112a1e2e4d | Fix a couple of pylint issues | lisp.py | lisp.py | """List processing based on a simple formatting language
Create an instance of Parser, passing a template string and a substitution
dictionary to the constructor. Then use its 'sub' method to replace groups of
elements of a list with one new element obtained by substituting values of the
elements into the template str... | Python | 0.000883 | @@ -2855,16 +2855,118 @@
anchor%0A
+ self.insets = (0, 0) # a bias applied to the range of substitution%0A self.length = 0%0A
@@ -4145,40 +4145,25 @@
for
- (i,
elem
-)
in
-enumerate(
elements
):%0A
@@ -4158,17 +4158,16 @@
elements
-)
:%0A
@@ -5998,35 +5998,33 @@
f matches... |
f408b1368b641be2349266a59b32f7fd1fa53265 | Fix a couple of minor bugs | stream.py | stream.py | from StringIO import StringIO
import sys
from eventlet.corolocal import local
_installed = False
_save_out = None
_save_err = None
class _StreamLocal(local):
def __init__(self):
# Initialize the output and error streams
self.out = StringIO()
self.err = StringIO()
_stlocal = _StreamLoc... | Python | 0.000029 | @@ -760,28 +760,62 @@
s
-elf.
+uper(StreamProxy, self).__setattr__('
_stname
- =
+',
stname
+)
%0A%0A
@@ -1698,32 +1698,54 @@
ef uninstall():%0A
+ global _installed%0A
global _save
|
096b4f6c3707455c30de4c623b9fe92113b61d33 | attach span to where query only if needed | ui/app/index/views.py | ui/app/index/views.py | import sys
import string
import json
import time
from urllib import unquote
from flask import request, redirect, render_template
from . import index
from .. import db
@index.route('/', methods=['GET'])
def index():
# read GET values
spanName = request.args.get('spanName')
serviceName = request.args.get('... | Python | 0.000001 | @@ -1299,22 +1299,18 @@
panName
-is not
+!=
'all':%0A
|
04745291580ac4feb6339516dbd9eaea24619850 | Print channel name | sudoku.py | sudoku.py | import sys
from platform import machine
import os
import datetime
import json
# Taken from conda.config
_sys_map = {'linux2': 'linux', 'linux': 'linux',
'darwin': 'osx', 'win32': 'win'}
non_x86_linux_machines = {'armv6l', 'armv7l', 'ppc64le'}
platform = _sys_map.get(sys.platform, 'unknown')
bits = 8 * tup... | Python | 0.000001 | @@ -4151,8 +4151,65 @@
.json%22)%0A
+ print(%22Use conda -c file://%22 + os.path.abspath(%22.%22))%0A
|
cbcb89a7a3ee4884768e272bbe3435bb6e08d224 | Add constraints for the same column and the same row | sudoku.py | sudoku.py | import datetime
def generate_info(name, version, depends):
return {
"{name}-{version}-0.tar.bz2".format(name=name, version=version): {
"build": "0",
"build_number": 0,
"date": datetime.date.today().strftime("%Y-%m-%d"),
"depends": depends,
"name":... | Python | 0.000009 | @@ -661,16 +661,47 @@
depends
+1 = %5B%5D%0A depends0
= %5B%5D%0A
@@ -844,17 +844,31 @@
y being
-1
+set (version 1)
require
@@ -887,21 +887,62 @@
ther
- entries be 0
+%0A # entries are not set (version 0)
%0A
@@ -965,16 +965,17 @@
depends
+1
.append(
@@ -1031,26 +1031... |
2fb9e916155fce16a807c1c7eebf4a607c22ef94 | Correct Celery support to be backwards compatible (fixes GH-124) | raven/contrib/celery/__init__.py | raven/contrib/celery/__init__.py | """
raven.contrib.celery
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
try:
from celery.task import task
except ImportError:
from celery.decorators import task
from celery.signals import after_setup_logger, ... | Python | 0 | @@ -918,46 +918,8 @@
t):%0A
- @task_failure.connect(weak=False)%0A
@@ -1284,41 +1284,57 @@
%7D)%0A
-%0A
-@after_setup_logger.connect(
+task_failure.connect(process_failure_signal,
weak
@@ -1341,16 +1341,17 @@
=False)%0A
+%0A
def
@@ -1762,8 +1762,73 @@
andler)%0A
+ after_setup_logger.conne... |
3f09216ed6afc8fc2173dae40c4776fef4b4d4d2 | update docstring, clarify variable name | matchzoo/datapack.py | matchzoo/datapack.py | """Matchzoo DataPack, pair-wise tuple (feature) and context as input."""
import typing
from pathlib import Path
import dill
import pandas as pd
class DataPack(object):
"""
Matchzoo DataPack data structure, store dataframe and context.
Example:
>>> features = [([1,3], [2,3]), ([3,0], [1,6])]
... | Python | 0.000001 | @@ -932,29 +932,46 @@
Get
-size of
+numer of rows in
the
-data p
+%60DataP
ack
+%60 object
.%22%22%22
@@ -1790,29 +1790,21 @@
d(self,
-new_data_pack
+other
: 'DataP
@@ -2023,37 +2023,28 @@
ram
-new_data_pack: A new
+other: the %60
DataPack
obj
@@ -2043,95 +2043,31 @@
Pack
+%60
object
-.%0A :pa... |
4582a8a77eaa3a21a50fdbf49d19142be9812cfe | remove print statement | tajima.py | tajima.py | #! /usr/bin/env python
"""
usage:
tb.py tajima [--no-header --extra] <window-size> <step-size> <vcf>
tb.py tajima [--no-header --extra] <window-size> --sliding <vcf>
options:
-h --help Show this screen.
--version Show version.
--window-size blah
--step-... | Python | 0.999999 | @@ -3447,23 +3447,8 @@
__)%0A
- print args%0A
|
dcd3d67b77946922ff3b133d062798bf2f3e5786 | fix check_clang_tidy to forbid mixing of CHECK-NOTES and CHECK-MESSAGES | test/clang-tidy/check_clang_tidy.py | test/clang-tidy/check_clang_tidy.py | #!/usr/bin/env python
#
#===- check_clang_tidy.py - ClangTidy Test Helper ------------*- python -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===--------------------------------------... | Python | 0.000005 | @@ -3386,16 +3386,139 @@
fix) )%0A%0A
+ if has_check_notes and has_check_messages:%0A sys.exit('Please use either CHECK-NOTES or CHECK-MESSAGES but not both')%0A%0A
# Remo
|
7f0617dc8eed2d7b2da6b395f64f06ec1947072f | Support models as constants | tastytools/test/resources.py | tastytools/test/resources.py | from django.db.models.fields.related import ManyToManyField, ManyRelatedObjectsDescriptor
from django.db.models.fields.related import ForeignRelatedObjectsDescriptor
from django.db import IntegrityError, DatabaseError
from django.db.utils import ConnectionDoesNotExist
from django.core.management import call_command
im... | Python | 0 | @@ -1997,34 +1997,50 @@
rce=force, id=id
+, model=constant
)%0A
-
@@ -2222,24 +2222,40 @@
force, id=id
+, model=constant
)%0A #e
@@ -2545,32 +2545,44 @@
e=False, id=None
+, model=None
):%0A force
@@ -2706,16 +2706,139 @@
ssion)%0A%0A
+ if model is not None:%0A ur... |
8fb149400a115fd0abf595c6716aed22c396eb86 | remove call to curCycle in panic() The panic() function already prints the current tick value. This call to curCycle() is as such redundant. Since we are trying to move towards multiple clock domains, this call will print misleading time. | src/mem/slicc/ast/AST.py | src/mem/slicc/ast/AST.py | # Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
# Copyright (c) 2009 The Hewlett-Packard Development Company
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source co... | Python | 0 | @@ -2423,48 +2423,17 @@
on%7D%7D
-, Ruby Time: %25d, %25s.%5C%5Cn%22,%0A curCycle()
+: %25s.%5C%5Cn%22
, $m
|
80fafd59340bc749967880d04e429d5c077db34b | Add an another lazy if | 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.000182 | @@ -2666,32 +2666,44 @@
warped=False)%0A%0A
+%09%09if True:%0A%09
%09%09ljd.ast.locals
@@ -2726,32 +2726,33 @@
nitions(ast)%0A%0A%09%09
+%09
# ljd.ast.valida
@@ -2782,24 +2782,25 @@
d=False)%0A%0A%09%09
+%09
ljd.ast.muta
@@ -2822,16 +2822,17 @@
s(ast)%0A%0A
+%09
%09%09ljd.as
|
a69cdac9b5a0cc0a6bf97b3ff7bac5da874ca63e | bump ec2 api version | main.py | main.py | import urllib
import httplib
from amazon.query import AmazonQuery
if __name__ == '__main__':
key_id = 'AKIAIEXAMPLEEXAMPLE6'
secret = 'example+example+example+example+example7'
endpoint = 'http://ec2.us-west-1.amazonaws.com'
question = { 'Version': '2012-03-01', 'Action': 'DescribeInstances' }
... | Python | 0 | @@ -261,36 +261,36 @@
'Version': '201
-2-03
+4-02
-01', 'Action':
|
09af9f28079685ce9360381708a7b0529ef77f3f | Rename file of generated images | main.py | main.py | import os
import numpy as np
import scipy
import colorlog as log
import logging
from utils.model_monitor import ModelMonitor
from network.pixel_rnn import PixelRNN
from utils.visualization import save_network_graph, dynamic_image, save_grayscale_images_grid
log.basicConfig(level=logging.DEBUG)
def train_model(mode... | Python | 0 | @@ -3,16 +3,73 @@
port os%0A
+%0Aos.environ%5B%22THEANO_FLAGS%22%5D = %22device=gpu0,lib.cnmem=1%22%0A%0A
import n
@@ -2680,22 +2680,25 @@
nerated/
-images
+generated
.jpg%22))%0A
@@ -4913,16 +4913,18 @@
ize)%0A
+ #
test_mo
@@ -4991,18 +4991,16 @@
est)%0A
- #
generat
|
723abaf9bb1ad6d0b8c67e06522bb1d87f3ab82d | Fix broken test, handle terminate on the REQUEST | test/test_listallobjects_handler.py | test/test_listallobjects_handler.py | from handler_fixture import StationHandlerTestCase
from groundstation.transfer.request_handlers import handle_listallobjects
from groundstation.transfer.response_handlers import handle_terminate
import groundstation.transfer.response as response
from groundstation.proto.object_list_pb2 import ObjectList
class TestH... | Python | 0 | @@ -1643,18 +1643,18 @@
inate(re
-sp
+q1
)%0A%0A
|
4c5550420b8a9f1bf88f4329952f6e2a161cd20f | Fix test on kaos with latest qt5 | test/test_panels/test_navigation.py | test/test_panels/test_navigation.py | from pyqode.core.api import TextHelper
from pyqode.qt.QtTest import QTest
def test_toggle_button(editor):
editor.file.open('test/files/example.json')
editor.show()
TextHelper(editor).goto_line(6)
QTest.qWait(500)
panel = editor.panels.get('NavigationPanel')
assert len(panel._widgets) == 4
... | Python | 0 | @@ -344,16 +344,41 @@
%5D.text()
+.replace('&', '').lower()
== 'win
|
07a9f573ad0872c9b8a6520a93cdf78db3336305 | fix timeout typo | main.py | main.py | #!/usr/bin/python2
from multiprocessing import Process, Queue
import sys
import os
import time
import shlex
import cmd
import logging
from datetime import datetime
import RPi.GPIO as GPIO
from stepper_controller import MotorController
# stepper sequence. motor dependent
# SEQ = [(1,0,0,0),
# (0,1,0,0),
# ... | Python | 0.000001 | @@ -1768,16 +1768,17 @@
.get(tim
+e
out=10))
|
6090a569810a3ebcac5600569b70a4239f99bc27 | Fix NameError in SubmitCommentHandler | main.py | main.py | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | Python | 0.000001 | @@ -3654,20 +3654,20 @@
l':
-autho
+use
r.email
+()
%7D))%0A
|
6878860d8b8d3377960a8310b6b733a4cbc30959 | use environment variable | main.py | main.py | import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write("Hello, world")
if __name__ == "__main__":
application = tornado.web.Application([
(r"/", MainHandler),
])
application.listen(80)
tornado.ioloop.IOLoop.current().st... | Python | 0.000008 | @@ -1,20 +1,30 @@
+import os%0A
import tornado.ioloo
@@ -285,10 +285,26 @@
ten(
-80
+os.environ%5B'PORT'%5D
)%0A
|
4962705b6876592657f51fa6546d75404a460010 | bump version | main.py | main.py | #!/usr/bin/env python
# coding: utf-8
__version__ = "0.5.1"
import kivy
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.clock import Clock
from kivy.core.window import Window
try :
from jnius import autoclass
from android.runnable import run_on_ui_thread
except ImportError, e :
pass
f... | Python | 0 | @@ -50,17 +50,17 @@
= %220.5.
-1
+2
%22%0Aimport
|
119893b1eca46cc8889fd2c299e656c659eb1a84 | Update amazon endpoint in code. | main.py | main.py | #! /usr/bin/env python
from PyMata.pymata import PyMata
import subprocess
import os
import random
import time
import alsaaudio
import wave
import random
from creds import *
import requests
import json
import re
from memcache import Client
# Import SDK packages
from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient
impo... | Python | 0 | @@ -359,71 +359,137 @@
nt(%22
-AWS_IOT_ARN%22)%0AmyMQTTClient.configureEndpoint(%22REST_API_ENDPOINT
+arn:aws:iot:us-east-1:194337674115:thing/NUC-Gateway%22)%0AmyMQTTClient.configureEndpoint(%22a1am3uuthfk12b.iot.us-east-1.amazonaws.com
%22, 8
|
944515624ec57f94b6bdb4e9a46988b9604f4c3b | add basic command line parser. | main.py | main.py | #!/usr/bin/python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
import sys
import argparse
import re
def main():
print("YMK Goodbye World!!!")
if __name__ == '__main__':
main()
| Python | 0 | @@ -104,55 +104,1083 @@
re%0A
-%0A%0Adef main():%0A print(%22YMK Goodbye World!!!%22)
+import logging%0A%0A%0Alg = logging.getLogger(%22DRIVE_MAIN%22)%0Alg.setLevel(logging.DEBUG)%0Ach = logging.StreamHandler()%0Ach.setLevel(logging.DEBUG)%0Aformatter = logging.Formatter('%5B%25(name)s%5D %25(levelname)s - %25(mes... |
4bcf8ea9572b90782e2f1d6150ec96e28002378f | set loglevel to warning | main.py | main.py | """
The MIT License (MIT)
Copyright (c) 2014 Kord Campbell, StackGeek
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, mo... | Python | 0.000001 | @@ -1391,16 +1391,31 @@
t routes
+%0Aimport logging
%0A%0Afrom w
@@ -1450,16 +1450,63 @@
_error%0A%0A
+logging.getLogger().setLevel(logging.WARNING)%0A%0A
# base a
|
c126348a70f316c9ef25d70dc87d6b25f69f83af | remove routes | main.py | main.py | from flask import Flask
app = Flask(__name__)
app.config['DEBUG'] = True
from util import today
from models import Event
from google.appengine.ext import ndb
import twilio.twiml
@app.route('/')
def hello():
"""Return a friendly HTTP greeting."""
return 'Hello World!'
@app.route('/message', methods=['GET', 'P... | Python | 0.00178 | @@ -177,107 +177,8 @@
ml%0A%0A
-@app.route('/')%0Adef hello():%0A %22%22%22Return a friendly HTTP greeting.%22%22%22%0A return 'Hello World!'%0A%0A
@app
@@ -649,161 +649,4 @@
se)%0A
- %0A %0A %0A %0A@app.errorhandler(404)%0Adef page_not_found(e):%0A %22%22%22Return a custom 404 error.%22... |
60ae3ae54ccc573983cb9c283844eab1b62ba7a7 | Use multiprocessing instead of threading | main.py | main.py | #!/usr/bin/env python
###############################################################################
# bitcoind-ncurses by Amphibian
# thanks to jgarzik for bitcoinrpc
# wumpus and kylemanna for configuration file parsing
# all the users for their suggestions and testing
# and of course the bitcoin dev team for that ... | Python | 0.000001 | @@ -438,24 +438,23 @@
ort
-threading, Queue
+multiprocessing
, Co
@@ -1005,37 +1005,47 @@
terface_queue =
-Queue
+multiprocessing
.Queue()%0A rpc
@@ -1053,21 +1053,31 @@
queue =
-Queue
+multiprocessing
.Queue()
@@ -1730,24 +1730,31 @@
d =
-threading.Thread
+multiprocessing.Process
(tar
|
46db44a83d7683c985e0637956674e4e0506b28f | support custom figure names | main.py | main.py | #!/usr/bin/env python3
import numpy as np
import torch
import matplotlib
import matplotlib.pyplot as plt
from torch.autograd import Variable
import atexit
class PhnSpkGenerator():
def __init__(self, mu, cov, phn, spk):
self._mu = mu
self._cov = cov
self._phn = phn
self._spk = sp... | Python | 0 | @@ -757,16 +757,28 @@
hn, spk,
+ name=%22fig%22,
transfo
@@ -814,16 +814,20 @@
.figure(
+name
)%0A%0A
@@ -2274,16 +2274,33 @@
n, t_spk
+, name=%22Raw data%22
)%0A%0A b
@@ -2522,16 +2522,46 @@
t_spk,
+name=%22BN features%22, transform=
bn_extra
|
401a2ff9f12837965050b117fcd05a07fb3a8928 | Implement autoindent | main.py | main.py | #!/usr/bin/env python
import os.path
import sys
import tkinter as tk
import tkinter.filedialog
import tkinter.scrolledtext
VERSION = [0, 0, 0]
class Application(tk.Frame):
def __init__(self, master=None):
tk.Frame.__init__(self, master)
self.pack(expand=1, fill='both')
self.createWidget... | Python | 0.000002 | @@ -31,16 +31,26 @@
os.path%0A
+import re%0A
import s
@@ -1470,32 +1470,87 @@
olledText(self)%0A
+ self.textout.bind('%3CReturn%3E', self.autoindent)%0A
self.tex
@@ -2441,13 +2441,8 @@
nd')
-%5B:-1%5D
)%0A
@@ -2480,16 +2480,271 @@
'end')%0A
+ return 'break'%0A%0A def autoindent(self, ... |
50a025032cfa07a842291637cb4d8240edcb60ea | Rename TabConverter to TapConverter | main.py | main.py | import os
import re
from TapConverter import TapConverter
import settings
import sandschreiber
from werkzeug import secure_filename
from flask import Flask, render_template, request, redirect, jsonify
app = Flask(__name__)
app.jinja_env.filters['basename'] = os.path.basename
ss = sandschreiber.AsyncSandschreiber(sett... | Python | 0.000024 | @@ -1495,17 +1495,17 @@
ter = Ta
-b
+p
Converte
|
34b8285657190fc310cc319e05a1afb3f98bc5e6 | add hint | main.py | main.py | #功能:自动生成每周的 IRC 会议记录邮件
#
#输入:结束会议时 bot 的提示
# 示例:
'''
<zodbot> Minutes: http://meetbot.fedoraproject.org/fedora-zh/2014-01-31/fedora-zh.2014-01-31-13.02.html
<zodbot> Minutes (text): http://meetbot.fedoraproject.org/fedora-zh/2014-01-31/fedora-zh.2014-01-31-13.02.txt
<zodbot> Log: http://meetbot.fedoraproject.org/fedora... | Python | 0.000014 | @@ -3372,18 +3372,41 @@
file.close()
+%0A print(%22Finished!%22)
%0A%0A
|
2033d494cba2c61e868ded2d5a5e65cc23d4edf6 | Remove test failing due to lack of TLS support | main.py | main.py | #!/usr/bin/python
from __future__ import print_function
import httplib2
from dateutil.parser import parse
import re
import hashlib
from time import sleep
from apiclient import discovery, errors
import oauth2client
from oauth2client import client
from oauth2client import tools
import config
def get_credentials():
... | Python | 0.000001 | @@ -1186,282 +1186,8 @@
ject
-%0A%0A %3E%3E%3E events = load_ical(%22https://www.houghton.edu/events/?ical=1&tribe_display=month%22)%0A %3E%3E%3E len(events) %3E 50%0A True%0A %3E%3E%3E 'summary' in events.itervalues().next()%0A True%0A %3E%3E%3E 'start' in events.itervalues().next()%0A True%0A %3E%3E%3E 'end'... |
affc8e0f0be765f5adc31113ad535852e01cc75a | Fix unique ID Verisure alarm control panel (#51087) | homeassistant/components/verisure/alarm_control_panel.py | homeassistant/components/verisure/alarm_control_panel.py | """Support for Verisure alarm control panels."""
from __future__ import annotations
import asyncio
from homeassistant.components.alarm_control_panel import (
FORMAT_NUMBER,
AlarmControlPanelEntity,
)
from homeassistant.components.alarm_control_panel.const import (
SUPPORT_ALARM_ARM_AWAY,
SUPPORT_ALARM... | Python | 0 | @@ -1244,88 +1244,8 @@
rm%22%0A
- _attr_supported_features = SUPPORT_ALARM_ARM_HOME %7C SUPPORT_ALARM_ARM_AWAY%0A%0A
@@ -1776,16 +1776,169 @@
M_AWAY%0A%0A
+ @property%0A def unique_id(self) -%3E str:%0A %22%22%22Return the unique ID for this entity.%22%22%22%0A return self.coordinator.ent... |
34a3b5c626e077907c46835b1759a818b3fc332a | Make 2-legged calls with the help of tweepy, Twitter API lib. | uservoice/__init__.py | uservoice/__init__.py | from Crypto.Cipher import AES
import base64
import hashlib
import urllib
import operator
import array
import simplejson as json
import urllib
import urllib2
import datetime
import pytz
from tweepy import oauth
def generate_sso_token(subdomain_name, sso_key, user_attributes):
current_time = (datetime.datetime.n... | Python | 0 | @@ -134,19 +134,17 @@
t urllib
-
%0A
+
import u
@@ -202,18 +202,16 @@
rt oauth
-
%0A%0Adef ge
@@ -711,17 +711,16 @@
_json)%5D)
-
%0A iv_
@@ -766,52 +766,8 @@
%5D)%0A%0A
- # # xor the iv into the first 16 bytes.%0A
@@ -1057,16 +1057,16 @@
(data)%0A%0A
-
retu
@@ -1115,8 +1115,675 @@
_bytes... |
98f986aaa938f5aa43183042d2a4b0ad58c3f03d | remove debugging | sbudget/sbudget.py | sbudget/sbudget.py | import os
import sqlite3
import string
import random
import time
from flask import Flask, request, session, g, redirect, url_for, abort, \
render_template, flash
app = Flask(__name__)
app.config.from_object(__name__)
app.config.update(dict(
DATABASE=os.path.join(app.root_path, 'sbudget.db'),
SECRET_KEY=''... | Python | 0.000065 | @@ -1453,27 +1453,8 @@
%5B0%5D%0A
- print typeName%0A
|
3be6ed2f32492d79b639e657cbf5782451b527e7 | Disable broken upload test | tests/frontend/views/upload_test.py | tests/frontend/views/upload_test.py | import os
from io import BytesIO
import pytest
from skylines.database import db
from skylines.model import User
pytestmark = pytest.mark.usefixtures('db_session', 'files_folder')
HERE = os.path.dirname(__file__)
DATADIR = os.path.join(HERE, '..', '..', 'data')
@pytest.fixture(scope='function')
def bill(app):
... | Python | 0 | @@ -1266,16 +1266,83 @@
tents%0A%0A%0A
+@pytest.mark.skip(reason=%22endless loop in airspace analysis code%22)%0A
def test
|
71a1d2b40a03bde4969f0eea5f2c48d4ba7ace1b | Fix batch tests on Python 3 | tests/integration/cli/test_batch.py | tests/integration/cli/test_batch.py | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Nicole Thomas <nicole@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import, print_function, unicode_literals
# Import Salt Testing Libs
from tests.support.case import ShellCase
class BatchTest(ShellCase):
'''
Integration tests fo... | Python | 0.000679 | @@ -514,10 +514,26 @@
on %5B
-u%5C
+%7B0%7D%5D'.format(repr(
'sub
@@ -543,12 +543,11 @@
nion
-%5C'%5D'
+'))
%0A%0A
@@ -878,25 +878,47 @@
run on %5B
-u
+%7B0%7D, %7B1%7D%5D%22.format(repr(
'minion'
, u'sub_
@@ -909,19 +909,24 @@
'minion'
+)
,
-u
+repr(
'sub_min
@@ -921,34 +921,34 @@
epr('sub_minion'
-%5D%2... |
6f391d4113b55f538cfeed26c36b17846c7b758f | fix alt-svc test | tests/level4/test_http3_response.py | tests/level4/test_http3_response.py | import pytest
import os
import socket
import time
import sys
#@pytest.mark.skip
def test_http2 (launch):
serve = './examples/http3.py'
with launch (serve, port = 30371, quic = 30371, ssl = True) as engine:
resp = engine.http2.get ('/hello?num=1')
assert resp.text == 'hello'
assert 'alt-... | Python | 0.000002 | @@ -305,41 +305,108 @@
-assert 'alt-svc' in resp.headers%0A
+if sys.version_info.major %3E 3 or (sys.version_info.major == 3 and sys.version_info.minor %3E= 6):%0A
|
ff24f5eb908739708496bef5a2402baac9b3680e | Fix up tests. | IPython/core/tests/test_history.py | IPython/core/tests/test_history.py | # coding: utf-8
"""Tests for the IPython tab-completion machinery.
"""
#-----------------------------------------------------------------------------
# Module imports
#-----------------------------------------------------------------------------
# stdlib
import os
import sys
import unittest
# third party
import nose.... | Python | 0.000002 | @@ -625,42 +625,8 @@
ir:%0A
- # Make a new :memory: DB.%0A
@@ -659,32 +659,91 @@
history_manager%0A
+ hist_file = os.path.join(tmpdir, 'history.sqlite')%0A
try:%0A
@@ -811,18 +811,17 @@
ile=
-':memory:'
+hist_file
)%0A
@@ -1376,186 +1376,8 @@
-# Check lines were written to DB... |
137e4580bd1472658a40b44b72e946ae80d98fed | Add test for list_bundled_profiles | IPython/core/tests/test_profile.py | IPython/core/tests/test_profile.py | """Tests for profile-related functions.
Currently only the startup-dir functionality is tested, but more tests should
be added for:
* ipython profile create
* ipython profile list
* ipython profile create --parallel
* security dir permissions
Authors
-------
* MinRK
"""
from __future__ import absol... | Python | 0.000001 | @@ -4168,17 +4168,16 @@
)%0A %0A%0A
-#
def test
@@ -4201,10 +4201,248 @@
files():
+%0A # This variable will need to be updated when a new profile gets bundled%0A bundled_true = %5Bu'cluster', u'math', u'pysh', u'python3', u'sympy'%5D%0A bundled = sorted(list_bundled_profiles())%0A nt.assert_equals(bun... |
1e9ebf139ae76eddfe8dd01290e41735e7d1011b | Rewrite syntax to be Python 3.5+ | IPython/utils/tests/test_openpy.py | IPython/utils/tests/test_openpy.py | import io
import os.path
import nose.tools as nt
from IPython.utils import openpy
mydir = os.path.dirname(__file__)
nonascii_path = os.path.join(mydir, '../../core/tests/nonascii.py')
def test_detect_encoding():
with open(nonascii_path, 'rb') as f:
enc, lines = openpy.detect_encoding(f.readline)
nt.a... | Python | 0.999892 | @@ -615,33 +615,32 @@
enc)%0A assert
-u
'coding: iso-885
@@ -771,17 +771,16 @@
assert
-u
'coding:
@@ -1208,17 +1208,16 @@
_not_in(
-u
'coding:
|
a5b111833f3edd050c9d45553d9e21afa9fa1d57 | fix mysql bug | everyclass/__init__.py | everyclass/__init__.py | import logging
from flask import Flask, g, render_template, send_from_directory, session
from flask_cdn import CDN
from htmlmin import minify
from termcolor import cprint
from raven.contrib.flask import Sentry
from elasticapm.contrib.flask import ElasticAPM
from elasticapm.handlers.logging import LoggingHandler
from ... | Python | 0 | @@ -1927,16 +1927,28 @@
T_ID();%22
+, multi=True
)%0A
|
64ed1185fca6ba60e06d508ac401f68d5be1ce56 | bring tests up to #442 change | tests/python_tests/load_map_test.py | tests/python_tests/load_map_test.py | #!/usr/bin/env python
from nose.tools import *
from utilities import execution_path
import os, sys, glob, mapnik
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('.'))
# We expect these files to not raise any
# exc... | Python | 0 | @@ -743,27 +743,28 @@
raise a
-UserWarning
+RuntimeError
%0A# and f
@@ -835,19 +835,20 @@
ses(
-UserWarning
+RuntimeError
)%0Ade
@@ -863,27 +863,29 @@
_raises_
-userwarning
+runtime_error
(file):%0A
@@ -1219,19 +1219,21 @@
ses_
-userwarning
+runtime_error
, fi
|
558846fc67ac40d444ed4f64d35bc50e5d2e057b | Remove the description as it is optional. | billing/gateways/stripe_gateway.py | billing/gateways/stripe_gateway.py | from billing import Gateway
from billing.utils.credit_card import InvalidCard, Visa, MasterCard, \
AmericanExpress, Discover
import stripe
from django.conf import settings
class StripeGateway(Gateway):
supported_cardtypes = [Visa, MasterCard, AmericanExpress, Discover]
supported_countries = ['US']
de... | Python | 0.000003 | @@ -1071,11 +1071,10 @@
%7D
-,
)%0A
+
@@ -1681,75 +1681,8 @@
%7D
-,%0A description=%22Storing for future use%22%0A
)%0A
@@ -2362,32 +2362,32 @@
%7D,%0A
+
@@ -2406,66 +2406,8 @@
n_id
-,%0A description=%22Thanks for subscribi... |
24b7d3d0904a75e1e26ccfc34834ae495edb8146 | Fix for skipping django-configurations tests when running on Python < 2.6 | tests/test_django_configurations.py | tests/test_django_configurations.py | """Tests which check the various ways you can set DJANGO_SETTINGS_MODULE
If these tests fail you probably forgot to install django-configurations.
"""
import pytest
pytest.importorskip('configurations')
pytestmark = pytest.mark.skipif("sys.version_info < (2,6) ")
BARE_SETTINGS = '''
from configurations import Sett... | Python | 0.000002 | @@ -156,38 +156,39 @@
ort
-pytest%0A%0A%0A
+sys%0Aimport
pytest
-.
+%0A%0A#
import
-orskip('
+ing
conf
@@ -201,44 +201,60 @@
ions
-')%0Apytestmark = pytest.mark.skipif(%22
+ fails on 2.5, even though it might be installed%0Aif
sys.
@@ -275,12 +275,124 @@
(2,
+
6)
- %22
+:%0A pytest.skip('django-config... |
cfb6f65a12c88a4b497e787d03321ba8cfcbda27 | Fix an error in attribute retrival | biothings/web/settings/__init__.py | biothings/web/settings/__init__.py | # -*- coding: utf-8 -*-
'''Settings objects used to configure the web API
These settings get passed into the handler.initialize() function,
of each request, and configure the web API endpoint. They are mostly
a container for the `Config module`_, and any other settings that
are the same across all handler types, e.g. ... | Python | 0.000027 | @@ -1909,16 +1909,22 @@
_default
+, name
))%0A%0A
|
441c5e5a6a96544d3c34ed71ff37d93c3476524f | fix syntax issue; | biothings_explorer/id_converter.py | biothings_explorer/id_converter.py | # -*- coding: utf-8 -*-
"""
biothings_explorer.id_converter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module contains code that biothings_explorer use to resolve
different identifiers
"""
import time
from .registry import Registry
from .apicall import BioThingsCaller
from .api_output_parser import OutputParser
class IDC... | Python | 0 | @@ -182,20 +182,8 @@
%22%22%22%0A
-import time%0A
from
@@ -1403,16 +1403,109 @@
registry
+.%0A %0A Parameters%0A ----------%0A api (str) : the name of API%0A
%22%22%22%0A
@@ -1784,27 +1784,24 @@
%0A for
- k,
v in mappin
@@ -1807,20 +1807,21 @@
ng_file.
-item
+value... |
cf2a9f0918bc56a9015c745108f6de5ae8c60773 | Add status | my-ACG/update-episodes/anime1_me.py | my-ACG/update-episodes/anime1_me.py | # -*- coding: utf-8 -*-
import argparse
import importlib
import os
import sys
os.environ['PYWIKIBOT_DIR'] = os.path.dirname(os.path.realpath(__file__))
import pywikibot
sys.path.append('..')
animeSite = importlib.import_module('util.anime1_me', 'Anime1Me').Anime1Me()
site = pywikibot.Site()
site.login()
datasite = ... | Python | 0.000001 | @@ -1258,282 +1258,8 @@
te')
-%0A%0A if 'P31' in claims and claims%5B'P31'%5D%5B0%5D.getTarget().id == 'Q57':%0A print('%5Ct Update status to playing')%0A statusValue = pywikibot.ItemPage(datasite, 'Q56')%0A claims%5B'P31'%5D%5B0%5D.changeTarget(statusValue, summ... |
6334521dc2ed7023887f0cd3b7f3f7d005070dd4 | version 0.3.0 | scrape/__init__.py | scrape/__init__.py | __version__ = '0.2.10'
| Python | 0.000002 | @@ -14,10 +14,9 @@
'0.
-2.1
+3.
0'%0A
|
b7aa789a1b49332d19d37d82430b48ed9dca8ddb | Include AsOf data item in data dict as well as attribute | v1pysdk/base_asset.py | v1pysdk/base_asset.py |
from pprint import pformat as pf
from query import V1Query
class BaseAsset(object):
"""Provides common methods for the dynamically derived asset type classes
built by V1Meta.asset_class"""
@classmethod
def query(Class, where=None, sel=None):
'Takes a V1 Data query string and returns an iterable o... | Python | 0 | @@ -1057,16 +1057,40 @@
= asof%0A
+ data%5B'AsOf'%5D = asof%0A
retu
|
c7e393d665cc89ebd653fbf3690a86a08b72d74a | parse correct voting date to datetime.date | scraper/votings.py | scraper/votings.py | import logging
import requests
import lxml.html
logger = logging.getLogger(__name__)
TWEEDEKAMER_URL = 'https://www.tweedekamer.nl'
SEARCH_URL = 'https://www.tweedekamer.nl/zoeken'
class Vote(object):
def __init__(self, vote_table_row):
self.vote_table_row = vote_table_row
self.details = ''
... | Python | 0.999999 | @@ -41,16 +41,34 @@
xml.html
+%0Aimport dateparser
%0A%0Alogger
@@ -1235,16 +1235,22 @@
ult_tree
+, date
):%0A
@@ -1283,16 +1283,41 @@
lt_tree%0A
+ self.date = date%0A
@@ -2292,85 +2292,8 @@
xt%0A%0A
- def get_date(self):%0A return self.get_property_elements()%5B1%5D.text%0A%0A
... |
86113d1b53827a2d0c106734c5fd04e9ad935529 | disable layout optimizer for grappler, due to conv2d filter error | scripts/convert.py | scripts/convert.py | """Run Grappler optimizers in the standalone mode.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
import sys
import os
from absl import flags
from tensorflow.python.tools import freeze_graph
from tensorflow.core.protobuf import... | Python | 0 | @@ -2334,18 +2334,8 @@
cy',
- 'layout',
'pr
|
ad14d77a137c924357bca51d39b91b4d502d2ce6 | Improve pylint score | scripts/extract.py | scripts/extract.py | """
## CODE OWNERS: Kyle Baird, Shea Parkes
### OWNERS ATTEST TO THE FOLLOWING:
* The `master` branch will meet Milliman QRM standards at all times.
* Deliveries will only be made from code in the `master` branch.
* Review/Collaboration notes will be captured in Pull Requests.
### OBJECTIVE:
Extract data from ... | Python | 0 | @@ -1109,26 +1109,26 @@
-fieldnames
+FIELDNAMES
= prm_f
@@ -1178,22 +1178,22 @@
-writer
+WRITER
= csv.D
@@ -1248,26 +1248,26 @@
ldnames=
-fieldnames
+FIELDNAMES
,%0A
@@ -1278,30 +1278,30 @@
)%0A
-writer
+WRITER
.writeheader
@@ -1393,22 +1393,22 @@
-writer
+WRITER
.... |
8861cc5e94538d1685dc4ddaae0dc8d436e2e7fc | debug statement for cleaning | scripts/scraper.py | scripts/scraper.py | # -*- coding:Utf-8 -*-
import re
from os.path import exists
from urllib import urlopen, quote
from BeautifulSoup import BeautifulSoup
from deputies.models import Deputy, Party, CommissionMembership, Document, Question, Analysis
LACHAMBRE_PREFIX="http://www.lachambre.be/kvvcr/"
def lame_url(url):
# convert super ... | Python | 0 | @@ -1055,24 +1055,48 @@
ef clean():%0A
+ print %22cleaning db%22%0A
map(lamb
|
f276d6fdb412b8ad93de8ba6d921d29a57710077 | Update usage message | server/messages.py | server/messages.py | '''Endpoints messages.'''
from protorpc import messages
class Status(messages.Enum):
OK = 1
MISSING_DATA = 2
EXISTS = 3
BAD_DATA = 4
ERROR = 5
NO_DEVICE = 6
class DataMessage(messages.Message):
device_id = messages.StringField(1)
status = messages.EnumField(Status, 2)
class Status... | Python | 0 | @@ -862,31 +862,220 @@
essages.
-StringField(1)%0A
+IntegerField(1, repeated=True)%0A datapoint_num = messages.IntegerField(2)%0A datapoint_freq = messages.EnumField()%0A class Frequency(messages.Enum):%0A DAY = 1%0A WEEK = 2%0A MONTH = 3
%0A%0Aclass
|
d79fa2bee44bb0ee2bfebd8d9353f6b467702a59 | Fix missing key error for LVAN | vat_ladder/src/val.py | vat_ladder/src/val.py | """Virtual Adversarial Ladder"""
import tensorflow as tf
from src.utils import count_trainable_params, preprocess, get_batch_ops
from src.vat import Adversary
from src.ladder import Ladder, Encoder, Decoder
class LadderWithVAN(Ladder):
def get_corrupted_encoder(self, inputs, bn, train_flag, params,
... | Python | 0.000061 | @@ -2017,16 +2017,26 @@
out - 1%5D
+.get(None)
))%0A%0A
|
917dde63ece9e552427487c7639be64e1b113d3d | Update zibra download fields. | vdb/zibra_download.py | vdb/zibra_download.py | import os, re, time, datetime, csv, sys
import rethinkdb as r
from Bio import SeqIO
from download import download
from download import parser
class zibra_download(download):
def __init__(self, **kwargs):
download.__init__(self, **kwargs)
self.virus_specific_fasta_fields = []
if __name__=="__main__... | Python | 0 | @@ -409,32 +409,9 @@
, 'c
-itation', 'ct', 'country
+t
', '
@@ -440,16 +440,32 @@
cation',
+ 'microcephaly',
%0A
@@ -526,61 +526,34 @@
', '
-public', 'region', 'rt_positive', 'timestamp', 'virus
+rt_positive', 'sample_type
'%5D%0A
|
bf90f726da9954edb69f4c0cb29206ff82444d63 | Add custom admin classes | src/recipi/food/admin.py | src/recipi/food/admin.py | # -*- coding: utf-8 -*-
from django.contrib import admin
from recipi.food.models import (
FoodGroup, Food, Language, LanguageDescription, Nutrient,
Weight, Footnote)
admin.site.register(FoodGroup)
admin.site.register(Food)
admin.site.register(Language)
admin.site.register(LanguageDescription)
admin.site.regi... | Python | 0 | @@ -170,16 +170,372 @@
note)%0A%0A%0A
+class FoodGroupAdmin(admin.ModelAdmin):%0A pass%0A%0A%0Aclass FoodAdmin(admin.ModelAdmin):%0A pass%0A%0A%0Aclass LanguageAdmin(admin.ModelAdmin):%0A pass%0A%0A%0Aclass LanguageDescriptionAdmin(admin.ModelAdmin):%0A pass%0A%0A%0Aclass NutrientAdmin(admin.ModelAdmin):%0... |
cf7f5dc359bb49743750c9ace6c317092b275653 | remove the use of refine_results because it is changed to private method | mmrp.py | mmrp.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import logging.config
import json
LOGGING_CONF_FILE = 'logging.json'
DEFAULT_LOGGING_LVL = logging.INFO
path = LOGGING_CONF_FILE
value = os.getenv('LOG_CFG', None)
if value:
path = value
if os.path.exists(path):
with open(path, 'rt') as f:
... | Python | 0.000001 | @@ -1664,22 +1664,16 @@
r()%0A
-rough_
results
@@ -1709,60 +1709,8 @@
ns)%0A
- results = planner.refine_results(rough_results)%0A
|
e701286478d0c460d0a8a2e2fd5b73bf124a90ec | make a better error message when removing reservations that does not exist | opennsa/backends/common/calendar.py | opennsa/backends/common/calendar.py | """
Backend reservation calendar.
Inteded usage is for NRM backend which does not have their own reservation calendar.
Right now it is very minimal, but should be enough for basic service.
Author: Henrik Thostrup Jensen <htj@nordu.net>
Copyright: NORDUnet (2011)
"""
import datetime
from opennsa import error
cla... | Python | 0.000002 | @@ -783,32 +783,49 @@
time, end_time)%0A
+ try:%0A
self.res
@@ -846,32 +846,182 @@
ve(reservation)%0A
+ except ValueError:%0A raise ValueError('Reservation (%25s, %25s, %25s) does not exists. Cannot remove' %25 (resource, start_time, end_time))%0A
%0A%0A def checkR
|
8e6662a4aaf654ddf18c1c4e733c58db5b9b5579 | Add cache in opps menu list via context processors | opps/channels/context_processors.py | opps/channels/context_processors.py | # -*- coding: utf-8 -*-
from django.utils import timezone
from django.conf import settings
from django.contrib.sites.models import get_current_site
from .models import Channel
def channel_context(request):
""" Channel context processors
"""
site = get_current_site(request)
opps_menu = Channel.objects... | Python | 0 | @@ -140,16 +140,52 @@
ent_site
+%0Afrom django.core.cache import cache
%0A%0Afrom .
@@ -338,57 +338,121 @@
u =
-Channel.objects.filter(site=site,%0A
+cache.get('opps_menu')%0A if not opps_menu:%0A opps_menu = %5Bchannel for channel in Channel.objects.filter(%0A
@@ -451,32 +451,43 @@
... |
eeef09628a877e769dd1f55e627d3047bedf7f3d | Fix edit of news. | news.py | news.py | # -*- coding: UTF-8 -*-
# Copyright (C) 2008 Matthieu France <matthieu.france@itaapy.com>
#
# 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 ... | Python | 0 | @@ -5527,38 +5527,33 @@
-resource.handler.
+document.set_
events
- =
+(
html
+)
%0A%0A
|
a7593b5c90a0cf6ae2fb14cf8935d1f3af58dff0 | rename md5sum to nspc_md5sum | tools/gen_playlist_from_seed.py | tools/gen_playlist_from_seed.py | #!/usr/bin/python3
import sys, os, json, hashlib
# we're in directory 'tools/' we have to update sys.path
sys.path.append(os.path.dirname(sys.path[0]))
from rom.rom import RealROM, snes_to_pc, pc_to_snes
from rom.rompatcher import MusicPatcher,RomTypeForMusic
from utils.parameters import appDir
from utils.utils impo... | Python | 0.003597 | @@ -2591,32 +2591,37 @@
cksTable%5Baddr%5D%5B%22
+nspc_
md5sum%22%5D = %5BNone
@@ -2614,32 +2614,32 @@
5sum%22%5D = %5BNone%5D%0A
-
continue
@@ -2741,32 +2741,37 @@
cksTable%5Baddr%5D%5B%22
+nspc_
md5sum%22%5D = %5Bmd5s
@@ -2932,16 +2932,21 @@
%5Baddr%5D%5B%22
+nspc_
md5sum%22%5D
@@ -3058,24 +3058,29 @@... |
baa710088488ba15e7219f341aff173ecf4ea636 | update DataGen | org/tradesafe/data/dataGenerator.py | org/tradesafe/data/dataGenerator.py | # encoding:utf-8
from numpy import array
# from sklearn.cross_validation import train_test_split
from sklearn.model_selection import train_test_split
from org.tradesafe.data.history_data import HistoryData
from org.tradesafe.utils.utils import mylog
class DataGen(object):
'''
trian data generator
'''
... | Python | 0 | @@ -4568,60 +4568,8 @@
ay)%0A
- batch_y.append(y.max())%0A
|
acf1c9db347917ef3bf31aec27d2635a8b4e1c68 | Add timezone to prettified time. | paasta_tools/chronos_serviceinit.py | paasta_tools/chronos_serviceinit.py | #!/usr/bin/env python
import datetime
import logging
import sys
import humanize
import isodate
import requests_cache
import chronos_tools
from paasta_tools.utils import datetime_from_utc_to_local
from paasta_tools.utils import _log
from paasta_tools.utils import PaastaColors
log = logging.getLogger("__main__")
log.... | Python | 0 | @@ -3326,16 +3326,18 @@
%25dT%25H:%25M
+%25Z
%22),%0A
|
84242433388797951c715eaf35d9fdb4045ff5b2 | Rearrange some code | dataset/data_pretreatment.py | dataset/data_pretreatment.py | import cv2
import tensorflow as tf
class Frames:
videofile_name = ''
frames = []
grouped_frames = []
grouped_frames_decoded = []
group_numbers_sequence = []
frames_number_in_group = []
number_of_frames = int
number_of_grouped_frames = int
def __init__(self, videofile_name, group_l... | Python | 0.999999 | @@ -4423,472 +4423,394 @@
-return context_parsed, sequence_parsed%0A%0A%0Aif __name__ == '__main__':%0A dataset = Dataset('src/*.avi')%0A # dataset.create_dataset()%0A context, sequence = dataset.parse_single_example('src/1.avi.tfrecord')%0A context_features = tf.contrib.learn.run_n(context, n=1, feed... |
621565e0daa4e06ff6a67f985af124fa7f101d77 | Refactor dbaas test helpers | dbaas/dbaas/tests/helpers.py | dbaas/dbaas/tests/helpers.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from physical.tests import factory as factory_physical
class InstanceHelper(object):
@staticmethod
def check_instance_is_master(instance):
"""
Method for mock the real check_instance_is_master.
T... | Python | 0 | @@ -98,75 +98,937 @@
ests
- import factory as factory_physical%0A%0A%0Aclass InstanceHelper(object):
+.factory import InstanceFactory%0A%0A%0Aclass UsedAndTotalValidator(object):%0A%0A @staticmethod%0A def assertEqual(a, b):%0A assert a == b, %22%7B%7D NOT EQUAL %7B%7D%22.format(a, b)%0A%0A @classmetho... |
56aa00210b5adb663abea62ecd297f094dcbfeb0 | remove prodigal from the subcommand module | diagnostic_primers/scripts/subcommands/__init__.py | diagnostic_primers/scripts/subcommands/__init__.py | # -*- coding: utf-8 -*-
"""Module providing subcommands for pdp."""
from .subcmd_config import subcmd_config
from .subcmd_prodigal import subcmd_prodigal
from .subcmd_filter import subcmd_filter
from .subcmd_eprimer3 import subcmd_eprimer3
from .subcmd_primersearch import subcmd_primersearch
from .subcmd_dedupe import... | Python | 0.000002 | @@ -107,53 +107,8 @@
fig%0A
-from .subcmd_prodigal import subcmd_prodigal%0A
from
|
ebb7f4ca18e099fb2902fa66cbb68c29baa98917 | fix download_chromedriver.py to return fast when file exists | dev/download_chromedriver.py | dev/download_chromedriver.py | #!/usr/bin/env python
import os, stat
import requests
import zipfile
DESTINATION_DIR = os.path.join(
os.path.dirname(os.path.realpath(__file__)), 'files')
DOWNLOAD_URL = "http://chromedriver.storage.googleapis.com"
MAC_DRIVER_NAME = 'chromedriver_mac64.zip'
if not os.path.exists(DESTINATION_DIR):
os.mkdir(DE... | Python | 0 | @@ -729,16 +729,278 @@
TEST'):%0A
+ destination_file_path = os.path.join(DESTINATION_DIR, MAC_DRIVER_NAME)%0A destination_unzip_path = os.path.join(DESTINATION_DIR, 'chromedriver')%0A if os.path.exists(destination_unzip_path):%0A return %22%7B%7D driver exists%22.format(destination_unzip_path)%0A
... |
a7116bca501c04c85b9b8563d94b9e0ce9b6f511 | Revert "fixed translation" | topaz/objects/functionobject.py | topaz/objects/functionobject.py | import copy
from topaz.frame import BuiltinFrame
from topaz.objects.objectobject import W_BaseObject
class W_FunctionObject(W_BaseObject):
_immutable_fields_ = ["name", "w_class", "visibility"]
PUBLIC = 0
PROTECTED = 1
PRIVATE = 2
def __init__(self, name, w_class=None, visibility=PUBLIC):
... | Python | 0 | @@ -898,27 +898,16 @@
, name,
-visibility=
visibili
@@ -2103,27 +2103,16 @@
_class,
-visibility=
visibili
|
97e274399651ef0191e0e5294ac9874eb158973e | Add DEBUG level loggint to root logger in case of verbose mode | test/run_tests.py | test/run_tests.py | #!/usr/bin/env python
# Copyright 2015 Lajos Gerecs, Janos Czentye
#
# 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 appli... | Python | 0 | @@ -4753,16 +4753,67 @@
_args()%0A
+ if args.verbose:%0A log.setLevel(logging.DEBUG)%0A
result
|
f9b38aa0f38e86a718d851057c26f945e6b872a9 | Update BatteryAlarm.py | 20140707-ProgramaDeAlertaBateria/BatteryAlarm.py | 20140707-ProgramaDeAlertaBateria/BatteryAlarm.py | #!usr/bin/env python
#coding=utf-8
# Es necesario editar
# sudo vim /etc/crontab
# Edicionar: */15 * * * * root python /JAIMEANDRES/ArchivosSistema/BatteryAlarm.py
#
# Reiniciar servicio de cron: sudo service cron stop / start
#
# Este archivo requiere tener en su misma carpeta el archivo
# ReproductorDeSonidos.py... | Python | 0 | @@ -1381,37 +1381,8 @@
AV(%22
-/JAIMEANDRES/ArchivosSistema/
Bate
@@ -1475,37 +1475,8 @@
AV(%22
-/JAIMEANDRES/ArchivosSistema/
Batt
|
f4931b4d35a63d1542963ccd369efa64e0133e2e | Make this test faster | jacquard/storage/tests/test_cloned_redis.py | jacquard/storage/tests/test_cloned_redis.py | import functools
import unittest.mock
import pytest
import hypothesis
import hypothesis.strategies
from jacquard.storage.exceptions import Retry
from jacquard.storage.cloned_redis import ClonedRedisStore, resync_all_connections
try:
import fakeredis
except ImportError:
fakeredis = None
arbitrary_key = hypo... | Python | 0.009968 | @@ -772,16 +772,35 @@
%0A ),%0A
+ max_leaves=10,%0A
).filter
|
59c03b9113266830bfca272dafb17e7c0b4933ba | Create empty memory map if one is not provided by target subclass. | pyOCD/target/target.py | pyOCD/target/target.py | """
mbed CMSIS-DAP debugger
Copyright (c) 2006-2015 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable ... | Python | 0 | @@ -598,16 +598,51 @@
e.%0A%22%22%22%0A%0A
+from .memory_map import MemoryMap%0A%0A
class Ta
@@ -1377,16 +1377,31 @@
emoryMap
+ or MemoryMap()
%0A
|
1256f695a441049438565285f48c9119e5211cf5 | Enable follow redirection. | pyaem/bagofrequests.py | pyaem/bagofrequests.py | import cStringIO
from handlers import unexpected as handle_unexpected
import pycurl
import requests
import urllib
def request(method, url, params, handlers, **kwargs):
curl = pycurl.Curl()
body_io = cStringIO.StringIO()
if method == 'post':
curl.setopt(pycurl.POST, 1)
curl.setopt(pycurl.POSTFIELDS, urllib.... | Python | 0 | @@ -419,32 +419,71 @@
ycurl.URL, url)%0A
+%09curl.setopt(pycurl.FOLLOWLOCATION, 1)%0A
%09curl.setopt(pyc
@@ -508,32 +508,32 @@
body_io.write)%0A
-
%09%0A%09curl.perform(
@@ -993,32 +993,71 @@
ycurl.URL, url)%0A
+%09curl.setopt(pycurl.FOLLOWLOCATION, 1)%0A
%09curl.setopt(pyc
@@ -1621,32 +1621,71 @@
ycurl.URL, ur... |
7f7f32d032c68197b2152eeb8d9189f3d1493b57 | Bump version number for development | pybinding/__about__.py | pybinding/__about__.py | """Package for numerical tight-binding calculations in solid state physics"""
__title__ = "pybinding"
__version__ = "0.8.1"
__summary__ = "Package for tight-binding calculations"
__url__ = "https://github.com/dean0x7d/pybinding"
__author__ = "Dean Moldovan"
__copyright__ = "2015-2016, " + __author__
__email__ = "dean0... | Python | 0 | @@ -116,11 +116,15 @@
%220.
-8.1
+9.0.dev
%22%0A__
|
0c44f657dd8ad285fa2713d0ab6a367c50a7da4c | If empty string, then is ok | pybossa/auditlogger.py | pybossa/auditlogger.py | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2014 SF Isle of Man Limited
#
# PyBossa 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... | Python | 0.999999 | @@ -2438,38 +2438,32 @@
ld_value is None
- or ''
:%0A
@@ -2523,14 +2523,8 @@
None
- or ''
:%0A
|
3d930d6191f176313e551b2a0fbe0f94ac8b08d3 | add test condition for forking test | tests/test_tactical_cortex_caddy.py | tests/test_tactical_cortex_caddy.py | import unittest
from OnStage.tactical_cortex_caddy import *
class TacticalCortexTestCase(unittest.TestCase):
def setUp(self):
self.cortex = TacticalCortex()
self.ana_f = [0,0,0,0,0,0,0,0]
self.ana_0 = [2,0,0,0,0,0,0,0]
self.ana_1 = [0,2,0,0,0,0,0,0]
self.ana_2 = [0,0,2,0,0,... | Python | 0 | @@ -1399,16 +1399,70 @@
, 0,6%5D%0A%0A
+ self.forking_board = %5B1,10,0, 0,1,0, 0,0,10%5D%0A%0A
def
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.